!function(){function e(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var t=document.createElement("style");t.innerHTML='.el-container{display:flex;flex-direction:row;flex:1;flex-basis:auto;box-sizing:border-box;min-width:0}.el-container.is-vertical{flex-direction:column}.el-aside{overflow:auto;box-sizing:border-box;flex-shrink:0;width:var(--el-aside-width,300px)}.el-footer{--el-footer-padding:0 20px;--el-footer-height:60px;padding:var(--el-footer-padding);box-sizing:border-box;flex-shrink:0;height:var(--el-footer-height)}.el-header{--el-header-padding:0 20px;--el-header-height:60px;padding:var(--el-header-padding);box-sizing:border-box;flex-shrink:0;height:var(--el-header-height)}.el-main{--el-main-padding:20px;display:block;flex:1;flex-basis:auto;overflow:auto;box-sizing:border-box;padding:var(--el-main-padding)}.el-popover{--el-popover-bg-color:var(--el-bg-color-overlay);--el-popover-font-size:var(--el-font-size-base);--el-popover-border-color:var(--el-border-color-lighter);--el-popover-padding:12px;--el-popover-padding-large:18px 20px;--el-popover-title-font-size:16px;--el-popover-title-text-color:var(--el-text-color-primary);--el-popover-border-radius:4px}.el-popover.el-popper{background:var(--el-popover-bg-color);min-width:150px;border-radius:var(--el-popover-border-radius);border:1px solid var(--el-popover-border-color);padding:var(--el-popover-padding);z-index:var(--el-index-popper);color:var(--el-text-color-regular);line-height:1.4;text-align:justify;font-size:var(--el-popover-font-size);box-shadow:var(--el-box-shadow-light);word-break:break-all}.el-popover.el-popper--plain{padding:var(--el-popover-padding-large)}.el-popover__title{color:var(--el-popover-title-text-color);font-size:var(--el-popover-title-font-size);line-height:1;margin-bottom:12px}.el-popover__reference:focus:hover,.el-popover__reference:focus:not(.focusing){outline-width:0}.el-popover.el-popper:focus,.el-popover.el-popper:focus:active{outline-width:0}.el-popper{--el-popper-border-radius:var(--el-popover-border-radius, 4px)}.el-popper{position:absolute;border-radius:var(--el-popper-border-radius);padding:5px 11px;z-index:2000;font-size:12px;line-height:20px;min-width:10px;word-wrap:break-word;visibility:visible}.el-popper.is-dark{color:var(--el-bg-color);background:var(--el-text-color-primary);border:1px solid var(--el-text-color-primary)}.el-popper.is-dark .el-popper__arrow:before{border:1px solid var(--el-text-color-primary);background:var(--el-text-color-primary);right:0}.el-popper.is-light{background:var(--el-bg-color-overlay);border:1px solid var(--el-border-color-light)}.el-popper.is-light .el-popper__arrow:before{border:1px solid var(--el-border-color-light);background:var(--el-bg-color-overlay);right:0}.el-popper.is-pure{padding:0}.el-popper__arrow{position:absolute;width:10px;height:10px;z-index:-1}.el-popper__arrow:before{position:absolute;width:10px;height:10px;z-index:-1;content:" ";transform:rotate(45deg);background:var(--el-text-color-primary);box-sizing:border-box}.el-popper[data-popper-placement^=top]>.el-popper__arrow{bottom:-5px}.el-popper[data-popper-placement^=top]>.el-popper__arrow:before{border-bottom-right-radius:2px}.el-popper[data-popper-placement^=bottom]>.el-popper__arrow{top:-5px}.el-popper[data-popper-placement^=bottom]>.el-popper__arrow:before{border-top-left-radius:2px}.el-popper[data-popper-placement^=left]>.el-popper__arrow{right:-5px}.el-popper[data-popper-placement^=left]>.el-popper__arrow:before{border-top-right-radius:2px}.el-popper[data-popper-placement^=right]>.el-popper__arrow{left:-5px}.el-popper[data-popper-placement^=right]>.el-popper__arrow:before{border-bottom-left-radius:2px}.el-popper[data-popper-placement^=top] .el-popper__arrow:before{border-top-color:transparent!important;border-left-color:transparent!important}.el-popper[data-popper-placement^=bottom] .el-popper__arrow:before{border-bottom-color:transparent!important;border-right-color:transparent!important}.el-popper[data-popper-placement^=left] .el-popper__arrow:before{border-left-color:transparent!important;border-bottom-color:transparent!important}.el-popper[data-popper-placement^=right] .el-popper__arrow:before{border-right-color:transparent!important;border-top-color:transparent!important}.el-row{display:flex;flex-wrap:wrap;position:relative;box-sizing:border-box}.el-row.is-justify-center{justify-content:center}.el-row.is-justify-end{justify-content:flex-end}.el-row.is-justify-space-between{justify-content:space-between}.el-row.is-justify-space-around{justify-content:space-around}.el-row.is-justify-space-evenly{justify-content:space-evenly}.el-row.is-align-middle{align-items:center}.el-row.is-align-bottom{align-items:flex-end}.el-button{--el-button-font-weight:var(--el-font-weight-primary);--el-button-border-color:var(--el-border-color);--el-button-bg-color:var(--el-fill-color-blank);--el-button-text-color:var(--el-text-color-regular);--el-button-disabled-text-color:var(--el-disabled-text-color);--el-button-disabled-bg-color:var(--el-fill-color-blank);--el-button-disabled-border-color:var(--el-border-color-light);--el-button-divide-border-color:rgba(255, 255, 255, .5);--el-button-hover-text-color:var(--el-color-primary);--el-button-hover-bg-color:var(--el-color-primary-light-9);--el-button-hover-border-color:var(--el-color-primary-light-7);--el-button-active-text-color:var(--el-button-hover-text-color);--el-button-active-border-color:var(--el-color-primary);--el-button-active-bg-color:var(--el-button-hover-bg-color);--el-button-outline-color:var(--el-color-primary-light-5);--el-button-hover-link-text-color:var(--el-color-info);--el-button-active-color:var(--el-text-color-primary)}.el-button{display:inline-flex;justify-content:center;align-items:center;line-height:1;height:32px;white-space:nowrap;cursor:pointer;color:var(--el-button-text-color);text-align:center;box-sizing:border-box;outline:0;transition:.1s;font-weight:var(--el-button-font-weight);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;-webkit-appearance:none;background-color:var(--el-button-bg-color);border:var(--el-border);border-color:var(--el-button-border-color);padding:8px 15px;font-size:var(--el-font-size-base);border-radius:var(--el-border-radius-base)}.el-button:focus,.el-button:hover{color:var(--el-button-hover-text-color);border-color:var(--el-button-hover-border-color);background-color:var(--el-button-hover-bg-color);outline:0}.el-button:active{color:var(--el-button-active-text-color);border-color:var(--el-button-active-border-color);background-color:var(--el-button-active-bg-color);outline:0}.el-button:focus-visible{outline:2px solid var(--el-button-outline-color);outline-offset:1px}.el-button>span{display:inline-flex;align-items:center}.el-button+.el-button{margin-left:12px}.el-button.is-round{padding:8px 15px}.el-button::-moz-focus-inner{border:0}.el-button [class*=el-icon]+span{margin-left:6px}.el-button [class*=el-icon] svg{vertical-align:bottom}.el-button.is-plain{--el-button-hover-text-color:var(--el-color-primary);--el-button-hover-bg-color:var(--el-fill-color-blank);--el-button-hover-border-color:var(--el-color-primary)}.el-button.is-active{color:var(--el-button-active-text-color);border-color:var(--el-button-active-border-color);background-color:var(--el-button-active-bg-color);outline:0}.el-button.is-disabled,.el-button.is-disabled:focus,.el-button.is-disabled:hover{color:var(--el-button-disabled-text-color);cursor:not-allowed;background-image:none;background-color:var(--el-button-disabled-bg-color);border-color:var(--el-button-disabled-border-color)}.el-button.is-loading{position:relative;pointer-events:none}.el-button.is-loading:before{z-index:1;pointer-events:none;content:"";position:absolute;left:-1px;top:-1px;right:-1px;bottom:-1px;border-radius:inherit;background-color:var(--el-mask-color-extra-light)}.el-button.is-round{border-radius:var(--el-border-radius-round)}.el-button.is-circle{border-radius:50%;padding:8px}.el-button.is-text{color:var(--el-button-text-color);border:0 solid transparent;background-color:transparent}.el-button.is-text.is-disabled{color:var(--el-button-disabled-text-color);background-color:transparent!important}.el-button.is-text:not(.is-disabled):focus,.el-button.is-text:not(.is-disabled):hover{background-color:var(--el-fill-color-light)}.el-button.is-text:not(.is-disabled):focus-visible{outline:2px solid var(--el-button-outline-color);outline-offset:1px}.el-button.is-text:not(.is-disabled):active{background-color:var(--el-fill-color)}.el-button.is-text:not(.is-disabled).is-has-bg{background-color:var(--el-fill-color-light)}.el-button.is-text:not(.is-disabled).is-has-bg:focus,.el-button.is-text:not(.is-disabled).is-has-bg:hover{background-color:var(--el-fill-color)}.el-button.is-text:not(.is-disabled).is-has-bg:active{background-color:var(--el-fill-color-dark)}.el-button__text--expand{letter-spacing:.3em;margin-right:-.3em}.el-button.is-link{border-color:transparent;color:var(--el-button-text-color);background:0 0;padding:2px;height:auto}.el-button.is-link:focus,.el-button.is-link:hover{color:var(--el-button-hover-link-text-color)}.el-button.is-link.is-disabled{color:var(--el-button-disabled-text-color);background-color:transparent!important;border-color:transparent!important}.el-button.is-link:not(.is-disabled):focus,.el-button.is-link:not(.is-disabled):hover{border-color:transparent;background-color:transparent}.el-button.is-link:not(.is-disabled):active{color:var(--el-button-active-color);border-color:transparent;background-color:transparent}.el-button--text{border-color:transparent;background:0 0;color:var(--el-color-primary);padding-left:0;padding-right:0}.el-button--text.is-disabled{color:var(--el-button-disabled-text-color);background-color:transparent!important;border-color:transparent!important}.el-button--text:not(.is-disabled):focus,.el-button--text:not(.is-disabled):hover{color:var(--el-color-primary-light-3);border-color:transparent;background-color:transparent}.el-button--text:not(.is-disabled):active{color:var(--el-color-primary-dark-2);border-color:transparent;background-color:transparent}.el-button__link--expand{letter-spacing:.3em;margin-right:-.3em}.el-button--primary{--el-button-text-color:var(--el-color-white);--el-button-bg-color:var(--el-color-primary);--el-button-border-color:var(--el-color-primary);--el-button-outline-color:var(--el-color-primary-light-5);--el-button-active-color:var(--el-color-primary-dark-2);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-link-text-color:var(--el-color-primary-light-5);--el-button-hover-bg-color:var(--el-color-primary-light-3);--el-button-hover-border-color:var(--el-color-primary-light-3);--el-button-active-bg-color:var(--el-color-primary-dark-2);--el-button-active-border-color:var(--el-color-primary-dark-2);--el-button-disabled-text-color:var(--el-color-white);--el-button-disabled-bg-color:var(--el-color-primary-light-5);--el-button-disabled-border-color:var(--el-color-primary-light-5)}.el-button--primary.is-link,.el-button--primary.is-plain,.el-button--primary.is-text{--el-button-text-color:var(--el-color-primary);--el-button-bg-color:var(--el-color-primary-light-9);--el-button-border-color:var(--el-color-primary-light-5);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-bg-color:var(--el-color-primary);--el-button-hover-border-color:var(--el-color-primary);--el-button-active-text-color:var(--el-color-white)}.el-button--primary.is-link.is-disabled,.el-button--primary.is-link.is-disabled:active,.el-button--primary.is-link.is-disabled:focus,.el-button--primary.is-link.is-disabled:hover,.el-button--primary.is-plain.is-disabled,.el-button--primary.is-plain.is-disabled:active,.el-button--primary.is-plain.is-disabled:focus,.el-button--primary.is-plain.is-disabled:hover,.el-button--primary.is-text.is-disabled,.el-button--primary.is-text.is-disabled:active,.el-button--primary.is-text.is-disabled:focus,.el-button--primary.is-text.is-disabled:hover{color:var(--el-color-primary-light-5);background-color:var(--el-color-primary-light-9);border-color:var(--el-color-primary-light-8)}.el-button--success{--el-button-text-color:var(--el-color-white);--el-button-bg-color:var(--el-color-success);--el-button-border-color:var(--el-color-success);--el-button-outline-color:var(--el-color-success-light-5);--el-button-active-color:var(--el-color-success-dark-2);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-link-text-color:var(--el-color-success-light-5);--el-button-hover-bg-color:var(--el-color-success-light-3);--el-button-hover-border-color:var(--el-color-success-light-3);--el-button-active-bg-color:var(--el-color-success-dark-2);--el-button-active-border-color:var(--el-color-success-dark-2);--el-button-disabled-text-color:var(--el-color-white);--el-button-disabled-bg-color:var(--el-color-success-light-5);--el-button-disabled-border-color:var(--el-color-success-light-5)}.el-button--success.is-link,.el-button--success.is-plain,.el-button--success.is-text{--el-button-text-color:var(--el-color-success);--el-button-bg-color:var(--el-color-success-light-9);--el-button-border-color:var(--el-color-success-light-5);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-bg-color:var(--el-color-success);--el-button-hover-border-color:var(--el-color-success);--el-button-active-text-color:var(--el-color-white)}.el-button--success.is-link.is-disabled,.el-button--success.is-link.is-disabled:active,.el-button--success.is-link.is-disabled:focus,.el-button--success.is-link.is-disabled:hover,.el-button--success.is-plain.is-disabled,.el-button--success.is-plain.is-disabled:active,.el-button--success.is-plain.is-disabled:focus,.el-button--success.is-plain.is-disabled:hover,.el-button--success.is-text.is-disabled,.el-button--success.is-text.is-disabled:active,.el-button--success.is-text.is-disabled:focus,.el-button--success.is-text.is-disabled:hover{color:var(--el-color-success-light-5);background-color:var(--el-color-success-light-9);border-color:var(--el-color-success-light-8)}.el-button--warning{--el-button-text-color:var(--el-color-white);--el-button-bg-color:var(--el-color-warning);--el-button-border-color:var(--el-color-warning);--el-button-outline-color:var(--el-color-warning-light-5);--el-button-active-color:var(--el-color-warning-dark-2);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-link-text-color:var(--el-color-warning-light-5);--el-button-hover-bg-color:var(--el-color-warning-light-3);--el-button-hover-border-color:var(--el-color-warning-light-3);--el-button-active-bg-color:var(--el-color-warning-dark-2);--el-button-active-border-color:var(--el-color-warning-dark-2);--el-button-disabled-text-color:var(--el-color-white);--el-button-disabled-bg-color:var(--el-color-warning-light-5);--el-button-disabled-border-color:var(--el-color-warning-light-5)}.el-button--warning.is-link,.el-button--warning.is-plain,.el-button--warning.is-text{--el-button-text-color:var(--el-color-warning);--el-button-bg-color:var(--el-color-warning-light-9);--el-button-border-color:var(--el-color-warning-light-5);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-bg-color:var(--el-color-warning);--el-button-hover-border-color:var(--el-color-warning);--el-button-active-text-color:var(--el-color-white)}.el-button--warning.is-link.is-disabled,.el-button--warning.is-link.is-disabled:active,.el-button--warning.is-link.is-disabled:focus,.el-button--warning.is-link.is-disabled:hover,.el-button--warning.is-plain.is-disabled,.el-button--warning.is-plain.is-disabled:active,.el-button--warning.is-plain.is-disabled:focus,.el-button--warning.is-plain.is-disabled:hover,.el-button--warning.is-text.is-disabled,.el-button--warning.is-text.is-disabled:active,.el-button--warning.is-text.is-disabled:focus,.el-button--warning.is-text.is-disabled:hover{color:var(--el-color-warning-light-5);background-color:var(--el-color-warning-light-9);border-color:var(--el-color-warning-light-8)}.el-button--danger{--el-button-text-color:var(--el-color-white);--el-button-bg-color:var(--el-color-danger);--el-button-border-color:var(--el-color-danger);--el-button-outline-color:var(--el-color-danger-light-5);--el-button-active-color:var(--el-color-danger-dark-2);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-link-text-color:var(--el-color-danger-light-5);--el-button-hover-bg-color:var(--el-color-danger-light-3);--el-button-hover-border-color:var(--el-color-danger-light-3);--el-button-active-bg-color:var(--el-color-danger-dark-2);--el-button-active-border-color:var(--el-color-danger-dark-2);--el-button-disabled-text-color:var(--el-color-white);--el-button-disabled-bg-color:var(--el-color-danger-light-5);--el-button-disabled-border-color:var(--el-color-danger-light-5)}.el-button--danger.is-link,.el-button--danger.is-plain,.el-button--danger.is-text{--el-button-text-color:var(--el-color-danger);--el-button-bg-color:var(--el-color-danger-light-9);--el-button-border-color:var(--el-color-danger-light-5);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-bg-color:var(--el-color-danger);--el-button-hover-border-color:var(--el-color-danger);--el-button-active-text-color:var(--el-color-white)}.el-button--danger.is-link.is-disabled,.el-button--danger.is-link.is-disabled:active,.el-button--danger.is-link.is-disabled:focus,.el-button--danger.is-link.is-disabled:hover,.el-button--danger.is-plain.is-disabled,.el-button--danger.is-plain.is-disabled:active,.el-button--danger.is-plain.is-disabled:focus,.el-button--danger.is-plain.is-disabled:hover,.el-button--danger.is-text.is-disabled,.el-button--danger.is-text.is-disabled:active,.el-button--danger.is-text.is-disabled:focus,.el-button--danger.is-text.is-disabled:hover{color:var(--el-color-danger-light-5);background-color:var(--el-color-danger-light-9);border-color:var(--el-color-danger-light-8)}.el-button--info{--el-button-text-color:var(--el-color-white);--el-button-bg-color:var(--el-color-info);--el-button-border-color:var(--el-color-info);--el-button-outline-color:var(--el-color-info-light-5);--el-button-active-color:var(--el-color-info-dark-2);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-link-text-color:var(--el-color-info-light-5);--el-button-hover-bg-color:var(--el-color-info-light-3);--el-button-hover-border-color:var(--el-color-info-light-3);--el-button-active-bg-color:var(--el-color-info-dark-2);--el-button-active-border-color:var(--el-color-info-dark-2);--el-button-disabled-text-color:var(--el-color-white);--el-button-disabled-bg-color:var(--el-color-info-light-5);--el-button-disabled-border-color:var(--el-color-info-light-5)}.el-button--info.is-link,.el-button--info.is-plain,.el-button--info.is-text{--el-button-text-color:var(--el-color-info);--el-button-bg-color:var(--el-color-info-light-9);--el-button-border-color:var(--el-color-info-light-5);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-bg-color:var(--el-color-info);--el-button-hover-border-color:var(--el-color-info);--el-button-active-text-color:var(--el-color-white)}.el-button--info.is-link.is-disabled,.el-button--info.is-link.is-disabled:active,.el-button--info.is-link.is-disabled:focus,.el-button--info.is-link.is-disabled:hover,.el-button--info.is-plain.is-disabled,.el-button--info.is-plain.is-disabled:active,.el-button--info.is-plain.is-disabled:focus,.el-button--info.is-plain.is-disabled:hover,.el-button--info.is-text.is-disabled,.el-button--info.is-text.is-disabled:active,.el-button--info.is-text.is-disabled:focus,.el-button--info.is-text.is-disabled:hover{color:var(--el-color-info-light-5);background-color:var(--el-color-info-light-9);border-color:var(--el-color-info-light-8)}.el-button--large{--el-button-size:40px;height:var(--el-button-size);padding:12px 19px;font-size:var(--el-font-size-base);border-radius:var(--el-border-radius-base)}.el-button--large [class*=el-icon]+span{margin-left:8px}.el-button--large.is-round{padding:12px 19px}.el-button--large.is-circle{width:var(--el-button-size);padding:12px}.el-button--small{--el-button-size:24px;height:var(--el-button-size);padding:5px 11px;font-size:12px;border-radius:calc(var(--el-border-radius-base) - 1px)}.el-button--small [class*=el-icon]+span{margin-left:4px}.el-button--small.is-round{padding:5px 11px}.el-button--small.is-circle{width:var(--el-button-size);padding:5px}.el-icon-loading{-webkit-animation:rotating 2s linear infinite;animation:rotating 2s linear infinite}.el-icon--right{margin-left:5px}.el-icon--left{margin-right:5px}@-webkit-keyframes rotating{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes rotating{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.el-icon{--color:inherit;height:1em;width:1em;line-height:1em;display:inline-flex;justify-content:center;align-items:center;position:relative;fill:currentColor;color:var(--color);font-size:inherit}.el-icon.is-loading{-webkit-animation:rotating 2s linear infinite;animation:rotating 2s linear infinite}.el-icon svg{height:1em;width:1em}[class*=el-col-]{box-sizing:border-box}[class*=el-col-].is-guttered{display:block;min-height:1px}.el-col-0,.el-col-0.is-guttered{display:none}.el-col-0{max-width:0%;flex:0 0 0%}.el-col-offset-0{margin-left:0}.el-col-pull-0{position:relative;right:0}.el-col-push-0{position:relative;left:0}.el-col-1{max-width:4.1666666667%;flex:0 0 4.1666666667%}.el-col-offset-1{margin-left:4.1666666667%}.el-col-pull-1{position:relative;right:4.1666666667%}.el-col-push-1{position:relative;left:4.1666666667%}.el-col-2{max-width:8.3333333333%;flex:0 0 8.3333333333%}.el-col-offset-2{margin-left:8.3333333333%}.el-col-pull-2{position:relative;right:8.3333333333%}.el-col-push-2{position:relative;left:8.3333333333%}.el-col-3{max-width:12.5%;flex:0 0 12.5%}.el-col-offset-3{margin-left:12.5%}.el-col-pull-3{position:relative;right:12.5%}.el-col-push-3{position:relative;left:12.5%}.el-col-4{max-width:16.6666666667%;flex:0 0 16.6666666667%}.el-col-offset-4{margin-left:16.6666666667%}.el-col-pull-4{position:relative;right:16.6666666667%}.el-col-push-4{position:relative;left:16.6666666667%}.el-col-5{max-width:20.8333333333%;flex:0 0 20.8333333333%}.el-col-offset-5{margin-left:20.8333333333%}.el-col-pull-5{position:relative;right:20.8333333333%}.el-col-push-5{position:relative;left:20.8333333333%}.el-col-6{max-width:25%;flex:0 0 25%}.el-col-offset-6{margin-left:25%}.el-col-pull-6{position:relative;right:25%}.el-col-push-6{position:relative;left:25%}.el-col-7{max-width:29.1666666667%;flex:0 0 29.1666666667%}.el-col-offset-7{margin-left:29.1666666667%}.el-col-pull-7{position:relative;right:29.1666666667%}.el-col-push-7{position:relative;left:29.1666666667%}.el-col-8{max-width:33.3333333333%;flex:0 0 33.3333333333%}.el-col-offset-8{margin-left:33.3333333333%}.el-col-pull-8{position:relative;right:33.3333333333%}.el-col-push-8{position:relative;left:33.3333333333%}.el-col-9{max-width:37.5%;flex:0 0 37.5%}.el-col-offset-9{margin-left:37.5%}.el-col-pull-9{position:relative;right:37.5%}.el-col-push-9{position:relative;left:37.5%}.el-col-10{max-width:41.6666666667%;flex:0 0 41.6666666667%}.el-col-offset-10{margin-left:41.6666666667%}.el-col-pull-10{position:relative;right:41.6666666667%}.el-col-push-10{position:relative;left:41.6666666667%}.el-col-11{max-width:45.8333333333%;flex:0 0 45.8333333333%}.el-col-offset-11{margin-left:45.8333333333%}.el-col-pull-11{position:relative;right:45.8333333333%}.el-col-push-11{position:relative;left:45.8333333333%}.el-col-12{max-width:50%;flex:0 0 50%}.el-col-offset-12{margin-left:50%}.el-col-pull-12{position:relative;right:50%}.el-col-push-12{position:relative;left:50%}.el-col-13{max-width:54.1666666667%;flex:0 0 54.1666666667%}.el-col-offset-13{margin-left:54.1666666667%}.el-col-pull-13{position:relative;right:54.1666666667%}.el-col-push-13{position:relative;left:54.1666666667%}.el-col-14{max-width:58.3333333333%;flex:0 0 58.3333333333%}.el-col-offset-14{margin-left:58.3333333333%}.el-col-pull-14{position:relative;right:58.3333333333%}.el-col-push-14{position:relative;left:58.3333333333%}.el-col-15{max-width:62.5%;flex:0 0 62.5%}.el-col-offset-15{margin-left:62.5%}.el-col-pull-15{position:relative;right:62.5%}.el-col-push-15{position:relative;left:62.5%}.el-col-16{max-width:66.6666666667%;flex:0 0 66.6666666667%}.el-col-offset-16{margin-left:66.6666666667%}.el-col-pull-16{position:relative;right:66.6666666667%}.el-col-push-16{position:relative;left:66.6666666667%}.el-col-17{max-width:70.8333333333%;flex:0 0 70.8333333333%}.el-col-offset-17{margin-left:70.8333333333%}.el-col-pull-17{position:relative;right:70.8333333333%}.el-col-push-17{position:relative;left:70.8333333333%}.el-col-18{max-width:75%;flex:0 0 75%}.el-col-offset-18{margin-left:75%}.el-col-pull-18{position:relative;right:75%}.el-col-push-18{position:relative;left:75%}.el-col-19{max-width:79.1666666667%;flex:0 0 79.1666666667%}.el-col-offset-19{margin-left:79.1666666667%}.el-col-pull-19{position:relative;right:79.1666666667%}.el-col-push-19{position:relative;left:79.1666666667%}.el-col-20{max-width:83.3333333333%;flex:0 0 83.3333333333%}.el-col-offset-20{margin-left:83.3333333333%}.el-col-pull-20{position:relative;right:83.3333333333%}.el-col-push-20{position:relative;left:83.3333333333%}.el-col-21{max-width:87.5%;flex:0 0 87.5%}.el-col-offset-21{margin-left:87.5%}.el-col-pull-21{position:relative;right:87.5%}.el-col-push-21{position:relative;left:87.5%}.el-col-22{max-width:91.6666666667%;flex:0 0 91.6666666667%}.el-col-offset-22{margin-left:91.6666666667%}.el-col-pull-22{position:relative;right:91.6666666667%}.el-col-push-22{position:relative;left:91.6666666667%}.el-col-23{max-width:95.8333333333%;flex:0 0 95.8333333333%}.el-col-offset-23{margin-left:95.8333333333%}.el-col-pull-23{position:relative;right:95.8333333333%}.el-col-push-23{position:relative;left:95.8333333333%}.el-col-24{max-width:100%;flex:0 0 100%}.el-col-offset-24{margin-left:100%}.el-col-pull-24{position:relative;right:100%}.el-col-push-24{position:relative;left:100%}@media only screen and (max-width:768px){.el-col-xs-0,.el-col-xs-0.is-guttered{display:none}.el-col-xs-0{max-width:0%;flex:0 0 0%}.el-col-xs-offset-0{margin-left:0}.el-col-xs-pull-0{position:relative;right:0}.el-col-xs-push-0{position:relative;left:0}.el-col-xs-1{display:block;max-width:4.1666666667%;flex:0 0 4.1666666667%}.el-col-xs-offset-1{margin-left:4.1666666667%}.el-col-xs-pull-1{position:relative;right:4.1666666667%}.el-col-xs-push-1{position:relative;left:4.1666666667%}.el-col-xs-2{display:block;max-width:8.3333333333%;flex:0 0 8.3333333333%}.el-col-xs-offset-2{margin-left:8.3333333333%}.el-col-xs-pull-2{position:relative;right:8.3333333333%}.el-col-xs-push-2{position:relative;left:8.3333333333%}.el-col-xs-3{display:block;max-width:12.5%;flex:0 0 12.5%}.el-col-xs-offset-3{margin-left:12.5%}.el-col-xs-pull-3{position:relative;right:12.5%}.el-col-xs-push-3{position:relative;left:12.5%}.el-col-xs-4{display:block;max-width:16.6666666667%;flex:0 0 16.6666666667%}.el-col-xs-offset-4{margin-left:16.6666666667%}.el-col-xs-pull-4{position:relative;right:16.6666666667%}.el-col-xs-push-4{position:relative;left:16.6666666667%}.el-col-xs-5{display:block;max-width:20.8333333333%;flex:0 0 20.8333333333%}.el-col-xs-offset-5{margin-left:20.8333333333%}.el-col-xs-pull-5{position:relative;right:20.8333333333%}.el-col-xs-push-5{position:relative;left:20.8333333333%}.el-col-xs-6{display:block;max-width:25%;flex:0 0 25%}.el-col-xs-offset-6{margin-left:25%}.el-col-xs-pull-6{position:relative;right:25%}.el-col-xs-push-6{position:relative;left:25%}.el-col-xs-7{display:block;max-width:29.1666666667%;flex:0 0 29.1666666667%}.el-col-xs-offset-7{margin-left:29.1666666667%}.el-col-xs-pull-7{position:relative;right:29.1666666667%}.el-col-xs-push-7{position:relative;left:29.1666666667%}.el-col-xs-8{display:block;max-width:33.3333333333%;flex:0 0 33.3333333333%}.el-col-xs-offset-8{margin-left:33.3333333333%}.el-col-xs-pull-8{position:relative;right:33.3333333333%}.el-col-xs-push-8{position:relative;left:33.3333333333%}.el-col-xs-9{display:block;max-width:37.5%;flex:0 0 37.5%}.el-col-xs-offset-9{margin-left:37.5%}.el-col-xs-pull-9{position:relative;right:37.5%}.el-col-xs-push-9{position:relative;left:37.5%}.el-col-xs-10{display:block;max-width:41.6666666667%;flex:0 0 41.6666666667%}.el-col-xs-offset-10{margin-left:41.6666666667%}.el-col-xs-pull-10{position:relative;right:41.6666666667%}.el-col-xs-push-10{position:relative;left:41.6666666667%}.el-col-xs-11{display:block;max-width:45.8333333333%;flex:0 0 45.8333333333%}.el-col-xs-offset-11{margin-left:45.8333333333%}.el-col-xs-pull-11{position:relative;right:45.8333333333%}.el-col-xs-push-11{position:relative;left:45.8333333333%}.el-col-xs-12{display:block;max-width:50%;flex:0 0 50%}.el-col-xs-offset-12{margin-left:50%}.el-col-xs-pull-12{position:relative;right:50%}.el-col-xs-push-12{position:relative;left:50%}.el-col-xs-13{display:block;max-width:54.1666666667%;flex:0 0 54.1666666667%}.el-col-xs-offset-13{margin-left:54.1666666667%}.el-col-xs-pull-13{position:relative;right:54.1666666667%}.el-col-xs-push-13{position:relative;left:54.1666666667%}.el-col-xs-14{display:block;max-width:58.3333333333%;flex:0 0 58.3333333333%}.el-col-xs-offset-14{margin-left:58.3333333333%}.el-col-xs-pull-14{position:relative;right:58.3333333333%}.el-col-xs-push-14{position:relative;left:58.3333333333%}.el-col-xs-15{display:block;max-width:62.5%;flex:0 0 62.5%}.el-col-xs-offset-15{margin-left:62.5%}.el-col-xs-pull-15{position:relative;right:62.5%}.el-col-xs-push-15{position:relative;left:62.5%}.el-col-xs-16{display:block;max-width:66.6666666667%;flex:0 0 66.6666666667%}.el-col-xs-offset-16{margin-left:66.6666666667%}.el-col-xs-pull-16{position:relative;right:66.6666666667%}.el-col-xs-push-16{position:relative;left:66.6666666667%}.el-col-xs-17{display:block;max-width:70.8333333333%;flex:0 0 70.8333333333%}.el-col-xs-offset-17{margin-left:70.8333333333%}.el-col-xs-pull-17{position:relative;right:70.8333333333%}.el-col-xs-push-17{position:relative;left:70.8333333333%}.el-col-xs-18{display:block;max-width:75%;flex:0 0 75%}.el-col-xs-offset-18{margin-left:75%}.el-col-xs-pull-18{position:relative;right:75%}.el-col-xs-push-18{position:relative;left:75%}.el-col-xs-19{display:block;max-width:79.1666666667%;flex:0 0 79.1666666667%}.el-col-xs-offset-19{margin-left:79.1666666667%}.el-col-xs-pull-19{position:relative;right:79.1666666667%}.el-col-xs-push-19{position:relative;left:79.1666666667%}.el-col-xs-20{display:block;max-width:83.3333333333%;flex:0 0 83.3333333333%}.el-col-xs-offset-20{margin-left:83.3333333333%}.el-col-xs-pull-20{position:relative;right:83.3333333333%}.el-col-xs-push-20{position:relative;left:83.3333333333%}.el-col-xs-21{display:block;max-width:87.5%;flex:0 0 87.5%}.el-col-xs-offset-21{margin-left:87.5%}.el-col-xs-pull-21{position:relative;right:87.5%}.el-col-xs-push-21{position:relative;left:87.5%}.el-col-xs-22{display:block;max-width:91.6666666667%;flex:0 0 91.6666666667%}.el-col-xs-offset-22{margin-left:91.6666666667%}.el-col-xs-pull-22{position:relative;right:91.6666666667%}.el-col-xs-push-22{position:relative;left:91.6666666667%}.el-col-xs-23{display:block;max-width:95.8333333333%;flex:0 0 95.8333333333%}.el-col-xs-offset-23{margin-left:95.8333333333%}.el-col-xs-pull-23{position:relative;right:95.8333333333%}.el-col-xs-push-23{position:relative;left:95.8333333333%}.el-col-xs-24{display:block;max-width:100%;flex:0 0 100%}.el-col-xs-offset-24{margin-left:100%}.el-col-xs-pull-24{position:relative;right:100%}.el-col-xs-push-24{position:relative;left:100%}}@media only screen and (min-width:768px){.el-col-sm-0,.el-col-sm-0.is-guttered{display:none}.el-col-sm-0{max-width:0%;flex:0 0 0%}.el-col-sm-offset-0{margin-left:0}.el-col-sm-pull-0{position:relative;right:0}.el-col-sm-push-0{position:relative;left:0}.el-col-sm-1{display:block;max-width:4.1666666667%;flex:0 0 4.1666666667%}.el-col-sm-offset-1{margin-left:4.1666666667%}.el-col-sm-pull-1{position:relative;right:4.1666666667%}.el-col-sm-push-1{position:relative;left:4.1666666667%}.el-col-sm-2{display:block;max-width:8.3333333333%;flex:0 0 8.3333333333%}.el-col-sm-offset-2{margin-left:8.3333333333%}.el-col-sm-pull-2{position:relative;right:8.3333333333%}.el-col-sm-push-2{position:relative;left:8.3333333333%}.el-col-sm-3{display:block;max-width:12.5%;flex:0 0 12.5%}.el-col-sm-offset-3{margin-left:12.5%}.el-col-sm-pull-3{position:relative;right:12.5%}.el-col-sm-push-3{position:relative;left:12.5%}.el-col-sm-4{display:block;max-width:16.6666666667%;flex:0 0 16.6666666667%}.el-col-sm-offset-4{margin-left:16.6666666667%}.el-col-sm-pull-4{position:relative;right:16.6666666667%}.el-col-sm-push-4{position:relative;left:16.6666666667%}.el-col-sm-5{display:block;max-width:20.8333333333%;flex:0 0 20.8333333333%}.el-col-sm-offset-5{margin-left:20.8333333333%}.el-col-sm-pull-5{position:relative;right:20.8333333333%}.el-col-sm-push-5{position:relative;left:20.8333333333%}.el-col-sm-6{display:block;max-width:25%;flex:0 0 25%}.el-col-sm-offset-6{margin-left:25%}.el-col-sm-pull-6{position:relative;right:25%}.el-col-sm-push-6{position:relative;left:25%}.el-col-sm-7{display:block;max-width:29.1666666667%;flex:0 0 29.1666666667%}.el-col-sm-offset-7{margin-left:29.1666666667%}.el-col-sm-pull-7{position:relative;right:29.1666666667%}.el-col-sm-push-7{position:relative;left:29.1666666667%}.el-col-sm-8{display:block;max-width:33.3333333333%;flex:0 0 33.3333333333%}.el-col-sm-offset-8{margin-left:33.3333333333%}.el-col-sm-pull-8{position:relative;right:33.3333333333%}.el-col-sm-push-8{position:relative;left:33.3333333333%}.el-col-sm-9{display:block;max-width:37.5%;flex:0 0 37.5%}.el-col-sm-offset-9{margin-left:37.5%}.el-col-sm-pull-9{position:relative;right:37.5%}.el-col-sm-push-9{position:relative;left:37.5%}.el-col-sm-10{display:block;max-width:41.6666666667%;flex:0 0 41.6666666667%}.el-col-sm-offset-10{margin-left:41.6666666667%}.el-col-sm-pull-10{position:relative;right:41.6666666667%}.el-col-sm-push-10{position:relative;left:41.6666666667%}.el-col-sm-11{display:block;max-width:45.8333333333%;flex:0 0 45.8333333333%}.el-col-sm-offset-11{margin-left:45.8333333333%}.el-col-sm-pull-11{position:relative;right:45.8333333333%}.el-col-sm-push-11{position:relative;left:45.8333333333%}.el-col-sm-12{display:block;max-width:50%;flex:0 0 50%}.el-col-sm-offset-12{margin-left:50%}.el-col-sm-pull-12{position:relative;right:50%}.el-col-sm-push-12{position:relative;left:50%}.el-col-sm-13{display:block;max-width:54.1666666667%;flex:0 0 54.1666666667%}.el-col-sm-offset-13{margin-left:54.1666666667%}.el-col-sm-pull-13{position:relative;right:54.1666666667%}.el-col-sm-push-13{position:relative;left:54.1666666667%}.el-col-sm-14{display:block;max-width:58.3333333333%;flex:0 0 58.3333333333%}.el-col-sm-offset-14{margin-left:58.3333333333%}.el-col-sm-pull-14{position:relative;right:58.3333333333%}.el-col-sm-push-14{position:relative;left:58.3333333333%}.el-col-sm-15{display:block;max-width:62.5%;flex:0 0 62.5%}.el-col-sm-offset-15{margin-left:62.5%}.el-col-sm-pull-15{position:relative;right:62.5%}.el-col-sm-push-15{position:relative;left:62.5%}.el-col-sm-16{display:block;max-width:66.6666666667%;flex:0 0 66.6666666667%}.el-col-sm-offset-16{margin-left:66.6666666667%}.el-col-sm-pull-16{position:relative;right:66.6666666667%}.el-col-sm-push-16{position:relative;left:66.6666666667%}.el-col-sm-17{display:block;max-width:70.8333333333%;flex:0 0 70.8333333333%}.el-col-sm-offset-17{margin-left:70.8333333333%}.el-col-sm-pull-17{position:relative;right:70.8333333333%}.el-col-sm-push-17{position:relative;left:70.8333333333%}.el-col-sm-18{display:block;max-width:75%;flex:0 0 75%}.el-col-sm-offset-18{margin-left:75%}.el-col-sm-pull-18{position:relative;right:75%}.el-col-sm-push-18{position:relative;left:75%}.el-col-sm-19{display:block;max-width:79.1666666667%;flex:0 0 79.1666666667%}.el-col-sm-offset-19{margin-left:79.1666666667%}.el-col-sm-pull-19{position:relative;right:79.1666666667%}.el-col-sm-push-19{position:relative;left:79.1666666667%}.el-col-sm-20{display:block;max-width:83.3333333333%;flex:0 0 83.3333333333%}.el-col-sm-offset-20{margin-left:83.3333333333%}.el-col-sm-pull-20{position:relative;right:83.3333333333%}.el-col-sm-push-20{position:relative;left:83.3333333333%}.el-col-sm-21{display:block;max-width:87.5%;flex:0 0 87.5%}.el-col-sm-offset-21{margin-left:87.5%}.el-col-sm-pull-21{position:relative;right:87.5%}.el-col-sm-push-21{position:relative;left:87.5%}.el-col-sm-22{display:block;max-width:91.6666666667%;flex:0 0 91.6666666667%}.el-col-sm-offset-22{margin-left:91.6666666667%}.el-col-sm-pull-22{position:relative;right:91.6666666667%}.el-col-sm-push-22{position:relative;left:91.6666666667%}.el-col-sm-23{display:block;max-width:95.8333333333%;flex:0 0 95.8333333333%}.el-col-sm-offset-23{margin-left:95.8333333333%}.el-col-sm-pull-23{position:relative;right:95.8333333333%}.el-col-sm-push-23{position:relative;left:95.8333333333%}.el-col-sm-24{display:block;max-width:100%;flex:0 0 100%}.el-col-sm-offset-24{margin-left:100%}.el-col-sm-pull-24{position:relative;right:100%}.el-col-sm-push-24{position:relative;left:100%}}@media only screen and (min-width:992px){.el-col-md-0,.el-col-md-0.is-guttered{display:none}.el-col-md-0{max-width:0%;flex:0 0 0%}.el-col-md-offset-0{margin-left:0}.el-col-md-pull-0{position:relative;right:0}.el-col-md-push-0{position:relative;left:0}.el-col-md-1{display:block;max-width:4.1666666667%;flex:0 0 4.1666666667%}.el-col-md-offset-1{margin-left:4.1666666667%}.el-col-md-pull-1{position:relative;right:4.1666666667%}.el-col-md-push-1{position:relative;left:4.1666666667%}.el-col-md-2{display:block;max-width:8.3333333333%;flex:0 0 8.3333333333%}.el-col-md-offset-2{margin-left:8.3333333333%}.el-col-md-pull-2{position:relative;right:8.3333333333%}.el-col-md-push-2{position:relative;left:8.3333333333%}.el-col-md-3{display:block;max-width:12.5%;flex:0 0 12.5%}.el-col-md-offset-3{margin-left:12.5%}.el-col-md-pull-3{position:relative;right:12.5%}.el-col-md-push-3{position:relative;left:12.5%}.el-col-md-4{display:block;max-width:16.6666666667%;flex:0 0 16.6666666667%}.el-col-md-offset-4{margin-left:16.6666666667%}.el-col-md-pull-4{position:relative;right:16.6666666667%}.el-col-md-push-4{position:relative;left:16.6666666667%}.el-col-md-5{display:block;max-width:20.8333333333%;flex:0 0 20.8333333333%}.el-col-md-offset-5{margin-left:20.8333333333%}.el-col-md-pull-5{position:relative;right:20.8333333333%}.el-col-md-push-5{position:relative;left:20.8333333333%}.el-col-md-6{display:block;max-width:25%;flex:0 0 25%}.el-col-md-offset-6{margin-left:25%}.el-col-md-pull-6{position:relative;right:25%}.el-col-md-push-6{position:relative;left:25%}.el-col-md-7{display:block;max-width:29.1666666667%;flex:0 0 29.1666666667%}.el-col-md-offset-7{margin-left:29.1666666667%}.el-col-md-pull-7{position:relative;right:29.1666666667%}.el-col-md-push-7{position:relative;left:29.1666666667%}.el-col-md-8{display:block;max-width:33.3333333333%;flex:0 0 33.3333333333%}.el-col-md-offset-8{margin-left:33.3333333333%}.el-col-md-pull-8{position:relative;right:33.3333333333%}.el-col-md-push-8{position:relative;left:33.3333333333%}.el-col-md-9{display:block;max-width:37.5%;flex:0 0 37.5%}.el-col-md-offset-9{margin-left:37.5%}.el-col-md-pull-9{position:relative;right:37.5%}.el-col-md-push-9{position:relative;left:37.5%}.el-col-md-10{display:block;max-width:41.6666666667%;flex:0 0 41.6666666667%}.el-col-md-offset-10{margin-left:41.6666666667%}.el-col-md-pull-10{position:relative;right:41.6666666667%}.el-col-md-push-10{position:relative;left:41.6666666667%}.el-col-md-11{display:block;max-width:45.8333333333%;flex:0 0 45.8333333333%}.el-col-md-offset-11{margin-left:45.8333333333%}.el-col-md-pull-11{position:relative;right:45.8333333333%}.el-col-md-push-11{position:relative;left:45.8333333333%}.el-col-md-12{display:block;max-width:50%;flex:0 0 50%}.el-col-md-offset-12{margin-left:50%}.el-col-md-pull-12{position:relative;right:50%}.el-col-md-push-12{position:relative;left:50%}.el-col-md-13{display:block;max-width:54.1666666667%;flex:0 0 54.1666666667%}.el-col-md-offset-13{margin-left:54.1666666667%}.el-col-md-pull-13{position:relative;right:54.1666666667%}.el-col-md-push-13{position:relative;left:54.1666666667%}.el-col-md-14{display:block;max-width:58.3333333333%;flex:0 0 58.3333333333%}.el-col-md-offset-14{margin-left:58.3333333333%}.el-col-md-pull-14{position:relative;right:58.3333333333%}.el-col-md-push-14{position:relative;left:58.3333333333%}.el-col-md-15{display:block;max-width:62.5%;flex:0 0 62.5%}.el-col-md-offset-15{margin-left:62.5%}.el-col-md-pull-15{position:relative;right:62.5%}.el-col-md-push-15{position:relative;left:62.5%}.el-col-md-16{display:block;max-width:66.6666666667%;flex:0 0 66.6666666667%}.el-col-md-offset-16{margin-left:66.6666666667%}.el-col-md-pull-16{position:relative;right:66.6666666667%}.el-col-md-push-16{position:relative;left:66.6666666667%}.el-col-md-17{display:block;max-width:70.8333333333%;flex:0 0 70.8333333333%}.el-col-md-offset-17{margin-left:70.8333333333%}.el-col-md-pull-17{position:relative;right:70.8333333333%}.el-col-md-push-17{position:relative;left:70.8333333333%}.el-col-md-18{display:block;max-width:75%;flex:0 0 75%}.el-col-md-offset-18{margin-left:75%}.el-col-md-pull-18{position:relative;right:75%}.el-col-md-push-18{position:relative;left:75%}.el-col-md-19{display:block;max-width:79.1666666667%;flex:0 0 79.1666666667%}.el-col-md-offset-19{margin-left:79.1666666667%}.el-col-md-pull-19{position:relative;right:79.1666666667%}.el-col-md-push-19{position:relative;left:79.1666666667%}.el-col-md-20{display:block;max-width:83.3333333333%;flex:0 0 83.3333333333%}.el-col-md-offset-20{margin-left:83.3333333333%}.el-col-md-pull-20{position:relative;right:83.3333333333%}.el-col-md-push-20{position:relative;left:83.3333333333%}.el-col-md-21{display:block;max-width:87.5%;flex:0 0 87.5%}.el-col-md-offset-21{margin-left:87.5%}.el-col-md-pull-21{position:relative;right:87.5%}.el-col-md-push-21{position:relative;left:87.5%}.el-col-md-22{display:block;max-width:91.6666666667%;flex:0 0 91.6666666667%}.el-col-md-offset-22{margin-left:91.6666666667%}.el-col-md-pull-22{position:relative;right:91.6666666667%}.el-col-md-push-22{position:relative;left:91.6666666667%}.el-col-md-23{display:block;max-width:95.8333333333%;flex:0 0 95.8333333333%}.el-col-md-offset-23{margin-left:95.8333333333%}.el-col-md-pull-23{position:relative;right:95.8333333333%}.el-col-md-push-23{position:relative;left:95.8333333333%}.el-col-md-24{display:block;max-width:100%;flex:0 0 100%}.el-col-md-offset-24{margin-left:100%}.el-col-md-pull-24{position:relative;right:100%}.el-col-md-push-24{position:relative;left:100%}}@media only screen and (min-width:1200px){.el-col-lg-0,.el-col-lg-0.is-guttered{display:none}.el-col-lg-0{max-width:0%;flex:0 0 0%}.el-col-lg-offset-0{margin-left:0}.el-col-lg-pull-0{position:relative;right:0}.el-col-lg-push-0{position:relative;left:0}.el-col-lg-1{display:block;max-width:4.1666666667%;flex:0 0 4.1666666667%}.el-col-lg-offset-1{margin-left:4.1666666667%}.el-col-lg-pull-1{position:relative;right:4.1666666667%}.el-col-lg-push-1{position:relative;left:4.1666666667%}.el-col-lg-2{display:block;max-width:8.3333333333%;flex:0 0 8.3333333333%}.el-col-lg-offset-2{margin-left:8.3333333333%}.el-col-lg-pull-2{position:relative;right:8.3333333333%}.el-col-lg-push-2{position:relative;left:8.3333333333%}.el-col-lg-3{display:block;max-width:12.5%;flex:0 0 12.5%}.el-col-lg-offset-3{margin-left:12.5%}.el-col-lg-pull-3{position:relative;right:12.5%}.el-col-lg-push-3{position:relative;left:12.5%}.el-col-lg-4{display:block;max-width:16.6666666667%;flex:0 0 16.6666666667%}.el-col-lg-offset-4{margin-left:16.6666666667%}.el-col-lg-pull-4{position:relative;right:16.6666666667%}.el-col-lg-push-4{position:relative;left:16.6666666667%}.el-col-lg-5{display:block;max-width:20.8333333333%;flex:0 0 20.8333333333%}.el-col-lg-offset-5{margin-left:20.8333333333%}.el-col-lg-pull-5{position:relative;right:20.8333333333%}.el-col-lg-push-5{position:relative;left:20.8333333333%}.el-col-lg-6{display:block;max-width:25%;flex:0 0 25%}.el-col-lg-offset-6{margin-left:25%}.el-col-lg-pull-6{position:relative;right:25%}.el-col-lg-push-6{position:relative;left:25%}.el-col-lg-7{display:block;max-width:29.1666666667%;flex:0 0 29.1666666667%}.el-col-lg-offset-7{margin-left:29.1666666667%}.el-col-lg-pull-7{position:relative;right:29.1666666667%}.el-col-lg-push-7{position:relative;left:29.1666666667%}.el-col-lg-8{display:block;max-width:33.3333333333%;flex:0 0 33.3333333333%}.el-col-lg-offset-8{margin-left:33.3333333333%}.el-col-lg-pull-8{position:relative;right:33.3333333333%}.el-col-lg-push-8{position:relative;left:33.3333333333%}.el-col-lg-9{display:block;max-width:37.5%;flex:0 0 37.5%}.el-col-lg-offset-9{margin-left:37.5%}.el-col-lg-pull-9{position:relative;right:37.5%}.el-col-lg-push-9{position:relative;left:37.5%}.el-col-lg-10{display:block;max-width:41.6666666667%;flex:0 0 41.6666666667%}.el-col-lg-offset-10{margin-left:41.6666666667%}.el-col-lg-pull-10{position:relative;right:41.6666666667%}.el-col-lg-push-10{position:relative;left:41.6666666667%}.el-col-lg-11{display:block;max-width:45.8333333333%;flex:0 0 45.8333333333%}.el-col-lg-offset-11{margin-left:45.8333333333%}.el-col-lg-pull-11{position:relative;right:45.8333333333%}.el-col-lg-push-11{position:relative;left:45.8333333333%}.el-col-lg-12{display:block;max-width:50%;flex:0 0 50%}.el-col-lg-offset-12{margin-left:50%}.el-col-lg-pull-12{position:relative;right:50%}.el-col-lg-push-12{position:relative;left:50%}.el-col-lg-13{display:block;max-width:54.1666666667%;flex:0 0 54.1666666667%}.el-col-lg-offset-13{margin-left:54.1666666667%}.el-col-lg-pull-13{position:relative;right:54.1666666667%}.el-col-lg-push-13{position:relative;left:54.1666666667%}.el-col-lg-14{display:block;max-width:58.3333333333%;flex:0 0 58.3333333333%}.el-col-lg-offset-14{margin-left:58.3333333333%}.el-col-lg-pull-14{position:relative;right:58.3333333333%}.el-col-lg-push-14{position:relative;left:58.3333333333%}.el-col-lg-15{display:block;max-width:62.5%;flex:0 0 62.5%}.el-col-lg-offset-15{margin-left:62.5%}.el-col-lg-pull-15{position:relative;right:62.5%}.el-col-lg-push-15{position:relative;left:62.5%}.el-col-lg-16{display:block;max-width:66.6666666667%;flex:0 0 66.6666666667%}.el-col-lg-offset-16{margin-left:66.6666666667%}.el-col-lg-pull-16{position:relative;right:66.6666666667%}.el-col-lg-push-16{position:relative;left:66.6666666667%}.el-col-lg-17{display:block;max-width:70.8333333333%;flex:0 0 70.8333333333%}.el-col-lg-offset-17{margin-left:70.8333333333%}.el-col-lg-pull-17{position:relative;right:70.8333333333%}.el-col-lg-push-17{position:relative;left:70.8333333333%}.el-col-lg-18{display:block;max-width:75%;flex:0 0 75%}.el-col-lg-offset-18{margin-left:75%}.el-col-lg-pull-18{position:relative;right:75%}.el-col-lg-push-18{position:relative;left:75%}.el-col-lg-19{display:block;max-width:79.1666666667%;flex:0 0 79.1666666667%}.el-col-lg-offset-19{margin-left:79.1666666667%}.el-col-lg-pull-19{position:relative;right:79.1666666667%}.el-col-lg-push-19{position:relative;left:79.1666666667%}.el-col-lg-20{display:block;max-width:83.3333333333%;flex:0 0 83.3333333333%}.el-col-lg-offset-20{margin-left:83.3333333333%}.el-col-lg-pull-20{position:relative;right:83.3333333333%}.el-col-lg-push-20{position:relative;left:83.3333333333%}.el-col-lg-21{display:block;max-width:87.5%;flex:0 0 87.5%}.el-col-lg-offset-21{margin-left:87.5%}.el-col-lg-pull-21{position:relative;right:87.5%}.el-col-lg-push-21{position:relative;left:87.5%}.el-col-lg-22{display:block;max-width:91.6666666667%;flex:0 0 91.6666666667%}.el-col-lg-offset-22{margin-left:91.6666666667%}.el-col-lg-pull-22{position:relative;right:91.6666666667%}.el-col-lg-push-22{position:relative;left:91.6666666667%}.el-col-lg-23{display:block;max-width:95.8333333333%;flex:0 0 95.8333333333%}.el-col-lg-offset-23{margin-left:95.8333333333%}.el-col-lg-pull-23{position:relative;right:95.8333333333%}.el-col-lg-push-23{position:relative;left:95.8333333333%}.el-col-lg-24{display:block;max-width:100%;flex:0 0 100%}.el-col-lg-offset-24{margin-left:100%}.el-col-lg-pull-24{position:relative;right:100%}.el-col-lg-push-24{position:relative;left:100%}}@media only screen and (min-width:1920px){.el-col-xl-0,.el-col-xl-0.is-guttered{display:none}.el-col-xl-0{max-width:0%;flex:0 0 0%}.el-col-xl-offset-0{margin-left:0}.el-col-xl-pull-0{position:relative;right:0}.el-col-xl-push-0{position:relative;left:0}.el-col-xl-1{display:block;max-width:4.1666666667%;flex:0 0 4.1666666667%}.el-col-xl-offset-1{margin-left:4.1666666667%}.el-col-xl-pull-1{position:relative;right:4.1666666667%}.el-col-xl-push-1{position:relative;left:4.1666666667%}.el-col-xl-2{display:block;max-width:8.3333333333%;flex:0 0 8.3333333333%}.el-col-xl-offset-2{margin-left:8.3333333333%}.el-col-xl-pull-2{position:relative;right:8.3333333333%}.el-col-xl-push-2{position:relative;left:8.3333333333%}.el-col-xl-3{display:block;max-width:12.5%;flex:0 0 12.5%}.el-col-xl-offset-3{margin-left:12.5%}.el-col-xl-pull-3{position:relative;right:12.5%}.el-col-xl-push-3{position:relative;left:12.5%}.el-col-xl-4{display:block;max-width:16.6666666667%;flex:0 0 16.6666666667%}.el-col-xl-offset-4{margin-left:16.6666666667%}.el-col-xl-pull-4{position:relative;right:16.6666666667%}.el-col-xl-push-4{position:relative;left:16.6666666667%}.el-col-xl-5{display:block;max-width:20.8333333333%;flex:0 0 20.8333333333%}.el-col-xl-offset-5{margin-left:20.8333333333%}.el-col-xl-pull-5{position:relative;right:20.8333333333%}.el-col-xl-push-5{position:relative;left:20.8333333333%}.el-col-xl-6{display:block;max-width:25%;flex:0 0 25%}.el-col-xl-offset-6{margin-left:25%}.el-col-xl-pull-6{position:relative;right:25%}.el-col-xl-push-6{position:relative;left:25%}.el-col-xl-7{display:block;max-width:29.1666666667%;flex:0 0 29.1666666667%}.el-col-xl-offset-7{margin-left:29.1666666667%}.el-col-xl-pull-7{position:relative;right:29.1666666667%}.el-col-xl-push-7{position:relative;left:29.1666666667%}.el-col-xl-8{display:block;max-width:33.3333333333%;flex:0 0 33.3333333333%}.el-col-xl-offset-8{margin-left:33.3333333333%}.el-col-xl-pull-8{position:relative;right:33.3333333333%}.el-col-xl-push-8{position:relative;left:33.3333333333%}.el-col-xl-9{display:block;max-width:37.5%;flex:0 0 37.5%}.el-col-xl-offset-9{margin-left:37.5%}.el-col-xl-pull-9{position:relative;right:37.5%}.el-col-xl-push-9{position:relative;left:37.5%}.el-col-xl-10{display:block;max-width:41.6666666667%;flex:0 0 41.6666666667%}.el-col-xl-offset-10{margin-left:41.6666666667%}.el-col-xl-pull-10{position:relative;right:41.6666666667%}.el-col-xl-push-10{position:relative;left:41.6666666667%}.el-col-xl-11{display:block;max-width:45.8333333333%;flex:0 0 45.8333333333%}.el-col-xl-offset-11{margin-left:45.8333333333%}.el-col-xl-pull-11{position:relative;right:45.8333333333%}.el-col-xl-push-11{position:relative;left:45.8333333333%}.el-col-xl-12{display:block;max-width:50%;flex:0 0 50%}.el-col-xl-offset-12{margin-left:50%}.el-col-xl-pull-12{position:relative;right:50%}.el-col-xl-push-12{position:relative;left:50%}.el-col-xl-13{display:block;max-width:54.1666666667%;flex:0 0 54.1666666667%}.el-col-xl-offset-13{margin-left:54.1666666667%}.el-col-xl-pull-13{position:relative;right:54.1666666667%}.el-col-xl-push-13{position:relative;left:54.1666666667%}.el-col-xl-14{display:block;max-width:58.3333333333%;flex:0 0 58.3333333333%}.el-col-xl-offset-14{margin-left:58.3333333333%}.el-col-xl-pull-14{position:relative;right:58.3333333333%}.el-col-xl-push-14{position:relative;left:58.3333333333%}.el-col-xl-15{display:block;max-width:62.5%;flex:0 0 62.5%}.el-col-xl-offset-15{margin-left:62.5%}.el-col-xl-pull-15{position:relative;right:62.5%}.el-col-xl-push-15{position:relative;left:62.5%}.el-col-xl-16{display:block;max-width:66.6666666667%;flex:0 0 66.6666666667%}.el-col-xl-offset-16{margin-left:66.6666666667%}.el-col-xl-pull-16{position:relative;right:66.6666666667%}.el-col-xl-push-16{position:relative;left:66.6666666667%}.el-col-xl-17{display:block;max-width:70.8333333333%;flex:0 0 70.8333333333%}.el-col-xl-offset-17{margin-left:70.8333333333%}.el-col-xl-pull-17{position:relative;right:70.8333333333%}.el-col-xl-push-17{position:relative;left:70.8333333333%}.el-col-xl-18{display:block;max-width:75%;flex:0 0 75%}.el-col-xl-offset-18{margin-left:75%}.el-col-xl-pull-18{position:relative;right:75%}.el-col-xl-push-18{position:relative;left:75%}.el-col-xl-19{display:block;max-width:79.1666666667%;flex:0 0 79.1666666667%}.el-col-xl-offset-19{margin-left:79.1666666667%}.el-col-xl-pull-19{position:relative;right:79.1666666667%}.el-col-xl-push-19{position:relative;left:79.1666666667%}.el-col-xl-20{display:block;max-width:83.3333333333%;flex:0 0 83.3333333333%}.el-col-xl-offset-20{margin-left:83.3333333333%}.el-col-xl-pull-20{position:relative;right:83.3333333333%}.el-col-xl-push-20{position:relative;left:83.3333333333%}.el-col-xl-21{display:block;max-width:87.5%;flex:0 0 87.5%}.el-col-xl-offset-21{margin-left:87.5%}.el-col-xl-pull-21{position:relative;right:87.5%}.el-col-xl-push-21{position:relative;left:87.5%}.el-col-xl-22{display:block;max-width:91.6666666667%;flex:0 0 91.6666666667%}.el-col-xl-offset-22{margin-left:91.6666666667%}.el-col-xl-pull-22{position:relative;right:91.6666666667%}.el-col-xl-push-22{position:relative;left:91.6666666667%}.el-col-xl-23{display:block;max-width:95.8333333333%;flex:0 0 95.8333333333%}.el-col-xl-offset-23{margin-left:95.8333333333%}.el-col-xl-pull-23{position:relative;right:95.8333333333%}.el-col-xl-push-23{position:relative;left:95.8333333333%}.el-col-xl-24{display:block;max-width:100%;flex:0 0 100%}.el-col-xl-offset-24{margin-left:100%}.el-col-xl-pull-24{position:relative;right:100%}.el-col-xl-push-24{position:relative;left:100%}}:root{--el-popup-modal-bg-color:var(--el-color-black);--el-popup-modal-opacity:.5}.v-modal-enter{-webkit-animation:v-modal-in var(--el-transition-duration-fast) ease;animation:v-modal-in var(--el-transition-duration-fast) ease}.v-modal-leave{-webkit-animation:v-modal-out var(--el-transition-duration-fast) ease forwards;animation:v-modal-out var(--el-transition-duration-fast) ease forwards}@-webkit-keyframes v-modal-in{0%{opacity:0}}@keyframes v-modal-in{0%{opacity:0}}@-webkit-keyframes v-modal-out{to{opacity:0}}@keyframes v-modal-out{to{opacity:0}}.v-modal{position:fixed;left:0;top:0;width:100%;height:100%;opacity:var(--el-popup-modal-opacity);background:var(--el-popup-modal-bg-color)}.el-popup-parent--hidden{overflow:hidden}.el-dialog{--el-dialog-width:50%;--el-dialog-margin-top:15vh;--el-dialog-bg-color:var(--el-bg-color);--el-dialog-box-shadow:var(--el-box-shadow);--el-dialog-title-font-size:var(--el-font-size-large);--el-dialog-content-font-size:14px;--el-dialog-font-line-height:var(--el-font-line-height-primary);--el-dialog-padding-primary:20px;--el-dialog-border-radius:var(--el-border-radius-small);position:relative;margin:var(--el-dialog-margin-top,15vh) auto 50px;background:var(--el-dialog-bg-color);border-radius:var(--el-dialog-border-radius);box-shadow:var(--el-dialog-box-shadow);box-sizing:border-box;width:var(--el-dialog-width,50%)}.el-dialog:focus{outline:0!important}.el-dialog.is-fullscreen{--el-dialog-width:100%;--el-dialog-margin-top:0;margin-bottom:0;height:100%;overflow:auto}.el-dialog__wrapper{position:fixed;top:0;right:0;bottom:0;left:0;overflow:auto;margin:0}.el-dialog.is-draggable .el-dialog__header{cursor:move;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.el-dialog__header{padding:var(--el-dialog-padding-primary);padding-bottom:10px;margin-right:16px;word-break:break-all}.el-dialog__headerbtn{position:absolute;top:6px;right:0;padding:0;width:54px;height:54px;background:0 0;border:none;outline:0;cursor:pointer;font-size:var(--el-message-close-size,16px)}.el-dialog__headerbtn .el-dialog__close{color:var(--el-color-info);font-size:inherit}.el-dialog__headerbtn:focus .el-dialog__close,.el-dialog__headerbtn:hover .el-dialog__close{color:var(--el-color-primary)}.el-dialog__title{line-height:var(--el-dialog-font-line-height);font-size:var(--el-dialog-title-font-size);color:var(--el-text-color-primary)}.el-dialog__body{padding:calc(var(--el-dialog-padding-primary) + 10px) var(--el-dialog-padding-primary);color:var(--el-text-color-regular);font-size:var(--el-dialog-content-font-size);word-break:break-all}.el-dialog__footer{padding:var(--el-dialog-padding-primary);padding-top:10px;text-align:right;box-sizing:border-box}.el-dialog--center{text-align:center}.el-dialog--center .el-dialog__body{text-align:initial;padding:25px calc(var(--el-dialog-padding-primary) + 5px) 30px}.el-dialog--center .el-dialog__footer{text-align:inherit}.el-overlay-dialog{position:fixed;top:0;right:0;bottom:0;left:0;overflow:auto}.dialog-fade-enter-active{-webkit-animation:modal-fade-in var(--el-transition-duration);animation:modal-fade-in var(--el-transition-duration)}.dialog-fade-enter-active .el-overlay-dialog{-webkit-animation:dialog-fade-in var(--el-transition-duration);animation:dialog-fade-in var(--el-transition-duration)}.dialog-fade-leave-active{-webkit-animation:modal-fade-out var(--el-transition-duration);animation:modal-fade-out var(--el-transition-duration)}.dialog-fade-leave-active .el-overlay-dialog{-webkit-animation:dialog-fade-out var(--el-transition-duration);animation:dialog-fade-out var(--el-transition-duration)}@-webkit-keyframes dialog-fade-in{0%{transform:translate3d(0,-20px,0);opacity:0}to{transform:translateZ(0);opacity:1}}@keyframes dialog-fade-in{0%{transform:translate3d(0,-20px,0);opacity:0}to{transform:translateZ(0);opacity:1}}@-webkit-keyframes dialog-fade-out{0%{transform:translateZ(0);opacity:1}to{transform:translate3d(0,-20px,0);opacity:0}}@keyframes dialog-fade-out{0%{transform:translateZ(0);opacity:1}to{transform:translate3d(0,-20px,0);opacity:0}}@-webkit-keyframes modal-fade-in{0%{opacity:0}to{opacity:1}}@keyframes modal-fade-in{0%{opacity:0}to{opacity:1}}@-webkit-keyframes modal-fade-out{0%{opacity:1}to{opacity:0}}@keyframes modal-fade-out{0%{opacity:1}to{opacity:0}}.el-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:2000;height:100%;background-color:var(--el-overlay-color-lighter);overflow:auto}.el-overlay .el-overlay-root{height:0}.h5-preview{overflow:hidden}.h5-preview .el-dialog__body{width:360px;height:640px;padding:0}.h5-preview .el-dialog__header{display:none}.h5-preview .simulator{padding-right:0}.h5-preview .simulator::-webkit-scrollbar{width:0}.monaco-editor{font-family:-apple-system,BlinkMacSystemFont,Segoe WPC,Segoe UI,HelveticaNeue-Light,system-ui,Ubuntu,Droid Sans,sans-serif;--monaco-monospace-font: "SF Mono", Monaco, Menlo, Consolas, "Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace}.monaco-menu .monaco-action-bar.vertical .action-item .action-menu-item:focus .action-label{stroke-width:1.2px}.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-editor.hc-black .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label{stroke-width:1.2px}.monaco-hover p{margin:0}.monaco-aria-container{position:absolute!important;top:0;height:1px;width:1px;margin:-1px;overflow:hidden;padding:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%)}.monaco-editor.hc-black{-ms-high-contrast-adjust:none}@media screen and (-ms-high-contrast:active){.monaco-editor.vs .view-overlays .current-line,.monaco-editor.vs-dark .view-overlays .current-line{border-color:windowtext!important;border-left:0;border-right:0}.monaco-editor.vs .cursor,.monaco-editor.vs-dark .cursor{background-color:windowtext!important}.monaco-editor.vs .dnd-target,.monaco-editor.vs-dark .dnd-target{border-color:windowtext!important}.monaco-editor.vs .selected-text,.monaco-editor.vs-dark .selected-text{background-color:highlight!important}.monaco-editor.vs .view-line,.monaco-editor.vs-dark .view-line{-ms-high-contrast-adjust:none}.monaco-editor.vs .view-line span,.monaco-editor.vs-dark .view-line span{color:windowtext!important}.monaco-editor.vs .view-line span.inline-selected-text,.monaco-editor.vs-dark .view-line span.inline-selected-text{color:highlighttext!important}.monaco-editor.vs .view-overlays,.monaco-editor.vs-dark .view-overlays{-ms-high-contrast-adjust:none}.monaco-editor.vs .selectionHighlight,.monaco-editor.vs-dark .selectionHighlight,.monaco-editor.vs .wordHighlight,.monaco-editor.vs-dark .wordHighlight,.monaco-editor.vs .wordHighlightStrong,.monaco-editor.vs-dark .wordHighlightStrong,.monaco-editor.vs .reference-decoration,.monaco-editor.vs-dark .reference-decoration{border:2px dotted highlight!important;background:transparent!important;box-sizing:border-box}.monaco-editor.vs .rangeHighlight,.monaco-editor.vs-dark .rangeHighlight{background:transparent!important;border:1px dotted activeborder!important;box-sizing:border-box}.monaco-editor.vs .bracket-match,.monaco-editor.vs-dark .bracket-match{border-color:windowtext!important;background:transparent!important}.monaco-editor.vs .findMatch,.monaco-editor.vs-dark .findMatch,.monaco-editor.vs .currentFindMatch,.monaco-editor.vs-dark .currentFindMatch{border:2px dotted activeborder!important;background:transparent!important;box-sizing:border-box}.monaco-editor.vs .find-widget,.monaco-editor.vs-dark .find-widget{border:1px solid windowtext}.monaco-editor.vs .monaco-list .monaco-list-row,.monaco-editor.vs-dark .monaco-list .monaco-list-row{-ms-high-contrast-adjust:none;color:windowtext!important}.monaco-editor.vs .monaco-list .monaco-list-row.focused,.monaco-editor.vs-dark .monaco-list .monaco-list-row.focused{color:highlighttext!important;background-color:highlight!important}.monaco-editor.vs .monaco-list .monaco-list-row:hover,.monaco-editor.vs-dark .monaco-list .monaco-list-row:hover{background:transparent!important;border:1px solid highlight;box-sizing:border-box}.monaco-editor.vs .monaco-scrollable-element>.scrollbar,.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar{-ms-high-contrast-adjust:none;background:background!important;border:1px solid windowtext;box-sizing:border-box}.monaco-editor.vs .monaco-scrollable-element>.scrollbar>.slider,.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar>.slider{background:windowtext!important}.monaco-editor.vs .monaco-scrollable-element>.scrollbar>.slider:hover,.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar>.slider:hover{background:highlight!important}.monaco-editor.vs .monaco-scrollable-element>.scrollbar>.slider.active,.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar>.slider.active{background:highlight!important}.monaco-editor.vs .decorationsOverviewRuler,.monaco-editor.vs-dark .decorationsOverviewRuler{opacity:0}.monaco-editor.vs .minimap,.monaco-editor.vs-dark .minimap{display:none}.monaco-editor.vs .squiggly-d-error,.monaco-editor.vs-dark .squiggly-d-error{background:transparent!important;border-bottom:4px double #E47777}.monaco-editor.vs .squiggly-c-warning,.monaco-editor.vs-dark .squiggly-c-warning,.monaco-editor.vs .squiggly-b-info,.monaco-editor.vs-dark .squiggly-b-info{border-bottom:4px double #71B771}.monaco-editor.vs .squiggly-a-hint,.monaco-editor.vs-dark .squiggly-a-hint{border-bottom:4px double #6c6c6c}.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label{-ms-high-contrast-adjust:none;color:highlighttext!important;background-color:highlight!important}.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label,.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label{-ms-high-contrast-adjust:none;background:transparent!important;border:1px solid highlight;box-sizing:border-box}.monaco-diff-editor.vs .diffOverviewRuler,.monaco-diff-editor.vs-dark .diffOverviewRuler{display:none}.monaco-editor.vs .line-insert,.monaco-editor.vs-dark .line-insert,.monaco-editor.vs .line-delete,.monaco-editor.vs-dark .line-delete{background:transparent!important;border:1px solid highlight!important;box-sizing:border-box}.monaco-editor.vs .char-insert,.monaco-editor.vs-dark .char-insert,.monaco-editor.vs .char-delete,.monaco-editor.vs-dark .char-delete{background:transparent!important}}.monaco-aria-container{position:absolute;left:-999em}::-ms-clear{display:none}.monaco-editor .editor-widget input{color:inherit}.monaco-editor{position:relative;overflow:visible;-webkit-text-size-adjust:100%}.monaco-editor .overflow-guard{position:relative;overflow:hidden}.monaco-editor .view-overlays{position:absolute;top:0}.monaco-editor .inputarea{min-width:0;min-height:0;margin:0;padding:0;position:absolute;outline:none!important;resize:none;border:none;overflow:hidden;color:transparent;background-color:transparent}.monaco-editor .inputarea.ime-input{z-index:10}.monaco-editor .margin-view-overlays .line-numbers{font-variant-numeric:tabular-nums;position:absolute;text-align:right;display:inline-block;vertical-align:middle;box-sizing:border-box;cursor:default;height:100%}.monaco-editor .relative-current-line-number{text-align:left;display:inline-block;width:100%}.monaco-editor .margin-view-overlays .line-numbers.lh-odd{margin-top:1px}.monaco-mouse-cursor-text{cursor:text}.monaco-editor .view-overlays .current-line,.monaco-editor .margin-view-overlays .current-line{display:block;position:absolute;left:0;top:0;box-sizing:border-box}.monaco-editor .margin-view-overlays .current-line.current-line-margin.current-line-margin-both{border-right:0}.monaco-editor .lines-content .cdr{position:absolute}.monaco-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.monaco-scrollable-element>.visible{opacity:1;background:rgba(0,0,0,0);transition:opacity .1s linear}.monaco-scrollable-element>.invisible{opacity:0;pointer-events:none}.monaco-scrollable-element>.invisible.fade{transition:opacity .8s linear}.monaco-scrollable-element>.shadow{position:absolute;display:none}.monaco-scrollable-element>.shadow.top{display:block;top:0;left:3px;height:3px;width:100%}.monaco-scrollable-element>.shadow.left{display:block;top:3px;left:0;height:100%;width:3px}.monaco-scrollable-element>.shadow.top-left-corner{display:block;top:0;left:0;height:3px;width:3px}.monaco-editor .glyph-margin{position:absolute;top:0}.monaco-editor .margin-view-overlays .cgmr{position:absolute;display:flex;align-items:center;justify-content:center}.monaco-editor .lines-content .core-guide{position:absolute;box-sizing:border-box}.mtkcontrol{color:#fff!important;background:rgb(150,0,0)!important}.monaco-editor.no-user-select .lines-content,.monaco-editor.no-user-select .view-line,.monaco-editor.no-user-select .view-lines{user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-editor .view-lines{white-space:nowrap}.monaco-editor .view-line{position:absolute;width:100%}.monaco-editor .mtkz{display:inline-block}.monaco-editor .lines-decorations{position:absolute;top:0;background:white}.monaco-editor .margin-view-overlays .cldr{position:absolute;height:100%}.monaco-editor .margin-view-overlays .cmdr{position:absolute;left:0;width:100%;height:100%}.monaco-editor .minimap.slider-mouseover .minimap-slider{opacity:0;transition:opacity .1s linear}.monaco-editor .minimap.slider-mouseover:hover .minimap-slider,.monaco-editor .minimap.slider-mouseover .minimap-slider.active{opacity:1}.monaco-editor .minimap-shadow-hidden{position:absolute;width:0}.monaco-editor .minimap-shadow-visible{position:absolute;left:-6px;width:6px}.monaco-editor.no-minimap-shadow .minimap-shadow-visible{position:absolute;left:-1px;width:1px}.monaco-editor .overlayWidgets{position:absolute;top:0;left:0}.monaco-editor .view-ruler{position:absolute;top:0}.monaco-editor .scroll-decoration{position:absolute;top:0;left:0;height:6px}.monaco-editor .lines-content .cslr{position:absolute}.monaco-editor .top-left-radius{border-top-left-radius:3px}.monaco-editor .bottom-left-radius{border-bottom-left-radius:3px}.monaco-editor .top-right-radius{border-top-right-radius:3px}.monaco-editor .bottom-right-radius{border-bottom-right-radius:3px}.monaco-editor.hc-black .top-left-radius{border-top-left-radius:0}.monaco-editor.hc-black .bottom-left-radius{border-bottom-left-radius:0}.monaco-editor.hc-black .top-right-radius{border-top-right-radius:0}.monaco-editor.hc-black .bottom-right-radius{border-bottom-right-radius:0}.monaco-editor .cursors-layer{position:absolute;top:0}.monaco-editor .cursors-layer>.cursor{position:absolute;overflow:hidden}.monaco-editor .cursors-layer.cursor-smooth-caret-animation>.cursor{transition:all 80ms}.monaco-editor .cursors-layer.cursor-block-outline-style>.cursor{box-sizing:border-box;background:transparent!important;border-style:solid;border-width:1px}.monaco-editor .cursors-layer.cursor-underline-style>.cursor{border-bottom-width:2px;border-bottom-style:solid;background:transparent!important;box-sizing:border-box}.monaco-editor .cursors-layer.cursor-underline-thin-style>.cursor{border-bottom-width:1px;border-bottom-style:solid;background:transparent!important;box-sizing:border-box}@keyframes monaco-cursor-smooth{0%,20%{opacity:1}60%,to{opacity:0}}@keyframes monaco-cursor-phase{0%,20%{opacity:1}90%,to{opacity:0}}@keyframes monaco-cursor-expand{0%,20%{transform:scaleY(1)}80%,to{transform:scaleY(0)}}.cursor-smooth{animation:monaco-cursor-smooth .5s ease-in-out 0s 20 alternate}.cursor-phase{animation:monaco-cursor-phase .5s ease-in-out 0s 20 alternate}.cursor-expand>.cursor{animation:monaco-cursor-expand .5s ease-in-out 0s 20 alternate}.monaco-diff-editor .diffOverview{z-index:9}.monaco-diff-editor .diffOverview .diffViewport{z-index:10}.monaco-diff-editor.vs .diffOverview{background:rgba(0,0,0,.03)}.monaco-diff-editor.vs-dark .diffOverview{background:rgba(255,255,255,.01)}.monaco-scrollable-element.modified-in-monaco-diff-editor.vs .scrollbar,.monaco-scrollable-element.modified-in-monaco-diff-editor.vs-dark .scrollbar{background:rgba(0,0,0,0)}.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-black .scrollbar{background:none}.monaco-scrollable-element.modified-in-monaco-diff-editor .slider{z-index:10}.modified-in-monaco-diff-editor .slider.active{background:rgba(171,171,171,.4)}.modified-in-monaco-diff-editor.hc-black .slider.active{background:none}.monaco-editor .insert-sign,.monaco-diff-editor .insert-sign,.monaco-editor .delete-sign,.monaco-diff-editor .delete-sign{font-size:11px!important;opacity:.7!important;display:flex!important;align-items:center}.monaco-editor.hc-black .insert-sign,.monaco-diff-editor.hc-black .insert-sign,.monaco-editor.hc-black .delete-sign,.monaco-diff-editor.hc-black .delete-sign{opacity:1}.monaco-editor .inline-deleted-margin-view-zone,.monaco-editor .inline-added-margin-view-zone{text-align:right}.monaco-editor .view-zones .view-lines .view-line span{display:inline-block}.monaco-editor .margin-view-zones .lightbulb-glyph:hover{cursor:pointer}:root{--sash-size: 4px}.monaco-sash{position:absolute;z-index:35;touch-action:none}.monaco-sash.disabled{pointer-events:none}.monaco-sash.mac.vertical{cursor:col-resize}.monaco-sash.vertical.minimum{cursor:e-resize}.monaco-sash.vertical.maximum{cursor:w-resize}.monaco-sash.mac.horizontal{cursor:row-resize}.monaco-sash.horizontal.minimum{cursor:s-resize}.monaco-sash.horizontal.maximum{cursor:n-resize}.monaco-sash.disabled{cursor:default!important;pointer-events:none!important}.monaco-sash.vertical{cursor:ew-resize;top:0;width:var(--sash-size);height:100%}.monaco-sash.horizontal{cursor:ns-resize;left:0;width:100%;height:var(--sash-size)}.monaco-sash:not(.disabled)>.orthogonal-drag-handle{content:" ";height:calc(var(--sash-size) * 2);width:calc(var(--sash-size) * 2);z-index:100;display:block;cursor:all-scroll;position:absolute}.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)>.orthogonal-drag-handle.start,.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)>.orthogonal-drag-handle.end{cursor:nwse-resize}.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)>.orthogonal-drag-handle.end,.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)>.orthogonal-drag-handle.start{cursor:nesw-resize}.monaco-sash.vertical>.orthogonal-drag-handle.start{left:calc(var(--sash-size) * -.5);top:calc(var(--sash-size) * -1)}.monaco-sash.vertical>.orthogonal-drag-handle.end{left:calc(var(--sash-size) * -.5);bottom:calc(var(--sash-size) * -1)}.monaco-sash.horizontal>.orthogonal-drag-handle.start{top:calc(var(--sash-size) * -.5);left:calc(var(--sash-size) * -1)}.monaco-sash.horizontal>.orthogonal-drag-handle.end{top:calc(var(--sash-size) * -.5);right:calc(var(--sash-size) * -1)}.monaco-sash:before{content:"";pointer-events:none;position:absolute;width:100%;height:100%;transition:background-color .1s ease-out;background:transparent}.monaco-sash.vertical:before{width:var(--sash-hover-size);left:calc(50% - (var(--sash-hover-size) / 2))}.monaco-sash.horizontal:before{height:var(--sash-hover-size);top:calc(50% - (var(--sash-hover-size) / 2))}.pointer-events-disabled{pointer-events:none!important}.monaco-sash.debug{background:cyan}.monaco-sash.debug.disabled{background:rgba(0,255,255,.2)}.monaco-sash.debug:not(.disabled)>.orthogonal-drag-handle{background:red}.monaco-diff-editor .diff-review-line-number{text-align:right;display:inline-block}.monaco-diff-editor .diff-review{position:absolute;user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-diff-editor .diff-review-summary{padding-left:10px}.monaco-diff-editor .diff-review-shadow{position:absolute}.monaco-diff-editor .diff-review-row{white-space:pre}.monaco-diff-editor .diff-review-table{display:table;min-width:100%}.monaco-diff-editor .diff-review-row{display:table-row;width:100%}.monaco-diff-editor .diff-review-spacer{display:inline-block;width:10px;vertical-align:middle}.monaco-diff-editor .diff-review-spacer>.codicon{font-size:9px!important}.monaco-diff-editor .diff-review-actions{display:inline-block;position:absolute;right:10px;top:2px}.monaco-diff-editor .diff-review-actions .action-label{width:16px;height:16px;margin:2px 0}.monaco-action-bar{white-space:nowrap;height:100%}.monaco-action-bar .actions-container{display:flex;margin:0 auto;padding:0;height:100%;width:100%;align-items:center}.monaco-action-bar.vertical .actions-container{display:inline-block}.monaco-action-bar .action-item{display:block;align-items:center;justify-content:center;cursor:pointer;position:relative}.monaco-action-bar .action-item.disabled{cursor:default}.monaco-action-bar .action-item .icon,.monaco-action-bar .action-item .codicon{display:block}.monaco-action-bar .action-item .codicon{display:flex;align-items:center;width:16px;height:16px}.monaco-action-bar .action-label{font-size:11px;padding:3px;border-radius:5px}.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{opacity:.4}.monaco-action-bar.vertical{text-align:left}.monaco-action-bar.vertical .action-item{display:block}.monaco-action-bar.vertical .action-label.separator{display:block;border-bottom:1px solid #bbb;padding-top:1px;margin-left:.8em;margin-right:.8em}.monaco-action-bar .action-item .action-label.separator{width:1px;height:16px;margin:5px 4px!important;cursor:default;min-width:1px;padding:0;background-color:#bbb}.secondary-actions .monaco-action-bar .action-label{margin-left:6px}.monaco-action-bar .action-item.select-container{overflow:hidden;flex:1;max-width:170px;min-width:60px;display:flex;align-items:center;justify-content:center;margin-right:10px}.monaco-action-bar .action-item.action-dropdown-item{display:flex}.monaco-action-bar .action-item.action-dropdown-item>.action-label{margin-right:1px}.context-view{position:absolute;z-index:2500}.context-view.fixed{all:initial;font-family:inherit;font-size:13px;position:fixed;z-index:2500;color:inherit}@font-face{font-family:codicon;font-display:block;src:url(/vite-vue3-lowcode/assets/codicon.c99115f8.ttf) format("truetype")}.codicon[class*=codicon-]{font: 16px/1 codicon;display:inline-block;text-decoration:none;text-rendering:auto;text-align:center;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;user-select:none;-webkit-user-select:none;-ms-user-select:none}.codicon-wrench-subaction{opacity:.5}@keyframes codicon-spin{to{transform:rotate(360deg)}}.codicon-sync.codicon-modifier-spin,.codicon-loading.codicon-modifier-spin,.codicon-gear.codicon-modifier-spin,.codicon-notebook-state-executing.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}.context-view .monaco-menu{min-width:130px}.quick-input-widget{font-size:13px}.quick-input-widget .monaco-highlighted-label .highlight,.quick-input-widget .monaco-highlighted-label .highlight{color:#0066bf}.vs .quick-input-widget .monaco-list-row.focused .monaco-highlighted-label .highlight,.vs .quick-input-widget .monaco-list-row.focused .monaco-highlighted-label .highlight{color:#9dddff}.vs-dark .quick-input-widget .monaco-highlighted-label .highlight,.vs-dark .quick-input-widget .monaco-highlighted-label .highlight{color:#0097fb}.hc-black .quick-input-widget .monaco-highlighted-label .highlight,.hc-black .quick-input-widget .monaco-highlighted-label .highlight{color:#f38518}.monaco-keybinding>.monaco-keybinding-key{background-color:rgba(221,221,221,.4);border:solid 1px rgba(204,204,204,.4);border-bottom-color:rgba(187,187,187,.4);box-shadow:inset 0 -1px rgba(187,187,187,.4);color:#555}.hc-black .monaco-keybinding>.monaco-keybinding-key{background-color:transparent;border:solid 1px rgb(111,195,223);box-shadow:none;color:#fff}.vs-dark .monaco-keybinding>.monaco-keybinding-key{background-color:rgba(128,128,128,.17);border:solid 1px rgba(51,51,51,.6);border-bottom-color:rgba(68,68,68,.6);box-shadow:inset 0 -1px rgba(68,68,68,.6);color:#ccc}.monaco-text-button{box-sizing:border-box;display:flex;width:100%;padding:4px;text-align:center;cursor:pointer;justify-content:center;align-items:center}.monaco-text-button:focus{outline-offset:2px!important}.monaco-text-button:hover{text-decoration:none!important}.monaco-button.disabled:focus,.monaco-button.disabled{opacity:.4!important;cursor:default}.monaco-text-button>.codicon{margin:0 .2em;color:inherit!important}.monaco-button-dropdown{display:flex;cursor:pointer}.monaco-button-dropdown>.monaco-dropdown-button{margin-left:1px}.monaco-description-button{flex-direction:column}.monaco-description-button .monaco-button-label{font-weight:500}.monaco-description-button .monaco-button-description{font-style:italic}.monaco-description-button .monaco-button-label,.monaco-description-button .monaco-button-description{display:flex;justify-content:center;align-items:center}.monaco-description-button .monaco-button-label>.codicon,.monaco-description-button .monaco-button-description>.codicon{margin:0 .2em;color:inherit!important}.monaco-count-badge{padding:3px 6px;border-radius:11px;font-size:11px;min-width:18px;min-height:18px;line-height:11px;font-weight:400;text-align:center;display:inline-block;box-sizing:border-box}.monaco-count-badge.long{padding:2px 3px;border-radius:2px;min-height:auto;line-height:normal}.monaco-progress-container{width:100%;height:5px;overflow:hidden}.monaco-progress-container .progress-bit{width:2%;height:5px;position:absolute;left:0;display:none}.monaco-progress-container.active .progress-bit{display:inherit}.monaco-progress-container.discrete .progress-bit{left:0;transition:width .1s linear}.monaco-progress-container.discrete.done .progress-bit{width:100%}.monaco-progress-container.infinite .progress-bit{animation-name:progress;animation-duration:4s;animation-iteration-count:infinite;transform:translateZ(0);animation-timing-function:linear}.monaco-progress-container.infinite.infinite-long-running .progress-bit{animation-timing-function:steps(100)}@keyframes progress{0%{transform:translate(0) scaleX(1)}50%{transform:translate(2500%) scaleX(3)}to{transform:translate(4900%) scaleX(1)}}.quick-input-widget{position:absolute;width:600px;z-index:2000;padding:0 1px 1px;left:50%;margin-left:-300px}.quick-input-titlebar{display:flex;align-items:center}.quick-input-left-action-bar{display:flex;margin-left:4px;flex:1}.quick-input-title{padding:3px 0;text-align:center;text-overflow:ellipsis;overflow:hidden}.quick-input-right-action-bar{display:flex;margin-right:4px;flex:1}.quick-input-right-action-bar>.actions-container{justify-content:flex-end}.quick-input-titlebar .monaco-action-bar .action-label.codicon{background-position:center;background-repeat:no-repeat;padding:2px}.quick-input-description{margin:6px}.quick-input-header .quick-input-description{margin:4px 2px}.quick-input-header{display:flex;padding:6px 6px 0;margin-bottom:-2px}.quick-input-widget.hidden-input .quick-input-header{padding:0;margin-bottom:0}.quick-input-and-message{display:flex;flex-direction:column;flex-grow:1;min-width:0;position:relative}.quick-input-check-all{align-self:center;margin:0}.quick-input-filter{flex-grow:1;display:flex;position:relative}.quick-input-box{flex-grow:1}.quick-input-widget.show-checkboxes .quick-input-box,.quick-input-widget.show-checkboxes .quick-input-message{margin-left:5px}.quick-input-visible-count{position:absolute;left:-10000px}.quick-input-count{align-self:center;position:absolute;right:4px;display:flex;align-items:center}.quick-input-count .monaco-count-badge{vertical-align:middle;padding:2px 4px;border-radius:2px;min-height:auto;line-height:normal}.quick-input-action{margin-left:6px}.quick-input-action .monaco-text-button{font-size:11px;padding:0 6px;display:flex;height:27.5px;align-items:center}.quick-input-message{margin-top:-1px;padding:5px;overflow-wrap:break-word}.quick-input-message>.codicon{margin:0 .2em;vertical-align:text-bottom}.quick-input-progress.monaco-progress-container{position:relative}.quick-input-progress.monaco-progress-container,.quick-input-progress.monaco-progress-container .progress-bit{height:2px}.quick-input-list{line-height:22px;margin-top:6px}.quick-input-widget.hidden-input .quick-input-list{margin-top:0}.quick-input-list .monaco-list{overflow:hidden;max-height:440px}.quick-input-list .quick-input-list-entry{box-sizing:border-box;overflow:hidden;display:flex;height:100%;padding:0 6px}.quick-input-list .quick-input-list-entry.quick-input-list-separator-border{border-top-width:1px;border-top-style:solid}.quick-input-list .monaco-list-row[data-index="0"] .quick-input-list-entry.quick-input-list-separator-border{border-top-style:none}.quick-input-list .quick-input-list-label{overflow:hidden;display:flex;height:100%;flex:1}.quick-input-list .quick-input-list-checkbox{align-self:center;margin:0}.quick-input-list .quick-input-list-rows{overflow:hidden;text-overflow:ellipsis;display:flex;flex-direction:column;height:100%;flex:1;margin-left:5px}.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-rows{margin-left:10px}.quick-input-widget .quick-input-list .quick-input-list-checkbox{display:none}.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-checkbox{display:inline}.quick-input-list .quick-input-list-rows>.quick-input-list-row{display:flex;align-items:center}.quick-input-list .quick-input-list-rows>.quick-input-list-row .monaco-icon-label,.quick-input-list .quick-input-list-rows>.quick-input-list-row .monaco-icon-label .monaco-icon-label-container>.monaco-icon-name-container{flex:1}.quick-input-list .quick-input-list-rows>.quick-input-list-row .codicon[class*=codicon-]{vertical-align:text-bottom}.quick-input-list .quick-input-list-rows .monaco-highlighted-label span{opacity:1}.quick-input-list .quick-input-list-entry .quick-input-list-entry-keybinding{margin-right:8px}.quick-input-list .quick-input-list-label-meta{opacity:.7;line-height:normal;text-overflow:ellipsis;overflow:hidden}.quick-input-list .monaco-highlighted-label .highlight{font-weight:700}.quick-input-list .quick-input-list-entry .quick-input-list-separator{margin-right:8px}.quick-input-list .quick-input-list-entry-action-bar{display:flex;flex:0;overflow:visible}.quick-input-list .quick-input-list-entry-action-bar .action-label{display:none}.quick-input-list .quick-input-list-entry-action-bar .action-label.codicon{margin-right:4px;padding:0 2px 2px}.quick-input-list .quick-input-list-entry-action-bar{margin-top:1px}.quick-input-list .quick-input-list-entry-action-bar{margin-right:4px}.quick-input-list .quick-input-list-entry .quick-input-list-entry-action-bar .action-label.always-visible,.quick-input-list .quick-input-list-entry:hover .quick-input-list-entry-action-bar .action-label,.quick-input-list .monaco-list-row.focused .quick-input-list-entry-action-bar .action-label{display:flex}.quick-input-list .monaco-list-row.focused .monaco-keybinding-key,.quick-input-list .monaco-list-row.focused .quick-input-list-entry .quick-input-list-separator{color:inherit}.quick-input-list .monaco-list-row.focused .monaco-keybinding-key{background:none}.monaco-inputbox{position:relative;display:block;padding:0;box-sizing:border-box;font-size:inherit}.monaco-inputbox.idle{border:1px solid transparent}.monaco-inputbox>.ibwrapper>.input,.monaco-inputbox>.ibwrapper>.mirror{padding:4px}.monaco-inputbox>.ibwrapper{position:relative;width:100%;height:100%}.monaco-inputbox>.ibwrapper>.input{display:inline-block;box-sizing:border-box;width:100%;height:100%;line-height:inherit;border:none;font-family:inherit;font-size:inherit;resize:none;color:inherit}.monaco-inputbox>.ibwrapper>input{text-overflow:ellipsis}.monaco-inputbox>.ibwrapper>textarea.input{display:block;-ms-overflow-style:none;scrollbar-width:none;outline:none}.monaco-inputbox>.ibwrapper>textarea.input::-webkit-scrollbar{display:none}.monaco-inputbox>.ibwrapper>textarea.input.empty{white-space:nowrap}.monaco-inputbox>.ibwrapper>.mirror{position:absolute;display:inline-block;width:100%;top:0;left:0;box-sizing:border-box;white-space:pre-wrap;visibility:hidden;word-wrap:break-word}.monaco-inputbox-container{text-align:right}.monaco-inputbox-container .monaco-inputbox-message{display:inline-block;overflow:hidden;text-align:left;width:100%;box-sizing:border-box;padding:.4em;font-size:12px;line-height:17px;margin-top:-1px;word-wrap:break-word}.monaco-inputbox .monaco-action-bar{position:absolute;right:2px;top:4px}.monaco-inputbox .monaco-action-bar .action-item{margin-left:2px}.monaco-inputbox .monaco-action-bar .action-item .codicon{background-repeat:no-repeat;width:16px;height:16px}.monaco-icon-label{display:flex;overflow:hidden;text-overflow:ellipsis}.monaco-icon-label:before{background-size:16px;background-position:left center;background-repeat:no-repeat;padding-right:6px;width:16px;height:22px;line-height:inherit!important;display:inline-block;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top;flex-shrink:0}.monaco-icon-label>.monaco-icon-label-container{min-width:0;overflow:hidden;text-overflow:ellipsis;flex:1}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-name-container>.label-name{color:inherit;white-space:pre}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-name-container>.label-name>.label-separator{margin:0 2px;opacity:.5}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{opacity:.7;margin-left:.5em;font-size:.9em;white-space:pre}.monaco-icon-label.nowrap>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{white-space:nowrap}.vs .monaco-icon-label>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{opacity:.95}.monaco-icon-label.italic>.monaco-icon-label-container>.monaco-icon-name-container>.label-name,.monaco-icon-label.italic>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{font-style:italic}.monaco-icon-label.deprecated{text-decoration:line-through;opacity:.66}.monaco-icon-label.italic:after{font-style:italic}.monaco-icon-label.strikethrough>.monaco-icon-label-container>.monaco-icon-name-container>.label-name,.monaco-icon-label.strikethrough>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{text-decoration:line-through}.monaco-icon-label:after{opacity:.75;font-size:90%;font-weight:600;margin:auto 16px 0 5px;text-align:center}.monaco-list:focus .selected .monaco-icon-label,.monaco-list:focus .selected .monaco-icon-label:after{color:inherit!important}.monaco-list-row.focused.selected .label-description,.monaco-list-row.selected .label-description{opacity:.8}.monaco-keybinding{display:flex;align-items:center;line-height:10px}.monaco-keybinding>.monaco-keybinding-key{display:inline-block;border-style:solid;border-width:1px;border-radius:3px;vertical-align:middle;font-size:11px;padding:3px 5px;margin:0 2px}.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}.monaco-list{position:relative;height:100%;width:100%;white-space:nowrap}.monaco-list.mouse-support{user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-list>.monaco-scrollable-element{height:100%}.monaco-list-rows{position:relative;width:100%;height:100%}.monaco-list.horizontal-scrolling .monaco-list-rows{width:auto;min-width:100%}.monaco-list-row{position:absolute;box-sizing:border-box;overflow:hidden;width:100%}.monaco-list.mouse-support .monaco-list-row{cursor:pointer;touch-action:none}.monaco-list-row.scrolling{display:none!important}.monaco-list.element-focused,.monaco-list.selection-single,.monaco-list.selection-multiple{outline:0!important}.monaco-drag-image{display:inline-block;padding:1px 7px;border-radius:10px;font-size:12px;position:absolute;z-index:1000}.monaco-list-type-filter{display:flex;align-items:center;position:absolute;border-radius:2px;padding:0 3px;max-width:calc(100% - 10px);text-overflow:ellipsis;overflow:hidden;text-align:right;box-sizing:border-box;cursor:all-scroll;font-size:13px;line-height:18px;height:20px;z-index:1;top:4px}.monaco-list-type-filter.dragging{transition:top .2s,left .2s}.monaco-list-type-filter.ne{right:4px}.monaco-list-type-filter.nw{left:4px}.monaco-list-type-filter>.controls{display:flex;align-items:center;box-sizing:border-box;transition:width .2s;width:0}.monaco-list-type-filter.dragging>.controls,.monaco-list-type-filter:hover>.controls{width:36px}.monaco-list-type-filter>.controls>*{border:none;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;background:none;width:16px;height:16px;flex-shrink:0;margin:0;padding:0;display:flex;align-items:center;justify-content:center;cursor:pointer}.monaco-list-type-filter>.controls>.filter{margin-left:4px}.monaco-list-type-filter-message{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;padding:40px 1em 1em;text-align:center;white-space:normal;opacity:.7;pointer-events:none}.monaco-list-type-filter-message:empty{display:none}.monaco-list-type-filter{cursor:grab}.monaco-list-type-filter.dragging{cursor:grabbing}.monaco-split-view2{position:relative;width:100%;height:100%}.monaco-split-view2>.sash-container{position:absolute;width:100%;height:100%;pointer-events:none}.monaco-split-view2>.sash-container>.monaco-sash{pointer-events:initial}.monaco-split-view2>.monaco-scrollable-element{width:100%;height:100%}.monaco-split-view2>.monaco-scrollable-element>.split-view-container{width:100%;height:100%;white-space:nowrap;position:relative}.monaco-split-view2>.monaco-scrollable-element>.split-view-container>.split-view-view{white-space:initial;position:absolute}.monaco-split-view2>.monaco-scrollable-element>.split-view-container>.split-view-view:not(.visible){display:none}.monaco-split-view2.vertical>.monaco-scrollable-element>.split-view-container>.split-view-view{width:100%}.monaco-split-view2.horizontal>.monaco-scrollable-element>.split-view-container>.split-view-view{height:100%}.monaco-split-view2.separator-border>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{content:" ";position:absolute;top:0;left:0;z-index:5;pointer-events:none;background-color:var(--separator-border)}.monaco-split-view2.separator-border.horizontal>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{height:100%;width:1px}.monaco-split-view2.separator-border.vertical>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{height:1px;width:100%}.monaco-table{display:flex;flex-direction:column;position:relative;height:100%;width:100%;white-space:nowrap}.monaco-table>.monaco-split-view2{border-bottom:1px solid transparent}.monaco-table>.monaco-list{flex:1}.monaco-table-tr{display:flex;height:100%}.monaco-table-th{width:100%;height:100%;font-weight:700;overflow:hidden;text-overflow:ellipsis}.monaco-table-th,.monaco-table-td{box-sizing:border-box;flex-shrink:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.monaco-table>.monaco-split-view2 .monaco-sash.vertical:before{content:"";position:absolute;left:calc(var(--sash-size) / 2);width:0;border-left:1px solid transparent}.monaco-table>.monaco-split-view2,.monaco-table>.monaco-split-view2 .monaco-sash.vertical:before{transition:border-color .2s ease-out}.monaco-tl-row{display:flex;height:100%;align-items:center;position:relative}.monaco-tl-indent{height:100%;position:absolute;top:0;left:16px;pointer-events:none}.hide-arrows .monaco-tl-indent{left:12px}.monaco-tl-indent>.indent-guide{display:inline-block;box-sizing:border-box;height:100%;border-left:1px solid transparent}.monaco-tl-indent>.indent-guide{transition:border-color .1s linear}.monaco-tl-twistie,.monaco-tl-contents{height:100%}.monaco-tl-twistie{font-size:10px;text-align:right;padding-right:6px;flex-shrink:0;width:16px;display:flex!important;align-items:center;justify-content:center;transform:translate(3px)}.monaco-tl-contents{flex:1;overflow:hidden}.monaco-tl-twistie:before{border-radius:20px}.monaco-tl-twistie.collapsed:before{transform:rotate(-90deg)}.monaco-tl-twistie.codicon-tree-item-loading:before{animation:codicon-spin 1.25s steps(30) infinite}.monaco-editor .selection-anchor{background-color:#007acc;width:2px!important}.monaco-editor .bracket-match{box-sizing:border-box}.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{padding:1px 4px;color:var(--vscode-inputValidation-infoForeground);background-color:var(--vscode-inputValidation-infoBackground);border:1px solid var(--vscode-inputValidation-infoBorder)}.monaco-editor.hc-black .monaco-editor-overlaymessage .message{border-width:2px}.monaco-editor .monaco-editor-overlaymessage .anchor{width:0!important;height:0!important;border-color:transparent;border-style:solid;z-index:1000;border-width:8px;position:absolute}.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:not(.below) .anchor.top,.monaco-editor .monaco-editor-overlaymessage.below .anchor.below{display:none}.monaco-editor .monaco-editor-overlaymessage.below .anchor.top{display:inherit;top:-8px}.monaco-editor .contentWidgets .codicon-light-bulb,.monaco-editor .contentWidgets .codicon-lightbulb-autofix{display:flex;align-items:center;justify-content:center}.monaco-editor .contentWidgets .codicon-light-bulb:hover,.monaco-editor .contentWidgets .codicon-lightbulb-autofix:hover{cursor:pointer}.monaco-editor .codelens-decoration{overflow:hidden;display:inline-block;text-overflow:ellipsis;white-space:nowrap;color:var(--vscode-editorCodeLens-foreground)}.monaco-editor .codelens-decoration>span,.monaco-editor .codelens-decoration>a{user-select:none;-webkit-user-select:none;-ms-user-select:none;white-space:nowrap;vertical-align:sub}.monaco-editor .codelens-decoration>a{text-decoration:none}.monaco-editor .codelens-decoration>a:hover{cursor:pointer;color:var(--vscode-editorLink-activeForeground)!important}.monaco-editor .codelens-decoration>a:hover .codicon{color:var(--vscode-editorLink-activeForeground)!important}.monaco-editor .codelens-decoration .codicon{vertical-align:middle;color:currentColor!important;color:var(--vscode-editorCodeLens-foreground)}.monaco-editor .codelens-decoration>a:hover .codicon:before{cursor:pointer}@keyframes fadein{0%{opacity:0;visibility:visible}to{opacity:1}}.monaco-editor .codelens-decoration.fadein{animation:fadein .1s linear}.colorpicker-widget{height:190px;user-select:none;-webkit-user-select:none;-ms-user-select:none}.colorpicker-color-decoration{border:solid .1em #000;box-sizing:border-box;margin:.1em .2em 0;width:.8em;height:.8em;line-height:.8em;display:inline-block;cursor:pointer}.hc-black .colorpicker-color-decoration,.vs-dark .colorpicker-color-decoration{border:solid .1em #eee}.colorpicker-header{display:flex;height:24px;position:relative;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=);background-size:9px 9px;image-rendering:pixelated}.colorpicker-header .picked-color{width:216px;display:flex;align-items:center;justify-content:center;line-height:24px;cursor:pointer;color:#fff;flex:1}.colorpicker-header .picked-color .codicon{color:inherit;font-size:14px;position:absolute;left:8px}.colorpicker-header .picked-color.light{color:#000}.colorpicker-header .original-color{width:74px;z-index:inherit;cursor:pointer}.colorpicker-body{display:flex;padding:8px;position:relative}.colorpicker-body .saturation-wrap{overflow:hidden;height:150px;position:relative;min-width:220px;flex:1}.colorpicker-body .saturation-box{height:150px;position:absolute}.colorpicker-body .saturation-selection{width:9px;height:9px;margin:-5px 0 0 -5px;border:1px solid rgb(255,255,255);border-radius:100%;box-shadow:0 0 2px rgba(0,0,0,.8);position:absolute}.colorpicker-body .strip{width:25px;height:150px}.colorpicker-body .hue-strip{position:relative;margin-left:8px;cursor:grab;background:linear-gradient(to bottom,#ff0000 0%,#ffff00 17%,#00ff00 33%,#00ffff 50%,#0000ff 67%,#ff00ff 83%,#ff0000 100%)}.colorpicker-body .opacity-strip{position:relative;margin-left:8px;cursor:grab;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=);background-size:9px 9px;image-rendering:pixelated}.colorpicker-body .strip.grabbing{cursor:grabbing}.colorpicker-body .slider{position:absolute;top:0;left:-2px;width:calc(100% + 4px);height:4px;box-sizing:border-box;border:1px solid rgba(255,255,255,.71);box-shadow:0 0 1px rgba(0,0,0,.85)}.colorpicker-body .strip .overlay{height:150px;pointer-events:none}.monaco-editor .goto-definition-link{text-decoration:underline;cursor:pointer}.monaco-editor .peekview-widget .head{box-sizing:border-box;display:flex;justify-content:space-between;flex-wrap:nowrap}.monaco-editor .peekview-widget .head .peekview-title{display:flex;align-items:center;font-size:13px;margin-left:20px;min-width:0;text-overflow:ellipsis;overflow:hidden}.monaco-editor .peekview-widget .head .peekview-title.clickable{cursor:pointer}.monaco-editor .peekview-widget .head .peekview-title .dirname:not(:empty){font-size:.9em;margin-left:.5em;text-overflow:ellipsis;overflow:hidden}.monaco-editor .peekview-widget .head .peekview-title .meta{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.monaco-editor .peekview-widget .head .peekview-title .dirname{white-space:nowrap}.monaco-editor .peekview-widget .head .peekview-title .filename{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-editor .peekview-widget .head .peekview-title .meta:not(:empty):before{content:"-";padding:0 .3em}.monaco-editor .peekview-widget .head .peekview-actions{flex:1;text-align:right;padding-right:2px}.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar{display:inline-block}.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar,.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar>.actions-container{height:100%}.monaco-editor .peekview-widget>.body{border-top:1px solid;position:relative}.monaco-editor .peekview-widget .head .peekview-title .codicon{margin-right:4px}.monaco-editor .peekview-widget .monaco-list .monaco-list-row.focused .codicon{color:inherit!important}.monaco-editor .zone-widget{position:absolute;z-index:10}.monaco-editor .zone-widget .zone-widget-container{border-top-style:solid;border-bottom-style:solid;border-top-width:0;border-bottom-width:0;position:relative}.monaco-dropdown{height:100%;padding:0}.monaco-dropdown>.dropdown-label{cursor:pointer;height:100%;display:flex;align-items:center;justify-content:center}.monaco-dropdown>.dropdown-label>.action-label.disabled{cursor:default}.monaco-dropdown-with-primary{display:flex!important;flex-direction:row;border-radius:5px}.monaco-dropdown-with-primary>.action-container>.action-label{margin-right:0}.monaco-dropdown-with-primary>.dropdown-action-container>.monaco-dropdown>.dropdown-label .codicon[class*=codicon-]{font-size:12px;padding-left:0;padding-right:0;line-height:16px;margin-left:-3px}.monaco-dropdown-with-primary>.dropdown-action-container>.monaco-dropdown>.dropdown-label>.action-label{display:block;background-size:16px;background-position:center center;background-repeat:no-repeat}.monaco-action-bar .action-item.menu-entry .action-label.icon{width:16px;height:16px;background-repeat:no-repeat;background-position:50%;background-size:16px}.monaco-action-bar .action-item.menu-entry .action-label{background-image:var(--menu-entry-icon-light)}.vs-dark .monaco-action-bar .action-item.menu-entry .action-label,.hc-black .monaco-action-bar .action-item.menu-entry .action-label{background-image:var(--menu-entry-icon-dark)}.monaco-dropdown-with-default{display:flex!important;flex-direction:row;border-radius:5px}.monaco-dropdown-with-default>.action-container>.action-label{margin-right:0}.monaco-dropdown-with-default>.action-container.menu-entry>.action-label.icon{width:16px;height:16px;background-repeat:no-repeat;background-position:50%;background-size:16px}.monaco-dropdown-with-default>.action-container.menu-entry>.action-label{background-image:var(--menu-entry-icon-light)}.vs-dark .monaco-dropdown-with-default>.action-container.menu-entry>.action-label,.hc-black .monaco-dropdown-with-default>.action-container.menu-entry>.action-label{background-image:var(--menu-entry-icon-dark)}.monaco-dropdown-with-default>.dropdown-action-container>.monaco-dropdown>.dropdown-label .codicon[class*=codicon-]{font-size:12px;padding-left:0;padding-right:0;line-height:16px;margin-left:-3px}.monaco-dropdown-with-default>.dropdown-action-container>.monaco-dropdown>.dropdown-label>.action-label{display:block;background-size:16px;background-position:center center;background-repeat:no-repeat}.monaco-editor .zone-widget .zone-widget-container.reference-zone-widget{border-top-width:1px;border-bottom-width:1px}.monaco-editor .reference-zone-widget .inline{display:inline-block;vertical-align:top}.monaco-editor .reference-zone-widget .messages{height:100%;width:100%;text-align:center;padding:3em 0}.monaco-editor .reference-zone-widget .ref-tree{line-height:23px;background-color:var(--vscode-peekViewResult-background);color:var(--vscode-peekViewResult-lineForeground)}.monaco-editor .reference-zone-widget .ref-tree .reference{text-overflow:ellipsis;overflow:hidden}.monaco-editor .reference-zone-widget .ref-tree .reference-file{display:inline-flex;width:100%;height:100%;color:var(--vscode-peekViewResult-fileForeground)}.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .selected .reference-file{color:inherit!important}.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows>.monaco-list-row.selected:not(.highlighted){background-color:var(--vscode-peekViewResult-selectionBackground);color:var(--vscode-peekViewResult-selectionForeground)!important}.monaco-editor .reference-zone-widget .ref-tree .reference-file .count{margin-right:12px;margin-left:auto}.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight{background-color:var(--vscode-peekViewResult-matchHighlightBackground)}.monaco-editor .reference-zone-widget .preview .reference-decoration{background-color:var(--vscode-peekViewEditor-matchHighlightBackground);border:2px solid var(--vscode-peekViewEditor-matchHighlightBorder);box-sizing:border-box}.monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input{background-color:var(--vscode-peekViewEditor-background)}.monaco-editor .reference-zone-widget .preview .monaco-editor .margin{background-color:var(--vscode-peekViewEditorGutter-background)}.monaco-editor.hc-black .reference-zone-widget .ref-tree .reference-file{font-weight:700}.monaco-editor.hc-black .reference-zone-widget .ref-tree .referenceMatch .highlight{border:1px dotted var(--vscode-contrastActiveBorder, transparent);box-sizing:border-box}.monaco-hover{cursor:default;position:absolute;overflow:hidden;z-index:50;user-select:text;-webkit-user-select:text;-ms-user-select:text;box-sizing:initial;animation:fadein .1s linear;line-height:1.5em}.monaco-hover.hidden{display:none}.monaco-hover a:hover{cursor:pointer}.monaco-hover .hover-contents:not(.html-hover-contents){padding:4px 8px}.monaco-hover .markdown-hover>.hover-contents:not(.code-hover-contents){max-width:500px;word-wrap:break-word}.monaco-hover .markdown-hover>.hover-contents:not(.code-hover-contents) hr{min-width:100%}.monaco-hover p,.monaco-hover .code,.monaco-hover ul{margin:8px 0}.monaco-hover code{font-family:var(--monaco-monospace-font)}.monaco-hover hr{box-sizing:border-box;border-left:0px;border-right:0px;margin:4px -8px -4px;height:1px}.monaco-hover p:first-child,.monaco-hover .code:first-child,.monaco-hover ul:first-child{margin-top:0}.monaco-hover p:last-child,.monaco-hover .code:last-child,.monaco-hover ul:last-child{margin-bottom:0}.monaco-hover ul,.monaco-hover ol{padding-left:20px}.monaco-hover li>p{margin-bottom:0}.monaco-hover li>ul{margin-top:0}.monaco-hover code{border-radius:3px;padding:0 .4em}.monaco-hover .monaco-tokenized-source{white-space:pre-wrap}.monaco-hover .hover-row.status-bar{font-size:12px;line-height:22px}.monaco-hover .hover-row.status-bar .actions{display:flex;padding:0 8px}.monaco-hover .hover-row.status-bar .actions .action-container{margin-right:16px;cursor:pointer}.monaco-hover .hover-row.status-bar .actions .action-container .action .icon{padding-right:4px}.monaco-hover .markdown-hover .hover-contents .codicon{color:inherit;font-size:inherit;vertical-align:middle}.monaco-hover .hover-contents a.code-link:hover,.monaco-hover .hover-contents a.code-link{color:inherit}.monaco-hover .hover-contents a.code-link:before{content:"("}.monaco-hover .hover-contents a.code-link:after{content:")"}.monaco-hover .hover-contents a.code-link>span{text-decoration:underline;border-bottom:1px solid transparent;text-underline-position:under}.monaco-hover .markdown-hover .hover-contents:not(.code-hover-contents):not(.html-hover-contents) span{margin-bottom:4px;display:inline-block}.monaco-hover-content .action-container a{-webkit-user-select:none;user-select:none}.monaco-hover-content .action-container.disabled{pointer-events:none;opacity:.4;cursor:default}.monaco-custom-checkbox{margin-left:2px;float:left;cursor:pointer;overflow:hidden;width:20px;height:20px;border-radius:3px;border:1px solid transparent;padding:1px;box-sizing:border-box;user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-custom-checkbox:hover{background-color:var(--vscode-inputOption-hoverBackground)}.hc-black .monaco-custom-checkbox:hover{border:1px dashed var(--vscode-focusBorder)}.hc-black .monaco-custom-checkbox,.hc-black .monaco-custom-checkbox:hover{background:none}.monaco-custom-checkbox.monaco-simple-checkbox{height:18px;width:18px;border:1px solid transparent;border-radius:3px;margin-right:9px;margin-left:0;padding:0;opacity:1;background-size:16px!important}.monaco-custom-checkbox.monaco-simple-checkbox:not(.checked):before{visibility:hidden}.monaco-findInput{position:relative}.monaco-findInput .monaco-inputbox{font-size:13px;width:100%}.monaco-findInput>.controls{position:absolute;top:3px;right:2px}.vs .monaco-findInput.disabled{background-color:#e1e1e1}.vs-dark .monaco-findInput.disabled{background-color:#333}.monaco-findInput.highlight-0 .controls{animation:monaco-findInput-highlight-0 .1s linear 0s}.monaco-findInput.highlight-1 .controls{animation:monaco-findInput-highlight-1 .1s linear 0s}.hc-black .monaco-findInput.highlight-0 .controls,.vs-dark .monaco-findInput.highlight-0 .controls{animation:monaco-findInput-highlight-dark-0 .1s linear 0s}.hc-black .monaco-findInput.highlight-1 .controls,.vs-dark .monaco-findInput.highlight-1 .controls{animation:monaco-findInput-highlight-dark-1 .1s linear 0s}@keyframes monaco-findInput-highlight-0{0%{background:rgba(253,255,0,.8)}to{background:transparent}}@keyframes monaco-findInput-highlight-1{0%{background:rgba(253,255,0,.8)}99%{background:transparent}}@keyframes monaco-findInput-highlight-dark-0{0%{background:rgba(255,255,255,.44)}to{background:transparent}}@keyframes monaco-findInput-highlight-dark-1{0%{background:rgba(255,255,255,.44)}99%{background:transparent}}.monaco-editor .peekview-widget .head .peekview-title .severity-icon{display:inline-block;vertical-align:text-top;margin-right:4px}.monaco-editor .marker-widget{text-overflow:ellipsis;white-space:nowrap}.monaco-editor .marker-widget>.stale{opacity:.6;font-style:italic}.monaco-editor .marker-widget .title{display:inline-block;padding-right:5px}.monaco-editor .marker-widget .descriptioncontainer{position:absolute;white-space:pre;user-select:text;-webkit-user-select:text;-ms-user-select:text;padding:8px 12px 0 20px}.monaco-editor .marker-widget .descriptioncontainer .message{display:flex;flex-direction:column}.monaco-editor .marker-widget .descriptioncontainer .message .details{padding-left:6px}.monaco-editor .marker-widget .descriptioncontainer .message .source,.monaco-editor .marker-widget .descriptioncontainer .message span.code{opacity:.6}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link{opacity:.6;color:inherit}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:before{content:"("}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:after{content:")"}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link>span{text-decoration:underline;border-bottom:1px solid transparent;text-underline-position:under;color:var(--vscode-textLink-foreground)}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link>span{color:var(--vscode-textLink-activeForeground)}.monaco-editor .marker-widget .descriptioncontainer .filename{cursor:pointer}.monaco-editor.vs .dnd-target{border-right:2px dotted black;color:#fff}.monaco-editor.vs-dark .dnd-target{border-right:2px dotted #AEAFAD;color:#51504f}.monaco-editor.hc-black .dnd-target{border-right:2px dotted #fff;color:#000}.monaco-editor.mouse-default .view-lines,.monaco-editor.vs-dark.mac.mouse-default .view-lines,.monaco-editor.hc-black.mac.mouse-default .view-lines{cursor:default}.monaco-editor.mouse-copy .view-lines,.monaco-editor.vs-dark.mac.mouse-copy .view-lines,.monaco-editor.hc-black.mac.mouse-copy .view-lines{cursor:copy}.monaco-editor .find-widget{position:absolute;z-index:35;height:33px;overflow:hidden;line-height:19px;transition:transform .2s linear;padding:0 4px;box-sizing:border-box;transform:translateY(calc(-100% - 10px))}.monaco-editor .find-widget textarea{margin:0}.monaco-editor .find-widget.hiddenEditor{display:none}.monaco-editor .find-widget.replaceToggled>.replace-part{display:flex}.monaco-editor .find-widget.visible{transform:translateY(0)}.monaco-editor .find-widget .monaco-inputbox.synthetic-focus{outline:1px solid -webkit-focus-ring-color;outline-offset:-1px}.monaco-editor .find-widget .monaco-inputbox .input{background-color:transparent;min-height:0}.monaco-editor .find-widget .monaco-findInput .input{font-size:13px}.monaco-editor .find-widget>.find-part,.monaco-editor .find-widget>.replace-part{margin:4px 0 0 17px;font-size:12px;display:flex}.monaco-editor .find-widget>.find-part .monaco-inputbox,.monaco-editor .find-widget>.replace-part .monaco-inputbox{min-height:25px}.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.mirror{padding-right:22px}.monaco-editor .find-widget>.find-part .monaco-inputbox>.ibwrapper>.input,.monaco-editor .find-widget>.find-part .monaco-inputbox>.ibwrapper>.mirror,.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.input,.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.mirror{padding-top:2px;padding-bottom:2px}.monaco-editor .find-widget>.find-part .find-actions{height:25px;display:flex;align-items:center}.monaco-editor .find-widget>.replace-part .replace-actions{height:25px;display:flex;align-items:center}.monaco-editor .find-widget .monaco-findInput{vertical-align:middle;display:flex;flex:1}.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element{width:100%}.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element .scrollbar.vertical{opacity:0}.monaco-editor .find-widget .matchesCount{display:flex;flex:initial;margin:0 0 0 3px;padding:2px 0 0 2px;height:25px;vertical-align:middle;box-sizing:border-box;text-align:center;line-height:23px}.monaco-editor .find-widget .button{width:16px;height:16px;padding:3px;border-radius:5px;flex:initial;margin-left:3px;background-position:center center;background-repeat:no-repeat;cursor:pointer;display:flex;align-items:center;justify-content:center}.monaco-editor .find-widget .codicon-find-selection{width:22px;height:22px;padding:3px;border-radius:5px}.monaco-editor .find-widget .button.left{margin-left:0;margin-right:3px}.monaco-editor .find-widget .button.wide{width:auto;padding:1px 6px;top:-1px}.monaco-editor .find-widget .button.toggle{position:absolute;top:0;left:3px;width:18px;height:100%;border-radius:0;box-sizing:border-box}.monaco-editor .find-widget .button.toggle.disabled{display:none}.monaco-editor .find-widget .disabled{opacity:.3;cursor:default}.monaco-editor .find-widget>.replace-part{display:none}.monaco-editor .find-widget>.replace-part>.monaco-findInput{position:relative;display:flex;vertical-align:middle;flex:auto;flex-grow:0;flex-shrink:0}.monaco-editor .find-widget>.replace-part>.monaco-findInput>.controls{position:absolute;top:3px;right:2px}.monaco-editor .find-widget.reduced-find-widget .matchesCount{display:none}.monaco-editor .find-widget.narrow-find-widget{max-width:257px!important}.monaco-editor .find-widget.collapsed-find-widget{max-width:170px!important}.monaco-editor .find-widget.collapsed-find-widget .button.previous,.monaco-editor .find-widget.collapsed-find-widget .button.next,.monaco-editor .find-widget.collapsed-find-widget .button.replace,.monaco-editor .find-widget.collapsed-find-widget .button.replace-all,.monaco-editor .find-widget.collapsed-find-widget>.find-part .monaco-findInput .controls{display:none}.monaco-editor .findMatch{animation-duration:0;animation-name:inherit!important}.monaco-editor .find-widget .monaco-sash{left:0!important}.monaco-editor.hc-black .find-widget .button:before{position:relative;top:1px;left:2px}.monaco-editor .margin-view-overlays .codicon-folding-expanded,.monaco-editor .margin-view-overlays .codicon-folding-collapsed{cursor:pointer;opacity:0;transition:opacity .5s;display:flex;align-items:center;justify-content:center;font-size:140%;margin-left:2px}.monaco-editor .margin-view-overlays:hover .codicon,.monaco-editor .margin-view-overlays .codicon.codicon-folding-collapsed,.monaco-editor .margin-view-overlays .codicon.alwaysShowFoldIcons{opacity:1}.monaco-editor .inline-folded:after{color:gray;margin:.1em .2em 0;content:"\\22ef";display:inline;line-height:1em;cursor:pointer}.monaco-editor .snippet-placeholder{min-width:2px;outline-style:solid;outline-width:1px;background-color:var(--vscode-editor-snippetTabstopHighlightBackground, transparent);outline-color:var(--vscode-editor-snippetTabstopHighlightBorder, transparent)}.monaco-editor .finish-snippet-placeholder{outline-style:solid;outline-width:1px;background-color:var(--vscode-editor-snippetFinalTabstopHighlightBackground, transparent);outline-color:var(--vscode-editor-snippetFinalTabstopHighlightBorder, transparent)}.monaco-editor .suggest-widget{width:430px;z-index:40;display:flex;flex-direction:column}.monaco-editor .suggest-widget.message{flex-direction:row;align-items:center}.monaco-editor .suggest-widget,.monaco-editor .suggest-details{flex:0 1 auto;width:100%;border-style:solid;border-width:1px;border-color:var(--vscode-editorSuggestWidget-border);background-color:var(--vscode-editorSuggestWidget-background)}.monaco-editor.hc-black .suggest-widget,.monaco-editor.hc-black .suggest-details{border-width:2px}.monaco-editor .suggest-widget .suggest-status-bar{box-sizing:border-box;display:none;flex-flow:row nowrap;justify-content:space-between;width:100%;font-size:80%;padding:0 4px;border-top:1px solid var(--vscode-editorSuggestWidget-border);overflow:hidden}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar{display:flex}.monaco-editor .suggest-widget .suggest-status-bar .left{padding-right:8px}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-label{color:var(--vscode-editorSuggestWidgetStatus-foreground)}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label{margin-right:0}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label:after{content:", ";margin-right:.3em}.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row>.contents>.main>.right>.readMore,.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore{display:none}.monaco-editor .suggest-widget.with-status-bar:not(.docs-side) .monaco-list .monaco-list-row:hover>.contents>.main>.right.can-expand-details>.details-label{width:100%}.monaco-editor .suggest-widget>.message{padding-left:22px}.monaco-editor .suggest-widget>.tree{height:100%;width:100%}.monaco-editor .suggest-widget .monaco-list{user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row{display:flex;-mox-box-sizing:border-box;box-sizing:border-box;padding-right:10px;background-repeat:no-repeat;background-position:2px 2px;white-space:nowrap;cursor:pointer;touch-action:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused{color:var(--vscode-editorSuggestWidget-selectedForeground)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused .codicon{color:var(--vscode-editorSuggestWidget-selectedIconForeground)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents{flex:1;height:100%;overflow:hidden;padding-left:2px}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main{display:flex;overflow:hidden;text-overflow:ellipsis;white-space:pre;justify-content:space-between}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right{display:flex}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.focused)>.contents>.main .monaco-icon-label{color:var(--vscode-editorSuggestWidget-foreground)}.monaco-editor .suggest-widget:not(.frozen) .monaco-highlighted-label .highlight{font-weight:700}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main .monaco-highlighted-label .highlight{color:var(--vscode-editorSuggestWidget-highlightForeground)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused>.contents>.main .monaco-highlighted-label .highlight{color:var(--vscode-editorSuggestWidget-focusHighlightForeground)}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore:before{color:inherit;opacity:1;font-size:14px;cursor:pointer}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close{position:absolute;top:6px;right:2px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close:hover,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore:hover{opacity:1}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{opacity:.7}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.signature-label{overflow:hidden;text-overflow:ellipsis;opacity:.6}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.qualifier-label{margin-left:12px;opacity:.4;font-size:85%;line-height:initial;text-overflow:ellipsis;overflow:hidden;align-self:center}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{font-size:85%;margin-left:1.1em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label>.monaco-tokenized-source{display:inline}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{display:none}.monaco-editor .suggest-widget:not(.shows-details) .monaco-list .monaco-list-row.focused>.contents>.main>.right>.details-label{display:inline}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.right>.details-label,.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row.focused:not(.string-label)>.contents>.main>.right>.details-label{display:inline}.monaco-editor .suggest-widget:not(.docs-side) .monaco-list .monaco-list-row.focused:hover>.contents>.main>.right.can-expand-details>.details-label{width:calc(100% - 26px)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left{flex-shrink:1;flex-grow:1;overflow:hidden}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.monaco-icon-label{flex-shrink:0}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.left>.monaco-icon-label{max-width:100%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.left>.monaco-icon-label{flex-shrink:1}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right{overflow:hidden;flex-shrink:4;max-width:70%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:inline-block;position:absolute;right:10px;width:18px;height:18px;visibility:hidden}.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:none!important}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.right>.readMore{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore{display:inline-block}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused:hover>.contents>.main>.right>.readMore{visibility:visible}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated{opacity:.66;text-decoration:unset}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated>.monaco-icon-label-container>.monaco-icon-name-container{text-decoration:line-through}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label:before{height:100%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon{display:block;height:16px;width:16px;margin-left:2px;background-repeat:no-repeat;background-size:80%;background-position:center}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.hide{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .suggest-icon{display:flex;align-items:center;margin-right:4px}.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .icon,.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .suggest-icon:before{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.customcolor .colorspan{margin:0 0 0 .3em;border:.1em solid #000;width:.7em;height:.7em;display:inline-block}.monaco-editor .suggest-details-container{z-index:41}.monaco-editor .suggest-details{display:flex;flex-direction:column;cursor:default;color:var(--vscode-editorSuggestWidget-foreground)}.monaco-editor .suggest-details.focused{border-color:var(--vscode-focusBorder)}.monaco-editor .suggest-details a{color:var(--vscode-textLink-foreground)}.monaco-editor .suggest-details a:hover{color:var(--vscode-textLink-activeForeground)}.monaco-editor .suggest-details code{background-color:var(--vscode-textCodeBlock-background)}.monaco-editor .suggest-details.no-docs{display:none}.monaco-editor .suggest-details>.monaco-scrollable-element{flex:1}.monaco-editor .suggest-details>.monaco-scrollable-element>.body{box-sizing:border-box;height:100%;width:100%}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type{flex:2;overflow:hidden;text-overflow:ellipsis;opacity:.7;white-space:pre;margin:0 24px 0 0;padding:4px 0 12px 5px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type.auto-wrap{white-space:normal;word-break:break-all}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs{margin:0;padding:4px 5px;white-space:pre-wrap}.monaco-editor .suggest-details.no-type>.monaco-scrollable-element>.body>.docs{margin-right:24px;overflow:hidden}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs{padding:0;white-space:initial;min-height:calc(1rem + 8px)}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div,.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>span:not(:empty){padding:4px 5px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:first-child{margin-top:0}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:last-child{margin-bottom:0}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs .monaco-tokenized-source{white-space:pre}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs .code{white-space:pre-wrap;word-wrap:break-word}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs .codicon{vertical-align:sub}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>p:empty{display:none}.monaco-editor .suggest-details code{border-radius:3px;padding:0 .4em}.monaco-editor .suggest-details ul,.monaco-editor .suggest-details ol{padding-left:20px}.monaco-editor .suggest-details p code{font-family:var(--monaco-monospace-font)}.monaco-editor .suggest-preview-additional-widget{white-space:nowrap}.monaco-editor .suggest-preview-additional-widget .content-spacer{color:transparent;white-space:pre}.monaco-editor .suggest-preview-additional-widget .button{display:inline-block;cursor:pointer;text-decoration:underline;text-underline-position:under}.monaco-editor .ghost-text-hidden{opacity:0;font-size:0}.monaco-editor .ghost-text-decoration,.monaco-editor .suggest-preview-text{font-style:italic}.monaco-editor .detected-link,.monaco-editor .detected-link-active{text-decoration:underline;text-underline-position:under}.monaco-editor .detected-link-active{cursor:pointer}.monaco-editor .parameter-hints-widget{z-index:39;display:flex;flex-direction:column;line-height:1.5em}.monaco-editor .parameter-hints-widget>.phwrapper{max-width:440px;display:flex;flex-direction:row}.monaco-editor .parameter-hints-widget.multiple{min-height:3.3em;padding:0}.monaco-editor .parameter-hints-widget.visible{transition:left .05s ease-in-out}.monaco-editor .parameter-hints-widget p,.monaco-editor .parameter-hints-widget ul{margin:8px 0}.monaco-editor .parameter-hints-widget .monaco-scrollable-element,.monaco-editor .parameter-hints-widget .body{display:flex;flex:1;flex-direction:column;min-height:100%}.monaco-editor .parameter-hints-widget .signature{padding:4px 5px}.monaco-editor .parameter-hints-widget .docs{padding:0 10px 0 5px;white-space:pre-wrap}.monaco-editor .parameter-hints-widget .docs.empty{display:none}.monaco-editor .parameter-hints-widget .docs .markdown-docs{white-space:initial}.monaco-editor .parameter-hints-widget .docs .markdown-docs code{font-family:var(--monaco-monospace-font)}.monaco-editor .parameter-hints-widget .docs .monaco-tokenized-source,.monaco-editor .parameter-hints-widget .docs .code{white-space:pre-wrap}.monaco-editor .parameter-hints-widget .docs code{border-radius:3px;padding:0 .4em}.monaco-editor .parameter-hints-widget .controls{display:none;flex-direction:column;align-items:center;min-width:22px;justify-content:flex-end}.monaco-editor .parameter-hints-widget.multiple .controls{display:flex;padding:0 2px}.monaco-editor .parameter-hints-widget.multiple .button{width:16px;height:16px;background-repeat:no-repeat;cursor:pointer}.monaco-editor .parameter-hints-widget .button.previous{bottom:24px}.monaco-editor .parameter-hints-widget .overloads{text-align:center;height:12px;line-height:12px;font-family:var(--monaco-monospace-font)}.monaco-editor .parameter-hints-widget .signature .parameter.active{font-weight:700}.monaco-editor .parameter-hints-widget .documentation-parameter>.parameter{font-weight:700;margin-right:.5em}.monaco-editor .rename-box{z-index:100;color:inherit}.monaco-editor .rename-box.preview{padding:3px 3px 0}.monaco-editor .rename-box .rename-input{padding:3px;width:calc(100% - 6px)}.monaco-editor .rename-box .rename-label{display:none;opacity:.8}.monaco-editor .rename-box.preview .rename-label{display:inherit}.monaco-editor .unicode-highlight{border:1px solid var(--vscode-editorUnicodeHighlight-border);box-sizing:border-box}.editor-banner{box-sizing:border-box;cursor:default;width:100%;font-size:12px;display:flex;overflow:visible;height:26px;background:var(--vscode-banner-background)}.editor-banner .icon-container{display:flex;flex-shrink:0;align-items:center;padding:0 6px 0 10px}.editor-banner .icon-container.custom-icon{background-repeat:no-repeat;background-position:center center;background-size:16px;width:16px;padding:0;margin:0 6px 0 10px}.editor-banner .message-container{display:flex;align-items:center;line-height:26px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.editor-banner .message-container p{margin-block-start:0;margin-block-end:0}.editor-banner .message-actions-container{flex-grow:1;flex-shrink:0;line-height:26px;margin:0 4px}.editor-banner .message-actions-container a.monaco-button{width:inherit;margin:2px 8px;padding:0 12px}.editor-banner .message-actions-container a{padding:3px;margin-left:12px;text-decoration:underline}.editor-banner .action-container{padding:0 10px 0 6px}.editor-banner{background-color:var(--vscode-banner-background)}.editor-banner,.editor-banner .action-container .codicon,.editor-banner .message-actions-container .monaco-link{color:var(--vscode-banner-foreground)}.editor-banner .icon-container .codicon{color:var(--vscode-banner-iconForeground)}.monaco-editor .accessibilityHelpWidget{padding:10px;vertical-align:middle;overflow:scroll}.monaco-editor .iPadShowKeyboard{width:58px;min-width:0;height:36px;min-height:0;margin:0;padding:0;position:absolute;resize:none;overflow:hidden;background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIHZpZXdCb3g9IjAgMCA1MyAzNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwKSI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDguMDM2NCA0LjAxMDQySDQuMDA3NzlMNC4wMDc3OSAzMi4wMjg2SDQ4LjAzNjRWNC4wMTA0MlpNNC4wMDc3OSAwLjAwNzgxMjVDMS43OTcyMSAwLjAwNzgxMjUgMC4wMDUxODc5OSAxLjc5OTg0IDAuMDA1MTg3OTkgNC4wMTA0MlYzMi4wMjg2QzAuMDA1MTg3OTkgMzQuMjM5MiAxLjc5NzIxIDM2LjAzMTIgNC4wMDc3OSAzNi4wMzEySDQ4LjAzNjRDNTAuMjQ3IDM2LjAzMTIgNTIuMDM5IDM0LjIzOTIgNTIuMDM5IDMyLjAyODZWNC4wMTA0MkM1Mi4wMzkgMS43OTk4NCA1MC4yNDcgMC4wMDc4MTI1IDQ4LjAzNjQgMC4wMDc4MTI1SDQuMDA3NzlaTTguMDEwNDIgOC4wMTMwMkgxMi4wMTNWMTIuMDE1Nkg4LjAxMDQyVjguMDEzMDJaTTIwLjAxODIgOC4wMTMwMkgxNi4wMTU2VjEyLjAxNTZIMjAuMDE4MlY4LjAxMzAyWk0yNC4wMjA4IDguMDEzMDJIMjguMDIzNFYxMi4wMTU2SDI0LjAyMDhWOC4wMTMwMlpNMzYuMDI4NiA4LjAxMzAySDMyLjAyNlYxMi4wMTU2SDM2LjAyODZWOC4wMTMwMlpNNDAuMDMxMiA4LjAxMzAySDQ0LjAzMzlWMTIuMDE1Nkg0MC4wMzEyVjguMDEzMDJaTTE2LjAxNTYgMTYuMDE4Mkg4LjAxMDQyVjIwLjAyMDhIMTYuMDE1NlYxNi4wMTgyWk0yMC4wMTgyIDE2LjAxODJIMjQuMDIwOFYyMC4wMjA4SDIwLjAxODJWMTYuMDE4MlpNMzIuMDI2IDE2LjAxODJIMjguMDIzNFYyMC4wMjA4SDMyLjAyNlYxNi4wMTgyWk00NC4wMzM5IDE2LjAxODJWMjAuMDIwOEgzNi4wMjg2VjE2LjAxODJINDQuMDMzOVpNMTIuMDEzIDI0LjAyMzRIOC4wMTA0MlYyOC4wMjZIMTIuMDEzVjI0LjAyMzRaTTE2LjAxNTYgMjQuMDIzNEgzNi4wMjg2VjI4LjAyNkgxNi4wMTU2VjI0LjAyMzRaTTQ0LjAzMzkgMjQuMDIzNEg0MC4wMzEyVjI4LjAyNkg0NC4wMzM5VjI0LjAyMzRaIiBmaWxsPSIjNDI0MjQyIi8+CjwvZz4KPGRlZnM+CjxjbGlwUGF0aCBpZD0iY2xpcDAiPgo8cmVjdCB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==) center center no-repeat;border:4px solid #F6F6F6;border-radius:4px}.monaco-editor.vs-dark .iPadShowKeyboard{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIHZpZXdCb3g9IjAgMCA1MyAzNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwKSI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDguMDM2NCA0LjAxMDQySDQuMDA3NzlMNC4wMDc3OSAzMi4wMjg2SDQ4LjAzNjRWNC4wMTA0MlpNNC4wMDc3OSAwLjAwNzgxMjVDMS43OTcyMSAwLjAwNzgxMjUgMC4wMDUxODc5OSAxLjc5OTg0IDAuMDA1MTg3OTkgNC4wMTA0MlYzMi4wMjg2QzAuMDA1MTg3OTkgMzQuMjM5MiAxLjc5NzIxIDM2LjAzMTIgNC4wMDc3OSAzNi4wMzEySDQ4LjAzNjRDNTAuMjQ3IDM2LjAzMTIgNTIuMDM5IDM0LjIzOTIgNTIuMDM5IDMyLjAyODZWNC4wMTA0MkM1Mi4wMzkgMS43OTk4NCA1MC4yNDcgMC4wMDc4MTI1IDQ4LjAzNjQgMC4wMDc4MTI1SDQuMDA3NzlaTTguMDEwNDIgOC4wMTMwMkgxMi4wMTNWMTIuMDE1Nkg4LjAxMDQyVjguMDEzMDJaTTIwLjAxODIgOC4wMTMwMkgxNi4wMTU2VjEyLjAxNTZIMjAuMDE4MlY4LjAxMzAyWk0yNC4wMjA4IDguMDEzMDJIMjguMDIzNFYxMi4wMTU2SDI0LjAyMDhWOC4wMTMwMlpNMzYuMDI4NiA4LjAxMzAySDMyLjAyNlYxMi4wMTU2SDM2LjAyODZWOC4wMTMwMlpNNDAuMDMxMiA4LjAxMzAySDQ0LjAzMzlWMTIuMDE1Nkg0MC4wMzEyVjguMDEzMDJaTTE2LjAxNTYgMTYuMDE4Mkg4LjAxMDQyVjIwLjAyMDhIMTYuMDE1NlYxNi4wMTgyWk0yMC4wMTgyIDE2LjAxODJIMjQuMDIwOFYyMC4wMjA4SDIwLjAxODJWMTYuMDE4MlpNMzIuMDI2IDE2LjAxODJIMjguMDIzNFYyMC4wMjA4SDMyLjAyNlYxNi4wMTgyWk00NC4wMzM5IDE2LjAxODJWMjAuMDIwOEgzNi4wMjg2VjE2LjAxODJINDQuMDMzOVpNMTIuMDEzIDI0LjAyMzRIOC4wMTA0MlYyOC4wMjZIMTIuMDEzVjI0LjAyMzRaTTE2LjAxNTYgMjQuMDIzNEgzNi4wMjg2VjI4LjAyNkgxNi4wMTU2VjI0LjAyMzRaTTQ0LjAzMzkgMjQuMDIzNEg0MC4wMzEyVjI4LjAyNkg0NC4wMzM5VjI0LjAyMzRaIiBmaWxsPSIjQzVDNUM1Ii8+CjwvZz4KPGRlZnM+CjxjbGlwUGF0aCBpZD0iY2xpcDAiPgo8cmVjdCB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==) center center no-repeat;border:4px solid #252526}.monaco-editor .tokens-inspect-widget{z-index:50;user-select:text;-webkit-user-select:text;-ms-user-select:text;padding:10px}.tokens-inspect-separator{height:1px;border:0}.monaco-editor .tokens-inspect-widget .tm-token{font-family:var(--monaco-monospace-font)}.monaco-editor .tokens-inspect-widget .tm-token-length{font-weight:400;font-size:60%;float:right}.monaco-editor .tokens-inspect-widget .tm-metadata-table{width:100%}.monaco-editor .tokens-inspect-widget .tm-metadata-value{font-family:var(--monaco-monospace-font);text-align:right}.monaco-editor .tokens-inspect-widget .tm-token-type{font-family:var(--monaco-monospace-font)}._container_o8w0l_8{border:1px solid #eee;display:flex;flex-direction:column;border-radius:5px}._title_o8w0l_15{background-color:#eee;padding:10px 0 10px 20px}._code_o8w0l_20{flex-grow:1}.el-message{--el-message-min-width:380px;--el-message-bg-color:var(--el-color-info-light-9);--el-message-border-color:var(--el-border-color-lighter);--el-message-padding:15px 15px 15px 20px;--el-message-close-size:16px;--el-message-close-icon-color:var(--el-text-color-placeholder);--el-message-close-hover-color:var(--el-text-color-secondary)}.el-message{min-width:var(--el-message-min-width);box-sizing:border-box;border-radius:var(--el-border-radius-base);border-width:var(--el-border-width);border-style:var(--el-border-style);border-color:var(--el-message-border-color);position:fixed;left:50%;top:20px;transform:translate(-50%);transition:opacity .3s,transform .4s,top .4s;background-color:var(--el-message-bg-color);transition:opacity var(--el-transition-duration),transform .4s,top .4s;padding:var(--el-message-padding);display:flex;align-items:center}.el-message.is-center{justify-content:center}.el-message.is-closable .el-message__content{padding-right:16px}.el-message p{margin:0}.el-message--success{--el-message-bg-color:var(--el-color-success-light-9);--el-message-border-color:var(--el-color-success-light-8);--el-message-text-color:var(--el-color-success)}.el-message--success .el-message__content,.el-message .el-message-icon--success{color:var(--el-message-text-color)}.el-message--info{--el-message-bg-color:var(--el-color-info-light-9);--el-message-border-color:var(--el-color-info-light-8);--el-message-text-color:var(--el-color-info)}.el-message--info .el-message__content,.el-message .el-message-icon--info{color:var(--el-message-text-color)}.el-message--warning{--el-message-bg-color:var(--el-color-warning-light-9);--el-message-border-color:var(--el-color-warning-light-8);--el-message-text-color:var(--el-color-warning)}.el-message--warning .el-message__content,.el-message .el-message-icon--warning{color:var(--el-message-text-color)}.el-message--error{--el-message-bg-color:var(--el-color-error-light-9);--el-message-border-color:var(--el-color-error-light-8);--el-message-text-color:var(--el-color-error)}.el-message--error .el-message__content,.el-message .el-message-icon--error{color:var(--el-message-text-color)}.el-message__icon{margin-right:10px}.el-message .el-message__badge{position:absolute;top:-8px;right:-8px}.el-message__content{padding:0;font-size:14px;line-height:1}.el-message__content:focus{outline-width:0}.el-message .el-message__closeBtn{position:absolute;top:50%;right:15px;transform:translateY(-50%);cursor:pointer;color:var(--el-message-close-icon-color);font-size:var(--el-message-close-size)}.el-message .el-message__closeBtn:focus{outline-width:0}.el-message .el-message__closeBtn:hover{color:var(--el-message-close-hover-color)}.el-message-fade-enter-from,.el-message-fade-leave-to{opacity:0;transform:translate(-50%,-100%)}.header[data-v-188f8e00]{width:100%}.header .logo[data-v-188f8e00]{width:60px;height:60px;background-image:url(/vite-vue3-lowcode/assets/logo.3503d5cd.png);background-repeat:no-repeat;background-size:contain}.header .tool-item .title[data-v-188f8e00]{margin-top:4px;font-size:12px}.header .el-button[data-v-188f8e00]{font-size:22px}.header .right-tools>*[data-v-188f8e00]{margin-left:8px}.el-tabs{--el-tabs-header-height:40px}.el-tabs__header{padding:0;position:relative;margin:0 0 15px}.el-tabs__active-bar{position:absolute;bottom:0;left:0;height:2px;background-color:var(--el-color-primary);z-index:1;transition:width var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier),transform var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier);list-style:none}.el-tabs__new-tab{display:flex;align-items:center;justify-content:center;float:right;border:1px solid var(--el-border-color);height:20px;width:20px;line-height:20px;margin:10px 0 10px 10px;border-radius:3px;text-align:center;font-size:12px;color:var(--el-text-color-primary);cursor:pointer;transition:all .15s}.el-tabs__new-tab .is-icon-plus{height:inherit;width:inherit;transform:scale(.8)}.el-tabs__new-tab .is-icon-plus svg{vertical-align:middle}.el-tabs__new-tab:hover{color:var(--el-color-primary)}.el-tabs__nav-wrap{overflow:hidden;margin-bottom:-1px;position:relative}.el-tabs__nav-wrap:after{content:"";position:absolute;left:0;bottom:0;width:100%;height:2px;background-color:var(--el-border-color-light);z-index:var(--el-index-normal)}.el-tabs__nav-wrap.is-scrollable{padding:0 20px;box-sizing:border-box}.el-tabs__nav-scroll{overflow:hidden}.el-tabs__nav-next,.el-tabs__nav-prev{position:absolute;cursor:pointer;line-height:44px;font-size:12px;color:var(--el-text-color-secondary)}.el-tabs__nav-next{right:0}.el-tabs__nav-prev{left:0}.el-tabs__nav{white-space:nowrap;position:relative;transition:transform var(--el-transition-duration);float:left;z-index:calc(var(--el-index-normal) + 1)}.el-tabs__nav.is-stretch{min-width:100%;display:flex}.el-tabs__nav.is-stretch>*{flex:1;text-align:center}.el-tabs__item{padding:0 20px;height:var(--el-tabs-header-height);box-sizing:border-box;line-height:var(--el-tabs-header-height);display:inline-block;list-style:none;font-size:var(--el-font-size-base);font-weight:500;color:var(--el-text-color-primary);position:relative}.el-tabs__item:focus,.el-tabs__item:focus:active{outline:0}.el-tabs__item:focus-visible{box-shadow:0 0 2px 2px var(--el-color-primary) inset;border-radius:3px}.el-tabs__item .is-icon-close{border-radius:50%;text-align:center;transition:all var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier);margin-left:5px}.el-tabs__item .is-icon-close:before{transform:scale(.9);display:inline-block}.el-tabs__item .is-icon-close:hover{background-color:var(--el-text-color-placeholder);color:#fff}.el-tabs__item .is-icon-close svg{margin-top:1px}.el-tabs__item.is-active{color:var(--el-color-primary)}.el-tabs__item:hover{color:var(--el-color-primary);cursor:pointer}.el-tabs__item.is-disabled{color:var(--el-disabled-text-color);cursor:default}.el-tabs__content{overflow:hidden;position:relative}.el-tabs--card>.el-tabs__header{border-bottom:1px solid var(--el-border-color-light);height:var(--el-tabs-header-height)}.el-tabs--card>.el-tabs__header .el-tabs__nav-wrap:after{content:none}.el-tabs--card>.el-tabs__header .el-tabs__nav{border:1px solid var(--el-border-color-light);border-bottom:none;border-radius:4px 4px 0 0;box-sizing:border-box}.el-tabs--card>.el-tabs__header .el-tabs__active-bar{display:none}.el-tabs--card>.el-tabs__header .el-tabs__item .is-icon-close{position:relative;font-size:12px;width:0;height:14px;vertical-align:middle;line-height:15px;overflow:hidden;top:-1px;right:-2px;transform-origin:100% 50%}.el-tabs--card>.el-tabs__header .el-tabs__item{border-bottom:1px solid transparent;border-left:1px solid var(--el-border-color-light);transition:color var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier),padding var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier)}.el-tabs--card>.el-tabs__header .el-tabs__item:first-child{border-left:none}.el-tabs--card>.el-tabs__header .el-tabs__item.is-closable:hover{padding-left:13px;padding-right:13px}.el-tabs--card>.el-tabs__header .el-tabs__item.is-closable:hover .is-icon-close{width:14px}.el-tabs--card>.el-tabs__header .el-tabs__item.is-active{border-bottom-color:var(--el-bg-color)}.el-tabs--card>.el-tabs__header .el-tabs__item.is-active.is-closable{padding-left:20px;padding-right:20px}.el-tabs--card>.el-tabs__header .el-tabs__item.is-active.is-closable .is-icon-close{width:14px}.el-tabs--border-card{background:var(--el-bg-color-overlay);border:1px solid var(--el-border-color)}.el-tabs--border-card>.el-tabs__content{padding:15px}.el-tabs--border-card>.el-tabs__header{background-color:var(--el-fill-color-light);border-bottom:1px solid var(--el-border-color-light);margin:0}.el-tabs--border-card>.el-tabs__header .el-tabs__nav-wrap:after{content:none}.el-tabs--border-card>.el-tabs__header .el-tabs__item{transition:all var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier);border:1px solid transparent;margin-top:-1px;color:var(--el-text-color-secondary)}.el-tabs--border-card>.el-tabs__header .el-tabs__item:first-child{margin-left:-1px}.el-tabs--border-card>.el-tabs__header .el-tabs__item+.el-tabs__item{margin-left:-1px}.el-tabs--border-card>.el-tabs__header .el-tabs__item.is-active{color:var(--el-color-primary);background-color:var(--el-bg-color-overlay);border-right-color:var(--el-border-color);border-left-color:var(--el-border-color)}.el-tabs--border-card>.el-tabs__header .el-tabs__item:not(.is-disabled):hover{color:var(--el-color-primary)}.el-tabs--border-card>.el-tabs__header .el-tabs__item.is-disabled{color:var(--el-disabled-text-color)}.el-tabs--border-card>.el-tabs__header .is-scrollable .el-tabs__item:first-child{margin-left:0}.el-tabs--bottom .el-tabs__item.is-bottom:nth-child(2),.el-tabs--bottom .el-tabs__item.is-top:nth-child(2),.el-tabs--top .el-tabs__item.is-bottom:nth-child(2),.el-tabs--top .el-tabs__item.is-top:nth-child(2){padding-left:0}.el-tabs--bottom .el-tabs__item.is-bottom:last-child,.el-tabs--bottom .el-tabs__item.is-top:last-child,.el-tabs--top .el-tabs__item.is-bottom:last-child,.el-tabs--top .el-tabs__item.is-top:last-child{padding-right:0}.el-tabs--bottom .el-tabs--left>.el-tabs__header .el-tabs__item:nth-child(2),.el-tabs--bottom .el-tabs--right>.el-tabs__header .el-tabs__item:nth-child(2),.el-tabs--bottom.el-tabs--border-card>.el-tabs__header .el-tabs__item:nth-child(2),.el-tabs--bottom.el-tabs--card>.el-tabs__header .el-tabs__item:nth-child(2),.el-tabs--top .el-tabs--left>.el-tabs__header .el-tabs__item:nth-child(2),.el-tabs--top .el-tabs--right>.el-tabs__header .el-tabs__item:nth-child(2),.el-tabs--top.el-tabs--border-card>.el-tabs__header .el-tabs__item:nth-child(2),.el-tabs--top.el-tabs--card>.el-tabs__header .el-tabs__item:nth-child(2){padding-left:20px}.el-tabs--bottom .el-tabs--left>.el-tabs__header .el-tabs__item:last-child,.el-tabs--bottom .el-tabs--right>.el-tabs__header .el-tabs__item:last-child,.el-tabs--bottom.el-tabs--border-card>.el-tabs__header .el-tabs__item:last-child,.el-tabs--bottom.el-tabs--card>.el-tabs__header .el-tabs__item:last-child,.el-tabs--top .el-tabs--left>.el-tabs__header .el-tabs__item:last-child,.el-tabs--top .el-tabs--right>.el-tabs__header .el-tabs__item:last-child,.el-tabs--top.el-tabs--border-card>.el-tabs__header .el-tabs__item:last-child,.el-tabs--top.el-tabs--card>.el-tabs__header .el-tabs__item:last-child{padding-right:20px}.el-tabs--bottom .el-tabs__header.is-bottom{margin-bottom:0;margin-top:10px}.el-tabs--bottom.el-tabs--border-card .el-tabs__header.is-bottom{border-bottom:0;border-top:1px solid var(--el-border-color)}.el-tabs--bottom.el-tabs--border-card .el-tabs__nav-wrap.is-bottom{margin-top:-1px;margin-bottom:0}.el-tabs--bottom.el-tabs--border-card .el-tabs__item.is-bottom:not(.is-active){border:1px solid transparent}.el-tabs--bottom.el-tabs--border-card .el-tabs__item.is-bottom{margin:0 -1px -1px}.el-tabs--left,.el-tabs--right{overflow:hidden}.el-tabs--left .el-tabs__header.is-left,.el-tabs--left .el-tabs__header.is-right,.el-tabs--left .el-tabs__nav-scroll,.el-tabs--left .el-tabs__nav-wrap.is-left,.el-tabs--left .el-tabs__nav-wrap.is-right,.el-tabs--right .el-tabs__header.is-left,.el-tabs--right .el-tabs__header.is-right,.el-tabs--right .el-tabs__nav-scroll,.el-tabs--right .el-tabs__nav-wrap.is-left,.el-tabs--right .el-tabs__nav-wrap.is-right{height:100%}.el-tabs--left .el-tabs__active-bar.is-left,.el-tabs--left .el-tabs__active-bar.is-right,.el-tabs--right .el-tabs__active-bar.is-left,.el-tabs--right .el-tabs__active-bar.is-right{top:0;bottom:auto;width:2px;height:auto}.el-tabs--left .el-tabs__nav-wrap.is-left,.el-tabs--left .el-tabs__nav-wrap.is-right,.el-tabs--right .el-tabs__nav-wrap.is-left,.el-tabs--right .el-tabs__nav-wrap.is-right{margin-bottom:0}.el-tabs--left .el-tabs__nav-wrap.is-left>.el-tabs__nav-next,.el-tabs--left .el-tabs__nav-wrap.is-left>.el-tabs__nav-prev,.el-tabs--left .el-tabs__nav-wrap.is-right>.el-tabs__nav-next,.el-tabs--left .el-tabs__nav-wrap.is-right>.el-tabs__nav-prev,.el-tabs--right .el-tabs__nav-wrap.is-left>.el-tabs__nav-next,.el-tabs--right .el-tabs__nav-wrap.is-left>.el-tabs__nav-prev,.el-tabs--right .el-tabs__nav-wrap.is-right>.el-tabs__nav-next,.el-tabs--right .el-tabs__nav-wrap.is-right>.el-tabs__nav-prev{height:30px;line-height:30px;width:100%;text-align:center;cursor:pointer}.el-tabs--left .el-tabs__nav-wrap.is-left>.el-tabs__nav-next i,.el-tabs--left .el-tabs__nav-wrap.is-left>.el-tabs__nav-prev i,.el-tabs--left .el-tabs__nav-wrap.is-right>.el-tabs__nav-next i,.el-tabs--left .el-tabs__nav-wrap.is-right>.el-tabs__nav-prev i,.el-tabs--right .el-tabs__nav-wrap.is-left>.el-tabs__nav-next i,.el-tabs--right .el-tabs__nav-wrap.is-left>.el-tabs__nav-prev i,.el-tabs--right .el-tabs__nav-wrap.is-right>.el-tabs__nav-next i,.el-tabs--right .el-tabs__nav-wrap.is-right>.el-tabs__nav-prev i{transform:rotate(90deg)}.el-tabs--left .el-tabs__nav-wrap.is-left>.el-tabs__nav-prev,.el-tabs--left .el-tabs__nav-wrap.is-right>.el-tabs__nav-prev,.el-tabs--right .el-tabs__nav-wrap.is-left>.el-tabs__nav-prev,.el-tabs--right .el-tabs__nav-wrap.is-right>.el-tabs__nav-prev{left:auto;top:0}.el-tabs--left .el-tabs__nav-wrap.is-left>.el-tabs__nav-next,.el-tabs--left .el-tabs__nav-wrap.is-right>.el-tabs__nav-next,.el-tabs--right .el-tabs__nav-wrap.is-left>.el-tabs__nav-next,.el-tabs--right .el-tabs__nav-wrap.is-right>.el-tabs__nav-next{right:auto;bottom:0}.el-tabs--left .el-tabs__nav-wrap.is-left.is-scrollable,.el-tabs--left .el-tabs__nav-wrap.is-right.is-scrollable,.el-tabs--right .el-tabs__nav-wrap.is-left.is-scrollable,.el-tabs--right .el-tabs__nav-wrap.is-right.is-scrollable{padding:30px 0}.el-tabs--left .el-tabs__nav-wrap.is-left:after,.el-tabs--left .el-tabs__nav-wrap.is-right:after,.el-tabs--right .el-tabs__nav-wrap.is-left:after,.el-tabs--right .el-tabs__nav-wrap.is-right:after{height:100%;width:2px;bottom:auto;top:0}.el-tabs--left .el-tabs__nav.is-left,.el-tabs--left .el-tabs__nav.is-right,.el-tabs--right .el-tabs__nav.is-left,.el-tabs--right .el-tabs__nav.is-right{float:none}.el-tabs--left .el-tabs__item.is-left,.el-tabs--left .el-tabs__item.is-right,.el-tabs--right .el-tabs__item.is-left,.el-tabs--right .el-tabs__item.is-right{display:block}.el-tabs--left .el-tabs__header.is-left{float:left;margin-bottom:0;margin-right:10px}.el-tabs--left .el-tabs__nav-wrap.is-left{margin-right:-1px}.el-tabs--left .el-tabs__nav-wrap.is-left:after{left:auto;right:0}.el-tabs--left .el-tabs__active-bar.is-left{right:0;left:auto}.el-tabs--left .el-tabs__item.is-left{text-align:right}.el-tabs--left.el-tabs--card .el-tabs__active-bar.is-left{display:none}.el-tabs--left.el-tabs--card .el-tabs__item.is-left{border-left:none;border-right:1px solid var(--el-border-color-light);border-bottom:none;border-top:1px solid var(--el-border-color-light);text-align:left}.el-tabs--left.el-tabs--card .el-tabs__item.is-left:first-child{border-right:1px solid var(--el-border-color-light);border-top:none}.el-tabs--left.el-tabs--card .el-tabs__item.is-left.is-active{border:1px solid var(--el-border-color-light);border-right-color:#fff;border-left:none;border-bottom:none}.el-tabs--left.el-tabs--card .el-tabs__item.is-left.is-active:first-child{border-top:none}.el-tabs--left.el-tabs--card .el-tabs__item.is-left.is-active:last-child{border-bottom:none}.el-tabs--left.el-tabs--card .el-tabs__nav{border-radius:4px 0 0 4px;border-bottom:1px solid var(--el-border-color-light);border-right:none}.el-tabs--left.el-tabs--card .el-tabs__new-tab{float:none}.el-tabs--left.el-tabs--border-card .el-tabs__header.is-left{border-right:1px solid var(--el-border-color)}.el-tabs--left.el-tabs--border-card .el-tabs__item.is-left{border:1px solid transparent;margin:-1px 0 -1px -1px}.el-tabs--left.el-tabs--border-card .el-tabs__item.is-left.is-active{border-color:transparent;border-top-color:#d1dbe5;border-bottom-color:#d1dbe5}.el-tabs--right .el-tabs__header.is-right{float:right;margin-bottom:0;margin-left:10px}.el-tabs--right .el-tabs__nav-wrap.is-right{margin-left:-1px}.el-tabs--right .el-tabs__nav-wrap.is-right:after{left:0;right:auto}.el-tabs--right .el-tabs__active-bar.is-right{left:0}.el-tabs--right.el-tabs--card .el-tabs__active-bar.is-right{display:none}.el-tabs--right.el-tabs--card .el-tabs__item.is-right{border-bottom:none;border-top:1px solid var(--el-border-color-light)}.el-tabs--right.el-tabs--card .el-tabs__item.is-right:first-child{border-left:1px solid var(--el-border-color-light);border-top:none}.el-tabs--right.el-tabs--card .el-tabs__item.is-right.is-active{border:1px solid var(--el-border-color-light);border-left-color:#fff;border-right:none;border-bottom:none}.el-tabs--right.el-tabs--card .el-tabs__item.is-right.is-active:first-child{border-top:none}.el-tabs--right.el-tabs--card .el-tabs__item.is-right.is-active:last-child{border-bottom:none}.el-tabs--right.el-tabs--card .el-tabs__nav{border-radius:0 4px 4px 0;border-bottom:1px solid var(--el-border-color-light);border-left:none}.el-tabs--right.el-tabs--border-card .el-tabs__header.is-right{border-left:1px solid var(--el-border-color)}.el-tabs--right.el-tabs--border-card .el-tabs__item.is-right{border:1px solid transparent;margin:-1px -1px -1px 0}.el-tabs--right.el-tabs--border-card .el-tabs__item.is-right.is-active{border-color:transparent;border-top-color:#d1dbe5;border-bottom-color:#d1dbe5}.slideInLeft-transition,.slideInRight-transition{display:inline-block}.slideInRight-enter{-webkit-animation:slideInRight-enter var(--el-transition-duration);animation:slideInRight-enter var(--el-transition-duration)}.slideInRight-leave{position:absolute;left:0;right:0;-webkit-animation:slideInRight-leave var(--el-transition-duration);animation:slideInRight-leave var(--el-transition-duration)}.slideInLeft-enter{-webkit-animation:slideInLeft-enter var(--el-transition-duration);animation:slideInLeft-enter var(--el-transition-duration)}.slideInLeft-leave{position:absolute;left:0;right:0;-webkit-animation:slideInLeft-leave var(--el-transition-duration);animation:slideInLeft-leave var(--el-transition-duration)}@-webkit-keyframes slideInRight-enter{0%{opacity:0;transform-origin:0 0;transform:translate(100%)}to{opacity:1;transform-origin:0 0;transform:translate(0)}}@keyframes slideInRight-enter{0%{opacity:0;transform-origin:0 0;transform:translate(100%)}to{opacity:1;transform-origin:0 0;transform:translate(0)}}@-webkit-keyframes slideInRight-leave{0%{transform-origin:0 0;transform:translate(0);opacity:1}to{transform-origin:0 0;transform:translate(100%);opacity:0}}@keyframes slideInRight-leave{0%{transform-origin:0 0;transform:translate(0);opacity:1}to{transform-origin:0 0;transform:translate(100%);opacity:0}}@-webkit-keyframes slideInLeft-enter{0%{opacity:0;transform-origin:0 0;transform:translate(-100%)}to{opacity:1;transform-origin:0 0;transform:translate(0)}}@keyframes slideInLeft-enter{0%{opacity:0;transform-origin:0 0;transform:translate(-100%)}to{opacity:1;transform-origin:0 0;transform:translate(0)}}@-webkit-keyframes slideInLeft-leave{0%{transform-origin:0 0;transform:translate(0);opacity:1}to{transform-origin:0 0;transform:translate(-100%);opacity:0}}@keyframes slideInLeft-leave{0%{transform-origin:0 0;transform:translate(0);opacity:1}to{transform-origin:0 0;transform:translate(-100%);opacity:0}}._list-group-item_12ss1_1{position:relative;display:flex;width:calc(100% - 20px);min-height:120px;padding:0 5px;margin-top:20px;margin-left:10px;border:solid 3px #ebeef5;transform:translate(0);box-sizing:border-box;align-items:center;justify-content:center}._list-group-item_12ss1_1:hover{cursor:move;border-color:#409eff}._list-group-item_12ss1_1:last-of-type{margin-bottom:20px}._list-group-item_12ss1_1:before{position:absolute;top:-3px;left:-3px;z-index:1;padding:4px 8px;font-size:12px;color:#fff;background-color:#409eff;content:attr(data-label)}._list-group-item_12ss1_1:after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2;content:""}.flip-list-move[data-v-7f6f3080]{transition:transform .5s}.no-move[data-v-7f6f3080]{transition:transform 0s}.ghost[data-v-7f6f3080]{background:#c8ebfb;opacity:.5}.list-group[data-v-7f6f3080]{height:100%;min-height:40px}.list-group.isDrag[data-v-7f6f3080]:not(.no-child) .list-group-item.has-slot{outline:2px dashed #b0c1d7;outline-offset:-2px}.list-group.isDrag[data-v-7f6f3080]:not(.no-child) .list-group-item.has-slot:before{top:0;left:-3px;transform:translate(-100%);position:absolute;padding:3px 5px;font-size:12px;font-weight:700;color:#fff;background-color:#006eff;border-radius:3px;content:attr(data-label)}._list-group-item_12ss1_1{position:relative;display:flex;width:calc(100% - 20px);min-height:120px;padding:0 5px;margin-top:20px;margin-left:10px;border:solid 3px #ebeef5;transform:translate(0);box-sizing:border-box;align-items:center;justify-content:center}._list-group-item_12ss1_1:hover{cursor:move;border-color:#409eff}._list-group-item_12ss1_1:last-of-type{margin-bottom:20px}._list-group-item_12ss1_1:before{position:absolute;top:-3px;left:-3px;z-index:1;padding:4px 8px;font-size:12px;color:#fff;background-color:#409eff;content:attr(data-label)}._list-group-item_12ss1_1:after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2;content:""}.fade-in-linear-enter-active,.fade-in-linear-leave-active{transition:var(--el-transition-fade-linear)}.fade-in-linear-enter-from,.fade-in-linear-leave-to{opacity:0}.el-fade-in-linear-enter-active,.el-fade-in-linear-leave-active{transition:var(--el-transition-fade-linear)}.el-fade-in-linear-enter-from,.el-fade-in-linear-leave-to{opacity:0}.el-fade-in-enter-active,.el-fade-in-leave-active{transition:all var(--el-transition-duration) cubic-bezier(.55,0,.1,1)}.el-fade-in-enter-from,.el-fade-in-leave-active{opacity:0}.el-zoom-in-center-enter-active,.el-zoom-in-center-leave-active{transition:all var(--el-transition-duration) cubic-bezier(.55,0,.1,1)}.el-zoom-in-center-enter-from,.el-zoom-in-center-leave-active{opacity:0;transform:scaleX(0)}.el-zoom-in-top-enter-active,.el-zoom-in-top-leave-active{opacity:1;transform:scaleY(1);transition:var(--el-transition-md-fade);transform-origin:center top}.el-zoom-in-top-enter-active[data-popper-placement^=top],.el-zoom-in-top-leave-active[data-popper-placement^=top]{transform-origin:center bottom}.el-zoom-in-top-enter-from,.el-zoom-in-top-leave-active{opacity:0;transform:scaleY(0)}.el-zoom-in-bottom-enter-active,.el-zoom-in-bottom-leave-active{opacity:1;transform:scaleY(1);transition:var(--el-transition-md-fade);transform-origin:center bottom}.el-zoom-in-bottom-enter-from,.el-zoom-in-bottom-leave-active{opacity:0;transform:scaleY(0)}.el-zoom-in-left-enter-active,.el-zoom-in-left-leave-active{opacity:1;transform:scale(1);transition:var(--el-transition-md-fade);transform-origin:top left}.el-zoom-in-left-enter-from,.el-zoom-in-left-leave-active{opacity:0;transform:scale(.45)}.collapse-transition{transition:var(--el-transition-duration) height ease-in-out,var(--el-transition-duration) padding-top ease-in-out,var(--el-transition-duration) padding-bottom ease-in-out}.el-collapse-transition-enter-active,.el-collapse-transition-leave-active{transition:var(--el-transition-duration) max-height ease-in-out,var(--el-transition-duration) padding-top ease-in-out,var(--el-transition-duration) padding-bottom ease-in-out}.horizontal-collapse-transition{transition:var(--el-transition-duration) width ease-in-out,var(--el-transition-duration) padding-left ease-in-out,var(--el-transition-duration) padding-right ease-in-out}.el-list-enter-active,.el-list-leave-active{transition:all 1s}.el-list-enter-from,.el-list-leave-to{opacity:0;transform:translateY(-30px)}.el-list-leave-active{position:absolute!important}.el-opacity-transition{transition:opacity var(--el-transition-duration) cubic-bezier(.55,0,.1,1)}.el-collapse{--el-collapse-border-color:var(--el-border-color-lighter);--el-collapse-header-height:48px;--el-collapse-header-bg-color:var(--el-fill-color-blank);--el-collapse-header-text-color:var(--el-text-color-primary);--el-collapse-header-font-size:13px;--el-collapse-content-bg-color:var(--el-fill-color-blank);--el-collapse-content-font-size:13px;--el-collapse-content-text-color:var(--el-text-color-primary);border-top:1px solid var(--el-collapse-border-color);border-bottom:1px solid var(--el-collapse-border-color)}.el-collapse-item.is-disabled .el-collapse-item__header{color:var(--el-text-color-disabled);cursor:not-allowed}.el-collapse-item__header{display:flex;align-items:center;height:var(--el-collapse-header-height);line-height:var(--el-collapse-header-height);background-color:var(--el-collapse-header-bg-color);color:var(--el-collapse-header-text-color);cursor:pointer;border-bottom:1px solid var(--el-collapse-border-color);font-size:var(--el-collapse-header-font-size);font-weight:500;transition:border-bottom-color var(--el-transition-duration);outline:0}.el-collapse-item__arrow{margin:0 8px 0 auto;transition:transform var(--el-transition-duration);font-weight:300}.el-collapse-item__arrow.is-active{transform:rotate(90deg)}.el-collapse-item__header.focusing:focus:not(:hover){color:var(--el-color-primary)}.el-collapse-item__header.is-active{border-bottom-color:transparent}.el-collapse-item__wrap{will-change:height;background-color:var(--el-collapse-content-bg-color);overflow:hidden;box-sizing:border-box;border-bottom:1px solid var(--el-collapse-border-color)}.el-collapse-item__content{padding-bottom:25px;font-size:var(--el-collapse-content-font-size);color:var(--el-collapse-content-text-color);line-height:1.7692307692}.el-collapse-item:last-child{margin-bottom:-1px}.el-popconfirm__main{display:flex;align-items:center}.el-popconfirm__icon{margin-right:5px}.el-popconfirm__action{text-align:right;margin-top:8px}.low-model-item[data-v-5e2de7f8]{overflow:auto}.low-model-item .code[data-v-5e2de7f8]{padding:4px 10px;font-size:12px;line-height:1.4}.model-item-title[data-v-5e2de7f8]{flex:1;display:flex;align-items:center;justify-content:space-between}.model-item-title .model-actions[data-v-5e2de7f8]{display:flex}.model-item-title .model-actions i[data-v-5e2de7f8]{padding:6px;margin:0 2px;font-weight:700;cursor:pointer;border-radius:2px;opacity:.7;transition:all .1s}.model-item-title .model-actions i[data-v-5e2de7f8]:hover{background-color:#f1f1f1;opacity:1}.low-model-item[data-v-1d247d84]{overflow:auto}.low-model-item .code[data-v-1d247d84]{padding:4px 10px;font-size:12px;line-height:1.4}.model-item-title[data-v-1d247d84]{flex:1;display:flex;align-items:center;justify-content:space-between}.model-item-title .model-actions[data-v-1d247d84]{display:flex}.model-item-title .model-actions i[data-v-1d247d84]{padding:6px;margin:0 2px;font-weight:700;cursor:pointer;border-radius:2px;opacity:.7;transition:all .1s}.model-item-title .model-actions i[data-v-1d247d84]:hover{background-color:#f1f1f1;opacity:1}.data-source[data-v-921812e4] .el-tabs__header{position:sticky;top:0;z-index:10}.data-source[data-v-921812e4] .el-tabs__content{contain:layout;content-visibility:auto}.fade-in-linear-enter-active,.fade-in-linear-leave-active{transition:var(--el-transition-fade-linear)}.fade-in-linear-enter-from,.fade-in-linear-leave-to{opacity:0}.el-fade-in-linear-enter-active,.el-fade-in-linear-leave-active{transition:var(--el-transition-fade-linear)}.el-fade-in-linear-enter-from,.el-fade-in-linear-leave-to{opacity:0}.el-fade-in-enter-active,.el-fade-in-leave-active{transition:all var(--el-transition-duration) cubic-bezier(.55,0,.1,1)}.el-fade-in-enter-from,.el-fade-in-leave-active{opacity:0}.el-zoom-in-center-enter-active,.el-zoom-in-center-leave-active{transition:all var(--el-transition-duration) cubic-bezier(.55,0,.1,1)}.el-zoom-in-center-enter-from,.el-zoom-in-center-leave-active{opacity:0;transform:scaleX(0)}.el-zoom-in-top-enter-active,.el-zoom-in-top-leave-active{opacity:1;transform:scaleY(1);transition:var(--el-transition-md-fade);transform-origin:center top}.el-zoom-in-top-enter-active[data-popper-placement^=top],.el-zoom-in-top-leave-active[data-popper-placement^=top]{transform-origin:center bottom}.el-zoom-in-top-enter-from,.el-zoom-in-top-leave-active{opacity:0;transform:scaleY(0)}.el-zoom-in-bottom-enter-active,.el-zoom-in-bottom-leave-active{opacity:1;transform:scaleY(1);transition:var(--el-transition-md-fade);transform-origin:center bottom}.el-zoom-in-bottom-enter-from,.el-zoom-in-bottom-leave-active{opacity:0;transform:scaleY(0)}.el-zoom-in-left-enter-active,.el-zoom-in-left-leave-active{opacity:1;transform:scale(1);transition:var(--el-transition-md-fade);transform-origin:top left}.el-zoom-in-left-enter-from,.el-zoom-in-left-leave-active{opacity:0;transform:scale(.45)}.collapse-transition{transition:var(--el-transition-duration) height ease-in-out,var(--el-transition-duration) padding-top ease-in-out,var(--el-transition-duration) padding-bottom ease-in-out}.el-collapse-transition-enter-active,.el-collapse-transition-leave-active{transition:var(--el-transition-duration) max-height ease-in-out,var(--el-transition-duration) padding-top ease-in-out,var(--el-transition-duration) padding-bottom ease-in-out}.horizontal-collapse-transition{transition:var(--el-transition-duration) width ease-in-out,var(--el-transition-duration) padding-left ease-in-out,var(--el-transition-duration) padding-right ease-in-out}.el-list-enter-active,.el-list-leave-active{transition:all 1s}.el-list-enter-from,.el-list-leave-to{opacity:0;transform:translateY(-30px)}.el-list-leave-active{position:absolute!important}.el-opacity-transition{transition:opacity var(--el-transition-duration) cubic-bezier(.55,0,.1,1)}.el-tree{--el-tree-node-hover-bg-color:var(--el-fill-color-light);--el-tree-text-color:var(--el-text-color-regular);--el-tree-expand-icon-color:var(--el-text-color-placeholder)}.el-tree{position:relative;cursor:default;background:var(--el-fill-color-blank);color:var(--el-tree-text-color)}.el-tree__empty-block{position:relative;min-height:60px;text-align:center;width:100%;height:100%}.el-tree__empty-text{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);color:var(--el-text-color-secondary);font-size:var(--el-font-size-base)}.el-tree__drop-indicator{position:absolute;left:0;right:0;height:1px;background-color:var(--el-color-primary)}.el-tree-node{white-space:nowrap;outline:0}.el-tree-node:focus>.el-tree-node__content{background-color:var(--el-tree-node-hover-bg-color)}.el-tree-node.is-drop-inner>.el-tree-node__content .el-tree-node__label{background-color:var(--el-color-primary);color:#fff}.el-tree-node__content{display:flex;align-items:center;height:26px;cursor:pointer}.el-tree-node__content>.el-tree-node__expand-icon{padding:6px;box-sizing:content-box}.el-tree-node__content>label.el-checkbox{margin-right:8px}.el-tree-node__content:hover{background-color:var(--el-tree-node-hover-bg-color)}.el-tree.is-dragging .el-tree-node__content{cursor:move}.el-tree.is-dragging .el-tree-node__content *{pointer-events:none}.el-tree.is-dragging.is-drop-not-allow .el-tree-node__content{cursor:not-allowed}.el-tree-node__expand-icon{cursor:pointer;color:var(--el-tree-expand-icon-color);font-size:12px;transform:rotate(0);transition:transform var(--el-transition-duration) ease-in-out}.el-tree-node__expand-icon.expanded{transform:rotate(90deg)}.el-tree-node__expand-icon.is-leaf{color:transparent;cursor:default}.el-tree-node__expand-icon.is-hidden{visibility:hidden}.el-tree-node__label{font-size:var(--el-font-size-base)}.el-tree-node__loading-icon{margin-right:8px;font-size:var(--el-font-size-base);color:var(--el-tree-expand-icon-color)}.el-tree-node>.el-tree-node__children{overflow:hidden;background-color:transparent}.el-tree-node.is-expanded>.el-tree-node__children{display:block}.el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content{background-color:var(--el-color-primary-light-9)}.el-checkbox{--el-checkbox-font-size:14px;--el-checkbox-font-weight:var(--el-font-weight-primary);--el-checkbox-text-color:var(--el-text-color-regular);--el-checkbox-input-height:14px;--el-checkbox-input-width:14px;--el-checkbox-border-radius:var(--el-border-radius-small);--el-checkbox-bg-color:var(--el-fill-color-blank);--el-checkbox-input-border:var(--el-border);--el-checkbox-disabled-border-color:var(--el-border-color);--el-checkbox-disabled-input-fill:var(--el-fill-color-light);--el-checkbox-disabled-icon-color:var(--el-text-color-placeholder);--el-checkbox-disabled-checked-input-fill:var(--el-border-color-extra-light);--el-checkbox-disabled-checked-input-border-color:var(--el-border-color);--el-checkbox-disabled-checked-icon-color:var(--el-text-color-placeholder);--el-checkbox-checked-text-color:var(--el-color-primary);--el-checkbox-checked-input-border-color:var(--el-color-primary);--el-checkbox-checked-bg-color:var(--el-color-primary);--el-checkbox-checked-icon-color:var(--el-color-white);--el-checkbox-input-border-color-hover:var(--el-color-primary)}.el-checkbox{color:var(--el-checkbox-text-color);font-weight:var(--el-checkbox-font-weight);font-size:var(--el-font-size-base);position:relative;cursor:pointer;display:inline-flex;align-items:center;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-right:30px;height:32px}.el-checkbox.is-bordered{padding:0 15px 0 9px;border-radius:var(--el-border-radius-base);border:var(--el-border);box-sizing:border-box}.el-checkbox.is-bordered.is-checked{border-color:var(--el-color-primary)}.el-checkbox.is-bordered.is-disabled{border-color:var(--el-border-color-lighter);cursor:not-allowed}.el-checkbox.is-bordered.el-checkbox--large{padding:0 19px 0 11px;border-radius:var(--el-border-radius-base)}.el-checkbox.is-bordered.el-checkbox--large .el-checkbox__label{font-size:var(--el-font-size-base)}.el-checkbox.is-bordered.el-checkbox--large .el-checkbox__inner{height:14px;width:14px}.el-checkbox.is-bordered.el-checkbox--small{padding:0 11px 0 7px;border-radius:calc(var(--el-border-radius-base) - 1px)}.el-checkbox.is-bordered.el-checkbox--small .el-checkbox__label{font-size:12px}.el-checkbox.is-bordered.el-checkbox--small .el-checkbox__inner{height:12px;width:12px}.el-checkbox.is-bordered.el-checkbox--small .el-checkbox__inner:after{height:6px;width:2px}.el-checkbox input:focus-visible+.el-checkbox__inner{outline:2px solid var(--el-checkbox-input-border-color-hover);outline-offset:1px;border-radius:var(--el-checkbox-border-radius)}.el-checkbox__input{white-space:nowrap;cursor:pointer;outline:0;display:inline-flex;position:relative}.el-checkbox__input.is-disabled .el-checkbox__inner{background-color:var(--el-checkbox-disabled-input-fill);border-color:var(--el-checkbox-disabled-border-color);cursor:not-allowed}.el-checkbox__input.is-disabled .el-checkbox__inner:after{cursor:not-allowed;border-color:var(--el-checkbox-disabled-icon-color)}.el-checkbox__input.is-disabled .el-checkbox__inner+.el-checkbox__label{cursor:not-allowed}.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner{background-color:var(--el-checkbox-disabled-checked-input-fill);border-color:var(--el-checkbox-disabled-checked-input-border-color)}.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner:after{border-color:var(--el-checkbox-disabled-checked-icon-color)}.el-checkbox__input.is-disabled.is-indeterminate .el-checkbox__inner{background-color:var(--el-checkbox-disabled-checked-input-fill);border-color:var(--el-checkbox-disabled-checked-input-border-color)}.el-checkbox__input.is-disabled.is-indeterminate .el-checkbox__inner:before{background-color:var(--el-checkbox-disabled-checked-icon-color);border-color:var(--el-checkbox-disabled-checked-icon-color)}.el-checkbox__input.is-disabled+span.el-checkbox__label{color:var(--el-disabled-text-color);cursor:not-allowed}.el-checkbox__input.is-checked .el-checkbox__inner{background-color:var(--el-checkbox-checked-bg-color);border-color:var(--el-checkbox-checked-input-border-color)}.el-checkbox__input.is-checked .el-checkbox__inner:after{transform:rotate(45deg) scaleY(1)}.el-checkbox__input.is-checked+.el-checkbox__label{color:var(--el-checkbox-checked-text-color)}.el-checkbox__input.is-focus:not(.is-checked) .el-checkbox__original:not(:focus-visible){border-color:var(--el-checkbox-input-border-color-hover)}.el-checkbox__input.is-indeterminate .el-checkbox__inner{background-color:var(--el-checkbox-checked-bg-color);border-color:var(--el-checkbox-checked-input-border-color)}.el-checkbox__input.is-indeterminate .el-checkbox__inner:before{content:"";position:absolute;display:block;background-color:var(--el-checkbox-checked-icon-color);height:2px;transform:scale(.5);left:0;right:0;top:5px}.el-checkbox__input.is-indeterminate .el-checkbox__inner:after{display:none}.el-checkbox__inner{display:inline-block;position:relative;border:var(--el-checkbox-input-border);border-radius:var(--el-checkbox-border-radius);box-sizing:border-box;width:var(--el-checkbox-input-width);height:var(--el-checkbox-input-height);background-color:var(--el-checkbox-bg-color);z-index:var(--el-index-normal);transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46),outline .25s cubic-bezier(.71,-.46,.29,1.46)}.el-checkbox__inner:hover{border-color:var(--el-checkbox-input-border-color-hover)}.el-checkbox__inner:after{box-sizing:content-box;content:"";border:1px solid var(--el-checkbox-checked-icon-color);border-left:0;border-top:0;height:7px;left:4px;position:absolute;top:1px;transform:rotate(45deg) scaleY(0);width:3px;transition:transform .15s ease-in 50ms;transform-origin:center}.el-checkbox__original{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.el-checkbox__label{display:inline-block;padding-left:8px;line-height:1;font-size:var(--el-checkbox-font-size)}.el-checkbox.el-checkbox--large{height:40px}.el-checkbox.el-checkbox--large .el-checkbox__label{font-size:14px}.el-checkbox.el-checkbox--large .el-checkbox__inner{width:14px;height:14px}.el-checkbox.el-checkbox--small{height:24px}.el-checkbox.el-checkbox--small .el-checkbox__label{font-size:12px}.el-checkbox.el-checkbox--small .el-checkbox__inner{width:12px;height:12px}.el-checkbox.el-checkbox--small .el-checkbox__input.is-indeterminate .el-checkbox__inner:before{top:4px}.el-checkbox.el-checkbox--small .el-checkbox__inner:after{width:2px;height:6px}.el-checkbox:last-of-type{margin-right:0}.el-dropdown{--el-dropdown-menu-box-shadow:var(--el-box-shadow-light);--el-dropdown-menuItem-hover-fill:var(--el-color-primary-light-9);--el-dropdown-menuItem-hover-color:var(--el-color-primary);--el-dropdown-menu-index:10;display:inline-flex;position:relative;color:var(--el-text-color-regular);font-size:var(--el-font-size-base);line-height:1;vertical-align:top}.el-dropdown.is-disabled{color:var(--el-text-color-placeholder);cursor:not-allowed}.el-dropdown__popper{--el-dropdown-menu-box-shadow:var(--el-box-shadow-light);--el-dropdown-menuItem-hover-fill:var(--el-color-primary-light-9);--el-dropdown-menuItem-hover-color:var(--el-color-primary);--el-dropdown-menu-index:10}.el-dropdown__popper.el-popper{background:var(--el-bg-color-overlay);border:1px solid var(--el-border-color-light);box-shadow:var(--el-dropdown-menu-box-shadow)}.el-dropdown__popper.el-popper .el-popper__arrow:before{border:1px solid var(--el-border-color-light)}.el-dropdown__popper.el-popper[data-popper-placement^=top] .el-popper__arrow:before{border-top-color:transparent;border-left-color:transparent}.el-dropdown__popper.el-popper[data-popper-placement^=bottom] .el-popper__arrow:before{border-bottom-color:transparent;border-right-color:transparent}.el-dropdown__popper.el-popper[data-popper-placement^=left] .el-popper__arrow:before{border-left-color:transparent;border-bottom-color:transparent}.el-dropdown__popper.el-popper[data-popper-placement^=right] .el-popper__arrow:before{border-right-color:transparent;border-top-color:transparent}.el-dropdown__popper .el-dropdown-menu{border:none}.el-dropdown__popper .el-dropdown__popper-selfdefine{outline:0}.el-dropdown__popper .el-scrollbar__bar{z-index:calc(var(--el-dropdown-menu-index) + 1)}.el-dropdown__popper .el-dropdown__list{list-style:none;padding:0;margin:0;box-sizing:border-box}.el-dropdown .el-dropdown__caret-button{padding-left:0;padding-right:0;display:inline-flex;justify-content:center;align-items:center;width:32px;border-left:none}.el-dropdown .el-dropdown__caret-button>span{display:inline-flex}.el-dropdown .el-dropdown__caret-button:before{content:"";position:absolute;display:block;width:1px;top:-1px;bottom:-1px;left:0;background:var(--el-overlay-color-lighter)}.el-dropdown .el-dropdown__caret-button.el-button:before{background:var(--el-border-color);opacity:.5}.el-dropdown .el-dropdown__caret-button .el-dropdown__icon{font-size:inherit;padding-left:0}.el-dropdown .el-dropdown-selfdefine{outline:0}.el-dropdown--large .el-dropdown__caret-button{width:40px}.el-dropdown--small .el-dropdown__caret-button{width:24px}.el-dropdown-menu{position:relative;top:0;left:0;z-index:var(--el-dropdown-menu-index);padding:5px 0;margin:0;background-color:var(--el-bg-color-overlay);border:none;border-radius:var(--el-border-radius-base);box-shadow:none;list-style:none}.el-dropdown-menu__item{display:flex;align-items:center;white-space:nowrap;list-style:none;line-height:22px;padding:5px 16px;margin:0;font-size:var(--el-font-size-base);color:var(--el-text-color-regular);cursor:pointer;outline:0}.el-dropdown-menu__item:not(.is-disabled):focus{background-color:var(--el-dropdown-menuItem-hover-fill);color:var(--el-dropdown-menuItem-hover-color)}.el-dropdown-menu__item i{margin-right:5px}.el-dropdown-menu__item--divided{margin:6px 0;border-top:1px solid var(--el-border-color-lighter)}.el-dropdown-menu__item.is-disabled{cursor:not-allowed;color:var(--el-text-color-disabled)}.el-dropdown-menu--large{padding:7px 0}.el-dropdown-menu--large .el-dropdown-menu__item{padding:7px 20px;line-height:22px;font-size:14px}.el-dropdown-menu--large .el-dropdown-menu__item--divided{margin:8px 0}.el-dropdown-menu--small{padding:3px 0}.el-dropdown-menu--small .el-dropdown-menu__item{padding:2px 12px;line-height:20px;font-size:12px}.el-dropdown-menu--small .el-dropdown-menu__item--divided{margin:4px 0}.el-tag{--el-tag-font-size:12px;--el-tag-border-radius:4px;--el-tag-border-radius-rounded:9999px}.el-tag{--el-tag-bg-color:var(--el-color-primary-light-9);--el-tag-border-color:var(--el-color-primary-light-8);--el-tag-hover-color:var(--el-color-primary);--el-tag-text-color:var(--el-color-primary);background-color:var(--el-tag-bg-color);border-color:var(--el-tag-border-color);color:var(--el-tag-text-color);display:inline-flex;justify-content:center;align-items:center;height:24px;padding:0 9px;font-size:var(--el-tag-font-size);line-height:1;border-width:1px;border-style:solid;border-radius:var(--el-tag-border-radius);box-sizing:border-box;white-space:nowrap;--el-icon-size:14px}.el-tag.el-tag--primary{--el-tag-bg-color:var(--el-color-primary-light-9);--el-tag-border-color:var(--el-color-primary-light-8);--el-tag-hover-color:var(--el-color-primary)}.el-tag.el-tag--success{--el-tag-bg-color:var(--el-color-success-light-9);--el-tag-border-color:var(--el-color-success-light-8);--el-tag-hover-color:var(--el-color-success)}.el-tag.el-tag--warning{--el-tag-bg-color:var(--el-color-warning-light-9);--el-tag-border-color:var(--el-color-warning-light-8);--el-tag-hover-color:var(--el-color-warning)}.el-tag.el-tag--danger{--el-tag-bg-color:var(--el-color-danger-light-9);--el-tag-border-color:var(--el-color-danger-light-8);--el-tag-hover-color:var(--el-color-danger)}.el-tag.el-tag--error{--el-tag-bg-color:var(--el-color-error-light-9);--el-tag-border-color:var(--el-color-error-light-8);--el-tag-hover-color:var(--el-color-error)}.el-tag.el-tag--info{--el-tag-bg-color:var(--el-color-info-light-9);--el-tag-border-color:var(--el-color-info-light-8);--el-tag-hover-color:var(--el-color-info)}.el-tag.el-tag--primary{--el-tag-text-color:var(--el-color-primary)}.el-tag.el-tag--success{--el-tag-text-color:var(--el-color-success)}.el-tag.el-tag--warning{--el-tag-text-color:var(--el-color-warning)}.el-tag.el-tag--danger{--el-tag-text-color:var(--el-color-danger)}.el-tag.el-tag--error{--el-tag-text-color:var(--el-color-error)}.el-tag.el-tag--info{--el-tag-text-color:var(--el-color-info)}.el-tag.is-hit{border-color:var(--el-color-primary)}.el-tag.is-round{border-radius:var(--el-tag-border-radius-rounded)}.el-tag .el-tag__close{color:var(--el-tag-text-color)}.el-tag .el-tag__close:hover{color:var(--el-color-white);background-color:var(--el-tag-hover-color)}.el-tag .el-icon{border-radius:50%;cursor:pointer;font-size:calc(var(--el-icon-size) - 2px);height:var(--el-icon-size);width:var(--el-icon-size)}.el-tag .el-tag__close{margin-left:6px}.el-tag--dark{--el-tag-bg-color:var(--el-color-primary);--el-tag-border-color:var(--el-color-primary);--el-tag-hover-color:var(--el-color-primary-light-3);--el-tag-text-color:var(--el-color-white)}.el-tag--dark.el-tag--primary{--el-tag-bg-color:var(--el-color-primary);--el-tag-border-color:var(--el-color-primary);--el-tag-hover-color:var(--el-color-primary-light-3)}.el-tag--dark.el-tag--success{--el-tag-bg-color:var(--el-color-success);--el-tag-border-color:var(--el-color-success);--el-tag-hover-color:var(--el-color-success-light-3)}.el-tag--dark.el-tag--warning{--el-tag-bg-color:var(--el-color-warning);--el-tag-border-color:var(--el-color-warning);--el-tag-hover-color:var(--el-color-warning-light-3)}.el-tag--dark.el-tag--danger{--el-tag-bg-color:var(--el-color-danger);--el-tag-border-color:var(--el-color-danger);--el-tag-hover-color:var(--el-color-danger-light-3)}.el-tag--dark.el-tag--error{--el-tag-bg-color:var(--el-color-error);--el-tag-border-color:var(--el-color-error);--el-tag-hover-color:var(--el-color-error-light-3)}.el-tag--dark.el-tag--info{--el-tag-bg-color:var(--el-color-info);--el-tag-border-color:var(--el-color-info);--el-tag-hover-color:var(--el-color-info-light-3)}.el-tag--dark.el-tag--primary,.el-tag--dark.el-tag--success,.el-tag--dark.el-tag--warning,.el-tag--dark.el-tag--danger,.el-tag--dark.el-tag--error,.el-tag--dark.el-tag--info{--el-tag-text-color:var(--el-color-white)}.el-tag--plain{--el-tag-border-color:var(--el-color-primary-light-5);--el-tag-hover-color:var(--el-color-primary);--el-tag-bg-color:var(--el-fill-color-blank)}.el-tag--plain.el-tag--primary{--el-tag-bg-color:var(--el-fill-color-blank);--el-tag-border-color:var(--el-color-primary-light-5);--el-tag-hover-color:var(--el-color-primary)}.el-tag--plain.el-tag--success{--el-tag-bg-color:var(--el-fill-color-blank);--el-tag-border-color:var(--el-color-success-light-5);--el-tag-hover-color:var(--el-color-success)}.el-tag--plain.el-tag--warning{--el-tag-bg-color:var(--el-fill-color-blank);--el-tag-border-color:var(--el-color-warning-light-5);--el-tag-hover-color:var(--el-color-warning)}.el-tag--plain.el-tag--danger{--el-tag-bg-color:var(--el-fill-color-blank);--el-tag-border-color:var(--el-color-danger-light-5);--el-tag-hover-color:var(--el-color-danger)}.el-tag--plain.el-tag--error{--el-tag-bg-color:var(--el-fill-color-blank);--el-tag-border-color:var(--el-color-error-light-5);--el-tag-hover-color:var(--el-color-error)}.el-tag--plain.el-tag--info{--el-tag-bg-color:var(--el-fill-color-blank);--el-tag-border-color:var(--el-color-info-light-5);--el-tag-hover-color:var(--el-color-info)}.el-tag.is-closable{padding-right:5px}.el-tag--large{padding:0 11px;height:32px;--el-icon-size:16px}.el-tag--large .el-tag__close{margin-left:8px}.el-tag--large.is-closable{padding-right:7px}.el-tag--small{padding:0 7px;height:20px;--el-icon-size:12px}.el-tag--small .el-tag__close{margin-left:4px}.el-tag--small.is-closable{padding-right:3px}.el-tag--small .el-icon-close{transform:scale(.8)}.el-tag.el-tag--primary.is-hit{border-color:var(--el-color-primary)}.el-tag.el-tag--success.is-hit{border-color:var(--el-color-success)}.el-tag.el-tag--warning.is-hit{border-color:var(--el-color-warning)}.el-tag.el-tag--danger.is-hit{border-color:var(--el-color-danger)}.el-tag.el-tag--error.is-hit{border-color:var(--el-color-error)}.el-tag.el-tag--info.is-hit{border-color:var(--el-color-info)}.custom-tree-node[data-v-b80e3754]{display:flex;padding-right:8px;font-size:14px;flex:1;align-items:center;justify-content:space-between}.left-aside[data-v-1c5310a8]{height:100%;contain:layout}.left-aside[data-v-1c5310a8]>.el-tabs__header{margin-right:0}.left-aside[data-v-1c5310a8]>.el-tabs__header .el-tabs__item{height:80px;padding:20px 16px}.left-aside[data-v-1c5310a8]>.el-tabs__header .el-tabs__item .tab-item{display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;-webkit-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center}.left-aside[data-v-1c5310a8]>.el-tabs__header .el-tabs__item .tab-item [class^=el-icon-]{font-size:20px}.left-aside[data-v-1c5310a8]>.el-tabs__content{height:100%;overflow-y:auto}._drawer_1jxyf_8{position:absolute;top:0;right:0;bottom:0;z-index:20;width:390px;background-color:#fff;transform:translate(100%);box-shadow:-2px 0 4px rgba(0,0,0,.1);transition:transform .5s ease-in-out;contain:layout}._drawer_1jxyf_8._is-open_1jxyf_26{transform:translate(0)}._floating-action-btn_1jxyf_21{position:absolute;top:50%;left:0;display:flex;width:20px;height:80px;cursor:pointer;background:#fff;transform:translate(-20px);box-shadow:-2px 0 4px rgba(0,0,0,.1);transition:transform .5s ease-in-out;justify-content:center;align-items:center}._attrs_1jxyf_49{position:absolute;width:100%;height:100%;overflow-y:hidden;background-color:#fff}._attrs_1jxyf_49 ._tabs_1jxyf_56{height:100%}._attrs_1jxyf_49 ._tabs_1jxyf_56 .el-tabs__content{height:100%;padding-bottom:50px;overflow-y:auto}._attrs_1jxyf_49 ._tabs_1jxyf_56 .el-form-item__label{font-size:12px}._attrs_1jxyf_49 ._tabs_1jxyf_56 .el-form-item .el-form-item__content{display:flex;justify-content:flex-end;align-items:center}._format-input-number_otieh_1 .el-input-group__append{padding:0 10px}._animate_fgxh2_1 .el-col{margin:10px 0}._animate_fgxh2_1 .animate-item{display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;height:50px;padding:6px;font-size:12px;background-color:#eee;border-radius:3px;transition:background-color .2s,color .2s}._animate_fgxh2_1 .animate-item:hover{color:#fff;cursor:pointer;background-color:#1593ff}._animate_fgxh2_1 .el-alert{padding:10px 8px;font-size:14px}._animate_fgxh2_1 .el-alert .title{font-family:PingFangSC-Semibold,PingFang SC;font-size:14px;font-weight:600;color:#333}._animate_fgxh2_1 .el-alert .label{padding:4px 10px;cursor:pointer;background-color:#e6e9ec;border-radius:12px}._animate_fgxh2_1 .el-alert .play{font-size:16px;cursor:pointer;vertical-align:middle}._animate_fgxh2_1 .el-alert span{margin-right:10px}._animate_fgxh2_1 .el-alert .el-alert__description{font-size:inherit}._animate_fgxh2_1 .el-alert .el-alert__description input[type=number]{display:inline-block;height:36px;max-width:48px;padding:6px;color:#333;background:#fff;border:1px solid #ccd5db;border-radius:3px}.el-alert{--el-alert-padding:8px 16px;--el-alert-border-radius-base:var(--el-border-radius-base);--el-alert-title-font-size:13px;--el-alert-description-font-size:12px;--el-alert-close-font-size:12px;--el-alert-close-customed-font-size:13px;--el-alert-icon-size:16px;--el-alert-icon-large-size:28px;width:100%;padding:var(--el-alert-padding);margin:0;box-sizing:border-box;border-radius:var(--el-alert-border-radius-base);position:relative;background-color:var(--el-color-white);overflow:hidden;opacity:1;display:flex;align-items:center;transition:opacity var(--el-transition-duration-fast)}.el-alert.is-light .el-alert__close-btn{color:var(--el-text-color-placeholder)}.el-alert.is-dark .el-alert__close-btn,.el-alert.is-dark .el-alert__description{color:var(--el-color-white)}.el-alert.is-center{justify-content:center}.el-alert--success{--el-alert-bg-color:var(--el-color-success-light-9)}.el-alert--success.is-light{background-color:var(--el-alert-bg-color);color:var(--el-color-success)}.el-alert--success.is-light .el-alert__description{color:var(--el-color-success)}.el-alert--success.is-dark{background-color:var(--el-color-success);color:var(--el-color-white)}.el-alert--info{--el-alert-bg-color:var(--el-color-info-light-9)}.el-alert--info.is-light{background-color:var(--el-alert-bg-color);color:var(--el-color-info)}.el-alert--info.is-light .el-alert__description{color:var(--el-color-info)}.el-alert--info.is-dark{background-color:var(--el-color-info);color:var(--el-color-white)}.el-alert--warning{--el-alert-bg-color:var(--el-color-warning-light-9)}.el-alert--warning.is-light{background-color:var(--el-alert-bg-color);color:var(--el-color-warning)}.el-alert--warning.is-light .el-alert__description{color:var(--el-color-warning)}.el-alert--warning.is-dark{background-color:var(--el-color-warning);color:var(--el-color-white)}.el-alert--error{--el-alert-bg-color:var(--el-color-error-light-9)}.el-alert--error.is-light{background-color:var(--el-alert-bg-color);color:var(--el-color-error)}.el-alert--error.is-light .el-alert__description{color:var(--el-color-error)}.el-alert--error.is-dark{background-color:var(--el-color-error);color:var(--el-color-white)}.el-alert__content{display:table-cell;padding:0 8px}.el-alert .el-alert__icon{font-size:var(--el-alert-icon-size);width:var(--el-alert-icon-size)}.el-alert .el-alert__icon.is-big{font-size:var(--el-alert-icon-large-size);width:var(--el-alert-icon-large-size)}.el-alert__title{font-size:var(--el-alert-title-font-size);line-height:18px;vertical-align:text-top}.el-alert__title.is-bold{font-weight:700}.el-alert .el-alert__description{font-size:var(--el-alert-description-font-size);margin:5px 0 0}.el-alert .el-alert__close-btn{font-size:var(--el-alert-close-font-size);opacity:1;position:absolute;top:12px;right:15px;cursor:pointer}.el-alert .el-alert__close-btn.is-customed{font-style:normal;font-size:var(--el-alert-close-customed-font-size);top:9px}.el-alert-fade-enter-from,.el-alert-fade-leave-active{opacity:0}._upload_5i8ou_1 .el-upload{position:relative;overflow:hidden;cursor:pointer;border:1px dashed #d9d9d9;border-radius:6px}._upload_5i8ou_1 .uploader-icon{width:178px;height:178px;font-size:28px;line-height:178px;color:#8c939d;text-align:center}.inner-draggable[data-v-589624ce]{position:relative}.inner-draggable.slot[data-v-589624ce]:after{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;height:auto;min-height:40px;font-size:12px;color:#8591a2;text-align:center;background:rgba(246,247,249,.5);content:attr(data-slot);outline:1px dashed #dedede;outline-offset:-1px;flex-direction:column;justify-content:center}.list-group-item[data-v-589624ce]{position:relative;padding:3px;cursor:move}.list-group-item.focusWithChild[data-v-589624ce]{outline:2px dashed #b0c1d7;outline-offset:-2px}.list-group-item.focusWithChild[data-v-589624ce]:before{top:0;left:-3px;transform:translate(-100%);position:absolute;padding:3px 5px;font-size:12px;font-weight:700;color:#fff;background-color:#006eff;border-radius:3px;content:attr(data-label)}.list-group-item.focus[data-v-589624ce]{outline:2px solid #006eff;outline-offset:-2px}.list-group-item.focus[data-v-589624ce]:after{top:2px;left:0;transform:translateY(-100%);position:absolute;padding:3px 5px;font-size:12px;font-weight:700;color:#fff;background-color:#006eff;border-radius:3px;content:attr(data-label);opacity:0;transition:opacity .2s}.list-group-item.focus[data-v-589624ce]:hover:after{opacity:1}.dropdown-service{position:fixed;z-index:99;padding:8px 0;pointer-events:none;background-color:#fff;opacity:0;box-shadow:0 2px 5px 1px #ddd;transition:opacity .2s linear}.dropdown-service .dropdown-option{padding:5px 12px;font-size:14px}.dropdown-service .dropdown-option>i{margin-right:4px}.dropdown-service .dropdown-option:hover{cursor:pointer;background-color:#efefef}.dropdown-service.dropdown-service-show{pointer-events:auto;opacity:1}.simulator-container[data-v-175cf7f4]{display:flex;width:100%;height:100%;padding-right:380px;align-items:center;justify-content:center}@media (max-width: 1114px){.simulator-container[data-v-175cf7f4]{padding-right:0}}.simulator-editor[data-v-175cf7f4]{width:660px;height:740px;min-width:660px;padding:60px 150px 0;overflow:hidden auto;background:#fafafa;border-radius:5px;box-sizing:border-box;background-clip:content-box;contain:layout}.simulator-editor[data-v-175cf7f4]::-webkit-scrollbar{width:0}.simulator-editor-content[data-v-175cf7f4]{min-height:100%;transform:translate(0);box-shadow:0 8px 12px #ebedf0}.list-group-item[data-v-175cf7f4]{position:relative;padding:3px;cursor:move}.list-group-item>div[data-v-175cf7f4]{position:relative}.list-group-item.focus[data-v-175cf7f4]{outline:2px solid #006eff;outline-offset:-2px}.list-group-item.focus[data-v-175cf7f4]:before{top:0;left:-3px;transform:translate(-100%);position:absolute;padding:3px 5px;font-size:12px;font-weight:700;color:#fff;background-color:#006eff;border-radius:3px;content:attr(data-label)}.list-group-item.drag[data-v-175cf7f4]:after{display:none}.list-group-item[data-v-175cf7f4]:not(.has-slot){content:""}.list-group-item.focusWithChild[data-v-175cf7f4]{outline:2px dashed #b0c1d7;outline-offset:-2px}.list-group-item.focusWithChild[data-v-175cf7f4]:before{top:0;left:-3px;transform:translate(-100%);position:absolute;padding:3px 5px;font-size:12px;font-weight:700;color:#fff;background-color:#006eff;border-radius:3px;content:attr(data-label)}.list-group-item i[data-v-175cf7f4]{cursor:pointer}.el-header,.el-footer{position:relative;z-index:99;background-color:#fff}.el-aside{background-color:#fff}.layout-container{height:calc(100vh - 80px)}.el-main{position:relative;padding:12px;background-color:#f5f5f5}@media (min-width: 1111px){.el-main{overflow-x:hidden}}\n',document.head.appendChild(t),System.register(["./useVisualData-legacy.7d5d4b8f.js","./index-legacy.190ca0d6.js","./preload-helper-legacy.3a841cdc.js","./editorWorker-legacy.babf63cf.js","./plugin-vue_export-helper-legacy.7bb61c33.js","./useAnimate-legacy.13c846f4.js"],(function(t,i){"use strict";var n,o,s,r,a,l,d,c,h,u,g,p,m,f,_,v,b,w,C,y,x,S,k,D,L,N,E,I,T,M,A,O,R,P,F,B,V,W,z,H,j,U,$,K,q,G,Z,Y,X,Q,J,ee,te,ie,ne,oe,se,re,ae,le,de,ce,he,ue,ge,pe,me,fe,_e,ve,be,we,Ce,ye,xe,Se,ke,De,Le,Ne,Ee,Ie,Te,Me,Ae,Oe,Re,Pe,Fe,Be,Ve,We,ze,He,je,Ue,$e,Ke,qe,Ge,Ze,Ye,Xe,Qe,Je,et,tt,it,nt,ot,st,rt,at,lt,dt,ct,ht,ut,gt,pt,mt,ft,_t,vt,bt,wt,Ct,yt,xt,St,kt,Dt,Lt,Nt,Et,It,Tt,Mt,At,Ot,Rt,Pt,Ft,Bt,Vt,Wt,zt,Ht,jt,Ut,$t,Kt,qt,Gt,Zt,Yt,Xt,Qt,Jt,ei,ti,ii,ni,oi,si,ri,ai,li,di,ci,hi,ui,gi,pi,mi,fi,_i,vi,bi,wi,Ci,yi,xi,Si,ki,Di,Li,Ni,Ei,Ii,Ti,Mi,Ai,Oi,Ri,Pi,Fi,Bi,Vi,Wi,zi,Hi,ji,Ui,$i,Ki,qi,Gi,Zi,Yi,Xi,Qi,Ji,en,tn,nn,on,sn,rn,an,ln,dn,cn,hn,un,gn,pn,mn,fn,_n,vn,bn,wn,Cn,yn,xn,Sn,kn,Dn,Ln,Nn,En,In,Tn,Mn,An,On,Rn,Pn,Fn,Bn,Vn,Wn,zn,Hn,jn,Un,$n,Kn,qn,Gn,Zn,Yn,Xn,Qn,Jn,eo,to,io,no,oo,so,ro,ao,lo,co,ho,uo,go,po,mo,fo,_o,vo,bo,wo,Co,yo,xo,So,ko,Do,Lo,No,Eo,Io,To,Mo,Ao,Oo,Ro,Po,Fo,Bo,Vo,Wo,zo,Ho,jo,Uo,$o,Ko,qo,Go,Zo,Yo,Xo,Qo,Jo,es,ts,is,ns,os,ss,rs,as,ls,ds,cs,hs,us,gs,ps,ms,fs,_s,vs,bs,ws,Cs,ys,xs,Ss,ks,Ds,Ls,Ns,Es,Is,Ts,Ms,As,Os,Rs,Ps,Fs,Bs,Vs,Ws,zs,Hs,js,Us,$s,Ks,qs,Gs,Zs,Ys,Xs,Qs,Js,er,tr,ir,nr,or,sr,rr,ar,lr,dr,cr,hr,ur,gr,pr,mr,fr,_r,vr,br,wr,Cr,yr,xr,Sr,kr,Dr,Lr,Nr,Er,Ir,Tr,Mr,Ar,Or,Rr,Pr,Fr,Br,Vr,Wr,zr,Hr,jr,Ur,$r,Kr,qr,Gr,Zr,Yr,Xr,Qr,Jr,ea,ta,ia,na,oa,sa,ra,aa,la,da,ca,ha,ua,ga,pa,ma,fa,_a,va,ba,wa,Ca,ya,xa,Sa,ka,Da,La,Na,Ea,Ia,Ta,Ma,Aa,Oa,Ra,Pa,Fa,Ba,Va,Wa,za,Ha,ja,Ua,$a,Ka,qa,Ga,Za,Ya,Xa,Qa,Ja,el,tl,il,nl,ol,sl,rl,al,ll,dl,cl,hl,ul,gl,pl,ml,fl,_l,vl,bl,wl,Cl,yl,xl,Sl,kl,Dl,Ll,Nl,El,Il,Tl,Ml,Al,Ol,Rl,Pl,Fl,Bl,Vl,Wl,zl,Hl,jl,Ul,$l,Kl,ql,Gl,Zl,Yl,Xl,Ql,Jl,ed,td,id,nd,od,sd,rd,ad,ld;return{setters:[function(e){n=e.b,o=e.u,s=e.a,r=e._,a=e.w,l=e.ae,d=e.af,c=e.ag,h=e.ah,u=e.ai,g=e.aj,p=e.ak,m=e.c,f=e.al,_=e.N,v=e.k,b=e.am,w=e.E,C=e.Y,y=e.r,x=e.an,S=e.ao,k=e.ap,D=e.J,L=e.aq,N=e.C,E=e.i,I=e.ar,T=e.x,M=e.as,A=e.at,O=e.M,R=e.D,P=e.au,F=e.av,B=e.aw,V=e.ax,W=e.ay,z=e.az,H=e.aA,j=e.aB,U=e.d,$=e.H,K=e.aC,q=e.F,G=e.aD,Z=e.aE,Y=e.Z,X=e.aF,Q=e.aG,J=e.aH,ee=e.aI,te=e.aJ,ie=e.j,ne=e.q,oe=e.s,se=e.t,re=e.S,ae=e.aK,le=e.aL,de=e.z,ce=e.B,he=e.A,ue=e.U,ge=e.h,pe=e.aM,me=e.aN,fe=e.aO,_e=e.aP,ve=e.aQ,be=e.aR,we=e.aS,Ce=e.aT,ye=e.G,xe=e.aU,Se=e.aV,ke=e.aW,De=e.a3,Le=e.ac,Ne=e.aX,Ee=e.W,Ie=e.aY,Te=e.$,Me=e.a0,Ae=e.a8,Oe=e.a7,Re=e.a1,Pe=e.L,Fe=e.aZ,Be=e.K,Ve=e.a6,We=e.ad,ze=e.a_,He=e.a4,je=e.a5,Ue=e.a2,$e=e.ab,Ke=e.a$,qe=e.aa},function(e){Ge=e.n,Ze=e.O,Ye=e.P,Xe=e.G,Qe=e.b,Je=e.I,et=e.a,tt=e.c,it=e.Q,nt=e.L,ot=e.R,st=e.T,rt=e.E,at=e.H,lt=e.d,dt=e.V,ct=e.W,ht=e.X,ut=e.Y,gt=e.Z,pt=e._,mt=e.$,ft=e.a0,_t=e.a1,vt=e.a2,bt=e.a3,wt=e.a4,Ct=e.a5,yt=e.a6,xt=e.a7,St=e.a8,e.a9,kt=e.h,Dt=e.aa,Lt=e.N,Nt=e.ab,Et=e.ac,It=e.ad,Tt=e.ae,Mt=e.af,At=e.f,Ot=e.ag,Rt=e.ah,Pt=e.ai,Ft=e.aj,Bt=e.ak,Vt=e.al,Wt=e.am,zt=e.an,Ht=e.g,jt=e.e,Ut=e.ao},function(e){$t=e.aV,Kt=e.aW,qt=e.aX,Gt=e.aY,Zt=e.W,Yt=e.aw,Xt=e.aZ,Qt=e.a_,Jt=e.a$,ei=e.V,ti=e.b0,ii=e.X,ni=e.ax,oi=e.b1,si=e.E,ri=e.av,ai=e.r,li=e.b2,di=e.b3,ci=e.s,hi=e.b4,ui=e.aN,gi=e.L,pi=e.t,mi=e.aO,fi=e.u,_i=e.ay,vi=e.b5,bi=e.n,wi=e.P,Ci=e.h,yi=e.m,xi=e.b6,Si=e.b7,ki=e.aD,Di=e.H,Li=e.aU,Ni=e.b8,Ei=e.b9,Ii=e.C,Ti=e.aI,Mi=e.ba,Ai=e.bb,Oi=e.aH,Ri=e.bc,Pi=e.c,Fi=e.j,Bi=e.v,Vi=e.e,Wi=e.f,zi=e.bd,Hi=e.be,ji=e.bf,Ui=e.aL,$i=e.bg,Ki=e.M,qi=e.y,Gi=e.bh,Zi=e.d,Yi=e.bi,Xi=e.bj,Qi=e.bk,Ji=e.bl,en=e.q,tn=e.bm,nn=e.aM,on=e.G,sn=e.bn,rn=e.bo,an=e.i,ln=e.bp,dn=e.bq,cn=e.R,hn=e.br,un=e.D,gn=e.K,pn=e.ad,mn=e.aF,fn=e.F,_n=e.ak,vn=e.aa,bn=e.bs,wn=e.o,Cn=e.bt,yn=e.bu,xn=e.bv,Sn=e.aE,kn=e.aG,Dn=e.b,Ln=e.bw,Nn=e.p,En=e.bx,In=e.by,Tn=e.bz,Mn=e.N,An=e.g,On=e.x,Rn=e.al,Pn=e.l,Fn=e.bA,Bn=e.bB,Vn=e.bC,Wn=e.bD,zn=e.bE,Hn=e.bF,jn=e.bG,Un=e.aK,$n=e.bH,Kn=e.aq,qn=e.bI,Gn=e.ar,Zn=e.bJ,Yn=e.bK,Xn=e.aA,Qn=e.w,Jn=e.a,eo=e.bL,to=e.bM,io=e.bN,no=e.k,oo=e.bO,so=e.z,ro=e.bP,ao=e.bQ,lo=e.T,co=e.bR,ho=e.bS,uo=e.S,go=e.bT,po=e.bU,mo=e.bV,fo=e.bW,_o=e.bX,vo=e.bY,bo=e.bZ,wo=e.b_,Co=e.b$,yo=e.c0,xo=e.aJ,So=e.c1,ko=e.aQ,Do=e.A,Lo=e.O,No=e.B,Eo=e.I,Io=e.Q,To=e.c2,Mo=e.aC,Ao=e.aB,Oo=e.c3,Ro=e.az,Po=e.au,Fo=e.aT,Bo=e.aS},function(e){Vo=e.i,Wo=e.U,zo=e.a,Ho=e.e,jo=e.b,Uo=e.D,$o=e.E,Ko=e.m,qo=e.R,Go=e.c,Zo=e.d,Yo=e.f,Xo=e.g,Qo=e.h,Jo=e.o,es=e.t,ts=e.j,is=e.k,ns=e.l,os=e.n,ss=e.T,rs=e.p,as=e.C,ls=e.q,ds=e.r,cs=e.s,hs=e.u,us=e.v,gs=e.w,ps=e.S,ms=e.x,fs=e.y,_s=e.z,vs=e.A,bs=e.B,ws=e.F,Cs=e.G,ys=e.H,xs=e.I,Ss=e.J,ks=e.K,Ds=e.L,Ls=e.M,Ns=e.N,Es=e.O,Is=e.P,Ts=e.Q,Ms=e.V,As=e.W,Os=e.X,Rs=e.Y,Ps=e.Z,Fs=e._,Bs=e.$,Vs=e.a0,Ws=e.a1,zs=e.a2,Hs=e.a3,js=e.a4,Us=e.a5,$s=e.a6,Ks=e.a7,qs=e.a8,Gs=e.a9,Zs=e.aa,Ys=e.ab,Xs=e.ac,Qs=e.ad,Js=e.ae,er=e.af,tr=e.ag,ir=e.ah,nr=e.ai,or=e.aj,sr=e.ak,rr=e.al,ar=e.am,lr=e.an,dr=e.ao,cr=e.ap,hr=e.aq,ur=e.ar,gr=e.as,pr=e.at,mr=e.au,fr=e.av,_r=e.aw,vr=e.ax,br=e.ay,wr=e.az,Cr=e.aA,yr=e.aB,xr=e.aC,Sr=e.aD,kr=e.aE,Dr=e.aF,Lr=e.aG,Nr=e.aH,Er=e.aI,Ir=e.aJ,Tr=e.aK,Mr=e.aL,Ar=e.aM,Or=e.aN,Rr=e.aO,Pr=e.aP,Fr=e.aQ,Br=e.aR,Vr=e.aS,Wr=e.aT,zr=e.aU,Hr=e.aV,jr=e.aW,Ur=e.aX,$r=e.aY,Kr=e.aZ,qr=e.a_,Gr=e.a$,Zr=e.b0,Yr=e.b1,Xr=e.b2,Qr=e.b3,Jr=e.b4,ea=e.b5,ta=e.b6,ia=e.b7,na=e.b8,oa=e.b9,sa=e.ba,ra=e.bb,aa=e.bc,la=e.bd,da=e.be,ca=e.bf,ha=e.bg,ua=e.bh,ga=e.bi,pa=e.bj,ma=e.bk,fa=e.bl,_a=e.bm,va=e.bn,ba=e.bo,wa=e.bp,Ca=e.bq,ya=e.br,xa=e.bs,Sa=e.bt,ka=e.bu,Da=e.bv,La=e.bw,Na=e.bx,Ea=e.by,Ia=e.bz,Ta=e.bA,Ma=e.bB,Aa=e.bC,Oa=e.bD,Ra=e.bE,Pa=e.bF,Fa=e.bG,Ba=e.bH,Va=e.bI,Wa=e.bJ,za=e.bK,Ha=e.bL,ja=e.bM,Ua=e.bN,$a=e.bO,Ka=e.bP,qa=e.bQ,Ga=e.bR,Za=e.bS,Ya=e.bT,Xa=e.bU,Qa=e.bV,Ja=e.bW,el=e.bX,tl=e.bY,il=e.bZ,nl=e.b_,ol=e.b$,sl=e.c0,rl=e.c1,al=e.c2,ll=e.c3,dl=e.c4,cl=e.c5,hl=e.c6,ul=e.c7,gl=e.c8,pl=e.c9,ml=e.ca,fl=e.cb,_l=e.cc,vl=e.cd,bl=e.ce,wl=e.cf,Cl=e.cg,yl=e.ch,xl=e.ci,Sl=e.cj,kl=e.ck,Dl=e.cl,Ll=e.cm,Nl=e.cn,El=e.co,Il=e.cp,Tl=e.cq,Ml=e.cr,Al=e.cs,Ol=e.ct,Rl=e.cu,Pl=e.cv,Fl=e.cw,Bl=e.cx,Vl=e.cy,Wl=e.cz,zl=e.cA,Hl=e.cB,jl=e.cC,Ul=e.cD,$l=e.cE,Kl=e.cF,ql=e.cG,Gl=e.cH,Zl=e.cI,Yl=e.cJ,Xl=e.cK,Ql=e.cL,Jl=e.cM,ed=e.cN,td=e.cO,id=e.cP,nd=e.cQ,od=e.cR,sd=e.cS,rd=e.cT},function(e){ad=e._},function(e){ld=e.u}],execute:function(){var dd=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",compile:()=>{},EffectScope:$t,ReactiveEffect:Kt,customRef:qt,effect:Gt,effectScope:Zt,getCurrentScope:Yt,isProxy:Xt,isReactive:Qt,isReadonly:Jt,isRef:ei,isShallow:ti,markRaw:ii,onScopeDispose:ni,proxyRefs:oi,reactive:si,readonly:ri,ref:ai,shallowReactive:li,shallowReadonly:di,shallowRef:ci,stop:hi,toRaw:ui,toRef:gi,toRefs:pi,triggerRef:mi,unref:fi,camelize:_i,capitalize:vi,normalizeClass:bi,normalizeProps:wi,normalizeStyle:Ci,toDisplayString:yi,toHandlerKey:xi,BaseTransition:Si,Comment:ki,Fragment:Di,KeepAlive:Li,Static:Ni,Suspense:Ei,Teleport:Ii,Text:Ti,callWithAsyncErrorHandling:Mi,callWithErrorHandling:Ai,cloneVNode:Oi,compatUtils:Ri,computed:Pi,createBlock:Fi,createCommentVNode:Bi,createElementBlock:Vi,createElementVNode:Wi,createHydrationRenderer:zi,createPropsRestProxy:Hi,createRenderer:ji,createSlots:Ui,createStaticVNode:$i,createTextVNode:Ki,createVNode:qi,defineAsyncComponent:Gi,defineComponent:Zi,defineEmits:Yi,defineExpose:Xi,defineProps:Qi,get devtools(){return Ji},getCurrentInstance:en,getTransitionRawChildren:tn,guardReactiveProps:nn,h:on,handleError:sn,initCustomFormatter:rn,inject:an,isMemoSame:ln,isRuntimeOnly:dn,isVNode:cn,mergeDefaults:hn,mergeProps:un,nextTick:gn,onActivated:pn,onBeforeMount:mn,onBeforeUnmount:fn,onBeforeUpdate:_n,onDeactivated:vn,onErrorCaptured:bn,onMounted:wn,onRenderTracked:Cn,onRenderTriggered:yn,onServerPrefetch:xn,onUnmounted:Sn,onUpdated:kn,openBlock:Dn,popScopeId:Ln,provide:Nn,pushScopeId:En,queuePostFlushCb:In,registerRuntimeCompiler:Tn,renderList:Mn,renderSlot:An,resolveComponent:On,resolveDirective:Rn,resolveDynamicComponent:Pn,resolveFilter:Fn,resolveTransitionHooks:Bn,setBlockTracking:Vn,setDevtoolsHook:Wn,setTransitionHooks:zn,ssrContextKey:Hn,ssrUtils:jn,toHandlers:Un,transformVNodeArgs:$n,useAttrs:Kn,useSSRContext:qn,useSlots:Gn,useTransitionState:Zn,version:Yn,warn:Xn,watch:Qn,watchEffect:Jn,watchPostEffect:eo,watchSyncEffect:to,withAsyncContext:io,withCtx:no,withDefaults:oo,withDirectives:so,withMemo:ro,withScopeId:ao,Transition:lo,TransitionGroup:co,VueElement:ho,createApp:uo,createSSRApp:go,defineCustomElement:po,defineSSRCustomElement:mo,hydrate:fo,initDirectivesForSSR:_o,render:vo,useCssModule:bo,useCssVars:wo,vModelCheckbox:Co,vModelDynamic:yo,vModelRadio:xo,vModelSelect:So,vModelText:ko,vShow:Do,withKeys:Lo,withModifiers:No});function cd(e){return Ge(e,5)}const hd=e=>[...new Set(e)],ud=e=>e||0===e?Array.isArray(e)?e:[e]:[],gd=Symbol("collapseContextKey"),pd=Symbol("tabsRootContextKey"),md=Symbol("uploadContextKey"),fd=n({value:{type:[String,Number],default:""},max:{type:Number,default:99},isDot:Boolean,hidden:Boolean,type:{type:String,values:["primary","success","warning","info","danger"],default:"danger"}}),_d=["textContent"];const vd=a(r(Zi({name:"ElBadge",props:fd,setup(e,{expose:t}){const i=e,n=o("badge"),r=Pi((()=>i.isDot?"":s(i.value)&&s(i.max)&&i.max(Dn(),Vi("div",{class:bi(fi(n).b())},[An(e.$slots,"default"),qi(lo,{name:`${fi(n).namespace.value}-zoom-in-center`,persisted:""},{default:no((()=>[so(Wi("sup",{class:bi([fi(n).e("content"),fi(n).em("content",e.type),fi(n).is("fixed",!!e.$slots.default),fi(n).is("dot",e.isDot)]),textContent:yi(fi(r))},null,10,_d),[[Do,!e.hidden&&(fi(r)||e.isDot)]])])),_:1},8,["name"])],2))}}),[["__file","/home/runner/work/element-plus/element-plus/packages/components/badge/src/badge.vue"]]));var bd,wd,Cd,yd,xd,Sd,kd,Dd,Ld,Nd,Ed,Id,Td,Md,Ad,Od={beforeMount(e,t){let i,n=null;const o=()=>t.value&&t.value(),s=()=>{Date.now()-i<100&&o(),clearInterval(n),n=null};l(e,"mousedown",(e=>{0===e.button&&(i=Date.now(),d(document,"mouseup",s),clearInterval(n),n=setInterval(o,100))}))}},Rd=!1;function Pd(){if(!Rd){Rd=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),i=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(Id=/\b(iPhone|iP[ao]d)/.exec(e),Td=/\b(iP[ao]d)/.exec(e),Nd=/Android/i.exec(e),Md=/FBAN\/\w+;/i.exec(e),Ad=/Mobile/i.exec(e),Ed=!!/Win64/.exec(e),t){(bd=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN)&&document&&document.documentMode&&(bd=document.documentMode);var n=/(?:Trident\/(\d+.\d+))/.exec(e);Sd=n?parseFloat(n[1])+4:bd,wd=t[2]?parseFloat(t[2]):NaN,Cd=t[3]?parseFloat(t[3]):NaN,(yd=t[4]?parseFloat(t[4]):NaN)?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),xd=t&&t[1]?parseFloat(t[1]):NaN):xd=NaN}else bd=wd=Cd=xd=yd=NaN;if(i){if(i[1]){var o=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);kd=!o||parseFloat(o[1].replace("_","."))}else kd=!1;Dd=!!i[2],Ld=!!i[3]}else kd=Dd=Ld=!1}}var Fd,Bd={ie:function(){return Pd()||bd},ieCompatibilityMode:function(){return Pd()||Sd>bd},ie64:function(){return Bd.ie()&&Ed},firefox:function(){return Pd()||wd},opera:function(){return Pd()||Cd},webkit:function(){return Pd()||yd},safari:function(){return Bd.webkit()},chrome:function(){return Pd()||xd},windows:function(){return Pd()||Dd},osx:function(){return Pd()||kd},linux:function(){return Pd()||Ld},iphone:function(){return Pd()||Id},mobile:function(){return Pd()||Id||Td||Nd||Ad},nativeApp:function(){return Pd()||Md},android:function(){return Pd()||Nd},ipad:function(){return Pd()||Td}},Vd=Bd,Wd=!!(typeof window<"u"&&window.document&&window.document.createElement),zd={canUseDOM:Wd,canUseWorkers:typeof Worker<"u",canUseEventListeners:Wd&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:Wd&&!!window.screen,isInWorker:!Wd};zd.canUseDOM&&(Fd=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("",""));var Hd=function(e,t){if(!zd.canUseDOM||t&&!("addEventListener"in document))return!1;var i="on"+e,n=i in document;if(!n){var o=document.createElement("div");o.setAttribute(i,"return;"),n="function"==typeof o[i]}return!n&&Fd&&"wheel"===e&&(n=document.implementation.hasFeature("Events.wheel","3.0")),n};function jd(e){var t=0,i=0,n=0,o=0;return"detail"in e&&(i=e.detail),"wheelDelta"in e&&(i=-e.wheelDelta/120),"wheelDeltaY"in e&&(i=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=i,i=0),n=10*t,o=10*i,"deltaY"in e&&(o=e.deltaY),"deltaX"in e&&(n=e.deltaX),(n||o)&&e.deltaMode&&(1==e.deltaMode?(n*=40,o*=40):(n*=800,o*=800)),n&&!t&&(t=n<1?-1:1),o&&!i&&(i=o<1?-1:1),{spinX:t,spinY:i,pixelX:n,pixelY:o}}jd.getEventType=function(){return Vd.firefox()?"DOMMouseScroll":Hd("wheel")?"wheel":"mousewheel"};var Ud=jd; /** * Checks if an event is supported in the current execution environment. * * NOTE: This will not work correctly for non-generic events such as `change`, * `reset`, `load`, `error`, and `select`. * * Borrows from Modernizr. * * @param {string} eventNameSuffix Event name, e.g. "click". * @param {?boolean} capture Check if the capture phase is supported. * @return {boolean} True if the event is supported. * @internal * @license Modernizr 3.0.0pre (Custom Build) | MIT */const $d={beforeMount(e,t){!function(e,t){if(e&&e.addEventListener){const i=function(e){const i=Ud(e);t&&Reflect.apply(t,this,[e,i])};e.addEventListener("wheel",i,{passive:!0})}}(e,t.value)}},Kd={modelValue:{type:Array,default:()=>[]},disabled:Boolean,min:{type:Number,default:void 0},max:{type:Number,default:void 0},size:c,id:{type:String,default:void 0},label:{type:String,default:void 0},fill:{type:String,default:void 0},textColor:{type:String,default:void 0},tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0}},qd={modelValue:{type:[Number,String,Boolean],default:()=>{}},label:{type:[String,Boolean,Number,Object]},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:{type:String,default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},controls:{type:String,default:void 0},border:Boolean,size:c,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0}},Gd=()=>{const e=an(h,{}),t=an(u,{}),i=an("CheckboxGroup",{}),n=Pi((()=>i&&"ElCheckboxGroup"===(null==i?void 0:i.name))),o=Pi((()=>t.size));return{isGroup:n,checkboxGroup:i,elForm:e,elFormItemSize:o,elFormItem:t}},Zd=(e,{model:t,isLimitExceeded:i,hasOwnLabel:n,isDisabled:o,isLabeledByFormItem:s})=>{const{elFormItem:r,checkboxGroup:a}=Gd(),{emit:l}=en();function d(t){var i,n;return t===e.trueLabel||!0===t?null==(i=e.trueLabel)||i:null!=(n=e.falseLabel)&&n}const c=Pi((()=>{var t;return(null==(t=a.validateEvent)?void 0:t.value)||e.validateEvent}));return Qn((()=>e.modelValue),(()=>{var e;c.value&&(null==(e=null==r?void 0:r.validate)||e.call(r,"change").catch((e=>_())))})),{handleChange:function(e){if(i.value)return;const t=e.target;l("change",d(t.checked),e)},onClickRoot:async function(r){i.value||n.value||o.value||!s.value||(t.value=d([!1,e.falseLabel].includes(t.value)),await gn(),function(e,t){l("change",d(e),t)}(t.value,r))}}},Yd={[p]:e=>Eo(e)||s(e)||m(e),change:e=>Eo(e)||s(e)||m(e)},Xd={[p]:e=>Io(e),change:e=>Io(e)},Qd=(e,t)=>{const{model:i,isGroup:n,isLimitExceeded:o,elFormItem:s}=(e=>{const t=ai(!1),{emit:i}=en(),{isGroup:n,checkboxGroup:o,elFormItem:s}=Gd(),r=ai(!1),a=Pi({get(){var i,s;return n.value?null==(i=o.modelValue)?void 0:i.value:null!=(s=e.modelValue)?s:t.value},set(e){var s;n.value&&Array.isArray(e)?(r.value=void 0!==o.max&&e.length>o.max.value,!1===r.value&&(null==(s=null==o?void 0:o.changeEvent)||s.call(o,e))):(i(p,e),t.value=e)}});return{model:a,isGroup:n,isLimitExceeded:r,elFormItem:s}})(e),{focus:r,size:a,isChecked:l,checkboxSize:d,hasOwnLabel:c}=((e,t,{model:i})=>{const{isGroup:n,checkboxGroup:o}=Gd(),s=ai(!1),r=f(null==o?void 0:o.checkboxGroupSize,{prop:!0}),a=Pi((()=>{const t=i.value;return"[object Boolean]"===To(t)?t:Array.isArray(t)?t.includes(e.label):null!=t?t===e.trueLabel:!!t})),l=f(Pi((()=>{var e;return n.value?null==(e=null==o?void 0:o.checkboxGroupSize)?void 0:e.value:void 0})));return{isChecked:a,focus:s,size:r,checkboxSize:l,hasOwnLabel:Pi((()=>!(!t.default&&!e.label)))}})(e,t,{model:i}),{isDisabled:h}=((e,{model:t,isChecked:i})=>{const{elForm:n,isGroup:o,checkboxGroup:s}=Gd(),r=Pi((()=>{var e,n;const o=null==(e=s.max)?void 0:e.value,r=null==(n=s.min)?void 0:n.value;return!(!o&&!r)&&t.value.length>=o&&!i.value||t.value.length<=r&&i.value})),a=Pi((()=>{var t,i;const a=e.disabled||(null==n?void 0:n.disabled);return null!=(i=o.value?(null==(t=s.disabled)?void 0:t.value)||a||r.value:a)&&i}));return{isDisabled:a,isLimitDisabled:r}})(e,{model:i,isChecked:l}),{inputId:u,isLabeledByFormItem:m}=g(e,{formItemContext:s,disableIdGeneration:c,disableIdManagement:n}),{handleChange:_,onClickRoot:v}=Zd(e,{model:i,isLimitExceeded:o,hasOwnLabel:c,isDisabled:h,isLabeledByFormItem:m});return((e,{model:t})=>{e.checked&&(Array.isArray(t.value)&&!t.value.includes(e.label)?t.value.push(e.label):t.value=e.trueLabel||!0)})(e,{model:i}),{elFormItem:s,inputId:u,isLabeledByFormItem:m,isChecked:l,isDisabled:h,isGroup:n,checkboxSize:d,hasOwnLabel:c,model:i,handleChange:_,onClickRoot:v,focus:r,size:a}},Jd=["tabindex","role","aria-checked"],ec=["id","aria-hidden","name","tabindex","disabled","true-value","false-value"],tc=["id","aria-hidden","disabled","value","name","tabindex"];var ic=r(Zi({name:"ElCheckbox",props:qd,emits:Yd,setup(e){const t=e,i=Gn(),{inputId:n,isLabeledByFormItem:s,isChecked:r,isDisabled:a,checkboxSize:l,hasOwnLabel:d,model:c,handleChange:h,onClickRoot:u,focus:g}=Qd(t,i),p=o("checkbox");return(e,t)=>(Dn(),Fi(Pn(!fi(d)&&fi(s)?"span":"label"),{class:bi([fi(p).b(),fi(p).m(fi(l)),fi(p).is("disabled",fi(a)),fi(p).is("bordered",e.border),fi(p).is("checked",fi(r))]),"aria-controls":e.indeterminate?e.controls:null,onClick:fi(u)},{default:no((()=>[Wi("span",{class:bi([fi(p).e("input"),fi(p).is("disabled",fi(a)),fi(p).is("checked",fi(r)),fi(p).is("indeterminate",e.indeterminate),fi(p).is("focus",fi(g))]),tabindex:e.indeterminate?0:void 0,role:e.indeterminate?"checkbox":void 0,"aria-checked":e.indeterminate?"mixed":void 0},[e.trueLabel||e.falseLabel?so((Dn(),Vi("input",{key:0,id:fi(n),"onUpdate:modelValue":t[0]||(t[0]=e=>ei(c)?c.value=e:null),class:bi(fi(p).e("original")),type:"checkbox","aria-hidden":e.indeterminate?"true":"false",name:e.name,tabindex:e.tabindex,disabled:fi(a),"true-value":e.trueLabel,"false-value":e.falseLabel,onChange:t[1]||(t[1]=(...e)=>fi(h)&&fi(h)(...e)),onFocus:t[2]||(t[2]=e=>g.value=!0),onBlur:t[3]||(t[3]=e=>g.value=!1)},null,42,ec)),[[Co,fi(c)]]):so((Dn(),Vi("input",{key:1,id:fi(n),"onUpdate:modelValue":t[4]||(t[4]=e=>ei(c)?c.value=e:null),class:bi(fi(p).e("original")),type:"checkbox","aria-hidden":e.indeterminate?"true":"false",disabled:fi(a),value:e.label,name:e.name,tabindex:e.tabindex,onChange:t[5]||(t[5]=(...e)=>fi(h)&&fi(h)(...e)),onFocus:t[6]||(t[6]=e=>g.value=!0),onBlur:t[7]||(t[7]=e=>g.value=!1)},null,42,tc)),[[Co,fi(c)]]),Wi("span",{class:bi(fi(p).e("inner"))},null,2)],10,Jd),fi(d)?(Dn(),Vi("span",{key:0,class:bi(fi(p).e("label"))},[An(e.$slots,"default"),e.$slots.default?Bi("v-if",!0):(Dn(),Vi(Di,{key:0},[Ki(yi(e.label),1)],64))],2)):Bi("v-if",!0)])),_:3},8,["class","aria-controls","onClick"]))}}),[["__file","/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox.vue"]]);const nc=["name","tabindex","disabled","true-value","false-value"],oc=["name","tabindex","disabled","value"],sc=Zi({name:"ElCheckboxButton",props:qd,emits:Yd,setup(e){const t=e,i=Gn(),{focus:n,isChecked:s,isDisabled:r,size:a,model:l,handleChange:d}=Qd(t,i),{checkboxGroup:c}=Gd(),h=o("checkbox"),u=Pi((()=>{var e,t,i,n;const o=null!=(t=null==(e=null==c?void 0:c.fill)?void 0:e.value)?t:"";return{backgroundColor:o,borderColor:o,color:null!=(n=null==(i=null==c?void 0:c.textColor)?void 0:i.value)?n:"",boxShadow:o?`-1px 0 0 0 ${o}`:void 0}}));return(e,t)=>(Dn(),Vi("label",{class:bi([fi(h).b("button"),fi(h).bm("button",fi(a)),fi(h).is("disabled",fi(r)),fi(h).is("checked",fi(s)),fi(h).is("focus",fi(n))])},[e.trueLabel||e.falseLabel?so((Dn(),Vi("input",{key:0,"onUpdate:modelValue":t[0]||(t[0]=e=>ei(l)?l.value=e:null),class:bi(fi(h).be("button","original")),type:"checkbox",name:e.name,tabindex:e.tabindex,disabled:fi(r),"true-value":e.trueLabel,"false-value":e.falseLabel,onChange:t[1]||(t[1]=(...e)=>fi(d)&&fi(d)(...e)),onFocus:t[2]||(t[2]=e=>n.value=!0),onBlur:t[3]||(t[3]=e=>n.value=!1)},null,42,nc)),[[Co,fi(l)]]):so((Dn(),Vi("input",{key:1,"onUpdate:modelValue":t[4]||(t[4]=e=>ei(l)?l.value=e:null),class:bi(fi(h).be("button","original")),type:"checkbox",name:e.name,tabindex:e.tabindex,disabled:fi(r),value:e.label,onChange:t[5]||(t[5]=(...e)=>fi(d)&&fi(d)(...e)),onFocus:t[6]||(t[6]=e=>n.value=!0),onBlur:t[7]||(t[7]=e=>n.value=!1)},null,42,oc)),[[Co,fi(l)]]),e.$slots.default||e.label?(Dn(),Vi("span",{key:2,class:bi(fi(h).be("button","inner")),style:Ci(fi(s)?fi(u):void 0)},[An(e.$slots,"default",{},(()=>[Ki(yi(e.label),1)]))],6)):Bi("v-if",!0)],2))}});var rc=r(sc,[["__file","/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox-button.vue"]]);const ac=Zi({name:"ElCheckboxGroup",props:Kd,emits:Xd,setup(e,{emit:t}){const i=e,{elFormItem:n}=Gd(),{groupId:s,isLabeledByFormItem:r}=((e,{elFormItem:t})=>{const{inputId:i,isLabeledByFormItem:n}=g(e,{formItemContext:t});return{isLabeledByFormItem:n,groupId:i}})(i,{elFormItem:n}),a=f(),l=o("checkbox"),d=e=>{t(p,e),gn((()=>{t("change",e)}))},c=Pi({get:()=>i.modelValue,set(e){d(e)}});return Nn("CheckboxGroup",{name:"ElCheckboxGroup",modelValue:c,...pi(i),checkboxGroupSize:a,changeEvent:d}),Qn((()=>i.modelValue),(()=>{var e;i.validateEvent&&(null==(e=n.validate)||e.call(n,"change").catch((e=>_())))})),(e,t)=>(Dn(),Fi(Pn(e.tag),{id:fi(s),class:bi(fi(l).b("group")),role:"group","aria-label":fi(r)?void 0:e.label||"checkbox-group","aria-labelledby":fi(r)?fi(n).labelId:void 0},{default:no((()=>[An(e.$slots,"default")])),_:3},8,["id","class","aria-label","aria-labelledby"]))}});var lc=r(ac,[["__file","/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox-group.vue"]]);const dc=a(ic,{CheckboxButton:rc,CheckboxGroup:lc});v(rc);const cc=v(lc);var hc=Zi({name:"NodeContent",setup:()=>({ns:o("cascader-node")}),render(){const{ns:e}=this,{node:t,panel:i}=this.$parent,{data:n,label:o}=t,{renderLabelFn:s}=i;return on("span",{class:e.e("label")},s?s({node:t,data:n}):o)}}),uc=(e=>(e.CLICK="click",e.HOVER="hover",e))(uc||{});const gc=Symbol(),pc=Zi({name:"ElCascaderNode",components:{ElCheckbox:dc,ElRadio:b,NodeContent:hc,ElIcon:w,Check:Ye,Loading:Xe,ArrowRight:Qe},props:{node:{type:Object,required:!0},menuId:String},emits:["expand"],setup(e,{emit:t}){const i=an(gc),n=o("cascader-node"),s=Pi((()=>i.isHoverMenu)),r=Pi((()=>i.config.multiple)),a=Pi((()=>i.config.checkStrictly)),l=Pi((()=>{var e;return null==(e=i.checkedNodes[0])?void 0:e.uid})),d=Pi((()=>e.node.isDisabled)),c=Pi((()=>e.node.isLeaf)),h=Pi((()=>a.value&&!c.value||!d.value)),u=Pi((()=>p(i.expandingNode))),g=Pi((()=>a.value&&i.checkedNodes.some(p))),p=t=>{var i;const{level:n,uid:o}=e.node;return(null==(i=null==t?void 0:t.pathNodes[n-1])?void 0:i.uid)===o},m=()=>{u.value||i.expandNode(e.node)},f=t=>{const{node:n}=e;t!==n.checked&&i.handleCheckChange(n,t)},_=()=>{i.lazyLoad(e.node,(()=>{c.value||m()}))},v=()=>{const{node:t}=e;h.value&&!t.loading&&(t.loaded?m():_())},b=t=>{e.node.loaded?(f(t),!a.value&&m()):_()};return{panel:i,isHoverMenu:s,multiple:r,checkStrictly:a,checkedNodeId:l,isDisabled:d,isLeaf:c,expandable:h,inExpandingPath:u,inCheckedPath:g,ns:n,handleHoverExpand:e=>{s.value&&(v(),!c.value&&t("expand",e))},handleExpand:v,handleClick:()=>{s.value&&!c.value||(!c.value||d.value||a.value||r.value?v():b(!0))},handleCheck:b,handleSelectCheck:t=>{a.value?(f(t),e.node.loaded&&m()):b(t)}}}}),mc=["id","aria-haspopup","aria-owns","aria-expanded","tabindex"],fc=Wi("span",null,null,-1);const _c=Zi({name:"ElCascaderMenu",components:{Loading:Xe,ElIcon:w,ElScrollbar:C,ElCascaderNode:r(pc,[["render",function(e,t,i,n,o,s){const r=On("el-checkbox"),a=On("el-radio"),l=On("check"),d=On("el-icon"),c=On("node-content"),h=On("loading"),u=On("arrow-right");return Dn(),Vi("li",{id:`${e.menuId}-${e.node.uid}`,role:"menuitem","aria-haspopup":!e.isLeaf,"aria-owns":e.isLeaf?null:e.menuId,"aria-expanded":e.inExpandingPath,tabindex:e.expandable?-1:void 0,class:bi([e.ns.b(),e.ns.is("selectable",e.checkStrictly),e.ns.is("active",e.node.checked),e.ns.is("disabled",!e.expandable),e.inExpandingPath&&"in-active-path",e.inCheckedPath&&"in-checked-path"]),onMouseenter:t[2]||(t[2]=(...t)=>e.handleHoverExpand&&e.handleHoverExpand(...t)),onFocus:t[3]||(t[3]=(...t)=>e.handleHoverExpand&&e.handleHoverExpand(...t)),onClick:t[4]||(t[4]=(...t)=>e.handleClick&&e.handleClick(...t))},[Bi(" prefix "),e.multiple?(Dn(),Fi(r,{key:0,"model-value":e.node.checked,indeterminate:e.node.indeterminate,disabled:e.isDisabled,onClick:t[0]||(t[0]=No((()=>{}),["stop"])),"onUpdate:modelValue":e.handleSelectCheck},null,8,["model-value","indeterminate","disabled","onUpdate:modelValue"])):e.checkStrictly?(Dn(),Fi(a,{key:1,"model-value":e.checkedNodeId,label:e.node.uid,disabled:e.isDisabled,"onUpdate:modelValue":e.handleSelectCheck,onClick:t[1]||(t[1]=No((()=>{}),["stop"]))},{default:no((()=>[Bi("\n Add an empty element to avoid render label,\n do not use empty fragment here for https://github.com/vuejs/vue-next/pull/2485\n "),fc])),_:1},8,["model-value","label","disabled","onUpdate:modelValue"])):e.isLeaf&&e.node.checked?(Dn(),Fi(d,{key:2,class:bi(e.ns.e("prefix"))},{default:no((()=>[qi(l)])),_:1},8,["class"])):Bi("v-if",!0),Bi(" content "),qi(c),Bi(" postfix "),e.isLeaf?Bi("v-if",!0):(Dn(),Vi(Di,{key:3},[e.node.loading?(Dn(),Fi(d,{key:0,class:bi([e.ns.is("loading"),e.ns.e("postfix")])},{default:no((()=>[qi(h)])),_:1},8,["class"])):(Dn(),Fi(d,{key:1,class:bi(["arrow-right",e.ns.e("postfix")])},{default:no((()=>[qi(u)])),_:1},8,["class"]))],64))],42,mc)}],["__file","/home/runner/work/element-plus/element-plus/packages/components/cascader-panel/src/node.vue"]])},props:{nodes:{type:Array,required:!0},index:{type:Number,required:!0}},setup(e){const t=en(),i=o("cascader-menu"),{t:n}=y(),s=x();let r=null,a=null;const l=an(gc),d=ai(null),c=Pi((()=>!e.nodes.length)),h=Pi((()=>!l.initialLoaded)),u=Pi((()=>`cascader-menu-${s}-${e.index}`)),g=()=>{a&&(clearTimeout(a),a=null)},p=()=>{d.value&&(d.value.innerHTML="",g())};return{ns:i,panel:l,hoverZone:d,isEmpty:c,isLoading:h,menuId:u,t:n,handleExpand:e=>{r=e.target},handleMouseMove:e=>{if(l.isHoverMenu&&r&&d.value)if(r.contains(e.target)){g();const i=t.vnode.el,{left:n}=i.getBoundingClientRect(),{offsetWidth:o,offsetHeight:s}=i,a=e.clientX-n,l=r.offsetTop,c=l+r.offsetHeight;d.value.innerHTML=`\n \n \n `}else a||(a=window.setTimeout(p,l.config.hoverThreshold))},clearHoverZone:p}}});var vc=r(_c,[["render",function(e,t,i,n,o,s){const r=On("el-cascader-node"),a=On("loading"),l=On("el-icon"),d=On("el-scrollbar");return Dn(),Fi(d,{key:e.menuId,tag:"ul",role:"menu",class:bi(e.ns.b()),"wrap-class":e.ns.e("wrap"),"view-class":[e.ns.e("list"),e.ns.is("empty",e.isEmpty)],onMousemove:e.handleMouseMove,onMouseleave:e.clearHoverZone},{default:no((()=>{var t;return[(Dn(!0),Vi(Di,null,Mn(e.nodes,(t=>(Dn(),Fi(r,{key:t.uid,node:t,"menu-id":e.menuId,onExpand:e.handleExpand},null,8,["node","menu-id","onExpand"])))),128)),e.isLoading?(Dn(),Vi("div",{key:0,class:bi(e.ns.e("empty-text"))},[qi(l,{size:"14",class:bi(e.ns.is("loading"))},{default:no((()=>[qi(a)])),_:1},8,["class"]),Ki(" "+yi(e.t("el.cascader.loading")),1)],2)):e.isEmpty?(Dn(),Vi("div",{key:1,class:bi(e.ns.e("empty-text"))},yi(e.t("el.cascader.noData")),3)):(null==(t=e.panel)?void 0:t.isHoverMenu)?(Dn(),Vi("svg",{key:2,ref:"hoverZone",class:bi(e.ns.e("hover-zone"))},null,2)):Bi("v-if",!0)]})),_:1},8,["class","wrap-class","view-class","onMousemove","onMouseleave"])}],["__file","/home/runner/work/element-plus/element-plus/packages/components/cascader-panel/src/menu.vue"]]),bc=(e=>(e.CLICK="click",e.HOVER="hover",e))(bc||{});let wc=0;class Cc{constructor(e,t,i,n=!1){this.data=e,this.config=t,this.parent=i,this.root=n,this.uid=wc++,this.checked=!1,this.indeterminate=!1,this.loading=!1;const{value:o,label:s,children:r}=t,a=e[r],l=(e=>{const t=[e];let{parent:i}=e;for(;i;)t.unshift(i),i=i.parent;return t})(this);this.level=n?0:i?i.level+1:1,this.value=e[o],this.label=e[s],this.pathNodes=l,this.pathValues=l.map((e=>e.value)),this.pathLabels=l.map((e=>e.label)),this.childrenData=a,this.children=(a||[]).map((e=>new Cc(e,t,this))),this.loaded=!t.lazy||this.isLeaf||!S(a)}get isDisabled(){const{data:e,parent:t,config:i}=this,{disabled:n,checkStrictly:o}=i;return(Mo(n)?n(e,this):!!e[n])||!o&&(null==t?void 0:t.isDisabled)}get isLeaf(){const{data:e,config:t,childrenData:i,loaded:n}=this,{lazy:o,leaf:s}=t,r=Mo(s)?s(e,this):e[s];return k(r)?!(o&&!n)&&!(Array.isArray(i)&&i.length):!!r}get valueByOption(){return this.config.emitPath?this.pathValues:this.value}appendChild(e){const{childrenData:t,children:i}=this,n=new Cc(e,this.config,this);return Array.isArray(t)?t.push(e):this.childrenData=[e],i.push(n),n}calcText(e,t){const i=e?this.pathLabels.join(t):this.label;return this.text=i,i}broadcast(e,...t){const i=`onParent${vi(e)}`;this.children.forEach((n=>{n&&(n.broadcast(e,...t),n[i]&&n[i](...t))}))}emit(e,...t){const{parent:i}=this,n=`onChild${vi(e)}`;i&&(i[n]&&i[n](...t),i.emit(e,...t))}onParentCheck(e){this.isDisabled||this.setCheckState(e)}onChildCheck(){const{children:e}=this,t=e.filter((e=>!e.isDisabled)),i=!!t.length&&t.every((e=>e.checked));this.setCheckState(i)}setCheckState(e){const t=this.children.length,i=this.children.reduce(((e,t)=>e+(t.checked?1:t.indeterminate?.5:0)),0);this.checked=this.loaded&&this.children.filter((e=>!e.isDisabled)).every((e=>e.loaded&&e.checked))&&e,this.indeterminate=this.loaded&&i!==t&&i>0}doCheck(e){if(this.checked===e)return;const{checkStrictly:t,multiple:i}=this.config;t||!i?this.checked=e:(this.broadcast("check",e),this.setCheckState(e),this.emit("check"))}}const yc=(e,t)=>e.reduce(((e,i)=>(i.isLeaf?e.push(i):(!t&&e.push(i),e=e.concat(yc(i.children,t))),e)),[]);class xc{constructor(e,t){this.config=t;const i=(e||[]).map((e=>new Cc(e,this.config)));this.nodes=i,this.allNodes=yc(i,!1),this.leafNodes=yc(i,!0)}getNodes(){return this.nodes}getFlattedNodes(e){return e?this.leafNodes:this.allNodes}appendNode(e,t){const i=t?t.appendChild(e):new Cc(e,this.config);t||this.nodes.push(i),this.allNodes.push(i),i.isLeaf&&this.leafNodes.push(i)}appendNodes(e,t){e.forEach((e=>this.appendNode(e,t)))}getNodeByValue(e,t=!1){if(!e&&0!==e)return null;return this.getFlattedNodes(t).find((t=>D(t.value,e)||D(t.pathValues,e)))||null}getSameNode(e){if(!e)return null;return this.getFlattedNodes(!1).find((({value:t,level:i})=>D(e.value,t)&&e.level===i))||null}}const Sc={modelValue:[Number,String,Array],options:{type:Array,default:()=>[]},props:{type:Object,default:()=>({})}},kc={expandTrigger:bc.CLICK,multiple:!1,checkStrictly:!1,emitPath:!0,lazy:!1,lazyLoad:Ao,value:"value",label:"label",children:"children",leaf:"leaf",disabled:"disabled",hoverThreshold:500},Dc=e=>{if(!e)return 0;const t=e.id.split("-");return Number(t[t.length-2])},Lc=Zi({name:"ElCascaderPanel",components:{ElCascaderMenu:vc},props:{...Sc,border:{type:Boolean,default:!0},renderLabel:Function},emits:[p,N,"close","expand-change"],setup(e,{emit:t,slots:i}){let n=!1;const s=o("cascader"),r=(e=>Pi((()=>({...kc,...e.props}))))(e);let a=null;const l=ai(!0),d=ai([]),c=ai(null),h=ai([]),u=ai(null),g=ai([]),m=Pi((()=>r.value.expandTrigger===bc.HOVER)),f=Pi((()=>e.renderLabel||i.default)),_=(e,t)=>{const i=r.value;(e=e||new Cc({},i,void 0,!0)).loading=!0;i.lazyLoad(e,(i=>{const n=e,o=n.root?null:n;i&&(null==a||a.appendNodes(i,o)),n.loading=!1,n.loaded=!0,n.childrenData=n.childrenData||[],t&&t(i)}))},v=(e,i)=>{var n;const{level:o}=e,s=h.value.slice(0,o);let r;e.isLeaf?r=e.pathNodes[o-2]:(r=e,s.push(e.children)),(null==(n=u.value)?void 0:n.uid)!==(null==r?void 0:r.uid)&&(u.value=e,h.value=s,!i&&t("expand-change",(null==e?void 0:e.pathValues)||[]))},b=(e,i,o=!0)=>{const{checkStrictly:s,multiple:a}=r.value,l=g.value[0];n=!0,!a&&(null==l||l.doCheck(!1)),e.doCheck(i),x(),o&&!a&&!s&&t("close"),!o&&!a&&!s&&w(e)},w=e=>{e&&(e=e.parent,w(e),e&&v(e))},C=e=>null==a?void 0:a.getFlattedNodes(e),y=e=>{var t;return null==(t=C(e))?void 0:t.filter((e=>!1!==e.checked))},x=()=>{var e;const{checkStrictly:t,multiple:i}=r.value,n=((e,t)=>{const i=t.slice(0),n=i.map((e=>e.uid)),o=e.reduce(((e,t)=>{const o=n.indexOf(t.uid);return o>-1&&(e.push(t),i.splice(o,1),n.splice(o,1)),e}),[]);return o.push(...i),o})(g.value,y(!t)),o=n.map((e=>e.valueByOption));g.value=n,c.value=i?o:null!=(e=o[0])?e:null},k=(t=!1,i=!1)=>{const{modelValue:o}=e,{lazy:s,multiple:d,checkStrictly:h}=r.value,u=!h;var g;if(l.value&&!n&&(i||!D(o,c.value)))if(s&&!t){const e=hd(null!=(g=ud(o))&&g.length?Ze(g,1/0):[]).map((e=>null==a?void 0:a.getNodeByValue(e))).filter((e=>!!e&&!e.loaded&&!e.loading));e.length?e.forEach((e=>{_(e,(()=>k(!1,i)))})):k(!0,i)}else{const e=d?ud(o):[o],t=hd(e.map((e=>null==a?void 0:a.getNodeByValue(e,u))));O(t,!1),c.value=o}},O=(e,t=!0)=>{const{checkStrictly:i}=r.value,n=g.value,o=e.filter((e=>!!e&&(i||e.isLeaf))),s=null==a?void 0:a.getSameNode(u.value),l=t&&s||o[0];l?l.pathNodes.forEach((e=>v(e,!0))):u.value=null,n.forEach((e=>e.doCheck(!1))),o.forEach((e=>e.doCheck(!0))),g.value=o,gn(R)},R=()=>{E&&d.value.forEach((e=>{const t=null==e?void 0:e.$el;if(t){const e=t.querySelector(`.${s.namespace.value}-scrollbar__wrap`),i=t.querySelector(`.${s.b("node")}.${s.is("active")}`)||t.querySelector(`.${s.b("node")}.in-active-path`);I(e,i)}}))};return Nn(gc,si({config:r,expandingNode:u,checkedNodes:g,isHoverMenu:m,initialLoaded:l,renderLabelFn:f,lazyLoad:_,expandNode:v,handleCheckChange:b})),Qn([r,()=>e.options],(()=>{const{options:t}=e,i=r.value;n=!1,a=new xc(t,i),h.value=[a.getNodes()],i.lazy&&S(e.options)?(l.value=!1,_(void 0,(e=>{e&&(a=new xc(e,i),h.value=[a.getNodes()]),l.value=!0,k(!1,!0)}))):k(!1,!0)}),{deep:!0,immediate:!0}),Qn((()=>e.modelValue),(()=>{n=!1,k()})),Qn(c,(i=>{D(i,e.modelValue)||(t(p,i),t(N,i))})),_n((()=>d.value=[])),wn((()=>!S(e.modelValue)&&k())),{ns:s,menuList:d,menus:h,checkedNodes:g,handleKeyDown:e=>{const t=e.target,{code:i}=e;switch(i){case T.up:case T.down:{e.preventDefault();const n=i===T.up?-1:1;M(A(t,n,`.${s.b("node")}[tabindex="-1"]`));break}case T.left:{e.preventDefault();const i=d.value[Dc(t)-1],n=null==i?void 0:i.$el.querySelector(`.${s.b("node")}[aria-expanded="true"]`);M(n);break}case T.right:{e.preventDefault();const i=d.value[Dc(t)+1],n=null==i?void 0:i.$el.querySelector(`.${s.b("node")}[tabindex="-1"]`);M(n);break}case T.enter:(e=>{if(!e)return;const t=e.querySelector("input");t?t.click():L(e)&&e.click()})(t)}},handleCheckChange:b,getFlattedNodes:C,getCheckedNodes:y,clearCheckedNodes:()=>{g.value.forEach((e=>e.doCheck(!1))),x()},calculateCheckedValue:x,scrollToExpandingNode:R}}});var Nc=r(Lc,[["render",function(e,t,i,n,o,s){const r=On("el-cascader-menu");return Dn(),Vi("div",{class:bi([e.ns.b("panel"),e.ns.is("bordered",e.border)]),onKeydown:t[0]||(t[0]=(...t)=>e.handleKeyDown&&e.handleKeyDown(...t))},[(Dn(!0),Vi(Di,null,Mn(e.menus,((t,i)=>(Dn(),Fi(r,{key:i,ref_for:!0,ref:t=>e.menuList[i]=t,index:i,nodes:[...t]},null,8,["index","nodes"])))),128))],34)}],["__file","/home/runner/work/element-plus/element-plus/packages/components/cascader-panel/src/index.vue"]]);Nc.install=e=>{e.component(Nc.name,Nc)};const Ec={large:36,default:32,small:28},Ic={modifiers:[{name:"arrowPosition",enabled:!0,phase:"main",fn:({state:e})=>{const{modifiersData:t,placement:i}=e;["right","left","bottom","top"].includes(i)||(t.arrow.x=35)},requires:["arrow"]}]},Tc=Zi({name:"ElCascader",components:{ElCascaderPanel:Nc,ElInput:O,ElTooltip:R,ElScrollbar:C,ElTag:P,ElIcon:w,CircleClose:Je,Check:Ye,ArrowDown:et},directives:{Clickoutside:F},props:{...Sc,size:{type:String,validator:B},placeholder:{type:String},disabled:Boolean,clearable:Boolean,filterable:Boolean,filterMethod:{type:Function,default:(e,t)=>e.text.includes(t)},separator:{type:String,default:" / "},showAllLevels:{type:Boolean,default:!0},collapseTags:Boolean,collapseTagsTooltip:{type:Boolean,default:!1},debounce:{type:Number,default:300},beforeFilter:{type:Function,default:()=>!0},popperClass:{type:String,default:""},teleported:V.teleported,tagType:{...W.type,default:"info"},validateEvent:{type:Boolean,default:!0}},emits:[p,N,"focus","blur","visible-change","expand-change","remove-tag"],setup(e,{emit:t}){let i=0,n=0;const s=o("cascader"),r=o("input"),{t:a}=y(),l=an(h,{}),d=an(u,{}),c=ai(null),g=ai(null),m=ai(null),v=ai(null),b=ai(null),w=ai(!1),C=ai(!1),x=ai(!1),S=ai(""),k=ai(""),D=ai([]),L=ai([]),I=ai([]),O=ai(!1),R=Pi((()=>e.disabled||l.disabled)),P=Pi((()=>e.placeholder||a("el.cascader.placeholder"))),F=f(),B=Pi((()=>["small"].includes(F.value)?"small":"default")),V=Pi((()=>!!e.props.multiple)),W=Pi((()=>!e.filterable||V.value)),U=Pi((()=>V.value?k.value:S.value)),$=Pi((()=>{var e;return(null==(e=v.value)?void 0:e.checkedNodes)||[]})),K=Pi((()=>!(!e.clearable||R.value||x.value||!C.value)&&!!$.value.length)),q=Pi((()=>{const{showAllLevels:t,separator:i}=e,n=$.value;return n.length?V.value?" ":n[0].calcText(t,i):""})),G=Pi({get:()=>e.modelValue,set(i){var n;t(p,i),t(N,i),e.validateEvent&&(null==(n=d.validate)||n.call(d,"change").catch((e=>_())))}}),Z=Pi((()=>{var e,t;return null==(t=null==(e=c.value)?void 0:e.popperRef)?void 0:t.contentRef})),Y=i=>{var n,o,s;if(!R.value&&(i=null!=i?i:!w.value)!==w.value){if(w.value=i,null==(o=null==(n=g.value)?void 0:n.input)||o.setAttribute("aria-expanded",`${i}`),i)X(),gn(null==(s=v.value)?void 0:s.scrollToExpandingNode);else if(e.filterable){const{value:e}=q;S.value=e,k.value=e}t("visible-change",i)}},X=()=>{gn((()=>{var e;null==(e=c.value)||e.updatePopper()}))},Q=()=>{x.value=!1},J=t=>{const{showAllLevels:i,separator:n}=e;return{node:t,key:t.uid,text:t.calcText(i,n),hitState:!1,closable:!R.value&&!t.isDisabled,isCollapseTag:!1}},ee=e=>{var i;const n=e.node;n.doCheck(!1),null==(i=v.value)||i.calculateCheckedValue(),t("remove-tag",n.valueByOption)},te=()=>{var t,i;const{filterMethod:n,showAllLevels:o,separator:s}=e,r=null==(i=null==(t=v.value)?void 0:t.getFlattedNodes(!e.props.checkStrictly))?void 0:i.filter((e=>!e.isDisabled&&(e.calcText(o,s),n(e,U.value))));V.value&&(D.value.forEach((e=>{e.hitState=!1})),L.value.forEach((e=>{e.hitState=!1}))),x.value=!0,I.value=r,X()},ie=()=>{var e;let t;t=x.value&&b.value?b.value.$el.querySelector(`.${s.e("suggestion-item")}`):null==(e=v.value)?void 0:e.$el.querySelector(`.${s.b("node")}[tabindex="-1"]`),t&&(t.focus(),!x.value&&t.click())},ne=()=>{var e,t;const n=null==(e=g.value)?void 0:e.input,o=m.value,r=null==(t=b.value)?void 0:t.$el;if(E&&n){if(r){r.querySelector(`.${s.e("suggestion-list")}`).style.minWidth=`${n.offsetWidth}px`}if(o){const{offsetHeight:e}=o,t=D.value.length>0?`${Math.max(e+6,i)}px`:`${i}px`;n.style.height=t,X()}}},oe=z((()=>{const{value:t}=U;if(!t)return;const i=e.beforeFilter(t);Oo(i)?i.then(te).catch((()=>{})):!1!==i?te():Q()}),e.debounce),se=(e,t)=>{!w.value&&Y(!0),(null==t?void 0:t.isComposing)||(e?oe():Q())};return Qn(x,X),Qn([$,R],(()=>{if(!V.value)return;const t=$.value,i=[],n=[];if(t.forEach((e=>n.push(J(e)))),L.value=n,t.length){const[n,...o]=t,s=o.length;i.push(J(n)),s&&(e.collapseTags?i.push({key:-1,text:`+ ${s}`,closable:!1,isCollapseTag:!0}):o.forEach((e=>i.push(J(e)))))}D.value=i})),Qn(D,(()=>{gn((()=>ne()))})),Qn(q,(e=>S.value=e),{immediate:!0}),wn((()=>{var e;const t=null==(e=g.value)?void 0:e.$el;i=(null==t?void 0:t.offsetHeight)||Ec[F.value]||40,H(t,ne)})),{popperOptions:Ic,tooltipRef:c,popperPaneRef:Z,input:g,tagWrapper:m,panel:v,suggestionPanel:b,popperVisible:w,inputHover:C,inputPlaceholder:P,filtering:x,presentText:q,checkedValue:G,inputValue:S,searchInputValue:k,presentTags:D,allPresentTags:L,suggestions:I,isDisabled:R,isOnComposition:O,realSize:F,tagSize:B,multiple:V,readonly:W,clearBtnVisible:K,nsCascader:s,nsInput:r,t:a,togglePopperVisible:Y,hideSuggestionPanel:Q,deleteTag:ee,focusFirstNode:ie,getCheckedNodes:e=>{var t;return null==(t=v.value)?void 0:t.getCheckedNodes(e)},handleExpandChange:e=>{X(),t("expand-change",e)},handleKeyDown:e=>{if(!O.value)switch(e.code){case T.enter:Y();break;case T.down:Y(!0),gn(ie),e.preventDefault();break;case T.esc:!0===w.value&&(e.preventDefault(),e.stopPropagation(),Y(!1));break;case T.tab:Y(!1)}},handleComposition:e=>{var t;const i=null==(t=e.target)?void 0:t.value;if("compositionend"===e.type)O.value=!1,gn((()=>se(i)));else{const e=i[i.length-1]||"";O.value=!j(e)}},handleClear:()=>{var e;null==(e=v.value)||e.clearCheckedNodes(),Y(!1)},handleSuggestionClick:e=>{var t,i;const{checked:n}=e;V.value?null==(t=v.value)||t.handleCheckChange(e,!n,!1):(!n&&(null==(i=v.value)||i.handleCheckChange(e,!0,!1)),Y(!1))},handleSuggestionKeyDown:e=>{const t=e.target,{code:i}=e;switch(i){case T.up:case T.down:{const e=i===T.up?-1:1;M(A(t,e,`.${s.e("suggestion-item")}[tabindex="-1"]`));break}case T.enter:t.click()}},handleDelete:()=>{const e=D.value,t=e[e.length-1];n=k.value?0:n+1,t&&n&&(t.hitState?ee(t):t.hitState=!0)},handleInput:se}}}),Mc={key:0},Ac={class:"el-cascader__collapse-tags"},Oc=["placeholder"],Rc=["onClick"];var Pc=r(Tc,[["render",function(e,t,i,n,o,s){const r=On("circle-close"),a=On("el-icon"),l=On("arrow-down"),d=On("el-input"),c=On("el-tag"),h=On("el-tooltip"),u=On("el-cascader-panel"),g=On("check"),p=On("el-scrollbar"),m=Rn("clickoutside");return Dn(),Fi(h,{ref:"tooltipRef",visible:e.popperVisible,"onUpdate:visible":t[17]||(t[17]=t=>e.popperVisible=t),teleported:e.teleported,"popper-class":[e.nsCascader.e("dropdown"),e.popperClass],"popper-options":e.popperOptions,"fallback-placements":["bottom-start","bottom","top-start","top","right","left"],"stop-popper-mouse-event":!1,"gpu-acceleration":!1,placement:"bottom-start",transition:`${e.nsCascader.namespace.value}-zoom-in-top`,effect:"light",pure:"",persistent:"",onHide:e.hideSuggestionPanel},{default:no((()=>[so((Dn(),Vi("div",{class:bi([e.nsCascader.b(),e.nsCascader.m(e.realSize),e.nsCascader.is("disabled",e.isDisabled),e.$attrs.class]),style:Ci(e.$attrs.style),onClick:t[11]||(t[11]=()=>e.togglePopperVisible(!e.readonly||void 0)),onKeydown:t[12]||(t[12]=(...t)=>e.handleKeyDown&&e.handleKeyDown(...t)),onMouseenter:t[13]||(t[13]=t=>e.inputHover=!0),onMouseleave:t[14]||(t[14]=t=>e.inputHover=!1)},[qi(d,{ref:"input",modelValue:e.inputValue,"onUpdate:modelValue":t[1]||(t[1]=t=>e.inputValue=t),placeholder:e.searchInputValue?"":e.inputPlaceholder,readonly:e.readonly,disabled:e.isDisabled,"validate-event":!1,size:e.realSize,class:bi(e.nsCascader.is("focus",e.popperVisible)),onCompositionstart:e.handleComposition,onCompositionupdate:e.handleComposition,onCompositionend:e.handleComposition,onFocus:t[2]||(t[2]=t=>e.$emit("focus",t)),onBlur:t[3]||(t[3]=t=>e.$emit("blur",t)),onInput:e.handleInput},{suffix:no((()=>[e.clearBtnVisible?(Dn(),Fi(a,{key:"clear",class:bi([e.nsInput.e("icon"),"icon-circle-close"]),onClick:No(e.handleClear,["stop"])},{default:no((()=>[qi(r)])),_:1},8,["class","onClick"])):(Dn(),Fi(a,{key:"arrow-down",class:bi([e.nsInput.e("icon"),"icon-arrow-down",e.nsCascader.is("reverse",e.popperVisible)]),onClick:t[0]||(t[0]=No((t=>e.togglePopperVisible()),["stop"]))},{default:no((()=>[qi(l)])),_:1},8,["class"]))])),_:1},8,["modelValue","placeholder","readonly","disabled","size","class","onCompositionstart","onCompositionupdate","onCompositionend","onInput"]),e.multiple?(Dn(),Vi("div",{key:0,ref:"tagWrapper",class:bi(e.nsCascader.e("tags"))},[(Dn(!0),Vi(Di,null,Mn(e.presentTags,(t=>(Dn(),Fi(c,{key:t.key,type:e.tagType,size:e.tagSize,hit:t.hitState,closable:t.closable,"disable-transitions":"",onClose:i=>e.deleteTag(t)},{default:no((()=>[!1===t.isCollapseTag?(Dn(),Vi("span",Mc,yi(t.text),1)):(Dn(),Fi(h,{key:1,teleported:!1,disabled:e.popperVisible||!e.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],placement:"bottom",effect:"light"},{default:no((()=>[Wi("span",null,yi(t.text),1)])),content:no((()=>[Wi("div",Ac,[(Dn(!0),Vi(Di,null,Mn(e.allPresentTags,((t,i)=>(Dn(),Vi("div",{key:i,class:"el-cascader__collapse-tag"},[(Dn(),Fi(c,{key:t.key,class:"in-tooltip",type:e.tagType,size:e.tagSize,hit:t.hitState,closable:t.closable,"disable-transitions":"",onClose:i=>e.deleteTag(t)},{default:no((()=>[Wi("span",null,yi(t.text),1)])),_:2},1032,["type","size","hit","closable","onClose"]))])))),128))])])),_:2},1032,["disabled"]))])),_:2},1032,["type","size","hit","closable","onClose"])))),128)),e.filterable&&!e.isDisabled?so((Dn(),Vi("input",{key:0,"onUpdate:modelValue":t[4]||(t[4]=t=>e.searchInputValue=t),type:"text",class:bi(e.nsCascader.e("search-input")),placeholder:e.presentText?"":e.inputPlaceholder,onInput:t[5]||(t[5]=t=>e.handleInput(e.searchInputValue,t)),onClick:t[6]||(t[6]=No((t=>e.togglePopperVisible(!0)),["stop"])),onKeydown:t[7]||(t[7]=Lo(((...t)=>e.handleDelete&&e.handleDelete(...t)),["delete"])),onCompositionstart:t[8]||(t[8]=(...t)=>e.handleComposition&&e.handleComposition(...t)),onCompositionupdate:t[9]||(t[9]=(...t)=>e.handleComposition&&e.handleComposition(...t)),onCompositionend:t[10]||(t[10]=(...t)=>e.handleComposition&&e.handleComposition(...t))},null,42,Oc)),[[ko,e.searchInputValue]]):Bi("v-if",!0)],2)):Bi("v-if",!0)],38)),[[m,()=>e.togglePopperVisible(!1),e.popperPaneRef]])])),content:no((()=>[so(qi(u,{ref:"panel",modelValue:e.checkedValue,"onUpdate:modelValue":t[15]||(t[15]=t=>e.checkedValue=t),options:e.options,props:e.props,border:!1,"render-label":e.$slots.default,onExpandChange:e.handleExpandChange,onClose:t[16]||(t[16]=t=>e.$nextTick((()=>e.togglePopperVisible(!1))))},null,8,["modelValue","options","props","render-label","onExpandChange"]),[[Do,!e.filtering]]),e.filterable?so((Dn(),Fi(p,{key:0,ref:"suggestionPanel",tag:"ul",class:bi(e.nsCascader.e("suggestion-panel")),"view-class":e.nsCascader.e("suggestion-list"),onKeydown:e.handleSuggestionKeyDown},{default:no((()=>[e.suggestions.length?(Dn(!0),Vi(Di,{key:0},Mn(e.suggestions,(t=>(Dn(),Vi("li",{key:t.uid,class:bi([e.nsCascader.e("suggestion-item"),e.nsCascader.is("checked",t.checked)]),tabindex:-1,onClick:i=>e.handleSuggestionClick(t)},[Wi("span",null,yi(t.text),1),t.checked?(Dn(),Fi(a,{key:0},{default:no((()=>[qi(g)])),_:1})):Bi("v-if",!0)],10,Rc)))),128)):An(e.$slots,"empty",{key:1},(()=>[Wi("li",{class:bi(e.nsCascader.e("empty-text"))},yi(e.t("el.cascader.noMatch")),3)]))])),_:3},8,["class","view-class","onKeydown"])),[[Do,e.filtering]]):Bi("v-if",!0)])),_:3},8,["visible","teleported","popper-class","popper-options","transition","onHide"])}],["__file","/home/runner/work/element-plus/element-plus/packages/components/cascader/src/index.vue"]]);Pc.install=e=>{e.component(Pc.name,Pc)};const Fc=Pc,Bc=e=>typeof s(e),Vc=n({accordion:Boolean,modelValue:{type:U([Array,String,Number]),default:()=>$([])}}),Wc=Zi({name:"ElCollapse",props:Vc,emits:{[p]:Bc,[N]:Bc},setup(e,{expose:t,emit:i}){const n=e,s=o("collapse"),r=ai(K(n.modelValue)),a=e=>{r.value=e;const t=n.accordion?r.value[0]:r.value;i(p,t),i(N,t)};return Qn((()=>n.modelValue),(()=>r.value=K(n.modelValue)),{deep:!0}),Nn(gd,{activeNames:r,handleItemClick:e=>{if(n.accordion)a([!r.value[0]&&0!==r.value[0]||r.value[0]!==e?e:""]);else{const t=[...r.value],i=t.indexOf(e);i>-1?t.splice(i,1):t.push(e),a(t)}}}),t({activeNames:r,setActiveNames:a}),(e,t)=>(Dn(),Vi("div",{class:bi(fi(s).b()),role:"tablist","aria-multiselectable":"true"},[An(e.$slots,"default")],2))}});var zc=r(Wc,[["__file","/home/runner/work/element-plus/element-plus/packages/components/collapse/src/collapse.vue"]]);const Hc=n({title:{type:String,default:""},name:{type:U([String,Number]),default:()=>x()},disabled:Boolean}),jc=["aria-expanded","aria-controls","aria-describedby"],Uc=["id","tabindex","onKeypress"],$c=["id","aria-hidden","aria-labelledby"];var Kc=r(Zi({name:"ElCollapseItem",props:Hc,setup(e,{expose:t}){const i=e,n=an(gd),s=o("collapse"),r=ai(!1),a=ai(!1),l=ai(x()),d=Pi((()=>null==n?void 0:n.activeNames.value.includes(i.name))),c=()=>{setTimeout((()=>{a.value?a.value=!1:r.value=!0}),50)},h=()=>{i.disabled||(null==n||n.handleItemClick(i.name),r.value=!1,a.value=!0)},u=()=>{null==n||n.handleItemClick(i.name)};return t({isActive:d}),(e,t)=>(Dn(),Vi("div",{class:bi([fi(s).b("item"),fi(s).is("active",fi(d)),fi(s).is("disabled",e.disabled)])},[Wi("div",{role:"tab","aria-expanded":fi(d),"aria-controls":fi(s).b(`content-${l.value}`),"aria-describedby":fi(s).b(`content-${l.value}`)},[Wi("div",{id:fi(s).b(`head-${l.value}`),class:bi([fi(s).be("item","header"),fi(s).is("active",fi(d)),{focusing:r.value&&!e.disabled}]),role:"button",tabindex:e.disabled?-1:0,onClick:h,onKeypress:Lo(No(u,["stop","prevent"]),["space","enter"]),onFocus:c,onBlur:t[0]||(t[0]=e=>r.value=!1)},[An(e.$slots,"title",{},(()=>[Ki(yi(e.title),1)])),qi(fi(w),{class:bi([fi(s).be("item","arrow"),fi(s).is("active",fi(d))])},{default:no((()=>[qi(fi(Qe))])),_:1},8,["class"])],42,Uc)],8,jc),qi(fi(q),null,{default:no((()=>[so(Wi("div",{id:fi(s).b(`content-${l.value}`),class:bi(fi(s).be("item","wrap")),role:"tabpanel","aria-hidden":!fi(d),"aria-labelledby":fi(s).b(`head-${l.value}`)},[Wi("div",{class:bi(fi(s).be("item","content"))},[An(e.$slots,"default")],2)],10,$c),[[Do,fi(d)]])])),_:3})],2))}}),[["__file","/home/runner/work/element-plus/element-plus/packages/components/collapse/src/collapse-item.vue"]]);const qc=a(zc,{CollapseItem:Kc}),Gc=v(Kc);let Zc=!1;function Yc(e,t){if(!E)return;const i=function(e){var i;null==(i=t.drag)||i.call(t,e)},n=function(e){var o;G(document,"mousemove",i),G(document,"mouseup",n),G(document,"touchmove",i),G(document,"touchend",n),document.onselectstart=null,document.ondragstart=null,Zc=!1,null==(o=t.end)||o.call(t,e)},o=function(e){var o;Zc||(e.preventDefault(),document.onselectstart=()=>!1,document.ondragstart=()=>!1,l(document,"mousemove",i),l(document,"mouseup",n),l(document,"touchmove",i),l(document,"touchend",n),Zc=!0,null==(o=t.start)||o.call(t,e))};l(e,"mousedown",o),l(e,"touchstart",o)}const Xc=Zi({name:"ElColorAlphaSlider",props:{color:{type:Object,required:!0},vertical:{type:Boolean,default:!1}},setup(e){const t=en(),i=ci(null),n=ci(null),o=ai(0),s=ai(0),r=ai(null);function a(n){const o=t.vnode.el.getBoundingClientRect(),{clientX:s,clientY:r}=Z(n);if(e.vertical){let t=r-o.top;t=Math.max(i.value.offsetHeight/2,t),t=Math.min(t,o.height-i.value.offsetHeight/2),e.color.set("alpha",Math.round((t-i.value.offsetHeight/2)/(o.height-i.value.offsetHeight)*100))}else{let t=s-o.left;t=Math.max(i.value.offsetWidth/2,t),t=Math.min(t,o.width-i.value.offsetWidth/2),e.color.set("alpha",Math.round((t-i.value.offsetWidth/2)/(o.width-i.value.offsetWidth)*100))}}function l(){o.value=function(){if(e.vertical)return 0;const n=t.vnode.el,o=e.color.get("alpha");return n?Math.round(o*(n.offsetWidth-i.value.offsetWidth/2)/100):0}(),s.value=function(){const n=t.vnode.el;if(!e.vertical)return 0;const o=e.color.get("alpha");return n?Math.round(o*(n.offsetHeight-i.value.offsetHeight/2)/100):0}(),r.value=function(){if(e.color&&e.color.value){const{r:t,g:i,b:n}=e.color.toRgb();return`linear-gradient(to right, rgba(${t}, ${i}, ${n}, 0) 0%, rgba(${t}, ${i}, ${n}, 1) 100%)`}return null}()}return Qn((()=>e.color.get("alpha")),(()=>{l()})),Qn((()=>e.color.value),(()=>{l()})),wn((()=>{const e={drag:e=>{a(e)},end:e=>{a(e)}};Yc(n.value,e),Yc(i.value,e),l()})),{thumb:i,bar:n,thumbLeft:o,thumbTop:s,background:r,handleClick:function(e){e.target!==i.value&&a(e)},update:l}}});var Qc=r(Xc,[["render",function(e,t,i,n,o,s){return Dn(),Vi("div",{class:bi(["el-color-alpha-slider",{"is-vertical":e.vertical}])},[Wi("div",{ref:"bar",class:"el-color-alpha-slider__bar",style:Ci({background:e.background}),onClick:t[0]||(t[0]=(...t)=>e.handleClick&&e.handleClick(...t))},null,4),Wi("div",{ref:"thumb",class:"el-color-alpha-slider__thumb",style:Ci({left:e.thumbLeft+"px",top:e.thumbTop+"px"})},null,4)],2)}],["__file","/home/runner/work/element-plus/element-plus/packages/components/color-picker/src/components/alpha-slider.vue"]]);const Jc=Zi({name:"ElColorHueSlider",props:{color:{type:Object,required:!0},vertical:Boolean},setup(e){const t=en(),i=ai(null),n=ai(null),o=ai(0),s=ai(0),r=Pi((()=>e.color.get("hue")));function a(n){const o=t.vnode.el.getBoundingClientRect(),{clientX:s,clientY:r}=Z(n);let a;if(e.vertical){let e=r-o.top;e=Math.min(e,o.height-i.value.offsetHeight/2),e=Math.max(i.value.offsetHeight/2,e),a=Math.round((e-i.value.offsetHeight/2)/(o.height-i.value.offsetHeight)*360)}else{let e=s-o.left;e=Math.min(e,o.width-i.value.offsetWidth/2),e=Math.max(i.value.offsetWidth/2,e),a=Math.round((e-i.value.offsetWidth/2)/(o.width-i.value.offsetWidth)*360)}e.color.set("hue",a)}function l(){o.value=function(){const n=t.vnode.el;if(e.vertical)return 0;const o=e.color.get("hue");return n?Math.round(o*(n.offsetWidth-i.value.offsetWidth/2)/360):0}(),s.value=function(){const n=t.vnode.el;if(!e.vertical)return 0;const o=e.color.get("hue");return n?Math.round(o*(n.offsetHeight-i.value.offsetHeight/2)/360):0}()}return Qn((()=>r.value),(()=>{l()})),wn((()=>{const e={drag:e=>{a(e)},end:e=>{a(e)}};Yc(n.value,e),Yc(i.value,e),l()})),{bar:n,thumb:i,thumbLeft:o,thumbTop:s,hueValue:r,handleClick:function(e){e.target!==i.value&&a(e)},update:l}}});var eh=r(Jc,[["render",function(e,t,i,n,o,s){return Dn(),Vi("div",{class:bi(["el-color-hue-slider",{"is-vertical":e.vertical}])},[Wi("div",{ref:"bar",class:"el-color-hue-slider__bar",onClick:t[0]||(t[0]=(...t)=>e.handleClick&&e.handleClick(...t))},null,512),Wi("div",{ref:"thumb",class:"el-color-hue-slider__thumb",style:Ci({left:e.thumbLeft+"px",top:e.thumbTop+"px"})},null,4)],2)}],["__file","/home/runner/work/element-plus/element-plus/packages/components/color-picker/src/components/hue-slider.vue"]]);const th=Symbol(),ih=function(e,t,i){return[e,t*i/((e=(2-t)*i)<1?e:2-e)||0,e/2]},nh=function(e,t){var i;"string"==typeof(i=e)&&i.includes(".")&&1===Number.parseFloat(i)&&(e="100%");const n=function(e){return"string"==typeof e&&e.includes("%")}(e);return e=Math.min(t,Math.max(0,Number.parseFloat(`${e}`))),n&&(e=Number.parseInt(""+e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/Number.parseFloat(t)},oh={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},sh=function(e){e=Math.min(Math.round(e),255);const t=Math.floor(e/16),i=e%16;return`${oh[t]||t}${oh[i]||i}`},rh=function({r:e,g:t,b:i}){return Number.isNaN(+e)||Number.isNaN(+t)||Number.isNaN(+i)?"":`#${sh(e)}${sh(t)}${sh(i)}`},ah={A:10,B:11,C:12,D:13,E:14,F:15},lh=function(e){return 2===e.length?16*(ah[e[0].toUpperCase()]||+e[0])+(ah[e[1].toUpperCase()]||+e[1]):ah[e[1].toUpperCase()]||+e[1]},dh=function(e,t,i){e=nh(e,255),t=nh(t,255),i=nh(i,255);const n=Math.max(e,t,i),o=Math.min(e,t,i);let s;const r=n,a=n-o,l=0===n?0:a/n;if(n===o)s=0;else{switch(n){case e:s=(t-i)/a+(t{this._hue=Math.max(0,Math.min(360,e)),this._saturation=Math.max(0,Math.min(100,t)),this._value=Math.max(0,Math.min(100,i)),this.doOnChange()};if(e.includes("hsl")){const i=e.replace(/hsla|hsl|\(|\)/gm,"").split(/\s|,/g).filter((e=>""!==e)).map(((e,t)=>t>2?Number.parseFloat(e):Number.parseInt(e,10)));if(4===i.length?this._alpha=100*Number.parseFloat(i[3]):3===i.length&&(this._alpha=100),i.length>=3){const{h:e,s:n,v:o}=function(e,t,i){i/=100;let n=t/=100;const o=Math.max(i,.01);return t*=(i*=2)<=1?i:2-i,n*=o<=1?o:2-o,{h:e,s:100*(0===i?2*n/(o+n):2*t/(i+t)),v:(i+t)/2*100}}(i[0],i[1],i[2]);t(e,n,o)}}else if(e.includes("hsv")){const i=e.replace(/hsva|hsv|\(|\)/gm,"").split(/\s|,/g).filter((e=>""!==e)).map(((e,t)=>t>2?Number.parseFloat(e):Number.parseInt(e,10)));4===i.length?this._alpha=100*Number.parseFloat(i[3]):3===i.length&&(this._alpha=100),i.length>=3&&t(i[0],i[1],i[2])}else if(e.includes("rgb")){const i=e.replace(/rgba|rgb|\(|\)/gm,"").split(/\s|,/g).filter((e=>""!==e)).map(((e,t)=>t>2?Number.parseFloat(e):Number.parseInt(e,10)));if(4===i.length?this._alpha=100*Number.parseFloat(i[3]):3===i.length&&(this._alpha=100),i.length>=3){const{h:e,s:n,v:o}=dh(i[0],i[1],i[2]);t(e,n,o)}}else if(e.includes("#")){const i=e.replace("#","").trim();if(!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(i))return;let n,o,s;3===i.length?(n=lh(i[0]+i[0]),o=lh(i[1]+i[1]),s=lh(i[2]+i[2])):6!==i.length&&8!==i.length||(n=lh(i.slice(0,2)),o=lh(i.slice(2,4)),s=lh(i.slice(4,6))),8===i.length?this._alpha=lh(i.slice(6))/255*100:3!==i.length&&6!==i.length||(this._alpha=100);const{h:r,s:a,v:l}=dh(n,o,s);t(r,a,l)}}compare(e){return Math.abs(e._hue-this._hue)<2&&Math.abs(e._saturation-this._saturation)<1&&Math.abs(e._value-this._value)<1&&Math.abs(e._alpha-this._alpha)<1}doOnChange(){const{_hue:e,_saturation:t,_value:i,_alpha:n,format:o}=this;if(this.enableAlpha)switch(o){case"hsl":{const n=ih(e,t/100,i/100);this.value=`hsla(${e}, ${Math.round(100*n[1])}%, ${Math.round(100*n[2])}%, ${this.get("alpha")/100})`;break}case"hsv":this.value=`hsva(${e}, ${Math.round(t)}%, ${Math.round(i)}%, ${this.get("alpha")/100})`;break;case"hex":this.value=`${rh(ch(e,t,i))}${sh(255*n/100)}`;break;default:{const{r:n,g:o,b:s}=ch(e,t,i);this.value=`rgba(${n}, ${o}, ${s}, ${this.get("alpha")/100})`}}else switch(o){case"hsl":{const n=ih(e,t/100,i/100);this.value=`hsl(${e}, ${Math.round(100*n[1])}%, ${Math.round(100*n[2])}%)`;break}case"hsv":this.value=`hsv(${e}, ${Math.round(t)}%, ${Math.round(i)}%)`;break;case"rgb":{const{r:n,g:o,b:s}=ch(e,t,i);this.value=`rgb(${n}, ${o}, ${s})`;break}default:this.value=rh(ch(e,t,i))}}}const uh=Zi({props:{colors:{type:Array,required:!0},color:{type:Object,required:!0}},setup(e){const{currentColor:t}=an(th),i=ai(n(e.colors,e.color));function n(e,t){return e.map((e=>{const i=new hh;return i.enableAlpha=!0,i.format="rgba",i.fromString(e),i.selected=i.value===t.value,i}))}return Qn((()=>t.value),(e=>{const t=new hh;t.fromString(e),i.value.forEach((e=>{e.selected=t.compare(e)}))})),Jn((()=>{i.value=n(e.colors,e.color)})),{rgbaColors:i,handleSelect:function(t){e.color.fromString(e.colors[t])}}}}),gh={class:"el-color-predefine"},ph={class:"el-color-predefine__colors"},mh=["onClick"];var fh=r(uh,[["render",function(e,t,i,n,o,s){return Dn(),Vi("div",gh,[Wi("div",ph,[(Dn(!0),Vi(Di,null,Mn(e.rgbaColors,((t,i)=>(Dn(),Vi("div",{key:e.colors[i],class:bi(["el-color-predefine__color-selector",{selected:t.selected,"is-alpha":t._alpha<100}]),onClick:t=>e.handleSelect(i)},[Wi("div",{style:Ci({backgroundColor:t.value})},null,4)],10,mh)))),128))])])}],["__file","/home/runner/work/element-plus/element-plus/packages/components/color-picker/src/components/predefine.vue"]]);const _h=Zi({name:"ElSlPanel",props:{color:{type:Object,required:!0}},setup(e){const t=en(),i=ai(0),n=ai(0),o=ai("hsl(0, 100%, 50%)"),s=Pi((()=>({hue:e.color.get("hue"),value:e.color.get("value")})));function r(){const s=e.color.get("saturation"),r=e.color.get("value"),a=t.vnode.el,{clientWidth:l,clientHeight:d}=a;n.value=s*l/100,i.value=(100-r)*d/100,o.value=`hsl(${e.color.get("hue")}, 100%, 50%)`}function a(o){const s=t.vnode.el.getBoundingClientRect(),{clientX:r,clientY:a}=Z(o);let l=r-s.left,d=a-s.top;l=Math.max(0,l),l=Math.min(l,s.width),d=Math.max(0,d),d=Math.min(d,s.height),n.value=l,i.value=d,e.color.set({saturation:l/s.width*100,value:100-d/s.height*100})}return Qn((()=>s.value),(()=>{r()})),wn((()=>{Yc(t.vnode.el,{drag:e=>{a(e)},end:e=>{a(e)}}),r()})),{cursorTop:i,cursorLeft:n,background:o,colorValue:s,handleDrag:a,update:r}}}),vh=Wi("div",{class:"el-color-svpanel__white"},null,-1),bh=Wi("div",{class:"el-color-svpanel__black"},null,-1),wh=[Wi("div",null,null,-1)];const Ch=Zi({name:"ElColorPicker",components:{ElButton:Y,ElTooltip:R,ElInput:O,ElIcon:w,Close:tt,ArrowDown:et,SvPanel:r(_h,[["render",function(e,t,i,n,o,s){return Dn(),Vi("div",{class:"el-color-svpanel",style:Ci({backgroundColor:e.background})},[vh,bh,Wi("div",{class:"el-color-svpanel__cursor",style:Ci({top:e.cursorTop+"px",left:e.cursorLeft+"px"})},wh,4)],4)}],["__file","/home/runner/work/element-plus/element-plus/packages/components/color-picker/src/components/sv-panel.vue"]]),HueSlider:eh,AlphaSlider:Qc,Predefine:fh},directives:{ClickOutside:F},props:{modelValue:String,id:String,showAlpha:Boolean,colorFormat:String,disabled:Boolean,size:{type:String,validator:B},popperClass:String,label:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},predefine:Array,validateEvent:{type:Boolean,default:!0}},emits:["change","active-change",p],setup(e,{emit:t}){const{t:i}=y(),n=o("color"),s=an(h,{}),r=an(u,{}),{inputId:a,isLabeledByFormItem:l}=g(e,{formItemContext:r}),d=ai(),c=ai(),m=ai(),v=ai(null);let b=!0;const w=si(new hh({enableAlpha:e.showAlpha,format:e.colorFormat||"",value:e.modelValue})),C=ai(!1),x=ai(!1),S=ai(""),k=Pi((()=>e.modelValue||x.value?function(e,t){if(!(e instanceof hh))throw new TypeError("color should be instance of _color Class");const{r:i,g:n,b:o}=e.toRgb();return t?`rgba(${i}, ${n}, ${o}, ${e.get("alpha")/100})`:`rgb(${i}, ${n}, ${o})`}(w,e.showAlpha):"transparent")),D=f(),L=Pi((()=>!(!e.disabled&&!s.disabled))),N=Pi((()=>e.modelValue||x.value?w.value:"")),E=Pi((()=>l.value?void 0:e.label||i("el.colorpicker.defaultLabel"))),I=Pi((()=>l.value?r.labelId:void 0));Qn((()=>e.modelValue),(e=>{e?e&&e!==w.value&&(b=!1,w.fromString(e)):x.value=!1})),Qn((()=>N.value),(e=>{S.value=e,b&&t("active-change",e),b=!0})),Qn((()=>w.value),(()=>{e.modelValue||x.value||(x.value=!0)}));const T=z((function(e){C.value=e}),100);function M(){gn((()=>{e.modelValue?w.fromString(e.modelValue):(w.value="",gn((()=>{x.value=!1})))}))}return wn((()=>{e.modelValue&&(S.value=N.value)})),Qn((()=>C.value),(()=>{gn((()=>{var e,t,i;null==(e=d.value)||e.update(),null==(t=c.value)||t.update(),null==(i=m.value)||i.update()}))})),Nn(th,{currentColor:N}),{color:w,colorDisabled:L,colorSize:D,displayedColor:k,showPanelColor:x,showPicker:C,customInput:S,buttonId:a,buttonAriaLabel:E,buttonAriaLabelledby:I,handleConfirm:function(){w.fromString(S.value)},hide:function(){T(!1),M()},handleTrigger:function(){L.value||T(!C.value)},clear:function(){var i;T(!1),t(p,null),t("change",null),null!==e.modelValue&&e.validateEvent&&(null==(i=r.validate)||i.call(r,"change").catch((e=>_()))),M()},confirmValue:function(){var i;const n=w.value;t(p,n),t("change",n),e.validateEvent&&(null==(i=r.validate)||i.call(r,"change").catch((e=>_()))),T(!1),gn((()=>{const t=new hh({enableAlpha:e.showAlpha,format:e.colorFormat||"",value:e.modelValue});w.compare(t)||M()}))},t:i,ns:n,hue:d,svPanel:c,alpha:m,popper:v}}}),yh=["id","aria-label","aria-labelledby","aria-description","tabindex"];var xh=r(Ch,[["render",function(e,t,i,n,o,s){const r=On("hue-slider"),a=On("sv-panel"),l=On("alpha-slider"),d=On("predefine"),c=On("el-input"),h=On("el-button"),u=On("arrow-down"),g=On("el-icon"),p=On("close"),m=On("el-tooltip"),f=Rn("click-outside");return Dn(),Fi(m,{ref:"popper",visible:e.showPicker,"onUpdate:visible":t[3]||(t[3]=t=>e.showPicker=t),"show-arrow":!1,"fallback-placements":["bottom","top","right","left"],offset:0,"gpu-acceleration":!1,"popper-class":[e.ns.be("picker","panel"),e.ns.b("dropdown"),e.popperClass],"stop-popper-mouse-event":!1,effect:"light",trigger:"click",transition:"el-zoom-in-top",persistent:""},{content:no((()=>[so((Dn(),Vi("div",null,[Wi("div",{class:bi(e.ns.be("dropdown","main-wrapper"))},[qi(r,{ref:"hue",class:"hue-slider",color:e.color,vertical:""},null,8,["color"]),qi(a,{ref:"svPanel",color:e.color},null,8,["color"])],2),e.showAlpha?(Dn(),Fi(l,{key:0,ref:"alpha",color:e.color},null,8,["color"])):Bi("v-if",!0),e.predefine?(Dn(),Fi(d,{key:1,ref:"predefine",color:e.color,colors:e.predefine},null,8,["color","colors"])):Bi("v-if",!0),Wi("div",{class:bi(e.ns.be("dropdown","btns"))},[Wi("span",{class:bi(e.ns.be("dropdown","value"))},[qi(c,{modelValue:e.customInput,"onUpdate:modelValue":t[0]||(t[0]=t=>e.customInput=t),"validate-event":!1,size:"small",onKeyup:Lo(e.handleConfirm,["enter"]),onBlur:e.handleConfirm},null,8,["modelValue","onKeyup","onBlur"])],2),qi(h,{class:bi(e.ns.be("dropdown","link-btn")),text:"",size:"small",onClick:e.clear},{default:no((()=>[Ki(yi(e.t("el.colorpicker.clear")),1)])),_:1},8,["class","onClick"]),qi(h,{plain:"",size:"small",class:bi(e.ns.be("dropdown","btn")),onClick:e.confirmValue},{default:no((()=>[Ki(yi(e.t("el.colorpicker.confirm")),1)])),_:1},8,["class","onClick"])],2)])),[[f,e.hide]])])),default:no((()=>[Wi("div",{id:e.buttonId,class:bi([e.ns.b("picker"),e.ns.is("disabled",e.colorDisabled),e.ns.bm("picker",e.colorSize)]),role:"button","aria-label":e.buttonAriaLabel,"aria-labelledby":e.buttonAriaLabelledby,"aria-description":e.t("el.colorpicker.description",{color:e.modelValue||""}),tabindex:e.tabindex,onKeydown:t[2]||(t[2]=Lo(((...t)=>e.handleTrigger&&e.handleTrigger(...t)),["enter"]))},[e.colorDisabled?(Dn(),Vi("div",{key:0,class:bi(e.ns.be("picker","mask"))},null,2)):Bi("v-if",!0),Wi("div",{class:bi(e.ns.be("picker","trigger")),onClick:t[1]||(t[1]=(...t)=>e.handleTrigger&&e.handleTrigger(...t))},[Wi("span",{class:bi([e.ns.be("picker","color"),e.ns.is("alpha",e.showAlpha)])},[Wi("span",{class:bi(e.ns.be("picker","color-inner")),style:Ci({backgroundColor:e.displayedColor})},[so(qi(g,{class:bi([e.ns.be("picker","icon"),e.ns.is("icon-arrow-down")])},{default:no((()=>[qi(u)])),_:1},8,["class"]),[[Do,e.modelValue||e.showPanelColor]]),e.modelValue||e.showPanelColor?Bi("v-if",!0):(Dn(),Fi(g,{key:0,class:bi([e.ns.be("picker","empty"),e.ns.is("icon-close")])},{default:no((()=>[qi(p)])),_:1},8,["class"]))],6)],2)],2)],42,yh)])),_:1},8,["visible","popper-class"])}],["__file","/home/runner/work/element-plus/element-plus/packages/components/color-picker/src/index.vue"]]);xh.install=e=>{e.component(xh.name,xh)};const Sh=xh;var kh=r(Zi({name:"ElContainer",props:{direction:{type:String}},setup(e){const t=e,i=Gn(),n=o("container"),s=Pi((()=>{if("vertical"===t.direction)return!0;if("horizontal"===t.direction)return!1;if(i&&i.default){return i.default().some((e=>{const t=e.type.name;return"ElHeader"===t||"ElFooter"===t}))}return!1}));return(e,t)=>(Dn(),Vi("section",{class:bi([fi(n).b(),fi(n).is("vertical",fi(s))])},[An(e.$slots,"default")],2))}}),[["__file","/home/runner/work/element-plus/element-plus/packages/components/container/src/container.vue"]]);var Dh=r(Zi({name:"ElAside",props:{width:{type:String,default:null}},setup(e){const t=e,i=o("aside"),n=Pi((()=>t.width?i.cssVarBlock({width:t.width}):{}));return(e,t)=>(Dn(),Vi("aside",{class:bi(fi(i).b()),style:Ci(fi(n))},[An(e.$slots,"default")],6))}}),[["__file","/home/runner/work/element-plus/element-plus/packages/components/container/src/aside.vue"]]);var Lh=r(Zi({name:"ElFooter",props:{height:{type:String,default:null}},setup(e){const t=e,i=o("footer"),n=Pi((()=>t.height?i.cssVarBlock({height:t.height}):{}));return(e,t)=>(Dn(),Vi("footer",{class:bi(fi(i).b()),style:Ci(fi(n))},[An(e.$slots,"default")],6))}}),[["__file","/home/runner/work/element-plus/element-plus/packages/components/container/src/footer.vue"]]);var Nh=r(Zi({name:"ElHeader",props:{height:{type:String,default:null}},setup(e){const t=e,i=o("header"),n=Pi((()=>t.height?i.cssVarBlock({height:t.height}):{}));return(e,t)=>(Dn(),Vi("header",{class:bi(fi(i).b()),style:Ci(fi(n))},[An(e.$slots,"default")],6))}}),[["__file","/home/runner/work/element-plus/element-plus/packages/components/container/src/header.vue"]]);var Eh=r(Zi({name:"ElMain",setup(e){const t=o("main");return(e,i)=>(Dn(),Vi("main",{class:bi(fi(t).b())},[An(e.$slots,"default")],2))}}),[["__file","/home/runner/work/element-plus/element-plus/packages/components/container/src/main.vue"]]);const Ih=a(kh,{Aside:Dh,Footer:Lh,Header:Nh,Main:Eh}),Th=v(Dh);v(Lh);const Mh=v(Nh),Ah=v(Eh),Oh=n({id:{type:String,default:void 0},step:{type:Number,default:1},stepStrictly:Boolean,max:{type:Number,default:Number.POSITIVE_INFINITY},min:{type:Number,default:Number.NEGATIVE_INFINITY},modelValue:Number,disabled:Boolean,size:c,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:"",values:["","right"]},valueOnClear:{type:[String,Number,null],validator:e=>null===e||s(e)||["min","max"].includes(e),default:null},name:String,label:String,placeholder:String,precision:{type:Number,validator:e=>e>=0&&e===Number.parseInt(`${e}`,10)},validateEvent:{type:Boolean,default:!0}}),Rh=["aria-label","onKeydown"],Ph=["aria-label","onKeydown"],Fh=Zi({name:"ElInputNumber",props:Oh,emits:{[N]:(e,t)=>e!==t,blur:e=>e instanceof FocusEvent,focus:e=>e instanceof FocusEvent,[X]:e=>s(e)||Q(e),[p]:e=>s(e)||Q(e)},setup(e,{expose:t,emit:i}){const n=e,{t:r}=y(),a=o("input-number"),l=ai(),d=si({currentValue:n.modelValue,userInput:null}),{formItem:c}=J(),h=Pi((()=>s(n.modelValue)&&S(n.modelValue,-1)s(n.modelValue)&&S(n.modelValue)>n.max)),g=Pi((()=>{const e=x(n.step);return k(n.precision)?Math.max(x(n.modelValue),e):(n.precision,n.precision)})),p=Pi((()=>n.controls&&"right"===n.controlsPosition)),m=f(),v=ee(),b=Pi((()=>{if(null!==d.userInput)return d.userInput;let e=d.currentValue;if(Q(e))return"";if(s(e)){if(Number.isNaN(e))return"";k(n.precision)||(e=e.toFixed(n.precision))}return e})),C=(e,t)=>{if(k(t)&&(t=g.value),0===t)return Math.round(e);let i=String(e);const n=i.indexOf(".");if(-1===n)return e;if(!i.replace(".","").split("")[n+t])return e;const o=i.length;return"5"===i.charAt(o-1)&&(i=`${i.slice(0,Math.max(0,o-1))}6`),Number.parseFloat(Number(i).toFixed(t))},x=e=>{if(Q(e))return 0;const t=e.toString(),i=t.indexOf(".");let n=0;return-1!==i&&(n=t.length-i-1),n},S=(e,t=1)=>s(e)?C(e+n.step*t):d.currentValue,D=()=>{if(v.value||u.value)return;const e=n.modelValue||0,t=S(e);E(t)},L=()=>{if(v.value||h.value)return;const e=n.modelValue||0,t=S(e,-1);E(t)},N=(e,t)=>{const{max:o,min:s,step:r,precision:a,stepStrictly:l,valueOnClear:d}=n;let c=Number(e);if(Q(e)||Number.isNaN(c))return null;if(""===e){if(null===d)return null;c=Eo(d)?{min:s,max:o}[d]:d}return l&&(c=C(Math.round(c/r)*r,a)),k(a)||(c=C(c,a)),(c>o||co?o:s,t&&i("update:modelValue",c)),c},E=e=>{var t;const o=d.currentValue,s=N(e);o!==s&&(d.userInput=null,i("update:modelValue",s),i("input",s),i("change",s,o),n.validateEvent&&(null==(t=null==c?void 0:c.validate)||t.call(c,"change").catch((e=>_()))),d.currentValue=s)},I=e=>d.userInput=e,T=e=>{const t=""!==e?Number(e):"";(s(t)&&!Number.isNaN(t)||""===e)&&E(t),d.userInput=null},M=e=>{i("focus",e)},A=e=>{var t;i("blur",e),n.validateEvent&&(null==(t=null==c?void 0:c.validate)||t.call(c,"blur").catch((e=>_())))};return Qn((()=>n.modelValue),(e=>{d.currentValue=N(e,!0),d.userInput=null}),{immediate:!0}),wn((()=>{var e;const{min:t,max:o,modelValue:r}=n,a=null==(e=l.value)?void 0:e.input;if(a.setAttribute("role","spinbutton"),Number.isFinite(o)?a.setAttribute("aria-valuemax",String(o)):a.removeAttribute("aria-valuemax"),Number.isFinite(t)?a.setAttribute("aria-valuemin",String(t)):a.removeAttribute("aria-valuemin"),a.setAttribute("aria-valuenow",String(d.currentValue)),a.setAttribute("aria-disabled",String(v.value)),!s(r)&&null!=r){let e=Number(r);Number.isNaN(e)&&(e=null),i("update:modelValue",e)}})),kn((()=>{var e;const t=null==(e=l.value)?void 0:e.input;null==t||t.setAttribute("aria-valuenow",`${d.currentValue}`)})),t({focus:()=>{var e,t;null==(t=null==(e=l.value)?void 0:e.focus)||t.call(e)},blur:()=>{var e,t;null==(t=null==(e=l.value)?void 0:e.blur)||t.call(e)}}),(e,t)=>(Dn(),Vi("div",{class:bi([fi(a).b(),fi(a).m(fi(m)),fi(a).is("disabled",fi(v)),fi(a).is("without-controls",!e.controls),fi(a).is("controls-right",fi(p))]),onDragstart:t[0]||(t[0]=No((()=>{}),["prevent"]))},[e.controls?so((Dn(),Vi("span",{key:0,role:"button","aria-label":fi(r)("el.inputNumber.decrease"),class:bi([fi(a).e("decrease"),fi(a).is("disabled",fi(h))]),onKeydown:Lo(L,["enter"])},[qi(fi(w),null,{default:no((()=>[fi(p)?(Dn(),Fi(fi(et),{key:0})):(Dn(),Fi(fi(it),{key:1}))])),_:1})],42,Rh)),[[fi(Od),L]]):Bi("v-if",!0),e.controls?so((Dn(),Vi("span",{key:1,role:"button","aria-label":fi(r)("el.inputNumber.increase"),class:bi([fi(a).e("increase"),fi(a).is("disabled",fi(u))]),onKeydown:Lo(D,["enter"])},[qi(fi(w),null,{default:no((()=>[fi(p)?(Dn(),Fi(fi(nt),{key:0})):(Dn(),Fi(fi(ot),{key:1}))])),_:1})],42,Ph)),[[fi(Od),D]]):Bi("v-if",!0),qi(fi(O),{id:e.id,ref_key:"input",ref:l,type:"number",step:e.step,"model-value":fi(b),placeholder:e.placeholder,disabled:fi(v),size:fi(m),max:e.max,min:e.min,name:e.name,label:e.label,"validate-event":!1,onKeydown:[Lo(No(D,["prevent"]),["up"]),Lo(No(L,["prevent"]),["down"])],onBlur:A,onFocus:M,onInput:I,onChange:T},null,8,["id","step","model-value","placeholder","disabled","size","max","min","name","label","onKeydown"])],34))}});const Bh=a(r(Fh,[["__file","/home/runner/work/element-plus/element-plus/packages/components/input-number/src/input-number.vue"]])),Vh=n({title:String,confirmButtonText:String,cancelButtonText:String,confirmButtonType:{type:String,values:te,default:"primary"},cancelButtonType:{type:String,values:te,default:"text"},icon:{type:ie,default:st},iconColor:{type:String,default:"#f90"},hideIcon:{type:Boolean,default:!1},hideAfter:{type:Number,default:200},onConfirm:{type:U(Function)},onCancel:{type:U(Function)},teleported:V.teleported,persistent:V.persistent}),Wh=Zi({name:"ElPopconfirm",props:Vh,setup(e){const t=e,{t:i}=y(),n=o("popconfirm"),s=ai(),r=()=>{(()=>{var e,t;null==(t=null==(e=s.value)?void 0:e.onClose)||t.call(e)})()},a=e=>{var i;null==(i=t.onConfirm)||i.call(t,e),r()},l=e=>{var i;null==(i=t.onCancel)||i.call(t,e),r()},d=Pi((()=>t.confirmButtonText||i("el.popconfirm.confirmButtonText"))),c=Pi((()=>t.cancelButtonText||i("el.popconfirm.cancelButtonText")));return(e,t)=>(Dn(),Fi(fi(R),{ref_key:"tooltipRef",ref:s,trigger:"click",effect:"light","popper-class":`${fi(n).namespace.value}-popover`,teleported:e.teleported,"fallback-placements":["bottom","top","right","left"],"hide-after":e.hideAfter,persistent:e.persistent},{content:no((()=>[Wi("div",{class:bi(fi(n).b())},[Wi("div",{class:bi(fi(n).e("main"))},[!e.hideIcon&&e.icon?(Dn(),Fi(fi(w),{key:0,class:bi(fi(n).e("icon")),style:Ci({color:e.iconColor})},{default:no((()=>[(Dn(),Fi(Pn(e.icon)))])),_:1},8,["class","style"])):Bi("v-if",!0),Ki(" "+yi(e.title),1)],2),Wi("div",{class:bi(fi(n).e("action"))},[qi(fi(Y),{size:"small",type:"text"===e.cancelButtonType?"":e.cancelButtonType,text:"text"===e.cancelButtonType,onClick:l},{default:no((()=>[Ki(yi(fi(c)),1)])),_:1},8,["type","text"]),qi(fi(Y),{size:"small",type:"text"===e.confirmButtonType?"":e.confirmButtonType,text:"text"===e.confirmButtonType,onClick:a},{default:no((()=>[Ki(yi(fi(d)),1)])),_:1},8,["type","text"])],2)],2)])),default:no((()=>[e.$slots.reference?An(e.$slots,"reference",{key:0}):Bi("v-if",!0)])),_:3},8,["popper-class","teleported","hide-after","persistent"]))}});const zh=a(r(Wh,[["__file","/home/runner/work/element-plus/element-plus/packages/components/popconfirm/src/popconfirm.vue"]])),Hh=n({type:{type:String,default:"line",values:["line","circle","dashboard"]},percentage:{type:Number,default:0,validator:e=>e>=0&&e<=100},status:{type:String,default:"",values:["","success","exception","warning"]},indeterminate:{type:Boolean,default:!1},duration:{type:Number,default:3},strokeWidth:{type:Number,default:6},strokeLinecap:{type:U(String),default:"round"},textInside:{type:Boolean,default:!1},width:{type:Number,default:126},showText:{type:Boolean,default:!0},color:{type:U([String,Array,Function]),default:""},format:{type:U(Function),default:e=>`${e}%`}}),jh=["aria-valuenow"],Uh={viewBox:"0 0 100 100"},$h=["d","stroke","stroke-width"],Kh=["d","stroke","opacity","stroke-linecap","stroke-width"],qh={key:0},Gh=Zi({name:"ElProgress",props:Hh,setup(e){const t=e,i={success:"#13ce66",exception:"#ff4949",warning:"#e6a23c",default:"#20a0ff"},n=o("progress"),s=Pi((()=>({width:`${t.percentage}%`,animationDuration:`${t.duration}s`,backgroundColor:v(t.percentage)}))),r=Pi((()=>(t.strokeWidth/t.width*100).toFixed(1))),a=Pi((()=>["circle","dashboard"].includes(t.type)?Number.parseInt(""+(50-Number.parseFloat(r.value)/2),10):0)),l=Pi((()=>{const e=a.value,i="dashboard"===t.type;return`\n M 50 50\n m 0 ${i?"":"-"}${e}\n a ${e} ${e} 0 1 1 0 ${i?"-":""}${2*e}\n a ${e} ${e} 0 1 1 0 ${i?"":"-"}${2*e}\n `})),d=Pi((()=>2*Math.PI*a.value)),c=Pi((()=>"dashboard"===t.type?.75:1)),h=Pi((()=>`${-1*d.value*(1-c.value)/2}px`)),u=Pi((()=>({strokeDasharray:`${d.value*c.value}px, ${d.value}px`,strokeDashoffset:h.value}))),g=Pi((()=>({strokeDasharray:`${d.value*c.value*(t.percentage/100)}px, ${d.value}px`,strokeDashoffset:h.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"}))),p=Pi((()=>{let e;return e=t.color?v(t.percentage):i[t.status]||i.default,e})),m=Pi((()=>"warning"===t.status?rt:"line"===t.type?"success"===t.status?at:Je:"success"===t.status?Ye:tt)),f=Pi((()=>"line"===t.type?12+.4*t.strokeWidth:.111111*t.width+2)),_=Pi((()=>t.format(t.percentage)));const v=e=>{var i;const{color:n}=t;if(Mo(n))return n(e);if(Eo(n))return n;{const t=function(e){const t=100/e.length,i=e.map(((e,i)=>Eo(e)?{color:e,percentage:(i+1)*t}:e));return i.sort(((e,t)=>e.percentage-t.percentage))}(n);for(const i of t)if(i.percentage>e)return i.color;return null==(i=t[t.length-1])?void 0:i.color}};return(e,t)=>(Dn(),Vi("div",{class:bi([fi(n).b(),fi(n).m(e.type),fi(n).is(e.status),{[fi(n).m("without-text")]:!e.showText,[fi(n).m("text-inside")]:e.textInside}]),role:"progressbar","aria-valuenow":e.percentage,"aria-valuemin":"0","aria-valuemax":"100"},["line"===e.type?(Dn(),Vi("div",{key:0,class:bi(fi(n).b("bar"))},[Wi("div",{class:bi(fi(n).be("bar","outer")),style:Ci({height:`${e.strokeWidth}px`})},[Wi("div",{class:bi([fi(n).be("bar","inner"),{[fi(n).bem("bar","inner","indeterminate")]:e.indeterminate}]),style:Ci(fi(s))},[(e.showText||e.$slots.default)&&e.textInside?(Dn(),Vi("div",{key:0,class:bi(fi(n).be("bar","innerText"))},[An(e.$slots,"default",{percentage:e.percentage},(()=>[Wi("span",null,yi(fi(_)),1)]))],2)):Bi("v-if",!0)],6)],6)],2)):(Dn(),Vi("div",{key:1,class:bi(fi(n).b("circle")),style:Ci({height:`${e.width}px`,width:`${e.width}px`})},[(Dn(),Vi("svg",Uh,[Wi("path",{class:bi(fi(n).be("circle","track")),d:fi(l),stroke:`var(${fi(n).cssVarName("fill-color-light")}, #e5e9f2)`,"stroke-width":fi(r),fill:"none",style:Ci(fi(u))},null,14,$h),Wi("path",{class:bi(fi(n).be("circle","path")),d:fi(l),stroke:fi(p),fill:"none",opacity:e.percentage?1:0,"stroke-linecap":e.strokeLinecap,"stroke-width":fi(r),style:Ci(fi(g))},null,14,Kh)]))],6)),!e.showText&&!e.$slots.default||e.textInside?Bi("v-if",!0):(Dn(),Vi("div",{key:2,class:bi(fi(n).e("text")),style:Ci({fontSize:`${fi(f)}px`})},[An(e.$slots,"default",{percentage:e.percentage},(()=>[e.status?(Dn(),Fi(fi(w),{key:1},{default:no((()=>[(Dn(),Fi(Pn(fi(m))))])),_:1})):(Dn(),Vi("span",qh,yi(fi(_)),1))]))],6))],10,jh))}});const Zh=a(r(Gh,[["__file","/home/runner/work/element-plus/element-plus/packages/components/progress/src/progress.vue"]])),Yh=n({modelValue:{type:[Boolean,String,Number],default:!1},value:{type:[Boolean,String,Number],default:!1},disabled:{type:Boolean,default:!1},width:{type:[String,Number],default:""},inlinePrompt:{type:Boolean,default:!1},activeIcon:{type:ie,default:""},inactiveIcon:{type:ie,default:""},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeColor:{type:String,default:""},inactiveColor:{type:String,default:""},borderColor:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},id:String,loading:{type:Boolean,default:!1},beforeChange:{type:U(Function)},size:{type:String,validator:B},tabindex:{type:[String,Number]}}),Xh=["onClick"],Qh=["id","aria-checked","aria-disabled","name","true-value","false-value","disabled","tabindex","onKeydown"],Jh=["aria-hidden"],eu=["aria-hidden"],tu=["aria-hidden"],iu=["aria-hidden"],nu=Zi({name:"ElSwitch",props:Yh,emits:{[p]:e=>m(e)||Eo(e)||s(e),[N]:e=>m(e)||Eo(e)||s(e),[X]:e=>m(e)||Eo(e)||s(e)},setup(e,{expose:t,emit:i}){const n=e,s="ElSwitch",r=en(),{formItem:a}=J(),l=f(),d=o("switch");ne({from:'"value"',replacement:'"model-value" or "v-model"',scope:s,version:"2.3.0",ref:"https://element-plus.org/en-US/component/switch.html#attributes",type:"Attribute"},Pi((()=>{var e;return!!(null==(e=r.vnode.props)?void 0:e.value)})));const{inputId:c}=g(n,{formItemContext:a}),h=ee(Pi((()=>n.loading))),u=ai(!1!==n.modelValue),v=ai(),b=ai(),C=Pi((()=>[d.b(),d.m(l.value),d.is("disabled",h.value),d.is("checked",S.value)])),y=Pi((()=>({width:oe(n.width)})));Qn((()=>n.modelValue),(()=>{u.value=!0})),Qn((()=>n.value),(()=>{u.value=!1}));const x=Pi((()=>u.value?n.modelValue:n.value)),S=Pi((()=>x.value===n.activeValue));[n.activeValue,n.inactiveValue].includes(x.value)||(i(p,n.inactiveValue),i(N,n.inactiveValue),i(X,n.inactiveValue)),Qn(S,(e=>{var t;v.value.checked=e,n.validateEvent&&(null==(t=null==a?void 0:a.validate)||t.call(a,"change").catch((e=>_())))}));const k=()=>{const e=S.value?n.inactiveValue:n.activeValue;i(p,e),i(N,e),i(X,e),gn((()=>{v.value.checked=S.value}))},D=()=>{if(h.value)return;const{beforeChange:e}=n;if(!e)return void k();const t=e();[Oo(t),m(t)].includes(!0)||se(s,"beforeChange must return type `Promise` or `boolean`"),Oo(t)?t.then((e=>{e&&k()})).catch((e=>{})):t&&k()},L=Pi((()=>d.cssVarBlock({...n.activeColor?{"on-color":n.activeColor}:null,...n.inactiveColor?{"off-color":n.inactiveColor}:null,...n.borderColor?{"border-color":n.borderColor}:null})));return wn((()=>{v.value.checked=S.value})),t({focus:()=>{var e,t;null==(t=null==(e=v.value)?void 0:e.focus)||t.call(e)}}),(e,t)=>(Dn(),Vi("div",{class:bi(fi(C)),style:Ci(fi(L)),onClick:No(D,["prevent"])},[Wi("input",{id:fi(c),ref_key:"input",ref:v,class:bi(fi(d).e("input")),type:"checkbox",role:"switch","aria-checked":fi(S),"aria-disabled":fi(h),name:e.name,"true-value":e.activeValue,"false-value":e.inactiveValue,disabled:fi(h),tabindex:e.tabindex,onChange:k,onKeydown:Lo(D,["enter"])},null,42,Qh),e.inlinePrompt||!e.inactiveIcon&&!e.inactiveText?Bi("v-if",!0):(Dn(),Vi("span",{key:0,class:bi([fi(d).e("label"),fi(d).em("label","left"),fi(d).is("active",!fi(S))])},[e.inactiveIcon?(Dn(),Fi(fi(w),{key:0},{default:no((()=>[(Dn(),Fi(Pn(e.inactiveIcon)))])),_:1})):Bi("v-if",!0),!e.inactiveIcon&&e.inactiveText?(Dn(),Vi("span",{key:1,"aria-hidden":fi(S)},yi(e.inactiveText),9,Jh)):Bi("v-if",!0)],2)),Wi("span",{ref_key:"core",ref:b,class:bi(fi(d).e("core")),style:Ci(fi(y))},[e.inlinePrompt?(Dn(),Vi("div",{key:0,class:bi(fi(d).e("inner"))},[e.activeIcon||e.inactiveIcon?(Dn(),Vi(Di,{key:0},[e.activeIcon?(Dn(),Fi(fi(w),{key:0,class:bi([fi(d).is("icon"),fi(S)?fi(d).is("show"):fi(d).is("hide")])},{default:no((()=>[(Dn(),Fi(Pn(e.activeIcon)))])),_:1},8,["class"])):Bi("v-if",!0),e.inactiveIcon?(Dn(),Fi(fi(w),{key:1,class:bi([fi(d).is("icon"),fi(S)?fi(d).is("hide"):fi(d).is("show")])},{default:no((()=>[(Dn(),Fi(Pn(e.inactiveIcon)))])),_:1},8,["class"])):Bi("v-if",!0)],64)):e.activeText||e.inactiveIcon?(Dn(),Vi(Di,{key:1},[e.activeText?(Dn(),Vi("span",{key:0,class:bi([fi(d).is("text"),fi(S)?fi(d).is("show"):fi(d).is("hide")]),"aria-hidden":!fi(S)},yi(e.activeText.substring(0,3)),11,eu)):Bi("v-if",!0),e.inactiveText?(Dn(),Vi("span",{key:1,class:bi([fi(d).is("text"),fi(S)?fi(d).is("hide"):fi(d).is("show")]),"aria-hidden":fi(S)},yi(e.inactiveText.substring(0,3)),11,tu)):Bi("v-if",!0)],64)):Bi("v-if",!0)],2)):Bi("v-if",!0),Wi("div",{class:bi(fi(d).e("action"))},[e.loading?(Dn(),Fi(fi(w),{key:0,class:bi(fi(d).is("loading"))},{default:no((()=>[qi(fi(Xe))])),_:1},8,["class"])):Bi("v-if",!0)],2)],6),e.inlinePrompt||!e.activeIcon&&!e.activeText?Bi("v-if",!0):(Dn(),Vi("span",{key:1,class:bi([fi(d).e("label"),fi(d).em("label","right"),fi(d).is("active",fi(S))])},[e.activeIcon?(Dn(),Fi(fi(w),{key:0},{default:no((()=>[(Dn(),Fi(Pn(e.activeIcon)))])),_:1})):Bi("v-if",!0),!e.activeIcon&&e.activeText?(Dn(),Vi("span",{key:1,"aria-hidden":!fi(S)},yi(e.activeText),9,iu)):Bi("v-if",!0)],2))],14,Xh))}});const ou=a(r(nu,[["__file","/home/runner/work/element-plus/element-plus/packages/components/switch/src/switch.vue"]])); /*! * escape-html * Copyright(c) 2012-2013 TJ Holowaychuk * Copyright(c) 2015 Andreas Lubbe * Copyright(c) 2015 Tiancheng "Timothy" Gu * MIT Licensed */var su=/["'&<>]/,ru=function(e){var t,i=""+e,n=su.exec(i);if(!n)return i;var o="",s=0,r=0;for(s=n.index;s"string"==typeof t?le(i,t):t(i,n,e)))):("$key"!==t&&lu(i)&&"$value"in i&&(i=i.$value),[lu(i)?le(i,t):i])};return e.map(((e,t)=>({value:e,index:t,key:s?s(e,t):null}))).sort(((e,t)=>{let o=function(e,t){if(n)return n(e.value,t.value);for(let i=0,n=e.key.length;it.key[i])return 1}return 0}(e,t);return o||(o=e.index-t.index),o*+i})).map((e=>e.value))},cu=function(e,t){let i=null;return e.columns.forEach((e=>{e.id===t&&(i=e)})),i},hu=function(e,t,i){const n=(t.className||"").match(new RegExp(`${i}-table_[^\\s]+`,"gm"));return n?cu(e,n[0]):null},uu=(e,t)=>{if(!e)throw new Error("Row is required when get row identity");if("string"==typeof t){if(!t.includes("."))return`${e[t]}`;const i=t.split(".");let n=e;for(const e of i)n=n[e];return`${n}`}if("function"==typeof t)return t.call(null,e)},gu=function(e,t){const i={};return(e||[]).forEach(((e,n)=>{i[uu(e,t)]={row:e,index:n}})),i};function pu(e){return""===e||void 0!==e&&(e=Number.parseInt(e,10),Number.isNaN(e)&&(e="")),e}function mu(e){return""===e||void 0!==e&&(e=pu(e),Number.isNaN(e)&&(e=80)),e}function fu(e){return"number"==typeof e?e:"string"==typeof e?/^\d+(?:px)?$/.test(e)?Number.parseInt(e,10):e:null}function _u(e,t,i){let n=!1;const o=e.indexOf(t),s=-1!==o,r=()=>{e.push(t),n=!0},a=()=>{e.splice(o,1),n=!0};return"boolean"==typeof i?i&&!s?r():!i&&s&&a():s?a():r(),n}function vu(e,t,i="children",n="hasChildren"){const o=e=>!(Array.isArray(e)&&e.length);function s(e,r,a){t(e,r,a),r.forEach((e=>{if(e[n])return void t(e,null,a+1);const r=e[i];o(r)||s(e,r,a+1)}))}e.forEach((e=>{if(e[n])return void t(e,null,0);const r=e[i];o(r)||s(e,r,0)}))}let bu;const wu=(e,t,i,n)=>{let o,s=0,r=e;if(n){if(n[e].colSpan>1)return{};for(let t=0;t=a.value.length-i.states.rightFixedLeafColumnsLength.value&&(o="right");break;default:r=a.value.length-i.states.rightFixedLeafColumnsLength.value&&(o="right")}return o?{direction:o,start:s,after:r}:{}},Cu=(e,t,i,n,o)=>{const s=[],{direction:r,start:a}=wu(t,i,n,o);if(r){const t="left"===r;s.push(`${e}-fixed-column--${r}`),t&&a===n.states.fixedLeafColumnsLength.value-1?s.push("is-last-column"):t||a!==n.states.columns.value.length-n.states.rightFixedLeafColumnsLength.value||s.push("is-first-column")}return s};function yu(e,t){return e+(null===t.realWidth||Number.isNaN(t.realWidth)?Number(t.width):t.realWidth)}const xu=(e,t,i,n)=>{const{direction:o,start:s=0}=wu(e,t,i,n);if(!o)return;const r={},a="left"===o,l=i.states.columns.value;return a?r.left=l.slice(0,e).reduce(yu,0):r.right=l.slice(s+1).reverse().reduce(yu,0),r},Su=(e,t)=>{e&&(Number.isNaN(e[t])||(e[t]=`${e[t]}px`))};const ku=e=>{const t=[];return e.forEach((e=>{e.children?t.push.apply(t,ku(e.children)):t.push(e)})),t};function Du(){var e;const t=en(),{size:i}=pi(null==(e=t.proxy)?void 0:e.$props),n=ai(null),o=ai([]),s=ai([]),r=ai(!1),a=ai([]),l=ai([]),d=ai([]),c=ai([]),h=ai([]),u=ai([]),g=ai([]),p=ai([]),m=ai(0),f=ai(0),_=ai(0),v=ai(!1),b=ai([]),w=ai(!1),C=ai(!1),y=ai(null),x=ai({}),S=ai(null),k=ai(null),D=ai(null),L=ai(null),N=ai(null);Qn(o,(()=>t.state&&I(!1)),{deep:!0});const E=()=>{c.value=a.value.filter((e=>!0===e.fixed||"left"===e.fixed)),h.value=a.value.filter((e=>"right"===e.fixed)),c.value.length>0&&a.value[0]&&"selection"===a.value[0].type&&!a.value[0].fixed&&(a.value[0].fixed=!0,c.value.unshift(a.value[0]));const e=a.value.filter((e=>!e.fixed));l.value=[].concat(c.value).concat(e).concat(h.value);const t=ku(e),i=ku(c.value),n=ku(h.value);m.value=t.length,f.value=i.length,_.value=n.length,d.value=[].concat(i).concat(t).concat(n),r.value=c.value.length>0||h.value.length>0},I=(e,i=!1)=>{e&&E(),i?t.state.doLayout():t.state.debouncedUpdateLayout()},T=e=>{var i;if(!t||!t.store)return 0;const{treeData:n}=t.store.states;let o=0;const s=null==(i=n.value[e])?void 0:i.children;return s&&(o+=s.length,s.forEach((e=>{o+=T(e)}))),o},M=(e,t,i)=>{k.value&&k.value!==e&&(k.value.order=null),k.value=e,D.value=t,L.value=i},A=()=>{let e=fi(s);Object.keys(x.value).forEach((t=>{const i=x.value[t];if(!i||0===i.length)return;const n=cu({columns:d.value},t);n&&n.filterMethod&&(e=e.filter((e=>i.some((t=>n.filterMethod.call(null,t,e,n))))))})),S.value=e},O=()=>{o.value=((e,t)=>{const i=t.sortingColumn;return i&&"string"!=typeof i.sortable?du(e,t.sortProp,t.sortOrder,i.sortMethod,i.sortBy):e})(S.value,{sortingColumn:k.value,sortProp:D.value,sortOrder:L.value})},{setExpandRowKeys:R,toggleRowExpansion:P,updateExpandRows:F,states:B,isRowExpanded:V}=function(e){const t=en(),i=ai(!1),n=ai([]);return{updateExpandRows:()=>{const t=e.data.value||[],o=e.rowKey.value;if(i.value)n.value=t.slice();else if(o){const e=gu(n.value,o);n.value=t.reduce(((t,i)=>{const n=uu(i,o);return e[n]&&t.push(i),t}),[])}else n.value=[]},toggleRowExpansion:(e,i)=>{_u(n.value,e,i)&&t.emit("expand-change",e,n.value.slice())},setExpandRowKeys:i=>{t.store.assertRowKey();const o=e.data.value||[],s=e.rowKey.value,r=gu(o,s);n.value=i.reduce(((e,t)=>{const i=r[t];return i&&e.push(i.row),e}),[])},isRowExpanded:t=>{const i=e.rowKey.value;return i?!!gu(n.value,i)[uu(t,i)]:n.value.includes(t)},states:{expandRows:n,defaultExpandAll:i}}}({data:o,rowKey:n}),{updateTreeExpandKeys:W,toggleTreeExpansion:z,updateTreeData:H,loadOrToggle:j,states:U}=function(e){const t=ai([]),i=ai({}),n=ai(16),o=ai(!1),s=ai({}),r=ai("hasChildren"),a=ai("children"),l=en(),d=Pi((()=>{if(!e.rowKey.value)return{};const t=e.data.value||[];return h(t)})),c=Pi((()=>{const t=e.rowKey.value,i=Object.keys(s.value),n={};return i.length?(i.forEach((e=>{if(s.value[e].length){const i={children:[]};s.value[e].forEach((e=>{const o=uu(e,t);i.children.push(o),e[r.value]&&!n[o]&&(n[o]={children:[]})})),n[e]=i}})),n):n})),h=t=>{const i=e.rowKey.value,n={};return vu(t,((e,t,s)=>{const r=uu(e,i);Array.isArray(t)?n[r]={children:t.map((e=>uu(e,i))),level:s}:o.value&&(n[r]={children:[],lazy:!0,level:s})}),a.value,r.value),n},u=(e=!1,n=(e=>null==(e=l.store)?void 0:e.states.defaultExpandAll.value)())=>{var s;const r=d.value,a=c.value,h=Object.keys(r),u={};if(h.length){const s=fi(i),l=[],d=(i,o)=>{if(e)return t.value?n||t.value.includes(o):!(!n&&!(null==i?void 0:i.expanded));{const e=n||t.value&&t.value.includes(o);return!(!(null==i?void 0:i.expanded)&&!e)}};h.forEach((e=>{const t=s[e],i={...r[e]};if(i.expanded=d(t,e),i.lazy){const{loaded:n=!1,loading:o=!1}=t||{};i.loaded=!!n,i.loading=!!o,l.push(e)}u[e]=i}));const c=Object.keys(a);o.value&&c.length&&l.length&&c.forEach((e=>{const t=s[e],i=a[e].children;if(l.includes(e)){if(0!==u[e].children.length)throw new Error("[ElTable]children must be an empty array.");u[e].children=i}else{const{loaded:n=!1,loading:o=!1}=t||{};u[e]={lazy:!0,loaded:!!n,loading:!!o,expanded:d(t,e),children:i,level:""}}}))}i.value=u,null==(s=l.store)||s.updateTableScrollY()};Qn((()=>t.value),(()=>{u(!0)})),Qn((()=>d.value),(()=>{u()})),Qn((()=>c.value),(()=>{u()}));const g=(t,n)=>{l.store.assertRowKey();const o=e.rowKey.value,s=uu(t,o),r=s&&i.value[s];if(s&&r&&"expanded"in r){const e=r.expanded;n=void 0===n?!r.expanded:n,i.value[s].expanded=n,e!==n&&l.emit("expand-change",t,n),l.store.updateTableScrollY()}},p=(e,t,n)=>{const{load:o}=l.props;o&&!i.value[t].loaded&&(i.value[t].loading=!0,o(e,n,(n=>{if(!Array.isArray(n))throw new TypeError("[ElTable] data must be an array");i.value[t].loading=!1,i.value[t].loaded=!0,i.value[t].expanded=!0,n.length&&(s.value[t]=n),l.emit("expand-change",e,!0)})))};return{loadData:p,loadOrToggle:t=>{l.store.assertRowKey();const n=e.rowKey.value,s=uu(t,n),r=i.value[s];o.value&&r&&"loaded"in r&&!r.loaded?p(t,s,r):g(t,void 0)},toggleTreeExpansion:g,updateTreeExpandKeys:e=>{t.value=e,u()},updateTreeData:u,normalize:h,states:{expandRowKeys:t,treeData:i,indent:n,lazy:o,lazyTreeNodeMap:s,lazyColumnIdentifier:r,childrenColumnName:a}}}({data:o,rowKey:n}),{updateCurrentRowData:$,updateCurrentRow:K,setCurrentRowKey:q,states:G}=function(e){const t=en(),i=ai(null),n=ai(null),o=()=>{i.value=null},s=i=>{const{data:o,rowKey:s}=e;let r=null;s.value&&(r=(fi(o)||[]).find((e=>uu(e,s.value)===i))),n.value=r,t.emit("current-change",n.value,null)};return{setCurrentRowKey:e=>{t.store.assertRowKey(),i.value=e,s(e)},restoreCurrentRowKey:o,setCurrentRowByKey:s,updateCurrentRow:e=>{const i=n.value;if(e&&e!==i)return n.value=e,void t.emit("current-change",n.value,i);!e&&i&&(n.value=null,t.emit("current-change",null,i))},updateCurrentRowData:()=>{const r=e.rowKey.value,a=e.data.value||[],l=n.value;if(!a.includes(l)&&l){if(r){const e=uu(l,r);s(e)}else n.value=null;null===n.value&&t.emit("current-change",null,l)}else i.value&&(s(i.value),o())},states:{_currentRowKey:i,currentRow:n}}}({data:o,rowKey:n});return{assertRowKey:()=>{if(!n.value)throw new Error("[ElTable] prop row-key is required")},updateColumns:E,scheduleLayout:I,isSelected:e=>b.value.includes(e),clearSelection:()=>{v.value=!1;b.value.length&&(b.value=[],t.emit("selection-change",[]))},cleanSelection:()=>{let e;if(n.value){e=[];const t=gu(b.value,n.value),i=gu(o.value,n.value);for(const n in t)Ro(t,n)&&!i[n]&&e.push(t[n].row)}else e=b.value.filter((e=>!o.value.includes(e)));if(e.length){const i=b.value.filter((t=>!e.includes(t)));b.value=i,t.emit("selection-change",i.slice())}},getSelectionRows:()=>(b.value||[]).slice(),toggleRowSelection:(e,i,n=!0)=>{if(_u(b.value,e,i)){const i=(b.value||[]).slice();n&&t.emit("select",i,e),t.emit("selection-change",i)}},_toggleAllSelection:()=>{var e,i;const n=C.value?!v.value:!(v.value||b.value.length);v.value=n;let s=!1,r=0;const a=null==(i=null==(e=null==t?void 0:t.store)?void 0:e.states)?void 0:i.rowKey.value;o.value.forEach(((e,t)=>{const i=t+r;y.value?y.value.call(null,e,i)&&_u(b.value,e,n)&&(s=!0):_u(b.value,e,n)&&(s=!0),r+=T(uu(e,a))})),s&&t.emit("selection-change",b.value?b.value.slice():[]),t.emit("select-all",b.value)},toggleAllSelection:null,updateSelectionByRowKey:()=>{const e=gu(b.value,n.value);o.value.forEach((t=>{const i=uu(t,n.value),o=e[i];o&&(b.value[o.index]=t)}))},updateAllSelected:()=>{var e,i,s;if(0===(null==(e=o.value)?void 0:e.length))return void(v.value=!1);let r;n.value&&(r=gu(b.value,n.value));let a=!0,l=0,d=0;for(let h=0,u=(o.value||[]).length;h{Array.isArray(e)||(e=[e]);const i={};return e.forEach((e=>{x.value[e.id]=t,i[e.columnKey||e.id]=t})),i},updateCurrentRow:K,updateSort:M,execFilter:A,execSort:O,execQuery:e=>{e&&e.filter||A(),O()},clearFilter:e=>{const{tableHeaderRef:i}=t.refs;if(!i)return;const n=Object.assign({},i.filterPanels),o=Object.keys(n);if(o.length)if("string"==typeof e&&(e=[e]),Array.isArray(e)){const i=e.map((e=>function(e,t){let i=null;for(let n=0;n{const t=i.find((t=>t.id===e));t&&(t.filteredValue=[])})),t.store.commit("filterChange",{column:i,values:[],silent:!0,multi:!0})}else o.forEach((e=>{const t=d.value.find((t=>t.id===e));t&&(t.filteredValue=[])})),x.value={},t.store.commit("filterChange",{column:{},values:[],silent:!0})},clearSort:()=>{k.value&&(M(null,null,null),t.store.commit("changeSortCondition",{silent:!0}))},toggleRowExpansion:P,setExpandRowKeysAdapter:e=>{R(e),W(e)},setCurrentRowKey:q,toggleRowExpansionAdapter:(e,t)=>{d.value.some((({type:e})=>"expand"===e))?P(e,t):z(e,t)},isRowExpanded:V,updateExpandRows:F,updateCurrentRowData:$,loadOrToggle:j,updateTreeData:H,states:{tableSize:i,rowKey:n,data:o,_data:s,isComplex:r,_columns:a,originColumns:l,columns:d,fixedColumns:c,rightFixedColumns:h,leafColumns:u,fixedLeafColumns:g,rightFixedLeafColumns:p,leafColumnsLength:m,fixedLeafColumnsLength:f,rightFixedLeafColumnsLength:_,isAllSelected:v,selection:b,reserveSelection:w,selectOnIndeterminate:C,selectable:y,filters:x,filteredData:S,sortingColumn:k,sortProp:D,sortOrder:L,hoverRow:N,...B,...U,...G}}}function Lu(e,t){return e.map((e=>{var i;return e.id===t.id?t:((null==(i=e.children)?void 0:i.length)&&(e.children=Lu(e.children,t)),e)}))}function Nu(e){e.forEach((e=>{var t,i;e.no=null==(t=e.getColumnIndex)?void 0:t.call(e),(null==(i=e.children)?void 0:i.length)&&Nu(e.children)})),e.sort(((e,t)=>e.no-t.no))}function Eu(){const e=en(),t=Du(),i={setData(t,i){const n=fi(t._data)!==i;t.data.value=i,t._data.value=i,e.store.execQuery(),e.store.updateCurrentRowData(),e.store.updateExpandRows(),e.store.updateTreeData(e.store.states.defaultExpandAll.value),fi(t.reserveSelection)?(e.store.assertRowKey(),e.store.updateSelectionByRowKey()):n?e.store.clearSelection():e.store.cleanSelection(),e.store.updateAllSelected(),e.$ready&&e.store.scheduleLayout()},insertColumn(t,i,n){const o=fi(t._columns);let s=[];n?(n&&!n.children&&(n.children=[]),n.children.push(i),s=Lu(o,n)):(o.push(i),s=o),Nu(s),t._columns.value=s,"selection"===i.type&&(t.selectable.value=i.selectable,t.reserveSelection.value=i.reserveSelection),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},removeColumn(t,i,n){const o=fi(t._columns)||[];if(n)n.children.splice(n.children.findIndex((e=>e.id===i.id)),1),0===n.children.length&&delete n.children,t._columns.value=Lu(o,n);else{const e=o.indexOf(i);e>-1&&(o.splice(e,1),t._columns.value=o)}e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},sort(t,i){const{prop:n,order:o,init:s}=i;if(n){const i=fi(t.columns).find((e=>e.property===n));i&&(i.order=o,e.store.updateSort(i,n,o),e.store.commit("changeSortCondition",{init:s}))}},changeSortCondition(t,i){const{sortingColumn:n,sortProp:o,sortOrder:s}=t;null===fi(s)&&(t.sortingColumn.value=null,t.sortProp.value=null);e.store.execQuery({filter:!0}),i&&(i.silent||i.init)||e.emit("sort-change",{column:fi(n),prop:fi(o),order:fi(s)}),e.store.updateTableScrollY()},filterChange(t,i){const{column:n,values:o,silent:s}=i,r=e.store.updateFilters(n,o);e.store.execQuery(),s||e.emit("filter-change",r),e.store.updateTableScrollY()},toggleAllSelection(){e.store.toggleAllSelection()},rowSelectedChanged(t,i){e.store.toggleRowSelection(i),e.store.updateAllSelected()},setHoverRow(e,t){e.hoverRow.value=t},setCurrentRow(t,i){e.store.updateCurrentRow(i)}};return{ns:o("table"),...t,mutations:i,commit:function(t,...i){const n=e.store.mutations;if(!n[t])throw new Error(`Action not found: ${t}`);n[t].apply(e,[e.store.states].concat(i))},updateTableScrollY:function(){gn((()=>e.layout.updateScrollY.apply(e.layout)))}}}const Iu={rowKey:"rowKey",defaultExpandAll:"defaultExpandAll",selectOnIndeterminate:"selectOnIndeterminate",indent:"indent",lazy:"lazy",data:"data","treeProps.hasChildren":{key:"lazyColumnIdentifier",default:"hasChildren"},"treeProps.children":{key:"childrenColumnName",default:"children"}};function Tu(e,t){if(!e)throw new Error("Table is required.");const i=Eu();return i.toggleAllSelection=z(i._toggleAllSelection,10),Object.keys(Iu).forEach((e=>{Mu(Au(t,e),e,i)})),function(e,t){Object.keys(Iu).forEach((i=>{Qn((()=>Au(t,i)),(t=>{Mu(t,i,e)}))}))}(i,t),i}function Mu(e,t,i){let n=e,o=Iu[t];"object"==typeof Iu[t]&&(o=o.key,n=n||Iu[t].default),i.states[o].value=n}function Au(e,t){if(t.includes(".")){const i=t.split(".");let n=e;return i.forEach((e=>{n=n[e]})),n}return e[t]}class Ou{constructor(e){this.observers=[],this.table=null,this.store=null,this.columns=[],this.fit=!0,this.showHeader=!0,this.height=ai(null),this.scrollX=ai(!1),this.scrollY=ai(!1),this.bodyWidth=ai(null),this.fixedWidth=ai(null),this.rightFixedWidth=ai(null),this.tableHeight=ai(null),this.headerHeight=ai(44),this.appendHeight=ai(0),this.footerHeight=ai(44),this.viewportHeight=ai(null),this.bodyHeight=ai(null),this.bodyScrollHeight=ai(0),this.fixedBodyHeight=ai(null),this.gutterWidth=0;for(const t in e)Ro(e,t)&&(ei(this[t])?this[t].value=e[t]:this[t]=e[t]);if(!this.table)throw new Error("Table is required for Table Layout");if(!this.store)throw new Error("Store is required for Table Layout")}updateScrollY(){if(null===this.height.value)return!1;const e=this.table.refs.bodyWrapper;if(this.table.vnode.el&&e){let t=!0;const i=this.scrollY.value;return t=null!==this.bodyHeight.value&&e.scrollHeight>this.bodyHeight.value,this.scrollY.value=t,i!==t}return!1}setHeight(e,t="height"){if(!E)return;const i=this.table.vnode.el;if(e=fu(e),this.height.value=Number(e),!i&&(e||0===e))return gn((()=>this.setHeight(e,t)));"number"==typeof e?(i.style[t]=`${e}px`,this.updateElsHeight()):"string"==typeof e&&(i.style[t]=e,this.updateElsHeight())}setMaxHeight(e){this.setHeight(e,"max-height")}getFlattenColumns(){const e=[];return this.table.store.states.columns.value.forEach((t=>{t.isColumnGroup?e.push.apply(e,t.columns):e.push(t)})),e}updateElsHeight(){var e,t;if(!this.table.$ready)return gn((()=>this.updateElsHeight()));const{tableWrapper:i,headerWrapper:n,appendWrapper:o,footerWrapper:s,tableHeader:r,tableBody:a}=this.table.refs;if(i&&"none"===i.style.display)return;const{tableLayout:l}=this.table.props;if(this.appendHeight.value=o?o.offsetHeight:0,this.showHeader&&!n&&"fixed"===l)return;const d=r||null,c=this.headerDisplayNone(d),h=(null==n?void 0:n.offsetHeight)||0,u=this.headerHeight.value=this.showHeader?h:0;if(this.showHeader&&!c&&h>0&&(this.table.store.states.columns.value||[]).length>0&&u<2)return gn((()=>this.updateElsHeight()));const g=this.tableHeight.value=null==(t=null==(e=this.table)?void 0:e.vnode.el)?void 0:t.clientHeight,p=this.footerHeight.value=s?s.offsetHeight:0;null!==this.height.value&&(null===this.bodyHeight.value&&requestAnimationFrame((()=>this.updateElsHeight())),this.bodyHeight.value=g-u-p+(s?1:0),this.bodyScrollHeight.value=null==a?void 0:a.scrollHeight),this.fixedBodyHeight.value=this.scrollX.value?this.bodyHeight.value-this.gutterWidth:this.bodyHeight.value,this.viewportHeight.value=this.scrollX.value?g-this.gutterWidth:g,this.updateScrollY(),this.notifyObservers("scrollable")}headerDisplayNone(e){if(!e)return!0;let t=e;for(;"DIV"!==t.tagName;){if("none"===getComputedStyle(t).display)return!0;t=t.parentElement}return!1}updateColumnsWidth(){if(!E)return;const e=this.fit,t=this.table.vnode.el.clientWidth;let i=0;const n=this.getFlattenColumns(),o=n.filter((e=>"number"!=typeof e.width));if(n.forEach((e=>{"number"==typeof e.width&&e.realWidth&&(e.realWidth=null)})),o.length>0&&e){if(n.forEach((e=>{i+=Number(e.width||e.minWidth||80)})),i<=t){this.scrollX.value=!1;const e=t-i;if(1===o.length)o[0].realWidth=Number(o[0].minWidth||80)+e;else{const t=e/o.reduce(((e,t)=>e+Number(t.minWidth||80)),0);let i=0;o.forEach(((e,n)=>{if(0===n)return;const o=Math.floor(Number(e.minWidth||80)*t);i+=o,e.realWidth=Number(e.minWidth||80)+o})),o[0].realWidth=Number(o[0].minWidth||80)+e-i}}else this.scrollX.value=!0,o.forEach((e=>{e.realWidth=Number(e.minWidth)}));this.bodyWidth.value=Math.max(i,t),this.table.state.resizeState.value.width=this.bodyWidth.value}else n.forEach((e=>{e.width||e.minWidth?e.realWidth=Number(e.width||e.minWidth):e.realWidth=80,i+=e.realWidth})),this.scrollX.value=i>t,this.bodyWidth.value=i;const s=this.store.states.fixedColumns.value;if(s.length>0){let e=0;s.forEach((t=>{e+=Number(t.realWidth||t.width)})),this.fixedWidth.value=e}const r=this.store.states.rightFixedColumns.value;if(r.length>0){let e=0;r.forEach((t=>{e+=Number(t.realWidth||t.width)})),this.rightFixedWidth.value=e}this.notifyObservers("columns")}addObserver(e){this.observers.push(e)}removeObserver(e){const t=this.observers.indexOf(e);-1!==t&&this.observers.splice(t,1)}notifyObservers(e){this.observers.forEach((t=>{var i,n;switch(e){case"columns":null==(i=t.state)||i.onColumnsChange(this);break;case"scrollable":null==(n=t.state)||n.onScrollableChange(this);break;default:throw new Error(`Table Layout don't have event ${e}.`)}}))}}const{CheckboxGroup:Ru}=dc,Pu=Zi({name:"ElTableFilterPanel",components:{ElCheckbox:dc,ElCheckboxGroup:Ru,ElScrollbar:C,ElTooltip:R,ElIcon:w,ArrowDown:et,ArrowUp:nt},directives:{ClickOutside:F},props:{placement:{type:String,default:"bottom-start"},store:{type:Object},column:{type:Object},upDataColumn:{type:Function}},setup(e){const t=en(),{t:i}=y(),n=o("table-filter"),s=null==t?void 0:t.parent;s.filterPanels.value[e.column.id]||(s.filterPanels.value[e.column.id]=t);const r=ai(!1),a=ai(null),l=Pi((()=>e.column&&e.column.filters)),d=Pi({get:()=>{var t;return((null==(t=e.column)?void 0:t.filteredValue)||[])[0]},set:e=>{c.value&&(null!=e?c.value.splice(0,1,e):c.value.splice(0,1))}}),c=Pi({get:()=>e.column&&e.column.filteredValue||[],set(t){e.column&&e.upDataColumn("filteredValue",t)}}),h=Pi((()=>!e.column||e.column.filterMultiple)),u=()=>{r.value=!1},g=t=>{e.store.commit("filterChange",{column:e.column,values:t}),e.store.updateAllSelected()};Qn(r,(t=>{e.column&&e.upDataColumn("filterOpened",t)}),{immediate:!0});const p=Pi((()=>{var e,t;return null==(t=null==(e=a.value)?void 0:e.popperRef)?void 0:t.contentRef}));return{tooltipVisible:r,multiple:h,filteredValue:c,filterValue:d,filters:l,handleConfirm:()=>{g(c.value),u()},handleReset:()=>{c.value=[],g(c.value),u()},handleSelect:e=>{d.value=e,g(null!=e?c.value:[]),u()},isActive:e=>e.value===d.value,t:i,ns:n,showFilterPanel:e=>{e.stopPropagation(),r.value=!r.value},hideFilterPanel:()=>{r.value=!1},popperPaneRef:p,tooltip:a}}}),Fu={key:0},Bu=["disabled"],Vu=["label","onClick"];var Wu=r(Pu,[["render",function(e,t,i,n,o,s){const r=On("el-checkbox"),a=On("el-checkbox-group"),l=On("el-scrollbar"),d=On("arrow-up"),c=On("arrow-down"),h=On("el-icon"),u=On("el-tooltip"),g=Rn("click-outside");return Dn(),Fi(u,{ref:"tooltip",visible:e.tooltipVisible,"onUpdate:visible":t[5]||(t[5]=t=>e.tooltipVisible=t),offset:0,placement:e.placement,"show-arrow":!1,"stop-popper-mouse-event":!1,teleported:"",effect:"light",pure:"","popper-class":e.ns.b(),persistent:""},{content:no((()=>[e.multiple?(Dn(),Vi("div",Fu,[Wi("div",{class:bi(e.ns.e("content"))},[qi(l,{"wrap-class":e.ns.e("wrap")},{default:no((()=>[qi(a,{modelValue:e.filteredValue,"onUpdate:modelValue":t[0]||(t[0]=t=>e.filteredValue=t),class:bi(e.ns.e("checkbox-group"))},{default:no((()=>[(Dn(!0),Vi(Di,null,Mn(e.filters,(e=>(Dn(),Fi(r,{key:e.value,label:e.value},{default:no((()=>[Ki(yi(e.text),1)])),_:2},1032,["label"])))),128))])),_:1},8,["modelValue","class"])])),_:1},8,["wrap-class"])],2),Wi("div",{class:bi(e.ns.e("bottom"))},[Wi("button",{class:bi({[e.ns.is("disabled")]:0===e.filteredValue.length}),disabled:0===e.filteredValue.length,type:"button",onClick:t[1]||(t[1]=(...t)=>e.handleConfirm&&e.handleConfirm(...t))},yi(e.t("el.table.confirmFilter")),11,Bu),Wi("button",{type:"button",onClick:t[2]||(t[2]=(...t)=>e.handleReset&&e.handleReset(...t))},yi(e.t("el.table.resetFilter")),1)],2)])):(Dn(),Vi("ul",{key:1,class:bi(e.ns.e("list"))},[Wi("li",{class:bi([e.ns.e("list-item"),{[e.ns.is("active")]:void 0===e.filterValue||null===e.filterValue}]),onClick:t[3]||(t[3]=t=>e.handleSelect(null))},yi(e.t("el.table.clearFilter")),3),(Dn(!0),Vi(Di,null,Mn(e.filters,(t=>(Dn(),Vi("li",{key:t.value,class:bi([e.ns.e("list-item"),e.ns.is("active",e.isActive(t))]),label:t.value,onClick:i=>e.handleSelect(t.value)},yi(t.text),11,Vu)))),128))],2))])),default:no((()=>[so((Dn(),Vi("span",{class:bi([`${e.ns.namespace.value}-table__column-filter-trigger`,`${e.ns.namespace.value}-none-outline`]),onClick:t[4]||(t[4]=(...t)=>e.showFilterPanel&&e.showFilterPanel(...t))},[qi(h,null,{default:no((()=>[e.column.filterOpened?(Dn(),Fi(d,{key:0})):(Dn(),Fi(c,{key:1}))])),_:1})],2)),[[g,e.hideFilterPanel,e.popperPaneRef]])])),_:1},8,["visible","placement","popper-class"])}],["__file","/home/runner/work/element-plus/element-plus/packages/components/table/src/filter-panel.vue"]]);function zu(e){const t=en();mn((()=>{i.value.addObserver(t)})),wn((()=>{n(i.value),o(i.value)})),kn((()=>{n(i.value),o(i.value)})),Sn((()=>{i.value.removeObserver(t)}));const i=Pi((()=>{const t=e.layout;if(!t)throw new Error("Can not find table layout.");return t})),n=t=>{var i;const n=(null==(i=e.vnode.el)?void 0:i.querySelectorAll("colgroup > col"))||[];if(!n.length)return;const o=t.getFlattenColumns(),s={};o.forEach((e=>{s[e.id]=e}));for(let e=0,r=n.length;e{var i,n;const o=(null==(i=e.vnode.el)?void 0:i.querySelectorAll("colgroup > col[name=gutter]"))||[];for(let e=0,r=o.length;e{const t=[];return e.forEach((e=>{e.children?(t.push(e),t.push.apply(t,ju(e.children))):t.push(e)})),t};function Uu(e){const t=an(Hu),i=Pi((()=>(e=>{let t=1;const i=(e,n)=>{if(n&&(e.level=n.level+1,t{i(n,e),t+=n.colSpan})),e.colSpan=t}else e.colSpan=1};e.forEach((e=>{e.level=1,i(e,void 0)}));const n=[];for(let o=0;o{e.children?(e.rowSpan=1,e.children.forEach((e=>e.isSubColumn=!0))):e.rowSpan=t-e.level+1,n[e.level-1].push(e)})),n})(e.store.states.originColumns.value)));return{isGroup:Pi((()=>{const e=i.value.length>1;return e&&t&&(t.state.isGroup.value=!0),e})),toggleAllSelection:e=>{e.stopPropagation(),null==t||t.store.commit("toggleAllSelection")},columnRows:i}}var $u=Zi({name:"ElTableHeader",components:{ElCheckbox:dc},props:{fixed:{type:String,default:""},store:{required:!0,type:Object},border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(e,{emit:t}){const i=en(),n=an(Hu),s=o("table"),r=ai({}),{onColumnsChange:a,onScrollableChange:l}=zu(n);wn((async()=>{await gn(),await gn();const{prop:t,order:i}=e.defaultSort;null==n||n.store.commit("sort",{prop:t,order:i,init:!0})}));const{handleHeaderClick:d,handleHeaderContextMenu:c,handleMouseDown:h,handleMouseMove:u,handleMouseOut:g,handleSortClick:p,handleFilterClick:m}=function(e,t){const i=en(),n=an(Hu),o=e=>{e.stopPropagation()},s=ai(null),r=ai(!1),a=ai({}),l=(t,i,o)=>{t.stopPropagation();const s=i.order===o?null:o||(({order:e,sortOrders:t})=>{if(""===e)return t[0];const i=t.indexOf(e||null);return t[i>t.length-2?0:i+1]})(i);let r=t.target;for(;r&&"TH"!==r.tagName;)r=r.parentNode;if(r&&"TH"===r.tagName&&ce(r,"noclick"))return void he(r,"noclick");if(!i.sortable)return;const a=e.store.states;let l,d=a.sortProp.value;const c=a.sortingColumn.value;(c!==i||c===i&&null===c.order)&&(c&&(c.order=null),a.sortingColumn.value=i,d=i.property),l=i.order=s||null,a.sortProp.value=d,a.sortOrder.value=l,null==n||n.store.commit("changeSortCondition")};return{handleHeaderClick:(e,t)=>{!t.filters&&t.sortable?l(e,t,!1):t.filterable&&!t.sortable&&o(e),null==n||n.emit("header-click",t,e)},handleHeaderContextMenu:(e,t)=>{null==n||n.emit("header-contextmenu",t,e)},handleMouseDown:(o,l)=>{if(E&&!(l.children&&l.children.length>0)&&s.value&&e.border){r.value=!0;const d=n;t("set-drag-visible",!0);const c=(null==d?void 0:d.vnode.el).getBoundingClientRect().left,h=i.vnode.el.querySelector(`th.${l.id}`),u=h.getBoundingClientRect(),g=u.left-c+30;de(h,"noclick"),a.value={startMouseLeft:o.clientX,startLeft:u.right-c,startColumnLeft:u.left-c,tableLeft:c};const p=null==d?void 0:d.refs.resizeProxy;p.style.left=`${a.value.startLeft}px`,document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};const m=e=>{const t=e.clientX-a.value.startMouseLeft,i=a.value.startLeft+t;p.style.left=`${Math.max(g,i)}px`},f=()=>{if(r.value){const{startColumnLeft:i,startLeft:n}=a.value,c=Number.parseInt(p.style.left,10)-i;l.width=l.realWidth=c,null==d||d.emit("header-dragend",l.width,n-i,l,o),requestAnimationFrame((()=>{e.store.scheduleLayout(!1,!0)})),document.body.style.cursor="",r.value=!1,s.value=null,a.value={},t("set-drag-visible",!1)}document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",f),document.onselectstart=null,document.ondragstart=null,setTimeout((()=>{he(h,"noclick")}),0)};document.addEventListener("mousemove",m),document.addEventListener("mouseup",f)}},handleMouseMove:(t,i)=>{if(i.children&&i.children.length>0)return;let n=t.target;for(;n&&"TH"!==n.tagName;)n=n.parentNode;if(i&&i.resizable&&!r.value&&e.border){const e=n.getBoundingClientRect(),o=document.body.style;e.width>12&&e.right-t.pageX<8?(o.cursor="col-resize",ce(n,"is-sortable")&&(n.style.cursor="col-resize"),s.value=i):r.value||(o.cursor="",ce(n,"is-sortable")&&(n.style.cursor="pointer"),s.value=null)}},handleMouseOut:()=>{E&&(document.body.style.cursor="")},handleSortClick:l,handleFilterClick:o}}(e,t),{getHeaderRowStyle:f,getHeaderRowClass:_,getHeaderCellStyle:v,getHeaderCellClass:b}=function(e){const t=an(Hu),i=o("table");return{getHeaderRowStyle:e=>{const i=null==t?void 0:t.props.headerRowStyle;return"function"==typeof i?i.call(null,{rowIndex:e}):i},getHeaderRowClass:e=>{const i=[],n=null==t?void 0:t.props.headerRowClassName;return"string"==typeof n?i.push(n):"function"==typeof n&&i.push(n.call(null,{rowIndex:e})),i.join(" ")},getHeaderCellStyle:(i,n,o,s)=>{var r;let a=null!=(r=null==t?void 0:t.props.headerCellStyle)?r:{};"function"==typeof a&&(a=a.call(null,{rowIndex:i,columnIndex:n,row:o,column:s}));const l=s.isSubColumn?null:xu(n,s.fixed,e.store,o);return Su(l,"left"),Su(l,"right"),Object.assign({},a,l)},getHeaderCellClass:(n,o,s,r)=>{const a=r.isSubColumn?[]:Cu(i.b(),o,r.fixed,e.store,s),l=[r.id,r.order,r.headerAlign,r.className,r.labelClassName,...a];r.children||l.push("is-leaf"),r.sortable&&l.push("is-sortable");const d=null==t?void 0:t.props.headerCellClassName;return"string"==typeof d?l.push(d):"function"==typeof d&&l.push(d.call(null,{rowIndex:n,columnIndex:o,row:s,column:r})),l.push(i.e("cell")),l.filter((e=>Boolean(e))).join(" ")}}}(e),{isGroup:w,toggleAllSelection:C,columnRows:y}=Uu(e);return i.state={onColumnsChange:a,onScrollableChange:l},i.filterPanels=r,{ns:s,filterPanels:r,onColumnsChange:a,onScrollableChange:l,columnRows:y,getHeaderRowClass:_,getHeaderRowStyle:f,getHeaderCellClass:b,getHeaderCellStyle:v,handleHeaderClick:d,handleHeaderContextMenu:c,handleMouseDown:h,handleMouseMove:u,handleMouseOut:g,handleSortClick:p,handleFilterClick:m,isGroup:w,toggleAllSelection:C}},render(){const{ns:e,isGroup:t,columnRows:i,getHeaderCellStyle:n,getHeaderCellClass:o,getHeaderRowClass:s,getHeaderRowStyle:r,handleHeaderClick:a,handleHeaderContextMenu:l,handleMouseDown:d,handleMouseMove:c,handleSortClick:h,handleMouseOut:u,store:g,$parent:p}=this;let m=1;return on("thead",{class:{[e.is("group")]:t}},i.map(((e,t)=>on("tr",{class:s(t),key:t,style:r(t)},e.map(((i,s)=>(i.rowSpan>m&&(m=i.rowSpan),on("th",{class:o(t,s,e,i),colspan:i.colSpan,key:`${i.id}-thead`,rowspan:i.rowSpan,style:n(t,s,e,i),onClick:e=>a(e,i),onContextmenu:e=>l(e,i),onMousedown:e=>d(e,i),onMousemove:e=>c(e,i),onMouseout:u},[on("div",{class:["cell",i.filteredValue&&i.filteredValue.length>0?"highlight":"",i.labelClassName]},[i.renderHeader?i.renderHeader({column:i,$index:s,store:g,_self:p}):i.label,i.sortable&&on("span",{onClick:e=>h(e,i),class:"caret-wrapper"},[on("i",{onClick:e=>h(e,i,"ascending"),class:"sort-caret ascending"}),on("i",{onClick:e=>h(e,i,"descending"),class:"sort-caret descending"})]),i.filterable&&on(Wu,{store:g,placement:i.filterPlacement||"bottom-start",column:i,upDataColumn:(e,t)=>{i[e]=t}})])]))))))))}});function Ku(e){const t=an(Hu),i=ai(""),n=ai(on("div")),o=(i,n,o)=>{var s;const r=t,a=au(i);let l;const d=null==(s=null==r?void 0:r.vnode.el)?void 0:s.dataset.prefix;a&&(l=hu({columns:e.store.states.columns.value},a,d),l&&(null==r||r.emit(`cell-${o}`,n,l,a,i))),null==r||r.emit(`row-${o}`,n,l,i)},s=z((t=>{e.store.commit("setHoverRow",t)}),30);return{handleDoubleClick:(e,t)=>{o(e,t,"dblclick")},handleClick:(t,i)=>{e.store.commit("setCurrentRow",i),o(t,i,"click")},handleContextMenu:(e,t)=>{o(e,t,"contextmenu")},handleMouseEnter:s,handleMouseLeave:z((()=>{e.store.commit("setHoverRow",null)}),30),handleCellMouseEnter:(i,n)=>{var o;const s=t,r=au(i),a=null==(o=null==s?void 0:s.vnode.el)?void 0:o.dataset.prefix;if(r){const t=hu({columns:e.store.states.columns.value},r,a),o=s.hoverState={cell:r,column:t,row:n};null==s||s.emit("cell-mouse-enter",o.row,o.column,o.cell,i)}const d=i.target.querySelector(".cell");if(!ce(d,`${a}-tooltip`)||!d.childNodes.length)return;const c=document.createRange();c.setStart(d,0),c.setEnd(d,d.childNodes.length);(c.getBoundingClientRect().width+((Number.parseInt(ue(d,"paddingLeft"),10)||0)+(Number.parseInt(ue(d,"paddingRight"),10)||0))>d.offsetWidth||d.scrollWidth>d.offsetWidth)&&function(e,t,i,n,o){const{nextZIndex:s}=re(),r=null==e?void 0:e.dataset.prefix,a=null==e?void 0:e.querySelector(`.${r}-scrollbar__wrap`);function d(){c&&c.update()}bu=()=>{try{c&&c.destroy(),h&&(null==e||e.removeChild(h)),G(t,"mouseenter",d),G(t,"mouseleave",bu),a&&G(a,"scroll",bu),bu=void 0}catch(i){}};let c=null;const h=function(){const t="light"===o,n=document.createElement("div");return n.className=`${r}-popper ${t?"is-light":"is-dark"}`,i=ru(i),n.innerHTML=i,n.style.zIndex=String(s()),null==e||e.appendChild(n),n}(),u=function(){const e=document.createElement("div");return e.className=`${r}-popper__arrow`,e}();h.appendChild(u),c=ae(t,h,{strategy:"absolute",modifiers:[{name:"offset",options:{offset:[0,8]}},{name:"arrow",options:{element:u,padding:10}}],...n}),l(t,"mouseenter",d),l(t,"mouseleave",bu),a&&l(a,"scroll",bu)}(null==t?void 0:t.refs.tableWrapper,r,r.innerText||r.textContent,{placement:"top",strategy:"fixed"},n.tooltipEffect)},handleCellMouseLeave:e=>{if(!au(e))return;const i=null==t?void 0:t.hoverState;null==t||t.emit("cell-mouse-leave",null==i?void 0:i.row,null==i?void 0:i.column,null==i?void 0:i.cell,e)},tooltipContent:i,tooltipTrigger:n}}function qu(e){const t=an(Hu),i=o("table"),{handleDoubleClick:n,handleClick:s,handleContextMenu:r,handleMouseEnter:a,handleMouseLeave:l,handleCellMouseEnter:d,handleCellMouseLeave:c,tooltipContent:h,tooltipTrigger:u}=Ku(e),{getRowStyle:g,getRowClass:p,getCellStyle:m,getCellClass:f,getSpan:_,getColspanRealWidth:v}=function(e){const t=an(Hu),i=o("table");return{getRowStyle:(e,i)=>{const n=null==t?void 0:t.props.rowStyle;return"function"==typeof n?n.call(null,{row:e,rowIndex:i}):n||null},getRowClass:(n,o)=>{const s=[i.e("row")];(null==t?void 0:t.props.highlightCurrentRow)&&n===e.store.states.currentRow.value&&s.push("current-row"),e.stripe&&o%2==1&&s.push(i.em("row","striped"));const r=null==t?void 0:t.props.rowClassName;return"string"==typeof r?s.push(r):"function"==typeof r&&s.push(r.call(null,{row:n,rowIndex:o})),s},getCellStyle:(i,n,o,s)=>{const r=null==t?void 0:t.props.cellStyle;let a=null!=r?r:{};"function"==typeof r&&(a=r.call(null,{rowIndex:i,columnIndex:n,row:o,column:s}));const l=s.isSubColumn?null:xu(n,null==e?void 0:e.fixed,e.store);return Su(l,"left"),Su(l,"right"),Object.assign({},a,l)},getCellClass:(n,o,s,r)=>{const a=r.isSubColumn?[]:Cu(i.b(),o,null==e?void 0:e.fixed,e.store),l=[r.id,r.align,r.className,...a],d=null==t?void 0:t.props.cellClassName;return"string"==typeof d?l.push(d):"function"==typeof d&&l.push(d.call(null,{rowIndex:n,columnIndex:o,row:s,column:r})),l.push(i.e("cell")),l.filter((e=>Boolean(e))).join(" ")},getSpan:(e,i,n,o)=>{let s=1,r=1;const a=null==t?void 0:t.props.spanMethod;if("function"==typeof a){const t=a({row:e,column:i,rowIndex:n,columnIndex:o});Array.isArray(t)?(s=t[0],r=t[1]):"object"==typeof t&&(s=t.rowspan,r=t.colspan)}return{rowspan:s,colspan:r}},getColspanRealWidth:(e,t,i)=>{if(t<1)return e[i].realWidth;const n=e.map((({realWidth:e,width:t})=>e||t)).slice(i,i+t);return Number(n.reduce(((e,t)=>Number(e)+Number(t)),-1))}}}(e),b=Pi((()=>e.store.states.columns.value.findIndex((({type:e})=>"default"===e)))),w=(e,i)=>{const n=t.props.rowKey;return n?uu(e,n):i},C=(o,h,u,C=!1)=>{const{tooltipEffect:x,store:S}=e,{indent:k,columns:D}=S.states,L=p(o,h);let N=!0;u&&(L.push(i.em("row",`level-${u.level}`)),N=u.display);return on("tr",{style:[N?null:{display:"none"},g(o,h)],class:L,key:w(o,h),onDblclick:e=>n(e,o),onClick:e=>s(e,o),onContextmenu:e=>r(e,o),onMouseenter:()=>a(h),onMouseleave:l},D.value.map(((i,n)=>{const{rowspan:s,colspan:r}=_(o,i,h,n);if(!s||!r)return null;const a={...i};a.realWidth=v(D.value,r,n);const l={store:e.store,_self:e.context||t,column:a,row:o,$index:h,cellIndex:n,expanded:C};n===b.value&&u&&(l.treeNode={indent:u.level*k.value,level:u.level},"boolean"==typeof u.expanded&&(l.treeNode.expanded=u.expanded,"loading"in u&&(l.treeNode.loading=u.loading),"noLazyChildren"in u&&(l.treeNode.noLazyChildren=u.noLazyChildren)));const g=`${h},${n}`,p=a.columnKey||a.rawColumnKey||"",w=y(n,i,l);return on("td",{style:m(h,n,o,i),class:f(h,n,o,i),key:`${p}${g}`,rowspan:s,colspan:r,onMouseenter:e=>d(e,{...o,tooltipEffect:x}),onMouseleave:c},[w])})))},y=(e,t,i)=>t.renderCell(i);return{wrappedRowRender:(i,n)=>{const o=e.store,{isRowExpanded:s,assertRowKey:r}=o,{treeData:a,lazyTreeNodeMap:l,childrenColumnName:d,rowKey:c}=o.states,h=o.states.columns.value;if(h.some((({type:e})=>"expand"===e))){const e=s(i),r=C(i,n,void 0,e),a=t.renderExpanded;return e?a?[[r,on("tr",{key:`expanded-row__${r.key}`},[on("td",{colspan:h.length,class:"el-table__cell el-table__expanded-cell"},[a({row:i,$index:n,store:o,expanded:e})])])]]:r:[[r]]}if(Object.keys(a.value).length){r();const e=uu(i,c.value);let t=a.value[e],o=null;t&&(o={expanded:t.expanded,level:t.level,display:!0},"boolean"==typeof t.lazy&&("boolean"==typeof t.loaded&&t.loaded&&(o.noLazyChildren=!(t.children&&t.children.length)),o.loading=t.loading));const s=[C(i,n,o)];if(t){let o=0;const r=(e,i)=>{e&&e.length&&i&&e.forEach((e=>{const h={display:i.display&&i.expanded,level:i.level+1,expanded:!1,noLazyChildren:!1,loading:!1},u=uu(e,c.value);if(null==u)throw new Error("For nested data item, row-key is required.");if(t={...a.value[u]},t&&(h.expanded=t.expanded,t.level=t.level||h.level,t.display=!(!t.expanded||!h.display),"boolean"==typeof t.lazy&&("boolean"==typeof t.loaded&&t.loaded&&(h.noLazyChildren=!(t.children&&t.children.length)),h.loading=t.loading)),o++,s.push(C(e,n+o,h)),t){const i=l.value[u]||e[d.value];r(i,t)}}))};t.display=!0;const h=l.value[e]||i[d.value];r(h,t)}return s}return C(i,n,void 0)},tooltipContent:h,tooltipTrigger:u}}const Gu={store:{required:!0,type:Object},stripe:Boolean,tooltipEffect:String,context:{default:()=>({}),type:Object},rowClassName:[String,Function],rowStyle:[Object,Function],fixed:{type:String,default:""},highlight:Boolean};var Zu=Zi({name:"ElTableBody",props:Gu,setup(e){const t=en(),i=an(Hu),n=o("table"),{wrappedRowRender:s,tooltipContent:r,tooltipTrigger:a}=qu(e),{onColumnsChange:l,onScrollableChange:d}=zu(i);return Qn(e.store.states.hoverRow,((i,o)=>{if(!e.store.states.isComplex.value||!E)return;let s=window.requestAnimationFrame;s||(s=e=>window.setTimeout(e,16)),s((()=>{var e;const s=null==(e=null==t?void 0:t.vnode.el)?void 0:e.querySelectorAll(`.${n.e("row")}`),r=s[o],a=s[i];r&&he(r,"hover-row"),a&&de(a,"hover-row")}))})),Sn((()=>{var e;null==(e=bu)||e()})),kn((()=>{var e;null==(e=bu)||e()})),{ns:n,onColumnsChange:l,onScrollableChange:d,wrappedRowRender:s,tooltipContent:r,tooltipTrigger:a}},render(){const{wrappedRowRender:e,store:t}=this,i=t.states.data.value||[];return on("tbody",{},[i.reduce(((t,i)=>t.concat(e(i,t.length))),[])])}});function Yu(e){const t="auto"===e.tableLayout;let i=e.columns||[];t&&i.every((e=>void 0===e.width))&&(i=[]);return on("colgroup",{},i.map((i=>on("col",(i=>{const n={key:`${e.tableLayout}_${i.id}`,style:{},name:void 0};return t?n.style={width:`${i.width}px`}:n.name=i.id,n})(i)))))}function Xu(e){const{columns:t}=function(){const e=an(Hu),t=null==e?void 0:e.store;return{leftFixedLeafCount:Pi((()=>t.states.fixedLeafColumnsLength.value)),rightFixedLeafCount:Pi((()=>t.states.rightFixedColumns.value.length)),columnsCount:Pi((()=>t.states.columns.value.length)),leftFixedCount:Pi((()=>t.states.fixedColumns.value.length)),rightFixedCount:Pi((()=>t.states.rightFixedColumns.value.length)),columns:t.states.columns}}(),i=o("table");return{getCellClasses:(t,n)=>{const o=t[n],s=[i.e("cell"),o.id,o.align,o.labelClassName,...Cu(i.b(),n,o.fixed,e.store)];return o.className&&s.push(o.className),o.children||s.push(i.is("leaf")),s},getCellStyles:(t,i)=>{const n=xu(i,t.fixed,e.store);return Su(n,"left"),Su(n,"right"),n},columns:t}}Yu.props=["columns","tableLayout"];var Qu=Zi({name:"ElTableFooter",props:{fixed:{type:String,default:""},store:{required:!0,type:Object},summaryMethod:Function,sumText:String,border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(e){const{getCellClasses:t,getCellStyles:i,columns:n}=Xu(e);return{ns:o("table"),getCellClasses:t,getCellStyles:i,columns:n}},render(){const{columns:e,getCellStyles:t,getCellClasses:i,summaryMethod:n,sumText:o,ns:s}=this,r=this.store.states.data.value;let a=[];return n?a=n({columns:e,data:r}):e.forEach(((e,t)=>{if(0===t)return void(a[t]=o);const i=r.map((t=>Number(t[e.property]))),n=[];let s=!0;i.forEach((e=>{if(!Number.isNaN(+e)){s=!1;const t=`${e}`.split(".")[1];n.push(t?t.length:0)}}));const l=Math.max.apply(null,n);a[t]=s?"":i.reduce(((e,t)=>{const i=Number(t);return Number.isNaN(+i)?e:Number.parseFloat((e+t).toFixed(Math.min(l,20)))}),0)})),on("table",{class:s.e("footer"),cellspacing:"0",cellpadding:"0",border:"0"},[Yu({columns:e}),on("tbody",[on("tr",{},[...e.map(((n,o)=>on("td",{key:o,colspan:n.colSpan,rowspan:n.rowSpan,class:i(e,o),style:t(n,o)},[on("div",{class:["cell",n.labelClassName]},[a[o]])])))])])])}});function Ju(e,t,i,n){const o=ai(!1),r=ai(null),a=ai(!1),l=ai({width:null,height:null}),d=ai(!1),c=ai();Jn((()=>{t.setHeight(e.height)})),Jn((()=>{t.setMaxHeight(e.maxHeight)})),Qn((()=>[e.currentRowKey,i.states.rowKey]),(([e,t])=>{fi(t)&&i.setCurrentRowKey(`${e}`)}),{immediate:!0}),Qn((()=>e.data),(e=>{n.store.commit("setData",e)}),{immediate:!0,deep:!0}),Jn((()=>{e.expandRowKeys&&i.setExpandRowKeysAdapter(e.expandRowKeys)}));const h=Pi((()=>e.height||e.maxHeight||i.states.fixedColumns.value.length>0||i.states.rightFixedColumns.value.length>0)),u=Pi((()=>({width:t.bodyWidth.value?`${t.bodyWidth.value}px`:""}))),g=()=>{h.value&&t.updateElsHeight(),t.updateColumnsWidth(),requestAnimationFrame(m)};wn((async()=>{await gn(),i.updateColumns(),_(),requestAnimationFrame(g);const t=n.vnode.el;e.flexible&&t&&t.parentElement&&(t.parentElement.style.minWidth="0"),l.value={width:c.value=t.offsetWidth,height:t.offsetHeight},i.states.columns.value.forEach((e=>{e.filteredValue&&e.filteredValue.length&&n.store.commit("filterChange",{column:e,values:e.filteredValue,silent:!0})})),n.$ready=!0}));const p=e=>{const{tableWrapper:i}=n.refs;((e,i)=>{if(!e)return;const n=Array.from(e.classList).filter((e=>!e.startsWith("is-scrolling-")));n.push(t.scrollX.value?i:"is-scrolling-none"),e.className=n.join(" ")})(i,e)},m=function(){if(!n.refs.scrollBarRef)return;if(!t.scrollX.value){const e="is-scrolling-none";return void((e=>{const{tableWrapper:t}=n.refs;return!(!t||!t.classList.contains(e))})(e)||p(e))}const e=n.refs.scrollBarRef.wrap$;if(!e)return;const{scrollLeft:i,offsetWidth:o,scrollWidth:s}=e,{headerWrapper:r,footerWrapper:a}=n.refs;r&&(r.scrollLeft=i),a&&(a.scrollLeft=i);p(i>=s-o-1?"is-scrolling-right":0===i?"is-scrolling-left":"is-scrolling-middle")},_=()=>{n.refs.scrollBarRef&&(n.refs.scrollBarRef.wrap$&&ge(n.refs.scrollBarRef.wrap$,"scroll",m,{passive:!0}),e.fit?H(n.vnode.el,v):ge(window,"resize",v))},v=()=>{if(!n.$ready)return;let t=!1;const i=n.vnode.el,{width:o,height:s}=l.value,r=c.value=i.offsetWidth;o!==r&&(t=!0);const a=i.offsetHeight;(e.height||h.value)&&s!==a&&(t=!0),t&&(l.value={width:r,height:a},g())},b=f(),w=Pi((()=>{const{bodyWidth:e,scrollY:i,gutterWidth:n}=t;return e.value?e.value-(i.value?n:0)+"px":""})),C=Pi((()=>e.maxHeight?"fixed":e.tableLayout));function y(t,i,n){const o=fu(t),s=e.showHeader?n:0;if(null!==o)return Eo(o)?`calc(${o} - ${i}px - ${s}px)`:o-i-s}const x=Pi((()=>{const i=t.headerHeight.value||0,n=t.bodyHeight.value,o=t.footerHeight.value||0;return e.height?n||void 0:e.maxHeight?y(e.maxHeight,o,i):void 0}));return{isHidden:o,renderExpanded:r,setDragVisible:e=>{a.value=e},isGroup:d,handleMouseLeave:()=>{n.store.commit("setHoverRow",null),n.hoverState&&(n.hoverState=null)},handleHeaderFooterMousewheel:(e,t)=>{const{pixelX:i,pixelY:o}=t;Math.abs(i)>=Math.abs(o)&&(n.refs.bodyWrapper.scrollLeft+=t.pixelX/5)},tableSize:b,bodyHeight:Pi((()=>{const i=t.headerHeight.value||0,n=t.bodyHeight.value,o=t.footerHeight.value||0;if(e.height)return{height:n?`${n}px`:""};if(e.maxHeight){const t=y(e.maxHeight,o,i);if(null!==t)return{"max-height":`${t}${s(t)?"px":""}`}}return{}})),height:x,emptyBlockStyle:Pi((()=>{if(e.data&&e.data.length)return null;let i="100%";return t.appendHeight.value&&(i=`calc(100% - ${t.appendHeight.value}px)`),{width:c.value?`${c.value}px`:"",height:i}})),handleFixedMousewheel:(e,t)=>{const i=n.refs.bodyWrapper;if(Math.abs(t.spinY)>0){const n=i.scrollTop;t.pixelY<0&&0!==n&&e.preventDefault(),t.pixelY>0&&i.scrollHeight-i.clientHeight>n&&e.preventDefault(),i.scrollTop+=Math.ceil(t.pixelY/5)}else i.scrollLeft+=Math.ceil(t.pixelX/5)},fixedHeight:Pi((()=>e.maxHeight?e.showSummary?{bottom:0}:{bottom:t.scrollX.value&&e.data.length?`${t.gutterWidth}px`:""}:e.showSummary?{height:t.tableHeight.value?`${t.tableHeight.value}px`:""}:{height:t.viewportHeight.value?`${t.viewportHeight.value}px`:""})),fixedBodyHeight:Pi((()=>{if(e.height)return{height:t.fixedBodyHeight.value?`${t.fixedBodyHeight.value}px`:""};if(e.maxHeight){let i=fu(e.maxHeight);if("number"==typeof i)return i=t.scrollX.value?i-t.gutterWidth:i,e.showHeader&&(i-=t.headerHeight.value),i-=t.footerHeight.value,{"max-height":`${i}px`}}return{}})),resizeProxyVisible:a,bodyWidth:w,resizeState:l,doLayout:g,tableBodyStyles:u,tableLayout:C,scrollbarViewStyle:{display:"block",verticalAlign:"middle"}}}var eg={data:{type:Array,default:()=>[]},size:String,width:[String,Number],height:[String,Number],maxHeight:[String,Number],fit:{type:Boolean,default:!0},stripe:Boolean,border:Boolean,rowKey:[String,Function],showHeader:{type:Boolean,default:!0},showSummary:Boolean,sumText:String,summaryMethod:Function,rowClassName:[String,Function],rowStyle:[Object,Function],cellClassName:[String,Function],cellStyle:[Object,Function],headerRowClassName:[String,Function],headerRowStyle:[Object,Function],headerCellClassName:[String,Function],headerCellStyle:[Object,Function],highlightCurrentRow:Boolean,currentRowKey:[String,Number],emptyText:String,expandRowKeys:Array,defaultExpandAll:Boolean,defaultSort:Object,tooltipEffect:String,spanMethod:Function,selectOnIndeterminate:{type:Boolean,default:!0},indent:{type:Number,default:16},treeProps:{type:Object,default:()=>({hasChildren:"hasChildren",children:"children"})},lazy:Boolean,load:Function,style:{type:Object,default:()=>({})},className:{type:String,default:""},tableLayout:{type:String,default:"fixed"},scrollbarAlwaysOn:{type:Boolean,default:!1},flexible:Boolean};let tg=1;const ig=Zi({name:"ElTable",directives:{Mousewheel:$d},components:{TableHeader:$u,TableBody:Zu,TableFooter:Qu,ElScrollbar:C,hColgroup:Yu},props:eg,emits:["select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-contextmenu","cell-click","cell-dblclick","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change"],setup(e){const{t:t}=y(),i=o("table"),n=en();Nn(Hu,n);const r=Tu(n,e);n.store=r;const a=new Ou({store:n.store,table:n,fit:e.fit,showHeader:e.showHeader});n.layout=a;const l=Pi((()=>0===(r.states.data.value||[]).length)),{setCurrentRow:d,getSelectionRows:c,toggleRowSelection:h,clearSelection:u,clearFilter:g,toggleAllSelection:p,toggleRowExpansion:m,clearSort:f,sort:_}=function(e){return{setCurrentRow:t=>{e.commit("setCurrentRow",t)},getSelectionRows:()=>e.getSelectionRows(),toggleRowSelection:(t,i)=>{e.toggleRowSelection(t,i,!1),e.updateAllSelected()},clearSelection:()=>{e.clearSelection()},clearFilter:t=>{e.clearFilter(t)},toggleAllSelection:()=>{e.commit("toggleAllSelection")},toggleRowExpansion:(t,i)=>{e.toggleRowExpansionAdapter(t,i)},clearSort:()=>{e.clearSort()},sort:(t,i)=>{e.commit("sort",{prop:t,order:i})}}}(r),{isHidden:v,renderExpanded:b,setDragVisible:w,isGroup:C,handleMouseLeave:x,handleHeaderFooterMousewheel:S,tableSize:k,bodyHeight:D,height:L,emptyBlockStyle:N,handleFixedMousewheel:E,fixedHeight:I,fixedBodyHeight:T,resizeProxyVisible:M,bodyWidth:A,resizeState:O,doLayout:R,tableBodyStyles:P,tableLayout:F,scrollbarViewStyle:B}=Ju(e,a,r,n),{scrollBarRef:V,scrollTo:W,setScrollLeft:H,setScrollTop:j}=(()=>{const e=ai(),t=(t,i)=>{const n=e.value;n&&s(i)&&["Top","Left"].includes(t)&&n[`setScroll${t}`](i)};return{scrollBarRef:e,scrollTo:(t,i)=>{const n=e.value;n&&n.scrollTo(t,i)},setScrollTop:e=>t("Top",e),setScrollLeft:e=>t("Left",e)}})(),U=z(R,50),$="el-table_"+tg++;n.tableId=$,n.state={isGroup:C,resizeState:O,doLayout:R,debouncedUpdateLayout:U};const K=Pi((()=>e.sumText||t("el.table.sumText"))),q=Pi((()=>e.emptyText||t("el.table.emptyText")));return{ns:i,layout:a,store:r,handleHeaderFooterMousewheel:S,handleMouseLeave:x,tableId:$,tableSize:k,isHidden:v,isEmpty:l,renderExpanded:b,resizeProxyVisible:M,resizeState:O,isGroup:C,bodyWidth:A,bodyHeight:D,height:L,tableBodyStyles:P,emptyBlockStyle:N,debouncedUpdateLayout:U,handleFixedMousewheel:E,fixedHeight:I,fixedBodyHeight:T,setCurrentRow:d,getSelectionRows:c,toggleRowSelection:h,clearSelection:u,clearFilter:g,toggleAllSelection:p,toggleRowExpansion:m,clearSort:f,doLayout:R,sort:_,t:t,setDragVisible:w,context:n,computedSumText:K,computedEmptyText:q,tableLayout:F,scrollbarViewStyle:B,scrollBarRef:V,scrollTo:W,setScrollLeft:H,setScrollTop:j}}}),ng=["data-prefix"],og={ref:"hiddenColumns",class:"hidden-columns"};var sg=r(ig,[["render",function(e,t,i,n,o,s){const r=On("hColgroup"),a=On("table-header"),l=On("table-body"),d=On("el-scrollbar"),c=On("table-footer"),h=Rn("mousewheel");return Dn(),Vi("div",{ref:"tableWrapper",class:bi([{[e.ns.m("fit")]:e.fit,[e.ns.m("striped")]:e.stripe,[e.ns.m("border")]:e.border||e.isGroup,[e.ns.m("hidden")]:e.isHidden,[e.ns.m("group")]:e.isGroup,[e.ns.m("fluid-height")]:e.maxHeight,[e.ns.m("scrollable-x")]:e.layout.scrollX.value,[e.ns.m("scrollable-y")]:e.layout.scrollY.value,[e.ns.m("enable-row-hover")]:!e.store.states.isComplex.value,[e.ns.m("enable-row-transition")]:0!==(e.store.states.data.value||[]).length&&(e.store.states.data.value||[]).length<100,"has-footer":e.showSummary},e.ns.m(e.tableSize),e.className,e.ns.b(),e.ns.m(`layout-${e.tableLayout}`)]),style:Ci(e.style),"data-prefix":e.ns.namespace.value,onMouseleave:t[0]||(t[0]=t=>e.handleMouseLeave())},[Wi("div",{class:bi(e.ns.e("inner-wrapper"))},[Wi("div",og,[An(e.$slots,"default")],512),e.showHeader&&"fixed"===e.tableLayout?so((Dn(),Vi("div",{key:0,ref:"headerWrapper",class:bi(e.ns.e("header-wrapper"))},[Wi("table",{ref:"tableHeader",class:bi(e.ns.e("header")),style:Ci(e.tableBodyStyles),border:"0",cellpadding:"0",cellspacing:"0"},[qi(r,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),qi(a,{ref:"tableHeaderRef",border:e.border,"default-sort":e.defaultSort,store:e.store,onSetDragVisible:e.setDragVisible},null,8,["border","default-sort","store","onSetDragVisible"])],6)],2)),[[h,e.handleHeaderFooterMousewheel]]):Bi("v-if",!0),Wi("div",{ref:"bodyWrapper",style:Ci(e.bodyHeight),class:bi(e.ns.e("body-wrapper"))},[qi(d,{ref:"scrollBarRef",height:e.maxHeight?void 0:e.height,"max-height":e.maxHeight?e.height:void 0,"view-style":e.scrollbarViewStyle,always:e.scrollbarAlwaysOn},{default:no((()=>[Wi("table",{ref:"tableBody",class:bi(e.ns.e("body")),cellspacing:"0",cellpadding:"0",border:"0",style:Ci({width:e.bodyWidth,tableLayout:e.tableLayout})},[qi(r,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),e.showHeader&&"auto"===e.tableLayout?(Dn(),Fi(a,{key:0,border:e.border,"default-sort":e.defaultSort,store:e.store,onSetDragVisible:e.setDragVisible},null,8,["border","default-sort","store","onSetDragVisible"])):Bi("v-if",!0),qi(l,{context:e.context,highlight:e.highlightCurrentRow,"row-class-name":e.rowClassName,"tooltip-effect":e.tooltipEffect,"row-style":e.rowStyle,store:e.store,stripe:e.stripe},null,8,["context","highlight","row-class-name","tooltip-effect","row-style","store","stripe"])],6),e.isEmpty?(Dn(),Vi("div",{key:0,ref:"emptyBlock",style:Ci(e.emptyBlockStyle),class:bi(e.ns.e("empty-block"))},[Wi("span",{class:bi(e.ns.e("empty-text"))},[An(e.$slots,"empty",{},(()=>[Ki(yi(e.computedEmptyText),1)]))],2)],6)):Bi("v-if",!0),e.$slots.append?(Dn(),Vi("div",{key:1,ref:"appendWrapper",class:bi(e.ns.e("append-wrapper"))},[An(e.$slots,"append")],2)):Bi("v-if",!0)])),_:3},8,["height","max-height","view-style","always"])],6),e.border||e.isGroup?(Dn(),Vi("div",{key:1,class:bi(e.ns.e("border-left-patch"))},null,2)):Bi("v-if",!0)],2),e.showSummary?so((Dn(),Vi("div",{key:0,ref:"footerWrapper",class:bi(e.ns.e("footer-wrapper"))},[qi(c,{border:e.border,"default-sort":e.defaultSort,store:e.store,style:Ci(e.tableBodyStyles),"sum-text":e.computedSumText,"summary-method":e.summaryMethod},null,8,["border","default-sort","store","style","sum-text","summary-method"])],2)),[[Do,!e.isEmpty],[h,e.handleHeaderFooterMousewheel]]):Bi("v-if",!0),so(Wi("div",{ref:"resizeProxy",class:bi(e.ns.e("column-resize-proxy"))},null,2),[[Do,e.resizeProxyVisible]])],46,ng)}],["__file","/home/runner/work/element-plus/element-plus/packages/components/table/src/table.vue"]]);const rg={selection:"table-column--selection",expand:"table__expand-column"},ag={default:{order:""},selection:{width:48,minWidth:48,realWidth:48,order:""},expand:{width:48,minWidth:48,realWidth:48,order:""},index:{width:48,minWidth:48,realWidth:48,order:""}},lg={selection:{renderHeader:({store:e})=>on(dc,{disabled:e.states.data.value&&0===e.states.data.value.length,size:e.states.tableSize.value,indeterminate:e.states.selection.value.length>0&&!e.states.isAllSelected.value,"onUpdate:modelValue":e.toggleAllSelection,modelValue:e.states.isAllSelected.value}),renderCell:({row:e,column:t,store:i,$index:n})=>on(dc,{disabled:!!t.selectable&&!t.selectable.call(null,e,n),size:i.states.tableSize.value,onChange:()=>{i.commit("rowSelectedChanged",e)},onClick:e=>e.stopPropagation(),modelValue:i.isSelected(e)}),sortable:!1,resizable:!1},index:{renderHeader:({column:e})=>e.label||"#",renderCell({column:e,$index:t}){let i=t+1;const n=e.index;return"number"==typeof n?i=t+n:"function"==typeof n&&(i=n(t)),on("div",{},[i])},sortable:!1},expand:{renderHeader:({column:e})=>e.label||"",renderCell({row:e,store:t,expanded:i}){const{ns:n}=t,o=[n.e("expand-icon")];i&&o.push(n.em("expand-icon","expanded"));return on("div",{class:o,onClick:function(i){i.stopPropagation(),t.toggleRowExpansion(e)}},{default:()=>[on(w,null,{default:()=>[on(Qe)]})]})},sortable:!1,resizable:!1}};function dg({row:e,column:t,$index:i}){var n;const o=t.property,s=o&&pe(e,o).value;return t&&t.formatter?t.formatter(e,t,s,i):(null==(n=null==s?void 0:s.toString)?void 0:n.call(s))||""}function cg(e,t){return e.reduce(((e,t)=>(e[t]=t,e)),t)}function hg(e,t,i){const n=en(),s=ai(""),r=ai(!1),a=ai(),l=ai(),d=o("table");Jn((()=>{a.value=e.align?`is-${e.align}`:null,a.value})),Jn((()=>{l.value=e.headerAlign?`is-${e.headerAlign}`:a.value,l.value}));const c=Pi((()=>{let e=n.vnode.vParent||n.parent;for(;e&&!e.tableId&&!e.columnId;)e=e.vnode.vParent||e.parent;return e})),h=Pi((()=>{const{store:e}=n.parent;if(!e)return!1;const{treeData:t}=e.states,i=t.value;return i&&Object.keys(i).length>0})),u=ai(pu(e.width)),g=ai(mu(e.minWidth));return{columnId:s,realAlign:a,isSubColumn:r,realHeaderAlign:l,columnOrTableParent:c,setColumnWidth:e=>(u.value&&(e.width=u.value),g.value&&(e.minWidth=g.value),e.minWidth||(e.minWidth=80),e.realWidth=Number(void 0===e.width?e.minWidth:e.width),e),setColumnForcedProps:e=>{const t=e.type,i=lg[t]||{};Object.keys(i).forEach((t=>{const n=i[t];"className"!==t&&void 0!==n&&(e[t]=n)}));const n=(e=>rg[e]||"")(t);if(n){const t=`${fi(d.namespace)}-${n}`;e.className=e.className?`${e.className} ${t}`:t}return e},setColumnRenders:o=>{e.renderHeader||"selection"!==o.type&&(o.renderHeader=e=>{n.columnConfig.value.label;const i=t.header;return i?i(e):o.label});let s=o.renderCell;const r=h.value;return"expand"===o.type?(o.renderCell=e=>on("div",{class:"cell"},[s(e)]),i.value.renderExpanded=e=>t.default?t.default(e):t.default):(s=s||dg,o.renderCell=e=>{let i=null;if(t.default){const n=t.default(e);i=n.some((e=>e.type!==ki))?n:s(e)}else i=s(e);const a=function({row:e,treeNode:t,store:i},n=!1){const{ns:o}=i;if(!t)return n?[on("span",{class:o.e("placeholder")})]:null;const s=[],r=function(t){t.stopPropagation(),i.loadOrToggle(e)};if(t.indent&&s.push(on("span",{class:o.e("indent"),style:{"padding-left":`${t.indent}px`}})),"boolean"!=typeof t.expanded||t.noLazyChildren)s.push(on("span",{class:o.e("placeholder")}));else{const e=[o.e("expand-icon"),t.expanded?o.em("expand-icon","expanded"):""];let i=Qe;t.loading&&(i=Xe),s.push(on("div",{class:e,onClick:r},{default:()=>[on(w,{class:{[o.is("loading")]:t.loading}},{default:()=>[on(i)]})]}))}return s}(e,r&&0===e.cellIndex),l={class:"cell",style:{}};return o.showOverflowTooltip&&(l.class=`${l.class} ${fi(d.namespace)}-tooltip`,l.style={width:(e.column.realWidth||Number(e.column.width))-1+"px"}),(e=>{function t(e){var t;"ElTableColumn"===(null==(t=null==e?void 0:e.type)?void 0:t.name)&&(e.vParent=n)}Array.isArray(e)?e.forEach((e=>t(e))):t(e)})(i),on("div",l,[a,i])}),o},getPropsData:(...t)=>t.reduce(((t,i)=>(Array.isArray(i)&&i.forEach((i=>{t[i]=e[i]})),t)),{}),getColumnElIndex:(e,t)=>Array.prototype.indexOf.call(e,t)}}var ug={type:{type:String,default:"default"},label:String,className:String,labelClassName:String,property:String,prop:String,width:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},renderHeader:Function,sortable:{type:[Boolean,String],default:!1},sortMethod:Function,sortBy:[String,Function,Array],resizable:{type:Boolean,default:!0},columnKey:String,align:String,headerAlign:String,showTooltipWhenOverflow:Boolean,showOverflowTooltip:Boolean,fixed:[Boolean,String],formatter:Function,selectable:Function,reserveSelection:Boolean,filterMethod:Function,filteredValue:Array,filters:Array,filterPlacement:String,filterMultiple:{type:Boolean,default:!0},index:[Number,Function],sortOrders:{type:Array,default:()=>["ascending","descending",null],validator:e=>e.every((e=>["ascending","descending",null].includes(e)))}};let gg=1;var pg=Zi({name:"ElTableColumn",components:{ElCheckbox:dc},props:ug,setup(e,{slots:t}){const i=en(),n=ai({}),o=Pi((()=>{let e=i.parent;for(;e&&!e.tableId;)e=e.parent;return e})),{registerNormalWatchers:s,registerComplexWatchers:r}=function(e,t){const i=en();return{registerComplexWatchers:()=>{const n={realWidth:"width",realMinWidth:"minWidth"},o=cg(["fixed"],n);Object.keys(o).forEach((o=>{const s=n[o];Ro(t,s)&&Qn((()=>t[s]),(t=>{let n=t;"width"===s&&"realWidth"===o&&(n=pu(t)),"minWidth"===s&&"realMinWidth"===o&&(n=mu(t)),i.columnConfig.value[s]=n,i.columnConfig.value[o]=n;const r="fixed"===s;e.value.store.scheduleLayout(r)}))}))},registerNormalWatchers:()=>{const e={property:"prop",align:"realAlign",headerAlign:"realHeaderAlign"},n=cg(["label","filters","filterMultiple","sortable","index","formatter","className","labelClassName","showOverflowTooltip"],e);Object.keys(n).forEach((n=>{const o=e[n];Ro(t,o)&&Qn((()=>t[o]),(e=>{i.columnConfig.value[n]=e}))}))}}}(o,e),{columnId:a,isSubColumn:l,realHeaderAlign:d,columnOrTableParent:c,setColumnWidth:h,setColumnForcedProps:u,setColumnRenders:g,getPropsData:p,getColumnElIndex:m,realAlign:f}=hg(e,t,o),_=c.value;a.value=`${_.tableId||_.columnId}_column_${gg++}`,mn((()=>{l.value=o.value!==_;const t=e.type||"default",c=""===e.sortable||e.sortable,m={...ag[t],id:a.value,type:t,property:e.prop||e.property,align:f,headerAlign:d,showOverflowTooltip:e.showOverflowTooltip||e.showTooltipWhenOverflow,filterable:e.filters||e.filterMethod,filteredValue:[],filterPlacement:"",isColumnGroup:!1,isSubColumn:!1,filterOpened:!1,sortable:c,index:e.index,rawColumnKey:i.vnode.key};let v=p(["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],["sortMethod","sortBy","sortOrders"],["selectable","reserveSelection"],["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement"]);v=function(e,t){const i={};let n;for(n in e)i[n]=e[n];for(n in t)if(Ro(t,n)){const e=t[n];void 0!==e&&(i[n]=e)}return i}(m,v);const b=function(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce(((e,t)=>(...i)=>e(t(...i))))}(g,h,u);v=b(v),n.value=v,s(),r()})),wn((()=>{var e;const t=c.value,s=l.value?t.vnode.el.children:null==(e=t.refs.hiddenColumns)?void 0:e.children,r=()=>m(s||[],i.vnode.el);n.value.getColumnIndex=r;r()>-1&&o.value.store.commit("insertColumn",n.value,l.value?t.columnConfig.value:null)})),fn((()=>{o.value.store.commit("removeColumn",n.value,l.value?_.columnConfig.value:null)})),i.columnId=a.value,i.columnConfig=n},render(){var e,t,i;try{const n=null==(t=(e=this.$slots).default)?void 0:t.call(e,{row:{},column:{},$index:-1}),o=[];if(Array.isArray(n))for(const e of n)"ElTableColumn"===(null==(i=e.type)?void 0:i.name)||2&e.shapeFlag?o.push(e):e.type===Di&&Array.isArray(e.children)&&e.children.forEach((e=>{1024===(null==e?void 0:e.patchFlag)||Eo(null==e?void 0:e.children)||o.push(e)}));return on("div",o)}catch(n){return on("div",[])}}});const mg=a(sg,{TableColumn:pg}),fg=v(pg),_g=n({tabs:{type:U(Array),default:()=>$([])}}),vg=Zi({name:"ElTabBar",props:_g,setup(e,{expose:t}){const i=e,n=en(),s=an(pd);s||se("ElTabBar","");const r=o("tabs"),a=ai(),l=ai(),d=()=>l.value=(()=>{let e=0,t=0;const o=["top","bottom"].includes(s.props.tabPosition)?"width":"height",r="width"===o?"x":"y";return i.tabs.every((s=>{var a,l,d,c;const h=null==(l=null==(a=n.parent)?void 0:a.refs)?void 0:l[`tab-${s.paneName}`];if(!h)return!1;if(!s.active)return!0;t=h[`client${vi(o)}`];const u="x"===r?"left":"top";e=h.getBoundingClientRect()[u]-(null!=(c=null==(d=h.parentElement)?void 0:d.getBoundingClientRect()[u])?c:0);const g=window.getComputedStyle(h);return"width"===o&&(i.tabs.length>1&&(t-=Number.parseFloat(g.paddingLeft)+Number.parseFloat(g.paddingRight)),e+=Number.parseFloat(g.paddingLeft)),!1})),{[o]:`${t}px`,transform:`translate${vi(r)}(${e}px)`}})();return Qn((()=>i.tabs),(async()=>{await gn(),d()}),{immediate:!0}),H(a,(()=>d())),t({ref:a,update:d}),(e,t)=>(Dn(),Vi("div",{ref_key:"barRef",ref:a,class:bi([fi(r).e("active-bar"),fi(r).is(fi(s).props.tabPosition)]),style:Ci(l.value)},null,6))}});var bg=r(vg,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tabs/src/tab-bar.vue"]]);const wg=n({panes:{type:U(Array),default:()=>$([])},currentName:{type:[String,Number],default:""},editable:Boolean,onTabClick:{type:U(Function),default:Ao},onTabRemove:{type:U(Function),default:Ao},type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean}),Cg="ElTabNav",yg=Zi({name:Cg,props:wg,setup(e,{expose:t}){const i=en(),n=an(pd);n||se(Cg,"");const s=o("tabs"),r=me(),a=fe(),l=ai(),d=ai(),c=ai(),h=ai(!1),u=ai(0),g=ai(!1),p=ai(!0),m=Pi((()=>["top","bottom"].includes(n.props.tabPosition)?"width":"height")),f=Pi((()=>({transform:`translate${"width"===m.value?"X":"Y"}(-${u.value}px)`}))),_=()=>{if(!l.value)return;const e=l.value[`offset${vi(m.value)}`],t=u.value;if(!t)return;const i=t>e?t-e:0;u.value=i},v=()=>{if(!l.value||!d.value)return;const e=d.value[`offset${vi(m.value)}`],t=l.value[`offset${vi(m.value)}`],i=u.value;if(e-i<=t)return;const n=e-i>2*t?i+t:e-t;u.value=n},b=async()=>{const e=d.value;if(!(h.value&&c.value&&l.value&&e))return;await gn();const t=c.value.querySelector(".is-active");if(!t)return;const i=l.value,o=["top","bottom"].includes(n.props.tabPosition),s=t.getBoundingClientRect(),r=i.getBoundingClientRect(),a=o?e.offsetWidth-r.width:e.offsetHeight-r.height,g=u.value;let p=g;o?(s.leftr.right&&(p=g+s.right-r.right)):(s.topr.bottom&&(p=g+(s.bottom-r.bottom))),p=Math.max(p,0),u.value=Math.min(p,a)},C=()=>{if(!d.value||!l.value)return;const e=d.value[`offset${vi(m.value)}`],t=l.value[`offset${vi(m.value)}`],i=u.value;if(t0&&(u.value=0)},y=e=>{const t=e.code,{up:i,down:n,left:o,right:s}=T;if(![i,n,o,s].includes(t))return;const r=Array.from(e.currentTarget.querySelectorAll("[role=tab]")),a=r.indexOf(e.target);let l;l=t===o||t===i?0===a?r.length-1:a-1:a{p.value&&(g.value=!0)},S=()=>g.value=!1;return Qn(r,(e=>{"hidden"===e?p.value=!1:"visible"===e&&setTimeout((()=>p.value=!0),50)})),Qn(a,(e=>{e?setTimeout((()=>p.value=!0),50):p.value=!1})),H(c,C),wn((()=>setTimeout((()=>b()),0))),kn((()=>C())),t({scrollToActiveTab:b,removeFocus:S}),Qn((()=>e.panes),(()=>i.update()),{flush:"post"}),()=>{const t=h.value?[qi("span",{class:[s.e("nav-prev"),s.is("disabled",!h.value.prev)],onClick:_},[qi(w,null,{default:()=>[qi(lt,null,null)]})]),qi("span",{class:[s.e("nav-next"),s.is("disabled",!h.value.next)],onClick:v},[qi(w,null,{default:()=>[qi(Qe,null,null)]})])]:null,i=e.panes.map(((t,i)=>{var o,r,a,l;const d=null!=(r=null!=(o=t.props.name)?o:t.index)?r:`${i}`,c=t.isClosable||e.editable;t.index=`${i}`;const h=c?qi(w,{class:"is-icon-close",onClick:i=>e.onTabRemove(t,i)},{default:()=>[qi(tt,null,null)]}):null,u=(null==(l=(a=t.slots).label)?void 0:l.call(a))||t.props.label,p=t.active?0:-1;return qi("div",{ref:`tab-${d}`,class:[s.e("item"),s.is(n.props.tabPosition),s.is("active",t.active),s.is("disabled",t.props.disabled),s.is("closable",c),s.is("focus",g.value)],id:`tab-${d}`,key:`tab-${d}`,"aria-controls":`pane-${d}`,role:"tab","aria-selected":t.active,tabindex:p,onFocus:()=>x(),onBlur:()=>S(),onClick:i=>{S(),e.onTabClick(t,d,i)},onKeydown:i=>{!c||i.code!==T.delete&&i.code!==T.backspace||e.onTabRemove(t,i)}},[u,h])}));return qi("div",{ref:c,class:[s.e("nav-wrap"),s.is("scrollable",!!h.value),s.is(n.props.tabPosition)]},[t,qi("div",{class:s.e("nav-scroll"),ref:l},[qi("div",{class:[s.e("nav"),s.is(n.props.tabPosition),s.is("stretch",e.stretch&&["top","bottom"].includes(n.props.tabPosition))],ref:d,style:f.value,role:"tablist",onKeydown:y},[e.type?null:qi(bg,{tabs:[...e.panes]},null),i])])])}}}),xg=n({type:{type:String,values:["card","border-card",""],default:""},activeName:{type:[String,Number]},closable:Boolean,addable:Boolean,modelValue:{type:[String,Number]},editable:Boolean,tabPosition:{type:String,values:["top","right","bottom","left"],default:"top"},beforeLeave:{type:U(Function),default:()=>!0},stretch:Boolean}),Sg=e=>Eo(e)||s(e);var kg=Zi({name:"ElTabs",props:xg,emits:{[p]:e=>Sg(e),"tab-click":(e,t)=>t instanceof Event,"tab-change":e=>Sg(e),edit:(e,t)=>["remove","add"].includes(t),"tab-remove":e=>Sg(e),"tab-add":()=>!0},setup(e,{emit:t,slots:i,expose:n}){var s,r;const a=o("tabs"),l=ai(),d=si({}),c=ai(null!=(r=null!=(s=e.modelValue)?s:e.activeName)?r:"0"),h=async i=>{var n,o,s;if(c.value!==i&&!k(i))try{!1!==await(null==(n=e.beforeLeave)?void 0:n.call(e,i,c.value))&&((e=>{c.value=e,t(p,e),t("tab-change",e)})(i),null==(s=null==(o=l.value)?void 0:o.removeFocus)||s.call(o))}catch(r){}},u=(e,i,n)=>{e.props.disabled||(h(i),t("tab-click",e,n))},g=(e,i)=>{e.props.disabled||k(e.props.name)||(i.stopPropagation(),t("edit",e.props.name,"remove"),t("tab-remove",e.props.name))},m=()=>{t("edit",void 0,"add"),t("tab-add")};ne({from:'"activeName"',replacement:'"model-value" or "v-model"',scope:"ElTabs",version:"2.3.0",ref:"https://element-plus.org/en-US/component/tabs.html#attributes",type:"Attribute"},Pi((()=>!!e.activeName))),Qn((()=>e.activeName),(e=>h(e))),Qn((()=>e.modelValue),(e=>h(e))),Qn(c,(async()=>{var e;await gn(),null==(e=l.value)||e.scrollToActiveTab()}));{const t=e=>delete d[e];Nn(pd,{props:e,currentName:c,registerPane:e=>d[e.uid]=e,unregisterPane:t})}return n({currentName:c}),()=>{const t=e.editable||e.addable?qi("span",{class:a.e("new-tab"),tabindex:"0",onClick:m,onKeydown:e=>{e.code===T.enter&&m()}},[qi(w,{class:a.is("icon-plus")},{default:()=>[qi(ot,null,null)]})]):null,n=qi("div",{class:[a.e("header"),a.is(e.tabPosition)]},[t,qi(yg,{ref:l,currentName:c.value,editable:e.editable,type:e.type,panes:Object.values(d),stretch:e.stretch,onTabClick:u,onTabRemove:g},null)]),o=qi("div",{class:a.e("content")},[An(i,"default")]);return qi("div",{class:[a.b(),a.m(e.tabPosition),{[a.m("card")]:"card"===e.type,[a.m("border-card")]:"border-card"===e.type}]},[..."bottom"!==e.tabPosition?[n,o]:[o,n]])}}});const Dg=n({label:{type:String,default:""},name:{type:[String,Number]},closable:Boolean,disabled:Boolean,lazy:Boolean}),Lg=["id","aria-hidden","aria-labelledby"],Ng=Zi({name:"ElTabPane",props:Dg,setup(e){const t=e,i=en(),n=Gn(),s=an(pd);s||se("ElTabPane","usage: ");const r=o("tab-pane"),a=ai(),l=Pi((()=>t.closable||s.props.closable)),d=_e((()=>{var e;return s.currentName.value===(null!=(e=t.name)?e:a.value)})),c=ai(d.value),h=Pi((()=>{var e;return null!=(e=t.name)?e:a.value})),u=_e((()=>!t.lazy||c.value||d.value));Qn(d,(e=>{e&&(c.value=!0)}));const g=si({uid:i.uid,slots:n,props:t,paneName:h,active:d,index:a,isClosable:l});return wn((()=>{s.registerPane(g)})),Sn((()=>{s.unregisterPane(g.uid)})),(e,t)=>fi(u)?so((Dn(),Vi("div",{key:0,id:`pane-${fi(h)}`,class:bi(fi(r).b()),role:"tabpanel","aria-hidden":!fi(d),"aria-labelledby":`tab-${fi(h)}`},[An(e.$slots,"default")],10,Lg)),[[Do,fi(d)]]):Bi("v-if",!0)}});var Eg=r(Ng,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tabs/src/tab-pane.vue"]]);const Ig=a(kg,{TabPane:Eg}),Tg=v(Eg),Mg="$treeNodeId",Ag=function(e,t){t&&!t[Mg]&&Object.defineProperty(t,Mg,{value:e.id,enumerable:!1,configurable:!1,writable:!1})},Og=function(e,t){return e?t[e]:t[Mg]},Rg=e=>{let t=!0,i=!0,n=!0;for(let o=0,s=e.length;o0&&e.lazy&&e.defaultExpandAll&&this.expand(),Array.isArray(this.data)||Ag(this,this.data),!this.data)return;const i=e.defaultExpandedKeys,n=e.key;n&&i&&i.includes(this.key)&&this.expand(null,e.autoExpandParent),n&&void 0!==e.currentNodeKey&&this.key===e.currentNodeKey&&(e.currentNode=this,e.currentNode.isCurrent=!0),e.lazy&&e._initDefaultCheckedNode(this),this.updateLeafState(),!this.parent||1!==this.level&&!0!==this.parent.expanded||(this.canFocus=!0)}setData(e){let t;Array.isArray(e)||Ag(this,e),this.data=e,this.childNodes=[],t=0===this.level&&Array.isArray(this.data)?this.data:Fg(this,"children")||[];for(let i=0,n=t.length;i-1)return e.childNodes[t+1]}return null}get previousSibling(){const e=this.parent;if(e){const t=e.childNodes.indexOf(this);if(t>-1)return t>0?e.childNodes[t-1]:null}return null}contains(e,t=!0){return(this.childNodes||[]).some((i=>i===e||t&&i.contains(e)))}remove(){const e=this.parent;e&&e.removeChild(this)}insertChild(e,t,i){if(!e)throw new Error("InsertChild error: child is required.");if(!(e instanceof Vg)){if(!i){const i=this.getChildren(!0);i.includes(e.data)||(void 0===t||t<0?i.push(e.data):i.splice(t,0,e.data))}Object.assign(e,{parent:this,store:this.store}),(e=si(new Vg(e)))instanceof Vg&&e.initialize()}e.level=this.level+1,void 0===t||t<0?this.childNodes.push(e):this.childNodes.splice(t,0,e),this.updateLeafState()}insertBefore(e,t){let i;t&&(i=this.childNodes.indexOf(t)),this.insertChild(e,i)}insertAfter(e,t){let i;t&&(i=this.childNodes.indexOf(t),-1!==i&&(i+=1)),this.insertChild(e,i)}removeChild(e){const t=this.getChildren()||[],i=t.indexOf(e.data);i>-1&&t.splice(i,1);const n=this.childNodes.indexOf(e);n>-1&&(this.store&&this.store.deregisterNode(e),e.parent=null,this.childNodes.splice(n,1)),this.updateLeafState()}removeChildByData(e){let t=null;for(let i=0;i{if(t){let e=this.parent;for(;e.level>0;)e.expanded=!0,e=e.parent}this.expanded=!0,e&&e(),this.childNodes.forEach((e=>{e.canFocus=!0}))};this.shouldLoadData()?this.loadData((e=>{Array.isArray(e)&&(this.checked?this.setChecked(!0,!0):this.store.checkStrictly||Pg(this),i())})):i()}doCreateChildren(e,t={}){e.forEach((e=>{this.insertChild(Object.assign({data:e},t),void 0,!0)}))}collapse(){this.expanded=!1,this.childNodes.forEach((e=>{e.canFocus=!1}))}shouldLoadData(){return!0===this.store.lazy&&this.store.load&&!this.loaded}updateLeafState(){if(!0===this.store.lazy&&!0!==this.loaded&&void 0!==this.isLeafByUser)return void(this.isLeaf=this.isLeafByUser);const e=this.childNodes;!this.store.lazy||!0===this.store.lazy&&!0===this.loaded?this.isLeaf=!e||0===e.length:this.isLeaf=!1}setChecked(e,t,i,n){if(this.indeterminate="half"===e,this.checked=!0===e,this.store.checkStrictly)return;if(!this.shouldLoadData()||this.store.checkDescendants){const{all:i,allWithoutDisable:o}=Rg(this.childNodes);this.isLeaf||i||!o||(this.checked=!1,e=!1);const s=()=>{if(t){const i=this.childNodes;for(let r=0,a=i.length;r{s(),Pg(this)}),{checked:!1!==e});s()}const o=this.parent;o&&0!==o.level&&(i||Pg(o))}getChildren(e=!1){if(0===this.level)return this.data;const t=this.data;if(!t)return null;const i=this.store.props;let n="children";return i&&(n=i.children||"children"),void 0===t[n]&&(t[n]=null),e&&!t[n]&&(t[n]=[]),t[n]}updateChildren(){const e=this.getChildren()||[],t=this.childNodes.map((e=>e.data)),i={},n=[];e.forEach(((e,o)=>{const s=e[Mg];!!s&&t.findIndex((e=>e[Mg]===s))>=0?i[s]={index:o,data:e}:n.push({index:o,data:e})})),this.store.lazy||t.forEach((e=>{i[e[Mg]]||this.removeChildByData(e)})),n.forEach((({index:e,data:t})=>{this.insertChild({data:t},e)})),this.updateLeafState()}loadData(e,t={}){if(!0!==this.store.lazy||!this.store.load||this.loaded||this.loading&&!Object.keys(t).length)e&&e.call(this);else{this.loading=!0;const i=i=>{this.loaded=!0,this.loading=!1,this.childNodes=[],this.doCreateChildren(i,t),this.updateLeafState(),e&&e.call(this,i)};this.store.load(this,i)}}}class Wg{constructor(e){this.currentNode=null,this.currentNodeKey=null;for(const t in e)Ro(e,t)&&(this[t]=e[t]);this.nodesMap={}}initialize(){if(this.root=new Vg({data:this.data,store:this}),this.root.initialize(),this.lazy&&this.load){(0,this.load)(this.root,(e=>{this.root.doCreateChildren(e),this._initDefaultCheckedNodes()}))}else this._initDefaultCheckedNodes()}filter(e){const t=this.filterNodeMethod,i=this.lazy,n=function(o){const s=o.root?o.root.childNodes:o.childNodes;if(s.forEach((i=>{i.visible=t.call(i,e,i.data,i),n(i)})),!o.visible&&s.length){let e=!0;e=!s.some((e=>e.visible)),o.root?o.root.visible=!1===e:o.visible=!1===e}e&&(!o.visible||o.isLeaf||i||o.expand())};n(this)}setData(e){e!==this.root.data?(this.root.setData(e),this._initDefaultCheckedNodes()):this.root.updateChildren()}getNode(e){if(e instanceof Vg)return e;const t="object"!=typeof e?e:Og(this.key,e);return this.nodesMap[t]||null}insertBefore(e,t){const i=this.getNode(t);i.parent.insertBefore({data:e},i)}insertAfter(e,t){const i=this.getNode(t);i.parent.insertAfter({data:e},i)}remove(e){const t=this.getNode(e);t&&t.parent&&(t===this.currentNode&&(this.currentNode=null),t.parent.removeChild(t))}append(e,t){const i=t?this.getNode(t):this.root;i&&i.insertChild({data:e})}_initDefaultCheckedNodes(){const e=this.defaultCheckedKeys||[],t=this.nodesMap;e.forEach((e=>{const i=t[e];i&&i.setChecked(!0,!this.checkStrictly)}))}_initDefaultCheckedNode(e){(this.defaultCheckedKeys||[]).includes(e.key)&&e.setChecked(!0,!this.checkStrictly)}setDefaultCheckedKey(e){e!==this.defaultCheckedKeys&&(this.defaultCheckedKeys=e,this._initDefaultCheckedNodes())}registerNode(e){const t=this.key;if(e&&e.data)if(t){void 0!==e.key&&(this.nodesMap[e.key]=e)}else this.nodesMap[e.id]=e}deregisterNode(e){this.key&&e&&e.data&&(e.childNodes.forEach((e=>{this.deregisterNode(e)})),delete this.nodesMap[e.key])}getCheckedNodes(e=!1,t=!1){const i=[],n=function(o){(o.root?o.root.childNodes:o.childNodes).forEach((o=>{(o.checked||t&&o.indeterminate)&&(!e||e&&o.isLeaf)&&i.push(o.data),n(o)}))};return n(this),i}getCheckedKeys(e=!1){return this.getCheckedNodes(e).map((e=>(e||{})[this.key]))}getHalfCheckedNodes(){const e=[],t=function(i){(i.root?i.root.childNodes:i.childNodes).forEach((i=>{i.indeterminate&&e.push(i.data),t(i)}))};return t(this),e}getHalfCheckedKeys(){return this.getHalfCheckedNodes().map((e=>(e||{})[this.key]))}_getAllNodes(){const e=[],t=this.nodesMap;for(const i in t)Ro(t,i)&&e.push(t[i]);return e}updateChildren(e,t){const i=this.nodesMap[e];if(!i)return;const n=i.childNodes;for(let o=n.length-1;o>=0;o--){const e=n[o];this.remove(e.data)}for(let o=0,s=t.length;ot.level-e.level)),o=Object.create(null),s=Object.keys(i);n.forEach((e=>e.setChecked(!1,!1)));for(let r=0,a=n.length;r0;)o[l.data[e]]=!0,l=l.parent;if(i.isLeaf||this.checkStrictly)i.setChecked(!0,!1);else if(i.setChecked(!0,!0),t){i.setChecked(!1,!1);const e=function(t){t.childNodes.forEach((t=>{t.isLeaf||t.setChecked(!1,!1),e(t)}))};e(i)}}}setCheckedNodes(e,t=!1){const i=this.key,n={};e.forEach((e=>{n[(e||{})[i]]=!0})),this._setCheckedKeys(i,t,n)}setCheckedKeys(e,t=!1){this.defaultCheckedKeys=e;const i=this.key,n={};e.forEach((e=>{n[e]=!0})),this._setCheckedKeys(i,t,n)}setDefaultExpandedKeys(e){e=e||[],this.defaultExpandedKeys=e,e.forEach((e=>{const t=this.getNode(e);t&&t.expand(null,this.autoExpandParent)}))}setChecked(e,t,i){const n=this.getNode(e);n&&n.setChecked(!!t,i)}getCurrentNode(){return this.currentNode}setCurrentNode(e){const t=this.currentNode;t&&(t.isCurrent=!1),this.currentNode=e,this.currentNode.isCurrent=!0}setUserCurrentNode(e,t=!0){const i=e[this.key],n=this.nodesMap[i];this.setCurrentNode(n),t&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0)}setCurrentNodeKey(e,t=!0){if(null==e)return this.currentNode&&(this.currentNode.isCurrent=!1),void(this.currentNode=null);const i=this.getNode(e);i&&(this.setCurrentNode(i),t&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0))}}const zg=Zi({name:"ElTreeNodeContent",props:{node:{type:Object,required:!0},renderContent:Function},setup(e){const t=o("tree"),i=an("NodeInstance"),n=an("RootTree");return()=>{const o=e.node,{data:s,store:r}=o;return e.renderContent?e.renderContent(on,{_self:i,node:o,data:s,store:r}):n.ctx.slots.default?n.ctx.slots.default({node:o,data:s}):on("span",{class:t.be("node","label")},[o.label])}}});var Hg=r(zg,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tree/src/tree-node-content.vue"]]);function jg(e){const t=an("TreeNodeMap",null),i={treeNodeExpand:t=>{e.node!==t&&e.node.collapse()},children:[]};return t&&t.children.push(i),Nn("TreeNodeMap",i),{broadcastExpanded:t=>{if(e.accordion)for(const e of i.children)e.treeNodeExpand(t)}}}const Ug=Symbol("dragEvents");const $g=Zi({name:"ElTreeNode",components:{ElCollapseTransition:q,ElCheckbox:dc,NodeContent:Hg,ElIcon:w,Loading:Xe},props:{node:{type:Vg,default:()=>({})},props:{type:Object,default:()=>({})},accordion:Boolean,renderContent:Function,renderAfterExpand:Boolean,showCheckbox:{type:Boolean,default:!1}},emits:["node-expand"],setup(e,t){const i=o("tree"),{broadcastExpanded:n}=jg(e),s=an("RootTree"),r=ai(!1),a=ai(!1),l=ai(null),d=ai(null),c=ai(null),h=an(Ug),u=en();Nn("NodeInstance",u),e.node.expanded&&(r.value=!0,a.value=!0);const g=s.props.children||"children";Qn((()=>{const t=e.node.data[g];return t&&[...t]}),(()=>{e.node.updateChildren()})),Qn((()=>e.node.indeterminate),(t=>{p(e.node.checked,t)})),Qn((()=>e.node.checked),(t=>{p(t,e.node.indeterminate)})),Qn((()=>e.node.expanded),(e=>{gn((()=>r.value=e)),e&&(a.value=!0)}));const p=(t,i)=>{l.value===t&&d.value===i||s.ctx.emit("check-change",e.node.data,t,i),l.value=t,d.value=i},m=()=>{e.node.isLeaf||(r.value?(s.ctx.emit("node-collapse",e.node.data,e.node,u),e.node.collapse()):(e.node.expand(),t.emit("node-expand",e.node.data,e.node,u)))},f=(t,i)=>{e.node.setChecked(i.target.checked,!s.props.checkStrictly),gn((()=>{const t=s.store.value;s.ctx.emit("check",e.node.data,{checkedNodes:t.getCheckedNodes(),checkedKeys:t.getCheckedKeys(),halfCheckedNodes:t.getHalfCheckedNodes(),halfCheckedKeys:t.getHalfCheckedKeys()})}))};return{ns:i,node$:c,tree:s,expanded:r,childNodeRendered:a,oldChecked:l,oldIndeterminate:d,getNodeKey:e=>Og(s.props.nodeKey,e.data),getNodeClass:t=>{const i=e.props.class;if(!i)return{};let n;if(Mo(i)){const{data:e}=t;n=i(e,t)}else n=i;return Eo(n)?{[n]:!0}:n},handleSelectChange:p,handleClick:t=>{const i=s.store.value;i.setCurrentNode(e.node),s.ctx.emit("current-change",i.currentNode?i.currentNode.data:null,i.currentNode),s.currentNode.value=e.node,s.props.expandOnClickNode&&m(),s.props.checkOnClickNode&&!e.node.disabled&&f(null,{target:{checked:!e.node.checked}}),s.ctx.emit("node-click",e.node.data,e.node,u,t)},handleContextMenu:t=>{s.instance.vnode.props.onNodeContextmenu&&(t.stopPropagation(),t.preventDefault()),s.ctx.emit("node-contextmenu",t,e.node.data,e.node,u)},handleExpandIconClick:m,handleCheckChange:f,handleChildNodeExpand:(e,t,i)=>{n(t),s.ctx.emit("node-expand",e,t,i)},handleDragStart:t=>{s.props.draggable&&h.treeNodeDragStart({event:t,treeNode:e})},handleDragOver:t=>{t.preventDefault(),s.props.draggable&&h.treeNodeDragOver({event:t,treeNode:{$el:c.value,node:e.node}})},handleDrop:e=>{e.preventDefault()},handleDragEnd:e=>{s.props.draggable&&h.treeNodeDragEnd(e)},CaretRight:dt}}}),Kg=["aria-expanded","aria-disabled","aria-checked","draggable","data-key"],qg=["aria-expanded"];const Gg=Zi({name:"ElTree",components:{ElTreeNode:r($g,[["render",function(e,t,i,n,o,s){const r=On("el-icon"),a=On("el-checkbox"),l=On("loading"),d=On("node-content"),c=On("el-tree-node"),h=On("el-collapse-transition");return so((Dn(),Vi("div",{ref:"node$",class:bi([e.ns.b("node"),e.ns.is("expanded",e.expanded),e.ns.is("current",e.node.isCurrent),e.ns.is("hidden",!e.node.visible),e.ns.is("focusable",!e.node.disabled),e.ns.is("checked",!e.node.disabled&&e.node.checked),e.getNodeClass(e.node)]),role:"treeitem",tabindex:"-1","aria-expanded":e.expanded,"aria-disabled":e.node.disabled,"aria-checked":e.node.checked,draggable:e.tree.props.draggable,"data-key":e.getNodeKey(e.node),onClick:t[1]||(t[1]=No(((...t)=>e.handleClick&&e.handleClick(...t)),["stop"])),onContextmenu:t[2]||(t[2]=(...t)=>e.handleContextMenu&&e.handleContextMenu(...t)),onDragstart:t[3]||(t[3]=No(((...t)=>e.handleDragStart&&e.handleDragStart(...t)),["stop"])),onDragover:t[4]||(t[4]=No(((...t)=>e.handleDragOver&&e.handleDragOver(...t)),["stop"])),onDragend:t[5]||(t[5]=No(((...t)=>e.handleDragEnd&&e.handleDragEnd(...t)),["stop"])),onDrop:t[6]||(t[6]=No(((...t)=>e.handleDrop&&e.handleDrop(...t)),["stop"]))},[Wi("div",{class:bi(e.ns.be("node","content")),style:Ci({paddingLeft:(e.node.level-1)*e.tree.props.indent+"px"})},[e.tree.props.icon||e.CaretRight?(Dn(),Fi(r,{key:0,class:bi([e.ns.be("node","expand-icon"),e.ns.is("leaf",e.node.isLeaf),{expanded:!e.node.isLeaf&&e.expanded}]),onClick:No(e.handleExpandIconClick,["stop"])},{default:no((()=>[(Dn(),Fi(Pn(e.tree.props.icon||e.CaretRight)))])),_:1},8,["class","onClick"])):Bi("v-if",!0),e.showCheckbox?(Dn(),Fi(a,{key:1,"model-value":e.node.checked,indeterminate:e.node.indeterminate,disabled:!!e.node.disabled,onClick:t[0]||(t[0]=No((()=>{}),["stop"])),onChange:e.handleCheckChange},null,8,["model-value","indeterminate","disabled","onChange"])):Bi("v-if",!0),e.node.loading?(Dn(),Fi(r,{key:2,class:bi([e.ns.be("node","loading-icon"),e.ns.is("loading")])},{default:no((()=>[qi(l)])),_:1},8,["class"])):Bi("v-if",!0),qi(d,{node:e.node,"render-content":e.renderContent},null,8,["node","render-content"])],6),qi(h,null,{default:no((()=>[!e.renderAfterExpand||e.childNodeRendered?so((Dn(),Vi("div",{key:0,class:bi(e.ns.be("node","children")),role:"group","aria-expanded":e.expanded},[(Dn(!0),Vi(Di,null,Mn(e.node.childNodes,(t=>(Dn(),Fi(c,{key:e.getNodeKey(t),"render-content":e.renderContent,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,node:t,accordion:e.accordion,props:e.props,onNodeExpand:e.handleChildNodeExpand},null,8,["render-content","render-after-expand","show-checkbox","node","accordion","props","onNodeExpand"])))),128))],10,qg)),[[Do,e.expanded]]):Bi("v-if",!0)])),_:1})],42,Kg)),[[Do,e.node.visible]])}],["__file","/home/runner/work/element-plus/element-plus/packages/components/tree/src/tree-node.vue"]])},props:{data:{type:Array,default:()=>[]},emptyText:{type:String},renderAfterExpand:{type:Boolean,default:!0},nodeKey:String,checkStrictly:Boolean,defaultExpandAll:Boolean,expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:Boolean,checkDescendants:{type:Boolean,default:!1},autoExpandParent:{type:Boolean,default:!0},defaultCheckedKeys:Array,defaultExpandedKeys:Array,currentNodeKey:[String,Number],renderContent:Function,showCheckbox:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},allowDrag:Function,allowDrop:Function,props:{type:Object,default:()=>({children:"children",label:"label",disabled:"disabled"})},lazy:{type:Boolean,default:!1},highlightCurrent:Boolean,load:Function,filterNodeMethod:Function,accordion:Boolean,indent:{type:Number,default:18},icon:[String,Object]},emits:["check-change","current-change","node-click","node-contextmenu","node-collapse","node-expand","check","node-drag-start","node-drag-end","node-drop","node-drag-leave","node-drag-enter","node-drag-over"],setup(e,t){const{t:i}=y(),n=o("tree"),s=ai(new Wg({key:e.nodeKey,data:e.data,lazy:e.lazy,props:e.props,load:e.load,currentNodeKey:e.currentNodeKey,checkStrictly:e.checkStrictly,checkDescendants:e.checkDescendants,defaultCheckedKeys:e.defaultCheckedKeys,defaultExpandedKeys:e.defaultExpandedKeys,autoExpandParent:e.autoExpandParent,defaultExpandAll:e.defaultExpandAll,filterNodeMethod:e.filterNodeMethod}));s.value.initialize();const r=ai(s.value.root),a=ai(null),d=ai(null),c=ai(null),{broadcastExpanded:h}=jg(e),{dragState:g}=function({props:e,ctx:t,el$:i,dropIndicator$:n,store:s}){const r=o("tree"),a=ai({showDropIndicator:!1,draggingNode:null,dropNode:null,allowDrop:!0,dropType:null});return Nn(Ug,{treeNodeDragStart:({event:i,treeNode:n})=>{if("function"==typeof e.allowDrag&&!e.allowDrag(n.node))return i.preventDefault(),!1;i.dataTransfer.effectAllowed="move";try{i.dataTransfer.setData("text/plain","")}catch(o){}a.value.draggingNode=n,t.emit("node-drag-start",n.node,i)},treeNodeDragOver:({event:o,treeNode:s})=>{const l=s,d=a.value.dropNode;d&&d!==l&&he(d.$el,r.is("drop-inner"));const c=a.value.draggingNode;if(!c||!l)return;let h=!0,u=!0,g=!0,p=!0;"function"==typeof e.allowDrop&&(h=e.allowDrop(c.node,l.node,"prev"),p=u=e.allowDrop(c.node,l.node,"inner"),g=e.allowDrop(c.node,l.node,"next")),o.dataTransfer.dropEffect=u||h||g?"move":"none",(h||u||g)&&d!==l&&(d&&t.emit("node-drag-leave",c.node,d.node,o),t.emit("node-drag-enter",c.node,l.node,o)),(h||u||g)&&(a.value.dropNode=l),l.node.nextSibling===c.node&&(g=!1),l.node.previousSibling===c.node&&(h=!1),l.node.contains(c.node,!1)&&(u=!1),(c.node===l.node||c.node.contains(l.node))&&(h=!1,u=!1,g=!1);const m=l.$el.getBoundingClientRect(),f=i.value.getBoundingClientRect();let _;const v=h?u?.25:g?.45:1:-1,b=g?u?.75:h?.55:0:1;let w=-9999;const C=o.clientY-m.top;_=Cm.height*b?"after":u?"inner":"none";const y=l.$el.querySelector(`.${r.be("node","expand-icon")}`).getBoundingClientRect(),x=n.value;"before"===_?w=y.top-f.top:"after"===_&&(w=y.bottom-f.top),x.style.top=`${w}px`,x.style.left=y.right-f.left+"px","inner"===_?de(l.$el,r.is("drop-inner")):he(l.$el,r.is("drop-inner")),a.value.showDropIndicator="before"===_||"after"===_,a.value.allowDrop=a.value.showDropIndicator||p,a.value.dropType=_,t.emit("node-drag-over",c.node,l.node,o)},treeNodeDragEnd:e=>{const{draggingNode:i,dropType:n,dropNode:o}=a.value;if(e.preventDefault(),e.dataTransfer.dropEffect="move",i&&o){const a={data:i.node.data};"none"!==n&&i.node.remove(),"before"===n?o.node.parent.insertBefore(a,o.node):"after"===n?o.node.parent.insertAfter(a,o.node):"inner"===n&&o.node.insertChild(a),"none"!==n&&s.value.registerNode(a),he(o.$el,r.is("drop-inner")),t.emit("node-drag-end",i.node,o.node,n,e),"none"!==n&&t.emit("node-drop",i.node,o.node,n,e)}i&&!o&&t.emit("node-drag-end",i.node,null,n,e),a.value.showDropIndicator=!1,a.value.draggingNode=null,a.value.dropNode=null,a.value.allowDrop=!0}}),{dragState:a}}({props:e,ctx:t,el$:d,dropIndicator$:c,store:s});!function({el$:e},t){const i=o("tree"),n=ci([]),s=ci([]);wn((()=>{a(),l(e.value,"keydown",r)})),fn((()=>{G(e.value,"keydown",r)})),kn((()=>{n.value=Array.from(e.value.querySelectorAll("[role=treeitem]")),s.value=Array.from(e.value.querySelectorAll("input[type=checkbox]"))})),Qn(s,(e=>{e.forEach((e=>{e.setAttribute("tabindex","-1")}))}));const r=o=>{const s=o.target;if(!s.className.includes(i.b("node")))return;const r=o.code;n.value=Array.from(e.value.querySelectorAll(`.${i.is("focusable")}[role=treeitem]`));const a=n.value.indexOf(s);let l;if([T.up,T.down].includes(r)){if(o.preventDefault(),r===T.up){l=-1===a?0:0!==a?a-1:n.value.length-1;const e=l;for(;!t.value.getNode(n.value[l].dataset.key).canFocus;){if(l--,l===e){l=-1;break}l<0&&(l=n.value.length-1)}}else{l=-1===a?0:a=n.value.length&&(l=0)}}-1!==l&&n.value[l].focus()}[T.left,T.right].includes(r)&&(o.preventDefault(),s.click());const d=s.querySelector('[type="checkbox"]');[T.enter,T.space].includes(r)&&d&&(o.preventDefault(),d.click())},a=()=>{var t;n.value=Array.from(e.value.querySelectorAll(`.${i.is("focusable")}[role=treeitem]`)),s.value=Array.from(e.value.querySelectorAll("input[type=checkbox]"));const o=e.value.querySelectorAll(`.${i.is("checked")}[role=treeitem]`);o.length?o[0].setAttribute("tabindex","0"):null==(t=n.value[0])||t.setAttribute("tabindex","0")}}({el$:d},s);const p=Pi((()=>{const{childNodes:e}=r.value;return!e||0===e.length||e.every((({visible:e})=>!e))}));Qn((()=>e.defaultCheckedKeys),(e=>{s.value.setDefaultCheckedKey(e)})),Qn((()=>e.defaultExpandedKeys),(e=>{s.value.setDefaultExpandedKeys(e)})),Qn((()=>e.data),(e=>{s.value.setData(e)}),{deep:!0}),Qn((()=>e.checkStrictly),(e=>{s.value.checkStrictly=e}));const m=()=>{const e=s.value.getCurrentNode();return e?e.data:null};return Nn("RootTree",{ctx:t,props:e,store:s,root:r,currentNode:a,instance:en()}),Nn(u,void 0),{ns:n,store:s,root:r,currentNode:a,dragState:g,el$:d,dropIndicator$:c,isEmpty:p,filter:t=>{if(!e.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");s.value.filter(t)},getNodeKey:t=>Og(e.nodeKey,t.data),getNodePath:t=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in getNodePath");const i=s.value.getNode(t);if(!i)return[];const n=[i.data];let o=i.parent;for(;o&&o!==r.value;)n.push(o.data),o=o.parent;return n.reverse()},getCheckedNodes:(e,t)=>s.value.getCheckedNodes(e,t),getCheckedKeys:e=>s.value.getCheckedKeys(e),getCurrentNode:m,getCurrentKey:()=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in getCurrentKey");const t=m();return t?t[e.nodeKey]:null},setCheckedNodes:(t,i)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedNodes");s.value.setCheckedNodes(t,i)},setCheckedKeys:(t,i)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedKeys");s.value.setCheckedKeys(t,i)},setChecked:(e,t,i)=>{s.value.setChecked(e,t,i)},getHalfCheckedNodes:()=>s.value.getHalfCheckedNodes(),getHalfCheckedKeys:()=>s.value.getHalfCheckedKeys(),setCurrentNode:(t,i=!0)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentNode");s.value.setUserCurrentNode(t,i)},setCurrentKey:(t,i=!0)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentKey");s.value.setCurrentNodeKey(t,i)},t:i,getNode:e=>s.value.getNode(e),remove:e=>{s.value.remove(e)},append:(e,t)=>{s.value.append(e,t)},insertBefore:(e,t)=>{s.value.insertBefore(e,t)},insertAfter:(e,t)=>{s.value.insertAfter(e,t)},handleNodeExpand:(e,i,n)=>{h(i),t.emit("node-expand",e,i,n)},updateKeyChildren:(t,i)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in updateKeyChild");s.value.updateChildren(t,i)}}}});var Zg=r(Gg,[["render",function(e,t,i,n,o,s){var r;const a=On("el-tree-node");return Dn(),Vi("div",{ref:"el$",class:bi([e.ns.b(),e.ns.is("dragging",!!e.dragState.draggingNode),e.ns.is("drop-not-allow",!e.dragState.allowDrop),e.ns.is("drop-inner","inner"===e.dragState.dropType),{[e.ns.m("highlight-current")]:e.highlightCurrent}]),role:"tree"},[(Dn(!0),Vi(Di,null,Mn(e.root.childNodes,(t=>(Dn(),Fi(a,{key:e.getNodeKey(t),node:t,props:e.props,accordion:e.accordion,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,"render-content":e.renderContent,onNodeExpand:e.handleNodeExpand},null,8,["node","props","accordion","render-after-expand","show-checkbox","render-content","onNodeExpand"])))),128)),e.isEmpty?(Dn(),Vi("div",{key:0,class:bi(e.ns.e("empty-block"))},[Wi("span",{class:bi(e.ns.e("empty-text"))},yi(null!=(r=e.emptyText)?r:e.t("el.tree.emptyText")),3)],2)):Bi("v-if",!0),so(Wi("div",{ref:"dropIndicator$",class:bi(e.ns.e("drop-indicator"))},null,2),[[Do,e.dragState.showDropIndicator]])],2)}],["__file","/home/runner/work/element-plus/element-plus/packages/components/tree/src/tree.vue"]]);Zg.install=e=>{e.component(Zg.name,Zg)};const Yg=Zg;class Xg extends Error{constructor(e,t,i,n){super(e),this.name="UploadAjaxError",this.status=t,this.method=i,this.url=n}}function Qg(e,t,i){let n;return n=i.response?`${i.response.error||i.response}`:i.responseText?`${i.responseText}`:`fail to ${t.method} ${e} ${i.status}`,new Xg(n,i.status,t.method,e)}const Jg=["text","picture","picture-card"];let ep=1;const tp=()=>Date.now()+ep++,ip=n({action:{type:String,default:"#"},headers:{type:U(Object)},method:{type:String,default:"post"},data:{type:Object,default:()=>$({})},multiple:{type:Boolean,default:!1},name:{type:String,default:"file"},drag:{type:Boolean,default:!1},withCredentials:Boolean,showFileList:{type:Boolean,default:!0},accept:{type:String,default:""},type:{type:String,default:"select"},fileList:{type:U(Array),default:()=>$([])},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:Jg,default:"text"},httpRequest:{type:U(Function),default:e=>{"undefined"==typeof XMLHttpRequest&&se("ElUpload","XMLHttpRequest is undefined");const t=new XMLHttpRequest,i=e.action;t.upload&&t.upload.addEventListener("progress",(t=>{const i=t;i.percent=t.total>0?t.loaded/t.total*100:0,e.onProgress(i)}));const n=new FormData;if(e.data)for(const[s,r]of Object.entries(e.data))Array.isArray(r)?n.append(s,...r):n.append(s,r);n.append(e.filename,e.file,e.file.name),t.addEventListener("error",(()=>{e.onError(Qg(i,e,t))})),t.addEventListener("load",(()=>{if(t.status<200||t.status>=300)return e.onError(Qg(i,e,t));e.onSuccess(function(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(i){return t}}(t))})),t.open(e.method,i,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);const o=e.headers||{};if(o instanceof Headers)o.forEach(((e,i)=>t.setRequestHeader(i,e)));else for(const[s,r]of Object.entries(o))Q(r)||t.setRequestHeader(s,String(r));return t.send(n),t}},disabled:Boolean,limit:Number}),np=n({...ip,beforeUpload:{type:U(Function),default:Ao},beforeRemove:{type:U(Function)},onRemove:{type:U(Function),default:Ao},onChange:{type:U(Function),default:Ao},onPreview:{type:U(Function),default:Ao},onSuccess:{type:U(Function),default:Ao},onProgress:{type:U(Function),default:Ao},onError:{type:U(Function),default:Ao},onExceed:{type:U(Function),default:Ao}}),op=n({files:{type:U(Array),default:()=>$([])},disabled:{type:Boolean,default:!1},handlePreview:{type:U(Function),default:Ao},listType:{type:String,values:Jg,default:"text"}}),sp=["onKeydown"],rp=["src"],ap=["onClick"],lp=["onClick"],dp=["onClick"];var cp=r(Zi({name:"ElUploadList",props:op,emits:{remove:e=>!!e},setup(e,{emit:t}){const i=e,{t:n}=y(),s=o("upload"),r=o("icon"),a=o("list"),l=ai(!1),d=e=>{t("remove",e)};return(e,t)=>(Dn(),Fi(co,{tag:"ul",class:bi([fi(s).b("list"),fi(s).bm("list",e.listType),fi(s).is("disabled",e.disabled)]),name:fi(a).b()},{default:no((()=>[(Dn(!0),Vi(Di,null,Mn(e.files,(o=>(Dn(),Vi("li",{key:o.uid||o.name,class:bi([fi(s).be("list","item"),fi(s).is(o.status),{focusing:l.value}]),tabindex:"0",onKeydown:Lo((t=>!e.disabled&&d(o)),["delete"]),onFocus:t[0]||(t[0]=e=>l.value=!0),onBlur:t[1]||(t[1]=e=>l.value=!1),onClick:t[2]||(t[2]=e=>l.value=!1)},[An(e.$slots,"default",{file:o},(()=>["picture"===e.listType||"uploading"!==o.status&&"picture-card"===e.listType?(Dn(),Vi("img",{key:0,class:bi(fi(s).be("list","item-thumbnail")),src:o.url,alt:""},null,10,rp)):Bi("v-if",!0),"picture"===e.listType||"uploading"!==o.status&&"picture-card"===e.listType?Bi("v-if",!0):(Dn(),Vi("div",{key:1,class:bi(fi(s).be("list","item-info"))},[Wi("a",{class:bi(fi(s).be("list","item-name")),onClick:No((e=>(e=>{i.handlePreview(e)})(o)),["prevent"])},[qi(fi(w),{class:bi(fi(r).m("document"))},{default:no((()=>[qi(fi(ct))])),_:1},8,["class"]),Wi("span",{class:bi(fi(s).be("list","item-file-name"))},yi(o.name),3)],10,ap),"uploading"===o.status?(Dn(),Fi(fi(Zh),{key:0,type:"picture-card"===e.listType?"circle":"line","stroke-width":"picture-card"===e.listType?6:2,percentage:Number(o.percentage),style:Ci("picture-card"===e.listType?"":"margin-top: 0.5rem")},null,8,["type","stroke-width","percentage","style"])):Bi("v-if",!0)],2)),Wi("label",{class:bi(fi(s).be("list","item-status-label"))},["text"===e.listType?(Dn(),Fi(fi(w),{key:0,class:bi([fi(r).m("upload-success"),fi(r).m("circle-check")])},{default:no((()=>[qi(fi(at))])),_:1},8,["class"])):["picture-card","picture"].includes(e.listType)?(Dn(),Fi(fi(w),{key:1,class:bi([fi(r).m("upload-success"),fi(r).m("check")])},{default:no((()=>[qi(fi(Ye))])),_:1},8,["class"])):Bi("v-if",!0)],2),e.disabled?Bi("v-if",!0):(Dn(),Fi(fi(w),{key:2,class:bi(fi(r).m("close")),onClick:e=>d(o)},{default:no((()=>[qi(fi(tt))])),_:2},1032,["class","onClick"])),Bi(" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn"),Bi(" This is a bug which needs to be fixed "),Bi(" TODO: Fix the incorrect navigation interaction "),e.disabled?Bi("v-if",!0):(Dn(),Vi("i",{key:3,class:bi(fi(r).m("close-tip"))},yi(fi(n)("el.upload.deleteTip")),3)),"picture-card"===e.listType?(Dn(),Vi("span",{key:4,class:bi(fi(s).be("list","item-actions"))},[Wi("span",{class:bi(fi(s).be("list","item-preview")),onClick:t=>e.handlePreview(o)},[qi(fi(w),{class:bi(fi(r).m("zoom-in"))},{default:no((()=>[qi(fi(ht))])),_:1},8,["class"])],10,lp),e.disabled?Bi("v-if",!0):(Dn(),Vi("span",{key:0,class:bi(fi(s).be("list","item-delete")),onClick:e=>d(o)},[qi(fi(w),{class:bi(fi(r).m("delete"))},{default:no((()=>[qi(fi(ut))])),_:1},8,["class"])],10,dp))],2)):Bi("v-if",!0)]))],42,sp)))),128)),An(e.$slots,"append")])),_:3},8,["class","name"]))}}),[["__file","/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload-list.vue"]]);const hp=n({disabled:{type:Boolean,default:!1}}),up=["onDrop","onDragover"];var gp=r(Zi({name:"ElUploadDrag",props:hp,emits:{file:e=>Io(e)},setup(e,{emit:t}){const i=e,n=an(md);n||se("ElUploadDrag","usage: ");const s=o("upload"),r=ai(!1),a=e=>{if(i.disabled)return;r.value=!1;const o=Array.from(e.dataTransfer.files),s=n.accept.value;if(!s)return void t("file",o);const a=o.filter((e=>{const{type:t,name:i}=e,n=i.includes(".")?`.${i.split(".").pop()}`:"",o=t.replace(/\/.*$/,"");return s.split(",").map((e=>e.trim())).filter((e=>e)).some((e=>e.startsWith(".")?n===e:/\/\*$/.test(e)?o===e.replace(/\/\*$/,""):!!/^[^/]+\/[^/]+$/.test(e)&&t===e))}));t("file",a)},l=()=>{i.disabled||(r.value=!0)};return(e,t)=>(Dn(),Vi("div",{class:bi([fi(s).b("dragger"),fi(s).is("dragover",r.value)]),onDrop:No(a,["prevent"]),onDragover:No(l,["prevent"]),onDragleave:t[0]||(t[0]=No((e=>r.value=!1),["prevent"]))},[An(e.$slots,"default")],42,up))}}),[["__file","/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload-dragger.vue"]]);const pp=n({...ip,beforeUpload:{type:U(Function),default:Ao},onRemove:{type:U(Function),default:Ao},onStart:{type:U(Function),default:Ao},onSuccess:{type:U(Function),default:Ao},onProgress:{type:U(Function),default:Ao},onError:{type:U(Function),default:Ao},onExceed:{type:U(Function),default:Ao}}),mp=["onKeydown"],fp=["name","multiple","accept"],_p=Zi({name:"ElUploadContent",inheritAttrs:!1,props:pp,setup(e,{expose:t}){const i=e,n=o("upload"),s=ci({}),r=ci(),a=e=>{if(0===e.length)return;const{autoUpload:t,limit:n,fileList:o,multiple:s,onStart:r,onExceed:a}=i;if(n&&o.length+e.length>n)a(e,o);else{s||(e=e.slice(0,1));for(const i of e){const e=i;e.uid=tp(),r(e),t&&l(e)}}},l=async e=>{if(r.value.value="",!i.beforeUpload)return d(e);let t;try{t=await i.beforeUpload(e)}catch(o){t=!1}if(!1===t)return void i.onRemove(e);let n=e;t instanceof Blob&&(n=t instanceof File?t:new File([t],e.name,{type:e.type})),d(Object.assign(n,{uid:e.uid}))},d=e=>{const{headers:t,data:n,method:o,withCredentials:r,name:a,action:l,onProgress:d,onSuccess:c,onError:h,httpRequest:u}=i,{uid:g}=e,p={headers:t||{},withCredentials:r,file:e,data:n,method:o,filename:a,action:l,onProgress:t=>{d(t,e)},onSuccess:t=>{c(t,e),delete s.value[g]},onError:t=>{h(t,e),delete s.value[g]}},m=u(p);s.value[g]=m,m instanceof Promise&&m.then(p.onSuccess,p.onError)},c=e=>{const t=e.target.files;t&&a(Array.from(t))},h=()=>{i.disabled||(r.value.value="",r.value.click())},u=()=>{h()};return t({abort:e=>{const t=ve(s.value).filter(e?([t])=>String(e.uid)===t:()=>!0);t.forEach((([e,t])=>{t instanceof XMLHttpRequest&&t.abort(),delete s.value[e]}))},upload:l}),(e,t)=>(Dn(),Vi("div",{class:bi([fi(n).b(),fi(n).m(e.listType),fi(n).is("drag",e.drag)]),tabindex:"0",onClick:h,onKeydown:Lo(No(u,["self"]),["enter","space"])},[e.drag?(Dn(),Fi(gp,{key:0,disabled:e.disabled,onFile:a},{default:no((()=>[An(e.$slots,"default")])),_:3},8,["disabled"])):An(e.$slots,"default",{key:1}),Wi("input",{ref_key:"inputRef",ref:r,class:bi(fi(n).e("input")),name:e.name,multiple:e.multiple,accept:e.accept,type:"file",onChange:c,onClick:t[0]||(t[0]=No((()=>{}),["stop"]))},null,42,fp)],42,mp))}});var vp=r(_p,[["__file","/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload-content.vue"]]);const bp="ElUpload",wp=(e,t)=>{const i=be(e,"fileList",void 0,{passive:!0}),n=e=>i.value.find((t=>t.uid===e.uid));function o(e){var i;null==(i=t.value)||i.abort(e)}return Qn((()=>e.listType),(t=>{"picture-card"!==t&&"picture"!==t||(i.value=i.value.map((t=>{const{raw:n,url:o}=t;if(!o&&n)try{t.url=URL.createObjectURL(n)}catch(s){e.onError(s,t,i.value)}return t})))})),Qn(i,(e=>{for(const t of e)t.uid||(t.uid=tp()),t.status||(t.status="success")}),{immediate:!0,deep:!0}),{uploadFiles:i,abort:o,clearFiles:function(e=["ready","uploading","success","fail"]){i.value=i.value.filter((t=>!e.includes(t.status)))},handleError:(t,o)=>{const s=n(o);s&&(s.status="fail",i.value.splice(i.value.indexOf(s),1),e.onError(t,s,i.value),e.onChange(s,i.value))},handleProgress:(t,o)=>{const s=n(o);s&&(e.onProgress(t,s,i.value),s.status="uploading",s.percentage=Math.round(t.percent))},handleStart:t=>{const n={name:t.name,percentage:0,status:"ready",size:t.size,raw:t,uid:t.uid};if("picture-card"===e.listType||"picture"===e.listType)try{n.url=URL.createObjectURL(t)}catch(o){_(bp,o.message),e.onError(o,n,i.value)}i.value.push(n),e.onChange(n,i.value)},handleSuccess:(t,o)=>{const s=n(o);s&&(s.status="success",s.response=t,e.onSuccess(t,s,i.value),e.onChange(s,i.value))},handleRemove:async t=>{const s=t instanceof File?n(t):t;s||se(bp,"file to be removed not found");const r=t=>{o(t);const n=i.value;n.splice(n.indexOf(t),1),e.onRemove(t,n),(e=>{var t;(null==(t=e.url)?void 0:t.startsWith("blob:"))&&URL.revokeObjectURL(e.url)})(t)};if(e.beforeRemove){!1!==await e.beforeRemove(s,i.value)&&r(s)}else r(s)},submit:function(){i.value.filter((({status:e})=>"ready"===e)).forEach((({raw:e})=>{var i;return e&&(null==(i=t.value)?void 0:i.upload(e))}))}}},Cp=Zi({name:"ElUpload",props:np,setup(e,{expose:t}){const i=e,n=Gn(),o=ee(),s=ci(),{abort:r,submit:a,clearFiles:l,uploadFiles:d,handleStart:c,handleError:h,handleRemove:u,handleSuccess:g,handleProgress:p}=wp(i,s),m=Pi((()=>"picture-card"===i.listType)),f=Pi((()=>({...i,onStart:c,onProgress:p,onSuccess:g,onError:h,onRemove:u})));return fn((()=>{d.value.forEach((({url:e})=>{(null==e?void 0:e.startsWith("blob:"))&&URL.revokeObjectURL(e)}))})),Nn(md,{accept:gi(i,"accept")}),t({abort:r,submit:a,clearFiles:l,handleStart:c,handleRemove:u}),(e,t)=>(Dn(),Vi("div",null,[fi(m)&&e.showFileList?(Dn(),Fi(cp,{key:0,disabled:fi(o),"list-type":e.listType,files:fi(d),"handle-preview":e.onPreview,onRemove:fi(u)},Ui({append:no((()=>["picture-card"===e.listType?(Dn(),Fi(vp,un({key:0,ref_key:"uploadRef",ref:s},fi(f)),{default:no((()=>[fi(n).trigger?An(e.$slots,"trigger",{key:0}):Bi("v-if",!0),!fi(n).trigger&&fi(n).default?An(e.$slots,"default",{key:1}):Bi("v-if",!0)])),_:3},16)):Bi("v-if",!0)])),_:2},[e.$slots.file?{name:"default",fn:no((({file:t})=>[An(e.$slots,"file",{file:t})]))}:void 0]),1032,["disabled","list-type","files","handle-preview","onRemove"])):Bi("v-if",!0),"picture-card"!==e.listType?(Dn(),Fi(vp,un({key:1,ref_key:"uploadRef",ref:s},fi(f)),{default:no((()=>[fi(n).trigger?An(e.$slots,"trigger",{key:0}):Bi("v-if",!0),!fi(n).trigger&&fi(n).default?An(e.$slots,"default",{key:1}):Bi("v-if",!0)])),_:3},16)):Bi("v-if",!0),e.$slots.trigger?An(e.$slots,"default",{key:2}):Bi("v-if",!0),An(e.$slots,"tip"),!fi(m)&&e.showFileList?(Dn(),Fi(cp,{key:3,disabled:fi(o),"list-type":e.listType,files:fi(d),"handle-preview":e.onPreview,onRemove:fi(u)},Ui({_:2},[e.$slots.file?{name:"default",fn:no((({file:t})=>[An(e.$slots,"file",{file:t})]))}:void 0]),1032,["disabled","list-type","files","handle-preview","onRemove"])):Bi("v-if",!0)]))}});const yp=a(r(Cp,[["__file","/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload.vue"]])),xp=["success","info","warning","error"],Sp=$({customClass:"",center:!1,dangerouslyUseHTMLString:!1,duration:3e3,icon:"",id:"",message:"",onClose:void 0,showClose:!1,type:"info",offset:16,zIndex:0,grouping:!1,repeatNum:1,appendTo:E?document.body:void 0}),kp=n({customClass:{type:String,default:Sp.customClass},center:{type:Boolean,default:Sp.center},dangerouslyUseHTMLString:{type:Boolean,default:Sp.dangerouslyUseHTMLString},duration:{type:Number,default:Sp.duration},icon:{type:ie,default:Sp.icon},id:{type:String,default:Sp.id},message:{type:U([String,Object,Function]),default:Sp.message},onClose:{type:U(Function),required:!1},showClose:{type:Boolean,default:Sp.showClose},type:{type:String,values:xp,default:Sp.type},offset:{type:Number,default:Sp.offset},zIndex:{type:Number,default:Sp.zIndex},grouping:{type:Boolean,default:Sp.grouping},repeatNum:{type:Number,default:Sp.repeatNum}}),Dp=li([]),Lp=e=>{const{prev:t}=(e=>{const t=Dp.findIndex((t=>t.id===e)),i=Dp[t];let n;return t>0&&(n=Dp[t-1]),{current:i,prev:n}})(e);return t?t.vm.exposeProxy.bottom:0},Np=["id"],Ep=["innerHTML"],Ip=Zi({name:"ElMessage",props:kp,emits:{destroy:()=>!0},setup(e,{expose:t}){const i=e,{Close:n}=Ce,s=o("message"),r=ai(),a=ai(!1),l=ai(0);let d;const c=Pi((()=>i.type?"error"===i.type?"danger":i.type:"info")),h=Pi((()=>{const e=i.type;return{[s.bm("icon",e)]:e&&we[e]}})),u=Pi((()=>i.icon||we[i.type]||"")),g=Pi((()=>Lp(i.id))),p=Pi((()=>i.offset+g.value)),m=Pi((()=>l.value+p.value)),f=Pi((()=>({top:`${p.value}px`,zIndex:i.zIndex})));function _(){0!==i.duration&&({stop:d}=ye((()=>{b()}),i.duration))}function v(){null==d||d()}function b(){a.value=!1}return wn((()=>{_(),a.value=!0})),Qn((()=>i.repeatNum),(()=>{v(),_()})),ge(document,"keydown",(function({code:e}){e===T.esc&&b()})),H(r,(()=>{l.value=r.value.getBoundingClientRect().height})),t({visible:a,bottom:m,close:b}),(e,t)=>(Dn(),Fi(lo,{name:fi(s).b("fade"),onBeforeLeave:e.onClose,onAfterLeave:t[0]||(t[0]=t=>e.$emit("destroy")),persisted:""},{default:no((()=>[so(Wi("div",{id:e.id,ref_key:"messageRef",ref:r,class:bi([fi(s).b(),{[fi(s).m(e.type)]:e.type&&!e.icon},fi(s).is("center",e.center),fi(s).is("closable",e.showClose),e.customClass]),style:Ci(fi(f)),role:"alert",onMouseenter:v,onMouseleave:_},[e.repeatNum>1?(Dn(),Fi(fi(vd),{key:0,value:e.repeatNum,type:fi(c),class:bi(fi(s).e("badge"))},null,8,["value","type","class"])):Bi("v-if",!0),fi(u)?(Dn(),Fi(fi(w),{key:1,class:bi([fi(s).e("icon"),fi(h)])},{default:no((()=>[(Dn(),Fi(Pn(fi(u))))])),_:1},8,["class"])):Bi("v-if",!0),An(e.$slots,"default",{},(()=>[e.dangerouslyUseHTMLString?(Dn(),Vi(Di,{key:1},[Bi(" Caution here, message could've been compromised, never use user's input as message "),Wi("p",{class:bi(fi(s).e("content")),innerHTML:e.message},null,10,Ep)],2112)):(Dn(),Vi("p",{key:0,class:bi(fi(s).e("content"))},yi(e.message),3))])),e.showClose?(Dn(),Fi(fi(w),{key:2,class:bi(fi(s).e("closeBtn")),onClick:No(b,["stop"])},{default:no((()=>[qi(fi(n))])),_:1},8,["class","onClick"])):Bi("v-if",!0)],46,Np),[[Do,a.value]])])),_:3},8,["name","onBeforeLeave"]))}});var Tp=r(Ip,[["__file","/home/runner/work/element-plus/element-plus/packages/components/message/src/message.vue"]]);let Mp=1;const Ap=e=>{const t=!e||Eo(e)||cn(e)||Mo(e)?{message:e}:e,i={...Sp,...t};if(Eo(i.appendTo)){let e=document.querySelector(i.appendTo);Se(e)||(e=document.body),i.appendTo=e}return i},Op=({appendTo:e,...t},i)=>{const{nextZIndex:n}=re(),o="message_"+Mp++,s=t.onClose,r=document.createElement("div"),a={...t,zIndex:n()+t.zIndex,id:o,onClose:()=>{null==s||s(),(e=>{const t=Dp.indexOf(e);if(-1===t)return;Dp.splice(t,1);const{handler:i}=e;i.close()})(h)},onDestroy:()=>{vo(null,r)}},l=qi(Tp,a,Mo(a.message)||cn(a.message)?{default:a.message}:null);l.appContext=i||Rp._context,vo(l,r),e.appendChild(r.firstElementChild);const d=l.component,c={close:()=>{d.exposeProxy.visible=!1}},h={id:o,vnode:l,vm:d,handler:c,props:l.component.props};return h},Rp=(e={},t)=>{if(!E)return{close:()=>{}};if(s(xe.max)&&Dp.length>=xe.max)return{close:()=>{}};const i=Ap(e);if(i.grouping&&Dp.length){const e=Dp.find((({vnode:e})=>{var t;return(null==(t=e.props)?void 0:t.message)===i.message}));if(e)return e.props.repeatNum+=1,e.props.type=i.type,e.handler}const n=Op(i,t);return Dp.push(n),n.handler};xp.forEach((e=>{Rp[e]=(t={},i)=>{const n=Ap(t);return Rp({...n,type:e},i)}})),Rp.closeAll=function(e){for(const t of Dp)e&&e!==t.props.type||t.handler.close()},Rp._context=null;const Pp=ke(Rp,"$message");const Fp=Zi({name:"Preview",props:{visible:{type:Boolean,default:!1}},emits:["update:visible"],setup(e,{emit:t}){const i=be(e,"visible",t),n=`${gt}preview/${location.hash}`;return(e,t)=>{const o=De;return Dn(),Fi(o,{modelValue:fi(i),"onUpdate:modelValue":t[0]||(t[0]=e=>ei(i)?i.value=e:null),"custom-class":"h5-preview","show-close":!1,width:"360px"},{default:no((()=>[fi(i)?(Dn(),Vi("iframe",{key:0,style:{width:"100%",height:"100%"},src:n,frameborder:"0",scrolling:"auto"})):Bi("",!0)])),_:1},8,["modelValue"])}}});var Bp={},Vp={},Wp={};let zp;const Hp=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];Wp.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},Wp.getSymbolTotalCodewords=function(e){return Hp[e]},Wp.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},Wp.setToSJISFunction=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');zp=e},Wp.isKanjiModeEnabled=function(){return void 0!==zp},Wp.toSJIS=function(e){return zp(e)};var jp={};function Up(){this.buffer=[],this.length=0}!function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},e.from=function(t,i){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(n){return i}}}(jp),Up.prototype={get:function(e){const t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(let i=0;i>>t-i-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var $p=Up;function Kp(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}Kp.prototype.set=function(e,t,i,n){const o=e*this.size+t;this.data[o]=i,n&&(this.reservedBit[o]=!0)},Kp.prototype.get=function(e,t){return this.data[e*this.size+t]},Kp.prototype.xor=function(e,t,i){this.data[e*this.size+t]^=i},Kp.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var qp=Kp,Gp={};!function(e){const t=Wp.getSymbolSize;e.getRowColCoords=function(e){if(1===e)return[];const i=Math.floor(e/7)+2,n=t(e),o=145===n?26:2*Math.ceil((n-13)/(2*i-2)),s=[n-7];for(let t=1;t=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){const i=e.size;let n=0,o=0,s=0,r=null,a=null;for(let l=0;l=5&&(n+=t+(o-5)),r=i,o=1),i=e.get(d,l),i===a?s++:(s>=5&&(n+=t+(s-5)),a=i,s=1)}o>=5&&(n+=t+(o-5)),s>=5&&(n+=t+(s-5))}return n},e.getPenaltyN2=function(e){const t=e.size;let n=0;for(let i=0;i=10&&(1488===o||93===o)&&i++,s=s<<1&2047|e.get(r,n),r>=10&&(1488===s||93===s)&&i++}return i*n},e.getPenaltyN4=function(e){let t=0;const i=e.data.length;for(let n=0;n=0;){const e=n[0];for(let s=0;s0){const e=new Uint8Array(this.degree);return e.set(i,n),e}return i};var lm=am,dm={},cm={},hm={isValid:function(e){return!isNaN(e)&&e>=1&&e<=40}},um={};const gm="[0-9]+";let pm="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";pm=pm.replace(/u/g,"\\u");const mm="(?:(?![A-Z0-9 $%*+\\-./:]|"+pm+")(?:.|[\r\n]))+";um.KANJI=new RegExp(pm,"g"),um.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),um.BYTE=new RegExp(mm,"g"),um.NUMERIC=new RegExp(gm,"g"),um.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const fm=new RegExp("^"+pm+"$"),_m=new RegExp("^[0-9]+$"),vm=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");um.testKanji=function(e){return fm.test(e)},um.testNumeric=function(e){return _m.test(e)},um.testAlphanumeric=function(e){return vm.test(e)},function(e){const t=hm,i=um;e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(e,i){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!t.isValid(i))throw new Error("Invalid version: "+i);return i>=1&&i<10?e.ccBits[0]:i<27?e.ccBits[1]:e.ccBits[2]},e.getBestModeForData=function(t){return i.testNumeric(t)?e.NUMERIC:i.testAlphanumeric(t)?e.ALPHANUMERIC:i.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},e.isValid=function(e){return e&&e.bit&&e.ccBits},e.from=function(t,i){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(n){return i}}}(cm),function(e){const t=Wp,i=Qp,n=jp,o=cm,s=hm,r=t.getBCHDigit(7973);function a(e,t){return o.getCharCountIndicator(e,t)+4}function l(e,t){let i=0;return e.forEach((function(e){const n=a(e.mode,t);i+=n+e.getBitsLength()})),i}e.from=function(e,t){return s.isValid(e)?parseInt(e,10):t},e.getCapacity=function(e,n,r){if(!s.isValid(e))throw new Error("Invalid QR Code version");void 0===r&&(r=o.BYTE);const l=8*(t.getSymbolTotalCodewords(e)-i.getTotalCodewordsCount(e,n));if(r===o.MIXED)return l;const d=l-a(r,e);switch(r){case o.NUMERIC:return Math.floor(d/10*3);case o.ALPHANUMERIC:return Math.floor(d/11*2);case o.KANJI:return Math.floor(d/13);case o.BYTE:default:return Math.floor(d/8)}},e.getBestVersionForData=function(t,i){let s;const r=n.from(i,n.M);if(Array.isArray(t)){if(t.length>1)return function(t,i){for(let n=1;n<=40;n++)if(l(t,n)<=e.getCapacity(n,i,o.MIXED))return n}(t,r);if(0===t.length)return 1;s=t[0]}else s=t;return function(t,i,n){for(let o=1;o<=40;o++)if(i<=e.getCapacity(o,n,t))return o}(s.mode,s.getLength(),r)},e.getEncodedBits=function(e){if(!s.isValid(e)||e<7)throw new Error("Invalid QR Code version");let i=e<<12;for(;t.getBCHDigit(i)-r>=0;)i^=7973<=0;)n^=1335<0&&(i=this.data.substr(t),n=parseInt(i,10),e.put(n,3*o+1))};var km=Sm;const Dm=cm,Lm=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Nm(e){this.mode=Dm.ALPHANUMERIC,this.data=e}Nm.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},Nm.prototype.getLength=function(){return this.data.length},Nm.prototype.getBitsLength=function(){return Nm.getBitsLength(this.data.length)},Nm.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let i=45*Lm.indexOf(this.data[t]);i+=Lm.indexOf(this.data[t+1]),e.put(i,11)}this.data.length%2&&e.put(Lm.indexOf(this.data[t]),6)};var Em=Nm;const Im=function(e){for(var t=[],i=e.length,n=0;n=55296&&o<=56319&&i>n+1){var s=e.charCodeAt(n+1);s>=56320&&s<=57343&&(o=1024*(o-55296)+s-56320+65536,n+=1)}o<128?t.push(o):o<2048?(t.push(o>>6|192),t.push(63&o|128)):o<55296||o>=57344&&o<65536?(t.push(o>>12|224),t.push(o>>6&63|128),t.push(63&o|128)):o>=65536&&o<=1114111?(t.push(o>>18|240),t.push(o>>12&63|128),t.push(o>>6&63|128),t.push(63&o|128)):t.push(239,191,189)}return new Uint8Array(t).buffer},Tm=cm;function Mm(e){this.mode=Tm.BYTE,this.data=new Uint8Array(Im(e))}Mm.getBitsLength=function(e){return 8*e},Mm.prototype.getLength=function(){return this.data.length},Mm.prototype.getBitsLength=function(){return Mm.getBitsLength(this.data.length)},Mm.prototype.write=function(e){for(let t=0,i=this.data.length;t=33088&&i<=40956)i-=33088;else{if(!(i>=57408&&i<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");i-=49472}i=192*(i>>>8&255)+(255&i),e.put(i,13)}};var Fm=Pm,Bm={exports:{}};!function(e){var t={single_source_shortest_paths:function(e,i,n){var o={},s={};s[i]=0;var r,a,l,d,c,h,u,g=t.PriorityQueue.make();for(g.push(i,0);!g.empty();)for(l in a=(r=g.pop()).value,d=r.cost,c=e[a]||{})c.hasOwnProperty(l)&&(h=d+c[l],u=s[l],(void 0===s[l]||u>h)&&(s[l]=h,g.push(l,h),o[l]=a));if(void 0!==n&&void 0===s[n]){var p=["Could not find a path from ",i," to ",n,"."].join("");throw new Error(p)}return o},extract_shortest_path_from_predecessor_list:function(e,t){for(var i=[],n=t;n;)i.push(n),n=e[n];return i.reverse(),i},find_path:function(e,i,n){var o=t.single_source_shortest_paths(e,i,n);return t.extract_shortest_path_from_predecessor_list(o,n)},PriorityQueue:{make:function(e){var i,n=t.PriorityQueue,o={};for(i in e=e||{},n)n.hasOwnProperty(i)&&(o[i]=n[i]);return o.queue=[],o.sorter=e.sorter||n.default_sorter,o},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var i={value:e,cost:t};this.queue.push(i),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t}(Bm),function(e){const t=cm,i=km,n=Em,o=Am,s=Fm,r=um,a=Wp,l=Bm.exports;function d(e){return unescape(encodeURIComponent(e)).length}function c(e,t,i){const n=[];let o;for(;null!==(o=e.exec(i));)n.push({data:o[0],index:o.index,mode:t,length:o[0].length});return n}function h(e){const i=c(r.NUMERIC,t.NUMERIC,e),n=c(r.ALPHANUMERIC,t.ALPHANUMERIC,e);let o,s;a.isKanjiModeEnabled()?(o=c(r.BYTE,t.BYTE,e),s=c(r.KANJI,t.KANJI,e)):(o=c(r.BYTE_KANJI,t.BYTE,e),s=[]);return i.concat(n,o,s).sort((function(e,t){return e.index-t.index})).map((function(e){return{data:e.data,mode:e.mode,length:e.length}}))}function u(e,r){switch(r){case t.NUMERIC:return i.getBitsLength(e);case t.ALPHANUMERIC:return n.getBitsLength(e);case t.KANJI:return s.getBitsLength(e);case t.BYTE:return o.getBitsLength(e)}}function g(e,r){let l;const d=t.getBestModeForData(e);if(l=t.from(r,d),l!==t.BYTE&&l.bit=0?e[e.length-1]:null;return i&&i.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)}),[])}(c))},e.rawSplit=function(t){return e.fromArray(h(t,a.isKanjiModeEnabled()))}}(ym);const Vm=Wp,Wm=jp,zm=$p,Hm=qp,jm=Gp,Um=Zp,$m=Xp,Km=Qp,qm=lm,Gm=dm,Zm=bm,Ym=cm,Xm=ym;function Qm(e,t,i){const n=e.size,o=Zm.getEncodedBits(t,i);let s,r;for(s=0;s<15;s++)r=1==(o>>s&1),s<6?e.set(s,8,r,!0):s<8?e.set(s+1,8,r,!0):e.set(n-15+s,8,r,!0),s<8?e.set(8,n-s-1,r,!0):s<9?e.set(8,15-s-1+1,r,!0):e.set(8,15-s-1,r,!0);e.set(n-8,8,1,!0)}function Jm(e,t,i){const n=new zm;i.forEach((function(t){n.put(t.mode.bit,4),n.put(t.getLength(),Ym.getCharCountIndicator(t.mode,e)),t.write(n)}));const o=8*(Vm.getSymbolTotalCodewords(e)-Km.getTotalCodewordsCount(e,t));for(n.getLengthInBits()+4<=o&&n.put(0,4);n.getLengthInBits()%8!=0;)n.putBit(0);const s=(o-n.getLengthInBits())/8;for(let r=0;r=0&&n<=6&&(0===o||6===o)||o>=0&&o<=6&&(0===n||6===n)||n>=2&&n<=4&&o>=2&&o<=4?e.set(t+n,s+o,!0,!0):e.set(t+n,s+o,!1,!0))}}(l,t),function(e){const t=e.size;for(let i=8;i=7&&function(e,t){const i=e.size,n=Gm.getEncodedBits(t);let o,s,r;for(let a=0;a<18;a++)o=Math.floor(a/3),s=a%3+i-8-3,r=1==(n>>a&1),e.set(o,s,r,!0),e.set(s,o,r,!0)}(l,t),function(e,t){const i=e.size;let n=-1,o=i-1,s=7,r=0;for(let a=i-1;a>0;a-=2)for(6===a&&a--;;){for(let i=0;i<2;i++)if(!e.isReserved(o,a-i)){let n=!1;r>>s&1)),e.set(o,a-i,n),s--,-1===s&&(r++,s=7)}if(o+=n,o<0||i<=o){o-=n,n=-n;break}}}(l,r),isNaN(n)&&(n=$m.getBestMask(l,Qm.bind(null,l,i))),$m.applyMask(n,l),Qm(l,i,n),{modules:l,version:t,errorCorrectionLevel:i,maskPattern:n,segments:o}}Vp.create=function(e,t){if(void 0===e||""===e)throw new Error("No input text");let i,n,o=Wm.M;return void 0!==t&&(o=Wm.from(t.errorCorrectionLevel,Wm.M),i=Gm.from(t.version),n=$m.from(t.maskPattern),t.toSJISFunc&&Vm.setToSJISFunction(t.toSJISFunc)),ef(e,i,o,n)};var tf={},nf={};!function(e){function t(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");const i=parseInt(t.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:255&i,hex:"#"+t.slice(0,6).join("")}}e.getOptions=function(e){e||(e={}),e.color||(e.color={});const i=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,n=e.width&&e.width>=21?e.width:void 0,o=e.scale||4;return{width:n,scale:n?4:o,margin:i,color:{dark:t(e.color.dark||"#000000ff"),light:t(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},e.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},e.getImageWidth=function(t,i){const n=e.getScale(t,i);return Math.floor((t+2*i.margin)*n)},e.qrToImageData=function(t,i,n){const o=i.modules.size,s=i.modules.data,r=e.getScale(o,n),a=Math.floor((o+2*n.margin)*r),l=n.margin*r,d=[n.color.light,n.color.dark];for(let e=0;e=l&&i>=l&&e':"",l="0&&l>0&&e[a-1]||(n+=s?af("M",l+i,.5+d+i):af("m",o,0),o=0,s=!1),l+1',d='viewBox="0 0 '+r+" "+r+'"',c=''+a+l+"\n";return"function"==typeof i&&i(null,c),c};const lf=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then},df=Vp,cf=tf,hf=of;function uf(e,t,i,n,o){const s=[].slice.call(arguments,1),r=s.length,a="function"==typeof s[r-1];if(!a&&!lf())throw new Error("Callback required as last argument");if(!a){if(r<1)throw new Error("Too few arguments provided");return 1===r?(i=t,t=n=void 0):2!==r||t.getContext||(n=i,i=t,t=void 0),new Promise((function(o,s){try{const s=df.create(i,n);o(e(s,t,n))}catch(r){s(r)}}))}if(r<2)throw new Error("Too few arguments provided");2===r?(o=i,i=t,t=n=void 0):3===r&&(t.getContext&&void 0===o?(o=n,n=void 0):(o=n,n=i,i=t,t=void 0));try{const s=df.create(i,n);o(null,e(s,t,n))}catch(l){o(l)}}Bp.create=df.create,Bp.toCanvas=uf.bind(null,cf.render),Bp.toDataURL=uf.bind(null,cf.renderToDataURL),Bp.toString=uf.bind(null,(function(e,t,i){return hf.render(e,i)}));const gf=Zi({props:{options:{type:Object,default:()=>({})}},setup(e){const t=en(),i=si({options:e.options,visible:!0}),n={service:e=>{i.options=e,n.show()},show:()=>i.visible=!0,hide:()=>i.visible=!1},o={onConfirm:async()=>{var e,t;await(null===(e=(t=i.options).onConfirm)||void 0===e?void 0:e.call(t)),n.hide()},onCancel:()=>{var e,t;null===(e=(t=i.options).onCancel)||void 0===e||e.call(t),n.hide()}};return Object.assign(t.proxy,n),()=>qi(De,un({modelValue:i.visible,"onUpdate:modelValue":e=>i.visible=e,title:i.options.title,destroyOnClose:!0},i.options.props,{onClose:o.onCancel}),{default:()=>cn(i.options.content)?qi(On("content"),null,null):pt(i.options.content)?i.options.content():null,footer:()=>null===i.options.footer?null:qi("div",null,[qi(Y,{onClick:o.onCancel},{default:()=>[Ki("取消")]}),qi(Y,un({type:"primary"},{onClick:o.onConfirm}),{default:()=>[Ki("确定")]})])})}}),pf=(()=>{let e;return t=>{if(e)return e.service(t),e;const i=document.createElement("div");document.body.appendChild(i);const n=uo(gf,{options:t});return e=n.mount(i),e}})();function mf(e,t,...i){return function(e,t){let i;return i=0===t.length?e:e.replace(/\{(\d+)\}/g,(function(e,i){const n=i[0];return void 0!==t[n]?t[n]:e})),i}(t,i)}const ff={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!1}};class _f{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class vf{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class bf{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return Cf(e,t)}compute(e,t,i){return i}}class wf{constructor(e,t){this.newValue=e,this.didChange=t}}function Cf(e,t){if("object"!=typeof e||"object"!=typeof t||!e||!t)return new wf(t,e!==t);if(Array.isArray(e)||Array.isArray(t)){const i=Array.isArray(e)&&Array.isArray(t)&&jo(e,t);return new wf(t,i)}let i=!1;for(const n in t)if(t.hasOwnProperty(n)){const o=Cf(e[n],t[n]);o.didChange&&(e[n]=o.newValue,i=!0)}return new wf(e,i)}class yf{constructor(e){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0}applyUpdate(e,t){return Cf(e,t)}validate(e){return this.defaultValue}}class xf{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return Cf(e,t)}validate(e){return void 0===e?this.defaultValue:e}compute(e,t,i){return i}}function Sf(e,t){return void 0===e?t:"false"!==e&&Boolean(e)}class kf extends xf{constructor(e,t,i,n){void 0!==n&&(n.type="boolean",n.default=i),super(e,t,i,n)}validate(e){return Sf(e,this.defaultValue)}}function Df(e,t,i,n){if(void 0===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 Lf extends xf{constructor(e,t,i,n,o,s){void 0!==s&&(s.type="integer",s.default=i,s.minimum=n,s.maximum=o),super(e,t,i,s),this.minimum=n,this.maximum=o}static clampedInt(e,t,i,n){return Df(e,t,i,n)}validate(e){return Lf.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}class Nf extends xf{constructor(e,t,i,n,o){void 0!==o&&(o.type="number",o.default=i),super(e,t,i,o),this.validationFn=n}static clamp(e,t,i){return ei?i:e}static float(e,t){if("number"==typeof e)return e;if(void 0===e)return t;const i=parseFloat(e);return isNaN(i)?t:i}validate(e){return this.validationFn(Nf.float(e,this.defaultValue))}}class Ef extends xf{static string(e,t){return"string"!=typeof e?t:e}constructor(e,t,i,n){void 0!==n&&(n.type="string",n.default=i),super(e,t,i,n)}validate(e){return Ef.string(e,this.defaultValue)}}function If(e,t,i){return"string"!=typeof e||-1===i.indexOf(e)?t:e}class Tf extends xf{constructor(e,t,i,n,o){void 0!==o&&(o.type="string",o.enum=n,o.default=i),super(e,t,i,o),this._allowedValues=n}validate(e){return If(e,this.defaultValue,this._allowedValues)}}class Mf extends bf{constructor(e,t,i,n,o,s,r){void 0!==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)}}var Af;!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"}(Af||(Af={}));class Of extends bf{constructor(){super(45,"fontLigatures",Of.OFF,{anyOf:[{type:"boolean",description:mf(0,"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:mf(0,"Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:mf(0,"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 void 0===e?this.defaultValue:"string"==typeof e?"false"===e?Of.OFF:"true"===e?Of.ON:e:Boolean(e)?Of.ON:Of.OFF}}Of.OFF='"liga" off, "calt" off',Of.ON='"liga" on, "calt" on';class Rf extends bf{constructor(){super(47,"fontWeight",Gf.fontWeight,{anyOf:[{type:"number",minimum:Rf.MINIMUM_VALUE,maximum:Rf.MAXIMUM_VALUE,errorMessage:mf(0,'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:Rf.SUGGESTION_VALUES}],default:Gf.fontWeight,description:mf(0,'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return"normal"===e||"bold"===e?e:String(Lf.clampedInt(e,Gf.fontWeight,Rf.MINIMUM_VALUE,Rf.MAXIMUM_VALUE))}}Rf.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],Rf.MINIMUM_VALUE=1,Rf.MAXIMUM_VALUE=1e3;class Pf extends yf{constructor(){super(131)}compute(e,t,i){return Pf.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})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,i=e.scrollBeyondLastLine?t-1:0,n=(e.viewLineCount+i)/(e.pixelRatio*e.height);return{typicalViewportLineCount:t,extraLinesBeyondLastLine:i,desiredRatio:n,minimapLineCount:Math.floor(e.viewLineCount/n)}}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.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,c=e.minimap.renderCharacters;let h=o>=2?Math.round(2*e.minimap.scale):e.minimap.scale;const u=e.minimap.maxColumn,g=e.minimap.size,p=e.minimap.side,m=e.verticalScrollbarWidth,f=e.viewLineCount,_=e.remainingWidth,v=e.isViewportWrapping,b=c?2:3;let w=Math.floor(o*n);const C=w/o;let y=!1,x=!1,S=b*h,k=h/o,D=1;if("fill"===g||"fit"===g){const{typicalViewportLineCount:i,extraLinesBeyondLastLine:s,desiredRatio:l,minimapLineCount:c}=Pf.computeContainedMinimapLineCount({viewLineCount:f,scrollBeyondLastLine:d,height:n,lineHeight:a,pixelRatio:o});if(f/c>1)y=!0,x=!0,h=1,S=1,k=h/o;else{let n=!1,d=h+1;if("fit"===g){const e=Math.ceil((f+s)*S);v&&r&&_<=t.stableFitRemainingWidth?(n=!0,d=t.stableFitMaxMinimapScale):n=e>w}if("fill"===g||n){y=!0;const n=h;S=Math.min(a*o,Math.max(1,Math.floor(1/l))),v&&r&&_<=t.stableFitRemainingWidth&&(d=t.stableFitMaxMinimapScale),h=Math.min(d,Math.max(1,Math.floor(S/b))),h>n&&(D=Math.min(2,h/n)),k=h/o/D,w=Math.ceil(Math.max(i,f+s)*S),v?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=_,t.stableFitMaxMinimapScale=h):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}const L=Math.floor(u*k),N=Math.min(L,Math.max(0,Math.floor((_-m-2)*k/(l+k)))+8);let E=Math.floor(o*N);const I=E/o;E=Math.floor(E*D);return{renderMinimap:c?1:2,minimapLeft:"left"===p?0:i-N-m,minimapWidth:N,minimapHeightIsEditorHeight:y,minimapIsSampling:x,minimapScale:h,minimapLineHeight:S,minimapCanvasInnerWidth:E,minimapCanvasInnerHeight:w,minimapCanvasOuterWidth:I,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,d=t.viewLineCount,c=e.get(123),h="inherit"===c?e.get(122):c,u="inherit"===h?e.get(118):h,g=e.get(121),p=e.get(2),m=t.isDominatedByLongLines,f=e.get(50),_=0!==e.get(60).renderType,v=e.get(61),b=e.get(94),w=e.get(65),C=e.get(92),y=C.verticalScrollbarSize,x=C.verticalHasArrows,S=C.arrowSize,k=C.horizontalScrollbarSize,D=e.get(58),L=e.get(37);let N;if("string"==typeof D&&/^\d+(\.\d+)?ch$/.test(D)){const e=parseFloat(D.substr(0,D.length-2));N=Lf.clampedInt(e*r,0,0,1e3)}else N=Lf.clampedInt(D,0,0,1e3);L&&(N+=16);let E=0;if(_){const e=Math.max(s,v);E=Math.round(e*a)}let I=0;f&&(I=o);let T=0,M=T+I,A=M+E,O=A+N;const R=i-I-E-N;let P=!1,F=!1,B=-1;2!==p&&("inherit"===h&&m?(P=!0,F=!0):"on"===u||"bounded"===u?F=!0:"wordWrapColumn"===u&&(B=g));const V=Pf._computeMinimapLayout({outerWidth:i,outerHeight:n,lineHeight:o,typicalHalfwidthCharacterWidth:r,pixelRatio:l,scrollBeyondLastLine:b,minimap:w,verticalScrollbarWidth:y,viewLineCount:d,remainingWidth:R,isViewportWrapping:F},t.memory||new vf);0!==V.renderMinimap&&0===V.minimapLeft&&(T+=V.minimapWidth,M+=V.minimapWidth,A+=V.minimapWidth,O+=V.minimapWidth);const W=R-V.minimapWidth,z=Math.max(1,Math.floor((W-y-2)/r)),H=x?S:0;return F&&(B=Math.max(1,z),"bounded"===u&&(B=Math.min(B,g))),{width:i,height:n,glyphMarginLeft:T,glyphMarginWidth:I,lineNumbersLeft:M,lineNumbersWidth:E,decorationsLeft:A,decorationsWidth:N,contentLeft:O,contentWidth:W,minimap:V,viewportColumn:z,isWordWrapMinified:P,isViewportWrapping:F,wrappingColumn:B,verticalScrollbarWidth:y,horizontalScrollbarHeight:k,overviewRuler:{top:H,width:y,height:n-2*H,right:0}}}}function Ff(e){const t=e.get(87);return"editable"===t?e.get(81):"on"!==t}function Bf(e,t){if("string"!=typeof e)return t;switch(e){case"hidden":return 2;case"visible":return 3;default:return 1}}const Vf="inUntrustedWorkspace",Wf="editor.unicodeHighlight.allowedCharacters",zf="editor.unicodeHighlight.invisibleCharacters",Hf="editor.unicodeHighlight.nonBasicASCII",jf="editor.unicodeHighlight.ambiguousCharacters",Uf="editor.unicodeHighlight.includeComments",$f="editor.unicodeHighlight.includeStrings",Kf="editor.unicodeHighlight.allowedLocales";function qf(e,t,i){const n=i.indexOf(e);return-1===n?t:i[n]}const Gf={fontFamily:zo?"Menlo, Monaco, 'Courier New', monospace":Vo?"'Droid Sans Mono', 'monospace', monospace":"Consolas, 'Courier New', monospace",fontWeight:"normal",fontSize:zo?12:14,lineHeight:0,letterSpacing:0},Zf=[];function Yf(e){return Zf[e.id]=e,e}const Xf={acceptSuggestionOnCommitCharacter:Yf(new kf(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:mf(0,"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:Yf(new Tf(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",mf(0,"Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:mf(0,"Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:Yf(new class extends bf{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[mf(0,"The editor will use platform APIs to detect when a Screen Reader is attached."),mf(0,"The editor will be permanently optimized for usage with a Screen Reader. Word wrapping will be disabled."),mf(0,"The editor will never be optimized for usage with a Screen Reader.")],default:"auto",description:mf(0,"Controls whether the editor should run in a mode where it is optimized for screen readers. Setting to on will disable word wrapping.")})}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}}),accessibilityPageSize:Yf(new Lf(3,"accessibilityPageSize",10,1,1073741824,{description:mf(0,"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.")})),ariaLabel:Yf(new Ef(4,"ariaLabel",mf(0,"Editor content"))),autoClosingBrackets:Yf(new Tf(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",mf(0,"Use language configurations to determine when to autoclose brackets."),mf(0,"Autoclose brackets only when the cursor is to the left of whitespace."),""],description:mf(0,"Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingDelete:Yf(new Tf(6,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",mf(0,"Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:mf(0,"Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:Yf(new Tf(7,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",mf(0,"Type over closing quotes or brackets only if they were automatically inserted."),""],description:mf(0,"Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:Yf(new Tf(8,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",mf(0,"Use language configurations to determine when to autoclose quotes."),mf(0,"Autoclose quotes only when the cursor is to the left of whitespace."),""],description:mf(0,"Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:Yf(new Mf(9,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],(function(e){switch(e){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}),{enumDescriptions:[mf(0,"The editor will not insert indentation automatically."),mf(0,"The editor will keep the current line's indentation."),mf(0,"The editor will keep the current line's indentation and honor language defined brackets."),mf(0,"The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),mf(0,"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:mf(0,"Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:Yf(new kf(10,"automaticLayout",!1)),autoSurround:Yf(new Tf(11,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[mf(0,"Use language configurations to determine when to automatically surround selections."),mf(0,"Surround with quotes but not brackets."),mf(0,"Surround with brackets but not quotes."),""],description:mf(0,"Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:Yf(new class extends bf{constructor(){const e={enabled:ff.bracketPairColorizationOptions.enabled};super(12,"bracketPairColorization",e,{"editor.bracketPairColorization.enabled":{type:"boolean",default:e.enabled,description:mf(0,"Controls whether bracket pair colorization is enabled or not. Use 'workbench.colorCustomizations' to override the bracket highlight colors.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;return{enabled:Sf(e.enabled,this.defaultValue.enabled)}}}),bracketPairGuides:Yf(new class extends bf{constructor(){const e={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(13,"guides",e,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[mf(0,"Enables bracket pair guides."),mf(0,"Enables bracket pair guides only for the active bracket pair."),mf(0,"Disables bracket pair guides.")],default:e.bracketPairs,description:mf(0,"Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[mf(0,"Enables horizontal guides as addition to vertical bracket pair guides."),mf(0,"Enables horizontal guides only for the active bracket pair."),mf(0,"Disables horizontal bracket pair guides.")],default:e.bracketPairsHorizontal,description:mf(0,"Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:e.highlightActiveBracketPair,description:mf(0,"Controls whether the editor should highlight the active bracket pair.")},"editor.guides.indentation":{type:"boolean",default:e.indentation,description:mf(0,"Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:"boolean",default:e.highlightActiveIndentation,description:mf(0,"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:qf(t.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:qf(t.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:Sf(t.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:Sf(t.indentation,this.defaultValue.indentation),highlightActiveIndentation:Sf(t.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation)}}}),stickyTabStops:Yf(new kf(104,"stickyTabStops",!1,{description:mf(0,"Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:Yf(new kf(14,"codeLens",!0,{description:mf(0,"Controls whether the editor shows CodeLens.")})),codeLensFontFamily:Yf(new Ef(15,"codeLensFontFamily","",{description:mf(0,"Controls the font family for CodeLens.")})),codeLensFontSize:Yf(new Lf(16,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:mf(0,"Controls the font size in pixels for CodeLens. When set to `0`, 90% of `#editor.fontSize#` is used.")})),colorDecorators:Yf(new kf(17,"colorDecorators",!0,{description:mf(0,"Controls whether the editor should render the inline color decorators and color picker.")})),columnSelection:Yf(new kf(18,"columnSelection",!1,{description:mf(0,"Enable that the selection with the mouse and keys is doing column selection.")})),comments:Yf(new class extends bf{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(19,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:mf(0,"Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:mf(0,"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:Sf(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:Sf(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}),contextmenu:Yf(new kf(20,"contextmenu",!0)),copyWithSyntaxHighlighting:Yf(new kf(21,"copyWithSyntaxHighlighting",!0,{description:mf(0,"Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:Yf(new Mf(22,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],(function(e){switch(e){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}),{description:mf(0,"Control the cursor animation style.")})),cursorSmoothCaretAnimation:Yf(new kf(23,"cursorSmoothCaretAnimation",!1,{description:mf(0,"Controls whether the smooth caret animation should be enabled.")})),cursorStyle:Yf(new Mf(24,"cursorStyle",Af.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],(function(e){switch(e){case"line":return Af.Line;case"block":return Af.Block;case"underline":return Af.Underline;case"line-thin":return Af.LineThin;case"block-outline":return Af.BlockOutline;case"underline-thin":return Af.UnderlineThin}}),{description:mf(0,"Controls the cursor style.")})),cursorSurroundingLines:Yf(new Lf(25,"cursorSurroundingLines",0,0,1073741824,{description:mf(0,"Controls the minimal number of visible leading and trailing lines surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:Yf(new Tf(26,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[mf(0,"`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),mf(0,"`cursorSurroundingLines` is enforced always.")],description:mf(0,"Controls when `cursorSurroundingLines` should be enforced.")})),cursorWidth:Yf(new Lf(27,"cursorWidth",0,0,1073741824,{markdownDescription:mf(0,"Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:Yf(new kf(28,"disableLayerHinting",!1)),disableMonospaceOptimizations:Yf(new kf(29,"disableMonospaceOptimizations",!1)),domReadOnly:Yf(new kf(30,"domReadOnly",!1)),dragAndDrop:Yf(new kf(31,"dragAndDrop",!0,{description:mf(0,"Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:Yf(new class extends kf{constructor(){super(32,"emptySelectionClipboard",!0,{description:mf(0,"Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}}),extraEditorClassName:Yf(new Ef(33,"extraEditorClassName","")),fastScrollSensitivity:Yf(new Nf(34,"fastScrollSensitivity",5,(e=>e<=0?5:e),{markdownDescription:mf(0,"Scrolling speed multiplier when pressing `Alt`.")})),find:Yf(new class extends bf{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(35,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:mf(0,"Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[mf(0,"Never seed search string from the editor selection."),mf(0,"Always seed search string from the editor selection, including word at cursor position."),mf(0,"Only seed search string from the editor selection.")],description:mf(0,"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:[mf(0,"Never turn on Find in Selection automatically (default)."),mf(0,"Always turn on Find in Selection automatically."),mf(0,"Turn on Find in Selection automatically when multiple lines of content are selected.")],description:mf(0,"Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:mf(0,"Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:zo},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:mf(0,"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:mf(0,"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:Sf(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:"boolean"==typeof e.seedSearchStringFromSelection?e.seedSearchStringFromSelection?"always":"never":If(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:"boolean"==typeof e.autoFindInSelection?e.autoFindInSelection?"always":"never":If(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:Sf(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:Sf(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:Sf(t.loop,this.defaultValue.loop)}}}),fixedOverflowWidgets:Yf(new kf(36,"fixedOverflowWidgets",!1)),folding:Yf(new kf(37,"folding",!0,{description:mf(0,"Controls whether the editor has code folding enabled.")})),foldingStrategy:Yf(new Tf(38,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[mf(0,"Use a language-specific folding strategy if available, else the indentation-based one."),mf(0,"Use the indentation-based folding strategy.")],description:mf(0,"Controls the strategy for computing folding ranges.")})),foldingHighlight:Yf(new kf(39,"foldingHighlight",!0,{description:mf(0,"Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:Yf(new kf(40,"foldingImportsByDefault",!1,{description:mf(0,"Controls whether the editor automatically collapses import ranges.")})),foldingMaximumRegions:Yf(new Lf(41,"foldingMaximumRegions",5e3,10,65e3,{description:mf(0,"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:Yf(new kf(42,"unfoldOnClickAfterEndOfLine",!1,{description:mf(0,"Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:Yf(new Ef(43,"fontFamily",Gf.fontFamily,{description:mf(0,"Controls the font family.")})),fontInfo:Yf(new class extends yf{constructor(){super(44)}compute(e,t,i){return e.fontInfo}}),fontLigatures2:Yf(new Of),fontSize:Yf(new class extends xf{constructor(){super(46,"fontSize",Gf.fontSize,{type:"number",minimum:6,maximum:100,default:Gf.fontSize,description:mf(0,"Controls the font size in pixels.")})}validate(e){const t=Nf.float(e,this.defaultValue);return 0===t?Gf.fontSize:Nf.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}}),fontWeight:Yf(new Rf),formatOnPaste:Yf(new kf(48,"formatOnPaste",!1,{description:mf(0,"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:Yf(new kf(49,"formatOnType",!1,{description:mf(0,"Controls whether the editor should automatically format the line after typing.")})),glyphMargin:Yf(new kf(50,"glyphMargin",!0,{description:mf(0,"Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:Yf(new class extends bf{constructor(){const e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[mf(0,"Show peek view of the results (default)"),mf(0,"Go to the primary result and show a peek view"),mf(0,"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(51,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:mf(0,"This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":Object.assign({description:mf(0,"Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:mf(0,"Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleDeclarations":Object.assign({description:mf(0,"Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleImplementations":Object.assign({description:mf(0,"Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleReferences":Object.assign({description:mf(0,"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:mf(0,"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:mf(0,"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:mf(0,"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:mf(0,"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:mf(0,"Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){var t,i,n,o,s;if(!e||"object"!=typeof e)return this.defaultValue;const r=e;return{multiple:If(r.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:null!==(t=r.multipleDefinitions)&&void 0!==t?t:If(r.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:null!==(i=r.multipleTypeDefinitions)&&void 0!==i?i:If(r.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:null!==(n=r.multipleDeclarations)&&void 0!==n?n:If(r.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:null!==(o=r.multipleImplementations)&&void 0!==o?o:If(r.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:null!==(s=r.multipleReferences)&&void 0!==s?s:If(r.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:Ef.string(r.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:Ef.string(r.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:Ef.string(r.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:Ef.string(r.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:Ef.string(r.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}),hideCursorInOverviewRuler:Yf(new kf(52,"hideCursorInOverviewRuler",!1,{description:mf(0,"Controls whether the cursor should be hidden in the overview ruler.")})),hover:Yf(new class extends bf{constructor(){const e={enabled:!0,delay:300,sticky:!0,above:!0};super(53,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:mf(0,"Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:mf(0,"Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:mf(0,"Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.above":{type:"boolean",default:e.above,description:mf(0,"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:Sf(t.enabled,this.defaultValue.enabled),delay:Lf.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:Sf(t.sticky,this.defaultValue.sticky),above:Sf(t.above,this.defaultValue.above)}}}),inDiffEditor:Yf(new kf(54,"inDiffEditor",!1)),letterSpacing:Yf(new Nf(56,"letterSpacing",Gf.letterSpacing,(e=>Nf.clamp(e,-5,20)),{description:mf(0,"Controls the letter spacing in pixels.")})),lightbulb:Yf(new class extends bf{constructor(){const e={enabled:!0};super(57,"lightbulb",e,{"editor.lightbulb.enabled":{type:"boolean",default:e.enabled,description:mf(0,"Enables the code action lightbulb in the editor.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;return{enabled:Sf(e.enabled,this.defaultValue.enabled)}}}),lineDecorationsWidth:Yf(new xf(58,"lineDecorationsWidth",10)),lineHeight:Yf(new class extends Nf{constructor(){super(59,"lineHeight",Gf.lineHeight,(e=>Nf.clamp(e,0,150)),{markdownDescription:mf(0,"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}}),lineNumbers:Yf(new class extends bf{constructor(){super(60,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[mf(0,"Line numbers are not rendered."),mf(0,"Line numbers are rendered as absolute number."),mf(0,"Line numbers are rendered as distance in lines to cursor position."),mf(0,"Line numbers are rendered every 10 lines.")],default:"on",description:mf(0,"Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,i=this.defaultValue.renderFn;return void 0!==e&&("function"==typeof e?(t=4,i=e):t="interval"===e?3:"relative"===e?2:"on"===e?1:0),{renderType:t,renderFn:i}}}),lineNumbersMinChars:Yf(new Lf(61,"lineNumbersMinChars",5,1,300)),linkedEditing:Yf(new kf(62,"linkedEditing",!1,{description:mf(0,"Controls whether the editor has linked editing enabled. Depending on the language, related symbols, e.g. HTML tags, are updated while editing.")})),links:Yf(new kf(63,"links",!0,{description:mf(0,"Controls whether the editor should detect links and make them clickable.")})),matchBrackets:Yf(new Tf(64,"matchBrackets","always",["always","near","never"],{description:mf(0,"Highlight matching brackets.")})),minimap:Yf(new class extends bf{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",renderCharacters:!0,maxColumn:120,scale:1};super(65,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:mf(0,"Controls whether the minimap is shown.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[mf(0,"The minimap has the same size as the editor contents (and might scroll)."),mf(0,"The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),mf(0,"The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:mf(0,"Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:mf(0,"Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:mf(0,"Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:mf(0,"Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:mf(0,"Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:mf(0,"Limit the width of the minimap to render at most a certain number of columns.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:Sf(t.enabled,this.defaultValue.enabled),size:If(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:If(t.side,this.defaultValue.side,["right","left"]),showSlider:If(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:Sf(t.renderCharacters,this.defaultValue.renderCharacters),scale:Lf.clampedInt(t.scale,1,1,3),maxColumn:Lf.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}),mouseStyle:Yf(new Tf(66,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:Yf(new Nf(67,"mouseWheelScrollSensitivity",1,(e=>0===e?1:e),{markdownDescription:mf(0,"A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:Yf(new kf(68,"mouseWheelZoom",!1,{markdownDescription:mf(0,"Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:Yf(new kf(69,"multiCursorMergeOverlapping",!0,{description:mf(0,"Merge multiple cursors when they are overlapping.")})),multiCursorModifier:Yf(new Mf(70,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],(function(e){return"ctrlCmd"===e?zo?"metaKey":"ctrlKey":"altKey"}),{markdownEnumDescriptions:[mf(0,"Maps to `Control` on Windows and Linux and to `Command` on macOS."),mf(0,"Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:mf(0,"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. [Read more](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:Yf(new Tf(71,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[mf(0,"Each cursor pastes a single line of the text."),mf(0,"Each cursor pastes the full text.")],markdownDescription:mf(0,"Controls pasting when the line count of the pasted text matches the cursor count.")})),occurrencesHighlight:Yf(new kf(72,"occurrencesHighlight",!0,{description:mf(0,"Controls whether the editor should highlight semantic symbol occurrences.")})),overviewRulerBorder:Yf(new kf(73,"overviewRulerBorder",!0,{description:mf(0,"Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:Yf(new Lf(74,"overviewRulerLanes",3,0,3)),padding:Yf(new class extends bf{constructor(){super(75,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:mf(0,"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:mf(0,"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:Lf.clampedInt(t.top,0,0,1e3),bottom:Lf.clampedInt(t.bottom,0,0,1e3)}}}),parameterHints:Yf(new class extends bf{constructor(){const e={enabled:!0,cycle:!1};super(76,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:mf(0,"Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:mf(0,"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:Sf(t.enabled,this.defaultValue.enabled),cycle:Sf(t.cycle,this.defaultValue.cycle)}}}),peekWidgetDefaultFocus:Yf(new Tf(77,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[mf(0,"Focus the tree when opening peek"),mf(0,"Focus the editor when opening peek")],description:mf(0,"Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:Yf(new kf(78,"definitionLinkOpensInPeek",!1,{description:mf(0,"Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:Yf(new class extends bf{constructor(){const e={other:!0,comments:!1,strings:!1};super(79,"quickSuggestions",e,{anyOf:[{type:"boolean"},{type:"object",properties:{strings:{type:"boolean",default:e.strings,description:mf(0,"Enable quick suggestions inside strings.")},comments:{type:"boolean",default:e.comments,description:mf(0,"Enable quick suggestions inside comments.")},other:{type:"boolean",default:e.other,description:mf(0,"Enable quick suggestions outside of strings and comments.")}}}],default:e,description:mf(0,"Controls whether suggestions should automatically show up while typing.")}),this.defaultValue=e}validate(e){if("boolean"==typeof e)return e;if(e&&"object"==typeof e){const t=e,i={other:Sf(t.other,this.defaultValue.other),comments:Sf(t.comments,this.defaultValue.comments),strings:Sf(t.strings,this.defaultValue.strings)};return!!(i.other&&i.comments&&i.strings)||!!(i.other||i.comments||i.strings)&&i}return this.defaultValue}}),quickSuggestionsDelay:Yf(new Lf(80,"quickSuggestionsDelay",10,0,1073741824,{description:mf(0,"Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:Yf(new kf(81,"readOnly",!1)),renameOnType:Yf(new kf(82,"renameOnType",!1,{description:mf(0,"Controls whether the editor auto renames on type."),markdownDeprecationMessage:mf(0,"Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:Yf(new kf(83,"renderControlCharacters",!0,{description:mf(0,"Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:Yf(new kf(84,"renderFinalNewline",!0,{description:mf(0,"Render last line number when the file ends with a newline.")})),renderLineHighlight:Yf(new Tf(85,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",mf(0,"Highlights both the gutter and the current line.")],description:mf(0,"Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:Yf(new kf(86,"renderLineHighlightOnlyWhenFocus",!1,{description:mf(0,"Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:Yf(new Tf(87,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:Yf(new Tf(88,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",mf(0,"Render whitespace characters except for single spaces between words."),mf(0,"Render whitespace characters only on selected text."),mf(0,"Render only trailing whitespace characters."),""],description:mf(0,"Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:Yf(new Lf(89,"revealHorizontalRightPadding",30,0,1e3)),roundedSelection:Yf(new kf(90,"roundedSelection",!0,{description:mf(0,"Controls whether selections should have rounded corners.")})),rulers:Yf(new class extends bf{constructor(){const e=[],t={type:"number",description:mf(0,"Number of monospace characters at which this editor ruler will render.")};super(91,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:mf(0,"Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:mf(0,"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(let i of e)if("number"==typeof i)t.push({column:Lf.clampedInt(i,0,0,1e4),color:null});else if(i&&"object"==typeof i){const e=i;t.push({column:Lf.clampedInt(e.column,0,0,1e4),color:e.color})}return t.sort(((e,t)=>e.column-t.column)),t}return this.defaultValue}}),scrollbar:Yf(new class extends bf{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};super(92,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[mf(0,"The vertical scrollbar will be visible only when necessary."),mf(0,"The vertical scrollbar will always be visible."),mf(0,"The vertical scrollbar will always be hidden.")],default:"auto",description:mf(0,"Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[mf(0,"The horizontal scrollbar will be visible only when necessary."),mf(0,"The horizontal scrollbar will always be visible."),mf(0,"The horizontal scrollbar will always be hidden.")],default:"auto",description:mf(0,"Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:mf(0,"The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:mf(0,"The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:mf(0,"Controls whether clicks scroll by page or jump to click position.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e,i=Lf.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),n=Lf.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:Lf.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:Bf(t.vertical,this.defaultValue.vertical),horizontal:Bf(t.horizontal,this.defaultValue.horizontal),useShadows:Sf(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:Sf(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:Sf(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:Sf(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:Sf(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:i,horizontalSliderSize:Lf.clampedInt(t.horizontalSliderSize,i,0,1e3),verticalScrollbarSize:n,verticalSliderSize:Lf.clampedInt(t.verticalSliderSize,n,0,1e3),scrollByPage:Sf(t.scrollByPage,this.defaultValue.scrollByPage)}}}),scrollBeyondLastColumn:Yf(new Lf(93,"scrollBeyondLastColumn",5,0,1073741824,{description:mf(0,"Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:Yf(new kf(94,"scrollBeyondLastLine",!0,{description:mf(0,"Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:Yf(new kf(95,"scrollPredominantAxis",!0,{description:mf(0,"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:Yf(new kf(96,"selectionClipboard",!0,{description:mf(0,"Controls whether the Linux primary clipboard should be supported."),included:Vo})),selectionHighlight:Yf(new kf(97,"selectionHighlight",!0,{description:mf(0,"Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:Yf(new kf(98,"selectOnLineNumbers",!0)),showFoldingControls:Yf(new Tf(99,"showFoldingControls","mouseover",["always","mouseover"],{enumDescriptions:[mf(0,"Always show the folding controls."),mf(0,"Only show the folding controls when the mouse is over the gutter.")],description:mf(0,"Controls when the folding controls on the gutter are shown.")})),showUnused:Yf(new kf(100,"showUnused",!0,{description:mf(0,"Controls fading out of unused code.")})),showDeprecated:Yf(new kf(126,"showDeprecated",!0,{description:mf(0,"Controls strikethrough deprecated variables.")})),inlayHints:Yf(new class extends bf{constructor(){const e={enabled:!0,fontSize:0,fontFamily:""};super(127,"inlayHints",e,{"editor.inlayHints.enabled":{type:"boolean",default:e.enabled,description:mf(0,"Enables the inlay hints in the editor.")},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:mf(0,"Controls font size of inlay hints in the editor. A default of 90% of `#editor.fontSize#` is used when the configured value is less than `5` or greater than the editor font size.")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:mf(0,"Controls font family of inlay hints in the editor. When set to empty, the `#editor.fontFamily#` is used.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:Sf(t.enabled,this.defaultValue.enabled),fontSize:Lf.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:Ef.string(t.fontFamily,this.defaultValue.fontFamily)}}}),snippetSuggestions:Yf(new Tf(101,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[mf(0,"Show snippet suggestions on top of other suggestions."),mf(0,"Show snippet suggestions below other suggestions."),mf(0,"Show snippets suggestions with other suggestions."),mf(0,"Do not show snippet suggestions.")],description:mf(0,"Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:Yf(new class extends bf{constructor(){super(102,"smartSelect",{selectLeadingAndTrailingWhitespace:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:mf(0,"Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"}})}validate(e){return e&&"object"==typeof e?{selectLeadingAndTrailingWhitespace:Sf(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace)}:this.defaultValue}}),smoothScrolling:Yf(new kf(103,"smoothScrolling",!1,{description:mf(0,"Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:Yf(new Lf(105,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:Yf(new class extends bf{constructor(){const e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!0,localityBonus:!1,shareSuggestSelections:!1,showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!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(106,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[mf(0,"Insert suggestion without overwriting text right of the cursor."),mf(0,"Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:mf(0,"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:mf(0,"Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:mf(0,"Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:mf(0,"Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:mf(0,"Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:mf(0,"Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:mf(0,"Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:e.preview,description:mf(0,"Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:mf(0,"Controls whether suggest details show inline with the label or only in the details widget")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:mf(0,"This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:mf(0,"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:mf(0,"When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:mf(0,"When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:mf(0,"When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:mf(0,"When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:mf(0,"When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:mf(0,"When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:mf(0,"When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:mf(0,"When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:mf(0,"When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:mf(0,"When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:mf(0,"When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:mf(0,"When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:mf(0,"When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:mf(0,"When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:mf(0,"When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:mf(0,"When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:mf(0,"When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:mf(0,"When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:mf(0,"When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:mf(0,"When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:mf(0,"When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:mf(0,"When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:mf(0,"When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:mf(0,"When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:mf(0,"When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:mf(0,"When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:mf(0,"When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:mf(0,"When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:mf(0,"When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{insertMode:If(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:Sf(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:Sf(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:Sf(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:Sf(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),showIcons:Sf(t.showIcons,this.defaultValue.showIcons),showStatusBar:Sf(t.showStatusBar,this.defaultValue.showStatusBar),preview:Sf(t.preview,this.defaultValue.preview),previewMode:If(t.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:Sf(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:Sf(t.showMethods,this.defaultValue.showMethods),showFunctions:Sf(t.showFunctions,this.defaultValue.showFunctions),showConstructors:Sf(t.showConstructors,this.defaultValue.showConstructors),showDeprecated:Sf(t.showDeprecated,this.defaultValue.showDeprecated),showFields:Sf(t.showFields,this.defaultValue.showFields),showVariables:Sf(t.showVariables,this.defaultValue.showVariables),showClasses:Sf(t.showClasses,this.defaultValue.showClasses),showStructs:Sf(t.showStructs,this.defaultValue.showStructs),showInterfaces:Sf(t.showInterfaces,this.defaultValue.showInterfaces),showModules:Sf(t.showModules,this.defaultValue.showModules),showProperties:Sf(t.showProperties,this.defaultValue.showProperties),showEvents:Sf(t.showEvents,this.defaultValue.showEvents),showOperators:Sf(t.showOperators,this.defaultValue.showOperators),showUnits:Sf(t.showUnits,this.defaultValue.showUnits),showValues:Sf(t.showValues,this.defaultValue.showValues),showConstants:Sf(t.showConstants,this.defaultValue.showConstants),showEnums:Sf(t.showEnums,this.defaultValue.showEnums),showEnumMembers:Sf(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:Sf(t.showKeywords,this.defaultValue.showKeywords),showWords:Sf(t.showWords,this.defaultValue.showWords),showColors:Sf(t.showColors,this.defaultValue.showColors),showFiles:Sf(t.showFiles,this.defaultValue.showFiles),showReferences:Sf(t.showReferences,this.defaultValue.showReferences),showFolders:Sf(t.showFolders,this.defaultValue.showFolders),showTypeParameters:Sf(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:Sf(t.showSnippets,this.defaultValue.showSnippets),showUsers:Sf(t.showUsers,this.defaultValue.showUsers),showIssues:Sf(t.showIssues,this.defaultValue.showIssues)}}}),inlineSuggest:Yf(new class extends bf{constructor(){const e={enabled:!0,mode:"subwordSmart"};super(55,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:mf(0,"Controls whether to automatically show inline suggestions in the editor.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:Sf(t.enabled,this.defaultValue.enabled),mode:If(t.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"])}}}),suggestFontSize:Yf(new Lf(107,"suggestFontSize",0,0,1e3,{markdownDescription:mf(0,"Font size for the suggest widget. When set to `0`, the value of `#editor.fontSize#` is used.")})),suggestLineHeight:Yf(new Lf(108,"suggestLineHeight",0,0,1e3,{markdownDescription:mf(0,"Line height for the suggest widget. When set to `0`, the value of `#editor.lineHeight#` is used. The minimum value is 8.")})),suggestOnTriggerCharacters:Yf(new kf(109,"suggestOnTriggerCharacters",!0,{description:mf(0,"Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:Yf(new Tf(110,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[mf(0,"Always select the first suggestion."),mf(0,"Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),mf(0,"Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:mf(0,"Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:Yf(new Tf(111,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[mf(0,"Tab complete will insert the best matching suggestion when pressing tab."),mf(0,"Disable tab completions."),mf(0,"Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:mf(0,"Enables tab completions.")})),tabIndex:Yf(new Lf(112,"tabIndex",0,-1,1073741824)),unicodeHighlight:Yf(new class extends bf{constructor(){const e={nonBasicASCII:Vf,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:Vf,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(113,"unicodeHighlight",e,{[Hf]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,Vf],default:e.nonBasicASCII,description:mf(0,"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.")},[zf]:{restricted:!0,type:"boolean",default:e.invisibleCharacters,description:mf(0,"Controls whether characters that just reserve space or have no width at all are highlighted.")},[jf]:{restricted:!0,type:"boolean",default:e.ambiguousCharacters,description:mf(0,"Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale.")},[Uf]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,Vf],default:e.includeComments,description:mf(0,"Controls whether characters in comments should also be subject to unicode highlighting.")},[$f]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,Vf],default:e.includeStrings,description:mf(0,"Controls whether characters in strings should also be subject to unicode highlighting.")},[Wf]:{restricted:!0,type:"object",default:e.allowedCharacters,description:mf(0,"Defines allowed characters that are not being highlighted."),additionalProperties:{type:"boolean"}},[Kf]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:e.allowedLocales,description:mf(0,"Unicode characters that are common in allowed locales are not being highlighted.")}})}applyUpdate(e,t){let i=!1;t.allowedCharacters&&(Ho(e.allowedCharacters,t.allowedCharacters)||(e=Object.assign(Object.assign({},e),{allowedCharacters:t.allowedCharacters}),i=!0)),t.allowedLocales&&(Ho(e.allowedLocales,t.allowedLocales)||(e=Object.assign(Object.assign({},e),{allowedLocales:t.allowedLocales}),i=!0));const n=super.applyUpdate(e,t);return i?new wf(n.newValue,!0):n}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{nonBasicASCII:qf(t.nonBasicASCII,Vf,[!0,!1,Vf]),invisibleCharacters:Sf(t.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:Sf(t.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:qf(t.includeComments,Vf,[!0,!1,Vf]),includeStrings:qf(t.includeStrings,Vf,[!0,!1,Vf]),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}}),unusualLineTerminators:Yf(new Tf(114,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[mf(0,"Unusual line terminators are automatically removed."),mf(0,"Unusual line terminators are ignored."),mf(0,"Unusual line terminators prompt to be removed.")],description:mf(0,"Remove unusual line terminators that might cause problems.")})),useShadowDOM:Yf(new kf(115,"useShadowDOM",!0)),useTabStops:Yf(new kf(116,"useTabStops",!0,{description:mf(0,"Inserting and deleting whitespace follows tab stops.")})),wordSeparators:Yf(new Ef(117,"wordSeparators",Wo,{description:mf(0,"Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:Yf(new Tf(118,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[mf(0,"Lines will never wrap."),mf(0,"Lines will wrap at the viewport width."),mf(0,"Lines will wrap at `#editor.wordWrapColumn#`."),mf(0,"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:mf(0,"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:Yf(new Ef(119,"wordWrapBreakAfterCharacters"," \t})]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),wordWrapBreakBeforeCharacters:Yf(new Ef(120,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔([{「£¥$£¥++")),wordWrapColumn:Yf(new Lf(121,"wordWrapColumn",80,1,1073741824,{markdownDescription:mf(0,"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:Yf(new Tf(122,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:Yf(new Tf(123,"wordWrapOverride2","inherit",["off","on","inherit"])),wrappingIndent:Yf(new Mf(124,"wrappingIndent",1,"same",["none","same","indent","deepIndent"],(function(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}}),{enumDescriptions:[mf(0,"No indentation. Wrapped lines begin at column 1."),mf(0,"Wrapped lines get the same indentation as the parent."),mf(0,"Wrapped lines get +1 indentation toward the parent."),mf(0,"Wrapped lines get +2 indentation toward the parent.")],description:mf(0,"Controls the indentation of wrapped lines.")})),wrappingStrategy:Yf(new Tf(125,"wrappingStrategy","simple",["simple","advanced"],{enumDescriptions:[mf(0,"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."),mf(0,"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.")],description:mf(0,"Controls the algorithm that computes wrapping points.")})),editorClassName:Yf(new class extends yf{constructor(){super(128)}compute(e,t,i){const n=["monaco-editor"];return t.get(33)&&n.push(t.get(33)),e.extraEditorClassName&&n.push(e.extraEditorClassName),"default"===t.get(66)?n.push("mouse-default"):"copy"===t.get(66)&&n.push("mouse-copy"),t.get(100)&&n.push("showUnused"),t.get(126)&&n.push("showDeprecated"),n.join(" ")}}),pixelRatio:Yf(new class extends yf{constructor(){super(129)}compute(e,t,i){return e.pixelRatio}}),tabFocusMode:Yf(new class extends yf{constructor(){super(130)}compute(e,t,i){return!!t.get(81)||e.tabFocusMode}}),layoutInfo:Yf(new Pf),wrappingInfo:Yf(new class extends yf{constructor(){super(132)}compute(e,t,i){const n=t.get(131);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:n.isWordWrapMinified,isViewportWrapping:n.isViewportWrapping,wrappingColumn:n.wrappingColumn}}})};class Qf{constructor(){this._zoomFactor=1}getZoomFactor(){return this._zoomFactor}}Qf.INSTANCE=new Qf;class Jf extends Uo{constructor(){super(),this._onDidChange=this._register(new $o),this.onDidChange=this._onDidChange.event,this._listener=()=>this._handleChange(!0),this._mediaQueryList=null,this._handleChange(!1)}_handleChange(e){this._mediaQueryList&&this._mediaQueryList.removeEventListener("change",this._listener),this._mediaQueryList=matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`),this._mediaQueryList.addEventListener("change",this._listener),e&&this._onDidChange.fire()}}class e_ extends Uo{constructor(){super(),this._onDidChange=this._register(new $o),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio();const e=this._register(new Jf);this._register(e.onDidChange((()=>{this._value=this._getPixelRatio(),this._onDidChange.fire(this._value)})))}get value(){return this._value}_getPixelRatio(){const e=document.createElement("canvas").getContext("2d");return(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}}const t_=new class{constructor(){this._pixelRatioMonitor=null}_getOrCreatePixelRatioMonitor(){return this._pixelRatioMonitor||(this._pixelRatioMonitor=new e_),this._pixelRatioMonitor}get value(){return this._getOrCreatePixelRatioMonitor().value}get onDidChange(){return this._getOrCreatePixelRatioMonitor().onDidChange}};function i_(){return Qf.INSTANCE.getZoomFactor()}const n_=navigator.userAgent,o_=n_.indexOf("Firefox")>=0,s_=n_.indexOf("AppleWebKit")>=0,r_=n_.indexOf("Chrome")>=0,a_=!r_&&n_.indexOf("Safari")>=0,l_=!r_&&!a_&&s_,d_=n_.indexOf("Electron/")>=0,c_=n_.indexOf("Android")>=0,h_=window.matchMedia&&window.matchMedia("(display-mode: standalone)").matches;var u_=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",PixelRatio:t_,getZoomFactor:i_,isFirefox:o_,isWebKit:s_,isChrome:r_,isSafari:a_,isWebkitWebView:l_,isElectron:d_,isAndroid:c_,isStandalone:h_});class g_{constructor(e){this.domNode=e,this._maxWidth=-1,this._width=-1,this._height=-1,this._top=-1,this._left=-1,this._bottom=-1,this._right=-1,this._fontFamily="",this._fontWeight="",this._fontSize=-1,this._fontStyle="",this._fontFeatureSettings="",this._textDecoration="",this._lineHeight=-1,this._letterSpacing=-100,this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){this._maxWidth!==e&&(this._maxWidth=e,this.domNode.style.maxWidth=this._maxWidth+"px")}setWidth(e){this._width!==e&&(this._width=e,this.domNode.style.width=this._width+"px")}setHeight(e){this._height!==e&&(this._height=e,this.domNode.style.height=this._height+"px")}setTop(e){this._top!==e&&(this._top=e,this.domNode.style.top=this._top+"px")}unsetTop(){-1!==this._top&&(this._top=-1,this.domNode.style.top="")}setLeft(e){this._left!==e&&(this._left=e,this.domNode.style.left=this._left+"px")}setBottom(e){this._bottom!==e&&(this._bottom=e,this.domNode.style.bottom=this._bottom+"px")}setRight(e){this._right!==e&&(this._right=e,this.domNode.style.right=this._right+"px")}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){this._fontSize!==e&&(this._fontSize=e,this.domNode.style.fontSize=this._fontSize+"px")}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)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){this._lineHeight!==e&&(this._lineHeight=e,this.domNode.style.lineHeight=this._lineHeight+"px")}setLetterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.domNode.style.letterSpacing=this._letterSpacing+"px")}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 p_(e){return new g_(e)}function m_(e,t){e instanceof g_?(e.setFontFamily(t.getMassagedFontFamily(a_?Gf.fontFamily:null)),e.setFontWeight(t.fontWeight),e.setFontSize(t.fontSize),e.setFontFeatureSettings(t.fontFeatureSettings),e.setLineHeight(t.lineHeight),e.setLetterSpacing(t.letterSpacing)):(e.style.fontFamily=t.getMassagedFontFamily(a_?Gf.fontFamily:null),e.style.fontWeight=t.fontWeight,e.style.fontSize=t.fontSize+"px",e.style.fontFeatureSettings=t.fontFeatureSettings,e.style.lineHeight=t.lineHeight+"px",e.style.letterSpacing=t.letterSpacing+"px")}class f_{constructor(e,t){this.chr=e,this.type=t,this.width=0}fulfill(e){this.width=e}}class __{constructor(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}read(){this._createDomElements(),document.body.appendChild(this._container),this._readFromDomElements(),document.body.removeChild(this._container),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");m_(t,this._bareFontInfo),e.appendChild(t);const i=document.createElement("div");m_(i,this._bareFontInfo),i.style.fontWeight="bold",e.appendChild(i);const n=document.createElement("div");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");__._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;ethis._values[e]))}}const x_=new class extends Uo{constructor(){super(),this._onDidChange=this._register(new $o),this.onDidChange=this._onDidChange.event,this._cache=new y_,this._evictUntrustedReadingsTimeout=-1}dispose(){-1!==this._evictUntrustedReadingsTimeout&&(window.clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearAllFontInfos(){this._cache=new y_,this._onDidChange.fire()}_writeToCache(e,t){this._cache.put(e,t),t.isTrusted||-1!==this._evictUntrustedReadingsTimeout||(this._evictUntrustedReadingsTimeout=window.setTimeout((()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()}),5e3))}_evictUntrustedReadings(){const e=this._cache.getValues();let t=!1;for(const i of e)i.isTrusted||(t=!0,this._cache.remove(i));t&&this._onDidChange.fire()}readFontInfo(e){if(!this._cache.has(e)){let t=this._actualReadFontInfo(e);(t.typicalHalfwidthCharacterWidth<=2||t.typicalFullwidthCharacterWidth<=2||t.spaceWidth<=2||t.maxDigitWidth<=2)&&(t=new C_({pixelRatio:t_.value,fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,fontFeatureSettings:t.fontFeatureSettings,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,isMonospace:t.isMonospace,typicalHalfwidthCharacterWidth:Math.max(t.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(t.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:t.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(t.spaceWidth,5),middotWidth:Math.max(t.middotWidth,5),wsmiddotWidth:Math.max(t.wsmiddotWidth,5),maxDigitWidth:Math.max(t.maxDigitWidth,5)},!1)),this._writeToCache(e,t)}return this._cache.get(e)}_createRequest(e,t,i,n){const o=new f_(e,t);return i.push(o),n&&n.push(o),o}_actualReadFontInfo(e){const t=[],i=[],n=this._createRequest("n",0,t,i),o=this._createRequest("m",0,t,null),s=this._createRequest(" ",0,t,i),r=this._createRequest("0",0,t,i),a=this._createRequest("1",0,t,i),l=this._createRequest("2",0,t,i),d=this._createRequest("3",0,t,i),c=this._createRequest("4",0,t,i),h=this._createRequest("5",0,t,i),u=this._createRequest("6",0,t,i),g=this._createRequest("7",0,t,i),p=this._createRequest("8",0,t,i),m=this._createRequest("9",0,t,i),f=this._createRequest("→",0,t,i),_=this._createRequest("→",0,t,null),v=this._createRequest("·",0,t,i),b=this._createRequest(String.fromCharCode(11825),0,t,null),w="|/-_ilm%";for(let k=0,D=w.length;k.001){y=!1;break}}let S=!0;return y&&_.width!==x&&(S=!1),_.width>f.width&&(S=!1),new C_({pixelRatio:t_.value,fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,fontFeatureSettings:e.fontFeatureSettings,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:y,typicalHalfwidthCharacterWidth:n.width,typicalFullwidthCharacterWidth:o.width,canUseHalfwidthRightwardsArrow:S,spaceWidth:s.width,middotWidth:v.width,wsmiddotWidth:b.width,maxDigitWidth:C},!0)}};var S_;!function(e){e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=function(t){return t[e.DI_DEPENDENCIES]||[]}}(S_||(S_={}));const k_=L_("instantiationService");function D_(e,t,i){t[S_.DI_TARGET]===t?t[S_.DI_DEPENDENCIES].push({id:e,index:i}):(t[S_.DI_DEPENDENCIES]=[{id:e,index:i}],t[S_.DI_TARGET]=t)}function L_(e){if(S_.serviceIds.has(e))return S_.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");D_(t,e,n)};return t.toString=()=>e,S_.serviceIds.set(e,t),t}const N_=L_("codeEditorService");function E_(e,t){if(!e)throw new Error(t?`Assertion failed (${t})`:"Assertion Failed")}const I_={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0};class T_ extends Uo{constructor(e,t={}){super(),this._onDidUpdate=this._register(new $o),this._editor=e,this._options=Ko(t,I_,!1),this.disposed=!1,this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=Boolean(this._options.alwaysRevealFirst),this._register(this._editor.onDidDispose((()=>this.dispose()))),this._register(this._editor.onDidUpdateDiff((()=>this._onDiffUpdated()))),this._options.followsCaret&&this._register(this._editor.getModifiedEditor().onDidChangeCursorPosition((e=>{this.ignoreSelectionChange||(this.nextIdx=-1)}))),this._options.alwaysRevealFirst&&this._register(this._editor.getModifiedEditor().onDidChangeModel((e=>{this.revealFirst=!0}))),this._init()}_init(){this._editor.getLineChanges()}_onDiffUpdated(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&null!==this._editor.getLineChanges()&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))}_compute(e){this.ranges=[],e&&e.forEach((e=>{!this._options.ignoreCharChanges&&e.charChanges?e.charChanges.forEach((e=>{this.ranges.push({rhs:!0,range:new qo(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)})})):0===e.modifiedEndLineNumber?this.ranges.push({rhs:!0,range:new qo(e.modifiedStartLineNumber,1,e.modifiedStartLineNumber+1,1)}):this.ranges.push({rhs:!0,range:new qo(e.modifiedStartLineNumber,1,e.modifiedEndLineNumber+1,1)})})),this.ranges.sort(((e,t)=>qo.compareRangesUsingStarts(e.range,t.range))),this._onDidUpdate.fire(this)}_initIdx(e){let t=!1;const i=this._editor.getPosition();if(i){for(let n=0,o=this.ranges.length;n=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));const i=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{const e=i.range.getStartPosition();this._editor.setPosition(e),this._editor.revealRangeInCenter(i.range,t)}finally{this.ignoreSelectionChange=!1}}canNavigate(){return this.ranges&&this.ranges.length>0}next(e=0){this._move(!0,e)}previous(e=0){this._move(!1,e)}dispose(){super.dispose(),this.ranges=[],this.disposed=!0}}const M_={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"};var A_;!function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(A_||(A_={}));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;t0&&e.getLanguageId(r-1)===o;)r--;return new B_(e,o,r,s+1,e.getStartOffset(r),e.getEndOffset(s))}class B_{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}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(e){return this._actual.getLineContent().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)}}function V_(e){return 0!=(3&e)}class W_{constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map((e=>new O_(e))):e.brackets?this._autoClosingPairs=e.brackets.map((e=>new O_({open:e[0],close:e[1]}))):this._autoClosingPairs=[],e.colorizedBracketPairs?this._colorizedBracketPairs=z_(e.colorizedBracketPairs.map((e=>[e[0],e[1]]))):e.brackets?this._colorizedBracketPairs=z_(e.brackets.map((e=>[e[0],e[1]])).filter((e=>!("<"===e[0]&&">"===e[1])))):this._colorizedBracketPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new O_({open:t.open,close:t.close||""}))}this._autoCloseBefore="string"==typeof e.autoCloseBefore?e.autoCloseBefore:W_.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(){return this._autoCloseBefore}getSurroundingPairs(){return this._surroundingPairs}getColorizedBrackets(){return this._colorizedBracketPairs}}function z_(e){return e.filter((([e,t])=>""!==e&&""!==t))}W_.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED=";:.,=}])> \n\t";const H_="undefined"!=typeof Buffer;let j_,U_,$_,K_;class q_{constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}static wrap(e){return H_&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new q_(e)}toString(){return H_?this.buffer.toString():(j_||(j_=new TextDecoder),j_.decode(this.buffer))}}function G_(e,t){return e[t+0]<<0>>>0|e[t+1]<<8>>>0}function Z_(e,t,i){e[i+0]=255&t,t>>>=8,e[i+1]=255&t}function Y_(e,t){return e[t]*Math.pow(2,24)+e[t+1]*Math.pow(2,16)+e[t+2]*Math.pow(2,8)+e[t+3]}function X_(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 Q_(e,t){return e[t]}function J_(e,t,i){e[i]=t}function ev(){return U_||(U_=new TextDecoder("UTF-16LE")),U_}function tv(){return K_||(K_=Zo()?ev():($_||($_=new TextDecoder("UTF-16BE")),$_)),K_}const iv="undefined"!=typeof TextDecoder;let nv,ov;function sv(e,t,i){const n=[];let o=0;for(let s=0;snew rv(e),ov=function(e,t,i){const n=new Uint16Array(e.buffer,t,i);if(i>0&&(65279===n[0]||65534===n[0]))return sv(e,t,i);return ev().decode(n)}):(nv=e=>new av,ov=sv);class rv{constructor(e){this._capacity=0|e,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}reset(){this._completedStrings=null,this._bufferLength=0}build(){return null!==this._completedStrings?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()}_buildBuffer(){if(0===this._bufferLength)return"";const e=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return tv().decode(e)}_flushBuffer(){const e=this._buildBuffer();this._bufferLength=0,null===this._completedStrings?this._completedStrings=[e]:this._completedStrings[this._completedStrings.length]=e}write1(e){const t=this._capacity-this._bufferLength;t<=1&&(0===t||Go(e))&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCII(e){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCIIString(e){const t=e.length;if(this._bufferLength+t>=this._capacity)return this._flushBuffer(),void(this._completedStrings[this._completedStrings.length]=e);for(let i=0;i[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}(t);this.brackets=i.map(((t,n)=>new lv(e,n,t.open,t.close,function(e,t,i,n){let o=[];o=o.concat(e),o=o.concat(t);for(let s=0,r=o.length;s=0&&n.push(t);for(const t of s.close)t.indexOf(e)>=0&&n.push(t)}}function hv(e,t){return e.length-t.length}function uv(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 gv(e){const t=/^[\w ]+$/.test(e);return e=Xo(e),t?`\\b${e}\\b`:e}function pv(e){const t=`(${e.map(gv).join(")|(")})`;return Yo(t,!0)}const mv=function(){let e=null,t=null;return function(i){return e!==i&&(e=i,t=function(e){if(iv){const t=new Uint16Array(e.length);let i=0;for(let n=e.length-1;n>=0;n--)t[i++]=e.charCodeAt(n);return tv().decode(t)}{const t=[];let i=0;for(let n=e.length-1;n>=0;n--)t[i++]=e.charAt(n);return t.join("")}}(e)),t}}();class fv{static _findPrevBracketInText(e,t,i,n){const o=i.match(e);if(!o)return null;const s=i.length-(o.index||0),r=o[0].length,a=n+s;return new qo(t,a-r+1,t,a+1)}static findPrevBracketInRange(e,t,i,n,o){const s=mv(i).substring(i.length-o,i.length-n);return this._findPrevBracketInText(e,t,s,n)}static findNextBracketInText(e,t,i,n){const o=i.match(e);if(!o)return null;const s=o.index||0,r=o[0].length;if(0===r)return null;const a=n+s;return new qo(t,a+1,t,a+1+r)}static findNextBracketInRange(e,t,i,n,o){const s=i.substring(n,o);return this.findNextBracketInText(e,t,s,n)}}class _v{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 Qo(e)}onElectricCharacter(e,t,i){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;const n=t.findTokenIndexAtOffset(i-1);if(V_(t.getStandardTokenType(n)))return null;const o=this._richEditBrackets.reversedRegex,s=t.getLineContent().substring(0,i-1)+e,r=fv.findPrevBracketInRange(o,1,s,0,s.length);if(!r)return null;const a=s.substring(r.startColumn-1,r.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[a])return null;const l=t.getActualLineContentBefore(r.startColumn-1);return/^\s*$/.test(l)?{matchOpenBracket:a}:null}}function vv(e){return e.global&&(e.lastIndex=0),!0}class bv{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&vv(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&vv(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&vv(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&vv(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 wv{constructor(e){(e=e||{}).brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach((e=>{const t=wv._createOpenBracketRegExp(e[0]),i=wv._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)))))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=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Av=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}};class Ov{constructor(e){this.languageId=e}affects(e){return!this.languageId||this.languageId===e}}const Rv=L_("languageConfigurationService");let Pv=class extends Uo{constructor(e,t){super(),this.configurationService=e,this.languageService=t,this.onDidChangeEmitter=this._register(new $o),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const i=new Set(Object.values(Fv));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 Ov(void 0));else for(const i of n)this.languageService.isRegisteredLanguageId(i)&&(this.configurations.delete(i),this.onDidChangeEmitter.fire(new Ov(i)))}))),this._register(Wv.onDidChange((e=>{this.configurations.delete(e.languageId),this.onDidChangeEmitter.fire(new Ov(e.languageId))})))}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=function(e,t,i){let n=Wv.getLanguageConfiguration(e);if(!n){if(!i.isRegisteredLanguageId(e))throw new Error(`Language id "${e}" is not configured nor known`);n=new Uv(e,{})}const o=function(e,t){const i=t.getValue(Fv.brackets,{overrideIdentifier:e}),n=t.getValue(Fv.colorizedBracketPairs,{overrideIdentifier:e});return{brackets:Bv(i),colorizedBracketPairs:Bv(n)}}(n.languageId,t),s=Hv([n.underlyingConfig,o]);return new Uv(n.languageId,s)}(e,this.configurationService,this.languageService),this.configurations.set(e,t)),t}};Pv=Mv([Av(0,Cv),Av(1,Lv)],Pv);const Fv={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function Bv(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 Vv{constructor(e){this.languageId=e}}const Wv=new class{constructor(){this._entries=new Map,this._onDidChange=new $o,this.onDidChange=this._onDidChange.event}register(e,t,i=0){let n=this._entries.get(e);n||(n=new zv(e),this._entries.set(e,n));const o=n.register(t,i);return this._onDidChange.fire(new Vv(e)),es((()=>{o.dispose(),this._onDidChange.fire(new Vv(e))}))}getLanguageConfiguration(e){const t=this._entries.get(e);return(null==t?void 0:t.getResolvedConfiguration())||null}getComments(e){const t=this.getLanguageConfiguration(e);return t&&t.comments||null}getIndentRulesSupport(e){const t=this.getLanguageConfiguration(e);return t&&t.indentRulesSupport||null}getPrecedingValidLine(e,t,i){const n=e.getLanguageIdAtPosition(t,0);if(t>1){let o,s=-1;for(o=t-1;o>=1;o--){if(e.getLanguageIdAtPosition(o,0)!==n)return s;const t=e.getLineContent(o);if(!i.shouldIgnore(t)&&!/^\s+$/.test(t)&&""!==t)return o;s=o}}return-1}getInheritIndentForLine(e,t,i,n=!0){if(e<4)return null;const o=this.getIndentRulesSupport(t.getLanguageId());if(!o)return null;if(i<=1)return{indentation:"",action:null};const s=this.getPrecedingValidLine(t,i,o);if(s<0)return null;if(s<1)return{indentation:"",action:null};const r=t.getLineContent(s);if(o.shouldIncrease(r)||o.shouldIndentNextLine(r))return{indentation:ts(r),action:A_.Indent,line:s};if(o.shouldDecrease(r))return{indentation:ts(r),action:null,line:s};{if(1===s)return{indentation:ts(t.getLineContent(s)),action:null,line:s};const e=s-1,i=o.getIndentMetadata(t.getLineContent(e));if(!(3&i)&&4&i){let i=0;for(let n=e-1;n>0;n--)if(!o.shouldIndentNextLine(t.getLineContent(n))){i=n;break}return{indentation:ts(t.getLineContent(i+1)),action:null,line:i+1}}if(n)return{indentation:ts(t.getLineContent(s)),action:null,line:s};for(let n=s;n>0;n--){const e=t.getLineContent(n);if(o.shouldIncrease(e))return{indentation:ts(e),action:A_.Indent,line:n};if(o.shouldIndentNextLine(e)){let e=0;for(let i=n-1;i>0;i--)if(!o.shouldIndentNextLine(t.getLineContent(n))){e=i;break}return{indentation:ts(t.getLineContent(e+1)),action:null,line:e+1}}if(o.shouldDecrease(e))return{indentation:ts(e),action:null,line:n}}return{indentation:ts(t.getLineContent(1)),action:null,line:1}}}getGoodIndentForLine(e,t,i,n,o){if(e<4)return null;const s=this.getLanguageConfiguration(i);if(!s)return null;const r=this.getIndentRulesSupport(i);if(!r)return null;const a=this.getInheritIndentForLine(e,t,n),l=t.getLineContent(n);if(a){const i=a.line;if(void 0!==i){const n=s.onEnter(e,"",t.getLineContent(i),"");if(n){let e=ts(t.getLineContent(i));return n.removeText&&(e=e.substring(0,e.length-n.removeText)),n.indentAction===A_.Indent||n.indentAction===A_.IndentOutdent?e=o.shiftIndent(e):n.indentAction===A_.Outdent&&(e=o.unshiftIndent(e)),r.shouldDecrease(l)&&(e=o.unshiftIndent(e)),n.appendText&&(e+=n.appendText),ts(e)}}return r.shouldDecrease(l)?a.action===A_.Indent?a.indentation:o.unshiftIndent(a.indentation):a.action===A_.Indent?o.shiftIndent(a.indentation):a.indentation}return null}getIndentForEnter(e,t,i,n){if(e<4)return null;t.forceTokenization(i.startLineNumber);const o=t.getLineTokens(i.startLineNumber),s=F_(o,i.startColumn-1),r=s.getLineContent();let a,l,d=!1;if(s.firstCharOffset>0&&o.getLanguageId(0)!==s.languageId?(d=!0,a=r.substr(0,i.startColumn-1-s.firstCharOffset)):a=o.getLineContent().substring(0,i.startColumn-1),i.isEmpty())l=r.substr(i.startColumn-1-s.firstCharOffset);else{l=this.getScopedLineTokens(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-s.firstCharOffset)}const c=this.getIndentRulesSupport(s.languageId);if(!c)return null;const h=a,u=ts(a),g={getLineTokens:e=>t.getLineTokens(e),getLanguageId:()=>t.getLanguageId(),getLanguageIdAtPosition:(e,i)=>t.getLanguageIdAtPosition(e,i),getLineContent:e=>e===i.startLineNumber?h:t.getLineContent(e)},p=ts(o.getLineContent()),m=this.getInheritIndentForLine(e,g,i.startLineNumber+1);if(!m){const e=d?p:u;return{beforeEnter:e,afterEnter:e}}let f=d?p:m.indentation;return m.action===A_.Indent&&(f=n.shiftIndent(f)),c.shouldDecrease(l)&&(f=n.unshiftIndent(f)),{beforeEnter:d?p:u,afterEnter:f}}getIndentActionForType(e,t,i,n,o){if(e<4)return null;const s=this.getScopedLineTokens(t,i.startLineNumber,i.startColumn);if(s.firstCharOffset)return null;const r=this.getIndentRulesSupport(s.languageId);if(!r)return null;const a=s.getLineContent(),l=a.substr(0,i.startColumn-1-s.firstCharOffset);let d;if(i.isEmpty())d=a.substr(i.startColumn-1-s.firstCharOffset);else{d=this.getScopedLineTokens(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-s.firstCharOffset)}if(!r.shouldDecrease(l+d)&&r.shouldDecrease(l+n+d)){const n=this.getInheritIndentForLine(e,t,i.startLineNumber,!1);if(!n)return null;let s=n.indentation;return n.action!==A_.Indent&&(s=o.unshiftIndent(s)),s}return null}getIndentMetadata(e,t){const i=this.getIndentRulesSupport(e.getLanguageId());return i?t<1||t>e.getLineCount()?null:i.getIndentMetadata(e.getLineContent(t)):null}getEnterAction(e,t,i){const n=this.getScopedLineTokens(t,i.startLineNumber,i.startColumn),o=this.getLanguageConfiguration(n.languageId);if(!o)return null;const s=n.getLineContent(),r=s.substr(0,i.startColumn-1-n.firstCharOffset);let a;if(i.isEmpty())a=s.substr(i.startColumn-1-n.firstCharOffset);else{a=this.getScopedLineTokens(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-n.firstCharOffset)}let l="";if(i.startLineNumber>1&&0===n.firstCharOffset){const e=this.getScopedLineTokens(t,i.startLineNumber-1);e.languageId===n.languageId&&(l=e.getLineContent())}const d=o.onEnter(e,l,r,a);if(!d)return null;const c=d.indentAction;let h=d.appendText;const u=d.removeText||0;h?c===A_.Indent&&(h="\t"+h):h=c===A_.Indent||c===A_.IndentOutdent?"\t":"";let g=this.getIndentationAtPosition(t,i.startLineNumber,i.startColumn);return u&&(g=g.substring(0,g.length-u)),{indentAction:c,appendText:h,removeText:u,indentation:g}}getIndentationAtPosition(e,t,i){const n=e.getLineContent(t);let o=ts(n);return o.length>i-1&&(o=o.substring(0,i-1)),o}getScopedLineTokens(e,t,i){e.forceTokenization(t);return F_(e.getLineTokens(t),void 0===i?e.getLineMaxColumn(t)-1:i-1)}};class zv{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){const i=new jv(e,t,++this._order);return this._entries.push(i),this._resolved=null,es((()=>{for(let e=0;ee.configuration))))}}function Hv(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 jv{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 Uv{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 wv(this.underlyingConfig):null,this.comments=Uv._handleComments(this.underlyingConfig),this.characterPair=new W_(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||is,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new bv(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{}}getWordDefinition(){return ns(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new dv(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new _v(this.brackets)),this._electricCharacter}onEnter(e,t,i,n){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,i,n):null}getAutoClosingPairs(){return new R_(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(){return this.characterPair.getAutoCloseBeforeSet()}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}}Iv(Rv,Pv);const $v=new class{clone(){return this}equals(e){return this===e}};function Kv(e,t){return new ss([new rs(0,"",e)],t)}function qv(e,t){const i=new Uint32Array(2);return i[0]=0,i[1]=(16384|e<<0|2<<23)>>>0,new os(i,null===t?$v:t)}const Gv=L_("modelService");var Zv=globalThis&&globalThis.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,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){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))},Yv=globalThis&&globalThis.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(i){t[i]=e[i]&&function(t){return new Promise((function(n,o){(function(e,t,i,n){Promise.resolve(n).then((function(t){e({value:t,done:i})}),t)})(n,o,(t=e[i](t)).done,t.value)}))}}};function Xv(e){const t=new as,i=e(t.token),n=new Promise(((e,n)=>{const o=t.token.onCancellationRequested((()=>{o.dispose(),t.dispose(),n(new ls)}));Promise.resolve(i).then((i=>{o.dispose(),t.dispose(),e(i)}),(e=>{o.dispose(),t.dispose(),n(e)}))}));return new class{cancel(){t.cancel()}then(e,t){return n.then(e,t)}catch(e){return this.then(void 0,e)}finally(e){return n.finally(e)}}}function Qv(e,t,i){return new Promise(((n,o)=>{const s=t.onCancellationRequested((()=>{s.dispose(),n(i)}));e.then(n,o).finally((()=>s.dispose()))}))}class Jv{constructor(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){const e=()=>{this.queuedPromise=null;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)}))}))}}const eb=Symbol("MicrotaskDelay");class tb{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=()=>{var e;this.deferred=null,null===(e=this.doResolve)||void 0===e||e.call(this,null)};return this.deferred=t===eb?(e=>{let t=!0;return queueMicrotask((()=>{t&&(t=!1,e())})),{isTriggered:()=>t,dispose:()=>{t=!1}}})(i):((e,t)=>{let i=!0;const n=setTimeout((()=>{i=!1,t()}),e);return{isTriggered:()=>i,dispose:()=>{clearTimeout(n),i=!1}}})(t,i),this.completionPromise}isTriggered(){var e;return!!(null===(e=this.deferred)||void 0===e?void 0:e.isTriggered())}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject&&this.doReject(new ls),this.completionPromise=null)}cancelTimeout(){var e;null===(e=this.deferred)||void 0===e||e.dispose(),this.deferred=null}dispose(){this.cancel()}}class ib{constructor(e){this.delayer=new tb(e),this.throttler=new Jv}trigger(e,t){return this.delayer.trigger((()=>this.throttler.queue(e)),t)}dispose(){this.delayer.dispose()}}function nb(e,t){return t?new Promise(((i,n)=>{const o=setTimeout((()=>{s.dispose(),i()}),e),s=t.onCancellationRequested((()=>{clearTimeout(o),s.dispose(),n(new ls)}))})):Xv((t=>nb(e,t)))}function ob(e,t=0){const i=setTimeout(e,t);return es((()=>clearTimeout(i)))}function sb(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++];return Promise.resolve(r()).then((e=>t(e)?Promise.resolve(e):s()))};return s()}class rb{constructor(e,t){this._token=-1,"function"==typeof e&&"number"==typeof t&&this.setIfNotSet(e,t)}dispose(){this.cancel()}cancel(){-1!==this._token&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setTimeout((()=>{this._token=-1,e()}),t)}setIfNotSet(e,t){-1===this._token&&(this._token=setTimeout((()=>{this._token=-1,e()}),t))}}class ab{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){-1!==this._token&&(clearInterval(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setInterval((()=>{e()}),t)}}class lb{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&&this.runner()}}let db;db="function"!=typeof requestIdleCallback||"function"!=typeof cancelIdleCallback?e=>{cs((()=>{if(t)return;const i=Date.now()+15;e(Object.freeze({didTimeout:!0,timeRemaining:()=>Math.max(0,i-Date.now())}))}));let t=!1;return{dispose(){t||(t=!0)}}}:(e,t)=>{const i=requestIdleCallback(e,"number"==typeof t?{timeout:t}:void 0);let n=!1;return{dispose(){n||(n=!0,cancelIdleCallback(i))}}};class cb{constructor(e){this._didRun=!1,this._executor=()=>{try{this._value=e()}catch(t){this._error=t}finally{this._didRun=!0}},this._handle=db((()=>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 hb{constructor(){this.rejected=!1,this.resolved=!1,this.p=new Promise(((e,t)=>{this.completeCallback=e,this.errorCallback=t}))}get isRejected(){return this.rejected}get isSettled(){return this.rejected||this.resolved}complete(e){return new Promise((t=>{this.completeCallback(e),this.resolved=!0,t()}))}cancel(){new Promise((e=>{this.errorCallback(new ls),this.rejected=!0,e()}))}}var ub,gb;!function(e){e.settled=function(e){return Zv(this,void 0,void 0,(function*(){let t;const i=yield Promise.all(e.map((e=>e.then((e=>e),(e=>{t||(t=e)})))));if(void 0!==t)throw t;return i}))},e.withAsyncBody=function(e){return new Promise(((t,i)=>Zv(this,void 0,void 0,(function*(){try{yield e(t,i)}catch(n){i(n)}}))))}}(ub||(ub={}));class pb{constructor(e){this._state=0,this._results=[],this._error=null,this._onStateChanged=new $o,queueMicrotask((()=>Zv(this,void 0,void 0,(function*(){const t={emitOne:e=>this.emitOne(e),emitMany:e=>this.emitMany(e),reject:e=>this.reject(e)};try{yield Promise.resolve(e(t)),this.resolve()}catch(i){this.reject(i)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}}))))}static fromArray(e){return new pb((t=>{t.emitMany(e)}))}static fromPromise(e){return new pb((t=>Zv(this,void 0,void 0,(function*(){t.emitMany(yield e)}))))}static fromPromises(e){return new pb((t=>Zv(this,void 0,void 0,(function*(){yield Promise.all(e.map((e=>Zv(this,void 0,void 0,(function*(){return t.emitOne(yield e)})))))}))))}static merge(e){return new pb((t=>Zv(this,void 0,void 0,(function*(){yield Promise.all(e.map((e=>{var i,n;return Zv(this,void 0,void 0,(function*(){var o,s;try{for(i=Yv(e);!(n=yield i.next()).done;){const e=n.value;t.emitOne(e)}}catch(r){o={error:r}}finally{try{n&&!n.done&&(s=i.return)&&(yield s.call(i))}finally{if(o)throw o.error}}}))})))}))))}[Symbol.asyncIterator](){let e=0;return{next:()=>Zv(this,void 0,void 0,(function*(){for(;;){if(2===this._state)throw this._error;if(eZv(this,void 0,void 0,(function*(){var n,o;try{for(var s,r=Yv(e);!(s=yield r.next()).done;){const e=s.value;i.emitOne(t(e))}}catch(a){n={error:a}}finally{try{s&&!s.done&&(o=r.return)&&(yield o.call(r))}finally{if(n)throw n.error}}}))))}map(e){return pb.map(this,e)}static filter(e,t){return new pb((i=>Zv(this,void 0,void 0,(function*(){var n,o;try{for(var s,r=Yv(e);!(s=yield r.next()).done;){const e=s.value;t(e)&&i.emitOne(e)}}catch(a){n={error:a}}finally{try{s&&!s.done&&(o=r.return)&&(yield o.call(r))}finally{if(n)throw n.error}}}))))}filter(e){return pb.filter(this,e)}static coalesce(e){return pb.filter(e,(e=>!!e))}coalesce(){return pb.coalesce(this)}static toPromise(e){var t,i,n,o;return Zv(this,void 0,void 0,(function*(){const s=[];try{for(t=Yv(e);!(i=yield t.next()).done;){const e=i.value;s.push(e)}}catch(r){n={error:r}}finally{try{i&&!i.done&&(o=t.return)&&(yield o.call(t))}finally{if(n)throw n.error}}return s}))}toPromise(){return pb.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())}}pb.EMPTY=pb.fromArray([]);class mb extends pb{constructor(e,t){super(t),this._source=e}cancel(){this._source.cancel()}}const fb=null===(gb=window.trustedTypes)||void 0===gb?void 0:gb.createPolicy("defaultWorkerFactory",{createScriptURL:e=>e});class _b{constructor(e,t,i,n,o){this.id=t;const s=function(e){if(us.MonacoEnvironment){if("function"==typeof us.MonacoEnvironment.getWorker)return us.MonacoEnvironment.getWorker("workerMain.js",e);if("function"==typeof us.MonacoEnvironment.getWorkerUrl){const t=us.MonacoEnvironment.getWorkerUrl("workerMain.js",e);return new Worker(fb?fb.createScriptURL(t):t,{name:e})}}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}(i);"function"==typeof s.then?this.worker=s:this.worker=Promise.resolve(s),this.postMessage(e,[]),this.worker.then((e=>{e.onmessage=function(e){n(e.data)},e.onmessageerror=o,"function"==typeof e.addEventListener&&e.addEventListener("error",o)}))}getId(){return this.id}postMessage(e,t){this.worker&&this.worker.then((i=>i.postMessage(e,t)))}dispose(){this.worker&&this.worker.then((e=>e.terminate())),this.worker=null}}class vb{constructor(e){this._label=e,this._webWorkerFailedBeforeError=!1}create(e,t,i){let n=++vb.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new _b(e,n,this._label||"anonymous"+n,t,(e=>{hs(e),this._webWorkerFailedBeforeError=e,i(e)}))}}vb.LAST_WORKER_ID=0;const bb=L_("textResourceConfigurationService"),wb=L_("textResourcePropertiesService"),Cb=L_("logService");var yb;!function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Info=2]="Info",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.Off=6]="Off"}(yb||(yb={}));const xb=yb.Info;class Sb extends Uo{constructor(){super(...arguments),this.level=xb,this._onDidChangeLogLevel=this._register(new $o)}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}}class kb extends Sb{constructor(e=xb){super(),this.setLevel(e)}trace(e,...t){this.getLevel(),yb.Trace}debug(e,...t){this.getLevel(),yb.Debug}info(e,...t){this.getLevel(),yb.Info}error(e,...t){this.getLevel(),yb.Error}dispose(){}}class Db extends Uo{constructor(e){super(),this.logger=e,this._register(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)}error(e,...t){this.logger.error(e,...t)}}const Lb=L_("ILanguageFeaturesService");var Nb=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Eb=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}},Ib=globalThis&&globalThis.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,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){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const Tb=3e5;function Mb(e,t){const i=e.getModel(t);return!!i&&!i.isTooLargeForSyncing()}let Ab=class extends Uo{constructor(e,t,i,n,o){super(),this._modelService=e,this._workerManager=this._register(new Rb(this._modelService,n)),this._logService=i,this._register(o.linkProvider.register({language:"*",hasAccessToAllModels:!0},{provideLinks:(e,t)=>Mb(this._modelService,e.uri)?this._workerManager.withWorker().then((t=>t.computeLinks(e.uri))).then((e=>e&&{links:e})):Promise.resolve({links:[]})})),this._register(o.completionProvider.register("*",new Ob(this._workerManager,t,this._modelService,n)))}dispose(){super.dispose()}canComputeUnicodeHighlights(e){return Mb(this._modelService,e)}computedUnicodeHighlights(e,t,i){return this._workerManager.withWorker().then((n=>n.computedUnicodeHighlights(e,t,i)))}computeDiff(e,t,i,n){return this._workerManager.withWorker().then((o=>o.computeDiff(e,t,i,n)))}computeMoreMinimalEdits(e,t){if(gs(t)){if(!Mb(this._modelService,e))return Promise.resolve(t);const i=ps.create(!0),n=this._workerManager.withWorker().then((i=>i.computeMoreMinimalEdits(e,t)));return n.finally((()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),i.elapsed()))),Promise.race([n,nb(1e3).then((()=>t))])}return Promise.resolve(void 0)}canNavigateValueSet(e){return Mb(this._modelService,e)}navigateValueSet(e,t,i){return this._workerManager.withWorker().then((n=>n.navigateValueSet(e,t,i)))}canComputeWordRanges(e){return Mb(this._modelService,e)}computeWordRanges(e,t){return this._workerManager.withWorker().then((i=>i.computeWordRanges(e,t)))}};Ab=Nb([Eb(0,Gv),Eb(1,bb),Eb(2,Cb),Eb(3,Rv),Eb(4,Lb)],Ab);class Ob{constructor(e,t,i,n){this.languageConfigurationService=n,this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=t,this._modelService=i}provideCompletionItems(e,t){return Ib(this,void 0,void 0,(function*(){const i=this._configurationService.getValue(e.uri,t,"editor");if(!i.wordBasedSuggestions)return;const n=[];if("currentDocument"===i.wordBasedSuggestionsMode)Mb(this._modelService,e.uri)&&n.push(e.uri);else for(const t of this._modelService.getModels())Mb(this._modelService,t.uri)&&(t===e?n.unshift(t.uri):"allDocuments"!==i.wordBasedSuggestionsMode&&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 qo(t.lineNumber,s.startColumn,t.lineNumber,s.endColumn):qo.fromPositions(t),a=r.setEndPosition(t.lineNumber,t.column),l=yield this._workerManager.withWorker(),d=yield l.textualSuggest(n,null==s?void 0:s.word,o);return d?{duration:d.duration,suggestions:d.words.map((e=>({kind:18,label:e,insertText:e,range:{insert:a,replace:r}})))}:void 0}))}}class Rb extends Uo{constructor(e,t){super(),this.languageConfigurationService=t,this._modelService=e,this._editorWorkerClient=null,this._lastWorkerUsedTime=(new Date).getTime();this._register(new ab).cancelAndSet((()=>this._checkStopIdleWorker()),Math.round(15e4)),this._register(this._modelService.onModelRemoved((e=>this._checkStopEmptyWorker())))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){if(!this._editorWorkerClient)return;0===this._modelService.getModels().length&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){if(!this._editorWorkerClient)return;(new Date).getTime()-this._lastWorkerUsedTime>Tb&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=(new Date).getTime(),this._editorWorkerClient||(this._editorWorkerClient=new Vb(this._modelService,!1,"editorWorkerService",this.languageConfigurationService)),Promise.resolve(this._editorWorkerClient)}}class Pb extends Uo{constructor(e,t,i){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=e,this._modelService=t,!i){const e=new ab;e.cancelAndSet((()=>this._checkStopModelSync()),Math.round(3e4)),this._register(e)}}dispose(){for(let e in this._syncedModels)bs(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,t){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(let i in this._syncedModelsLastUsedTime){e-this._syncedModelsLastUsedTime[i]>6e4&&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 o=new ws;o.add(i.onDidChangeContent((e=>{this._proxy.acceptModelChanged(n.toString(),e)}))),o.add(i.onWillDispose((()=>{this._stopModelSync(n)}))),o.add(es((()=>{this._proxy.acceptRemovedModel(n)}))),this._syncedModels[n]=o}_stopModelSync(e){const t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],bs(t)}}class Fb{constructor(e){this._instance=e,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class Bb{constructor(e){this._workerClient=e}fhr(e,t){return this._workerClient.fhr(e,t)}}class Vb extends Uo{constructor(e,t,i,n){super(),this.languageConfigurationService=n,this._disposed=!1,this._modelService=e,this._keepIdleModels=t,this._workerFactory=new vb(i),this._worker=null,this._modelManager=null}fhr(e,t){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new ms(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new Bb(this)))}catch(e){hs(e),this._worker=new Fb(new fs(new Bb(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,(e=>(hs(e),this._worker=new Fb(new fs(new Bb(this),null)),this._getOrCreateWorker().getProxyObject())))}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new Pb(e,this._modelService,this._keepIdleModels))),this._modelManager}_withSyncedResources(e,t=!1){return Ib(this,void 0,void 0,(function*(){return this._disposed?Promise.reject(_s()):this._getProxy().then((i=>(this._getOrCreateModelManager(i).ensureSyncedResources(e,t),i)))}))}computedUnicodeHighlights(e,t,i){return this._withSyncedResources([e]).then((n=>n.computeUnicodeHighlights(e.toString(),t,i)))}computeDiff(e,t,i,n){return this._withSyncedResources([e,t],!0).then((o=>o.computeDiff(e.toString(),t.toString(),i,n)))}computeMoreMinimalEdits(e,t){return this._withSyncedResources([e]).then((i=>i.computeMoreMinimalEdits(e.toString(),t)))}computeLinks(e){return this._withSyncedResources([e]).then((t=>t.computeLinks(e.toString())))}textualSuggest(e,t,i){return Ib(this,void 0,void 0,(function*(){const n=yield this._withSyncedResources(e),o=i.source,s=vs(i);return n.textualSuggest(e.map((e=>e.toString())),t,o,s)}))}computeWordRanges(e,t){return this._withSyncedResources([e]).then((i=>{const n=this._modelService.getModel(e);if(!n)return Promise.resolve(null);const o=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId()).getWordDefinition(),s=o.source,r=vs(o);return i.computeWordRanges(e.toString(),t,s,r)}))}navigateValueSet(e,t,i){return this._withSyncedResources([e]).then((n=>{const o=this._modelService.getModel(e);if(!o)return null;const s=this.languageConfigurationService.getLanguageConfiguration(o.getLanguageId()).getWordDefinition(),r=s.source,a=vs(s);return n.navigateValueSet(e.toString(),t,i,r,a)}))}dispose(){super.dispose(),this._disposed=!0}}class Wb extends Vb{constructor(e,t,i){super(e,i.keepIdleModels||!1,i.label,t),this._foreignModuleId=i.moduleId,this._foreignModuleCreateData=i.createData||null,this._foreignModuleHost=i.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?Cs(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._withSyncedResources(e).then((e=>this.getProxy()))}}class zb{constructor(e,t,i){this._lineTokensBrand=void 0,this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t,this._languageIdCodec=i}static createEmpty(e,t){const i=zb.defaultTokenMetadata,n=new Uint32Array(2);return n[0]=e.length,n[1]=i,new zb(n,e,t)}equals(e){return e instanceof zb&&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){return this._tokens[1+(e<<1)]}getLanguageId(e){const t=this._tokens[1+(e<<1)],i=ys.getLanguageId(t);return this._languageIdCodec.decodeLanguageId(i)}getStandardTokenType(e){const t=this._tokens[1+(e<<1)];return ys.getTokenType(t)}getForeground(e){const t=this._tokens[1+(e<<1)];return ys.getForeground(t)}getClassName(e){const t=this._tokens[1+(e<<1)];return ys.getClassNameFromMetadata(t)}getInlineStyle(e,t){const i=this._tokens[1+(e<<1)];return ys.getInlineStyleFromMetadata(i,t)}getPresentation(e){const t=this._tokens[1+(e<<1)];return ys.getPresentationFromMetadata(t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return zb.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,i){return new Hb(this,e,t,i)}static convertToEndOffset(e,t){const i=(e.length>>>1)-1;for(let n=0;n>>1)-1;for(;it&&(n=o)}return i}withInserted(e){if(0===e.length)return this;let t=0,i=0,n="";const o=new Array;let s=0;for(;;){const r=ts){n+=this._text.substring(s,a.offset);const e=this._tokens[1+(t<<1)];o.push(n.length,e),s=a.offset}n+=a.text,o.push(n.length,a.tokenMetadata),i++}}return new zb(new Uint32Array(o),n,this._languageIdCodec)}}zb.defaultTokenMetadata=16793600;class Hb{constructor(e,t,i,n){this._source=e,this._startOffset=t,this._endOffset=i,this._deltaOffset=n,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this._tokensCount=0;for(let o=this._firstTokenIndex,s=e.getCount();o=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 Hb&&(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}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}}class jb{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;if(i!==t.length)return!1;for(let n=0;n=o||(r[a++]=new jb(Math.max(1,l.startColumn-n+1),Math.min(s+1,l.endColumn-n+1),l.className,l.type));return r}static filter(e,t,i,n){if(0===e.length)return[];const o=[];let s=0;for(let r=0,a=e.length;rt)continue;if(l.isEmpty()&&(0===a.type||3===a.type))continue;const d=l.startLineNumber===t?l.startColumn:i,c=l.endLineNumber===t?l.endColumn:n;o[s++]=new jb(d,c,a.inlineClassName,a.type)}return o}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=jb._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 Kb{constructor(e,t,i){this._linePartBrand=void 0,this.endIndex=e,this.type=t,this.metadata=i}isWhitespace(){return!!(1&this.metadata)}isPseudoAfter(){return!!(4&this.metadata)}}class qb{constructor(e,t){this.startOffset=e,this.endOffset=t}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}}class Gb{constructor(e,t,i,n,o,s,r,a,l,d,c,h,u,g,p,m,f,_,v){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.continuesWithWrappedLine=n,this.isBasicASCII=o,this.containsRTL=s,this.fauxIndentLength=r,this.lineTokens=a,this.lineDecorations=l.sort(jb.compare),this.tabSize=d,this.startVisibleColumn=c,this.spaceWidth=h,this.stopRenderingLineAfter=p,this.renderWhitespace="all"===m?4:"boundary"===m?1:"selection"===m?2:"trailing"===m?3:0,this.renderControlCharacters=f,this.fontLigatures=_,this.selectionsOnLine=v&&v.sort(((e,t)=>e.startOffset>>16}static getCharIndex(e){return(65535&e)>>>0}setColumnInfo(e,t,i,n){const o=(t<<16|i<<0)>>>0;this._data[e-1]=o,this._absoluteOffsets[e-1]=n+i}getAbsoluteOffset(e){return 0===this._absoluteOffsets.length?0:this._absoluteOffsets[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=Yb.getPartIndex(t),n=Yb.getCharIndex(t);return new Zb(i,n)}getColumn(e,t){return this.partDataToCharOffset(e.partIndex,t,e.charIndex)+1}partDataToCharOffset(e,t,i){if(0===this.length)return 0;const n=(e<<16|i<<0)>>>0;let o=0,s=this.length-1;for(;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=Yb.getPartIndex(r),d=Yb.getCharIndex(r);let c;c=l!==Yb.getPartIndex(a)?t:Yb.getCharIndex(a);return i-d<=c-i?o:s}}class Xb{constructor(e,t,i){this._renderLineOutputBrand=void 0,this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=i}}function Qb(e,t){if(0===e.lineContent.length){if(e.lineDecorations.length>0){t.appendASCIIString("");let i=0,n=0,o=0;for(const r of e.lineDecorations)1!==r.type&&2!==r.type||(t.appendASCIIString(''),1===r.type&&(o|=1,i++),2===r.type&&(o|=2,n++));t.appendASCIIString("");const s=new Yb(1,i+n);return s.setColumnInfo(1,i,0,0),new Xb(s,!1,o)}return t.appendASCIIString(""),new Xb(new Yb(0,0),!1,0)}return function(e,t){const i=e.fontIsMonospace,n=e.canUseHalfwidthRightwardsArrow,o=e.containsForeignElements,s=e.lineContent,r=e.len,a=e.isOverflowing,l=e.parts,d=e.fauxIndentLength,c=e.tabSize,h=e.startVisibleColumn,u=e.containsRTL,g=e.spaceWidth,p=e.renderSpaceCharCode,m=e.renderWhitespace,f=e.renderControlCharacters,_=new Yb(r+1,l.length);let v=!1,b=0,w=h,C=0,y=0,x=0,S=0;u?t.appendASCIIString(''):t.appendASCIIString("");for(let k=0,D=l.length;k=d&&(i+=n)}}for(D&&(t.appendASCIIString(' style="width:'),t.appendASCIIString(String(g*e)),t.appendASCIIString('px"')),t.appendASCII(62);b1?t.write1(8594):t.write1(65515);for(let i=2;i<=e;i++)t.write1(160)}else e=1,t.write1(p);C+=e,b>=d&&(w+=e)}x=e}else{let e=0;for(t.appendASCII(62);b=d&&(w+=o)}x=e}L?y++:y=0,b>=r&&!v&&e.isPseudoAfter()&&(v=!0,_.setColumnInfo(b+1,k,C,S)),t.appendASCIIString("")}v||_.setColumnInfo(r+1,l.length-1,C,S);a&&t.appendASCIIString("");return t.appendASCIIString(""),new Xb(_,u,o)}(function(e){const t=e.lineContent;let i,n;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter0&&(n[o++]=new Kb(t,"",0));for(let s=0,r=e.getCount();s=i){n[o++]=new Kb(i,a,0);break}n[o++]=new Kb(r,a,0)}return n}(e.lineTokens,e.fauxIndentLength,n);e.renderControlCharacters&&!e.isBasicASCII&&(o=function(e,t){const i=[];let n=new Kb(0,"",0),o=0;for(const s of t){const t=s.endIndex;for(;on.endIndex&&(n=new Kb(o,s.type,s.metadata),i.push(n)),n=new Kb(o+1,"mtkcontrol",s.metadata),i.push(n))}o>n.endIndex&&(n=new Kb(t,s.type,s.metadata),i.push(n))}return i}(t,o));(4===e.renderWhitespace||1===e.renderWhitespace||2===e.renderWhitespace&&e.selectionsOnLine||3===e.renderWhitespace)&&(o=function(e,t,i,n){const o=e.continuesWithWrappedLine,s=e.fauxIndentLength,r=e.tabSize,a=e.startVisibleColumn,l=e.useMonospaceOptimizations,d=e.selectionsOnLine,c=1===e.renderWhitespace,h=3===e.renderWhitespace,u=e.renderSpaceWidth!==e.spaceWidth,g=[];let p=0,m=0,f=n[m].type,_=n[m].endIndex;const v=n.length;let b,w=!1,C=xs(t);-1===C?(w=!0,C=i,b=i):b=Ss(t);let y=!1,x=0,S=d&&d[x],k=a%r;for(let L=s;L=S.endOffset&&(x++,S=d&&d[x]),Lb)o=!0;else if(9===e)o=!0;else if(32===e)if(c)if(y)o=!0;else{const e=L+1L),o&&h&&(o=w||L>b),y){if(!o||!l&&k>=r){if(u){for(let e=(p>0?g[p-1].endIndex:s)+1;e<=L;e++)g[p++]=new Kb(e,"mtkw",1)}else g[p++]=new Kb(L,"mtkw",1);k%=r}}else(L===_||o&&L>s)&&(g[p++]=new Kb(L,f,0),k%=r);for(9===e?k=r:ks(e)?k+=2:k++,y=o;L===_&&(m++,m0?t.charCodeAt(i-1):0,n=i>1?t.charCodeAt(i-2):0;32===e&&32!==n&&9!==n||(D=!0)}else D=!0;if(D)if(u){for(let e=(p>0?g[p-1].endIndex:s)+1;e<=i;e++)g[p++]=new Kb(e,"mtkw",1)}else g[p++]=new Kb(i,"mtkw",1);else g[p++]=new Kb(i,f,0);return g}(e,t,n,o));let s=0;if(e.lineDecorations.length>0){for(let t=0,i=e.lineDecorations.length;t1){const t=e.charCodeAt(a-2);Go(t)&&a--}if(l>1){const t=e.charCodeAt(l-2);Go(t)&&l--}const h=a-1,u=l-2;o=n.consumeLowerThan(h,o,i),0===n.count&&(o=h),n.insert(u,d,c)}return n.consumeLowerThan(1073741824,o,i),i}}.normalize(e,n),s=o.length;let r=0;const a=[];let l=0,d=0;for(let h=0,u=i.length;hd&&(d=e.startOffset,a[l++]=new Kb(d,n,c)),!(e.endOffset+1<=t)){d=t,a[l++]=new Kb(d,n+" "+e.className,c|e.metadata);break}d=e.endOffset+1,a[l++]=new Kb(d,n+" "+e.className,c|e.metadata),r++}t>d&&(d=t,a[l++]=new Kb(d,n,c))}const c=i[i.length-1].endIndex;if(r=50&&(o[s++]=new Kb(l+1,t,r),d=l+1,l=-1);d!==a&&(o[s++]=new Kb(a,t,r))}else o[s++]=i;n=a}else for(let r=0,a=t.length;r50){const t=e.type,r=e.metadata,l=Math.ceil(a/50);for(let e=1;e=8234&&e<=8238||e>=8294&&e<=8297||e>=8206&&e<=8207||1564===e)}function nw(e){return e.toString(16).toUpperCase().padStart(4,"0")}class ow{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 sw{constructor(e,t){this.tabSize=e,this.data=t}}class rw{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 aw{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=aw.isBasicASCII(i,s),this.containsRTL=aw.containsRTL(i,this.isBasicASCII,o),this.tokens=r,this.inlineDecorations=a,this.tabSize=l,this.startVisibleColumn=d}static isBasicASCII(e,t){return!t||Ds(e)}static containsRTL(e,t,i){return!(t||!i)&&Ls(e)}}class lw{constructor(e,t,i){this.range=e,this.inlineClassName=t,this.type=i}}class dw{constructor(e,t,i,n){this.startOffset=e,this.endOffset=t,this.inlineClassName=i,this.inlineClassNameAffectsLetterSpacing=n}toInlineDecoration(e){return new lw(new qo(e,this.startOffset+1,e,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}class cw{constructor(e,t){this._viewModelDecorationBrand=void 0,this.range=e,this.options=t}}class hw{constructor(e,t,i){this.color=e,this.zIndex=t,this.data=i}static cmp(e,t){return e.zIndex===t.zIndex?e.colort.color?1:0:e.zIndex-t.zIndex}}function uw(e){return!function(e){return Array.isArray(e)}(e)}function gw(e){return"string"==typeof e}function pw(e){return!gw(e)}function mw(e){return!e}function fw(e,t){return e.ignoreCase&&t?t.toLowerCase():t}function _w(e){return e.replace(/[&<>'"_]/g,"-")}function vw(e,t){return new Error(`${e.languageId}: ${t}`)}function bw(e,t,i,n,o){let s=null;return t.replace(/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g,(function(t,r,a,l,d,c,h,u,g){return mw(a)?mw(l)?!mw(d)&&d0;){const t=e.tokenizer[i];if(t)return t;const n=i.lastIndexOf(".");i=n<0?null:i.substr(0,n)}return null}class Cw{constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}static create(e,t){return this._INSTANCE.create(e,t)}create(e,t){if(null!==e&&e.depth>=this._maxCacheDepth)return new yw(e,t);let i=yw.getStackElementId(e);i.length>0&&(i+="|"),i+=t;let n=this._entries[i];return n||(n=new yw(e,t),this._entries[i]=n,n)}}Cw._INSTANCE=new Cw(5);class yw{constructor(e,t){this.parent=e,this.state=t,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(e){let t="";for(;null!==e;)t.length>0&&(t+="|"),t+=e.state,e=e.parent;return t}static _equals(e,t){for(;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 yw._equals(this,e)}push(e){return Cw.create(this,e)}pop(){return this.parent}popall(){let e=this;for(;e.parent;)e=e.parent;return e}switchTo(e){return Cw.create(this.parent,e)}}class xw{constructor(e,t){this.languageId=e,this.state=t}equals(e){return this.languageId===e.languageId&&this.state.equals(e.state)}clone(){return this.state.clone()===this.state?this:new xw(this.languageId,this.state)}}class Sw{constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}static create(e,t){return this._INSTANCE.create(e,t)}create(e,t){if(null!==t)return new kw(e,t);if(null!==e&&e.depth>=this._maxCacheDepth)return new kw(e,t);const i=yw.getStackElementId(e);let n=this._entries[i];return n||(n=new kw(e,null),this._entries[i]=n,n)}}Sw._INSTANCE=new Sw(5);class kw{constructor(e,t){this.stack=e,this.embeddedLanguageData=t}clone(){return(this.embeddedLanguageData?this.embeddedLanguageData.clone():null)===this.embeddedLanguageData?this:Sw.create(this.stack,this.embeddedLanguageData)}equals(e){return e instanceof kw&&(!!this.stack.equals(e.stack)&&(null===this.embeddedLanguageData&&null===e.embeddedLanguageData||null!==this.embeddedLanguageData&&null!==e.embeddedLanguageData&&this.embeddedLanguageData.equals(e.embeddedLanguageData)))}}class Dw{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 rs(e,t,this._languageId)))}nestedLanguageTokenize(e,t,i,n){const o=i.languageId,s=i.state,r=Ns.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 rs(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 ss(this._tokens,e)}}class Lw{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=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(o)return;let t=!1;for(let i=0,n=e.changedLanguages.length;i{}))}}getInitialState(){const e=Cw.create(null,this._lexer.start);return Sw.create(e,null)}tokenize(e,t,i){const n=new Dw,o=this._tokenize(e,t,i,n);return n.finalize(o)}tokenizeEncoded(e,t,i){const n=new Lw(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=ww(this._lexer,t.stack.state),!i))throw vw(this._lexer,"tokenizer state is not defined: "+t.stack.state);let n=-1,o=!1;for(const s of i){if(!pw(s.action)||"@pop"!==s.action.nextEmbedded)continue;o=!0;let t=s.regex;const i=s.regex.source;if("^(?:"===i.substr(0,4)&&")"===i.substr(i.length-1,1)){const e=(t.ignoreCase?"i":"")+(t.unicode?"u":"");t=new RegExp(i.substr(4,i.length-5),e)}const r=e.search(t);-1===r||0!==r&&s.matchOnlyAtLineStart||(-1===n||r0&&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,d=i.stack,c=0,h=null,u=!0;for(;u||c=a)break;u=!1;let e=this._lexer.tokenizer[m];if(!e&&(e=ww(this._lexer,m),!e))throw vw(this._lexer,"tokenizer state is not defined: "+m);let t=r.substr(c);for(const i of e)if((0===c||!i.matchOnlyAtLineStart)&&(f=t.match(i.regex),f)){_=f[0],v=i.action;break}}if(f||(f=[""],_=""),v||(c=this._lexer.maxStack)throw vw(this._lexer,"maximum tokenizer stack size reached: ["+d.state+","+d.parent.state+",...]");d=d.push(m)}else if("@pop"===v.next){if(d.depth<=1)throw vw(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(b));d=d.pop()}else if("@popall"===v.next)d=d.popall();else{let e=bw(this._lexer,v.next,_,f,m);if("@"===e[0]&&(e=e.substr(1)),!ww(this._lexer,e))throw vw(this._lexer,"trying to set a next state '"+e+"' that is undefined in rule: "+this._safeRuleName(b));d=d.push(e)}}v.log&&"string"==typeof v.log&&(this._lexer,this._lexer.languageId,bw(this._lexer,v.log,_,f,m))}if(null===C)throw vw(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(b));const y=i=>{const s=this._languageService.getLanguageIdByLanguageName(i)||this._languageService.getLanguageIdByMimeType(i)||i,r=this._getNestedEmbeddedLanguageData(s);if(c0)throw vw(this._lexer,"groups cannot be nested: "+this._safeRuleName(b));if(f.length!==C.length+1)throw vw(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 Aw{static colorizeElement(e,t,i,n){const o=(n=n||{}).theme||"vs",s=n.mimeType||i.getAttribute("lang")||i.getAttribute("data-lang");if(!s)return Promise.resolve();const r=t.getLanguageIdByMimeType(s)||s;e.setTheme(o);const a=i.firstChild?i.firstChild.nodeValue:"";i.className+=" "+o;return this.colorize(t,a||"",r,n).then((e=>{var t;const n=null!==(t=null==Mw?void 0:Mw.createHTML(e))&&void 0!==t?t:e;i.innerHTML=n}),(e=>{}))}static colorize(e,t,i,n){return Tw(this,void 0,void 0,(function*(){const o=e.languageIdCodec;let s=4;n&&"number"==typeof n.tabSize&&(s=n.tabSize),Es(t)&&(t=t.substr(1));const r=Is(t);if(!e.isRegisteredLanguageId(i))return Ow(r,s,o);const a=yield Ns.getOrCreate(i);return a?function(e,t,i,n){return new Promise(((o,s)=>{const r=()=>{const a=function(e,t,i,n){let o=[],s=i.getInitialState();for(let r=0,a=e.length;r"),s=l.endState}return o.join("")}(e,t,i,n);if(i instanceof Nw){const e=i.getLoadStatus();if(!1===e.loaded)return void e.promise.then(r,s)}o(a)};r()}))}(r,s,a,o):Ow(r,s,o)}))}static colorizeLine(e,t,i,n,o=4){const s=aw.isBasicASCII(e,t),r=aw.containsRTL(e,s,i);return ew(new Gb(!1,!0,e,!1,s,r,0,n,[],o,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(e,t,i=4){const n=e.getLineContent(t);e.forceTokenization(t);const o=e.getLineTokens(t).inflate();return this.colorizeLine(n,e.mightContainNonBasicASCII(),e.mightContainRTL(),o,i)}}function Ow(e,t,i){let n=[];const o=new Uint32Array(2);o[0]=0,o[1]=16793600;for(let s=0,r=e.length;s")}return n.join("")}Ts||document.queryCommandSupported&&document.queryCommandSupported("copy")||navigator&&navigator.clipboard&&navigator.clipboard.writeText,Ts||navigator&&navigator.clipboard&&navigator.clipboard.readText,Ts||h_||navigator.keyboard,"ontouchstart"in window||navigator.maxTouchPoints;const Rw=window.PointerEvent&&("ontouchstart"in window||window.navigator.maxTouchPoints>0||navigator.maxTouchPoints>0);function Pw(e,t){if(0===e)return null;const i=(65535&e)>>>0,n=(4294901760&e)>>>16;return new Vw(0!==n?[Fw(i,t),Fw(n,t)]:[Fw(i,t)])}function Fw(e,t){const i=!!(2048&e),n=!!(256&e);return new Bw(2===t?n:i,!!(1024&e),!!(512&e),2===t?i:n,255&e)}class Bw{constructor(e,t,i,n,o){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyCode=o}equals(e){return this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode}isModifierKey(){return 0===this.keyCode||5===this.keyCode||57===this.keyCode||6===this.keyCode||4===this.keyCode}toChord(){return new Vw([this])}isDuplicateModifierCase(){return this.ctrlKey&&5===this.keyCode||this.shiftKey&&4===this.keyCode||this.altKey&&6===this.keyCode||this.metaKey&&57===this.keyCode}}class Vw{constructor(e){if(0===e.length)throw Ms("parts");this.parts=e}}class Ww{constructor(e,t,i,n,o,s){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyLabel=o,this.keyAriaLabel=s}}const zw=zo?256:2048,Hw=zo?2048:256;class jw{constructor(e){this._standardKeyboardEventBrand=!0;let 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.keyCode=function(e){if(e.charCode){let t=String.fromCharCode(e.charCode).toUpperCase();return As.fromString(t)}const t=e.keyCode;if(3===t)return 7;if(o_){if(59===t)return 80;if(107===t)return 81;if(109===t)return 83;if(zo&&224===t)return 57}else if(s_){if(91===t)return 57;if(zo&&93===t)return 57;if(!zo&&92===t)return 57}return Os[t]||0}(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._asRuntimeKeybinding=this._computeRuntimeKeybinding()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeybinding(){return this._asRuntimeKeybinding}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|=zw),this.altKey&&(t|=512),this.shiftKey&&(t|=1024),this.metaKey&&(t|=Hw),t|=e,t}_computeRuntimeKeybinding(){let e=0;return 5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode),new Bw(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}}let Uw=!1,$w=null;function Kw(e){if(!e.parent||e.parent===e)return null;try{let t=e.location,i=e.parent.location;if("null"!==t.origin&&"null"!==i.origin&&t.origin!==i.origin)return Uw=!0,null}catch(t){return Uw=!0,null}return e.parent}class qw{static getSameOriginWindowChain(){if(!$w){$w=[];let e,t=window;do{e=Kw(t),e?$w.push({window:t,iframeElement:t.frameElement||null}):$w.push({window:t,iframeElement:null}),t=e}while(t)}return $w.slice(0)}static hasDifferentOriginAncestor(){return $w||this.getSameOriginWindowChain(),Uw}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let i=0,n=0,o=this.getSameOriginWindowChain();for(const s of o){if(i+=s.window.scrollY,n+=s.window.scrollX,s.window===t)break;if(!s.iframeElement)break;let e=s.iframeElement.getBoundingClientRect();i+=e.top,n+=e.left}return{top:i,left:n}}}class Gw{constructor(e){this.timestamp=Date.now(),this.browserEvent=e,this.leftButton=0===e.button,this.middleButton=1===e.button,this.rightButton=2===e.button,this.buttons=e.buttons,this.target=e.target,this.detail=e.detail||1,"dblclick"===e.type&&(this.detail=2),this.ctrlKey=e.ctrlKey,this.shiftKey=e.shiftKey,this.altKey=e.altKey,this.metaKey=e.metaKey,"number"==typeof e.pageX?(this.posx=e.pageX,this.posy=e.pageY):(this.posx=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.posy=e.clientY+document.body.scrollTop+document.documentElement.scrollTop);let t=qw.getPositionOfChildWindowRelativeToAncestorWindow(self,e.view);this.posx-=t.left,this.posy-=t.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class Zw{constructor(e,t=0,i=0){if(this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=i,this.deltaX=t,e){let t=e,i=e;if(void 0!==t.wheelDeltaY)this.deltaY=t.wheelDeltaY/120;else if(void 0!==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?this.deltaY=o_&&!zo?-e.deltaY/3:-e.deltaY:this.deltaY=-e.deltaY/40}if(void 0!==t.wheelDeltaX)this.deltaX=a_&&Rs?-t.wheelDeltaX/120:t.wheelDeltaX/120;else if(void 0!==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?this.deltaX=o_&&!zo?-e.deltaX/3:-e.deltaX:this.deltaX=-e.deltaX/40}0===this.deltaY&&0===this.deltaX&&e.wheelDelta&&(this.deltaY=e.wheelDelta/120)}}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation()}}var Yw;!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.userData="vscode-userdata",e.vscodeCustomEditor="vscode-custom-editor",e.vscodeNotebook="vscode-notebook",e.vscodeNotebookCell="vscode-notebook-cell",e.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",e.vscodeNotebookCellOutput="vscode-notebook-cell-output",e.vscodeInteractive="vscode-interactive",e.vscodeInteractiveInput="vscode-interactive-input",e.vscodeSettings="vscode-settings",e.vscodeWorkspaceTrust="vscode-workspace-trust",e.vscodeTerminal="vscode-terminal",e.webviewPanel="webview-panel",e.vscodeWebview="vscode-webview",e.extension="extension",e.vscodeFileResource="vscode-file",e.tmp="tmp",e.vsls="vsls"}(Yw||(Yw={}));const Xw=new class{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null}setPreferredWebSchema(e){this._preferredWebSchema=e}rewrite(e){if(this._delegate)return this._delegate(e);const t=e.authority;let i=this._hosts[t];i&&-1!==i.indexOf(":")&&(i=`[${i}]`);const n=this._ports[t],o=this._connectionTokens[t];let s=`path=${encodeURIComponent(e.path)}`;return"string"==typeof o&&(s+=`&tkn=${encodeURIComponent(o)}`),Ps.from({scheme:Fs?this._preferredWebSchema:Yw.vscodeRemoteResource,authority:`${i}:${n}`,path:"/vscode-remote-resource",query:s})}};class Qw{asBrowserUri(e,t){const i=this.toUri(e,t);return i.scheme===Yw.vscodeRemote?Xw.rewrite(i):i.scheme===Yw.file&&(Ts||Bs&&us.origin===`${Yw.vscodeFileResource}://${Qw.FALLBACK_AUTHORITY}`)?i.with({scheme:Yw.vscodeFileResource,authority:i.authority||Qw.FALLBACK_AUTHORITY,query:null,fragment:null}):i}toUri(e,t){return Ps.isUri(e)?e:Ps.parse(t.toUrl(e))}}Qw.FALLBACK_AUTHORITY="vscode-app";const Jw=new Qw;function eC(e){for(;e.firstChild;)e.firstChild.remove()}function tC(e){var t;return null!==(t=null==e?void 0:e.isConnected)&&void 0!==t&&t}class iC{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 nC(e,t,i,n){return new iC(e,t,i,n)}function oC(e){return function(t){return e(new Gw(t))}}let sC=function(e,t,i,n){let o=i;return"click"===t||"mousedown"===t?o=oC(i):"keydown"!==t&&"keypress"!==t&&"keyup"!==t||(o=function(e){return function(t){return e(new jw(t))}}(i)),nC(e,t,o,n)};function rC(e,t,i){return nC(e,Vs&&Rw?zC.POINTER_DOWN:zC.MOUSE_DOWN,t,i)}function aC(e,t,i){return nC(e,Vs&&Rw?zC.POINTER_UP:zC.MOUSE_UP,t,i)}function lC(e,t){return nC(e,"mouseout",(i=>{let n=i.relatedTarget;for(;n&&n!==e;)n=n.parentNode;n!==e&&t(i)}))}function dC(e,t,i){let n=null;const o=e=>s.fire(e),s=new $o({onFirstListenerAdd:()=>{n||(n=new iC(e,t,o,i))},onLastListenerRemove:()=>{n&&(n.dispose(),n=null)}});return s}let cC,hC,uC=null;class gC{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){Jo(e)}}static sort(e,t){return t.priority-e.priority}}!function(){let e=[],t=null,i=!1,n=!1,o=()=>{for(i=!1,t=e,e=[],n=!0;t.length>0;){t.sort(gC.sort),t.shift().execute()}n=!1};hC=(t,n=0)=>{let s=new gC(t,n);return e.push(s),i||(i=!0,function(e){if(!uC){const e=e=>setTimeout((()=>e((new Date).getTime())),0);uC=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame||e}uC.call(self,e)}(o)),s},cC=(e,i)=>{if(n){let n=new gC(e,i);return t.push(n),n}return hC(e,i)}}();const pC=function(e,t){return t};class mC extends Uo{constructor(e,t,i,n=pC,o=8){super();let s=null,r=0,a=this._register(new rb),l=()=>{r=(new Date).getTime(),i(s),s=null};this._register(nC(e,t,(e=>{s=n(s,e);let t=(new Date).getTime()-r;t>=o?(a.cancel(),l()):a.setIfNotSet(l,o-t)})))}}function fC(e,t,i,n,o){return new mC(e,t,i,n,o)}function _C(e){return document.defaultView.getComputedStyle(e,null)}function vC(e){if(e!==document.body)return new wC(e.clientWidth,e.clientHeight);if(Vs&&window.visualViewport)return new wC(window.visualViewport.width,window.visualViewport.height);if(window.innerWidth&&window.innerHeight)return new wC(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientHeight)return new wC(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new wC(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}class bC{static convertToPixels(e,t){return parseFloat(t)||0}static getDimension(e,t,i){let n=_C(e),o="0";return n&&(o=n.getPropertyValue?n.getPropertyValue(t):n.getAttribute(i)),bC.convertToPixels(e,o)}static getBorderLeftWidth(e){return bC.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){return bC.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return bC.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return bC.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return bC.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return bC.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return bC.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return bC.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return bC.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return bC.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return bC.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return bC.getDimension(e,"margin-bottom","marginBottom")}}class wC{constructor(e,t){this.width=e,this.height=t}with(e=this.width,t=this.height){return e!==this.width||t!==this.height?new wC(e,t):this}static is(e){return"object"==typeof e&&"number"==typeof e.height&&"number"==typeof e.width}static lift(e){return e instanceof wC?e:new wC(e.width,e.height)}static equals(e,t){return e===t||!(!e||!t)&&(e.width===t.width&&e.height===t.height)}}function CC(e){let t=e.offsetParent,i=e.offsetTop,n=e.offsetLeft;for(;null!==(e=e.parentNode)&&e!==document.body&&e!==document.documentElement;){i-=e.scrollTop;const o=TC(e)?null:_C(e);o&&(n-="rtl"!==o.direction?e.scrollLeft:-e.scrollLeft),e===t&&(n+=bC.getBorderLeftWidth(e),i+=bC.getBorderTopWidth(e),i+=e.offsetTop,n+=e.offsetLeft,t=e.offsetParent)}return{left:n,top:i}}function yC(e){let t=e.getBoundingClientRect();return{left:t.left+xC.scrollX,top:t.top+xC.scrollY,width:t.width,height:t.height}}wC.None=new wC(0,0);const xC=new class{get scrollX(){return"number"==typeof window.scrollX?window.scrollX:document.body.scrollLeft+document.documentElement.scrollLeft}get scrollY(){return"number"==typeof window.scrollY?window.scrollY:document.body.scrollTop+document.documentElement.scrollTop}};function SC(e){let t=bC.getMarginLeft(e)+bC.getMarginRight(e);return e.offsetWidth+t}function kC(e){let t=bC.getBorderLeftWidth(e)+bC.getBorderRightWidth(e),i=bC.getPaddingLeft(e)+bC.getPaddingRight(e);return e.offsetWidth-t-i}function DC(e){let t=bC.getBorderTopWidth(e)+bC.getBorderBottomWidth(e),i=bC.getPaddingTop(e)+bC.getPaddingBottom(e);return e.offsetHeight-t-i}function LC(e){let t=bC.getMarginTop(e)+bC.getMarginBottom(e);return e.offsetHeight+t}function NC(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function EC(e,t,i){for(;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 IC(e,t,i){return!!EC(e,t,i)}function TC(e){return e&&!!e.host&&!!e.mode}function MC(e){return!!AC(e)}function AC(e){for(;e.parentNode;){if(e===document.body)return null;e=e.parentNode}return TC(e)?e:null}function OC(){let e=document.activeElement;for(;null==e?void 0:e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function RC(e=document.getElementsByTagName("head")[0]){let t=document.createElement("style");return t.type="text/css",t.media="screen",e.appendChild(t),t}let PC=null;function FC(){return PC||(PC=RC()),PC}function BC(e,t,i=FC()){i&&t&&i.sheet.insertRule(e+"{"+t+"}",0)}function VC(e,t=FC()){if(!t)return;let i=function(e){var t,i;return(null===(t=null==e?void 0:e.sheet)||void 0===t?void 0:t.rules)?e.sheet.rules:(null===(i=null==e?void 0:e.sheet)||void 0===i?void 0:i.cssRules)?e.sheet.cssRules:[]}(t),n=[];for(let o=0;o=0;o--)t.sheet.deleteRule(n[o])}function WC(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName}const zC={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",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",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:s_?"webkitAnimationStart":"animationstart",ANIMATION_END:s_?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:s_?"webkitAnimationIteration":"animationiteration"},HC=function(e,t){e.preventDefault?e.preventDefault():e.returnValue=!1,t&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)};class jC extends Uo{constructor(e){super(),this._onDidFocus=this._register(new $o),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new $o),this.onDidBlur=this._onDidBlur.event;let t=jC.hasFocusWithin(e),i=!1;const n=()=>{i=!1,t||(t=!0,this._onDidFocus.fire())},o=()=>{t&&(i=!0,window.setTimeout((()=>{i&&(i=!1,t=!1,this._onDidBlur.fire())}),0))};this._refreshStateHandler=()=>{jC.hasFocusWithin(e)!==t&&(t?o():n())},this._register(nC(e,zC.FOCUS,n,!0)),this._register(nC(e,zC.BLUR,o,!0)),this._register(nC(e,zC.FOCUS_IN,(()=>this._refreshStateHandler()))),this._register(nC(e,zC.FOCUS_OUT,(()=>this._refreshStateHandler())))}static hasFocusWithin(e){const t=AC(e);return NC(t?t.activeElement:document.activeElement,e)}}function UC(e){return new jC(e)}function $C(e,...t){if(e.append(...t),1===t.length&&"string"!=typeof t[0])return t[0]}function KC(e,...t){e.innerText="",$C(e,...t)}const qC=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var GC;function ZC(e,t,i,...n){let o=qC.exec(t);if(!o)throw new Error("Bad use of emmet");i=Object.assign({},i||{});let s,r=o[1]||"div";return s=e!==GC.HTML?document.createElementNS(e,r):document.createElement(r),o[3]&&(s.id=o[3]),o[4]&&(s.className=o[4].replace(/\./g," ").trim()),Object.keys(i).forEach((e=>{const t=i[e];void 0!==t&&(/^on\w+$/.test(e)?s[e]=t:"selected"===e?t&&s.setAttribute(e,"true"):s.setAttribute(e,t))})),s.append(...n),s}function YC(e,t,...i){return ZC(GC.HTML,e,t,...i)}function XC(...e){for(let t of e)t.style.display="",t.removeAttribute("aria-hidden")}function QC(...e){for(let t of e)t.style.display="none",t.setAttribute("aria-hidden","true")}function JC(e){const t=window.devicePixelRatio*e;return Math.max(1,Math.floor(t))/window.devicePixelRatio}function ey(e){window.open(e,"_blank","noopener")}function ty(e){return e?`url('${Jw.asBrowserUri(e).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function iy(e){return`'${e.replace(/'/g,"%27")}'`}!function(e){e.HTML="http://www.w3.org/1999/xhtml",e.SVG="http://www.w3.org/2000/svg"}(GC||(GC={})),YC.SVG=function(e,t,...i){return ZC(GC.SVG,e,t,...i)},Xw.setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http");class ny extends $o{constructor(){super(),this._subscriptions=new ws,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(nC(window,"keydown",(e=>{if(e.defaultPrevented)return;const t=new jw(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)),this._subscriptions.add(nC(window,"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)),this._subscriptions.add(nC(document.body,"mousedown",(()=>{this._keyStatus.lastKeyPressed=void 0}),!0)),this._subscriptions.add(nC(document.body,"mouseup",(()=>{this._keyStatus.lastKeyPressed=void 0}),!0)),this._subscriptions.add(nC(document.body,"mousemove",(e=>{e.buttons&&(this._keyStatus.lastKeyPressed=void 0)}),!0)),this._subscriptions.add(nC(window,"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 ny.instance||(ny.instance=new ny),ny.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}let oy,sy,ry,ay,ly;function dy(e){oy&&(sy.textContent!==e?(eC(ry),hy(sy,e)):(eC(sy),hy(ry,e)))}function cy(e){oy&&(zo?dy(e):ay.textContent!==e?(eC(ly),hy(ay,e)):(eC(ay),hy(ly,e)))}function hy(e,t){eC(e),t.length>2e4&&(t=t.substr(0,2e4)),e.textContent=t,e.style.visibility="hidden",e.style.visibility="visible"}const uy=L_("markerDecorationsService"),gy=L_("textModelService");var py=globalThis&&globalThis.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,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){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class my extends Uo{constructor(e,t="",i="",n=!0,o){super(),this._onDidChange=this._register(new $o),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=e,this._label=t,this._cssClass=i,this._enabled=n,this._actionCallback=o}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}))}run(e,t){return py(this,void 0,void 0,(function*(){this._actionCallback&&(yield this._actionCallback(e))}))}}class fy extends Uo{constructor(){super(...arguments),this._onBeforeRun=this._register(new $o),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new $o),this.onDidRun=this._onDidRun.event}run(e,t){return py(this,void 0,void 0,(function*(){if(!e.enabled)return;let i;this._onBeforeRun.fire({action:e});try{yield this.runAction(e,t)}catch(n){i=n}this._onDidRun.fire({action:e,error:i})}))}runAction(e,t){return py(this,void 0,void 0,(function*(){yield e.run(t)}))}}class _y extends my{constructor(e){super(_y.ID,e,e?"separator text":"separator"),this.checked=!1,this.enabled=!1}}_y.ID="vs.actions.separator";class vy{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}get actions(){return this._actions}dispose(){}run(){return py(this,void 0,void 0,(function*(){}))}}class by extends my{constructor(){super(by.ID,mf(0,"(empty)"),void 0,!1)}}by.ID="vs.actions.empty";const wy=L_("commandService"),Cy=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new $o,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.description){const t=[];for(let n of e.description.args)t.push(n.constraint);const i=e.handler;e.handler=function(e,...n){return Ws(n,t),i(e,...n)}}const{id:i}=e;let n=this._commands.get(i);n||(n=new zs,this._commands.set(i,n));let o=n.unshift(e),s=es((()=>{o();const e=this._commands.get(i);(null==e?void 0:e.isEmpty())&&this._commands.delete(i)}));return this._onDidRegisterCommand.fire(i),s}registerCommandAlias(e,t){return Cy.registerCommand(e,((e,...i)=>e.get(wy).executeCommand(t,...i)))}getCommand(e){const t=this._commands.get(e);if(t&&!t.isEmpty())return Hs.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}};Cy.registerCommand("noop",(()=>{}));const yy=new Map;yy.set("false",!1),yy.set("true",!0),yy.set("isMac",zo),yy.set("isLinux",Vo),yy.set("isWindows",Rs),yy.set("isWeb",Fs),yy.set("isMacNative",zo&&!Fs),yy.set("isEdge",js),yy.set("isFirefox",Us),yy.set("isChrome",$s),yy.set("isSafari",Ks);const xy=Object.prototype.hasOwnProperty;class Sy{static has(e){return Ny.create(e)}static equals(e,t){return Ey.create(e,t)}static regex(e,t){return Vy.create(e,t)}static not(e){return Ay.create(e)}static and(...e){return Hy.create(e,null)}static or(...e){return jy.create(e,null,!0)}static deserialize(e,t=!1){if(e)return this._deserializeOrExpression(e,t)}static _deserializeOrExpression(e,t){let i=e.split("||");return jy.create(i.map((e=>this._deserializeAndExpression(e,t))),null,!0)}static _deserializeAndExpression(e,t){let i=e.split("&&");return Hy.create(i.map((e=>this._deserializeOne(e,t))),null)}static _deserializeOne(e,t){if((e=e.trim()).indexOf("!=")>=0){let i=e.split("!=");return My.create(i[0].trim(),this._deserializeValue(i[1],t))}if(e.indexOf("==")>=0){let i=e.split("==");return Ey.create(i[0].trim(),this._deserializeValue(i[1],t))}if(e.indexOf("=~")>=0){let i=e.split("=~");return Vy.create(i[0].trim(),this._deserializeRegexValue(i[1],t))}if(e.indexOf(" in ")>=0){let t=e.split(" in ");return Iy.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(e)){const t=e.split(">=");return Py.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(e)){const t=e.split(">");return Ry.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(e)){const t=e.split("<=");return By.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(e)){const t=e.split("<");return Fy.create(t[0].trim(),t[1].trim())}return/^\!\s*/.test(e)?Ay.create(e.substr(1).trim()):Ny.create(e)}static _deserializeValue(e,t){if("true"===(e=e.trim()))return!0;if("false"===e)return!1;let i=/^'([^']*)'$/.exec(e);return i?i[1].trim():e}static _deserializeRegexValue(e,t){if(qs(e)){if(t)throw new Error("missing regexp-value for =~-expression");return null}let i=e.indexOf("/"),n=e.lastIndexOf("/");if(i===n||i<0){if(t)throw new Error(`bad regexp-value '${e}', missing /-enclosure`);return null}let o=e.slice(i+1,n),s="i"===e[n+1]?"i":"";try{return new RegExp(o,s)}catch(r){if(t)throw new Error(`bad regexp-value '${e}', parse error: ${r}`);return null}}}function ky(e,t){return e.cmp(t)}class Dy{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 Ly.INSTANCE}}Dy.INSTANCE=new Dy;class Ly{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 Dy.INSTANCE}}Ly.INSTANCE=new Ly;class Ny{constructor(e,t){this.key=e,this.negated=t,this.type=2}static create(e,t=null){const i=yy.get(e);return"boolean"==typeof i?i?Ly.INSTANCE:Dy.INSTANCE:new Ny(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:Ky(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=yy.get(this.key);return"boolean"==typeof e?e?Ly.INSTANCE:Dy.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=Ay.create(this.key,this)),this.negated}}class Ey{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=4}static create(e,t,i=null){if("boolean"==typeof t)return t?Ny.create(e,i):Ay.create(e,i);const n=yy.get(e);if("boolean"==typeof n){return t===(n?"true":"false")?Ly.INSTANCE:Dy.INSTANCE}return new Ey(e,t,i)}cmp(e){return e.type!==this.type?this.type-e.type:qy(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=yy.get(this.key);if("boolean"==typeof e){const t=e?"true":"false";return this.value===t?Ly.INSTANCE:Dy.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=My.create(this.key,this.value,this)),this.negated}}class Iy{constructor(e,t){this.key=e,this.valueKey=t,this.type=10,this.negated=null}static create(e,t){return new Iy(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:qy(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.indexOf(i)>=0:"string"==typeof i&&"object"==typeof t&&null!==t&&xy.call(t,i)}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=Ty.create(this)),this.negated}}class Ty{constructor(e){this._actual=e,this.type=11}static create(e){return new Ty(e)}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(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class My{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=5}static create(e,t,i=null){if("boolean"==typeof t)return t?Ay.create(e,i):Ny.create(e,i);const n=yy.get(e);if("boolean"==typeof n){return t===(n?"true":"false")?Dy.INSTANCE:Ly.INSTANCE}return new My(e,t,i)}cmp(e){return e.type!==this.type?this.type-e.type:qy(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=yy.get(this.key);if("boolean"==typeof e){const t=e?"true":"false";return this.value===t?Dy.INSTANCE:Ly.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=Ey.create(this.key,this.value,this)),this.negated}}class Ay{constructor(e,t){this.key=e,this.negated=t,this.type=3}static create(e,t=null){const i=yy.get(e);return"boolean"==typeof i?i?Dy.INSTANCE:Ly.INSTANCE:new Ay(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:Ky(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=yy.get(this.key);return"boolean"==typeof e?e?Dy.INSTANCE:Ly.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Ny.create(this.key,this)),this.negated}}function Oy(e,t){if("string"==typeof e){const t=parseFloat(e);isNaN(t)||(e=t)}return"string"==typeof e||"number"==typeof e?t(e):Dy.INSTANCE}class Ry{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=12}static create(e,t,i=null){return Oy(t,(t=>new Ry(e,t,i)))}cmp(e){return e.type!==this.type?this.type-e.type:qy(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=By.create(this.key,this.value,this)),this.negated}}class Py{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=13}static create(e,t,i=null){return Oy(t,(t=>new Py(e,t,i)))}cmp(e){return e.type!==this.type?this.type-e.type:qy(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=Fy.create(this.key,this.value,this)),this.negated}}class Fy{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=14}static create(e,t,i=null){return Oy(t,(t=>new Fy(e,t,i)))}cmp(e){return e.type!==this.type?this.type-e.type:qy(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 By(e,t,i)))}cmp(e){return e.type!==this.type?this.type-e.type:qy(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=Ry.create(this.key,this.value,this)),this.negated}}class Vy{constructor(e,t){this.key=e,this.regexp=t,this.type=7,this.negated=null}static create(e,t){return new Vy(e,t)}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){let t=e.getValue(this.key);return!!this.regexp&&this.regexp.test(t)}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Wy.create(this)),this.negated}}class Wy{constructor(e){this._actual=e,this.type=8}static create(e){return new Wy(e)}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(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function zy(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=i[i.length-1];if(9!==e.type)break;i.pop();const t=i.pop(),n=0===i.length,o=jy.create(e.expr.map((e=>Hy.create([e,t],null))),null,n);o&&(i.push(o),i.sort(ky))}return 1===i.length?i[0]:new Hy(i,t)}}serialize(){return this.expr.map((e=>e.serialize())).join(" && ")}keys(){const e=[];for(let t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(let t of this.expr)e.push(t.negate());this.negated=jy.create(e,this,!0)}return this.negated}}class jy{constructor(e,t){this.expr=e,this.negated=t,this.type=9}static create(e,t,i){return jy._normalizeArr(e,t,i)}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(let t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){let e=[];for(let t of this.expr)e.push(t.negate());for(;e.length>1;){const t=e.shift(),i=e.shift(),n=[];for(const e of Zy(t))for(const t of Zy(i))n.push(Hy.create([e,t],null));const o=0===e.length;e.unshift(jy.create(n,null,o))}this.negated=e[0]}return this.negated}}class Uy extends Ny{constructor(e,t,i){super(e,null),this._defaultValue=t,"object"==typeof i?Uy._info.push(Object.assign(Object.assign({},i),{key:e})):!0!==i&&Uy._info.push({key:e,description:i,type:null!=t?typeof t:void 0})}static all(){return Uy._info.values()}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(e){return Ey.create(this.key,e)}}Uy._info=[];const $y=L_("contextKeyService");function Ky(e,t){return et?1:0}function qy(e,t,i,n){return ei?1:tn?1:0}function Gy(e,t){if(6===t.type&&9!==e.type&&6!==e.type)for(const n of t.expr)if(e.equals(n))return!0;const i=Zy(e.negate()).concat(Zy(t));i.sort(ky);for(let n=0;n{const t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)}))}getThemingParticipants(){return this.themingParticipants}};function sx(e){return ox.onColorThemeChange(e)}Yy.add(nx,ox);class rx extends Uo{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(){}}var ax=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},lx=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}};function dx(e){return void 0!==e.command}class cx{constructor(e){this.id=cx._idPool++,this._debugName=e}}cx._idPool=0,cx.CommandPalette=new cx("CommandPalette"),cx.DebugBreakpointsContext=new cx("DebugBreakpointsContext"),cx.DebugCallStackContext=new cx("DebugCallStackContext"),cx.DebugConsoleContext=new cx("DebugConsoleContext"),cx.DebugVariablesContext=new cx("DebugVariablesContext"),cx.DebugWatchContext=new cx("DebugWatchContext"),cx.DebugToolBar=new cx("DebugToolBar"),cx.EditorContext=new cx("EditorContext"),cx.SimpleEditorContext=new cx("SimpleEditorContext"),cx.EditorContextCopy=new cx("EditorContextCopy"),cx.EditorContextPeek=new cx("EditorContextPeek"),cx.EditorTitle=new cx("EditorTitle"),cx.EditorTitleRun=new cx("EditorTitleRun"),cx.EditorTitleContext=new cx("EditorTitleContext"),cx.EmptyEditorGroup=new cx("EmptyEditorGroup"),cx.EmptyEditorGroupContext=new cx("EmptyEditorGroupContext"),cx.ExplorerContext=new cx("ExplorerContext"),cx.ExtensionContext=new cx("ExtensionContext"),cx.GlobalActivity=new cx("GlobalActivity"),cx.LayoutControlMenuSubmenu=new cx("LayoutControlMenuSubmenu"),cx.LayoutControlMenu=new cx("LayoutControlMenu"),cx.MenubarMainMenu=new cx("MenubarMainMenu"),cx.MenubarAppearanceMenu=new cx("MenubarAppearanceMenu"),cx.MenubarDebugMenu=new cx("MenubarDebugMenu"),cx.MenubarEditMenu=new cx("MenubarEditMenu"),cx.MenubarCopy=new cx("MenubarCopy"),cx.MenubarFileMenu=new cx("MenubarFileMenu"),cx.MenubarGoMenu=new cx("MenubarGoMenu"),cx.MenubarHelpMenu=new cx("MenubarHelpMenu"),cx.MenubarLayoutMenu=new cx("MenubarLayoutMenu"),cx.MenubarNewBreakpointMenu=new cx("MenubarNewBreakpointMenu"),cx.MenubarPanelAlignmentMenu=new cx("MenubarPanelAlignmentMenu"),cx.MenubarPanelPositionMenu=new cx("MenubarPanelPositionMenu"),cx.MenubarPreferencesMenu=new cx("MenubarPreferencesMenu"),cx.MenubarRecentMenu=new cx("MenubarRecentMenu"),cx.MenubarSelectionMenu=new cx("MenubarSelectionMenu"),cx.MenubarSwitchEditorMenu=new cx("MenubarSwitchEditorMenu"),cx.MenubarSwitchGroupMenu=new cx("MenubarSwitchGroupMenu"),cx.MenubarTerminalMenu=new cx("MenubarTerminalMenu"),cx.MenubarViewMenu=new cx("MenubarViewMenu"),cx.MenubarHomeMenu=new cx("MenubarHomeMenu"),cx.OpenEditorsContext=new cx("OpenEditorsContext"),cx.ProblemsPanelContext=new cx("ProblemsPanelContext"),cx.SCMChangeContext=new cx("SCMChangeContext"),cx.SCMResourceContext=new cx("SCMResourceContext"),cx.SCMResourceFolderContext=new cx("SCMResourceFolderContext"),cx.SCMResourceGroupContext=new cx("SCMResourceGroupContext"),cx.SCMSourceControl=new cx("SCMSourceControl"),cx.SCMTitle=new cx("SCMTitle"),cx.SearchContext=new cx("SearchContext"),cx.StatusBarWindowIndicatorMenu=new cx("StatusBarWindowIndicatorMenu"),cx.StatusBarRemoteIndicatorMenu=new cx("StatusBarRemoteIndicatorMenu"),cx.TestItem=new cx("TestItem"),cx.TestItemGutter=new cx("TestItemGutter"),cx.TestPeekElement=new cx("TestPeekElement"),cx.TestPeekTitle=new cx("TestPeekTitle"),cx.TouchBarContext=new cx("TouchBarContext"),cx.TitleBarContext=new cx("TitleBarContext"),cx.TunnelContext=new cx("TunnelContext"),cx.TunnelPrivacy=new cx("TunnelPrivacy"),cx.TunnelProtocol=new cx("TunnelProtocol"),cx.TunnelPortInline=new cx("TunnelInline"),cx.TunnelTitle=new cx("TunnelTitle"),cx.TunnelLocalAddressInline=new cx("TunnelLocalAddressInline"),cx.TunnelOriginInline=new cx("TunnelOriginInline"),cx.ViewItemContext=new cx("ViewItemContext"),cx.ViewContainerTitle=new cx("ViewContainerTitle"),cx.ViewContainerTitleContext=new cx("ViewContainerTitleContext"),cx.ViewTitle=new cx("ViewTitle"),cx.ViewTitleContext=new cx("ViewTitleContext"),cx.CommentThreadTitle=new cx("CommentThreadTitle"),cx.CommentThreadActions=new cx("CommentThreadActions"),cx.CommentTitle=new cx("CommentTitle"),cx.CommentActions=new cx("CommentActions"),cx.InteractiveToolbar=new cx("InteractiveToolbar"),cx.InteractiveCellTitle=new cx("InteractiveCellTitle"),cx.InteractiveCellExecute=new cx("InteractiveCellExecute"),cx.InteractiveInputExecute=new cx("InteractiveInputExecute"),cx.NotebookToolbar=new cx("NotebookToolbar"),cx.NotebookCellTitle=new cx("NotebookCellTitle"),cx.NotebookCellInsert=new cx("NotebookCellInsert"),cx.NotebookCellBetween=new cx("NotebookCellBetween"),cx.NotebookCellListTop=new cx("NotebookCellTop"),cx.NotebookCellExecute=new cx("NotebookCellExecute"),cx.NotebookCellExecutePrimary=new cx("NotebookCellExecutePrimary"),cx.NotebookDiffCellInputTitle=new cx("NotebookDiffCellInputTitle"),cx.NotebookDiffCellMetadataTitle=new cx("NotebookDiffCellMetadataTitle"),cx.NotebookDiffCellOutputsTitle=new cx("NotebookDiffCellOutputsTitle"),cx.NotebookOutputToolbar=new cx("NotebookOutputToolbar"),cx.NotebookEditorLayoutConfigure=new cx("NotebookEditorLayoutConfigure"),cx.BulkEditTitle=new cx("BulkEditTitle"),cx.BulkEditContext=new cx("BulkEditContext"),cx.TimelineItemContext=new cx("TimelineItemContext"),cx.TimelineTitle=new cx("TimelineTitle"),cx.TimelineTitleContext=new cx("TimelineTitleContext"),cx.AccountsContext=new cx("AccountsContext"),cx.PanelTitle=new cx("PanelTitle"),cx.AuxiliaryBarTitle=new cx("AuxiliaryBarTitle"),cx.TerminalInstanceContext=new cx("TerminalInstanceContext"),cx.TerminalEditorInstanceContext=new cx("TerminalEditorInstanceContext"),cx.TerminalNewDropdownContext=new cx("TerminalNewDropdownContext"),cx.TerminalTabContext=new cx("TerminalTabContext"),cx.TerminalTabEmptyAreaContext=new cx("TerminalTabEmptyAreaContext"),cx.TerminalInlineTabContext=new cx("TerminalInlineTabContext"),cx.WebviewContext=new cx("WebviewContext"),cx.InlineCompletionsActions=new cx("InlineCompletionsActions"),cx.NewFile=new cx("NewFile");const hx=L_("menuService"),ux=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new $o,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:e=>e===cx.CommandPalette}}addCommand(e){return this.addCommands(Hs.single(e))}addCommands(e){for(const t of e)this._commands.set(t.id,t);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),es((()=>{let t=!1;for(const i of e)t=this._commands.delete(i.id)||t;t&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)}))}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){return this.appendMenuItems(Hs.single({id:e,item:t}))}appendMenuItems(e){const t=new Set,i=new zs;for(const{id:n,item:o}of e){let e=this._menuItems.get(n);e||(e=new zs,this._menuItems.set(n,e)),i.push(e.push(o)),t.add(n)}return this._onDidChangeMenu.fire(t),es((()=>{if(i.size>0){for(let e of i)e();this._onDidChangeMenu.fire(t),i.clear()}}))}getMenuItems(e){let t;return t=this._menuItems.has(e)?[...this._menuItems.get(e)]:[],e===cx.CommandPalette&&this._appendImplicitItems(t),t}_appendImplicitItems(e){const t=new Set;for(const i of e)dx(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 gx extends vy{constructor(e,t,i,n){super(`submenuitem.${e.submenu.id}`,"string"==typeof e.title?e.title:e.title.value,[],"submenu"),this.item=e,this._menuService=t,this._contextKeyService=i,this._options=n}get actions(){const e=[],t=this._menuService.createMenu(this.item.submenu,this._contextKeyService),i=t.getActions(this._options);t.dispose();for(const[,n]of i)n.length>0&&(e.push(...n),e.push(new _y));return e.length&&e.pop(),e}}let px=class e{constructor(t,i,n,o,s){var r,a;if(this._commandService=s,this.id=t.id,this.label=(null==n?void 0:n.renderShortTitle)&&t.shortTitle?"string"==typeof t.shortTitle?t.shortTitle:t.shortTitle.value:"string"==typeof t.title?t.title:t.title.value,this.tooltip=null!==(a="string"==typeof t.tooltip?t.tooltip:null===(r=t.tooltip)||void 0===r?void 0:r.value)&&void 0!==a?a:"",this.enabled=!t.precondition||o.contextMatchesRules(t.precondition),this.checked=void 0,t.toggled){const e=t.toggled.condition?t.toggled:{condition:t.toggled};this.checked=o.contextMatchesRules(e.condition),this.checked&&e.tooltip&&(this.tooltip="string"==typeof e.tooltip?e.tooltip:e.tooltip.value),e.title&&(this.label="string"==typeof e.title?e.title:e.title.value)}this.item=t,this.alt=i?new e(i,void 0,n,o,s):void 0,this._options=n,ex.isThemeIcon(t.icon)&&(this.class=Ys.asClassName(t.icon))}dispose(){}run(...e){var t,i;let n=[];return(null===(t=this._options)||void 0===t?void 0:t.arg)&&(n=[...n,this._options.arg]),(null===(i=this._options)||void 0===i?void 0:i.shouldForwardArgs)&&(n=[...n,...e]),this._commandService.executeCommand(this.id,...n)}};px=ax([lx(3,$y),lx(4,wy)],px);class mx{constructor(){this._coreKeybindings=[],this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(e){if(1===Xs){if(e&&e.win)return e.win}else if(2===Xs){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e}registerKeybindingRule(e){const t=mx.bindToCurrentPlatform(e);if(t&&t.primary){const i=Pw(t.primary,Xs);i&&this._registerDefaultKeybinding(i,e.id,e.args,e.weight,0,e.when)}if(t&&Array.isArray(t.secondary))for(let i=0,n=t.secondary.length;i=21&&e<=30||(e>=31&&e<=56||(80===e||81===e||82===e||83===e||84===e||85===e||86===e||110===e||111===e||87===e||88===e||89===e||90===e||91===e||92===e))}_assertNoCtrlAlt(e,t){e.ctrlKey&&e.altKey&&!e.metaKey&&mx._mightProduceChar(e.keyCode)}_registerDefaultKeybinding(e,t,i,n,o,s){1===Xs&&this._assertNoCtrlAlt(e.parts[0],t),this._coreKeybindings.push({keybinding:e.parts,command:t,commandArgs:i,when:s,weight1:n,weight2:o,extensionId:null,isBuiltinExtension:!1}),this._cachedMergedKeybindings=null}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=[].concat(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(_x)),this._cachedMergedKeybindings.slice(0)}}const fx=new mx;function _x(e,t){return e.weight1!==t.weight1?e.weight1-t.weight1:e.commandt.command?1:e.weight2-t.weight2}Yy.add("platform.keybindingsRegistry",fx);const vx=L_("telemetryService");class bx{constructor(e){this.id=e.id,this.precondition=e.precondition,this._kbOpts=e.kbOpts,this._menuOpts=e.menuOpts,this._description=e.description}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?Sy.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};fx.registerKeybindingRule(i)}}Cy.registerCommand({id:this.id,handler:(e,t)=>this.runCommand(e,t),description:this._description})}_registerMenuItem(e){ux.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 wx extends bx{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t,i){return this._implementations.push({priority:e,name:t,implementation:i}),this._implementations.sort(((e,t)=>t.priority-e.priority)),{dispose:()=>{for(let e=0;e{if(e.get($y).contextMatchesRules(Qs(this.precondition)))return this.runEditorCommand(e,n,t)}))}}class xx extends yx{constructor(e){super(xx.convertOptions(e)),this.label=e.label,this.alias=e.alias}static convertOptions(e){let t;function i(t){return t.menuId||(t.menuId=cx.EditorContext),t.title||(t.title=e.label),t.when=Sy.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}runEditorCommand(e,t,i){return this.reportTelemetry(e,t),this.run(e,t,i||{})}reportTelemetry(e,t){e.get(vx).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}class Sx extends xx{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;enew Promise(((o,r)=>{try{o(n.invokeFunction(t,e.object.textEditorModel,er.lift(s),i.slice(2)))}catch(a){r(a)}})).finally((()=>{e.dispose()}))))}))}function Dx(e){return Mx.INSTANCE.registerEditorCommand(e),e}function Lx(e){const t=new e;return Mx.INSTANCE.registerEditorAction(t),t}function Nx(e){return Mx.INSTANCE.registerEditorAction(e),e}function Ex(e){Mx.INSTANCE.registerEditorAction(e)}function Ix(e,t){Mx.INSTANCE.registerEditorContribution(e,t)}var Tx;!function(e){e.getEditorCommand=function(e){return Mx.INSTANCE.getEditorCommand(e)},e.getEditorActions=function(){return Mx.INSTANCE.getEditorActions()},e.getEditorContributions=function(){return Mx.INSTANCE.getEditorContributions()},e.getSomeEditorContributions=function(e){return Mx.INSTANCE.getEditorContributions().filter((t=>e.indexOf(t.id)>=0))},e.getDiffEditorContributions=function(){return Mx.INSTANCE.getDiffEditorContributions()}}(Tx||(Tx={}));class Mx{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(e,t){this.editorContributions.push({id:e,ctor:t})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(e){e.register(),this.editorActions.push(e)}getEditorActions(){return this.editorActions.slice(0)}registerEditorCommand(e){e.register(),this.editorCommands[e.id]=e}getEditorCommand(e){return this.editorCommands[e]||null}}function Ax(e){return e.register(),e}Mx.INSTANCE=new Mx,Yy.add("editor.contributions",Mx.INSTANCE);const Ox=Ax(new wx({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:cx.MenubarEditMenu,group:"1_do",title:mf(0,"&&Undo"),order:1},{menuId:cx.CommandPalette,group:"",title:mf(0,"Undo"),order:1}]}));Ax(new Cx(Ox,{id:"default:undo",precondition:void 0}));const Rx=Ax(new wx({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:cx.MenubarEditMenu,group:"1_do",title:mf(0,"&&Redo"),order:2},{menuId:cx.CommandPalette,group:"",title:mf(0,"Redo"),order:1}]}));Ax(new Cx(Rx,{id:"default:redo",precondition:void 0}));const Px=Ax(new wx({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:cx.MenubarSelectionMenu,group:"1_basic",title:mf(0,"&&Select All"),order:1},{menuId:cx.CommandPalette,group:"",title:mf(0,"Select All"),order:1}]}));var Fx=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Bx=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}};let Vx=class{constructor(e,t){}dispose(){}};Vx.ID="editor.contrib.markerDecorations",Vx=Fx([Bx(1,uy)],Vx),Ix(Vx.ID,Vx);class Wx extends Uo{constructor(e,t){super(),this._onDidChange=this._register(new $o),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(){!this._resizeObserver&&this._referenceDomElement&&(this._resizeObserver=new ResizeObserver((e=>{e&&e[0]&&e[0].contentRect?this.observe({width:e[0].contentRect.width,height:e[0].contentRect.height}):this.observe()})),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())}}const zx=Object.prototype.hasOwnProperty;class Hx{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)}}function jx(e){const t=e.wordWrap;!0===t?e.wordWrap="on":!1===t&&(e.wordWrap="off");const i=e.lineNumbers;!0===i?e.lineNumbers="on":!1===i&&(e.lineNumbers="off");!1===e.autoClosingBrackets&&(e.autoClosingBrackets="never",e.autoClosingQuotes="never",e.autoSurround="never");"visible"===e.cursorBlinking&&(e.cursorBlinking="solid");const n=e.renderWhitespace;!0===n?e.renderWhitespace="boundary":!1===n&&(e.renderWhitespace="none");const o=e.renderLineHighlight;!0===o?e.renderLineHighlight="line":!1===o&&(e.renderLineHighlight="none");const s=e.acceptSuggestionOnEnter;!0===s?e.acceptSuggestionOnEnter="on":!1===s&&(e.acceptSuggestionOnEnter="off");const r=e.tabCompletion;!1===r?e.tabCompletion="off":!0===r&&(e.tabCompletion="onlySnippets");const a=e.suggest;if(a&&"object"==typeof a.filteredTypes&&a.filteredTypes){const e={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"};(function(e,t){for(let i in e)if(zx.call(e,i)&&!1===t({key:i,value:e[i]},(function(){delete e[i]})))return})(e,(e=>{const t=a.filteredTypes[e.key];!1===t&&(a[e.value]=t)}))}const l=e.hover;!0===l?e.hover={enabled:!0}:!1===l&&(e.hover={enabled:!1});const d=e.parameterHints;!0===d?e.parameterHints={enabled:!0}:!1===d&&(e.parameterHints={enabled:!1});const c=e.autoIndent;!0===c?e.autoIndent="full":!1===c&&(e.autoIndent="advanced");const h=e.matchBrackets;!0===h?e.matchBrackets="always":!1===h&&(e.matchBrackets="never");const{renderIndentGuides:u,highlightActiveIndentGuide:g}=e;e.guides||(e.guides={}),void 0!==u&&(e.guides.indentation=!!u),void 0!==g&&(e.guides.highlightActiveIndentation=!!g)}const Ux=new class{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new $o,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(e){this._tabFocus!==e&&(this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus))}},$x=L_("accessibilityService"),Kx=new Uy("accessibilityModeEnabled",!1);var qx=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Gx=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}};let Zx=class extends Uo{constructor(e,t,i,n){super(),this._accessibilityService=n,this._onDidChange=this._register(new $o),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new $o),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._computeOptionsMemory=new vf,this.isSimpleWidget=e,this._containerObserver=this._register(new Wx(i,t.dimension)),this._rawOptions=eS(t),this._validatedOptions=Jx.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(10)&&this._containerObserver.startObserving(),this._register(v_.onDidChangeZoomLevel((()=>this._recomputeOptions()))),this._register(Ux.onDidChangeTabFocus((()=>this._recomputeOptions()))),this._register(this._containerObserver.onDidChange((()=>this._recomputeOptions()))),this._register(x_.onDidChange((()=>this._recomputeOptions()))),this._register(t_.onDidChange((()=>this._recomputeOptions()))),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized((()=>this._recomputeOptions())))}_recomputeOptions(){const e=this._computeOptions(),t=Jx.checkEquals(this.options,e);null!==t&&(this.options=e,this._onDidChangeFast.fire(t),this._onDidChange.fire(t))}_computeOptions(){const e=this._readEnvConfiguration(),t=w_.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:Ux.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport};return Jx.computeOptions(this._validatedOptions,n)}_readEnvConfiguration(){return{extraEditorClassName:Yx(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:s_||o_,pixelRatio:t_.value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(e){return x_.readFontInfo(e)}getRawOptions(){return this._rawOptions}updateOptions(e){const t=eS(e);Jx.applyUpdate(this._rawOptions,t)&&(this._validatedOptions=Jx.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=function(e){let t=0;for(;e;)e=Math.floor(e/10),t++;return t||1}(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())}};function Yx(){let e="";return a_||l_||(e+="no-user-select "),a_&&(e+="no-minimap-shadow "),zo&&(e+="mac "),e}Zx=qx([Gx(3,$x)],Zx);class Xx{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class Qx{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 Jx{static validateOptions(e){const t=new Xx;for(const i of Zf){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 Qx;for(const n of Zf)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))&&jo(e,t);if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(!Jx._deepEquals(e[i],t[i]))return!1;return!0}static checkEquals(e,t){const i=[];let n=!1;for(const o of Zf){const s=!Jx._deepEquals(e._read(o.id),t._read(o.id));i[o.id]=s,s&&(n=!0)}return n?new _f(i):null}static applyUpdate(e,t){let i=!1;for(const n of Zf)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 eS(e){const t=tr(e);return jx(t),t}function tS(e,t,i){let n=null,o=null;if("function"==typeof i.value?(n="value",o=i.value,o.length):"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]}}var iS,nS=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(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"}(iS||(iS={}));class oS extends Uo{constructor(){super(),this.dispatched=!1,this.activeTouches={},this.handle=null,this.targets=[],this.ignoreTargets=[],this._lastSetTapCountTime=0,this._register(nC(document,"touchstart",(e=>this.onTouchStart(e)),{passive:!1})),this._register(nC(document,"touchend",(e=>this.onTouchEnd(e)))),this._register(nC(document,"touchmove",(e=>this.onTouchMove(e)),{passive:!1}))}static addTarget(e){return oS.isTouchDevice()?(oS.INSTANCE||(oS.INSTANCE=new oS),oS.INSTANCE.targets.push(e),{dispose:()=>{oS.INSTANCE.targets=oS.INSTANCE.targets.filter((t=>t!==e))}}):Uo.None}static ignoreTarget(e){return oS.isTouchDevice()?(oS.INSTANCE||(oS.INSTANCE=new oS),oS.INSTANCE.ignoreTargets.push(e),{dispose:()=>{oS.INSTANCE.ignoreTargets=oS.INSTANCE.ignoreTargets.filter((t=>t!==e))}}):Uo.None}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){let t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let i=0,n=e.targetTouches.length;i=oS.HOLD_DELAY&&Math.abs(s.initialPageX-ir(s.rollingPageX))<30&&Math.abs(s.initialPageY-ir(s.rollingPageY))<30){let e=this.newGestureEvent(iS.Contextmenu,s.initialTarget);e.pageX=ir(s.rollingPageX),e.pageY=ir(s.rollingPageY),this.dispatchEvent(e)}else if(1===i){let e=ir(s.rollingPageX),i=ir(s.rollingPageY),n=ir(s.rollingTimestamps)-s.rollingTimestamps[0],o=e-s.rollingPageX[0],r=i-s.rollingPageY[0];const a=this.targets.filter((e=>s.initialTarget instanceof Node&&e.contains(s.initialTarget)));this.inertia(a,t,Math.abs(o)/n,o>0?1:-1,e,Math.abs(r)/n,r>0?1:-1,i)}this.dispatchEvent(this.newGestureEvent(iS.End,s.initialTarget)),delete this.activeTouches[o.identifier]}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,t){let i=document.createEvent("CustomEvent");return i.initEvent(e,!1,!0),i.initialTarget=t,i.tapCount=0,i}dispatchEvent(e){if(e.type===iS.Tap){const t=(new Date).getTime();let i=0;i=t-this._lastSetTapCountTime>oS.CLEAR_TAP_COUNT_TIME?1:2,this._lastSetTapCountTime=t,e.tapCount=i}else e.type!==iS.Change&&e.type!==iS.Contextmenu||(this._lastSetTapCountTime=0);for(let t=0;t{e.initialTarget instanceof Node&&t.contains(e.initialTarget)&&(t.dispatchEvent(e),this.dispatched=!0)}))}inertia(e,t,i,n,o,s,r,a){this.handle=hC((()=>{let l=Date.now(),d=l-t,c=0,h=0,u=!0;i+=oS.SCROLL_FRICTION*d,s+=oS.SCROLL_FRICTION*d,i>0&&(u=!1,c=n*i*d),s>0&&(u=!1,h=r*s*d);let g=this.newGestureEvent(iS.Change);g.translationX=c,g.translationY=h,e.forEach((e=>e.dispatchEvent(g))),u||this.inertia(e,l,i,n,o+c,s,r,a+h)}))}onTouchMove(e){let t=Date.now();for(let i=0,n=e.changedTouches.length;i3&&(o.rollingPageX.shift(),o.rollingPageY.shift(),o.rollingTimestamps.shift()),o.rollingPageX.push(n.pageX),o.rollingPageY.push(n.pageY),o.rollingTimestamps.push(t)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}}function sS(e,t){let i=new Gw(t);return i.preventDefault(),{leftButton:i.leftButton,buttons:i.buttons,posx:i.posx,posy:i.posy}}oS.SCROLL_FRICTION=-.005,oS.HOLD_DELAY=700,oS.CLEAR_TAP_COUNT_TIME=400,nS([tS],oS,"isTouchDevice",null);class rS{constructor(){this._hooks=new ws,this._mouseMoveEventMerger=null,this._mouseMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._mouseMoveEventMerger=null,this._mouseMoveCallback=null;const i=this._onStopCallback;this._onStopCallback=null,e&&i&&i(t)}isMonitoring(){return!!this._mouseMoveEventMerger}startMonitoring(e,t,i,n,o){if(this.isMonitoring())return;this._mouseMoveEventMerger=i,this._mouseMoveCallback=n,this._onStopCallback=o;const s=qw.getSameOriginWindowChain(),r=Vs?"pointermove":"mousemove",a=s.map((e=>e.window.document)),l=AC(e);l&&a.unshift(l);for(const d of a)this._hooks.add(fC(d,r,(e=>{e.buttons===t?this._mouseMoveCallback(e):this.stopMonitoring(!0)}),((e,t)=>this._mouseMoveEventMerger(e,t)))),this._hooks.add(nC(d,"mouseup",(e=>this.stopMonitoring(!0))));if(qw.hasDifferentOriginAncestor()){let e=s[s.length-1];this._hooks.add(nC(e.window.document,"mouseout",(e=>{"html"===new Gw(e).target.tagName.toLowerCase()&&this.stopMonitoring(!0)}))),this._hooks.add(nC(e.window.document,"mouseover",(e=>{"html"===new Gw(e).target.tagName.toLowerCase()&&this.stopMonitoring(!0)}))),this._hooks.add(nC(e.window.document.body,"mouseleave",(e=>{this.stopMonitoring(!0)})))}}}function aS(e,t){const i=Math.pow(10,t);return Math.round(e*i)/i}class lS{constructor(e,t,i,n=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=aS(Math.max(Math.min(1,n),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}class dS{constructor(e,t,i,n){this._hslaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=aS(Math.max(Math.min(1,t),0),3),this.l=aS(Math.max(Math.min(1,i),0),3),this.a=aS(Math.max(Math.min(1,n),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,s=Math.max(t,i,n),r=Math.min(t,i,n);let a=0,l=0;const d=(r+s)/2,c=s-r;if(c>0){switch(l=Math.min(d<=.5?c/(2*d):c/(2-2*d),1),s){case t:a=(i-n)/c+(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:o}=e;let s,r,a;if(0===i)s=r=a=n;else{const e=n<.5?n*(1+i):n+i-n*i,o=2*n-e;s=dS._hue2rgb(o,e,t+1/3),r=dS._hue2rgb(o,e,t),a=dS._hue2rgb(o,e,t-1/3)}return new lS(Math.round(255*s),Math.round(255*r),Math.round(255*a),o)}}class cS{constructor(e,t,i,n){this._hsvaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=aS(Math.max(Math.min(1,t),0),3),this.v=aS(Math.max(Math.min(1,i),0),3),this.a=aS(Math.max(Math.min(1,n),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=o-Math.min(t,i,n),r=0===o?0:s/o;let a;return a=0===s?0:o===t?((i-n)/s%6+6)%6:o===i?(n-t)/s+2:(t-i)/s+4,new cS(Math.round(60*a),r,o,e.a)}static toRGBA(e){const{h:t,s:i,v:n,a:o}=e,s=n*i,r=s*(1-Math.abs(t/60%2-1)),a=n-s;let[l,d,c]=[0,0,0];return t<60?(l=s,d=r):t<120?(l=r,d=s):t<180?(d=s,c=r):t<240?(d=r,c=s):t<300?(l=r,c=s):t<=360&&(l=s,c=r),l=Math.round(255*(l+a)),d=Math.round(255*(d+a)),c=Math.round(255*(c+a)),new lS(l,d,c,o)}}class hS{constructor(e){if(!e)throw new Error("Color needs a value");if(e instanceof lS)this.rgba=e;else if(e instanceof dS)this._hsla=e,this.rgba=dS.toRGBA(e);else{if(!(e instanceof cS))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=cS.toRGBA(e)}}static fromHex(e){return hS.Format.CSS.parseHex(e)||hS.red}get hsla(){return this._hsla?this._hsla:dS.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:cS.fromRGBA(this.rgba)}equals(e){return!!e&&lS.equals(this.rgba,e.rgba)&&dS.equals(this.hsla,e.hsla)&&cS.equals(this.hsva,e.hsva)}getRelativeLuminance(){return aS(.2126*hS._relativeLuminanceForComponent(this.rgba.r)+.7152*hS._relativeLuminanceForComponent(this.rgba.g)+.0722*hS._relativeLuminanceForComponent(this.rgba.b),4)}static _relativeLuminanceForComponent(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){return(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3>=128}isLighterThan(e){return this.getRelativeLuminance()>e.getRelativeLuminance()}isDarkerThan(e){return this.getRelativeLuminance()0&&"#"===i.charAt(i.length-1)?i.substring(0,i.length-1):i)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}};function pS(e){return`--vscode-${e.replace(/\./g,"-")}`}Yy.add(uS,gS);const mS="base.contributions.colors";const fS=new class{constructor(){this._onDidChangeSchema=new $o,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){let s={id:e,description:i,defaults:t,needsTransparency:n,deprecationMessage:o};this.colorsById[e]=s;let r={type:"string",description:i,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return o&&(r.deprecationMessage=o),this.colorSchema.properties[e]=r,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&&i.defaults){return kL(i.defaults[t.type],t)}}getColorSchema(){return this.colorSchema}toString(){return Object.keys(this.colorsById).sort(((e,t)=>{let i=-1===e.indexOf(".")?0:1,n=-1===t.indexOf(".")?0:1;return i!==n?i-n:e.localeCompare(t)})).map((e=>`- \`${e}\`: ${this.colorsById[e].description}`)).join("\n")}};function _S(e,t,i,n,o){return fS.registerColor(e,t,i,n,o)}Yy.add(mS,fS);const vS=_S("foreground",{dark:"#CCCCCC",light:"#616161",hc:"#FFFFFF"},mf(0,"Overall foreground color. This color is only used if not overridden by a component.")),bS=_S("errorForeground",{dark:"#F48771",light:"#A1260D",hc:"#F48771"},mf(0,"Overall foreground color for error messages. This color is only used if not overridden by a component."));_S("descriptionForeground",{light:"#717171",dark:yL(vS,.7),hc:yL(vS,.7)},mf(0,"Foreground color for description text providing additional information, for example for a label."));const wS=_S("icon.foreground",{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},mf(0,"The default color for icons in the workbench.")),CS=_S("focusBorder",{dark:"#007FD4",light:"#0090F1",hc:"#F38518"},mf(0,"Overall border color for focused elements. This color is only used if not overridden by a component.")),yS=_S("contrastBorder",{light:null,dark:null,hc:"#6FC3DF"},mf(0,"An extra border around elements to separate them from others for greater contrast.")),xS=_S("contrastActiveBorder",{light:null,dark:null,hc:CS},mf(0,"An extra border around active elements to separate them from others for greater contrast."));_S("selection.background",{light:null,dark:null,hc:null},mf(0,"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.")),_S("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hc:hS.black},mf(0,"Color for text separators."));const SS=_S("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},mf(0,"Foreground color for links in text.")),kS=_S("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},mf(0,"Foreground color for links in text when clicked on and on mouse hover."));_S("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hc:"#D7BA7D"},mf(0,"Foreground color for preformatted text segments.")),_S("textBlockQuote.background",{light:"#7f7f7f1a",dark:"#7f7f7f1a",hc:null},mf(0,"Background color for block quotes in text.")),_S("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hc:hS.white},mf(0,"Border color for block quotes in text."));const DS=_S("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hc:hS.black},mf(0,"Background color for code blocks in text.")),LS=_S("widget.shadow",{dark:yL(hS.black,.36),light:yL(hS.black,.16),hc:null},mf(0,"Shadow color of widgets such as find/replace inside the editor.")),NS=_S("input.background",{dark:"#3C3C3C",light:hS.white,hc:hS.black},mf(0,"Input box background.")),ES=_S("input.foreground",{dark:vS,light:vS,hc:vS},mf(0,"Input box foreground.")),IS=_S("input.border",{dark:null,light:null,hc:yS},mf(0,"Input box border.")),TS=_S("inputOption.activeBorder",{dark:"#007ACC00",light:"#007ACC00",hc:yS},mf(0,"Border color of activated options in input fields."));_S("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hc:null},mf(0,"Background color of activated options in input fields."));const MS=_S("inputOption.activeBackground",{dark:yL(CS,.4),light:yL(CS,.2),hc:hS.transparent},mf(0,"Background hover color of options in input fields.")),AS=_S("inputOption.activeForeground",{dark:hS.white,light:hS.black,hc:null},mf(0,"Foreground color of activated options in input fields."));_S("input.placeholderForeground",{light:yL(vS,.5),dark:yL(vS,.5),hc:yL(vS,.7)},mf(0,"Input box foreground color for placeholder text."));const OS=_S("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hc:hS.black},mf(0,"Input validation background color for information severity.")),RS=_S("inputValidation.infoForeground",{dark:null,light:null,hc:null},mf(0,"Input validation foreground color for information severity.")),PS=_S("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hc:yS},mf(0,"Input validation border color for information severity.")),FS=_S("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hc:hS.black},mf(0,"Input validation background color for warning severity.")),BS=_S("inputValidation.warningForeground",{dark:null,light:null,hc:null},mf(0,"Input validation foreground color for warning severity.")),VS=_S("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hc:yS},mf(0,"Input validation border color for warning severity.")),WS=_S("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hc:hS.black},mf(0,"Input validation background color for error severity.")),zS=_S("inputValidation.errorForeground",{dark:null,light:null,hc:null},mf(0,"Input validation foreground color for error severity.")),HS=_S("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hc:yS},mf(0,"Input validation border color for error severity.")),jS=_S("dropdown.background",{dark:"#3C3C3C",light:hS.white,hc:hS.black},mf(0,"Dropdown background."));_S("dropdown.listBackground",{dark:null,light:null,hc:hS.black},mf(0,"Dropdown list background."));const US=_S("dropdown.foreground",{dark:"#F0F0F0",light:null,hc:hS.white},mf(0,"Dropdown foreground.")),$S=_S("dropdown.border",{dark:jS,light:"#CECECE",hc:yS},mf(0,"Dropdown border."));_S("checkbox.background",{dark:jS,light:jS,hc:jS},mf(0,"Background color of checkbox widget.")),_S("checkbox.foreground",{dark:US,light:US,hc:US},mf(0,"Foreground color of checkbox widget.")),_S("checkbox.border",{dark:$S,light:$S,hc:$S},mf(0,"Border color of checkbox widget."));const KS=_S("button.foreground",{dark:hS.white,light:hS.white,hc:hS.white},mf(0,"Button foreground color.")),qS=_S("button.background",{dark:"#0E639C",light:"#007ACC",hc:null},mf(0,"Button background color.")),GS=_S("button.hoverBackground",{dark:CL(qS,.2),light:wL(qS,.2),hc:null},mf(0,"Button background color when hovering."));_S("button.border",{dark:yS,light:yS,hc:yS},mf(0,"Button border color.")),_S("button.secondaryForeground",{dark:hS.white,light:hS.white,hc:hS.white},mf(0,"Secondary button foreground color."));const ZS=_S("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hc:null},mf(0,"Secondary button background color."));_S("button.secondaryHoverBackground",{dark:CL(ZS,.2),light:wL(ZS,.2),hc:null},mf(0,"Secondary button background color when hovering."));const YS=_S("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hc:hS.black},mf(0,"Badge background color. Badges are small information labels, e.g. for search results count.")),XS=_S("badge.foreground",{dark:hS.white,light:"#333",hc:hS.white},mf(0,"Badge foreground color. Badges are small information labels, e.g. for search results count.")),QS=_S("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hc:null},mf(0,"Scrollbar shadow to indicate that the view is scrolled.")),JS=_S("scrollbarSlider.background",{dark:hS.fromHex("#797979").transparent(.4),light:hS.fromHex("#646464").transparent(.4),hc:yL(yS,.6)},mf(0,"Scrollbar slider background color.")),ek=_S("scrollbarSlider.hoverBackground",{dark:hS.fromHex("#646464").transparent(.7),light:hS.fromHex("#646464").transparent(.7),hc:yL(yS,.8)},mf(0,"Scrollbar slider background color when hovering.")),tk=_S("scrollbarSlider.activeBackground",{dark:hS.fromHex("#BFBFBF").transparent(.4),light:hS.fromHex("#000000").transparent(.6),hc:yS},mf(0,"Scrollbar slider background color when clicked on.")),ik=_S("progressBar.background",{dark:hS.fromHex("#0E70C0"),light:hS.fromHex("#0E70C0"),hc:yS},mf(0,"Background color of the progress bar that can show for long running operations.")),nk=_S("editorError.background",{dark:null,light:null,hc:null},mf(0,"Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),ok=_S("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hc:null},mf(0,"Foreground color of error squigglies in the editor.")),sk=_S("editorError.border",{dark:null,light:null,hc:hS.fromHex("#E47777").transparent(.8)},mf(0,"Border color of error boxes in the editor.")),rk=_S("editorWarning.background",{dark:null,light:null,hc:null},mf(0,"Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),ak=_S("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hc:null},mf(0,"Foreground color of warning squigglies in the editor.")),lk=_S("editorWarning.border",{dark:null,light:null,hc:hS.fromHex("#FFCC00").transparent(.8)},mf(0,"Border color of warning boxes in the editor.")),dk=_S("editorInfo.background",{dark:null,light:null,hc:null},mf(0,"Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),ck=_S("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hc:"#3794FF"},mf(0,"Foreground color of info squigglies in the editor.")),hk=_S("editorInfo.border",{dark:null,light:null,hc:hS.fromHex("#3794FF").transparent(.8)},mf(0,"Border color of info boxes in the editor.")),uk=_S("editorHint.foreground",{dark:hS.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hc:null},mf(0,"Foreground color of hint squigglies in the editor.")),gk=_S("editorHint.border",{dark:null,light:null,hc:hS.fromHex("#eeeeee").transparent(.8)},mf(0,"Border color of hint boxes in the editor."));_S("sash.hoverBorder",{dark:CS,light:CS,hc:CS},mf(0,"Border color of active sashes."));const pk=_S("editor.background",{light:"#fffffe",dark:"#1E1E1E",hc:hS.black},mf(0,"Editor background color.")),mk=_S("editor.foreground",{light:"#333333",dark:"#BBBBBB",hc:hS.white},mf(0,"Editor default foreground color.")),fk=_S("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hc:"#0C141F"},mf(0,"Background color of editor widgets, such as find/replace.")),_k=_S("editorWidget.foreground",{dark:vS,light:vS,hc:vS},mf(0,"Foreground color of editor widgets, such as find/replace.")),vk=_S("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hc:yS},mf(0,"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.")),bk=_S("editorWidget.resizeBorder",{light:null,dark:null,hc:null},mf(0,"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.")),wk=_S("quickInput.background",{dark:fk,light:fk,hc:fk},mf(0,"Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),Ck=_S("quickInput.foreground",{dark:_k,light:_k,hc:_k},mf(0,"Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),yk=_S("quickInputTitle.background",{dark:new hS(new lS(255,255,255,.105)),light:new hS(new lS(0,0,0,.06)),hc:"#000000"},mf(0,"Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),xk=_S("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hc:hS.white},mf(0,"Quick picker color for grouping labels.")),Sk=_S("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hc:hS.white},mf(0,"Quick picker color for grouping borders.")),kk=_S("keybindingLabel.background",{dark:new hS(new lS(128,128,128,.17)),light:new hS(new lS(221,221,221,.4)),hc:hS.transparent},mf(0,"Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),Dk=_S("keybindingLabel.foreground",{dark:hS.fromHex("#CCCCCC"),light:hS.fromHex("#555555"),hc:hS.white},mf(0,"Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),Lk=_S("keybindingLabel.border",{dark:new hS(new lS(51,51,51,.6)),light:new hS(new lS(204,204,204,.4)),hc:new hS(new lS(111,195,223))},mf(0,"Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),Nk=_S("keybindingLabel.bottomBorder",{dark:new hS(new lS(68,68,68,.6)),light:new hS(new lS(187,187,187,.4)),hc:new hS(new lS(111,195,223))},mf(0,"Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),Ek=_S("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},mf(0,"Color of the editor selection.")),Ik=_S("editor.selectionForeground",{light:null,dark:null,hc:"#000000"},mf(0,"Color of the selected text for high contrast.")),Tk=_S("editor.inactiveSelectionBackground",{light:yL(Ek,.5),dark:yL(Ek,.5),hc:yL(Ek,.5)},mf(0,"Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),Mk=_S("editor.selectionHighlightBackground",{light:SL(Ek,pk,.3,.6),dark:SL(Ek,pk,.3,.6),hc:null},mf(0,"Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0),Ak=_S("editor.selectionHighlightBorder",{light:null,dark:null,hc:xS},mf(0,"Border color for regions with the same content as the selection.")),Ok=_S("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hc:null},mf(0,"Color of the current search match.")),Rk=_S("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hc:null},mf(0,"Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),Pk=_S("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hc:null},mf(0,"Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),Fk=_S("editor.findMatchBorder",{light:null,dark:null,hc:xS},mf(0,"Border color of the current search match.")),Bk=_S("editor.findMatchHighlightBorder",{light:null,dark:null,hc:xS},mf(0,"Border color of the other search matches.")),Vk=_S("editor.findRangeHighlightBorder",{dark:null,light:null,hc:yL(xS,.4)},mf(0,"Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0);_S("searchEditor.findMatchBackground",{light:yL(Rk,.66),dark:yL(Rk,.66),hc:Rk},mf(0,"Color of the Search Editor query matches.")),_S("searchEditor.findMatchBorder",{light:yL(Bk,.66),dark:yL(Bk,.66),hc:Bk},mf(0,"Border color of the Search Editor query matches."));const Wk=_S("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hc:"#ADD6FF26"},mf(0,"Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0),zk=_S("editorHoverWidget.background",{light:fk,dark:fk,hc:fk},mf(0,"Background color of the editor hover.")),Hk=_S("editorHoverWidget.foreground",{light:_k,dark:_k,hc:_k},mf(0,"Foreground color of the editor hover.")),jk=_S("editorHoverWidget.border",{light:vk,dark:vk,hc:vk},mf(0,"Border color of the editor hover.")),Uk=_S("editorHoverWidget.statusBarBackground",{dark:CL(zk,.2),light:wL(zk,.05),hc:fk},mf(0,"Background color of the editor hover status bar.")),$k=_S("editorLink.activeForeground",{dark:"#4E94CE",light:hS.blue,hc:hS.cyan},mf(0,"Color of active links.")),Kk=_S("editorInlayHint.foreground",{dark:yL(XS,.8),light:yL(XS,.8),hc:XS},mf(0,"Foreground color of inline hints")),qk=_S("editorInlayHint.background",{dark:yL(YS,.6),light:yL(YS,.3),hc:YS},mf(0,"Background color of inline hints")),Gk=_S("editorInlayHint.typeForeground",{dark:Kk,light:Kk,hc:Kk},mf(0,"Foreground color of inline hints for types")),Zk=_S("editorInlayHint.typeBackground",{dark:qk,light:qk,hc:qk},mf(0,"Background color of inline hints for types")),Yk=_S("editorInlayHint.parameterForeground",{dark:Kk,light:Kk,hc:Kk},mf(0,"Foreground color of inline hints for parameters")),Xk=_S("editorInlayHint.parameterBackground",{dark:qk,light:qk,hc:qk},mf(0,"Background color of inline hints for parameters")),Qk=_S("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hc:"#FFCC00"},mf(0,"The color used for the lightbulb actions icon.")),Jk=_S("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},mf(0,"The color used for the lightbulb auto fix actions icon.")),eD=new hS(new lS(155,185,85,.2)),tD=new hS(new lS(255,0,0,.2)),iD=_S("diffEditor.insertedTextBackground",{dark:eD,light:eD,hc:null},mf(0,"Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),nD=_S("diffEditor.removedTextBackground",{dark:tD,light:tD,hc:null},mf(0,"Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),oD=_S("diffEditor.insertedLineBackground",{dark:null,light:null,hc:null},mf(0,"Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),sD=_S("diffEditor.removedLineBackground",{dark:null,light:null,hc:null},mf(0,"Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),rD=_S("diffEditorGutter.insertedLineBackground",{dark:null,light:null,hc:null},mf(0,"Background color for the margin where lines got inserted.")),aD=_S("diffEditorGutter.removedLineBackground",{dark:null,light:null,hc:null},mf(0,"Background color for the margin where lines got removed.")),lD=_S("diffEditorOverview.insertedForeground",{dark:null,light:null,hc:null},mf(0,"Diff overview ruler foreground for inserted content.")),dD=_S("diffEditorOverview.removedForeground",{dark:null,light:null,hc:null},mf(0,"Diff overview ruler foreground for removed content.")),cD=_S("diffEditor.insertedTextBorder",{dark:null,light:null,hc:"#33ff2eff"},mf(0,"Outline color for the text that got inserted.")),hD=_S("diffEditor.removedTextBorder",{dark:null,light:null,hc:"#FF008F"},mf(0,"Outline color for text that got removed.")),uD=_S("diffEditor.border",{dark:null,light:null,hc:yS},mf(0,"Border color between the two text editors.")),gD=_S("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hc:null},mf(0,"Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),pD=_S("list.focusBackground",{dark:null,light:null,hc:null},mf(0,"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.")),mD=_S("list.focusForeground",{dark:null,light:null,hc:null},mf(0,"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.")),fD=_S("list.focusOutline",{dark:CS,light:CS,hc:xS},mf(0,"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.")),_D=_S("list.activeSelectionBackground",{dark:"#094771",light:"#0060C0",hc:null},mf(0,"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.")),vD=_S("list.activeSelectionForeground",{dark:hS.white,light:hS.white,hc:null},mf(0,"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.")),bD=_S("list.activeSelectionIconForeground",{dark:null,light:null,hc:null},mf(0,"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.")),wD=_S("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hc:null},mf(0,"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.")),CD=_S("list.inactiveSelectionForeground",{dark:null,light:null,hc:null},mf(0,"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.")),yD=_S("list.inactiveSelectionIconForeground",{dark:null,light:null,hc:null},mf(0,"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.")),xD=_S("list.inactiveFocusBackground",{dark:null,light:null,hc:null},mf(0,"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.")),SD=_S("list.inactiveFocusOutline",{dark:null,light:null,hc:null},mf(0,"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.")),kD=_S("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hc:null},mf(0,"List/Tree background when hovering over items using the mouse.")),DD=_S("list.hoverForeground",{dark:null,light:null,hc:null},mf(0,"List/Tree foreground when hovering over items using the mouse.")),LD=_S("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hc:null},mf(0,"List/Tree drag and drop background when moving items around using the mouse.")),ND=_S("list.highlightForeground",{dark:"#18A3FF",light:"#0066BF",hc:CS},mf(0,"List/Tree foreground color of the match highlights when searching inside the list/tree.")),ED=_S("list.focusHighlightForeground",{dark:ND,light:(ID=_D,TD=ND,MD="#9DDDFF",{op:5,if:ID,then:TD,else:MD}),hc:ND},mf(0,"List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree."));var ID,TD,MD;_S("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hc:"#B89500"},mf(0,"List/Tree foreground color for invalid items, for example an unresolved root in explorer.")),_S("list.errorForeground",{dark:"#F88070",light:"#B01011",hc:null},mf(0,"Foreground color of list items containing errors.")),_S("list.warningForeground",{dark:"#CCA700",light:"#855F00",hc:null},mf(0,"Foreground color of list items containing warnings."));const AD=_S("listFilterWidget.background",{light:"#efc1ad",dark:"#653723",hc:hS.black},mf(0,"Background color of the type filter widget in lists and trees.")),OD=_S("listFilterWidget.outline",{dark:hS.transparent,light:hS.transparent,hc:"#f38518"},mf(0,"Outline color of the type filter widget in lists and trees.")),RD=_S("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hc:yS},mf(0,"Outline color of the type filter widget in lists and trees, when there are no matches."));_S("list.filterMatchBackground",{dark:Rk,light:Rk,hc:null},mf(0,"Background color of the filtered match.")),_S("list.filterMatchBorder",{dark:Bk,light:Bk,hc:yS},mf(0,"Border color of the filtered match."));const PD=_S("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hc:"#a9a9a9"},mf(0,"Tree stroke color for the indentation guides.")),FD=_S("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hc:null},mf(0,"Table border color between columns.")),BD=_S("tree.tableOddRowsBackground",{dark:yL(vS,.04),light:yL(vS,.04),hc:null},mf(0,"Background color for odd table rows."));_S("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hc:"#A7A8A9"},mf(0,"List/Tree foreground color for items that are deemphasized. "));const VD=_S("quickInput.list.focusBackground",{dark:null,light:null,hc:null},"",void 0,mf(0,"Please use quickInputList.focusBackground instead")),WD=_S("quickInputList.focusForeground",{dark:vD,light:vD,hc:vD},mf(0,"Quick picker foreground color for the focused item.")),zD=_S("quickInputList.focusIconForeground",{dark:bD,light:bD,hc:bD},mf(0,"Quick picker icon foreground color for the focused item.")),HD=_S("quickInputList.focusBackground",{dark:xL(VD,_D),light:xL(VD,_D),hc:null},mf(0,"Quick picker background color for the focused item.")),jD=_S("menu.border",{dark:null,light:null,hc:yS},mf(0,"Border color of menus.")),UD=_S("menu.foreground",{dark:US,light:vS,hc:US},mf(0,"Foreground color of menu items.")),$D=_S("menu.background",{dark:jS,light:jS,hc:jS},mf(0,"Background color of menu items.")),KD=_S("menu.selectionForeground",{dark:vD,light:vD,hc:vD},mf(0,"Foreground color of the selected menu item in menus.")),qD=_S("menu.selectionBackground",{dark:_D,light:_D,hc:_D},mf(0,"Background color of the selected menu item in menus.")),GD=_S("menu.selectionBorder",{dark:null,light:null,hc:xS},mf(0,"Border color of the selected menu item in menus.")),ZD=_S("menu.separatorBackground",{dark:"#BBBBBB",light:"#888888",hc:yS},mf(0,"Color of a separator menu item in menus.")),YD=_S("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hc:null},mf(0,"Toolbar background when hovering over actions using the mouse"));_S("toolbar.hoverOutline",{dark:null,light:null,hc:xS},mf(0,"Toolbar outline when hovering over actions using the mouse")),_S("toolbar.activeBackground",{dark:CL(YD,.1),light:wL(YD,.1),hc:null},mf(0,"Toolbar background when holding the mouse over actions")),_S("editor.snippetTabstopHighlightBackground",{dark:new hS(new lS(124,124,124,.3)),light:new hS(new lS(10,50,100,.2)),hc:new hS(new lS(124,124,124,.3))},mf(0,"Highlight background color of a snippet tabstop.")),_S("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hc:null},mf(0,"Highlight border color of a snippet tabstop.")),_S("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hc:null},mf(0,"Highlight background color of the final tabstop of a snippet.")),_S("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new hS(new lS(10,50,100,.5)),hc:"#525252"},mf(0,"Highlight border color of the final tabstop of a snippet.")),_S("breadcrumb.foreground",{light:yL(vS,.8),dark:yL(vS,.8),hc:yL(vS,.8)},mf(0,"Color of focused breadcrumb items.")),_S("breadcrumb.background",{light:pk,dark:pk,hc:pk},mf(0,"Background color of breadcrumb items.")),_S("breadcrumb.focusForeground",{light:wL(vS,.2),dark:CL(vS,.1),hc:CL(vS,.1)},mf(0,"Color of focused breadcrumb items.")),_S("breadcrumb.activeSelectionForeground",{light:wL(vS,.2),dark:CL(vS,.1),hc:CL(vS,.1)},mf(0,"Color of selected breadcrumb items.")),_S("breadcrumbPicker.background",{light:fk,dark:fk,hc:fk},mf(0,"Background color of breadcrumb item picker."));const XD=hS.fromHex("#40C8AE").transparent(.5),QD=hS.fromHex("#40A6FF").transparent(.5),JD=hS.fromHex("#606060").transparent(.4),eL=.4,tL=_S("merge.currentHeaderBackground",{dark:XD,light:XD,hc:null},mf(0,"Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);_S("merge.currentContentBackground",{dark:yL(tL,eL),light:yL(tL,eL),hc:yL(tL,eL)},mf(0,"Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);const iL=_S("merge.incomingHeaderBackground",{dark:QD,light:QD,hc:null},mf(0,"Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);_S("merge.incomingContentBackground",{dark:yL(iL,eL),light:yL(iL,eL),hc:yL(iL,eL)},mf(0,"Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);const nL=_S("merge.commonHeaderBackground",{dark:JD,light:JD,hc:null},mf(0,"Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);_S("merge.commonContentBackground",{dark:yL(nL,eL),light:yL(nL,eL),hc:yL(nL,eL)},mf(0,"Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);const oL=_S("merge.border",{dark:null,light:null,hc:"#C3DF6F"},mf(0,"Border color on headers and the splitter in inline merge-conflicts."));_S("editorOverviewRuler.currentContentForeground",{dark:yL(tL,1),light:yL(tL,1),hc:oL},mf(0,"Current overview ruler foreground for inline merge-conflicts.")),_S("editorOverviewRuler.incomingContentForeground",{dark:yL(iL,1),light:yL(iL,1),hc:oL},mf(0,"Incoming overview ruler foreground for inline merge-conflicts.")),_S("editorOverviewRuler.commonContentForeground",{dark:yL(nL,1),light:yL(nL,1),hc:oL},mf(0,"Common ancestor overview ruler foreground for inline merge-conflicts."));const sL=_S("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hc:"#AB5A00"},mf(0,"Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),rL=_S("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},mf(0,"Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),aL=_S("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hc:"#AB5A00"},mf(0,"Minimap marker color for find matches."),!0),lL=_S("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hc:"#ffffff"},mf(0,"Minimap marker color for repeating editor selections."),!0),dL=_S("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hc:"#ffffff"},mf(0,"Minimap marker color for the editor selection."),!0),cL=_S("minimap.errorHighlight",{dark:new hS(new lS(255,18,18,.7)),light:new hS(new lS(255,18,18,.7)),hc:new hS(new lS(255,50,50,1))},mf(0,"Minimap marker color for errors.")),hL=_S("minimap.warningHighlight",{dark:ak,light:ak,hc:lk},mf(0,"Minimap marker color for warnings.")),uL=_S("minimap.background",{dark:null,light:null,hc:null},mf(0,"Minimap background color.")),gL=_S("minimap.foregroundOpacity",{dark:hS.fromHex("#000f"),light:hS.fromHex("#000f"),hc:hS.fromHex("#000f")},mf(0,'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.')),pL=_S("minimapSlider.background",{light:yL(JS,.5),dark:yL(JS,.5),hc:yL(JS,.5)},mf(0,"Minimap slider background color.")),mL=_S("minimapSlider.hoverBackground",{light:yL(ek,.5),dark:yL(ek,.5),hc:yL(ek,.5)},mf(0,"Minimap slider background color when hovering.")),fL=_S("minimapSlider.activeBackground",{light:yL(tk,.5),dark:yL(tk,.5),hc:yL(tk,.5)},mf(0,"Minimap slider background color when clicked on.")),_L=_S("problemsErrorIcon.foreground",{dark:ok,light:ok,hc:ok},mf(0,"The color used for the problems error icon.")),vL=_S("problemsWarningIcon.foreground",{dark:ak,light:ak,hc:ak},mf(0,"The color used for the problems warning icon.")),bL=_S("problemsInfoIcon.foreground",{dark:ck,light:ck,hc:ck},mf(0,"The color used for the problems info icon."));function wL(e,t){return{op:0,value:e,factor:t}}function CL(e,t){return{op:1,value:e,factor:t}}function yL(e,t){return{op:2,value:e,factor:t}}function xL(...e){return{op:3,values:e}}function SL(e,t,i,n){return{op:4,value:e,background:t,factor:i,transparency:n}}function kL(e,t){if(null!==e)return"string"==typeof e?"#"===e[0]?hS.fromHex(e):t.getColor(e):e instanceof hS?e:"object"==typeof e?function(e,t){var i,n,o;switch(e.op){case 0:return null===(i=kL(e.value,t))||void 0===i?void 0:i.darken(e.factor);case 1:return null===(n=kL(e.value,t))||void 0===n?void 0:n.lighten(e.factor);case 2:return null===(o=kL(e.value,t))||void 0===o?void 0:o.transparent(e.factor);case 3:for(const i of e.values){const e=kL(i,t);if(e)return e}return;case 5:return kL(t.defines(e.if)?e.then:e.else,t);case 4:{const i=kL(e.value,t);if(!i)return;const n=kL(e.background,t);return n?i.isDarkerThan(n)?hS.getLighterColor(i,n,e.factor).transparent(e.transparency):hS.getDarkerColor(i,n,e.factor).transparent(e.transparency):i.transparent(e.factor*e.transparency)}default:throw nr()}}(e,t):void 0}_S("charts.foreground",{dark:vS,light:vS,hc:vS},mf(0,"The foreground color used in charts.")),_S("charts.lines",{dark:yL(vS,.5),light:yL(vS,.5),hc:yL(vS,.5)},mf(0,"The color used for horizontal lines in charts.")),_S("charts.red",{dark:ok,light:ok,hc:ok},mf(0,"The red color used in chart visualizations.")),_S("charts.blue",{dark:ck,light:ck,hc:ck},mf(0,"The blue color used in chart visualizations.")),_S("charts.yellow",{dark:ak,light:ak,hc:ak},mf(0,"The yellow color used in chart visualizations.")),_S("charts.orange",{dark:aL,light:aL,hc:aL},mf(0,"The orange color used in chart visualizations.")),_S("charts.green",{dark:"#89D185",light:"#388A34",hc:"#89D185"},mf(0,"The green color used in chart visualizations.")),_S("charts.purple",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},mf(0,"The purple color used in chart visualizations."));const DL="vscode://schemas/workbench-colors";let LL=Yy.as(uS);LL.registerSchema(DL,fS.getColorSchema());const NL=new lb((()=>LL.notifySchemaChanged(DL)),200);fS.onDidChangeSchema((()=>{NL.isScheduled()||NL.schedule()}));class EL{constructor(e,t){this.x=e,this.y=t,this._pageCoordinatesBrand=void 0}toClientCoordinates(){return new IL(this.x-xC.scrollX,this.y-xC.scrollY)}}class IL{constructor(e,t){this.clientX=e,this.clientY=t,this._clientCoordinatesBrand=void 0}toPageCoordinates(){return new EL(this.clientX+xC.scrollX,this.clientY+xC.scrollY)}}class TL{constructor(e,t,i,n){this.x=e,this.y=t,this.width=i,this.height=n,this._editorPagePositionBrand=void 0}}class ML{constructor(e,t){this.x=e,this.y=t,this._positionRelativeToEditorBrand=void 0}}function AL(e){const t=yC(e);return new TL(t.left,t.top,t.width,t.height)}function OL(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 ML(s,r)}class RL extends Gw{constructor(e,t){super(e),this._editorMouseEventBrand=void 0,this.pos=new EL(this.posx,this.posy),this.editorPos=AL(t),this.relativePos=OL(t,this.editorPos,this.pos)}}class PL{constructor(e){this._editorViewDomNode=e}_create(e){return new RL(e,this._editorViewDomNode)}onContextMenu(e,t){return nC(e,"contextmenu",(e=>{t(this._create(e))}))}onMouseUp(e,t){return nC(e,"mouseup",(e=>{t(this._create(e))}))}onMouseDown(e,t){return nC(e,"mousedown",(e=>{t(this._create(e))}))}onMouseLeave(e,t){return lC(e,(e=>{t(this._create(e))}))}onMouseMoveThrottled(e,t,i,n){return fC(e,"mousemove",t,((e,t)=>i(e,this._create(t))),n)}}class FL{constructor(e){this._editorViewDomNode=e}_create(e){return new RL(e,this._editorViewDomNode)}onPointerUp(e,t){return nC(e,"pointerup",(e=>{t(this._create(e))}))}onPointerDown(e,t){return nC(e,"pointerdown",(e=>{t(this._create(e))}))}onPointerLeave(e,t){return n=e=>{t(this._create(e))},nC(i=e,"pointerout",(e=>{let t=e.relatedTarget;for(;t&&t!==i;)t=t.parentNode;t!==i&&n(e)}));var i,n}onPointerMoveThrottled(e,t,i,n){return fC(e,"pointermove",t,((e,t)=>i(e,this._create(t))),n)}}class BL extends Uo{constructor(e){super(),this._editorViewDomNode=e,this._globalMouseMoveMonitor=this._register(new rS),this._keydownListener=null}startMonitoring(e,t,i,n,o){this._keydownListener=sC(document,"keydown",(e=>{e.toKeybinding().isModifierKey()||this._globalMouseMoveMonitor.stopMonitoring(!0,e.browserEvent)}),!0);this._globalMouseMoveMonitor.startMonitoring(e,t,((e,t)=>i(e,new RL(t,this._editorViewDomNode))),n,(e=>{this._keydownListener.dispose(),o(e)}))}stopMonitoring(){this._globalMouseMoveMonitor.stopMonitoring(!0)}}class VL{constructor(e){this._editor=e,this._instanceId=++VL._idPool,this._counter=0,this._rules=new Map,this._garbageCollectionScheduler=new lb((()=>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 n=this._counter++;i=new WL(t,`dyn-rule-${this._instanceId}-${n}`,MC(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())}}VL._idPool=0;class WL{constructor(e,t,i,n){this.key=e,this.className=t,this.properties=n,this._referenceCount=0,this._styleElement=RC(i),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?`var(${pS(e.id)})`:e;i+=`\n\t${zL(n)}: ${o};`}return i+="\n}",i}dispose(){this._styleElement.remove()}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}function zL(e){return e.replace(/(^[A-Z])/,(([e])=>e.toLowerCase())).replace(/([A-Z])/g,(([e])=>`-${e.toLowerCase()}`))}class HL extends Uo{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=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;ol)return null;if((t=Math.min(l,Math.max(0,t)))===(n=Math.min(l,Math.max(0,n)))&&i===o&&0===i&&!e.children[t].firstChild){const i=e.children[t].getClientRects();return this._createHorizontalRangesFromClientRects(i,s,r)}t!==n&&n>0&&0===o&&(n--,o=1073741824);let d=e.children[t].firstChild,c=e.children[n].firstChild;if(d&&c||(!d&&0===i&&t>0&&(d=e.children[t-1].firstChild,i=1073741824),!c&&0===o&&n>0&&(c=e.children[n-1].firstChild,o=1073741824)),!d||!c)return null;i=Math.min(d.textContent.length,Math.max(0,i)),o=Math.min(c.textContent.length,Math.max(0,o));const h=this._readClientRects(d,i,c,o,a);return this._createHorizontalRangesFromClientRects(h,s,r)}}const QL=!!Ts||!(Vo||o_||a_);let JL=!0;class eN{constructor(e,t){this._domNode=e,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1,this.endNode=t}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;const e=this._domNode.getBoundingClientRect();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}}class tN{constructor(e,t){this.themeType=t;const i=e.options,n=i.get(44);this.renderWhitespace=i.get(88),this.renderControlCharacters=i.get(83),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.useMonospaceOptimizations=n.isMonospace&&!i.get(29),this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=i.get(59),this.stopRenderingLineAfter=i.get(105),this.fontLigatures=i.get(45)}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 iN{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=p_(e)}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(e){this._isMaybeInvalid=!0,this._options=e}onSelectionChanged(){return(this._options.themeType===Xy.HIGH_CONTRAST||"selection"===this._options.renderWhitespace)&&(this._isMaybeInvalid=!0,!0)}renderLine(e,t,i,n){if(!1===this._isMaybeInvalid)return!1;this._isMaybeInvalid=!1;const o=i.getViewLineRenderingData(e),s=this._options,r=jb.filter(o.inlineDecorations,e,o.minColumn,o.maxColumn);let a=null;if(s.themeType===Xy.HIGH_CONTRAST||"selection"===this._options.renderWhitespace){const t=i.selections;for(const i of t){if(i.endLineNumbere)continue;const t=i.startLineNumber===e?i.startColumn:o.minColumn,n=i.endLineNumber===e?i.endColumn:o.maxColumn;t');const d=Qb(l,n);n.appendASCIIString("");let c=null;return JL&&QL&&o.isBasicASCII&&s.useMonospaceOptimizations&&0===d.containsForeignElements&&o.content.length<300&&l.lineTokens.getCount()<100&&(c=new nN(this._renderedViewLine?this._renderedViewLine.domNode:null,l,d.characterMapping)),c||(c=rN(this._renderedViewLine?this._renderedViewLine.domNode:null,l,d.characterMapping,d.containsRTL,d.containsForeignElements)),this._renderedViewLine=c,!0}layoutLine(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}getWidth(){return this._renderedViewLine?this._renderedViewLine.getWidth():0}getWidthIsFast(){return!this._renderedViewLine||this._renderedViewLine.getWidthIsFast()}needsMonospaceFontCheck(){return!!this._renderedViewLine&&this._renderedViewLine instanceof nN}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof nN?this._renderedViewLine.monospaceAssumptionsAreValid():JL}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof nN&&(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;let s=!1;-1!==o&&t>o+1&&i>o+1&&(s=!0),-1!==o&&t>o+1&&(t=o+1),-1!==o&&i>o+1&&(i=o+1);const r=this._renderedViewLine.getVisibleRangesForRange(e,t,i,n);return r&&r.length>0?new YL(s,r):null}getColumnOfNodeOffset(e,t,i){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t,i):1}}iN.CLASS_NAME="view-line";class nN{constructor(e,t,i){this.domNode=e,this.input=t,this._characterMapping=i,this._charWidth=t.spaceWidth}getWidth(){return Math.round(this._getCharPosition(this._characterMapping.length))}getWidthIsFast(){return!0}monospaceAssumptionsAreValid(){if(!this.domNode)return JL;const e=this.getWidth(),t=this.domNode.domNode.firstChild.offsetWidth;return Math.abs(e-t)>=2&&(JL=!1),JL}toSlowRenderedLine(){return rN(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(e,t,i,n){const o=this._getCharPosition(t),s=this._getCharPosition(i);return[new GL(o,s-o)]}_getCharPosition(e){const t=this._characterMapping.getAbsoluteOffset(e);return this._charWidth*t}getColumnOfNodeOffset(e,t,i){const n=t.textContent.length;let o=-1;for(;t;)t=t.previousSibling,o++;return this._characterMapping.getColumn(new Zb(o,i),n)}}class oN{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(){return this.domNode?(-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth),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 GL(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 GL(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();const t=this._getReadingTarget(e);return t.firstChild?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=XL.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,n.clientRectDeltaLeft,n.clientRectScale,n.endNode);return t&&0!==t.length?t[0].left:-1}if(i===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth();const o=this._characterMapping.getDomPosition(i),s=XL.readHorizontalRanges(this._getReadingTarget(e),o.partIndex,o.charIndex,o.partIndex,o.charIndex,n.clientRectDeltaLeft,n.clientRectScale,n.endNode);if(!s||0===s.length)return-1;const r=s[0].left;if(this.input.isBasicASCII){const e=this._characterMapping.getAbsoluteOffset(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 GL(0,this.getWidth())];const o=this._characterMapping.getDomPosition(t),s=this._characterMapping.getDomPosition(i);return XL.readHorizontalRanges(this._getReadingTarget(e),o.partIndex,o.charIndex,s.partIndex,s.charIndex,n.clientRectDeltaLeft,n.clientRectScale,n.endNode)}getColumnOfNodeOffset(e,t,i){const n=t.textContent.length;let o=-1;for(;t;)t=t.previousSibling,o++;return this._characterMapping.getColumn(new Zb(o,i),n)}}class sN extends oN{_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=t){return l-t=4&&3===e[0]&&7===e[3]}static isStrictChildOfViewLines(e){return e.length>4&&3===e[0]&&7===e[3]}static isChildOfScrollableElement(e){return e.length>=2&&3===e[0]&&5===e[1]}static isChildOfMinimap(e){return e.length>=2&&3===e[0]&&8===e[1]}static isChildOfContentWidgets(e){return e.length>=4&&3===e[0]&&1===e[3]}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&2===e[0]}static isChildOfOverlayWidgets(e){return e.length>=2&&3===e[0]&&4===e[1]}}class _N{constructor(e,t,i){this.viewModel=e.viewModel;const n=e.configuration.options;this.layoutInfo=n.get(131),this.viewDomNode=t.viewDomNode,this.lineHeight=n.get(59),this.stickyTabStops=n.get(104),this.typicalHalfwidthCharacterWidth=n.get(44).typicalHalfwidthCharacterWidth,this.lastRenderData=i,this._context=e,this._viewHelper=t}getZoneAtCoord(e){return _N.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 er(i.afterLineNumber+1,1)),i.afterLineNumber>0&&(r=new er(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,CN._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}}{constructor(e,t,i,n,o){super(e,t,i,n),this._ctx=e,o?(this.target=o,this.targetPath=UL.collect(o,e.viewDomNode)):(this.target=null,this.targetPath=new Uint8Array(0))}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}`}_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 fN.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};return o-=e.layoutInfo.glyphMarginLeft,o<=e.layoutInfo.glyphMarginWidth?t.fulfillMargin(2,n,i.range,s):(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,i){if(!fN.isChildOfViewLines(t.targetPath))return null;if(e.isInTopPadding(t.mouseVerticalOffset))return t.fulfillContentEmpty(new er(1,1),bN);if(e.isAfterLines(t.mouseVerticalOffset)||e.isInBottomPadding(t.mouseVerticalOffset)){const i=e.viewModel.getLineCount(),n=e.viewModel.getLineMaxColumn(i);return t.fulfillContentEmpty(new er(i,n),bN)}if(i){if(fN.isStrictChildOfViewLines(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(0===e.viewModel.getLineLength(i)){const n=e.getLineWidth(i),o=wN(t.mouseContentHorizontalOffset-n);return t.fulfillContentEmpty(new er(i,1),o)}const n=e.getLineWidth(i);if(t.mouseContentHorizontalOffset>=n){const o=wN(t.mouseContentHorizontalOffset-n),s=new er(i,e.viewModel.getLineMaxColumn(i));return t.fulfillContentEmpty(s,o)}}return t.fulfillUnknown()}const n=CN._doHitTest(e,t);return 1===n.type?CN.createMouseTargetFromHitTestPosition(e,t,n.spanNode,n.position,n.injectedText):this._createMouseTarget(e,t.withTarget(n.hitTarget),!0)}static _hitTestMinimap(e,t){if(fN.isChildOfMinimap(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new er(i,n))}return null}static _hitTestScrollbarSlider(e,t){if(fN.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 er(i,n))}}return null}static _hitTestScrollbar(e,t){if(fN.isChildOfScrollableElement(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new er(i,n))}return null}getMouseColumn(e){const t=this._context.configuration.options,i=t.get(131),n=this._context.viewLayout.getCurrentScrollLeft()+e.x-i.contentLeft;return CN._getMouseColumn(n,t.get(44).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,t){if(e<0)return 1;return Math.round(e/t)+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=wN(t.mouseContentHorizontalOffset-a);return t.fulfillContentEmpty(n,e)}const l=e.visibleRangeForPosition(s,r);if(!l)return t.fulfillUnknown(n);const d=l.left;if(t.mouseContentHorizontalOffset===d)return t.fulfillContentText(n,null,{mightBeForeignElement:!!o,injectedText:o});const c=[];if(c.push({offset:l.left,column:r}),r>1){const t=e.visibleRangeForPosition(s,r-1);t&&c.push({offset:t.left,column:r-1})}if(re.offset-t.offset));const h=t.pos.toClientCoordinates(),u=i.getBoundingClientRect(),g=u.left<=h.clientX&&h.clientX<=u.right;for(let p=1;p=t.editorPos.y+t.editorPos.height&&(o=t.editorPos.y+t.editorPos.height-1);const s=new EL(t.pos.x,o),r=this._actualDoHitTestWithCaretRangeFromPoint(e,s.toClientCoordinates());return 1===r.type?r:this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates())}static _actualDoHitTestWithCaretRangeFromPoint(e,t){const i=AC(e.viewDomNode);let n;if(n=i?void 0===i.caretRangeFromPoint?function(e,t,i){const n=document.createRange();let o=e.elementFromPoint(t,i);if(null!==o){for(;o&&o.firstChild&&o.firstChild.nodeType!==o.firstChild.TEXT_NODE&&o.lastChild&&o.lastChild.firstChild;)o=o.lastChild;const e=o.getBoundingClientRect(),i=window.getComputedStyle(o,null).getPropertyValue("font"),s=o.innerText;let r,a=e.left,l=0;if(t>e.left+e.width)l=s.length;else{const e=yN.getInstance();for(let n=0;nthis._createMouseTarget(e,t)),(e=>this._getMouseColumn(e)))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(131).height;const n=new PL(this.viewHelper.viewDomNode);this._register(n.onContextMenu(this.viewHelper.viewDomNode,(e=>this._onContextMenu(e,!0)))),this._register(n.onMouseMoveThrottled(this.viewHelper.viewDomNode,(e=>this._onMouseMove(e)),xN(this.mouseTargetFactory),SN.MOUSE_MOVE_MINIMUM_TIME)),this._register(n.onMouseUp(this.viewHelper.viewDomNode,(e=>this._onMouseUp(e)))),this._register(n.onMouseLeave(this.viewHelper.viewDomNode,(e=>this._onMouseLeave(e)))),this._register(n.onMouseDown(this.viewHelper.viewDomNode,(e=>this._onMouseDown(e))));this._register(nC(this.viewHelper.viewDomNode,zC.MOUSE_WHEEL,(e=>{if(this.viewController.emitMouseWheel(e),!this._context.configuration.options.get(68))return;const t=new Zw(e);if(zo?(e.metaKey||e.ctrlKey)&&!e.shiftKey&&!e.altKey:e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey){const e=v_.getZoomLevel(),i=t.deltaY>0?1:-1;v_.setZoomLevel(e+i),t.preventDefault(),t.stopPropagation()}}),{capture:!0,passive:!1})),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(131)){const e=this._context.configuration.options.get(131).height;this._height!==e&&(this._height=e,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}onScrollChanged(e){return this._mouseDownOperation.onScrollChanged(),!1}getTargetAtClientPoint(e,t){const i=new IL(e,t).toPageCoordinates(),n=AL(this.viewHelper.viewDomNode);if(i.yn.y+n.height||i.xn.x+n.width)return null;const o=OL(this.viewHelper.viewDomNode,n,i);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),n,i,o,null)}_createMouseTarget(e,t){let i=e.target;if(!this.viewHelper.viewDomNode.contains(i)){const t=AC(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){if(this._mouseDownOperation.isActive())return;e.timestamp{e.preventDefault(),this.viewHelper.focusTextArea()};if(l&&(i||o&&s))d(),this._mouseDownOperation.start(t.type,e);else if(n)e.preventDefault();else if(r){const i=t.detail;this.viewHelper.shouldSuppressMouseDownOnViewZone(i.viewZoneId)&&(d(),this._mouseDownOperation.start(t.type,e),e.preventDefault())}else a&&this.viewHelper.shouldSuppressMouseDownOnWidget(t.detail)&&(d(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:t})}}SN.MOUSE_MOVE_MINIMUM_TIME=100;class kN extends Uo{constructor(e,t,i,n,o){super(),this._context=e,this._viewController=t,this._viewHelper=i,this._createMouseTarget=n,this._getMouseColumn=o,this._mouseMoveMonitor=this._register(new BL(this._viewHelper.viewDomNode)),this._onScrollTimeout=this._register(new rb),this._mouseState=new DN,this._currentSelection=new ar(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,!0);t&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):this._dispatchMouse(t,!0))}start(e,t){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(3===e),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);const i=this._findMousePosition(t,!0);if(!i||!i.position)return;this._mouseState.trySetCount(t.detail,i.position),t.detail=this._mouseState.count;const n=this._context.configuration.options;if(!n.get(81)&&n.get(31)&&!n.get(18)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&6===i.type&&i.position&&this._currentSelection.containsPosition(i.position))return this._mouseState.isDragAndDrop=!0,this._isActive=!0,void this._mouseMoveMonitor.startMonitoring(t.target,t.buttons,xN(null),(e=>this._onMouseDownThenMove(e)),(e=>{const t=this._findMousePosition(this._lastMouseEvent,!0);e&&e instanceof KeyboardEvent?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(i,t.shiftKey),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(t.target,t.buttons,xN(null),(e=>this._onMouseDownThenMove(e)),(()=>this._stop())))}_stop(){this._isActive=!1,this._onScrollTimeout.cancel()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onScrollChanged(){this._isActive&&this._onScrollTimeout.setIfNotSet((()=>{if(!this._lastMouseEvent)return;const e=this._findMousePosition(this._lastMouseEvent,!1);e&&(this._mouseState.isDragAndDrop||this._dispatchMouse(e,!0))}),10)}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 t=n.getCurrentScrollTop()+e.relativePos.y,s=_N.getZoneAtCoord(this._context,t);if(s){const e=this._helpPositionJumpOverViewZone(s);if(e)return mN.createOutsideEditor(o,e)}const r=n.getLineNumberAtVerticalOffset(t);return mN.createOutsideEditor(o,new er(r,i.getLineMaxColumn(r)))}const s=n.getLineNumberAtVerticalOffset(n.getCurrentScrollTop()+e.relativePos.y);return e.posxt.x+t.width?mN.createOutsideEditor(o,new er(s,i.getLineMaxColumn(s))):null}_findMousePosition(e,t){const i=this._getPositionOutsideEditor(e);if(i)return i;const n=this._createMouseTarget(e,t);if(!n.position)return null;if(8===n.type||5===n.type){const e=this._helpPositionJumpOverViewZone(n.detail);if(e)return mN.createViewZone(n.type,n.element,n.mouseColumn,e,n.detail)}return n}_helpPositionJumpOverViewZone(e){const t=new er(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),i=e.positionBefore,n=e.positionAfter;return i&&n?i.isBefore(t)?i:n:null}_dispatchMouse(e,t){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,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 DN{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 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}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>DN.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 LN,NN;DN.CLEAR_MOUSE_DOWN_COUNT_TIME=400,function(e){e.text="text/plain",e.binary="application/octet-stream",e.unknown="application/unknown",e.markdown="text/markdown",e.latex="text/latex",e.uriList="text/uri-list"}(LN||(LN={}));class EN{constructor(e,t,i,n,o){this.value=e,this.selectionStart=t,this.selectionEnd=i,this.selectionStartPosition=n,this.selectionEndPosition=o}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(e){return new EN(e.getValue(),e.getSelectionStart(),e.getSelectionEnd(),null,null)}collapseSelection(){return new EN(this.value,this.value.length,this.value.length,null,null)}writeToTextArea(e,t,i){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.selectionStartPosition,t,-1)}if(e>=this.selectionEnd){const t=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(this.selectionEndPosition,t,1)}const t=this.value.substring(this.selectionStart,e);if(-1===t.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(this.selectionStartPosition,t,1);const i=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selectionEndPosition,i,-1)}_finishDeduceEditorPosition(e,t,i){let n=0,o=-1;for(;-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};const n=Math.min(lr(e.value,t.value),e.selectionStart,t.selectionStart),o=Math.min(dr(e.value,t.value),e.value.length-e.selectionEnd,t.value.length-t.selectionEnd);e.value.substring(n,e.value.length-o);const s=t.value.substring(n,t.value.length-o),r=e.selectionStart-n,a=e.selectionEnd-n;if(t.selectionStart-n===t.selectionEnd-n){return{text:s,replacePrevCharCnt:e.selectionStart-n,replaceNextCharCnt:0,positionDelta:0}}return{text:s,replacePrevCharCnt:a-r,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,t){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(e.value===t.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:t.selectionEnd-e.selectionEnd};const i=Math.min(lr(e.value,t.value),e.selectionEnd),n=Math.min(dr(e.value,t.value),e.value.length-e.selectionEnd),o=e.value.substring(i,e.value.length-n),s=t.value.substring(i,t.value.length-n);e.selectionStart;const r=e.selectionEnd-i;t.selectionStart;const a=t.selectionEnd-i;return{text:s,replacePrevCharCnt:r,replaceNextCharCnt:o.length-r,positionDelta:a-s.length}}}EN.EMPTY=new EN("",0,0,null,null);class IN{static _getPageOfLine(e,t){return Math.floor((e-1)/t)}static _getRangeForPage(e,t){const i=e*t;return new qo(i+1,1,i+t+1,1)}static fromEditorSelection(e,t,i,n,o){const s=IN._getPageOfLine(i.startLineNumber,n),r=IN._getRangeForPage(s,n),a=IN._getPageOfLine(i.endLineNumber,n),l=IN._getRangeForPage(a,n),d=r.intersectRanges(new qo(1,1,i.startLineNumber,i.startColumn));let c=t.getValueInRange(d,1);const h=t.getLineCount(),u=t.getLineMaxColumn(h),g=l.intersectRanges(new qo(i.endLineNumber,i.endColumn,h,u));let p,m=t.getValueInRange(g,1);if(s===a||s+1===a)p=t.getValueInRange(i,1);else{const e=r.intersectRanges(i),n=l.intersectRanges(i);p=t.getValueInRange(e,1)+String.fromCharCode(8230)+t.getValueInRange(n,1)}if(o){const e=500;c.length>e&&(c=c.substring(c.length-e,c.length)),m.length>e&&(m=m.substring(0,e)),p.length>2*e&&(p=p.substring(0,e)+String.fromCharCode(8230)+p.substring(p.length-e,p.length))}return new EN(c+p+m,c.length,c.length+p.length,new er(i.startLineNumber,i.startColumn),new er(i.endLineNumber,i.endColumn))}}!function(e){e.Tap="-monaco-textarea-synthetic-tap"}(NN||(NN={}));const TN={forceCopyWithSyntaxHighlighting:!1};class MN{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)}}MN.INSTANCE=new MN;class AN{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(e){const t={text:e=e||"",replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=e.length,t}}class ON extends Uo{constructor(e,t,i,n){super(),this._host=e,this._textArea=t,this._OS=i,this._browser=n,this._onFocus=this._register(new $o),this.onFocus=this._onFocus.event,this._onBlur=this._register(new $o),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new $o),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new $o),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new $o),this.onCut=this._onCut.event,this._onPaste=this._register(new $o),this.onPaste=this._onPaste.event,this._onType=this._register(new $o),this.onType=this._onType.event,this._onCompositionStart=this._register(new $o),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new $o),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new $o),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new $o),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncTriggerCut=this._register(new lb((()=>this._onCut.fire()),0)),this._asyncFocusGainWriteScreenReaderContent=this._register(new lb((()=>this.writeScreenReaderContent("asyncFocusGain")),0)),this._textAreaState=EN.EMPTY,this._selectionChangeListener=null,this.writeScreenReaderContent("ctor"),this._hasFocus=!1,this._currentComposition=null;let o=null;this._register(this._textArea.onKeyDown((e=>{const t=new jw(e);(109===t.keyCode||this._currentComposition&&1===t.keyCode)&&t.stopPropagation(),t.equals(9)&&t.preventDefault(),o=t,this._onKeyDown.fire(t)}))),this._register(this._textArea.onKeyUp((e=>{const t=new jw(e);this._onKeyUp.fire(t)}))),this._register(this._textArea.onCompositionStart((e=>{const t=new AN;if(this._currentComposition)this._currentComposition=t;else{if(this._currentComposition=t,2===this._OS&&o&&o.equals(109)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===e.data&&("ArrowRight"===o.code||"ArrowLeft"===o.code))return 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=>{const t=this._currentComposition;if(!t)return;if(this._browser.isAndroid){const t=EN.readFromTextArea(this._textArea),i=EN.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=EN.readFromTextArea(this._textArea),this._onType.fire(i),this._onCompositionUpdate.fire(e)}))),this._register(this._textArea.onCompositionEnd((e=>{const t=this._currentComposition;if(!t)return;if(this._currentComposition=null,this._browser.isAndroid){const e=EN.readFromTextArea(this._textArea),t=EN.deduceAndroidCompositionInput(this._textAreaState,e);return this._textAreaState=e,this._onType.fire(t),void this._onCompositionEnd.fire()}const i=t.handleCompositionUpdate(e.data);this._textAreaState=EN.readFromTextArea(this._textArea),this._onType.fire(i),this._onCompositionEnd.fire()}))),this._register(this._textArea.onInput((e=>{if(this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;const t=EN.readFromTextArea(this._textArea),i=EN.deduceInput(this._textAreaState,t,2===this._OS);0===i.replacePrevCharCnt&&1===i.text.length&&Go(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]=RN.getTextData(e.clipboardData);t&&(i=i||MN.INSTANCE.get(t),this._onPaste.fire({text:t,metadata:i}))}))),this._register(this._textArea.onFocus((()=>{const e=this._hasFocus;this._setHasFocus(!0),this._browser.isSafari&&!e&&this._hasFocus&&this._asyncFocusGainWriteScreenReaderContent.schedule()}))),this._register(this._textArea.onBlur((()=>{this._currentComposition&&(this._currentComposition=null,this.writeScreenReaderContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)}))),this._register(this._textArea.onSyntheticTap((()=>{this._browser.isAndroid&&this._currentComposition&&(this._currentComposition=null,this.writeScreenReaderContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())})))}_installSelectionChangeListener(){let e=0;return nC(document,"selectionchange",(t=>{if(!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.selectionStartPosition||!this._textAreaState.selectionEndPosition)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 l=this._textAreaState.deduceEditorPosition(r),d=this._host.deduceModelPosition(l[0],l[1],l[2]),c=this._textAreaState.deduceEditorPosition(a),h=this._host.deduceModelPosition(c[0],c[1],c[2]),u=new ar(d.lineNumber,d.column,h.lineNumber,h.column);this._onSelectionChangeRequest.fire(u)}))}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.writeScreenReaderContent("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}writeScreenReaderContent(e){this._currentComposition||this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent(this._textAreaState))}_ensureClipboardGetsEditorSelection(e){const t=this._host.getDataToCopy(),i={version:1,isFromEmptySelection:t.isFromEmptySelection,multicursorText:t.multicursorText,mode:t.mode};MN.INSTANCE.set(this._browser.isFirefox?t.text.replace(/\r\n/g,"\n"):t.text,i),e.preventDefault(),e.clipboardData&&RN.setTextData(e.clipboardData,t.text,t.html,i)}}class RN{static getTextData(e){const t=e.getData(LN.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){}return[t,i]}static setTextData(e,t,i,n){e.setData(LN.text,t),"string"==typeof i&&e.setData("text/html",i),e.setData("vscode-editor-data",JSON.stringify(n))}}class PN extends Uo{constructor(e){super(),this._actual=e,this.onKeyDown=this._register(dC(this._actual,"keydown")).event,this.onKeyUp=this._register(dC(this._actual,"keyup")).event,this.onCompositionStart=this._register(dC(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(dC(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(dC(this._actual,"compositionend")).event,this.onInput=this._register(dC(this._actual,"input")).event,this.onCut=this._register(dC(this._actual,"cut")).event,this.onCopy=this._register(dC(this._actual,"copy")).event,this.onPaste=this._register(dC(this._actual,"paste")).event,this.onFocus=this._register(dC(this._actual,"focus")).event,this.onBlur=this._register(dC(this._actual,"blur")).event,this._onSyntheticTap=this._register(new $o),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(nC(this._actual,NN.Tap,(()=>this._onSyntheticTap.fire())))}hasFocus(){const e=AC(this._actual);return e?e.activeElement===this._actual:!!tC(this._actual)&&document.activeElement===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 o=null;const s=AC(n);o=s?s.activeElement:document.activeElement;const r=o===n,a=n.selectionStart,l=n.selectionEnd;if(r&&a===t&&l===i)o_&&window.parent!==window&&n.focus();else{if(r)return this.setIgnoreSelectionChangeTime("setSelectionRange"),n.setSelectionRange(t,i),void(o_&&window.parent!==window&&n.focus());try{const e=function(e){let t=[];for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)t[i]=e.scrollTop,e=e.parentNode;return t}(n);this.setIgnoreSelectionChangeTime("setSelectionRange"),n.focus(),n.setSelectionRange(t,i),function(e,t){for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)e.scrollTop!==t[i]&&(e.scrollTop=t[i]),e=e.parentNode}(n,e)}catch(d){}}}}class FN extends SN{constructor(e,t,i){super(e,t,i),this._register(oS.addTarget(this.viewHelper.linesContentDomNode)),this._register(nC(this.viewHelper.linesContentDomNode,iS.Tap,(e=>this.onTap(e)))),this._register(nC(this.viewHelper.linesContentDomNode,iS.Change,(e=>this.onChange(e)))),this._register(nC(this.viewHelper.linesContentDomNode,iS.Contextmenu,(e=>this._onContextMenu(new RL(e,this.viewHelper.viewDomNode),!1)))),this._lastPointerType="mouse",this._register(nC(this.viewHelper.linesContentDomNode,"pointerdown",(e=>{const t=e.pointerType;this._lastPointerType="mouse"!==t?"touch"===t?"touch":"pen":"mouse"})));const n=new FL(this.viewHelper.viewDomNode);this._register(n.onPointerMoveThrottled(this.viewHelper.viewDomNode,(e=>this._onMouseMove(e)),xN(this.mouseTargetFactory),SN.MOUSE_MOVE_MINIMUM_TIME)),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=>this._onMouseDown(e))))}onTap(e){if(!e.initialTarget||!this.viewHelper.linesContentDomNode.contains(e.initialTarget))return;e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new RL(e,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.dispatchMouse({position:t.position,mouseColumn:t.position.column,startedOnLineNumbers:!1,mouseDownCount:e.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:6===t.type&&null!==t.detail.injectedText})}onChange(e){"touch"===this._lastPointerType&&this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}_onMouseDown(e){"touch"!==e.browserEvent.pointerType&&super._onMouseDown(e)}}class BN extends SN{constructor(e,t,i){super(e,t,i),this._register(oS.addTarget(this.viewHelper.linesContentDomNode)),this._register(nC(this.viewHelper.linesContentDomNode,iS.Tap,(e=>this.onTap(e)))),this._register(nC(this.viewHelper.linesContentDomNode,iS.Change,(e=>this.onChange(e)))),this._register(nC(this.viewHelper.linesContentDomNode,iS.Contextmenu,(e=>this._onContextMenu(new RL(e,this.viewHelper.viewDomNode),!1))))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new RL(e,this.viewHelper.viewDomNode),!1);if(t.position){const e=document.createEvent("CustomEvent");e.initEvent(NN.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(e),this.viewController.moveTo(t.position)}}onChange(e){this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}}class VN extends Uo{constructor(e,t,i){super(),Vs&&Rw?this.handler=this._register(new FN(e,t,i)):window.TouchEvent?this.handler=this._register(new BN(e,t,i)):this.handler=this._register(new SN(e,t,i))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}class WN extends HL{}const zN=_S("editor.lineHighlightBackground",{dark:null,light:null,hc:null},mf(0,"Background color for the highlight of line at the cursor position.")),HN=_S("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hc:"#f38518"},mf(0,"Background color for the border around the line at the cursor position.")),jN=_S("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hc:null},mf(0,"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),UN=_S("editor.rangeHighlightBorder",{dark:null,light:null,hc:xS},mf(0,"Background color of the border around highlighted ranges."),!0),$N=_S("editor.symbolHighlightBackground",{dark:Rk,light:Rk,hc:null},mf(0,"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),KN=_S("editor.symbolHighlightBorder",{dark:null,light:null,hc:xS},mf(0,"Background color of the border around highlighted symbols."),!0),qN=_S("editorCursor.foreground",{dark:"#AEAFAD",light:hS.black,hc:hS.white},mf(0,"Color of the editor cursor.")),GN=_S("editorCursor.background",null,mf(0,"The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),ZN=_S("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hc:"#e3e4e229"},mf(0,"Color of whitespace characters in the editor.")),YN=_S("editorIndentGuide.background",{dark:ZN,light:ZN,hc:ZN},mf(0,"Color of the editor indentation guides.")),XN=_S("editorIndentGuide.activeBackground",{dark:ZN,light:ZN,hc:ZN},mf(0,"Color of the active editor indentation guides.")),QN=_S("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hc:hS.white},mf(0,"Color of editor line numbers.")),JN=_S("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hc:xS},mf(0,"Color of editor active line number"),!1,mf(0,"Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")),eE=_S("editorLineNumber.activeForeground",{dark:JN,light:JN,hc:JN},mf(0,"Color of editor active line number")),tE=_S("editorRuler.foreground",{dark:"#5A5A5A",light:hS.lightgrey,hc:hS.white},mf(0,"Color of the editor rulers."));_S("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hc:"#999999"},mf(0,"Foreground color of editor CodeLens"));const iE=_S("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hc:"#0064001a"},mf(0,"Background color behind matching brackets")),nE=_S("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hc:yS},mf(0,"Color for matching brackets boxes")),oE=_S("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hc:"#7f7f7f4d"},mf(0,"Color of the overview ruler border.")),sE=_S("editorOverviewRuler.background",null,mf(0,"Background color of the editor overview ruler. Only used when the minimap is enabled and placed on the right side of the editor.")),rE=_S("editorGutter.background",{dark:pk,light:pk,hc:pk},mf(0,"Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),aE=_S("editorUnnecessaryCode.border",{dark:null,light:null,hc:hS.fromHex("#fff").transparent(.8)},mf(0,"Border color of unnecessary (unused) source code in the editor.")),lE=_S("editorUnnecessaryCode.opacity",{dark:hS.fromHex("#000a"),light:hS.fromHex("#0007"),hc:null},mf(0,"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.")),dE=_S("editorGhostText.border",{dark:null,light:null,hc:hS.fromHex("#fff").transparent(.8)},mf(0,"Border color of ghost text in the editor.")),cE=_S("editorGhostText.foreground",{dark:hS.fromHex("#ffffff56"),light:hS.fromHex("#0007"),hc:null},mf(0,"Foreground color of the ghost text in the editor.")),hE=_S("editorGhostText.background",{dark:null,light:null,hc:null},mf(0,"Background color of the ghost text in the editor.")),uE=new hS(new lS(0,122,204,.6)),gE=_S("editorOverviewRuler.rangeHighlightForeground",{dark:uE,light:uE,hc:uE},mf(0,"Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),pE=_S("editorOverviewRuler.errorForeground",{dark:new hS(new lS(255,18,18,.7)),light:new hS(new lS(255,18,18,.7)),hc:new hS(new lS(255,50,50,1))},mf(0,"Overview ruler marker color for errors.")),mE=_S("editorOverviewRuler.warningForeground",{dark:ak,light:ak,hc:lk},mf(0,"Overview ruler marker color for warnings.")),fE=_S("editorOverviewRuler.infoForeground",{dark:ck,light:ck,hc:hk},mf(0,"Overview ruler marker color for infos.")),_E=_S("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hc:"#FFD700"},mf(0,"Foreground color of brackets (1). Requires enabling bracket pair colorization.")),vE=_S("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hc:"#DA70D6"},mf(0,"Foreground color of brackets (2). Requires enabling bracket pair colorization.")),bE=_S("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hc:"#87CEFA"},mf(0,"Foreground color of brackets (3). Requires enabling bracket pair colorization.")),wE=_S("editorBracketHighlight.foreground4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},mf(0,"Foreground color of brackets (4). Requires enabling bracket pair colorization.")),CE=_S("editorBracketHighlight.foreground5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},mf(0,"Foreground color of brackets (5). Requires enabling bracket pair colorization.")),yE=_S("editorBracketHighlight.foreground6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},mf(0,"Foreground color of brackets (6). Requires enabling bracket pair colorization.")),xE=_S("editorBracketHighlight.unexpectedBracket.foreground",{dark:new hS(new lS(255,18,18,.8)),light:new hS(new lS(255,18,18,.8)),hc:new hS(new lS(255,50,50,1))},mf(0,"Foreground color of unexpected brackets.")),SE=_S("editorBracketPairGuide.background1",{dark:"#00000000",light:"#00000000",hc:"#00000000"},mf(0,"Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),kE=_S("editorBracketPairGuide.background2",{dark:"#00000000",light:"#00000000",hc:"#00000000"},mf(0,"Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),DE=_S("editorBracketPairGuide.background3",{dark:"#00000000",light:"#00000000",hc:"#00000000"},mf(0,"Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),LE=_S("editorBracketPairGuide.background4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},mf(0,"Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),NE=_S("editorBracketPairGuide.background5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},mf(0,"Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),EE=_S("editorBracketPairGuide.background6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},mf(0,"Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),IE=_S("editorBracketPairGuide.activeBackground1",{dark:"#00000000",light:"#00000000",hc:"#00000000"},mf(0,"Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),TE=_S("editorBracketPairGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hc:"#00000000"},mf(0,"Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),ME=_S("editorBracketPairGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hc:"#00000000"},mf(0,"Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),AE=_S("editorBracketPairGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},mf(0,"Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),OE=_S("editorBracketPairGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},mf(0,"Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),RE=_S("editorBracketPairGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},mf(0,"Background color of active bracket pair guides (6). Requires enabling bracket pair guides."));_S("editorUnicodeHighlight.border",{dark:"#BD9B03",light:"#CEA33D",hc:"#ff0000"},mf(0,"Border color used to highlight unicode characters.")),sx(((e,t)=>{const i=e.getColor(pk);i&&t.addRule(`.monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: ${i}; }`);const n=e.getColor(mk);n&&t.addRule(`.monaco-editor, .monaco-editor .inputarea.ime-input { color: ${n}; }`);const o=e.getColor(rE);o&&t.addRule(`.monaco-editor .margin { background-color: ${o}; }`);const s=e.getColor(jN);s&&t.addRule(`.monaco-editor .rangeHighlight { background-color: ${s}; }`);const r=e.getColor(UN);r&&t.addRule(`.monaco-editor .rangeHighlight { border: 1px ${"hc"===e.type?"dotted":"solid"} ${r}; }`);const a=e.getColor($N);a&&t.addRule(`.monaco-editor .symbolHighlight { background-color: ${a}; }`);const l=e.getColor(KN);l&&t.addRule(`.monaco-editor .symbolHighlight { border: 1px ${"hc"===e.type?"dotted":"solid"} ${l}; }`);const d=e.getColor(ZN);d&&(t.addRule(`.monaco-editor .mtkw { color: ${d} !important; }`),t.addRule(`.monaco-editor .mtkz { color: ${d} !important; }`))}));class PE extends WN{constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new er(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const e=this._context.configuration.options;this._lineHeight=e.get(59);const t=e.get(60);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(84);const i=e.get(131);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}_getLineRenderLineNumber(e){const t=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new er(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)}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===i||i%10==0?String(i):"":String(i)}prepareRender(e){if(0===this._renderLineNumbers)return void(this._renderResult=null);const t=Vo?this._lineHeight%2==0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,o='
',s=this._context.viewModel.getLineCount(),r=[];for(let a=i;a<=n;a++){const e=a-i;if(!this._renderFinalNewline&&a===s&&0===this._context.viewModel.getLineLength(a)){r[e]="";continue}const n=this._getLineRenderLineNumber(a);n?a===this._activeLineNumber?r[e]='
'+n+"
":r[e]=o+n+"
":r[e]=""}this._renderResult=r}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}PE.CLASS_NAME="line-numbers",sx(((e,t)=>{const i=e.getColor(QN);i&&t.addRule(`.monaco-editor .line-numbers { color: ${i}; }`);const n=e.getColor(eE);n&&t.addRule(`.monaco-editor .line-numbers.active-line-number { color: ${n}; }`)}));class FE extends jL{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(131);this._canUseLayerHinting=!t.get(28),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._domNode=p_(document.createElement("div")),this._domNode.setClassName(FE.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=p_(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(FE.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(131);return this._canUseLayerHinting=!t.get(28),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)}}FE.CLASS_NAME="glyph-margin",FE.OUTER_CLASS_NAME="margin";class BE{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 er(this.modelLineNumber,this.distanceToModelLineStart+1),i=new er(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 VE=o_;class WE extends jL{constructor(e,t,i){super(e),this._primaryCursorPosition=new er(1,1),this._primaryCursorVisibleRange=null,this._viewController=t,this._visibleRangeProvider=i,this._scrollLeft=0,this._scrollTop=0;const n=this._context.configuration.options,o=n.get(131);this._setAccessibilityOptions(n),this._contentLeft=o.contentLeft,this._contentWidth=o.contentWidth,this._contentHeight=o.height,this._fontInfo=n.get(44),this._lineHeight=n.get(59),this._emptySelectionClipboard=n.get(32),this._copyWithSyntaxHighlighting=n.get(21),this._visibleTextArea=null,this._selections=[new ar(1,1,1,1)],this._modelSelections=[new ar(1,1,1,1)],this._lastRenderPosition=null,this.textArea=p_(document.createElement("textarea")),UL.write(this.textArea,6),this.textArea.setClassName("inputarea monaco-mouse-cursor-text"),this.textArea.setAttribute("wrap","off"),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(n)),this.textArea.setAttribute("tabindex",String(n.get(112))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",mf(0,"editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),n.get(30)&&n.get(81)&&this.textArea.setAttribute("readonly","true"),this.textAreaCover=p_(document.createElement("div")),this.textAreaCover.setPosition("absolute");const s={getLineCount:()=>this._context.viewModel.getLineCount(),getLineMaxColumn:e=>this._context.viewModel.getLineMaxColumn(e),getValueInRange:(e,t)=>this._context.viewModel.getValueInRange(e,t)},r={getDataToCopy:()=>{const e=this._context.viewModel.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,Rs),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(TN.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:e=>{if(1===this._accessibilitySupport){if(zo){const e=this._selections[0];if(e.isEmpty()){const t=e.getStartPosition();let i=this._getWordBeforePosition(t);if(0===i.length&&(i=this._getCharacterBeforePosition(t)),i.length>0)return new EN(i,i.length,i.length,t,t)}}return EN.EMPTY}if(c_){const e=this._selections[0];if(e.isEmpty()){const t=e.getStartPosition(),[i,n]=this._getAndroidWordAtPosition(t);if(i.length>0)return new EN(i,n,n,t,t)}return EN.EMPTY}return IN.fromEditorSelection(e,s,this._selections[0],this._accessibilityPageSize,0===this._accessibilitySupport)},deduceModelPosition:(e,t,i)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(e,t,i)},a=this._register(new PN(this.textArea.domNode));this._textAreaInput=this._register(new ON(r,a,Xs,u_)),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=void 0!==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?this._viewController.compositionType(e.text,e.replacePrevCharCnt,e.replaceNextCharCnt,e.positionDelta):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),d=a.column-1-l,c=function(e,t){if(0===e.length)return 0;const i=document.createElement("div");i.style.position="absolute",i.style.top="-50000px",i.style.width="50000px";const n=document.createElement("span");m_(n,t),n.style.whiteSpace="pre",n.append(e),i.appendChild(n),document.body.appendChild(i);const o=n.offsetWidth;return document.body.removeChild(i),o}(o.substring(0,o.length-l),this._fontInfo);return{distanceToModelLineStart:d,widthOfHiddenTextBefore:c}})(),{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);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(a.lineNumber)-a.column-l}})();this._context.viewModel.revealRange("keyboard",!0,qo.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new BE(this._context,i.startLineNumber,n,o,s),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName("inputarea monaco-mouse-cursor-text 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._render(),this.textArea.setClassName("inputarea monaco-mouse-cursor-text"),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)})))}dispose(){super.dispose()}_getAndroidWordAtPosition(e){const t=this._context.viewModel.getLineContent(e.lineNumber),i=cr('`~!@#$%^&*()-=+[{]}\\|;:",.<>/?');let n=!0,o=e.column,s=!0,r=e.column,a=0;for(;a<50&&(n||s);){if(n&&o<=1&&(n=!1),n){const e=t.charCodeAt(o-2);0!==i.get(e)?n=!1:o--}if(s&&r>t.length&&(s=!1),s){const e=t.charCodeAt(r-1);0!==i.get(e)?s=!1:r++}a++}return[t.substring(o-1,r-1),e.column-o]}_getWordBeforePosition(e){const t=this._context.viewModel.getLineContent(e.lineNumber),i=cr(this._context.configuration.options.get(117));let n=e.column,o=0;for(;n>1;){const s=t.charCodeAt(n-2);if(0!==i.get(s)||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).charAt(e.column-2);if(!Go(t.charCodeAt(0)))return t}return""}_getAriaLabel(e){return 1===e.get(2)?mf(0,"The editor is not accessible at this time. Press {0} for options.",Vo?"Shift+Alt+F1":"Alt+F1"):e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const t=e.get(3);2===this._accessibilitySupport&&t===Xf.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=t}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(131);return this._setAccessibilityOptions(t),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._contentHeight=i.height,this._fontInfo=t.get(44),this._lineHeight=t.get(59),this._emptySelectionClipboard=t.get(32),this._copyWithSyntaxHighlighting=t.get(21),this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),this.textArea.setAttribute("tabindex",String(t.get(112))),(e.hasChanged(30)||e.hasChanged(81))&&(t.get(30)&&t.get(81)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")),e.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("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)}prepareRender(e){this._primaryCursorPosition=new er(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition),this._visibleTextArea&&this._visibleTextArea.prepareRender(e)}render(e){this._textAreaInput.writeScreenReaderContent("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 d=this._context.viewModel.getViewLineData(i.lineNumber),c=d.tokens.findTokenIndexAtOffset(i.column-1),h=c===d.tokens.findTokenIndexAtOffset(n.column-1),u=this._visibleTextArea.definePresentation(h?d.tokens.getPresentation(c):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:(Ns.getColorMap()||[])[u.foreground],italic:u.italic,bold:u.bold,underline:u.underline,strikethrough:u.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(zo){this._doRender({lastRenderPosition:this._primaryCursorPosition,top:t,left:e,width:VE?0:1,height:this._lineHeight,useCover:!1}),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;const i=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:e,width:VE?0:1,height:VE?0:1,useCover:!1})}_newlinecount(e){let t=0,i=-1;for(;;){if(i=e.indexOf("\n",i+1),-1===i)break;t++}return t}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:VE?0:1,height:VE?0:1,useCover:!0})}_doRender(e){this._lastRenderPosition=e.lastRenderPosition;const t=this.textArea,i=this.textAreaCover;m_(t,this._fontInfo),t.setTop(e.top),t.setLeft(e.left),t.setWidth(e.width),t.setHeight(e.height),t.setColor(e.color?hS.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(50)?i.setClassName("monaco-editor-background textAreaCover "+FE.OUTER_CLASS_NAME):0!==n.get(60).renderType?i.setClassName("monaco-editor-background textAreaCover "+PE.CLASS_NAME):i.setClassName("monaco-editor-background textAreaCover")}}function zE(e,t,i){let n=xs(e);return-1===n&&(n=e.length),function(e,t,i){let n=0;for(let s=0;s!0,jE=()=>!1,UE=e=>" "===e||"\t"===e;class $E{constructor(e,t,i,n){this.languageConfigurationService=n,this._cursorMoveConfigurationBrand=void 0,this._languageId=e;const o=i.options,s=o.get(131);this.readOnly=o.get(81),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.stickyTabStops=o.get(104),this.lineHeight=o.get(59),this.pageSize=Math.max(1,Math.floor(s.height/this.lineHeight)-2),this.useTabStops=o.get(116),this.wordSeparators=o.get(117),this.emptySelectionClipboard=o.get(32),this.copyWithSyntaxHighlighting=o.get(21),this.multiCursorMergeOverlapping=o.get(69),this.multiCursorPaste=o.get(71),this.autoClosingBrackets=o.get(5),this.autoClosingQuotes=o.get(8),this.autoClosingDelete=o.get(6),this.autoClosingOvertype=o.get(7),this.autoSurround=o.get(11),this.autoIndent=o.get(9),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(e,this.autoClosingQuotes),bracket:this._getShouldAutoClose(e,this.autoClosingBrackets)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(e).getAutoClosingPairs();const r=this.languageConfigurationService.getLanguageConfiguration(e).getSurroundingPairs();if(r)for(const a of r)this.surroundingPairs[a.open]=a.close}static shouldRecreate(e){return e.hasChanged(131)||e.hasChanged(117)||e.hasChanged(32)||e.hasChanged(69)||e.hasChanged(71)||e.hasChanged(5)||e.hasChanged(8)||e.hasChanged(6)||e.hasChanged(7)||e.hasChanged(11)||e.hasChanged(116)||e.hasChanged(59)||e.hasChanged(81)}get electricChars(){var e;if(!this._electricChars){this._electricChars={};const t=null===(e=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter)||void 0===e?void 0:e.getElectricCharacters();if(t)for(const e of t)this._electricChars[e]=!0}return this._electricChars}onElectricCharacter(e,t,i){const n=F_(t,i-1),o=this.languageConfigurationService.getLanguageConfiguration(n.languageId).electricCharacter;return o?o.onElectricCharacter(e,n,i-n.firstCharOffset):null}normalizeIndentation(e){return zE(e,this.indentSize,this.insertSpaces)}_getShouldAutoClose(e,t){switch(t){case"beforeWhitespace":return UE;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(e);case"always":return HE;case"never":return jE}}_getLanguageDefinedShouldAutoClose(e){const t=this.languageConfigurationService.getLanguageConfiguration(e).getAutoCloseBeforeSet();return e=>-1!==t.indexOf(e)}visibleColumnFromColumn(e,t){return dN.visibleColumnFromColumn(e.getLineContent(t.lineNumber),t.column,this.tabSize)}columnFromVisibleColumn(e,t,i){const n=dN.columnFromVisibleColumn(e.getLineContent(t),i,this.tabSize),o=e.getLineMinColumn(t);if(ns?s:n}}class KE{constructor(e,t){this._cursorStateBrand=void 0,this.modelState=e,this.viewState=t}static fromModelState(e){return new qE(e)}static fromViewState(e){return new GE(e)}static fromModelSelection(e){const t=ar.liftSelection(e),i=new ZE(qo.fromPositions(t.getSelectionStart()),0,t.getPosition(),0);return KE.fromModelState(i)}static fromModelSelections(e){const t=[];for(let i=0,n=e.length;io,l=n>s,d=ns)continue;if(pn)continue;if(g0&&n--,QE.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 er(a,i));n=Math.max(n,o)}let r=i.toViewVisualColumn;return re.getLineMinColumn(t.lineNumber))return t.delta(void 0,-hr(e.getLineContent(t.lineNumber),t.column-1));if(t.lineNumber>1){const i=t.lineNumber-1;return new er(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),s=cN.atomicPosition(o,t.column-1,i,0);if(-1!==s&&s+1>=n)return new er(t.lineNumber,s+1)}return this.leftPosition(e,t)}static left(e,t,i){const n=e.stickyTabStops?sI.leftPositionAtomicSoftTabs(t,i,e.tabSize):sI.leftPosition(t,i);return new oI(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(sI.clipPositionColumn(n,t),0),l=sI.left(e,t,a);s=l.lineNumber,r=l.column}return i.move(n,s,r,0)}static clipPositionColumn(e,t){return new er(e.lineNumber,sI.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 id?(i=d,n=r?t.getLineMaxColumn(i):Math.min(t.getLineMaxColumn(i),n)):n=e.columnFromVisibleColumn(t,i,l),o=u?0:l-dN.visibleColumnFromColumn(t.getLineContent(i),n,e.tabSize),void 0!==a){const e=new er(i,n),s=t.normalizePosition(e,a);o+=n-s.column,i=s.lineNumber,n=s.column}return new oI(i,n,o)}static down(e,t,i,n,o,s,r){return this.vertical(e,t,i,n,o,i+s,r,1)}static moveDown(e,t,i,n,o){let s,r;i.hasSelection()&&!n?(s=i.selection.endLineNumber,r=i.selection.endColumn):(s=i.position.lineNumber,r=i.position.column);const a=sI.down(e,t,s,r,i.leftoverVisibleColumns,o,!0);return i.move(n,a.lineNumber,a.column,a.leftoverVisibleColumns)}static translateDown(e,t,i){const n=i.selection,o=sI.down(e,t,n.selectionStartLineNumber,n.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),s=sI.down(e,t,n.positionLineNumber,n.positionColumn,i.leftoverVisibleColumns,1,!1);return new ZE(new qo(o.lineNumber,o.column,o.lineNumber,o.column),o.leftoverVisibleColumns,new er(s.lineNumber,s.column),s.leftoverVisibleColumns)}static up(e,t,i,n,o,s,r){return this.vertical(e,t,i,n,o,i-s,r,0)}static moveUp(e,t,i,n,o){let s,r;i.hasSelection()&&!n?(s=i.selection.startLineNumber,r=i.selection.startColumn):(s=i.position.lineNumber,r=i.position.column);const a=sI.up(e,t,s,r,i.leftoverVisibleColumns,o,!0);return i.move(n,a.lineNumber,a.column,a.leftoverVisibleColumns)}static translateUp(e,t,i){const n=i.selection,o=sI.up(e,t,n.selectionStartLineNumber,n.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),s=sI.up(e,t,n.positionLineNumber,n.positionColumn,i.leftoverVisibleColumns,1,!1);return new ZE(new qo(o.lineNumber,o.column,o.lineNumber,o.column),o.leftoverVisibleColumns,new er(s.lineNumber,s.column),s.leftoverVisibleColumns)}static _isBlankLine(e,t){return 0===e.getLineFirstNonWhitespaceColumn(t)}static moveToPrevBlankLine(e,t,i,n){let o=i.position.lineNumber;for(;o>1&&this._isBlankLine(t,o);)o--;for(;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;for(;s=c.length+1)return!1;const h=c.charAt(d.column-2),u=n.get(h);if(!u)return!1;if(XE(h)){if("never"===i)return!1}else if("never"===t)return!1;const g=c.charAt(d.column-1);let p=!1;for(const e of u)e.open===h&&e.close===g&&(p=!0);if(!p)return!1;if("auto"===e){let e=!1;for(let t=0,i=r.length;t1){const e=t.getLineContent(n.lineNumber),o=xs(e),s=-1===o?e.length+1:o+1;if(n.column<=s){const e=i.visibleColumnFromColumn(t,n),o=dN.prevIndentTabStop(e,i.indentSize),s=i.columnFromVisibleColumn(t,n.lineNumber,o);return new qo(n.lineNumber,s,n.lineNumber,n.column)}}return qo.fromPositions(rI.getPositionAfterDeleteLeft(n,t),n)}static getPositionAfterDeleteLeft(e,t){if(e.column>1){const i=gr(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 er(i,t.getLineMaxColumn(i))}return e}static cut(e,t,i){const n=[];let o=null;i.sort(((e,t)=>er.compare(e.getStartPosition(),t.getEndPosition())));for(let s=0,r=i.length;s1&&(null==o?void 0:o.endLineNumber)!==e.lineNumber?(i=e.lineNumber-1,a=t.getLineMaxColumn(e.lineNumber-1),l=e.lineNumber,d=t.getLineMaxColumn(e.lineNumber)):(i=e.lineNumber,a=1,l=e.lineNumber,d=t.getLineMaxColumn(e.lineNumber));const c=new qo(i,a,l,d);o=c,c.isEmpty()?n[s]=null:n[s]=new JE(c,"")}else n[s]=null;else n[s]=new JE(r,"")}return new YE(0,n,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}class aI{static _createWord(e,t,i,n,o){return{start:n,end:o,wordType:t,nextCharClass:i}}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;for(let o=i.column-2;o>=0;o--){const i=e.charCodeAt(o),s=t.get(i);if(0===s){if(2===n)return this._createWord(e,n,s,o+1,this._findEndOfWord(e,t,n,o+1));n=1}else if(2===s){if(1===n)return this._createWord(e,n,s,o+1,this._findEndOfWord(e,t,n,o+1));n=2}else if(1===s&&0!==n)return this._createWord(e,n,s,o+1,this._findEndOfWord(e,t,n,o+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=e.length;for(let s=n;s=0;o--){const n=e.charCodeAt(o),s=t.get(n);if(1===s)return o+1;if(1===i&&2===s)return o+1;if(2===i&&0===s)return o+1}return 0}static moveWordLeft(e,t,i,n){let o=i.lineNumber,s=i.column;1===s&&o>1&&(o-=1,s=t.getLineMaxColumn(o));let r=aI._findPreviousWordOnLine(e,t,new er(o,s));if(0===n)return new er(o,r?r.start+1:1);if(1===n)return r&&2===r.wordType&&r.end-r.start==1&&0===r.nextCharClass&&(r=aI._findPreviousWordOnLine(e,t,new er(o,r.start+1))),new er(o,r?r.start+1:1);if(3===n){for(;r&&2===r.wordType;)r=aI._findPreviousWordOnLine(e,t,new er(o,r.start+1));return new er(o,r?r.start+1:1)}return r&&s<=r.end+1&&(r=aI._findPreviousWordOnLine(e,t,new er(o,r.start+1))),new er(o,r?r.end+1:1)}static _moveWordPartLeft(e,t){const i=t.lineNumber,n=e.getLineMaxColumn(i);if(1===t.column)return i>1?new er(i-1,e.getLineMaxColumn(i-1)):t;const o=e.getLineContent(i);for(let s=t.column-1;s>1;s--){const e=o.charCodeAt(s-2),t=o.charCodeAt(s-1);if(95===e&&95!==t)return new er(i,s);if(pr(e)&&mr(t))return new er(i,s);if(mr(e)&&mr(t)&&s+1=a.start+1&&(a=aI._findNextWordOnLine(e,t,new er(o,a.end+1))),s=a?a.start+1:t.getLineMaxColumn(o);return new er(o,s)}static _moveWordPartRight(e,t){const i=t.lineNumber,n=e.getLineMaxColumn(i);if(t.column===n)return i1?l=1:(a--,l=n.getLineMaxColumn(a)):(d&&l<=d.end+1&&(d=aI._findPreviousWordOnLine(i,n,new er(a,d.start+1))),d?l=d.end+1:l>1?l=1:(a--,l=n.getLineMaxColumn(a))),new qo(a,l,r.lineNumber,r.column)}static deleteInsideWord(e,t,i){if(!i.isEmpty())return i;const n=new er(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;for(;o>0&&this._charAtIsWhitespace(i,o-1);)o--;for(;s+11?new qo(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 qo(i.lineNumber,e,i.lineNumber,t)),a=e=>{let t=e.start+1,i=e.end+1,s=!1;for(;i-11&&this._charAtIsWhitespace(n,t-2);)t--;return r(t,i)},l=aI._findPreviousWordOnLine(e,t,i);if(l&&s(l))return a(l);const d=aI._findNextWordOnLine(e,t,i);return d&&s(d)?a(d):l&&d?r(l.end+1,d.start+1):l?r(l.start+1,l.end+1):d?r(d.start+1,d.end+1):r(1,o+1)}static _deleteWordPartLeft(e,t){if(!t.isEmpty())return t;const i=t.getPosition(),n=aI._moveWordPartLeft(e,i);return new qo(i.lineNumber,i.column,n.lineNumber,n.column)}static _findFirstNonWhitespaceChar(e,t){const i=e.length;for(let n=t;n=h.start+1&&(h=aI._findNextWordOnLine(i,n,new er(a,h.end+1))),h?l=h.start+1:lBoolean(e)))}class cI{static addCursorDown(e,t,i){const n=[];let o=0;for(let s=0,r=t.length;st&&(i=t,n=e.model.getLineMaxColumn(i)),KE.fromModelState(new ZE(new qo(s.lineNumber,1,i,n),0,new er(i,n),0))}const a=t.modelState.selectionStart.getStartPosition().lineNumber;if(s.lineNumbera){const i=e.getLineCount();let n=r.lineNumber+1,o=1;return n>i&&(n=i,o=e.getLineMaxColumn(n)),KE.fromViewState(t.viewState.move(t.modelState.hasSelection(),n,o,0))}{const e=t.modelState.selectionStart.getEndPosition();return KE.fromModelState(t.modelState.move(t.modelState.hasSelection(),e.lineNumber,e.column,0))}}static word(e,t,i,n){const o=e.model.validatePosition(n);return KE.fromModelState(aI.word(e.cursorConfig,e.model,t.modelState,i,o))}static cancelSelection(e,t){if(!t.modelState.hasSelection())return new KE(t.modelState,t.viewState);const i=t.viewState.position.lineNumber,n=t.viewState.position.column;return KE.fromViewState(new ZE(new qo(i,n,i,n),0,new er(i,n),0))}static moveTo(e,t,i,n,o){const s=e.model.validatePosition(n),r=o?e.coordinatesConverter.validateViewPosition(new er(o.lineNumber,o.column),s):e.coordinatesConverter.convertModelPositionToViewPosition(s);return KE.fromViewState(t.viewState.move(i,r.lineNumber,r.column,0))}static simpleMove(e,t,i,n,o,s){switch(i){case 0:return 4===s?this._moveHalfLineLeft(e,t,n):this._moveLeft(e,t,n,o);case 1:return 4===s?this._moveHalfLineRight(e,t,n):this._moveRight(e,t,n,o);case 2:return 2===s?this._moveUpByViewLines(e,t,n,o):this._moveUpByModelLines(e,t,n,o);case 3:return 2===s?this._moveDownByViewLines(e,t,n,o):this._moveDownByModelLines(e,t,n,o);case 4:return 2===s?t.map((t=>KE.fromViewState(sI.moveToPrevBlankLine(e.cursorConfig,e,t.viewState,n)))):t.map((t=>KE.fromModelState(sI.moveToPrevBlankLine(e.cursorConfig,e.model,t.modelState,n))));case 5:return 2===s?t.map((t=>KE.fromViewState(sI.moveToNextBlankLine(e.cursorConfig,e,t.viewState,n)))):t.map((t=>KE.fromModelState(sI.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:oKE.fromViewState(sI.moveLeft(e.cursorConfig,e,t.viewState,i,n))))}static _moveHalfLineLeft(e,t,i){const n=[];for(let o=0,s=t.length;oKE.fromViewState(sI.moveRight(e.cursorConfig,e,t.viewState,i,n))))}static _moveHalfLineRight(e,t,i){const n=[];for(let o=0,s=t.length;o1){if(dN.visibleColumnFromColumn(n,u+1,o)%s!=0&&e.isCheapToTokenize(c-1)){const t=Wv.getEnterAction(this._opts.autoIndent,e,new qo(c-1,e.getLineMaxColumn(c-1),c-1,e.getLineMaxColumn(c-1)));if(t){if(d=l,t.appendText)for(let e=0,i=t.appendText.length;e1){let n;for(n=i-1;n>=1;n--){const e=t.getLineContent(n);if(Ss(e)>=0)break}if(n<1)return null;const s=t.getLineMaxColumn(n),r=Wv.getEnterAction(e.autoIndent,t,new qo(n,s,n,s));r&&(o=r.indentation+r.appendText)}return n&&(n===A_.Indent&&(o=fI.shiftIndent(e,o)),n===A_.Outdent&&(o=fI.unshiftIndent(e,o)),o=e.normalizeIndentation(o)),o||null}static _replaceJumpToNextIndent(e,t,i,n){let o="";const s=i.getStartPosition();if(e.insertSpaces){const i=e.visibleColumnFromColumn(t,s),n=e.indentSize,r=n-i%n;for(let e=0;ethis._compositionType(i,e,o,s,r,a)));return new YE(4,l,{shouldPushStackElementBefore:bI(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,i,n,o,s){if(!t.isEmpty())return null;const r=t.getPosition(),a=Math.max(1,r.column-n),l=Math.min(e.getLineMaxColumn(r.lineNumber),r.column+o),d=new qo(r.lineNumber,a,r.lineNumber,l);return e.getValueInRange(d)===i&&0===s?null:new iI(d,i,0,s)}static _typeCommand(e,t,i){return i?new tI(e,t,!0):new JE(e,t,!0)}static _enter(e,t,i,n){if(0===e.autoIndent)return fI._typeCommand(n,"\n",i);if(!t.isCheapToTokenize(n.getStartPosition().lineNumber)||1===e.autoIndent){const o=t.getLineContent(n.startLineNumber),s=ts(o).substring(0,n.startColumn-1);return fI._typeCommand(n,"\n"+e.normalizeIndentation(s),i)}const o=Wv.getEnterAction(e.autoIndent,t,n);if(o){if(o.indentAction===A_.None)return fI._typeCommand(n,"\n"+e.normalizeIndentation(o.indentation+o.appendText),i);if(o.indentAction===A_.Indent)return fI._typeCommand(n,"\n"+e.normalizeIndentation(o.indentation+o.appendText),i);if(o.indentAction===A_.IndentOutdent){const t=e.normalizeIndentation(o.indentation),s=e.normalizeIndentation(o.indentation+o.appendText),r="\n"+s+"\n"+t;return i?new tI(n,r,!0):new iI(n,r,-1,s.length-t.length,!0)}if(o.indentAction===A_.Outdent){const t=fI.unshiftIndent(e,o.indentation);return fI._typeCommand(n,"\n"+e.normalizeIndentation(t+o.appendText),i)}}const s=t.getLineContent(n.startLineNumber),r=ts(s).substring(0,n.startColumn-1);if(e.autoIndent>=4){const o=Wv.getIndentForEnter(e.autoIndent,t,n,{unshiftIndent:t=>fI.unshiftIndent(e,t),shiftIndent:t=>fI.shiftIndent(e,t),normalizeIndentation:t=>e.normalizeIndentation(t)});if(o){let s=e.visibleColumnFromColumn(t,n.getEndPosition());const r=n.endColumn,a=t.getLineContent(n.endLineNumber),l=xs(a);if(n=l>=0?n.setEndPosition(n.endLineNumber,Math.max(n.endColumn,l+1)):n.setEndPosition(n.endLineNumber,t.getLineMaxColumn(n.endLineNumber)),i)return new tI(n,"\n"+e.normalizeIndentation(o.afterEnter),!0);{let t=0;return r<=l+1&&(e.insertSpaces||(s=Math.ceil(s/e.indentSize)),t=Math.min(s+1-e.normalizeIndentation(o.afterEnter).length-1,0)),new iI(n,"\n"+e.normalizeIndentation(o.afterEnter),0,t,!0)}}}return fI._typeCommand(n,"\n"+e.normalizeIndentation(r),i)}static _isAutoIndentType(e,t,i){if(e.autoIndent<4)return!1;for(let n=0,o=i.length;nfI.shiftIndent(e,t),unshiftIndent:t=>fI.unshiftIndent(e,t)});if(null===s)return null;if(s!==e.normalizeIndentation(o)){const o=t.getLineFirstNonWhitespaceColumn(i.startLineNumber);return 0===o?fI._typeCommand(new qo(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(s)+n,!1):fI._typeCommand(new qo(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(s)+t.getLineContent(i.startLineNumber).substring(o-1,i.startColumn-1)+n,!1)}return null}static _isAutoClosingOvertype(e,t,i,n,o){if("never"===e.autoClosingOvertype)return!1;if(!e.autoClosingPairs.autoClosingPairsCloseSingleChar.has(o))return!1;for(let s=0,r=i.length;s2?l.charCodeAt(a.column-2):0)&&d)return!1;if("auto"===e.autoClosingOvertype){let e=!1;for(let t=0,i=n.length;tt.startsWith(e.open))),r=o.some((e=>t.startsWith(e.close)));return!s&&r}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){if(t.getValueInRange(new qo(o.lineNumber,o.column-r.open.length+1,o.lineNumber,o.column))+n!==r.open){e=!1;break}}e&&(s=r)}return s}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 _getAutoClosingPairClose(e,t,i,n,o){const s=XE(n),r=s?e.autoClosingQuotes:e.autoClosingBrackets,a=s?e.shouldAutoCloseBefore.quote:e.shouldAutoCloseBefore.bracket;if("never"===r)return null;for(const g of i)if(!g.isEmpty())return null;const l=i.map((e=>{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}})),d=this._findAutoClosingPairOpen(e,t,l.map((e=>new er(e.lineNumber,e.beforeColumn))),n);if(!d)return null;const c=this._findContainedAutoClosingPair(e,d),h=c?c.close:"";let u=!0;for(const g of l){const{lineNumber:i,beforeColumn:o,afterColumn:s}=g,l=t.getLineContent(i),c=l.substring(0,o-1),p=l.substring(s-1);if(p.startsWith(h)||(u=!1),p.length>0){const t=p.charAt(0);if(!fI._isBeforeClosingBrace(e,p)&&!a(t))return null}if(1===d.open.length&&("'"===n||'"'===n)&&"always"!==r){const t=cr(e.wordSeparators);if(c.length>0){const e=c.charCodeAt(c.length-1);if(0===t.get(e))return null}}if(!t.isCheapToTokenize(i))return null;t.forceTokenization(i);const m=F_(t.getLineTokens(i),o-1);if(!d.shouldAutoClose(m,o-m.firstCharOffset))return null;const f=d.findNeutralCharacter();if(f){const e=t.getTokenTypeIfInsertingCharacter(i,o,f);if(!d.isOK(e))return null}}return u?d.close.substring(0,d.close.length-h.length):d.close}static _runAutoClosingOpenCharType(e,t,i,n,o,s,r){const a=[];for(let l=0,d=n.length;lnew JE(new qo(e.positionLineNumber,e.positionColumn,e.positionLineNumber,e.positionColumn+1),"",!1)));return new YE(4,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const a=this._getAutoClosingPairClose(t,i,o,r,!0);return null!==a?this._runAutoClosingOpenCharType(e,t,i,o,r,!0,a):null}static typeWithInterceptors(e,t,i,n,o,s,r){if(!e&&"\n"===r){const e=[];for(let t=0,s=o.length;t{const i=e.get(N_).getFocusedCodeEditor();return!(!i||!i.hasTextFocus())&&this._runEditorCommand(e,i,t)})),e.addImplementation(1e3,"generic-dom-input-textarea",((e,t)=>{const i=document.activeElement;return!!(i&&["input","textarea"].indexOf(i.tagName.toLowerCase())>=0)&&(this.runDOMCommand(),!0)})),e.addImplementation(0,"generic-dom",((e,t)=>{const i=e.get(N_).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 xI{constructor(e){super(e),this._minimalReveal=e.minimalReveal,this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement();e.setCursorStates(t.source,3,[cI.moveTo(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position,t.viewPosition)])&&e.revealPrimaryCursor(t.source,!0,this._minimalReveal)}}e.MoveTo=Dx(new t({id:"_moveTo",minimalReveal:!0,inSelectionMode:!1,precondition:void 0})),e.MoveToSelect=Dx(new t({id:"_moveToSelect",minimalReveal:!1,inSelectionMode:!0,precondition:void 0}));class i extends xI{runCoreEditorCommand(e,t){e.model.pushStackElement();const i=this._getColumnSelectResult(e,e.getPrimaryCursorState(),e.getCursorColumnSelectData(),t);e.setCursorStates(t.source,3,i.viewStates.map((e=>KE.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=Dx(new class extends i{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(e,t,i,n){const o=e.model.validatePosition(n.position),s=e.coordinatesConverter.validateViewPosition(new er(n.viewPosition.lineNumber,n.viewPosition.column),o),r=n.doColumnSelect?i.fromViewLineNumber:s.lineNumber,a=n.doColumnSelect?i.fromViewVisualColumn:n.mouseColumn-1;return QE.columnSelect(e.cursorConfig,e,r,a,s.lineNumber,n.mouseColumn-1)}}),e.CursorColumnSelectLeft=Dx(new class extends i{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:yI.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return QE.columnSelectLeft(e.cursorConfig,e,i)}}),e.CursorColumnSelectRight=Dx(new class extends i{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:0,kbExpr:yI.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return QE.columnSelectRight(e.cursorConfig,e,i)}});class n extends i{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return QE.columnSelectUp(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectUp=Dx(new n({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:0,kbExpr:yI.textInputFocus,primary:3600,linux:{primary:0}}})),e.CursorColumnSelectPageUp=Dx(new n({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:yI.textInputFocus,primary:3595,linux:{primary:0}}}));class o extends i{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return QE.columnSelectDown(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectDown=Dx(new o({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:0,kbExpr:yI.textInputFocus,primary:3602,linux:{primary:0}}})),e.CursorColumnSelectPageDown=Dx(new o({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:yI.textInputFocus,primary:3596,linux:{primary:0}}}));class s extends xI{constructor(){super({id:"cursorMove",precondition:void 0,description:hI.description})}runCoreEditorCommand(e,t){const i=hI.parse(t);i&&this._runCursorMove(e,t.source,i)}_runCursorMove(e,t,i){e.model.pushStackElement(),e.setCursorStates(t,3,s._move(e,e.getCursorStates(),i)),e.revealPrimaryCursor(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 cI.simpleMove(e,t,i.direction,n,o,i.unit);case 11:case 13:case 12:case 14:return cI.viewportMove(e,t,i.direction,n,o);default:return null}}}e.CursorMoveImpl=s,e.CursorMove=Dx(new s);class r extends xI{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,cI.simpleMove(e,e.getCursorStates(),i.direction,i.select,i.value,i.unit)),e.revealPrimaryCursor(t.source,!0)}}e.CursorLeft=Dx(new r({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:yI.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),e.CursorLeftSelect=Dx(new r({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:yI.textInputFocus,primary:1039}})),e.CursorRight=Dx(new r({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:0,kbExpr:yI.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),e.CursorRightSelect=Dx(new r({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:yI.textInputFocus,primary:1041}})),e.CursorUp=Dx(new r({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:0,kbExpr:yI.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),e.CursorUpSelect=Dx(new r({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:yI.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),e.CursorPageUp=Dx(new r({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:yI.textInputFocus,primary:11}})),e.CursorPageUpSelect=Dx(new r({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:yI.textInputFocus,primary:1035}})),e.CursorDown=Dx(new r({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:0,kbExpr:yI.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),e.CursorDownSelect=Dx(new r({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:yI.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),e.CursorPageDown=Dx(new r({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:yI.textInputFocus,primary:12}})),e.CursorPageDownSelect=Dx(new r({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:yI.textInputFocus,primary:1036}})),e.CreateCursor=Dx(new class extends xI{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(e,t){let i;i=t.wholeLine?cI.line(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition):cI.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 qo(o,1,o,e.model.getLineMaxColumn(o));let a=0;if(i.at)switch(i.at){case kI.RawAtArgument.Top:a=3;break;case kI.RawAtArgument.Center:a=1;break;case kI.RawAtArgument.Bottom:a=4}const l=e.coordinatesConverter.convertModelRangeToViewRange(r);e.revealRange(t.source,!1,l,a,0)}}),e.SelectAll=new class extends LI{constructor(){super(Px)}runDOMCommand(){o_&&(document.activeElement.focus(),document.activeElement.select()),document.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,[cI.selectAll(e,e.getPrimaryCursorState())])}},e.SetSelection=Dx(new class extends xI{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[KE.fromModelSelection(t.selection)])}})}(DI||(DI={}));const NI=Sy.and(yI.textInputFocus,yI.columnSelection);function EI(e,t){fx.registerKeybindingRule({id:e,primary:t,when:NI,weight:1})}function II(e){return e.register(),e}var TI,MI;EI(DI.CursorColumnSelectLeft.id,1039),EI(DI.CursorColumnSelectRight.id,1041),EI(DI.CursorColumnSelectUp.id,1040),EI(DI.CursorColumnSelectPageUp.id,1035),EI(DI.CursorColumnSelectDown.id,1042),EI(DI.CursorColumnSelectPageDown.id,1036),function(e){class t extends yx{runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditingCommand(t,n,i||{})}}e.CoreEditingCommand=t,e.LineBreakInsert=Dx(new class extends t{constructor(){super({id:"lineBreakInsert",precondition:yI.writable,kbOpts:{weight:0,kbExpr:yI.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,fI.lineBreakInsert(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection))))}}),e.Outdent=Dx(new class extends t{constructor(){super({id:"outdent",precondition:yI.writable,kbOpts:{weight:0,kbExpr:Sy.and(yI.editorTextFocus,yI.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,fI.outdent(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)))),e.pushUndoStop()}}),e.Tab=Dx(new class extends t{constructor(){super({id:"tab",precondition:yI.writable,kbOpts:{weight:0,kbExpr:Sy.and(yI.editorTextFocus,yI.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,fI.tab(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)))),e.pushUndoStop()}}),e.DeleteLeft=Dx(new class extends t{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:yI.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(e,t,i){const[n,o]=rI.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=Dx(new class extends t{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:0,kbExpr:yI.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(e,t,i){const[n,o]=rI.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 LI{constructor(){super(Ox)}runDOMCommand(){document.execCommand("undo")}runEditorCommand(e,t,i){if(t.hasModel()&&!0!==t.getOption(81))return t.getModel().undo()}},e.Redo=new class extends LI{constructor(){super(Rx)}runDOMCommand(){document.execCommand("redo")}runEditorCommand(e,t,i){if(t.hasModel()&&!0!==t.getOption(81))return t.getModel().redo()}}}(TI||(TI={}));class AI extends bx{constructor(e,t,i){super({id:e,precondition:void 0,description:i}),this._handlerId=t}runCommand(e,t){const i=e.get(N_).getFocusedCodeEditor();i&&i.trigger("keyboard",this._handlerId,t)}}function OI(e,t){II(new AI("default:"+e,e)),II(new AI(e,e,t))}OI("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),OI("replacePreviousChar"),OI("compositionType"),OI("compositionStart"),OI("compositionEnd"),OI("paste"),OI("cut");class RI{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){DI.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):this._lastCursorLineSelect(e.position):e.inSelectionMode?this._lineSelectDrag(e.position):this._lineSelect(e.position):2===e.mouseDownCount?e.onInjectedText||(this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position):e.inSelectionMode?this._wordSelectDrag(e.position):this._wordSelect(e.position)):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey||n?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position):this.moveTo(e.position)}_usualArgs(e){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e}}moveTo(e){DI.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_moveToSelect(e){DI.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_columnSelect(e,t,i){e=this._validateViewColumn(e),DI.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:i})}_createCursor(e,t){e=this._validateViewColumn(e),DI.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e){DI.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelect(e){DI.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelectDrag(e){DI.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorWordSelect(e){DI.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelect(e){DI.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelectDrag(e){DI.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelect(e){DI.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelectDrag(e){DI.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_selectAll(){DI.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)}}class PI{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&&this.onKeyDown(e)}emitKeyUp(e){this.onKeyUp&&this.onKeyUp(e)}emitContextMenu(e){this.onContextMenu&&this.onContextMenu(this._convertViewToModelMouseEvent(e))}emitMouseMove(e){this.onMouseMove&&this.onMouseMove(this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){this.onMouseLeave&&this.onMouseLeave(this._convertViewToModelMouseEvent(e))}emitMouseDown(e){this.onMouseDown&&this.onMouseDown(this._convertViewToModelMouseEvent(e))}emitMouseUp(e){this.onMouseUp&&this.onMouseUp(this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){this.onMouseDrag&&this.onMouseDrag(this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){this.onMouseDrop&&this.onMouseDrop(this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){this.onMouseDropCanceled&&this.onMouseDropCanceled()}emitMouseWheel(e){this.onMouseWheel&&this.onMouseWheel(e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return PI.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){const i=Object.assign({},e);return i.position&&(i.position=t.convertViewPositionToModelPosition(i.position)),i.range&&(i.range=t.convertViewRangeToModelRange(i.range)),i}}class FI{constructor(e){this._createLine=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 Error("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=i&&s<=n&&(this._lines[s-this._rendLineNumberStart].onContentChanged(),o=!0);return o}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){return this._lines.splice(e-this._rendLineNumberStart,o-e+1)}const s=[];for(let c=0;ci)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 BI{constructor(e){this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new FI((()=>this._host.createVisibleLine()))}_createDomNode(){const e=p_(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(131)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.toLineNumber)}onLinesDeleted(e){const t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let i=0,n=t.length;it){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-e+1;t>0&&(this._removeLinesAfter(o,t),o.linesLength-=t)}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])}}_insertLinesBefore(e,t,i,n,o){const s=[];let r=0;for(let a=t;a<=i;a++)s[r++]=this.host.createVisibleLine();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");VI._ttPolicy&&(t=VI._ttPolicy.createHTML(t)),n.innerHTML=t;for(let o=0;oe}),VI._sb=nv(1e5);class WI extends jL{constructor(e){super(e),this._visibleLines=new BI(this),this.domNode=this._visibleLines.domNode,this._dynamicOverlays=[],this._isFocused=!1,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'),n.appendASCIIString(o),n.appendASCIIString(""),!0)}layoutLine(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))}}class HI extends WI{constructor(e){super(e);const t=this._context.configuration.options.get(131);this._contentWidth=t.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){const t=this._context.configuration.options.get(131);return this._contentWidth=t.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 jI extends WI{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(131);this._contentLeft=i.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),m_(this.domNode,t.get(44))}onConfigurationChanged(e){const t=this._context.configuration.options;m_(this.domNode,t.get(44));const i=t.get(131);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 UI{constructor(e,t){this._coordinateBrand=void 0,this.top=e,this.left=t}}class $I extends jL{constructor(e,t){super(e),this._viewDomNode=t,this._widgets={},this.domNode=p_(document.createElement("div")),UL.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=p_(document.createElement("div")),UL.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onConfigurationChanged(e);return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLineMappingChanged(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onLineMappingChanged(e);return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return!0}onZonesChanged(e){return!0}addWidget(e){const t=new KI(this._context,this._viewDomNode,e);this._widgets[t.id]=t,t.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(t.domNode):this.domNode.appendChild(t.domNode),this.setShouldRender()}setWidgetPosition(e,t,i){this._widgets[e.getId()].setPosition(t,i),this.setShouldRender()}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t];delete this._widgets[t];const i=e.domNode.domNode;i.parentNode.removeChild(i),i.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(e){return!!this._widgets.hasOwnProperty(e)&&this._widgets[e].suppressMouseDown}onBeforeRender(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onBeforeRender(e)}prepareRender(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].prepareRender(e)}render(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].render(e)}}class KI{constructor(e,t,i){this._context=e,this._viewDomNode=t,this._actual=i,this.domNode=p_(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const n=this._context.configuration.options,o=n.get(131);this._fixedOverflowWidgets=n.get(36),this._contentWidth=o.contentWidth,this._contentLeft=o.contentLeft,this._lineHeight=n.get(59),this._range=null,this._viewRange=null,this._preference=[],this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setDisplay("none"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(e){const t=this._context.configuration.options;if(this._lineHeight=t.get(59),e.hasChanged(131)){const e=t.get(131);this._contentLeft=e.contentLeft,this._contentWidth=e.contentWidth,this._maxWidth=this._getMaxWidth()}}onLineMappingChanged(e){this._setPosition(this._range)}_setPosition(e){if(this._range=e,this._viewRange=null,this._range){const e=this._context.viewModel.model.validateRange(this._range);(this._context.viewModel.coordinatesConverter.modelPositionIsVisible(e.getStartPosition())||this._context.viewModel.coordinatesConverter.modelPositionIsVisible(e.getEndPosition()))&&(this._viewRange=this._context.viewModel.coordinatesConverter.convertModelRangeToViewRange(e))}}_getMaxWidth(){return this.allowEditorOverflow?window.innerWidth||document.documentElement.offsetWidth||document.body.offsetWidth:this._contentWidth}setPosition(e,t){this._setPosition(e),this._preference=t,this._viewRange&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(e,t,i,n,o){const s=e.top,r=s,a=t.top+this._lineHeight,l=s-n,d=r>=n,c=a,h=o.viewportHeight-a>=n;let u=e.left,g=t.left;return u+i>o.scrollLeft+o.viewportWidth&&(u=o.scrollLeft+o.viewportWidth-i),g+i>o.scrollLeft+o.viewportWidth&&(g=o.scrollLeft+o.viewportWidth-i),us){const e=r-(s-n);r-=e,i-=e}if(r=22,f=d+n<=c.height-22;return this._fixedOverflowWidgets?{fitsAbove:m,aboveTop:Math.max(l,22),aboveLeft:u,fitsBelow:f,belowTop:d,belowLeft:p}:{fitsAbove:m,aboveTop:s,aboveLeft:h,fitsBelow:f,belowTop:r,belowLeft:g}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new UI(e.top,e.left+this._contentLeft)}_getTopAndBottomLeft(e){if(!this._viewRange)return[null,null];const t=e.linesVisibleRangesForRange(this._viewRange,!1);if(!t||0===t.length)return[null,null];let i=t[0],n=t[0];for(const d of t)d.lineNumbern.lineNumber&&(n=d);let o=1073741824;for(const d of i.ranges)d.lefte.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){if(!this._renderData)return this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),void("function"==typeof this._actual.afterRender&&qI(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&&qI(this._actual.afterRender,this._actual,this._renderData.position)}}function qI(e,t,...i){try{return e.call(t,...i)}catch(Bte){return null}}class GI extends WN{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(131);this._lineHeight=t.get(59),this._renderLineHighlight=t.get(85),this._renderLineHighlightOnlyWhenFocus=t.get(86),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new ar(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1;const t=this._selections.map((e=>e.positionLineNumber));t.sort(((e,t)=>e-t)),jo(this._cursorLineNumbers,t)||(this._cursorLineNumbers=t,e=!0);const i=this._selections.every((e=>e.isEmpty()));return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(131);return this._lineHeight=t.get(59),this._renderLineHighlight=t.get(85),this._renderLineHighlightOnlyWhenFocus=t.get(86),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=this._renderOne(e),i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,o=this._cursorLineNumbers.length;let s=0;const r=[];for(let a=i;a<=n;a++){const e=a-i;for(;s=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 ZI extends GI{_renderOne(e){return`
`}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}class YI extends GI{_renderOne(e){return`
`}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}sx(((e,t)=>{const i=e.getColor(zN);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(HN)){const i=e.getColor(HN);i&&(t.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${i}; }`),"hc"===e.type&&(t.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}}));class XI extends WN{constructor(e){super(),this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(59),this._typicalHalfwidthCharacterWidth=t.get(44).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._lineHeight=t.get(59),this._typicalHalfwidthCharacterWidth=t.get(44).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:qo.compareRangesUsingStarts(e.range,t.range)}));const o=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber,r=[];for(let a=o;a<=s;a++){r[a-o]=""}this._renderWholeLineDecorations(e,i,r),this._renderNormalDecorations(e,i,r),this._renderResult=r}_renderWholeLineDecorations(e,t,i){const n=String(this._lineHeight),o=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber;for(let r=0,a=t.length;r',l=Math.max(e.range.startLineNumber,o),d=Math.min(e.range.endLineNumber,s);for(let t=l;t<=d;t++){i[t-o]+=a}}}_renderNormalDecorations(e,t,i){const n=String(this._lineHeight),o=e.visibleRange.startLineNumber;let s=null,r=!1,a=null;for(let l=0,d=t.length;l';r[t]+=a}}}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class QI extends Uo{onclick(e,t){this._register(nC(e,zC.CLICK,(e=>t(new Gw(e)))))}onmousedown(e,t){this._register(nC(e,zC.MOUSE_DOWN,(e=>t(new Gw(e)))))}onmouseover(e,t){this._register(nC(e,zC.MOUSE_OVER,(e=>t(new Gw(e)))))}onnonbubblingmouseout(e,t){this._register(lC(e,(e=>t(new Gw(e)))))}onkeydown(e,t){this._register(nC(e,zC.KEY_DOWN,(e=>t(new jw(e)))))}onkeyup(e,t){this._register(nC(e,zC.KEY_UP,(e=>t(new jw(e)))))}oninput(e,t){this._register(nC(e,zC.INPUT,t))}onblur(e,t){this._register(nC(e,zC.BLUR,t))}onfocus(e,t){this._register(nC(e,zC.FOCUS,t))}ignoreGesture(e){oS.ignoreTarget(e)}}const JI=11;class eT extends QI{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",void 0!==e.top&&(this.bgDomNode.style.top="0px"),void 0!==e.left&&(this.bgDomNode.style.left="0px"),void 0!==e.bottom&&(this.bgDomNode.style.bottom="0px"),void 0!==e.right&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.classList.add(...e.icon.classNamesArray),this.domNode.style.position="absolute",this.domNode.style.width="11px",this.domNode.style.height="11px",void 0!==e.top&&(this.domNode.style.top=e.top+"px"),void 0!==e.left&&(this.domNode.style.left=e.left+"px"),void 0!==e.bottom&&(this.domNode.style.bottom=e.bottom+"px"),void 0!==e.right&&(this.domNode.style.right=e.right+"px"),this._mouseMoveMonitor=this._register(new rS),this.onmousedown(this.bgDomNode,(e=>this._arrowMouseDown(e))),this.onmousedown(this.domNode,(e=>this._arrowMouseDown(e))),this._mousedownRepeatTimer=this._register(new ab),this._mousedownScheduleRepeatTimer=this._register(new rb)}_arrowMouseDown(e){this._onActivate(),this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancelAndSet((()=>{this._mousedownRepeatTimer.cancelAndSet((()=>this._onActivate()),1e3/24)}),200),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,sS,(e=>{}),(()=>{this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancel()})),e.preventDefault()}}class tT extends Uo{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 rb)}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&&this._domNode.setClassName(this._visibleClassName)}),0))}_hide(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode&&this._domNode.setClassName(this._invisibleClassName+(e?" fade":"")))}}class iT extends QI{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 tT(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._mouseMoveMonitor=this._register(new rS),this._shouldRender=!0,this.domNode=p_(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this.onmousedown(this.domNode.domNode,(e=>this._domNodeMouseDown(e)))}_createArrow(e){const t=this._register(new eT(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,i,n){this.slider=p_(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.onmousedown(this.slider.domNode,(e=>{e.leftButton&&(e.preventDefault(),this._sliderMouseDown(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()))}_domNodeMouseDown(e){e.target===this.domNode.domNode&&this._onMouseDown(e)}delegateMouseDown(e){const t=this.domNode.domNode.getClientRects()[0].top,i=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),o=this._sliderMousePosition(e);i<=o&&o<=n?e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,(()=>{}))):this._onMouseDown(e)}_onMouseDown(e){let t,i;if(e.target===this.domNode.domNode&&"number"==typeof e.browserEvent.offsetX&&"number"==typeof e.browserEvent.offsetY)t=e.browserEvent.offsetX,i=e.browserEvent.offsetY;else{const n=yC(this.domNode.domNode);t=e.posx-n.left,i=e.posy-n.top}const n=this._mouseDownRelativePosition(t,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(n):this._scrollbarState.getDesiredScrollPositionFromOffset(n)),e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,(()=>{})))}_sliderMouseDown(e,t){const i=this._sliderMousePosition(e),n=this._sliderOrthogonalMousePosition(e),o=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,sS,(e=>{const t=this._sliderOrthogonalMousePosition(e),s=Math.abs(t-n);if(Rs&&s>140)return void this._setDesiredScrollPositionNow(o.getScrollPosition());const r=this._sliderMousePosition(e)-i;this._setDesiredScrollPositionNow(o.getDesiredScrollPositionFromDelta(r))}),(()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd(),t()})),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()}}class nT{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 nT(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,n,o){const s=Math.max(0,i-e),r=Math.max(0,s-2*t),a=n>0&&n>i;if(!a)return{computedAvailableSize:Math.round(s),computedIsNeeded:a,computedSliderSize:Math.round(r),computedSliderRatio:0,computedSliderPosition:0};const l=Math.round(Math.max(20,Math.floor(i*r/n))),d=(r-l)/(n-i),c=o*d;return{computedAvailableSize:Math.round(s),computedIsNeeded:a,computedSliderSize:Math.round(l),computedSliderRatio:d,computedSliderPosition:Math.round(c)}}_refreshComputedValues(){const e=nT._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 tthis._host.onMouseWheel(new Zw(null,1,0))}),this._createArrow({className:"scra",icon:br.scrollbarButtonRight,top:i,left:void 0,bottom:void 0,right:e,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new Zw(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}_mouseDownRelativePosition(e,t){return e}_sliderMousePosition(e){return e.posx}_sliderOrthogonalMousePosition(e){return e.posy}_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 sT extends iT{constructor(e,t,i){const n=e.getScrollDimensions(),o=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new nT(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-JI)/2,i=(t.verticalScrollbarSize-JI)/2;this._createArrow({className:"scra",icon:br.scrollbarButtonUp,top:e,left:i,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new Zw(null,0,1))}),this._createArrow({className:"scra",icon:br.scrollbarButtonDown,top:void 0,left:i,bottom:e,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new Zw(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}_mouseDownRelativePosition(e,t){return t}_sliderMousePosition(e){return e.posy}_sliderOrthogonalMousePosition(e){return e.posx}_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}}class rT{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 rT(this._forceIntegerValues,void 0!==e.width?e.width:this.width,void 0!==e.scrollWidth?e.scrollWidth:this.scrollWidth,t?this.rawScrollLeft:this.scrollLeft,void 0!==e.height?e.height:this.height,void 0!==e.scrollHeight?e.scrollHeight:this.scrollHeight,t?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new rT(this._forceIntegerValues,this.width,this.scrollWidth,void 0!==e.scrollLeft?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,void 0!==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 aT extends Uo{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new $o),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new rT(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&&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:void 0===e.scrollLeft?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:void 0===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 cT(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=cT.start(this._state,t,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())}))}_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 lT{constructor(e,t,i){this.scrollLeft=e,this.scrollTop=t,this.isDone=i}}function dT(e,t){const i=t-e;return function(t){return e+i*(1-function(e){return Math.pow(e,3)}(1-t))}}class cT{constructor(e,t,i,n){this.from=e,this.to=t,this.duration=n,this.startTime=i,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(e,t,i){if(Math.abs(e-t)>2.5*i){let n,o;return e0&&Math.abs(e.deltaY)>0)return 1;let t=.5;return(-1!==this._front||-1!==this._rear)&&this._memory[this._rear],this._isAlmostInt(e.deltaX)&&this._isAlmostInt(e.deltaY)||(t+=.25),Math.min(Math.max(t,0),1)}_isAlmostInt(e){return Math.abs(Math.round(e)-e)<.01}}uT.INSTANCE=new uT;class gT extends QI{constructor(e,t,i){super(),this._onScroll=this._register(new $o),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new $o),e.style.overflow="hidden",this._options=function(e){const t={lazyRender:void 0!==e.lazyRender&&e.lazyRender,className:void 0!==e.className?e.className:"",useShadows:void 0===e.useShadows||e.useShadows,handleMouseWheel:void 0===e.handleMouseWheel||e.handleMouseWheel,flipAxes:void 0!==e.flipAxes&&e.flipAxes,consumeMouseWheelIfScrollbarIsNeeded:void 0!==e.consumeMouseWheelIfScrollbarIsNeeded&&e.consumeMouseWheelIfScrollbarIsNeeded,alwaysConsumeMouseWheel:void 0!==e.alwaysConsumeMouseWheel&&e.alwaysConsumeMouseWheel,scrollYToX:void 0!==e.scrollYToX&&e.scrollYToX,mouseWheelScrollSensitivity:void 0!==e.mouseWheelScrollSensitivity?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:void 0!==e.fastScrollSensitivity?e.fastScrollSensitivity:5,scrollPredominantAxis:void 0===e.scrollPredominantAxis||e.scrollPredominantAxis,mouseWheelSmoothScroll:void 0===e.mouseWheelSmoothScroll||e.mouseWheelSmoothScroll,arrowSize:void 0!==e.arrowSize?e.arrowSize:11,listenOnDomNode:void 0!==e.listenOnDomNode?e.listenOnDomNode:null,horizontal:void 0!==e.horizontal?e.horizontal:1,horizontalScrollbarSize:void 0!==e.horizontalScrollbarSize?e.horizontalScrollbarSize:10,horizontalSliderSize:void 0!==e.horizontalSliderSize?e.horizontalSliderSize:0,horizontalHasArrows:void 0!==e.horizontalHasArrows&&e.horizontalHasArrows,vertical:void 0!==e.vertical?e.vertical:1,verticalScrollbarSize:void 0!==e.verticalScrollbarSize?e.verticalScrollbarSize:10,verticalHasArrows:void 0!==e.verticalHasArrows&&e.verticalHasArrows,verticalSliderSize:void 0!==e.verticalSliderSize?e.verticalSliderSize:0,scrollByPage:void 0!==e.scrollByPage&&e.scrollByPage};t.horizontalSliderSize=void 0!==e.horizontalSliderSize?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=void 0!==e.verticalSliderSize?e.verticalSliderSize:t.verticalScrollbarSize,zo&&(t.className+=" mac");return t}(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 sT(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new oT(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=p_(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=p_(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=p_(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.onnonbubblingmouseout(this._listenOnDomNode,(e=>this._onMouseOut(e))),this._hideTimeout=this._register(new rb),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}get options(){return this._options}dispose(){this._mouseWheelToDispose=bs(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarMouseDown(e){this._verticalScrollbar.delegateMouseDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,zo&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){void 0!==e.handleMouseWheel&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),void 0!==e.mouseWheelScrollSensitivity&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),void 0!==e.fastScrollSensitivity&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),void 0!==e.scrollPredominantAxis&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),void 0!==e.horizontal&&(this._options.horizontal=e.horizontal),void 0!==e.vertical&&(this._options.vertical=e.vertical),void 0!==e.horizontalScrollbarSize&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),void 0!==e.verticalScrollbarSize&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),void 0!==e.scrollByPage&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=bs(this._mouseWheelToDispose),e)){const e=e=>{this._onMouseWheel(new Zw(e))};this._mouseWheelToDispose.push(nC(this._listenOnDomNode,zC.MOUSE_WHEEL,e,{passive:!1}))}}_onMouseWheel(e){const t=uT.INSTANCE;{const i=window.devicePixelRatio/i_();Rs||Vo?t.accept(Date.now(),e.deltaX/i,e.deltaY/i):t.accept(Date.now(),e.deltaX,e.deltaY)}let i=!1;if(e.deltaY||e.deltaX){let n=e.deltaY*this._options.mouseWheelScrollSensitivity,o=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(Math.abs(n)>=Math.abs(o)?o=0:n=0),this._options.flipAxes&&([n,o]=[o,n]);const s=!zo&&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=50*n,t=r.scrollTop-(e<0?Math.floor(e):Math.ceil(e));this._verticalScrollbar.writeScrollPosition(a,t)}if(o){const e=50*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){this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?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()}_onMouseOut(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()),500)}}class pT extends gT{constructor(e,t){(t=t||{}).mouseWheelSmoothScroll=!1;const i=new aT({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:e=>hC(e)});super(e,t,i),this._register(i)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}}class mT extends gT{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 fT extends gT{constructor(e,t){(t=t||{}).mouseWheelSmoothScroll=!1;const i=new aT({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:e=>hC(e)});super(e,t,i),this._register(i),this._element=e,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})}}class _T extends jL{constructor(e,t,i,n){super(e);const o=this._context.configuration.options,s=o.get(92),r=o.get(67),a=o.get(34),l=o.get(95),d={listenOnDomNode:i.domNode,className:"editor-scrollable "+ix(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:l,scrollByPage:s.scrollByPage};this.scrollbar=this._register(new mT(t.domNode,d,this._context.viewLayout.getScrollable())),UL.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=p_(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const c=(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(nC(i.domNode,"scroll",(e=>c(i.domNode,!0,!0)))),this._register(nC(t.domNode,"scroll",(e=>c(t.domNode,!0,!1)))),this._register(nC(n.domNode,"scroll",(e=>c(n.domNode,!0,!1)))),this._register(nC(this.scrollbarDomNode.domNode,"scroll",(e=>c(this.scrollbarDomNode.domNode,!0,!1))))}dispose(){super.dispose()}_setLayout(){const e=this._context.configuration.options,t=e.get(131);this.scrollbarDomNode.setLeft(t.contentLeft);"right"===e.get(65).side?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}delegateVerticalScrollbarMouseDown(e){this.scrollbar.delegateVerticalScrollbarMouseDown(e)}onConfigurationChanged(e){if(e.hasChanged(92)||e.hasChanged(67)||e.hasChanged(34)){const e=this._context.configuration.options,t=e.get(92),i=e.get(67),n=e.get(34),o=e.get(95),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(131)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+ix(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}sx(((e,t)=>{const i=e.getColor(QS);i&&t.addRule(`\n\t\t\t.monaco-scrollable-element > .shadow.top {\n\t\t\t\tbox-shadow: ${i} 0 6px 6px -6px inset;\n\t\t\t}\n\n\t\t\t.monaco-scrollable-element > .shadow.left {\n\t\t\t\tbox-shadow: ${i} 6px 0 6px -6px inset;\n\t\t\t}\n\n\t\t\t.monaco-scrollable-element > .shadow.top.left {\n\t\t\t\tbox-shadow: ${i} 6px 6px 6px -6px inset;\n\t\t\t}\n\t\t`);const n=e.getColor(JS);n&&t.addRule(`\n\t\t\t.monaco-scrollable-element > .scrollbar > .slider {\n\t\t\t\tbackground: ${n};\n\t\t\t}\n\t\t`);const o=e.getColor(ek);o&&t.addRule(`\n\t\t\t.monaco-scrollable-element > .scrollbar > .slider:hover {\n\t\t\t\tbackground: ${o};\n\t\t\t}\n\t\t`);const s=e.getColor(tk);s&&t.addRule(`\n\t\t\t.monaco-scrollable-element > .scrollbar > .slider.active {\n\t\t\t\tbackground: ${s};\n\t\t\t}\n\t\t`)}));class vT{constructor(e,t,i){this._decorationToRenderBrand=void 0,this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(i)}}class bT extends WN{_render(e,t,i){const n=[];for(let r=e;r<=t;r++){n[r-e]=[]}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.className',r=[];for(let a=t;a<=i;a++){const e=a-t,i=n[e];0===i.length?r[e]="":r[e]='
=this._renderResult.length?"":this._renderResult[i]}}var CT;function yT(e,t){let i=0,n=0;const o=e.length;for(;nn)throw new Error("Illegal value for lineNumber");const o=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=Boolean(o&&o.offSide);let r=-2,a=-1,l=-2,d=-1;const c=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,d=-1;for(let t=e;t=0){l=t,d=e;break}}}};let h=-2,u=-1,g=-2,p=-1;const m=e=>{if(-2===h){h=-1,u=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){h=t,u=e;break}}}if(-1!==g&&(-2===g||g=0){g=t,p=e;break}}}};let f=0,_=!0,v=0,b=!0,w=0,C=0;for(let y=0;_||b;y++){const o=e-y,r=e+y;y>1&&(o<1||o1&&(r>n||r>i)&&(b=!1),y>5e4&&(_=!1,b=!1);let g=-1;if(_&&o>=1){const e=this._computeIndentLevel(o-1);e>=0?(l=o-1,d=e,g=Math.ceil(e/this.textModel.getOptions().indentSize)):(c(o),g=this._getIndentLevelForWhitespaceLine(s,a,d))}let x=-1;if(b&&r<=n){const e=this._computeIndentLevel(r-1);e>=0?(h=r-1,u=e,x=Math.ceil(e/this.textModel.getOptions().indentSize)):(m(r),x=this._getIndentLevelForWhitespaceLine(s,u,p))}if(0!==y){if(1===y){if(r<=n&&x>=0&&C+1===x){_=!1,f=r,v=r,w=x;continue}if(o>=1&&g>=0&&g-1===C){b=!1,f=o,v=o,w=g;continue}if(f=e,v=e,w=C,0===w)return{startLineNumber:f,endLineNumber:v,indent:w}}_&&(g>=w?f=o:_=!1),b&&(x>=w?v=r:b=!1)}else C=g}return{startLineNumber:f,endLineNumber:v,indent:w}}getLinesBracketGuides(e,t,i,n){var o,s,r,a,l;const d=[],c=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new qo(e,1,t,this.textModel.getLineMaxColumn(t)));let h;if(i&&c.length>0){const n=e<=i.lineNumber&&i.lineNumber<=t?c.filter((e=>qo.strictContainsPosition(e.range,i))):this.textModel.bracketPairs.getBracketPairsInRange(qo.fromPositions(i));h=null===(o=wr(n,(e=>e.range.startLineNumber!==e.range.endLineNumber)))||void 0===o?void 0:o.range}const u=new Cr(c),g=new Array,p=new Array,m=new DT;for(let f=e;f<=t;f++){let e=new Array;p.length>0&&(e=e.concat(p),p.length=0),d.push(e);for(const i of u.takeWhile((e=>e.openingBracketRange.startLineNumber<=f))||[]){if(i.range.startLineNumber===i.range.endLineNumber)continue;const e=Math.min(this.getVisibleColumnFromPosition(i.openingBracketRange.getStartPosition()),this.getVisibleColumnFromPosition(null!==(r=null===(s=i.closingBracketRange)||void 0===s?void 0:s.getStartPosition())&&void 0!==r?r:i.range.getEndPosition()),i.minVisibleColumnIndentation+1);let t=!1;if(i.closingBracketRange){xs(this.textModel.getLineContent(i.closingBracketRange.startLineNumber))=0;i--){const o=g[i];if(!o)continue;const s=n.highlightActive&&h&&o.bracketPair.range.equalsRange(h),r=m.getInlineClassNameOfLevel(o.nestingLevel)+(s?" "+m.activeClassName:"");(s||n.includeInactive)&&o.renderHorizontalEndLineAtTheBottom&&o.end.lineNumber===f+1&&p.push(new xT(o.guideVisibleColumn,r,null)),o.end.lineNumber<=f||o.start.lineNumber>=f||(o.guideVisibleColumn>=t&&!s||(t=o.guideVisibleColumn,(s||n.includeInactive)&&e.push(new xT(o.guideVisibleColumn,r,null))))}e.sort(((e,t)=>e.visibleColumn-t.visibleColumn))}return d}getVisibleColumnFromPosition(e){return dN.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,d=-2,c=-1;for(let h=e;h<=t;h++){const t=h-e,o=this._computeIndentLevel(h-1);if(o>=0)a=h-1,l=o,r[t]=Math.ceil(o/n.indentSize);else{if(-2===a){a=-1,l=-1;for(let e=h-2;e>=0;e--){const t=this._computeIndentLevel(e);if(t>=0){a=e,l=t;break}}}if(-1!==d&&(-2===d||d=0){d=e,c=t;break}}}r[t]=this._getIndentLevelForWhitespaceLine(s,l,c)}}return r}_getIndentLevelForWhitespaceLine(e,t,i){const n=this.textModel.getOptions();return-1===t||-1===i?0:ta||this._maxIndentLeft>0&&i>this._maxIndentLeft)break;const s=t.horizontalLine?t.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",r=t.horizontalLine?(null!==(o=null===(n=e.visibleRangeForPosition(new er(u,t.horizontalLine.endColumn)))||void 0===n?void 0:n.left)&&void 0!==o?o:i+this._spaceWidth)-i:this._spaceWidth;g+=`
`}h[r]=g}this._renderResult=h}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?CT.Enabled:"active"===this._bracketPairGuideOptions.bracketPairsHorizontal?CT.EnabledForActive:CT.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(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(),d=[];for(let c=e;c<=t;c++){const t=new Array;d.push(t);const i=n?n[c-e]:[],h=new Cr(i),u=o?o[c-e]:[];for(let e=1;e<=u;e++){const n=(e-1)*l+1,o=0===i.length&&s<=c&&c<=r&&e===a;t.push(...h.takeWhile((e=>e.visibleColumn!0))||[])}return d}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function NT(e){if(!e||!e.isTransparent())return e}sx(((e,t)=>{const i=e.getColor(YN);i&&t.addRule(`.monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 ${i} inset; }`);const n=e.getColor(XN)||i;n&&t.addRule(`.monaco-editor .lines-content .core-guide-indent-active { box-shadow: 1px 0 0 0 ${n} inset; }`);const o=[{bracketColor:_E,guideColor:SE,guideColorActive:IE},{bracketColor:vE,guideColor:kE,guideColorActive:TE},{bracketColor:bE,guideColor:DE,guideColorActive:ME},{bracketColor:wE,guideColor:LE,guideColorActive:AE},{bracketColor:CE,guideColor:NE,guideColorActive:OE},{bracketColor:yE,guideColor:EE,guideColorActive:RE}],s=new DT,r=o.map((t=>{var i,n;const o=e.getColor(t.bracketColor),s=e.getColor(t.guideColor),r=e.getColor(t.guideColorActive),a=NT(null!==(i=NT(s))&&void 0!==i?i:null==o?void 0:o.transparent(.3)),l=NT(null!==(n=NT(r))&&void 0!==n?n:o);if(a&&l)return{guideColor:a,guideColorActive:l}})).filter(yr);if(r.length>0){for(let e=0;e<30;e++){const i=r[e%r.length];t.addRule(`.monaco-editor .${s.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.${s.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),t.addRule(`.monaco-editor .horizontal-top.${s.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),t.addRule(`.monaco-editor .horizontal-bottom.${s.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}}));class ET{constructor(){this._currentVisibleRange=new qo(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class IT{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 TT{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;a{this._updateLineWidthsSlow()}),200),this._asyncCheckMonospaceFontAssumptions=new lb((()=>{this._checkMonospaceFontAssumptions()}),2e3),this._lastRenderedData=new ET,this._horizontalRevealRequest=null}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new iN(this._viewLineOptions)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(132)&&(this._maxLineWidth=0);const t=this._context.configuration.options,i=t.get(44),n=t.get(132),o=t.get(131);return this._lineHeight=t.get(59),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._isViewportWrapping=n.isViewportWrapping,this._revealHorizontalRightPadding=t.get(89),this._horizontalScrollbarHeight=o.horizontalScrollbarHeight,this._cursorSurroundingLines=t.get(25),this._cursorSurroundingLinesStyle=t.get(26),this._canUseLayerHinting=!t.get(28),m_(this.domNode,i),this._onOptionsMaybeChanged(),e.hasChanged(131)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,t=new tN(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++){this._visibleLines.getVisibleLine(t).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 IT(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 TT(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)<=this._lineHeight?1:e.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(i,n),!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 er(n,1);const o=this._visibleLines.getStartLineNumber(),s=this._visibleLines.getEndLineNumber();if(ns)return null;let r=this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(n,e,t);const a=this._context.viewModel.getLineMinColumn(n);return ri?-1:this._visibleLines.getVisibleLine(e).getWidth()}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;const i=e.endLineNumber,n=qo.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!n)return null;let o=[],s=0;const r=new eN(this.domNode.domNode,this._textRangeRestingSpot);let a=0;t&&(a=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new er(n.startLineNumber,1)).lineNumber);const l=this._visibleLines.getStartLineNumber(),d=this._visibleLines.getEndLineNumber();for(let c=n.startLineNumber;c<=n.endLineNumber;c++){if(cd)continue;const e=c===n.startLineNumber?n.startColumn:1,h=c===n.endLineNumber?n.endColumn:this._context.viewModel.getLineMaxColumn(c),u=this._visibleLines.getVisibleLine(c).getVisibleRangesForRange(c,e,h,r);if(u){if(t&&cthis._visibleLines.getEndLineNumber()?null:this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,t,i,new eN(this.domNode.domNode,this._textRangeRestingSpot))}visibleRangeForPosition(e){const t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new ZL(t.outsideRenderedLine,t.ranges[0].left):null}updateLineWidths(){this._updateLineWidths(!1)}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_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()):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();n>t&&(t=n,e=o)}}if(-1!==e&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let o=i;o<=n;o++){this._visibleLines.getVisibleLine(o).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.schedule(),Vo&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++){if(this._visibleLines.getVisibleLine(i).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(!d)return-1;u=c}else if(5===s||6===s)if(6===s&&r<=c&&h<=l)u=r;else{const e=c-Math.max(5*this._lineHeight,.2*a),t=h-a;u=Math.max(t,e)}else if(1===s||2===s)if(2===s&&r<=c&&h<=l)u=r;else{const e=(c+h)/2;u=Math.max(0,e-a/2)}else u=this._computeMinimumScrolling(r,l,c,h,3===s,4===s);return u}_computeScrollLeftToReveal(e){const t=this._context.viewLayout.getCurrentViewport(),i=t.left,n=i+t.width;let o=1073741824,s=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)o=Math.min(o,Math.round(e.left)),s=Math.max(s,Math.round(e.left+e.width))}else for(const r of e.selections){if(r.startLineNumber!==r.endLineNumber)return null;const e=this._visibleRangesForLineRange(r.startLineNumber,r.startColumn,r.endColumn);if(!e)return null;for(const t of e.ranges)o=Math.min(o,Math.round(t.left)),s=Math.max(s,Math.round(t.left+t.width))}if(e.minimalReveal||(o=Math.max(0,o-MT.HORIZONTAL_EXTRA_PX),s+=this._revealHorizontalRightPadding),"selections"===e.type&&s-o>t.width)return null;return{scrollLeft:this._computeMinimumScrolling(i,n,o,s),maxHorizontalOffset:s}}_computeMinimumScrolling(e,t,i,n,o,s){o=!!o,s=!!s;const r=(t|=0)-(e|=0);return(n|=0)-(i|=0)t?Math.max(0,n-r):e:i}}MT.HORIZONTAL_EXTRA_PX=30;class AT extends bT{constructor(e){super(),this._context=e;const t=this._context.configuration.options.get(131);this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.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.get(131);return this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.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
',s=[];for(let r=t;r<=i;r++){const e=r-t,i=n[e];let a="";for(let t=0,n=i.length;t';o[e]=r}this._renderResult=o}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}class RT{constructor(e,t,i,n){this._rgba8Brand=void 0,this.r=RT._clamp(e),this.g=RT._clamp(t),this.b=RT._clamp(i),this.a=RT._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}}RT.Empty=new RT(0,0,0,0);class PT extends Uo{constructor(){super(),this._onDidChange=new $o,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(Ns.onDidChange((e=>{e.changedColorMap&&this._updateColorMap()})))}static getInstance(){return this._INSTANCE||(this._INSTANCE=xr(new PT)),this._INSTANCE}_updateColorMap(){const e=Ns.getColorMap();if(!e)return this._colors=[RT.Empty],void(this._backgroundIsLight=!0);this._colors=[RT.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}}PT._INSTANCE=null;const FT=(()=>{const e=[];for(let t=32;t<=126;t++)e.push(t);return e.push(65533),e})();class BT{constructor(e,t){this.scale=t,this._minimapCharRendererBrand=void 0,this.charDataNormal=BT.soften(e,.8),this.charDataLight=BT.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;const p=d?this.charDataLight:this.charDataNormal,m=((e,t)=>(e-=32)<0||e>96?t<=2?(e+96)%96:95:e)(n,l),f=4*e.width,_=r.r,v=r.g,b=r.b,w=o.r-_,C=o.g-v,y=o.b-b,x=Math.max(s,a),S=e.data;let k=m*h*u,D=i*f+4*t;for(let L=0;Le.width||i+c>e.height)return;const h=4*e.width,u=o/255*.5,g=s.r,p=s.g,m=s.b,f=g+(n.r-g)*u,_=p+(n.g-p)*u,v=m+(n.b-m)*u,b=Math.max(o,r),w=e.data;let C=i*h+4*t;for(let y=0;y{const t=new Uint8ClampedArray(e.length/2);for(let i=0;i>1]=VT[e[i]]<<4|15&VT[e[i+1]];return t},zT={1:kr((()=>WT("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792"))),2:kr((()=>WT("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126")))};class HT{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let i;return i=zT[e]?new BT(zT[e](),e):HT.createFromSampleData(HT.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 FT)i.fillText(String.fromCharCode(o),n,8),n+=10;return i.getImageData(0,0,960,16)}static createFromSampleData(e,t){if(61440!==e.length)throw new Error("Unexpected source in MinimapCharRenderer");const i=HT._downsample(e,t);return new BT(i,t)}static _downsampleChar(e,t,i,n,o){const s=1*o,r=2*o;let a=n,l=0;for(let d=0;d0){const e=255/a;for(let t=0;tHT.create(this.fontScale,a.fontFamily))),this.defaultBackgroundColor=i.getColor(2),this.backgroundColor=jT._getMinimapBackground(t,this.defaultBackgroundColor),this.foregroundAlpha=jT._getMinimapForegroundOpacity(t)}static _getMinimapBackground(e,t){const i=e.getColor(uL);return i?new RT(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):t}static _getMinimapForegroundOpacity(e){const t=e.getColor(gL);return t?RT._clamp(Math.round(255*t.rgba.a)):255}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.showSlider===e.showSlider&&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.defaultBackgroundColor&&this.defaultBackgroundColor.equals(e.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)&&this.foregroundAlpha===e.foregroundAlpha}}class UT{constructor(e,t,i,n,o,s,r,a){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=i,this._computedSliderRatio=n,this.sliderTop=o,this.sliderHeight=s,this.startLineNumber=r,this.endLineNumber=a}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}static create(e,t,i,n,o,s,r,a,l,d,c){const h=e.pixelRatio,u=e.minimapLineHeight,g=Math.floor(e.canvasInnerHeight/u),p=e.lineHeight;if(e.minimapHeightIsEditorHeight){const t=a*e.lineHeight+(e.scrollBeyondLastLine?o-e.lineHeight:0),i=Math.max(1,Math.floor(o*o/t)),n=Math.max(0,e.minimapHeight-i),s=n/(d-o),c=l*s,h=n>0,u=Math.floor(e.canvasInnerHeight/e.minimapLineHeight);return new UT(l,d,h,s,c,i,1,Math.min(r,u))}let m,f;if(s&&i!==r){const e=i-t+1;m=Math.floor(e*u/h)}else{const e=o/p;m=Math.floor(e*u/h)}f=e.scrollBeyondLastLine?(r-1)*u/h:Math.max(0,r*u/h-m),f=Math.min(e.minimapHeight-m,f);const _=f/(d-o),v=l*_;let b=0;if(e.scrollBeyondLastLine){b=o/p-1}if(g>=r+b){return new UT(l,d,f>0,_,v,m,1,r)}{let e=Math.max(1,Math.floor(t-v*h/u));c&&c.scrollHeight===d&&(c.scrollTop>l&&(e=Math.min(e,c.startLineNumber)),c.scrollTop$T.INVALID)),this._renderedLines._set(e.startLineNumber,i)}linesEquals(e){if(!this.scrollEquals(e))return!1;const t=this._renderedLines._get().lines;for(let i=0,n=t.length;i1){for(let t=0,i=r-1;t0&&this.minimapLines[i-1]>=e;)i--;let n=this.modelLineToMinimapLine(t)-1;for(;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&&!(this.minimapLines[o]=0&&!(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]=GT.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()}}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.preventDefault();if(0===this._model.options.renderMinimap)return;if(!this._lastRenderData)return;if("proportional"!==this._model.options.size){if(e.leftButton&&this._lastRenderData){const t=yC(this._slider.domNode),i=t.top+t.height/2;this._startSliderDragging(e.buttons,e.posx,i,e.posy,this._lastRenderData.renderedLayout)}return}const t=this._model.options.minimapLineHeight,i=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*e.browserEvent.offsetY;let n=Math.floor(i/t)+this._lastRenderData.renderedLayout.startLineNumber;n=Math.min(n,this._model.getLineCount()),this._model.revealLineNumber(n)})),this._sliderMouseMoveMonitor=new rS,this._sliderMouseDownListener=sC(this._slider.domNode,"mousedown",(e=>{e.preventDefault(),e.stopPropagation(),e.leftButton&&this._lastRenderData&&this._startSliderDragging(e.buttons,e.posx,e.posy,e.posy,this._lastRenderData.renderedLayout)})),this._gestureDisposable=oS.addTarget(this._domNode.domNode),this._sliderTouchStartListener=nC(this._domNode.domNode,iS.Start,(e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(e))}),{passive:!1}),this._sliderTouchMoveListener=nC(this._domNode.domNode,iS.Change,(e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(e)}),{passive:!1}),this._sliderTouchEndListener=sC(this._domNode.domNode,iS.End,(e=>{e.preventDefault(),e.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)}))}_startSliderDragging(e,t,i,n,o){this._slider.toggleClassName("active",!0);const s=(e,n)=>{const s=Math.abs(n-t);if(Rs&&s>140)return void this._model.setScrollTop(o.scrollTop);const r=e-i;this._model.setScrollTop(o.getDesiredScrollTopFromDelta(r))};n!==i&&s(n,t),this._sliderMouseMoveMonitor.startMonitoring(this._slider.domNode,e,sS,(e=>s(e.posy,e.posx)),(()=>{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._mouseDownListener.dispose(),this._sliderMouseMoveMonitor.dispose(),this._sliderMouseDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){return"always"===this._model.options.showSlider?"minimap slider-always":"minimap slider-mouseover"}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 qT(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&&this._lastRenderData.onLinesDeleted(e,t),!0}onLinesInserted(e,t){return this._lastRenderData&&this._lastRenderData.onLinesInserted(e,t),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(dL),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){if(0===this._model.options.renderMinimap)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 t=UT.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(t.sliderNeeded?"block":"none"),this._slider.setTop(t.sliderTop),this._slider.setHeight(t.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(t.sliderHeight),this.renderDecorations(t),this._lastRenderData=this.renderLines(t)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;const t=this._model.getSelections();t.sort(qo.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 d=new XT(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(l,t,d,e,s),this._renderDecorationsLineHighlights(l,i,d,e,s);const c=new XT(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(l,t,c,e,s,a,r,n),this._renderDecorationsHighlights(l,i,c,e,s,a,r,n)}}_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=Math.max(n.startLineNumber,a.startLineNumber),l=Math.min(n.endLineNumber,a.endLineNumber);if(t>l)continue;for(let e=t;e<=l;e++)i.set(e,!0);const d=(t-n.startLineNumber)*o,c=(l-n.startLineNumber)*o+o;r>=d||(r>s&&e.fillRect(8,s,e.canvas.width,r-s),s=d),r=c}r>s&&e.fillRect(8,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||l.position!==Dr.Inline)continue;const d=Math.max(n.startLineNumber,a.range.startLineNumber),c=Math.min(n.endLineNumber,a.range.endLineNumber);if(d>c)continue;const h=l.getColor(this._theme.value);if(!h||h.isTransparent())continue;let u=s.get(h.toString());u||(u=h.transparent(.5).toString(),s.set(h.toString(),u)),e.fillStyle=u;for(let t=d;t<=c;t++){if(i.has(t))continue;i.set(t,!0);const s=(d-n.startLineNumber)*o;e.fillRect(8,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=Math.max(n.startLineNumber,l.startLineNumber),d=Math.min(n.endLineNumber,l.endLineNumber);if(!(t>d))for(let c=t;c<=d;c++)this.renderDecorationOnLine(e,i,l,this._selectionColor,n,c,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 d=Math.max(n.startLineNumber,l.range.startLineNumber),c=Math.min(n.endLineNumber,l.range.endLineNumber);if(d>c)continue;const h=t.getColor(this._theme.value);if(h&&!h.isTransparent())for(let u=d;u<=c;u++)switch(t.position){case Dr.Inline:this.renderDecorationOnLine(e,i,l.range,h,n,u,o,o,s,r,a);continue;case Dr.Gutter:{const t=(u-n.startLineNumber)*o,i=2;this.renderDecoration(e,h,i,t,2,o);continue}}}}renderDecorationOnLine(e,t,i,n,o,s,r,a,l,d,c){const h=(s-o.startLineNumber)*a;if(h+r<0||h>this._model.options.canvasInnerHeight)return;const{startLineNumber:u,endLineNumber:g}=i,p=u===s?i.startColumn:1,m=g===s?i.endColumn:this._model.getLineMaxColumn(s),f=this.getXOffsetForPosition(t,s,p,l,d,c),_=this.getXOffsetForPosition(t,s,m,l,d,c);this.renderDecoration(e,n,f,h,_-f,r)}getXOffsetForPosition(e,t,i,n,o,s){if(1===i)return 8;if((i-1)*o>=s)return s;let r=e.get(t);if(!r){const i=this._model.getLineContent(t);r=[8];let a=8;for(let e=1;e=s){r[e]=s;break}r[e]=l,a=l}e.set(t,r)}return i-1b?Math.floor((n-b)/2):0,C=h.a/255,y=new RT(Math.round((h.r-c.r)*C+c.r),Math.round((h.g-c.g)*C+c.g),Math.round((h.b-c.b)*C+c.b),255);let x=0;const S=[];for(let L=0,N=i-t+1;L=0&&i_)return;const r=m.charCodeAt(w);if(9===r){const e=h-(w+C)%h;C+=e-1,b+=e*s}else if(32===r)b+=s;else{const h=ks(r)?2:1;for(let u=0;u_)return}}}}}class XT{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]}}sx(((e,t)=>{const i=e.getColor(pL);i&&t.addRule(`.monaco-editor .minimap-slider .minimap-slider-horizontal { background: ${i}; }`);const n=e.getColor(mL);n&&t.addRule(`.monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: ${n}; }`);const o=e.getColor(fL);o&&t.addRule(`.monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: ${o}; }`);const s=e.getColor(QS);s&&t.addRule(`.monaco-editor .minimap-shadow-visible { box-shadow: ${s} -6px 0 6px -6px inset; }`)}));class QT extends jL{constructor(e){super(e);const t=this._context.configuration.options.get(131);this._widgets={},this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimap.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width,this._domNode=p_(document.createElement("div")),UL.write(this._domNode,4),this._domNode.setClassName("overlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options.get(131);return this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimap.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width,!0}addWidget(e){const t=p_(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),this._domNode.appendChild(t),this.setShouldRender()}setWidgetPosition(e,t){const i=this._widgets[e.getId()];return i.preference!==t&&(i.preference=t,this.setShouldRender(),!0)}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t].domNode.domNode;delete this._widgets[t],e.parentNode.removeChild(e),this.setShouldRender()}}_renderWidget(e){const t=e.domNode;if(null!==e.preference)if(0===e.preference)t.setTop(0),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(1===e.preference){const e=t.domNode.clientHeight;t.setTop(this._editorHeight-e-2*this._horizontalScrollbarHeight),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else 2===e.preference&&(t.setTop(0),t.domNode.style.right="50%");else t.unsetTop()}prepareRender(e){}render(e){this._domNode.setWidth(this._editorWidth);const t=Object.keys(this._widgets);for(let i=0,n=t.length;i=3){const t=Math.floor(n/3),i=Math.floor(n/3),o=n-t-i,s=e+t;return[[0,e,s,e,e+t+o,e,s,e],[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;return[[0,e,e,e,e+t,e,e,e],[0,t,t,t,i,t+i,t+i,t+i]]}return[[0,e,e,e,e,e,e,e],[0,n,n,n,n,n,n,n]]}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.cursorColor===e.cursorColor&&this.themeType===e.themeType&&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 eM extends jL{constructor(e){super(e),this._domNode=p_(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=Ns.onDidChange((e=>{e.changedColorMap&&this._updateSettings(!0)})),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){const t=new JT(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)}onConfigurationChanged(e){return this._updateSettings(!1)}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,i=e.selections.length;tt&&(e=t-a),_=e-a,v=e+a}_>p+1||e!==u?(0!==h&&l.fillRect(d[u],g,c[u],p-g),u=e,g=_,p=v):v>p&&(p=v)}l.fillRect(d[u],g,c[u],p-g)}if(!this._settings.hideCursor&&this._settings.cursorColor){const e=2*this._settings.pixelRatio|0,i=e/2|0,s=this._settings.x[7],r=this._settings.w[7];l.fillStyle=this._settings.cursorColor;let a=-100,d=-100;for(let c=0,h=this._cursorPositions.length;ct&&(u=t-i);const g=u-i,p=g+e;g>d+1?(0!==c&&l.fillRect(s,a,r,d-a),a=g,d=p):p>d&&(d=p)}l.fillRect(s,a,r,d-a)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(l.beginPath(),l.lineWidth=1,l.strokeStyle=this._settings.borderColor,l.moveTo(0,0),l.lineTo(0,t),l.stroke(),l.moveTo(0,0),l.lineTo(e,0),l.stroke())}}class tM{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 iM{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&&(u=i-g);const p=a.color;let m=this._color2Id[p];m||(m=++this._lastAssignedId,this._color2Id[p]=m,this._id2Color[m]=p);const f=new tM(u-g,u+g,m);a.setColorZone(f),s.push(f)}return this._colorZonesInvalid=!1,s.sort(tM.compare),s}}class oM extends HL{constructor(e,t){super(),this._context=e;const i=this._context.configuration.options;this._domNode=p_(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new nM((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(59)),this._zoneManager.setPixelRatio(i.get(129)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return e.hasChanged(59)&&(this._zoneManager.setLineHeight(t.get(59)),this._render()),e.hasChanged(129)&&(this._zoneManager.setPixelRatio(t.get(129)),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,d=a.to;t!==o?(e.fillRect(0,s,n,r-s),o=t,e.fillStyle=i[o],s=l,r=d):r>=l?r=Math.max(r,d):(e.fillRect(0,s,n,r-s),s=l,r=d)}e.fillRect(0,s,n,r-s)}}class sM extends jL{constructor(e){super(e),this.domNode=p_(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(91),this._typicalHalfwidthCharacterWidth=t.get(44).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._rulers=t.get(91),this._typicalHalfwidthCharacterWidth=t.get(44).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=p_(document.createElement("div"));e.setClassName("view-ruler"),e.setWidth(n),this.domNode.appendChild(e),this._renderedRulers.push(e),o--}return}let i=e-t;for(;i>0;){const e=this._renderedRulers.pop();this.domNode.removeChild(e),i--}}render(e){this._ensureRulersCount();for(let t=0,i=this._rulers.length;t{const i=e.getColor(tE);i&&t.addRule(`.monaco-editor .view-ruler { box-shadow: 1px 0 0 0 ${i} inset; }`)}));class rM extends jL{constructor(e){super(e),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const t=this._context.configuration.options.get(92);this._useShadows=t.useShadows,this._domNode=p_(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){const e=this._useShadows&&this._scrollTop>0;return this._shouldShow!==e&&(this._shouldShow=e,!0)}getDomNode(){return this._domNode}_updateWidth(){const e=this._context.configuration.options.get(131);0===e.minimap.renderMinimap||e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?this._width=e.width:this._width=e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}onConfigurationChanged(e){const t=this._context.configuration.options.get(92);return this._useShadows=t.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":"")}}sx(((e,t)=>{const i=e.getColor(QS);i&&t.addRule(`.monaco-editor .scroll-decoration { box-shadow: ${i} 0 6px 6px -6px inset; }`)}));class aM{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class lM{constructor(e,t){this.lineNumber=e,this.ranges=t}}function dM(e){return new aM(e)}function cM(e){return new lM(e.lineNumber,e.ranges.map(dM))}class hM extends WN{constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(59),this._roundedSelection=t.get(90),this._typicalHalfwidthCharacterWidth=t.get(44).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._lineHeight=t.get(59),this._roundedSelection=t.get(90),this._typicalHalfwidthCharacterWidth=t.get(44).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;uM(i-e)e&&(d.top=1),uM(l-o)'}_actualRenderOneSelection(e,t,i,n){if(0===n.length)return;const o=!!n[0].ranges[0].startStyle,s=this._lineHeight.toString(),r=(this._lineHeight-1).toString(),a=n[0].lineNumber,l=n[n.length-1].lineNumber;for(let d=0,c=n.length;d1,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 uM(e){return e<0?-e:e}hM.SELECTION_CLASS_NAME="selected-text",hM.SELECTION_TOP_LEFT="top-left-radius",hM.SELECTION_BOTTOM_LEFT="bottom-left-radius",hM.SELECTION_TOP_RIGHT="top-right-radius",hM.SELECTION_BOTTOM_RIGHT="bottom-right-radius",hM.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",hM.ROUNDED_PIECE_WIDTH=10,sx(((e,t)=>{const i=e.getColor(Ek);i&&t.addRule(`.monaco-editor .focused .selected-text { background-color: ${i}; }`);const n=e.getColor(Tk);n&&t.addRule(`.monaco-editor .selected-text { background-color: ${n}; }`);const o=e.getColor(Ik);o&&!o.isTransparent()&&t.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${o}; }`)}));class gM{constructor(e,t,i,n,o,s){this.top=e,this.left=t,this.width=i,this.height=n,this.textContent=o,this.textContentClassName=s}}class pM{constructor(e){this._context=e;const t=this._context.configuration.options,i=t.get(44);this._cursorStyle=t.get(24),this._lineHeight=t.get(59),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(27),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=p_(document.createElement("div")),this._domNode.setClassName("cursor monaco-mouse-cursor-text"),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),m_(this._domNode,i),this._domNode.setDisplay("none"),this._position=new er(1,1),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}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(44);return this._cursorStyle=t.get(24),this._lineHeight=t.get(59),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(27),this._typicalHalfwidthCharacterWidth),m_(this._domNode,i),!0}onCursorPositionChanged(e){return this._position=e,!0}_getGraphemeAwarePosition(){const{lineNumber:e,column:t}=this._position,i=this._context.viewModel.getLineContent(e),[n,o]=Lr(i,t-1);return[new er(e,n+1),i.substring(n,o)]}_prepareRender(e){let t="";const[i,n]=this._getGraphemeAwarePosition();if(this._cursorStyle===Af.Line||this._cursorStyle===Af.LineThin){const o=e.visibleRangeForPosition(i);if(!o||o.outsideRenderedLine)return null;let s;this._cursorStyle===Af.Line?(s=JC(this._lineCursorWidth>0?this._lineCursorWidth:2),s>2&&(t=n)):s=JC(1);let r=o.left;s>=2&&r>=1&&(r-=1);const a=e.getVerticalOffsetForLineNumber(i.lineNumber)-e.bigNumbersDelta;return new gM(a,r,s,this._lineHeight,t,"")}const o=e.linesVisibleRangesForRange(new qo(i.lineNumber,i.column,i.lineNumber,i.column+n.length),!1);if(!o||0===o.length)return null;const s=o[0];if(s.outsideRenderedLine||0===s.ranges.length)return null;const r=s.ranges[0],a=r.width<1?this._typicalHalfwidthCharacterWidth:r.width;let l="";if(this._cursorStyle===Af.Block){const e=this._context.viewModel.getViewLineData(i.lineNumber);t=n;const o=e.tokens.findTokenIndexAtOffset(i.column-1);l=e.tokens.getClassName(o)}let d=e.getVerticalOffsetForLineNumber(i.lineNumber)-e.bigNumbersDelta,c=this._lineHeight;return this._cursorStyle!==Af.Underline&&this._cursorStyle!==Af.UnderlineThin||(d+=this._lineHeight-2,c=2),new gM(d,r.left,a,c,t,l)}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 monaco-mouse-cursor-text ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),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 mM extends jL{constructor(e){super(e);const t=this._context.configuration.options;this._readOnly=t.get(81),this._cursorBlinking=t.get(22),this._cursorStyle=t.get(24),this._cursorSmoothCaretAnimation=t.get(23),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new pM(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=p_(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 rb,this._cursorFlatBlinkInterval=new ab,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(81),this._cursorBlinking=t.get(22),this._cursorStyle=t.get(24),this._cursorSmoothCaretAnimation=t.get(23),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()}),mM.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet((()=>{this._blinkingEnabled=!0,this._updateDomClassName()}),mM.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case Af.Line:e+=" cursor-line-style";break;case Af.Block:e+=" cursor-block-style";break;case Af.Underline:e+=" cursor-underline-style";break;case Af.LineThin:e+=" cursor-line-thin-style";break;case Af.BlockOutline:e+=" cursor-block-outline-style";break;case Af.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;default:e+=" cursor-solid"}else e+=" cursor-solid";return this._cursorSmoothCaretAnimation&&(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e{const i=e.getColor(qN);if(i){let n=e.getColor(GN);n||(n=i.opposite()),t.addRule(`.monaco-editor .inputarea.ime-input { caret-color: ${i}; }`),t.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${i}; border-color: ${i}; color: ${n}; }`),"hc"===e.type&&t.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${n}; border-right: 1px solid ${n}; }`)}}));const fM=()=>{throw new Error("Invalid change accessor")};class _M extends jL{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(131);this._lineHeight=t.get(59),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,this.domNode=p_(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=p_(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)}};!function(e,t){try{e(t)}catch(i){Jo(i)}}(e,n),n.addZone=fM,n.removeZone=fM,n.layoutZone=fM})),t}_addZone(e,t){const i=this._computeWhitespaceProps(t),n={whitespaceId:e.insertWhitespace(i.afterViewLineNumber,this._getZoneOrdinal(t),i.heightInPx,i.minWidthInPx),delegate:t,isInHiddenArea:i.isInHiddenArea,isVisible:!1,domNode:p_(t.domNode),marginDomNode:t.marginDomNode?p_(t.marginDomNode):null};return this._safeCallOnComputedHeight(n.delegate,i.heightInPx),n.domNode.setPosition("absolute"),n.domNode.domNode.style.width="100%",n.domNode.setDisplay("none"),n.domNode.setAttribute("monaco-view-zone",n.whitespaceId),this.domNode.appendChild(n.domNode),n.marginDomNode&&(n.marginDomNode.setPosition("absolute"),n.marginDomNode.domNode.style.width="100%",n.marginDomNode.setDisplay("none"),n.marginDomNode.setAttribute("monaco-view-zone",n.whitespaceId),this.marginDomNode.appendChild(n.marginDomNode)),this._zones[n.whitespaceId]=n,this.setShouldRender(),n.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.parentNode.removeChild(i.domNode.domNode),i.marginDomNode&&(i.marginDomNode.removeAttribute("monaco-visible-view-zone"),i.marginDomNode.removeAttribute("monaco-view-zone"),i.marginDomNode.domNode.parentNode.removeChild(i.marginDomNode.domNode)),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){Jo(i)}}_safeCallOnDomNodeTop(e,t){if("function"==typeof e.onDomNodeTop)try{e.onDomNodeTop(t)}catch(i){Jo(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;s{this.focus()},dispatchTextAreaEvent:e=>{this._textAreaHandler.textArea.domNode.dispatchEvent(e)},getLastRenderData:()=>{const e=this._viewCursors.getLastRenderData()||[],t=this._textAreaHandler.getLastRenderData();return new pN(e,t)},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 er(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.get(131);this.domNode.setWidth(e.width),this.domNode.setHeight(e.height),this._overflowGuardContainer.setWidth(e.width),this._overflowGuardContainer.setHeight(e.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(128)+" "+ix(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}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(){null===this._renderAnimationFrame&&(this._renderAnimationFrame=cC(this._onRenderScheduled.bind(this),100))}_onRenderScheduled(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()}_renderNow(){!function(e){try{e()}catch(t){Jo(t)}}((()=>this._actualRender()))}_getViewPartsToRender(){const e=[];let t=0;for(const i of this._viewParts)i.shouldRender()&&(e[t++]=i);return e}_actualRender(){if(!tC(this.domNode.domNode))return;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&0===e.length)return;const t=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(t.startLineNumber,t.endLineNumber,t.centeredLineNumber);const i=new wM(this._selections,t,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(i),this._viewLines.shouldRender()&&(this._viewLines.renderText(i),this._viewLines.onDidRender(),e=this._getViewPartsToRender());const n=new $L(this._context.viewLayout,i,this._viewLines);for(const o of e)o.prepareRender(n);for(const o of e)o.render(n),o.onDidRender()}delegateVerticalScrollbarMouseDown(e){this._scrollbar.delegateVerticalScrollbarMouseDown(e)}restoreState(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e.scrollTop},1),this._context.viewModel.tokenizeViewport(),this._renderNow(),this._viewLines.updateLineWidths(),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:e.scrollLeft},1)}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 er(n.lineNumber,n.column));return o?o.left:-1}getTargetAtClientPoint(e,t){const i=this._pointerHandler.getTargetAtClientPoint(e,t);return i?PI.convertViewToModelMouseTarget(i,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(e){return new oM(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()}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){let t=e.position&&e.position.range||null;if(null===t){const i=e.position?e.position.position:null;null!==i&&(t=new qo(i.lineNumber,i.column,i.lineNumber,i.column))}const i=e.position?e.position.preference:null;this._contentWidgets.setWidgetPosition(e.widget,t,i),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=e.position?e.position.preference:null;this._overlayWidgets.setWidgetPosition(e.widget,t)&&this._scheduleRender()}removeOverlayWidget(e){this._overlayWidgets.removeWidget(e.widget),this._scheduleRender()}}class yM{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new ZE(new qo(1,1,1,1),0,new er(1,1),0),new ZE(new qo(1,1,1,1),0,new er(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 KE(this.modelState,this.viewState)}readSelectionFromMarkers(e){const t=e.model._getTrackedRange(this._selTrackedRange);return ar.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 ZE(qo.fromPositions(r,a),t.selectionStartLeftoverVisibleColumns+n.column-r.column,s,t.leftoverVisibleColumns+i.column-s.column)}_setState(e,t,i){if(i&&(i=yM._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 ZE(i,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 ZE(n,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 ZE(n,t.selectionStartLeftoverVisibleColumns,o,t.leftoverVisibleColumns)}else{const n=e.coordinatesConverter.convertModelPositionToViewPosition(new er(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),o=e.coordinatesConverter.convertModelPositionToViewPosition(new er(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),s=new qo(n.lineNumber,n.column,o.lineNumber,o.column),r=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);i=new ZE(s,t.selectionStartLeftoverVisibleColumns,r,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=i,this._updateTrackedRange(e)}}class xM{constructor(e){this.context=e,this.cursors=[new yM(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 Nr(this.cursors,Er((e=>e.viewState.position),er.compare)).viewState.position}getBottomMostViewPosition(){return Ir(this.cursors,Er((e=>e.viewState.position),er.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(KE.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),qo.compareRangesUsingStarts));for(let i=0;ia&&e.index--;e.splice(a,1),t.splice(r,1),this._removeSecondaryCursor(a-1),i--}}}}class SM{constructor(e,t,i,n){this._cursorContextBrand=void 0,this.model=e,this.viewModel=t,this.coordinatesConverter=i,this.cursorConfig=n}}class kM{constructor(){this.changeType=1}}class DM{constructor(e,t,i,n,o){this.ownerId=e,this.lineNumber=t,this.column=i,this.options=n,this.order=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 DM(i.ownerId,i.range.startLineNumber,i.range.startColumn,i.options.before,0)),i.options.after&&i.options.after.content.length>0&&t.push(new DM(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}}class LM{constructor(e,t,i){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=i}}class NM{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class EM{constructor(e,t,i,n){this.changeType=4,this.injectedTexts=n,this.fromLineNumber=e,this.toLineNumber=t,this.detail=i}}class IM{constructor(){this.changeType=5}}class TM{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;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{this.beginEmitViewEvents().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(){for(;this._viewEventQueue;){const e=this._viewEventQueue;this._viewEventQueue=null;const t=this._eventHandlers.slice(0);for(const i of t)i.handleEvents(e)}}}class JM{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}class eA{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}merge(e){return 0!==e.kind?this:new eA(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}class tA{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}merge(e){return 1!==e.kind?this:new tA(this.oldHasFocus,e.hasFocus)}}class iA{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)}merge(e){return 2!==e.kind?this:new iA(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}class nA{constructor(){this.kind=3}isNoOp(){return!1}merge(e){return this}}class oA{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;if(i!==t.length)return!1;for(let n=0;n0){const e=this._cursors.getSelections();for(let t=0;trA.MAX_CURSOR_COUNT&&(n=n.slice(0,rA.MAX_CURSOR_COUNT),o=!0);const s=aA.from(this._model,this);return this._cursors.setStates(n),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,i,s,o)}setCursorColumnSelectData(e){this._columnSelectData=e}revealPrimary(e,t,i,n,o,s){const r=this._cursors.getViewPositions();let a=null,l=null;r.length>1?l=this._cursors.getViewSelections():a=qo.fromPositions(r[0],r[0]),e.emitViewEvent(new KM(t,i,a,l,n,o,s))}saveState(){const e=[],t=this._cursors.getSelections();for(let i=0,n=t.length;i0){const i=KE.fromModelSelections(t.resultingSelection);this.setStates(e,"modelChange",t.isUndoing?5:t.isRedoing?6:2,i)&&this.revealPrimary(e,"modelChange",!1,0,!0,0)}else{const t=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,KE.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,KE.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&&(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 ar(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn):new ar(n.endLineNumber,n.endColumn,n.startLineNumber,n.startColumn)}})):s[r]=e.selectionsBefore[r];return s}));r||(r=e.selectionsBefore);const a=[];for(let 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{qo.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=ar.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(c){return Jo(c),{operations:[],hadTrackedEditOperation:!1}}return{operations:n,hadTrackedEditOperation:r}}static _getLoserCursorMap(e){(e=e.slice(0)).sort(((e,t)=>-qo.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}}.executeCommands(this._model,this._cursors.getSelections(),e.commands);if(t){this._interpretCommandResult(t);const i=[],n=[];for(let t=0;t0&&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=aA.from(this._model,this);if(s.equals(n))return!1;const r=this._cursors.getSelections(),a=this._cursors.getViewSelections();if(e.emitViewEvent(new FM(a,r)),!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 oA(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,d=n.text.lastIndexOf(a,l-1);if(-1===d)return null;t.push([d,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=aA.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(s){Jo(s)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,i,n,o,!1)&&this.revealPrimary(t,i,!1,0,!0,0)}setIsDoingComposition(e){this._isDoingComposition=e}getAutoClosedCharacters(){return lA.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._selectionsWhenCompositionStarted=this.getSelections().slice(0)}endComposition(e,t){this._executeEdit((()=>{"keyboard"===t&&(this._executeEditOperation(fI.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this._selectionsWhenCompositionStarted,this.getSelections(),this.getAutoClosedCharacters())),this._selectionsWhenCompositionStarted=null)}),e,t)}type(e,t,i){this._executeEdit((()=>{if("keyboard"===i){const e=t.length;let i=0;for(;i{this._executeEditOperation(fI.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 ar(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(fI.paste(this.context.cursorConfig,this._model,this.getSelections(),t,i,n||[]))}),e,o,4)}cut(e,t){this._executeEdit((()=>{this._executeEditOperation(rI.cut(this.context.cursorConfig,this._model,this.getSelections()))}),e,t)}executeCommand(e,t,i){this._executeEdit((()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new YE(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))}),e,i)}executeCommands(e,t,i){this._executeEdit((()=>{this._executeEditOperation(new YE(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))}),e,i)}}rA.MAX_CURSOR_COUNT=1e4;class aA{constructor(e,t){this.modelVersionId=e,this.cursorState=t}static from(e,t){return new aA(e.getVersionId(),t.getCursorStates())}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 dA{constructor(e,t,i,n,o,s){this.id=e,this.label=t,this.alias=i,this._precondition=n,this._run=o,this._contextKeyService=s}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(){return this.isSupported()?this._run():Promise.resolve(void 0)}}const cA="base.contributions.configuration",hA={properties:{},patternProperties:{}},uA={properties:{},patternProperties:{}},gA={properties:{},patternProperties:{}},pA={properties:{},patternProperties:{}},mA={properties:{},patternProperties:{}},fA={properties:{},patternProperties:{}},_A="vscode://schemas/settings/resourceLanguage",vA=Yy.as(uS);const bA="\\[([^\\]]+)\\]",wA=new RegExp(bA,"g"),CA="^(\\[([^\\]]+)\\])+$",yA=new RegExp(CA);function xA(e){const t=[];if(yA.test(e)){let i=wA.exec(e);for(;null==i?void 0:i.length;){const n=i[1].trim();n&&t.push(n),i=wA.exec(e)}}return Qo(t)}const SA=new class{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new $o,this._onDidUpdateConfiguration=new $o,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:mf(0,"Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown editor configuration setting",allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.excludedConfigurationProperties={},vA.registerSchema(_A,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){const i=this.doRegisterConfigurations(e,t);vA.registerSchema(_A,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:i})}registerDefaultConfigurations(e){var t;const i=[],n=[];for(const{overrides:o,source:s}of e)for(const e in o)if(i.push(e),yA.test(e)){const i=Object.assign(Object.assign({},(null===(t=this.configurationDefaultsOverrides.get(e))||void 0===t?void 0:t.value)||{}),o[e]);this.configurationDefaultsOverrides.set(e,{source:s,value:i});const r={type:"object",default:i,description:mf(0,"Configure settings to be overridden for {0} language.",e),$ref:_A,defaultDefaultValue:i,source:Gs(s)?void 0:s};n.push(...xA(e)),this.configurationProperties[e]=r,this.defaultLanguageConfigurationOverridesNode.properties[e]=r}else{this.configurationDefaultsOverrides.set(e,{value:o[e],source:s});const t=this.configurationProperties[e];t&&(this.updatePropertyDefaultValue(e,t),this.updateSchema(e,t))}this.registerOverrideIdentifiers(n),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:i,defaultsOverrides:!0})}registerOverrideIdentifiers(e){for(const t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(e,t){const i=[];return e.forEach((e=>{i.push(...this.validateAndRegisterProperties(e,t,e.extensionInfo,e.restrictedProperties)),this.configurationContributors.push(e),this.registerJSONConfiguration(e)})),i}validateAndRegisterProperties(e,t=!0,i,n,o=3){o=Tr(e.scope)?o:e.scope;let s=[],r=e.properties;if(r)for(let l in r){if(t&&kA(l)){delete r[l];continue}const e=r[l];e.source=i,e.defaultDefaultValue=r[l].default,this.updatePropertyDefaultValue(l,e),yA.test(l)?e.scope=void 0:(e.scope=Tr(e.scope)?o:e.scope,e.restricted=Tr(e.restricted)?!!(null==n?void 0:n.includes(l)):e.restricted),!r[l].hasOwnProperty("included")||r[l].included?(this.configurationProperties[l]=r[l],!r[l].deprecationMessage&&r[l].markdownDeprecationMessage&&(r[l].deprecationMessage=r[l].markdownDeprecationMessage),s.push(l)):(this.excludedConfigurationProperties[l]=r[l],delete r[l])}let a=e.allOf;if(a)for(let l of a)s.push(...this.validateAndRegisterProperties(l,t,i,n,o));return s}getConfigurationProperties(){return this.configurationProperties}registerJSONConfiguration(e){const t=e=>{let i=e.properties;if(i)for(const t in i)this.updateSchema(t,i[t]);let n=e.allOf;n&&n.forEach(t)};t(e)}updateSchema(e,t){switch(hA.properties[e]=t,t.scope){case 1:uA.properties[e]=t;break;case 2:gA.properties[e]=t;break;case 6:pA.properties[e]=t;break;case 3:mA.properties[e]=t;break;case 4:fA.properties[e]=t;break;case 5:fA.properties[e]=t,this.resourceLanguageSettingsSchema.properties[e]=t}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const t=`[${e}]`,i={type:"object",description:mf(0,"Configure editor settings to be overridden for a language."),errorMessage:mf(0,"This setting does not support per-language configuration."),$ref:_A};this.updatePropertyDefaultValue(t,i),hA.properties[t]=i,uA.properties[t]=i,gA.properties[t]=i,pA.properties[t]=i,mA.properties[t]=i,fA.properties[t]=i}this._onDidSchemaChange.fire()}registerOverridePropertyPatternKey(){const e={type:"object",description:mf(0,"Configure editor settings to be overridden for a language."),errorMessage:mf(0,"This setting does not support per-language configuration."),$ref:_A};hA.patternProperties[CA]=e,uA.patternProperties[CA]=e,gA.patternProperties[CA]=e,pA.patternProperties[CA]=e,mA.patternProperties[CA]=e,fA.patternProperties[CA]=e,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){const i=this.configurationDefaultsOverrides.get(e);let n=null==i?void 0:i.value,o=null==i?void 0:i.source;fr(n)&&(n=t.defaultDefaultValue,o=void 0),fr(n)&&(n=function(e){switch(Array.isArray(e)?e[0]:e){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}(t.type)),t.default=n,t.defaultValueSource=o}};function kA(e){return e.trim()?yA.test(e)?mf(0,"Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",e):void 0!==SA.getConfigurationProperties()[e]?mf(0,"Cannot register '{0}'. This property is already registered.",e):null:mf(0,"Cannot register an empty property")}Yy.add(cA,SA);const DA=new class{constructor(){this._onDidChangeLanguages=new $o,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"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0),Yy.as(cA).registerDefaultConfigurations([{overrides:{"[plaintext]":{"editor.unicodeHighlight.ambiguousCharacters":!1,"editor.unicodeHighlight.invisibleCharacters":!1}}}]);var NA=globalThis&&globalThis.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,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){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const EA={getInitialState:()=>$v,tokenizeEncoded:(e,t,i)=>qv(0,i)};function IA(e,t,i,n,o,s,r){let a="
",l=n,d=0,c=!0;for(let h=0,u=t.getCount();h0;)r&&c?(g+=" ",c=!1):(g+=" ",c=!0),e--;break}case 60:g+="<",c=!1;break;case 62:g+=">",c=!1;break;case 38:g+="&",c=!1;break;case 0:g+="�",c=!1;break;case 65279:case 8232:case 8233:case 133:g+="�",c=!1;break;case 13:g+="​",c=!1;break;case 32:r&&c?(g+=" ",c=!1):(g+=" ",c=!0);break;default:g+=String.fromCharCode(t),c=!1}}if(a+=`${g}`,u>o||l>=o)break}return a+="
",a}function TA(e,t,i){let n='
';const o=Is(e);let s=i.getInitialState();for(let r=0,a=o.length;r0&&(n+="
");const a=i.tokenizeEncoded(e,!0,s);zb.convertToEndOffset(a.tokens,e.length);const l=new zb(a.tokens,e,t).inflate();let d=0;for(let t=0,i=l.getCount();t${Mr(e.substring(d,o))}`,d=o}s=a.endState}return n+="
",n}class MA{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(e){this._hasPending=!0,this._inserts.push(e)}change(e){this._hasPending=!0,this._changes.push(e)}remove(e){this._hasPending=!0,this._removes.push(e)}mustCommit(){return this._hasPending}commit(e){if(!this._hasPending)return;const t=this._inserts,i=this._changes,n=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(t,i,n)}}class AA{constructor(e,t,i,n,o){this.id=e,this.afterLineNumber=t,this.ordinal=i,this.height=n,this.minWidth=o,this.prefixSum=0}}class OA{constructor(e,t,i,n){this._instanceId=Ar(++OA.INSTANCE_COUNT),this._pendingChanges=new MA,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=e,this._lineHeight=t,this._paddingTop=i,this._paddingBottom=n}static findInsertionIndex(e,t,i){let n=0,o=e.length;for(;n>>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 AA(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})}})}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=OA.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[o+1].afterLineNumber>=e)return o;i=o+1|0}else n=o-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e|=0;const t=this._findLastWhitespaceBeforeLineNumber(e)+1;return t1?this._lineHeight*(e-1):0;return t+this.getWhitespaceAccumulatedHeightBeforeLineNumber(e)+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),-1===this._minWidth){let e=0;for(let t=0,i=this._arr.length;tthis.getLinesTotalHeight()}isInTopPadding(e){return 0!==this._paddingTop&&(this._checkPendingChanges(),e=this.getLinesTotalHeight()-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(e){if(this._checkPendingChanges(),(e|=0)<0)return 1;const t=0|this._lineCount,i=this._lineHeight;let n=1,o=t;for(;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,d;-1===r?(r=a,d=s+1,l=0):(d=0|this.getAfterLineNumberForWhitespaceIndex(r),l=0|this.getHeightForWhitespaceIndex(r));let c=o,h=c;const u=5e5;let g=0;o>=u&&(g=Math.floor(o/u)*u,g=Math.floor(g/i)*i,h-=g);const p=[],m=e+(t-e)/2;let f=-1;for(let w=n;w<=s;w++){if(-1===f){const e=c,t=c+i;(e<=m&&mm)&&(f=w)}for(c+=i,p[w-n]=h,h+=i;d===w;)h+=l,c+=l,r++,r>=a?d=s+1:(d=0|this.getAfterLineNumberForWhitespaceIndex(r),l=0|this.getHeightForWhitespaceIndex(r));if(c>=t){s=w;break}}-1===f&&(f=s);const _=0|this.getVerticalOffsetForLineNumber(s);let v=n,b=s;return vt&&b--,{bigNumbersDelta:g,startLineNumber:n,endLineNumber:s,relativeVerticalOffset:p,centeredLineNumber:f,completelyVisibleStartLineNumber:v,completelyVisibleEndLineNumber:b}}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;if(e>=this.getVerticalOffsetForWhitespaceIndex(i)+this.getHeightForWhitespaceIndex(i))return-1;for(;t=o+this.getHeightForWhitespaceIndex(n))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);return{id:this.getIdForWhitespaceIndex(t),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(t),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}}OA.INSTANCE_COUNT=0;class RA{constructor(e,t,i,n){(e|=0)<0&&(e=0),(t|=0)<0&&(t=0),(i|=0)<0&&(i=0),(n|=0)<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 PA extends Uo{constructor(e,t){super(),this._onDidContentSizeChange=this._register(new $o),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new RA(0,0,0,0),this._scrollable=this._register(new aT({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 eA(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)}}class FA extends Uo{constructor(e,t,i){super(),this._configuration=e;const n=this._configuration.options,o=n.get(131),s=n.get(75);this._linesLayout=new OA(t,n.get(59),s.top,s.bottom),this._scrollable=this._register(new PA(0,i)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new RA(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(103)?125:0)}onConfigurationChanged(e){const t=this._configuration.options;if(e.hasChanged(59)&&this._linesLayout.setLineHeight(t.get(59)),e.hasChanged(75)){const e=t.get(75);this._linesLayout.setPadding(e.top,e.bottom)}if(e.hasChanged(131)){const e=t.get(131),i=e.contentWidth,n=e.height,o=this._scrollable.getScrollDimensions(),s=o.contentWidth;this._scrollable.setScrollDimensions(new RA(i,o.contentWidth,n,this._getContentHeight(i,n,s)))}else this._updateHeight();e.hasChanged(103)&&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.get(92);return 2===i.horizontal||e>=t?0:i.horizontalScrollbarSize}_getContentHeight(e,t,i){const n=this._configuration.options;let o=this._linesLayout.getLinesTotalHeight();return n.get(94)?o+=Math.max(0,t-n.get(59)-n.get(75).bottom):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 RA(t,e.contentWidth,i,this._getContentHeight(t,i,n)))}getCurrentViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new ow(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new ow(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(e){const t=this._configuration.options,i=t.get(132),n=t.get(44);if(i.isViewportWrapping){const i=t.get(131),o=t.get(65);return e>i.contentWidth+n.typicalHalfwidthCharacterWidth&&o.enabled&&"right"===o.side?e+i.verticalScrollbarWidth:e}{const i=t.get(93)*n.typicalHalfwidthCharacterWidth,o=this._linesLayout.getWhitespaceMinWidth();return Math.max(e+i,o)}}setMaxLineWidth(e){const t=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new RA(t.width,this._computeContentWidth(e),t.height,t.contentHeight)),this._updateHeight()}saveState(){const e=this._scrollable.getFutureScrollPosition(),t=e.scrollTop,i=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t);return{scrollTop:t,scrollTopWithoutViewZones:t-this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(i),scrollLeft:e.scrollLeft}}changeWhitespace(e){const t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(e){return this._linesLayout.getVerticalOffsetForLineNumber(e)}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(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,t){1===t?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}deltaScrollNow(e,t){const i=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:i.scrollLeft+e,scrollTop:i.scrollTop+t})}}class BA{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 n=e.range,o=e.options;let s;if(o.isWholeLine){const e=this._coordinatesConverter.convertModelPositionToViewPosition(new er(n.startLineNumber,1),0),t=this._coordinatesConverter.convertModelPositionToViewPosition(new er(n.endLineNumber,this.model.getLineMaxColumn(n.endLineNumber)),1);s=new qo(e.lineNumber,e.column,t.lineNumber,t.column)}else s=this._coordinatesConverter.convertModelRangeToViewRange(n,1);i=new cw(s,o),this._decorationsCache[t]=i}return i}getDecorationsViewportData(e){let t=null!==this._cachedModelDecorationsResolver;return t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),t||(this._cachedModelDecorationsResolver=this._getDecorationsViewportData(e),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}_getDecorationsViewportData(e){const t=this._linesCollection.getDecorationsInRange(e,this.editorId,Ff(this.configuration.options)),i=e.startLineNumber,n=e.endLineNumber,o=[];let s=0;const r=[];for(let a=i;a<=n;a++)r[a-i]=[];for(let a=0,l=t.length;a1===e))}function zA(e,t){return HA(e,t.range,(e=>2===e))}function HA(e,t,i){for(let n=t.startLineNumber;n<=t.endLineNumber;n++){const o=e.getLineTokens(n),s=n===t.startLineNumber,r=n===t.endLineNumber;let a=s?o.findTokenIndexAtOffset(t.startColumn-1):0;for(;at.endColumn-1)break}if(!i(o.getStandardTokenType(a)))return!1;a++}}return!0}class jA{constructor(e,t,i){this.range=e,this.nestingLevel=t,this.isInvalid=i}}class UA extends class{constructor(e,t,i,n){this.range=e,this.openingBracketRange=t,this.closingBracketRange=i,this.nestingLevel=n}}{constructor(e,t,i,n,o){super(e,t,i,n),this.minVisibleColumnIndentation=o}}class $A{constructor(e,t){this.lineCount=e,this.columnCount=t}toString(){return`${this.lineCount},${this.columnCount}`}}$A.zero=new $A(0,0);const KA=Math.pow(2,26);function qA(e,t){return e*KA+t}function GA(e){const t=e,i=Math.floor(t/KA);return new $A(i,t-i*KA)}function ZA(e,t){return t=t}function JA(e){return qA(e.lineNumber-1,e.column-1)}function eO(e,t){const i=e,n=Math.floor(i/KA),o=i-n*KA,s=t,r=Math.floor(s/KA);return new qo(n+1,o+1,r+1,s-r*KA+1)}class tO{constructor(e,t,i){this.startOffset=e,this.endOffset=t,this.newLength=i}}class iO{constructor(e,t){this.documentLength=t,this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map((e=>nO.from(e)))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);const t=this.edits[this.nextEditIdx];return function(e,t){const i=e,n=t;if(n-i<=0)return 0;const o=Math.floor(i/KA),s=Math.floor(n/KA),r=n-s*KA;if(o===s)return qA(0,r-(i-o*KA));return qA(s-o,r)}(e,t?this.translateOldToCur(t.offsetObj):this.documentLength)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?qA(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):qA(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){const t=GA(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?qA(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):qA(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){for(;this.nextEditIdx>5;if(0===n){const e=1<e};class aO{constructor(){this.items=new Map}getKey(e){let t=this.items.get(e);return void 0===t&&(t=this.items.size,this.items.set(e,t)),t}}class lO{constructor(e){this._length=e}get length(){return this._length}}class dO extends lO{constructor(e,t,i,n,o){super(e),this.openingBracket=t,this.child=i,this.closingBracket=n,this.missingOpeningBracketIds=o}static create(e,t,i){let n=e.length;return t&&(n=ZA(n,t.length)),i&&(n=ZA(n,i.length)),new dO(n,e,t,i,t?t.missingOpeningBracketIds:sO.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=new Array;return e.push(this.openingBracket),this.child&&e.push(this.child),this.closingBracket&&e.push(this.closingBracket),e}canBeReused(e){return null!==this.closingBracket&&!e.intersects(this.missingOpeningBracketIds)}deepClone(){return new dO(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(ZA(e,this.openingBracket.length),t):Number.MAX_SAFE_INTEGER}}class cO extends lO{constructor(e,t,i){super(e),this.listHeight=t,this._missingOpeningBracketIds=i,this.cachedMinIndentation=-1}static create23(e,t,i,n=!1){let o=e.length,s=e.missingOpeningBracketIds;if(e.listHeight!==t.listHeight)throw new Error("Invalid list heights");if(o=ZA(o,t.length),s=s.merge(t.missingOpeningBracketIds),i){if(e.listHeight!==i.listHeight)throw new Error("Invalid list heights");o=ZA(o,i.length),s=s.merge(i.missingOpeningBracketIds)}return n?new uO(o,e.listHeight+1,e,t,i,s):new hO(o,e.listHeight+1,e,t,i,s)}static getEmpty(){return new pO(0,0,[],sO.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}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();if(0===this.childrenLength)return;const e=this.getChild(0),t=4===e.kind?e.toMutable():e;return e!==t&&this.setChild(0,t),t}canBeReused(e){if(e.intersects(this.missingOpeningBracketIds))return!1;let t,i=this;for(;4===i.kind&&(t=i.childrenLength)>0;)i=i.getChild(t-1);return i.canBeReused(e)}handleChildrenChanged(){this.throwIfImmutable();const e=this.childrenLength;let t=this.getChild(0).length,i=this.getChild(0).missingOpeningBracketIds;for(let n=1;nthis.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;null===this.line&&(this.lineTokens=this.textModel.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;for(;;){const n=this.lineTokens,o=n.getCount();let s=null;if(this.lineTokenOffset1e3)break}if(i>1500)break}const n=(o=e,s=t,r=this.lineIdx,a=this.lineCharOffset,o!==r?qA(r-o,a):qA(0,a-s));var o,s,r,a;return new wO(n,0,-1,sO.getEmpty(),new _O(n))}}class xO{constructor(e,t){this.text=e,this._offset=0,this.idx=0;const i=t.getRegExpStr()?new RegExp(t.getRegExpStr()+"|\n","g"):null,n=[];let o,s=0,r=0,a=0,l=0;const d=new Array;for(let u=0;u<60;u++)d.push(new wO(qA(0,u),0,-1,sO.getEmpty(),new _O(qA(0,u))));const c=new Array;for(let u=0;u<60;u++)c.push(new wO(qA(1,u),0,-1,sO.getEmpty(),new _O(qA(1,u))));if(i)for(i.lastIndex=0;null!==(o=i.exec(e));){const e=o.index,i=o[0];if("\n"===i)s++,r=e+1;else{if(a!==e){let t;if(l===s){const i=e-a;if(ifunction(e){const t=Xo(e);return/^[\w ]+$/.test(e)?`\\b${t}\\b`:t}(e))).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"g"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e)}findClosingTokenText(e){for(const[t,i]of this.map)if(i.bracketIds.intersects(e))return t}get isEmpty(){return 0===this.map.size}}class kO{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){const t=this.languageIdToBracketTokens.get(e);if(!t)return!1;const i=SO.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider).getRegExpStr();return t.getRegExpStr()!==i}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=SO.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}function DO(e,t=!1){if(0===e.length)return null;if(1===e.length)return e[0];let i=e.length;for(;i>3;){const n=i>>1;for(let o=0;o=3?e[2]:null,t)}function LO(e,t){return Math.abs(e.listHeight-t.listHeight)}function NO(e,t){return e.listHeight===t.listHeight?cO.create23(e,t,null,!1):e.listHeight>t.listHeight?function(e,t){let i=e=e.toMutable();const n=new Array;let o;for(;;){if(t.listHeight===i.listHeight){o=t;break}if(4!==i.kind)throw new Error("unexpected");n.push(i),i=i.makeLastElementMutable()}for(let s=n.length-1;s>=0;s--){const e=n[s];o?e.childrenLength>=3?o=cO.create23(e.unappendChild(),o,null,!1):(e.appendChildOfSameHeight(o),o=void 0):e.handleChildrenChanged()}return o?cO.create23(e,o,null,!1):e}(e,t):function(e,t){let i=e=e.toMutable();const n=new Array;for(;t.listHeight!==i.listHeight;){if(4!==i.kind)throw new Error("unexpected");n.push(i),i=i.makeFirstElementMutable()}let o=t;for(let s=n.length-1;s>=0;s--){const e=n[s];o?e.childrenLength>=3?o=cO.create23(o,e.unprependChild(),null,!1):(e.prependChildOfSameHeight(o),o=void 0):e.handleChildrenChanged()}return o?cO.create23(o,e,null,!1):e}(t,e)}class EO{constructor(e){this.lastOffset=0,this.nextNodes=[e],this.offsets=[0],this.idxs=[]}readLongestNodeAt(e,t){if(YA(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){const i=TO(this.nextNodes);if(!i)return;const n=TO(this.offsets);if(YA(e,n))return;if(YA(n,e))if(ZA(n,i.length)<=e)this.nextNodeAfterCurrent();else{const e=IO(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=IO(i);if(-1===e)return void this.nextNodeAfterCurrent();this.nextNodes.push(i.getChild(e)),this.offsets.push(n),this.idxs.push(e)}}}}nextNodeAfterCurrent(){for(;;){const e=TO(this.offsets),t=TO(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),0===this.idxs.length)break;const i=TO(this.nextNodes),n=IO(i,this.idxs[this.idxs.length-1]);if(-1!==n){this.nextNodes.push(i.getChild(n)),this.offsets.push(ZA(e,t.length)),this.idxs[this.idxs.length-1]=n;break}this.idxs.pop()}}}function IO(e,t=-1){for(;;){if(++t>=e.childrenLength)return-1;if(e.getChild(t))return t}}function TO(e){return e.length>0?e[e.length-1]:void 0}function MO(e,t,i,n){return new AO(e,t,i,n).parseDocument()}class AO{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 EO(i):void 0,this.positionMapper=new iO(t,e.length)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(sO.getEmpty());return e||(e=cO.getEmpty()),e}parseList(e){const t=new Array;for(;;){const i=this.tokenizer.peek();if(!i||2===i.kind&&i.bracketIds.intersects(e))break;const n=this.parseChild(e);4===n.kind&&0===n.childrenLength||t.push(n)}const i=this.oldNodeReader?function(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;for(t++;t=2?DO(0===i&&t===e.length?e:e.slice(i,t),!1):e[i]}let n=i(),o=i();if(!o)return n;for(let s=i();s;s=i())LO(n,o)<=LO(o,s)?(n=NO(n,o),o=s):o=NO(o,s);return NO(n,o)}(t):DO(t,this.createImmutableLists);return i}parseChild(e){if(this.oldNodeReader){const t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(0!==t){const i=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),(i=>{if(!YA(i.length,t))return!1;return i.canBeReused(e)}));if(i)return this._itemsFromCache++,this.tokenizer.skip(i.length),i}}this._itemsConstructed++;const t=this.tokenizer.read();switch(t.kind){case 2:return new bO(t.bracketIds,t.length);case 0:return t.astNode;case 1:{const i=e.merge(t.bracketIds),n=this.parseList(i),o=this.tokenizer.peek();return o&&2===o.kind&&(o.bracketId===t.bracketId||o.bracketIds.intersects(t.bracketIds))?(this.tokenizer.read(),dO.create(t.astNode,n,o.astNode)):dO.create(t.astNode,n,null)}default:throw new Error("unexpected")}}}class OO extends Uo{constructor(e,t){if(super(),this.textModel=e,this.getLanguageConfiguration=t,this.didChangeEmitter=new $o,this.denseKeyProvider=new aO,this.brackets=new kO(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,0===e.backgroundTokenizationState){const e=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),t=new xO(this.textModel.getValue(),e);this.initialAstWithoutTokens=MO(t,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}else 2===e.backgroundTokenizationState?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):1===e.backgroundTokenizationState&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens)}didLanguageChange(e){return this.brackets.didLanguageChange(e)}handleDidChangeBackgroundTokenizationState(){if(2===this.textModel.backgroundTokenizationState){const e=void 0===this.initialAstWithoutTokens;this.initialAstWithoutTokens=void 0,e||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:e}){const t=e.map((e=>new tO(qA(e.fromLineNumber-1,0),qA(e.toLineNumber,0),qA(e.toLineNumber-e.fromLineNumber+1,0))));this.astWithTokens=this.parseDocumentFromTextBuffer(t,this.astWithTokens,!1),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(e){const t=e.changes.map((e=>{const t=qo.lift(e.range);return new tO(JA(t.getStartPosition()),JA(t.getEndPosition()),function(e){const t=Is(e);return qA(t.length-1,t[t.length-1].length)}(e.text))})).reverse();this.astWithTokens=this.parseDocumentFromTextBuffer(t,this.astWithTokens,!1),this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(t,this.initialAstWithoutTokens,!1))}parseDocumentFromTextBuffer(e,t,i){const n=t;return MO(new CO(this.textModel,this.brackets),e,n,i)}getBracketsInRange(e){const t=qA(e.startLineNumber-1,e.startColumn-1),i=qA(e.endLineNumber-1,e.endColumn-1),n=new Array,o=this.initialAstWithoutTokens||this.astWithTokens;return RO(o,0,o.length,t,i,n),n}getBracketPairsInRange(e,t){const i=new Array,n=JA(e.getStartPosition()),o=JA(e.getEndPosition()),s=this.initialAstWithoutTokens||this.astWithTokens,r=new PO(i,t,this.textModel);return FO(s,0,s.length,n,o,r),i}}function RO(e,t,i,n,o,s,r=0){if(4===e.kind)for(const a of e.children)i=ZA(t,a.length),XA(t,o)&&QA(i,n)&&RO(a,t,i,n,o,s,r),t=i;else if(2===e.kind){r++;if(i=ZA(t,e.openingBracket.length),XA(t,o)&&QA(i,n)){const n=eO(t,i);s.push(new jA(n,r-1,!e.closingBracket))}t=i;if(e.child){const a=e.child;i=ZA(t,a.length),XA(t,o)&&QA(i,n)&&RO(a,t,i,n,o,s,r),t=i}if(e.closingBracket){if(i=ZA(t,e.closingBracket.length),XA(t,o)&&QA(i,n)){const e=eO(t,i);s.push(new jA(e,r-1,!1))}t=i}}else if(3===e.kind){const e=eO(t,i);s.push(new jA(e,r-1,!0))}else if(1===e.kind){const e=eO(t,i);s.push(new jA(e,r-1,!1))}}class PO{constructor(e,t,i){this.result=e,this.includeMinIndentation=t,this.textModel=i}}function FO(e,t,i,n,o,s,r=0){var a;if(2===e.kind){const n=ZA(t,e.openingBracket.length);let o=-1;s.includeMinIndentation&&(o=e.computeMinIndentation(t,s.textModel)),s.result.push(new UA(eO(t,i),eO(t,n),e.closingBracket?eO(ZA(n,(null===(a=e.child)||void 0===a?void 0:a.length)||0),i):void 0,r,o)),r++}let l=t;for(const d of e.children){const e=l;l=ZA(l,d.length),XA(e,o)&&XA(n,l)&&FO(d,e,l,n,o,s,r)}}class BO extends Uo{constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t,this.bracketPairsTree=this._register(new Rr),this.onDidChangeEmitter=new $o,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1,this._register(this.languageConfigurationService.onDidChange((e=>{var t;e.languageId&&!(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.didLanguageChange(e.languageId))||(this.bracketPairsTree.clear(),this.updateBracketPairsTree())})))}get isDocumentSupported(){return this.textModel.getValueLength()<=5e6}handleDidChangeOptions(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(e){var t;null===(t=this.bracketPairsTree.value)||void 0===t||t.object.handleContentChanged(e)}handleDidChangeBackgroundTokenizationState(){var e;null===(e=this.bracketPairsTree.value)||void 0===e||e.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(e){var t;null===(t=this.bracketPairsTree.value)||void 0===t||t.object.handleDidChangeTokens(e)}updateBracketPairsTree(){if(this.bracketsRequested&&this.isDocumentSupported){if(!this.bracketPairsTree.value){const i=new ws;this.bracketPairsTree.value=(e=i.add(new OO(this.textModel,(e=>this.languageConfigurationService.getLanguageConfiguration(e)))),t=i,{object:e,dispose:()=>null==t?void 0:t.dispose()}),i.add(this.bracketPairsTree.value.object.onDidChange((e=>this.onDidChangeEmitter.fire(e)))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire());var e,t}getBracketPairsInRange(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getBracketPairsInRange(e,!1))||[]}getBracketPairsInRangeWithMinIndentation(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getBracketPairsInRange(e,!0))||[]}getBracketsInRange(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getBracketsInRange(e))||[]}findMatchingBracketUp(e,t,i){const n=e.toLowerCase(),o=this.textModel.validatePosition(t),s=this.textModel.getLanguageIdAtPosition(o.lineNumber,o.column),r=this.languageConfigurationService.getLanguageConfiguration(s).brackets;if(!r)return null;const a=r.textIsBracket[n];return a?zO(this._findMatchingBracketUp(a,o,VO(i))):null}matchBracket(e,t){const i=VO(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(V_(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(V_(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.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&&!V_(n.getStandardTokenType(s))){let{searchStartOffset:a,searchEndOffset:l}=this._establishBracketSearchOffsets(e,n,r,s),d=null;for(;;){const n=fv.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 WO)return null;d=i}}a=n.endColumn-1}if(d)return d}if(s>0&&n.getStartOffset(s)===e.column-1){const r=s-1,a=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(r)).brackets;if(a&&!V_(n.getStandardTokenType(r))){const{searchStartOffset:s,searchEndOffset:l}=this._establishBracketSearchOffsets(e,n,a,r),d=fv.findPrevBracketInRange(a.reversedRegex,i,o,s,l);if(d&&d.startColumn<=e.column&&e.column<=d.endColumn){const e=o.substring(d.startColumn-1,d.endColumn-1).toLowerCase(),i=this._matchFoundBracket(d,a.textIsBracket[e],a.textIsOpenBracket[e],t);if(i)return i instanceof WO?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 WO?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)=>{for(;;){if(i&&++r%100==0&&!i())return WO.INSTANCE;const d=fv.findPrevBracketInRange(o,t,n,a,l);if(!d)break;const c=n.substring(d.startColumn-1,d.endColumn-1).toLowerCase();if(e.isOpen(c)?s++:e.isClose(c)&&s--,0===s)return d;l=d.startColumn-1}return null};for(let l=t.lineNumber;l>=1;l--){const e=this.textModel.getLineTokens(l),i=e.getCount(),o=this.textModel.getLineContent(l);let s=i-1,r=o.length,d=o.length;l===t.lineNumber&&(s=e.findTokenIndexAtOffset(t.column-1),r=t.column-1,d=t.column-1);let c=!0;for(;s>=0;s--){const t=e.getLanguageId(s)===n&&!V_(e.getStandardTokenType(s));if(t)c?r=e.getStartOffset(s):(r=e.getStartOffset(s),d=e.getEndOffset(s));else if(c&&r!==d){const e=a(l,o,r,d);if(e)return e}c=t}if(c&&r!==d){const e=a(l,o,r,d);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)=>{for(;;){if(i&&++r%100==0&&!i())return WO.INSTANCE;const d=fv.findNextBracketInRange(o,t,n,a,l);if(!d)break;const c=n.substring(d.startColumn-1,d.endColumn-1).toLowerCase();if(e.isOpen(c)?s++:e.isClose(c)&&s--,0===s)return d;a=d.endColumn-1}return null},l=this.textModel.getLineCount();for(let d=t.lineNumber;d<=l;d++){const e=this.textModel.getLineTokens(d),i=e.getCount(),o=this.textModel.getLineContent(d);let s=0,r=0,l=0;d===t.lineNumber&&(s=e.findTokenIndexAtOffset(t.column-1),r=t.column-1,l=t.column-1);let c=!0;for(;s=1;o--){const e=this.textModel.getLineTokens(o),s=e.getCount(),r=this.textModel.getLineContent(o);let a=s-1,l=r.length,d=r.length;if(o===t.lineNumber){a=e.findTokenIndexAtOffset(t.column-1),l=t.column-1,d=t.column-1;const o=e.getLanguageId(a);i!==o&&(i=o,n=this.languageConfigurationService.getLanguageConfiguration(i).brackets)}let c=!0;for(;a>=0;a--){const t=e.getLanguageId(a);if(i!==t){if(n&&c&&l!==d){const e=fv.findPrevBracketInRange(n.reversedRegex,o,r,l,d);if(e)return this._toFoundBracket(n,e);c=!1}i=t,n=this.languageConfigurationService.getLanguageConfiguration(i).brackets}const s=!!n&&!V_(e.getStandardTokenType(a));if(s)c?l=e.getStartOffset(a):(l=e.getStartOffset(a),d=e.getEndOffset(a));else if(n&&c&&l!==d){const e=fv.findPrevBracketInRange(n.reversedRegex,o,r,l,d);if(e)return this._toFoundBracket(n,e)}c=s}if(n&&c&&l!==d){const e=fv.findPrevBracketInRange(n.reversedRegex,o,r,l,d);if(e)return this._toFoundBracket(n,e)}}return null}findNextBracket(e){const t=this.textModel.validatePosition(e),i=this.textModel.getLineCount();let n=null,o=null;for(let s=t.lineNumber;s<=i;s++){const e=this.textModel.getLineTokens(s),i=e.getCount(),r=this.textModel.getLineContent(s);let a=0,l=0,d=0;if(s===t.lineNumber){a=e.findTokenIndexAtOffset(t.column-1),l=t.column-1,d=t.column-1;const i=e.getLanguageId(a);n!==i&&(n=i,o=this.languageConfigurationService.getLanguageConfiguration(n).brackets)}let c=!0;for(;a{if(!s.has(e)){const i=[];for(let e=0,n=t?t.brackets.length:0;e{for(;;){if(i&&++l%100==0&&!i())return WO.INSTANCE;const a=fv.findNextBracketInRange(e.forwardRegex,t,n,o,s);if(!a)break;const d=n.substring(a.startColumn-1,a.endColumn-1).toLowerCase(),c=e.textIsBracket[d];if(c&&(c.isOpen(d)?r[c.index]++:c.isClose(d)&&r[c.index]--,-1===r[c.index]))return this._matchFoundBracket(a,c,!1,i);o=a.endColumn-1}return null};let c=null,h=null;for(let u=n.lineNumber;u<=o;u++){const e=this.textModel.getLineTokens(u),t=e.getCount(),i=this.textModel.getLineContent(u);let o=0,s=0,r=0;if(u===n.lineNumber){o=e.findTokenIndexAtOffset(n.column-1),s=n.column-1,r=n.column-1;const t=e.getLanguageId(o);c!==t&&(c=t,h=this.languageConfigurationService.getLanguageConfiguration(c).brackets,a(c,h))}let l=!0;for(;o!0;{const t=Date.now();return()=>Date.now()-t<=e}}class WO{constructor(){this._searchCanceledBrand=void 0}}function zO(e){return e instanceof WO?null:e}WO.INSTANCE=new WO;class HO extends Uo{constructor(e){super(),this.textModel=e,this.colorProvider=new jO,this.onDidChangeEmitter=new $o,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){if(void 0===t)return[];if(!this.colorizationOptions.enabled)return[];const n=new Array,o=this.textModel.bracketPairs.getBracketsInRange(e);for(const s of o)n.push({id:`bracket${s.range.toString()}-${s.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(s)},ownerId:0,range:s.range});return n}getAllDecorations(e,t){return void 0===e?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new qo(1,1,this.textModel.getLineCount(),1),e,t):[]}}class jO{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(e.nestingLevel)}getInlineClassNameOfLevel(e){return"bracket-highlighting-"+e%30}}function UO(e){return e.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}sx(((e,t)=>{const i=[_E,vE,bE,wE,CE,yE],n=new jO;t.addRule(`.monaco-editor .${n.unexpectedClosingBracketClassName} { color: ${e.getColor(xE)}; }`);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}; }`)}}));class $O{constructor(e,t,i,n){this.oldPosition=e,this.oldText=t,this.newPosition=i,this.newText=n}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}toString(){return 0===this.oldText.length?`(insert@${this.oldPosition} "${UO(this.newText)}")`:0===this.newText.length?`(delete@${this.oldPosition} "${UO(this.oldText)}")`:`(replace@${this.oldPosition} "${UO(this.oldText)}" with "${UO(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,i){const n=t.length;X_(e,n,i),i+=4;for(let o=0;oe.length)return!1;if(i){if(!Br(e,t))return!1;if(t.length===e.length)return!0;let i=t.length;return t.charAt(t.length-1)===n&&i--,e.charAt(i)===n}return t.charAt(t.length-1)!==n&&(t+=n),0===e.indexOf(t)}function XO(e){return e>=65&&e<=90||e>=97&&e<=122}function QO(e,t){return!!(void 0!==t?t:Rs)&&(XO(e.charCodeAt(0))&&58===e.charCodeAt(1))}function JO(e){return Wr(e,!0)}class eR{constructor(e){this._ignorePathCasing=e}compare(e,t,i=!1){return e===t?0:zr(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===Yw.file)return YO(JO(e),JO(t),this._ignorePathCasing(e))&&e.query===t.query&&(i||e.fragment===t.fragment);if(cR(e.authority,t.authority))return YO(e.path,t.path,this._ignorePathCasing(e),"/")&&e.query===t.query&&(i||e.fragment===t.fragment)}return!1}joinPath(e,...t){return Ps.joinPath(e,...t)}basenameOrAuthority(e){return oR(e)||e.authority}basename(e){return Pr.basename(e.path)}extname(e){return Pr.extname(e.path)}dirname(e){if(0===e.path.length)return e;let t;return e.scheme===Yw.file?t=Ps.file(Hr(JO(e))).path:(t=Pr.dirname(e.path),e.authority&&t.length&&47!==t.charCodeAt(0)&&(t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return t=e.scheme===Yw.file?Ps.file(Vr(JO(e))).path:Pr.normalize(e.path),e.with({path:t})}relativePath(e,t){if(e.scheme!==t.scheme||!cR(e.authority,t.authority))return;if(e.scheme===Yw.file){const i=jr(JO(e),JO(t));return Rs?GO(i):i}let i=e.path||"/",n=t.path||"/";if(this._ignorePathCasing(e)){let e=0;for(const t=Math.min(i.length,n.length);eZO(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=Fr){return hR(e,t)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,t=Fr){let i=!1;if(e.scheme===Yw.file){const n=JO(e);i=void 0!==n&&n.length===ZO(n).length&&n[n.length-1]===t}else{t="/";const n=e.path;i=1===n.length&&47===n.charCodeAt(n.length-1)}return i||hR(e,t)?e:e.with({path:e.path+"/"})}}const tR=new eR((()=>!1));new eR((e=>e.scheme!==Yw.file||!Vo)),new eR((e=>!0));const iR=tR.isEqual.bind(tR);tR.isEqualOrParent.bind(tR),tR.getComparisonKey.bind(tR);const nR=tR.basenameOrAuthority.bind(tR),oR=tR.basename.bind(tR),sR=tR.extname.bind(tR),rR=tR.dirname.bind(tR),aR=tR.joinPath.bind(tR),lR=tR.normalizePath.bind(tR);tR.relativePath.bind(tR);const dR=tR.resolvePath.bind(tR);tR.isAbsolutePath.bind(tR);const cR=tR.isEqualAuthority.bind(tR),hR=tR.hasTrailingPathSeparator.bind(tR);var uR;function gR(e){return e.toString()}tR.removeTrailingPathSeparator.bind(tR),tR.addTrailingPathSeparator.bind(tR),function(e){e.META_DATA_LABEL="label",e.META_DATA_DESCRIPTION="description",e.META_DATA_SIZE="size",e.META_DATA_MIME="mime",e.parseMetaData=function(t){const i=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach((e=>{const[t,n]=e.split(":");t&&n&&i.set(t,n)}));const n=t.path.substring(0,t.path.indexOf(";"));return n&&i.set(e.META_DATA_MIME,n),i}}(uR||(uR={}));class pR{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}static create(e,t){const i=e.getAlternativeVersionId(),n=fR(e);return new pR(i,i,n,n,t,t,[])}append(e,t,i,n,o){var s,r;t.length>0&&(this.changes=(s=this.changes,r=t,null===s||0===s.length?r:new KO(s,r).compress())),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(X_(e,t?t.length:0,i),i+=4,t)for(const n of t)X_(e,n.selectionStartLineNumber,i),i+=4,X_(e,n.selectionStartColumn,i),i+=4,X_(e,n.positionLineNumber,i),i+=4,X_(e,n.positionColumn,i),i+=4;return i}static _readSelections(e,t,i){const n=Y_(e,t);t+=4;for(let o=0;oe.toString())).join(", ")}matchesResource(e){return(Ps.isUri(this.model)?this.model:this.model.uri).toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof pR}append(e,t,i,n,o){this._data instanceof pR&&this._data.append(e,t,i,n,o)}close(){this._data instanceof pR&&(this._data=this._data.serialize())}open(){this._data instanceof pR||(this._data=pR.deserialize(this._data))}undo(){if(Ps.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof pR&&(this._data=this._data.serialize());const e=pR.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(Ps.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof pR&&(this._data=this._data.serialize());const e=pR.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof pR&&(this._data=this._data.serialize()),this._data.byteLength+168}}function fR(e){return"\n"===e.getEOL()?0:1}function _R(e){return!!e&&(e instanceof mR||e instanceof class{constructor(e,t){this.type=1,this.label=e,this._isOpen=!0,this._editStackElementsArr=t.slice(0),this._editStackElementsMap=new Map;for(const i of this._editStackElementsArr){const e=gR(i.resource);this._editStackElementsMap.set(e,i)}this._delegate=null}get resources(){return this._editStackElementsArr.map((e=>e.resource))}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=gR(e);return this._editStackElementsMap.has(t)}setModel(e){const t=gR(Ps.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=gR(e.uri);return!!this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).canAppend(e)}append(e,t,i,n,o){const s=gR(e.uri);this._editStackElementsMap.get(s).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=gR(e);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).heapSize():0}split(){return this._editStackElementsArr}toString(){let e=[];for(const t of this._editStackElementsArr)e.push(`${oR(t.resource)}: ${t}`);return`{${e.join(", ")}}`}})}class vR{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);_R(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);_R(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e){const t=this._undoRedoService.getLastElement(this._model.uri);if(_R(t)&&t.canAppend(this._model))return t;const i=new mR(this._model,e);return this._undoRedoService.pushElement(i),i}pushEOL(e){const t=this._getOrCreateEditStackElement(null);this._model.setEOL(e),t.append(this._model,[],fR(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,i){const n=this._getOrCreateEditStackElement(e),o=this._model.applyEdits(t,!0),s=vR._computeCursorState(i,o),r=o.map(((e,t)=>({index:t,textChange:e.textChange})));return r.sort(((e,t)=>e.textChange.oldPosition===t.textChange.oldPosition?e.index-t.index:e.textChange.oldPosition-t.textChange.oldPosition)),n.append(this._model,r.map((e=>e.textChange)),fR(this._model),this._model.getAlternativeVersionId(),s),s}static _computeCursorState(e,t){try{return e?e(t):null}catch(i){return Jo(i),null}}}class bR{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function wR(e,t,i,n,o){let s;for(o.spacesDiff=0,o.looksLikeAlignment=!1,s=0;s0&&a>0)return;if(l>0&&d>0)return;const c=Math.abs(a-d),h=Math.abs(r-l);if(0===c)return o.spacesDiff=h,void(h>0&&0<=l-1&&l-10?o++:m>1&&s++,wR(r,a,l,p,c),c.looksLikeAlignment&&(!i||t!==c.spacesDiff))continue;const _=c.spacesDiff;_<=8&&d[_]++,r=l,a=p}let h=i;o!==s&&(h=o{const i=d[t];i>e&&(e=i,u=t)})),4===u&&d[4]>0&&d[2]>0&&d[2]>=d[4]/2&&(u=2)}return{insertSpaces:h,tabSize:u}}function yR(e){return(1&e.metadata)>>>0}function xR(e,t){e.metadata=254&e.metadata|t<<0}function SR(e){return(2&e.metadata)>>>1==1}function kR(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function DR(e){return(4&e.metadata)>>>2==1}function LR(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function NR(e,t){e.metadata=231&e.metadata|t<<3}function ER(e,t){e.metadata=223&e.metadata|(t?1:0)<<5}class IR{constructor(e,t,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,xR(this,1),this.start=t,this.end=i,this.delta=0,this.maxEnd=i,this.id=e,this.ownerId=0,this.options=null,LR(this,!1),NR(this,1),ER(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=null,kR(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;LR(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),NR(this,this.options.stickiness),ER(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 TR=new IR(null,0,0);TR.parent=TR,TR.left=TR,TR.right=TR,xR(TR,0);class MR{constructor(){this.root=TR,this.requestNormalizeDelta=!1}intervalSearch(e,t,i,n,o){return this.root===TR?[]:function(e,t,i,n,o,s){let r=e.root,a=0,l=0,d=0,c=0;const h=[];let u=0;for(;r!==TR;)if(SR(r))kR(r.left,!1),kR(r.right,!1),r===r.parent.right&&(a-=r.parent.delta),r=r.parent;else{if(!SR(r.left)){if(l=a+r.maxEnd,li)kR(r,!0);else{if(c=a+r.end,c>=t){r.setCachedOffsets(d,c,s);let e=!0;n&&r.ownerId&&r.ownerId!==n&&(e=!1),o&&DR(r)&&(e=!1),e&&(h[u++]=r)}kR(r,!0),r.right===TR||SR(r.right)||(a+=r.delta,r=r.right)}}return kR(e.root,!1),h}(this,e,t,i,n,o)}search(e,t,i){return this.root===TR?[]:function(e,t,i,n){let o=e.root,s=0,r=0,a=0;const l=[];let d=0;for(;o!==TR;){if(SR(o)){kR(o.left,!1),kR(o.right,!1),o===o.parent.right&&(s-=o.parent.delta),o=o.parent;continue}if(o.left!==TR&&!SR(o.left)){o=o.left;continue}r=s+o.start,a=s+o.end,o.setCachedOffsets(r,a,n);let e=!0;t&&o.ownerId&&o.ownerId!==t&&(e=!1),i&&DR(o)&&(e=!1),e&&(l[d++]=o),kR(o,!0),o.right===TR||SR(o.right)||(s+=o.delta,o=o.right)}return kR(e.root,!1),l}(this,e,t,i)}collectNodesFromOwner(e){return function(e,t){let i=e.root;const n=[];let o=0;for(;i!==TR;)SR(i)?(kR(i.left,!1),kR(i.right,!1),i=i.parent):i.left===TR||SR(i.left)?(i.ownerId===t&&(n[o++]=i),kR(i,!0),i.right===TR||SR(i.right)||(i=i.right)):i=i.left;return kR(e.root,!1),n}(this,e)}collectNodesPostOrder(){return function(e){let t=e.root;const i=[];let n=0;for(;t!==TR;)SR(t)?(kR(t.left,!1),kR(t.right,!1),t=t.parent):t.left===TR||SR(t.left)?t.right===TR||SR(t.right)?(i[n++]=t,kR(t,!0)):t=t.right:t=t.left;return kR(e.root,!1),i}(this)}insert(e){RR(this,e),this._normalizeDeltaIfNecessary()}delete(e){PR(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const i=e;let n=0;for(;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=function(e,t,i){let n=e.root,o=0,s=0,r=0,a=0;const l=[];let d=0;for(;n!==TR;)if(SR(n))kR(n.left,!1),kR(n.right,!1),n===n.parent.right&&(o-=n.parent.delta),n=n.parent;else{if(!SR(n.left)){if(s=o+n.maxEnd,si?kR(n,!0):(a=o+n.end,a>=t&&(n.setCachedOffsets(r,a,0),l[d++]=n),kR(n,!0),n.right===TR||SR(n.right)||(o+=n.delta,n=n.right))}return kR(e.root,!1),l}(this,e,e+t);for(let s=0,r=o.length;si?(o.start+=l,o.end+=l,o.delta+=l,(o.delta<-1073741824||o.delta>1073741824)&&(e.requestNormalizeDelta=!0),kR(o,!0)):(kR(o,!0),o.right===TR||SR(o.right)||(s+=o.delta,o=o.right))}kR(e.root,!1)}(this,e,e+t,i),this._normalizeDeltaIfNecessary();for(let s=0,r=o.length;si)&&(1!==n&&(2===n||t))}function OR(e,t,i,n,o){const s=function(e){return(24&e.metadata)>>>3}(e),r=0===s||2===s,a=1===s||2===s,l=i-t,d=n,c=Math.min(l,d),h=e.start;let u=!1;const g=e.end;let p=!1;t<=h&&g<=i&&function(e){return(32&e.metadata)>>>5==1}(e)&&(e.start=t,u=!0,e.end=t,p=!0);{const e=o?1:l>0?2:0;!u&&AR(h,r,t,e)&&(u=!0),!p&&AR(g,a,t,e)&&(p=!0)}if(c>0&&!o){const e=l>d?2:0;!u&&AR(h,r,t+c,e)&&(u=!0),!p&&AR(g,a,t+c,e)&&(p=!0)}{const n=o?1:0;!u&&AR(h,r,i,n)&&(e.start=t+d,u=!0),!p&&AR(g,a,i,n)&&(e.end=t+d,p=!0)}const m=d-l;u||(e.start=Math.max(0,h+m)),p||(e.end=Math.max(0,g+m)),e.start>e.end&&(e.end=e.start)}function RR(e,t){if(e.root===TR)return t.parent=TR,t.left=TR,t.right=TR,xR(t,0),e.root=t,e.root;!function(e,t){let i=0,n=e.root;const o=t.start,s=t.end;for(;;){if(jR(o,s,n.start+i,n.end+i)<0){if(n.left===TR){t.start-=i,t.end-=i,t.maxEnd-=i,n.left=t;break}n=n.left}else{if(n.right===TR){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=TR,t.right=TR,xR(t,1)}(e,t),HR(t.parent);let i=t;for(;i!==e.root&&1===yR(i.parent);)if(i.parent===i.parent.parent.left){const t=i.parent.parent.right;1===yR(t)?(xR(i.parent,0),xR(t,0),xR(i.parent.parent,1),i=i.parent.parent):(i===i.parent.right&&(i=i.parent,BR(e,i)),xR(i.parent,0),xR(i.parent.parent,1),VR(e,i.parent.parent))}else{const t=i.parent.parent.left;1===yR(t)?(xR(i.parent,0),xR(t,0),xR(i.parent.parent,1),i=i.parent.parent):(i===i.parent.left&&(i=i.parent,VR(e,i)),xR(i.parent,0),xR(i.parent.parent,1),BR(e,i.parent.parent))}return xR(e.root,0),t}function PR(e,t){let i,n;if(t.left===TR?(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===TR?(i=t.left,n=t):(n=function(e){for(;e.left!==TR;)e=e.left;return e}(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,xR(i,0),t.detach(),FR(),zR(i),void(e.root.parent=TR);const o=1===yR(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,xR(n,yR(t)),t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==TR&&(n.left.parent=n),n.right!==TR&&(n.right.parent=n)),t.detach(),o)return HR(i.parent),n!==t&&(HR(n),HR(n.parent)),void FR();let s;for(HR(i),HR(i.parent),n!==t&&(HR(n),HR(n.parent));i!==e.root&&0===yR(i);)i===i.parent.left?(s=i.parent.right,1===yR(s)&&(xR(s,0),xR(i.parent,1),BR(e,i.parent),s=i.parent.right),0===yR(s.left)&&0===yR(s.right)?(xR(s,1),i=i.parent):(0===yR(s.right)&&(xR(s.left,0),xR(s,1),VR(e,s),s=i.parent.right),xR(s,yR(i.parent)),xR(i.parent,0),xR(s.right,0),BR(e,i.parent),i=e.root)):(s=i.parent.left,1===yR(s)&&(xR(s,0),xR(i.parent,1),VR(e,i.parent),s=i.parent.left),0===yR(s.left)&&0===yR(s.right)?(xR(s,1),i=i.parent):(0===yR(s.left)&&(xR(s.right,0),xR(s,1),BR(e,s),s=i.parent.left),xR(s,yR(i.parent)),xR(i.parent,0),xR(s.left,0),VR(e,i.parent),i=e.root));xR(i,0),FR()}function FR(){TR.parent=TR,TR.delta=0,TR.start=0,TR.end=0}function BR(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!==TR&&(i.left.parent=t),i.parent=t.parent,t.parent===TR?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i,zR(t),zR(i)}function VR(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!==TR&&(i.right.parent=t),i.parent=t.parent,t.parent===TR?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i,zR(t),zR(i)}function WR(e){let t=e.end;if(e.left!==TR){const i=e.left.maxEnd;i>t&&(t=i)}if(e.right!==TR){const i=e.right.maxEnd+e.delta;i>t&&(t=i)}return t}function zR(e){e.maxEnd=WR(e)}function HR(e){for(;e!==TR;){const t=WR(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}function jR(e,t,i,n){return e===i?t-n:e-i}class UR{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!==$R)return KR(this.right);let e=this;for(;e.parent!==$R&&e.parent.left!==e;)e=e.parent;return e.parent===$R?$R:e.parent}prev(){if(this.left!==$R)return qR(this.left);let e=this;for(;e.parent!==$R&&e.parent.right!==e;)e=e.parent;return e.parent===$R?$R:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const $R=new UR(null,0);function KR(e){for(;e.left!==$R;)e=e.left;return e}function qR(e){for(;e.right!==$R;)e=e.right;return e}function GR(e){return e===$R?0:e.size_left+e.piece.length+GR(e.right)}function ZR(e){return e===$R?0:e.lf_left+e.piece.lineFeedCnt+ZR(e.right)}function YR(){$R.parent=$R}function XR(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!==$R&&(i.left.parent=t),i.parent=t.parent,t.parent===$R?e.root=i:t.parent.left===t?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i}function QR(e,t){const i=t.left;t.left=i.right,i.right!==$R&&(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===$R?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i}function JR(e,t){let i,n;if(t.left===$R?(n=t,i=n.right):t.right===$R?(n=t,i=n.left):(n=KR(t.right),i=n.right),n===e.root)return e.root=i,i.color=0,t.detach(),YR(),void(e.root.parent=$R);const o=1===n.color;if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?(i.parent=n.parent,iP(e,i)):(n.parent===t?i.parent=n:i.parent=n.parent,iP(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!==$R&&(n.left.parent=n),n.right!==$R&&(n.right.parent=n),n.size_left=t.size_left,n.lf_left=t.lf_left,iP(e,n)),t.detach(),i.parent.left===i){const t=GR(i),n=ZR(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,tP(e,i.parent,o,s)}}if(iP(e,i.parent),o)return void YR();let s;for(;i!==e.root&&0===i.color;)i===i.parent.left?(s=i.parent.right,1===s.color&&(s.color=0,i.parent.color=1,XR(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,QR(e,s),s=i.parent.right),s.color=i.parent.color,i.parent.color=0,s.right.color=0,XR(e,i.parent),i=e.root)):(s=i.parent.left,1===s.color&&(s.color=0,i.parent.color=1,QR(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,XR(e,s),s=i.parent.left),s.color=i.parent.color,i.parent.color=0,s.left.color=0,QR(e,i.parent),i=e.root));i.color=0,YR()}function eP(e,t){for(iP(e,t);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&&XR(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,QR(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&&QR(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,XR(e,t.parent.parent))}e.root.color=0}function tP(e,t,i,n){for(;t!==e.root&&t!==$R;)t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}function iP(e,t){let i=0,n=0;if(t!==e.root){for(;t!==e.root&&t===t.parent.right;)t=t.parent;if(t!==e.root)for(i=GR((t=t.parent).left)-t.size_left,n=ZR(t.left)-t.lf_left,t.size_left+=i,t.lf_left+=n;t!==e.root&&(0!==i||0!==n);)t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}}$R.parent=$R,$R.left=$R,$R.right=$R,$R.color=0;const nP=65535;function oP(e){let t;return t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length),t.set(e,0),t}class sP{constructor(e,t,i,n,o){this.lineStarts=e,this.cr=t,this.lf=i,this.crlf=n,this.isBasicASCII=o}}function rP(e,t=!0){const i=[0];let n=1;for(let o=0,s=e.length;o(e!==$R&&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 cP{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 hP{constructor(e,t,i){this.create(e,t,i)}create(e,t,i){this._buffers=[new lP("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=$R,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=rP(e[o].buffer));const t=new aP(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 cP(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){const t=65535-Math.floor(21845),i=2*t;let n="",o=0;const s=[];if(this.iterate(this.root,(r=>{const a=this.getNodeContent(r),l=a.length;if(o<=t||o+l0){const t=n.replace(/\r\n|\r|\n/g,e);s.push(new lP(t,rP(t)))}this.create(s,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new dP(this,e)}getOffsetAt(e,t){let i=0,n=this.root;for(;n!==$R;)if(n.left!==$R&&n.lf_left+1>=e)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt+1>=e){i+=n.size_left;return i+(this.getAccumulatedValue(n,e-n.lf_left-2)+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;for(;t!==$R;)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);return new er(i+1,n-e+1)}return new er(i+1,o.remainder+1)}if(e-=t.size_left+t.piece.length,i+=t.lf_left+t.piece.lineFeedCnt,t.right===$R){const t=this.getOffsetAt(i+1,1);return new er(i+1,n-e-t+1)}t=t.right}return new er(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);for(i=i.next();i!==$R;){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===$R)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,d=s.start.line,c=s.end.line;let h=l[d]+s.start.column;if(n&&(10===a.charCodeAt(h)&&(h++,r--),e[t++]=i,i="",n=!1,0===r))return!0;if(d===c)return this._EOLNormalized||13!==a.charCodeAt(h+r-1)?i+=a.substr(h,r):(n=!0,i+=a.substr(h,r-1)),!0;i+=this._EOLNormalized?a.substring(h,Math.max(h,l[d+1]-this._EOLLength)):a.substring(h,l[d+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;for(let n=d+1;ne+g,t.reset(0)):(_=h.buffer,v=e=>e,t.reset(g));do{if(m=t.next(_),m){if(v(m.index)>=p)return d;this.positionInBuffer(e,v(m.index)-u,f);const t=this.getLineFeedCnt(e.piece.bufferIndex,o,f),s=f.line===o.line?f.column-o.column+n:f.column+1,r=s+m[0].length;if(c[d++]=Kr(new qo(i+t,s,i+t,r),m,a),v(m.index)+m[0].length>=p)return d;if(d>=l)return d}}while(m);return d}findMatchesLineByLine(e,t,i,n){const o=[];let s=0;const r=new qr(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 d=this.positionInBuffer(a.node,a.remainder);const c=this.positionInBuffer(l.node,l.remainder);if(a.node===l.node)return this.findMatchesInNode(a.node,r,e.startLineNumber,e.startColumn,d,c,t,i,n,s,o),o;let h=e.startLineNumber,u=a.node;for(;u!==l.node;){const l=this.getLineFeedCnt(u.piece.bufferIndex,d,u.piece.end);if(l>=1){const a=this._buffers[u.piece.bufferIndex].lineStarts,c=this.offsetInBuffer(u.piece.bufferIndex,u.piece.start),g=a[d.line+l],p=h===e.startLineNumber?e.startColumn:1;if(s=this.findMatchesInNode(u,r,h,p,d,this.positionInBuffer(u,g-c),t,i,n,s,o),s>=n)return o;h+=l}const c=h===e.startLineNumber?e.startColumn-1:0;if(h===e.endLineNumber){const a=this.getLineContent(h).substring(c,e.endColumn-1);return s=this._findMatchesInLine(t,r,a,e.endLineNumber,c,s,o,i,n),o}if(s=this._findMatchesInLine(t,r,this.getLineContent(h).substr(c),h,c,s,o,i,n),s>=n)return o;h++,a=this.nodeAt2(h,1),u=a.node,d=this.positionInBuffer(a.node,a.remainder)}if(h===e.endLineNumber){const a=h===e.startLineNumber?e.startColumn-1:0,l=this.getLineContent(h).substring(a,e.endColumn-1);return s=this._findMatchesInLine(t,r,l,e.endLineNumber,a,s,o,i,n),o}const g=h===e.startLineNumber?e.startColumn:1;return s=this.findMatchesInNode(l.node,r,h,g,d,c,t,i,n,s,o),o}_findMatchesInLine(e,t,i,n,o,s,r,a,l){const d=e.wordSeparators;if(!a&&e.simpleSearch){const t=e.simpleSearch,a=t.length,c=i.length;let h=-a;for(;-1!==(h=i.indexOf(t,h+a));)if((!d||Gr(d,i,c,h,a))&&(r[s++]=new Zr(new qo(n,h+1+o,n,h+1+a+o),null),s>=l))return s;return s}let c;t.reset(0);do{if(c=t.next(i),c&&(r[s++]=Kr(new qo(n,c.index+1+o,n,c.index+1+c[0].length+o),c,a),s>=l))return s}while(c);return s}insert(e,t,i=!1){if(this._EOLNormalized=this._EOLNormalized&&i,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==$R){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 aP(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)){if(10===this.nodeCharCodeAt(i,n)){const e={line:o.start.line+1,column:0};o=new aP(o.bufferIndex,e,o.end,this.getLineFeedCnt(o.bufferIndex,e,o.end),o.length-1),t+="\n"}}if(this.shouldCheckCRLF()&&this.startWithLF(t)){if(13===this.nodeCharCodeAt(i,n-1)){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 d=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=c))break;a=d+1}return i?(i.line=d,i.column=r-h,null):{line:d,column:r-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;return 13===this._buffers[e].buffer.charCodeAt(r)?i.line-t.line+1:i.line-t.line}offsetInBuffer(e,t){return this._buffers[e].lineStarts[t.line]+t.column}deleteNodes(e){for(let t=0;tnP){const t=[];for(;e.length>nP;){const i=e.charCodeAt(65534);let n;13===i||i>=55296&&i<=56319?(n=e.substring(0,65534),e=e.substring(65534)):(n=e.substring(0,nP),e=e.substring(nP));const o=rP(n);t.push(new aP(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 lP(n,o))}const i=rP(e);return t.push(new aP(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 lP(e,i)),t}let t=this._buffers[0].buffer.length;const i=rP(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}}for(i=i.next();i!==$R;){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;for(;e!==$R;)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,d=r-o,c=i.length+d;e.piece=new aP(i.bufferIndex,i.start,s,a,c),tP(this,e,d,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=r-n,l=o-this.offsetInBuffer(i.bufferIndex,s),d=i.length+l;e.piece=new aP(i.bufferIndex,s,i.end,r,d),tP(this,e,l,a)}shrinkNode(e,t,i){const n=e.piece,o=n.start,s=n.end,r=n.length,a=n.lineFeedCnt,l=t,d=this.getLineFeedCnt(n.bufferIndex,n.start,l),c=this.offsetInBuffer(n.bufferIndex,t)-this.offsetInBuffer(n.bufferIndex,o);e.piece=new aP(n.bufferIndex,n.start,l,d,c),tP(this,e,c-r,d-a);const h=new aP(n.bufferIndex,i,s,this.getLineFeedCnt(n.bufferIndex,i,s),this.offsetInBuffer(n.bufferIndex,s)-this.offsetInBuffer(n.bufferIndex,i)),u=this.rbInsertRight(e,h);this.validateCRLFWithPrevNode(u)}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=rP(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;for(;i!==$R;)if(i.left!==$R&&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}for(i=i.next();i!==$R;){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){return{node:i,remainder:t-1,nodeStartOffset:this.offsetOfNode(i)}}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;for(;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===$R||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;return!(i[n+1]>o+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(o)}endWithCR(e){return"string"==typeof e?13===e.charCodeAt(e.length-1):e!==$R&&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 aP(e.piece.bufferIndex,e.piece.start,o,r,s),tP(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,d=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new aP(t.piece.bufferIndex,a,t.piece.end,d,l),tP(this,t,-1,-1),0===t.piece.length&&i.push(t);const c=this.createNewPieces("\r\n");this.rbInsertRight(e,c[0]);for(let h=0;he.sortIndex-t.sortIndex))}this._mightContainRTL=n,this._mightContainUnusualLineTerminators=o,this._mightContainNonBasicASCII=s;const u=this._doApplyEdits(a);let g=null;if(t&&c.length>0){c.sort(((e,t)=>t.lineNumber-e.lineNumber)),g=[];for(let e=0,t=c.length;e0&&c[e-1].lineNumber===t)continue;const i=c[e].oldContent,n=this.getLineContent(t);0!==n.length&&n!==i&&-1===xs(n)&&g.push(t)}}return this._onDidChangeContent.fire(),new Xr(h,u,g)}_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 qo(i.startLineNumber,i.startColumn,n.endLineNumber,n.endColumn);let s=i.startLineNumber,r=i.startColumn;const a=[];for(let u=0,g=e.length;u0&&a.push(i.text),s=n.endLineNumber,r=n.endColumn}const l=a.join(""),[d,c,h]=uP(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:d,firstLineLength:c,lastLineLength:h,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(gP._sortOpsDescending);const t=[];for(let i=0;i0){const e=r.eolCount+1;d=1===e?new qo(a,l,a,l+r.firstLineLength):new qo(a,l,a+e-1,r.lastLineLength+1)}else d=new qo(a,l,a,l);i=d.endLineNumber,n=d.endColumn,t.push(d),o=r}return t}static _sortOpsAscending(e,t){const i=qo.compareRangesUsingEnds(e.range,t.range);return 0===i?e.sortIndex-t.sortIndex:i}static _sortOpsDescending(e,t){const i=qo.compareRangesUsingEnds(e.range,t.range);return 0===i?t.sortIndex-e.sortIndex:-i}}class pP{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=function(e,t){e.length=0,e[0]=0;let i=1,n=0,o=0,s=0,r=!0;for(let l=0,d=t.length;l126)&&(r=!1)}const a=new sP(oP(e),n,o,s,r);return e.length=0,a}(this._tmpLineStarts,e);this.chunks.push(new lP(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,this.isBasicASCII&&(this.isBasicASCII=t.isBasicASCII),this.isBasicASCII||this.containsRTL||(this.containsRTL=Ls(e)),this.isBasicASCII||this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=Yr(e))}finish(e=!0){return this._finish(),new pP(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=rP(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}}}class fP{constructor(e,t){this._startLineNumber=e,this._tokens=t}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._startLineNumber+this._tokens.length-1}getLineTokens(e){return this._tokens[e-this._startLineNumber]}appendLineTokens(e){this._tokens.push(e)}}class _P{constructor(){this._tokens=[]}add(e,t){if(this._tokens.length>0){const i=this._tokens[this._tokens.length-1];if(i.endLineNumber+1===e)return void i.appendLineTokens(t)}this._tokens.push(new fP(e,[t]))}finalize(){return this._tokens}}class vP{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}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;n{const t=this._textModel.getLanguageId();-1!==e.changedLanguages.indexOf(t)&&(this._resetTokenizationState(),this._textModel.clearTokens())}))),this._resetTokenizationState()}dispose(){this._isDisposed=!0,super.dispose()}handleDidChangeContent(e){if(e.isFlush)this._resetTokenizationState();else{if(this._tokenizationStateStore)for(let t=0,i=e.changes.length;t{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(e)})))}_backgroundTokenizeWithDeadline(e){const t=Date.now()+e.timeRemaining(),i=()=>{!this._isDisposed&&this._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&(this._backgroundTokenizeForAtLeast1ms(),Date.now()1)break;if(this._tokenizeOneInvalidLine(t)>=e)break}while(this._hasLinesToTokenize());this._textModel.setTokens(t.finalize(),!this._hasLinesToTokenize())}tokenizeViewport(e,t){const i=new _P;this._tokenizeViewport(i,e,t),this._textModel.setTokens(i.finalize(),!this._hasLinesToTokenize())}reset(){this._resetTokenizationState(),this._textModel.clearTokens()}forceTokenization(e){const t=new _P;this._updateTokensUntilLine(t,e),this._textModel.setTokens(t.finalize(),!this._hasLinesToTokenize())}getTokenTypeIfInsertingCharacter(e,t){if(!this._tokenizationStateStore)return 0;this.forceTokenization(e.lineNumber);const i=this._tokenizationStateStore.getBeginState(e.lineNumber-1);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=CP(this._languageIdCodec,n,this._tokenizationStateStore.tokenizationSupport,s,!0,i),a=new zb(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;if(!this._tokenizationStateStore)return null;this.forceTokenization(n);const s=this._tokenizationStateStore.getBeginState(n-1);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),d=CP(this._languageIdCodec,l,this._tokenizationStateStore.tokenizationSupport,a,!0,s);return new zb(d.tokens,a,this._languageIdCodec)}isCheapToTokenize(e){if(!this._tokenizationStateStore)return!0;const t=this._tokenizationStateStore.invalidLineStartIndex+1;return!(e>t)&&(e1&&l>=1;l--){const e=this._textModel.getLineFirstNonWhitespaceColumn(l);if(0!==e&&e=0;l--){a=CP(this._languageIdCodec,r,this._tokenizationStateStore.tokenizationSupport,o[l],!1,a).endState}for(let l=t;l<=i;l++){const t=this._textModel.getLineContent(l),i=CP(this._languageIdCodec,r,this._tokenizationStateStore.tokenizationSupport,t,!0,a);e.add(l,i.tokens),this._tokenizationStateStore.markMustBeTokenized(l-1),a=i.endState}}}function CP(e,t,i,n,o,s){let r=null;if(i)try{r=i.tokenizeEncoded(n,o,s.clone())}catch(a){Jo(a)}return r||(r=qv(e.encodeLanguageId(t),s)),zb.convertToEndOffset(r.tokens,n.length),r}const yP=new Uint32Array(0).buffer;class xP{static deleteBeginning(e,t){return null===e||e===yP?e:xP.delete(e,0,t)}static deleteEnding(e,t){if(null===e||e===yP)return e;const i=SP(e),n=i[i.length-2];return xP.delete(e,t,n)}static delete(e,t,i){if(null===e||e===yP||t===i)return e;const n=SP(e),o=n.length>>>1;if(0===t&&n[n.length-2]===i)return yP;const s=zb.findIndexInTokensArray(n,t),r=s>0?n[s-1<<1]:0;if(il&&(n[a++]=e,n[a++]=n[1+(h<<1)],l=e)}if(a===n.length)return e;const c=new Uint32Array(a);return c.set(n.subarray(0,a),0),c.buffer}static append(e,t){if(t===yP)return e;if(e===yP)return t;if(null===e)return e;if(null===t)return null;const i=SP(e),n=SP(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=zb.findIndexInTokensArray(n,t);if(s>0){n[s-1<<1]===t&&s--}for(let r=s;r1&&(t=ys.getLanguageId(n[1])!==e),!t)return yP}if(!n||0===n.length){const i=new Uint32Array(2);return i[0]=t,i[1]=DP(e),i.buffer}return n[n.length-2]=t,0===n.byteOffset&&n.byteLength===n.buffer.byteLength?n.buffer:n}_ensureLine(e){for(;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]=xP.delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1))}this._lineTokens[t]=xP.deleteEnding(this._lineTokens[t],e.startColumn-1);const i=e.endLineNumber-1;let n=null;i=this._len||(0!==t?(this._lineTokens[n]=xP.deleteEnding(this._lineTokens[n],e.column-1),this._lineTokens[n]=xP.insert(this._lineTokens[n],e.column-1,i),this._insertLines(e.lineNumber,t)):this._lineTokens[n]=xP.insert(this._lineTokens[n],e.column-1,i))}}function DP(e){return(16384|e<<0|2<<23)>>>0}class LP{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 n=null;for(let o=0,s=this._pieces.length;oi.endLineNumber){n=n||{index:o};break}if(e.removeTokens(i),e.isEmpty()){this._pieces.splice(o,1),o--,s--;continue}if(e.endLineNumberi.endLineNumber){n=n||{index:o};continue}const[t,r]=e.split(i);t.isEmpty()?n=n||{index:o}:r.isEmpty()||(this._pieces.splice(o,1,t,r),o++,s++,n=n||{index:o})}return n=n||{index:this._pieces.length},t.length>0&&(this._pieces=Jr(this._pieces,n.index,t)),i}isComplete(){return this._isComplete}addSparseTokens(e,t){const i=this._pieces;if(0===i.length)return t;const n=i[LP._findFirstPieceWithLine(i,e)].getLineTokens(e);if(!n)return t;const o=t.getCount(),s=n.getCount();let r=0;const a=[];let l=0,d=0;const c=(e,t)=>{e!==d&&(d=e,a[l++]=e,a[l++]=t)};for(let h=0;h>>0,l=~a>>>0;for(;rt)){for(;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)}}const NP=L_("undoRedoService");class EP{constructor(e,t){this.resource=e,this.elements=t}}class IP{constructor(){this.id=IP._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}}IP._ID=0,IP.None=new IP;class TP{constructor(){this.id=TP._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}}TP._ID=0,TP.None=new TP;var MP=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},AP=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}};function OP(e){const t=new mP;return t.acceptChunk(e),t.finish()}function RP(e,t){return("string"==typeof e?OP(e):e).create(t)}let PP=0;class FP{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;const e=[];let t=0,i=0;for(;;){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("")}}}const BP=()=>{throw new Error("Invalid change accessor")};let VP=class e extends Uo{constructor(t,i,n,o=null,s,r,a){super(),this._undoRedoService=s,this._languageService=r,this._languageConfigurationService=a,this._onWillDispose=this._register(new $o),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new XP((e=>this.handleBeforeFireDecorationsChangedEvent(e)))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeLanguage=this._register(new $o),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new $o),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new $o),this.onDidChangeTokens=this._onDidChangeTokens.event,this._onDidChangeOptions=this._register(new $o),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new $o),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new $o),this._eventEmitter=this._register(new QP),this._backgroundTokenizationState=0,this._onBackgroundTokenizationStateChanged=this._register(new $o),PP++,this.id="$model"+PP,this.isForSimpleWidget=n.isForSimpleWidget,this._associatedResource=null==o?Ps.parse("inmemory://model/"+PP):o,this._attachedEditorCount=0;const{textBuffer:l,disposable:d}=RP(t,n.defaultEOL);this._buffer=l,this._bufferDisposable=d,this._options=e.resolveOptions(this._buffer,n);const c=this._buffer.getLineCount(),h=this._buffer.getValueLengthInRange(new qo(1,1,c,this._buffer.getLineLength(c)+1),0);n.largeFileOptimizations?this._isTooLargeForTokenization=h>e.LARGE_FILE_SIZE_THRESHOLD||c>e.LARGE_FILE_LINE_COUNT_THRESHOLD:this._isTooLargeForTokenization=!1,this._isTooLargeForSyncing=h>e.MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this._isDisposing=!1,this._languageId=i,this._languageRegistryListener=this._languageConfigurationService.onDidChange((e=>{e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})})),this._instanceId=Ar(PP),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new HP,this._commandManager=new vR(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._tokens=new kP(this._languageService.languageIdCodec),this._semanticTokens=new LP(this._languageService.languageIdCodec),this._tokenization=new wP(this,this._languageService.languageIdCodec),this._bracketPairColorizer=this._register(new BO(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new kT(this,this._languageConfigurationService)),this._decorationProvider=this._register(new HO(this)),this._register(this._decorationProvider.onDidChange((()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()})))}static resolveOptions(e,t){if(t.detectIndentation){const i=CR(e,t.tabSize,t.insertSpaces);return new ea({tabSize:i.tabSize,indentSize:i.tabSize,insertSpaces:i.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new ea({tabSize:t.tabSize,indentSize:t.indentSize,insertSpaces:t.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}onDidChangeContent(e){return this._eventEmitter.slowEvent((t=>e(t.contentChangedEvent)))}onDidChangeContentOrInjectedText(e){return ta(this._eventEmitter.fastEvent((t=>e(t.rawContentChangedEvent))),this._onDidChangeInjectedText.event((t=>e(t))))}get bracketPairs(){return this._bracketPairColorizer}get guides(){return this._guidesTextModelPart}get backgroundTokenizationState(){return this._backgroundTokenizationState}handleTokenizationProgress(e){if(2===this._backgroundTokenizationState)return;const t=e?2:1;this._backgroundTokenizationState!==t&&(this._backgroundTokenizationState=t,this._bracketPairColorizer.handleDidChangeBackgroundTokenizationState(),this._onBackgroundTokenizationStateChanged.fire())}dispose(){this._isDisposing=!0,this._onWillDispose.fire(),this._languageRegistryListener.dispose(),this._tokenization.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this._isDisposing=!1;const e=new gP([],"","\n",!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=Uo.None}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(e,t){this._isDisposing||(this._bracketPairColorizer.handleDidChangeContent(t),this._tokenization.handleDidChangeContent(t),this._eventEmitter.fire(new AM(e,t)))}setValue(e){if(this._assertNotDisposed(),null===e)return;const{textBuffer:t,disposable:i}=RP(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,i)}_createContentChanged2(e,t,i,n,o,s,r){return{changes:[{range:e,rangeOffset:t,rangeLength:i,text:n}],eol:this._buffer.getEOL(),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._tokens.flush(),this._semanticTokens.flush(),this._decorations=Object.create(null),this._decorationsTree=new HP,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new TM([new kM],this._versionId,!1,!1),this._createContentChanged2(new qo(1,1,o,s),0,n,this.getValue(),!1,!1,!0))}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 TM([new IM],this._versionId,!1,!1),this._createContentChanged2(new qo(1,1,o,s),0,n,this.getValue(),!1,!1,!1))}_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}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>=1e4?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=void 0!==e.tabSize?e.tabSize:this._options.tabSize,i=void 0!==e.indentSize?e.indentSize:this._options.indentSize,n=void 0!==e.insertSpaces?e.insertSpaces:this._options.insertSpaces,o=void 0!==e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,s=void 0!==e.bracketColorizationOptions?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,r=new ea({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._bracketPairColorizer.handleDidChangeOptions(a),this._decorationProvider.handleDidChangeOptions(a),this._onDidChangeOptions.fire(a)}detectIndentation(e,t){this._assertNotDisposed();const i=CR(this._buffer,t,e);this.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize,indentSize:i.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),zE(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(ia.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){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueInRange(i,e);return t?this._buffer.getBOM()+n:n}createSnapshot(e=!1){return new FP(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 Error("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){return this._assertNotDisposed(),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 Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("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),d=Math.floor("number"!=typeof a||isNaN(a)?1:a);if(l<1)l=1,d=1;else if(l>t)l=t,d=this.getLineMaxColumn(l);else if(d<=1)d=1;else{const e=this.getLineMaxColumn(l);d>=e&&(d=e)}return i===o&&n===s&&r===l&&a===d&&e instanceof qo&&!(e instanceof ar)?e:new qo(o,s,l,d)}_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;if(e>this._buffer.getLineCount())return!1;if(1===t)return!0;if(t>this.getLineMaxColumn(e))return!1;if(1===i){const i=this._buffer.getLineCharCode(e,t-2);if(Go(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 er(1,1);if(n>s)return new er(s,this.getLineMaxColumn(s));if(o<=1)return new er(n,1);const r=this.getLineMaxColumn(n);if(o>=r)return new er(n,r);if(1===i){const e=this._buffer.getLineCharCode(n,o-2);if(Go(e))return new er(n,o-1)}return new er(n,o)}validatePosition(e){return this._assertNotDisposed(),e instanceof er&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}_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=Go(e),a=Go(t);return!r&&!a}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof qo&&!(e instanceof ar)&&this._isValidRange(e,1))return e;const t=this._validatePosition(e.startLineNumber,e.startColumn,0),i=this._validatePosition(e.endLineNumber,e.endColumn,0),n=t.lineNumber,o=t.column,s=i.lineNumber,r=i.column;{const e=o>1?this._buffer.getLineCharCode(n,o-2):0,t=r>1&&r<=this._buffer.getLineLength(s)?this._buffer.getLineCharCode(s,r-2):0,i=Go(e),a=Go(t);return i||a?n===s&&o===r?new qo(n,o-1,s,r-1):i&&a?new qo(n,o-1,s,r+1):i?new qo(n,o-1,s,r):new qo(n,o,s,r+1):new qo(n,o,s,r)}}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 qo(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=999){this._assertNotDisposed();let a=null;null!==t&&(Array.isArray(t)||(t=[t]),t.every((e=>qo.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 d;if(l.push(a.reduce(((e,t)=>qo.areIntersecting(e,t)?e.plusRange(t):(l.push(e),t)))),!i&&e.indexOf("\n")<0){const t=new oa(e,i,n,o).parseSearchRequest();if(!t)return[];d=e=>this.findMatchesLineByLine(e,t,s,r)}else d=t=>na.findMatches(this,new oa(e,i,n,o),t,s,r);return l.map(d).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 oa(e,i,n,o).parseSearchRequest();if(!t)return null;const a=this.getLineCount();let l=new qo(r.lineNumber,r.column,a,this.getLineMaxColumn(a)),d=this.findMatchesLineByLine(l,t,s,1);return na.findNextMatch(this,new oa(e,i,n,o),r,s),d.length>0?d[0]:(l=new qo(1,1,r.lineNumber,this.getLineMaxColumn(r.lineNumber)),d=this.findMatchesLineByLine(l,t,s,1),d.length>0?d[0]:null)}return na.findNextMatch(this,new oa(e,i,n,o),r,s)}findPreviousMatch(e,t,i,n,o,s){this._assertNotDisposed();const r=this.validatePosition(t);return na.findPreviousMatch(this,new oa(e,i,n,o),r,s)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){if(("\n"===this.getEOL()?0:1)!==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 sa?e:new sa(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 qo(n,1,n,o);t.push(new sa(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)}_applyUndo(e,t,i,n){const o=e.map((e=>{const t=this.getPositionAt(e.newPosition),i=this.getPositionAt(e.newEnd);return{range:new qo(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 qo(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(),n=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),o=this._buffer.getLineCount(),s=n.changes;if(this._trimAutoWhitespaceLines=n.trimAutoWhitespaceLineNumbers,0!==s.length){for(let i=0,n=s.length;i0?e.text.charCodeAt(0):0),this._decorationsTree.acceptReplace(e.rangeOffset,e.rangeLength,e.text.length,e.forceMoveMarkers)}const e=[];this._increaseVersionId();let t=i;for(let i=0,n=s.length;i=0;t--){const i=a+t,n=g+t;v.takeFromEndWhile((e=>e.lineNumber>n));const o=v.takeFromEndWhile((e=>e.lineNumber===n));e.push(new LM(i,this.getLineContent(n),o))}if(he.lineNumbere.lineNumber===t))}e.push(new EM(n+1,a+c,d,l))}t+=u}this._emitContentChangedEvent(new TM(e,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:s,eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return null===n.reverseEdits?void 0:n.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=[...e].map((e=>new LM(e,this.getLineContent(e),this._getInjectedTextInLine(e))));this._onDidChangeInjectedText.fire(new MM(t))}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,YP(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){Jo(o)}return i.addDecoration=BP,i.changeDecoration=BP,i.changeDecorationOptions=BP,i.removeDecoration=BP,i.deltaDecorations=BP,n}deltaDecorations(e,t,i=0){if(this._assertNotDisposed(),e||(e=[]),0===e.length&&0===t.length)return[];try{return this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(i,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_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:ZP[i]}])[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(ZP[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,n=!1){const o=this.getLineCount(),s=Math.min(o,Math.max(1,e)),r=Math.min(o,Math.max(1,t)),a=this.getLineMaxColumn(r),l=new qo(s,1,r,a),d=this._getDecorationsInRange(l,i,n);return d.push(...this._decorationProvider.getDecorationsInRange(l,i,n)),d}getDecorationsInRange(e,t=0,i=!1){const n=this.validateRange(e),o=this._getDecorationsInRange(n,t,i);return o.push(...this._decorationProvider.getDecorationsInRange(n,t,i)),o}getOverviewRulerDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!0)}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 DM.fromDecorations(n).filter((t=>t.lineNumber===e))}getAllDecorations(e=0,t=!1){let i=this._decorationsTree.getAll(this,e,t,!1);return i=i.concat(this._decorationProvider.getAllDecorations(e,t)),i}_getDecorationsInRange(e,t,i){const n=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),o=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,n,o,t,i)}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)}n!==o?(this._decorationsTree.delete(i),i.setOptions(t),this._decorationsTree.insert(i)):i.setOptions(t)}_deltaDecorationsImpl(e,t,i){const n=this.getVersionId(),o=t.length;let s=0;const r=i.length;let a=0;const l=new Array(r);for(;s0&&this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!1,ranges:t})}this.handleTokenizationProgress(t)}setSemanticTokens(e,t){this._semanticTokens.set(e,t),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:null!==e,ranges:[{fromLineNumber:1,toLineNumber:this.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;const i=this.validateRange(this._semanticTokens.setPartial(e,t));this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!0,ranges:[{fromLineNumber:i.startLineNumber,toLineNumber:i.endLineNumber}]})}tokenizeViewport(e,t){e=Math.max(1,e),t=Math.min(this._buffer.getLineCount(),t),this._tokenization.tokenizeViewport(e,t)}clearTokens(){this._tokens.flush(),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!0,semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._buffer.getLineCount()}]})}_emitModelTokensChangedEvent(e){this._isDisposing||(this._bracketPairColorizer.handleDidChangeTokens(e),this._onDidChangeTokens.fire(e))}resetTokenization(){this._tokenization.reset()}forceTokenization(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");this._tokenization.forceTokenization(e)}isCheapToTokenize(e){return this._tokenization.isCheapToTokenize(e)}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}getLineTokens(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(e)}_getLineTokens(e){const t=this.getLineContent(e),i=this._tokens.getTokens(this._languageId,e-1,t);return this._semanticTokens.addSparseTokens(e,i)}getLanguageId(){return this._languageId}setMode(e){if(this._languageId===e)return;const t={oldLanguage:this._languageId,newLanguage:e};this._languageId=e,this._bracketPairColorizer.handleDidChangeLanguage(t),this._tokenization.handleDidChangeLanguage(t),this._onDidChangeLanguage.fire(t),this._onDidChangeLanguageConfiguration.fire({})}getLanguageIdAtPosition(e,t){const i=this.validatePosition(new er(e,t)),n=this.getLineTokens(i.lineNumber);return n.getLanguageId(n.findTokenIndexAtOffset(i.column-1))}getTokenTypeIfInsertingCharacter(e,t,i){const n=this.validatePosition(new er(e,t));return this._tokenization.getTokenTypeIfInsertingCharacter(n,i)}tokenizeLineWithEdit(e,t,i){const n=this.validatePosition(e);return this._tokenization.tokenizeLineWithEdit(n,t,i)}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}getWordAtPosition(t){this._assertNotDisposed();const i=this.validatePosition(t),n=this.getLineContent(i.lineNumber),o=this._getLineTokens(i.lineNumber),s=o.findTokenIndexAtOffset(i.column-1),[r,a]=e._findLanguageBoundaries(o,s),l=ra(i.column,this.getLanguageConfiguration(o.getLanguageId(s)).getWordDefinition(),n.substring(r,a),r);if(l&&l.startColumn<=t.column&&t.column<=l.endColumn)return l;if(s>0&&r===i.column-1){const[r,a]=e._findLanguageBoundaries(o,s-1),l=ra(i.column,this.getLanguageConfiguration(o.getLanguageId(s-1)).getWordDefinition(),n.substring(r,a),r);if(l&&l.startColumn<=t.column&&t.column<=l.endColumn)return l}return null}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();se.options.showIfCollapsed||!e.range.isEmpty()))}getAllInjectedText(e,t){const i=e.getVersionId(),n=this._injectedTextDecorationsTree.search(t,!1,i);return this._ensureNodesHaveRanges(e,n).filter((e=>e.options.showIfCollapsed||!e.range.isEmpty()))}getAll(e,t,i,n){const o=e.getVersionId(),s=this._search(t,i,n,o);return this._ensureNodesHaveRanges(e,s)}_search(e,t,i,n){if(i)return this._decorationsTree1.search(e,t,n);{const i=this._decorationsTree0.search(e,t,n),o=this._decorationsTree1.search(e,t,n),s=this._injectedTextDecorationsTree.search(e,t,n);return i.concat(o).concat(s)}}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){zP(e)?this._injectedTextDecorationsTree.insert(e):WP(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){zP(e)?this._injectedTextDecorationsTree.delete(e):WP(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){zP(e)?this._injectedTextDecorationsTree.resolveNode(e,t):WP(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 jP(e){return e.replace(/[^a-z0-9\-_]/gi," ")}class UP{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class $P extends UP{constructor(e){super(e),this._resolvedColor=null,this.position="number"==typeof e.position?e.position:aa.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 KP extends UP{constructor(e){super(e),this.position=e.position}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?hS.fromHex(e):t.getColor(e.id)}}class qP{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}static from(e){return e instanceof qP?e:new qP(e)}}class GP{constructor(e){var t,i;this.description=e.description,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?jP(e.className):null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new $P(e.overviewRuler):null,this.minimap=e.minimap?new KP(e.minimap):null,this.glyphMarginClassName=e.glyphMarginClassName?jP(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?jP(e.linesDecorationsClassName):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?jP(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?jP(e.marginClassName):null,this.inlineClassName=e.inlineClassName?jP(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?jP(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?jP(e.afterContentClassName):null,this.after=e.after?qP.from(e.after):null,this.before=e.before?qP.from(e.before):null,this.hideInCommentTokens=null!==(t=e.hideInCommentTokens)&&void 0!==t&&t,this.hideInStringTokens=null!==(i=e.hideInStringTokens)&&void 0!==i&&i}static register(e){return new GP(e)}static createDynamic(e){return new GP(e)}}GP.EMPTY=GP.register({description:"empty"});const ZP=[GP.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),GP.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),GP.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),GP.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function YP(e){return e instanceof GP?e:GP.createDynamic(e)}class XP extends Uo{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new $o),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){var e;if(this._deferredCnt--,0===this._deferredCnt){if(this._shouldFire){this.handleBeforeFire(this._affectedInjectedTextLines);const e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler};this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._actual.fire(e)}null===(e=this._affectedInjectedTextLines)||void 0===e||e.clear(),this._affectedInjectedTextLines=null}}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}checkAffectedAndFire(e){this._affectsMinimap||(this._affectsMinimap=!(!e.minimap||!e.minimap.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!(!e.overviewRuler||!e.overviewRuler.color)),this._shouldFire=!0}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._shouldFire=!0}}class QP extends Uo{constructor(){super(),this._fastEmitter=this._register(new $o),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new $o),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))}}function JP(e,t){return null===e?t?tF.INSTANCE:iF.INSTANCE:new eF(e,t)}class eF{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 DM(0,0,e+1,this._projectionData.injectionOptions[t],0)));s=DM.applyInjectedText(e.getLineContent(t),i).substring(n,o)}else s=e.getValueInRange({startLineNumber:t,startColumn:n+1,endLineNumber:t,endColumn:o+1});return i>0&&(s=oF(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,d=a.injectionOptions;let c,h=null;if(l){h=[];let e=0,t=0;for(let i=0;i0?a.breakOffsets[i-1]:0,s=a.breakOffsets[i];for(;ts)break;if(o0?a.wrappedTextIndentLength:0,r=t+Math.max(c-o,0),l=t+Math.min(h-o,s);r!==l&&n.push(new dw(r,l,e.inlineClassName,e.inlineClassNameAffectsLetterSpacing))}}if(!(h<=s))break;e+=r,t++}}}c=l?e.getLineTokens(t).withInserted(l.map(((e,t)=>({offset:e,text:d[t].content,tokenMetadata:zb.defaultTokenMetadata})))):e.getLineTokens(t);for(let u=i;u0?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=oF(n.wrappedTextIndentLength)+l);const d=this._projectionData.getMinOutputOffset(i)+1,c=l.length+1,h=i+1=nF.length)for(let t=1;t<=e;t++)nF[t]=sF(t);return nF[e]}function sF(e){return new Array(e+1).join(" ")}class rF{constructor(e,t,i,n,o,s,r,a,l){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._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new dF(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 Cr(DM.fromDecorations(n));for(let p=0;pe.lineNumber===p+1));s.addRequest(i[p],e,t?t[p]:null)}const a=s.finalize(),l=[],d=this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e))).sort(qo.compareRangesUsingStarts);let c=1,h=0,u=-1,g=u+1=c&&e<=h,i=JP(a[p],!t);l[p]=i.getViewLineCount(),this.modelLineProjections[p]=i}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new la(l)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e)))}setHiddenAreas(e){const t=function(e){if(0===e.length)return[];const t=e.slice();t.sort(qo.compareRangesUsingStarts);const i=[];let n=t[0].startLineNumber,o=t[0].endLineNumber;for(let s=1,r=t.length;so+1?(i.push(new qo(n,1,o,1)),n=e.startLineNumber,o=e.endLineNumber):e.endLineNumber>o&&(o=e.endLineNumber)}return i.push(new qo(n,1,o,1)),i}(e.map((e=>this.model.validateRange(e)))),i=this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e))).sort(qo.compareRangesUsingStarts);if(t.length===i.length){let e=!1;for(let n=0;n({range:e,options:GP.EMPTY})));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,n);const o=t;let s=1,r=0,a=-1,l=a+1=s&&e<=r?this.modelLineProjections[c].isVisible()&&(this.modelLineProjections[c]=this.modelLineProjections[c].setVisible(!1),t=!0):(d=!0,this.modelLineProjections[c].isVisible()||(this.modelLineProjections[c]=this.modelLineProjections[c].setVisible(!0),t=!0)),t){const e=this.modelLineProjections[c].getViewLineCount();this.projectedModelLineLineCounts.setValue(c,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){const o=this.fontInfo.equals(e),s=this.wrappingStrategy===t,r=this.wrappingColumn===i,a=this.wrappingIndent===n;if(o&&s&&r&&a)return!1;const l=o&&s&&!r&&a;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=i,this.wrappingIndent=n;let d=null;if(l){d=[];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 d=0,c=n.length;dr?(l=this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,d=l+r-1,u=d+1,g=u+(o-r)-1,a=!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 aF(i+1,n)}getMinColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMinColumn(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 er(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 er(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;ee.horizontalLine?new xT(e.visibleColumn,e.className,new ST(e.horizontalLine.top,this.convertModelPositionToViewPosition(i.modelLineNumber,e.horizontalLine.endColumn).column)):e)),s.push(n)}}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 d=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===d&&(d=new er(g+1,0))}else null!==d&&(o=o.concat(this.model.guides.getLinesIndentGuides(d.lineNumber,g)),d=null)}null!==d&&(o=o.concat(this.model.guides.getLinesIndentGuides(d.lineNumber,n.lineNumber)),d=null);const c=t-e+1,h=new Array(c);let u=0;for(let g=0,p=o.length;gt&&(h=!0,c=t-o+1),n.getViewLinesData(this.model,l+1,d,c,o-e,i,a),o+=c,h)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 d=r.getModelColumnOfViewPosition(s,t);return this.model.validatePosition(new er(o+1,d)).equals(i)?new er(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 qo(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 er(i.modelLineNumber,n))}convertViewRangeToModelRange(e){const t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),i=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new qo(t.lineNumber,t.column,i.lineNumber,i.column)}convertModelPositionToViewPosition(e,t,i=2){const n=this.model.validatePosition(new er(e,t)),o=n.lineNumber,s=n.column;let r=o-1,a=!1;for(;r>0&&!this.modelLineProjections[r].isVisible();)r--,a=!0;if(0===r&&!this.modelLineProjections[r].isVisible())return new er(1,1);const l=1+this.projectedModelLineLineCounts.getPrefixSum(r);let d;return d=a?this.modelLineProjections[r].getViewPositionOfModelPosition(l,this.model.getLineMaxColumn(r+1),i):this.modelLineProjections[o-1].getViewPositionOfModelPosition(l,s,i),d}convertModelRangeToViewRange(e,t=0){if(e.isEmpty()){const i=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,t);return qo.fromPositions(i)}{const t=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,1),i=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn,0);return new qo(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)}for(;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){const n=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),o=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(o.lineNumber-n.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new qo(n.lineNumber,1,o.lineNumber,o.column),t,i);let s=[];const r=n.lineNumber-1,a=o.lineNumber-1;let l=null;for(let u=r;u<=a;u++){if(this.modelLineProjections[u].isVisible())null===l&&(l=new er(u+1,u===r?n.column:1));else if(null!==l){const e=this.model.getLineMaxColumn(u);s=s.concat(this.model.getDecorationsInRange(new qo(l.lineNumber,l.column,u,e),t,i)),l=null}}null!==l&&(s=s.concat(this.model.getDecorationsInRange(new qo(l.lineNumber,l.column,o.lineNumber,o.column),t,i)),l=null),s.sort(((e,t)=>{const i=qo.compareRangesUsingStarts(e.range,t.range);return 0===i?e.idt.id?1:0:i}));let d=[],c=0,h=null;for(const u of s){const e=u.id;h!==e&&(h=e,d[c++]=u)}return d}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}}class aF{constructor(e,t){this.modelLineNumber=e,this.modelLineWrappedLineIdx=t}get isWrappedLineContinuation(){return this.modelLineWrappedLineIdx>0}}class lF{constructor(e,t){this.modelRange=e,this.viewLines=t}}class dF{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){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column,t)}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 cF{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new hF(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 UM(t,i)}onModelLinesInserted(e,t,i,n){return new $M(t,i)}onModelLineChanged(e,t,i){return[!1,new jM(t,t),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}}class uF extends Uo{constructor(e,t,i,n,o,s,r,a){if(super(),this.languageConfigurationService=r,this._themeService=a,this._editorId=e,this._configuration=t,this.model=i,this._eventDispatcher=new QM,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new $E(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._tokenizeViewportSoon=this._register(new lb((()=>this.tokenizeViewport()),50)),this._updateConfigurationViewLineCount=this._register(new lb((()=>this._updateConfigurationViewLineCountNow()),0)),this._hasFocus=!1,this._viewportStartLine=-1,this._viewportStartLineTrackedRange=null,this._viewportStartLineDelta=0,this.model.isTooLargeForTokenization())this._lines=new cF(this.model);else{const e=this._configuration.options,t=e.get(44),i=e.get(125),s=e.get(132),r=e.get(124);this._lines=new rF(this._editorId,this.model,n,o,t,this.model.getOptions().tabSize,i,s.wrappingColumn,r)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new rA(i,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new FA(this._configuration,this.getLineCount(),s)),this._register(this.viewLayout.onDidScroll((e=>{e.scrollTopChanged&&this._tokenizeViewportSoon.schedule(),this._eventDispatcher.emitSingleViewEvent(new qM(e)),this._eventDispatcher.emitOutgoingEvent(new iA(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 BA(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(PT.getInstance().onDidChange((()=>{this._eventDispatcher.emitSingleViewEvent(new YM)}))),this._register(this._themeService.onDidColorThemeChange((e=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new GM(e))}))),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStartLineTrackedRange=this.model._setTrackedRange(this._viewportStartLineTrackedRange,null,1),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())}tokenizeViewport(){const e=this.viewLayout.getLinesViewportData(),t=new qo(e.startLineNumber,this.getLineMinColumn(e.startLineNumber),e.endLineNumber,this.getLineMaxColumn(e.endLineNumber)),i=this._toModelVisibleRanges(t);for(const n of i)this.model.tokenizeViewport(n.startLineNumber,n.endLineNumber)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new WM(e)),this._eventDispatcher.emitOutgoingEvent(new tA(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new OM)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new RM)}_onConfigurationChanged(e,t){let i=null;if(-1!==this._viewportStartLine){const e=new er(this._viewportStartLine,this.getLineMinColumn(this._viewportStartLine));i=this.coordinatesConverter.convertViewPositionToModelPosition(e)}let n=!1;const o=this._configuration.options,s=o.get(44),r=o.get(125),a=o.get(132),l=o.get(124);if(this._lines.setWrappingSettings(s,r,a.wrappingColumn,l)&&(e.emitViewEvent(new VM),e.emitViewEvent(new HM),e.emitViewEvent(new BM(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),0!==this.viewLayout.getCurrentScrollTop()&&(n=!0),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(81)&&(this._decorations.reset(),e.emitViewEvent(new BM(null))),e.emitViewEvent(new PM(t)),this.viewLayout.onConfigurationChanged(t),n&&i){const e=this.coordinatesConverter.convertModelPositionToViewPosition(i),t=this.viewLayout.getVerticalOffsetForLineNumber(e.lineNumber);this.viewLayout.setScrollPosition({scrollTop:t+this._viewportStartLineDelta},1)}$E.shouldRecreate(t)&&(this.cursorConfig=new $E(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.changes,s=e instanceof TM?e.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 Cr(a);for(const e of o)switch(e.changeType){case 1:this._lines.onModelFlushed(),t.emitViewEvent(new VM),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,d]=this._lines.onModelLineChanged(s,e.lineNumber,i);n=o,r&&t.emitViewEvent(r),a&&(t.emitViewEvent(a),this.viewLayout.onLinesInserted(a.fromLineNumber,a.toLineNumber)),d&&(t.emitViewEvent(d),this.viewLayout.onLinesDeleted(d.fromLineNumber,d.toLineNumber));break}}null!==s&&this._lines.acceptVersionId(s),this.viewLayout.onHeightMaybeChanged(),!i&&n&&(t.emitViewEvent(new HM),t.emitViewEvent(new BM(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}if(this._viewportStartLine=-1,this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&this._viewportStartLineTrackedRange){const e=this.model._getTrackedRange(this._viewportStartLineTrackedRange);if(e){const t=this.coordinatesConverter.convertModelPositionToViewPosition(e.getStartPosition()),i=this.viewLayout.getVerticalOffsetForLineNumber(t.lineNumber);this.viewLayout.setScrollPosition({scrollTop:i+this._viewportStartLineDelta},1)}}try{const t=this._eventDispatcher.beginEmitViewEvents();this._cursor.onModelContentChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}this._tokenizeViewportSoon.schedule()}))),this._register(this.model.onDidChangeTokens((e=>{const t=[];for(let i=0,n=e.ranges.length;i{this._eventDispatcher.emitSingleViewEvent(new zM),this.cursorConfig=new $E(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig)}))),this._register(this.model.onDidChangeLanguage((e=>{this.cursorConfig=new $E(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig)}))),this._register(this.model.onDidChangeOptions((e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const e=this._eventDispatcher.beginEmitViewEvents();e.emitViewEvent(new VM),e.emitViewEvent(new HM),e.emitViewEvent(new BM(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new $E(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig)}))),this._register(this.model.onDidChangeDecorations((e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new BM(e))})))}setHiddenAreas(e){let t=!1;try{const i=this._eventDispatcher.beginEmitViewEvents();t=this._lines.setHiddenAreas(e),t&&(i.emitViewEvent(new VM),i.emitViewEvent(new HM),i.emitViewEvent(new BM(null)),this._cursor.onLineMappingChanged(i),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),t&&this._eventDispatcher.emitOutgoingEvent(new nA)}getVisibleRangesPlusViewportAboveBelow(){const e=this._configuration.options.get(131),t=this._configuration.options.get(59),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 qo(o,this.getLineMinColumn(o),s,this.getLineMaxColumn(s)))}getVisibleRanges(){const e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}_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 d=0,c=i.length;da||(se.toInlineDecoration(t)))]),new aw(s.minColumn,s.maxColumn,s.content,s.continuesWithWrappedLine,i,n,s.tokens,r,o,s.startVisibleColumn)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,t,i){const n=this._lines.getViewLinesData(e,t,i);return new sw(this.getTabSize(),n)}getAllOverviewRulerDecorations(e){const t=this.model.getOverviewRulerDecorations(this._editorId,Ff(this._configuration.options)),i=new gF;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&&e.invalidateCachedColor();const i=t.options.minimap;i&&i.invalidateCachedColor()}}getValueInRange(e,t){const i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(i,t)}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)+t;return this.model.getPositionAt(o)}getPlainTextToCopy(e,t,i){const n=i?"\r\n":this.model.getEOL();(e=e.slice(0)).sort(qo.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===LA)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 qo(e,this.model.getLineMinColumn(e),e,this.model.getLineMaxColumn(e))}const o=this._configuration.options.get(44),s=this._getColorMap();let r;if(/[:;\\\/<>]/.test(o.fontFamily)||o.fontFamily===Gf.fontFamily)r=Gf.fontFamily;else{r=o.fontFamily,r=r.replace(/"/g,"'");if(!/[,']/.test(r)){/[+ ]/.test(r)&&(r=`'${r}'`)}r=`${r}, ${Gf.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.getLineTokens(l),d=e.getLineContent(),c=l===i?n-1:0,h=l===o?s-1:d.length;a+=""===d?"
":IA(d,e.inflate(),t,c,h,r,Rs)}return a}_getColorMap(){const e=Ns.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 sA):this._withViewEventsCollector(e)}executeEdits(e,t,i){this._executeCursorEdit((n=>this._cursor.executeEdits(n,e,t,i)))}startComposition(){this._cursor.setIsDoingComposition(!0),this._executeCursorEdit((e=>this._cursor.startComposition(e)))}endComposition(e){this._cursor.setIsDoingComposition(!1),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)))}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 qo(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((t=>t.emitViewEvent(new KM(e,!1,i,null,0,!0,0))))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),i=new qo(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((t=>t.emitViewEvent(new KM(e,!1,i,null,0,!0,0))))}revealRange(e,t,i,n,o){this._withViewEventsCollector((s=>s.emitViewEvent(new KM(e,!1,i,null,n,t,o))))}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new XM),this._eventDispatcher.emitOutgoingEvent(new nA))}_withViewEventsCollector(e){try{return e(this._eventDispatcher.beginEmitViewEvents())}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(e,t){return this._lines.normalizePosition(e,t)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}}class gF{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 hw(e,t,[o,i,n]);this._asMap[e]=s,this.asArray.push(s)}}}class pF{constructor(...e){this._entries=new Map;for(let[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)}}var mF;!function(e){e[e.Ignore=0]="Ignore",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error"}(mF||(mF={})),function(e){const t="error",i="warning",n="info";e.fromValue=function(o){return o?$r(t,o)?e.Error:$r(i,o)||$r("warn",o)?e.Warning:$r(n,o)?e.Info:e.Ignore:e.Ignore},e.toString=function(o){switch(o){case e.Error:return t;case e.Warning:return i;case e.Info:return n;default:return"ignore"}}}(mF||(mF={}));var fF=mF,_F=fF;const vF=L_("notificationService");class bF{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;let i=this.breakOffsets[e]-t;return e>0&&(i+=this.wrappedTextIndentLength),i}getMaxOutputOffset(e){return this.getLineLength(e)}translateToInputOffset(e,t){e>0&&(t=Math.max(0,t-this.wrappedTextIndentLength));let i=0===e?t:this.breakOffsets[e-1]+t;if(null!==this.injectionOffsets)for(let n=0;nthis.injectionOffsets[n];n++)i0?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 yF(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 yF(e-1,this.getMaxOutputOffset(e-1))}else if(1===i){if(e0&&(t=Math.max(0,t-this.wrappedTextIndentLength));return(e>0?this.breakOffsets[e-1]:0)+t}normalizeOffsetInInputWithInjectionsAroundInjections(e,t){const i=this.getInjectedTextAtOffset(e);if(!i)return e;if(2===t){if(e===i.offsetInInputWithInjections+i.length&&wF(this.injectionOptions[i.injectedTextIndex].cursorStops))return i.offsetInInputWithInjections+i.length;{let e=i.offsetInInputWithInjections;if(CF(this.injectionOptions[i.injectedTextIndex].cursorStops))return e;let t=i.injectedTextIndex-1;for(;t>=0&&this.injectionOffsets[t]===this.injectionOffsets[i.injectedTextIndex]&&!wF(this.injectionOptions[t].cursorStops)&&(e-=this.injectionOptions[t].content.length,!CF(this.injectionOptions[t].cursorStops));)t--;return e}}if(1===t){let e=i.offsetInInputWithInjections+i.length,t=i.injectedTextIndex;for(;t+1=0&&this.injectionOffsets[t-1]===this.injectionOffsets[t];)e-=this.injectionOptions[t-1].content.length,t--;return e}nr()}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 wF(e){return null==e||(e===da.Right||e===da.Both)}function CF(e){return null==e||(e===da.Left||e===da.Both)}class yF{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(e){return new er(e+this.outputLineIndex,this.outputOffset+1)}}class xF{constructor(e,t){this.classifier=new SF(e,t)}static create(e){return new xF(e.get(120),e.get(119))}createLineBreaksComputer(e,t,i,n){const o=[],s=[],r=[];return{addRequest:(e,t,i)=>{o.push(e),s.push(t),r.push(i)},finalize:()=>{const a=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth,l=[];for(let e=0,d=o.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 kF=[],DF=[];function LF(e,t,i,n,o,s,r){if(-1===o)return null;const a=i.length;if(a<=1)return null;const l=t.breakOffsets,d=t.breakOffsetsVisibleColumn,c=MF(i,n,o,s,r),h=o-c,u=kF,g=DF;let p=0,m=0,f=0,_=o;const v=l.length;let b=0;if(b>=0){let e=Math.abs(d[b]-_);for(;b+1=e)break;e=t,b++}}for(;bt&&(t=m,o=f);let r=0,c=0,w=0,C=0;if(o<=_){let f=o,v=0===t?0:i.charCodeAt(t-1),b=0===t?0:e.get(v),y=!0;for(let o=t;om&&TF(v,b,a,l)&&(r=t,c=f),f+=d,f>_){t>m?(w=t,C=f-d):(w=o+1,C=f),f-c>h&&(r=0),y=!1;break}v=a,b=l}if(y){p>0&&(u[p]=l[l.length-1],g[p]=d[l.length-1],p++);break}}if(0===r){let a=o,l=i.charCodeAt(t),d=e.get(l),u=!1;for(let n=t-1;n>=m;n--){const t=n+1,o=i.charCodeAt(n);if(9===o){u=!0;break}let g,p;if(ha(o)?(n--,g=0,p=2):(g=e.get(o),p=ks(o)?s:1),a<=_){if(0===w&&(w=t,C=a),a<=_-h)break;if(TF(o,g,l,d)){r=t,c=a;break}}a-=p,l=o,d=g}if(0!==r){const e=h-(C-c);if(e<=n){const t=i.charCodeAt(w);let o;o=Go(t)?2:EF(t,C,n,s),e-o<0&&(r=0)}}if(u){b--;continue}}if(0===r&&(r=w,c=C),r<=m){const e=i.charCodeAt(m);Go(e)?(r=m+2,c=f+2):(r=m+1,c=f+EF(e,f,n,s))}for(m=r,u[p]=r,f=c,g[p]=c,p++,_=c+h;b<0||b=y)break;y=e,b++}}return 0===p?null:(u.length=p,g.length=p,kF=t.breakOffsets,DF=t.breakOffsetsVisibleColumn,t.breakOffsets=u,t.breakOffsetsVisibleColumn=g,t.wrappedTextIndentLength=c,t)}function NF(e,t,i,n,o,s,r){const a=DM.applyInjectedText(t,i);let l,d;if(i&&i.length>0?(l=i.map((e=>e.options)),d=i.map((e=>e.column-1))):(l=null,d=null),-1===o)return l?new bF(d,l,[a.length],[],0):null;const c=a.length;if(c<=1)return l?new bF(d,l,[a.length],[],0):null;const h=MF(a,n,o,s,r),u=o-h,g=[],p=[];let m=0,f=0,_=0,v=o,b=a.charCodeAt(0),w=e.get(b),C=EF(b,0,n,s),y=1;Go(b)&&(C+=1,b=a.charCodeAt(1),w=e.get(b),y++);for(let x=y;xv&&((0===f||C-_>u)&&(f=t,_=C-r),g[m]=f,p[m]=_,m++,v=_+u,f=0),b=i,w=o}return 0!==m||i&&0!==i.length?(g[m]=c,p[m]=C,new bF(d,l,g,p,h)):null}function EF(e,t,i,n){return 9===e?i-t%i:ks(e)||e<32?n:1}function IF(e,t){return t-e%t}function TF(e,t,i,n){return 32!==i&&(2===t||3===t&&2!==n||1===n||3===n&&1!==t)}function MF(e,t,i,n,o){let s=0;if(0!==o){const r=xs(e);if(-1!==r){for(let i=0;ii&&(s=0)}}return s}var AF;const OF=null===(AF=window.trustedTypes)||void 0===AF?void 0:AF.createPolicy("domLineBreaksComputer",{createHTML:e=>e});class RF{static create(){return new RF}constructor(){}createLineBreaksComputer(e,t,i,n){const o=[],s=[];return{addRequest:(e,t,i)=>{o.push(e),s.push(t)},finalize:()=>function(e,t,i,n,o,s){var r;function a(t){const i=s[t];if(i){const n=DM.applyInjectedText(e[t],i),o=i.map((e=>e.options)),s=i.map((e=>e.column-1));return new bF(s,o,[n.length],[],0)}return null}if(-1===n){const t=[];for(let i=0,n=e.length;il?(r=0,a=0):d=l-e}const c=n.substr(r),u=PF(c,a,i,d,g,h);p[S]=r,m[S]=a,f[S]=c,_[S]=u[0],v[S]=u[1]}const b=g.build(),w=null!==(r=null==OF?void 0:OF.createHTML(b))&&void 0!==r?r:b;u.innerHTML=w,u.style.position="absolute",u.style.top="10000",u.style.wordWrap="break-word",document.body.appendChild(u);const C=document.createRange(),y=Array.prototype.slice.call(u.children,0),x=[];for(let S=0;Se.options)),l=d.map((e=>e.column-1))):(r=null,l=null),x[S]=new bF(l,r,e,o,i)}return document.body.removeChild(u),x}(o,e,t,i,n,s)}}}function PF(e,t,i,n,o,s){if(0!==s){const e=String(s);o.appendASCIIString('
');const r=e.length;let a=t,l=0;const d=[],c=[];let h=0");for(let u=0;u"),d[u]=l,c[u]=a;const t=h;h=u+1"),d[e.length]=l,c[e.length]=a,o.appendASCIIString("
"),[d,c]}function FF(e,t,i,n){if(i.length<=1)return null;const o=Array.prototype.slice.call(t.children,0),s=[];try{BF(e,o,n,0,null,i.length-1,null,s)}catch(r){return null}return 0===s.length?null:(s.push(i.length),s)}function BF(e,t,i,n,o,s,r,a){if(n===s)return;if(o=o||VF(e,t,i[n],i[n+1]),r=r||VF(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,d=VF(e,t,i[l],i[l+1]);BF(e,t,i,n,o,l,d,a),BF(e,t,i,l,d,s,r,a)}function VF(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()}var WF=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},zF=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}};let HF=0;class jF{constructor(e,t,i,n,o){this.model=e,this.viewModel=t,this.view=i,this.hasRealView=n,this.listenersToRemove=o}dispose(){bs(this.listenersToRemove),this.model.onBeforeDetached(),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}let UF=class e extends Uo{constructor(e,t,i,n,o,s,r,a,l,d,c,h){super(),this.languageConfigurationService=c,this._onDidDispose=this._register(new $o),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new $o),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new $o),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new $o),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new $o),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new $o),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeConfiguration=this._register(new $o),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidChangeModel=this._register(new $o),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new $o),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new $o),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new $o),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new $o),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new $F),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new $F),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new $o),this.onWillType=this._onWillType.event,this._onDidType=this._register(new $o),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new $o),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new $o),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new $o),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new $o),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new $o),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new $o),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new $o),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new $o),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onContextMenu=this._register(new $o),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new $o),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new $o),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new $o),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new $o),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new $o),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new $o),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new $o),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new $o),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new $o),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event,this._bannerDomNode=null;const u=Object.assign({},t);let g;this._domElement=e,this._overflowWidgetsDomNode=u.overflowWidgetsDomNode,delete u.overflowWidgetsDomNode,this._id=++HF,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=i.telemetryData,this._configuration=this._register(this._createConfiguration(i.isSimpleWidget||!1,u,d)),this._register(this._configuration.onDidChange((e=>{this._onDidChangeConfiguration.fire(e);const t=this._configuration.options;if(e.hasChanged(131)){const e=t.get(131);this._onDidLayoutChange.fire(e)}}))),this._contextKeyService=this._register(r.createScoped(this._domElement)),this._notificationService=l,this._codeEditorService=o,this._commandService=s,this._themeService=a,this._register(new KF(this,this._contextKeyService)),this._register(new qF(this,this._contextKeyService,h)),this._instantiationService=n.createChild(new pF([$y,this._contextKeyService])),this._modelData=null,this._contributions={},this._actions={},this._focusTracker=new GF(e),this._register(this._focusTracker.onChange((()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())}))),this._contentWidgets={},this._overlayWidgets={},g=Array.isArray(i.contributions)?i.contributions:Tx.getEditorContributions();for(const m of g)if(this._contributions[m.id])Jo(new Error(`Cannot have two contributions with the same id ${m.id}`));else try{const e=this._instantiationService.createInstance(m.ctor,this);this._contributions[m.id]=e}catch(p){Jo(p)}Tx.getEditorActions().forEach((e=>{if(this._actions[e.id])return void Jo(new Error(`Cannot have two actions with the same id ${e.id}`));const t=new dA(e.id,e.label,e.alias,Qs(e.precondition),(()=>this._instantiationService.invokeFunction((t=>Promise.resolve(e.runEditorCommand(t,this,null))))),this._contextKeyService);this._actions[t.id]=t})),this._codeEditorService.addCodeEditor(this)}get isSimpleWidget(){return this._configuration.isSimpleWidget}_createConfiguration(e,t,i){return new Zx(e,t,this._domElement,i)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return M_.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose();const e=Object.keys(this._contributions);for(let t=0,i=e.length;tqo.lift(e))))}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),i=this._modelData.model.getOptions().tabSize;return dN.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(!er.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(!qo.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 qo(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(!er.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new qo(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=ar.isISelection(e),n=qo.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 ar(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 qo(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(!qo.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(qo.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]);const i=t.contributionsState||{},n=Object.keys(this._contributions);for(let t=0,s=n.length;te.isSupported())),e}getAction(e){return this._actions[e]||null}trigger(e,t,i){switch(i=i||{},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)}case"cut":return void this._cut(e)}const n=this.getAction(t);n?Promise.resolve(n.run()).then(void 0,Jo):this._modelData&&(this._triggerEditorCommand(e,t,i)||this._triggerCommand(t,i))}_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){if(!this._modelData||0===t.length)return;const s=this._modelData.viewModel.getSelection().getStartPosition();this._modelData.viewModel.paste(t,i,n,e);const r=this._modelData.viewModel.getSelection().getStartPosition();"keyboard"===e&&this._onDidPaste.fire({range:new qo(s.lineNumber,s.column,r.lineNumber,r.column),languageId:o})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,i){const n=Tx.getEditorCommand(t);return!!n&&((i=i||{}).source=e,this._instantiationService.invokeFunction((e=>{Promise.resolve(n.runEditorCommand(e,this,i)).then(void 0,Jo)})),!0)}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!!this._modelData&&(!this._configuration.options.get(81)&&(this._modelData.model.pushStackElement(),!0))}popUndoStop(){return!!this._modelData&&(!this._configuration.options.get(81)&&(this._modelData.model.popStackElement(),!0))}executeEdits(e,t,i){if(!this._modelData)return!1;if(this._configuration.options.get(81))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)}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,Ff(this._configuration.options)):null}getDecorationsInRange(e){return this._modelData?this._modelData.model.getDecorationsInRange(e,this._id,Ff(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){const t=this._decorationTypeKeysToIds[e];t&&this.deltaDecorations(t,[]),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]}getLayoutInfo(){return this._configuration.options.get(131)}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}delegateVerticalScrollbarMouseDown(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.delegateVerticalScrollbarMouseDown(e)}layout(e){this._configuration.observeContainer(e),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()),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()),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)}}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(t){if(!this._modelData||!this._modelData.hasRealView)return null;const i=this._modelData.model.validatePosition(t),n=this._configuration.options,o=n.get(131);return{top:e._getVerticalOffsetForPosition(this._modelData,i.lineNumber,i.column)-this.getScrollTop(),left:this._modelData.view.getOffsetForColumn(i.lineNumber,i.column)+o.glyphMarginWidth+o.lineNumbersWidth+o.decorationsWidth-this.getScrollLeft(),height:n.get(59)}}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.view.render(!0,e)}setAriaOptions(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.setAriaOptions(e)}applyFontInfo(e){m_(e,this._configuration.options.get(44))}setBanner(e,t){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),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()),e.onBeforeAttached();const i=new uF(this._id,this._configuration,e,RF.create(),xF.create(this._configuration.options),(e=>hC(e)),this.languageConfigurationService,this._themeService);t.push(e.onDidChangeDecorations((e=>this._onDidChangeModelDecorations.fire(e)))),t.push(e.onDidChangeLanguage((t=>{this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._onDidChangeModelLanguage.fire(t)}))),t.push(e.onDidChangeLanguageConfiguration((e=>this._onDidChangeModelLanguageConfiguration.fire(e)))),t.push(e.onDidChangeContent((e=>this._onDidChangeModelContent.fire(e)))),t.push(e.onDidChangeOptions((e=>this._onDidChangeModelOptions.fire(e)))),t.push(e.onWillDispose((()=>this.setModel(null)))),t.push(i.onEvent((e=>{switch(e.kind){case 0:this._onDidContentSizeChange.fire(e);break;case 1:this._editorTextFocus.setValue(e.hasFocus);break;case 2:this._onDidScrollChange.fire(e);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{e.reachedMaxCursorCount&&this._notificationService.warn(mf(0,"The number of cursors has been limited to {0}.",rA.MAX_CURSOR_COUNT));const t=[];for(let o=0,s=e.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 PI(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);return[new CM(t,this._configuration,this._themeService.getColorTheme(),e,i,this._overflowWidgetsDomNode),!0]}_postDetachModelCleanup(e){e&&e.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!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)&&this._domElement.removeChild(t),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return null!==this._modelData}};UF=WF([zF(3,k_),zF(4,N_),zF(5,wy),zF(6,$y),zF(7,Qy),zF(8,vF),zF(9,$x),zF(10,Rv),zF(11,Lb)],UF);class $F extends Uo{constructor(){super(),this._onDidChangeToTrue=this._register(new $o),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new $o),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 KF extends Uo{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=yI.editorSimpleInput.bindTo(t),this._editorFocus=yI.focus.bindTo(t),this._textInputFocus=yI.textInputFocus.bindTo(t),this._editorTextFocus=yI.editorTextFocus.bindTo(t),this._editorTabMovesFocus=yI.tabMovesFocus.bindTo(t),this._editorReadonly=yI.readOnly.bindTo(t),this._inDiffEditor=yI.inDiffEditor.bindTo(t),this._editorColumnSelection=yI.columnSelection.bindTo(t),this._hasMultipleSelections=yI.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=yI.hasNonEmptySelection.bindTo(t),this._canUndo=yI.canUndo.bindTo(t),this._canRedo=yI.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._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const e=this._editor.getOptions();this._editorTabMovesFocus.set(e.get(130)),this._editorReadonly.set(e.get(81)),this._inDiffEditor.set(e.get(54)),this._editorColumnSelection.set(e.get(18))}_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 qF extends Uo{constructor(e,t,i){super(),this._editor=e,this._contextKeyService=t,this._languageFeaturesService=i,this._langId=yI.languageId.bindTo(t),this._hasCompletionItemProvider=yI.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=yI.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=yI.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=yI.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=yI.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=yI.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=yI.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=yI.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=yI.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=yI.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=yI.hasReferenceProvider.bindTo(t),this._hasRenameProvider=yI.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=yI.hasSignatureHelpProvider.bindTo(t),this._hasInlayHintsProvider=yI.hasInlayHintsProvider.bindTo(t),this._hasDocumentFormattingProvider=yI.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=yI.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=yI.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=yI.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInWalkThrough=yI.isInWalkThroughSnippet.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._isInWalkThrough.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._isInWalkThrough.set(e.uri.scheme===Yw.walkThroughSnippet)})):this.reset()}}class GF extends Uo{constructor(e){super(),this._onChange=this._register(new $o),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(UC(e)),this._register(this._domFocusTracker.onDidFocus((()=>{this._hasFocus=!0,this._onChange.fire(void 0)}))),this._register(this._domFocusTracker.onDidBlur((()=>{this._hasFocus=!1,this._onChange.fire(void 0)})))}hasFocus(){return this._hasFocus}}const ZF=encodeURIComponent("");function XF(e){return ZF+encodeURIComponent(e.toString())+YF}const QF=encodeURIComponent('');sx(((e,t)=>{const i=e.getColor(sk);i&&t.addRule(`.monaco-editor .squiggly-error { border-bottom: 4px double ${i}; }`);const n=e.getColor(ok);n&&t.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${XF(n)}") repeat-x bottom left; }`);const o=e.getColor(nk);o&&t.addRule(`.monaco-editor .squiggly-error::before { display: block; content: ''; width: 100%; height: 100%; background: ${o}; }`);const s=e.getColor(lk);s&&t.addRule(`.monaco-editor .squiggly-warning { border-bottom: 4px double ${s}; }`);const r=e.getColor(ak);r&&t.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${XF(r)}") repeat-x bottom left; }`);const a=e.getColor(rk);a&&t.addRule(`.monaco-editor .squiggly-warning::before { display: block; content: ''; width: 100%; height: 100%; background: ${a}; }`);const l=e.getColor(hk);l&&t.addRule(`.monaco-editor .squiggly-info { border-bottom: 4px double ${l}; }`);const d=e.getColor(ck);d&&t.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${XF(d)}") repeat-x bottom left; }`);const c=e.getColor(dk);c&&t.addRule(`.monaco-editor .squiggly-info::before { display: block; content: ''; width: 100%; height: 100%; background: ${c}; }`);const h=e.getColor(gk);h&&t.addRule(`.monaco-editor .squiggly-hint { border-bottom: 2px dotted ${h}; }`);const u=e.getColor(uk);var g;u&&t.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${g=u,QF+encodeURIComponent(g.toString())+JF}") no-repeat bottom left; }`);const p=e.getColor(lE);p&&t.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${p.rgba.a}; }`);const m=e.getColor(aE);m&&t.addRule(`.monaco-editor.showUnused .squiggly-unnecessary { border-bottom: 2px dashed ${m}; }`);const f=e.getColor(mk)||"inherit";t.addRule(`.monaco-editor.showDeprecated .squiggly-inline-deprecated { text-decoration: line-through; text-decoration-color: ${f}}`)}));class eB{constructor(e,t,i){const n=e=>this.emitter.fire(e);this.emitter=new $o({onFirstListenerAdd:()=>e.addEventListener(t,n,i),onLastListenerRemove:()=>e.removeEventListener(t,n,i)})}get event(){return this.emitter.event}dispose(){this.emitter.dispose()}}function tB(e){return e.preventDefault(),e.stopPropagation(),e}var iB=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r};var nB;!function(e){e.North="north",e.South="south",e.East="east",e.West="west"}(nB||(nB={}));const oB=new $o;const sB=new $o;class rB{constructor(){this.disposables=new ws}get onPointerMove(){return this.disposables.add(new eB(window,"mousemove")).event}get onPointerUp(){return this.disposables.add(new eB(window,"mouseup")).event}dispose(){this.disposables.dispose()}}iB([tS],rB.prototype,"onPointerMove",null),iB([tS],rB.prototype,"onPointerUp",null);class aB{constructor(e){this.el=e,this.disposables=new ws}get onPointerMove(){return this.disposables.add(new eB(this.el,iS.Change)).event}get onPointerUp(){return this.disposables.add(new eB(this.el,iS.End)).event}dispose(){this.disposables.dispose()}}iB([tS],aB.prototype,"onPointerMove",null),iB([tS],aB.prototype,"onPointerUp",null);class lB{constructor(e){this.factory=e}get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}dispose(){}}iB([tS],lB.prototype,"onPointerMove",null),iB([tS],lB.prototype,"onPointerUp",null);const dB="pointer-events-disabled";class cB extends Uo{constructor(e,t,i){super(),this.hoverDelay=300,this.hoverDelayer=this._register(new tb(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new $o),this._onDidStart=this._register(new $o),this._onDidChange=this._register(new $o),this._onDidReset=this._register(new $o),this._onDidEnd=this._register(new $o),this.orthogonalStartSashDisposables=this._register(new ws),this.orthogonalStartDragHandleDisposables=this._register(new ws),this.orthogonalEndSashDisposables=this._register(new ws),this.orthogonalEndDragHandleDisposables=this._register(new ws),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=$C(e,YC(".monaco-sash")),i.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${i.orthogonalEdge}`),zo&&this.el.classList.add("mac");const n=this._register(new eB(this.el,"mousedown")).event;this._register(n((e=>this.onPointerStart(e,new rB)),this));const o=this._register(new eB(this.el,"dblclick")).event;this._register(o(this.onPointerDoublePress,this));const s=this._register(new eB(this.el,"mouseenter")).event;this._register(s((()=>cB.onMouseEnter(this))));const r=this._register(new eB(this.el,"mouseleave")).event;this._register(r((()=>cB.onMouseLeave(this)))),this._register(oS.addTarget(this.el));const a=ds.map(this._register(new eB(this.el,iS.Start)).event,(e=>{var t;return Object.assign(Object.assign({},e),{target:null!==(t=e.initialTarget)&&void 0!==t?t:null})}));this._register(a((e=>this.onPointerStart(e,new aB(this.el))),this));const l=this._register(new eB(this.el,iS.Tap)).event,d=ds.map(ds.filter(ds.debounce(l,((e,t)=>{var i;return{event:t,count:(null!==(i=null==e?void 0:e.count)&&void 0!==i?i:0)+1}}),250),(({count:e})=>2===e)),(({event:e})=>{var t;return Object.assign(Object.assign({},e),{target:null!==(t=e.initialTarget)&&void 0!==t?t:null})}));this._register(d(this.onPointerDoublePress,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=4,this._register(oB.event((e=>{this.size=e,this.layout()})))),this._register(sB.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",false),this.layout()}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.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){const t=t=>{this.orthogonalStartDragHandleDisposables.clear(),0!==t&&(this._orthogonalStartDragHandle=$C(this.el,YC(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add(es((()=>this._orthogonalStartDragHandle.remove()))),this.orthogonalStartDragHandleDisposables.add(new eB(this._orthogonalStartDragHandle,"mouseenter")).event((()=>cB.onMouseEnter(e)),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new eB(this._orthogonalStartDragHandle,"mouseleave")).event((()=>cB.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.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){const t=t=>{this.orthogonalEndDragHandleDisposables.clear(),0!==t&&(this._orthogonalEndDragHandle=$C(this.el,YC(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add(es((()=>this._orthogonalEndDragHandle.remove()))),this.orthogonalEndDragHandleDisposables.add(new eB(this._orthogonalEndDragHandle,"mouseenter")).event((()=>cB.onMouseEnter(e)),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new eB(this._orthogonalEndDragHandle,"mouseleave")).event((()=>cB.onMouseLeave(e)),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalEndSash=e}onPointerStart(e,t){HC(e);let i=!1;if(!e.__orthogonalSashEvent){const n=this.getOrthogonalSash(e);n&&(i=!0,e.__orthogonalSashEvent=!0,n.onPointerStart(e,new lB(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new lB(t))),!this.state)return;const n=(o="iframe",Array.prototype.slice.call(document.getElementsByTagName(o),0));var o;for(const u of n)u.classList.add(dB);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 d=RC(this.el),c=()=>{let e="";e=i?"all-scroll":1===this.orientation?1===this.state?"s-resize":2===this.state?"n-resize":zo?"row-resize":"ns-resize":1===this.state?"e-resize":2===this.state?"w-resize":zo?"col-resize":"ew-resize",d.textContent=`* { cursor: ${e} !important; }`},h=new ws;c(),i||this.onDidEnablementChange.event(c,null,h);t.onPointerMove((e=>{HC(e,!1);const t={startX:s,currentX:e.pageX,startY:r,currentY:e.pageY,altKey:a};this._onDidChange.fire(t)}),null,h),t.onPointerUp((e=>{HC(e,!1),this.el.removeChild(d),this.el.classList.remove("active"),this._onDidEnd.fire(),h.dispose();for(const t of n)t.classList.remove(dB)}),null,h),h.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&&cB.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&cB.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){cB.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){if(e.target&&e.target instanceof HTMLElement)return e.target.classList.contains("orthogonal-drag-handle")?e.target.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash:void 0}dispose(){super.dispose(),this.el.remove()}}class hB{constructor(e,t,i){this._visiblePosition=e,this._visiblePositionScrollDelta=t,this._cursorPosition=i}static capture(e){let t=null,i=0;if(0!==e.getScrollTop()){const n=e.getVisibleRanges();if(n.length>0){t=n[0].getStartPosition();const o=e.getTopForPosition(t.lineNumber,t.column);i=e.getScrollTop()-o}}return new hB(t,i,e.getPosition())}restore(e){if(this._visiblePosition){const t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){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)}}const uB={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:LN.text,TERMINALS:"Terminals"};class gB{constructor(e){this.data=e}update(){}getData(){return this.data}}const pB={CurrentDragAndDropData:void 0};class mB extends Uo{constructor(e,t,i={}){super(),this.options=i,this._context=e||this,this._action=t,t instanceof my&&this._register(t.onDidChange((e=>{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 fy)),this._actionRunner}set actionRunner(e){this._actionRunner=e}getAction(){return this._action}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){const t=this.element=e;this._register(oS.addTarget(e));const i=this.options&&this.options.draggable;i&&(e.draggable=!0,o_&&this._register(nC(e,zC.DRAG_START,(e=>{var t;return null===(t=e.dataTransfer)||void 0===t?void 0:t.setData(uB.TEXT,this._action.label)})))),this._register(nC(t,iS.Tap,(e=>this.onClick(e,!0)))),this._register(nC(t,zC.MOUSE_DOWN,(e=>{i||HC(e,!0),this._action.enabled&&0===e.button&&t.classList.add("active")}))),zo&&this._register(nC(t,zC.CONTEXT_MENU,(e=>{0===e.button&&!0===e.ctrlKey&&this.onClick(e)}))),this._register(nC(t,zC.CLICK,(e=>{HC(e,!0),this.options&&this.options.isMenu||this.onClick(e)}))),this._register(nC(t,zC.DBLCLICK,(e=>{HC(e,!0)}))),[zC.MOUSE_UP,zC.MOUSE_OUT].forEach((e=>{this._register(nC(t,e,(e=>{HC(e),t.classList.remove("active")})))}))}onClick(e,t=!1){var i;HC(e,!0);const n=Tr(this._context)?(null===(i=this.options)||void 0===i?void 0:i.useEventAsContext)?e:{preserveFocus:t}:this._context;this.actionRunner.run(this._action,n)}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(){}updateTooltip(){}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),super.dispose()}}class fB extends mB{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),this.element&&(this.label=$C(this.element,YC("a.action-label"))),this.label&&(this._action.id===_y.ID?this.label.setAttribute("role","presentation"):this.options.isMenu?this.label.setAttribute("role","menuitem"):this.label.setAttribute("role","button")),this.options.label&&this.options.keybinding&&this.element&&($C(this.element,YC("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}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.getAction().label)}updateTooltip(){let e=null;this.getAction().tooltip?e=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(e=this.getAction().label,this.options.keybinding&&(e=mf(0,"{0} ({1})",e,this.options.keybinding))),e&&this.label&&(this.label.title=e)}updateClass(){this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getAction().class,this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):this.label&&this.label.classList.remove("codicon")}updateEnabled(){this.getAction().enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),this.element&&this.element.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),this.element&&this.element.classList.add("disabled"))}updateChecked(){this.label&&(this.getAction().checked?this.label.classList.add("checked"):this.label.classList.remove("checked"))}}var _B=globalThis&&globalThis.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,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){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class vB extends Uo{constructor(e,t={}){var i,n,o,s,r,a;let l,d;switch(super(),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new $o),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new $o({onFirstListenerAdd:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new $o),this.onDidRun=this._onDidRun.event,this._onBeforeRun=this._register(new $o),this.onBeforeRun=this._onBeforeRun.event,this.options=t,this._context=null!==(i=t.context)&&void 0!==i?i:null,this._orientation=null!==(n=this.options.orientation)&&void 0!==n?n:0,this._triggerKeys={keyDown:null!==(s=null===(o=this.options.triggerKeys)||void 0===o?void 0:o.keyDown)&&void 0!==s&&s,keys:null!==(a=null===(r=this.options.triggerKeys)||void 0===r?void 0:r.keys)&&void 0!==a?a:[3,10]},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new fy,this._register(this._actionRunner)),this._register(this._actionRunner.onDidRun((e=>this._onDidRun.fire(e)))),this._register(this._actionRunner.onBeforeRun((e=>this._onBeforeRun.fire(e)))),this._actionIds=[],this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",!1!==t.animated&&this.domNode.classList.add("animated"),this._orientation){case 0:l=[15],d=[17];break;case 1:l=[16],d=[18],this.domNode.className+=" vertical"}this._register(nC(this.domNode,zC.KEY_DOWN,(e=>{const t=new jw(e);let i=!0;const n="number"==typeof this.focusedItem?this.viewItems[this.focusedItem]:void 0;l&&(t.equals(l[0])||t.equals(l[1]))?i=this.focusPrevious():d&&(t.equals(d[0])||t.equals(d[1]))?i=this.focusNext():t.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():t.equals(14)?i=this.focusFirst():t.equals(13)?i=this.focusLast():t.equals(2)&&n instanceof mB&&n.trapsArrowNavigation?i=this.focusNext():this.isTriggerKeyEvent(t)?this._triggerKeys.keyDown?this.doTrigger(t):this.triggerKeyDown=!0:i=!1,i&&(t.preventDefault(),t.stopPropagation())}))),this._register(nC(this.domNode,zC.KEY_UP,(e=>{const t=new jw(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))&&this.updateFocusedItem()}))),this.focusTracker=this._register(UC(this.domNode)),this._register(this.focusTracker.onDidBlur((()=>{OC()!==this.domNode&&NC(OC(),this.domNode)||(this._onDidBlur.fire(),this.focusedItem=void 0,this.previouslyFocusedItem=void 0,this.triggerKeyDown=!1)}))),this._register(this.focusTracker.onDidFocus((()=>this.updateFocusedItem()))),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.actionsList.setAttribute("role","toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}refreshRole(){this.length()>=2?this.actionsList.setAttribute("role","toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(e){if(this.focusable=e,this.focusable){const e=this.viewItems.find((e=>e instanceof mB&&e.isEnabled()));e instanceof mB&&e.setFocusable(!0)}else this.viewItems.forEach((e=>{e instanceof mB&&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){e&&(this._actionRunner=e,this.viewItems.forEach((t=>t.actionRunner=e)))}getContainer(){return this.domNode}push(e,t={}){const i=Array.isArray(e)?e:[e];let n=vr(t.index)?t.index:null;i.forEach((e=>{const i=document.createElement("li");let o;i.className="action-item",i.setAttribute("role","presentation"),this.options.allowContextMenu||this._register(nC(i,zC.CONTEXT_MENU,(e=>{HC(e,!0)}))),this.options.actionViewItemProvider&&(o=this.options.actionViewItemProvider(e)),o||(o=new fB(this.context,e,t)),o.actionRunner=this._actionRunner,o.setActionContext(this.context),o.render(i),this.focusable&&o instanceof mB&&0===this.viewItems.length&&o.setFocusable(!0),null===n||n<0||n>=this.actionsList.children.length?(this.actionsList.appendChild(i),this.viewItems.push(o),this._actionIds.push(e.id)):(this.actionsList.insertBefore(i,this.actionsList.children[n]),this.viewItems.splice(n,0,o),this._actionIds.splice(n,0,e.id),n++)})),"number"==typeof this.focusedItem&&this.focus(this.focusedItem),this.refreshRole()}clear(){bs(this.viewItems),this.viewItems=[],this._actionIds=[],eC(this.actionsList),this.refreshRole()}length(){return 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&&void 0===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){if(void 0===this.focusedItem)this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let i;do{if(!e&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=t,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,i=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&this.options.focusOnlyEnabledItems&&!i.isEnabled());return this.updateFocus(),!0}focusPrevious(e){if(void 0===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());return this.updateFocus(!0),!0}updateFocus(e,t,i=!1){var n;void 0===this.focusedItem&&this.actionsList.focus({preventScroll:t}),void 0!==this.previouslyFocusedItem&&this.previouslyFocusedItem!==this.focusedItem&&(null===(n=this.viewItems[this.previouslyFocusedItem])||void 0===n||n.blur());const o=void 0!==this.focusedItem&&this.viewItems[this.focusedItem];if(o){let n=!0;ua(o.focus)||(n=!1),this.options.focusOnlyEnabledItems&&ua(o.isEnabled)&&!o.isEnabled()&&(n=!1),n?(i||this.previouslyFocusedItem!==this.focusedItem)&&(o.focus(e),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem=void 0)}}doTrigger(e){if(void 0===this.focusedItem)return;const t=this.viewItems[this.focusedItem];if(t instanceof mB){const i=null===t._context||void 0===t._context?e:t._context;this.run(t._action,i)}}run(e,t){return _B(this,void 0,void 0,(function*(){yield this._actionRunner.run(e,t)}))}dispose(){bs(this.viewItems),this.viewItems=[],this._actionIds=[],this.getContainer().remove(),super.dispose()}}var bB;!function(e){e.getDefinition=function(e,t){let i=e.defaults;for(;ex.isThemeIcon(i);){const e=wB.getIcon(i.id);if(!e)return;i=e.defaults}return i}}(bB||(bB={}));const wB=new class{constructor(){this._onDidChange=new $o,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:mf(0,"The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:mf(0,"The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${Ys.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}let s={id:e,description:i,defaults:t,deprecationMessage:n};this.iconsById[e]=s;let 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=>{for(;ex.isThemeIcon(e.defaults);)e=this.iconsById[e.defaults.id];return`codicon codicon-${e?e.id:""}`};let 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}|${ex.isThemeIcon(o.defaults)?o.defaults.id:o.id}|${o.description||""}|`);i.push("| preview | identifier "),i.push("| ----------- | --------------------------------- |");for(const o of n.filter((e=>!ex.isThemeIcon(e.defaults))).sort(e))i.push(`||${o.id}|`);return i.join("\n")}};function CB(e,t,i,n){return wB.registerIcon(e,t,i,n)}function yB(){return wB}Yy.add("base.contributions.icons",wB),function(){for(const e of br.getAll())wB.registerIcon(e.id,e.definition,e.description)}();const xB="vscode://schemas/icons";let SB=Yy.as(uS);SB.registerSchema(xB,wB.getIconSchema());const kB=new lb((()=>SB.notifySchemaChanged(xB)),200);wB.onDidChange((()=>{kB.isScheduled()||kB.schedule()}));const DB=CB("widget-close",br.close,mf(0,"Icon for the close action in widgets."));CB("goto-previous-location",br.arrowUp,mf(0,"Icon for goto previous editor location.")),CB("goto-next-location",br.arrowDown,mf(0,"Icon for goto next editor location.")),ex.modify(br.sync,"spin"),ex.modify(br.loading,"spin");var LB,NB=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},EB=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}},IB=globalThis&&globalThis.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,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){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class TB{constructor(e,t,i,n){this.originalLineStart=e,this.originalLineEnd=t,this.modifiedLineStart=i,this.modifiedLineEnd=n}getType(){return 0===this.originalLineStart?1:0===this.modifiedLineStart?2:0}}class MB{constructor(e){this.entries=e}}const AB=CB("diff-review-insert",br.add,mf(0,"Icon for 'Insert' in diff review.")),OB=CB("diff-review-remove",br.remove,mf(0,"Icon for 'Remove' in diff review.")),RB=CB("diff-review-close",br.close,mf(0,"Icon for 'Close' in diff review."));let PB=class e extends Uo{constructor(e,t){super(),this._languageService=t,this._width=0,this._diffEditor=e,this._isVisible=!1,this.shadow=p_(document.createElement("div")),this.shadow.setClassName("diff-review-shadow"),this.actionBarContainer=p_(document.createElement("div")),this.actionBarContainer.setClassName("diff-review-actions"),this._actionBar=this._register(new vB(this.actionBarContainer.domNode)),this._actionBar.push(new my("diffreview.close",mf(0,"Close"),"close-diff-review "+ex.asClassName(RB),!0,(()=>IB(this,void 0,void 0,(function*(){return this.hide()})))),{label:!1,icon:!0}),this.domNode=p_(document.createElement("div")),this.domNode.setClassName("diff-review monaco-editor-background"),this._content=p_(document.createElement("div")),this._content.setClassName("diff-review-content"),this._content.setAttribute("role","code"),this.scrollbar=this._register(new fT(this._content.domNode,{})),this.domNode.domNode.appendChild(this.scrollbar.getDomNode()),this._register(e.onDidUpdateDiff((()=>{this._isVisible&&(this._diffs=this._compute(),this._render())}))),this._register(e.getModifiedEditor().onDidChangeCursorPosition((()=>{this._isVisible&&this._render()}))),this._register(sC(this.domNode.domNode,"click",(e=>{e.preventDefault();const t=EC(e.target,"diff-review-row");t&&this._goToRow(t)}))),this._register(sC(this.domNode.domNode,"keydown",(e=>{(e.equals(18)||e.equals(2066)||e.equals(530))&&(e.preventDefault(),this._goToRow(this._getNextRow())),(e.equals(16)||e.equals(2064)||e.equals(528))&&(e.preventDefault(),this._goToRow(this._getPrevRow())),(e.equals(9)||e.equals(2057)||e.equals(521)||e.equals(1033))&&(e.preventDefault(),this.hide()),(e.equals(10)||e.equals(3))&&(e.preventDefault(),this.accept())}))),this._diffs=[],this._currentDiff=null}prev(){let e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let t=-1;for(let e=0,i=this._diffs.length;e0){const t=e[l-1];n=0===t.originalEndLineNumber?t.originalStartLineNumber+1:t.originalEndLineNumber+1,o=0===t.modifiedEndLineNumber?t.modifiedStartLineNumber+1:t.modifiedEndLineNumber+1}let s=t-3+1,d=i-3+1;if(ss){const e=s-m;m+=e,f+=e}if(f>p){const e=p-f;m+=e,f+=e}u[g++]=new TB(n,m,o,f)}n[o++]=new MB(u)}let s=n[0].entries;const r=[];let a=0;for(let l=1,d=n.length;lh)&&(h=n),0!==o&&(0===u||og)&&(g=s)}const p=document.createElement("div");p.className="diff-review-row";const m=document.createElement("div");m.className="diff-review-cell diff-review-summary";const f=h-c+1,_=g-u+1;m.appendChild(document.createTextNode(`${a+1}/${this._diffs.length}: @@ -${c},${f} +${u},${_} @@`)),p.setAttribute("data-line",String(u));const v=e=>0===e?mf(0,"no lines changed"):1===e?mf(0,"1 line changed"):mf(0,"{0} lines changed",e),b=v(f),w=v(_);p.setAttribute("aria-label",mf(0,"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",a+1,this._diffs.length,c,b,u,w)),p.appendChild(m),p.setAttribute("role","listitem"),d.appendChild(p);const C=i.get(59);let y=u;for(let x=0,S=l.length;xe}),PB=NB([EB(1,Lv)],PB),sx(((e,t)=>{const i=e.getColor(QN);i&&t.addRule(`.monaco-diff-editor .diff-review-line-number { color: ${i}; }`);const n=e.getColor(QS);n&&t.addRule(`.monaco-diff-editor .diff-review-shadow { box-shadow: ${n} 0 -6px 6px -6px inset; }`)}));function FB(e){const t=e.get(N_),i=t.listDiffEditors(),n=t.getActiveCodeEditor();if(!n)return null;for(let o=0,s=i.length;on.modifiedStartLineNumber?mf(0,"Copy deleted lines"):mf(0,"Copy deleted line"):n.originalEndLineNumber>n.modifiedStartLineNumber?mf(0,"Copy changed lines"):mf(0,"Copy changed line"),void 0,!0,(()=>zB(this,void 0,void 0,(function*(){const e=new qo(n.originalStartLineNumber,1,n.originalEndLineNumber+1,1),t=n.originalModel.getValueInRange(e);yield this._clipboardService.writeText(t)})))));let c,h=0;n.originalEndLineNumber>n.modifiedStartLineNumber&&(c=new my("diff.clipboard.copyDeletedLineContent",mf(0,d?"Copy deleted line ({0})":"Copy changed line ({0})",n.originalStartLineNumber),void 0,!0,(()=>zB(this,void 0,void 0,(function*(){const e=n.originalModel.getLineContent(n.originalStartLineNumber+h);if(""===e){const e=n.originalModel.getEndOfLineSequence();yield this._clipboardService.writeText(0===e?"\n":"\r\n")}else yield this._clipboardService.writeText(e)})))),l.push(c));i.getOption(81)||l.push(new my("diff.inline.revertChange",mf(0,"Revert this change"),void 0,!0,(()=>zB(this,void 0,void 0,(function*(){const e=new qo(n.originalStartLineNumber,1,n.originalEndLineNumber,n.originalModel.getLineMaxColumn(n.originalEndLineNumber)),t=n.originalModel.getValueInRange(e);if(0===n.modifiedEndLineNumber){const e=i.getModel().getLineMaxColumn(n.modifiedStartLineNumber);i.executeEdits("diffEditor",[{range:new qo(n.modifiedStartLineNumber,e,n.modifiedStartLineNumber,e),text:a+t}])}else{const e=i.getModel().getLineMaxColumn(n.modifiedEndLineNumber);i.executeEdits("diffEditor",[{range:new qo(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,e),text:t}])}})))));const u=(e,t)=>{this._contextMenuService.showContextMenu({getAnchor:()=>({x:e,y:t}),getActions:()=>(c&&(c.label=mf(0,d?"Copy deleted line ({0})":"Copy changed line ({0})",n.originalStartLineNumber+h)),l),autoSelectFirstItem:!0})};this._register(sC(this._diffActions,"mousedown",(e=>{const{top:t,height:i}=yC(this._diffActions),n=Math.floor(r/3);e.preventDefault(),u(e.posx,t+i+n)}))),this._register(i.onMouseMove((e=>{if(8===e.target.type||5===e.target.type){e.target.detail.viewZoneId===this._viewZoneId?(this.visibility=!0,h=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,r)):this.visibility=!1}else this.visibility=!1}))),this._register(i.onMouseDown((e=>{if(e.event.rightButton&&(8===e.target.type||5===e.target.type)){e.target.detail.viewZoneId===this._viewZoneId&&(e.event.preventDefault(),h=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,r),u(e.event.posx,e.event.posy+r))}})))}get visibility(){return this._visibility}set visibility(e){this._visibility!==e&&(this._visibility=e,this._diffActions.style.visibility=e?"visible":"hidden")}_updateLightBulbPosition(e,t,i){const{top:n}=yC(e),o=t-n,s=Math.floor(o/i),r=s*i;if(this._diffActions.style.top=`${r}px`,this.diff.viewLineCounts){let e=0;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},GB=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}};class ZB{constructor(e,t){this._contextMenuService=e,this._clipboardService=t,this._zones=[],this._inlineDiffMargins=[],this._zonesMap={},this._decorations=[]}getForeignViewZones(e){return e.filter((e=>!this._zonesMap[String(e.id)]))}clean(e){this._zones.length>0&&e.changeViewZones((e=>{for(const t of this._zones)e.removeZone(t)})),this._zones=[],this._zonesMap={},this._decorations=e.deltaDecorations(this._decorations,[])}apply(e,t,i,n){const o=n?hB.capture(e):null;e.changeViewZones((t=>{var n;for(const e of this._zones)t.removeZone(e);for(const e of this._inlineDiffMargins)e.dispose();this._zones=[],this._zonesMap={},this._inlineDiffMargins=[];for(let o=0,s=i.zones.length;oe});let eV=class e extends Uo{constructor(t,i,n,o,s,r,a,l,d,c,h,u){super(),this._editorProgressService=u,this._onDidDispose=this._register(new $o),this.onDidDispose=this._onDidDispose.event,this._onDidUpdateDiff=this._register(new $o),this.onDidUpdateDiff=this._onDidUpdateDiff.event,this._onDidContentSizeChange=this._register(new $o),this._lastOriginalWarning=null,this._lastModifiedWarning=null,this._editorWorkerService=s,this._codeEditorService=l,this._contextKeyService=this._register(r.createScoped(t)),this._instantiationService=a.createChild(new pF([$y,this._contextKeyService])),this._contextKeyService.createKey("isInDiffEditor",!0),this._themeService=d,this._notificationService=c,this._id=++YB,this._state=0,this._updatingDiffProgress=null,this._domElement=t,i=i||{},this._options=pV(i,{enableSplitViewResizing:!0,renderSideBySide:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit"}),void 0!==i.isInEmbeddedEditor?this._contextKeyService.createKey("isInEmbeddedDiffEditor",i.isInEmbeddedEditor):this._contextKeyService.createKey("isInEmbeddedDiffEditor",!1),this._updateDecorationsRunner=this._register(new lb((()=>this._updateDecorations()),0)),this._containerDomElement=document.createElement("div"),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide),this._containerDomElement.style.position="relative",this._containerDomElement.style.height="100%",this._domElement.appendChild(this._containerDomElement),this._overviewViewportDomElement=p_(document.createElement("div")),this._overviewViewportDomElement.setClassName("diffViewport"),this._overviewViewportDomElement.setPosition("absolute"),this._overviewDomElement=document.createElement("div"),this._overviewDomElement.className="diffOverview",this._overviewDomElement.style.position="absolute",this._overviewDomElement.appendChild(this._overviewViewportDomElement.domNode),this._register(sC(this._overviewDomElement,"mousedown",(e=>{this._modifiedEditor.delegateVerticalScrollbarMouseDown(e)}))),this._options.renderOverviewRuler&&this._containerDomElement.appendChild(this._overviewDomElement),this._originalDomNode=document.createElement("div"),this._originalDomNode.className="editor original",this._originalDomNode.style.position="absolute",this._originalDomNode.style.height="100%",this._containerDomElement.appendChild(this._originalDomNode),this._modifiedDomNode=document.createElement("div"),this._modifiedDomNode.className="editor modified",this._modifiedDomNode.style.position="absolute",this._modifiedDomNode.style.height="100%",this._containerDomElement.appendChild(this._modifiedDomNode),this._beginUpdateDecorationsTimeout=-1,this._currentlyChangingViewZones=!1,this._diffComputationToken=0,this._originalEditorState=new ZB(h,o),this._modifiedEditorState=new ZB(h,o),this._isVisible=!0,this._isHandlingScrollEvent=!1,this._elementSizeObserver=this._register(new Wx(this._containerDomElement,i.dimension)),this._register(this._elementSizeObserver.onDidChange((()=>this._onDidContainerSizeChanged()))),i.automaticLayout&&this._elementSizeObserver.startObserving(),this._diffComputationResult=null,this._originalEditor=this._createLeftHandSideEditor(i,n.originalEditor||{}),this._modifiedEditor=this._createRightHandSideEditor(i,n.modifiedEditor||{}),this._originalOverviewRuler=null,this._modifiedOverviewRuler=null,this._reviewPane=a.createInstance(PB,this),this._containerDomElement.appendChild(this._reviewPane.domNode.domNode),this._containerDomElement.appendChild(this._reviewPane.shadow.domNode),this._containerDomElement.appendChild(this._reviewPane.actionBarContainer.domNode),this._options.renderSideBySide?this._setStrategy(new rV(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new lV(this._createDataSource(),this._options.enableSplitViewResizing)),this._register(d.onDidColorThemeChange((t=>{this._strategy&&this._strategy.applyColors(t)&&this._updateDecorationsRunner.schedule(),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)})));const g=Tx.getDiffEditorContributions();for(const e of g)try{this._register(a.createInstance(e.ctor,this))}catch(p){Jo(p)}this._codeEditorService.addDiffEditor(this)}_setState(e){this._state!==e&&(this._state=e,this._updatingDiffProgress&&(this._updatingDiffProgress.done(),this._updatingDiffProgress=null),1===this._state&&(this._updatingDiffProgress=this._editorProgressService.show(!0,1e3)))}diffReviewNext(){this._reviewPane.next()}diffReviewPrev(){this._reviewPane.prev()}static _getClassName(e,t){let i="monaco-diff-editor monaco-editor-background ";return t&&(i+="side-by-side "),i+=ix(e.type),i}_recreateOverviewRulers(){this._options.renderOverviewRuler&&(this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._originalEditor.hasModel()&&(this._originalOverviewRuler=this._originalEditor.createOverviewRuler("original diffOverviewRuler"),this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode())),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._modifiedEditor.hasModel()&&(this._modifiedOverviewRuler=this._modifiedEditor.createOverviewRuler("modified diffOverviewRuler"),this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode())),this._layoutOverviewRulers())}_createLeftHandSideEditor(t,i){const n=this._createInnerEditor(this._instantiationService,this._originalDomNode,this._adjustOptionsForLeftHandSide(t),i);this._register(n.onDidScrollChange((e=>{this._isHandlingScrollEvent||(e.scrollTopChanged||e.scrollLeftChanged||e.scrollHeightChanged)&&(this._isHandlingScrollEvent=!0,this._modifiedEditor.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())}))),this._register(n.onDidChangeViewZones((()=>{this._onViewZonesChanged()}))),this._register(n.onDidChangeConfiguration((e=>{n.getModel()&&(e.hasChanged(44)&&this._updateDecorationsRunner.schedule(),e.hasChanged(132)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))}))),this._register(n.onDidChangeHiddenAreas((()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()}))),this._register(n.onDidChangeModelContent((()=>{this._isVisible&&this._beginUpdateDecorationsSoon()})));const o=this._contextKeyService.createKey("isInDiffLeftEditor",n.hasWidgetFocus());return this._register(n.onDidFocusEditorWidget((()=>o.set(!0)))),this._register(n.onDidBlurEditorWidget((()=>o.set(!1)))),this._register(n.onDidContentSizeChange((t=>{const i=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+e.ONE_OVERVIEW_WIDTH,n=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:n,contentWidth:i,contentHeightChanged:t.contentHeightChanged,contentWidthChanged:t.contentWidthChanged})}))),n}_createRightHandSideEditor(t,i){const n=this._createInnerEditor(this._instantiationService,this._modifiedDomNode,this._adjustOptionsForRightHandSide(t),i);this._register(n.onDidScrollChange((e=>{this._isHandlingScrollEvent||(e.scrollTopChanged||e.scrollLeftChanged||e.scrollHeightChanged)&&(this._isHandlingScrollEvent=!0,this._originalEditor.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())}))),this._register(n.onDidChangeViewZones((()=>{this._onViewZonesChanged()}))),this._register(n.onDidChangeConfiguration((e=>{n.getModel()&&(e.hasChanged(44)&&this._updateDecorationsRunner.schedule(),e.hasChanged(132)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))}))),this._register(n.onDidChangeHiddenAreas((()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()}))),this._register(n.onDidChangeModelContent((()=>{this._isVisible&&this._beginUpdateDecorationsSoon()}))),this._register(n.onDidChangeModelOptions((e=>{e.tabSize&&this._updateDecorationsRunner.schedule()})));const o=this._contextKeyService.createKey("isInDiffRightEditor",n.hasWidgetFocus());return this._register(n.onDidFocusEditorWidget((()=>o.set(!0)))),this._register(n.onDidBlurEditorWidget((()=>o.set(!1)))),this._register(n.onDidContentSizeChange((t=>{const i=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+e.ONE_OVERVIEW_WIDTH,n=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:n,contentWidth:i,contentHeightChanged:t.contentHeightChanged,contentWidthChanged:t.contentWidthChanged})}))),n}_createInnerEditor(e,t,i,n){return e.createInstance(UF,t,i,n)}dispose(){this._codeEditorService.removeDiffEditor(this),-1!==this._beginUpdateDecorationsTimeout&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._cleanViewZonesAndDecorations(),this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._overviewDomElement.removeChild(this._overviewViewportDomElement.domNode),this._options.renderOverviewRuler&&this._containerDomElement.removeChild(this._overviewDomElement),this._containerDomElement.removeChild(this._originalDomNode),this._originalEditor.dispose(),this._containerDomElement.removeChild(this._modifiedDomNode),this._modifiedEditor.dispose(),this._strategy.dispose(),this._containerDomElement.removeChild(this._reviewPane.domNode.domNode),this._containerDomElement.removeChild(this._reviewPane.shadow.domNode),this._containerDomElement.removeChild(this._reviewPane.actionBarContainer.domNode),this._reviewPane.dispose(),this._domElement.removeChild(this._containerDomElement),this._onDidDispose.fire(),super.dispose()}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return M_.IDiffEditor}getLineChanges(){return this._diffComputationResult?this._diffComputationResult.changes:null}getOriginalEditor(){return this._originalEditor}getModifiedEditor(){return this._modifiedEditor}updateOptions(t){const i=pV(t,this._options),n=function(e,t){return{enableSplitViewResizing:e.enableSplitViewResizing!==t.enableSplitViewResizing,renderSideBySide:e.renderSideBySide!==t.renderSideBySide,maxComputationTime:e.maxComputationTime!==t.maxComputationTime,maxFileSize:e.maxFileSize!==t.maxFileSize,ignoreTrimWhitespace:e.ignoreTrimWhitespace!==t.ignoreTrimWhitespace,renderIndicators:e.renderIndicators!==t.renderIndicators,originalEditable:e.originalEditable!==t.originalEditable,diffCodeLens:e.diffCodeLens!==t.diffCodeLens,renderOverviewRuler:e.renderOverviewRuler!==t.renderOverviewRuler,diffWordWrap:e.diffWordWrap!==t.diffWordWrap}}(this._options,i);this._options=i;const o=n.ignoreTrimWhitespace||n.renderIndicators,s=this._isVisible&&(n.maxComputationTime||n.maxFileSize);o?this._beginUpdateDecorations():s&&this._beginUpdateDecorationsSoon(),this._modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(t)),this._originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(t)),this._strategy.setEnableSplitViewResizing(this._options.enableSplitViewResizing),n.renderSideBySide&&(this._options.renderSideBySide?this._setStrategy(new rV(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new lV(this._createDataSource(),this._options.enableSplitViewResizing)),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)),n.renderOverviewRuler&&(this._options.renderOverviewRuler?this._containerDomElement.appendChild(this._overviewDomElement):this._containerDomElement.removeChild(this._overviewDomElement))}getModel(){return{original:this._originalEditor.getModel(),modified:this._modifiedEditor.getModel()}}setModel(e){if(e&&(!e.original||!e.modified))throw new Error(e.original?"DiffEditorWidget.setModel: Modified model is null":"DiffEditorWidget.setModel: Original model is null");this._cleanViewZonesAndDecorations(),this._originalEditor.setModel(e?e.original:null),this._modifiedEditor.setModel(e?e.modified:null),this._updateDecorationsRunner.cancel(),e&&(this._originalEditor.setScrollTop(0),this._modifiedEditor.setScrollTop(0)),this._diffComputationResult=null,this._diffComputationToken++,this._setState(0),e&&(this._recreateOverviewRulers(),this._beginUpdateDecorations()),this._layoutOverviewViewport()}getContainerDomNode(){return this._domElement}getVisibleColumnFromPosition(e){return this._modifiedEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._modifiedEditor.getPosition()}setPosition(e,t="api"){this._modifiedEditor.setPosition(e,t)}revealLine(e,t=0){this._modifiedEditor.revealLine(e,t)}revealLineInCenter(e,t=0){this._modifiedEditor.revealLineInCenter(e,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealLineInCenterIfOutsideViewport(e,t)}revealLineNearTop(e,t=0){this._modifiedEditor.revealLineNearTop(e,t)}revealPosition(e,t=0){this._modifiedEditor.revealPosition(e,t)}revealPositionInCenter(e,t=0){this._modifiedEditor.revealPositionInCenter(e,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealPositionInCenterIfOutsideViewport(e,t)}revealPositionNearTop(e,t=0){this._modifiedEditor.revealPositionNearTop(e,t)}getSelection(){return this._modifiedEditor.getSelection()}getSelections(){return this._modifiedEditor.getSelections()}setSelection(e,t="api"){this._modifiedEditor.setSelection(e,t)}setSelections(e,t="api"){this._modifiedEditor.setSelections(e,t)}revealLines(e,t,i=0){this._modifiedEditor.revealLines(e,t,i)}revealLinesInCenter(e,t,i=0){this._modifiedEditor.revealLinesInCenter(e,t,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._modifiedEditor.revealLinesInCenterIfOutsideViewport(e,t,i)}revealLinesNearTop(e,t,i=0){this._modifiedEditor.revealLinesNearTop(e,t,i)}revealRange(e,t=0,i=!1,n=!0){this._modifiedEditor.revealRange(e,t,i,n)}revealRangeInCenter(e,t=0){this._modifiedEditor.revealRangeInCenter(e,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealRangeInCenterIfOutsideViewport(e,t)}revealRangeNearTop(e,t=0){this._modifiedEditor.revealRangeNearTop(e,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._modifiedEditor.revealRangeNearTopIfOutsideViewport(e,t)}revealRangeAtTop(e,t=0){this._modifiedEditor.revealRangeAtTop(e,t)}getSupportedActions(){return this._modifiedEditor.getSupportedActions()}saveViewState(){return{original:this._originalEditor.saveViewState(),modified:this._modifiedEditor.saveViewState()}}restoreViewState(e){if(e&&e.original&&e.modified){const t=e;this._originalEditor.restoreViewState(t.original),this._modifiedEditor.restoreViewState(t.modified)}}layout(e){this._elementSizeObserver.observe(e)}focus(){this._modifiedEditor.focus()}hasTextFocus(){return this._originalEditor.hasTextFocus()||this._modifiedEditor.hasTextFocus()}trigger(e,t,i){this._modifiedEditor.trigger(e,t,i)}changeDecorations(e){return this._modifiedEditor.changeDecorations(e)}_onDidContainerSizeChanged(){this._doLayout()}_getReviewHeight(){return this._reviewPane.isVisible()?this._elementSizeObserver.getHeight():0}_layoutOverviewRulers(){if(!this._options.renderOverviewRuler)return;if(!this._originalOverviewRuler||!this._modifiedOverviewRuler)return;const t=this._elementSizeObserver.getHeight(),i=this._getReviewHeight(),n=e.ENTIRE_DIFF_OVERVIEW_WIDTH-2*e.ONE_OVERVIEW_WIDTH;this._modifiedEditor.getLayoutInfo()&&(this._originalOverviewRuler.setLayout({top:0,width:e.ONE_OVERVIEW_WIDTH,right:n+e.ONE_OVERVIEW_WIDTH,height:t-i}),this._modifiedOverviewRuler.setLayout({top:0,right:0,width:e.ONE_OVERVIEW_WIDTH,height:t-i}))}_onViewZonesChanged(){this._currentlyChangingViewZones||this._updateDecorationsRunner.schedule()}_beginUpdateDecorationsSoon(){-1!==this._beginUpdateDecorationsTimeout&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._beginUpdateDecorationsTimeout=window.setTimeout((()=>this._beginUpdateDecorations()),e.UPDATE_DIFF_DECORATIONS_DELAY)}static _equals(e,t){return!e&&!t||!(!e||!t)&&e.toString()===t.toString()}_beginUpdateDecorations(){this._beginUpdateDecorationsTimeout=-1;const t=this._originalEditor.getModel(),i=this._modifiedEditor.getModel();if(!t||!i)return;this._diffComputationToken++;const n=this._diffComputationToken,o=1024*this._options.maxFileSize*1024,s=e=>{const t=e.getValueLength();return 0===o||t<=o};s(t)&&s(i)?(this._setState(1),this._editorWorkerService.computeDiff(t.uri,i.uri,this._options.ignoreTrimWhitespace,this._options.maxComputationTime).then((e=>{n===this._diffComputationToken&&t===this._originalEditor.getModel()&&i===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=e,this._updateDecorationsRunner.schedule(),this._onDidUpdateDiff.fire())}),(e=>{n===this._diffComputationToken&&t===this._originalEditor.getModel()&&i===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=null,this._updateDecorationsRunner.schedule())}))):e._equals(t.uri,this._lastOriginalWarning)&&e._equals(i.uri,this._lastModifiedWarning)||(this._lastOriginalWarning=t.uri,this._lastModifiedWarning=i.uri,this._notificationService.warn(mf(0,"Cannot compare files because one file is too large.")))}_cleanViewZonesAndDecorations(){this._originalEditorState.clean(this._originalEditor),this._modifiedEditorState.clean(this._modifiedEditor)}_updateDecorations(){if(!this._originalEditor.getModel()||!this._modifiedEditor.getModel())return;const e=this._diffComputationResult?this._diffComputationResult.changes:[],t=this._originalEditorState.getForeignViewZones(this._originalEditor.getWhitespaces()),i=this._modifiedEditorState.getForeignViewZones(this._modifiedEditor.getWhitespaces()),n=this._strategy.getEditorsDiffDecorations(e,this._options.ignoreTrimWhitespace,this._options.renderIndicators,t,i);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this._originalEditor,this._originalOverviewRuler,n.original,!1),this._modifiedEditorState.apply(this._modifiedEditor,this._modifiedOverviewRuler,n.modified,!0)}finally{this._currentlyChangingViewZones=!1}}_adjustOptionsForSubEditor(e){const t=Object.assign({},e);return t.inDiffEditor=!0,t.automaticLayout=!1,t.scrollbar=Object.assign({},t.scrollbar||{}),t.scrollbar.vertical="visible",t.folding=!1,t.codeLens=this._options.diffCodeLens,t.fixedOverflowWidgets=!0,t.minimap=Object.assign({},t.minimap||{}),t.minimap.enabled=!1,t}_adjustOptionsForLeftHandSide(e){const t=this._adjustOptionsForSubEditor(e);return this._options.renderSideBySide?t.wordWrapOverride1=this._options.diffWordWrap:(t.wordWrapOverride1="off",t.wordWrapOverride2="off"),e.originalAriaLabel&&(t.ariaLabel=e.originalAriaLabel),t.readOnly=!this._options.originalEditable,t.extraEditorClassName="original-in-monaco-diff-editor",Object.assign(Object.assign({},t),{dimension:{height:0,width:0}})}_adjustOptionsForRightHandSide(t){const i=this._adjustOptionsForSubEditor(t);return t.modifiedAriaLabel&&(i.ariaLabel=t.modifiedAriaLabel),i.wordWrapOverride1=this._options.diffWordWrap,i.revealHorizontalRightPadding=Xf.revealHorizontalRightPadding.defaultValue+e.ENTIRE_DIFF_OVERVIEW_WIDTH,i.scrollbar.verticalHasArrows=!1,i.extraEditorClassName="modified-in-monaco-diff-editor",Object.assign(Object.assign({},i),{dimension:{height:0,width:0}})}doLayout(){this._elementSizeObserver.observe(),this._doLayout()}_doLayout(){const t=this._elementSizeObserver.getWidth(),i=this._elementSizeObserver.getHeight(),n=this._getReviewHeight(),o=this._strategy.layout();this._originalDomNode.style.width=o+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=t-o+"px",this._modifiedDomNode.style.left=o+"px",this._overviewDomElement.style.top="0px",this._overviewDomElement.style.height=i-n+"px",this._overviewDomElement.style.width=e.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewDomElement.style.left=t-e.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.setWidth(e.ENTIRE_DIFF_OVERVIEW_WIDTH),this._overviewViewportDomElement.setHeight(30),this._originalEditor.layout({width:o,height:i-n}),this._modifiedEditor.layout({width:t-o-(this._options.renderOverviewRuler?e.ENTIRE_DIFF_OVERVIEW_WIDTH:0),height:i-n}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._reviewPane.layout(i-n,t,n),this._layoutOverviewViewport()}_layoutOverviewViewport(){const e=this._computeOverviewViewport();e?(this._overviewViewportDomElement.setTop(e.top),this._overviewViewportDomElement.setHeight(e.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))}_computeOverviewViewport(){const e=this._modifiedEditor.getLayoutInfo();if(!e)return null;const t=this._modifiedEditor.getScrollTop(),i=this._modifiedEditor.getScrollHeight(),n=Math.max(0,e.height),o=Math.max(0,n-0),s=i>0?o/i:0;return{height:Math.max(0,Math.floor(e.height*s)),top:Math.floor(t*s)}}_createDataSource(){return{getWidth:()=>this._elementSizeObserver.getWidth(),getHeight:()=>this._elementSizeObserver.getHeight()-this._getReviewHeight(),getOptions:()=>({renderOverviewRuler:this._options.renderOverviewRuler}),getContainerDomNode:()=>this._containerDomElement,relayoutEditors:()=>{this._doLayout()},getOriginalEditor:()=>this._originalEditor,getModifiedEditor:()=>this._modifiedEditor}}_setStrategy(e){this._strategy&&this._strategy.dispose(),this._strategy=e,e.applyColors(this._themeService.getColorTheme()),this._diffComputationResult&&this._updateDecorations(),this._doLayout()}_getLineChangeAtOrBeforeLineNumber(e,t){const i=this._diffComputationResult?this._diffComputationResult.changes:[];if(0===i.length||e=a?n=s+1:(n=s,o=s)}return i[n]}_getEquivalentLineForOriginalLineNumber(e){const t=this._getLineChangeAtOrBeforeLineNumber(e,(e=>e.originalStartLineNumber));if(!t)return e;const i=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),n=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),o=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,s=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,r=e-i;return r<=o?n+Math.min(r,s):n+s-o+r}_getEquivalentLineForModifiedLineNumber(e){const t=this._getLineChangeAtOrBeforeLineNumber(e,(e=>e.modifiedStartLineNumber));if(!t)return e;const i=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),n=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),o=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,s=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,r=e-n;return r<=s?i+Math.min(r,o):i+o-s+r}getDiffLineInformationForOriginal(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(e)}:null}getDiffLineInformationForModified(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(e)}:null}};eV.ONE_OVERVIEW_WIDTH=15,eV.ENTIRE_DIFF_OVERVIEW_WIDTH=30,eV.UPDATE_DIFF_DECORATIONS_DELAY=200,eV=qB([GB(3,jB),GB(4,BB),GB(5,$y),GB(6,k_),GB(7,N_),GB(8,Qy),GB(9,vF),GB(10,WB),GB(11,$B)],eV);class tV extends Uo{constructor(e){super(),this._dataSource=e,this._insertColor=null,this._removeColor=null}applyColors(e){const t=e.getColor(lD)||(e.getColor(iD)||eD).transparent(2),i=e.getColor(dD)||(e.getColor(nD)||tD).transparent(2),n=!t.equals(this._insertColor)||!i.equals(this._removeColor);return this._insertColor=t,this._removeColor=i,n}getEditorsDiffDecorations(e,t,i,n,o){o=o.sort(((e,t)=>e.afterLineNumber-t.afterLineNumber)),n=n.sort(((e,t)=>e.afterLineNumber-t.afterLineNumber));const s=this._getViewZones(e,n,o,i),r=this._getOriginalEditorDecorations(s,e,t,i),a=this._getModifiedEditorDecorations(s,e,t,i);return{original:{decorations:r.decorations,overviewZones:r.overviewZones,zones:s.original},modified:{decorations:a.decorations,overviewZones:a.overviewZones,zones:s.modified}}}}class iV{constructor(e){this._source=e,this._index=-1,this.current=null,this.advance()}advance(){this._index++,this._indexe.afterLineNumber-t.afterLineNumber,_=(e,t)=>{if(null===t.domNode&&e.length>0){const i=e[e.length-1];if(i.afterLineNumber===t.afterLineNumber&&null===i.domNode)return void(i.heightInLines+=t.heightInLines)}e.push(t)},v=new iV(this._modifiedForeignVZ),b=new iV(this._originalForeignVZ);let w=1,C=1;for(let y=0,x=this._lineChanges.length;y<=x;y++){const i=y0?-1:0),g=i.modifiedStartLineNumber+(i.modifiedEndLineNumber>0?-1:0),h=i.originalEndLineNumber>0?nV._getViewLineCount(this._originalEditor,i.originalStartLineNumber,i.originalEndLineNumber):0,c=i.modifiedEndLineNumber>0?nV._getViewLineCount(this._modifiedEditor,i.modifiedStartLineNumber,i.modifiedEndLineNumber):0,p=Math.max(i.originalStartLineNumber,i.originalEndLineNumber),m=Math.max(i.modifiedStartLineNumber,i.modifiedEndLineNumber)):(u+=1e7+h,g+=1e7+c,p=u,m=g);let n=[],S=[];if(o){let e;e=i?i.originalEndLineNumber>0?i.originalStartLineNumber-w:i.modifiedStartLineNumber-C:s.getLineCount()-w+1;for(let t=0;ts&&S.push({afterLineNumber:i,heightInLines:o-s,domNode:null,marginDomNode:null})}i&&(w=(i.originalEndLineNumber>0?i.originalEndLineNumber:i.originalStartLineNumber)+1,C=(i.modifiedEndLineNumber>0?i.modifiedEndLineNumber:i.modifiedStartLineNumber)+1)}for(;v.current&&v.current.afterLineNumber<=m;){let e;e=v.current.afterLineNumber<=g?u-g+v.current.afterLineNumber:p;let o=null;i&&i.modifiedStartLineNumber<=v.current.afterLineNumber&&v.current.afterLineNumber<=i.modifiedEndLineNumber&&(o=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),n.push({afterLineNumber:e,heightInLines:v.current.height/t,domNode:null,marginDomNode:o}),v.advance()}for(;b.current&&b.current.afterLineNumber<=p;){let t;t=b.current.afterLineNumber<=u?g-u+b.current.afterLineNumber:m,S.push({afterLineNumber:t,heightInLines:b.current.height/e,domNode:null}),b.advance()}if(null!==i&&cV(i)){const e=this._produceOriginalFromDiff(i,h,c);e&&n.push(e)}if(null!==i&&hV(i)){const e=this._produceModifiedFromDiff(i,h,c);e&&S.push(e)}let k=0,D=0;for(n=n.sort(f),S=S.sort(f);k=t.heightInLines?(e.heightInLines-=t.heightInLines,D++):(t.heightInLines-=e.heightInLines,k++)}for(;k(e.domNode||(e.domNode=uV()),e)))}}function oV(e,t,i,n,o){return{range:new qo(e,t,i,n),options:o}}const sV={charDelete:GP.register({description:"diff-editor-char-delete",className:"char-delete"}),charDeleteWholeLine:GP.register({description:"diff-editor-char-delete-whole-line",className:"char-delete",isWholeLine:!0}),charInsert:GP.register({description:"diff-editor-char-insert",className:"char-insert"}),charInsertWholeLine:GP.register({description:"diff-editor-char-insert-whole-line",className:"char-insert",isWholeLine:!0}),lineInsert:GP.register({description:"diff-editor-line-insert",className:"line-insert",marginClassName:"gutter-insert",isWholeLine:!0}),lineInsertWithSign:GP.register({description:"diff-editor-line-insert-with-sign",className:"line-insert",linesDecorationsClassName:"insert-sign "+ex.asClassName(XB),marginClassName:"gutter-insert",isWholeLine:!0}),lineDelete:GP.register({description:"diff-editor-line-delete",className:"line-delete",marginClassName:"gutter-delete",isWholeLine:!0}),lineDeleteWithSign:GP.register({description:"diff-editor-line-delete-with-sign",className:"line-delete",linesDecorationsClassName:"delete-sign "+ex.asClassName(QB),marginClassName:"gutter-delete",isWholeLine:!0}),lineDeleteMargin:GP.register({description:"diff-editor-line-delete-margin",marginClassName:"gutter-delete"})};class rV extends tV{constructor(e,t){super(e),this._disableSash=!1===t,this._sashRatio=null,this._sashPosition=null,this._startSashPosition=null,this._sash=this._register(new cB(this._dataSource.getContainerDomNode(),this,{orientation:0})),this._disableSash&&(this._sash.state=0),this._sash.onDidStart((()=>this._onSashDragStart())),this._sash.onDidChange((e=>this._onSashDrag(e))),this._sash.onDidEnd((()=>this._onSashDragEnd())),this._sash.onDidReset((()=>this._onSashReset()))}setEnableSplitViewResizing(e){const t=!1===e;this._disableSash!==t&&(this._disableSash=t,this._sash.state=this._disableSash?0:3)}layout(e=this._sashRatio){const t=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?eV.ENTIRE_DIFF_OVERVIEW_WIDTH:0);let i=Math.floor((e||.5)*t);const n=Math.floor(.5*t);return i=this._disableSash?n:i||n,t>2*rV.MINIMUM_EDITOR_WIDTH?(it-rV.MINIMUM_EDITOR_WIDTH&&(i=t-rV.MINIMUM_EDITOR_WIDTH)):i=n,this._sashPosition!==i&&(this._sashPosition=i),this._sash.layout(),this._sashPosition}_onSashDragStart(){this._startSashPosition=this._sashPosition}_onSashDrag(e){const t=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?eV.ENTIRE_DIFF_OVERVIEW_WIDTH:0),i=this.layout((this._startSashPosition+(e.currentX-e.startX))/t);this._sashRatio=i/t,this._dataSource.relayoutEditors()}_onSashDragEnd(){this._sash.layout()}_onSashReset(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout()}getVerticalSashTop(e){return 0}getVerticalSashLeft(e){return this._sashPosition}getVerticalSashHeight(e){return this._dataSource.getHeight()}_getViewZones(e,t,i){const n=this._dataSource.getOriginalEditor(),o=this._dataSource.getModifiedEditor();return new aV(e,t,i,n,o).getViewZones()}_getOriginalEditorDecorations(e,t,i,n){const o=this._dataSource.getOriginalEditor(),s=String(this._removeColor),r={decorations:[],overviewZones:[]},a=o.getModel(),l=o._getViewModel();for(const d of t)if(hV(d)){r.decorations.push({range:new qo(d.originalStartLineNumber,1,d.originalEndLineNumber,1073741824),options:n?sV.lineDeleteWithSign:sV.lineDelete}),cV(d)&&d.charChanges||r.decorations.push(oV(d.originalStartLineNumber,1,d.originalEndLineNumber,1073741824,sV.charDeleteWholeLine));const e=gV(a,l,d.originalStartLineNumber,d.originalEndLineNumber);if(r.overviewZones.push(new iM(e.startLineNumber,e.endLineNumber,0,s)),d.charChanges)for(const t of d.charChanges)if(hV(t))if(i)for(let e=t.originalStartLineNumber;e<=t.originalEndLineNumber;e++){let i,n;i=e===t.originalStartLineNumber?t.originalStartColumn:a.getLineFirstNonWhitespaceColumn(e),n=e===t.originalEndLineNumber?t.originalEndColumn:a.getLineLastNonWhitespaceColumn(e),r.decorations.push(oV(e,i,e,n,sV.charDelete))}else r.decorations.push(oV(t.originalStartLineNumber,t.originalStartColumn,t.originalEndLineNumber,t.originalEndColumn,sV.charDelete))}return r}_getModifiedEditorDecorations(e,t,i,n){const o=this._dataSource.getModifiedEditor(),s=String(this._insertColor),r={decorations:[],overviewZones:[]},a=o.getModel(),l=o._getViewModel();for(const d of t)if(cV(d)){r.decorations.push({range:new qo(d.modifiedStartLineNumber,1,d.modifiedEndLineNumber,1073741824),options:n?sV.lineInsertWithSign:sV.lineInsert}),hV(d)&&d.charChanges||r.decorations.push(oV(d.modifiedStartLineNumber,1,d.modifiedEndLineNumber,1073741824,sV.charInsertWholeLine));const e=gV(a,l,d.modifiedStartLineNumber,d.modifiedEndLineNumber);if(r.overviewZones.push(new iM(e.startLineNumber,e.endLineNumber,0,s)),d.charChanges)for(const t of d.charChanges)if(cV(t))if(i)for(let e=t.modifiedStartLineNumber;e<=t.modifiedEndLineNumber;e++){let i,n;i=e===t.modifiedStartLineNumber?t.modifiedStartColumn:a.getLineFirstNonWhitespaceColumn(e),n=e===t.modifiedEndLineNumber?t.modifiedEndColumn:a.getLineLastNonWhitespaceColumn(e),r.decorations.push(oV(e,i,e,n,sV.charInsert))}else r.decorations.push(oV(t.modifiedStartLineNumber,t.modifiedStartColumn,t.modifiedEndLineNumber,t.modifiedEndColumn,sV.charInsert))}return r}}rV.MINIMUM_EDITOR_WIDTH=100;class aV extends nV{constructor(e,t,i,n,o){super(e,t,i,n,o)}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){return null}_produceOriginalFromDiff(e,t,i){return i>t?{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:i-t,domNode:null}:null}_produceModifiedFromDiff(e,t,i){return t>i?{afterLineNumber:Math.max(e.modifiedStartLineNumber,e.modifiedEndLineNumber),heightInLines:t-i,domNode:null}:null}}class lV extends tV{constructor(e,t){super(e),this._decorationsLeft=e.getOriginalEditor().getLayoutInfo().decorationsLeft,this._register(e.getOriginalEditor().onDidLayoutChange((t=>{this._decorationsLeft!==t.decorationsLeft&&(this._decorationsLeft=t.decorationsLeft,e.relayoutEditors())})))}setEnableSplitViewResizing(e){}_getViewZones(e,t,i,n){const o=this._dataSource.getOriginalEditor(),s=this._dataSource.getModifiedEditor();return new dV(e,t,i,o,s,n).getViewZones()}_getOriginalEditorDecorations(e,t,i,n){const o=String(this._removeColor),s={decorations:[],overviewZones:[]},r=this._dataSource.getOriginalEditor(),a=r.getModel(),l=r._getViewModel();let d=0;for(const c of t)if(hV(c)){for(s.decorations.push({range:new qo(c.originalStartLineNumber,1,c.originalEndLineNumber,1073741824),options:sV.lineDeleteMargin});d=c.originalStartLineNumber)break;d++}let t=0;if(d0,x=nv(1e4);let S=0,k=0,D=null;for(let s=t.originalStartLineNumber;s<=t.originalEndLineNumber;s++){const r=s-t.originalStartLineNumber,_=this._originalModel.getLineTokens(s),b=_.getLineContent(),L=m[f++],N=jb.filter(C,s,1,b.length+1);if(L){let t=0;for(const e of L.breakOffsets){const s=_.sliceAndInflate(t,e,0),r=b.substring(t,e);S=Math.max(S,this._renderOriginalLine(k++,r,s,jb.extractWrapped(N,t,e),y,a,l,n,o,d,c,h,u,g,p,i,x,w)),t=e}for(D||(D=[]);D.lengthe.afterLineNumber-t.afterLineNumber))}_renderOriginalLine(e,t,i,n,o,s,r,a,l,d,c,h,u,g,p,m,f,_){f.appendASCIIString('
');const v=aw.isBasicASCII(t,s),b=aw.containsRTL(t,v,r),w=Qb(new Gb(a.isMonospace&&!l,a.canUseHalfwidthRightwardsArrow,t,!1,v,b,0,i,n,m,0,a.spaceWidth,a.middotWidth,a.wsmiddotWidth,h,u,g,p!==Of.OFF,null),f);if(f.appendASCIIString("
"),this._renderIndicators){const t=document.createElement("div");t.className=`delete-sign ${ex.asClassName(QB)}`,t.setAttribute("style",`position:absolute;top:${e*d}px;width:${c}px;height:${d}px;right:0;`),_.appendChild(t)}return w.characterMapping.getAbsoluteOffset(w.characterMapping.length)}}function cV(e){return e.modifiedEndLineNumber>0}function hV(e){return e.originalEndLineNumber>0}function uV(){const e=document.createElement("div");return e.className="diagonal-fill",e}function gV(e,t,i,n){const o=e.getLineCount();return i=Math.min(o,Math.max(1,i)),n=Math.min(o,Math.max(1,n)),t.coordinatesConverter.convertModelRangeToViewRange(new qo(i,e.getLineMinColumn(i),n,e.getLineMaxColumn(n)))}function pV(e,t){return{enableSplitViewResizing:Sf(e.enableSplitViewResizing,t.enableSplitViewResizing),renderSideBySide:Sf(e.renderSideBySide,t.renderSideBySide),maxComputationTime:Df(e.maxComputationTime,t.maxComputationTime,0,1073741824),maxFileSize:Df(e.maxFileSize,t.maxFileSize,0,1073741824),ignoreTrimWhitespace:Sf(e.ignoreTrimWhitespace,t.ignoreTrimWhitespace),renderIndicators:Sf(e.renderIndicators,t.renderIndicators),originalEditable:Sf(e.originalEditable,t.originalEditable),diffCodeLens:Sf(e.diffCodeLens,t.diffCodeLens),renderOverviewRuler:Sf(e.renderOverviewRuler,t.renderOverviewRuler),diffWordWrap:(i=e.diffWordWrap,n=t.diffWordWrap,If(i,n,["off","on","inherit"]))};var i,n}sx(((e,t)=>{const i=e.getColor(iD);i&&t.addRule(`.monaco-editor .char-insert, .monaco-diff-editor .char-insert { background-color: ${i}; }`);const n=e.getColor(oD)||i;n&&t.addRule(`.monaco-editor .line-insert, .monaco-diff-editor .line-insert { background-color: ${n}; }`);const o=e.getColor(rD)||n;o&&(t.addRule(`.monaco-editor .inline-added-margin-view-zone { background-color: ${o}; }`),t.addRule(`.monaco-editor .gutter-insert, .monaco-diff-editor .gutter-insert { background-color: ${o}; }`));const s=e.getColor(nD);s&&t.addRule(`.monaco-editor .char-delete, .monaco-diff-editor .char-delete { background-color: ${s}; }`);const r=e.getColor(sD)||s;r&&t.addRule(`.monaco-editor .line-delete, .monaco-diff-editor .line-delete { background-color: ${r}; }`);const a=e.getColor(aD)||r;a&&(t.addRule(`.monaco-editor .inline-deleted-margin-view-zone { background-color: ${a}; }`),t.addRule(`.monaco-editor .gutter-delete, .monaco-diff-editor .gutter-delete { background-color: ${a}; }`));const l=e.getColor(cD);l&&t.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px ${"hc"===e.type?"dashed":"solid"} ${l}; }`);const d=e.getColor(hD);d&&t.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px ${"hc"===e.type?"dashed":"solid"} ${d}; }`);const c=e.getColor(QS);c&&t.addRule(`.monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px ${c}; }`);const h=e.getColor(uD);h&&t.addRule(`.monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid ${h}; }`);const u=e.getColor(JS);u&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport {\n\t\t\t\tbackground: ${u};\n\t\t\t}\n\t\t`);const g=e.getColor(ek);g&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport:hover {\n\t\t\t\tbackground: ${g};\n\t\t\t}\n\t\t`);const p=e.getColor(tk);p&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport:active {\n\t\t\t\tbackground: ${p};\n\t\t\t}\n\t\t`);const m=e.getColor(gD);t.addRule(`\n\t.monaco-editor .diagonal-fill {\n\t\tbackground-image: linear-gradient(\n\t\t\t-45deg,\n\t\t\t${m} 12.5%,\n\t\t\t#0000 12.5%, #0000 50%,\n\t\t\t${m} 50%, ${m} 62.5%,\n\t\t\t#0000 62.5%, #0000 100%\n\t\t);\n\t\tbackground-size: 8px 8px;\n\t}\n\t`)}));var mV=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},fV=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}};let _V=class extends Uo{constructor(e){super(),this._themeService=e,this._onCodeEditorAdd=this._register(new $o),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new $o),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onDiffEditorAdd=this._register(new $o),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new $o),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}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]))}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}removeDiffEditor(e){delete this._diffEditors[e.getId()]&&this._onDiffEditorRemove.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.removeDecorations(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)){return this._modelProperties.get(i).get(t)}}};_V=mV([fV(0,Qy)],_V);var vV=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},bV=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}};let wV=class extends _V{constructor(e,t){super(t),this.onCodeEditorAdd((()=>this._checkContextKey())),this.onCodeEditorRemove((()=>this._checkContextKey())),this._editorIsOpen=e.createKey("editorIsOpen",!1),this._activeCodeEditor=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}openCodeEditor(e,t,i){return t?Promise.resolve(this.doOpenEditor(t,e)):Promise.resolve(null)}doOpenEditor(e,t){if(!this.findModel(e,t.resource)){if(t.resource){const i=t.resource.scheme;if(i===Yw.http||i===Yw.https)return ey(t.resource.toString()),e}return null}const i=t.options?t.options.selection:null;if(i)if("number"==typeof i.endLineNumber&&"number"==typeof i.endColumn)e.setSelection(i),e.revealRangeInCenter(i,1);else{const t={lineNumber:i.startLineNumber,column:i.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}};wV=vV([bV(0,$y),bV(1,Qy)],wV),Iv(N_,wV);const CV=L_("layoutService");var yV=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},xV=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}};let SV=class{constructor(e){this._codeEditorService=e,this.onDidLayout=ds.None}get dimension(){return this._dimension||(this._dimension=vC(window.document.body)),this._dimension}get hasContainer(){return!1}get container(){throw new Error("ILayoutService.container is not available in the standalone editor!")}focus(){var e;null===(e=this._codeEditorService.getFocusedCodeEditor())||void 0===e||e.focus()}};SV=yV([xV(0,N_)],SV);let kV=class extends SV{constructor(e,t){super(t),this._container=e}get hasContainer(){return!1}get container(){return this._container}};kV=yV([xV(1,N_)],kV),Iv(CV,SV);const DV=L_("dialogService");var LV=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},NV=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}},EV=globalThis&&globalThis.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,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){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function IV(e){return e.scheme===Yw.file?e.fsPath:e.path}let TV=0;class MV{constructor(e,t,i,n,o,s,r){this.id=++TV,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 AV{constructor(e,t){this.resourceLabel=e,this.reason=t}}class OV{constructor(){this.elements=new Map}createMessage(){const e=[],t=[];for(const[,n]of this.elements){(0===n.reason?e:t).push(n.resourceLabel)}let i=[];return e.length>0&&i.push(mf(0,"The following files have been closed and modified on disk: {0}.",e.join(", "))),t.length>0&&i.push(mf(0,"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 RV{constructor(e,t,i,n,o,s,r){this.id=++TV,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 OV),this.removedResources.has(t)||this.removedResources.set(t,new AV(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 OV),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new AV(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class PV{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(){let 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 EP(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 FV{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 TP){const[,t]=this._findClosestUndoElementWithSource(e.id);return!!t}const t=this.getUriComparisonKey(e);if(this._editStacks.has(t)){return this._editStacks.get(t).hasPastElements()}return!1}_onError(e,t){Jo(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())}_invokeWorkspacePrepare(e){return EV(this,void 0,void 0,(function*(){if(void 0===e.actual.prepareUndoRedo)return Uo.None;const t=e.actual.prepareUndoRedo();return void 0===t?Uo.None:t}))}_invokeResourcePrepare(e,t){if(1!==e.actual.type||void 0===e.actual.prepareUndoRedo)return t(Uo.None);const i=e.actual.prepareUndoRedo();return i?ga(i)?t(i):i.then((e=>t(e))):t(Uo.None)}_getAffectedEditStacks(e){const t=[];for(const i of e.strResources)t.push(this._editStacks.get(i)||BV);return new FV(t)}_tryToSplitAndUndo(e,t,i,n){if(t.canSplit())return this._splitPastWorkspaceElement(t,i),this._notificationService.warn(n),new WV(this._undo(e,0,!0));for(const o of t.strResources)this.removeElements(o);return this._notificationService.warn(n),new WV}_checkWorkspaceUndo(e,t,i,n){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,mf(0,"Could not undo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(n&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,mf(0,"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,mf(0,"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,mf(0,"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,mf(0,"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}_confirmAndExecuteWorkspaceUndo(e,t,i,n){return EV(this,void 0,void 0,(function*(){if(t.canSplit()&&!this._isPartOfUndoGroup(t)){const o=yield this._dialogService.show(fF.Info,mf(0,"Would you like to undo '{0}' across all files?",t.label),[mf(0,"Undo in {0} Files",i.editStacks.length),mf(0,"Undo this File"),mf(0,"Cancel")],{cancelId:2});if(2===o.choice)return;if(1===o.choice)return this._splitPastWorkspaceElement(t,null),this._undo(e,0,!0);const s=this._checkWorkspaceUndo(e,t,i,!1);if(s)return s.returnValue;n=!0}let o;try{o=yield 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 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 FV([e]),n,(()=>this._continueUndoInGroup(t.groupId,i))))));{const e=mf(0,"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 TP){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)}if((o.sourceId!==t||o.confirmBeforeUndo)&&!i)return this._confirmAndContinueUndo(e,t,o);try{return 1===o.type?this._workspaceUndo(e,o,i):this._resourceUndo(n,o,i)}finally{}}_confirmAndContinueUndo(e,t,i){return EV(this,void 0,void 0,(function*(){if(1!==(yield this._dialogService.show(fF.Info,mf(0,"Would you like to undo '{0}'?",i.label),[mf(0,"Yes"),mf(0,"No")],{cancelId:1})).choice)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,mf(0,"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,mf(0,"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,mf(0,"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)}_executeWorkspaceRedo(e,t,i){return EV(this,void 0,void 0,(function*(){let n;try{n=yield 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 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 FV([e]),i,(()=>this._continueRedoInGroup(t.groupId))))));{const e=mf(0,"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;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)){return new GV(new KV(e))}static forStrings(){return new GV(new jV)}static forConfigKeys(){return new GV(new UV)}clear(){this._root=void 0}set(e,t){const i=this._iter.reset(e);let n;this._root||(this._root=new qV,this._root.segment=i.value());const o=[];for(n=this._root;;){const e=i.cmp(n.segment);if(e>0)n.left||(n.left=new qV,n.left.segment=i.value()),o.push([-1,n]),n=n.left;else if(e<0)n.right||(n.right=new qV,n.right.segment=i.value()),o.push([1,n]),n=n.right;else{if(!i.hasNext())break;i.next(),n.mid||(n.mid=new qV,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]}else this._root=o[0][1]}}return s}get(e){var t;return null===(t=this._getNode(e))||void 0===t?void 0:t.value}_getNode(e){const t=this._iter.reset(e);let i=this._root;for(;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===(null==t?void 0:t.value)&&void 0===(null==t?void 0:t.mid))}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,t){var i;const n=this._iter.reset(e),o=[];let s=this._root;for(;s;){const e=n.cmp(s.segment);if(e>0)o.push([-1,s]),s=s.left;else if(e<0)o.push([1,s]),s=s.right;else{if(!n.hasNext())break;n.next(),o.push([0,s]),s=s.mid}}if(s){if(t?(s.left=void 0,s.mid=void 0,s.right=void 0,s.height=1):(s.key=void 0,s.value=void 0),!s.mid&&!s.value)if(s.left&&s.right){const e=this._min(s.right),{key:t,value:i,segment:n}=e;this._delete(e.key,!1),s.key=t,s.value=i,s.segment=n}else{const e=null!==(i=s.left)&&void 0!==i?i:s.right;if(o.length>0){const[t,i]=o[o.length-1];switch(t){case-1:i.left=e;break;case 0:i.mid=e;break;case 1:i.right=e}}else this._root=e}for(let e=o.length-1;e>=0;e--){const t=o[e][1];t.updateHeight();const i=t.balanceFactor();if(i>1?(t.right.balanceFactor()>=0||(t.right=t.right.rotateRight()),o[e][1]=t.rotateLeft()):i<-1&&(t.left.balanceFactor()<=0||(t.left=t.left.rotateLeft()),o[e][1]=t.rotateRight()),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]}else this._root=o[0][1]}}}_min(e){for(;e.left;)e=e.left;return e}findSubstr(e){const t=this._iter.reset(e);let i,n=this._root;for(;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){const t=this._iter.reset(e);let i=this._root;for(;i;){const e=t.cmp(i.segment);if(e>0)i=i.left;else if(e<0)i=i.right;else{if(!t.hasNext())return i.mid?this._entries(i.mid):void 0;t.next(),i=i.mid}}}forEach(e){for(const[t,i]of this)e(i,t)}*[Symbol.iterator](){yield*this._entries(this._root)}*_entries(e){e&&(e.left&&(yield*this._entries(e.left)),e.value&&(yield[e.key,e.value]),e.mid&&(yield*this._entries(e.mid)),e.right&&(yield*this._entries(e.right)))}}class ZV{constructor(e,t){this.uri=e,this.value=t}}class YV{constructor(e,t){this[zV]="ResourceMap",e instanceof YV?(this.map=new Map(e.map),this.toKey=null!=t?t:YV.defaultToKey):(this.map=new Map,this.toKey=null!=e?e:YV.defaultToKey)}set(e,t){return this.map.set(this.toKey(e),new ZV(e,t)),this}get(e){var t;return null===(t=this.map.get(this.toKey(e)))||void 0===t?void 0:t.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){void 0!==t&&(e=e.bind(t));for(let[i,n]of this.map)e(n.value,n.uri,this)}*values(){for(let e of this.map.values())yield e.value}*keys(){for(let e of this.map.values())yield e.uri}*entries(){for(let e of this.map.values())yield[e.uri,e.value]}*[(zV=Symbol.toStringTag,Symbol.iterator)](){for(let[,e]of this.map)yield[e.uri,e.value]}}YV.defaultToKey=e=>e.toString();class XV{constructor(){this[HV]="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(){var e;return null===(e=this._head)||void 0===e?void 0:e.value}get last(){var e;return null===(e=this._tail)||void 0===e?void 0:e.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:case 2:default:this.addItemLast(n);break;case 1:this.addItemFirst(n)}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;for(;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]:()=>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]:()=>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]:()=>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}[(HV=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;for(;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++}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 QV extends XV{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}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}function JV(e,t,i){return Math.min(Math.max(e,t),i)}class eW{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 tW{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--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},nW=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}};const oW=L_("ILanguageFeatureDebounceService");var sW;!function(e){const t=new WeakMap;let i=0;e.of=function(e){let n=t.get(e);return void 0===n&&(n=++i,t.set(e,n)),n}}(sW||(sW={}));class rW{constructor(e,t,i,n,o,s){this._logService=e,this._name=t,this._registry=i,this._default=n,this._min=o,this._max=s,this._cache=new QV(50,.7)}_key(e){return e.id+this._registry.all(e).reduce(((e,t)=>_a(sW.of(t),e)),0)}get(e){const t=this._key(e),i=this._cache.get(t);return i?JV(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 tW(6),this._cache.set(i,n));const o=JV(n.update(t),this._min,this._max);return this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${o}ms`),o}_overall(){const e=new eW;for(const[,t]of this._cache)e.update(t.value);return e.value}default(){return JV(0|this._overall()||this._default,this._min,this._max)}}let aW=class{constructor(e){this._logService=e,this._data=new Map}for(e,t,i){var n,o,s;const r=null!==(n=null==i?void 0:i.min)&&void 0!==n?n:50,a=null!==(o=null==i?void 0:i.max)&&void 0!==o?o:Math.pow(r,2),l=null!==(s=null==i?void 0:i.key)&&void 0!==s?s:void 0,d=`${sW.of(e)},${r}${l?","+l:""}`;let c=this._data.get(d);return c||(c=new rW(this._logService,t,e,0|this._overallAverage()||1.5*r,r,a),this._data.set(d,c)),c}_overallAverage(){let e=new eW;for(let t of this._data.values())e.update(t.default());return e.value}};aW=iW([nW(0,Cb)],aW),Iv(oW,aW,!0);const lW=L_("IWorkspaceEditService");class dW{constructor(e){this.metadata=e}static convert(e){return e.edits.map((e=>{if(Zs(t=e)&&Ps.isUri(t.resource)&&Zs(t.edit))return new cW(e.resource,e.edit,e.modelVersionId,e.metadata);var t;if(function(e){return Zs(e)&&(Boolean(e.newUri)||Boolean(e.oldUri))}(e))return new hW(e.oldUri,e.newUri,e.options,e.metadata);throw new Error("Unsupported edit")}))}}class cW extends dW{constructor(e,t,i,n){super(n),this.resource=e,this.textEdit=t,this.versionId=i}}class hW extends dW{constructor(e,t,i,n){super(n),this.oldResource=e,this.newResource=t,this.options=i}}const uW=Object.freeze({id:"editor",order:5,type:"object",title:mf(0,"Editor"),scope:5}),gW=Object.assign(Object.assign({},uW),{properties:{"editor.tabSize":{type:"number",default:ff.tabSize,minimum:1,markdownDescription:mf(0,"The number of spaces a tab is equal to. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.insertSpaces":{type:"boolean",default:ff.insertSpaces,markdownDescription:mf(0,"Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.detectIndentation":{type:"boolean",default:ff.detectIndentation,markdownDescription:mf(0,"Controls whether `#editor.tabSize#` and `#editor.insertSpaces#` will be automatically detected when a file is opened based on the file contents.")},"editor.trimAutoWhitespace":{type:"boolean",default:ff.trimAutoWhitespace,description:mf(0,"Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:ff.largeFileOptimizations,description:mf(0,"Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:mf(0,"Controls whether completions should be computed based on words in the document.")},"editor.wordBasedSuggestionsMode":{enum:["currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[mf(0,"Only suggest words from the active document."),mf(0,"Suggest words from all open documents of the same language."),mf(0,"Suggest words from all open documents.")],description:mf(0,"Controls from which documents word based completions are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[mf(0,"Semantic highlighting enabled for all color themes."),mf(0,"Semantic highlighting disabled for all color themes."),mf(0,"Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:mf(0,"Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:mf(0,"Keep peek editors open even when double clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:mf(0,"Lines above this length will not be tokenized for performance reasons")},"editor.language.brackets":{type:"array",default:!1,description:mf(0,"Defines the bracket symbols that increase or decrease the indentation."),items:{type:"array",items:[{type:"string",description:mf(0,"The opening bracket character or string sequence.")},{type:"string",description:mf(0,"The closing bracket character or string sequence.")}]}},"editor.language.colorizedBracketPairs":{type:"array",default:!1,description:mf(0,"Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled."),items:{type:"array",items:[{type:"string",description:mf(0,"The opening bracket character or string sequence.")},{type:"string",description:mf(0,"The closing bracket character or string sequence.")}]}},"diffEditor.maxComputationTime":{type:"number",default:5e3,description:mf(0,"Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:50,description:mf(0,"Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:mf(0,"Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:mf(0,"When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:mf(0,"Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:!1,description:mf(0,"Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:"inherit",markdownEnumDescriptions:[mf(0,"Lines will never wrap."),mf(0,"Lines will wrap at the viewport width."),mf(0,"Lines will wrap according to the `#editor.wordWrap#` setting.")]}}});function pW(e){return void 0!==e.type||void 0!==e.anyOf}for(const e of Zf){const t=e.schema;if(void 0!==t)if(pW(t))gW.properties[`editor.${e.name}`]=t;else for(const e in t)Object.hasOwnProperty.call(t,e)&&(gW.properties[e]=t[e])}let mW=null;function fW(){return null===mW&&(mW=Object.create(null),Object.keys(gW.properties).forEach((e=>{mW[e]=!0}))),mW}Yy.as(cA).registerConfiguration(gW);class _W{static insert(e,t){return{range:new qo(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}}}class vW{constructor(e={},t=[],i=[]){this._contents=e,this._keys=t,this._overrides=i,this.isFrozen=!1,this.overrideConfigurations=new Map}get contents(){return this.checkAndFreeze(this._contents)}get overrides(){return this.checkAndFreeze(this._overrides)}get keys(){return this.checkAndFreeze(this._keys)}isEmpty(){return 0===this._keys.length&&0===Object.keys(this._contents).length&&0===this._overrides.length}getValue(e){return e?Dv(this.contents,e):this.contents}getOverrideValue(e,t){const i=this.getContentsForOverrideIdentifer(t);return i?e?Dv(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=tr(this.contents),i=tr(this.overrides),n=[...this.keys];for(const o of e){this.mergeContents(t,o.contents);for(const e of o.overrides){const[t]=i.filter((t=>jo(t.identifiers,e.identifiers)));t?(this.mergeContents(t.contents,e.contents),t.keys.push(...e.keys),t.keys=Qo(t.keys)):i.push(tr(e))}for(const e of o.keys)-1===n.indexOf(e)&&n.push(e)}return new vW(t,n,i)}freeze(){return this.isFrozen=!0,this}createOverrideConfigurationModel(e){const t=this.getContentsForOverrideIdentifer(e);if(!t||"object"!=typeof t||!Object.keys(t).length)return this;let i={};for(const n of Qo([...Object.keys(this.contents),...Object.keys(t)])){let e=this.contents[n],o=t[n];o&&("object"==typeof e&&"object"==typeof o?(e=tr(e),this.mergeContents(e,o)):e=o),i[n]=e}return new vW(i,this.keys,this.overrides)}mergeContents(e,t){for(const i of Object.keys(t))i in e&&Zs(e[i])&&Zs(t[i])?this.mergeContents(e[i],t[i]):e[i]=tr(t[i])}checkAndFreeze(e){return this.isFrozen&&!Object.isFrozen(e)?va(e):e}getContentsForOverrideIdentifer(e){let t=null,i=null;const n=e=>{e&&(i?this.mergeContents(i,e):i=tr(e))};for(const o of this.overrides)jo(o.identifiers,[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.addKey(e),xv(this.contents,e,t,(e=>{throw new Error(e)}))}removeValue(e){this.removeKey(e)&&Sv(this.contents,e)}addKey(e){let t=this.keys.length;for(let i=0;i{}))}for(const s of Object.keys(n))yA.test(s)&&o.push({identifiers:xA(s),keys:Object.keys(n[s]),contents:yv(n[s],(e=>{}))});super(n,i,o)}}class wW{constructor(e,t,i=new vW,n=new vW,o=new YV,s=new vW,r=new YV,a=!0){this._defaultConfiguration=e,this._localUserConfiguration=t,this._remoteUserConfiguration=i,this._workspaceConfiguration=n,this._folderConfigurations=o,this._memoryConfiguration=s,this._memoryConfigurationByResource=r,this._freeze=a,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new YV,this._userConfiguration=null}getValue(e,t,i){return this.getConsolidateConfigurationModel(t,i).getValue(e)}updateValue(e,t,i={}){let n;i.resource?(n=this._memoryConfigurationByResource.get(i.resource),n||(n=new vW,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.getConsolidateConfigurationModel(t,i),o=this.getFolderConfigurationModelForResource(t.resource,i),s=t.resource&&this._memoryConfigurationByResource.get(t.resource)||this._memoryConfiguration,r=t.overrideIdentifier?this._defaultConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this._defaultConfiguration.freeze().getValue(e),a=t.overrideIdentifier?this.userConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this.userConfiguration.freeze().getValue(e),l=t.overrideIdentifier?this.localUserConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this.localUserConfiguration.freeze().getValue(e),d=t.overrideIdentifier?this.remoteUserConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this.remoteUserConfiguration.freeze().getValue(e),c=i?t.overrideIdentifier?this._workspaceConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this._workspaceConfiguration.freeze().getValue(e):void 0,h=o?t.overrideIdentifier?o.freeze().override(t.overrideIdentifier).getValue(e):o.freeze().getValue(e):void 0,u=t.overrideIdentifier?s.override(t.overrideIdentifier).getValue(e):s.getValue(e),g=n.getValue(e),p=Qo(ba(n.overrides.map((e=>e.identifiers)))).filter((t=>void 0!==n.getOverrideValue(e,t)));return{defaultValue:r,userValue:a,userLocalValue:l,userRemoteValue:d,workspaceValue:c,workspaceFolderValue:h,memoryValue:u,value:g,default:void 0!==r?{value:this._defaultConfiguration.freeze().getValue(e),override:t.overrideIdentifier?this._defaultConfiguration.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,user:void 0!==a?{value:this.userConfiguration.freeze().getValue(e),override:t.overrideIdentifier?this.userConfiguration.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,userLocal:void 0!==l?{value:this.localUserConfiguration.freeze().getValue(e),override:t.overrideIdentifier?this.localUserConfiguration.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,userRemote:void 0!==d?{value:this.remoteUserConfiguration.freeze().getValue(e),override:t.overrideIdentifier?this.remoteUserConfiguration.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,workspace:void 0!==c?{value:this._workspaceConfiguration.freeze().getValue(e),override:t.overrideIdentifier?this._workspaceConfiguration.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,workspaceFolder:void 0!==h?{value:null==o?void 0:o.freeze().getValue(e),override:t.overrideIdentifier?null==o?void 0:o.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,memory:void 0!==u?{value:s.getValue(e),override:t.overrideIdentifier?s.getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,overrideIdentifiers:p.length?p:void 0}}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration),this._freeze&&this._userConfiguration.freeze()),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}getConsolidateConfigurationModel(e,t){let i=this.getConsolidatedConfigurationModelForResource(e,t);return e.overrideIdentifier?i.override(e.overrideIdentifier):i}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.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration),this._freeze&&(this._workspaceConfiguration=this._workspaceConfiguration.freeze())),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._freeze&&(t=t.freeze()),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},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){const t=this.parseConfigurationModel(e.defaults),i=this.parseConfigurationModel(e.user),n=this.parseConfigurationModel(e.workspace),o=e.folders.reduce(((e,t)=>(e.set(Ps.revive(t[0]),this.parseConfigurationModel(t[1])),e)),new YV);return new wW(t,i,new vW,n,o,new vW,new YV,!1)}static parseConfigurationModel(e){return new vW(e.contents,e.keys,e.overrides).freeze()}}class CW{constructor(e,t,i,n){this.change=e,this.previous=t,this.currentConfiguraiton=i,this.currentWorkspace=n,this._previousConfiguration=void 0;const o=new Set;e.keys.forEach((e=>o.add(e))),e.overrides.forEach((([,e])=>e.forEach((e=>o.add(e))))),this.affectedKeys=[...o.values()];const s=new vW;this.affectedKeys.forEach((e=>s.setValue(e,{}))),this.affectedKeysTree=s.contents}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=wW.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(e,t){var i;if(this.doesAffectedKeysTreeContains(this.affectedKeysTree,e)){if(t){const n=this.previousConfiguration?this.previousConfiguration.getValue(e,t,null===(i=this.previous)||void 0===i?void 0:i.workspace):void 0,o=this.currentConfiguraiton.getValue(e,t,this.currentWorkspace);return!Ho(n,o)}return!0}return!1}doesAffectedKeysTreeContains(e,t){let i,n=yv({[t]:!0},(()=>{}));for(;"object"==typeof n&&(i=Object.keys(n)[0]);){if(!(e=e[i]))return!1;n=n[i]}return!0}}const yW=/^(cursor|delete)/;class xW extends Uo{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 $o),this._currentChord=null,this._currentChordChecker=new ab,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=SW.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new rb,this._logging=!1}get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:ds.None}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){const i=this.resolveKeyboardEvent(e);if(i.isChord())return null;const[n]=i.getDispatchParts();if(null===n)return null;const o=this._contextKeyService.getContext(t),s=this._currentChord?this._currentChord.keypress:null;return this._getResolver().resolve(o,s,n)}_enterChordMode(e,t){this._currentChord={keypress:e,label:t},this._currentChordStatusMessage=this._notificationService.status(mf(0,"({0}) was pressed. Waiting for second key of chord...",t));const i=Date.now();this._currentChordChecker.cancelAndSet((()=>{this._documentHasFocus()?Date.now()-i>5e3&&this._leaveChordMode():this._leaveChordMode()}),500)}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChord=null}_dispatch(e,t){return this._doDispatch(this.resolveKeyboardEvent(e),t,!1)}_singleModifierDispatch(e,t){const i=this.resolveKeyboardEvent(e),[n]=i.getSingleModifierDispatchParts();if(n)return this._ignoreSingleModifiers.has(n)?(this._log(`+ Ignoring single modifier ${n} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=SW.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=SW.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.getParts();return this._ignoreSingleModifiers=new SW(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.isChord())return!1;let o=null,s=null;if(i){const[t]=e.getSingleModifierDispatchParts();o=t,s=t}else[o]=e.getDispatchParts(),s=this._currentChord?this._currentChord.keypress:null;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);return this._logService.trace("KeybindingService#dispatch",a,null==l?void 0:l.commandId),l&&l.enterChord?(n=!0,this._enterChordMode(o,a),n):(this._currentChord&&(l&&l.commandId||(this._notificationService.status(mf(0,"The key combination ({0}, {1}) is not a command.",this._currentChord.label,a),{hideAfter:1e4}),n=!0)),this._leaveChordMode(),l&&l.commandId&&(l.bubble||(n=!0),void 0===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))),yW.test(l.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:l.commandId,from:"keybinding"})),n)}mightProducePrintableCharacter(e){return!e.ctrlKey&&!e.metaKey&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30)}}class SW{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}}}SW.EMPTY=new SW(null);const kW=L_("keybindingService");class DW{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=DW.handleRemovals([].concat(e).concat(t));for(let n=0,o=this._keybindings.length;n=0;n--){let e=i[n];if(e.command===t.command)continue;const o=e.keypressParts.length>1,s=t.keypressParts.length>1;o&&s&&e.keypressParts[1]!==t.keypressParts[1]||DW.whenIsEntirelyIncluded(e.when,t.when)&&this._removeFromLookupMap(e)}i.push(t),this._addToLookupMap(t)}_addToLookupMap(e){if(!e.command)return;let t=this._lookupMap.get(e.command);void 0===t?(t=[e],this._lookupMap.set(e.command,t)):t.push(e)}_removeFromLookupMap(e){if(!e.command)return;let t=this._lookupMap.get(e.command);if(void 0!==t)for(let i=0,n=t.length;i=0;n--){const e=i[n];if(t.contextMatchesRules(e.when))return e}return i[i.length-1]}resolve(e,t,i){this._log(`| Resolving ${i}${t?` chorded from ${t}`:""}`);let n=null;if(null!==t){const e=this._map.get(t);if(void 0===e)return this._log("\\ No keybinding entries."),null;n=[];for(let t=0,o=e.length;t1&&null!==o.keypressParts[1]?(this._log(`\\ From ${n.length} keybinding entries, matched chord, when: ${LW(o.when)}, source: ${NW(o)}.`),{enterChord:!0,leaveChord:!1,commandId:null,commandArgs:null,bubble:!1}):(this._log(`\\ From ${n.length} keybinding entries, matched ${o.command}, when: ${LW(o.when)}, source: ${NW(o)}.`),{enterChord:!1,leaveChord:o.keypressParts.length>1,commandId:o.command,commandArgs:o.commandArgs,bubble:o.bubble}):(this._log(`\\ From ${n.length} keybinding entries, no when clauses matched the context.`),null)}_findCommand(e,t){for(let i=t.length-1;i>=0;i--){let n=t[i];if(DW._contextMatchesRules(e,n.when))return n}return null}static _contextMatchesRules(e,t){return!t||t.evaluate(e)}}function LW(e){return e?`${e.serialize()}`:"no when condition"}function NW(e){return e.extensionId?e.isBuiltinExtension?`built-in extension ${e.extensionId}`:`user extension ${e.extensionId}`:e.isDefault?"built-in":"user"}class EW{constructor(e,t,i,n,o,s,r){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=e,this.keypressParts=e?IW(e.getDispatchParts()):[],e&&0===this.keypressParts.length&&(this.keypressParts=IW(e.getSingleModifierDispatchParts())),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 IW(e){let t=[];for(let i=0,n=e.length;ithis._getLabel(e)))}getAriaLabel(){return AW.toLabel(this._os,this._parts,(e=>this._getAriaLabel(e)))}getElectronAccelerator(){return this._parts.length>1||this._parts[0].isDuplicateModifierCase()?null:OW.toLabel(this._os,this._parts,(e=>this._getElectronAccelerator(e)))}isChord(){return this._parts.length>1}getParts(){return this._parts.map((e=>this._getPart(e)))}_getPart(e){return new Ww(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchParts(){return this._parts.map((e=>this._getDispatchPart(e)))}getSingleModifierDispatchParts(){return this._parts.map((e=>this._getSingleModifierDispatchPart(e)))}}{constructor(e,t){super(t,e.parts)}_keyCodeToUILabel(e){if(2===this._os)switch(e){case 15:return"←";case 16:return"↑";case 17:return"→";case 18:return"↓"}return As.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":As.toString(e.keyCode)}_getElectronAccelerator(e){return As.toElectronAccelerator(e.keyCode)}_getDispatchPart(e){return PW.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+=As.toString(e.keyCode),t}_getSingleModifierDispatchPart(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=wa[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 83;case 52:return 81;case 53:return 87;case 54:return 89;case 55:return 88;case 56:return 0;case 57:return 80;case 58:return 90;case 59:return 86;case 60:return 82;case 61:return 84;case 62:return 85;case 106:return 92}return 0}static _resolveSimpleUserBinding(e){if(!e)return null;if(e instanceof Bw)return e;const t=this._scanCodeToKeyCode(e.scanCode);return 0===t?null:new Bw(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,t)}static resolveUserBinding(e,t){const i=IW(e.map((e=>this._resolveSimpleUserBinding(e))));return i.length>0?[new PW(new Vw(i),t)]:[]}}const FW=L_("labelService"),BW=L_("contextService");function VW(e){const t=e;return"string"==typeof(null==t?void 0:t.id)&&Ps.isUri(t.uri)}class WW{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 zW="code-workspace";var HW,jW,UW,$W,KW,qW,GW,ZW,YW;mf(0,"Code Workspace"),function(e){e.noSelection=mf(0,"No selection"),e.singleSelectionRange=mf(0,"Line {0}, Column {1} ({2} selected)"),e.singleSelection=mf(0,"Line {0}, Column {1}"),e.multiSelectionRange=mf(0,"{0} selections ({1} characters selected)"),e.multiSelection=mf(0,"{0} selections"),e.emergencyConfOn=mf(0,"Now changing the setting `accessibilitySupport` to 'on'."),e.openingDocs=mf(0,"Now opening the Editor Accessibility documentation page."),e.readonlyDiffEditor=mf(0," in a read-only pane of a diff editor."),e.editableDiffEditor=mf(0," in a pane of a diff editor."),e.readonlyEditor=mf(0," in a read-only code editor"),e.editableEditor=mf(0," in a code editor"),e.changeConfigToOnMac=mf(0,"To configure the editor to be optimized for usage with a Screen Reader press Command+E now."),e.changeConfigToOnWinLinux=mf(0,"To configure the editor to be optimized for usage with a Screen Reader press Control+E now."),e.auto_on=mf(0,"The editor is configured to be optimized for usage with a Screen Reader."),e.auto_off=mf(0,"The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time."),e.tabFocusModeOnMsg=mf(0,"Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}."),e.tabFocusModeOnMsgNoKb=mf(0,"Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding."),e.tabFocusModeOffMsg=mf(0,"Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}."),e.tabFocusModeOffMsgNoKb=mf(0,"Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding."),e.openDocMac=mf(0,"Press Command+H now to open a browser window with more information related to editor accessibility."),e.openDocWinLinux=mf(0,"Press Control+H now to open a browser window with more information related to editor accessibility."),e.outroMsg=mf(0,"You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape."),e.showAccessibilityHelpAction=mf(0,"Show Accessibility Help")}(HW||(HW={})),function(e){e.inspectTokensAction=mf(0,"Developer: Inspect Tokens")}(jW||(jW={})),function(e){e.gotoLineActionLabel=mf(0,"Go to Line/Column...")}(UW||(UW={})),function(e){e.helpQuickAccessActionLabel=mf(0,"Show all Quick Access Providers")}($W||($W={})),function(e){e.quickCommandActionLabel=mf(0,"Command Palette"),e.quickCommandHelp=mf(0,"Show And Run Commands")}(KW||(KW={})),function(e){e.quickOutlineActionLabel=mf(0,"Go to Symbol..."),e.quickOutlineByCategoryActionLabel=mf(0,"Go to Symbol by Category...")}(qW||(qW={})),function(e){e.editorViewAccessibleLabel=mf(0,"Editor content"),e.accessibilityHelpMessage=mf(0,"Press Alt+F1 for Accessibility Options.")}(GW||(GW={})),function(e){e.toggleHighContrast=mf(0,"Toggle High Contrast Theme")}(ZW||(ZW={})),function(e){e.bulkEditServiceSummary=mf(0,"Made {0} edits in {1} files")}(YW||(YW={}));const XW=L_("workspaceTrustManagementService");var QW;!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}e.intersect=t,e.isEmpty=i,e.intersects=function(e,n){return!i(t(e,n))},e.relativeComplement=function(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}}(QW||(QW={}));var JW;function ez(e,t,i){const n=i.mode===JW.ALIGN?i.offset:i.offset+i.size,o=i.mode===JW.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"}(JW||(JW={}));class tz extends Uo{constructor(e,t){super(),this.container=null,this.delegate=null,this.toDisposeOnClean=Uo.None,this.toDisposeOnSetContainer=Uo.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=YC(".context-view"),this.useFixedPosition=!1,this.useShadowDOM=!1,QC(this.view),this.setContainer(e,t),this._register(es((()=>this.setContainer(null,1))))}setContainer(e,t){var i;if(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,null===(i=this.shadowRootHostElement)||void 0===i||i.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),e){if(this.container=e,this.useFixedPosition=1!==t,this.useShadowDOM=3===t,this.useShadowDOM){this.shadowRootHostElement=YC(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const e=document.createElement("style");e.textContent=iz,this.shadowRoot.appendChild(e),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(YC("slot"))}else this.container.appendChild(this.view);const i=new ws;tz.BUBBLE_UP_EVENTS.forEach((e=>{i.add(sC(this.container,e,(e=>{this.onDOMEvent(e,!1)})))})),tz.BUBBLE_DOWN_EVENTS.forEach((e=>{i.add(sC(this.container,e,(e=>{this.onDOMEvent(e,!0)}),!0))})),this.toDisposeOnSetContainer=i}}show(e){this.isVisible()&&this.hide(),eC(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2500",this.view.style.position=this.useFixedPosition?"fixed":"absolute",XC(this.view),this.toDisposeOnClean=e.render(this.view)||Uo.None,this.delegate=e,this.doLayout(),this.delegate.focus&&this.delegate.focus()}getViewElement(){return this.view}layout(){this.isVisible()&&(!1!==this.delegate.canRelayout||Vs&&Rw?(this.delegate.layout&&this.delegate.layout(),this.doLayout()):this.hide())}doLayout(){if(!this.isVisible())return;let e,t=this.delegate.getAnchor();if(WC(t)){let i=yC(t);e={top:i.top,left:i.left,width:i.width,height:i.height}}else e={top:t.y,left:t.x,width:t.width||1,height:t.height||2};const i=SC(this.view),n=LC(this.view),o=this.delegate.anchorPosition||0,s=this.delegate.anchorAlignment||0;let r,a;if(0===(this.delegate.anchorAxisAlignment||0)){const t={offset:e.top-window.pageYOffset,size:e.height,position:0===o?0:1},l={offset:e.left,size:e.width,position:0===s?0:1,mode:JW.ALIGN};r=ez(window.innerHeight,n,t)+window.pageYOffset,QW.intersects({start:r,end:r+n},{start:t.offset,end:t.offset+t.size})&&(l.mode=JW.AVOID),a=ez(window.innerWidth,i,l)}else{const t={offset:e.left,size:e.width,position:0===s?0:1},l={offset:e.top,size:e.height,position:0===o?0:1,mode:JW.ALIGN};a=ez(window.innerWidth,i,t),QW.intersects({start:a,end:a+i},{start:t.offset,end:t.offset+t.size})&&(l.mode=JW.AVOID),r=ez(window.innerHeight,n,l)+window.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 l=yC(this.container);this.view.style.top=r-(this.useFixedPosition?yC(this.view).top:l.top)+"px",this.view.style.left=a-(this.useFixedPosition?yC(this.view).left:l.left)+"px",this.view.style.width="initial"}hide(e){const t=this.delegate;this.delegate=null,(null==t?void 0:t.onHide)&&t.onHide(e),this.toDisposeOnClean.dispose(),QC(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):t&&!NC(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}tz.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],tz.BUBBLE_DOWN_EVENTS=["click"];let iz='\n\t:host {\n\t\tall: initial; /* 1st rule so subsequent properties are reset. */\n\t}\n\n\t@font-face {\n\t\tfont-family: "codicon";\n\t\tfont-display: block;\n\t\tsrc: url("./codicon.ttf?5d4d76ab2ce5108968ad644d591a16a6") format("truetype");\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 nz=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},oz=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}};let sz=class extends Uo{constructor(e){super(),this.layoutService=e,this.currentViewDisposable=Uo.None,this.container=e.hasContainer?e.container:null,this.contextView=this._register(new tz(this.container,1)),this.layout(),this._register(e.onDidLayout((()=>this.layout())))}setContainer(e,t){this.contextView.setContainer(e,t||1)}showContextView(e,t,i){t?t!==this.container&&(this.container=t,this.setContainer(t,i?3:2)):this.layoutService.hasContainer&&this.container!==this.layoutService.container&&(this.container=this.layoutService.container,this.setContainer(this.container,1)),this.contextView.show(e);const n=es((()=>{this.currentViewDisposable===n&&this.hideContextView()}));return this.currentViewDisposable=n,n}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e)}};sz=nz([oz(0,CV)],sz);const rz="**",az="[/\\\\]",lz="[^/\\\\]",dz=/\//g;function cz(e){switch(e){case 0:return"";case 1:return"[^/\\\\]*?";default:return"(?:[/\\\\]|[^/\\\\]+[/\\\\]|[/\\\\][^/\\\\]+)*?"}}function hz(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}s+=r}return s&&i.push(s),i}function uz(e){if(!e)return"";let t="";const i=hz(e,"/");if(i.every((e=>e===rz)))t=".*";else{let e=!1;i.forEach(((n,o)=>{if(n===rz)return void(e||(t+=cz(2),e=!0));let s=!1,r="",a=!1,l="";for(const e of n)if("}"!==e&&s)r+=e;else if(!a||"]"===e&&l)switch(e){case"{":s=!0;continue;case"[":a=!0;continue;case"}":{const e=`(?:${hz(r,",").map((e=>uz(e))).join("|")})`;t+=e,s=!1,r="";break}case"]":t+="["+l+"]",a=!1,l="";break;case"?":t+=lz;continue;case"*":t+=cz(1);continue;default:t+=Xo(e)}else{let t;t="-"===e?e:"^"!==e&&"!"!==e||l?"/"===e?"":Xo(e):"^",l+=t}oyz(e,t))).filter((e=>e!==Cz)),e),n=i.length;if(!n)return Cz;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),[]);r.length&&(o.allPaths=r);return o}(i,t):(o=_z.exec(Sz(i,t)))?kz(o[1].substr(1),i,!0):(o=vz.exec(Sz(i,t)))?kz(o[1],i,!1):function(e){try{const t=new RegExp(`^${uz(e)}$`);return function(i){return t.lastIndex=0,"string"==typeof i&&t.test(i)?e:null}}catch(t){return Cz}}(i);return bz.set(n,s),xz(s,e)}function xz(e,t){return"string"==typeof t?e:function(i,n){return YO(i,t.base,!Vo)?e(i.substr(t.base.length+1),n):null}}function Sz(e,t){return t.trimForExclusions&&e.endsWith("/**")?e.substr(0,e.length-2):e}function kz(e,t,i){const n=Fr===Pr.sep,o=n?e:e.replace(dz,Fr),s=Fr+o,r=Pr.sep+e,a=i?function(i,a){return"string"!=typeof i||i!==o&&!i.endsWith(s)&&(n||i!==e&&!i.endsWith(r))?null:t}:function(i,s){return"string"!=typeof i||i!==o&&(n||i!==e)?null:t};return a.allPaths=[(i?"*/":"./")+e],a}function Dz(e,t={}){if(!e)return wz;if("string"==typeof e||function(e){const t=e;if(!t)return!1;return"string"==typeof t.base&&"string"==typeof t.pattern}(e)){const i=yz(e,t);if(i===Cz)return wz;const n=function(e,t){return!!i(e,t)};return i.allBasenames&&(n.allBasenames=i.allBasenames),i.allPaths&&(n.allPaths=i.allPaths),n}return function(e,t){const i=Lz(Object.getOwnPropertyNames(e).map((i=>function(e,t,i){if(!1===t)return Cz;const n=yz(e,i);if(n===Cz)return Cz;if("boolean"==typeof t)return n;if(t){const i=t.when;if("string"==typeof i){const t=(t,o,s,r)=>{if(!r||!n(t,o))return null;const a=r(i.replace("$(basename)",s));return(l=a)&&"function"==typeof l.then?a.then((t=>t?e:null)):a?e:null;var l};return t.requiresSiblings=!0,t}}return n}(i,e[i],t))).filter((e=>e!==Cz))),n=i.length;if(!n)return Cz;if(!i.some((e=>!!e.requiresSiblings))){if(1===n)return i[0];const e=function(e,t){for(let n=0,o=i.length;n!!e.allBasenames));t&&(e.allBasenames=t.allBasenames);const o=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return o.length&&(e.allPaths=o),e}const o=function(e,t,n){let o;for(let s=0,r=i.length;s!!e.allBasenames));s&&(o.allBasenames=s.allBasenames);const r=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);r.length&&(o.allPaths=r);return o}(e,t)}function Lz(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}let Nz=[],Ez=[],Iz=[];function Tz(e,t=!1){!function(e,t,i){const n=function(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?Dz(e.filepattern.toLowerCase()):void 0,filepatternOnPath:!!e.filepattern&&e.filepattern.indexOf(Pr.sep)>=0}}(e,t);Nz.push(n),n.userConfigured?Iz.push(n):Ez.push(n);i&&!n.userConfigured&&Nz.forEach((e=>{e.mime===n.mime||e.userConfigured||(n.extension&&(e.extension,n.extension),n.filename&&(e.filename,n.filename),n.filepattern&&(e.filepattern,n.filepattern),n.firstline&&(e.firstline,n.firstline))}))}(e,!1,t)}function Mz(e,t){let i;if(e)switch(e.scheme){case Yw.file:i=e.fsPath;break;case Yw.data:i=uR.parseMetaData(e).get(uR.META_DATA_LABEL);break;default:i=e.path}if(!i)return[LN.unknown];i=i.toLowerCase();const n=Ca(i),o=Az(i,n,Iz);if(o)return[o,LN.text];const s=Az(i,n,Ez);if(s)return[s,LN.text];if(t){const e=function(e){Es(e)&&(e=e.substr(1));if(e.length>0)for(let t=Nz.length-1;t>=0;t--){const i=Nz[t];if(!i.firstline)continue;const n=e.match(i.firstline);if(n&&n.length>0)return i.mime}return}(t);if(e)return[e,LN.text]}return[LN.unknown]}function Az(e,t,i){var n;let o,s,r;for(let a=i.length-1;a>=0;a--){const l=i[a];if(t===l.filenameLowercase){o=l;break}if(l.filepattern&&(!s||l.filepattern.length>s.filepattern.length)){const i=l.filepatternOnPath?e:t;(null===(n=l.filepatternLowercase)||void 0===n?void 0:n.call(l,i))&&(s=l)}l.extension&&(!r||l.extension.length>r.extension.length)&&t.endsWith(l.extensionLowercase)&&(r=l)}return o?o.mime:s?s.mime:r?r.mime:void 0}const Oz=Object.prototype.hasOwnProperty,Rz="vs.editor.nullLanguage";Wv.register(Rz,{});class Pz{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(Rz,0),this._register(LA,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]||Rz}}class Fz extends Uo{constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new $o),this.onDidChange=this._onDidChange.event,Fz.instanceCount++,this._warnOnOverwrite=t,this.languageIdCodec=new Pz,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(DA.onDidChangeLanguages((e=>{this._initializeFromRegistry()}))))}dispose(){Fz.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Nz=Nz.filter((e=>e.userConfigured)),Ez=[];const e=[].concat(DA.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}))})),Yy.as(cA).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(e){const t=e.id;let i;Oz.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(let e of t.extensions)Tz({id:i,mime:n,extension:e},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(let a of t.filenames)Tz({id:i,mime:n,filename:a},this._warnOnOverwrite),e.filenames.push(a);if(Array.isArray(t.filenamePatterns))for(let a of t.filenamePatterns)Tz({id:i,mime:n,filepattern:a},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);xa(t)||Tz({id:i,mime:n,firstline:t},this._warnOnOverwrite)}catch(r){Jo(r)}}e.aliases.push(i);let o=null;if(void 0!==t.aliases&&Array.isArray(t.aliases)&&(o=0===t.aliases.length?[null]:t.aliases),null!==o)for(const a of o)a&&0!==a.length&&e.aliases.push(a);const s=null!==o&&o.length>0;if(s&&null===o[0]);else{const t=(s?o[0]:null)||i;!s&&e.name||(e.name=t)}t.configuration&&e.configurationFiles.push(t.configuration),t.icon&&e.icons.push(t.icon)}isRegisteredLanguageId(e){return!!e&&Oz.call(this._languages,e)}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(e){const t=e.toLowerCase();return Oz.call(this._lowercaseNameMap,t)?this._lowercaseNameMap[t]:null}getLanguageIdByMimeType(e){return e&&Oz.call(this._mimeTypesMap,e)?this._mimeTypesMap[e]:null}guessLanguageIdByFilepathOrFirstLine(e,t){if(!e&&!t)return[];const i=Mz(e,t);return Sa(i.map((e=>this.getLanguageIdByMimeType(e))))}}Fz.instanceCount=0;class Bz extends Uo{constructor(e=!1){super(),this._onDidEncounterLanguage=this._register(new $o),this.onDidEncounterLanguage=this._onDidEncounterLanguage.event,this._onDidChange=this._register(new $o({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,Bz.instanceCount++,this._encounteredLanguages=new Set,this._registry=this._register(new Fz(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange((()=>this._onDidChange.fire())))}dispose(){Bz.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 ka(i,null)}createById(e){return new Vz(this.onDidChange,(()=>this._createAndGetLanguageIdentifier(e)))}createByFilepathOrFirstLine(e,t){return new Vz(this.onDidChange,(()=>{const i=this.guessLanguageIdByFilepathOrFirstLine(e,t);return this._createAndGetLanguageIdentifier(i)}))}_createAndGetLanguageIdentifier(e){return e&&this.isRegisteredLanguageId(e)||(e=LA),this._encounteredLanguages.has(e)||(this._encounteredLanguages.add(e),Ns.getOrCreate(e),this._onDidEncounterLanguage.fire(e)),e}}Bz.instanceCount=0;class Vz{constructor(e,t){this._onDidChangeLanguages=e,this._selector=t,this._listener=null,this._emitter=null,this.languageId=this._selector()}_dispose(){this._listener&&(this._listener.dispose(),this._listener=null),this._emitter&&(this._emitter.dispose(),this._emitter=null)}get onDidChange(){return this._listener||(this._listener=this._onDidChangeLanguages((()=>this._evaluate()))),this._emitter||(this._emitter=new $o({onLastListenerRemove:()=>{this._dispose()}})),this._emitter.event}_evaluate(){const e=this._selector();e!==this.languageId&&(this.languageId=e,this._emitter&&this._emitter.fire(this.languageId))}}function Wz(e){let t=e.definition;for(;t instanceof br;)t=t.definition;return`.codicon-${e.id}:before { content: '${t.fontCharacter}'; }`}function zz(...e){return function(t,i){for(let n=0,o=e.length;n0?[{start:0,end:t.length}]:[]:null}function Uz(e,t){const i=t.toLowerCase().indexOf(e.toLowerCase());return-1===i?null:[{start:i,end:i+e.length}]}function $z(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=$z(e,t,i+1,n+1))?Jz({start:n,end:n+1},o):null}return $z(e,t,i,n+1)}function Kz(e){return 97<=e&&e<=122}function qz(e){return 65<=e&&e<=90}function Gz(e){return 48<=e&&e<=57}function Zz(e){return 32===e||9===e||10===e||13===e}const Yz=new Set;function Xz(e){return Zz(e)||Yz.has(e)}function Qz(e){return Kz(e)||qz(e)||Gz(e)}function Jz(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function eH(e,t){for(let i=t;i0&&!Qz(e.charCodeAt(i-1)))return i}return e.length}function tH(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;for(o=tH(e,t,i+1,n+1);!o&&(s=eH(t,s))60)return null;const i=function(e){let t=0,i=0,n=0,o=0,s=0;for(let r=0;r.2&&t<.8&&n>.6&&o<.2}(i)){if(!function(e){const{upperPercent:t,lowerPercent:i}=e;return 0===i&&t>.6}(i))return null;t=t.toLowerCase()}let n=null,o=0;for(e=e.toLowerCase();o0&&Xz(e.charCodeAt(i-1)))return i;return e.length}"()[]{}<>`'\"-/;:,.?!".split("").forEach((e=>Yz.add(e.charCodeAt(0))));const sH=zz(Hz,iH,Uz),rH=zz(Hz,iH,(function(e,t){return $z(e.toLowerCase(),t.toLowerCase(),0,0)})),aH=new QV(1e4);function lH(e,t,i=!1){if("string"!=typeof e||"string"!=typeof t)return null;let n=aH.get(e);n||(n=new RegExp(Da(e),"i"),aH.set(e,n));const o=n.exec(t);return o?[{start:o.index,end:o.index+o[0].length}]:i?rH(e,t):sH(e,t)}function dH(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 hH=128;function uH(){const e=[],t=[];for(let i=0;i<=hH;i++)t[i]=0;for(let i=0;i<=hH;i++)e.push(t.slice(0));return e}function gH(e){const t=[];for(let i=0;i<=e;i++)t[i]=0;return t}const pH=gH(256),mH=gH(256),fH=uH(),_H=uH(),vH=uH();function bH(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 40:case 91:return!0;case void 0:return!1;default:return!!or(i)}}function wH(e,t){if(t<0||t>=e.length)return!1;switch(e.charCodeAt(t)){case 32:case 9:return!0;default:return!1}}function CH(e,t,i){return t[e]!==i[e]}var yH;function xH(e,t,i,n,o,s,r){const a=e.length>hH?hH:e.length,l=n.length>hH?hH:n.length;if(i>=a||s>=l||a-i>l-s)return;if(!function(e,t,i,n,o,s,r=!1){for(;t=i&&a>=n;)o[r]===s[a]&&(mH[r]=a,r--),a--}(a,l,i,s,t,o);let d=1,c=1,h=i,u=s;const g=[!1];for(d=1,h=i;hr,v=_?_H[d][c-1]+(fH[d][c-1]>0?-5:0):0,b=u>r+1&&fH[d][c-1]>0,w=b?_H[d][c-2]+(fH[d][c-2]>0?-5:0):0;if(b&&(!_||w>=v)&&(!m||w>=f))_H[d][c]=w,vH[d][c]=3,fH[d][c]=0;else if(_&&(!m||v>=f))_H[d][c]=v,vH[d][c]=2,fH[d][c]=0;else{if(!m)throw new Error("not possible");_H[d][c]=f,vH[d][c]=1,fH[d][c]=fH[d-1][c-1]+1}}}if(!g[0]&&!r)return;d--,c--;const p=[_H[d][c],s];let m=0,f=0;for(;d>=1;){let e=c;do{const t=vH[d][e];if(3===t)e-=2;else{if(2!==t)break;e-=1}}while(e>=1);m>1&&t[i+d-1]===o[s+c-1]&&!CH(e+s-1,n,o)&&m+1>fH[d][e]&&(e=c),e===c?m++:m=1,f||(f=e),d--,c=e-1,p.push(c)}l===a&&(p[0]+=2);const _=f-a;return p[0]-=_,p}function SH(e,t,i,n,o,s,r,a,l,d,c){if(t[i]!==s[r])return Number.MIN_SAFE_INTEGER;let h=1,u=!1;return r===i-n?h=e[i]===o[r]?7:5:!CH(r,o,s)||0!==r&&CH(r-1,o,s)?!bH(s,r)||0!==r&&bH(s,r-1)?(bH(s,r-1)||wH(s,r-1))&&(h=5,u=!0):h=5:(h=e[i]===o[r]?7:5,u=!0),h>1&&i===n&&(c[0]=!0),u||(u=CH(r,o,s)||bH(s,r-1)||wH(s,r-1)),i===n?r>l&&(h-=u?3:5):h+=d?u?2:0:u?0:1,r+1===a&&(h-=u?3:5),h}function kH(e,t,i,n,o,s,r){return function(e,t,i,n,o,s,r,a){let l=xH(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}(e,t,i,n,o,s,!0,r)}function DH(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}!function(e){e.Default=[-100,0],e.isDefault=function(e){return!e||2===e.length&&-100===e[0]&&0===e[1]}}(yH||(yH={}));const LH="$(",NH=new RegExp(`\\$\\(${Ys.iconNameExpression}(?:${Ys.iconModifierExpression})?\\)`,"g"),EH=new RegExp(Ys.iconNameCharacter),IH=new RegExp(`(\\\\)?${NH.source}`,"g");const TH=new RegExp(`\\\\${NH.source}`,"g");const MH=new RegExp(`(\\s)?(\\\\)?${NH.source}(\\s)?`,"g");function AH(e){return-1===e.indexOf(LH)?e:e.replace(MH,((e,t,i,n)=>i?e:t||n||""))}function OH(e){const t=e.indexOf(LH);return-1===t?{text:e}:function(e,t){const i=[];let n="";function o(e){if(e){n+=e;for(const t of e)i.push(d)}}let s,r,a=-1,l="",d=0,c=t;const h=e.length;o(e.substr(0,t));for(;cthis.doGetActionViewItem(e,i,o),context:i.context,actionRunner:i.actionRunner,ariaLabel:i.ariaLabel,focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...zo||Vo?[10]:[]],keyDown:!0}}),this.menuElement=n,this.actionsList.setAttribute("role","menu"),this.actionsList.tabIndex=0,this.menuDisposables=this._register(new ws),this.initializeOrUpdateStyleSheet(e,{}),this._register(oS.addTarget(n)),nC(n,zC.KEY_DOWN,(e=>{new jw(e).equals(2)&&e.preventDefault()})),i.enableMnemonics&&this.menuDisposables.add(nC(n,zC.KEY_DOWN,(e=>{const t=e.key.toLocaleLowerCase();if(this.mnemonics.has(t)){HC(e,!0);const i=this.mnemonics.get(t);if(1===i.length&&(i[0]instanceof zH&&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)}}}))),Vo&&this._register(nC(n,zC.KEY_DOWN,(e=>{const t=new jw(e);t.equals(14)||t.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),HC(e,!0)):(t.equals(13)||t.equals(12))&&(this.focusedItem=0,this.focusPrevious(),HC(e,!0))}))),this._register(nC(this.domNode,zC.MOUSE_OUT,(e=>{NC(e.relatedTarget,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),e.stopPropagation())}))),this._register(nC(this.actionsList,zC.MOUSE_OVER,(e=>{let t=e.target;if(t&&NC(t,this.actionsList)&&t!==this.actionsList){for(;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(oS.addTarget(this.actionsList)),this._register(nC(this.actionsList,iS.Tap,(e=>{let t=e.initialTarget;if(t&&NC(t,this.actionsList)&&t!==this.actionsList){for(;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()}}})));let o={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new fT(n,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const s=this.scrollableElement.getDomNode();s.style.position="",this._register(nC(n,iS.Change,(e=>{HC(e,!0);const t=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:t-e.translationY})}))),this._register(nC(s,zC.MOUSE_UP,(e=>{e.preventDefault()}))),n.style.maxHeight=`${Math.max(10,window.innerHeight-e.getBoundingClientRect().top-35)}px`,t=t.filter((e=>{var t;return!(null===(t=i.submenuIds)||void 0===t?void 0:t.has(e.id))})),this.push(t,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter((e=>!(e instanceof HH))).forEach(((e,t,i)=>{e.updatePositionInSet(t+1,i.length)}))}initializeOrUpdateStyleSheet(e,t){this.styleSheet||(MC(e)?this.styleSheet=RC(e):(VH.globalStyleSheet||(VH.globalStyleSheet=RC()),this.styleSheet=VH.globalStyleSheet)),this.styleSheet.textContent=function(e,t){let i=`\n.monaco-menu {\n\tfont-size: 13px;\n\n}\n\n${Wz(br.menuSelection)}\n${Wz(br.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.animated .action-item.active {\n\ttransform: scale(1.272019649, 1.272019649); /* 1.272019649 = √φ */\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\topacity: 0.4;\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 #bbb;\n\tpadding-top: 1px;\n\tmargin-left: .8em;\n\tmargin-right: .8em;\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}\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\tpadding: 0.5em 0 0 0;\n\tmargin-bottom: 0.5em;\n\twidth: 100%;\n\theight: 0px !important;\n\tmargin-left: .8em !important;\n\tmargin-right: .8em !important;\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.monaco-menu .monaco-action-bar.vertical .action-item {\n\tborder: thin solid transparent; /* prevents jumping behaviour on hover or focus */\n}\n\n\n/* High Contrast Theming */\n:host-context(.hc-black) .context-view.monaco-menu-container {\n\tbox-shadow: none;\n}\n\n:host-context(.hc-black) .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: .5em 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\theight: 1.8em;\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}\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\tpadding: 0.2em 0 0 0;\n\tmargin-bottom: 0.2em;\n}\n\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: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}(t,MC(e))}style(e){const t=this.getContainer();this.initializeOrUpdateStyleSheet(t,e);const i=e.foregroundColor?`${e.foregroundColor}`:"",n=e.backgroundColor?`${e.backgroundColor}`:"",o=e.borderColor?`1px solid ${e.borderColor}`:"",s=e.shadowColor?`0 2px 4px ${e.shadowColor}`:"";t.style.border=o,this.domNode.style.color=i,this.domNode.style.backgroundColor=n,t.style.boxShadow=s,this.viewItems&&this.viewItems.forEach((t=>{(t instanceof WH||t instanceof HH)&&t.style(e)}))}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(nC(this.element,zC.MOUSE_UP,(e=>{if(HC(e,!0),o_){if(new Gw(e).rightButton)return;this.onClick(e)}else setTimeout((()=>{this.onClick(e)}),0)}))),this._register(nC(this.element,zC.CONTEXT_MENU,(e=>{HC(e,!0)}))))}),100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=$C(this.element,YC("a.action-menu-item")),this._action.id===_y.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=$C(this.item,YC("span.menu-item-check"+br.menuSelection.cssSelector)),this.check.setAttribute("role","none"),this.label=$C(this.item,YC("span.action-label")),this.options.label&&this.options.keybinding&&($C(this.item,YC("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked())}blur(){super.blur(),this.applyStyle()}focus(){super.focus(),this.item&&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){eC(this.label);let e=AH(this.getAction().label);if(e){const t=function(e){const t=PH,i=t.exec(e);if(!i)return e;const n=!i[1];return e.replace(t,n?"$2$3":"").trim()}(e);this.options.enableMnemonics||(e=t),this.label.setAttribute("aria-label",t.replace(/&&/g,"&"));const i=PH.exec(e);if(i){e=Mr(e),FH.lastIndex=0;let t=FH.exec(e);for(;t&&t[1];)t=FH.exec(e);const n=e=>e.replace(/&&/g,"&");t?this.label.append(La(n(e.substr(0,t.index))," "),YC("u",{"aria-hidden":"true"},t[3]),Na(n(e.substr(t.index+t[0].length))," ")):this.label.innerText=n(e).trim(),this.item&&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.getAction().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.getAction().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.getAction().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(){if(!this.menuStyle)return;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?`thin solid ${this.menuStyle.selectionBorderColor}`:"";this.item&&(this.item.style.color=t?t.toString():"",this.item.style.backgroundColor=i?i.toString():""),this.check&&(this.check.style.color=t?t.toString():""),this.container&&(this.container.style.border=n)}style(e){this.menuStyle=e,this.applyStyle()}}class zH extends WH{constructor(e,t,i,n){super(e,e,n),this.submenuActions=t,this.parentData=i,this.submenuOptions=n,this.mysubmenu=null,this.submenuDisposables=this._register(new ws),this.mouseOver=!1,this.expandDirection=n&&void 0!==n.expandDirection?n.expandDirection:BH.Right,this.showScheduler=new lb((()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))}),250),this.hideScheduler=new lb((()=>{this.element&&!NC(OC(),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=$C(this.item,YC("span.submenu-indicator"+br.menuSubmenu.cssSelector)),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register(nC(this.element,zC.KEY_UP,(e=>{let t=new jw(e);(t.equals(17)||t.equals(3))&&(HC(e,!0),this.createSubmenu(!0))}))),this._register(nC(this.element,zC.KEY_DOWN,(e=>{let t=new jw(e);OC()===this.item&&(t.equals(17)||t.equals(3))&&HC(e,!0)}))),this._register(nC(this.element,zC.MOUSE_OVER,(e=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())}))),this._register(nC(this.element,zC.MOUSE_LEAVE,(e=>{this.mouseOver=!1}))),this._register(nC(this.element,zC.FOCUS_OUT,(e=>{this.element&&!NC(OC(),this.element)&&this.hideScheduler.schedule()}))),this._register(this.parentData.parent.onScroll((()=>{this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!1)}))))}updateEnabled(){}onClick(e){HC(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(Bte){}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=ez(e.width,t.width,{position:n===BH.Right?0:1,offset:i.left,size:i.width}),o.left>=i.left&&o.left{new jw(e).equals(15)&&(HC(e,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))}))),this.submenuDisposables.add(nC(this.submenuContainer,zC.KEY_DOWN,(e=>{new jw(e).equals(15)&&HC(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){var t;this.item&&(null===(t=this.item)||void 0===t||t.setAttribute("aria-expanded",e))}applyStyle(){if(super.applyStyle(),!this.menuStyle)return;const e=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=e?`${e}`:""),this.parentData.submenu&&this.parentData.submenu.style(this.menuStyle)}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class HH extends fB{style(e){this.label&&(this.label.style.borderBottomColor=e.separatorColor?`${e.separatorColor}`:"")}}function jH(e,t){const i=Object.create(null);for(let n in t){const o=t[n];o&&(i[n]=kL(o,e))}return i}function UH(e,t,i){function n(){const n=jH(e.getColorTheme(),t);"function"==typeof i?i(n):i.style(n)}return n(),e.onDidColorThemeChange(n)}function $H(e,t,i){return UH(t,Object.assign(Object.assign({},KH),i||{}),e)}const KH={listFocusBackground:pD,listFocusForeground:mD,listFocusOutline:fD,listActiveSelectionBackground:_D,listActiveSelectionForeground:vD,listActiveSelectionIconForeground:bD,listFocusAndSelectionBackground:_D,listFocusAndSelectionForeground:vD,listInactiveSelectionBackground:wD,listInactiveSelectionIconForeground:yD,listInactiveSelectionForeground:CD,listInactiveFocusBackground:xD,listInactiveFocusOutline:SD,listHoverBackground:kD,listHoverForeground:DD,listDropBackground:LD,listSelectionOutline:xS,listHoverOutline:xS,listFilterWidgetBackground:AD,listFilterWidgetOutline:OD,listFilterWidgetNoMatchesOutline:RD,listMatchesShadow:LS,treeIndentGuidesStroke:PD,tableColumnsBorder:FD,tableOddRowsBackgroundColor:BD},qH={shadowColor:LS,borderColor:jD,foregroundColor:UD,backgroundColor:$D,selectionForegroundColor:KD,selectionBackgroundColor:qD,selectionBorderColor:GD,separatorColor:ZD,scrollbarShadow:QS,scrollbarSliderBackground:JS,scrollbarSliderHoverBackground:ek,scrollbarSliderActiveBackground:tk};class GH{constructor(e,t,i,n,o){this.contextViewService=e,this.telemetryService=t,this.notificationService=i,this.keybindingService=n,this.themeService=o,this.focusToReturn=null,this.block=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const t=e.getActions();if(!t.length)return;let i;this.focusToReturn=document.activeElement;let n=WC(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:n=>{let o=e.getMenuClassName?e.getMenuClassName():"";o&&(n.className+=" "+o),this.options.blockMouse&&(this.block=n.appendChild(YC(".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",nC(this.block,zC.MOUSE_DOWN,(e=>e.stopPropagation())));const s=new ws,r=e.actionRunner||new fy;var a,l;return r.onBeforeRun(this.onActionRun,this,s),r.onDidRun(this.onDidActionRun,this,s),i=new VH(n,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:r,getKeyBinding:e.getKeyBinding?e.getKeyBinding:e=>this.keybindingService.lookupKeybinding(e.id)}),s.add((a=i,UH(this.themeService,Object.assign(Object.assign({},qH),l),a))),i.onDidCancel((()=>this.contextViewService.hideContextView(!0)),null,s),i.onDidBlur((()=>this.contextViewService.hideContextView(!0)),null,s),s.add(nC(window,zC.BLUR,(()=>this.contextViewService.hideContextView(!0)))),s.add(nC(window,zC.MOUSE_DOWN,(e=>{if(e.defaultPrevented)return;let t=new Gw(e),i=t.target;if(!t.rightButton){for(;i;){if(i===n)return;i=i.parentElement}this.contextViewService.hideContextView(!0)}}))),ta(s,i)},focus:()=>{i&&i.focus(!!e.autoSelectFirstItem)},onHide:t=>{e.onHide&&e.onHide(!!t),this.block&&(this.block.remove(),this.block=null),this.focusToReturn&&this.focusToReturn.focus()}},n,!!n)}onActionRun(e){this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1),this.focusToReturn&&this.focusToReturn.focus()}onDidActionRun(e){e.error&&!Ea(e.error)&&this.notificationService.error(e.error)}}var ZH=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},YH=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}};let XH=class extends Uo{constructor(e,t,i,n,o){super(),this._onDidShowContextMenu=new $o,this._onDidHideContextMenu=new $o,this.contextMenuHandler=new GH(i,e,t,n,o)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){this.contextMenuHandler.showContextMenu(Object.assign(Object.assign({},e),{onHide:t=>{e.onHide&&e.onHide(t),this._onDidHideContextMenu.fire()}})),ny.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};function QH(e){let t=JSON.parse(e);return t=JH(t),t}function JH(e,t=0){if(!e||t>200)return e;if("object"==typeof e){switch(e.$mid){case 1:return Ps.revive(e);case 2:return new RegExp(e.source,e.flags);case 14:return new Date(e.source)}if(e instanceof q_||e instanceof Uint8Array)return e;if(Array.isArray(e))for(let i=0;iUo.None,registerValidator:()=>Uo.None,registerExternalUriResolver:()=>Uo.None,setDefaultExternalOpener(){},registerExternalOpener:()=>Uo.None,open(){return tj(this,void 0,void 0,(function*(){return!1}))},resolveExternalUri(e){return tj(this,void 0,void 0,(function*(){return{resolved:e,dispose(){}}}))}});function oj(e,t){return Ps.isUri(e)?$r(e.scheme,t):Br(e,t+":")}function sj(e,...t){return t.some((t=>oj(e,t)))}var rj=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},aj=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}},lj=globalThis&&globalThis.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,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){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let dj=class{constructor(e){this._commandService=e}open(e,t){return lj(this,void 0,void 0,(function*(){if(!oj(e,Yw.command))return!1;if(!(null==t?void 0:t.allowCommands))return!0;"string"==typeof e&&(e=Ps.parse(e));let i=[];try{i=QH(decodeURIComponent(e.query))}catch(Bte){try{i=QH(e.query)}catch(O3){}}return Array.isArray(i)||(i=[i]),yield this._commandService.executeCommand(e.path,...i),!0}))}};dj=rj([aj(0,wy)],dj);let cj=class{constructor(e){this._editorService=e}open(e,t){return lj(this,void 0,void 0,(function*(){"string"==typeof e&&(e=Ps.parse(e));const{selection:i,uri:n}=function(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}}(e);return(e=n).scheme===Yw.file&&(e=lR(e)),yield this._editorService.openCodeEditor({resource:e,options:Object.assign({selection:i,source:(null==t?void 0:t.fromUserGesture)?ej.USER:ej.API},null==t?void 0:t.editorOptions)},this._editorService.getFocusedCodeEditor(),null==t?void 0:t.openToSide),!0}))}};cj=rj([aj(0,N_)],cj);let hj=class{constructor(e,t){this._openers=new zs,this._validators=new zs,this._resolvers=new zs,this._resolvedUriTargets=new YV((e=>e.with({path:null,fragment:null,query:null}).toString())),this._externalOpeners=new zs,this._defaultExternalOpener={openExternal:e=>lj(this,void 0,void 0,(function*(){return sj(e,Yw.http,Yw.https)?ey(e):window.location.href=e,!0}))},this._openers.push({open:(e,t)=>lj(this,void 0,void 0,(function*(){return!(!(null==t?void 0:t.openExternal)&&!sj(e,Yw.mailto,Yw.http,Yw.https,Yw.vsls))&&(yield this._doOpenExternal(e,t),!0)}))}),this._openers.push(new dj(t)),this._openers.push(new cj(e))}registerOpener(e){return{dispose:this._openers.unshift(e)}}registerValidator(e){return{dispose:this._validators.push(e)}}registerExternalUriResolver(e){return{dispose:this._resolvers.push(e)}}setDefaultExternalOpener(e){this._defaultExternalOpener=e}registerExternalOpener(e){return{dispose:this._externalOpeners.push(e)}}open(e,t){var i;return lj(this,void 0,void 0,(function*(){const n="string"==typeof e?Ps.parse(e):e,o=null!==(i=this._resolvedUriTargets.get(n))&&void 0!==i?i:e;for(const e of this._validators)if(!(yield e.shouldOpen(o)))return!1;for(const i of this._openers){if(yield i.open(e,t))return!0}return!1}))}resolveExternalUri(e,t){return lj(this,void 0,void 0,(function*(){for(const i of this._resolvers)try{const n=yield i.resolveExternalUri(e,t);if(n)return this._resolvedUriTargets.has(n.resolved)||this._resolvedUriTargets.set(n.resolved,e),n}catch(Bte){}throw new Error("Could not resolve external URI: "+e.toString())}))}_doOpenExternal(e,t){return lj(this,void 0,void 0,(function*(){const i="string"==typeof e?Ps.parse(e):e;let n,o;try{n=(yield this.resolveExternalUri(i,t)).resolved}catch(Bte){n=i}if(o="string"==typeof e&&i.toString()===n.toString()?e:encodeURI(n.toString(!0)),null==t?void 0:t.allowContributedOpeners){const e="string"==typeof(null==t?void 0:t.allowContributedOpeners)?null==t?void 0:t.allowContributedOpeners:void 0;for(const t of this._externalOpeners){if(yield t.openExternal(o,{sourceUri:i,preferredOpenerId:e},Ia.None))return!0}}return this._defaultExternalOpener.openExternal(o,{sourceUri:i},Ia.None)}))}dispose(){this._validators.clear()}};var uj,gj;hj=rj([aj(0,N_),aj(1,wy)],hj),function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(uj||(uj={})),function(e){e.compare=function(e,t){return t-e};const t=Object.create(null);t[e.Error]=mf(0,"Error"),t[e.Warning]=mf(0,"Warning"),t[e.Info]=mf(0,"Info"),e.toString=function(e){return t[e]||""},e.fromSeverity=function(t){switch(t){case fF.Error:return e.Error;case fF.Warning:return e.Warning;case fF.Info:return e.Info;case fF.Ignore:return e.Hint}},e.toSeverity=function(t){switch(t){case e.Error:return fF.Error;case e.Warning:return fF.Warning;case e.Info:return fF.Info;case e.Hint:return fF.Ignore}}}(uj||(uj={})),function(e){const t="";function i(e,i){let n=[t];return e.source?n.push(e.source.replace("¦","\\¦")):n.push(t),e.code?"string"==typeof e.code?n.push(e.code.replace("¦","\\¦")):n.push(e.code.value.replace("¦","\\¦")):n.push(t),void 0!==e.severity&&null!==e.severity?n.push(uj.toString(e.severity)):n.push(t),e.message&&i?n.push(e.message.replace("¦","\\¦")):n.push(t),void 0!==e.startLineNumber&&null!==e.startLineNumber?n.push(e.startLineNumber.toString()):n.push(t),void 0!==e.startColumn&&null!==e.startColumn?n.push(e.startColumn.toString()):n.push(t),void 0!==e.endLineNumber&&null!==e.endLineNumber?n.push(e.endLineNumber.toString()):n.push(t),void 0!==e.endColumn&&null!==e.endColumn?n.push(e.endColumn.toString()):n.push(t),n.push(t),n.join("¦")}e.makeKey=function(e){return i(e,!0)},e.makeKeyOptionalMessage=i}(gj||(gj={}));const pj=L_("markerService");var mj=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},fj=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}};class _j extends Uo{constructor(e){super(),this.model=e,this._markersData=new Map,this._register(es((()=>{this.model.deltaDecorations([...this._markersData.keys()],[]),this._markersData.clear()})))}update(e,t){const i=[...this._markersData.keys()];this._markersData.clear();const n=this.model.deltaDecorations(i,t);for(let o=0;othis._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 _j(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!==Yw.inMemory&&e.uri.scheme!==Yw.internal&&e.uri.scheme!==Yw.vscode||this._markerService&&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}),i=t.map((t=>({range:this._createDecorationRange(e.model,t),options:this._createDecorationOption(t)})));e.update(t,i)&&this._onDidChangeMarker.fire(e.model)}_createDecorationRange(e,t){let i=qo.lift(t);if(t.severity!==uj.Hint||this._hasMarkerTag(t,1)||this._hasMarkerTag(t,2)||(i=i.setEndPosition(i.startLineNumber,i.startColumn+2)),i=e.validateRange(i),i.isEmpty()){const t=e.getLineLastNonWhitespaceColumn(i.startLineNumber)||e.getLineMaxColumn(i.startLineNumber);if(1===t||i.endColumn>=t)return i;const n=e.getWordAtPosition(i.getStartPosition());n&&(i=new qo(i.startLineNumber,n.startColumn,i.endLineNumber,n.endColumn))}else if(t.endColumn===Number.MAX_VALUE&&1===t.startColumn&&i.startLineNumber===i.endLineNumber){let n=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);n=0}};vj=mj([fj(0,Gv),fj(1,pj)],vj);class bj{constructor(e,t){this._startLineNumber=e,this._tokens=t,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}static create(e,t){return new bj(e,new wj(t))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}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 qo(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 bj(this._startLineNumber,n),new bj(this._startLineNumber+s,o)]}applyEdit(e,t){const[i,n,o]=uP(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 er(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);s>=this._tokens.getMaxDeltaLine()+1||this._tokens.acceptInsertText(s,e.column-1,t,i,n,o)}}class wj{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){const t=[];for(let i=0;ie)){let o=n;for(;o>t&&this._getDeltaLine(o-1)===e;)o--;let s=n;for(;se||c===e&&u>=t)&&(ce||r===e&&g>=t){if(ro?p-=o-i:p=i;else if(u===t&&g===i){if(!(u===n&&p>o)){d=!0;continue}p-=o-i}else if(uo)){d=!0;continue}u===t?(g=i,p=g+(p-o)):(g=0,p=g+(p-o))}else if(u>n){if(0===a&&!d){l=r;break}u-=a}else{if(!(u===n&&g>=o))throw new Error("Not possible!");e&&0===u&&(g+=e,p+=e),u-=a,g-=o-i,p-=o-i}const f=4*l;s[f]=u,s[f+1]=g,s[f+2]=p,s[f+3]=m,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 d=0;d=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},xj=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}};let Sj=class{constructor(e,t,i,n){this._legend=e,this._themeService=t,this._languageService=i,this._logService=n,this._hashTable=new Lj,this._hasWarnedOverlappingTokens=!1}getMetadata(e,t,i){const n=this._languageService.languageIdCodec.encodeLanguageId(i),o=this._hashTable.get(e,t,n);let s;if(o)s=o.metadata,this._logService.getLevel()===yb.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${e} / ${t}: foreground ${ys.getForeground(s)}, fontStyle ${ys.getFontStyle(s).toString(2)}`);else{let o=this._legend.tokenTypes[e];const r=[];if(o){let e=t;for(let t=0;e>0&&t>=1;e>0&&this._logService.getLevel()===yb.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),r.push("not-in-legend"));const n=this._themeService.getColorTheme().getTokenStyleMetadata(o,r,i);if(void 0===n)s=2147483647;else{if(s=0,void 0!==n.italic){s|=1|(n.italic?1:0)<<10}if(void 0!==n.bold){s|=2|(n.bold?2:0)<<10}if(void 0!==n.underline){s|=4|(n.underline?4:0)<<10}if(void 0!==n.strikethrough){s|=8|(n.strikethrough?8:0)<<10}if(n.foreground){s|=16|n.foreground<<14}0===s&&(s=2147483647)}}else this._logService.getLevel()===yb.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),s=2147483647,o="not-in-legend";this._hashTable.add(e,t,n,s),this._logService.getLevel()===yb.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${o}) / ${t} (${r.join(" ")}): foreground ${ys.getForeground(s)}, fontStyle ${ys.getFontStyle(s).toString(2)}`)}return s}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0)}};function kj(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;for(;ae&&0===n[5*t];)t--;if(t-1===e){let e=c;for(;e+1c&&(t.warnOverlappingSemanticTokens(r,c+1),m=this._growCount){const e=this._elements;this._currentLengthIndex++,this._currentLength=Lj._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+10?i[0]:[]}(e,t),r=yield Promise.all(s.map((e=>Ej(this,void 0,void 0,(function*(){let s,r=null;try{s=yield e.provideDocumentSemanticTokens(t,e===i?n:null,o)}catch(a){r=a,s=null}return s&&(Ij(s)||Tj(s))||(s=null),new Mj(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}))}class Rj{constructor(e,t){this.provider=e,this.tokens=t}}function Pj(e,t){const i=e.orderedGroups(t);return i.length>0?i[0]:[]}function Fj(e,t,i,n){return Ej(this,void 0,void 0,(function*(){const o=Pj(e,t),s=yield Promise.all(o.map((e=>Ej(this,void 0,void 0,(function*(){let o;try{o=yield e.provideDocumentRangeSemanticTokens(t,i,n)}catch(s){Ta(s),o=null}return o&&Ij(o)||(o=null),new Rj(e,o)})))));for(const e of s)if(e.tokens)return e;return s.length>0?s[0]:null}))}Cy.registerCommand("_provideDocumentSemanticTokensLegend",((e,...t)=>Ej(void 0,void 0,void 0,(function*(){const[i]=t;Js(i instanceof Ps);const n=e.get(Gv).getModel(i);if(!n)return;const{documentSemanticTokensProvider:o}=e.get(Lb),s=function(e,t){const i=e.orderedGroups(t);return i.length>0?i[0]:null}(o,n);return s?s[0].getLegend():e.get(wy).executeCommand("_provideDocumentRangeSemanticTokensLegend",i)})))),Cy.registerCommand("_provideDocumentSemanticTokens",((e,...t)=>Ej(void 0,void 0,void 0,(function*(){const[i]=t;Js(i instanceof Ps);const n=e.get(Gv).getModel(i);if(!n)return;const{documentSemanticTokensProvider:o}=e.get(Lb);if(!Aj(o,n))return e.get(wy).executeCommand("_provideDocumentRangeSemanticTokens",i,n.getFullModelRange());const s=yield Oj(o,n,null,null,Ia.None);if(!s)return;const{provider:r,tokens:a}=s;if(!a||!Ij(a))return;const l=Nj({id:0,type:"full",data:a.data});return a.resultId&&r.releaseDocumentSemanticTokens(a.resultId),l})))),Cy.registerCommand("_provideDocumentRangeSemanticTokensLegend",((e,...t)=>Ej(void 0,void 0,void 0,(function*(){const[i,n]=t;Js(i instanceof Ps);const o=e.get(Gv).getModel(i);if(!o)return;const{documentRangeSemanticTokensProvider:s}=e.get(Lb),r=Pj(s,o);if(0===r.length)return;if(1===r.length)return r[0].getLegend();if(!n||!qo.isIRange(n))return r[0].getLegend();const a=yield Fj(s,o,qo.lift(n),Ia.None);return a?a.provider.getLegend():void 0})))),Cy.registerCommand("_provideDocumentRangeSemanticTokens",((e,...t)=>Ej(void 0,void 0,void 0,(function*(){const[i,n]=t;Js(i instanceof Ps),Js(qo.isIRange(n));const o=e.get(Gv).getModel(i);if(!o)return;const{documentRangeSemanticTokensProvider:s}=e.get(Lb),r=yield Fj(s,o,qo.lift(n),Ia.None);return r&&r.tokens?Nj({id:0,type:"full",data:r.tokens.data}):void 0}))));var Bj=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Vj=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}};function Wj(e){return e.toString()}function zj(e){const t=new Ma,i=e.createSnapshot();let n;for(;n=i.read();)t.update(n);return t.digest()}class Hj{constructor(e,t,i){this._modelEventListeners=new ws,this.model=e,this._languageSelection=null,this._languageSelectionListener=null,this._modelEventListeners.add(e.onWillDispose((()=>t(e)))),this._modelEventListeners.add(e.onDidChangeLanguage((t=>i(e,t))))}_disposeLanguageSelection(){this._languageSelectionListener&&(this._languageSelectionListener.dispose(),this._languageSelectionListener=null)}dispose(){this._modelEventListeners.dispose(),this._disposeLanguageSelection()}setLanguage(e){this._disposeLanguageSelection(),this._languageSelection=e,this._languageSelectionListener=this._languageSelection.onDidChange((()=>this.model.setMode(e.languageId))),this.model.setMode(e.languageId)}}const jj=Vo||zo?1:2;class Uj{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 $j=class e extends Uo{constructor(e,t,i,n,o,s,r,a,l){super(),this._configurationService=e,this._resourcePropertiesService=t,this._themeService=i,this._logService=n,this._undoRedoService=o,this._languageService=s,this._languageConfigurationService=r,this._languageFeatureDebounceService=a,this._onModelAdded=this._register(new $o),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new $o),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new $o),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._semanticStyling=this._register(new Zj(this._themeService,this._languageService,this._logService)),this._register(this._configurationService.onDidChangeConfiguration((()=>this._updateModelOptions()))),this._updateModelOptions(),this._register(new Gj(this._semanticStyling,this,this._themeService,this._configurationService,this._languageFeatureDebounceService,l))}static _readModelOptions(e,t){var i;let n=ff.tabSize;if(e.editor&&void 0!==e.editor.tabSize){const t=parseInt(e.editor.tabSize,10);isNaN(t)||(n=t),n<1&&(n=1)}let o=n;if(e.editor&&void 0!==e.editor.indentSize&&"tabSize"!==e.editor.indentSize){const t=parseInt(e.editor.indentSize,10);isNaN(t)||(o=t),o<1&&(o=1)}let s=ff.insertSpaces;e.editor&&void 0!==e.editor.insertSpaces&&(s="false"!==e.editor.insertSpaces&&Boolean(e.editor.insertSpaces));let r=jj;const a=e.eol;"\r\n"===a?r=2:"\n"===a&&(r=1);let l=ff.trimAutoWhitespace;e.editor&&void 0!==e.editor.trimAutoWhitespace&&(l="false"!==e.editor.trimAutoWhitespace&&Boolean(e.editor.trimAutoWhitespace));let d=ff.detectIndentation;e.editor&&void 0!==e.editor.detectIndentation&&(d="false"!==e.editor.detectIndentation&&Boolean(e.editor.detectIndentation));let c=ff.largeFileOptimizations;e.editor&&void 0!==e.editor.largeFileOptimizations&&(c="false"!==e.editor.largeFileOptimizations&&Boolean(e.editor.largeFileOptimizations));let h=ff.bracketPairColorizationOptions;return(null===(i=e.editor)||void 0===i?void 0:i.bracketPairColorization)&&"object"==typeof e.editor.bracketPairColorization&&(h={enabled:!!e.editor.bracketPairColorization.enabled}),{isForSimpleWidget:t,tabSize:n,indentSize:o,insertSpaces:s,detectIndentation:d,defaultEOL:r,trimAutoWhitespace:l,largeFileOptimizations:c,bracketPairColorizationOptions:h}}_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===Xs||2===Xs?"\n":"\r\n"}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return"boolean"!=typeof e||e}getCreationOptions(t,i,n){let o=this._modelCreationOptionsByLanguageAndResource[t+i];if(!o){const s=this._configurationService.getValue("editor",{overrideIdentifier:t,resource:i}),r=this._getEOL(i,t);o=e._readModelOptions({editor:s,eol:r},n),this._modelCreationOptionsByLanguageAndResource[t+i]=o}return o}_updateModelOptions(){const t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const i=Object.keys(this._models);for(let n=0,o=i.length;ne){const t=[];for(this._disposedModels.forEach((e=>{e.sharesUndoRedoStack||t.push(e)})),t.sort(((e,t)=>e.time-t.time));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=new VP(e,t,o,i,this._undoRedoService,this._languageService,this._languageConfigurationService);if(i&&this._disposedModels.has(Wj(i))){const e=this._removeDisposedModel(i),t=this._undoRedoService.getElements(i),n=zj(s)===e.sha1;if(n||e.sharesUndoRedoStack){for(const e of t.past)_R(e)&&e.matchesResource(i)&&e.setModel(s);for(const e of t.future)_R(e)&&e.matchesResource(i)&&e.setModel(s);this._undoRedoService.setElementsValidFlag(i,!0,(e=>_R(e)&&e.matchesResource(i))),n&&(s._overwriteVersionId(e.versionId),s._overwriteAlternativeVersionId(e.alternativeVersionId),s._overwriteInitialUndoRedoSnapshot(e.initialUndoRedoSnapshot))}else null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}const r=Wj(s.uri);if(this._models[r])throw new Error("ModelService: Cannot add model because it already exists!");const a=new Hj(s,(e=>this._onWillDispose(e)),((e,t)=>this._onDidChangeLanguage(e,t)));return this._models[r]=a,a}createModel(e,t,i,n=!1){let o;return t?(o=this._createModelData(e,t.languageId,i,n),this.setMode(o.model,t)):o=this._createModelData(e,LA,i,n),this._onModelAdded.fire(o.model),o.model}setMode(e,t){if(!t)return;const i=this._models[Wj(e.uri)];i&&i.setLanguage(t)}getModels(){const e=[],t=Object.keys(this._models);for(let i=0,n=t.length;i0||e.future.length>0){for(const i of e.past)_R(i)&&i.matchesResource(t.uri)&&(s=!0,r+=i.heapSize(t.uri),i.setModel(t.uri));for(const i of e.future)_R(i)&&i.matchesResource(t.uri)&&(s=!0,r+=i.heapSize(t.uri),i.setModel(t.uri))}}const a=e.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;if(s)if(!o&&r>a){const e=n.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}else this._ensureDisposedModelsHeapSize(a-r),this._undoRedoService.setElementsValidFlag(t.uri,!1,(e=>_R(e)&&e.matchesResource(t.uri))),this._insertDisposedModel(new Uj(t.uri,n.model.getInitialUndoRedoSnapshot(),Date.now(),o,r,zj(t),t.getVersionId(),t.getAlternativeVersionId()));else if(!o){const e=n.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}delete this._models[i],n.dispose(),delete this._modelCreationOptionsByLanguageAndResource[t.getLanguageId()+t.uri],this._onModelRemoved.fire(t)}_onDidChangeLanguage(t,i){const n=i.oldLanguage,o=t.getLanguageId(),s=this.getCreationOptions(n,t.uri,t.isForSimpleWidget),r=this.getCreationOptions(o,t.uri,t.isForSimpleWidget);e._setModelOptionsForModel(t,r,s),this._onModelModeChanged.fire({model:t,oldLanguageId:n})}};$j.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20971520,$j=Bj([Vj(0,Cv),Vj(1,wb),Vj(2,Qy),Vj(3,Cb),Vj(4,NP),Vj(5,Lv),Vj(6,Rv),Vj(7,oW),Vj(8,Lb)],$j);const Kj="editor.semanticHighlighting";function qj(e,t,i){var n;const o=null===(n=i.getValue(Kj,{overrideIdentifier:e.getLanguageId(),resource:e.uri}))||void 0===n?void 0:n.enabled;return"boolean"==typeof o?o:t.getColorTheme().semanticHighlighting}let Gj=class extends Uo{constructor(e,t,i,n,o,s){super(),this._watchers=Object.create(null),this._semanticStyling=e;const r=e=>{this._watchers[e.uri.toString()]=new Xj(e,this._semanticStyling,i,o,s)},a=(e,t)=>{t.dispose(),delete this._watchers[e.uri.toString()]},l=()=>{for(let e of t.getModels()){const t=this._watchers[e.uri.toString()];qj(e,i,n)?t||r(e):t&&a(e,t)}};this._register(t.onModelAdded((e=>{qj(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(Kj)&&l()}))),this._register(i.onDidColorThemeChange(l))}};Gj=Bj([Vj(1,Gv),Vj(2,Qy),Vj(3,Cv),Vj(4,oW),Vj(5,Lb)],Gj);class Zj extends Uo{constructor(e,t,i){super(),this._themeService=e,this._languageService=t,this._logService=i,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange((()=>{this._caches=new WeakMap})))}get(e){return this._caches.has(e)||this._caches.set(e,new Sj(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}}class Yj{constructor(e,t,i){this.provider=e,this.resultId=t,this.data=i}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}let Xj=class e extends Uo{constructor(t,i,n,o,s){super(),this._isDisposed=!1,this._model=t,this._semanticStyling=i,this._provider=s.documentSemanticTokensProvider,this._debounceInformation=o.for(this._provider,"DocumentSemanticTokens",{min:e.REQUEST_MIN_DELAY,max:e.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new lb((()=>this._fetchDocumentSemanticTokensNow()),e.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._register(this._model.onDidChangeContent((()=>{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 r=()=>{bs(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const e of this._provider.all(t))"function"==typeof e.onDidChange&&this._documentProvidersChangeListeners.push(e.onDidChange((()=>this._fetchDocumentSemanticTokens.schedule(0))))};r(),this._register(this._provider.onDidChange((()=>{r(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._register(n.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),this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!Aj(this._provider,this._model))return void(this._currentDocumentResponse&&this._model.setSemanticTokens(null,!1));const e=new as,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,i=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,n=Oj(this._provider,this._model,t,i,e.token);this._currentDocumentRequestCancellationTokenSource=e;const o=[],s=this._model.onDidChangeContent((e=>{o.push(e)})),r=new ps(!1);n.then((e=>{if(this._debounceInformation.update(this._model,r.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,s.dispose(),e){const{provider:t,tokens:i}=e,n=this._semanticStyling.get(t);this._setDocumentSemanticTokens(t,i||null,n,o)}else this._setDocumentSemanticTokens(null,null,null,o)}),(e=>{e&&(Ea(e)||"string"==typeof e.message&&-1!==e.message.indexOf("busy"))||Jo(e),this._currentDocumentRequestCancellationTokenSource=null,s.dispose(),o.length>0&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))}))}static _copy(e,t,i,n,o){for(let s=0;s{o.length>0&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed)t&&i&&t.releaseDocumentSemanticTokens(i.resultId);else if(t&&n){if(!i)return this._model.setSemanticTokens(null,!0),void r();if(Tj(i)){if(!s)return void this._model.setSemanticTokens(null,!0);if(0===i.edits.length)i={resultId:i.resultId,data:s.data};else{let t=0;for(const e of i.edits)t+=(e.data?e.data.length:0)-e.deleteCount;const n=s.data,o=new Uint32Array(n.length+t);let r=n.length,a=o.length;for(let s=i.edits.length-1;s>=0;s--){const t=i.edits[s],l=r-(t.start+t.deleteCount);l>0&&(e._copy(n,r-l,o,a-l,l),a-=l),t.data&&(e._copy(t.data,0,o,a-t.data.length,t.data.length),a-=t.data.length),r=t.start}r>0&&e._copy(n,0,o,0,r),i={resultId:i.resultId,data:o}}}if(Ij(i)){this._currentDocumentResponse=new Yj(t,i.resultId,i.data);const e=kj(i,n,this._model.getLanguageId());if(o.length>0)for(const t of o)for(const i of e)for(const e of t.changes)i.applyEdit(e.range,e.text);this._model.setSemanticTokens(e,!0)}else this._model.setSemanticTokens(null,!0);r()}else this._model.setSemanticTokens(null,!1)}};Xj.REQUEST_MIN_DELAY=300,Xj.REQUEST_MAX_DELAY=2e3,Xj=Bj([Vj(2,Qy),Vj(3,oW),Vj(4,Lb)],Xj);const Qj=new RegExp(`(\\\\)?\\$\\((${Ys.iconNameExpression}(?:${Ys.iconModifierExpression})?)\\)`,"g");function Jj(e){const t=new Array;let i,n=0,o=0;for(;null!==(i=Qj.exec(e));){o=i.index||0,t.push(e.substring(n,o)),n=(i.index||0)+i[0].length;const[,s,r]=i;t.push(s?`$(${r})`:eU({id:r}))}return n{this._register(nC(this._element,e,(e=>{this.enabled?this._onDidClick.fire(e):HC(e)})))})),this._register(nC(this._element,zC.KEY_DOWN,(e=>{const t=new jw(e);let i=!1;this.enabled&&(t.equals(3)||t.equals(10))?(this._onDidClick.fire(e),i=!0):t.equals(9)&&(this._element.blur(),i=!0),i&&HC(t,!0)}))),this._register(nC(this._element,zC.MOUSE_OVER,(e=>{this._element.classList.contains("disabled")||this.setHoverBackground()}))),this._register(nC(this._element,zC.MOUSE_OUT,(e=>{this.applyStyles()}))),this.focusTracker=this._register(UC(this._element)),this._register(this.focusTracker.onDidFocus((()=>this.setHoverBackground()))),this._register(this.focusTracker.onDidBlur((()=>this.applyStyles()))),this.applyStyles()}get onDidClick(){return this._onDidClick.event}setHoverBackground(){let e;e=this.options.secondary?this.buttonSecondaryHoverBackground?this.buttonSecondaryHoverBackground.toString():null:this.buttonHoverBackground?this.buttonHoverBackground.toString():null,e&&(this._element.style.backgroundColor=e)}style(e){this.buttonForeground=e.buttonForeground,this.buttonBackground=e.buttonBackground,this.buttonHoverBackground=e.buttonHoverBackground,this.buttonSecondaryForeground=e.buttonSecondaryForeground,this.buttonSecondaryBackground=e.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=e.buttonSecondaryHoverBackground,this.buttonBorder=e.buttonBorder,this.applyStyles()}applyStyles(){if(this._element){let e,t;this.options.secondary?(t=this.buttonSecondaryForeground?this.buttonSecondaryForeground.toString():"",e=this.buttonSecondaryBackground?this.buttonSecondaryBackground.toString():""):(t=this.buttonForeground?this.buttonForeground.toString():"",e=this.buttonBackground?this.buttonBackground.toString():"");const i=this.buttonBorder?this.buttonBorder.toString():"";this._element.style.color=t,this._element.style.backgroundColor=e,this._element.style.borderWidth=i?"1px":"",this._element.style.borderStyle=i?"solid":"",this._element.style.borderColor=i}}get element(){return this._element}set label(e){this._element.classList.add("monaco-text-button"),this.options.supportIcons?KC(this._element,...Jj(e)):this._element.textContent=e,"string"==typeof this.options.title?this._element.title=this.options.title:this.options.title&&(this._element.title=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")}}const nU={badgeBackground:hS.fromHex("#4D4D4D"),badgeForeground:hS.fromHex("#FFFFFF")};class oU{constructor(e,t){this.count=0,this.options=t||Object.create(null),Ko(this.options,nU,!1),this.badgeBackground=this.options.badgeBackground,this.badgeForeground=this.options.badgeForeground,this.badgeBorder=this.options.badgeBorder,this.element=$C(e,YC(".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=Aa(this.countFormat,this.count),this.element.title=Aa(this.titleFormat,this.count),this.applyStyles()}style(e){this.badgeBackground=e.badgeBackground,this.badgeForeground=e.badgeForeground,this.badgeBorder=e.badgeBorder,this.applyStyles()}applyStyles(){if(this.element){const e=this.badgeBackground?this.badgeBackground.toString():"",t=this.badgeForeground?this.badgeForeground.toString():"",i=this.badgeBorder?this.badgeBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.element.style.borderWidth=i?"1px":"",this.element.style.borderStyle=i?"solid":"",this.element.style.borderColor=i}}}const sU="done",rU="active",aU="infinite",lU="infinite-long-running",dU="discrete",cU={progressBarBackground:hS.fromHex("#0E70C0")};class hU extends Uo{constructor(e,t){super(),this.options=t||Object.create(null),Ko(this.options,cU,!1),this.workedVal=0,this.progressBarBackground=this.options.progressBarBackground,this.showDelayedScheduler=this._register(new lb((()=>XC(this.element)),0)),this.longRunningScheduler=this._register(new lb((()=>this.infiniteLongRunning()),hU.LONG_RUNNING_INFINITE_THRESHOLD)),this.create(e)}create(e){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.element.appendChild(this.bit),this.applyStyles()}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(rU,aU,lU,dU),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel()}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(sU),this.element.classList.contains(aU)?(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(dU,sU,lU),this.element.classList.add(rU,aU),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(lU)}getContainer(){return this.element}style(e){this.progressBarBackground=e.progressBarBackground,this.applyStyles()}applyStyles(){if(this.bit){const e=this.progressBarBackground?this.progressBarBackground.toString():"";this.bit.style.backgroundColor=e}}}hU.LONG_RUNNING_INFINITE_THRESHOLD=1e4;class uU{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}const gU=new uU("id#");const pU={},mU=new uU("quick-input-button-icon-");function fU(e){if(!e)return;let t;const i=e.dark.toString();return pU[i]?t=pU[i]:(t=mU.nextId(),BC(`.${t}`,`background-image: ${ty(e.light||e.dark)}`),BC(`.vs-dark .${t}, .hc-black .${t}`,`background-image: ${ty(e.dark)}`),pU[i]=t),t}const _U={ctrlCmd:!1,alt:!1};var vU,bU;function wU(e,t={}){const i=CU(t);return xU(i,function(e,t){const i={type:1,children:[]};let n=0,o=i;const s=[],r=new yU(e);for(;!r.eos();){let e=r.next();const i="\\"===e&&0!==kU(r.peek(),t);if(i&&(e=r.next()),!i&&SU(e,t)&&e===r.peek()){r.advance(),2===o.type&&(o=s.pop());const i=kU(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}2===o.type&&(o=s.pop());return i}(e,!!t.renderCodeSegments),t.actionHandler,t.renderCodeSegments),i}function CU(e){const t=e.inline?"span":"div",i=document.createElement(t);return e.className&&(i.className=e.className),i}!function(e){e[e.Blur=1]="Blur",e[e.Gesture=2]="Gesture",e[e.Other=3]="Other"}(vU||(vU={})),function(e){e[e.NONE=0]="NONE",e[e.FIRST=1]="FIRST",e[e.SECOND=2]="SECOND",e[e.LAST=3]="LAST"}(bU||(bU={}));class yU{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 xU(e,t,i,n){let o;if(2===t.type)o=document.createTextNode(t.content||"");else if(3===t.type)o=document.createElement("b");else if(4===t.type)o=document.createElement("i");else if(7===t.type&&n)o=document.createElement("code");else if(5===t.type&&i){const e=document.createElement("a");i.disposables.add(sC(e,"click",(e=>{i.callback(String(t.index),e)}))),o=e}else 8===t.type?o=document.createElement("br"):1===t.type&&(o=e);o&&e!==o&&e.appendChild(o),o&&Array.isArray(t.children)&&t.children.forEach((e=>{xU(o,e,i,n)}))}function SU(e,t){return 0!==kU(e,t)}function kU(e,t){switch(e){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return t?7:0;default:return 0}}class DU{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 LU{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._currentPosition()!==this._elements.length-1?this._navigator.next():null}previous(){return 0!==this._currentPosition()?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();const e=this._elements;this._navigator=new DU(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}}const NU=YC,EU={inputBackground:hS.fromHex("#3C3C3C"),inputForeground:hS.fromHex("#CCCCCC"),inputValidationInfoBorder:hS.fromHex("#55AAFF"),inputValidationInfoBackground:hS.fromHex("#063B49"),inputValidationWarningBorder:hS.fromHex("#B89500"),inputValidationWarningBackground:hS.fromHex("#352A05"),inputValidationErrorBorder:hS.fromHex("#BE1100"),inputValidationErrorBackground:hS.fromHex("#5A1D1D")};class IU extends QI{constructor(e,t,i){var n;super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new $o),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new $o),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=i||Object.create(null),Ko(this.options,EU,!1),this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=null!==(n=this.options.tooltip)&&void 0!==n?n:this.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.inputBackground=this.options.inputBackground,this.inputForeground=this.options.inputForeground,this.inputBorder=this.options.inputBorder,this.inputValidationInfoBorder=this.options.inputValidationInfoBorder,this.inputValidationInfoBackground=this.options.inputValidationInfoBackground,this.inputValidationInfoForeground=this.options.inputValidationInfoForeground,this.inputValidationWarningBorder=this.options.inputValidationWarningBorder,this.inputValidationWarningBackground=this.options.inputValidationWarningBackground,this.inputValidationWarningForeground=this.options.inputValidationWarningForeground,this.inputValidationErrorBorder=this.options.inputValidationErrorBorder,this.inputValidationErrorBackground=this.options.inputValidationErrorBackground,this.inputValidationErrorForeground=this.options.inputValidationErrorForeground,this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=$C(e,NU(".monaco-inputbox.idle"));let o=this.options.flexibleHeight?"textarea":"input",s=$C(this.element,NU(".ibwrapper"));if(this.input=$C(s,NU(o+".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=$C(s,NU("div.mirror")),this.mirror.innerText=" ",this.scrollableElement=new pT(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),$C(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll((e=>this.input.scrollTop=e.scrollTop)));const t=this._register(new eB(document,"selectionchange")),i=ds.filter(t.event,(()=>{const e=document.getSelection();return(null==e?void 0:e.anchorNode)===s}));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.ignoreGesture(this.input),setTimeout((()=>this.updateMirror()),0),this.options.actions&&(this.actionbar=this._register(new vB(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.input.title=e}setAriaLabel(e){this.ariaLabel=e,e?this.input.setAttribute("aria-label",this.ariaLabel):this.input.removeAttribute("aria-label")}getAriaLabel(){return this.ariaLabel}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:LC(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return document.activeElement===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}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}get width(){return SC(this.input)}set width(e){if(this.options.flexibleHeight&&this.options.flexibleWidth){let t=0;if(this.mirror){t=(parseFloat(this.mirror.style.paddingLeft||"")||0)+(parseFloat(this.mirror.style.paddingRight||"")||0)}this.input.style.width=e-t+"px"}else this.input.style.width=e+"px";this.mirror&&(this.mirror.style.width=e+"px")}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){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=i.border?`1px solid ${i.border}`:"",(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())),null==e?void 0:e.type}stylesForType(e){switch(e){case 1:return{border:this.inputValidationInfoBorder,background:this.inputValidationInfoBackground,foreground:this.inputValidationInfoForeground};case 2:return{border:this.inputValidationWarningBorder,background:this.inputValidationWarningBackground,foreground:this.inputValidationWarningForeground};default:return{border:this.inputValidationErrorBorder,background:this.inputValidationErrorBackground,foreground:this.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,t,i=()=>e.style.width=SC(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:t=>{if(!this.message)return null;e=$C(t,NU(".monaco-inputbox-container")),i();const n={inline:!0,className:"monaco-inputbox-message"},o=this.message.formatContent?wU(this.message.content,n):function(e,t={}){const i=CU(t);return i.textContent=e,i}(this.message.content,n);o.classList.add(this.classForType(this.message.type));const s=this.stylesForType(this.message.type);return o.style.backgroundColor=s.background?s.background.toString():"",o.style.color=s.foreground?s.foreground.toString():"",o.style.border=s.border?`1px solid ${s.border}`:"",$C(e,o),null},onHide:()=>{this.state="closed"},layout:i}),t=3===this.message.type?mf(0,"Error: {0}",this.message.content):2===this.message.type?mf(0,"Warning: {0}",this.message.content):mf(0,"Info: {0}",this.message.content),dy(t),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=10===e.charCodeAt(e.length-1)?" ":"";(e+t).replace(/\u000c/g,"")?this.mirror.textContent=e+t:this.mirror.innerText=" ",this.layout()}style(e){this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){const e=this.inputBackground?this.inputBackground.toString():"",t=this.inputForeground?this.inputForeground.toString():"",i=this.inputBorder?this.inputBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.input.style.backgroundColor="inherit",this.input.style.color=t,this.element.style.borderWidth=i?"1px":"",this.element.style.borderStyle=i?"solid":"",this.element.style.borderColor=i}layout(){if(!this.mirror)return;const e=this.cachedContentHeight;this.cachedContentHeight=LC(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&&this.actionbar.dispose(),super.dispose()}}class TU extends IU{constructor(e,t,i){const n=mf(0,"for history"),o=` or ⇅ ${n}`,s=` (⇅ ${n})`;super(e,t,i),this.history=new LU(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&&document.activeElement!==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(){this.value&&this.value!==this.getCurrentValue()&&this.history.add(this.value)}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),e&&(this.value=e,cy(this.value))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,cy(this.value))}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()||this.history.last()}}const MU=YC;class AU extends Uo{constructor(e){super(),this.parent=e,this.onKeyDown=e=>nC(this.inputBox.inputElement,zC.KEY_DOWN,(t=>{e(new jw(t))})),this.onMouseDown=e=>nC(this.inputBox.inputElement,zC.MOUSE_DOWN,(t=>{e(new Gw(t))})),this.onDidChange=e=>this.inputBox.onDidChange(e),this.container=$C(this.parent,MU(".quick-input-box")),this.inputBox=this._register(new IU(this.container,void 0))}get value(){return this.inputBox.value}set value(e){this.inputBox.value=e}select(e=null){this.inputBox.select(e)}isSelectionAtEnd(){return this.inputBox.isSelectionAtEnd()}get placeholder(){return this.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.inputBox.setPlaceHolder(e)}get ariaLabel(){return this.inputBox.getAriaLabel()}set ariaLabel(e){this.inputBox.setAriaLabel(e)}get password(){return"password"===this.inputBox.inputElement.type}set password(e){this.inputBox.inputElement.type=e?"password":"text"}setAttribute(e,t){this.inputBox.inputElement.setAttribute(e,t)}removeAttribute(e){this.inputBox.inputElement.removeAttribute(e)}showDecoration(e){e===fF.Ignore?this.inputBox.hideMessage():this.inputBox.showMessage({type:e===fF.Info?1:e===fF.Warning?2:3,content:""})}stylesForType(e){return this.inputBox.stylesForType(e===fF.Info?1:e===fF.Warning?2:3)}setFocus(){this.inputBox.focus()}layout(){this.inputBox.layout()}style(e){this.inputBox.style(e)}}class OU{constructor(e,t){var i;this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.supportIcons=null!==(i=null==t?void 0:t.supportIcons)&&void 0!==i&&i,this.domNode=$C(e,YC("span.monaco-highlighted-label"))}get element(){return this.domNode}set(e,t=[],i="",n){e||(e=""),n&&(e=OU.escapeNewLines(e,t)),this.didEverRender&&this.text===e&&this.title===i&&Ho(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,"⏎"}))}}class RU{constructor(e="",t=!1){var i,n,o;if(this.value=e,"string"!=typeof this.value)throw Ms("value");"boolean"==typeof t?(this.isTrusted=t,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=null!==(i=t.isTrusted)&&void 0!==i?i:void 0,this.supportThemeIcons=null!==(n=t.supportThemeIcons)&&void 0!==n&&n,this.supportHtml=null!==(o=t.supportHtml)&&void 0!==o&&o)}appendText(e,t=0){return this.value+=function(e){return e.replace(/[\\`*_{}[\]()#+\-!]/g,"\\$&")}(this.supportThemeIcons?function(e){return e.replace(IH,((e,t)=>t?e:`\\${e}`))}(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```",this.value+=e,this.value+="\n",this.value+=t,this.value+="\n```\n",this}}function PU(e){return FU(e)?!e.value:!Array.isArray(e)||e.every(PU)}function FU(e){return e instanceof RU||!(!e||"object"!=typeof e)&&!("string"!=typeof e.value||"boolean"!=typeof e.isTrusted&&void 0!==e.isTrusted||"boolean"!=typeof e.supportThemeIcons&&void 0!==e.supportThemeIcons)}function BU(e){return e?e.replace(/\\([\\`*_{}[\]()#+\-.!])/g,"$1"):e}var VU=globalThis&&globalThis.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,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){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class WU{constructor(e,t,i){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=i}update(e,t){var i;return VU(this,void 0,void 0,(function*(){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let n;if(void 0===e||Gs(e)||e instanceof HTMLElement)n=e;else if(ua(e.markdown)){this._hoverWidget||this.show(mf(0,"Loading..."),t),this._cancellationTokenSource=new as;const i=this._cancellationTokenSource.token;if(n=yield e.markdown(i),void 0===n&&(n=e.markdownNotSupportedFallback),this.isDisposed||i.isCancellationRequested)return}else n=null!==(i=e.markdown)&&void 0!==i?i:e.markdownNotSupportedFallback;this.show(n,t)}))}show(e,t){const i=this._hoverWidget;if(this.hasContent(e)){const n={content:e,target:this.target,showPointer:"element"===this.hoverDelegate.placement,hoverPosition:2,skipFadeInAnimation:!this.fadeInAnimation||!!i};this._hoverWidget=this.hoverDelegate.showHover(n,t)}null==i||i.dispose()}hasContent(e){return!!e&&(!FU(e)||!!e.value)}get isDisposed(){var e;return null===(e=this._hoverWidget)||void 0===e?void 0:e.isDisposed}dispose(){var e,t;null===(e=this._hoverWidget)||void 0===e||e.dispose(),null===(t=this._cancellationTokenSource)||void 0===t||t.dispose(!0),this._cancellationTokenSource=void 0}}class zU{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 className(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class HU extends Uo{constructor(e,t){super(),this.customHovers=new Map,this.domNode=this._register(new zU($C(e,YC(".monaco-icon-label")))),this.labelContainer=$C(this.domNode.element,YC(".monaco-icon-label-container"));const i=$C(this.labelContainer,YC("span.monaco-icon-name-container"));this.descriptionContainer=this._register(new zU($C(this.labelContainer,YC("span.monaco-icon-description-container")))),(null==t?void 0:t.supportHighlights)||(null==t?void 0:t.supportIcons)?this.nameNode=new UU(i,!!t.supportIcons):this.nameNode=new jU(i),(null==t?void 0:t.supportDescriptionHighlights)?this.descriptionNodeFactory=()=>new OU($C(this.descriptionContainer.element,YC("span.label-description")),{supportIcons:!!t.supportIcons}):this.descriptionNodeFactory=()=>this._register(new zU($C(this.descriptionContainer.element,YC("span.label-description")))),this.hoverDelegate=null==t?void 0:t.hoverDelegate}get element(){return this.domNode.element}setLabel(e,t,i){const n=["monaco-icon-label"];i&&(i.extraClasses&&n.push(...i.extraClasses),i.italic&&n.push("italic"),i.strikethrough&&n.push("strikethrough")),this.domNode.className=n.join(" "),this.setupHover((null==i?void 0:i.descriptionTitle)?this.labelContainer:this.element,null==i?void 0:i.title),this.nameNode.setLabel(e,i),(t||this.descriptionNode)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof OU?(this.descriptionNode.set(t||"",i?i.descriptionMatches:void 0),this.setupHover(this.descriptionNode.element,null==i?void 0:i.descriptionTitle)):(this.descriptionNode.textContent=t||"",this.setupHover(this.descriptionNode.element,(null==i?void 0:i.descriptionTitle)||""),this.descriptionNode.empty=!t))}setupHover(e,t){const i=this.customHovers.get(e);if(i&&(i.dispose(),this.customHovers.delete(e)),t)if(this.hoverDelegate){const i=function(e,t,i){let n,o;const s=(t,i)=>{var s;t&&(null==o||o.dispose(),o=void 0),i&&(null==n||n.dispose(),n=void 0),null===(s=e.onDidHideHover)||void 0===s||s.call(e)},r=(n,s,r)=>new rb((()=>VU(this,void 0,void 0,(function*(){o&&!o.isDisposed||(o=new WU(e,r||t,n>0),yield o.update(i,s))}))),n),a=nC(t,zC.MOUSE_OVER,(()=>{if(n)return;const i=new ws;i.add(nC(t,zC.MOUSE_LEAVE,(e=>s(!1,e.fromElement===t)),!0)),i.add(nC(t,zC.MOUSE_DOWN,(()=>s(!0,!0)),!0));const o={targetElements:[t],dispose:()=>{}};if(void 0===e.placement||"mouse"===e.placement){const e=e=>o.x=e.x+10;i.add(nC(t,zC.MOUSE_MOVE,e,!0))}i.add(r(e.delay,!1,o)),n=i}),!0);return{show:e=>{s(!1,!0),r(0,e)},hide:()=>{s(!0,!0)},update:e=>VU(this,void 0,void 0,(function*(){i=e,yield null==o?void 0:o.update(i)})),dispose:()=>{a.dispose(),s(!0,!0)}}}(this.hoverDelegate,e,t);i&&this.customHovers.set(e,i)}else!function(e,t){Gs(t)?e.title=AH(t):(null==t?void 0:t.markdownNotSupportedFallback)?e.title=t.markdownNotSupportedFallback:e.removeAttribute("title")}(e,t);else e.removeAttribute("title")}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}}class jU{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(this.label!==e||!Ho(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=$C(this.container,YC("a.label-name",{id:null==t?void 0: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=>QW.intersect(o,e))).filter((e=>!QW.isEmpty(e))).map((({start:e,end:t})=>({start:e-n,end:t-n})));return n=o.end+t.length,s}))}(e,i,null==t?void 0:t.matches);for(let o=0;o{const e=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:e,collatorIsNumeric:e.resolvedOptions().numeric}}));function GU(e,t,i){const n=e.toLowerCase(),o=t.toLowerCase(),s=function(e,t,i){const n=e.toLowerCase(),o=t.toLowerCase(),s=n.startsWith(i),r=o.startsWith(i);if(s!==r)return s?-1:1;if(s&&r){if(n.lengtho.length)return 1}return 0}(e,t,i);if(s)return s;const r=n.endsWith(i);if(r!==o.endsWith(i))return r?-1:1;const a=function(e,t,i=!1){const n=e||"",o=t||"",s=qU.value.collator.compare(n,o);return qU.value.collatorIsNumeric&&0===s&&n!==o?n({collator:new Intl.Collator(void 0,{numeric:!0})}))),new cb((()=>({collator:new Intl.Collator(void 0,{numeric:!0,sensitivity:"accent"})})));var ZU=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},YU=globalThis&&globalThis.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,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){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const XU=YC;class QU{constructor(e){this.hidden=!1,this._onChecked=new $o,this.onChecked=this._onChecked.event,Object.assign(this,e)}get checked(){return!!this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire(e))}dispose(){this._onChecked.dispose()}}class JU{get templateId(){return JU.ID}renderTemplate(e){const t=Object.create(null);t.toDisposeElement=[],t.toDisposeTemplate=[],t.entry=$C(e,XU(".quick-input-list-entry"));const i=$C(t.entry,XU("label.quick-input-list-label"));t.toDisposeTemplate.push(sC(i,zC.CLICK,(e=>{t.checkbox.offsetParent||e.preventDefault()}))),t.checkbox=$C(i,XU("input.quick-input-list-checkbox")),t.checkbox.type="checkbox",t.toDisposeTemplate.push(sC(t.checkbox,zC.CHANGE,(e=>{t.element.checked=t.checkbox.checked})));const n=$C(i,XU(".quick-input-list-rows")),o=$C(n,XU(".quick-input-list-row")),s=$C(n,XU(".quick-input-list-row"));t.label=new HU(o,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0});const r=$C(o,XU(".quick-input-list-entry-keybinding"));t.keybinding=new KU(r,Xs);const a=$C(s,XU(".quick-input-list-label-meta"));return t.detail=new HU(a,{supportHighlights:!0,supportIcons:!0}),t.separator=$C(t.entry,XU(".quick-input-list-separator")),t.actionBar=new vB(t.entry),t.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.push(t.actionBar),t}renderElement(e,t,i){i.toDisposeElement=bs(i.toDisposeElement),i.element=e,i.checkbox.checked=e.checked,i.toDisposeElement.push(e.onChecked((e=>i.checkbox.checked=e)));const{labelHighlights:n,descriptionHighlights:o,detailHighlights:s}=e,r=Object.create(null);r.matches=n||[],r.descriptionTitle=e.saneDescription,r.descriptionMatches=o||[],r.extraClasses=e.item.iconClasses,r.italic=e.item.italic,r.strikethrough=e.item.strikethrough,i.label.setLabel(e.saneLabel,e.saneDescription,r),i.keybinding.set(e.item.keybinding),e.saneDetail&&i.detail.setLabel(e.saneDetail,void 0,{matches:s,title:e.saneDetail}),e.separator&&e.separator.label?(i.separator.textContent=e.separator.label,i.separator.style.display=""):i.separator.style.display="none",i.entry.classList.toggle("quick-input-list-separator-border",!!e.separator),i.actionBar.clear();const a=e.item.buttons;a&&a.length?(i.actionBar.push(a.map(((t,i)=>{let n=t.iconClass||(t.iconPath?fU(t.iconPath):void 0);t.alwaysVisible&&(n=n?`${n} always-visible`:"always-visible");const o=new my(`id-${i}`,"",n,!0,(()=>YU(this,void 0,void 0,(function*(){e.fireButtonTriggered({button:t,item:e.item})}))));return o.tooltip=t.tooltip||"",o})),{icon:!0,label:!1}),i.entry.classList.add("has-actions")):i.entry.classList.remove("has-actions")}disposeElement(e,t,i){i.toDisposeElement=bs(i.toDisposeElement)}disposeTemplate(e){e.toDisposeElement=bs(e.toDisposeElement),e.toDisposeTemplate=bs(e.toDisposeTemplate)}}JU.ID="listelement";class e${getHeight(e){return e.saneDetail?44:22}getTemplateId(e){return JU.ID}}var t$;!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"}(t$||(t$={}));class i${constructor(e,t,i){this.parent=e,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.matchOnMeta=!0,this.sortByLabel=!0,this._onChangedAllVisibleChecked=new $o,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new $o,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new $o,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new $o,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new $o,this.onButtonTriggered=this._onButtonTriggered.event,this._onKeyDown=new $o,this.onKeyDown=this._onKeyDown.event,this._onLeave=new $o,this.onLeave=this._onLeave.event,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=t,this.container=$C(this.parent,XU(".quick-input-list"));const n=new e$,o=new n$;this.list=i.createList("QuickInput",this.container,n,[new JU],{identityProvider:{getId:e=>e.saneLabel},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:o}),this.list.getHTMLElement().id=t,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown((e=>{const t=new jw(e);switch(t.keyCode){case 10:this.toggleCheckbox();break;case 31:(zo?e.metaKey:e.ctrlKey)&&this.list.setFocus(Oa(this.list.length));break;case 16:{const e=this.list.getFocus();1===e.length&&0===e[0]&&this._onLeave.fire();break}case 18:{const e=this.list.getFocus();1===e.length&&e[0]===this.list.length-1&&this._onLeave.fire();break}}this._onKeyDown.fire(t)}))),this.disposables.push(this.list.onMouseDown((e=>{2!==e.browserEvent.button&&e.browserEvent.preventDefault()}))),this.disposables.push(nC(this.container,zC.CLICK,(e=>{(e.x||e.y)&&this._onLeave.fire()}))),this.disposables.push(this.list.onMouseMiddleClick((e=>{this._onLeave.fire()}))),this.disposables.push(this.list.onContextMenu((e=>{"number"==typeof e.index&&(e.browserEvent.preventDefault(),this.list.setSelection([e.index]))}))),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return ds.map(this.list.onDidChangeFocus,(e=>e.elements.map((e=>e.item))))}get onDidChangeSelection(){return ds.map(this.list.onDidChangeSelection,(e=>({items:e.elements.map((e=>e.item)),event:e.browserEvent})))}get scrollTop(){return this.list.scrollTop}set scrollTop(e){this.list.scrollTop=e}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(e,t=!0){for(let i=0,n=e.length;i{t.hidden||(t.checked=e)}))}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(e){this.elementDisposables=bs(this.elementDisposables);const t=e=>this.fireButtonTriggered(e);this.inputElements=e,this.elements=e.reduce(((i,n,o)=>{var s,r,a;if("separator"!==n.type){const l=o&&e[o-1],d=n.label&&n.label.replace(/\r?\n/g," "),c=n.meta&&n.meta.replace(/\r?\n/g," "),h=n.description&&n.description.replace(/\r?\n/g," "),u=n.detail&&n.detail.replace(/\r?\n/g," "),g=n.ariaLabel||[d,h,u].map((e=>Ra(e))).filter((e=>!!e)).join(", "),p=this.parent.classList.contains("show-checkboxes");i.push(new QU({hasCheckbox:p,index:o,item:n,saneLabel:d,saneMeta:c,saneAriaLabel:g,saneDescription:h,saneDetail:u,labelHighlights:null===(s=n.highlights)||void 0===s?void 0:s.label,descriptionHighlights:null===(r=n.highlights)||void 0===r?void 0:r.description,detailHighlights:null===(a=n.highlights)||void 0===a?void 0:a.detail,checked:!1,separator:l&&"separator"===l.type?l:void 0,fireButtonTriggered:t}))}return i}),[]),this.elementDisposables.push(...this.elements),this.elementDisposables.push(...this.elements.map((e=>e.onChecked((()=>this.fireCheckedEvents()))))),this.elementsToIndexes=this.elements.reduce(((e,t,i)=>(e.set(t.item,i),e)),new Map),this.list.splice(0,this.list.length),this.list.splice(0,this.list.length,this.elements),this._onChangedVisibleCount.fire(this.elements.length)}getFocusedElements(){return this.list.getFocusedElements().map((e=>e.item))}setFocusedElements(e){if(this.list.setFocus(e.filter((e=>this.elementsToIndexes.has(e))).map((e=>this.elementsToIndexes.get(e)))),e.length>0){const e=this.list.getFocus()[0];"number"==typeof e&&this.list.reveal(e)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){this.list.setSelection(e.filter((e=>this.elementsToIndexes.has(e))).map((e=>this.elementsToIndexes.get(e))))}getCheckedElements(){return this.elements.filter((e=>e.checked)).map((e=>e.item))}setCheckedElements(e){try{this._fireCheckedEvents=!1;const t=new Set;for(const i of e)t.add(i);for(const e of this.elements)e.checked=t.has(e.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(e){this.list.getHTMLElement().style.pointerEvents=e?"":"none"}focus(e){if(!this.list.length)return;switch(e===t$.Next&&this.list.getFocus()[0]===this.list.length-1&&(e=t$.First),e===t$.Previous&&0===this.list.getFocus()[0]&&(e=t$.Last),e===t$.Second&&this.list.length<2&&(e=t$.First),e){case t$.First:this.list.focusFirst();break;case t$.Second:this.list.focusNth(1);break;case t$.Last:this.list.focusLast();break;case t$.Next:this.list.focusNext();break;case t$.Previous:this.list.focusPrevious();break;case t$.NextPage:this.list.focusNextPage();break;case t$.PreviousPage:this.list.focusPreviousPage()}const t=this.list.getFocus()[0];"number"==typeof t&&this.list.reveal(t)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}layout(e){this.list.getHTMLElement().style.maxHeight=e?`calc(${44*Math.floor(e/44)}px)`:"",this.list.layout()}filter(e){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;if((e=e.trim())&&(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail)){let t;this.elements.forEach((i=>{const n=this.matchOnLabel?Qs(RH(e,OH(i.saneLabel))):void 0,o=this.matchOnDescription?Qs(RH(e,OH(i.saneDescription||""))):void 0,s=this.matchOnDetail?Qs(RH(e,OH(i.saneDetail||""))):void 0,r=this.matchOnMeta?Qs(RH(e,OH(i.saneMeta||""))):void 0;if(n||o||s||r?(i.labelHighlights=n,i.descriptionHighlights=o,i.detailHighlights=s,i.hidden=!1):(i.labelHighlights=void 0,i.descriptionHighlights=void 0,i.detailHighlights=void 0,i.hidden=!i.item.alwaysShow),i.separator=void 0,!this.sortByLabel){const e=i.index&&this.inputElements[i.index-1];t=e&&"separator"===e.type?e:t,t&&!i.hidden&&(i.separator=t,t=void 0)}}))}else this.elements.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.separator=t&&"separator"===t.type?t:void 0}));const t=this.elements.filter((e=>!e.hidden));if(this.sortByLabel&&e){const i=e.toLowerCase();t.sort(((e,t)=>function(e,t,i){const n=e.labelHighlights||[],o=t.labelHighlights||[];if(n.length&&!o.length)return-1;if(!n.length&&o.length)return 1;if(0===n.length&&0===o.length)return 0;return GU(e.saneLabel,t.saneLabel,i)}(e,t,i)))}return this.elementsToIndexes=t.reduce(((e,t,i)=>(e.set(t.item,i),e)),new Map),this.list.splice(0,this.list.length,t),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(t.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const e=this.list.getFocusedElements(),t=this.allVisibleChecked(e);for(const i of e)i.checked=!t}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(e){this.container.style.display=e?"":"none"}isDisplayed(){return"none"!==this.container.style.display}dispose(){this.elementDisposables=bs(this.elementDisposables),this.disposables=bs(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(e){this._onButtonTriggered.fire(e)}style(e){this.list.style(e)}}ZU([tS],i$.prototype,"onDidChangeFocus",null),ZU([tS],i$.prototype,"onDidChangeSelection",null);class n${getWidgetAriaLabel(){return mf(0,"Quick Input")}getAriaLabel(e){return e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(e){return e.hasCheckbox?"checkbox":"option"}isChecked(e){if(e.hasCheckbox)return{value:e.checked,onDidChange:e.onChecked}}}var o$=globalThis&&globalThis.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,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){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const s$=YC,r$={iconClass:br.quickInputBack.classNames,tooltip:mf(0,"Back"),handle:-1};class a$ extends Uo{constructor(e){super(),this.ui=e,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.noValidationMessage=a$.noPromptMessage,this._severity=fF.Ignore,this.buttonsUpdated=!1,this.onDidTriggerButtonEmitter=this._register(new $o),this.onDidHideEmitter=this._register(new $o),this.onDisposeEmitter=this._register(new $o),this.visibleDisposables=this._register(new ws),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&&!Vs;this._ignoreFocusOut=e&&!Vs,t&&this.update()}get buttons(){return this._buttons}set buttons(e){this._buttons=e,this.buttonsUpdated=!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.update())}hide(){this.visible&&this.ui.hide()}didHide(e=vU.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.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.busy&&!this.busyDelay&&(this.busyDelay=new rb,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.buttons.filter((e=>e===r$));this.ui.leftActionBar.push(e.map(((e,t)=>{const i=new my(`id-${t}`,"",e.iconClass||fU(e.iconPath),!0,(()=>o$(this,void 0,void 0,(function*(){this.onDidTriggerButtonEmitter.fire(e)}))));return i.tooltip=e.tooltip||"",i})),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const t=this.buttons.filter((e=>e!==r$));this.ui.rightActionBar.push(t.map(((e,t)=>{const i=new my(`id-${t}`,"",e.iconClass||fU(e.iconPath),!0,(()=>o$(this,void 0,void 0,(function*(){this.onDidTriggerButtonEmitter.fire(e)}))));return i.tooltip=e.tooltip||"",i})),{icon:!0,label:!1})}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,KC(this.ui.message,...Jj(i))),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?mf(0,"{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==fF.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()}}a$.noPromptMessage=mf(0,"Press 'Enter' to confirm your input or 'Escape' to cancel");class l$ extends a${constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new $o),this.onWillAcceptEmitter=this._register(new $o),this.onDidAcceptEmitter=this._register(new $o),this.onDidCustomEmitter=this._register(new $o),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._sortByLabel=!0,this._autoFocusOnList=!0,this._keepScrollPosition=!1,this._itemActivation=this.ui.isScreenReaderOptimized()?bU.NONE:bU.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new $o),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new $o),this.onDidTriggerItemButtonEmitter=this._register(new $o),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,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}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){this.ui.list.filter(this.filterValue(this._value))&&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 sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get autoFocusOnList(){return this._autoFocusOnList}set autoFocusOnList(e){this._autoFocusOnList=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?_U:this.ui.keyMods}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.autoFocusOnList&&(this.canSelectMany||this.ui.list.focus(t$.First))}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange((e=>{this.doSetValue(e,!0)}))),this.visibleDisposables.add(this.ui.inputBox.onMouseDown((e=>{this.autoFocusOnList||this.ui.list.clearFocus()}))),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown((e=>{switch(e.keyCode){case 18:this.ui.list.focus(t$.Next),this.canSelectMany&&this.ui.list.domFocus(),HC(e,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(t$.Previous):this.ui.list.focus(t$.Last),this.canSelectMany&&this.ui.list.domFocus(),HC(e,!0);break;case 12:this.ui.list.focus(t$.NextPage),this.canSelectMany&&this.ui.list.domFocus(),HC(e,!0);break;case 11:this.ui.list.focus(t$.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),HC(e,!0);break;case 17:if(!this._canAcceptInBackground)return;if(!this.ui.inputBox.isSelectionAtEnd())return;this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!0));break;case 14:!e.ctrlKey&&!e.metaKey||e.shiftKey||e.altKey||(this.ui.list.focus(t$.First),HC(e,!0));break;case 13:!e.ctrlKey&&!e.metaKey||e.shiftKey||e.altKey||(this.ui.list.focus(t$.Last),HC(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.ui.list.onDidChangeFocus((e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&jo(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&&jo(e,this._selectedItems,((e,t)=>e===t))||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(t instanceof MouseEvent&&1===t.button))}))),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements((e=>{this.canSelectMany&&(this.selectedItemsToConfirm!==this._selectedItems&&jo(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.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 nC(this.ui.container,zC.KEY_UP,(e=>{if(this.canSelectMany||!this._quickNavigate)return;const t=new jw(e),i=t.keyCode;this._quickNavigate.keybindings.some((e=>{const[n,o]=e.getParts();return!o&&(n.shiftKey&&4===i?!(t.ctrlKey||t.altKey||t.metaKey):!(!n.altKey||6!==i)||(!(!n.ctrlKey||5!==i)||!(!n.metaKey||57!==i)))}))&&(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._hideInput&&this._items.length>0;this.ui.container.classList.toggle("hidden-input",t&&!this.description);const i={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!t,progressBar:!t,visibleCount:!0,count:this.canSelectMany,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||"");const n=this.ariaLabel||this.placeholder||l$.DEFAULT_ARIA_LABEL;if(this.ui.inputBox.ariaLabel!==n&&(this.ui.inputBox.ariaLabel=n),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated)switch(this.itemsUpdated=!1,this.ui.list.setElements(this.items),this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this.ui.checkAll.checked=this.ui.list.getAllVisibleChecked(),this.ui.visibleCount.setCount(this.ui.list.getVisibleCount()),this.ui.count.setCount(this.ui.list.getCheckedCount()),this._itemActivation){case bU.NONE:this._itemActivation=bU.FIRST;break;case bU.SECOND:this.ui.list.focus(t$.Second),this._itemActivation=bU.FIRST;break;case bU.LAST:this.ui.list.focus(t$.Last),this._itemActivation=bU.FIRST;break;default:this.trySelectFirst()}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||"",this.ui.setComboboxAccessibility(!0),i.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(t$.First)),this.keepScrollPosition&&(this.scrollTop=e)}}l$.DEFAULT_ARIA_LABEL=mf(0,"Type to narrow down results.");class d$ extends Uo{constructor(e){super(),this.options=e,this.comboboxAccessibility=!1,this.enabled=!0,this.onDidAcceptEmitter=this._register(new $o),this.onDidCustomEmitter=this._register(new $o),this.onDidTriggerButtonEmitter=this._register(new $o),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new $o),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new $o),this.onHide=this.onHideEmitter.event,this.idPrefix=e.idPrefix,this.parentElement=e.container,this.styles=e.styles,this.registerKeyModsListeners()}registerKeyModsListeners(){const e=e=>{this.keyMods.ctrlCmd=e.ctrlKey||e.metaKey,this.keyMods.alt=e.altKey};this._register(nC(window,zC.KEY_DOWN,e,!0)),this._register(nC(window,zC.KEY_UP,e,!0)),this._register(nC(window,zC.MOUSE_DOWN,e,!0))}getUI(){if(this.ui)return this.ui;const e=$C(this.parentElement,s$(".quick-input-widget.show-file-icons"));e.tabIndex=-1,e.style.display="none";const t=RC(e),i=$C(e,s$(".quick-input-titlebar")),n=this._register(new vB(i));n.domNode.classList.add("quick-input-left-action-bar");const o=$C(i,s$(".quick-input-title")),s=this._register(new vB(i));s.domNode.classList.add("quick-input-right-action-bar");const r=$C(e,s$(".quick-input-description")),a=$C(e,s$(".quick-input-header")),l=$C(a,s$("input.quick-input-check-all"));l.type="checkbox",this._register(sC(l,zC.CHANGE,(e=>{const t=l.checked;y.setAllVisibleChecked(t)}))),this._register(nC(l,zC.CLICK,(e=>{(e.x||e.y)&&u.setFocus()})));const d=$C(a,s$(".quick-input-description")),c=$C(a,s$(".quick-input-and-message")),h=$C(c,s$(".quick-input-filter")),u=this._register(new AU(h));u.setAttribute("aria-describedby",`${this.idPrefix}message`);const g=$C(h,s$(".quick-input-visible-count"));g.setAttribute("aria-live","polite"),g.setAttribute("aria-atomic","true");const p=new oU(g,{countFormat:mf(0,"{0} Results")}),m=$C(h,s$(".quick-input-count"));m.setAttribute("aria-live","polite");const f=new oU(m,{countFormat:mf(0,"{0} Selected")}),_=$C(a,s$(".quick-input-action")),v=new iU(_);v.label=mf(0,"OK"),this._register(v.onDidClick((e=>{this.onDidAcceptEmitter.fire()})));const b=$C(a,s$(".quick-input-action")),w=new iU(b);w.label=mf(0,"Custom"),this._register(w.onDidClick((e=>{this.onDidCustomEmitter.fire()})));const C=$C(c,s$(`#${this.idPrefix}message.quick-input-message`)),y=this._register(new i$(e,this.idPrefix+"list",this.options));this._register(y.onChangedAllVisibleChecked((e=>{l.checked=e}))),this._register(y.onChangedVisibleCount((e=>{p.setCount(e)}))),this._register(y.onChangedCheckedCount((e=>{f.setCount(e)}))),this._register(y.onLeave((()=>{setTimeout((()=>{u.setFocus(),this.controller instanceof l$&&this.controller.canSelectMany&&y.clearFocus()}),0)}))),this._register(y.onDidChangeFocus((()=>{this.comboboxAccessibility&&this.getUI().inputBox.setAttribute("aria-activedescendant",this.getUI().list.getActiveDescendant()||"")})));const x=new hU(e);x.getContainer().classList.add("quick-input-progress");const S=UC(e);return this._register(S),this._register(nC(e,zC.FOCUS,(e=>{this.previousFocusElement=e.relatedTarget instanceof HTMLElement?e.relatedTarget:void 0}),!0)),this._register(S.onDidBlur((()=>{this.getUI().ignoreFocusOut||this.options.ignoreFocusOut()||this.hide(vU.Blur),this.previousFocusElement=void 0}))),this._register(nC(e,zC.FOCUS,(e=>{u.setFocus()}))),this._register(nC(e,zC.KEY_DOWN,(t=>{const i=new jw(t);switch(i.keyCode){case 3:HC(t,!0),this.onDidAcceptEmitter.fire();break;case 9:HC(t,!0),this.hide(vU.Gesture);break;case 2:if(!i.altKey&&!i.ctrlKey&&!i.metaKey){const n=[".action-label.codicon"];e.classList.contains("show-checkboxes")?n.push("input"):n.push("input[type=text]"),this.getUI().list.isDisplayed()&&n.push(".monaco-list");const o=e.querySelectorAll(n.join(", "));i.shiftKey&&i.target===o[0]?(HC(t,!0),o[o.length-1].focus()):i.shiftKey||i.target!==o[o.length-1]||(HC(t,!0),o[0].focus())}}}))),this.ui={container:e,styleSheet:t,leftActionBar:n,titleBar:i,title:o,description1:r,description2:d,rightActionBar:s,checkAll:l,filterContainer:h,inputBox:u,visibleCountContainer:g,visibleCount:p,countContainer:m,count:f,okContainer:_,ok:v,message:C,customButtonContainer:b,customButton:w,list:y,progressBar:x,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,isScreenReaderOptimized:()=>this.options.isScreenReaderOptimized(),show:e=>this.show(e),hide:()=>this.hide(),setVisibilities:e=>this.setVisibilities(e),setComboboxAccessibility:e=>this.setComboboxAccessibility(e),setEnabled:e=>this.setEnabled(e),setContextKey:e=>this.options.setContextKey(e)},this.updateStyles(),this.ui}pick(e,t={},i=Ia.None){return new Promise(((n,o)=>{let s=e=>{s=n,t.onKeyMods&&t.onKeyMods(r.keyMods),n(e)};if(i.isCancellationRequested)return void s(void 0);const r=this.createQuickPick();let a;const l=[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(Object.assign(Object.assign({},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.onDidChangeValue((e=>{!a||e||1===r.activeItems.length&&r.activeItems[0]===a||(r.activeItems=[a])})),i.onCancellationRequested((()=>{r.hide()})),r.onDidHide((()=>{bs(l),s(void 0)}))];r.title=t.title,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.autoFocusOnList=void 0===t.autoFocusOnList||t.autoFocusOnList,r.quickNavigate=t.quickNavigate,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(){const e=this.getUI();return new l$(e)}show(e){const t=this.getUI();this.onShowEmitter.fire();const i=this.controller;this.controller=e,i&&i.didHide(),this.setEnabled(!0),t.leftActionBar.clear(),t.title.textContent="",t.description1.textContent="",t.description2.textContent="",t.rightActionBar.clear(),t.checkAll.checked=!1,t.inputBox.placeholder="",t.inputBox.password=!1,t.inputBox.showDecoration(fF.Ignore),t.visibleCount.setCount(0),t.count.setCount(0),KC(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,this.setComboboxAccessibility(!1),t.inputBox.ariaLabel="";const n=this.options.backKeybindingLabel();r$.tooltip=n?mf(0,"Back ({0})",n):mf(0,"Back"),t.container.style.display="",this.updateLayout(),t.inputBox.setFocus()}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.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.display(!!e.list),t.container.classList[e.checkBox?"add":"remove"]("show-checkboxes"),this.updateLayout()}setComboboxAccessibility(e){if(e!==this.comboboxAccessibility){const t=this.getUI();this.comboboxAccessibility=e,this.comboboxAccessibility?(t.inputBox.setAttribute("role","combobox"),t.inputBox.setAttribute("aria-haspopup","true"),t.inputBox.setAttribute("aria-autocomplete","list"),t.inputBox.setAttribute("aria-activedescendant",t.list.getActiveDescendant()||"")):(t.inputBox.removeAttribute("role"),t.inputBox.removeAttribute("aria-haspopup"),t.inputBox.removeAttribute("aria-autocomplete"),t.inputBox.removeAttribute("aria-activedescendant"))}}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(const t of this.getUI().leftActionBar.viewItems)t.getAction().enabled=e;for(const t of this.getUI().rightActionBar.viewItems)t.getAction().enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(e){var t;const i=this.controller;if(i){const n=!(null===(t=this.ui)||void 0===t?void 0:t.container.contains(document.activeElement));if(this.controller=null,this.onHideEmitter.fire(),this.getUI().container.style.display="none",!n){let e=this.previousFocusElement;for(;e&&!e.offsetParent;)e=Qs(e.parentElement);(null==e?void 0:e.offsetParent)?(e.focus(),this.previousFocusElement=void 0):this.options.returnFocus()}i.didHide(e)}}layout(e,t){this.dimension=e,this.titleBarOffset=t,this.updateLayout()}updateLayout(){if(this.ui){this.ui.container.style.top=`${this.titleBarOffset}px`;const e=this.ui.container.style,t=Math.min(.62*this.dimension.width,d$.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,contrastBorder:n,widgetShadow:o}=this.styles.widget;this.ui.titleBar.style.backgroundColor=e?e.toString():"",this.ui.container.style.backgroundColor=t?t.toString():"",this.ui.container.style.color=i?i.toString():"",this.ui.container.style.border=n?`1px solid ${n}`:"",this.ui.container.style.boxShadow=o?`0 0 8px 2px ${o}`:"",this.ui.inputBox.style(this.styles.inputBox),this.ui.count.style(this.styles.countBadge),this.ui.ok.style(this.styles.button),this.ui.customButton.style(this.styles.button),this.ui.progressBar.style(this.styles.progressBar),this.ui.list.style(this.styles.list);const s=[];this.styles.list.pickerGroupBorder&&s.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.list.pickerGroupBorder}; }`),this.styles.list.pickerGroupForeground&&s.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.list.pickerGroupForeground}; }`),(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)}}}d$.MAX_WIDTH=600;class c${constructor(e){this.spliceables=e}splice(e,t,i){this.spliceables.forEach((n=>n.splice(e,t,i)))}}class h$ extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}function u$(e,t){const i=[];for(let n of t){if(e.start>=n.range.end)continue;if(e.end({range:g$(e.range,n),size:e.size}))),r=i.map(((t,i)=>({range:{start:e+i,end:e+i+1},size:t.size})));this.groups=function(...e){return function(e){const t=[];let i=null;for(let n of e){const e=n.range.start,o=n.range.end,s=n.size;i&&s===i.size?i.range.end=o:(i={range:{start:e,end:o},size:s},t.push(i))}return t}(e.reduce(((e,t)=>e.concat(t)),[]))}(o,r,s),this._size=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;let t=0,i=0;for(let n of this.groups){const o=n.range.end-n.range.start,s=i+o*n.size;if(e{for(const i of e){this.getRenderer(t).disposeTemplate(i.templateData),i.templateData=null}})),this.cache.clear()}getRenderer(e){const t=this.renderers.get(e);if(!t)throw new Error(`No renderer found for ${e}`);return t}}var f$=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(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 _$={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements:e=>[e],getDragURI:()=>null,onDragStart(){},onDragOver:()=>!1,drop(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class v${constructor(e){this.elements=e}update(){}getData(){return this.elements}}class b${constructor(e){this.elements=e}update(){}getData(){return this.elements}}class w${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,(null==e?void 0:e.getPosInSet)?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(e,t)=>t+1,(null==e?void 0:e.getRole)?this.getRole=e.getRole.bind(e):this.getRole=e=>"listitem",(null==e?void 0:e.isChecked)?this.isChecked=e.isChecked.bind(e):this.isChecked=e=>{}}}class y${constructor(e,t,i,n=_$){if(this.virtualDelegate=t,this.domId="list_id_"+ ++y$.InstanceCount,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new tb(50),this.splicing=!1,this.dragOverAnimationStopDisposable=Uo.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=Uo.None,this.onDragLeaveTimeout=Uo.None,this.disposables=new ws,this._onDidChangeContentHeight=new $o,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=new p$;for(const s of i)this.renderers.set(s.templateId,s);this.cache=this.disposables.add(new m$(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=Pa(n,(e=>e.horizontalScrolling),_$.horizontalScrolling),this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.additionalScrollHeight=void 0===n.additionalScrollHeight?0:n.additionalScrollHeight,this.accessibilityProvider=new C$(n.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows";const o=Pa(n,(e=>e.transformOptimization),_$.transformOptimization);o&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)"),this.disposables.add(oS.addTarget(this.rowsContainer)),this.scrollable=new aT({forceIntegerValues:!0,smoothScrollDuration:Pa(n,(e=>e.smoothScrolling),!1)?125:0,scheduleAtNextAnimationFrame:e=>hC(e)}),this.scrollableElement=this.disposables.add(new mT(this.rowsContainer,{alwaysConsumeMouseWheel:Pa(n,(e=>e.alwaysConsumeMouseWheel),_$.alwaysConsumeMouseWheel),horizontal:1,vertical:Pa(n,(e=>e.verticalScrollMode),_$.verticalScrollMode),useShadows:Pa(n,(e=>e.useShadows),_$.useShadows),mouseWheelScrollSensitivity:n.mouseWheelScrollSensitivity,fastScrollSensitivity:n.fastScrollSensitivity},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add(nC(this.rowsContainer,iS.Change,(e=>this.onTouchChange(e)))),this.disposables.add(nC(this.scrollableElement.getDomNode(),"scroll",(e=>e.target.scrollTop=0))),this.disposables.add(nC(this.domNode,"dragover",(e=>this.onDragOver(this.toDragEvent(e))))),this.disposables.add(nC(this.domNode,"drop",(e=>this.onDrop(this.toDragEvent(e))))),this.disposables.add(nC(this.domNode,"dragleave",(e=>this.onDragLeave(this.toDragEvent(e))))),this.disposables.add(nC(this.domNode,"dragend",(e=>this.onDragEnd(e)))),this.setRowLineHeight=Pa(n,(e=>e.setRowLineHeight),_$.setRowLineHeight),this.setRowHeight=Pa(n,(e=>e.setRowHeight),_$.setRowHeight),this.supportDynamicHeights=Pa(n,(e=>e.supportDynamicHeights),_$.supportDynamicHeights),this.dnd=Pa(n,(e=>e.dnd),_$.dnd),this.layout()}get contentHeight(){return this.rangeMap.size}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:kC(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=""}}updateOptions(e){void 0!==e.additionalScrollHeight&&(this.additionalScrollHeight=e.additionalScrollHeight,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.mouseWheelScrollSensitivity&&this.scrollableElement.updateOptions({mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity}),void 0!==e.fastScrollSensitivity&&this.scrollableElement.updateOptions({fastScrollSensitivity:e.fastScrollSensitivity})}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=QW.intersect(n,o),r=new Map;for(let w=s.end-1;w>=s.start;w--){const e=this.items[w];if(e.dragStartDisposable.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,w,e.row.templateData,e.size),t.push(e.row)}e.row=null}const a={start:e+t,end:this.items.length},l=QW.intersect(a,n),d=QW.relativeComplement(a,n),c=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:Uo.None,checkedDisposable:Uo.None})));let h;0===e&&t>=this.items.length?(this.rangeMap=new p$,this.rangeMap.splice(0,0,c),h=this.items,this.items=c):(this.rangeMap.splice(e,t,c),h=this.items.splice(e,t,...c));const u=i.length-t,g=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),p=g$(l,u),m=QW.intersect(g,p);for(let w=m.start;wg$(e,u))),v=[{start:e,end:e+i.length},..._].map((e=>QW.intersect(g,e))),b=this.getNextToLastElement(v);for(const w of v)for(let e=w.start;ee.element))}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=hC((()=>{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)void 0!==t.width&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:0===e?0:e+10})}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(){return this.scrollableElement.getScrollDimensions().height}element(e){return this.items[e].element}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){let i={height:"number"==typeof e?e:DC(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,i.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(i),void 0!==t&&(this.renderWidth=t,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:"number"==typeof t?t:kC(this.domNode)})}render(e,t,i,n,o,s=!1){const r=this.getRenderRange(t,i),a=QW.relativeComplement(r,e),l=QW.relativeComplement(e,r),d=this.getNextToLastElement(a);if(s){const t=QW.intersect(e,r);for(let e=t.start;en.row.domNode.setAttribute("aria-checked",String(!!e));e(s.value),n.checkedDisposable=s.onDidChange(e)}n.row.domNode.parentElement||(t?this.rowsContainer.insertBefore(n.row.domNode,t):this.rowsContainer.appendChild(n.row.domNode)),this.updateItemInDOM(n,e);const r=this.renderers.get(n.templateId);if(!r)throw new Error(`No renderer found for template id ${n.templateId}`);r&&r.renderElement(n.element,e,n.row.templateData,n.size);const a=this.dnd.getDragURI(n.element);n.dragStartDisposable.dispose(),n.row.domNode.draggable=!!a,a&&(n.dragStartDisposable=nC(n.row.domNode,"dragstart",(e=>this.onDragStart(n.element,a,e)))),this.horizontalScrolling&&(this.measureItemWidth(n),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width=o_?"-moz-fit-content":"fit-content",e.width=kC(e.row.domNode);const t=window.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(){return this.scrollableElement.getScrollPosition().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.additionalScrollHeight}get onMouseClick(){return ds.map(this.disposables.add(new eB(this.domNode,"click")).event,(e=>this.toMouseEvent(e)))}get onMouseDblClick(){return ds.map(this.disposables.add(new eB(this.domNode,"dblclick")).event,(e=>this.toMouseEvent(e)))}get onMouseMiddleClick(){return ds.filter(ds.map(this.disposables.add(new eB(this.domNode,"auxclick")).event,(e=>this.toMouseEvent(e))),(e=>1===e.browserEvent.button))}get onMouseDown(){return ds.map(this.disposables.add(new eB(this.domNode,"mousedown")).event,(e=>this.toMouseEvent(e)))}get onContextMenu(){return ds.any(ds.map(this.disposables.add(new eB(this.domNode,"contextmenu")).event,(e=>this.toMouseEvent(e))),ds.map(this.disposables.add(new eB(this.domNode,iS.Contextmenu)).event,(e=>this.toGestureEvent(e))))}get onTouchStart(){return ds.map(this.disposables.add(new eB(this.domNode,"touchstart")).event,(e=>this.toTouchEvent(e)))}get onTap(){return ds.map(this.disposables.add(new eB(this.rowsContainer,iS.Tap)).event,(e=>this.toGestureEvent(e)))}toMouseEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toTouchEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toGestureEvent(e){const t=this.getItemIndexFromEventTarget(e.initialTarget||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toDragEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}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 t}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,t,i){if(!i.dataTransfer)return;const n=this.dnd.getDragElements(e);if(i.dataTransfer.effectAllowed="copyMove",i.dataTransfer.setData(uB.TEXT,t),i.dataTransfer.setDragImage){let e;this.dnd.getDragLabel&&(e=this.dnd.getDragLabel(n,i)),void 0===e&&(e=String(n.length));const t=YC(".monaco-drag-image");t.textContent=e,document.body.appendChild(t),i.dataTransfer.setDragImage(t,-10,-10),setTimeout((()=>document.body.removeChild(t)),0)}this.currentDragData=new v$(n),pB.CurrentDragAndDropData=new b$(n),this.dnd.onDragStart&&this.dnd.onDragStart(this.currentDragData,i)}onDragOver(e){if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),pB.CurrentDragAndDropData&&"vscode-ui"===pB.CurrentDragAndDropData.getData())return!1;if(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer)return!1;if(!this.currentDragData)if(pB.CurrentDragAndDropData)this.currentDragData=pB.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new w$}const t=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.browserEvent);if(this.canDrop="boolean"==typeof t?t:t.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;let i;if(e.browserEvent.dataTransfer.dropEffect="boolean"!=typeof t&&0===t.effect?"copy":"move",i="boolean"!=typeof t&&t.feedback?t.feedback:void 0===e.index?[-1]:[e.index],i=Qo(i).filter((e=>e>=-1&&ee-t)),i=-1===i[0]?[-1]:i,n=this.currentDragFeedback,o=i,Array.isArray(n)&&Array.isArray(o)?jo(n,o):n===o)return!0;var n,o;if(this.currentDragFeedback=i,this.currentDragFeedbackDisposable.dispose(),-1===i[0])this.domNode.classList.add("drop-target"),this.rowsContainer.classList.add("drop-target"),this.currentDragFeedbackDisposable=es((()=>{this.domNode.classList.remove("drop-target"),this.rowsContainer.classList.remove("drop-target")}));else{for(const e of i){const t=this.items[e];t.dropTarget=!0,t.row&&t.row.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=es((()=>{for(const e of i){const t=this.items[e];t.dropTarget=!1,t.row&&t.row.domNode.classList.remove("drop-target")}}))}return!0}onDragLeave(e){var t,i;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=ob((()=>this.clearDragOverFeedback()),100),this.currentDragData&&(null===(i=(t=this.dnd).onDragLeave)||void 0===i||i.call(t,this.currentDragData,e.element,e.index,e.browserEvent))}onDrop(e){if(!this.canDrop)return;const t=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,pB.CurrentDragAndDropData=void 0,t&&e.browserEvent.dataTransfer&&(e.browserEvent.preventDefault(),t.update(e.browserEvent.dataTransfer),this.dnd.drop(t,e.element,e.index,e.browserEvent))}onDragEnd(e){this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,pB.CurrentDragAndDropData=void 0,this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=Uo.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const e=CC(this.domNode).top;this.dragOverAnimationDisposable=function(e){const t=()=>{e(),i=hC(t)};let i=hC(t);return es((()=>i.dispose()))}(this.animateDragAndDropScrollTop.bind(this,e))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=ob((()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}),1e3),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)}getItemIndexFromEventTarget(e){const t=this.scrollableElement.getDomNode();let i=e;for(;i instanceof HTMLElement&&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;for(;;){const a=this.getRenderRange(e,t);let l=!1;for(let e=a.start;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},k$=globalThis&&globalThis.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,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){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class D${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${constructor(e){this._trait=e,this.length=0,this.indexes=[],this.sortedIndexes=[],this._onChange=new $o,this.onChange=this._onChange.event}get name(){return this._trait}get renderer(){return new D$(this)}splice(e,t,i){var n;t=Math.max(0,Math.min(t,this.length-e));const o=i.length-t,s=e+t,r=[...this.sortedIndexes.filter((t=>tt?i+e:-1)).filter((e=>-1!==e)),...this.sortedIndexes.filter((e=>e>=s)).map((e=>e+o))],a=this.length+o;if(this.sortedIndexes.length>0&&0===r.length&&a>0){const t=null!==(n=this.sortedIndexes.find((t=>t>=e)))&&void 0!==n?n:a-1;r.push(Math.min(t,a-1))}this.renderer.splice(e,t,i.length),this._set(r,r),this.length=a}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(U$),t)}_set(e,t,i){const n=this.indexes,o=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;const s=j$(o,e);return this.renderer.renderIndexes(s),this._onChange.fire({indexes:e,browserEvent:i}),n}get(){return this.indexes}contains(e){return Fa(this.sortedIndexes,e,U$)>=0}dispose(){bs(this._onChange)}}S$([tS],L$.prototype,"renderer",null);class N$ 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 E${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,i.map((()=>!1)));const n=this.trait.get().map((e=>this.identityProvider.getId(this.view.element(e)).toString())),o=i.map((e=>n.indexOf(this.identityProvider.getId(e).toString())>-1));this.trait.splice(e,t,o)}}function I$(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}function T$(e){return!!e.classList.contains("monaco-editor")||!e.classList.contains("monaco-list")&&(!!e.parentElement&&T$(e.parentElement))}class M${constructor(e,t,i){this.list=e,this.view=t,this.disposables=new ws,this.multipleSelectionDisposables=new ws,this.onKeyDown.filter((e=>3===e.keyCode)).on(this.onEnter,this,this.disposables),this.onKeyDown.filter((e=>16===e.keyCode)).on(this.onUpArrow,this,this.disposables),this.onKeyDown.filter((e=>18===e.keyCode)).on(this.onDownArrow,this,this.disposables),this.onKeyDown.filter((e=>11===e.keyCode)).on(this.onPageUpArrow,this,this.disposables),this.onKeyDown.filter((e=>12===e.keyCode)).on(this.onPageDownArrow,this,this.disposables),this.onKeyDown.filter((e=>9===e.keyCode)).on(this.onEscape,this,this.disposables),!1!==i.multipleSelectionSupport&&this.onKeyDown.filter((e=>(zo?e.metaKey:e.ctrlKey)&&31===e.keyCode)).on(this.onCtrlA,this,this.multipleSelectionDisposables)}get onKeyDown(){return ds.chain(this.disposables.add(new eB(this.view.domNode,"keydown")).event).filter((e=>!I$(e.target))).map((e=>new jw(e)))}updateOptions(e){void 0!==e.multipleSelectionSupport&&(this.multipleSelectionDisposables.clear(),e.multipleSelectionSupport&&this.onKeyDown.filter((e=>(zo?e.metaKey:e.ctrlKey)&&31===e.keyCode)).on(this.onCtrlA,this,this.multipleSelectionDisposables))}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(Oa(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()}}S$([tS],M$.prototype,"onKeyDown",null),function(e){e[e.Idle=0]="Idle",e[e.Typing=1]="Typing"}(x$||(x$={}));const A$=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>=93&&e.keyCode<=102||e.keyCode>=80&&e.keyCode<=90)}};class O${constructor(e,t,i,n){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=i,this.delegate=n,this.enabled=!1,this.state=x$.Idle,this.automaticKeyboardNavigation=!0,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new ws,this.disposables=new ws,this.updateOptions(e.options)}updateOptions(e){void 0===e.enableKeyboardNavigation||!!e.enableKeyboardNavigation?this.enable():this.disable(),void 0!==e.automaticKeyboardNavigation&&(this.automaticKeyboardNavigation=e.automaticKeyboardNavigation)}enable(){if(this.enabled)return;const e=ds.chain(this.enabledDisposables.add(new eB(this.view.domNode,"keydown")).event).filter((e=>!I$(e.target))).filter((()=>this.automaticKeyboardNavigation||this.triggered)).map((e=>new jw(e))).filter((e=>this.delegate.mightProducePrintableCharacter(e))).forEach((e=>e.preventDefault())).map((e=>e.browserEvent.key)).event,t=ds.debounce(e,(()=>null),800);ds.reduce(ds.any(e,t),((e,t)=>null===t?null:(e||"")+t))(this.onInput,this,this.enabledDisposables),t(this.onClear,this,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){var e;const t=this.list.getFocus();if(t.length>0&&t[0]===this.previouslyFocused){const i=null===(e=this.list.options.accessibilityProvider)||void 0===e?void 0:e.getAriaLabel(this.list.element(t[0]));i&&dy(i)}this.previouslyFocused=-1}onInput(e){if(!e)return this.state=x$.Idle,void(this.triggered=!1);const t=this.list.getFocus(),i=t.length>0?t[0]:0,n=this.state===x$.Idle?1:0;this.state=x$.Typing;for(let o=0;o!I$(e.target))).map((e=>new jw(e))).filter((e=>!(2!==e.keyCode||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey))).on(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 n=i.querySelector("[tabIndex]");if(!(n&&n instanceof HTMLElement&&-1!==n.tabIndex))return;const o=window.getComputedStyle(n);"hidden"!==o.visibility&&"none"!==o.display&&(e.preventDefault(),e.stopPropagation(),n.focus())}dispose(){this.disposables.dispose()}}function P$(e){return zo?e.browserEvent.metaKey:e.browserEvent.ctrlKey}function F$(e){return e.browserEvent.shiftKey}const B$={isSelectionSingleChangeEvent:P$,isSelectionRangeChangeEvent:F$};class V${constructor(e){this.list=e,this.disposables=new ws,this._onPointer=new $o,this.onPointer=this._onPointer.event,!1!==e.options.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||B$),this.mouseSupport=void 0===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(oS.addTarget(e.getHTMLElement()))),ds.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||B$))}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){T$(e.browserEvent.target)||document.activeElement!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(T$(e.browserEvent.target))return;const t=void 0===e.index?[]:[e.index];this.list.setFocus(t,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport)return;if(I$(e.browserEvent.target)||T$(e.browserEvent.target))return;const t=e.index;return void 0===t?(this.list.setFocus([],e.browserEvent),this.list.setSelection([],e.browserEvent),void this.list.setAnchor(void 0)):this.isSelectionRangeChangeEvent(e)||this.isSelectionChangeEvent(e)?this.changeSelection(e):(this.list.setFocus([t],e.browserEvent),this.list.setAnchor(t),(i=e.browserEvent)instanceof MouseEvent&&2===i.button||this.list.setSelection([t],e.browserEvent),void this._onPointer.fire(e));var i}onDoubleClick(e){if(I$(e.browserEvent.target)||T$(e.browserEvent.target))return;if(this.isSelectionChangeEvent(e))return;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(void 0===i){const e=this.list.getFocus()[0];i=null!=e?e:t,this.list.setAnchor(i)}const n=Math.min(i,t),o=Math.max(i,t),s=Oa(n,o+1),r=this.list.getSelection(),a=function(e,t){const i=e.indexOf(t);if(-1===i)return[];const n=[];let o=i-1;for(;o>=0&&e[o]===t-(i-o);)n.push(e[o--]);n.reverse(),o=i;for(;o=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));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 W${constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){const t=this.selectorSuffix&&`.${this.selectorSuffix}`,i=[];e.listBackground&&e.listBackground.isOpaque()&&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) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&i.push(`.monaco-list${t} .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`),e.listSelectionOutline&&i.push(`.monaco-list${t} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; 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`),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.listDropBackground&&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.listDropBackground} !important; color: inherit !important; }\n\t\t\t`),e.listFilterWidgetBackground&&i.push(`.monaco-list-type-filter { background-color: ${e.listFilterWidgetBackground} }`),e.listFilterWidgetOutline&&i.push(`.monaco-list-type-filter { border: 1px solid ${e.listFilterWidgetOutline}; }`),e.listFilterWidgetNoMatchesOutline&&i.push(`.monaco-list-type-filter.no-matches { border: 1px solid ${e.listFilterWidgetNoMatchesOutline}; }`),e.listMatchesShadow&&i.push(`.monaco-list-type-filter { box-shadow: 1px 1px 1px ${e.listMatchesShadow}; }`),e.tableColumnsBorder&&i.push(`\n\t\t\t\t.monaco-table:hover > .monaco-split-view2,\n\t\t\t\t.monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\t\t\tborder-color: ${e.tableColumnsBorder};\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 z$={listFocusBackground:hS.fromHex("#7FB0D0"),listActiveSelectionBackground:hS.fromHex("#0E639C"),listActiveSelectionForeground:hS.fromHex("#FFFFFF"),listActiveSelectionIconForeground:hS.fromHex("#FFFFFF"),listFocusAndSelectionBackground:hS.fromHex("#094771"),listFocusAndSelectionForeground:hS.fromHex("#FFFFFF"),listInactiveSelectionBackground:hS.fromHex("#3F3F46"),listInactiveSelectionIconForeground:hS.fromHex("#FFFFFF"),listHoverBackground:hS.fromHex("#2A2D2E"),listDropBackground:hS.fromHex("#383B3D"),treeIndentGuidesStroke:hS.fromHex("#a9a9a9"),tableColumnsBorder:hS.fromHex("#cccccc").transparent(.2),tableOddRowsBackgroundColor:hS.fromHex("#cccccc").transparent(.04)},H$={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI:()=>null,onDragStart(){},onDragOver:()=>!1,drop(){}}};function j$(e,t){const i=[];let n=0,o=0;for(;n=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-t;class $${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&&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 K${constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return e}renderElement(e,t,i){const n=this.accessibilityProvider.getAriaLabel(e);n?i.setAttribute("aria-label",n):i.removeAttribute("aria-label");const o=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);"number"==typeof o?i.setAttribute("aria-level",`${o}`):i.removeAttribute("aria-level")}disposeTemplate(e){}}class q${constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){const t=this.list.getSelectedElements();return t.indexOf(e)>-1?t:[e]}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&&this.dnd.onDragStart(e,t)}onDragOver(e,t,i,n){return this.dnd.onDragOver(e,t,i,n)}onDragLeave(e,t,i,n){var o,s;null===(s=(o=this.dnd).onDragLeave)||void 0===s||s.call(o,e,t,i,n)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}drop(e,t,i,n){this.dnd.drop(e,t,i,n)}}class G${constructor(e,t,i,n,o=H$){var s;this.user=e,this._options=o,this.focus=new L$("focused"),this.anchor=new L$("anchor"),this.eventBufferer=new Ba,this._ariaLabel="",this.disposables=new ws,this._onDidDispose=new $o,this.onDidDispose=this._onDidDispose.event;const r=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?null===(s=this._options.accessibilityProvider)||void 0===s?void 0:s.getWidgetRole():"list";this.selection=new N$("listbox"!==r),Ko(o,z$,!1);const a=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=o.accessibilityProvider,this.accessibilityProvider&&(a.push(new K$(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant&&this.accessibilityProvider.onDidChangeActiveDescendant(this.onDidChangeActiveDescendant,this,this.disposables)),n=n.map((e=>new $$(e.templateId,[...a,e])));const l=Object.assign(Object.assign({},o),{dnd:o.dnd&&new q$(this,o.dnd)});if(this.view=new y$(t,i,n,l),this.view.domNode.setAttribute("role",r),o.styleController)this.styleController=o.styleController(this.view.domId);else{const e=RC(this.view.domNode);this.styleController=new W$(e,this.view.domId)}if(this.spliceable=new c$([new E$(this.focus,this.view,o.identityProvider),new E$(this.selection,this.view,o.identityProvider),new E$(this.anchor,this.view,o.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 R$(this,this.view)),("boolean"!=typeof o.keyboardSupport||o.keyboardSupport)&&(this.keyboardController=new M$(this,this.view,o),this.disposables.add(this.keyboardController)),o.keyboardNavigationLabelProvider){const e=o.keyboardNavigationDelegate||A$;this.typeLabelController=new O$(this,this.view,o.keyboardNavigationLabelProvider,e),this.disposables.add(this.typeLabelController)}this.mouseController=this.createMouseController(o),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")}get onDidChangeFocus(){return ds.map(this.eventBufferer.wrapEvent(this.focus.onChange),(e=>this.toListEvent(e)))}get onDidChangeSelection(){return ds.map(this.eventBufferer.wrapEvent(this.selection.onChange),(e=>this.toListEvent(e)))}get domId(){return this.view.domId}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 onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1;const t=ds.chain(this.disposables.add(new eB(this.view.domNode,"keydown")).event).map((e=>new jw(e))).filter((t=>e=58===t.keyCode||t.shiftKey&&68===t.keyCode)).map(tB).filter((()=>!1)).event,i=ds.chain(this.disposables.add(new eB(this.view.domNode,"keyup")).event).forEach((()=>e=!1)).map((e=>new jw(e))).filter((e=>58===e.keyCode||e.shiftKey&&68===e.keyCode)).map(tB).map((({browserEvent:e})=>{const t=this.getFocus(),i=t.length?t[0]:void 0;return{index:i,element:void 0!==i?this.view.element(i):void 0,anchor:void 0!==i?this.view.domElement(i):this.view.domNode,browserEvent:e}})).event,n=ds.chain(this.view.onContextMenu).filter((t=>!e)).map((({element:e,index:t,browserEvent:i})=>({element:e,index:t,anchor:{x:i.pageX+1,y:i.pageY},browserEvent:i}))).event;return ds.any(t,i,n)}get onKeyDown(){return this.disposables.add(new eB(this.view.domNode,"keydown")).event}get onDidFocus(){return ds.signal(this.disposables.add(new eB(this.view.domNode,"focus",!0)).event)}createMouseController(e){return new V$(this)}updateOptions(e={}){var t;this._options=Object.assign(Object.assign({},this._options),e),this.typeLabelController&&this.typeLabelController.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),null===(t=this.keyboardController)||void 0===t||t.updateOptions(e),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,i=[]){if(e<0||e>this.view.length)throw new h$(this.user,`Invalid start index: ${e}`);if(t<0)throw new h$(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)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}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 h$(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(void 0!==e){if(e<0||e>=this.length)throw new h$(this.user,`Invalid index ${e}`);this.anchor.set([e])}else this.anchor.set([])}getAnchor(){return ka(this.anchor.get(),void 0)}getAnchorElement(){const e=this.getAnchor();return void 0===e?void 0:this.element(e)}setFocus(e,t){for(const i of e)if(i<0||i>=this.length)throw new h$(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)}focusNextPage(e,t){return k$(this,void 0,void 0,(function*(){let i=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);i=0===i?0:i-1;const n=this.view.element(i),o=this.getFocusedElements()[0];if(o!==n){const n=this.findPreviousIndex(i,!1,t);n>-1&&o!==this.view.element(n)?this.setFocus([n],e):this.setFocus([i],e)}else{const n=this.view.getScrollTop();this.view.setScrollTop(n+this.view.renderHeight-this.view.elementHeight(i)),this.view.getScrollTop()!==n&&(this.setFocus([]),yield nb(0),yield this.focusNextPage(e,t))}}))}focusPreviousPage(e,t){return k$(this,void 0,void 0,(function*(){let i;const n=this.view.getScrollTop();i=0===n?this.view.indexAt(n):this.view.indexAfter(n-1);const o=this.view.element(i),s=this.getFocusedElements()[0];if(s!==o){const n=this.findNextIndex(i,!1,t);n>-1&&s!==this.view.element(n)?this.setFocus([n],e):this.setFocus([i],e)}else{const i=n;this.view.setScrollTop(n-this.view.renderHeight),this.view.getScrollTop()!==i&&(this.setFocus([]),yield nb(0),yield this.focusPreviousPage(e,t))}}))}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){if(e<0||e>=this.length)throw new h$(this.user,`Invalid index ${e}`);const i=this.view.getScrollTop(),n=this.view.elementTop(e),o=this.view.elementHeight(e);if(vr(t)){const e=o-this.view.renderHeight;this.view.setScrollTop(e*JV(t,0,1)+n)}else{const e=n+o,t=i+this.view.renderHeight;n=t||(n=t&&o>=this.view.renderHeight?this.view.setScrollTop(n):e>=t&&this.view.setScrollTop(e-this.view.renderHeight))}}getRelativeTop(e){if(e<0||e>=this.length)throw new h$(this.user,`Invalid index ${e}`);const t=this.view.getScrollTop(),i=this.view.elementTop(e),n=this.view.elementHeight(e);if(it+this.view.renderHeight)return null;const o=n-this.view.renderHeight;return Math.abs((t-i)/o)}getHTMLElement(){return this.view.domNode}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(){var e;const t=this.focus.get();if(t.length>0){let i;(null===(e=this.accessibilityProvider)||void 0===e?void 0:e.getActiveDescendantId)&&(i=this.accessibilityProvider.getActiveDescendantId(this.view.element(t[0]))),this.view.domNode.setAttribute("aria-activedescendant",i||this.view.getElementDomId(t[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()}}S$([tS],G$.prototype,"onDidChangeFocus",null),S$([tS],G$.prototype,"onDidChangeSelection",null),S$([tS],G$.prototype,"onContextMenu",null),S$([tS],G$.prototype,"onKeyDown",null),S$([tS],G$.prototype,"onDidFocus",null);class Z${constructor(e,t){this.renderer=e,this.modelProvider=t}get templateId(){return this.renderer.templateId}renderTemplate(e){return{data:this.renderer.renderTemplate(e),disposable:Uo.None}}renderElement(e,t,i,n){if(i.disposable&&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 s=new as,r=o.resolve(e,s.token);i.disposable={dispose:()=>s.cancel()},this.renderer.renderPlaceholder(e,i.data),r.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 Y${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}}const X$={separatorBorder:hS.transparent};class Q${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)}set size(e){this._size=e}get size(){return this._size}get visible(){return void 0===this._cachedVisibleSize}setVisible(e,t){e!==this.visible&&(e?(this.size=JV(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),this.view.setVisible&&this.view.setVisible(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 snap(){return!!this.view.snap}set enabled(e){this.container.style.pointerEvents=e?"":"none"}layout(e,t){this.layoutContainer(e),this.view.layout(this.size,e,t)}dispose(){return this.disposable.dispose(),this.view}}class J$ extends Q${layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}}class eK extends Q${layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}}var tK,iK;!function(e){e[e.Idle=0]="Idle",e[e.Busy=1]="Busy"}(tK||(tK={})),function(e){e.Distribute={type:"distribute"},e.Split=function(e){return{type:"split",index:e}},e.Invisible=function(e){return{type:"invisible",cachedVisibleSize:e}}}(iK||(iK={}));class nK extends Uo{constructor(e,t={}){var i,n,o,s,r;super(),this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=tK.Idle,this._onDidSashChange=this._register(new $o),this._onDidSashReset=this._register(new $o),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onDidSashChange=this._onDidSashChange.event,this.onDidSashReset=this._onDidSashReset.event,this.orientation=null!==(i=t.orientation)&&void 0!==i?i:0,this.inverseAltBehavior=null!==(n=t.inverseAltBehavior)&&void 0!==n&&n,this.proportionalLayout=null===(o=t.proportionalLayout)||void 0===o||o,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=$C(this.el,YC(".sash-container")),this.viewContainer=YC(".split-view-container"),this.scrollable=new aT({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:hC}),this.scrollableElement=this._register(new mT(this.viewContainer,{vertical:0===this.orientation?null!==(s=t.scrollbarVisibility)&&void 0!==s?s:1:2,horizontal:1===this.orientation?null!==(r=t.scrollbarVisibility)&&void 0!==r?r:1:2},this.scrollable)),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll((e=>{this.viewContainer.scrollTop=e.scrollTop,this.viewContainer.scrollLeft=e.scrollLeft}))),$C(this.el,this.scrollableElement.getDomNode()),this.style(t.styles||X$),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach(((e,t)=>{const i=fr(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())}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())}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)for(let n=0;n1===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.size/this.contentSize)))}onSashStart({sash:e,start:t,alt:i}){for(const r of this.viewItems)r.enabled=!1;const n=this.sashItems.findIndex((t=>t.sash===e)),o=ta(nC(document.body,"keydown",(e=>s(this.sashDragState.current,e.altKey))),nC(document.body,"keyup",(()=>s(this.sashDragState.current,!1)))),s=(e,t)=>{const i=this.viewItems.map((e=>e.size));let s,r,a=Number.NEGATIVE_INFINITY,l=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(t=!t),t){if(n===this.sashItems.length-1){const e=this.viewItems[n];a=(e.minimumSize-e.size)/2,l=(e.maximumSize-e.size)/2}else{const e=this.viewItems[n+1];a=(e.size-e.maximumSize)/2,l=(e.size-e.minimumSize)/2}}if(!t){const e=Oa(n,-1),t=Oa(n+1,this.viewItems.length),o=e.reduce(((e,t)=>e+(this.viewItems[t].minimumSize-i[t])),0),a=e.reduce(((e,t)=>e+(this.viewItems[t].viewMaximumSize-i[t])),0),l=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),c=Math.max(o,d),h=Math.min(l,a),u=this.findFirstSnapIndex(e),g=this.findFirstSnapIndex(t);if("number"==typeof u){const e=this.viewItems[u],t=Math.floor(e.viewMinimumSize/2);s={index:u,limitDelta:e.visible?c-t:c+t,size:e.size}}if("number"==typeof g){const e=this.viewItems[g],t=Math.floor(e.viewMinimumSize/2);r={index:g,limitDelta:e.visible?h+t:h-t,size:e.size}}}this.sashDragState={start:e,current:e,index:n,sizes:i,minDelta:a,maxDelta:l,alt:t,snapBefore:s,snapAfter:r,disposable:o}};s(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 d=e-i,c=this.resize(t,d,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,-c,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=JV(t="number"==typeof t?t:e.size,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(this.state!==tK.Idle)throw new Error("Cant modify splitview");if(this.state=tK.Busy,e<0||e>=this.viewItems.length)return;const i=Oa(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=JV(t=Math.round(t),s.minimumSize,Math.min(s.maximumSize,this.size)),s.size=t,this.relayout(n,o),this.state=tK.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=JV(i,r.minimumSize,r.maximumSize);const n=Oa(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,n){if(this.state!==tK.Idle)throw new Error("Cant modify splitview");this.state=tK.Busy;const o=YC(".split-view-view");i===this.viewItems.length?this.viewContainer.appendChild(o):this.viewContainer.insertBefore(o,this.viewContainer.children.item(i));const s=e.onDidChange((e=>this.onViewChange(d,e))),r=es((()=>this.viewContainer.removeChild(o))),a=ta(s,r);let l;l="number"==typeof t?t:"split"===t.type?this.getViewSize(t.index)/2:"invisible"===t.type?{cachedVisibleSize:t.cachedVisibleSize}:e.minimumSize;const d=0===this.orientation?new J$(o,e,l,a):new eK(o,e,l,a);if(this.viewItems.splice(i,0,d),this.viewItems.length>1){let e={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash};const t=0===this.orientation?new cB(this.sashContainer,{getHorizontalSashTop:e=>this.getSashPosition(e),getHorizontalSashWidth:this.getSashOrthogonalSize},Object.assign(Object.assign({},e),{orientation:1})):new cB(this.sashContainer,{getVerticalSashLeft:e=>this.getSashPosition(e),getVerticalSashHeight:this.getSashOrthogonalSize},Object.assign(Object.assign({},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=ds.map(t.onDidStart,n)(this.onSashStart,this),s=ds.map(t.onDidChange,n)(this.onSashChange,this),r=ds.map(t.onDidEnd,(()=>this.sashItems.findIndex((e=>e.sash===t)))),a=r(this.onSashEnd,this),l=t.onDidReset((()=>{const e=this.sashItems.findIndex((e=>e.sash===t)),i=Oa(e,-1),n=Oa(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)})),d=ta(o,s,a,l,t),c={sash:t,disposable:d};this.sashItems.splice(i-1,0,c)}let c;o.appendChild(e.element),"number"!=typeof t&&"split"===t.type&&(c=[t.index]),n||this.relayout([i],c),this.state=tK.Idle,n||"number"==typeof t||"distribute"!==t.type||this.distributeViewSizes()}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,a,l){if(e<0||e>=this.viewItems.length)return 0;const d=Oa(e,-1),c=Oa(e+1,this.viewItems.length);if(o)for(const y of o)Va(d,y),Va(c,y);if(n)for(const y of n)Wa(d,y),Wa(c,y);const h=d.map((e=>this.viewItems[e])),u=d.map((e=>i[e])),g=c.map((e=>this.viewItems[e])),p=c.map((e=>i[e])),m=d.reduce(((e,t)=>e+(this.viewItems[t].minimumSize-i[t])),0),f=d.reduce(((e,t)=>e+(this.viewItems[t].maximumSize-i[t])),0),_=0===c.length?Number.POSITIVE_INFINITY:c.reduce(((e,t)=>e+(i[t]-this.viewItems[t].minimumSize)),0),v=0===c.length?Number.NEGATIVE_INFINITY:c.reduce(((e,t)=>e+(i[t]-this.viewItems[t].maximumSize)),0),b=Math.max(m,v,s),w=Math.min(_,f,r);let C=!1;if(a){const e=this.viewItems[a.index],i=t>=a.limitDelta;C=i!==e.visible,e.setVisible(i,a.size)}if(!C&&l){const e=this.viewItems[l.index],i=te+t.size),0);let i=this.size-t;const n=Oa(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)Va(n,r);for(const r of o)Wa(n,r);"number"==typeof e&&Wa(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 a=0;a0||this.startSnappingEnabled)?e.state=1:c&&t[a]&&(r0)return;if(!e.visible&&e.snap)return t}}dispose(){super.dispose(),bs(this.viewItems),this.viewItems=[],this.sashItems.forEach((e=>e.disposable.dispose())),this.sashItems=[]}}var oK;class sK{constructor(e,t,i){this.columns=e,this.getColumnSize=i,this.templateId=sK.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=$C(e,YC(".monaco-table-tr")),i=[],n=[];for(let s=0;snew rK(e,t))),a={size:r.reduce(((e,t)=>e+t.column.weight),0),views:r.map((e=>({size:e.column.weight,view:e})))};this.splitview=this.disposables.add(new nK(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:a})),this.splitview.el.style.height=`${i.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${i.headerRowHeight}px`;const l=new sK(n,o,(e=>this.splitview.getViewSize(e)));var d;this.list=this.disposables.add(new G$(e,this.domNode,(d=i,{getHeight:e=>d.getHeight(e),getTemplateId:()=>sK.TemplateId}),[l],s)),ds.any(...r.map((e=>e.onDidLayout)))((([e,t])=>l.layoutColumn(e,t)),null,this.disposables),this.splitview.onDidSashReset((e=>{const t=n.reduce(((e,t)=>e+t.weight),0),i=n[e].weight/t*this.cachedWidth;this.splitview.resizeView(e,i)}),null,this.disposables),this.styleElement=RC(this.domNode),this.style({})}get onDidChangeFocus(){return this.list.onDidChangeFocus}get onDidChangeSelection(){return this.list.onDidChangeSelection}get onMouseDblClick(){return this.list.onMouseDblClick}get onPointer(){return this.list.onPointer}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}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()}}aK.InstanceCount=0,function(e){e[e.Unknown=0]="Unknown",e[e.Twistie=1]="Twistie",e[e.Element=2]="Element"}(oK||(oK={}));class lK extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}}class dK{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}}function cK(e){return"object"==typeof e&&"visibility"in e&&"data"in e}function hK(e){switch(e){case!0:return 1;case!1:return 0;default:return e}}function uK(e){return"boolean"==typeof e.collapsible}class gK{constructor(e,t,i,n={}){this.user=e,this.list=t,this.rootRef=[],this.eventBufferer=new Ba,this._onDidChangeCollapseState=new $o,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new $o,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new $o,this.onDidSplice=this._onDidSplice.event,this.refilterDelayer=new tb(eb),this.collapseByDefault=void 0!==n.collapseByDefault&&n.collapseByDefault,this.filter=n.filter,this.autoExpandSingleChildren=void 0!==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=Hs.empty(),n={}){if(0===e.length)throw new lK(this.user,"Invalid tree location");n.diffIdentityProvider?this.spliceSmart(n.diffIdentityProvider,e,t,i,n):this.spliceSimple(e,t,i,n)}spliceSmart(e,t,i,n,o,s){var r;void 0===n&&(n=Hs.empty()),void 0===s&&(s=null!==(r=o.diffDepth)&&void 0!==r?r:0);const{parentNode:a}=this.getParentNodeWithListIndex(t);if(!a.lastDiffIds)return this.spliceSimple(t,i,n,o);const l=[...n],d=t[t.length-1],c=new za({getElements:()=>a.lastDiffIds},{getElements:()=>[...a.children.slice(0,d),...l,...a.children.slice(d+i)].map((t=>e.getId(t.element).toString()))}).ComputeDiff(!1);if(c.quitEarly)return a.lastDiffIds=void 0,this.spliceSimple(t,i,l,o);const h=t.slice(0,-1),u=(t,i,n)=>{if(s>0)for(let r=0;rt.originalStart-e.originalStart)))u(g,p,g-(m.originalStart+m.originalLength)),g=m.originalStart,p=m.modifiedStart-d,this.spliceSimple([...h,g],m.originalLength,Hs.slice(l,p,p+m.modifiedLength),o);u(g,p,g)}spliceSimple(e,t,i=Hs.empty(),{onDidCreateNode:n,onDidDeleteNode:o,diffIdentityProvider:s}){const{parentNode:r,listIndex:a,revealed:l,visible:d}=this.getParentNodeWithListIndex(e),c=[],h=Hs.map(i,(e=>this.createTreeNode(e,r,r.visible?1:0,l,c,n))),u=e[e.length-1],g=r.children.length>0;let p=0;for(let y=u;y>=0&&ys.getId(e.element).toString()))):r.lastDiffIds=r.children.map((e=>s.getId(e.element).toString())):r.lastDiffIds=void 0;let b=0;for(const y of v)y.visible&&b++;if(0!==b)for(let y=u+m.length;ye+(t.visible?t.renderNodeCount:0)),0);this._updateAncestorsRenderNodeCount(r,_-e),this.list.splice(a,e,c)}if(v.length>0&&o){const e=t=>{o(t),t.children.forEach(e)};v.forEach(e)}this._onDidSplice.fire({insertedNodes:m,deletedNodes:v});const w=r.children.length>0;g!==w&&this.setCollapsible(e.slice(0,-1),w);let C=r;for(;C;){if(2===C.visibility){this.refilterDelayer.trigger((()=>this.refilter()));break}C=C.parent}}rerender(e){if(0===e.length)throw new lK(this.user,"Invalid tree location");const{node:t,listIndex:i,revealed:n}=this.getTreeNodeWithListIndex(e);t.visible&&n&&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);void 0===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);void 0===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&&!uK(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:(uK(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})),!uK(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);for(;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:void 0!==e.collapsed,collapsed:void 0===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||Hs.empty(),d=n&&0!==a&&!r.collapsed,c=Hs.map(l,(e=>this.createTreeNode(e,r,a,d,o,s)));let h=0,u=1;for(const g of c)r.children.push(g),u+=g.renderNodeCount,g.visible&&(g.visibleChildIndex=h++);return r.collapsible=r.collapsible||r.children.length>0,r.visibleChildrenCount=h,r.visible=2===a?h>0:1===a,r.visible?r.collapsed||(r.renderNodeCount=u):(r.renderNodeCount=0,n&&o.pop()),s&&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)for(;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):cK(i)?(e.filterData=i.data,hK(i.visibility)):(e.filterData=void 0,hK(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,...n]=e;if(i<0||i>t.children.length)throw new lK(this.user,"Invalid tree location");return this.getTreeNode(n,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:n,visible:o}=this.getParentNodeWithListIndex(e),s=e[e.length-1];if(s<0||s>t.children.length)throw new lK(this.user,"Invalid tree location");const r=t.children[s];return{node:r,listIndex:i,revealed:n,visible:o&&r.visible}}getParentNodeWithListIndex(e,t=this.root,i=0,n=!0,o=!0){const[s,...r]=e;if(s<0||s>t.children.length)throw new lK(this.user,"Invalid tree location");for(let a=0;ae.element))),this.data=e}}function fK(e){return e instanceof v$?new mK(e):e}class _K{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=Uo.None}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&&this.dnd.onDragStart(fK(e),t)}onDragOver(e,t,i,n,o=!0){const s=this.dnd.onDragOver(fK(e),t&&t.element,i,n),r=this.autoExpandNode!==t;if(r&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),void 0===t)return s;if(r&&"boolean"!=typeof s&&s.autoExpand&&(this.autoExpandDisposable=ob((()=>{const e=this.modelProvider(),i=e.getNodeLocation(t);e.isCollapsed(i)&&e.setCollapsed(i,!1),this.autoExpandNode=void 0}),500)),"boolean"==typeof s||!s.accept||void 0===s.bubble||s.feedback){if(!o){return{accept:"boolean"==typeof s?s:s.accept,effect:"boolean"==typeof s?void 0:s.effect,feedback:[i]}}return s}if(1===s.bubble){const i=this.modelProvider(),o=i.getNodeLocation(t),s=i.getParentNodeLocation(o),r=i.getNode(s),a=s&&i.getListIndex(s);return this.onDragOver(e,r,a,n,!1)}const a=this.modelProvider(),l=a.getNodeLocation(t),d=a.getListIndex(l),c=a.getListRenderCount(l);return Object.assign(Object.assign({},s),{feedback:Oa(d,d+c)})}drop(e,t,i,n){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(fK(e),t&&t.element,i,n)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}}class vK{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&&this.delegate.setDynamicHeight(e.element,t)}}!function(e){e.None="none",e.OnHover="onHover",e.Always="always"}(pK||(pK={}));class bK{constructor(e,t=[]){this._elements=t,this.onDidChange=ds.forEach(e,(e=>this._elements=e))}get elements(){return this._elements}}class wK{constructor(e,t,i,n,o={}){this.renderer=e,this.modelProvider=t,this.activeNodes=n,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=wK.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.renderedIndentGuides=new Hx,this.activeIndentNodes=new Set,this.indentGuidesDisposable=Uo.None,this.disposables=new ws,this.templateId=e.templateId,this.updateOptions(o),ds.map(i,(e=>e.node))(this.onDidChangeNodeTwistieState,this,this.disposables),e.onDidChangeTwistieState&&e.onDidChangeTwistieState(this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(void 0!==e.indent&&(this.indent=JV(e.indent,0,40)),void 0!==e.renderIndentGuides){const t=e.renderIndentGuides!==pK.None;if(t!==this.shouldRenderIndentGuides&&(this.shouldRenderIndentGuides=t,this.indentGuidesDisposable.dispose(),t)){const e=new ws;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,e),this.indentGuidesDisposable=e,this._onDidChangeActiveNodes(this.activeNodes.elements)}}void 0!==e.hideTwistiesOfChildlessElements&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){const t=$C(e,YC(".monaco-tl-row")),i=$C(t,YC(".monaco-tl-indent")),n=$C(t,YC(".monaco-tl-twistie")),o=$C(t,YC(".monaco-tl-contents")),s=this.renderer.renderTemplate(o);return{container:e,indent:i,twistie:n,indentGuidesDisposable:Uo.None,templateData:s}}renderElement(e,t,i,n){"number"==typeof n&&(this.renderedNodes.set(e,{templateData:i,height:n}),this.renderedElements.set(e.element,e));const o=wK.DefaultIndent+(e.depth-1)*this.indent;i.twistie.style.paddingLeft=`${o}px`,i.indent.style.width=o+this.indent-16+"px",this.renderTwistie(e,i),"number"==typeof n&&this.renderIndentGuides(e,i),this.renderer.renderElement(e,t,i.templateData,n)}disposeElement(e,t,i,n){i.indentGuidesDisposable.dispose(),this.renderer.disposeElement&&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.renderTwistie(e,t.templateData),this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderIndentGuides(e,t.templateData))}renderTwistie(e,t){t.twistie.classList.remove(...br.treeItemExpanded.classNamesArray);let i=!1;this.renderer.renderTwistie&&(i=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(i||t.twistie.classList.add(...br.treeItemExpanded.classNamesArray),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded")}renderIndentGuides(e,t){if(eC(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const i=new ws,n=this.modelProvider();let o=e;for(;;){const e=n.getNodeLocation(o),s=n.getParentNodeLocation(e);if(!s)break;const r=n.getNode(s),a=YC(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(r)&&a.classList.add("active"),0===t.indent.childElementCount?t.indent.appendChild(a):t.indent.insertBefore(a,t.indent.firstElementChild),this.renderedIndentGuides.add(r,a),i.add(es((()=>this.renderedIndentGuides.delete(r,a)))),o=r}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(Bte){}})),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(),bs(this.disposables)}}wK.DefaultIndent=8;class CK{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 ws,e.onWillRefilter(this.reset,this,this.disposables)}get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}set pattern(e){this._pattern=e,this._lowercasePattern=e.toLowerCase()}filter(e,t){if(this._filter){const i=this._filter.filter(e,t);if(this.tree.options.simpleKeyboardNavigation)return i;let n;if(n="boolean"==typeof i?i?1:0:cK(i)?hK(i.visibility):i,0===n)return!1}if(this._totalCount++,this.tree.options.simpleKeyboardNavigation||!this._pattern)return this._matchCount++,{data:yH.Default,visibility:!0};const i=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),n=Array.isArray(i)?i:[i];for(const o of n){const e=o&&o.toString();if(void 0===e)return{data:yH.Default,visibility:!0};const t=xH(this._pattern,this._lowercasePattern,0,e,e.toLowerCase(),0,!0);if(t)return this._matchCount++,1===n.length?{data:t,visibility:!0}:{data:{label:e,score:t},visibility:!0}}return this.tree.options.filterOnType?2:{data:yH.Default,visibility:!0}}reset(){this._totalCount=0,this._matchCount=0}dispose(){bs(this.disposables)}}class yK{constructor(e,t,i,n,o){this.tree=e,this.view=i,this.filter=n,this.keyboardNavigationDelegate=o,this._enabled=!1,this._pattern="",this._empty=!1,this._onDidChangeEmptyState=new $o,this.positionClassName="ne",this.automaticKeyboardNavigation=!0,this.triggered=!1,this._onDidChangePattern=new $o,this.enabledDisposables=new ws,this.disposables=new ws,this.domNode=YC(`.monaco-list-type-filter.${this.positionClassName}`),this.domNode.draggable=!0,this.disposables.add(nC(this.domNode,"dragstart",(()=>this.onDragStart()))),this.messageDomNode=$C(i.getHTMLElement(),YC(".monaco-list-type-filter-message")),this.labelDomNode=$C(this.domNode,YC("span.label"));const s=$C(this.domNode,YC(".controls"));this._filterOnType=!!e.options.filterOnType,this.filterOnTypeDomNode=$C(s,YC("input.filter")),this.filterOnTypeDomNode.type="checkbox",this.filterOnTypeDomNode.checked=this._filterOnType,this.filterOnTypeDomNode.tabIndex=-1,this.updateFilterOnTypeTitleAndIcon(),this.disposables.add(nC(this.filterOnTypeDomNode,"input",(()=>this.onDidChangeFilterOnType()))),this.clearDomNode=$C(s,YC("button.clear"+br.treeFilterClear.cssSelector)),this.clearDomNode.tabIndex=-1,this.clearDomNode.title=mf(0,"Clear"),this.keyboardNavigationEventFilter=e.options.keyboardNavigationEventFilter,t.onDidSplice(this.onDidSpliceModel,this,this.disposables),this.updateOptions(e.options)}get enabled(){return this._enabled}get pattern(){return this._pattern}get filterOnType(){return this._filterOnType}updateOptions(e){e.simpleKeyboardNavigation?this.disable():this.enable(),void 0!==e.filterOnType&&(this._filterOnType=!!e.filterOnType,this.filterOnTypeDomNode.checked=this._filterOnType,this.updateFilterOnTypeTitleAndIcon()),void 0!==e.automaticKeyboardNavigation&&(this.automaticKeyboardNavigation=e.automaticKeyboardNavigation),this.tree.refilter(),this.render(),this.automaticKeyboardNavigation||this.onEventOrInput("")}enable(){if(this._enabled)return;const e=this.enabledDisposables.add(new eB(this.view.getHTMLElement(),"keydown")),t=ds.chain(e.event).filter((e=>!I$(e.target)||e.target===this.filterOnTypeDomNode)).filter((e=>"Dead"!==e.key&&!/^Media/.test(e.key))).map((e=>new jw(e))).filter(this.keyboardNavigationEventFilter||(()=>!0)).filter((()=>this.automaticKeyboardNavigation||this.triggered)).filter((e=>this.keyboardNavigationDelegate.mightProducePrintableCharacter(e)&&!(18===e.keyCode||16===e.keyCode||15===e.keyCode||17===e.keyCode)||(this.pattern.length>0||this.triggered)&&(9===e.keyCode||1===e.keyCode)&&!e.altKey&&!e.ctrlKey&&!e.metaKey||1===e.keyCode&&(zo?e.altKey&&!e.metaKey:e.ctrlKey)&&!e.shiftKey)).forEach((e=>{e.stopPropagation(),e.preventDefault()})).event,i=this.enabledDisposables.add(new eB(this.clearDomNode,"click"));ds.chain(ds.any(t,i.event)).event(this.onEventOrInput,this,this.enabledDisposables),this.filter.pattern="",this.tree.refilter(),this.render(),this._enabled=!0,this.triggered=!1}disable(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.clear(),this.tree.refilter(),this.render(),this._enabled=!1,this.triggered=!1)}onEventOrInput(e){"string"==typeof e?this.onInput(e):e instanceof MouseEvent||9===e.keyCode||1===e.keyCode&&(zo?e.altKey:e.ctrlKey)?this.onInput(""):1===e.keyCode?this.onInput(0===this.pattern.length?"":this.pattern.substr(0,this.pattern.length-1)):this.onInput(this.pattern+e.browserEvent.key)}onInput(e){const t=this.view.getHTMLElement();e&&!this.domNode.parentElement?t.append(this.domNode):!e&&this.domNode.parentElement&&(this.domNode.remove(),this.tree.domFocus()),this._pattern=e,this._onDidChangePattern.fire(e),this.filter.pattern=e,this.tree.refilter(),e&&this.tree.focusNext(0,!0,void 0,(e=>!yH.isDefault(e.filterData)));const i=this.tree.getFocus();if(i.length>0){const e=i[0];null===this.tree.getRelativeTop(e)&&this.tree.reveal(e,.5)}this.render(),e||(this.triggered=!1)}onDragStart(){const e=this.view.getHTMLElement(),{left:t}=yC(e),i=e.clientWidth,n=i/2,o=this.domNode.clientWidth,s=new ws;let r=this.positionClassName;const a=()=>{switch(r){case"nw":this.domNode.style.top="4px",this.domNode.style.left="4px";break;case"ne":this.domNode.style.top="4px",this.domNode.style.left=i-o-6+"px"}},l=()=>{this.positionClassName=r,this.domNode.className=`monaco-list-type-filter ${this.positionClassName}`,this.domNode.style.top="",this.domNode.style.left="",bs(s)};a(),this.domNode.classList.remove(r),this.domNode.classList.add("dragging"),s.add(es((()=>this.domNode.classList.remove("dragging")))),s.add(nC(document,"dragover",(e=>(e=>{e.preventDefault();const i=e.clientX-t;e.dataTransfer&&(e.dataTransfer.dropEffect="none"),r=il()))),pB.CurrentDragAndDropData=new gB("vscode-ui"),s.add(es((()=>pB.CurrentDragAndDropData=void 0)))}onDidSpliceModel(){this._enabled&&0!==this.pattern.length&&(this.tree.refilter(),this.render())}onDidChangeFilterOnType(){this.tree.updateOptions({filterOnType:this.filterOnTypeDomNode.checked}),this.tree.refilter(),this.tree.domFocus(),this.render(),this.updateFilterOnTypeTitleAndIcon()}updateFilterOnTypeTitleAndIcon(){this.filterOnType?(this.filterOnTypeDomNode.classList.remove(...br.treeFilterOnTypeOff.classNamesArray),this.filterOnTypeDomNode.classList.add(...br.treeFilterOnTypeOn.classNamesArray),this.filterOnTypeDomNode.title=mf(0,"Disable Filter on Type")):(this.filterOnTypeDomNode.classList.remove(...br.treeFilterOnTypeOn.classNamesArray),this.filterOnTypeDomNode.classList.add(...br.treeFilterOnTypeOff.classNamesArray),this.filterOnTypeDomNode.title=mf(0,"Enable Filter on Type"))}render(){const e=this.filter.totalCount>0&&0===this.filter.matchCount;this.pattern&&this.tree.options.filterOnType&&e?(this.messageDomNode.textContent=mf(0,"No elements found"),this._empty=!0):(this.messageDomNode.innerText="",this._empty=!1),this.domNode.classList.toggle("no-matches",e),this.domNode.title=mf(0,"Matched {0} out of {1} elements",this.filter.matchCount,this.filter.totalCount),this.labelDomNode.textContent=this.pattern.length>16?"…"+this.pattern.substr(this.pattern.length-16):this.pattern,this._onDidChangeEmptyState.fire(this._empty)}shouldAllowFocus(e){return!(this.enabled&&this.pattern&&!this.filterOnType)||(this.filter.totalCount>0&&this.filter.matchCount<=1||!yH.isDefault(e.filterData))}dispose(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.dispose(),this._enabled=!1,this.triggered=!1),this._onDidChangePattern.dispose(),bs(this.disposables)}}function xK(e){let t=oK.Unknown;return IC(e.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?t=oK.Twistie:IC(e.browserEvent.target,"monaco-tl-contents","monaco-tl-row")&&(t=oK.Element),{browserEvent:e.browserEvent,element:e.element?e.element.element:null,target:t}}function SK(e,t){t(e),e.children.forEach((e=>SK(e,t)))}class kK{constructor(e,t){this.getFirstViewElementWithTrait=e,this.identityProvider=t,this.nodes=[],this._onDidChange=new $o,this.onDidChange=this._onDidChange.event}get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}set(e,t){!(null==t?void 0:t.__forceEvent)&&jo(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=>SK(e,i))),void this.set([...e.values()])}const i=new Set,n=e=>i.add(this.identityProvider.getId(e.element).toString());t.forEach((e=>SK(e,n)));const o=new Map,s=e=>o.set(this.identityProvider.getId(e.element).toString(),e);e.forEach((e=>SK(e,s)));const r=[];for(const a of this.nodes){const e=this.identityProvider.getId(a.element).toString();if(i.has(e)){const t=o.get(e);t&&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 DK extends V${constructor(e,t){super(e),this.tree=t}onViewPointer(e){if(I$(e.browserEvent.target)||T$(e.browserEvent.target))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;let o=!1;if(o="function"==typeof this.tree.expandOnlyOnTwistieClick?this.tree.expandOnlyOnTwistieClick(t.element):!!this.tree.expandOnlyOnTwistieClick,o&&!n&&2!==e.browserEvent.detail)return super.onViewPointer(e);if(!this.tree.expandOnDoubleClick&&2===e.browserEvent.detail)return super.onViewPointer(e);if(t.collapsible){const i=this.tree.model,s=i.getNodeLocation(t),r=e.browserEvent.altKey;if(this.tree.setFocus([s]),i.setCollapsed(s,void 0,r),o&&n)return}super.onViewPointer(e)}onDoubleClick(e){!e.browserEvent.target.classList.contains("monaco-tl-twistie")&&this.tree.expandOnDoubleClick&&super.onDoubleClick(e)}}class LK extends G${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 DK(this,e.tree)}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(Qo([...super.getFocus(),...n])),o.length>0&&super.setSelection(Qo([...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||(void 0===e?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}}class NK{constructor(e,t,i,n,o={}){this._user=e,this._options=o,this.eventBufferer=new Ba,this.disposables=new ws,this._onWillRefilter=new $o,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new $o;const s=new vK(i),r=new Ua,a=new Ua,l=new bK(a.event);this.renderers=n.map((e=>new wK(e,(()=>this.model),r.event,l,o)));for(let g of this.renderers)this.disposables.add(g);let d;var c,h;o.keyboardNavigationLabelProvider&&(d=new CK(this,o.keyboardNavigationLabelProvider,o.filter),o=Object.assign(Object.assign({},o),{filter:d}),this.disposables.add(d)),this.focus=new kK((()=>this.view.getFocusedElements()[0]),o.identityProvider),this.selection=new kK((()=>this.view.getSelectedElements()[0]),o.identityProvider),this.anchor=new kK((()=>this.view.getAnchorElement()),o.identityProvider),this.view=new LK(e,t,s,this.renderers,this.focus,this.selection,this.anchor,Object.assign(Object.assign({},(c=()=>this.model,(h=o)&&Object.assign(Object.assign({},h),{identityProvider:h.identityProvider&&{getId:e=>h.identityProvider.getId(e.element)},dnd:h.dnd&&new _K(c,h.dnd),multipleSelectionController:h.multipleSelectionController&&{isSelectionSingleChangeEvent:e=>h.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},e),{element:e.element})),isSelectionRangeChangeEvent:e=>h.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))},accessibilityProvider:h.accessibilityProvider&&Object.assign(Object.assign({},h.accessibilityProvider),{getSetSize(e){const t=c(),i=t.getNodeLocation(e),n=t.getParentNodeLocation(i);return t.getNode(n).visibleChildrenCount},getPosInSet:e=>e.visibleChildIndex+1,isChecked:h.accessibilityProvider&&h.accessibilityProvider.isChecked?e=>h.accessibilityProvider.isChecked(e.element):void 0,getRole:h.accessibilityProvider&&h.accessibilityProvider.getRole?e=>h.accessibilityProvider.getRole(e.element):()=>"treeitem",getAriaLabel:e=>h.accessibilityProvider.getAriaLabel(e.element),getWidgetAriaLabel:()=>h.accessibilityProvider.getWidgetAriaLabel(),getWidgetRole:h.accessibilityProvider&&h.accessibilityProvider.getWidgetRole?()=>h.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:h.accessibilityProvider&&h.accessibilityProvider.getAriaLevel?e=>h.accessibilityProvider.getAriaLevel(e.element):e=>e.depth,getActiveDescendantId:h.accessibilityProvider.getActiveDescendantId&&(e=>h.accessibilityProvider.getActiveDescendantId(e.element))}),keyboardNavigationLabelProvider:h.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},h.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel:e=>h.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}),enableKeyboardNavigation:h.simpleKeyboardNavigation}))),{tree:this})),this.model=this.createModel(e,this.view,o),r.input=this.model.onDidChangeCollapseState;const u=ds.forEach(this.model.onDidSplice,(e=>{this.eventBufferer.bufferEvents((()=>{this.focus.onDidModelSplice(e),this.selection.onDidModelSplice(e)}))}));if(u((()=>null),null,this.disposables),a.input=ds.chain(ds.any(u,this.focus.onDidChange,this.selection.onDidChange)).debounce((()=>null),0).map((()=>{const e=new Set;for(const t of this.focus.getNodes())e.add(t);for(const t of this.selection.getNodes())e.add(t);return[...e.values()]})).event,!1!==o.keyboardSupport){const e=ds.chain(this.view.onKeyDown).filter((e=>!I$(e.target))).map((e=>new jw(e)));e.filter((e=>15===e.keyCode)).on(this.onLeftArrow,this,this.disposables),e.filter((e=>17===e.keyCode)).on(this.onRightArrow,this,this.disposables),e.filter((e=>10===e.keyCode)).on(this.onSpace,this,this.disposables)}if(o.keyboardNavigationLabelProvider){const e=o.keyboardNavigationDelegate||A$;this.typeFilterController=new yK(this,this.model,this.view,d,e),this.focusNavigationFilter=e=>this.typeFilterController.shouldAllowFocus(e),this.disposables.add(this.typeFilterController)}this.styleElement=RC(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===pK.Always)}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return ds.map(this.view.onMouseDblClick,xK)}get onPointer(){return ds.map(this.view.onPointer,xK)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return ds.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get expandOnDoubleClick(){return void 0===this._options.expandOnDoubleClick||this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return void 0===this._options.expandOnlyOnTwistieClick||this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}updateOptions(e={}){this._options=Object.assign(Object.assign({},this._options),e);for(const t of this.renderers)t.updateOptions(e);this.view.updateOptions(Object.assign(Object.assign({},this._options),{enableKeyboardNavigation:this._options.simpleKeyboardNavigation})),this.typeFilterController&&this.typeFilterController.updateOptions(this._options),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===pK.Always)}get options(){return this._options}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}domFocus(){this.view.domFocus()}layout(e,t){this.view.layout(e,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.treeIndentGuidesStroke.transparent(.4)}; }`),i.push(`.monaco-list${t} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`)),this.styleElement.textContent=i.join("\n"),this.view.style(e)}getParentElement(e){const t=this.model.getParentNodeLocation(e);return this.model.getNode(t).element}getFirstElementChild(e){return this.model.getFirstElementChild(e)}getNode(e){return this.model.getNode(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,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){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){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=this.focusNavigationFilter){this.view.focusNext(e,t,i,n)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);const i=this.model.getListIndex(e);-1!==i&&this.view.reveal(i,t)}getRelativeTop(e){const t=this.model.getListIndex(e);return-1===t?null:this.view.getRelativeTop(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);if(!this.model.setCollapsed(n,!0)){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);if(!this.model.setCollapsed(n,!1)){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(){bs(this.disposables),this.view.dispose()}}class EK{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new gK(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)=>i.sorter.compare(e.element,t.element)}),this.identityProvider=i.identityProvider}setChildren(e,t=Hs.empty(),i={}){const n=this.getElementLocation(e);this._setChildren(n,this.preserveCollapseState(t),i)}_setChildren(e,t=Hs.empty(),i){const n=new Set,o=new Set;this.model.splice([...e,0],Number.MAX_VALUE,t,Object.assign(Object.assign({},i),{onDidCreateNode:e=>{var t;if(null===e.element)return;const s=e;if(n.add(s.element),this.nodes.set(s.element,s),this.identityProvider){const e=this.identityProvider.getId(s.element).toString();o.add(e),this.nodesByIdentity.set(e,s)}null===(t=i.onDidCreateNode)||void 0===t||t.call(i,s)},onDidDeleteNode:e=>{var t;if(null===e.element)return;const s=e;if(n.has(s.element)||this.nodes.delete(s.element),this.identityProvider){const e=this.identityProvider.getId(s.element).toString();o.has(e)||this.nodesByIdentity.delete(e)}null===(t=i.onDidDeleteNode)||void 0===t||t.call(i,s)}}))}preserveCollapseState(e=Hs.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),Hs.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)return Object.assign(Object.assign({},e),{children:this.preserveCollapseState(e.children)});const i="boolean"==typeof e.collapsible?e.collapsible:t.collapsible,n=void 0!==e.collapsed?e.collapsed:t.collapsed;return Object.assign(Object.assign({},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 lK(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(null===e)throw new lK(this.user,"Invalid getParentNodeLocation call");const t=this.nodes.get(e);if(!t)throw new lK(this.user,`Tree element not found: ${e}`);const i=this.model.getNodeLocation(t),n=this.model.getParentNodeLocation(i);return this.model.getNode(n).element}getElementLocation(e){if(null===e)return[];const t=this.nodes.get(e);if(!t)throw new lK(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(t)}}function IK(e){return{element:{elements:[e.element],incompressible:e.incompressible||!1},children:Hs.map(Hs.from(e.children),IK),collapsible:e.collapsible,collapsed:e.collapsed}}function TK(e){const t=[e.element],i=e.incompressible||!1;let n,o;for(;[o,n]=Hs.consume(Hs.from(e.children),2),1===o.length&&!o[0].incompressible;)e=o[0],t.push(e.element);return{element:{elements:t,incompressible:i},children:Hs.map(Hs.concat(o,n),TK),collapsible:e.collapsible,collapsed:e.collapsed}}function MK(e,t=0){let i;return i=tMK(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 AK(e){return MK(e,0)}function OK(e,t,i){return e.element===t?Object.assign(Object.assign({},e),{children:i}):Object.assign(Object.assign({},e),{children:Hs.map(Hs.from(e.children),(e=>OK(e,t,i)))})}class RK{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new EK(e,t,i),this.enabled=void 0===i.compressionEnabled||i.compressionEnabled,this.identityProvider=i.identityProvider}get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}setChildren(e,t=Hs.empty(),i){const n=i.diffIdentityProvider&&(o=i.diffIdentityProvider,{getId:e=>e.elements.map((e=>o.getId(e).toString())).join("\0")});var o;if(null===e){const e=Hs.map(t,this.enabled?TK:IK);return void this._setChildren(null,e,{diffIdentityProvider:n,diffDepth:1/0})}const s=this.nodes.get(e);if(!s)throw new Error("Unknown compressed tree node");const r=this.model.getNode(s),a=this.model.getParentNodeLocation(s),l=this.model.getNode(a),d=OK(AK(r),e,t),c=(this.enabled?TK:IK)(d),h=l.children.map((e=>e===r?c:e));this._setChildren(l.element,h,{diffIdentityProvider:n,diffDepth:r.depth-l.depth})}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;const t=this.model.getNode().children,i=Hs.map(t,AK),n=Hs.map(i,e?TK:IK);this._setChildren(null,n,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,t,i){const n=new Set;this.model.setChildren(e,t,Object.assign(Object.assign({},i),{onDidCreateNode:e=>{for(const t of e.element.elements)n.add(t),this.nodes.set(t,e.element)},onDidDeleteNode:e=>{for(const t of e.element.elements)n.has(t)||this.nodes.delete(t)}}))}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(void 0===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 lK(this.user,`Tree element not found: ${e}`);return t}}const PK=e=>e[e.length-1];class FK{constructor(e,t){this.unwrapper=e,this.node=t}get element(){return null===this.node.element?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map((e=>new FK(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}}class BK{constructor(e,t,i={}){this.rootRef=null,this.elementMapper=i.elementMapper||PK;const n=e=>this.elementMapper(e.elements);this.nodeMapper=new dK((e=>new FK(n,e))),this.model=new RK(e,function(e,t){return{splice(i,n,o){t.splice(i,n,o.map((t=>e.map(t))))},updateElementHeight(e,i){t.updateElementHeight(e,i)}}}(this.nodeMapper,t),function(e,t){return Object.assign(Object.assign({},t),{identityProvider:t.identityProvider&&{getId:i=>t.identityProvider.getId(e(i))},sorter:t.sorter&&{compare:(e,i)=>t.sorter.compare(e.elements[0],i.elements[0])},filter:t.filter&&{filter:(i,n)=>t.filter.filter(e(i),n)}})}(n,i))}get onDidSplice(){return ds.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 ds.map(this.model.onDidChangeCollapseState,(({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t})))}get onDidChangeRenderNodeCount(){return ds.map(this.model.onDidChangeRenderNodeCount,(e=>this.nodeMapper.map(e)))}setChildren(e,t=Hs.empty(),i={}){this.model.setChildren(e,t,i)}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?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 VK=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(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 WK extends NK{constructor(e,t,i,n,o={}){super(e,t,i,n,o),this.user=e}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}setChildren(e,t=Hs.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 EK(e,t,i)}}class zK{constructor(e,t){this._compressedTreeNodeProvider=e,this.renderer=t,this.templateId=t.templateId,t.onDidChangeTwistieState&&(this.onDidChangeTwistieState=t.onDidChangeTwistieState)}get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}renderTemplate(e){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){const 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&&this.renderer.disposeCompressedElements(i.compressedTreeNode,t,i.data,n):this.renderer.disposeElement&&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)}}VK([tS],zK.prototype,"compressedTreeNodeProvider",null);class HK extends WK{constructor(e,t,i,n,o={}){const s=()=>this;super(e,t,i,n.map((e=>new zK(s,e))),function(e,t){return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(i){let n;try{n=e().getCompressedTreeNode(i)}catch(Bte){return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i)}return 1===n.element.elements.length?t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i):t.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(n.element.elements)}}})}(s,o))}setChildren(e,t=Hs.empty(),i){this.model.setChildren(e,t,i)}createModel(e,t,i){return new BK(e,t,i)}updateOptions(e={}){super.updateOptions(e),void 0!==e.compressionEnabled&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}var jK=globalThis&&globalThis.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,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){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function UK(e){return Object.assign(Object.assign({},e),{children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0})}function $K(e,t){return!!t.parent&&(t.parent===e||$K(e,t.parent))}class KK{constructor(e){this.node=e}get element(){return this.node.element.element}get children(){return this.node.children.map((e=>new KK(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}}class qK{constructor(e,t,i){this.renderer=e,this.nodeMapper=t,this.onDidChangeTwistieState=i,this.renderedNodes=new Map,this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}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(...br.treeItemLoading.classNamesArray),!0):(t.classList.remove(...br.treeItemLoading.classNamesArray),!1)}disposeElement(e,t,i,n){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}}function GK(e){return{browserEvent:e.browserEvent,elements:e.elements.map((e=>e.element))}}function ZK(e){return{browserEvent:e.browserEvent,element:e.element&&e.element.element,target:e.target}}class YK extends v${constructor(e){super(e.elements.map((e=>e.element))),this.data=e}}function XK(e){return e instanceof v$?new YK(e):e}class QK{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&&this.dnd.onDragStart(XK(e),t)}onDragOver(e,t,i,n,o=!0){return this.dnd.onDragOver(XK(e),t&&t.element,i,n)}drop(e,t,i,n){this.dnd.drop(XK(e),t&&t.element,i,n)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}}function JK(e){return e&&Object.assign(Object.assign({},e),{collapseByDefault:!0,identityProvider:e.identityProvider&&{getId:t=>e.identityProvider.getId(t.element)},dnd:e.dnd&&new QK(e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent:t=>e.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},t),{element:t.element})),isSelectionRangeChangeEvent:t=>e.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},t),{element:t.element}))},accessibilityProvider:e.accessibilityProvider&&Object.assign(Object.assign({},e.accessibilityProvider),{getPosInSet:void 0,getSetSize:void 0,getRole:e.accessibilityProvider.getRole?t=>e.accessibilityProvider.getRole(t.element):()=>"treeitem",isChecked:e.accessibilityProvider.isChecked?t=>{var i;return!!(null===(i=e.accessibilityProvider)||void 0===i?void 0:i.isChecked(t.element))}:void 0,getAriaLabel:t=>e.accessibilityProvider.getAriaLabel(t.element),getWidgetAriaLabel:()=>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)=>e.filter.filter(t.element,i)},keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},e.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel:t=>e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element)}),sorter:void 0,expandOnlyOnTwistieClick:void 0===e.expandOnlyOnTwistieClick?void 0:"function"!=typeof e.expandOnlyOnTwistieClick?e.expandOnlyOnTwistieClick:t=>e.expandOnlyOnTwistieClick(t.element),additionalScrollHeight:e.additionalScrollHeight})}function eq(e,t){t(e),e.children.forEach((e=>eq(e,t)))}class tq{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 $o,this._onDidChangeNodeSlowState=new $o,this.nodeMapper=new dK((e=>new KK(e))),this.disposables=new ws,this.identityProvider=s.identityProvider,this.autoExpandSingleChildren=void 0!==s.autoExpandSingleChildren&&s.autoExpandSingleChildren,this.sorter=s.sorter,this.collapseByDefault=s.collapseByDefault,this.tree=this.createTree(e,t,i,n,s),this.root=UK({element:void 0,parent:null,hasChildren:!0}),this.identityProvider&&(this.root=Object.assign(Object.assign({},this.root),{id:null})),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}get onDidChangeFocus(){return ds.map(this.tree.onDidChangeFocus,GK)}get onDidChangeSelection(){return ds.map(this.tree.onDidChangeSelection,GK)}get onMouseDblClick(){return ds.map(this.tree.onMouseDblClick,ZK)}get onPointer(){return ds.map(this.tree.onPointer,ZK)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidDispose(){return this.tree.onDidDispose}createTree(e,t,i,n,o){const s=new vK(i),r=n.map((e=>new qK(e,this.nodeMapper,this._onDidChangeNodeSlowState.event))),a=JK(o)||{};return new WK(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}domFocus(){this.tree.domFocus()}layout(e,t){this.tree.layout(e,t)}style(e){this.tree.style(e)}getInput(){return this.root.element}setInput(e,t){return jK(this,void 0,void 0,(function*(){this.refreshPromises.forEach((e=>e.cancel())),this.refreshPromises.clear(),this.root.element=e;const i=t&&{viewState:t,focus:[],selection:[]};yield 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)}))}_updateChildren(e=this.root.element,t=!0,i=!1,n,o){return jK(this,void 0,void 0,(function*(){if(void 0===this.root.element)throw new lK(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield ds.toPromise(this._onDidRender.event));const s=this.getDataNode(e);if(yield this.refreshAndRenderNode(s,t,n,o),i)try{this.tree.rerender(s)}catch(Bte){}}))}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)}expand(e,t=!1){return jK(this,void 0,void 0,(function*(){if(void 0===this.root.element)throw new lK(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield ds.toPromise(this._onDidRender.event));const i=this.getDataNode(e);if(this.tree.hasElement(i)&&!this.tree.isCollapsible(i))return!1;if(i.refreshPromise&&(yield this.root.refreshPromise,yield ds.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&&(yield this.root.refreshPromise,yield ds.toPromise(this._onDidRender.event)),n}))}setSelection(e,t){const i=e.map((e=>this.getDataNode(e)));this.tree.setSelection(i,t)}getSelection(){return this.tree.getSelection().map((e=>e.element))}setFocus(e,t){const i=e.map((e=>this.getDataNode(e)));this.tree.setFocus(i,t)}getFocus(){return this.tree.getFocus().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 lK(this.user,`Data tree node not found: ${e}`);return t}refreshAndRenderNode(e,t,i,n){return jK(this,void 0,void 0,(function*(){yield this.refreshNode(e,t,i),this.render(e,i,n)}))}refreshNode(e,t,i){return jK(this,void 0,void 0,(function*(){let n;return this.subTreeRefreshPromises.forEach(((o,s)=>{!n&&function(e,t){return e===t||$K(e,t)||$K(t,e)}(s,e)&&(n=o.then((()=>this.refreshNode(e,t,i))))})),n||this.doRefreshSubTree(e,t,i)}))}doRefreshSubTree(e,t,i){return jK(this,void 0,void 0,(function*(){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 o=yield this.doRefreshNode(e,t,i);e.stale=!1,yield ub.settled(o.map((e=>this.doRefreshSubTree(e,t,i))))}finally{n()}}))}doRefreshNode(e,t,i){return jK(this,void 0,void 0,(function*(){let n;if(e.hasChildren=!!this.dataSource.hasChildren(e.element),e.hasChildren){const t=this.doGetChildren(e);if($a(t))n=Promise.resolve(t);else{const i=nb(800);i.then((()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)}),(e=>null)),n=t.finally((()=>i.cancel()))}}else n=Promise.resolve(Hs.empty());try{const o=yield n;return this.setChildren(e,o,t,i)}catch(o){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),Ea(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 $a(i)?this.processChildren(i):(t=Xv((()=>jK(this,void 0,void 0,(function*(){return this.processChildren(yield 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(Jo))}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 d of e.children)if(s.set(d.element,d),this.identityProvider){const e=this.tree.isCollapsed(d);r.set(d.id,{node:d,collapsed:e})}const a=[],l=o.map((t=>{const o=!!this.dataSource.hasChildren(t);if(!this.identityProvider){const i=UK({element:t,parent:e,hasChildren:o});return o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(i.collapsedByDefault=!1,a.push(i)),i}const l=this.identityProvider.getId(t).toString(),d=r.get(l);if(d){const e=d.node;return s.delete(e.element),this.nodes.delete(e.element),this.nodes.set(t,e),e.element=t,e.hasChildren=o,i?d.collapsed?(e.children.forEach((e=>eq(e,(e=>this.nodes.delete(e.element))))),e.children.splice(0,e.children.length),e.stale=!0):a.push(e):o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(e.collapsedByDefault=!1,a.push(e)),e}const c=UK({element:t,parent:e,id:l,hasChildren:o});return n&&n.viewState.focus&&n.viewState.focus.indexOf(l)>-1&&n.focus.push(c),n&&n.viewState.selection&&n.viewState.selection.indexOf(l)>-1&&n.selection.push(c),n&&n.viewState.expanded&&n.viewState.expanded.indexOf(l)>-1?a.push(c):o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(c.collapsedByDefault=!1,a.push(c)),c}));for(const d of s.values())eq(d,(e=>this.nodes.delete(e.element)));for(const d of l)this.nodes.set(d.element,d);return e.children.splice(0,e.children.length,...l),e!==this.root&&this.autoExpandSingleChildren&&1===l.length&&0===a.length&&(l[0].collapsedByDefault=!1,a.push(l[0])),a}render(e,t,i){const n=e.children.map((e=>this.asTreeElement(e,t))),o=i&&Object.assign(Object.assign({},i),{diffIdentityProvider:i.diffIdentityProvider&&{getId:e=>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 i=!(t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1)&&e.collapsedByDefault,e.collapsedByDefault=void 0,{element:e,children:e.hasChildren?Hs.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()}}class iq{constructor(e){this.node=e}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 iq(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}}class nq{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){return{templateData:this.renderer.renderTemplate(e)}}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(...br.treeItemLoading.classNamesArray),!0):(t.classList.remove(...br.treeItemLoading.classNamesArray),!1)}disposeElement(e,t,i,n){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(e),t,i.templateData,n)}disposeCompressedElements(e,t,i,n){this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=bs(this.disposables)}}class oq extends tq{constructor(e,t,i,n,o,s,r={}){super(e,t,i,o,s,r),this.compressionDelegate=n,this.compressibleNodeMapper=new dK((e=>new iq(e))),this.filter=r.filter}createTree(e,t,i,n,o){const s=new vK(i),r=n.map((e=>new nq(e,this.nodeMapper,(()=>this.compressibleNodeMapper),this._onDidChangeNodeSlowState.event))),a=function(e){const t=e&&JK(e);return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},t.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel:t=>e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map((e=>e.element)))})})}(o)||{};return new HK(e,t,s,r,a)}asTreeElement(e,t){return Object.assign({incompressible:this.compressionDelegate.isIncompressible(e.element)},super.asTreeElement(e,t))}updateOptions(e={}){this.tree.updateOptions(e)}render(e,t){if(!this.identityProvider)return super.render(e,t);const i=e=>this.identityProvider.getId(e).toString(),n=e=>{const t=new Set;for(const n of e){const e=this.tree.getCompressedTreeNode(n===this.root?null:n);if(e.element)for(const n of e.element.elements)t.add(i(n.element))}return t},o=n(this.tree.getSelection()),s=n(this.tree.getFocus());super.render(e,t);const r=this.getSelection();let a=!1;const l=this.getFocus();let d=!1;const c=e=>{const t=e.element;if(t)for(let n=0;n{const t=this.filter.filter(e,1),i="boolean"==typeof(n=t)?n?1:0:cK(n)?hK(n.visibility):hK(n);var n;if(2===i)throw new Error("Recursive tree visibility not supported in async data compressed trees");return 1===i}))),super.processChildren(e)}}class sq extends NK{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 EK(e,t,i)}}new Uy("isMac",zo,mf(0,"Whether the operating system is macOS")),new Uy("isLinux",Vo,mf(0,"Whether the operating system is Linux"));const rq=new Uy("isWindows",Rs,mf(0,"Whether the operating system is Windows"));new Uy("isWeb",Fs,mf(0,"Whether the platform is a web browser")),new Uy("isMacNative",zo&&!Fs,mf(0,"Whether the operating system is macOS on a non-browser platform")),new Uy("isIOS",Vs,mf(0,"Whether the operating system is iOS")),new Uy("isDevelopment",!1,!0);const aq="inputFocus";new Uy(aq,!1,mf(0,"Whether keyboard focus is inside an input box"));var lq=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},dq=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}};const cq=L_("listService");let hq=class{constructor(e){this._themeService=e,this.disposables=new ws,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}get lastFocusedList(){return this._lastFocusedWidget}setLastFocusedList(e){var t,i;e!==this._lastFocusedWidget&&(null===(t=this._lastFocusedWidget)||void 0===t||t.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=e,null===(i=this._lastFocusedWidget)||void 0===i||i.getHTMLElement().classList.add("last-focused"))}register(e,t){if(!this._hasCreatedStyleController){this._hasCreatedStyleController=!0;const e=new W$(RC(),"");this.disposables.add($H(e,this._themeService))}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),e.getHTMLElement()===document.activeElement&&this.setLastFocusedList(e),ta(e.onDidFocus((()=>this.setLastFocusedList(e))),es((()=>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()}};hq=lq([dq(0,Qy)],hq);const uq=new Uy("listFocus",!0),gq=new Uy("listSupportsMultiselect",!0),pq=Sy.and(uq,Sy.not(aq)),mq=new Uy("listHasSelectionOrFocus",!1),fq=new Uy("listDoubleSelection",!1),_q=new Uy("listMultiSelection",!1),vq=new Uy("listSelectionNavigation",!1),bq=new Uy("treeElementCanCollapse",!1),wq=new Uy("treeElementHasParent",!1),Cq=new Uy("treeElementCanExpand",!1),yq=new Uy("treeElementHasChild",!1),xq="listAutomaticKeyboardNavigation";function Sq(e,t){const i=e.createScoped(t.getHTMLElement());return uq.bindTo(i),i}const kq="workbench.list.multiSelectModifier",Dq="workbench.list.openMode",Lq="workbench.list.horizontalScrolling",Nq="workbench.list.keyboardNavigation",Eq="workbench.list.automaticKeyboardNavigation",Iq="workbench.tree.indent",Tq="workbench.tree.renderIndentGuides",Mq="workbench.list.smoothScrolling",Aq="workbench.list.mouseWheelScrollSensitivity",Oq="workbench.list.fastScrollSensitivity",Rq="workbench.tree.expandMode";function Pq(e){return"alt"===e.getValue(kq)}class Fq extends Uo{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=Pq(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(kq)&&(this.useAltAsMultipleSelectionModifier=Pq(this.configurationService))})))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:P$(e)}isSelectionRangeChangeEvent(e){return F$(e)}}function Bq(e,t,i){var n;const o=new ws;return[Object.assign(Object.assign({},e),{keyboardNavigationDelegate:{mightProducePrintableCharacter:e=>i.mightProducePrintableCharacter(e)},smoothScrolling:Boolean(t.getValue(Mq)),mouseWheelScrollSensitivity:t.getValue(Aq),fastScrollSensitivity:t.getValue(Oq),multipleSelectionController:null!==(n=e.multipleSelectionController)&&void 0!==n?n:o.add(new Fq(t))}),o]}let Vq=class extends G${constructor(e,t,i,n,o,s,r,a,l,d){const c=void 0!==o.horizontalScrolling?o.horizontalScrolling:Boolean(l.getValue(Lq)),[h,u]=Bq(o,l,d);super(e,t,i,n,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},jH(a.getColorTheme(),KH)),h),{horizontalScrolling:c})),this.disposables.add(u),this.contextKeyService=Sq(s,this),this.themeService=a,this.listSupportsMultiSelect=gq.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==o.multipleSelectionSupport);vq.bindTo(this.contextKeyService).set(Boolean(o.selectionNavigation)),this.listHasSelectionOrFocus=mq.bindTo(this.contextKeyService),this.listDoubleSelection=fq.bindTo(this.contextKeyService),this.listMultiSelection=_q.bindTo(this.contextKeyService),this.horizontalScrolling=o.horizontalScrolling,this._useAltAsMultipleSelectionModifier=Pq(l),this.disposables.add(this.contextKeyService),this.disposables.add(r.register(this)),o.overrideStyles&&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(l.onDidChangeConfiguration((e=>{e.affectsConfiguration(kq)&&(this._useAltAsMultipleSelectionModifier=Pq(l));let t={};if(e.affectsConfiguration(Lq)&&void 0===this.horizontalScrolling){const e=Boolean(l.getValue(Lq));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(Mq)){const e=Boolean(l.getValue(Mq));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration(Aq)){const e=l.getValue(Aq);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(Oq)){const e=l.getValue(Oq);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new jq(this,Object.assign({configurationService:l},o)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;null===(t=this._styler)||void 0===t||t.dispose(),this._styler=$H(this,this.themeService,e)}dispose(){var e;null===(e=this._styler)||void 0===e||e.dispose(),super.dispose()}};Vq=lq([dq(5,$y),dq(6,cq),dq(7,Qy),dq(8,Cv),dq(9,kW)],Vq);let Wq=class extends class{constructor(e,t,i,n,o={}){const s=()=>this.model,r=n.map((e=>new Z$(e,s)));this.list=new G$(e,t,i,r,function(e,t){return Object.assign(Object.assign({},t),{accessibilityProvider:t.accessibilityProvider&&new Y$(e,t.accessibilityProvider)})}(s,o))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return ds.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 ds.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 ds.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,Oa(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()}}{constructor(e,t,i,n,o,s,r,a,l,d){const c=void 0!==o.horizontalScrolling?o.horizontalScrolling:Boolean(l.getValue(Lq)),[h,u]=Bq(o,l,d);super(e,t,i,n,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},jH(a.getColorTheme(),KH)),h),{horizontalScrolling:c})),this.disposables=new ws,this.disposables.add(u),this.contextKeyService=Sq(s,this),this.themeService=a,this.horizontalScrolling=o.horizontalScrolling,this.listSupportsMultiSelect=gq.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==o.multipleSelectionSupport);vq.bindTo(this.contextKeyService).set(Boolean(o.selectionNavigation)),this._useAltAsMultipleSelectionModifier=Pq(l),this.disposables.add(this.contextKeyService),this.disposables.add(r.register(this)),o.overrideStyles&&this.updateStyles(o.overrideStyles),o.overrideStyles&&this.disposables.add($H(this,a,o.overrideStyles)),this.disposables.add(l.onDidChangeConfiguration((e=>{e.affectsConfiguration(kq)&&(this._useAltAsMultipleSelectionModifier=Pq(l));let t={};if(e.affectsConfiguration(Lq)&&void 0===this.horizontalScrolling){const e=Boolean(l.getValue(Lq));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(Mq)){const e=Boolean(l.getValue(Mq));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration(Aq)){const e=l.getValue(Aq);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(Oq)){const e=l.getValue(Oq);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new jq(this,Object.assign({configurationService:l},o)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;null===(t=this._styler)||void 0===t||t.dispose(),this._styler=$H(this,this.themeService,e)}dispose(){var e;null===(e=this._styler)||void 0===e||e.dispose(),this.disposables.dispose(),super.dispose()}};Wq=lq([dq(5,$y),dq(6,cq),dq(7,Qy),dq(8,Cv),dq(9,kW)],Wq);let zq=class extends aK{constructor(e,t,i,n,o,s,r,a,l,d,c){const h=void 0!==s.horizontalScrolling?s.horizontalScrolling:Boolean(d.getValue(Lq)),[u,g]=Bq(s,d,c);super(e,t,i,n,o,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},jH(l.getColorTheme(),KH)),u),{horizontalScrolling:h})),this.disposables.add(g),this.contextKeyService=Sq(r,this),this.themeService=l,this.listSupportsMultiSelect=gq.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==s.multipleSelectionSupport);vq.bindTo(this.contextKeyService).set(Boolean(s.selectionNavigation)),this.listHasSelectionOrFocus=mq.bindTo(this.contextKeyService),this.listDoubleSelection=fq.bindTo(this.contextKeyService),this.listMultiSelection=_q.bindTo(this.contextKeyService),this.horizontalScrolling=s.horizontalScrolling,this._useAltAsMultipleSelectionModifier=Pq(d),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),s.overrideStyles&&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(d.onDidChangeConfiguration((e=>{e.affectsConfiguration(kq)&&(this._useAltAsMultipleSelectionModifier=Pq(d));let t={};if(e.affectsConfiguration(Lq)&&void 0===this.horizontalScrolling){const e=Boolean(d.getValue(Lq));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(Mq)){const e=Boolean(d.getValue(Mq));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration(Aq)){const e=d.getValue(Aq);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(Oq)){const e=d.getValue(Oq);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new Uq(this,Object.assign({configurationService:d},s)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;null===(t=this._styler)||void 0===t||t.dispose(),this._styler=$H(this,this.themeService,e)}dispose(){var e;null===(e=this._styler)||void 0===e||e.dispose(),this.disposables.dispose(),super.dispose()}};zq=lq([dq(6,$y),dq(7,cq),dq(8,Qy),dq(9,Cv),dq(10,kW)],zq);class Hq extends Uo{constructor(e,t){var i;super(),this.widget=e,this._onDidOpen=this._register(new $o),this.onDidOpen=this._onDidOpen.event,this._register(ds.filter(this.widget.onDidChangeSelection,(e=>e.browserEvent instanceof KeyboardEvent))((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(null==t?void 0:t.openOnSingleClick)&&(null==t?void 0:t.configurationService)?(this.openOnSingleClick="doubleClick"!==(null==t?void 0:t.configurationService.getValue(Dq)),this._register(null==t?void 0:t.configurationService.onDidChangeConfiguration((()=>{this.openOnSingleClick="doubleClick"!==(null==t?void 0:t.configurationService.getValue(Dq))})))):this.openOnSingleClick=null===(i=null==t?void 0:t.openOnSingleClick)||void 0===i||i}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;this._open(this.getSelectedElement(),i,n,!1,e.browserEvent)}onPointer(e,t){if(!this.openOnSingleClick)return;if(2===t.detail)return;const i=1===t.button,n=t.ctrlKey||t.metaKey||t.altKey;this._open(e,!0,i,n,t)}onMouseDblClick(e,t){if(!t)return;const i=t.target;if(i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&t.offsetX<16)return;const n=t.ctrlKey||t.metaKey||t.altKey;this._open(e,!1,!0,n,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 jq extends Hq{constructor(e,t){super(e,t),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class Uq extends Hq{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class $q extends Hq{constructor(e,t){super(e,t)}getSelectedElement(){var e;return null!==(e=this.widget.getSelection()[0])&&void 0!==e?e:void 0}}function Kq(e,t){let i=!1;return n=>{if(n.toKeybinding().isModifierKey())return!1;if(i)return i=!1,!1;const o=t.softDispatch(n,e);return o&&o.enterChord?(i=!0,!1):(i=!1,!0)}}let qq=class extends WK{constructor(e,t,i,n,o,s,r,a,l,d,c){const{options:h,getAutomaticKeyboardNavigation:u,disposable:g}=Qq(t,o,s,l,d,c);super(e,t,i,n,h),this.disposables.add(g),this.internals=new Jq(this,o,u,o.overrideStyles,s,r,a,l,c),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};qq=lq([dq(5,$y),dq(6,cq),dq(7,Qy),dq(8,Cv),dq(9,kW),dq(10,$x)],qq);let Gq=class extends HK{constructor(e,t,i,n,o,s,r,a,l,d,c){const{options:h,getAutomaticKeyboardNavigation:u,disposable:g}=Qq(t,o,s,l,d,c);super(e,t,i,n,h),this.disposables.add(g),this.internals=new Jq(this,o,u,o.overrideStyles,s,r,a,l,c),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};Gq=lq([dq(5,$y),dq(6,cq),dq(7,Qy),dq(8,Cv),dq(9,kW),dq(10,$x)],Gq);let Zq=class extends sq{constructor(e,t,i,n,o,s,r,a,l,d,c,h){const{options:u,getAutomaticKeyboardNavigation:g,disposable:p}=Qq(t,s,r,d,c,h);super(e,t,i,n,o,u),this.disposables.add(p),this.internals=new Jq(this,s,g,s.overrideStyles,r,a,l,d,h),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};Zq=lq([dq(6,$y),dq(7,cq),dq(8,Qy),dq(9,Cv),dq(10,kW),dq(11,$x)],Zq);let Yq=class extends tq{constructor(e,t,i,n,o,s,r,a,l,d,c,h){const{options:u,getAutomaticKeyboardNavigation:g,disposable:p}=Qq(t,s,r,d,c,h);super(e,t,i,n,o,u),this.disposables.add(p),this.internals=new Jq(this,s,g,s.overrideStyles,r,a,l,d,h),this.disposables.add(this.internals)}get onDidOpen(){return this.internals.onDidOpen}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};Yq=lq([dq(6,$y),dq(7,cq),dq(8,Qy),dq(9,Cv),dq(10,kW),dq(11,$x)],Yq);let Xq=class extends oq{constructor(e,t,i,n,o,s,r,a,l,d,c,h,u){const{options:g,getAutomaticKeyboardNavigation:p,disposable:m}=Qq(t,r,a,c,h,u);super(e,t,i,n,o,s,g),this.disposables.add(m),this.internals=new Jq(this,r,p,r.overrideStyles,a,l,d,c,u),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};function Qq(e,t,i,n,o,s){var r;const a=()=>{let e=Boolean(i.getContextKeyValue(xq));return e&&(e=Boolean(n.getValue(Eq))),e},l=s.isScreenReaderOptimized(),d=t.simpleKeyboardNavigation||l?"simple":n.getValue(Nq),c=void 0!==t.horizontalScrolling?t.horizontalScrolling:Boolean(n.getValue(Lq)),[h,u]=Bq(t,n,o),g=t.additionalScrollHeight;return{getAutomaticKeyboardNavigation:a,disposable:u,options:Object.assign(Object.assign({keyboardSupport:!1},h),{indent:"number"==typeof n.getValue(Iq)?n.getValue(Iq):void 0,renderIndentGuides:n.getValue(Tq),smoothScrolling:Boolean(n.getValue(Mq)),automaticKeyboardNavigation:a(),simpleKeyboardNavigation:"simple"===d,filterOnType:"filter"===d,horizontalScrolling:c,keyboardNavigationEventFilter:Kq(e,o),additionalScrollHeight:g,hideTwistiesOfChildlessElements:t.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:null!==(r=t.expandOnlyOnTwistieClick)&&void 0!==r?r:"doubleClick"===n.getValue(Rq)})}}Xq=lq([dq(7,$y),dq(8,cq),dq(9,Qy),dq(10,Cv),dq(11,kW),dq(12,$x)],Xq);let Jq=class{constructor(e,t,i,n,o,s,r,a,l){this.tree=e,this.themeService=r,this.disposables=[],this.contextKeyService=Sq(o,e),this.listSupportsMultiSelect=gq.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==t.multipleSelectionSupport);vq.bindTo(this.contextKeyService).set(Boolean(t.selectionNavigation)),this.hasSelectionOrFocus=mq.bindTo(this.contextKeyService),this.hasDoubleSelection=fq.bindTo(this.contextKeyService),this.hasMultiSelection=_q.bindTo(this.contextKeyService),this.treeElementCanCollapse=bq.bindTo(this.contextKeyService),this.treeElementHasParent=wq.bindTo(this.contextKeyService),this.treeElementCanExpand=Cq.bindTo(this.contextKeyService),this.treeElementHasChild=yq.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=Pq(a);const d=new Set;d.add(xq);const c=()=>{const t=l.isScreenReaderOptimized()?"simple":a.getValue(Nq);e.updateOptions({simpleKeyboardNavigation:"simple"===t,filterOnType:"filter"===t})};this.updateStyleOverrides(n);const h=()=>{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))};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),h()})),e.onDidChangeCollapseState(h),e.onDidChangeModel(h),a.onDidChangeConfiguration((n=>{let o={};if(n.affectsConfiguration(kq)&&(this._useAltAsMultipleSelectionModifier=Pq(a)),n.affectsConfiguration(Iq)){const e=a.getValue(Iq);o=Object.assign(Object.assign({},o),{indent:e})}if(n.affectsConfiguration(Tq)){const e=a.getValue(Tq);o=Object.assign(Object.assign({},o),{renderIndentGuides:e})}if(n.affectsConfiguration(Mq)){const e=Boolean(a.getValue(Mq));o=Object.assign(Object.assign({},o),{smoothScrolling:e})}if(n.affectsConfiguration(Nq)&&c(),n.affectsConfiguration(Eq)&&(o=Object.assign(Object.assign({},o),{automaticKeyboardNavigation:i()})),n.affectsConfiguration(Lq)&&void 0===t.horizontalScrolling){const e=Boolean(a.getValue(Lq));o=Object.assign(Object.assign({},o),{horizontalScrolling:e})}if(n.affectsConfiguration(Rq)&&void 0===t.expandOnlyOnTwistieClick&&(o=Object.assign(Object.assign({},o),{expandOnlyOnTwistieClick:"doubleClick"===a.getValue(Rq)})),n.affectsConfiguration(Aq)){const e=a.getValue(Aq);o=Object.assign(Object.assign({},o),{mouseWheelScrollSensitivity:e})}if(n.affectsConfiguration(Oq)){const e=a.getValue(Oq);o=Object.assign(Object.assign({},o),{fastScrollSensitivity:e})}Object.keys(o).length>0&&e.updateOptions(o)})),this.contextKeyService.onDidChangeContext((t=>{t.affectsSome(d)&&e.updateOptions({automaticKeyboardNavigation:i()})})),l.onDidChangeScreenReaderOptimized((()=>c()))),this.navigator=new $q(e,Object.assign({configurationService:a},t)),this.disposables.push(this.navigator)}get onDidOpen(){return this.navigator.onDidOpen}updateOptions(e){void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyleOverrides(e){bs(this.styler),this.styler=e?$H(this.tree,this.themeService,e):Uo.None}dispose(){this.disposables=bs(this.disposables),bs(this.styler),this.styler=void 0}};Jq=lq([dq(4,$y),dq(5,cq),dq(6,Qy),dq(7,Cv),dq(8,$x)],Jq);var eG;Yy.as(cA).registerConfiguration({id:"workbench",order:7,title:mf(0,"Workbench"),type:"object",properties:{[kq]:{type:"string",enum:["ctrlCmd","alt"],enumDescriptions:[mf(0,"Maps to `Control` on Windows and Linux and to `Command` on macOS."),mf(0,"Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:mf(0,"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.")},[Dq]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:mf(0,"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.")},[Lq]:{type:"boolean",default:!1,description:mf(0,"Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[Iq]:{type:"number",default:8,minimum:4,maximum:40,description:mf(0,"Controls tree indentation in pixels.")},[Tq]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:mf(0,"Controls whether the tree should render indent guides.")},[Mq]:{type:"boolean",default:!1,description:mf(0,"Controls whether lists and trees have smooth scrolling.")},[Aq]:{type:"number",default:1,description:mf(0,"A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[Oq]:{type:"number",default:5,description:mf(0,"Scrolling speed multiplier when pressing `Alt`.")},[Nq]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[mf(0,"Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),mf(0,"Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),mf(0,"Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:mf(0,"Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter.")},[Eq]:{type:"boolean",default:!0,markdownDescription:mf(0,"Controls whether keyboard navigation in lists and trees is automatically triggered simply by typing. If set to `false`, keyboard navigation is only triggered when executing the `list.toggleKeyboardNavigation` command, for which you can assign a keyboard shortcut.")},[Rq]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:mf(0,"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.")}}}),function(e){e[e.PRESERVE=0]="PRESERVE",e[e.LAST=1]="LAST"}(eG||(eG={}));const tG="workbench.contributions.quickaccess";Yy.add(tG,new class{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)),es((()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)}))}getQuickAccessProviders(){return Sa([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find((t=>e.startsWith(t.prefix)))||void 0||this.defaultProvider}});const iG=L_("quickInputService");var nG=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},oG=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}};let sG=class extends Uo{constructor(e,t){super(),this.quickInputService=e,this.instantiationService=t,this.registry=Yy.as(tG),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(e="",t){this.doShowOrPick(e,!1,t)}doShowOrPick(e,t,i){var n;const[o,s]=this.getOrInstantiateProvider(e),r=this.visibleQuickAccess,a=null==r?void 0:r.descriptor;if(r&&s&&a===s)return e===s.prefix||(null==i?void 0:i.preserveValue)||(r.picker.value=e),void this.adjustValueSelection(r.picker,s,i);if(s&&!(null==i?void 0:i.preserveValue)){let t;if(r&&a&&a!==s){const e=r.value.substr(a.prefix.length);e&&(t=`${s.prefix}${e}`)}if(!t){const e=null==o?void 0:o.defaultFilterValue;e===eG.LAST?t=this.lastAcceptedPickerValues.get(s):"string"==typeof e&&(t=`${s.prefix}${e}`)}"string"==typeof t&&(e=t)}const l=new ws,d=l.add(this.quickInputService.createQuickPick());let c;d.value=e,this.adjustValueSelection(d,s,i),d.placeholder=null==s?void 0:s.placeholder,d.quickNavigate=null==i?void 0:i.quickNavigateConfiguration,d.hideInput=!!d.quickNavigate&&!r,("number"==typeof(null==i?void 0:i.itemActivation)||(null==i?void 0:i.quickNavigateConfiguration))&&(d.itemActivation=null!==(n=null==i?void 0:i.itemActivation)&&void 0!==n?n:bU.SECOND),d.contextKey=null==s?void 0:s.contextKey,d.filterValue=e=>e.substring(s?s.prefix.length:0),(null==s?void 0:s.placeholder)&&(d.ariaLabel=null==s?void 0:s.placeholder),t&&(c=new hb,l.add(kr(d.onWillAccept)((e=>{e.veto(),d.hide()})))),l.add(this.registerPickerListeners(d,o,s,e));const h=l.add(new as);return o&&l.add(o.provide(d,h.token)),kr(d.onDidHide)((()=>{0===d.selectedItems.length&&h.cancel(),l.dispose(),null==c||c.complete(d.selectedItems.slice(0))})),d.show(),t?null==c?void 0:c.p:void 0}adjustValueSelection(e,t,i){var n;let o;o=(null==i?void 0:i.preserveValue)?[e.value.length,e.value.length]:[null!==(n=null==t?void 0:t.prefix.length)&&void 0!==n?n:0,e.value.length],e.valueSelection=o}registerPickerListeners(e,t,i,n){const o=new ws,s=this.visibleQuickAccess={picker:e,descriptor:i,value:n};return o.add(es((()=>{s===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)}))),o.add(e.onDidChangeValue((e=>{const[i]=this.getOrInstantiateProvider(e);i!==t?this.show(e,{preserveValue:!0}):s.value=e}))),i&&o.add(e.onDidAccept((()=>{this.lastAcceptedPickerValues.set(i,e.value)}))),o}getOrInstantiateProvider(e){const t=this.registry.getQuickAccessProvider(e);if(!t)return[void 0,void 0];let i=this.mapProviderToDescriptor.get(t);return i||(i=this.instantiationService.createInstance(t.ctor),this.mapProviderToDescriptor.set(t,i)),[i,t]}};sG=nG([oG(0,iG),oG(1,k_)],sG);var rG=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},aG=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}};let lG=class extends rx{constructor(e,t,i,n,o){super(i),this.instantiationService=e,this.contextKeyService=t,this.accessibilityService=n,this.layoutService=o,this.contexts=new Map}get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(sG))),this._quickAccess}createController(e=this.layoutService,t){var i,n;const o={idPrefix:"quickInput_",container:e.container,ignoreFocusOut:()=>!1,isScreenReaderOptimized:()=>this.accessibilityService.isScreenReaderOptimized(),backKeybindingLabel:()=>{},setContextKey:e=>this.setContextKey(e),returnFocus:()=>e.focus(),createList:(e,t,i,n,o)=>this.instantiationService.createInstance(Vq,e,t,i,n,o),styles:this.computeStyles()},s=this._register(new d$(Object.assign(Object.assign({},o),t)));return s.layout(e.dimension,null!==(n=null===(i=e.offset)||void 0===i?void 0:i.top)&&void 0!==n?n:0),this._register(e.onDidLayout((t=>{var i,n;return s.layout(t,null!==(n=null===(i=e.offset)||void 0===i?void 0:i.top)&&void 0!==n?n:0)}))),this._register(s.onShow((()=>this.resetContextKeys()))),this._register(s.onHide((()=>this.resetContextKeys()))),s}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new Uy(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),t&&t.get()||(this.resetContextKeys(),t&&t.set(!0))}resetContextKeys(){this.contexts.forEach((e=>{e.get()&&e.reset()}))}pick(e,t={},i=Ia.None){return this.controller.pick(e,t,i)}createQuickPick(){return this.controller.createQuickPick()}updateStyles(){this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:Object.assign({},jH(this.theme,{quickInputBackground:wk,quickInputForeground:Ck,quickInputTitleBackground:yk,contrastBorder:yS,widgetShadow:LS})),inputBox:jH(this.theme,{inputForeground:ES,inputBackground:NS,inputBorder:IS,inputValidationInfoBackground:OS,inputValidationInfoForeground:RS,inputValidationInfoBorder:PS,inputValidationWarningBackground:FS,inputValidationWarningForeground:BS,inputValidationWarningBorder:VS,inputValidationErrorBackground:WS,inputValidationErrorForeground:zS,inputValidationErrorBorder:HS}),countBadge:jH(this.theme,{badgeBackground:YS,badgeForeground:XS,badgeBorder:yS}),button:jH(this.theme,{buttonForeground:KS,buttonBackground:qS,buttonHoverBackground:GS,buttonBorder:yS}),progressBar:jH(this.theme,{progressBarBackground:ik}),keybindingLabel:jH(this.theme,{keybindingLabelBackground:kk,keybindingLabelForeground:Dk,keybindingLabelBorder:Lk,keybindingLabelBottomBorder:Nk,keybindingLabelShadow:LS}),list:jH(this.theme,{listBackground:wk,listInactiveFocusForeground:WD,listInactiveSelectionIconForeground:zD,listInactiveFocusBackground:HD,listFocusOutline:xS,listInactiveFocusOutline:xS,pickerGroupBorder:Sk,pickerGroupForeground:xk})}}};lG=rG([aG(0,k_),aG(1,$y),aG(2,Qy),aG(3,$x),aG(4,CV)],lG);var dG=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},cG=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}};let hG=class extends lG{constructor(e,t,i,n,o,s){super(t,i,n,o,new kV(e.getContainerDomNode(),s)),this.host=void 0;const r=gG.get(e);if(r){const t=r.widget;this.host={_serviceBrand:void 0,get hasContainer(){return!0},get container(){return t.getDomNode()},get dimension(){return e.getLayoutInfo()},get onDidLayout(){return e.onDidLayoutChange},focus:()=>e.focus()}}else this.host=void 0}createController(){return super.createController(this.host)}};hG=dG([cG(1,k_),cG(2,$y),cG(3,Qy),cG(4,$x),cG(5,N_)],hG);let uG=class{constructor(e,t){this.instantiationService=e,this.codeEditorService=t,this.mapEditorToService=new Map}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(hG,e);this.mapEditorToService.set(e,t),kr(e.onDidDispose)((()=>{i.dispose(),this.mapEditorToService.delete(e)}))}return t}get quickAccess(){return this.activeService.quickAccess}pick(e,t={},i=Ia.None){return this.activeService.pick(e,t,i)}createQuickPick(){return this.activeService.createQuickPick()}};uG=dG([cG(0,k_),cG(1,N_)],uG);class gG{constructor(e){this.editor=e,this.widget=new pG(this.editor)}static get(e){return e.getContribution(gG.ID)}dispose(){this.widget.dispose()}}gG.ID="editor.controller.quickInput";class pG{constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return pG.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}pG.ID="editor.contrib.quickInputWidget",Ix(gG.ID,gG);class mG{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}}const fG=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;class _G{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(e){if(null===e)return 0;const t=e.match(fG);if(!t)throw new Error("Illegal value for token color: "+e);e=t[1].toUpperCase();let i=this._color2id.get(e);return i||(i=++this._lastColorId,this._color2id.set(e,i),this._id2color[i]=hS.fromHex("#"+e),i)}getColorMap(){return this._id2color.slice(0)}}class vG{constructor(e,t){this._colorMap=e,this._root=t,this._cache=new Map}static createFromRawTokenTheme(e,t){return this.createFromParsedTokenTheme(function(e){if(!e||!Array.isArray(e))return[];const t=[];let i=0;for(let n=0,o=e.length;n{const i=function(e,t){return et?1:0}(e.token,t.token);return 0!==i?i:e.index-t.index}));let i=0,n="000000",o="ffffff";for(;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(let c of t)s.getId(c);const r=s.getId(n),a=s.getId(o),l=new wG(i,r,a),d=new CG(l);for(let c=0,h=e.length;c>>0,this._cache.set(t,i)}return(i|e<<0)>>>0}}const bG=/\b(comment|string|regex|regexp)\b/;class wG{constructor(e,t,i){this._themeTrieElementRuleBrand=void 0,this._fontStyle=e,this._foreground=t,this._background=i,this.metadata=(this._fontStyle<<10|this._foreground<<14|this._background<<23)>>>0}clone(){return new wG(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<<10|this._foreground<<14|this._background<<23)>>>0}}class CG{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 void 0!==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);void 0===a&&(a=new CG(this._mainRule.clone()),this._children.set(s,a)),a.insert(r,t,i,n)}}const yG={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"098658"},{token:"attribute.value.unit",foreground:"098658"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[pk]:"#FFFFFE",[mk]:"#000000",[Tk]:"#E5EBF1",[YN]:"#D3D3D3",[XN]:"#939393",[Mk]:"#ADD6FF4D"}},xG={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[pk]:"#1E1E1E",[mk]:"#D4D4D4",[Tk]:"#3A3D41",[YN]:"#404040",[XN]:"#707070",[Mk]:"#ADD6FF26"}},SG={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"metatag.content.html",foreground:"1AEBFF"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key",foreground:"9CDCFE"},{token:"string.value",foreground:"CE9178"},{token:"attribute.name",foreground:"569CD6"},{token:"attribute.value",foreground:"3FF23F"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[pk]:"#000000",[mk]:"#FFFFFF",[YN]:"#FFFFFF",[XN]:"#FFFFFF"}};class kG{getIcon(e){const t=yB();let i=e.defaults;for(;ex.isThemeIcon(i);){const e=t.getIcon(i.id);if(!e)return;i=e.defaults}return i}}const DG="vs",LG="vs-dark",NG="hc-black",EG=Yy.as(mS),IG=Yy.as(nx);class TG{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;const i=t.base;e.length>0?(MG(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(let t in this.themeData.colors)e.set(t,hS.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){const t=AG(this.themeData.base);for(let i in t.colors)e.has(i)||e.set(i,hS.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=EG.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return Object.prototype.hasOwnProperty.call(this.getColors(),e)}get type(){switch(this.base){case DG:return Xy.LIGHT;case NG:return Xy.HIGH_CONTRAST;default:return Xy.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){const i=AG(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=vG.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,i){const n=this.tokenTheme._match([e].concat(t).join(".")).metadata,o=ys.getForeground(n),s=ys.getFontStyle(n);return{foreground:o,italic:Boolean(1&s),bold:Boolean(2&s),underline:Boolean(4&s),strikethrough:Boolean(8&s)}}}function MG(e){return e===DG||e===LG||e===NG}function AG(e){switch(e){case DG:return yG;case LG:return xG;case NG:return SG}}function OG(e){const t=AG(e);return new TG(e,t)}const RG=L_("themeService");var PG=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},FG=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}};let BG=class extends Uo{constructor(e,t){super(),this._contextKeyService=e,this._configurationService=t,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new $o,this._accessibilityModeEnabledContext=Kx.bindTo(this._contextKeyService);const i=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration("editor.accessibilitySupport")&&(i(),this._onDidChangeScreenReaderOptimized.fire())}))),i(),this.onDidChangeScreenReaderOptimized((()=>i()))}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const e=this._configurationService.getValue("editor.accessibilitySupport");return"on"===e||"auto"===e&&2===this._accessibilitySupport}getAccessibilitySupport(){return this._accessibilitySupport}};BG=PG([FG(0,$y),FG(1,Cv)],BG);var VG=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},WG=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}};let zG=class{constructor(e){this._commandService=e}createMenu(e,t,i){return new HG(e,Object.assign({emitEventsForSubmenuChanges:!1,eventDebounceDelay:50},i),this._commandService,t,this)}};zG=VG([WG(0,wy)],zG);let HG=class e{constructor(e,t,i,n,o){this._id=e,this._options=t,this._commandService=i,this._contextKeyService=n,this._menuService=o,this._disposables=new ws,this._menuGroups=[],this._contextKeys=new Set,this._build();const s=new lb((()=>{this._build(),this._onDidChange.fire(this)}),t.eventDebounceDelay);this._disposables.add(s),this._disposables.add(ux.onDidChangeMenu((t=>{t.has(e)&&s.schedule()})));const r=this._disposables.add(new ws);this._onDidChange=new $o({onFirstListenerAdd:()=>{const e=new lb((()=>this._onDidChange.fire(this)),t.eventDebounceDelay);r.add(e),r.add(n.onDidChangeContext((t=>{t.affectsSome(this._contextKeys)&&e.schedule()})))},onLastListenerRemove:r.clear.bind(r)}),this.onDidChange=this._onDidChange.event}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}_build(){this._menuGroups.length=0,this._contextKeys.clear();const t=ux.getMenuItems(this._id);let i;t.sort(e._compareMenuItems);for(const e of t){const t=e.group||"";i&&i[0]===t||(i=[t,[]],this._menuGroups.push(i)),i[1].push(e),this._collectContextKeys(e)}}_collectContextKeys(t){if(e._fillInKbExprKeys(t.when,this._contextKeys),dx(t)){if(t.command.precondition&&e._fillInKbExprKeys(t.command.precondition,this._contextKeys),t.command.toggled){const i=t.command.toggled.condition||t.command.toggled;e._fillInKbExprKeys(i,this._contextKeys)}}else this._options.emitEventsForSubmenuChanges&&ux.getMenuItems(t.submenu).forEach(this._collectContextKeys,this)}getActions(e){const t=[];for(let i of this._menuGroups){const[n,o]=i,s=[];for(const t of o)if(this._contextKeyService.contextMatchesRules(t.when)){const i=dx(t)?new px(t.command,t.alt,e,this._contextKeyService,this._commandService):new gx(t,this._menuService,this._contextKeyService,e);s.push(i)}s.length>0&&t.push([n,s])}return t}static _fillInKbExprKeys(e,t){if(e)for(let i of e.keys())t.add(i)}static _compareMenuItems(t,i){let n=t.group,o=i.group;if(n!==o){if(!n)return 1;if(!o)return-1;if("navigation"===n)return-1;if("navigation"===o)return 1;let e=n.localeCompare(o);if(0!==e)return e}let s=t.order||0,r=i.order||0;return sr?1:e._compareTitles(dx(t)?t.command.title:t.title,dx(i)?i.command.title:i.title)}static _compareTitles(e,t){const i="string"==typeof e?e:e.original,n="string"==typeof t?t:t.original;return i.localeCompare(n)}};HG=VG([WG(2,wy),WG(3,$y),WG(4,hx)],HG);var jG=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},UG=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}},$G=globalThis&&globalThis.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,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){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let KG=class extends Uo{constructor(e,t){super(),this.layoutService=e,this.logService=t,this.mapTextToType=new Map,this.findText="",(a_||l_)&&this.installWebKitWriteTextWorkaround()}installWebKitWriteTextWorkaround(){const e=()=>{const e=new hb;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=e,navigator.clipboard.write([new ClipboardItem({"text/plain":e.p})]).catch((t=>$G(this,void 0,void 0,(function*(){t instanceof Error&&"NotAllowedError"===t.name&&e.isRejected||this.logService.error(t)}))))};this.layoutService.hasContainer&&(this._register(nC(this.layoutService.container,"click",e)),this._register(nC(this.layoutService.container,"keydown",e)))}writeText(e,t){return $G(this,void 0,void 0,(function*(){if(t)return void this.mapTextToType.set(t,e);if(this.webKitPendingClipboardWritePromise)return this.webKitPendingClipboardWritePromise.complete(e);try{return yield navigator.clipboard.writeText(e)}catch(o){}const i=document.activeElement,n=document.body.appendChild(YC("textarea",{"aria-hidden":!0}));n.style.height="1px",n.style.width="1px",n.style.position="absolute",n.value=e,n.focus(),n.select(),document.execCommand("copy"),i instanceof HTMLElement&&i.focus(),document.body.removeChild(n)}))}readText(e){return $G(this,void 0,void 0,(function*(){if(e)return this.mapTextToType.get(e)||"";try{return yield navigator.clipboard.readText()}catch(t){return""}}))}readFindText(){return $G(this,void 0,void 0,(function*(){return this.findText}))}writeFindText(e){return $G(this,void 0,void 0,(function*(){this.findText=e}))}};KG=jG([UG(0,CV),UG(1,Cb)],KG);var qG=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},GG=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}};const ZG="data-keybinding-context";class YG{constructor(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value._contextId=e}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 void 0===t&&this._parent?this._parent.getValue(e):t}}class XG extends YG{constructor(){super(-1,null)}setValue(e,t){return!1}removeValue(e){return!1}getValue(e){}}XG.INSTANCE=new XG;class QG extends YG{constructor(e,t,i){super(e,null),this._configurationService=t,this._values=GV.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration((e=>{if(6===e.source){const e=Array.from(Hs.map(this._values,(([e])=>e)));this._values.clear(),i.fire(new tZ(e))}else{const t=[];for(const i of e.affectedKeys){const e=`config.${i}`,n=this._values.findSuperstr(e);void 0!==n&&(t.push(...Hs.map(n,(([e])=>e))),this._values.deleteSuperstr(e)),this._values.has(e)&&(t.push(e),this._values.delete(e))}i.fire(new tZ(t))}}))}dispose(){this._listener.dispose()}getValue(e){if(0!==e.indexOf(QG._keyPrefix))return super.getValue(e);if(this._values.has(e))return this._values.get(e);const t=e.substr(QG._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)}}QG._keyPrefix="config.";class JG{constructor(e,t,i){this._service=e,this._key=t,this._defaultValue=i,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){void 0===this._defaultValue?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class eZ{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}}class tZ{constructor(e){this.keys=e}affectsSome(e){for(const t of this.keys)if(e.has(t))return!0;return!1}}class iZ{constructor(e){this.events=e}affectsSome(e){for(const t of this.events)if(t.affectsSome(e))return!0;return!1}}class nZ{constructor(e){this._onDidChangeContext=new Ka({merge:e=>new iZ(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 JG(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 sZ(this,e)}contextMatchesRules(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const t=this.getContextValuesContainer(this._myContextId);return!e||e.evaluate(t)}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 eZ(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new eZ(e))}getContext(e){return this._isDisposed?XG.INSTANCE:this.getContextValuesContainer(function(e){for(;e;){if(e.hasAttribute(ZG)){const t=e.getAttribute(ZG);return t?parseInt(t,10):NaN}e=e.parentElement}return 0}(e))}}let oZ=class extends nZ{constructor(e){super(0),this._contexts=new Map,this._toDispose=new ws,this._lastContextId=0;const t=new QG(this._myContextId,e,this._onDidChangeContext);this._contexts.set(this._myContextId,t),this._toDispose.add(t)}dispose(){this._onDidChangeContext.dispose(),this._isDisposed=!0,this._toDispose.dispose()}getContextValuesContainer(e){return this._isDisposed?XG.INSTANCE:this._contexts.get(e)||XG.INSTANCE}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");let t=++this._lastContextId;return this._contexts.set(t,new YG(t,this.getContextValuesContainer(e))),t}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};oZ=qG([GG(0,Cv)],oZ);class sZ extends nZ{constructor(e,t){if(super(e.createChildContext()),this._parentChangeListener=new Rr,this._parent=e,this._updateParentChangeListener(),this._domNode=t,this._domNode.hasAttribute(ZG)){let e="";this._domNode.classList&&(e=Array.from(this._domNode.classList.values()).join(", "))}this._domNode.setAttribute(ZG,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(this._onDidChangeContext.fire,this._onDidChangeContext)}dispose(){this._isDisposed||(this._onDidChangeContext.dispose(),this._parent.disposeContext(this._myContextId),this._parentChangeListener.dispose(),this._domNode.removeAttribute(ZG),this._isDisposed=!0)}getContextValuesContainer(e){return this._isDisposed?XG.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)}}Cy.registerCommand("setContext",(function(e,t,i){e.get($y).createKey(String(t),i)})),Cy.registerCommand({id:"getContextKeyInfo",handler:()=>[...Uy.all()].sort(((e,t)=>e.key.localeCompare(t.key))),description:{description:mf(0,"A command that returns information about context keys"),args:[]}}),Cy.registerCommand("_generateContextKeyInfo",(function(){const e=[],t=new Set;for(let i of Uy.all())t.has(i.key)||(t.add(i.key),e.push(i));e.sort(((e,t)=>e.key.localeCompare(t.key)))}));class rZ{constructor(e){this.incoming=new Map,this.outgoing=new Map,this.data=e}}class aZ{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){const e=[];for(let 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(this._hashFn(t),n),n.incoming.set(this._hashFn(e),i)}removeNode(e){const t=this._hashFn(e);this._nodes.delete(t);for(let 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 rZ(e),this._nodes.set(t,i)),i}isEmpty(){return 0===this._nodes.size}toString(){let e=[];for(let[t,i]of this._nodes)e.push(`${t}, (incoming)[${[...i.incoming.keys()].join(", ")}], (outgoing)[${[...i.outgoing.keys()].join(",")}]`);return e.join("\n")}findCycleSlow(){for(let[e,t]of this._nodes){const i=new Set([e]),n=this._findCycle(t,i);if(n)return n}}_findCycle(e,t){for(let[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)}}}class lZ extends Error{constructor(e){var t;super("cyclic dependency between services"),this.message=null!==(t=e.findCycleSlow())&&void 0!==t?t:`UNABLE to detect cycle, dumping graph: \n${e.toString()}`}}class dZ{constructor(e=new pF,t=!1,i){this._activeInstantiations=new Set,this._services=e,this._strict=t,this._parent=i,this._services.set(k_,this)}createChild(e){return new dZ(e,this._strict,this)}invokeFunction(e,...t){let i=cZ.traceInvocation(e),n=!1;try{return e({get:e=>{if(n)throw qa("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}},...t)}finally{n=!0,i.stop()}}createInstance(e,...t){let i,n;return e instanceof Nv?(i=cZ.traceCreation(e.ctor),n=this._createInstance(e.ctor,e.staticArguments.concat(t),i)):(i=cZ.traceCreation(e),n=this._createInstance(e,t,i)),i.stop(),n}_createInstance(e,t=[],i){let n=S_.getServiceDependencies(e).sort(((e,t)=>e.index-t.index)),o=[];for(const r of n){let t=this._getOrCreateServiceInstance(r.id,i);t||this._throwIfStrict(`[createInstance] ${e.name} depends on UNKNOWN service ${r.id}.`,!1),o.push(t)}let s=n.length>0?n[0].index:t.length;if(t.length!==s){let e=s-t.length;t=e>0?t.concat(new Array(e)):t.slice(0,s)}return new e(...[...t,...o])}_setServiceInstance(e,t){if(this._services.get(e)instanceof Nv)this._services.set(e,t);else{if(!this._parent)throw new Error("illegalState - setting UNKNOWN service instance");this._parent._setServiceInstance(e,t)}}_getServiceInstanceOrDescriptor(e){let t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){let i=this._getServiceInstanceOrDescriptor(e);return i instanceof Nv?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 aZ((e=>e.id.toString()));let o=0;const s=[{id:e,desc:t,_trace:i}];for(;s.length;){const t=s.pop();if(n.lookupOrInsertNode(t),o++>1e3)throw new lZ(n);for(let i of S_.getServiceDependencies(t.desc.ctor)){let o=this._getServiceInstanceOrDescriptor(i.id);if(o||this._throwIfStrict(`[createInstance] ${e} depends on ${i.id} which is NOT registered.`,!0),o instanceof Nv){const e={id:i.id,desc:o,_trace:t._trace.branch(i.id,!0)};n.insertEdge(t,e),s.push(e)}}}for(;;){const e=n.roots();if(0===e.length){if(!n.isEmpty())throw new lZ(n);break}for(const{data:t}of e){if(this._getServiceInstanceOrDescriptor(t.id)instanceof Nv){const e=this._createServiceInstanceWithOwner(t.id,t.desc.ctor,t.desc.staticArguments,t.desc.supportsDelayedInstantiation,t._trace);this._setServiceInstance(t.id,e)}n.removeNode(t)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,i=[],n,o){if(this._services.get(e)instanceof Nv)return this._createServiceInstance(t,i,n,o);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){if(i){const i=new cb((()=>this._createInstance(e,t,n)));return new Proxy(Object.create(null),{get(e,t){if(t in e)return e[t];let n=i.value,o=n[t];return"function"!=typeof o||(o=o.bind(n),e[t]=o),o},set:(e,t,n)=>(i.value[t]=n,!0)})}return this._createInstance(e,t,n)}_throwIfStrict(e,t){if(this._strict)throw new Error(e)}}class cZ{constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}static traceInvocation(e){return cZ._None}static traceCreation(e){return cZ._None}branch(e,t){let i=new cZ(2,e.toString());return this._dep.push([e,t,i]),i}stop(){let e=Date.now()-this._start;cZ._totals+=e;let t=!1;this.type,this.name,function e(i,n){let o=[],s=new Array(i+1).join("\t");for(const[r,a,l]of n._dep)if(a&&l){t=!0,o.push(`${s}CREATES -> ${r}`);let n=e(i+1,l);n&&o.push(n)}else o.push(`${s}uses -> ${r}`);return o.join("\n")}(1,this),e.toFixed(2),cZ._totals.toFixed(2)}}cZ._None=new class extends cZ{constructor(){super(-1,null)}stop(){}branch(){return this}},cZ._totals=0;class hZ{constructor(){this._byResource=new YV,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 YV,this._byOwner.set(t,o)),o.set(e,i)}get(e,t){let i=this._byResource.get(e);return null==i?void 0:i.get(t)}delete(e,t){let i=!1,n=!1,o=this._byResource.get(e);o&&(i=o.delete(t));let s=this._byOwner.get(t);if(s&&(n=s.delete(e)),i!==n)throw new Error("illegal state");return i&&n}values(e){var t,i,n,o;return"string"==typeof e?null!==(i=null===(t=this._byOwner.get(e))||void 0===t?void 0:t.values())&&void 0!==i?i:Hs.empty():Ps.isUri(e)?null!==(o=null===(n=this._byResource.get(e))||void 0===n?void 0:n.values())&&void 0!==o?o:Hs.empty():Hs.map(Hs.concat(...this._byOwner.values()),(e=>e[1]))}}class uZ{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new YV,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(e.scheme===Yw.inMemory||e.scheme===Yw.walkThrough||e.scheme===Yw.walkThroughSnippet)return t;for(const{severity:i}of this._service.read({resource:e}))i===uj.Error?t.errors+=1:i===uj.Warning?t.warnings+=1:i===uj.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 gZ{constructor(){this._onMarkerChanged=new Ga({delay:0,merge:gZ._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new hZ,this._stats=new uZ(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(Za(i)){this._data.delete(t,e)&&this._onMarkerChanged.fire([t])}else{const n=[];for(const o of i){const i=gZ._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:d,endColumn:c,relatedInformation:h,tags:u}=i;if(s)return a=a>0?a:1,l=l>0?l:1,d=d>=a?d:a,c=c>0?c:l,{resource:t,owner:e,code:n,severity:o,message:s,source:r,startLineNumber:a,startColumn:l,endLineNumber:d,endColumn:c,relatedInformation:h,tags:u}}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(gZ._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(null!=i?i:t),s=[];for(const t of e)for(const e of t)if(gZ._accept(e,n)){const t=s.push(e);if(o>0&&t===o)return s}return s}{const e=[];for(let t of this._data.values())for(let i of t)if(gZ._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 YV;for(let i of e)for(let e of i)t.set(e,!0);return Array.from(t.keys())}}var pZ,mZ=globalThis&&globalThis.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,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){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};!function(e){e[e.None=0]="None",e[e.Initialized=1]="Initialized",e[e.Closed=2]="Closed"}(pZ||(pZ={}));class fZ extends Uo{constructor(e,t=Object.create(null)){super(),this.database=e,this.options=t,this._onDidChangeStorage=this._register(new $o),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=pZ.None,this.cache=new Map,this.flushDelayer=new ib(fZ.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){var t,i;null===(t=e.changed)||void 0===t||t.forEach(((e,t)=>this.accept(t,e))),null===(i=e.deleted)||void 0===i||i.forEach((e=>this.accept(e,void 0)))}accept(e,t){if(this.state===pZ.Closed)return;let i=!1;if(Tr(t))i=this.cache.delete(e);else{this.cache.get(e)!==t&&(this.cache.set(e,t),i=!0)}i&&this._onDidChangeStorage.fire(e)}get(e,t){const i=this.cache.get(e);return Tr(i)?t:i}getBoolean(e,t){const i=this.get(e);return Tr(i)?t:"true"===i}getNumber(e,t){const i=this.get(e);return Tr(i)?t:parseInt(i,10)}set(e,t){return mZ(this,void 0,void 0,(function*(){if(this.state===pZ.Closed)return;if(Tr(t))return this.delete(e);const i=String(t);return this.cache.get(e)!==i?(this.cache.set(e,i),this.pendingInserts.set(e,i),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire(e),this.doFlush()):void 0}))}delete(e){return mZ(this,void 0,void 0,(function*(){if(this.state===pZ.Closed)return;return this.cache.delete(e)?(this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire(e),this.doFlush()):void 0}))}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}flushPending(){return mZ(this,void 0,void 0,(function*(){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((()=>{var e;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)null===(e=this.whenFlushedCallbacks.pop())||void 0===e||e()}))}))}doFlush(e){return mZ(this,void 0,void 0,(function*(){return this.flushDelayer.trigger((()=>this.flushPending()),e)}))}dispose(){this.flushDelayer.dispose(),super.dispose()}}fZ.DEFAULT_FLUSH_DELAY=100;class _Z{constructor(){this.onDidChangeItemsExternal=ds.None,this.items=new Map}updateItems(e){return mZ(this,void 0,void 0,(function*(){e.insert&&e.insert.forEach(((e,t)=>this.items.set(t,e))),e.delete&&e.delete.forEach((e=>this.items.delete(e)))}))}}const vZ="__$__targetStorageMarker",bZ=L_("storageService");var wZ;!function(e){e[e.NONE=0]="NONE",e[e.SHUTDOWN=1]="SHUTDOWN"}(wZ||(wZ={}));class CZ extends Uo{constructor(e={flushInterval:CZ.DEFAULT_FLUSH_INTERVAL}){super(),this.options=e,this._onDidChangeValue=this._register(new Ka),this._onDidChangeTarget=this._register(new Ka),this._onWillSaveState=this._register(new $o),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._globalKeyTargets=void 0}emitDidChangeValue(e,t){t===vZ?(0===e?this._globalKeyTargets=void 0:1===e&&(this._workspaceKeyTargets=void 0),this._onDidChangeTarget.fire({scope:e})):this._onDidChangeValue.fire({scope:e,key:t,target:this.getKeyTargets(e)[t]})}get(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.get(e,i)}getBoolean(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.getBoolean(e,i)}getNumber(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.getNumber(e,i)}store(e,t,i,n){Tr(t)?this.remove(e,i):this.withPausedEmitters((()=>{var o;this.updateKeyTarget(e,i,n),null===(o=this.getStorage(i))||void 0===o||o.set(e,t)}))}remove(e,t){this.withPausedEmitters((()=>{var i;this.updateKeyTarget(e,t,void 0),null===(i=this.getStorage(t))||void 0===i||i.delete(e)}))}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,t,i){var n,o;const s=this.getKeyTargets(t);"number"==typeof i?s[e]!==i&&(s[e]=i,null===(n=this.getStorage(t))||void 0===n||n.set(vZ,JSON.stringify(s))):"number"==typeof s[e]&&(delete s[e],null===(o=this.getStorage(t))||void 0===o||o.set(vZ,JSON.stringify(s)))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get globalKeyTargets(){return this._globalKeyTargets||(this._globalKeyTargets=this.loadKeyTargets(0)),this._globalKeyTargets}getKeyTargets(e){return 0===e?this.globalKeyTargets:this.workspaceKeyTargets}loadKeyTargets(e){const t=this.get(vZ,e);if(t)try{return JSON.parse(t)}catch(i){}return Object.create(null)}}CZ.DEFAULT_FLUSH_INTERVAL=6e4;function yZ(e,t,i,n,o){if(Array.isArray(e)){let s=0;for(const r of e){const e=yZ(r,t,i,n,o);if(10===e)return e;e>s&&(s=e)}return s}if("string"==typeof e)return n?"*"===e?5:e===i?10:0:0;if(e){const{language:l,pattern:d,scheme:c,hasAccessToAllModels:h,notebookType:u}=e;if(!n&&!h)return 0;let g=0;if(c)if(c===t.scheme)g=10;else{if("*"!==c)return 0;g=5}if(l)if(l===i)g=10;else{if("*"!==l)return 0;g=Math.max(g,5)}if(u)if(u===o)g=10;else{if("*"!==u)return 0;g=Math.max(g,5)}if(d){let e;if(e="string"==typeof d?d:Object.assign(Object.assign({},d),{base:Vr(d.base)}),e!==t.fsPath&&(s=e,r=t.fsPath,!s||"string"!=typeof r||!Dz(s)(r,void 0,a)))return 0;g=10}return g}return 0;var s,r,a}function xZ(e){return"string"!=typeof e&&(Array.isArray(e)?e.every(xZ):!!e.exclusive)}class SZ{constructor(e){this._notebookTypeResolver=e,this._clock=0,this._entries=[],this._onDidChange=new $o,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),es((()=>{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);const t=[];for(let i of this._entries)i._score>0&&t.push(i.provider);return t}ordered(e){const t=[];return this._orderedForEach(e,(e=>t.push(e.provider))),t}orderedGroups(e){const t=[];let i,n;return this._orderedForEach(e,(e=>{i&&n===e._score?i.push(e.provider):(n=e._score,i=[e.provider],t.push(i))})),t}_orderedForEach(e,t){if(e){this._updateScores(e);for(const e of this._entries)e._score>0&&t(e)}}_updateScores(e){var t;const i=null===(t=this._notebookTypeResolver)||void 0===t?void 0:t.call(this,e.uri),n={uri:e.uri.toString(),language:e.getLanguageId(),notebookType:i};if(!this._lastCandidate||this._lastCandidate.language!==n.language||this._lastCandidate.uri!==n.uri||this._lastCandidate.notebookType!==n.notebookType){this._lastCandidate=n;for(let t of this._entries)if(t._score=yZ(t.selector,e.uri,e.getLanguageId(),Ya(e),i),xZ(t.selector)&&t._score>0){for(let e of this._entries)e._score=0;t._score=1e3;break}this._entries.sort(SZ._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._scoret._score?-1:e._timet._time?-1:0}}Iv(Lb,class{constructor(){this.referenceProvider=new SZ(this._score.bind(this)),this.renameProvider=new SZ(this._score.bind(this)),this.codeActionProvider=new SZ(this._score.bind(this)),this.definitionProvider=new SZ(this._score.bind(this)),this.typeDefinitionProvider=new SZ(this._score.bind(this)),this.declarationProvider=new SZ(this._score.bind(this)),this.implementationProvider=new SZ(this._score.bind(this)),this.documentSymbolProvider=new SZ(this._score.bind(this)),this.inlayHintsProvider=new SZ(this._score.bind(this)),this.colorProvider=new SZ(this._score.bind(this)),this.codeLensProvider=new SZ(this._score.bind(this)),this.documentFormattingEditProvider=new SZ(this._score.bind(this)),this.documentRangeFormattingEditProvider=new SZ(this._score.bind(this)),this.onTypeFormattingEditProvider=new SZ(this._score.bind(this)),this.signatureHelpProvider=new SZ(this._score.bind(this)),this.hoverProvider=new SZ(this._score.bind(this)),this.documentHighlightProvider=new SZ(this._score.bind(this)),this.selectionRangeProvider=new SZ(this._score.bind(this)),this.foldingRangeProvider=new SZ(this._score.bind(this)),this.linkProvider=new SZ(this._score.bind(this)),this.inlineCompletionsProvider=new SZ(this._score.bind(this)),this.completionProvider=new SZ(this._score.bind(this)),this.linkedEditingRangeProvider=new SZ(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new SZ(this._score.bind(this)),this.documentSemanticTokensProvider=new SZ(this._score.bind(this))}_score(e){var t;return null===(t=this._notebookTypeResolver)||void 0===t?void 0:t.call(this,e)}},!0);var kZ=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},DZ=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}},LZ=globalThis&&globalThis.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,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){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class NZ{constructor(e){this.disposed=!1,this.model=e,this._onWillDispose=new $o}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}let EZ=class{constructor(e){this.modelService=e}createModelReference(e){const t=this.modelService.getModel(e);return t?Promise.resolve(new Xa(new NZ(t))):Promise.reject(new Error("Model not found"))}};EZ=kZ([DZ(0,Gv)],EZ);class IZ{show(){return IZ.NULL_PROGRESS_RUNNER}showWhile(e,t){return LZ(this,void 0,void 0,(function*(){yield e}))}}IZ.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};class TZ{info(e){return this.notify({severity:fF.Info,message:e})}warn(e){return this.notify({severity:fF.Warning,message:e})}error(e){return this.notify({severity:fF.Error,message:e})}notify(e){switch(e.severity){case fF.Error:case fF.Warning:}return TZ.NO_OP}status(e,t){return Uo.None}}TZ.NO_OP=new class{};let MZ=class{constructor(e){this._onWillExecuteCommand=new $o,this._onDidExecuteCommand=new $o,this.onWillExecuteCommand=this._onWillExecuteCommand.event,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){const i=Cy.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)}}};MZ=kZ([DZ(0,k_)],MZ);let AZ=class extends xW{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 ws;t.add(nC(e,zC.KEY_DOWN,(e=>{const t=new jw(e);this._dispatch(t,t.target)&&(t.preventDefault(),t.stopPropagation())}))),t.add(nC(e,zC.KEY_UP,(e=>{const t=new jw(e);this._singleModifierDispatch(t,t.target)&&t.preventDefault()}))),this._domNodeListeners.push(new OZ(e,t))},a=e=>{for(let t=0;t{e.getOption(54)||r(e.getContainerDomNode())};this._register(s.onCodeEditorAdd(l)),this._register(s.onCodeEditorRemove((e=>{e.getOption(54)||a(e.getContainerDomNode())}))),s.listCodeEditors().forEach(l);const d=e=>{r(e.getContainerDomNode())};this._register(s.onDiffEditorAdd(d)),this._register(s.onDiffEditorRemove((e=>{a(e.getContainerDomNode())}))),s.listDiffEditors().forEach(d)}addDynamicKeybinding(e,t,i,n){const o=Pw(t,Xs),s=new ws;return o&&(this._dynamicKeybindings.push({keybinding:o.parts,command:e,when:n,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}),s.add(es((()=>{for(let t=0;tthis._log(e)))}return this._cachedResolver}_documentHasFocus(){return 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=PW.resolveUserBinding(s,Xs);for(const s of r)i[n++]=new EW(s,o.command,o.commandArgs,e,t,null,!1)}else i[n++]=new EW(void 0,o.command,o.commandArgs,e,t,null,!1)}return i}resolveKeyboardEvent(e){const t=new Bw(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode).toChord();return new PW(t,Xs)}};AZ=kZ([DZ(0,$y),DZ(1,wy),DZ(2,vx),DZ(3,vF),DZ(4,Cb),DZ(5,N_)],AZ);class OZ extends Uo{constructor(e,t){super(),this.domNode=e,this._register(t)}}function RZ(e){return e&&"object"==typeof e&&(!e.overrideIdentifier||"string"==typeof e.overrideIdentifier)&&(!e.resource||e.resource instanceof Ps)}class PZ{constructor(){this._onDidChangeConfiguration=new $o,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._configuration=new wW(new bW,new vW)}getValue(e,t){const i="string"==typeof e?e:void 0,n=RZ(e)?e:RZ(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 CW({keys:i,overrides:[]},t,this._configuration);e.source=7,e.sourceConfig=null,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)}}let FZ=class{constructor(e){this.configurationService=e,this._onDidChangeConfiguration=new $o,this.configurationService.onDidChangeConfiguration((e=>{this._onDidChangeConfiguration.fire({affectedKeys:e.affectedKeys,affectsConfiguration:(t,i)=>e.affectsConfiguration(i)})}))}getValue(e,t,i){const n=(er.isIPosition(t)?t:null)?"string"==typeof i?i:void 0:"string"==typeof t?t:void 0;return void 0===n?this.configurationService.getValue():this.configurationService.getValue(n)}};FZ=kZ([DZ(0,Cv)],FZ);let BZ=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:Vo||zo?"\n":"\r\n"}};BZ=kZ([DZ(0,Cv)],BZ);class VZ{constructor(){const e=Ps.from({scheme:VZ.SCHEME,authority:"model",path:"/"});this.workspace={id:"4064f6ec-cb38-4ad0-af64-ee6467e63c82",folders:[new WW({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}}function WZ(e,t,i){if(!t)return;if(!(e instanceof PZ))return;const n=[];Object.keys(t).forEach((e=>{(function(e){return fW()[`editor.${e}`]||!1})(e)&&n.push([`editor.${e}`,t[e]]),i&&function(e){return fW()[`diffEditor.${e}`]||!1}(e)&&n.push([`diffEditor.${e}`,t[e]])})),n.length>0&&e.updateValues(n)}VZ.SCHEME="inmemory";let zZ=class{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}apply(e,t){return LZ(this,void 0,void 0,(function*(){const t=new Map;for(let o of e){if(!(o instanceof cW))throw new Error("bad edit - only text edits are supported");const e=this._modelService.getModel(o.resource);if(!e)throw new Error("bad edit - model not found");if("number"==typeof o.versionId&&e.getVersionId()!==o.versionId)throw new Error("bad state - model changed in the meantime");let i=t.get(e);i||(i=[],t.set(e,i)),i.push(_W.replaceMove(qo.lift(o.textEdit.range),o.textEdit.text))}let i=0,n=0;for(const[e,o]of t)e.pushStackElement(),e.pushEditOperations([],o,(()=>[])),e.pushStackElement(),n+=1,i+=o.length;return{ariaSummary:Aa(YW.bulkEditServiceSummary,i,n)}}))}};zZ=kZ([DZ(0,Gv)],zZ);let HZ=class extends sz{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)}};HZ=kZ([DZ(0,CV),DZ(1,N_)],HZ);let jZ=class extends XH{constructor(e,t,i,n,o){super(e,t,i,n,o),this.configure({blockMouse:!1})}};var UZ;jZ=kZ([DZ(0,vx),DZ(1,vF),DZ(2,VB),DZ(3,kW),DZ(4,Qy)],jZ),Iv(Cv,PZ),Iv(bb,FZ),Iv(wb,BZ),Iv(BW,VZ),Iv(FW,class{getUriLabel(e,t){return"file"===e.scheme?e.fsPath:e.path}}),Iv(vx,class{publicLog(e,t){return Promise.resolve(void 0)}publicLog2(e,t){return this.publicLog(e,t)}}),Iv(DV,class{confirm(e){return this.doConfirm(e).then((e=>({confirmed:e,checkboxChecked:!1})))}doConfirm(e){let t=e.message;return e.detail&&(t=t+"\n\n"+e.detail),Promise.resolve(window.confirm(t))}show(e,t,i,n){return Promise.resolve({choice:0})}}),Iv(vF,TZ),Iv(pj,gZ),Iv(Lv,class extends Bz{constructor(){super()}}),Iv(RG,class extends Uo{constructor(){super(),this._onColorThemeChange=this._register(new $o),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new $o),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new kG,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(DG,OG(DG)),this._knownThemes.set(LG,OG(LG)),this._knownThemes.set(NG,OG(NG));const e=function(e){const t=new $o,i=yB();return i.onDidChange((()=>t.fire())),null==e||e.onDidProductIconThemeChange((()=>t.fire())),{onDidChange:t.event,getCSS(){const t=e?e.getProductIconTheme():new kG,n={},o=e=>{const i=t.getIcon(e);if(!i)return;const o=i.font;return o?(n[o.id]=o.definition,`.codicon-${e.id}:before { content: '${i.fontCharacter}'; font-family: ${iy(o.id)}; }`):`.codicon-${e.id}:before { content: '${i.fontCharacter}'; }`},s=[];for(let e of i.getIcons()){const t=o(e);t&&s.push(t)}for(let e in n){const t=n[e],i=t.weight?`font-weight: ${t.weight};`:"",o=t.style?`font-style: ${t.style};`:"",r=t.src.map((e=>`${ty(e.location)} format('${e.format}')`)).join(", ");s.push(`@font-face { src: ${r}; font-family: ${iy(e)};${i}${o} font-display: block; }`)}return s.join("\n")}}}(this);var t,i;this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS}\n${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(DG),e.onDidChange((()=>{this._codiconCSS=e.getCSS(),this._updateCSS()})),t="(forced-colors: active)",i=()=>{this._updateActualTheme()},window.matchMedia(t).addEventListener("change",i)}registerEditorContainer(e){return MC(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=RC(),this._globalStyleElement.className="monaco-colors",this._globalStyleElement.textContent=this._allCSS,this._styleElements.push(this._globalStyleElement)),Uo.None}_registerShadowDomContainer(e){const t=RC(e);return t.className="monaco-colors",t.textContent=this._allCSS,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(DG),this._desiredTheme=t,this._updateActualTheme()}_updateActualTheme(){const e=this._autoDetectHighContrast&&window.matchMedia("(forced-colors: active)").matches?this._knownThemes.get(NG):this._desiredTheme;this._theme!==e&&(this._theme=e,this._updateThemeOrColorMap())}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._updateActualTheme()}_updateThemeOrColorMap(){const e=[],t={},i={addRule:i=>{t[i]||(e.push(i),t[i]=!0)}};IG.getThemingParticipants().forEach((e=>e(this._theme,i,this._environment)));const n=[];for(const s of EG.getColors()){const e=this._theme.getColor(s.id,!0);e&&n.push(`${pS(s.id)}: ${e.toString()};`)}i.addRule(`.monaco-editor { ${n.join("\n")} }`);const o=this._colorMapOverride||this._theme.tokenTheme.getColorMap();i.addRule(function(e){const t=[];for(let i=1,n=e.length;ie.textContent=this._allCSS))}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}}),Iv(Cb,class extends Db{constructor(){super(new kb)}}),Iv(Gv,$j),Iv(uy,vj),Iv($y,oZ),Iv($B,IZ),Iv(bZ,class extends CZ{constructor(){super(),this.globalStorage=this._register(new fZ(new _Z)),this.workspaceStorage=this._register(new fZ(new _Z)),this._register(this.workspaceStorage.onDidChangeStorage((e=>this.emitDidChangeValue(1,e)))),this._register(this.globalStorage.onDidChangeStorage((e=>this.emitDidChangeValue(0,e))))}getStorage(e){return 0===e?this.globalStorage:this.workspaceStorage}}),Iv(BB,Ab),Iv(lW,zZ),Iv(XW,class{constructor(){this._neverEmitter=new $o,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}}),Iv(gy,EZ),Iv($x,BG),Iv(cq,hq),Iv(wy,MZ),Iv(kW,AZ),Iv(iG,uG),Iv(VB,HZ),Iv(ij,hj),Iv(jB,KG),Iv(WB,jZ),Iv(hx,zG),function(e){const t=new pF;for(const[o,s]of Tv())t.set(o,s);const i=new dZ(t,!0);t.set(k_,i),e.get=function(e){const n=t.get(e);if(!n)throw new Error("Missing service "+e);return n instanceof Nv?i.invokeFunction((t=>t.get(e))):n};let n=!1;e.initialize=function(e){if(n)return i;n=!0;for(const[i,n]of Tv())t.get(i)||t.set(i,n);for(const i in e)if(e.hasOwnProperty(i)){const n=L_(i);t.get(n)instanceof Nv&&t.set(n,e[i])}return i}}(UZ||(UZ={}));var $Z=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},KZ=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}};let qZ=0,GZ=!1;function ZZ(e){if(!e){if(GZ)return;GZ=!0}!function(e){oy=document.createElement("div"),oy.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"),oy.appendChild(e),e};sy=t(),ry=t();const i=()=>{const e=document.createElement("div");return e.className="monaco-status",e.setAttribute("role","complementary"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),oy.appendChild(e),e};ay=i(),ly=i(),e.appendChild(oy)}(e||document.body)}let YZ=class extends UF{constructor(e,t,i,n,o,s,r,a,l,d,c,h){const u=Object.assign({},t);u.ariaLabel=u.ariaLabel||GW.editorViewAccessibleLabel,u.ariaLabel=u.ariaLabel+";"+GW.accessibilityHelpMessage,super(e,u,{},i,n,o,s,a,l,d,c,h),this._standaloneKeybindingService=r instanceof AZ?r:null,ZZ(u.ariaContainerElement)}addCommand(e,t,i){if(!this._standaloneKeybindingService)return null;const n="DYNAMIC_"+ ++qZ,o=Sy.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 Uo.None;const t=e.id,i=e.label,n=Sy.and(Sy.equals("editorId",this.getId()),Sy.deserialize(e.precondition)),o=e.keybindings,s=Sy.and(n,Sy.deserialize(e.keybindingContext)),r=e.contextMenuGroupId||null,a=e.contextMenuOrder||0,l=(t,...i)=>Promise.resolve(e.run(this,...i)),d=new ws,c=this.getId()+":"+t;if(d.add(Cy.registerCommand(c,l)),r){const e={command:{id:c,title:i},when:n,group:r,order:a};d.add(ux.appendMenuItem(cx.EditorContext,e))}if(Array.isArray(o))for(const u of o)d.add(this._standaloneKeybindingService.addDynamicKeybinding(c,u,l,s));const h=new dA(c,i,i,n,l,this._contextKeyService);return this._actions[t]=h,d.add(es((()=>{delete this._actions[t]}))),d}_triggerCommand(e,t){if(this._codeEditorService instanceof wV)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,t)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,t)}};YZ=$Z([KZ(2,k_),KZ(3,N_),KZ(4,wy),KZ(5,$y),KZ(6,kW),KZ(7,Qy),KZ(8,vF),KZ(9,$x),KZ(10,Rv),KZ(11,Lb)],YZ);let XZ=class extends YZ{constructor(e,t,i,n,o,s,r,a,l,d,c,h,u,g,p){const m=Object.assign({},t);WZ(d,m,!1);const f=a.registerEditorContainer(e);"string"==typeof m.theme&&a.setTheme(m.theme),void 0!==m.autoDetectHighContrast&&a.setAutoDetectHighContrast(Boolean(m.autoDetectHighContrast));const _=m.model;let v;if(delete m.model,super(e,m,i,n,o,s,r,a,l,c,g,p),this._configurationService=d,this._standaloneThemeService=a,this._register(f),void 0===_){const e=u.getLanguageIdByMimeType(m.language)||m.language||LA;v=JZ(h,u,m.value||"",e,void 0),this._ownsModel=!0}else v=_,this._ownsModel=!1;if(this._attachModel(v),v){const e={oldModelUrl:null,newModelUrl:v.uri};this._onDidChangeModel.fire(e)}}dispose(){super.dispose()}updateOptions(e){WZ(this._configurationService,e,!1),"string"==typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),void 0!==e.autoDetectHighContrast&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};XZ=$Z([KZ(2,k_),KZ(3,N_),KZ(4,wy),KZ(5,$y),KZ(6,kW),KZ(7,RG),KZ(8,vF),KZ(9,Cv),KZ(10,$x),KZ(11,Gv),KZ(12,Lv),KZ(13,Rv),KZ(14,Lb)],XZ);let QZ=class extends eV{constructor(e,t,i,n,o,s,r,a,l,d,c,h){const u=Object.assign({},t);WZ(l,u,!0);const g=r.registerEditorContainer(e);"string"==typeof u.theme&&r.setTheme(u.theme),void 0!==u.autoDetectHighContrast&&r.setAutoDetectHighContrast(Boolean(u.autoDetectHighContrast)),super(e,u,{},h,o,n,i,s,r,a,d,c),this._configurationService=l,this._standaloneThemeService=r,this._register(g)}dispose(){super.dispose()}updateOptions(e){WZ(this._configurationService,e,!0),"string"==typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),void 0!==e.autoDetectHighContrast&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_createInnerEditor(e,t,i){return e.createInstance(YZ,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 JZ(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)),eY(e,i,t.createByFilepathOrFirstLine(o||null,s),o)}return eY(e,i,t.createById(n),o)}function eY(e,t,i,n){return e.createModel(t,i,n)}function tY(e,t,i){return UZ.initialize(i||{}).createInstance(XZ,e,t)}function iY(e){return UZ.get(N_).onCodeEditorAdd((t=>{e(t)}))}function nY(e,t,i){return UZ.initialize(i||{}).createInstance(QZ,e,t)}function oY(e,t){return new T_(e,t)}function sY(e,t,i){const n=UZ.get(Lv),o=n.getLanguageIdByMimeType(t)||t;return JZ(UZ.get(Gv),n,e,o,i)}function rY(e,t){const i=UZ.get(Lv);UZ.get(Gv).setMode(e,i.createById(t))}function aY(e,t,i){if(e){UZ.get(pj).changeOne(t,e.uri,i)}}function lY(e){return UZ.get(pj).read(e)}function dY(e){return UZ.get(pj).onMarkerChanged(e)}function cY(e){return UZ.get(Gv).getModel(e)}function hY(){return UZ.get(Gv).getModels()}function uY(e){return UZ.get(Gv).onModelAdded(e)}function gY(e){return UZ.get(Gv).onModelRemoved(e)}function pY(e){return UZ.get(Gv).onModelLanguageChanged((t=>{e({model:t.model,oldLanguage:t.oldLanguageId})}))}function mY(e){return function(e,t,i){return new Wb(e,t,i)}(UZ.get(Gv),UZ.get(Rv),e)}function fY(e,t){const i=UZ.get(Lv),n=UZ.get(RG);return n.registerEditorContainer(e),Aw.colorizeElement(n,i,e,t)}function _Y(e,t,i){const n=UZ.get(Lv);return UZ.get(RG).registerEditorContainer(document.body),Aw.colorize(n,e,t,i)}function vY(e,t,i=4){return UZ.get(RG).registerEditorContainer(document.body),Aw.colorizeModelLine(e,t,i)}function bY(e,t){Ns.getOrCreate(t);const i=function(e){return Ns.get(e)||{getInitialState:()=>$v,tokenize:(t,i,n)=>Kv(e,n)}}(t),n=Is(e),o=[];let s=i.getInitialState();for(let r=0,a=n.length;r=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 vw(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 vw(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&&!function(e,t){let i=t;for(;i&&i.length>0;){if(e.stateNames[i])return!0;const t=i.lastIndexOf(".");i=t<0?null:i.substr(0,t)}return!1}(e,bw(e,o,"",[],""))))throw vw(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=LY(e,"^(?:"+(this.matchOnlyAtLineStart?i.substr(1):i)+")")}setAction(e,t){this.action=EY(e,this.name,t)}}function TY(e,t){if(!t||"object"!=typeof t)throw new Error("Monarch: expecting a language definition object");const i={};i.languageId=e,i.includeLF=SY(t.includeLF,!1),i.noThrow=!1,i.maxStack=100,i.start="string"==typeof t.start?t.start:null,i.ignoreCase=SY(t.ignoreCase,!1),i.unicode=SY(t.unicode,!1),i.tokenPostfix=kY(t.tokenPostfix,"."+i.languageId),i.defaultToken=kY(t.defaultToken,"source"),i.usesEmbedded=!1;const n=t;function o(e,s,r){for(const a of r){let r=a.include;if(r){if("string"!=typeof r)throw vw(i,"an 'include' attribute must be a string at: "+e);if("@"===r[0]&&(r=r.substr(1)),!t.tokenizer[r])throw vw(i,"include target '"+r+"' is not defined at: "+e);o(e+"."+r,s,t.tokenizer[r])}else{const t=new IY(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 vw(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 vw(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=SY(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 vw(i,"a language definition must define the 'tokenizer' attribute as an object");i.tokenizer=[];for(let 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 vw(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(let 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 vw(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 vw(i,"every element in the 'brackets' array must be a '{open,close,token}' object or array");s.push({token:e.token+i.tokenPostfix,open:fw(i,e.open),close:fw(i,e.close)})}return i.brackets=s,i.noThrow=!0,i}var MY=globalThis&&globalThis.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,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){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function AY(e){DA.registerLanguage(e)}function OY(){let e=[];return e=e.concat(DA.getLanguages()),e}function RY(e){return UZ.get(Lv).languageIdCodec.encodeLanguageId(e)}function PY(e,t){const i=UZ.get(Lv).onDidEncounterLanguage((n=>{n===e&&(i.dispose(),t())}));return i}function FY(e,t){if(!UZ.get(Lv).isRegisteredLanguageId(e))throw new Error(`Cannot set configuration for unknown language ${e}`);return Wv.register(e,t,100)}class BY{constructor(e,t){this._languageId=e,this._actual=t}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i){if("function"==typeof this._actual.tokenize)return VY.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 os(n.tokens,n.endState)}}class VY{constructor(e,t,i,n){this._languageId=e,this._actual=t,this._languageService=i,this._standaloneThemeService=n}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 d=e.startIndex;0===l?d=0:dMY(this,void 0,void 0,(function*(){const i=yield Promise.resolve(t.create());return i?"function"==typeof i.getInitialState?HY(e,i):new Nw(UZ.get(Lv),UZ.get(RG),e,TY(e,i)):null}))};return Ns.registerFactory(e,i)}function UY(e,t){if(!UZ.get(Lv).isRegisteredLanguageId(e))throw new Error(`Cannot set tokens provider for unknown language ${e}`);return WY(t)?jY(e,{create:()=>t}):Ns.register(e,HY(e,t))}function $Y(e,t){return WY(t)?jY(e,{create:()=>t}):Ns.register(e,(t=>new Nw(UZ.get(Lv),UZ.get(RG),e,TY(e,t)))(t))}function KY(e,t){return UZ.get(Lb).referenceProvider.register(e,t)}function qY(e,t){return UZ.get(Lb).renameProvider.register(e,t)}function GY(e,t){return UZ.get(Lb).signatureHelpProvider.register(e,t)}function ZY(e,t){return UZ.get(Lb).hoverProvider.register(e,{provideHover:(e,i,n)=>{const o=e.getWordAtPosition(i);return Promise.resolve(t.provideHover(e,i,n)).then((e=>{if(e)return!e.range&&o&&(e.range=new qo(i.lineNumber,o.startColumn,i.lineNumber,o.endColumn)),e.range||(e.range=new qo(i.lineNumber,i.column,i.lineNumber,i.column)),e}))}})}function YY(e,t){return UZ.get(Lb).documentSymbolProvider.register(e,t)}function XY(e,t){return UZ.get(Lb).documentHighlightProvider.register(e,t)}function QY(e,t){return UZ.get(Lb).linkedEditingRangeProvider.register(e,t)}function JY(e,t){return UZ.get(Lb).definitionProvider.register(e,t)}function eX(e,t){return UZ.get(Lb).implementationProvider.register(e,t)}function tX(e,t){return UZ.get(Lb).typeDefinitionProvider.register(e,t)}function iX(e,t){return UZ.get(Lb).codeLensProvider.register(e,t)}function nX(e,t,i){return UZ.get(Lb).codeActionProvider.register(e,{providedCodeActionKinds:null==i?void 0:i.providedCodeActionKinds,provideCodeActions:(e,i,n,o)=>{const s=UZ.get(pj).read({resource:e.uri}).filter((e=>qo.areIntersectingOrTouching(e,i)));return t.provideCodeActions(e,i,{markers:s,only:n.only},o)},resolveCodeAction:t.resolveCodeAction})}function oX(e,t){return UZ.get(Lb).documentFormattingEditProvider.register(e,t)}function sX(e,t){return UZ.get(Lb).documentRangeFormattingEditProvider.register(e,t)}function rX(e,t){return UZ.get(Lb).onTypeFormattingEditProvider.register(e,t)}function aX(e,t){return UZ.get(Lb).linkProvider.register(e,t)}function lX(e,t){return UZ.get(Lb).completionProvider.register(e,t)}function dX(e,t){return UZ.get(Lb).colorProvider.register(e,t)}function cX(e,t){return UZ.get(Lb).foldingRangeProvider.register(e,t)}function hX(e,t){return UZ.get(Lb).declarationProvider.register(e,t)}function uX(e,t){return UZ.get(Lb).selectionRangeProvider.register(e,t)}function gX(e,t){return UZ.get(Lb).documentSemanticTokensProvider.register(e,t)}function pX(e,t){return UZ.get(Lb).documentRangeSemanticTokensProvider.register(e,t)}function mX(e,t){return UZ.get(Lb).inlineCompletionsProvider.register(e,t)}function fX(e,t){return UZ.get(Lb).inlayHintsProvider.register(e,t)}const _X=L_("IEditorCancelService"),vX=new Uy("cancellableOperation",!1,mf(0,"Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));Iv(_X,class{constructor(){this._tokens=new WeakMap}add(e,t){let i,n=this._tokens.get(e);return n||(n=e.invokeWithinContext((e=>({key:vX.bindTo(e.get($y)),tokens:new zs}))),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()))}},!0);class bX extends as{constructor(e,t){super(t),this.editor=e,this._unregister=e.invokeWithinContext((t=>t.get(_X).add(e,this)))}dispose(){this._unregister(),super.dispose()}}Dx(new class extends yx{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:vX})}runEditorCommand(e,t){e.get(_X).cancel(t)}});class wX{constructor(e,t){if(this.flags=t,0!=(1&this.flags)){const t=e.getModel();this.modelVersionId=t?Aa("{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 wX))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 wX(e,this.flags))}}class CX extends bX{constructor(e,t,i,n){super(e,n),this._listener=new ws,4&t&&this._listener.add(e.onDidChangeCursorPosition((e=>{i&&qo.containsPosition(i,e.position)||this.cancel()}))),2&t&&this._listener.add(e.onDidChangeCursorSelection((e=>{i&&qo.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 yX extends as{constructor(e,t){super(t),this._listener=e.onDidChangeContent((()=>this.cancel()))}dispose(){this._listener.dispose(),super.dispose()}}function xX(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===M_.ICodeEditor}function SX(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===M_.IDiffEditor}function kX(e){return xX(e)?e:SX(e)?e.getModifiedEditor():null}class DX{static _handleEolEdits(e,t){let i,n=[];for(let 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);return i.getFullModelRange().equalsRange(n)}static execute(e,t,i){i&&e.pushUndoStop();const n=DX._handleEolEdits(e,t);1===n.length&&DX._isFullModelReplaceEdit(e,n[0])?e.executeEdits("formatEditsCommand",n.map((e=>_W.replace(qo.lift(e.range),e.text)))):e.executeEdits("formatEditsCommand",n.map((e=>_W.replaceMove(qo.lift(e.range),e.text)))),i&&e.pushUndoStop()}}class LX{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return"string"==typeof e?e.toLowerCase():e._lower}}var NX,EX=globalThis&&globalThis.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,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){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function IX(e){if(!(e=e.filter((e=>e.range))).length)return;let{range:t}=e[0];for(let o=1;oa.provideDocumentRangeFormattingEdits(e,e.getFullModelRange(),t,i)})}return n}class MX{static setFormatterSelector(e){return{dispose:MX._selectors.unshift(e)}}static select(e,t,i){return EX(this,void 0,void 0,(function*(){if(0===e.length)return;const n=Hs.first(MX._selectors);return n?yield n(e,t,i):void 0}))}}function AX(e,t,i,n,o,s){return EX(this,void 0,void 0,(function*(){const r=e.get(k_),{documentRangeFormattingEditProvider:a}=e.get(Lb),l=xX(t)?t.getModel():t,d=a.ordered(l),c=yield MX.select(d,l,n);c&&(o.report(c),yield r.invokeFunction(OX,c,t,i,s))}))}function OX(e,t,i,n,o){return EX(this,void 0,void 0,(function*(){const s=e.get(BB);let r,a;xX(i)?(r=i.getModel(),a=new CX(i,5,void 0,o)):(r=i,a=new yX(i,o));let l=[],d=0;for(let e of Ml(n).sort(qo.compareRangesUsingStarts))d>0&&qo.areIntersectingOrTouching(l[d-1],e)?l[d-1]=qo.fromPositions(l[d-1].getStartPosition(),e.getEndPosition()):d=l.push(e);const c=e=>EX(this,void 0,void 0,(function*(){return(yield t.provideDocumentRangeFormattingEdits(r,e,r.getFormattingOptions(),a.token))||[]})),h=(e,t)=>{if(!e.length||!t.length)return!1;const i=e.reduce(((e,t)=>qo.plusRange(e,t.range)),e[0].range);if(!t.some((e=>qo.intersectRanges(i,e.range))))return!1;for(let n of e)for(let e of t)if(qo.intersectRanges(n.range,e.range))return!0;return!1},u=[],g=[];try{for(let e of l){if(a.token.isCancellationRequested)return!0;g.push(yield c(e))}for(let e=0;e({text:e.text,range:qo.lift(e.range),forceMoveMarkers:!0}))),(e=>{for(const{range:i}of e)if(qo.areIntersectingOrTouching(i,t))return[new ar(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)];return null}))}return!0}))}function RX(e,t,i,n,o){return EX(this,void 0,void 0,(function*(){const s=e.get(k_),r=e.get(Lb),a=xX(t)?t.getModel():t,l=TX(r.documentFormattingEditProvider,r.documentRangeFormattingEditProvider,a),d=yield MX.select(l,a,i);d&&(n.report(d),yield s.invokeFunction(PX,d,t,i,o))}))}function PX(e,t,i,n,o){return EX(this,void 0,void 0,(function*(){const s=e.get(BB);let r,a,l;xX(i)?(r=i.getModel(),a=new CX(i,5,void 0,o)):(r=i,a=new yX(i,o));try{const e=yield t.provideDocumentFormattingEdits(r,r.getFormattingOptions(),a.token);if(l=yield s.computeMoreMinimalEdits(r.uri,e),a.token.isCancellationRequested)return!0}finally{a.dispose()}if(!l||0===l.length)return!1;if(xX(i))DX.execute(i,l,2!==n),2!==n&&(IX(l),i.revealPositionInCenterIfOutsideViewport(i.getPosition(),1));else{const[{range:e}]=l,t=new ar(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn);r.pushEditOperations([t],l.map((e=>({text:e.text,range:qo.lift(e.range),forceMoveMarkers:!0}))),(e=>{for(const{range:i}of e)if(qo.areIntersectingOrTouching(i,t))return[new ar(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)];return null}))}return!0}))}function FX(e,t,i,n,o,s,r){const a=t.onTypeFormattingEditProvider.ordered(i);return 0===a.length||a[0].autoFormatTriggerCharacters.indexOf(o)<0?Promise.resolve(void 0):Promise.resolve(a[0].provideOnTypeFormattingEdits(i,n,o,s,r)).catch(Ta).then((t=>e.computeMoreMinimalEdits(i.uri,t)))}MX._selectors=new zs,Cy.registerCommand("_executeFormatRangeProvider",(function(e,...t){return EX(this,void 0,void 0,(function*(){const[i,n,o]=t;Js(Ps.isUri(i)),Js(qo.isIRange(n));const s=e.get(gy),r=e.get(BB),a=e.get(Lb),l=yield s.createModelReference(i);try{return function(e,t,i,n,o,s){return EX(this,void 0,void 0,(function*(){const r=t.documentRangeFormattingEditProvider.ordered(i);for(const t of r){let r=yield Promise.resolve(t.provideDocumentRangeFormattingEdits(i,n,o,s)).catch(Ta);if(gs(r))return yield e.computeMoreMinimalEdits(i.uri,r)}}))}(r,a,l.object.textEditorModel,qo.lift(n),o,Ia.None)}finally{l.dispose()}}))})),Cy.registerCommand("_executeFormatDocumentProvider",(function(e,...t){return EX(this,void 0,void 0,(function*(){const[i,n]=t;Js(Ps.isUri(i));const o=e.get(gy),s=e.get(BB),r=e.get(Lb),a=yield o.createModelReference(i);try{return function(e,t,i,n,o){return EX(this,void 0,void 0,(function*(){const s=TX(t.documentFormattingEditProvider,t.documentRangeFormattingEditProvider,i);for(const t of s){let s=yield Promise.resolve(t.provideDocumentFormattingEdits(i,n,o)).catch(Ta);if(gs(s))return yield e.computeMoreMinimalEdits(i.uri,s)}}))}(s,r,a.object.textEditorModel,n,Ia.None)}finally{a.dispose()}}))})),Cy.registerCommand("_executeFormatOnTypeProvider",(function(e,...t){return EX(this,void 0,void 0,(function*(){const[i,n,o,s]=t;Js(Ps.isUri(i)),Js(er.isIPosition(n)),Js("string"==typeof o);const r=e.get(gy),a=e.get(BB),l=e.get(Lb),d=yield r.createModelReference(i);try{return FX(a,l,d.object.textEditorModel,er.lift(n),o,s,Ia.None)}finally{d.dispose()}}))})),Xf.wrappingIndent.defaultValue=0,Xf.glyphMargin.defaultValue=!1,Xf.autoIndent.defaultValue=3,Xf.overviewRulerLanes.defaultValue=2,MX.setFormatterSelector(((e,t,i)=>Promise.resolve(e[0])));const BX=Al();BX.editor={create:tY,onDidCreateEditor:iY,createDiffEditor:nY,createDiffNavigator:oY,createModel:sY,setModelLanguage:rY,setModelMarkers:aY,getModelMarkers:lY,onDidChangeMarkers:dY,getModels:hY,getModel:cY,onDidCreateModel:uY,onWillDisposeModel:gY,onDidChangeModelLanguage:pY,createWebWorker:mY,colorizeElement:fY,colorize:_Y,colorizeModelLine:vY,tokenize:bY,defineTheme:wY,setTheme:CY,remeasureFonts:yY,registerCommand:xY,AccessibilitySupport:Qa,ContentWidgetPositionPreference:Ja,CursorChangeReason:el,DefaultEndOfLine:tl,EditorAutoIndentStrategy:il,EditorOption:nl,EndOfLinePreference:ol,EndOfLineSequence:sl,MinimapPosition:rl,MouseTargetType:al,OverlayWidgetPositionPreference:ll,OverviewRulerLane:dl,RenderLineNumbersType:cl,RenderMinimap:hl,ScrollbarVisibility:ul,ScrollType:gl,TextEditorCursorBlinkingStyle:pl,TextEditorCursorStyle:ml,TrackedRangeStickiness:fl,WrappingIndent:_l,InjectedTextCursorStops:vl,PositionAffinity:bl,ConfigurationChangedEvent:_f,BareFontInfo:w_,FontInfo:C_,TextModelResolvedOptions:ea,FindMatch:Zr,ApplyUpdateResult:wf,EditorType:M_,EditorOptions:Xf},BX.languages={register:AY,getLanguages:OY,onLanguage:PY,getEncodedLanguageId:RY,setLanguageConfiguration:FY,setColorMap:zY,registerTokensProviderFactory:jY,setTokensProvider:UY,setMonarchTokensProvider:$Y,registerReferenceProvider:KY,registerRenameProvider:qY,registerCompletionItemProvider:lX,registerSignatureHelpProvider:GY,registerHoverProvider:ZY,registerDocumentSymbolProvider:YY,registerDocumentHighlightProvider:XY,registerLinkedEditingRangeProvider:QY,registerDefinitionProvider:JY,registerImplementationProvider:eX,registerTypeDefinitionProvider:tX,registerCodeLensProvider:iX,registerCodeActionProvider:nX,registerDocumentFormattingEditProvider:oX,registerDocumentRangeFormattingEditProvider:sX,registerOnTypeFormattingEditProvider:rX,registerLinkProvider:aX,registerColorProvider:dX,registerFoldingRangeProvider:cX,registerDeclarationProvider:hX,registerSelectionRangeProvider:uX,registerDocumentSemanticTokensProvider:gX,registerDocumentRangeSemanticTokensProvider:pX,registerInlineCompletionsProvider:mX,registerInlayHintsProvider:fX,DocumentHighlightKind:wl,CompletionItemKind:Cl,CompletionItemTag:yl,CompletionItemInsertTextRule:xl,SymbolKind:Sl,SymbolTag:kl,IndentAction:Dl,CompletionTriggerKind:Ll,SignatureHelpTriggerKind:Nl,InlayHintKind:El,InlineCompletionTriggerKind:Il,FoldingRangeKind:Tl};const VX=BX.CancellationTokenSource,WX=BX.Emitter,zX=BX.KeyCode,HX=BX.KeyMod,jX=BX.Position,UX=BX.Range,$X=BX.Selection,KX=BX.SelectionDirection,qX=BX.MarkerSeverity,GX=BX.MarkerTag,ZX=BX.Uri,YX=BX.Token,XX=BX.editor,QX=BX.languages;((null===(NX=us.MonacoEnvironment)||void 0===NX?void 0:NX.globalAPI)||"function"==typeof define&&define.amd)&&(self.monaco=BX),void 0!==self.require&&"function"==typeof self.require.config&&self.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"]});var JX=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",CancellationTokenSource:VX,Emitter:WX,KeyCode:zX,KeyMod:HX,Position:jX,Range:UX,Selection:$X,SelectionDirection:KX,MarkerSeverity:qX,MarkerTag:GX,Uri:ZX,Token:YX,editor:XX,languages:QX});t("m",JX); /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ var eQ=Object.defineProperty,tQ=Object.getOwnPropertyDescriptor,iQ=Object.getOwnPropertyNames,nQ=Object.prototype.hasOwnProperty,oQ={};((e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of iQ(t))nQ.call(e,o)||!i&&"default"===o||eQ(e,o,{get:()=>t[o],enumerable:!(n=tQ(t,o))||n.enumerable})})(oQ,JX);var sQ={},rQ={},aQ=class t{static getOrCreate(e){return rQ[e]||(rQ[e]=new t(e)),rQ[e]}constructor(t){e(this,"_languageId",void 0),e(this,"_loadingTriggered",void 0),e(this,"_lazyLoadPromise",void 0),e(this,"_lazyLoadPromiseResolve",void 0),e(this,"_lazyLoadPromiseReject",void 0),this._languageId=t,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise(((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t}))}load(){return this._loadingTriggered||(this._loadingTriggered=!0,sQ[this._languageId].loader().then((e=>this._lazyLoadPromiseResolve(e)),(e=>this._lazyLoadPromiseReject(e)))),this._lazyLoadPromise}};function lQ(e){const t=e.id;sQ[t]=e,oQ.languages.register(e);const i=aQ.getOrCreate(t);oQ.languages.registerTokensProviderFactory(t,{create:async()=>(await i.load()).language}),oQ.languages.onLanguage(t,(async()=>{const e=await i.load();oQ.languages.setLanguageConfiguration(t,e.conf)}))}lQ({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>Po((()=>i.import("./abap-legacy.83d344c3.js")),void 0)}),lQ({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>Po((()=>i.import("./apex-legacy.461f6a6a.js")),void 0)}),lQ({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>Po((()=>i.import("./azcli-legacy.e4cc14ba.js")),void 0)}),lQ({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>Po((()=>i.import("./bat-legacy.db954f5b.js")),void 0)}),lQ({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>Po((()=>i.import("./bicep-legacy.80d764fe.js")),void 0)}),lQ({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>Po((()=>i.import("./cameligo-legacy.a6150ad6.js")),void 0)}),lQ({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>Po((()=>i.import("./clojure-legacy.6460c4ea.js")),void 0)}),lQ({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>Po((()=>i.import("./coffee-legacy.7a7c3eca.js")),void 0)}),lQ({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>Po((()=>i.import("./cpp-legacy.8f9e16cc.js")),void 0)}),lQ({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>Po((()=>i.import("./cpp-legacy.8f9e16cc.js")),void 0)}),lQ({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>Po((()=>i.import("./csharp-legacy.12c55e07.js")),void 0)}),lQ({id:"csp",extensions:[],aliases:["CSP","csp"],loader:()=>Po((()=>i.import("./csp-legacy.95e2ea56.js")),void 0)}),lQ({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>Po((()=>i.import("./css-legacy.e1a82a25.js")),void 0)}),lQ({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>Po((()=>i.import("./dart-legacy.caabcc8f.js")),void 0)}),lQ({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>Po((()=>i.import("./dockerfile-legacy.93715a76.js")),void 0)}),lQ({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>Po((()=>i.import("./ecl-legacy.953b749b.js")),void 0)}),lQ({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>Po((()=>i.import("./elixir-legacy.83155dfb.js")),void 0)}),lQ({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>Po((()=>i.import("./flow9-legacy.5f520bdf.js")),void 0)}),lQ({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>Po((()=>i.import("./fsharp-legacy.ae85b01c.js")),void 0)}),lQ({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>Po((()=>i.import("./freemarker2-legacy.476ab423.js")),void 0).then((e=>e.TagAutoInterpolationDollar))}),lQ({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>Po((()=>i.import("./freemarker2-legacy.476ab423.js")),void 0).then((e=>e.TagAngleInterpolationDollar))}),lQ({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>Po((()=>i.import("./freemarker2-legacy.476ab423.js")),void 0).then((e=>e.TagBracketInterpolationDollar))}),lQ({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>Po((()=>i.import("./freemarker2-legacy.476ab423.js")),void 0).then((e=>e.TagAngleInterpolationBracket))}),lQ({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>Po((()=>i.import("./freemarker2-legacy.476ab423.js")),void 0).then((e=>e.TagBracketInterpolationBracket))}),lQ({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>Po((()=>i.import("./freemarker2-legacy.476ab423.js")),void 0).then((e=>e.TagAutoInterpolationDollar))}),lQ({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>Po((()=>i.import("./freemarker2-legacy.476ab423.js")),void 0).then((e=>e.TagAutoInterpolationBracket))}),lQ({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>Po((()=>i.import("./go-legacy.8b628130.js")),void 0)}),lQ({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>Po((()=>i.import("./graphql-legacy.dd35a3af.js")),void 0)}),lQ({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>Po((()=>i.import("./handlebars-legacy.25ff0bb7.js")),void 0)}),lQ({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>Po((()=>i.import("./hcl-legacy.4635e5ac.js")),void 0)}),lQ({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>Po((()=>i.import("./html-legacy.452a342f.js")),void 0)}),lQ({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>Po((()=>i.import("./ini-legacy.d44e6bd7.js")),void 0)}),lQ({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>Po((()=>i.import("./java-legacy.d4310d61.js")),void 0)}),lQ({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>Po((()=>i.import("./javascript-legacy.6d70fefb.js")),void 0)}),lQ({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>Po((()=>i.import("./julia-legacy.89cf53de.js")),void 0)}),lQ({id:"kotlin",extensions:[".kt"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>Po((()=>i.import("./kotlin-legacy.5cb86964.js")),void 0)}),lQ({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>Po((()=>i.import("./less-legacy.d0578dd6.js")),void 0)}),lQ({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>Po((()=>i.import("./lexon-legacy.cebd22ad.js")),void 0)}),lQ({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>Po((()=>i.import("./lua-legacy.c8fff503.js")),void 0)}),lQ({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>Po((()=>i.import("./liquid-legacy.b2260564.js")),void 0)}),lQ({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>Po((()=>i.import("./m3-legacy.e61f267f.js")),void 0)}),lQ({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>Po((()=>i.import("./markdown-legacy.27e3fcee.js")),void 0)}),lQ({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>Po((()=>i.import("./mips-legacy.854fc2ba.js")),void 0)}),lQ({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>Po((()=>i.import("./msdax-legacy.bc94794c.js")),void 0)}),lQ({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>Po((()=>i.import("./mysql-legacy.84a3c942.js")),void 0)}),lQ({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>Po((()=>i.import("./objective-c-legacy.7deff182.js")),void 0)}),lQ({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>Po((()=>i.import("./pascal-legacy.a09ecfb7.js")),void 0)}),lQ({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>Po((()=>i.import("./pascaligo-legacy.d2573ad3.js")),void 0)}),lQ({id:"perl",extensions:[".pl"],aliases:["Perl","pl"],loader:()=>Po((()=>i.import("./perl-legacy.64ea42f3.js")),void 0)}),lQ({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>Po((()=>i.import("./pgsql-legacy.cf40a702.js")),void 0)}),lQ({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>Po((()=>i.import("./php-legacy.aed16c9a.js")),void 0)}),lQ({id:"pla",extensions:[".pla"],loader:()=>Po((()=>i.import("./pla-legacy.8d0099a1.js")),void 0)}),lQ({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>Po((()=>i.import("./postiats-legacy.b5b4a7fe.js")),void 0)}),lQ({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>Po((()=>i.import("./powerquery-legacy.1fc9e124.js")),void 0)}),lQ({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>Po((()=>i.import("./powershell-legacy.7d3eb55c.js")),void 0)}),lQ({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>Po((()=>i.import("./protobuf-legacy.b5c41e4a.js")),void 0)}),lQ({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>Po((()=>i.import("./pug-legacy.ec10ca46.js")),void 0)}),lQ({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>Po((()=>i.import("./python-legacy.8dda410d.js")),void 0)}),lQ({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>Po((()=>i.import("./qsharp-legacy.40093fa7.js")),void 0)}),lQ({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>Po((()=>i.import("./r-legacy.4bdbfc81.js")),void 0)}),lQ({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>Po((()=>i.import("./razor-legacy.9ec5e0e5.js")),void 0)}),lQ({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>Po((()=>i.import("./redis-legacy.d467ad25.js")),void 0)}),lQ({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>Po((()=>i.import("./redshift-legacy.a851baaf.js")),void 0)}),lQ({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>Po((()=>i.import("./restructuredtext-legacy.a270cceb.js")),void 0)}),lQ({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>Po((()=>i.import("./ruby-legacy.57f64154.js")),void 0)}),lQ({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>Po((()=>i.import("./rust-legacy.4610cfe9.js")),void 0)}),lQ({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>Po((()=>i.import("./sb-legacy.3861d272.js")),void 0)}),lQ({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>Po((()=>i.import("./scala-legacy.f39486e3.js")),void 0)}),lQ({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>Po((()=>i.import("./scheme-legacy.8daca672.js")),void 0)}),lQ({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>Po((()=>i.import("./scss-legacy.291b5458.js")),void 0)}),lQ({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>Po((()=>i.import("./shell-legacy.9bebfd2e.js")),void 0)}),lQ({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>Po((()=>i.import("./solidity-legacy.b90ef660.js")),void 0)}),lQ({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>Po((()=>i.import("./sophia-legacy.f4a424ed.js")),void 0)}),lQ({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>Po((()=>i.import("./sparql-legacy.b09b8b63.js")),void 0)}),lQ({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>Po((()=>i.import("./sql-legacy.5af1720c.js")),void 0)}),lQ({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib"],aliases:["StructuredText","scl","stl"],loader:()=>Po((()=>i.import("./st-legacy.8176aa1e.js")),void 0)}),lQ({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>Po((()=>i.import("./swift-legacy.fd37be35.js")),void 0)}),lQ({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>Po((()=>i.import("./systemverilog-legacy.a58a3561.js")),void 0)}),lQ({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>Po((()=>i.import("./systemverilog-legacy.a58a3561.js")),void 0)}),lQ({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>Po((()=>i.import("./tcl-legacy.f7b245b3.js")),void 0)}),lQ({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>Po((()=>i.import("./twig-legacy.ebbbe02a.js")),void 0)}),lQ({id:"typescript",extensions:[".ts",".tsx"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>Po((()=>i.import("./typescript-legacy.0657cb1b.js")),void 0)}),lQ({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>Po((()=>i.import("./vb-legacy.b0a1d2a2.js")),void 0)}),lQ({id:"xml",extensions:[".xml",".dtd",".ascx",".csproj",".config",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xsl"],firstLine:"(\\<\\?xml.*)|(\\Po((()=>i.import("./xml-legacy.b26fd230.js")),void 0)}),lQ({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>Po((()=>i.import("./yaml-legacy.77e866b4.js")),void 0)}); /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ var dQ=Object.defineProperty,cQ=Object.getOwnPropertyDescriptor,hQ=Object.getOwnPropertyNames,uQ=Object.prototype.hasOwnProperty,gQ={};((e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of hQ(t))uQ.call(e,o)||!i&&"default"===o||dQ(e,o,{get:()=>t[o],enumerable:!(n=cQ(t,o))||n.enumerable})})(gQ,JX);var pQ=class{constructor(t,i,n){e(this,"_onDidChange",new gQ.Emitter),e(this,"_options",void 0),e(this,"_modeConfiguration",void 0),e(this,"_languageId",void 0),this._languageId=t,this.setOptions(i),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},mQ={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0}},fQ={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},_Q=new pQ("css",mQ,fQ),vQ=new pQ("scss",mQ,fQ),bQ=new pQ("less",mQ,fQ);function wQ(){return Po((()=>i.import("./cssMode-legacy.870ac521.js")),void 0)}gQ.languages.css={cssDefaults:_Q,lessDefaults:bQ,scssDefaults:vQ},gQ.languages.onLanguage("less",(()=>{wQ().then((e=>e.setupMode(bQ)))})),gQ.languages.onLanguage("scss",(()=>{wQ().then((e=>e.setupMode(vQ)))})),gQ.languages.onLanguage("css",(()=>{wQ().then((e=>e.setupMode(_Q)))})); /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ var CQ=Object.defineProperty,yQ=Object.getOwnPropertyDescriptor,xQ=Object.getOwnPropertyNames,SQ=Object.prototype.hasOwnProperty,kQ={};((e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of xQ(t))SQ.call(e,o)||!i&&"default"===o||CQ(e,o,{get:()=>t[o],enumerable:!(n=yQ(t,o))||n.enumerable})})(kQ,JX);var DQ={format:{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"},suggest:{},data:{useDefaultDataProvider:!0}};function LQ(e){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:e===NQ,documentFormattingEdits:e===NQ,documentRangeFormattingEdits:e===NQ}}var NQ="html",EQ="handlebars",IQ="razor",TQ=FQ(NQ,DQ,LQ(NQ)),MQ=TQ.defaults,AQ=FQ(EQ,DQ,LQ(EQ)),OQ=AQ.defaults,RQ=FQ(IQ,DQ,LQ(IQ)),PQ=RQ.defaults;function FQ(t,n=DQ,o=LQ(t)){const s=new class{constructor(t,i,n){e(this,"_onDidChange",new kQ.Emitter),e(this,"_options",void 0),e(this,"_modeConfiguration",void 0),e(this,"_languageId",void 0),this._languageId=t,this.setOptions(i),this.setModeConfiguration(n)}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)}}(t,n,o);let r;const a=kQ.languages.onLanguage(t,(async()=>{r=(await Po((()=>i.import("./htmlMode-legacy.3defdbfc.js")),void 0)).setupMode(s)}));return{defaults:s,dispose(){var e;a.dispose(),null===(e=r)||void 0===e||e.dispose(),r=void 0}}} /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/kQ.languages.html={htmlDefaults:MQ,razorDefaults:PQ,handlebarDefaults:OQ,htmlLanguageService:TQ,handlebarLanguageService:AQ,razorLanguageService:RQ,registerHTMLLanguageService:FQ};var BQ=Object.defineProperty,VQ=Object.getOwnPropertyDescriptor,WQ=Object.getOwnPropertyNames,zQ=Object.prototype.hasOwnProperty,HQ={};((e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of WQ(t))zQ.call(e,o)||!i&&"default"===o||BQ(e,o,{get:()=>t[o],enumerable:!(n=VQ(t,o))||n.enumerable})})(HQ,JX);var jQ=new class{constructor(t,i,n){e(this,"_onDidChange",new HQ.Emitter),e(this,"_diagnosticsOptions",void 0),e(this,"_modeConfiguration",void 0),e(this,"_languageId",void 0),this._languageId=t,this.setDiagnosticsOptions(i),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}}("json",{validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},{documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0});HQ.languages.json={jsonDefaults:jQ},HQ.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]}),HQ.languages.onLanguage("json",(()=>{Po((()=>i.import("./jsonMode-legacy.cd894c43.js")),void 0).then((e=>e.setupMode(jQ)))})); /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ var UQ=Object.defineProperty,$Q=Object.getOwnPropertyDescriptor,KQ=Object.getOwnPropertyNames,qQ=Object.prototype.hasOwnProperty,GQ={};((e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of KQ(t))qQ.call(e,o)||!i&&"default"===o||UQ(e,o,{get:()=>t[o],enumerable:!(n=$Q(t,o))||n.enumerable})})(GQ,JX);var ZQ=(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))(ZQ||{}),YQ=(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))(YQ||{}),XQ=(e=>(e[e.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",e[e.LineFeed=1]="LineFeed",e))(XQ||{}),QQ=(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))(QQ||{}),JQ=(e=>(e[e.Classic=1]="Classic",e[e.NodeJs=2]="NodeJs",e))(JQ||{}),eJ=class{constructor(t,i,n,o){e(this,"_onDidChange",new GQ.Emitter),e(this,"_onDidExtraLibsChange",new GQ.Emitter),e(this,"_extraLibs",void 0),e(this,"_removedExtraLibs",void 0),e(this,"_eagerModelSync",void 0),e(this,"_compilerOptions",void 0),e(this,"_diagnosticsOptions",void 0),e(this,"_workerOptions",void 0),e(this,"_onDidExtraLibsChangeTimeout",void 0),e(this,"_inlayHintsOptions",void 0),this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(t),this.setDiagnosticsOptions(i),this.setWorkerOptions(n),this.setInlayHintsOptions(o),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(e,t){let i;if(i=void 0===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}},tJ=t("t",new eJ({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{})),iJ=new eJ({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{});function nJ(){return Po((()=>i.import("./tsMode-legacy.83a739fd.js")),void 0)}GQ.languages.typescript={ModuleKind:ZQ,JsxEmit:YQ,NewLineKind:XQ,ScriptTarget:QQ,ModuleResolutionKind:JQ,typescriptVersion:"4.5.5",typescriptDefaults:tJ,javascriptDefaults:iJ,getTypeScriptWorker:()=>nJ().then((e=>e.getTypeScriptWorker())),getJavaScriptWorker:()=>nJ().then((e=>e.getJavaScriptWorker()))},GQ.languages.onLanguage("typescript",(()=>nJ().then((e=>e.setupTypeScript(tJ))))),GQ.languages.onLanguage("javascript",(()=>nJ().then((e=>e.setupJavaScript(iJ)))));var oJ=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},sJ=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}},rJ=globalThis&&globalThis.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,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){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const aJ=new Uy("selectionAnchorSet",!1);let lJ=class e{constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=aJ.bindTo(t),this.modelChangeListener=e.onDidChangeModel((()=>this.selectionAnchorSetContextKey.reset()))}static get(t){return t.getContribution(e.ID)}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition(),t=this.decorationId?[this.decorationId]:[],i=this.editor.deltaDecorations(t,[{range:ar.fromPositions(e,e),options:{description:"selection-anchor",stickiness:1,hoverMessage:(new RU).appendText(mf(0,"Selection Anchor")),className:"selection-anchor"}}]);this.decorationId=i[0],this.selectionAnchorSetContextKey.set(!!this.decorationId),dy(mf(0,"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(ar.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){this.decorationId&&(this.editor.deltaDecorations([this.decorationId],[]),this.decorationId=void 0,this.selectionAnchorSetContextKey.set(!1))}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};lJ.ID="editor.contrib.selectionAnchorController",lJ=oJ([sJ(1,$y)],lJ);Ix(lJ.ID,lJ),Lx(class extends xx{constructor(){super({id:"editor.action.setSelectionAnchor",label:mf(0,"Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:yI.editorTextFocus,primary:Ol(2089,2080),weight:100}})}run(e,t){var i;return rJ(this,void 0,void 0,(function*(){null===(i=lJ.get(t))||void 0===i||i.setSelectionAnchor()}))}}),Lx(class extends xx{constructor(){super({id:"editor.action.goToSelectionAnchor",label:mf(0,"Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:aJ})}run(e,t){var i;return rJ(this,void 0,void 0,(function*(){null===(i=lJ.get(t))||void 0===i||i.goToSelectionAnchor()}))}}),Lx(class extends xx{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:mf(0,"Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:aJ,kbOpts:{kbExpr:yI.editorTextFocus,primary:Ol(2089,2089),weight:100}})}run(e,t){var i;return rJ(this,void 0,void 0,(function*(){null===(i=lJ.get(t))||void 0===i||i.selectFromAnchorToCursor()}))}}),Lx(class extends xx{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:mf(0,"Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:aJ,kbOpts:{kbExpr:yI.editorTextFocus,primary:9,weight:100}})}run(e,t){var i;return rJ(this,void 0,void 0,(function*(){null===(i=lJ.get(t))||void 0===i||i.cancelSelectionAnchor()}))}});const dJ=_S("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hc:"#A0A0A0"},mf(0,"Overview ruler marker color for matching brackets."));class cJ{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}class hJ extends Uo{constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=[],this._updateBracketsSoon=this._register(new lb((()=>this._updateBrackets()),50)),this._matchBrackets=this._editor.getOption(64),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._decorations=[],this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModelLanguageConfiguration((e=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeConfiguration((e=>{e.hasChanged(64)&&(this._matchBrackets=this._editor.getOption(64),this._decorations=this._editor.deltaDecorations(this._decorations,[]),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())}))),this._register(e.onDidBlurEditorWidget((()=>{this._updateBracketsSoon.schedule()}))),this._register(e.onDidFocusEditorWidget((()=>{this._updateBracketsSoon.schedule()})))}static get(e){return e.getContribution(hJ.ID)}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)?o=n[1].getStartPosition():n[1].containsPosition(i)&&(o=n[0].getStartPosition());else{const t=e.bracketPairs.findEnclosingBrackets(i);if(t)o=t[0].getStartPosition();else{const t=e.bracketPairs.findNextBracket(i);t&&t.range&&(o=t.range.getStartPosition())}}return o?new ar(o.lineNumber,o.column,o.lineNumber,o.column):new ar(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,a=null;if(s){s.sort(qo.compareRangesUsingStarts);const[t,i]=s;if(r=e?t.getStartPosition():t.getEndPosition(),a=e?i.getEndPosition():i.getStartPosition(),i.containsPosition(o)){const e=r;r=a,a=e}}r&&a&&i.push(new ar(r.lineNumber,r.column,a.lineNumber,a.column))})),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}_updateBrackets(){if("never"===this._matchBrackets)return;this._recomputeBrackets();let e=[],t=0;for(const i of this._lastBracketsData){let n=i.brackets;n&&(e[t++]={range:n[0],options:i.options},e[t++]={range:n[1],options:i.options})}this._decorations=this._editor.deltaDecorations(this._decorations,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);let o=[],s=0;for(let c=0,h=e.length;c1&&o.sort(er.compare);let r=[],a=0,l=0,d=n.length;for(let c=0,h=o.length;c{const i=e.getColor(iE);i&&t.addRule(`.monaco-editor .bracket-match { background-color: ${i}; }`);const n=e.getColor(nE);n&&t.addRule(`.monaco-editor .bracket-match { border: 1px solid ${n}; }`)})),ux.appendMenuItem(cx.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:mf(0,"Go to &&Bracket")},order:2});class uJ{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 s=new qo(i,n-1,i,n),r=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new qo(i,o,i,o),r)}else{const s=new qo(i,o,i,o+1),r=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new qo(i,n,i,n),r)}}computeCursorState(e,t){return this._isMovingLeft?new ar(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new ar(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}class gJ extends xx{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 uJ(o,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}Lx(class extends gJ{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:mf(0,"Move Selected Text Left"),alias:"Move Selected Text Left",precondition:yI.writable})}}),Lx(class extends gJ{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:mf(0,"Move Selected Text Right"),alias:"Move Selected Text Right",precondition:yI.writable})}});Lx(class extends xx{constructor(){super({id:"editor.action.transposeLetters",label:mf(0,"Transpose Letters"),alias:"Transpose Letters",precondition:yI.writable,kbOpts:{kbExpr:yI.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;let i=t.getModel(),n=[],o=t.getSelections();for(let s of o){if(!s.isEmpty())continue;let e=s.startLineNumber,t=s.startColumn,o=i.getLineMaxColumn(e);if(1===e&&(1===t||2===t&&2===o))continue;let r=t===o?s.getPosition():sI.rightPosition(i,s.getPosition().lineNumber,s.getPosition().column),a=sI.leftPosition(i,r),l=sI.leftPosition(i,a),d=i.getValueInRange(qo.fromPositions(l,a)),c=i.getValueInRange(qo.fromPositions(a,r)),h=qo.fromPositions(l,r);n.push(new JE(h,c+d))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}});var pJ=globalThis&&globalThis.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,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){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const mJ="9_cutcopypaste",fJ=Ts||document.queryCommandSupported("cut"),_J=Ts||document.queryCommandSupported("copy"),vJ=void 0!==navigator.clipboard&&!o_||document.queryCommandSupported("paste");function bJ(e){return e.register(),e}const wJ=fJ?bJ(new wx({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:Ts?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:cx.MenubarEditMenu,group:"2_ccp",title:mf(0,"Cu&&t"),order:1},{menuId:cx.EditorContext,group:mJ,title:mf(0,"Cut"),when:yI.writable,order:1},{menuId:cx.CommandPalette,group:"",title:mf(0,"Cut"),order:1},{menuId:cx.SimpleEditorContext,group:mJ,title:mf(0,"Cut"),when:yI.writable,order:1}]})):void 0,CJ=_J?bJ(new wx({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:Ts?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:cx.MenubarEditMenu,group:"2_ccp",title:mf(0,"&&Copy"),order:2},{menuId:cx.EditorContext,group:mJ,title:mf(0,"Copy"),order:2},{menuId:cx.CommandPalette,group:"",title:mf(0,"Copy"),order:1},{menuId:cx.SimpleEditorContext,group:mJ,title:mf(0,"Copy"),order:2}]})):void 0;ux.appendMenuItem(cx.MenubarEditMenu,{submenu:cx.MenubarCopy,title:{value:mf(0,"Copy As"),original:"Copy As"},group:"2_ccp",order:3}),ux.appendMenuItem(cx.EditorContext,{submenu:cx.EditorContextCopy,title:{value:mf(0,"Copy As"),original:"Copy As"},group:mJ,order:3});const yJ=vJ?bJ(new wx({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:Ts?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:cx.MenubarEditMenu,group:"2_ccp",title:mf(0,"&&Paste"),order:4},{menuId:cx.EditorContext,group:mJ,title:mf(0,"Paste"),when:yI.writable,order:4},{menuId:cx.CommandPalette,group:"",title:mf(0,"Paste"),order:1},{menuId:cx.SimpleEditorContext,group:mJ,title:mf(0,"Paste"),when:yI.writable,order:4}]})):void 0;class xJ extends xx{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:mf(0,"Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:yI.textInputFocus,primary:0,weight:100}})}run(e,t){if(!t.hasModel())return;!t.getOption(32)&&t.getSelection().isEmpty()||(TN.forceCopyWithSyntaxHighlighting=!0,t.focus(),document.execCommand("copy"),TN.forceCopyWithSyntaxHighlighting=!1)}}function SJ(e,t){e&&(e.addImplementation(1e4,"code-editor",((e,i)=>{const n=e.get(N_).getFocusedCodeEditor();if(n&&n.hasTextFocus()){const e=n.getOption(32),i=n.getSelection();return i&&i.isEmpty()&&!e||document.execCommand(t),!0}return!1})),e.addImplementation(0,"generic-dom",((e,i)=>(document.execCommand(t),!0))))}SJ(wJ,"cut"),SJ(CJ,"copy"),yJ&&(yJ.addImplementation(1e4,"code-editor",((e,t)=>{const i=e.get(N_),n=e.get(jB),o=i.getFocusedCodeEditor();if(o&&o.hasTextFocus()){return!(!document.execCommand("paste")&&Fs)||pJ(void 0,void 0,void 0,(function*(){const e=yield n.readText();if(""!==e){const t=MN.INSTANCE.get(e);let i=!1,n=null,s=null;t&&(i=o.getOption(32)&&!!t.isFromEmptySelection,n=void 0!==t.multicursorText?t.multicursorText:null,s=t.mode),o.trigger("keyboard","paste",{text:e,pasteOnNewLine:i,multicursorText:n,mode:s})}}))}return!1})),yJ.addImplementation(0,"generic-dom",((e,t)=>(document.execCommand("paste"),!0)))),_J&&Lx(xJ);class kJ{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+kJ.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new kJ(this.value+kJ.sep+e)}}function DJ(e,t,i){return!!t.contains(e)&&(!i||!t.contains(i))}kJ.sep=".",kJ.None=new kJ("@@none@@"),kJ.Empty=new kJ(""),kJ.QuickFix=new kJ("quickfix"),kJ.Refactor=new kJ("refactor"),kJ.Source=new kJ("source"),kJ.SourceOrganizeImports=kJ.Source.append("organizeImports"),kJ.SourceFixAll=kJ.Source.append("fixAll");class LJ{constructor(e,t,i){this.kind=e,this.apply=t,this.preferred=i}static fromUser(e,t){return e&&"object"==typeof e?new LJ(LJ.getKindFromUser(e,t.kind),LJ.getApplyFromUser(e,t.apply),LJ.getPreferredUser(e)):new LJ(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 kJ(e.kind):t}static getPreferredUser(e){return"boolean"==typeof e.preferred&&e.preferred}}var NJ=globalThis&&globalThis.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,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){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const EJ="editor.action.codeAction",IJ="editor.action.refactor",TJ="editor.action.sourceAction",MJ="editor.action.organizeImports",AJ="editor.action.fixAll";class OJ{constructor(e,t){this.action=e,this.provider=t}resolve(e){var t;return NJ(this,void 0,void 0,(function*(){if((null===(t=this.provider)||void 0===t?void 0:t.resolveCodeAction)&&!this.action.edit){let t;try{t=yield this.provider.resolveCodeAction(this.action,e)}catch(i){Ta(i)}t&&(this.action.edit=t.edit)}return this}))}}class RJ extends Uo{constructor(e,t,i){super(),this.documentation=t,this._register(i),this.allActions=[...e].sort(RJ.codeActionsComparator),this.validActions=this.allActions.filter((({action:e})=>!e.disabled))}static codeActionsComparator({action:e},{action:t}){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:gs(e.diagnostics)?gs(t.diagnostics)?e.diagnostics[0].message.localeCompare(t.diagnostics[0].message):-1:gs(t.diagnostics)?1:0}get hasAutoFix(){return this.validActions.some((({action:e})=>!!e.kind&&kJ.QuickFix.contains(new kJ(e.kind))&&!!e.isPreferred))}}const PJ={actions:[],documentation:void 0};function FJ(e,t,i,n,o,s){var r;const a=n.filter||{},l={only:null===(r=a.include)||void 0===r?void 0:r.value,trigger:n.type},d=new yX(t,s),c=function(e,t,i){return e.all(t).filter((e=>!e.providedCodeActionKinds||e.providedCodeActionKinds.some((e=>function(e,t){return!(e.include&&!e.include.intersects(t)||e.excludes&&e.excludes.some((i=>DJ(t,i,e.include)))||!e.includeSourceActions&&kJ.Source.contains(t))}(i,new kJ(e))))))}(e,t,a),h=new ws,u=c.map((e=>NJ(this,void 0,void 0,(function*(){try{o.report(e);const n=yield e.provideCodeActions(t,i,l,d.token);if(n&&h.add(n),d.token.isCancellationRequested)return PJ;const s=((null==n?void 0:n.actions)||[]).filter((e=>e&&function(e,t){const i=t.kind?new kJ(t.kind):void 0;return!(!(!e.include||i&&e.include.contains(i))||e.excludes&&i&&e.excludes.some((t=>DJ(i,t,e.include)))||!e.includeSourceActions&&i&&kJ.Source.contains(i)||e.onlyIncludePreferredActions&&!t.isPreferred)}(a,e))),r=function(e,t,i){if(!e.documentation)return;const n=e.documentation.map((e=>({kind:new kJ(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 null==e?void 0:e.command}for(const o of t)if(o.kind)for(const e of n)if(e.kind.contains(new kJ(o.kind)))return e.command;return}(e,s,a.include);return{actions:s.map((t=>new OJ(t,e))),documentation:r}}catch(n){if(Ea(n))throw n;return Ta(n),PJ}})))),g=e.onDidChange((()=>{const i=e.all(t);jo(i,c)||d.cancel()}));return Promise.all(u).then((e=>{const t=ba(e.map((e=>e.actions))),i=Sa(e.map((e=>e.documentation)));return new RJ(t,i,h)})).finally((()=>{g.dispose(),d.dispose()}))}Cy.registerCommand("_executeCodeActionProvider",(function(e,t,i,n,o){return NJ(this,void 0,void 0,(function*(){if(!(t instanceof Ps))throw Ms();const{codeActionProvider:s}=e.get(Lb),r=e.get(Gv).getModel(t);if(!r)throw Ms();const a=ar.isISelection(i)?ar.liftSelection(i):qo.isIRange(i)?r.validateRange(i):void 0;if(!a)throw Ms();const l="string"==typeof n?new kJ(n):void 0,d=yield FJ(s,r,a,{type:1,filter:{includeSourceActions:!0,include:l}},UB.None,Ia.None),c=[],h=Math.min(d.validActions.length,"number"==typeof o?o:0);for(let e=0;ee.action))}finally{setTimeout((()=>d.dispose()),100)}}))}));var BJ=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},VJ=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}};let WJ=class e{constructor(t,i){this._messageWidget=new Rr,this._messageListeners=new ws,this._editor=t,this._visible=e.MESSAGE_VISIBLE.bindTo(i),this._editorListener=this._editor.onDidAttemptReadOnlyEdit((()=>this._onDidAttemptReadOnlyEdit()))}static get(t){return t.getContribution(e.ID)}dispose(){this._editorListener.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){let i;dy(e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new zJ(this._editor,t,e),this._messageListeners.add(this._editor.onDidBlurEditorText((()=>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(new rb((()=>this.closeMessage()),3e3)),this._messageListeners.add(this._editor.onMouseMove((e=>{e.target.position&&(i?i.containsPosition(e.target.position)||this.closeMessage():i=new qo(t.lineNumber-3,1,e.target.position.lineNumber+3,1))})))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(zJ.fadeOut(this._messageWidget.value))}_onDidAttemptReadOnlyEdit(){this._editor.hasModel()&&this.showMessage(mf(0,"Cannot edit in read-only editor"),this._editor.getPosition())}};WJ.ID="editor.contrib.messageController",WJ.MESSAGE_VISIBLE=new Uy("messageVisible",!1,mf(0,"Whether the editor is currently showing an inline message")),WJ=BJ([VJ(1,$y)],WJ);Dx(new(yx.bindToContribution(WJ.get))({id:"leaveEditorMessage",precondition:WJ.MESSAGE_VISIBLE,handler:e=>e.closeMessage(),kbOpts:{weight:130,primary:9}}));class zJ{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-1},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage");const o=document.createElement("div");o.classList.add("anchor","top"),this._domNode.appendChild(o);const s=document.createElement("div");s.classList.add("message"),s.textContent=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")}static fadeOut(e){let t;const i=()=>{e.dispose(),clearTimeout(t),e.getDomNode().removeEventListener("animationend",i)};return t=setTimeout(i,110),e.getDomNode().addEventListener("animationend",i),e.getDomNode().classList.add("fadeOut"),{dispose:i}}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2]}}afterRender(e){this._domNode.classList.toggle("below",2===e)}}Ix(WJ.ID,WJ);var HJ=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},jJ=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}},UJ=globalThis&&globalThis.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,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){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class $J extends my{constructor(e,t){super(e.command?e.command.id:e.title,e.title.replace(/\r\n|\r|\n/g," "),void 0,!e.disabled,t),this.action=e}}let KJ=class extends Uo{constructor(e,t,i,n,o){super(),this._editor=e,this._delegate=t,this._contextMenuService=i,this._languageFeaturesService=o,this._visible=!1,this._showingActions=this._register(new Rr),this._keybindingResolver=new qJ({getKeybindings:()=>n.getKeybindings()})}get isVisible(){return this._visible}show(e,t,i,n){return UJ(this,void 0,void 0,(function*(){const o=n.includeDisabledActions?t.allActions:t.validActions;if(!o.length)return void(this._visible=!1);if(!this._editor.getDomNode())throw this._visible=!1,_s();this._visible=!0,this._showingActions.value=t;const s=this.getMenuActions(e,o,t.documentation),r=er.isIPosition(i)?this._toCoords(i):i||{x:0,y:0},a=this._keybindingResolver.getResolver(),l=this._editor.getOption(115);this._contextMenuService.showContextMenu({domForShadowRoot:l?this._editor.getDomNode():void 0,getAnchor:()=>r,getActions:()=>s,onHide:()=>{this._visible=!1,this._editor.focus()},autoSelectFirstItem:!0,getKeyBinding:e=>e instanceof $J?a(e.action):void 0})}))}getMenuActions(e,t,i){var n,o;const s=e=>new $J(e.action,(()=>this._delegate.onSelectCodeAction(e))),r=t.map(s),a=[...i],l=this._editor.getModel();if(l&&r.length)for(const d of this._languageFeaturesService.codeActionProvider.all(l))d._getAdditionalMenuItems&&a.push(...d._getAdditionalMenuItems({trigger:e.type,only:null===(o=null===(n=e.filter)||void 0===n?void 0:n.include)||void 0===o?void 0:o.value},t.map((e=>e.action))));return a.length&&r.push(new _y,...a.map((e=>s(new OJ({title:e.title,command:e},void 0))))),r}_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=yC(this._editor.getDomNode());return{x:i.left+t.left,y:i.top+t.top+t.height}}};KJ=HJ([jJ(2,WB),jJ(3,kW),jJ(4,Lb)],KJ);class qJ{constructor(e){this._keybindingProvider=e}getResolver(){const e=new Rl((()=>this._keybindingProvider.getKeybindings().filter((e=>qJ.codeActionCommands.indexOf(e.command)>=0)).filter((e=>e.resolvedKeybinding)).map((e=>{let t=e.commandArgs;return e.command===MJ?t={kind:kJ.SourceOrganizeImports.value}:e.command===AJ&&(t={kind:kJ.SourceFixAll.value}),Object.assign({resolvedKeybinding:e.resolvedKeybinding},LJ.fromUser(t,{kind:kJ.None,apply:"never"}))}))));return t=>{if(t.kind){const i=this.bestKeybindingForCodeAction(t,e.getValue());return null==i?void 0:i.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const i=new kJ(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)}}qJ.codeActionCommands=[IJ,EJ,TJ,MJ,AJ];var GJ,ZJ=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},YJ=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}};!function(e){e.Hidden={type:0};e.Showing=class{constructor(e,t,i,n){this.actions=e,this.trigger=t,this.editorPosition=i,this.widgetPosition=n,this.type=1}}}(GJ||(GJ={}));let XJ=class e extends Uo{constructor(e,t,i,n){var o;super(),this._editor=e,this._quickFixActionId=t,this._preferredFixActionId=i,this._keybindingService=n,this._onClick=this._register(new $o),this.onClick=this._onClick.event,this._state=GJ.Hidden,this._domNode=document.createElement("div"),this._domNode.className=br.lightBulb.classNames,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()}))),oS.ignoreTarget(this._domNode),this._register(rC(this._domNode,oC((e=>{if(1!==this.state.type)return;this._editor.focus(),e.preventDefault();const{top:t,height:i}=yC(this._domNode),n=this._editor.getOption(59);let o=Math.floor(n/3);null!==this.state.widgetPosition.position&&this.state.widgetPosition.position.lineNumber{if(1!=(1&e.buttons))return;this.hide();const t=new rS;t.startMonitoring(e.target,e.buttons,sS,(()=>{}),(()=>{t.dispose()}))}))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(57)&&!this._editor.getOption(57).enabled&&this.hide()}))),this._updateLightBulbTitleAndIcon(),this._register(this._keybindingService.onDidUpdateKeybindings(this._updateLightBulbTitleAndIcon,this))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return 1===this._state.type?this._state.widgetPosition:null}update(t,i,n){if(t.validActions.length<=0)return this.hide();const o=this._editor.getOptions();if(!o.get(57).enabled)return this.hide();const s=this._editor.getModel();if(!s)return this.hide();const{lineNumber:r,column:a}=s.validatePosition(n),l=s.getOptions().tabSize,d=o.get(44),c=yT(s.getLineContent(r),l),h=e=>e>2&&this._editor.getTopForLineNumber(e)===this._editor.getTopForLineNumber(e-1);let u=r;if(!(d.spaceWidth*c>22))if(r>1&&!h(r-1))u-=1;else if(h(r+1)){if(a*d.spaceWidth<22)return this.hide()}else u+=1;this.state=new GJ.Showing(t,i,n,{position:{lineNumber:u,column:1},preference:e._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state=GJ.Hidden,this._editor.layoutContentWidget(this)}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(1===this.state.type&&this.state.actions.hasAutoFix){this._domNode.classList.remove(...br.lightBulb.classNamesArray),this._domNode.classList.add(...br.lightbulbAutofix.classNamesArray);const e=this._keybindingService.lookupKeybinding(this._preferredFixActionId);if(e)return void(this.title=mf(0,"Show Code Actions. Preferred Quick Fix Available ({0})",e.getLabel()))}this._domNode.classList.remove(...br.lightbulbAutofix.classNamesArray),this._domNode.classList.add(...br.lightBulb.classNamesArray);const e=this._keybindingService.lookupKeybinding(this._quickFixActionId);this.title=e?mf(0,"Show Code Actions ({0})",e.getLabel()):mf(0,"Show Code Actions")}set title(e){this._domNode.title=e}};XJ._posPref=[0],XJ=ZJ([YJ(3,kW)],XJ),sx(((e,t)=>{var i;const n=null===(i=e.getColor(pk))||void 0===i?void 0:i.transparent(.7),o=e.getColor(Qk);o&&t.addRule(`\n\t\t.monaco-editor .contentWidgets ${br.lightBulb.cssSelector} {\n\t\t\tcolor: ${o};\n\t\t\tbackground-color: ${n};\n\t\t}`);const s=e.getColor(Jk);s&&t.addRule(`\n\t\t.monaco-editor .contentWidgets ${br.lightbulbAutofix.cssSelector} {\n\t\t\tcolor: ${s};\n\t\t\tbackground-color: ${n};\n\t\t}`)}));var QJ,JJ=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},e0=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}},t0=globalThis&&globalThis.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,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){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))},i0=globalThis&&globalThis.__classPrivateFieldSet||function(e,t,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,i):o?o.value=i:t.set(e,i),i},n0=globalThis&&globalThis.__classPrivateFieldGet||function(e,t,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)};let o0=class extends Uo{constructor(e,t,i,n,o){super(),this._editor=e,this.delegate=n,this._activeCodeActions=this._register(new Rr),QJ.set(this,!1),this._codeActionWidget=new Rl((()=>this._register(o.createInstance(KJ,this._editor,{onSelectCodeAction:e=>t0(this,void 0,void 0,(function*(){this.delegate.applyCodeAction(e,!0)}))})))),this._lightBulbWidget=new Rl((()=>{const e=this._register(o.createInstance(XJ,this._editor,t,i));return this._register(e.onClick((e=>this.showCodeActionList(e.trigger,e.actions,e,{includeDisabledActions:!1})))),e}))}dispose(){i0(this,QJ,!0,"f"),super.dispose()}update(e){var t,i,n,o,s;return t0(this,void 0,void 0,(function*(){if(1!==e.type)return void(null===(t=this._lightBulbWidget.rawValue)||void 0===t||t.hide());let r;try{r=yield e.actions}catch(a){return void Jo(a)}if(!n0(this,QJ,"f"))if(this._lightBulbWidget.getValue().update(r,e.trigger,e.position),1===e.trigger.type){if(null===(i=e.trigger.filter)||void 0===i?void 0:i.include){const t=this.tryGetValidActionToApply(e.trigger,r);if(t){try{this._lightBulbWidget.getValue().hide(),yield this.delegate.applyCodeAction(t,!1)}finally{r.dispose()}return}if(e.trigger.context){const t=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,r);if(t&&t.action.disabled)return null===(n=WJ.get(this._editor))||void 0===n||n.showMessage(t.action.disabled,e.trigger.context.position),void r.dispose()}}const t=!!(null===(o=e.trigger.filter)||void 0===o?void 0:o.include);if(e.trigger.context&&(!r.allActions.length||!t&&!r.validActions.length))return null===(s=WJ.get(this._editor))||void 0===s||s.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=r,void r.dispose();this._activeCodeActions.value=r,this._codeActionWidget.getValue().show(e.trigger,r,e.position,{includeDisabledActions:t})}else this._codeActionWidget.getValue().isVisible?r.dispose():this._activeCodeActions.value=r}))}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}showCodeActionList(e,t,i,n){return t0(this,void 0,void 0,(function*(){this._codeActionWidget.getValue().show(e,t,i,n)}))}};QJ=new WeakMap,o0=JJ([e0(4,k_)],o0);var s0,r0=globalThis&&globalThis.__classPrivateFieldGet||function(e,t,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)},a0=globalThis&&globalThis.__classPrivateFieldSet||function(e,t,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,i):o?o.value=i:t.set(e,i),i};const l0=new Uy("supportedCodeAction","");class d0 extends Uo{constructor(e,t,i,n=250){super(),this._editor=e,this._markerService=t,this._signalChange=i,this._delay=n,this._autoTriggerTimer=this._register(new rb),this._register(this._markerService.onMarkerChanged((e=>this._onMarkerChanges(e)))),this._register(this._editor.onDidChangeCursorPosition((()=>this._onCursorChange())))}trigger(e){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);return this._createEventAndSignalChange(e,t)}_onMarkerChanges(e){const t=this._editor.getModel();t&&e.some((e=>iR(e,t.uri)))&&this._autoTriggerTimer.cancelAndSet((()=>{this.trigger({type:2})}),this._delay)}_onCursorChange(){this._autoTriggerTimer.cancelAndSet((()=>{this.trigger({type:2})}),this._delay)}_getRangeOfMarker(e){const t=this._editor.getModel();if(t)for(const i of this._markerService.read({resource:t.uri})){const n=t.validateRange(i);if(qo.intersectRanges(n,e))return qo.lift(n)}}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=this._editor.getSelection();if(i.isEmpty()&&2===e.type){const{lineNumber:e,column:n}=i.getPosition(),o=t.getLineContent(e);if(0===o.length)return;if(1===n){if(/\s/.test(o[0]))return}else if(n===t.getLineMaxColumn(e)){if(/\s/.test(o[o.length-1]))return}else if(/\s/.test(o[n-2])&&/\s/.test(o[n-1]))return}return i}_createEventAndSignalChange(e,t){const i=this._editor.getModel();if(!t||!i)return void this._signalChange(void 0);const n=this._getRangeOfMarker(t),o=n?n.getStartPosition():t.getStartPosition(),s={trigger:e,selection:t,position:o};return this._signalChange(s),s}}var c0;!function(e){e.Empty={type:0};e.Triggered=class{constructor(e,t,i,n){this.trigger=e,this.rangeOrSelection=t,this.position=i,this._cancellablePromise=n,this.type=1,this.actions=n.catch((e=>{if(Ea(e))return h0;throw e}))}cancel(){this._cancellablePromise.cancel()}}}(c0||(c0={}));const h0={allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1};class u0 extends Uo{constructor(e,t,i,n,o){super(),this._editor=e,this._registry=t,this._markerService=i,this._progressService=o,this._codeActionOracle=this._register(new Rr),this._state=c0.Empty,this._onDidChangeState=this._register(new $o),this.onDidChangeState=this._onDidChangeState.event,s0.set(this,!1),this._supportedCodeActions=l0.bindTo(n),this._register(this._editor.onDidChangeModel((()=>this._update()))),this._register(this._editor.onDidChangeModelLanguage((()=>this._update()))),this._register(this._registry.onDidChange((()=>this._update()))),this._update()}dispose(){r0(this,s0,"f")||(a0(this,s0,!0,"f"),super.dispose(),this.setState(c0.Empty,!0))}_update(){if(r0(this,s0,"f"))return;this._codeActionOracle.value=void 0,this.setState(c0.Empty);const e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(81)){const t=[];for(const i of this._registry.all(e))Array.isArray(i.providedCodeActionKinds)&&t.push(...i.providedCodeActionKinds);this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new d0(this._editor,this._markerService,(t=>{var i;if(!t)return void this.setState(c0.Empty);const n=Xv((i=>FJ(this._registry,e,t.selection,t.trigger,UB.None,i)));1===t.trigger.type&&(null===(i=this._progressService)||void 0===i||i.showWhile(n,250)),this.setState(new c0.Triggered(t.trigger,t.selection,t.position,n))}),void 0),this._codeActionOracle.value.trigger({type:2})}else this._supportedCodeActions.reset()}trigger(e){this._codeActionOracle.value&&this._codeActionOracle.value.trigger(e)}setState(e,t){e!==this._state&&(1===this._state.type&&this._state.cancel(),this._state=e,t||r0(this,s0,"f")||this._onDidChangeState.fire(e))}}s0=new WeakMap;var g0=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},p0=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}},m0=globalThis&&globalThis.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,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){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function f0(e){return Sy.regex(l0.keys()[0],new RegExp("(\\s|^)"+Xo(e.value)+"\\b"))}const _0={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:mf(0,"Kind of the code action to run.")},apply:{type:"string",description:mf(0,"Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[mf(0,"Always apply the first returned code action."),mf(0,"Apply the first returned code action if it is the only one."),mf(0,"Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:mf(0,"Controls if only preferred code actions should be returned.")}}};let v0=class e extends Uo{constructor(e,t,i,n,o,s){super(),this._instantiationService=o,this._editor=e,this._model=this._register(new u0(this._editor,s.codeActionProvider,t,i,n)),this._register(this._model.onDidChangeState((e=>this.update(e)))),this._ui=new Rl((()=>this._register(new o0(e,C0.Id,y0.Id,{applyCodeAction:(e,t)=>m0(this,void 0,void 0,(function*(){try{yield this._applyCodeAction(e)}finally{t&&this._trigger({type:2,filter:{}})}}))},this._instantiationService))))}static get(t){return t.getContribution(e.ID)}update(e){this._ui.getValue().update(e)}showCodeActions(e,t,i){return this._ui.getValue().showCodeActionList(e,t,i,{includeDisabledActions:!1})}manualTriggerAtCurrentPosition(e,t,i){var n;if(!this._editor.hasModel())return;null===(n=WJ.get(this._editor))||void 0===n||n.closeMessage();const o=this._editor.getPosition();this._trigger({type:1,filter:t,autoApply:i,context:{notAvailableMessage:e,position:o}})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e){return this._instantiationService.invokeFunction(b0,e,this._editor)}};function b0(e,t,i){return m0(this,void 0,void 0,(function*(){const n=e.get(lW),o=e.get(wy),s=e.get(vx),r=e.get(vF);if(s.publicLog2("codeAction.applyCodeAction",{codeActionTitle:t.action.title,codeActionKind:t.action.kind,codeActionIsPreferred:!!t.action.isPreferred}),yield t.resolve(Ia.None),t.action.edit&&(yield n.apply(dW.convert(t.action.edit),{editor:i,label:t.action.title})),t.action.command)try{yield o.executeCommand(t.action.command.id,...t.action.command.arguments||[])}catch(a){const e=function(e){return"string"==typeof e?e:e instanceof Error&&"string"==typeof e.message?e.message:void 0}(a);r.error("string"==typeof e?e:mf(0,"An unknown error occurred while applying the code action"))}}))}function w0(e,t,i,n){if(e.hasModel()){const o=v0.get(e);o&&o.manualTriggerAtCurrentPosition(t,i,n)}}v0.ID="editor.contrib.quickFixController",v0=g0([p0(1,pj),p0(2,$y),p0(3,$B),p0(4,k_),p0(5,Lb)],v0);class C0 extends xx{constructor(){super({id:C0.Id,label:mf(0,"Quick Fix..."),alias:"Quick Fix...",precondition:Sy.and(yI.writable,yI.hasCodeActionsProvider),kbOpts:{kbExpr:yI.editorTextFocus,primary:2132,weight:100}})}run(e,t){return w0(t,mf(0,"No code actions available"),void 0,void 0)}}C0.Id="editor.action.quickFix";class y0 extends xx{constructor(){super({id:y0.Id,label:mf(0,"Auto Fix..."),alias:"Auto Fix...",precondition:Sy.and(yI.writable,f0(kJ.QuickFix)),kbOpts:{kbExpr:yI.editorTextFocus,primary:1620,mac:{primary:2644},weight:100}})}run(e,t){return w0(t,mf(0,"No auto fixes available"),{include:kJ.QuickFix,onlyIncludePreferredActions:!0},"ifSingle")}}y0.Id="editor.action.autoFix",Ix(v0.ID,v0),Lx(C0),Lx(class extends xx{constructor(){super({id:IJ,label:mf(0,"Refactor..."),alias:"Refactor...",precondition:Sy.and(yI.writable,yI.hasCodeActionsProvider),kbOpts:{kbExpr:yI.editorTextFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:Sy.and(yI.writable,f0(kJ.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:_0}]}})}run(e,t,i){const n=LJ.fromUser(i,{kind:kJ.Refactor,apply:"never"});return w0(t,"string"==typeof(null==i?void 0:i.kind)?n.preferred?mf(0,"No preferred refactorings for '{0}' available",i.kind):mf(0,"No refactorings for '{0}' available",i.kind):n.preferred?mf(0,"No preferred refactorings available"):mf(0,"No refactorings available"),{include:kJ.Refactor.contains(n.kind)?n.kind:kJ.None,onlyIncludePreferredActions:n.preferred},n.apply)}}),Lx(class extends xx{constructor(){super({id:TJ,label:mf(0,"Source Action..."),alias:"Source Action...",precondition:Sy.and(yI.writable,yI.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:Sy.and(yI.writable,f0(kJ.Source))},description:{description:"Source Action...",args:[{name:"args",schema:_0}]}})}run(e,t,i){const n=LJ.fromUser(i,{kind:kJ.Source,apply:"never"});return w0(t,"string"==typeof(null==i?void 0:i.kind)?n.preferred?mf(0,"No preferred source actions for '{0}' available",i.kind):mf(0,"No source actions for '{0}' available",i.kind):n.preferred?mf(0,"No preferred source actions available"):mf(0,"No source actions available"),{include:kJ.Source.contains(n.kind)?n.kind:kJ.None,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply)}}),Lx(class extends xx{constructor(){super({id:MJ,label:mf(0,"Organize Imports"),alias:"Organize Imports",precondition:Sy.and(yI.writable,f0(kJ.SourceOrganizeImports)),kbOpts:{kbExpr:yI.editorTextFocus,primary:1581,weight:100}})}run(e,t){return w0(t,mf(0,"No organize imports action available"),{include:kJ.SourceOrganizeImports,includeSourceActions:!0},"ifSingle")}}),Lx(y0),Lx(class extends xx{constructor(){super({id:AJ,label:mf(0,"Fix All"),alias:"Fix All",precondition:Sy.and(yI.writable,f0(kJ.SourceFixAll))})}run(e,t){return w0(t,mf(0,"No fix all action available"),{include:kJ.SourceFixAll,includeSourceActions:!0},"ifSingle")}}),Dx(new class extends yx{constructor(){super({id:EJ,precondition:Sy.and(yI.writable,yI.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:_0}]}})}runEditorCommand(e,t,i){const n=LJ.fromUser(i,{kind:kJ.Empty,apply:"ifSingle"});return w0(t,"string"==typeof(null==i?void 0:i.kind)?n.preferred?mf(0,"No preferred code actions for '{0}' available",i.kind):mf(0,"No code actions for '{0}' available",i.kind):n.preferred?mf(0,"No preferred code actions available"):mf(0,"No code actions available"),{include:n.kind,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply)}});var x0=globalThis&&globalThis.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,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){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class S0{constructor(){this.lenses=[],this._disposables=new ws}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})}}function k0(e,t,i){return x0(this,void 0,void 0,(function*(){const n=e.ordered(t),o=new Map,s=new S0,r=n.map(((e,n)=>x0(this,void 0,void 0,(function*(){o.set(e,n);try{const n=yield Promise.resolve(e.provideCodeLenses(t,i));n&&s.add(n,e)}catch(r){Ta(r)}}))));return yield Promise.all(r),s.lenses=s.lenses.sort(((e,t)=>e.symbol.range.startLineNumbert.symbol.range.startLineNumber?1:o.get(e.provider)o.get(t.provider)?1:e.symbol.range.startColumnt.symbol.range.startColumn?1:0)),s}))}Cy.registerCommand("_executeCodeLensProvider",(function(e,...t){let[i,n]=t;Js(Ps.isUri(i)),Js("number"==typeof n||!n);const{codeLensProvider:o}=e.get(Lb),s=e.get(Gv).getModel(i);if(!s)throw Ms();const r=[],a=new ws;return k0(o,s,Ia.None).then((e=>{a.add(e);let t=[];for(const i of e.lenses)null==n||Boolean(i.symbol.command)?r.push(i.symbol):n-- >0&&i.provider.resolveCodeLens&&t.push(Promise.resolve(i.provider.resolveCodeLens(s,i.symbol,Ia.None)).then((e=>r.push(e||i.symbol))));return Promise.all(t)})).then((()=>r)).finally((()=>{setTimeout((()=>a.dispose()),100)}))}));var D0=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},L0=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}};const N0=L_("ICodeLensCache");class E0{constructor(e,t){this.lineCount=e,this.data=t}}let I0=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new QV(20,.75);db((()=>e.remove("codelens/cache",1)));const t="codelens/cache2",i=e.get(t,1,"{}");this._deserialize(i),kr(e.onWillSaveState)((i=>{i.reason===wZ.SHUTDOWN&&e.store(t,this._serialize(),1,1)}))}put(e,t){const i=t.lenses.map((e=>{var t;return{range:e.symbol.range,command:e.symbol.command&&{id:"",title:null===(t=e.symbol.command)||void 0===t?void 0:t.title}}})),n=new S0;n.add({lenses:i,dispose:()=>{}},this._fakeProvider);const o=new E0(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 qo(e,1,e,11)});const o=new S0;o.add({lenses:n,dispose(){}},this._fakeProvider),this._cache.set(e,new E0(i.lineCount,o))}}catch(Bte){}}};I0=D0([L0(0,bZ)],I0),Iv(N0,I0);class T0{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 M0{constructor(e,t,i){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id="codelens.widget-"+M0._idPool++,this.updatePosition(i),this._domNode=document.createElement("span"),this._domNode.className=`codelens-decoration ${t}`}withCommands(e,t){this._commands.clear();let i=[],n=!1;for(let o=0;o{e.symbol.command&&l.push(e.symbol),n.addDecoration({range:e.symbol.range,options:GP.EMPTY},(e=>this._decorationIds[t]=e)),a=a?qo.plusRange(a,e.symbol.range):qo.lift(e.symbol.range)})),this._viewZone=new T0(a.startLineNumber-1,s,r),this._viewZoneId=o.addZone(this._viewZone),l.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(l,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new M0(this._editor,this._className,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t&&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||qo.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:GP.EMPTY},(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},P0=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}},F0=globalThis&&globalThis.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,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){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let B0=class{constructor(e,t,i,n,o,s){this._editor=e,this._languageFeaturesService=t,this._commandService=n,this._notificationService=o,this._codeLensCache=s,this._disposables=new ws,this._localToDispose=new ws,this._lenses=[],this._oldCodeLensModels=new ws,this._provideCodeLensDebounce=i.for(t.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=i.for(t.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new lb((()=>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(44)||e.hasChanged(16)||e.hasChanged(15))&&this._updateLensStyle(),e.hasChanged(14)&&this._onModelChange()}))),this._disposables.add(t.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._styleClassName="_"+Pl(this._editor.getId()).toString(16),this._styleElement=RC(MC(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0),this._updateLensStyle()}dispose(){var e;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),null===(e=this._currentCodeLensModel)||void 0===e||e.dispose(),this._styleElement.remove()}_getLayoutInfo(){let e,t=this._editor.getOption(16);return!t||t<5?(t=.9*this._editor.getOption(46)|0,e=this._editor.getOption(59)):e=t*Math.max(1.3,this._editor.getOption(59)/this._editor.getOption(46))|0,{codeLensHeight:e,fontSize:t}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),i=this._editor.getOption(15),n=this._editor.getOption(44),o=`--codelens-font-family${this._styleClassName}`,s=`--codelens-font-features${this._styleClassName}`;let r=`\n\t\t.monaco-editor .codelens-decoration.${this._styleClassName} { line-height: ${e}px; font-size: ${t}px; padding-right: ${Math.round(.5*t)}px; font-feature-settings: var(${s}) }\n\t\t.monaco-editor .codelens-decoration.${this._styleClassName} span.codicon { line-height: ${e}px; font-size: ${t}px; }\n\t\t`;i&&(r+=`.monaco-editor .codelens-decoration.${this._styleClassName} { font-family: var(${o}), ${Gf.fontFamily}}`),this._styleElement.textContent=r,this._editor.getContainerDomNode().style.setProperty(o,null!=i?i:"inherit"),this._editor.getContainerDomNode().style.setProperty(s,n.fontFeatureSettings),this._editor.changeViewZones((t=>{for(let i of this._lenses)i.updateHeight(e,t)}))}_localDispose(){var e,t,i;null===(e=this._getCodeLensModelPromise)||void 0===e||e.cancel(),this._getCodeLensModelPromise=void 0,null===(t=this._resolveCodeLensesPromise)||void 0===t||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),null===(i=this._currentCodeLensModel)||void 0===i||i.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e)return;if(!this._editor.getOption(14))return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e))return void(t&&this._localToDispose.add(ob((()=>{const i=this._codeLensCache.get(e);t===i&&(this._codeLensCache.delete(e),this._onModelChange())}),3e4)));for(const n of this._languageFeaturesService.codeLensProvider.all(e))if("function"==typeof n.onDidChange){let e=n.onDidChange((()=>i.schedule()));this._localToDispose.add(e)}const i=new lb((()=>{var t;const n=Date.now();null===(t=this._getCodeLensModelPromise)||void 0===t||t.cancel(),this._getCodeLensModelPromise=Xv((t=>k0(this._languageFeaturesService.codeLensProvider,e,t))),this._getCodeLensModelPromise.then((t=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=t,this._codeLensCache.put(e,t);const o=this._provideCodeLensDebounce.update(e,Date.now()-n);i.delay=o,this._renderCodeLensSymbols(t),this._resolveCodeLensesInViewportSoon()}),Jo)}),this._provideCodeLensDebounce.get(e));this._localToDispose.add(i),this._localToDispose.add(es((()=>this._resolveCodeLensesScheduler.cancel()))),this._localToDispose.add(this._editor.onDidChangeModelContent((()=>{this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{let i=[],n=-1;this._lenses.forEach((e=>{e.isValid()&&n!==e.getLineNumber()?(e.update(t),n=e.getLineNumber()):i.push(e)}));let o=new A0;i.forEach((e=>{e.dispose(o,t),this._lenses.splice(this._lenses.indexOf(e),1)})),o.commit(e)}))})),i.schedule()}))),this._localToDispose.add(this._editor.onDidFocusEditorWidget((()=>{i.schedule()}))),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(es((()=>{if(this._editor.getModel()){const e=hB.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"===(null==t?void 0:t.tagName)&&(t=t.parentElement),"A"===(null==t?void 0:t.tagName))for(const i of this._lenses){let 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 A0;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;let t,i=this._editor.getModel().getLineCount(),n=[];for(let r of e.lenses){let e=r.symbol.range.startLineNumber;e<1||e>i||(t&&t[t.length-1].symbol.range.startLineNumber===e?t.push(r):(t=[r],n.push(t)))}const o=hB.capture(this._editor),s=this._getLayoutInfo();this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{const i=new A0;let o=0,r=0;for(;rthis._resolveCodeLensesInViewportSoon()))),o++,r++)}for(;othis._resolveCodeLensesInViewportSoon()))),r++;i.commit(e)}))})),o.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;null===(e=this._resolveCodeLensesPromise)||void 0===e||e.cancel(),this._resolveCodeLensesPromise=void 0;const t=this._editor.getModel();if(!t)return;const i=[],n=[];if(this._lenses.forEach((e=>{const o=e.computeIfNecessary(t);o&&(i.push(o),n.push(e))})),0===i.length)return;const o=Date.now(),s=Xv((e=>{const o=i.map(((i,o)=>{const s=new Array(i.length),r=i.map(((i,n)=>i.symbol.command||"function"!=typeof i.provider.resolveCodeLens?(s[n]=i.symbol,Promise.resolve(void 0)):Promise.resolve(i.provider.resolveCodeLens(t,i.symbol,e)).then((e=>{s[n]=e}),Ta)));return Promise.all(r).then((()=>{e.isCancellationRequested||n[o].isDisposed()||n[o].updateCommands(s)}))}));return Promise.all(o)}));this._resolveCodeLensesPromise=s,this._resolveCodeLensesPromise.then((()=>{const e=this._resolveCodeLensesDebounce.update(t,Date.now()-o);this._resolveCodeLensesScheduler.delay=e,this._currentCodeLensModel&&this._codeLensCache.put(t,this._currentCodeLensModel),this._oldCodeLensModels.clear(),s===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)}),(e=>{Jo(e),s===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)}))}getModel(){return this._currentCodeLensModel}};function V0(e,t,i,n){return Promise.resolve(i.provideColorPresentations(e,t,n))}B0.ID="css.editor.codeLens",B0=R0([P0(1,Lb),P0(2,oW),P0(3,wy),P0(4,vF),P0(5,N0)],B0),Ix(B0.ID,B0),Lx(class extends xx{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:yI.hasCodeLensProvider,label:mf(0,"Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}run(e,t){return F0(this,void 0,void 0,(function*(){if(!t.hasModel())return;const i=e.get(iG),n=e.get(wy),o=e.get(vF),s=t.getSelection().positionLineNumber,r=t.getContribution(B0.ID);if(!r)return;const a=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 d=yield i.pick(l,{canPickMany:!1});if(d){if(a.isDisposed)return yield n.executeCommand(this.id);try{yield n.executeCommand(d.command.id,...d.command.arguments||[])}catch(c){o.error(c)}}}))}}),Cy.registerCommand("_executeDocumentColorProvider",(function(e,...t){const[i]=t;if(!(i instanceof Ps))throw Ms();const{colorProvider:n}=e.get(Lb),o=e.get(Gv).getModel(i);if(!o)throw Ms();const s=[],r=n.ordered(o).reverse().map((e=>Promise.resolve(e.provideDocumentColors(o,Ia.None)).then((e=>{if(Array.isArray(e))for(let t of e)s.push({range:t.range,color:[t.color.red,t.color.green,t.color.blue,t.color.alpha]})}))));return Promise.all(r).then((()=>s))})),Cy.registerCommand("_executeColorPresentationProvider",(function(e,...t){const[i,n]=t,{uri:o,range:s}=n;if(!(o instanceof Ps&&Array.isArray(i)&&4===i.length&&qo.isIRange(s)))throw Ms();const[r,a,l,d]=i,{colorProvider:c}=e.get(Lb),h=e.get(Gv).getModel(o);if(!h)throw Ms();const u={range:s,color:{red:r,green:a,blue:l,alpha:d}},g=[],p=c.ordered(h).reverse().map((e=>Promise.resolve(e.provideColorPresentations(h,u,Ia.None)).then((e=>{Array.isArray(e)&&g.push(...e)}))));return Promise.all(p).then((()=>g))}));var W0=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},z0=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}},H0=globalThis&&globalThis.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,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){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const j0=Object.create({});let U0=class e extends Uo{constructor(t,i,n,o){super(),this._editor=t,this._configurationService=i,this._languageFeaturesService=n,this._localToDispose=this._register(new ws),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=new Set,this._ruleFactory=new VL(this._editor),this._colorDecorationClassRefs=this._register(new ws),this._debounceInformation=o.for(n.colorProvider,"Document Colors",{min:e.RECOMPUTE_TIME}),this._register(t.onDidChangeModel((()=>{this._isEnabled=this.isEnabled(),this.onModelChanged()}))),this._register(t.onDidChangeModelLanguage((()=>this.onModelChanged()))),this._register(n.colorProvider.onDidChange((()=>this.onModelChanged()))),this._register(t.onDidChangeConfiguration((()=>{let e=this._isEnabled;this._isEnabled=this.isEnabled(),e!==this._isEnabled&&(this._isEnabled?this.onModelChanged():this.removeAllDecorations())}))),this._timeoutTimer=null,this._computePromise=null,this._isEnabled=this.isEnabled(),this.onModelChanged()}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(17)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}onModelChanged(){if(this.stop(),!this._isEnabled)return;const e=this._editor.getModel();e&&this._languageFeaturesService.colorProvider.has(e)&&(this._localToDispose.add(this._editor.onDidChangeModelContent((()=>{this._timeoutTimer||(this._timeoutTimer=new rb,this._timeoutTimer.cancelAndSet((()=>{this._timeoutTimer=null,this.beginCompute()}),this._debounceInformation.get(e)))}))),this.beginCompute())}beginCompute(){this._computePromise=Xv((e=>H0(this,void 0,void 0,(function*(){const t=this._editor.getModel();if(!t)return Promise.resolve([]);const i=new ps(!1),n=yield function(e,t,i){const n=[],o=e.ordered(t).reverse().map((e=>Promise.resolve(e.provideDocumentColors(t,i)).then((t=>{if(Array.isArray(t))for(let i of t)n.push({colorInfo:i,provider:e})}))));return Promise.all(o).then((()=>n))}(this._languageFeaturesService.colorProvider,t,e);return this._debounceInformation.update(t,i.elapsed()),n})))),this._computePromise.then((e=>{this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}),Jo)}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:GP.EMPTY})));this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach(((t,i)=>this._colorDatas.set(t,e[i])))}updateColorDecorators(e){this._colorDecorationClassRefs.clear();let t=[];for(let i=0;ithis._colorDatas.has(e.id)));return 0===i.length?null:this._colorDatas.get(i[0].id)}isColorDecorationId(e){return this._colorDecoratorIds.has(e)}};U0.ID="editor.contrib.colorDetector",U0.RECOMPUTE_TIME=1e3,U0=W0([z0(1,Cv),z0(2,Lb),z0(3,oW)],U0),Ix(U0.ID,U0);class $0{constructor(e,t,i){this.presentationIndex=i,this._onColorFlushed=new $o,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new $o,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new $o,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}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)}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){for(let i=0;i{this.backgroundColor=e.getColor(zk)||hS.white}))),this._register(nC(this.pickedColorNode,zC.CLICK,(()=>this.model.selectNextColorPresentation()))),this._register(nC(o,zC.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=hS.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)}onDidChangeColor(e){this.pickedColorNode.style.backgroundColor=hS.Format.CSS.format(e)||"",this.pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this.pickedColorNode.textContent=this.model.presentation?this.model.presentation.label:"",this.pickedColorNode.prepend(K0(".codicon.codicon-color-mode"))}}class G0 extends Uo{constructor(e,t,i){super(),this.model=t,this.pixelRatio=i,this.domNode=K0(".colorpicker-body"),$C(e,this.domNode),this.saturationBox=new Z0(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 X0(this.domNode,this.model),this._register(this.opacityStrip),this._register(this.opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this.opacityStrip.onColorFlushed(this.flushColor,this)),this.hueStrip=new Q0(this.domNode,this.model),this._register(this.hueStrip),this._register(this.hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this.hueStrip.onColorFlushed(this.flushColor,this))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){const i=this.model.color.hsva;this.model.color=new hS(new cS(i.h,e,t,i.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new hS(new cS(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,i=360*(1-e);this.model.color=new hS(new cS(360===i?0:i,t.s,t.v,t.a))}layout(){this.saturationBox.layout(),this.opacityStrip.layout(),this.hueStrip.layout()}}class Z0 extends Uo{constructor(e,t,i){super(),this.model=t,this.pixelRatio=i,this._onDidChange=new $o,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new $o,this.onColorFlushed=this._onColorFlushed.event,this.domNode=K0(".saturation-wrap"),$C(e,this.domNode),this.canvas=document.createElement("canvas"),this.canvas.className="saturation-box",$C(this.domNode,this.canvas),this.selection=K0(".saturation-selection"),$C(this.domNode,this.selection),this.layout(),this._register(rC(this.domNode,(e=>this.onMouseDown(e)))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}onMouseDown(e){this.monitor=this._register(new rS);const t=yC(this.domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.buttons,sS,(e=>this.onDidChangePosition(e.posx-t.left,e.posy-t.top)),(()=>null));const i=aC(document,(()=>{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 hS(new cS(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=hS.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(){this.monitor&&this.monitor.isMonitoring()||this.paint()}}class Y0 extends Uo{constructor(e,t){super(),this.model=t,this._onDidChange=new $o,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new $o,this.onColorFlushed=this._onColorFlushed.event,this.domNode=$C(e,K0(".strip")),this.overlay=$C(this.domNode,K0(".overlay")),this.slider=$C(this.domNode,K0(".slider")),this.slider.style.top="0px",this._register(rC(this.domNode,(e=>this.onMouseDown(e)))),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onMouseDown(e){const t=this._register(new rS),i=yC(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.buttons,sS,(e=>this.onDidChangeTop(e.posy-i.top)),(()=>null));const n=aC(document,(()=>{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 X0 extends Y0{constructor(e,t){super(e,t),this.domNode.classList.add("opacity-strip"),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){const{r:t,g:i,b:n}=e.rgba,o=new hS(new lS(t,i,n,1)),s=new hS(new lS(t,i,n,0));this.overlay.style.background=`linear-gradient(to bottom, ${o} 0%, ${s} 100%)`}getValue(e){return e.hsva.a}}class Q0 extends Y0{constructor(e,t){super(e,t),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class J0 extends QI{constructor(e,t,i,n){super(),this.model=t,this.pixelRatio=i,this._register(t_.onDidChange((()=>this.layout())));const o=K0(".colorpicker-widget");e.appendChild(o);const s=new q0(o,this.model,n);this.body=new G0(o,this.model,this.pixelRatio),this._register(s),this._register(this.body)}layout(){this.body.layout()}}var e1=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},t1=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}},i1=globalThis&&globalThis.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,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){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class n1{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 o1=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=1}computeSync(e,t){return[]}computeAsync(e,t,i){return pb.fromPromise(this._computeAsync(e,t,i))}_computeAsync(e,t,i){return i1(this,void 0,void 0,(function*(){if(!this._editor.hasModel())return[];const e=U0.get(this._editor);if(!e)return[];for(const i of t){if(!e.isColorDecorationId(i.id))continue;const t=e.getColorData(i.range.getStartPosition());if(t){return[yield this._createColorHover(this._editor.getModel(),t.colorInfo,t.provider)]}}return[]}))}_createColorHover(e,t,i){return i1(this,void 0,void 0,(function*(){const n=e.getValueInRange(t.range),{red:o,green:s,blue:r,alpha:a}=t.color,l=new lS(Math.round(255*o),Math.round(255*s),Math.round(255*r),a),d=new hS(l),c=yield V0(e,t,i,Ia.None),h=new $0(d,[],0);return h.colorPresentations=c||[],h.guessColorPresentation(d,n),new n1(this,qo.lift(t.range),h,i)}))}renderHoverParts(e,t){if(0===t.length||!this._editor.hasModel())return Uo.None;const i=new ws,n=t[0],o=this._editor.getModel(),s=n.model,r=i.add(new J0(e.fragment,s,this._editor.getOption(129),this._themeService));e.setColorPicker(r);let a=new qo(n.range.startLineNumber,n.range.startColumn,n.range.endLineNumber,n.range.endColumn);const l=()=>{let t,i;if(s.presentation.textEdit){t=[s.presentation.textEdit],i=new qo(s.presentation.textEdit.range.startLineNumber,s.presentation.textEdit.range.startColumn,s.presentation.textEdit.range.endLineNumber,s.presentation.textEdit.range.endColumn);const e=this._editor.getModel()._setTrackedRange(null,i,3);this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",t),i=this._editor.getModel()._getTrackedRange(e)||i}else t=[{range:a,text:s.presentation.label,forceMoveMarkers:!1}],i=a.setEndPosition(a.endLineNumber,a.startColumn+s.presentation.label.length),this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",t);s.presentation.additionalTextEdits&&(t=[...s.presentation.additionalTextEdits],this._editor.executeEdits("colorpicker",t),e.hide()),this._editor.pushUndoStop(),a=i},d=e=>V0(o,{range:a,color:{red:e.rgba.r/255,green:e.rgba.g/255,blue:e.rgba.b/255,alpha:e.rgba.a}},n.provider,Ia.None).then((e=>{s.colorPresentations=e||[]}));return i.add(s.onColorFlushed((e=>{d(e).then(l)}))),i.add(s.onDidChangeColor(d)),i}};o1=e1([t1(1,Qy)],o1);function s1(e,t){return!!e[t]}class r1{constructor(e,t){this.target=e.target,this.hasTriggerModifier=s1(e.event,t.triggerModifier),this.hasSideBySideModifier=s1(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class a1{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=s1(e,t.triggerModifier)}}class l1{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 d1(e){return"altKey"===e?zo?new l1(57,"metaKey",6,"altKey"):new l1(5,"ctrlKey",6,"altKey"):zo?new l1(6,"altKey",57,"metaKey"):new l1(6,"altKey",5,"ctrlKey")}class c1 extends Uo{constructor(e){super(),this._onMouseMoveOrRelevantKeyDown=this._register(new $o),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new $o),this.onExecute=this._onExecute.event,this._onCancel=this._register(new $o),this.onCancel=this._onCancel.event,this._editor=e,this._opts=d1(this._editor.getOption(70)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration((e=>{if(e.hasChanged(70)){const e=d1(this._editor.getOption(70));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 r1(e,this._opts))))),this._register(this._editor.onMouseDown((e=>this._onEditorMouseDown(new r1(e,this._opts))))),this._register(this._editor.onMouseUp((e=>this._onEditorMouseUp(new r1(e,this._opts))))),this._register(this._editor.onKeyDown((e=>this._onEditorKeyDown(new a1(e,this._opts))))),this._register(this._editor.onKeyUp((e=>this._onEditorKeyUp(new a1(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=e.target.position?e.target.position.lineNumber:0}_onEditorMouseUp(e){const t=e.target.position?e.target.position.lineNumber:0;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()}}var h1=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},u1=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}};let g1=class extends UF{constructor(e,t,i,n,o,s,r,a,l,d,c,h){super(e,Object.assign(Object.assign({},i.getRawOptions()),{overflowWidgetsDomNode:i.getOverflowWidgetsDomNode()}),{},n,o,s,r,a,l,d,c,h),this._parentEditor=i,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(i.onDidChangeConfiguration((e=>this._onParentConfigurationChanged(e))))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){Ko(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};g1=h1([u1(3,k_),u1(4,N_),u1(5,wy),u1(6,$y),u1(7,Qy),u1(8,vF),u1(9,$x),u1(10,Rv),u1(11,Lb)],g1);const p1=new hS(new lS(0,122,204)),m1={showArrow:!0,showFrame:!0,className:"",frameColor:p1,arrowColor:p1,keepEditorSelection:!1};class f1{constructor(e,t,i,n,o,s){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=i,this.heightInLines=n,this._onDomNodeTop=o,this._onComputedHeight=s}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class _1{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class v1{constructor(e){this._editor=e,this._ruleName=v1._IdGenerator.nextId(),this._decorations=[],this._color=null,this._height=-1}dispose(){this.hide(),VC(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(){VC(this._ruleName),BC(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; `)}show(e){1===e.column&&(e={lineNumber:e.lineNumber,column:2}),this._decorations=this._editor.deltaDecorations(this._decorations,[{range:qo.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._editor.deltaDecorations(this._decorations,[])}}v1._IdGenerator=new uU(".arrow-decoration-");class b1 extends fy{constructor(e,t){super(),this._onDidChangeVisibility=this._register(new $o),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=$C(e,YC(".monaco-dropdown")),this._label=$C(this._element,YC(".dropdown-label"));let i=t.labelRenderer;i||(i=e=>(e.textContent=t.label||"",null));for(const o of[zC.CLICK,zC.MOUSE_DOWN,iS.Tap])this._register(nC(this.element,o,(e=>HC(e,!0))));for(const o of[zC.MOUSE_DOWN,iS.Tap])this._register(nC(this._label,o,(e=>{e instanceof MouseEvent&&e.detail>1||(this.visible?this.hide():this.show())})));this._register(nC(this._label,zC.KEY_UP,(e=>{const t=new jw(e);(t.equals(3)||t.equals(10))&&(HC(e,!0),this.visible?this.hide():this.show())})));const n=i(this._label);n&&this._register(n),this._register(oS.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 w1 extends b1{constructor(e,t){super(e,t),this._actions=[],this._contextMenuProvider=t.contextMenuProvider,this.actions=t.actions||[],this.actionProvider=t.actionProvider,this.menuClassName=t.menuClassName||"",this.menuAsChild=!!t.menuAsChild}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this.actionProvider?this.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),this.element.classList.add("active"),this._contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:e=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this.menuClassName,onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this.menuAsChild?this.element:void 0})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}class C1 extends mB{constructor(e,t,i,n=Object.create(null)){super(null,e,n),this.actionItem=null,this._onDidChangeVisibility=this._register(new $o),this.menuActionsOrProvider=t,this.contextMenuProvider=i,this.options=n,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){this.actionItem=e;const t=Array.isArray(this.menuActionsOrProvider),i={contextMenuProvider:this.contextMenuProvider,labelRenderer:e=>{this.element=$C(e,YC("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.element.title=this._action.label||"",null},menuAsChild:this.options.menuAsChild,actions:t?this.menuActionsOrProvider:void 0,actionProvider:t?void 0:this.menuActionsOrProvider};if(this.dropdownMenu=this._register(new w1(e,i)),this._register(this.dropdownMenu.onDidChangeVisibility((e=>{var t;null===(t=this.element)||void 0===t||t.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=Object.assign(Object.assign({},this.dropdownMenu.menuOptions),{get anchorAlignment(){return e.options.anchorAlignmentProvider()}})}this.updateEnabled()}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}updateEnabled(){var e,t;const i=!this.getAction().enabled;null===(e=this.actionItem)||void 0===e||e.classList.toggle("disabled",i),null===(t=this.element)||void 0===t||t.classList.toggle("disabled",i)}}var y1=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},x1=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}},S1=globalThis&&globalThis.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,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){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function k1(e,t,i,n,o,s,r){const a=e.getActions(t);return function(e,t,i,n=(e=>"navigation"===e),o=Number.MAX_SAFE_INTEGER,s=(()=>!1),r=!1){let a,l;Array.isArray(t)?(a=t,l=t):(a=t.primary,l=t.secondary);const d=new Set;for(const[c,h]of e){let e;n(c)?(e=a,e.length>0&&r&&e.push(new _y)):(e=l,e.length>0&&e.push(new _y));for(let t of h){i&&(t=t instanceof px&&t.alt?t.alt:t);const n=e.push(t);t instanceof vy&&d.add({group:c,action:t,index:n-1})}}for(const{group:c,action:h,index:u}of d){const e=n(c)?a:l,t=h.actions;(t.length<=1||e.length+t.length-2<=o)&&s(h,c,e.length)&&e.splice(u,1,...t)}if(a!==l&&a.length>o){const e=a.splice(o,a.length-o);l.unshift(...e,new _y)}}(a,i,!1,"string"==typeof n?e=>e===n:n,o,s,r),function(e){const t=new ws;for(const[,i]of e)for(const e of i)t.add(e);return t}(a)}let D1=class extends fB{constructor(e,t,i,n,o){super(void 0,e,{icon:!(!e.class&&!e.item.icon),label:!e.class&&!e.item.icon,draggable:null==t?void 0:t.draggable}),this._keybindingService=i,this._notificationService=n,this._contextKeyService=o,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new Rr),this._altKey=ny.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}onClick(e){return S1(this,void 0,void 0,(function*(){e.preventDefault(),e.stopPropagation();try{yield this.actionRunner.run(this._commandAction,this._context)}catch(t){this._notificationService.error(t)}}))}render(e){super.render(e),e.classList.add("menu-entry"),this._updateItemClass(this._menuItemAction.item);let t=!1,i=this._altKey.keyStatus.altKey||(Rs||Vo)&&this._altKey.keyStatus.shiftKey;const n=()=>{const e=t&&i;e!==this._wantsAltCommand&&(this._wantsAltCommand=e,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._menuItemAction.alt&&this._register(this._altKey.event((e=>{i=e.altKey||(Rs||Vo)&&e.shiftKey,n()}))),this._register(nC(e,"mouseleave",(e=>{t=!1,n()}))),this._register(nC(e,"mouseenter",(e=>{t=!0,n()})))}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}updateTooltip(){if(this.label){const e=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),t=e&&e.getLabel(),i=this._commandAction.tooltip||this._commandAction.label;let n=t?mf(0,"{0} ({1})",i,t):i;if(!this._wantsAltCommand&&this._menuItemAction.alt){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?mf(0,"{0} ({1})",e,i):e;n+=`\n[${MW.modifierLabels[Xs].altKey}] ${o}`}this.label.title=n}}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){var t;this._itemClassDispose.value=void 0;const{element:i,label:n}=this;if(!i||!n)return;const o=this._commandAction.checked&&(null===(t=e.toggled)||void 0===t?void 0:t.icon)?e.toggled.icon:e.icon;if(o)if(ex.isThemeIcon(o)){const e=ex.asClassNameArray(o);n.classList.add(...e),this._itemClassDispose.value=es((()=>{n.classList.remove(...e)}))}else o.light&&n.style.setProperty("--menu-entry-icon-light",ty(o.light)),o.dark&&n.style.setProperty("--menu-entry-icon-dark",ty(o.dark)),n.classList.add("icon"),this._itemClassDispose.value=es((()=>{n.classList.remove("icon"),n.style.removeProperty("--menu-entry-icon-light"),n.style.removeProperty("--menu-entry-icon-dark")}))}};D1=y1([x1(2,kW),x1(3,vF),x1(4,$y)],D1);let L1=class extends C1{constructor(e,t,i){var n,o;const s=Object.assign({},null!=t?t:Object.create(null),{menuAsChild:null!==(n=null==t?void 0:t.menuAsChild)&&void 0!==n&&n,classNames:null!==(o=null==t?void 0:t.classNames)&&void 0!==o?o:ex.isThemeIcon(e.item.icon)?ex.asClassName(e.item.icon):void 0});super(e,{getActions:()=>e.actions},i,s)}render(e){if(super.render(e),this.element){e.classList.add("menu-entry");const{icon:t}=this._action.item;t&&!ex.isThemeIcon(t)&&(this.element.classList.add("icon"),t.light&&this.element.style.setProperty("--menu-entry-icon-light",ty(t.light)),t.dark&&this.element.style.setProperty("--menu-entry-icon-dark",ty(t.dark)))}}};L1=y1([x1(2,WB)],L1);let N1=class extends mB{constructor(e,t,i,n,o,s,r,a){var l,d,c;let h;super(null,e),this._keybindingService=i,this._notificationService=n,this._contextMenuService=o,this._menuService=s,this._instaService=r,this._storageService=a,this._container=null,this._storageKey=`${e.item.submenu._debugName}_lastActionId`;let u=a.get(this._storageKey,1);u&&(h=e.actions.find((e=>u===e.id))),h||(h=e.actions[0]),this._defaultAction=this._instaService.createInstance(D1,h,void 0);const g=Object.assign({},null!=t?t:Object.create(null),{menuAsChild:null===(l=null==t?void 0:t.menuAsChild)||void 0===l||l,classNames:null!==(d=null==t?void 0:t.classNames)&&void 0!==d?d:["codicon","codicon-chevron-down"],actionRunner:null!==(c=null==t?void 0:t.actionRunner)&&void 0!==c?c:new fy});this._dropdown=new C1(e,e.actions,this._contextMenuService,g),this._dropdown.actionRunner.onDidRun((e=>{e.action instanceof px&&this.update(e.action)}))}update(e){var t,i;this._storageService.store(this._storageKey,e.id,1,0),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(D1,e,void 0),this._defaultAction.actionRunner=new class extends fy{runAction(e,t){return S1(this,void 0,void 0,(function*(){yield e.run(void 0)}))}},this._container&&this._defaultAction.render((t=this._container,i=YC(".action-container"),t.insertBefore(i,t.firstChild),i))}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=YC(".action-container");this._defaultAction.render($C(this._container,t)),this._register(nC(t,zC.KEY_DOWN,(e=>{const t=new jw(e);t.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),t.stopPropagation())})));const i=YC(".dropdown-action-container");this._dropdown.render($C(this._container,i)),this._register(nC(i,zC.KEY_DOWN,(e=>{var t;const i=new jw(e);i.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),null===(t=this._defaultAction.element)||void 0===t||t.focus(),i.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()}};function E1(e,t,i){return t instanceof px?e.createInstance(D1,t,void 0):t instanceof gx?t.item.rememberDefaultAction?e.createInstance(N1,t,i):e.createInstance(L1,t,i):void 0}N1=y1([x1(2,kW),x1(3,vF),x1(4,WB),x1(5,hx),x1(6,k_),x1(7,bZ)],N1);var I1=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},T1=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}};const M1=L_("IPeekViewService");var A1;Iv(M1,class{constructor(){this._widgets=new Map}addExclusiveWidget(e,t){const i=this._widgets.get(e);i&&(i.listener.dispose(),i.widget.dispose());this._widgets.set(e,{widget:t,listener:t.onDidClose((()=>{const i=this._widgets.get(e);i&&i.widget===t&&(i.listener.dispose(),this._widgets.delete(e))}))})}}),function(e){e.inPeekEditor=new Uy("inReferenceSearchEditor",!0,mf(0,"Whether the current code editor is embedded inside peek")),e.notInPeekEditor=e.inPeekEditor.toNegated()}(A1||(A1={}));let O1=class{constructor(e,t){e instanceof g1&&A1.inPeekEditor.bindTo(t)}dispose(){}};O1.ID="editor.contrib.referenceController",O1=I1([T1(1,$y)],O1),Ix(O1.ID,O1);const R1={headerBackgroundColor:hS.white,primaryHeadingColor:hS.fromHex("#333333"),secondaryHeadingColor:hS.fromHex("#6c6c6cb3")};let P1=class extends class{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._positionMarkerId=[],this._viewZone=null,this._disposables=new ws,this.container=null,this._isShowing=!1,this.editor=e,this.options=tr(t),Ko(this.options,m1,!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.editor.deltaDecorations(this._positionMarkerId,[]),this._positionMarkerId=[],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 v1(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){let e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){let 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){let t=e-this._decoratingElementsHeight();this.container.style.height=`${t}px`;const i=this.editor.getLayoutInfo();this._doLayout(t,this._getWidth(i))}this._resizeSash&&this._resizeSash.layout()}get position(){const[e]=this._positionMarkerId;if(!e)return;const t=this.editor.getModel();if(!t)return;const i=t.getDecorationRange(e);return i?i.getStartPosition():void 0}show(e,t){const i=qo.isIRange(e)?qo.lift(e):qo.fromPositions(e);this._isShowing=!0,this._showImpl(i,t),this._isShowing=!1,this._positionMarkerId=this.editor.deltaDecorations(this._positionMarkerId,[{range:i,options:GP.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&&this._arrow.hide()}_decoratingElementsHeight(){let e=this.editor.getOption(59),t=0;if(this.options.showArrow){t+=2*Math.round(e/3)}if(this.options.showFrame){t+=2*Math.round(e/9)}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(59),a=Math.max(12,this.editor.getLayoutInfo().height/r*.8);t=Math.min(t,a);let l=0,d=0;if(this._arrow&&this.options.showArrow&&(l=Math.round(r/3),this._arrow.height=l,this._arrow.show(i)),this.options.showFrame&&(d=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 f1(s,i.lineNumber,i.column,t,(e=>this._onViewZoneTop(e)),(e=>this._onViewZoneHeight(e))),this._viewZone.id=e.addZone(this._viewZone),this._overlayWidget=new _1("vs.editor.contrib.zoneWidget"+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)})),this.container&&this.options.showFrame){const e=this.options.frameWidth?this.options.frameWidth:d;this.container.style.borderTopWidth=e+"px",this.container.style.borderBottomWidth=e+"px"}let c=t*r-this._decoratingElementsHeight();this.container&&(this.container.style.top=l+"px",this.container.style.height=c+"px",this.container.style.overflow="hidden"),this._doLayout(c,o),this.options.keepEditorSelection||this.editor.setSelection(e);const h=this.editor.getModel();if(h){const t=e.endLineNumber+1;t<=h.getLineCount()?this.revealLine(t,!1):this.revealLine(h.getLineCount(),!0)}}revealLine(e,t){t?this.editor.revealLineInCenter(e,0):this.editor.revealLine(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 cB(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){let i=(t.currentY-e.startY)/this.editor.getOption(59),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}}{constructor(e,t,i){super(e,t),this.instantiationService=i,this._onDidClose=new $o,this.onDidClose=this._onDidClose.event,Ko(this.options,R1,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){let 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();let 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=YC(".head"),this._bodyElement=YC(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){const i=YC(".peekview-title");this.options.supportOnTitleClick&&(i.classList.add("clickable"),sC(i,"click",(e=>this._onTitleClick(e)))),$C(this._headElement,i),this._fillTitleIcon(i),this._primaryHeading=YC("span.filename"),this._secondaryHeading=YC("span.dirname"),this._metaHeading=YC("span.meta"),$C(i,this._primaryHeading,this._secondaryHeading,this._metaHeading);const n=YC(".peekview-actions");$C(this._headElement,n);const o=this._getActionBarOptions();this._actionbarWidget=new vB(n,o),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new my("peekview.close",mf(0,"Close"),br.close.classNames,!0,(()=>(this.dispose(),Promise.resolve()))),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:E1.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:eC(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,XC(this._metaHeading)):QC(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0)return void this.dispose();const i=Math.ceil(1.2*this.editor.getOption(59)),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`)}};P1=I1([T1(2,k_)],P1);const F1=_S("peekViewTitle.background",{dark:yL(ck,.1),light:yL(ck,.1),hc:null},mf(0,"Background color of the peek view title area.")),B1=_S("peekViewTitleLabel.foreground",{dark:hS.white,light:hS.black,hc:hS.white},mf(0,"Color of the peek view title.")),V1=_S("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hc:"#FFFFFF99"},mf(0,"Color of the peek view title info.")),W1=_S("peekView.border",{dark:ck,light:ck,hc:yS},mf(0,"Color of the peek view borders and arrow.")),z1=_S("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hc:hS.black},mf(0,"Background color of the peek view result list."));_S("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hc:hS.white},mf(0,"Foreground color for line nodes in the peek view result list.")),_S("peekViewResult.fileForeground",{dark:hS.white,light:"#1E1E1E",hc:hS.white},mf(0,"Foreground color for file nodes in the peek view result list.")),_S("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hc:null},mf(0,"Background color of the selected entry in the peek view result list.")),_S("peekViewResult.selectionForeground",{dark:hS.white,light:"#6C6C6C",hc:hS.white},mf(0,"Foreground color of the selected entry in the peek view result list."));const H1=_S("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hc:hS.black},mf(0,"Background color of the peek view editor."));_S("peekViewEditorGutter.background",{dark:H1,light:H1,hc:H1},mf(0,"Background color of the gutter in the peek view editor.")),_S("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hc:null},mf(0,"Match highlight color in the peek view result list.")),_S("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hc:null},mf(0,"Match highlight color in the peek view editor.")),_S("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hc:xS},mf(0,"Match highlight border in the peek view editor."));var j1=globalThis&&globalThis.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,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){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class U1{constructor(e,t,i,n){this.isProviderFirst=e,this.parent=t,this.link=i,this._rangeCallback=n,this.id=gU.nextId()}get uri(){return this.link.uri}get range(){var e,t;return null!==(t=null!==(e=this._range)&&void 0!==e?e:this.link.targetSelectionRange)&&void 0!==t?t:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var e;const t=null===(e=this.parent.getPreview(this))||void 0===e?void 0:e.preview(this.range);return t?mf(0,"symbol in {0} on line {1} at column {2}, {3}",oR(this.uri),this.range.startLineNumber,this.range.startColumn,t.value):mf(0,"symbol in {0} on line {1} at column {2}",oR(this.uri),this.range.startLineNumber,this.range.startColumn)}}class $1{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 qo(n,a.startColumn,n,o),d=new qo(s,r,s,1073741824),c=i.getValueInRange(l).replace(/^\s+/,""),h=i.getValueInRange(e);return{value:c+h+i.getValueInRange(d).replace(/\s+$/,""),highlight:{start:c.length,end:c.length+h.length}}}}class K1{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new YV}dispose(){bs(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return 1===e?mf(0,"1 symbol in {0}, full path {1}",oR(this.uri),this.uri.fsPath):mf(0,"{0} symbols in {1}, full path {2}",e,oR(this.uri),this.uri.fsPath)}resolve(e){return j1(this,void 0,void 0,(function*(){if(0!==this._previews.size)return this;for(let i of this.children)if(!this._previews.has(i.uri))try{const t=yield e.createModelReference(i.uri);this._previews.set(i.uri,new $1(t))}catch(t){Jo(t)}return this}))}}class q1{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new $o,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[i]=e;let n;e.sort(q1._compareReferences);for(let o of e)if(n&&tR.isEqual(n.uri,o.uri,!0)||(n=new K1(this,o.uri),this.groups.push(n)),0===n.children.length||0!==q1._compareReferences(o,n.children[n.children.length-1])){const e=new U1(i===o,n,o,(e=>this._onDidChangeReferenceRange.fire(e)));this.references.push(e),n.children.push(e)}}dispose(){bs(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new q1(this._links,this._title)}get title(){return this._title}get isEmpty(){return 0===this.groups.length}get ariaMessage(){return this.isEmpty?mf(0,"No results found"):1===this.references.length?mf(0,"Found 1 symbol in {0}",this.references[0].uri.fsPath):1===this.groups.length?mf(0,"Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):mf(0,"Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){let{parent:i}=e,n=i.children.indexOf(e),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:lr(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()&&qo.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 tR.compare(e.uri,t.uri)||qo.compareRangesUsingStarts(e.range,t.range)}}function G1(e){if(!e)return;"string"==typeof e&&(e=Ps.file(e));const t=oR(e)||(e.scheme===Yw.file?e.fsPath:e.path);return Rs&&function(e){const t=Vr(e);return Rs?!(e.length>3)&&QO(t)&&(2===e.length||92===t.charCodeAt(2)):t===Pr.sep}(t)?Z1(t):t}function Z1(e,t){return QO(e,t)?e.charAt(0).toUpperCase()+e.slice(1):e}var Y1=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},X1=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}};let Q1=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof q1||e instanceof K1}getChildren(e){if(e instanceof q1)return e.groups;if(e instanceof K1)return e.resolve(this._resolverService).then((e=>e.children));throw new Error("bad tree")}};Q1=Y1([X1(0,gy)],Q1);class J1{getHeight(){return 23}getTemplateId(e){return e instanceof K1?n3.id:s3.id}}let e3=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof U1){const i=null===(t=e.parent.getPreview(e))||void 0===t?void 0:t.preview(e.range);if(i)return i.value}return oR(e.uri)}};e3=Y1([X1(0,kW)],e3);class t3{getId(e){return e instanceof U1?e.id:e.uri}}let i3=class extends Uo{constructor(e,t,i){super(),this._uriLabel=t;const n=document.createElement("div");n.classList.add("reference-file"),this.file=this._register(new HU(n,{supportHighlights:!0})),this.badge=new oU($C(n,YC(".count"))),this._register(function(e,t,i){return UH(t,{badgeBackground:(null==i?void 0:i.badgeBackground)||YS,badgeForeground:(null==i?void 0:i.badgeForeground)||XS,badgeBorder:yS},e)}(this.badge,i)),e.appendChild(n)}set(e,t){let i=rR(e.uri);this.file.setLabel(G1(e.uri),this._uriLabel.getUriLabel(i,{relative:!0}),{title:this._uriLabel.getUriLabel(e.uri),matches:t});const n=e.children.length;this.badge.setCount(n),n>1?this.badge.setTitleFormat(mf(0,"{0} references",n)):this.badge.setTitleFormat(mf(0,"{0} reference",n))}};i3=Y1([X1(1,FW),X1(2,Qy)],i3);let n3=class e{constructor(t){this._instantiationService=t,this.templateId=e.id}renderTemplate(e){return this._instantiationService.createInstance(i3,e)}renderElement(e,t,i){i.set(e.element,cH(e.filterData))}disposeTemplate(e){e.dispose()}};n3.id="FileReferencesRenderer",n3=Y1([X1(0,k_)],n3);class o3{constructor(e){this.label=new OU(e)}set(e,t){var i;const n=null===(i=e.parent.getPreview(e))||void 0===i?void 0:i.preview(e.range);if(n&&n.value){const{value:e,highlight:i}=n;t&&!yH.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(e,cH(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(e,[i]))}else this.label.set(`${oR(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`)}}class s3{constructor(){this.templateId=s3.id}renderTemplate(e){return new o3(e)}renderElement(e,t,i){i.set(e.element,e.filterData)}disposeTemplate(){}}s3.id="OneReferenceRenderer";class r3{getWidgetAriaLabel(){return mf(0,"References")}getAriaLabel(e){return e.ariaMessage}}var a3=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},l3=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}},d3=globalThis&&globalThis.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,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){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class c3{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new ws,this._callOnModelChange=new ws,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(let 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 o=0,s=e.children.length;o{e.equals(9)&&(this._keybindingService.dispatchEvent(e,e.target),e.stopPropagation())}),!0)),this._tree=this._instantiationService.createInstance(h3,"ReferencesWidget",this._treeContainer,new J1,[this._instantiationService.createInstance(n3),this._instantiationService.createInstance(s3)],this._instantiationService.createInstance(Q1),t),this._splitView.addView({onDidChange:ds.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:e=>{this._preview.layout({height:this._dim.height,width:e})}},iK.Distribute),this._splitView.addView({onDidChange:ds.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)}},iK.Distribute),this._disposables.add(this._splitView.onDidSashChange((()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)}),void 0));let i=(e,t)=>{e instanceof U1&&("show"===t&&this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:t,source:"tree"}))};this._tree.onDidOpen((e=>{e.sideBySide?i(e.element,"side"):e.editorOptions.pinned?i(e.element,"goto"):i(e.element,"show")})),QC(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new wC(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=mf(0,"No results"),XC(this._messageContainer),Promise.resolve(void 0)):(QC(this._messageContainer),this._decorationsManager=new c3(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"),XC(this._treeContainer),XC(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 U1?e:e instanceof K1&&e.children.length>0?e.children[0]:void 0}revealReference(e){return d3(this,void 0,void 0,(function*(){yield this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})}))}_revealReference(e,t){return d3(this,void 0,void 0,(function*(){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==Yw.inMemory?this.setTitle(nR(e.uri),this._uriLabel.getUriLabel(rR(e.uri))):this.setTitle(mf(0,"References"));const i=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent||(t&&this._tree.reveal(e.parent),yield this._tree.expand(e.parent)),this._tree.reveal(e);const n=yield i;if(!this._model)return void n.dispose();bs(this._previewModelReference);const o=n.object;if(o){const t=this._preview.getModel()===o.textEditorModel?0:1,i=qo.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()}))}};u3=a3([l3(3,Qy),l3(4,gy),l3(5,k_),l3(6,M1),l3(7,FW),l3(8,NP),l3(9,kW),l3(10,Lv),l3(11,Rv)],u3);var g3=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},p3=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}},m3=globalThis&&globalThis.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,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){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const f3=new Uy("referenceSearchVisible",!1,mf(0,"Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let _3=class e{constructor(e,t,i,n,o,s,r,a){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=n,this._notificationService=o,this._instantiationService=s,this._storageService=r,this._configurationService=a,this._disposables=new ws,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=f3.bindTo(i)}static get(t){return t.getContribution(e.ID)}dispose(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),null===(e=this._widget)||void 0===e||e.dispose(),null===(t=this._model)||void 0===t||t.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=class{constructor(){this.ratio=.7,this.heightInLines=18}static fromJSON(e){let t,i;try{const n=JSON.parse(e);t=n.ratio,i=n.heightInLines}catch(Bte){}return{ratio:t||.7,heightInLines:i||18}}}.fromJSON(this._storageService.get(o,0,"{}"));this._widget=this._instantiationService.createInstance(u3,this._editor,this._defaultTreeKeyboardSupport,s),this._widget.setTitle(mf(0,"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=void 0),this.closeWidget()}))),this._disposables.add(this._widget.onDidSelectReference((e=>{let{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):this.openReference(t,!1,!0)}})));const r=++this._requestIdPool;t.then((t=>{var i;if(r===this._requestIdPool&&this._widget)return null===(i=this._model)||void 0===i||i.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(mf(0,"{0} ({1})",this._model.title,this._model.references.length));let t=this._editor.getModel().uri,i=new er(e.startLineNumber,e.startColumn),n=this._model.nearestReference(t,i);if(n)return this._widget.setSelection(n).then((()=>{this._widget&&"editor"===this._editor.getOption(77)&&this._widget.focusOnPreviewEditor()}))}}));t.dispose()}),(e=>{this._notificationService.error(e)}))}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(e){return m3(this,void 0,void 0,(function*(){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();yield this._widget.setSelection(n),yield this._gotoReference(n),o?this._editor.focus():this._widget&&s&&this._widget.focusOnPreviewEditor()}))}revealReference(e){return m3(this,void 0,void 0,(function*(){this._editor.hasModel()&&this._model&&this._widget&&(yield this._widget.revealReference(e))}))}closeWidget(e=!0){var t,i;null===(t=this._widget)||void 0===t||t.dispose(),null===(i=this._model)||void 0===i||i.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(t){this._widget&&this._widget.hide(),this._ignoreModelChangeEvent=!0;const i=qo.lift(t.range).collapseToStart();return this._editorService.openCodeEditor({resource:t.uri,options:{selection:i,selectionSource:"code.jump"}},this._editor).then((t=>{var n;if(this._ignoreModelChangeEvent=!1,t&&this._widget)if(this._editor===t)this._widget.show(i),this._widget.focusOnReferenceTree();else{const o=e.get(t),s=this._model.clone();this.closeWidget(),t.focus(),null==o||o.toggleWidget(i,Xv((e=>Promise.resolve(s))),null!==(n=this._peekMode)&&void 0!==n&&n)}else this.closeWidget()}),(e=>{this._ignoreModelChangeEvent=!1,Jo(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 v3(e,t){const i=function(e){let t=e.get(N_).getFocusedCodeEditor();return t instanceof g1?t.getParentEditor():t}(e);if(!i)return;const n=_3.get(i);n&&t(n)}_3.ID="editor.contrib.referencesController",_3=g3([p3(2,$y),p3(3,N_),p3(4,vF),p3(5,k_),p3(6,bZ),p3(7,Cv)],_3),fx.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:Ol(2089,60),when:Sy.or(f3,A1.inPeekEditor),handler(e){v3(e,(e=>{e.changeFocusBetweenPreviewAndReferences()}))}}),fx.registerCommandAndKeybindingRule({id:"goToNextReference",weight:90,primary:62,secondary:[70],when:Sy.or(f3,A1.inPeekEditor),handler(e){v3(e,(e=>{e.goToNextOrPreviousReference(!0)}))}}),fx.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:90,primary:1086,secondary:[1094],when:Sy.or(f3,A1.inPeekEditor),handler(e){v3(e,(e=>{e.goToNextOrPreviousReference(!1)}))}}),Cy.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),Cy.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),Cy.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),Cy.registerCommand("closeReferenceSearch",(e=>v3(e,(e=>e.closeWidget())))),fx.registerKeybindingRule({id:"closeReferenceSearch",weight:-1,primary:9,secondary:[1033],when:Sy.and(A1.inPeekEditor,Sy.not("config.editor.stablePeek"))}),fx.registerKeybindingRule({id:"closeReferenceSearch",weight:250,primary:9,secondary:[1033],when:Sy.and(f3,Sy.not("config.editor.stablePeek"))}),fx.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:Sy.and(f3,pq,bq.negate(),Cq.negate()),handler(e){var t;const i=null===(t=e.get(cq).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof U1&&v3(e,(e=>e.revealReference(i[0])))}}),fx.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:Sy.and(f3,pq,bq.negate(),Cq.negate()),handler(e){var t;const i=null===(t=e.get(cq).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof U1&&v3(e,(e=>e.openReference(i[0],!0,!0)))}}),Cy.registerCommand("openReference",(e=>{var t;const i=null===(t=e.get(cq).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof U1&&v3(e,(e=>e.openReference(i[0],!1,!0)))}));var b3=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},w3=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}};const C3=new Uy("hasSymbols",!1,mf(0,"Whether there are symbol locations that can be navigated via keyboard-only.")),y3=L_("ISymbolNavigationService");let x3=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=C3.bindTo(e)}reset(){var e,t;this._ctxHasSymbols.reset(),null===(e=this._currentState)||void 0===e||e.dispose(),null===(t=this._currentMessage)||void 0===t||t.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 S3(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(iR(a.uri,n.uri))s=!0,r=r||qo.containsPosition(a.range,o);else if(s)break;s&&r||this.reset()}));this._currentState=ta(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:qo.collapseToStart(t.range),selectionRevealType:3}},e).finally((()=>{this._ignoreEditorChange=!1}))}_showMessage(){var e;null===(e=this._currentMessage)||void 0===e||e.dispose();const t=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),i=t?mf(0,"Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):mf(0,"Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(i)}};x3=b3([w3(0,$y),w3(1,N_),w3(2,vF),w3(3,kW)],x3),Iv(y3,x3,!0),Dx(new class extends yx{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:C3,kbOpts:{weight:100,primary:70}})}runEditorCommand(e,t){return e.get(y3).revealNext(t)}}),fx.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:C3,primary:9,handler(e){e.get(y3).reset()}});let S3=class{constructor(e){this._listener=new Map,this._disposables=new ws,this._onDidChange=new $o,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(),bs(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,ta(e.onDidChangeCursorPosition((t=>this._onDidChange.fire({editor:e}))),e.onDidChangeModelContent((t=>this._onDidChange.fire({editor:e})))))}_onDidRemoveEditor(e){var t;null===(t=this._listener.get(e))||void 0===t||t.dispose(),this._listener.delete(e)}};S3=b3([w3(0,N_)],S3);var k3=globalThis&&globalThis.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,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){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function D3(e,t,i,n){const o=i.ordered(e).map((i=>Promise.resolve(n(i,e,t)).then(void 0,(e=>{Ta(e)}))));return Promise.all(o).then((e=>{const t=[];for(let i of e)Array.isArray(i)?t.push(...i):i&&t.push(i);return t}))}function L3(e,t,i,n){return D3(t,i,e,((e,t,i)=>e.provideDefinition(t,i,n)))}function N3(e,t,i,n){return D3(t,i,e,((e,t,i)=>e.provideDeclaration(t,i,n)))}function E3(e,t,i,n){return D3(t,i,e,((e,t,i)=>e.provideImplementation(t,i,n)))}function I3(e,t,i,n){return D3(t,i,e,((e,t,i)=>e.provideTypeDefinition(t,i,n)))}function T3(e,t,i,n,o){return D3(t,i,e,((e,t,i)=>k3(this,void 0,void 0,(function*(){const s=yield e.provideReferences(t,i,{includeDeclaration:!0},o);if(!n||!s||2!==s.length)return s;const r=yield e.provideReferences(t,i,{includeDeclaration:!1},o);return r&&1===r.length?r:s}))))}function M3(e){return k3(this,void 0,void 0,(function*(){const t=yield e(),i=new q1(t,""),n=i.references.map((e=>e.link));return i.dispose(),n}))}kx("_executeDefinitionProvider",((e,t,i)=>{const n=L3(e.get(Lb).definitionProvider,t,i,Ia.None);return M3((()=>n))})),kx("_executeTypeDefinitionProvider",((e,t,i)=>{const n=I3(e.get(Lb).typeDefinitionProvider,t,i,Ia.None);return M3((()=>n))})),kx("_executeDeclarationProvider",((e,t,i)=>{const n=N3(e.get(Lb).declarationProvider,t,i,Ia.None);return M3((()=>n))})),kx("_executeReferenceProvider",((e,t,i)=>{const n=T3(e.get(Lb).referenceProvider,t,i,!1,Ia.None);return M3((()=>n))})),kx("_executeImplementationProvider",((e,t,i)=>{const n=E3(e.get(Lb).implementationProvider,t,i,Ia.None);return M3((()=>n))}));var A3,O3,R3,P3,F3,B3,V3,W3,z3=globalThis&&globalThis.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,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){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};ux.appendMenuItem(cx.EditorContext,{submenu:cx.EditorContextPeek,title:mf(0,"Peek"),group:"navigation",order:100});const H3=new Set;function j3(e){const t=new e;return Ex(t),H3.add(t.id),t}class U3{constructor(e,t){this.model=e,this.position=t}static is(e){return!(!e||"object"!=typeof e)&&(e instanceof U3||!(!er.isIPosition(e.position)||!e.model))}}class $3 extends xx{constructor(e,t){super(t),this.configuration=e}run(e,t,i){if(!t.hasModel())return Promise.resolve(void 0);const n=e.get(vF),o=e.get(N_),s=e.get($B),r=e.get(y3),a=e.get(Lb),l=t.getModel(),d=t.getPosition(),c=U3.is(i)?i:new U3(l,d),h=new CX(t,5),u=Qv(this._getLocationModel(a,c.model,c.position,h.token),h.token).then((e=>z3(this,void 0,void 0,(function*(){var i;if(!e||h.token.isCancellationRequested)return;let n;if(dy(e.ariaMessage),e.referenceAt(l.uri,d)){const e=this._getAlternativeCommand(t);e!==this.id&&H3.has(e)&&(n=t.getAction(e))}const s=e.references.length;if(0===s){if(!this.configuration.muteMessage){const e=l.getWordAtPosition(d);null===(i=WJ.get(t))||void 0===i||i.showMessage(this._getNoResultFoundMessage(e),d)}}else{if(1!==s||!n)return this._onResult(o,r,t,e);n.run()}}))),(e=>{n.error(e)})).finally((()=>{h.dispose()}));return s.showWhile(u,250),u}_onResult(e,t,i,n){return z3(this,void 0,void 0,(function*(){const o=this._getGoToPreference(i);if(i instanceof g1||!(this.configuration.openInPeek||"peek"===o&&n.references.length>1)){const s=n.firstReference(),r=n.references.length>1&&"gotoAndPeek"===o,a=yield this._openReference(i,e,s,this.configuration.openToSide,!r);r&&a?this._openInPeek(a,n):n.dispose(),"goto"===o&&t.put(s)}else this._openInPeek(i,n)}))}_openReference(e,t,i,n,o){return z3(this,void 0,void 0,(function*(){let s;if(Bl(i)&&(s=i.targetSelectionRange),s||(s=i.range),!s)return;const r=yield t.openCodeEditor({resource:i.uri,options:{selection:qo.collapseToStart(s),selectionRevealType:3,selectionSource:"code.jump"}},e,n);if(r){if(o){const e=r.getModel(),t=r.deltaDecorations([],[{range:s,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout((()=>{r.getModel()===e&&r.deltaDecorations(t,[])}),350)}return r}}))}_openInPeek(e,t){const i=_3.get(e);i&&e.hasModel()?i.toggleWidget(e.getSelection(),Xv((e=>Promise.resolve(t))),this.configuration.openInPeek):t.dispose()}}class K3 extends $3{_getLocationModel(e,t,i,n){return z3(this,void 0,void 0,(function*(){return new q1(yield L3(e.definitionProvider,t,i,n),mf(0,"Definitions"))}))}_getNoResultFoundMessage(e){return e&&e.word?mf(0,"No definition found for '{0}'",e.word):mf(0,"No definition found")}_getAlternativeCommand(e){return e.getOption(51).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(51).multipleDefinitions}}const q3=Fs&&!h_?2118:70;j3(((A3=class e extends K3{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.id,label:mf(0,"Go to Definition"),alias:"Go to Definition",precondition:Sy.and(yI.hasDefinitionProvider,yI.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:yI.editorTextFocus,primary:q3,weight:100},contextMenuOpts:{group:"navigation",order:1.1}}),Cy.registerCommandAlias("editor.action.goToDeclaration",e.id)}}).id="editor.action.revealDefinition",A3)),j3(((O3=class e extends K3{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:e.id,label:mf(0,"Open Definition to the Side"),alias:"Open Definition to the Side",precondition:Sy.and(yI.hasDefinitionProvider,yI.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:yI.editorTextFocus,primary:Ol(2089,q3),weight:100}}),Cy.registerCommandAlias("editor.action.openDeclarationToTheSide",e.id)}}).id="editor.action.revealDefinitionAside",O3)),j3(((R3=class e extends K3{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.id,label:mf(0,"Peek Definition"),alias:"Peek Definition",precondition:Sy.and(yI.hasDefinitionProvider,A1.notInPeekEditor,yI.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:yI.editorTextFocus,primary:582,linux:{primary:3140},weight:100},contextMenuOpts:{menuId:cx.EditorContextPeek,group:"peek",order:2}}),Cy.registerCommandAlias("editor.action.previewDeclaration",e.id)}}).id="editor.action.peekDefinition",R3));class G3 extends $3{_getLocationModel(e,t,i,n){return z3(this,void 0,void 0,(function*(){return new q1(yield N3(e.declarationProvider,t,i,n),mf(0,"Declarations"))}))}_getNoResultFoundMessage(e){return e&&e.word?mf(0,"No declaration found for '{0}'",e.word):mf(0,"No declaration found")}_getAlternativeCommand(e){return e.getOption(51).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(51).multipleDeclarations}}j3(((P3=class e extends G3{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.id,label:mf(0,"Go to Declaration"),alias:"Go to Declaration",precondition:Sy.and(yI.hasDeclarationProvider,yI.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{group:"navigation",order:1.3}})}_getNoResultFoundMessage(e){return e&&e.word?mf(0,"No declaration found for '{0}'",e.word):mf(0,"No declaration found")}}).id="editor.action.revealDeclaration",P3)),j3(class extends G3{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",label:mf(0,"Peek Declaration"),alias:"Peek Declaration",precondition:Sy.and(yI.hasDeclarationProvider,A1.notInPeekEditor,yI.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:cx.EditorContextPeek,group:"peek",order:3}})}});class Z3 extends $3{_getLocationModel(e,t,i,n){return z3(this,void 0,void 0,(function*(){return new q1(yield I3(e.typeDefinitionProvider,t,i,n),mf(0,"Type Definitions"))}))}_getNoResultFoundMessage(e){return e&&e.word?mf(0,"No type definition found for '{0}'",e.word):mf(0,"No type definition found")}_getAlternativeCommand(e){return e.getOption(51).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(51).multipleTypeDefinitions}}j3(((F3=class e extends Z3{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.ID,label:mf(0,"Go to Type Definition"),alias:"Go to Type Definition",precondition:Sy.and(yI.hasTypeDefinitionProvider,yI.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:yI.editorTextFocus,primary:0,weight:100},contextMenuOpts:{group:"navigation",order:1.4}})}}).ID="editor.action.goToTypeDefinition",F3)),j3(((B3=class e extends Z3{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.ID,label:mf(0,"Peek Type Definition"),alias:"Peek Type Definition",precondition:Sy.and(yI.hasTypeDefinitionProvider,A1.notInPeekEditor,yI.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:cx.EditorContextPeek,group:"peek",order:4}})}}).ID="editor.action.peekTypeDefinition",B3));class Y3 extends $3{_getLocationModel(e,t,i,n){return z3(this,void 0,void 0,(function*(){return new q1(yield E3(e.implementationProvider,t,i,n),mf(0,"Implementations"))}))}_getNoResultFoundMessage(e){return e&&e.word?mf(0,"No implementation found for '{0}'",e.word):mf(0,"No implementation found")}_getAlternativeCommand(e){return e.getOption(51).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(51).multipleImplementations}}j3(((V3=class e extends Y3{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.ID,label:mf(0,"Go to Implementations"),alias:"Go to Implementations",precondition:Sy.and(yI.hasImplementationProvider,yI.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:yI.editorTextFocus,primary:2118,weight:100},contextMenuOpts:{group:"navigation",order:1.45}})}}).ID="editor.action.goToImplementation",V3)),j3(((W3=class e extends Y3{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.ID,label:mf(0,"Peek Implementations"),alias:"Peek Implementations",precondition:Sy.and(yI.hasImplementationProvider,A1.notInPeekEditor,yI.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:yI.editorTextFocus,primary:3142,weight:100},contextMenuOpts:{menuId:cx.EditorContextPeek,group:"peek",order:5}})}}).ID="editor.action.peekImplementation",W3));class X3 extends $3{_getNoResultFoundMessage(e){return e?mf(0,"No references found for '{0}'",e.word):mf(0,"No references found")}_getAlternativeCommand(e){return e.getOption(51).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(51).multipleReferences}}j3(class extends X3{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",label:mf(0,"Go to References"),alias:"Go to References",precondition:Sy.and(yI.hasReferenceProvider,A1.notInPeekEditor,yI.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:yI.editorTextFocus,primary:1094,weight:100},contextMenuOpts:{group:"navigation",order:1.45}})}_getLocationModel(e,t,i,n){return z3(this,void 0,void 0,(function*(){return new q1(yield T3(e.referenceProvider,t,i,!0,n),mf(0,"References"))}))}}),j3(class extends X3{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",label:mf(0,"Peek References"),alias:"Peek References",precondition:Sy.and(yI.hasReferenceProvider,A1.notInPeekEditor,yI.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:cx.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(e,t,i,n){return z3(this,void 0,void 0,(function*(){return new q1(yield T3(e.referenceProvider,t,i,!1,n),mf(0,"References"))}))}});class Q3 extends $3{constructor(e,t,i){super(e,{id:"editor.action.goToLocation",label:mf(0,"Go to Any Symbol"),alias:"Go to Any Symbol",precondition:Sy.and(A1.notInPeekEditor,yI.isInWalkThroughSnippet.toNegated())}),this._references=t,this._gotoMultipleBehaviour=i}_getLocationModel(e,t,i,n){return z3(this,void 0,void 0,(function*(){return new q1(this._references,mf(0,"Locations"))}))}_getNoResultFoundMessage(e){return e&&mf(0,"No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return null!==(t=this._gotoMultipleBehaviour)&&void 0!==t?t:e.getOption(51).multipleReferences}_getAlternativeCommand(){return""}}Cy.registerCommand({id:"editor.action.goToLocations",description:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:Ps},{name:"position",description:"The position at which to start",constraint:er.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:(e,t,i,n,o,s,r)=>z3(void 0,void 0,void 0,(function*(){Js(Ps.isUri(t)),Js(er.isIPosition(i)),Js(Array.isArray(n)),Js(void 0===o||"string"==typeof o),Js(void 0===r||"boolean"==typeof r);const a=e.get(N_),l=yield a.openCodeEditor({resource:t},a.getFocusedCodeEditor());if(xX(l))return l.setPosition(i),l.revealPositionInCenterIfOutsideViewport(i,0),l.invokeWithinContext((e=>{const t=new class extends Q3{_getNoResultFoundMessage(e){return s||super._getNoResultFoundMessage(e)}}({muteMessage:!Boolean(s),openInPeek:Boolean(r),openToSide:!1},n,o);e.get(k_).invokeFunction(t.run.bind(t),l)}))}))}),Cy.registerCommand({id:"editor.action.peekLocations",description:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:Ps},{name:"position",description:"The position at which to start",constraint:er.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:(e,t,i,n,o)=>z3(void 0,void 0,void 0,(function*(){e.get(wy).executeCommand("editor.action.goToLocations",t,i,n,o,void 0,!0)}))}),Cy.registerCommand({id:"editor.action.findReferences",handler:(e,t,i)=>{Js(Ps.isUri(t)),Js(er.isIPosition(i));const n=e.get(Lb),o=e.get(N_);return o.openCodeEditor({resource:t},o.getFocusedCodeEditor()).then((e=>{if(!xX(e)||!e.hasModel())return;const t=_3.get(e);if(!t)return;const o=Xv((t=>T3(n.referenceProvider,e.getModel(),er.lift(i),!1,t).then((e=>new q1(e,mf(0,"References")))))),s=new qo(i.lineNumber,i.column,i.lineNumber,i.column);return Promise.resolve(t.toggleWidget(s,o,!1))}))}}),Cy.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations"),ux.appendMenuItems([{id:cx.MenubarGoMenu,item:{command:{id:"editor.action.revealDefinition",title:mf(0,"Go to &&Definition")},group:"4_symbol_nav",order:2}},{id:cx.MenubarGoMenu,item:{command:{id:"editor.action.revealDeclaration",title:mf(0,"Go to &&Declaration")},group:"4_symbol_nav",order:3}},{id:cx.MenubarGoMenu,item:{command:{id:"editor.action.goToTypeDefinition",title:mf(0,"Go to &&Type Definition")},group:"4_symbol_nav",order:3}},{id:cx.MenubarGoMenu,item:{command:{id:"editor.action.goToImplementation",title:mf(0,"Go to &&Implementations")},group:"4_symbol_nav",order:4}},{id:cx.MenubarGoMenu,item:{command:{id:"editor.action.goToReferences",title:mf(0,"Go to &&References")},group:"4_symbol_nav",order:5}}]);var J3=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},e2=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}};let t2=class e{constructor(e,t,i,n){this.textModelResolverService=t,this.languageService=i,this.languageFeaturesService=n,this.toUnhook=new ws,this.toUnhookForKeyboard=new ws,this.linkDecorations=[],this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e;let o=new c1(e);this.toUnhook.add(o),this.toUnhook.add(o.onMouseMoveOrRelevantKeyDown((([e,t])=>{this.startFindDefinitionFromMouse(e,Qs(t))}))),this.toUnhook.add(o.onExecute((e=>{this.isEnabled(e)&&this.gotoDefinition(e.target.position,e.hasSideBySideModifier).then((()=>{this.removeLinkDecorations()}),(e=>{this.removeLinkDecorations(),Jo(e)}))}))),this.toUnhook.add(o.onCancel((()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null})))}static get(t){return t.getContribution(e.ID)}startFindDefinitionFromCursor(e){return this.startFindDefinition(e).then((()=>{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)}startFindDefinition(e){var t;this.toUnhookForKeyboard.clear();const i=e?null===(t=this.editor.getModel())||void 0===t?void 0:t.getWordAtPosition(e):null;if(!i)return this.currentWordAtPosition=null,this.removeLinkDecorations(),Promise.resolve(0);if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===i.startColumn&&this.currentWordAtPosition.endColumn===i.endColumn&&this.currentWordAtPosition.word===i.word)return Promise.resolve(0);this.currentWordAtPosition=i;let n=new wX(this.editor,15);return this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=Xv((t=>this.findDefinition(e,t))),this.previousPromise.then((t=>{if(t&&t.length&&n.validate(this.editor))if(t.length>1)this.addDecoration(new qo(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn),(new RU).appendText(mf(0,"Click to show {0} definitions.",t.length)));else{let n=t[0];if(!n.uri)return;this.textModelResolverService.createModelReference(n.uri).then((t=>{if(!t.object||!t.object.textEditorModel)return void t.dispose();const{object:{textEditorModel:o}}=t,{startLineNumber:s}=n.range;if(s<1||s>o.getLineCount())return void t.dispose();const r=this.getPreviewValue(o,s,n);let a;a=n.originSelectionRange?qo.lift(n.originSelectionRange):new qo(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn);const l=this.languageService.guessLanguageIdByFilepathOrFirstLine(o.uri);this.addDecoration(a,(new RU).appendCodeblock(l||"",r)),t.dispose()}))}else this.removeLinkDecorations()})).then(void 0,Jo)}getPreviewValue(t,i,n){let o=n.targetSelectionRange?n.range:this.getPreviewRangeBasedOnBrackets(t,i);o.endLineNumber-o.startLineNumber>=e.MAX_SOURCE_PREVIEW_LINES&&(o=this.getPreviewRangeBasedOnIndentation(t,i));return this.stripIndentationFromPreviewRange(t,i,o)}stripIndentationFromPreviewRange(e,t,i){let n=e.getLineFirstNonWhitespaceColumn(t);for(let o=t+1;on)return new qo(i,1,n+1,1);r=t.bracketPairs.findNextBracket(new er(a,l))}return new qo(i,1,n+1,1)}addDecoration(e,t){const i={range:e,options:{description:"goto-definition-link",inlineClassName:"goto-definition-link",hoverMessage:t}};this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[i])}removeLinkDecorations(){this.linkDecorations.length>0&&(this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[]))}isEnabled(e,t){return this.editor.hasModel()&&e.isNoneOrSingleMouseDown&&6===e.target.type&&(e.hasTriggerModifier||!!t&&t.keyCodeIsTriggerKey)&&this.languageFeaturesService.definitionProvider.has(this.editor.getModel())}findDefinition(e,t){const i=this.editor.getModel();return i?L3(this.languageFeaturesService.definitionProvider,i,e,t):Promise.resolve(null)}gotoDefinition(e,t){return this.editor.setPosition(e),this.editor.invokeWithinContext((e=>{const i=!t&&this.editor.getOption(78)&&!this.isInPeekEditor(e);return new K3({openToSide:t,openInPeek:i,muteMessage:!0},{alias:"",label:"",id:"",precondition:void 0}).run(e,this.editor)}))}isInPeekEditor(e){const t=e.get($y);return A1.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose()}};t2.ID="editor.contrib.gotodefinitionatposition",t2.MAX_SOURCE_PREVIEW_LINES=8,t2=J3([e2(1,gy),e2(2,Lv),e2(3,Lb)],t2),Ix(t2.ID,t2),sx(((e,t)=>{const i=e.getColor($k);i&&t.addRule(`.monaco-editor .goto-definition-link { color: ${i} !important; }`)}));const i2=YC;class n2 extends Uo{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 fT(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}class o2 extends Uo{constructor(e,t,i){super(),this.actionContainer=$C(e,i2("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=$C(this.actionContainer,i2("a.action")),this.action.setAttribute("role","button"),t.iconClass&&$C(this.action,i2(`span.icon.${t.iconClass}`));$C(this.action,i2("span")).textContent=i?`${t.label} (${i})`:t.label,this._register(nC(this.actionContainer,zC.CLICK,(e=>{e.stopPropagation(),e.preventDefault(),t.run(this.actionContainer)}))),this._register(nC(this.actionContainer,zC.KEY_UP,(e=>{new jw(e).equals(3)&&(e.stopPropagation(),e.preventDefault(),t.run(this.actionContainer))}))),this.setEnabled(!0)}static render(e,t,i){return new o2(e,t,i)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}var s2=globalThis&&globalThis.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,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){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))},r2=globalThis&&globalThis.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(i){t[i]=e[i]&&function(t){return new Promise((function(n,o){(function(e,t,i,n){Promise.resolve(n).then((function(t){e({value:t,done:i})}),t)})(n,o,(t=e[i](t)).done,t.value)}))}}};class a2{constructor(e,t,i){this.value=e,this.isComplete=t,this.hasLoadingMessage=i}}class l2 extends Uo{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new $o),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new lb((()=>this._triggerAsyncComputation()),0)),this._secondWaitScheduler=this._register(new lb((()=>this._triggerSyncComputation()),0)),this._loadingMessageScheduler=this._register(new lb((()=>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(53).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=function(e){const t=new as,i=e(t.token);return new mb(t,(e=>Zv(this,void 0,void 0,(function*(){var n,o;const s=t.token.onCancellationRequested((()=>{s.dispose(),t.dispose(),e.reject(new ls)}));try{try{for(var r,a=Yv(i);!(r=yield a.next()).done;){const i=r.value;if(t.token.isCancellationRequested)return;e.emitOne(i)}}catch(l){n={error:l}}finally{try{r&&!r.done&&(o=a.return)&&(yield o.call(a))}finally{if(n)throw n.error}}s.dispose(),t.dispose()}catch(d){s.dispose(),t.dispose(),e.reject(d)}}))))}((e=>this._computer.computeAsync(e))),(()=>{s2(this,void 0,void 0,(function*(){var e,t;try{try{for(var i,n=r2(this._asyncIterable);!(i=yield n.next()).done;){const e=i.value;e&&(this._result.push(e),this._fireResult())}}catch(o){e={error:o}}finally{try{i&&!i.done&&(t=n.return)&&(yield t.call(n))}finally{if(e)throw e.error}}this._asyncIterableDone=!0,3!==this._state&&4!==this._state||this._setState(0)}catch(s){Jo(s)}}))})()):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 a2(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()}}cancel(){this._firstWaitScheduler.cancel(),this._secondWaitScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._setState(0,!1)}}class d2{constructor(e,t){this.priority=e,this.range=t,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 c2{constructor(e,t,i){this.priority=e,this.owner=t,this.range=i,this.type=2}equals(e){return 2===e.type&&this.owner===e.owner}canAdoptVisibleHover(e,t){return 2===e.type&&this.owner===e.owner}}const h2=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}};class u2{constructor(){this.value="",this.pos=0}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};let e,t=this.pos,i=0,n=this.value.charCodeAt(t);if(e=u2._table[n],"number"==typeof e)return this.pos+=1,{type:e,pos:t,len:1};if(u2.isDigitCharacter(n)){e=8;do{i+=1,n=this.value.charCodeAt(t+i)}while(u2.isDigitCharacter(n));return this.pos+=i,{type:e,pos:t,len:i}}if(u2.isVariableCharacter(n)){e=9;do{n=this.value.charCodeAt(t+ ++i)}while(u2.isVariableCharacter(n)||u2.isDigitCharacter(n));return this.pos+=i,{type:e,pos:t,len:i}}e=10;do{i+=1,n=this.value.charCodeAt(t+i)}while(!isNaN(n)&&void 0===u2._table[n]&&!u2.isDigitCharacter(n)&&!u2.isVariableCharacter(n));return this.pos+=i,{type:e,pos:t,len:i}}}u2._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};class g2{constructor(){this._children=[]}appendChild(e){return e instanceof p2&&this._children[this._children.length-1]instanceof p2?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 snippet(){let e=this;for(;;){if(!e)return;if(e instanceof y2)return e;e=e.parent}}toString(){return this.children.reduce(((e,t)=>e+t.toString()),"")}len(){return 0}}class p2 extends g2{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new p2(this.value)}}class m2 extends g2{}class f2 extends m2{constructor(e){super(),this.index=e}static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.indext.index?1:0}get isFinalTabstop(){return 0===this.index}get choice(){return 1===this._children.length&&this._children[0]instanceof _2?this._children[0]:void 0}clone(){let e=new f2(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((e=>e.clone())),e}}class _2 extends g2{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof p2&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){let e=new _2;return this.options.forEach(e.appendChild,e),e}}class v2 extends g2{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 b2&&Boolean(e.elseValue)))&&(n=this._replace([])),n}_replace(e){let t="";for(const i of this._children)if(i instanceof b2){let n=e[i.index]||"";n=i.resolve(n),t+=n}else t+=i.toString();return t}toString(){return""}clone(){let e=new v2;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 b2 extends g2{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).toLowerCase())).join(""):e}_toCamelCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map(((e,t)=>0===t?e.toLowerCase():e.charAt(0).toUpperCase()+e.substr(1).toLowerCase())).join(""):e}clone(){return new b2(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class w2 extends m2{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 p2(t)],!0)}clone(){const e=new w2(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((e=>e.clone())),e}}function C2(e,t){const i=[...e];for(;i.length>0;){const e=i.shift();if(!t(e))break;i.unshift(...e.children)}}class y2 extends g2{get placeholderInfo(){if(!this._placeholders){let e,t=[];this.walk((function(i){return i instanceof f2&&(t.push(i),e=!e||e.indexn===e?(i=!0,!1):(t+=n.len(),!0))),i?t:-1}fullLen(e){let t=0;return C2([e],(e=>(t+=e.len(),!0))),t}enclosingPlaceholders(e){let t=[],{parent:i}=e;for(;i;)i instanceof f2&&t.push(i),i=i.parent;return t}resolveVariables(e){return this.walk((t=>(t instanceof w2&&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(){let e=new y2;return this._children=this.children.map((e=>e.clone())),e}walk(e){C2(this.children,e)}}class x2{constructor(){this._scanner=new u2,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){this._scanner.text(e),this._token=this._scanner.next();const n=new y2;for(;this._parse(n););const o=new Map,s=[];let r=0;n.walk((e=>(e instanceof f2&&(r+=1,e.isFinalTabstop?o.set(0,void 0):!o.has(e.index)&&e.children.length>0?o.set(e.index,e.children):s.push(e)),!0)));for(const a of s){const e=o.get(a.index);if(e){const t=new f2(a.index);t.transform=a.transform;for(const i of e)t.appendChild(i.clone());n.replace(a,[t])}}return i||(i=r>0&&t),!o.has(0)&&i&&n.appendChild(new f2(0)),n}_accept(e,t){if(void 0===e||this._token.type===e){let 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;for(;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 p2(t)),!0)}_parseTabstopOrVariableName(e){let t;const i=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new f2(Number(t)):new w2(t)),!0):this._backTo(i)}_parseComplexPlaceholder(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(i);const n=new f2(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new p2("${"+t+":")),n.children.forEach(e.appendChild,e),!0}else{if(!(n.index>0&&this._accept(7)))return this._accept(6)?this._parseTransform(n)?(e.appendChild(n),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(n),!0):this._backTo(i);{const t=new _2;for(;;){if(this._parseChoiceElement(t)){if(this._accept(2))continue;if(this._accept(7)&&(n.appendChild(t),this._accept(4)))return e.appendChild(n),!0}return this._backTo(i),!1}}}}_parseChoiceElement(e){const t=this._token,i=[];for(;2!==this._token.type&&7!==this._token.type;){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 p2(i.join(""))),!0)}_parseComplexVariable(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(i);const n=new w2(t);if(!this._accept(1))return this._accept(6)?this._parseTransform(n)?(e.appendChild(n),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(n),!0):this._backTo(i);for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new p2("${"+t+":")),n.children.forEach(e.appendChild,e),!0}}_parseTransform(e){let t=new v2,i="",n="";for(;!this._accept(6);){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)}}for(;!this._accept(6);){let e;if(e=this._accept(5,!0))e=this._accept(5,!0)||this._accept(6,!0)||e,t.appendChild(new p2(e));else if(!this._parseFormatString(t)&&!this._parseAnything(t))return!1}for(;!this._accept(4);){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);let n=this._accept(8,!0);if(!n)return this._backTo(t),!1;if(!i)return e.appendChild(new b2(Number(n))),!0;if(this._accept(4))return e.appendChild(new b2(Number(n))),!0;if(!this._accept(1))return this._backTo(t),!1;if(this._accept(6)){let i=this._accept(9,!0);return i&&this._accept(4)?(e.appendChild(new b2(Number(n),i)),!0):(this._backTo(t),!1)}if(this._accept(11)){let t=this._until(4);if(t)return e.appendChild(new b2(Number(n),void 0,t,void 0)),!0}else if(this._accept(12)){let t=this._until(4);if(t)return e.appendChild(new b2(Number(n),void 0,void 0,t)),!0}else if(this._accept(13)){let t=this._until(1);if(t){let i=this._until(4);if(i)return e.appendChild(new b2(Number(n),void 0,t,i)),!0}}else{let t=this._until(4);if(t)return e.appendChild(new b2(Number(n),void 0,void 0,t)),!0}return this._backTo(t),!1}_parseAnything(e){return 14!==this._token.type&&(e.appendChild(new p2(this._scanner.tokenText(this._token))),this._accept(void 0),!0)}}const S2={inputActiveOptionBorder:hS.fromHex("#007ACC00"),inputActiveOptionForeground:hS.fromHex("#FFFFFF"),inputActiveOptionBackground:hS.fromHex("#0E639C50")};class k2 extends QI{constructor(e){super(),this._onChange=this._register(new $o),this.onChange=this._onChange.event,this._onKeyDown=this._register(new $o),this.onKeyDown=this._onKeyDown.event,this._opts=Object.assign(Object.assign({},S2),e),this._checked=this._opts.isChecked;const t=["monaco-custom-checkbox"];this._opts.icon&&t.push(...Ys.asClassNameArray(this._opts.icon)),this._opts.actionClassName&&t.push(...this._opts.actionClassName.split(" ")),this._checked&&t.push("checked"),this.domNode=document.createElement("div"),this.domNode.title=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.ignoreGesture(this.domNode),this.onkeydown(this.domNode,(e=>{if(10===e.keyCode||3===e.keyCode)return this.checked=!this._checked,this._onChange.fire(!0),void e.preventDefault();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}style(e){e.inputActiveOptionBorder&&(this._opts.inputActiveOptionBorder=e.inputActiveOptionBorder),e.inputActiveOptionForeground&&(this._opts.inputActiveOptionForeground=e.inputActiveOptionForeground),e.inputActiveOptionBackground&&(this._opts.inputActiveOptionBackground=e.inputActiveOptionBackground),this.applyStyles()}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder?this._opts.inputActiveOptionBorder.toString():"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground?this._opts.inputActiveOptionForeground.toString():"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground?this._opts.inputActiveOptionBackground.toString():"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}const D2=mf(0,"Match Case"),L2=mf(0,"Match Whole Word"),N2=mf(0,"Use Regular Expression");class E2 extends k2{constructor(e){super({icon:br.caseSensitive,title:D2+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class I2 extends k2{constructor(e){super({icon:br.wholeWord,title:L2+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class T2 extends k2{constructor(e){super({icon:br.regex,title:N2+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}const M2=mf(0,"input");class A2 extends QI{constructor(e,t,i,n){super(),this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this._onDidOptionChange=this._register(new $o),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new $o),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new $o),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new $o),this._onKeyUp=this._register(new $o),this._onCaseSensitiveKeyDown=this._register(new $o),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new $o),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.contextViewProvider=t,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||M2,this.inputActiveOptionBorder=n.inputActiveOptionBorder,this.inputActiveOptionForeground=n.inputActiveOptionForeground,this.inputActiveOptionBackground=n.inputActiveOptionBackground,this.inputBackground=n.inputBackground,this.inputForeground=n.inputForeground,this.inputBorder=n.inputBorder,this.inputValidationInfoBorder=n.inputValidationInfoBorder,this.inputValidationInfoBackground=n.inputValidationInfoBackground,this.inputValidationInfoForeground=n.inputValidationInfoForeground,this.inputValidationWarningBorder=n.inputValidationWarningBorder,this.inputValidationWarningBackground=n.inputValidationWarningBackground,this.inputValidationWarningForeground=n.inputValidationWarningForeground,this.inputValidationErrorBorder=n.inputValidationErrorBorder,this.inputValidationErrorBackground=n.inputValidationErrorBackground,this.inputValidationErrorForeground=n.inputValidationErrorForeground;const o=n.appendCaseSensitiveLabel||"",s=n.appendWholeWordsLabel||"",r=n.appendRegexLabel||"",a=n.history||[],l=!!n.flexibleHeight,d=!!n.flexibleWidth,c=n.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new TU(this.domNode,this.contextViewProvider,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:a,showHistoryHint:n.showHistoryHint,flexibleHeight:l,flexibleWidth:d,flexibleMaxHeight:c})),this.regex=this._register(new T2({appendTitle:r,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),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 I2({appendTitle:s,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.wholeWords.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this.caseSensitive=this._register(new E2({appendTitle:o,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),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)}))),this._showOptionButtons&&(this.inputBox.paddingRight=this.caseSensitive.width()+this.wholeWords.width()+this.regex.width());let h=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,(e=>{if(e.equals(15)||e.equals(17)||e.equals(9)){let t=h.indexOf(document.activeElement);if(t>=0){let i=-1;e.equals(17)?i=(t+1)%h.length:e.equals(15)&&(i=0===t?h.length-1:t-1),e.equals(9)?(h[t].blur(),this.inputBox.focus()):i>=0&&h[i].focus(),HC(e,!0)}}})),this.controls=document.createElement("div"),this.controls.className="controls",this.controls.style.display=this._showOptionButtons?"block":"none",this.controls.appendChild(this.caseSensitive.domNode),this.controls.appendChild(this.wholeWords.domNode),this.controls.appendChild(this.regex.domNode),this.domNode.appendChild(this.controls),e&&e.appendChild(this.domNode),this._register(nC(this.inputBox.inputElement,"compositionstart",(e=>{this.imeSessionInProgress=!0}))),this._register(nC(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)))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.regex.enable(),this.wholeWords.enable(),this.caseSensitive.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.regex.disable(),this.wholeWords.disable(),this.caseSensitive.disable()}setFocusInputOnOptionClick(e){this.fixFocusOnOptionClickEnabled=e}setEnabled(e){e?this.enable():this.disable()}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}style(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionForeground=e.inputActiveOptionForeground,this.inputActiveOptionBackground=e.inputActiveOptionBackground,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.regex.style(e),this.wholeWords.style(e),this.caseSensitive.style(e);const t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){return this.caseSensitive.checked}setCaseSensitive(e){this.caseSensitive.checked=e}getWholeWords(){return this.wholeWords.checked}setWholeWords(e){this.wholeWords.checked=e}getRegex(){return this.regex.checked}setRegex(e){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()}clearMessage(){this.inputBox.hideMessage()}}const O2=mf(0,"input"),R2=mf(0,"Preserve Case");class P2 extends k2{constructor(e){super({icon:br.preserveCase,title:R2+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class F2 extends QI{constructor(e,t,i,n){super(),this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new $o),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new $o),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new $o),this._onInput=this._register(new $o),this._onKeyUp=this._register(new $o),this._onPreserveCaseKeyDown=this._register(new $o),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=t,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||O2,this.inputActiveOptionBorder=n.inputActiveOptionBorder,this.inputActiveOptionForeground=n.inputActiveOptionForeground,this.inputActiveOptionBackground=n.inputActiveOptionBackground,this.inputBackground=n.inputBackground,this.inputForeground=n.inputForeground,this.inputBorder=n.inputBorder,this.inputValidationInfoBorder=n.inputValidationInfoBorder,this.inputValidationInfoBackground=n.inputValidationInfoBackground,this.inputValidationInfoForeground=n.inputValidationInfoForeground,this.inputValidationWarningBorder=n.inputValidationWarningBorder,this.inputValidationWarningBackground=n.inputValidationWarningBackground,this.inputValidationWarningForeground=n.inputValidationWarningForeground,this.inputValidationErrorBorder=n.inputValidationErrorBorder,this.inputValidationErrorBackground=n.inputValidationErrorBackground,this.inputValidationErrorForeground=n.inputValidationErrorForeground;const o=n.appendPreserveCaseLabel||"",s=n.history||[],r=!!n.flexibleHeight,a=!!n.flexibleWidth,l=n.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new TU(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:s,showHistoryHint:n.showHistoryHint,flexibleHeight:r,flexibleWidth:a,flexibleMaxHeight:l})),this.preserveCase=this._register(new P2({appendTitle:o,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),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;let d=[this.preserveCase.domNode];this.onkeydown(this.domNode,(e=>{if(e.equals(15)||e.equals(17)||e.equals(9)){let t=d.indexOf(document.activeElement);if(t>=0){let i=-1;e.equals(17)?i=(t+1)%d.length:e.equals(15)&&(i=0===t?d.length-1:t-1),e.equals(9)?(d[t].blur(),this.inputBox.focus()):i>=0&&d[i].focus(),HC(e,!0)}}}));let c=document.createElement("div");c.className="controls",c.style.display=this._showOptionButtons?"block":"none",c.appendChild(this.preserveCase.domNode),this.domNode.appendChild(c),e&&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()}style(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionForeground=e.inputActiveOptionForeground,this.inputActiveOptionBackground=e.inputActiveOptionBackground,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.preserveCase.style(e);const t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}}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&&this.inputBox.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.inputBox.width=e,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}var B2=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},V2=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}};const W2=new Uy("suggestWidgetVisible",!1,mf(0,"Whether suggestion are visible")),z2="historyNavigationWidget",H2="historyNavigationForwardsEnabled",j2="historyNavigationBackwardsEnabled";function U2(e,t){return e.getContext(document.activeElement).getValue(t)}function $2(e,t){const i=function(e,t){return e.createScoped(t.target)}(e,t);!function(e,t,i){new Uy(i,t).bindTo(e)}(i,t,z2);return{scopedContextKeyService:i,historyNavigationForwardsEnablement:new Uy(H2,!0).bindTo(i),historyNavigationBackwardsEnablement:new Uy(j2,!0).bindTo(i)}}let K2=class extends A2{constructor(e,t,i,n,o=!1){super(e,t,o,i),this._register($2(n,{target:this.inputBox.element,historyNavigator:this.inputBox}).scopedContextKeyService)}};K2=B2([V2(3,$y)],K2);let q2=class extends F2{constructor(e,t,i,n,o=!1){super(e,t,o,i),this._register($2(n,{target:this.inputBox.element,historyNavigator:this.inputBox}).scopedContextKeyService)}};q2=B2([V2(3,$y)],q2),fx.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:Sy.and(Sy.has(z2),Sy.equals(j2,!0),W2.isEqualTo(!1)),primary:16,secondary:[528],handler:e=>{const t=U2(e.get($y),z2);if(t){t.historyNavigator.showPreviousValue()}}}),fx.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:Sy.and(Sy.has(z2),Sy.equals(H2,!0),W2.isEqualTo(!1)),primary:18,secondary:[530],handler:e=>{const t=U2(e.get($y),z2);if(t){t.historyNavigator.showNextValue()}}});var G2=globalThis&&globalThis.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(o,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){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const Z2={Visible:W2,DetailsVisible:new Uy("suggestWidgetDetailsVisible",!1,mf(0,"Whether suggestion details are visible")),MultipleSuggestions:new Uy("suggestWidgetMultipleSuggestions",!1,mf(0,"Whether there are multiple suggestions to pick from")),MakesTextEdit:new Uy("suggestionMakesTextEdit",!0,mf(0,"Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new Uy("acceptSuggestionOnEnter",!0,mf(0,"Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new Uy("suggestionHasInsertAndReplaceRange",!1,mf(0,"Whether the current suggestion has insert and replace behaviour")),InsertMode:new Uy("suggestionInsertMode",void 0,{type:"string",description:mf(0,"Whether the default behaviour is to insert or replace")}),CanResolve:new Uy("suggestionCanResolve",!1,mf(0,"Whether the current suggestion supports to resolve further details"))},Y2=new cx("suggestWidgetStatusBar");class X2{constructor(e,t,i,n){this.position=e,this.completion=t,this.container=i,this.provider=n,this.isInvalid=!1,this.score=yH.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(),qo.isIRange(t.range)?(this.editStart=new er(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new er(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new er(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||qo.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new er(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new er(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new er(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||qo.spansMultipleLines(t.range.insert)||qo.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._isResolved=!0)}get isResolved(){return!!this._isResolved}resolve(e){return G2(this,void 0,void 0,(function*(){if(!this._resolveCache){const t=e.onCancellationRequested((()=>{this._resolveCache=void 0,this._isResolved=!1}));this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then((e=>{Object.assign(this.completion,e),this._isResolved=!0,t.dispose()}),(e=>{Ea(e)&&(this._resolveCache=void 0,this._isResolved=!1)}))}return this._resolveCache}))}}class Q2{constructor(e=2,t=new Set,i=new Set,n=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=i,this.showDeprecated=n}}Q2.default=new Q2;class J2{constructor(e,t,i,n){this.items=e,this.needsClipboard=t,this.durations=i,this.disposable=n}}function e6(e,t,i,n=Q2.default,o={triggerKind:0},s=Ia.None){return G2(this,void 0,void 0,(function*(){const r=new ps(!0);i=i.clone();const a=t.getWordAtPosition(i),l=a?new qo(i.lineNumber,a.startColumn,i.lineNumber,a.endColumn):qo.fromPositions(i),d={replace:l,insert:l.setEndPosition(i.lineNumber,i.column)},c=[],h=new ws,u=[];let g=!1;const p=(e,t,o)=>{var s,r,a;let l=!1;if(!t)return l;for(let h of t.suggestions)if(!n.kindFilter.has(h.kind)){if(!n.showDeprecated&&(null===(s=null==h?void 0:h.tags)||void 0===s?void 0:s.includes(1)))continue;h.range||(h.range=d),h.sortText||(h.sortText="string"==typeof h.label?h.label:h.label.label),!g&&h.insertTextRules&&4&h.insertTextRules&&(g=x2.guessNeedsClipboard(h.insertText)),c.push(new X2(i,h,t,e)),l=!0}return ga(t)&&h.add(t),u.push({providerName:null!==(r=e._debugDisplayName)&&void 0!==r?r:"unknown_provider",elapsedProvider:null!==(a=t.duration)&&void 0!==a?a:-1,elapsedOverall:o.elapsed()}),l},m=(()=>G2(this,void 0,void 0,(function*(){})))();for(let f of e.orderedGroups(t)){let e=!1;if(yield Promise.all(f.map((r=>G2(this,void 0,void 0,(function*(){if(!(n.providerFilter.size>0)||n.providerFilter.has(r))try{const n=new ps(!0),a=yield r.provideCompletionItems(t,i,o,s);e=p(r,a,n)||e}catch(a){Ta(a)}}))))),e||s.isCancellationRequested)break}return yield m,s.isCancellationRequested?(h.dispose(),Promise.reject(_s())):new J2(c.sort(n6(n.snippetSortOrder)),g,{entries:u,elapsed:r.elapsed()},h)}))}function t6(e,t){if(e.sortTextLow&&t.sortTextLow){if(e.sortTextLowt.sortTextLow)return 1}return e.completion.labelt.completion.label?1:e.completion.kind-t.completion.kind}const i6=new Map;function n6(e){return i6.get(e)}let o6;i6.set(0,(function(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return-1;if(27===t.completion.kind)return 1}return t6(e,t)})),i6.set(2,(function(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return 1;if(27===t.completion.kind)return-1}return t6(e,t)})),i6.set(1,t6),Cy.registerCommand("_executeCompletionItemProvider",((e,...t)=>G2(void 0,void 0,void 0,(function*(){const[i,n,o,s]=t;Js(Ps.isUri(i)),Js(er.isIPosition(n)),Js("string"==typeof o||!o),Js("number"==typeof s||!s);const{completionProvider:r}=e.get(Lb),a=yield e.get(gy).createModelReference(i);try{const e={incomplete:!1,suggestions:[]},t=[],i=yield e6(r,a.object.textEditorModel,er.lift(n),void 0,{triggerCharacter:o,triggerKind:o?1:0});for(const n of i.items)t.length<(null!=s?s:0)&&t.push(n.resolve(Ia.None)),e.incomplete=e.incomplete||n.container.incomplete,e.suggestions.push(n.completion);try{return yield Promise.all(t),e}finally{setTimeout((()=>i.disposable.dispose()),100)}}finally{a.dispose()}}))));let s6=[];function r6(e,t,i){const{completionProvider:n}=e.get(Lb);o6||(o6=new class{provideCompletionItems(){let e={suggestions:s6.slice(0)};return s6.length=0,e}},n.register("*",o6)),setTimeout((()=>{var e;s6.push(...i),null===(e=t.getContribution("editor.contrib.suggestController"))||void 0===e||e.triggerSuggest((new Set).add(o6))}),0)}var a6=globalThis&&globalThis.__decorate||function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},l6=globalThis&&globalThis.__param||function(e,t){return function(i,n){t(i,n,e)}};const d6=YC;let c6=class e extends Uo{constructor(e,t,i){super(),this._editor=e,this._instantiationService=t,this._keybindingService=i,this._widget=this._register(this._instantiationService.createInstance(g6,this._editor)),this._decorationsChangerListener=this._register(new h6(this._editor)),this._messages=[],this._messagesAreComplete=!1,this._participants=[];for(const n of h2.getAll())this._participants.push(this._instantiationService.createInstance(n,this._editor));this._participants.sort(((e,t)=>e.hoverOrdinal-t.hoverOrdinal)),this._computer=new m6(this._editor,this._participants),this._hoverOperation=this._register(new l2(this._editor,this._computer)),this._register(this._hoverOperation.onResult((e=>{this._withResult(e.value,e.isComplete,e.hasLoadingMessage)}))),this._register(this._decorationsChangerListener.onDidChangeModelDecorations((()=>this._onModelDecorationsChanged()))),this._register(sC(this._widget.getDomNode(),"keydown",(e=>{e.equals(9)&&this.hide()}))),this._register(Ns.onDidChange((()=>{this._widget.position&&this._computer.anchor&&this._messages.length>0&&(this._widget.clear(),this._renderMessages(this._computer.anchor,this._messages))})))}_onModelDecorationsChanged(){this._widget.position&&(this._hoverOperation.cancel(),this._widget.isColorPickerVisible||this._hoverOperation.start(0))}maybeShowAt(e){const t=[];for(const n of this._participants)if(n.suggestHoverAnchor){const i=n.suggestHoverAnchor(e);i&&t.push(i)}const i=e.target;if(6===i.type&&t.push(new d2(0,i.range)),7===i.type){const e=this._editor.getOption(44).typicalHalfwidthCharacterWidth/2;!i.detail.isAfterLines&&"number"==typeof i.detail.horizontalDistanceToText&&i.detail.horizontalDistanceToTextt.priority-e.priority)),this._startShowingAt(t[0],0,!1),!0)}startShowingAtRange(e,t,i){this._startShowingAt(new d2(0,e),t,i)}_startShowingAt(e,t,i){if(!this._computer.anchor||!this._computer.anchor.equals(e)){if(this._hoverOperation.cancel(),this._widget.position)if(this._computer.anchor&&e.canAdoptVisibleHover(this._computer.anchor,this._widget.position)){const t=this._messages.filter((t=>t.isValidForHoverAnchor(e)));if(0===t.length)this.hide();else{if(t.length===this._messages.length&&this._messagesAreComplete)return;this._renderMessages(e,t)}}else this.hide();this._computer.anchor=e,this._computer.shouldFocus=i,this._hoverOperation.start(t)}}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._widget.hide()}isColorPickerVisible(){return this._widget.isColorPickerVisible}_addLoadingMessage(e){if(this._computer.anchor)for(const t of this._participants)if(t.createLoadingMessage){const i=t.createLoadingMessage(this._computer.anchor);if(i)return e.slice(0).concat([i])}return e}_withResult(e,t,i){this._messages=i?this._addLoadingMessage(e):e,this._messagesAreComplete=t,this._computer.anchor&&this._messages.length>0?this._renderMessages(this._computer.anchor,this._messages):t&&this.hide()}_renderMessages(t,i){let n=1073741824,o=i[0].range,s=null;for(const e of i)n=Math.min(n,e.range.startColumn),o=qo.plusRange(o,e.range),e.forceShowAtRange&&(s=e.range);const r=new ws,a=r.add(new p6(this._keybindingService)),l=document.createDocumentFragment();let d=null;const c={fragment:l,statusBar:a,setColorPicker:e=>d=e,onContentsChanged:()=>this._widget.onContentsChanged(),hide:()=>this.hide()};for(const e of this._participants){const t=i.filter((t=>t.owner===e));t.length>0&&r.add(e.renderHoverParts(c,t))}if(a.hasContent&&l.appendChild(a.hoverElement),l.hasChildNodes()){if(o){const t=this._decorationsChangerListener.deltaDecorations([],[{range:o,options:e._DECORATION_OPTIONS}]);r.add(es((()=>{this._decorationsChangerListener.deltaDecorations(t,[])})))}this._widget.showAt(l,new u6(d,s?s.getStartPosition():new er(t.range.startLineNumber,n),s||o,this._editor.getOption(53).above,this._computer.shouldFocus,r))}else r.dispose()}};c6._DECORATION_OPTIONS=GP.register({description:"content-hover-highlight",className:"hoverHighlight"}),c6=a6([l6(1,k_),l6(2,kW)],c6);class h6 extends Uo{constructor(e){super(),this._editor=e,this._onDidChangeModelDecorations=this._register(new $o),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._isChangingDecorations=!1,this._register(this._editor.onDidChangeModelDecorations((e=>{this._isChangingDecorations||this._onDidChangeModelDecorations.fire(e)})))}deltaDecorations(e,t){try{return this._isChangingDecorations=!0,this._editor.deltaDecorations(e,t)}finally{this._isChangingDecorations=!1}}}class u6{constructor(e,t,i,n,o,s){this.colorPicker=e,this.showAtPosition=t,this.showAtRange=i,this.preferAbove=n,this.stoleFocus=o,this.disposables=s}}let g6=class e extends Uo{constructor(e,t){super(),this._editor=e,this._contextKeyService=t,this.allowEditorOverflow=!0,this._hoverVisibleKey=yI.hoverVisible.bindTo(this._contextKeyService),this._hover=this._register(new n2),this._visibleData=null,this._register(this._editor.onDidLayoutChange((()=>this._layout()))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(44)&&this._updateFont()}))),this._setVisibleData(null),this._layout(),this._editor.addContentWidget(this)}get position(){var e,t;return null!==(t=null===(e=this._visibleData)||void 0===e?void 0:e.showAtPosition)&&void 0!==t?t:null}get isColorPickerVisible(){var e;return Boolean(null===(e=this._visibleData)||void 0===e?void 0:e.colorPicker)}dispose(){this._editor.removeContentWidget(this),this._visibleData&&this._visibleData.disposables.dispose(),super.dispose()}getId(){return e.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){if(!this._visibleData)return null;let e=this._visibleData.preferAbove;return!e&&this._contextKeyService.getContextKeyValue(Z2.Visible.key)&&(e=!0),{position:this._visibleData.showAtPosition,range:this._visibleData.showAtRange,preference:e?[1,2]:[2,1]}}_setVisibleData(e){this._visibleData&&this._visibleData.disposables.dispose(),this._visibleData=e,this._hoverVisibleKey.set(!!this._visibleData),this._hover.containerDomNode.classList.toggle("hidden",!this._visibleData)}_layout(){const e=Math.max(this._editor.getLayoutInfo().height/4,250),{fontSize:t,lineHeight:i}=this._editor.getOption(44);this._hover.contentsDomNode.style.fontSize=`${t}px`,this._hover.contentsDomNode.style.lineHeight=""+i/t,this._hover.contentsDomNode.style.maxHeight=`${e}px`,this._hover.contentsDomNode.style.maxWidth=`${Math.max(.66*this._editor.getLayoutInfo().width,500)}px`}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach((e=>this._editor.applyFontInfo(e)))}showAt(e,t){this._setVisibleData(t),this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._hover.contentsDomNode.style.paddingBottom="",this._updateFont(),this._editor.layoutContentWidget(this),this.onContentsChanged(),this._editor.render(),this._editor.layoutContentWidget(this),this.onContentsChanged(),t.stoleFocus&&this._hover.containerDomNode.focus(),t.colorPicker&&t.colorPicker.layout()}hide(){if(this._visibleData){const e=this._visibleData.stoleFocus;this._setVisibleData(null),this._editor.layoutContentWidget(this),e&&this._editor.focus()}}onContentsChanged(){this._hover.onContentsChanged();const e=this._hover.scrollbar.getScrollDimensions();if(e.scrollWidth>e.width){const e=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;this._hover.contentsDomNode.style.paddingBottom!==e&&(this._hover.contentsDomNode.style.paddingBottom=e,this._editor.layoutContentWidget(this),this._hover.onContentsChanged())}}clear(){this._hover.contentsDomNode.textContent=""}};g6.ID="editor.contrib.contentHoverWidget",g6=a6([l6(1,$y)],g6);let p6=class extends Uo{constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=d6("div.hover-row.status-bar"),this.actionsElement=$C(this.hoverElement,d6("div.actions"))}get hasContent(){return this._hasContent}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),i=t?t.getLabel():null;return this._hasContent=!0,this._register(o2.render(this.actionsElement,e,i))}append(e){const t=$C(this.actionsElement,e);return this._hasContent=!0,t}};p6=a6([l6(0,kW)],p6);class m6{constructor(e,t){this._editor=e,this._participants=t,this._anchor=null,this._shouldFocus=!1}get anchor(){return this._anchor}set anchor(e){this._anchor=e}get shouldFocus(){return this._shouldFocus}set shouldFocus(e){this._shouldFocus=e}static _getLineDecorations(e,t){if(1!==t.type)return[];const i=e.getModel(),n=t.range.startLineNumber,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 pb.EMPTY;const i=m6._getLineDecorations(this._editor,t);return pb.merge(this._participants.map((n=>n.computeAsync?n.computeAsync(t,i,e):pb.EMPTY)))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=m6._getLineDecorations(this._editor,this._anchor);let t=[];for(const i of this._participants)t=t.concat(i.computeSync(this._anchor,e));return Sa(t)}}/*! @license DOMPurify 2.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.1/LICENSE */var f6=Object.hasOwnProperty,_6=Object.setPrototypeOf,v6=Object.isFrozen,b6=Object.getPrototypeOf,w6=Object.getOwnPropertyDescriptor,C6=Object.freeze,y6=Object.seal,x6=Object.create,S6="undefined"!=typeof Reflect&&Reflect,k6=S6.apply,D6=S6.construct;k6||(k6=function(e,t,i){return e.apply(t,i)}),C6||(C6=function(e){return e}),y6||(y6=function(e){return e}),D6||(D6=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(function(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t1?i-1:0),o=1;o/gm),t5=y6(/^data-[\-\w.\u00B7-\uFFFF]/),i5=y6(/^aria-[\-\w]+$/),n5=y6(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),o5=y6(/^(?:\w+script|data):/i),s5=y6(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),r5="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};function a5(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:l5(),i=function(t){return e(t)};if(i.version="2.3.1",i.removed=[],!t||!t.document||9!==t.document.nodeType)return i.isSupported=!1,i;var n=t.document,o=t.document,s=t.DocumentFragment,r=t.HTMLTemplateElement,a=t.Node,l=t.Element,d=t.NodeFilter,c=t.NamedNodeMap,h=void 0===c?t.NamedNodeMap||t.MozNamedAttrMap:c,u=t.Text,g=t.Comment,p=t.DOMParser,m=t.trustedTypes,f=l.prototype,_=z6(f,"cloneNode"),v=z6(f,"nextSibling"),b=z6(f,"childNodes"),w=z6(f,"parentNode");if("function"==typeof r){var C=o.createElement("template");C.content&&C.content.ownerDocument&&(o=C.content.ownerDocument)}var y=d5(m,n),x=y&&te?y.createHTML(""):"",S=o,k=S.implementation,D=S.createNodeIterator,L=S.createDocumentFragment,N=S.getElementsByTagName,E=n.importNode,I={};try{I=W6(o).documentMode?o.documentMode:{}}catch(Id){}var T={};i.isSupported="function"==typeof w&&k&&void 0!==k.createHTMLDocument&&9!==I;var M=J6,A=e5,O=t5,R=i5,P=o5,F=s5,B=n5,V=null,W=V6({},[].concat(a5(H6),a5(j6),a5(U6),a5(K6),a5(G6))),z=null,H=V6({},[].concat(a5(Z6),a5(Y6),a5(X6),a5(Q6))),j=null,U=null,$=!0,K=!0,q=!1,G=!1,Z=!1,Y=!1,X=!1,Q=!1,J=!1,ee=!0,te=!1,ie=!0,ne=!0,oe=!1,se={},re=null,ae=V6({},["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"]),le=null,de=V6({},["audio","video","img","source","image","track"]),ce=null,he=V6({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ue="http://www.w3.org/1998/Math/MathML",ge="http://www.w3.org/2000/svg",pe="http://www.w3.org/1999/xhtml",me=pe,fe=!1,_e=null,ve=o.createElement("form"),be=function(e){_e&&_e===e||(e&&"object"===(void 0===e?"undefined":r5(e))||(e={}),e=W6(e),V="ALLOWED_TAGS"in e?V6({},e.ALLOWED_TAGS):W,z="ALLOWED_ATTR"in e?V6({},e.ALLOWED_ATTR):H,ce="ADD_URI_SAFE_ATTR"in e?V6(W6(he),e.ADD_URI_SAFE_ATTR):he,le="ADD_DATA_URI_TAGS"in e?V6(W6(de),e.ADD_DATA_URI_TAGS):de,re="FORBID_CONTENTS"in e?V6({},e.FORBID_CONTENTS):ae,j="FORBID_TAGS"in e?V6({},e.FORBID_TAGS):{},U="FORBID_ATTR"in e?V6({},e.FORBID_ATTR):{},se="USE_PROFILES"in e&&e.USE_PROFILES,$=!1!==e.ALLOW_ARIA_ATTR,K=!1!==e.ALLOW_DATA_ATTR,q=e.ALLOW_UNKNOWN_PROTOCOLS||!1,G=e.SAFE_FOR_TEMPLATES||!1,Z=e.WHOLE_DOCUMENT||!1,Q=e.RETURN_DOM||!1,J=e.RETURN_DOM_FRAGMENT||!1,ee=!1!==e.RETURN_DOM_IMPORT,te=e.RETURN_TRUSTED_TYPE||!1,X=e.FORCE_BODY||!1,ie=!1!==e.SANITIZE_DOM,ne=!1!==e.KEEP_CONTENT,oe=e.IN_PLACE||!1,B=e.ALLOWED_URI_REGEXP||B,me=e.NAMESPACE||pe,G&&(K=!1),J&&(Q=!0),se&&(V=V6({},[].concat(a5(G6))),z=[],!0===se.html&&(V6(V,H6),V6(z,Z6)),!0===se.svg&&(V6(V,j6),V6(z,Y6),V6(z,Q6)),!0===se.svgFilters&&(V6(V,U6),V6(z,Y6),V6(z,Q6)),!0===se.mathMl&&(V6(V,K6),V6(z,X6),V6(z,Q6))),e.ADD_TAGS&&(V===W&&(V=W6(V)),V6(V,e.ADD_TAGS)),e.ADD_ATTR&&(z===H&&(z=W6(z)),V6(z,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&V6(ce,e.ADD_URI_SAFE_ATTR),e.FORBID_CONTENTS&&(re===ae&&(re=W6(re)),V6(re,e.FORBID_CONTENTS)),ne&&(V["#text"]=!0),Z&&V6(V,["html","head","body"]),V.table&&(V6(V,["tbody"]),delete j.tbody),C6&&C6(e),_e=e)},we=V6({},["mi","mo","mn","ms","mtext"]),Ce=V6({},["foreignobject","desc","title","annotation-xml"]),ye=V6({},j6);V6(ye,U6),V6(ye,$6);var xe=V6({},K6);V6(xe,q6);var Se=function(e){var t=w(e);t&&t.tagName||(t={namespaceURI:pe,tagName:"template"});var i=T6(e.tagName),n=T6(t.tagName);if(e.namespaceURI===ge)return t.namespaceURI===pe?"svg"===i:t.namespaceURI===ue?"svg"===i&&("annotation-xml"===n||we[n]):Boolean(ye[i]);if(e.namespaceURI===ue)return t.namespaceURI===pe?"math"===i:t.namespaceURI===ge?"math"===i&&Ce[n]:Boolean(xe[i]);if(e.namespaceURI===pe){if(t.namespaceURI===ge&&!Ce[n])return!1;if(t.namespaceURI===ue&&!we[n])return!1;var o=V6({},["title","style","font","a","script"]);return!xe[i]&&(o[i]||!ye[i])}return!1},ke=function(e){I6(i.removed,{element:e});try{e.parentNode.removeChild(e)}catch(Id){try{e.outerHTML=x}catch(Id){e.remove()}}},De=function(e,t){try{I6(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(Id){I6(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!z[e])if(Q||J)try{ke(t)}catch(Id){}else try{t.setAttribute(e,"")}catch(Id){}},Le=function(e){var t=void 0,i=void 0;if(X)e=""+e;else{var n=M6(e,/^[\r\n\t ]+/);i=n&&n[0]}var s=y?y.createHTML(e):e;if(me===pe)try{t=(new p).parseFromString(s,"text/html")}catch(Id){}if(!t||!t.documentElement){t=k.createDocument(me,"template",null);try{t.documentElement.innerHTML=fe?"":s}catch(Id){}}var r=t.body||t.documentElement;return e&&i&&r.insertBefore(o.createTextNode(i),r.childNodes[0]||null),me===pe?N.call(t,Z?"html":"body")[0]:Z?t.documentElement:r},Ne=function(e){return D.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT,null,!1)},Ee=function(e){return!(e instanceof u||e instanceof g)&&!("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)},Ie=function(e){return"object"===(void 0===a?"undefined":r5(a))?e instanceof a:e&&"object"===(void 0===e?"undefined":r5(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Te=function(e,t,n){T[e]&&N6(T[e],(function(e){e.call(i,t,n,_e)}))},Me=function(e){var t=void 0;if(Te("beforeSanitizeElements",e,null),Ee(e))return ke(e),!0;if(M6(e.nodeName,/[\u0080-\uFFFF]/))return ke(e),!0;var n=T6(e.nodeName);if(Te("uponSanitizeElement",e,{tagName:n,allowedTags:V}),!Ie(e.firstElementChild)&&(!Ie(e.content)||!Ie(e.content.firstElementChild))&&P6(/<[/\w]/g,e.innerHTML)&&P6(/<[/\w]/g,e.textContent))return ke(e),!0;if("select"===n&&P6(/