HEX
Server: Apache/2.4.63 (Unix)
System: Linux Synopilou92 4.4.302+ #72806 SMP Mon Jul 21 23:16:00 CST 2025 x86_64
User: pilou92 (1026)
PHP: 8.0.30
Disabled: NONE
Upload Files
File: /volume1/@appstore/ContainerManager/ui/MainVue.js
/*! For license information please see app.bundle.js.LICENSE.txt */
!function(){var e={4044:function(e,t,i){"use strict";var n={};i.r(n),i.d(n,{API_STATUS:function(){return ui},CAP_ALL:function(){return mi},CAP_CAN_ADD:function(){return pi},CAP_CAN_DROP:function(){return gi},COLORS:function(){return hi},CONTAINER_STATUS:function(){return oi},CONTAINER_STATUS_ORDER:function(){return ri},GET_WEBAPI_ERR_MESSAGE:function(){return Qt},GRAY_COLOR:function(){return ci},GRAY_COLOR_WITH_OPACITY:function(){return di},ICON_NAME:function(){return Ut},ICON_PROP:function(){return Kt},IMAGE_STATUS:function(){return si},PAGE_KEYS:function(){return ii},PAGE_VALUES:function(){return ni},PROJECT_STATUS:function(){return ai},PROJECT_STATUS_ORDER:function(){return li},PROTOCOL_OPTION:function(){return fi},WEBAPI_ERR_CODE:function(){return Xt},WEBAPI_ERR_CODE_TO_MESSAGE_MAP:function(){return Jt}});var o={};i.r(o),i.d(o,{BOM:function(){return Bs},DOCUMENT:function(){return Ws},FLOW_END:function(){return Vs},SCALAR:function(){return zs},createScalarToken:function(){return Ls},isCollection:function(){return js},isScalar:function(){return Hs},prettyToken:function(){return Us},resolveAsScalar:function(){return xs},setScalarValue:function(){return Es},stringify:function(){return Ts},tokenType:function(){return $s},visit:function(){return Ps}});var r={};i.r(r),i.d(r,{Alias:function(){return uo},CST:function(){return o},Composer:function(){return ks},Document:function(){return Xr},Lexer:function(){return Js},LineCounter:function(){return Qs},Pair:function(){return Ho},Parser:function(){return sa},Scalar:function(){return fo},Schema:function(){return Yr},YAMLError:function(){return Qr},YAMLMap:function(){return Yo},YAMLParseError:function(){return es},YAMLSeq:function(){return Xo},YAMLWarning:function(){return ts},isAlias:function(){return zn},isCollection:function(){return qn},isDocument:function(){return jn},isMap:function(){return Hn},isNode:function(){return Gn},isPair:function(){return Un},isScalar:function(){return $n},isSeq:function(){return Kn},parse:function(){return da},parseAllDocuments:function(){return la},parseDocument:function(){return ca},stringify:function(){return ha},visit:function(){return Qn},visitAsync:function(){return to}});var s={};i.r(s),i.d(s,{PixelRatio:function(){return cg},getZoomFactor:function(){return dg},isAndroid:function(){return vg},isChrome:function(){return pg},isElectron:function(){return _g},isFirefox:function(){return ug},isSafari:function(){return mg},isStandalone:function(){return bg},isWebKit:function(){return gg},isWebkitWebView:function(){return fg}});var a={};i.r(a),i.d(a,{CancellationTokenSource:function(){return IK},Emitter:function(){return TK},KeyCode:function(){return DK},KeyMod:function(){return AK},MarkerSeverity:function(){return FK},MarkerTag:function(){return BK},Position:function(){return OK},Range:function(){return MK},Selection:function(){return RK},SelectionDirection:function(){return PK},Token:function(){return VK},Uri:function(){return WK},editor:function(){return zK},languages:function(){return jK}});var l=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-app-instance",{attrs:{"class-name":"SYNO.SDS.ContainerManager.Application"},on:{openparamchanged:e.handleParams}},[i("v-page-list-app-window",{staticClass:"docker-package",style:e.styles,attrs:{"syno-id":"src-app-page-list-app-window-0","window-name":"SYNO.SDS.ContainerManager.Application.AppWindow","min-width":"1200","min-height":"580",height:"640",resizable:"","before-close":e.close,module:e.activePageOption,"help-params":e.helpParams},on:{resize:e.onResize},scopedSlots:e._u([{key:"module-options",fn:function(){return e._l(e.MODULES,(function(t){return i("v-module-list-option",{key:t.value,attrs:{value:t.value,display:t.display,icon:t.icon},nativeOn:{click:function(i){return e.onModuleClick(t.value)}},scopedSlots:e._u([e.notificationMap[t.value]>0?{key:"action",fn:function(){return[i("span",{staticClass:"docker-badge"},[e._v(e._s(e.notificationMap[t.value]))])]},proxy:!0}:null],null,!0)})}))},proxy:!0}])},[e._v(" "),i(e.activePageComponent,e._b({ref:"page",tag:"component",class:e.pageClasses,on:{"go-page":e.goPage,"set-page":e.setPage,"back-page":e.backPage}},"component",e.activePageParams,!1))],1)],1)};l._withStripped=!0;var c=i(8721),d=i.n(c),h=i(3560),u=i.n(h),g=Vuex,p=i.n(g),m=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"overview-page",style:e.styles},[i("div",{staticClass:"row row--first"},[i("div",{staticClass:"overview-panel overview-panel-infomation"},[i("div",{staticClass:"overview-panel-infomation-status"},[i("Icon",{class:e.summaryStatusIconClass,attrs:{name:e.summaryStatusIconName}}),e._v(" "),i("div",{staticClass:"overview-panel-infomation-status-text"},[i("div",{staticClass:"overview-panel-infomation-status-text-title"},[e._v("\n                        "+e._s(e.summaryStatusTitle)+"\n                    ")]),e._v(" "),i("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{content:e.summaryStatusDescription,overflowOnly:!0,isHtml:!0},expression:"{\n                            content: summaryStatusDescription,\n                            overflowOnly: true,\n                            isHtml: true\n                        }"}],staticClass:"overview-panel-infomation-status-text-description"},[e.progress.total>0?i("span",[e._v(e._s(e.progress.current)+" / "+e._s(e.progress.total))]):e._e(),e._v(" "),i("span",{domProps:{innerHTML:e._s(e.summaryStatusDescription)}})])])],1),e._v(" "),i("div",{staticClass:"overview-panel-infomation-rows"},[i("v-whitetip",{staticClass:"overview-panel-infomation-row",attrs:{size:"small","force-simple":"","tooltip-options":{disabled:e.projectsSummaryStatus===e.OVERVIEW_STATUS.EMPTY}},nativeOn:{click:function(t){return e.$emit("go-page",{page:e.PAGE_KEYS.PROJECT_LIST})}},scopedSlots:e._u([{key:"custom",fn:function(){return[i("Icon",{attrs:{name:e.ICON_NAME.PROJECT_24}}),e._v(" "),i("div",{staticClass:"overview-panel-infomation-row-text"},[e._v("\n                            "+e._s(e.projectRowText)+"\n                        ")])]},proxy:!0}])},[e._v(" "),i("div",{staticClass:"docker-package docker-status-tip-wrapper"},e._l(e.projects,(function(t){var n=t.id,o=t.name,r=t.status;return i("div",{key:o,staticClass:"docker-status-tip",on:{click:function(t){return e.$emit("go-page",{page:e.PAGE_KEYS.PROJECT_DETAIL,projectId:n})}}},[i("Dot",{attrs:{color:e.getProjectColorByStatus(r)}}),e._v(" "),i("span",{staticClass:"docker-status-tip-name link"},[e._v(e._s(o))])],1)})),0)]),e._v(" "),i("v-whitetip",{staticClass:"overview-panel-infomation-row",attrs:{size:"small","force-simple":"","tooltip-options":{disabled:e.containersSummaryStatus===e.OVERVIEW_STATUS.EMPTY}},nativeOn:{click:function(t){return e.$emit("go-page",{page:e.PAGE_KEYS.CONTAINER_LIST})}},scopedSlots:e._u([{key:"custom",fn:function(){return[i("Icon",{attrs:{name:e.ICON_NAME.CONTAINER_24}}),e._v(" "),i("div",{staticClass:"overview-panel-infomation-row-text"},[e._v("\n                            "+e._s(e.containerRowText)+"\n                        ")])]},proxy:!0}])},[e._v(" "),i("div",{staticClass:"docker-package docker-status-tip-wrapper"},e._l(e.containers,(function(t){var n=t.name,o=t.status,r=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&-1===t.indexOf(n)&&(i[n]=e[n]);return i}(t,["name","status"]);return i("div",{key:n,staticClass:"docker-status-tip",on:{click:function(t){return e.$emit("go-page",{page:e.PAGE_KEYS.CONTAINER_DETAIL,name:n})}}},[i("Dot",{attrs:{color:e.getContainerStatusColor(Object.assign({},{name:n,status:o},r))}}),e._v(" "),i("span",{staticClass:"docker-status-tip-name link"},[e._v(e._s(n))])],1)})),0)]),e._v(" "),e.migrate.containers.length>0?i("div",{staticClass:"overview-panel-infomation-row"},[i("Icon",{attrs:{name:e.ICON_NAME.WARNING_24}}),e._v(" "),i("div",{staticClass:"overview-panel-infomation-row-text"},[i("span",{domProps:{textContent:e._s(e._STRING_FORMAT(e._TT("overview","attention_required"),e.migrate.containers.length||0))}}),e._v(" "),i("span",{staticClass:"hyperlink",domProps:{textContent:e._s(e._TT("migrater","manage_btn"))},on:{click:e.openMigraterDialog}})])],1):e._e()],1)]),e._v(" "),i("div",{staticClass:"overview-panel overview-panel-image"},[i("div",{staticClass:"overview-panel-image-header"},[i("div",{staticClass:"overview-panel-image-header-title"},[e._v("\n                    "+e._s(e._TT("common","image"))+"\n                ")]),e._v(" "),i("div",{staticClass:"overview-panel-image-header-actions"},[i("Icon",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e._TT("overview","go_image"),expression:"_TT('overview', 'go_image')"}],staticClass:"overview-panel-image-header-action",attrs:{name:e.ICON_NAME.GO_TO_DETAILS},nativeOn:{click:function(t){return e.$emit("go-page",{page:e.PAGE_KEYS.IMAGE_LIST})}}})],1)]),e._v(" "),i("div",{staticClass:"overview-panel-image-count-row"},[i("span",{staticClass:"overview-panel-image-count",domProps:{textContent:e._s(e.count)}}),e._v(" "),i("span",{domProps:{textContent:e._s(e._TT("common","images"))}})]),e._v(" "),i("div",{staticClass:"overview-panel-image-size-row"},[i("span",{staticClass:"overview-panel-image-size-text",domProps:{textContent:e._s(e._TT("overview","images_total_size"))}}),e._v(" "),i("span",{staticClass:"overview-panel-image-size-value",domProps:{textContent:e._s(e.humanTotalSize)}}),e._v(" "),i("span",{staticClass:"overview-panel-image-size-unit",domProps:{textContent:e._s(e.humanTotalSizeUnit)}})]),e._v(" "),i("div",{staticClass:"overview-panel-image-divider"}),e._v(" "),i("div",{staticClass:"overview-panel-footer"},[e.updatableImageNames.length>0?[1===e.updatableImageNames.length?i("div",[e._v("\n                        "+e._s(e._TT("overview","a_image_updatable_desc"))+"\n                    ")]):i("div",[e._v("\n                        "+e._s(e._STRING_FORMAT(e._TT("overview","images_updatable_desc"),e.updatableImageNames.length))+"\n                    ")]),e._v(" "),i("div",{staticClass:"hyperlink",on:{click:function(t){return e.$emit("go-page",{page:e.PAGE_KEYS.IMAGE_LIST})}}},[e._v("\n                        "+e._s(e._TT("overview","check_detail"))+"\n                    ")])]:e.unusedImageNames.length>0?[1===e.unusedImageNames.length?i("div",[e._v("\n                        "+e._s(e._STRING_FORMAT(e._TT("overview","a_image_unused_desc"),e.humanUnusedSize+" "+e.humanUnusedSizeUnit))+"\n                    ")]):i("div",[e._v("\n                        "+e._s(e._STRING_FORMAT(e._TT("overview","images_unused_desc"),e.unusedImageNames.length,e.humanUnusedSize+" "+e.humanUnusedSizeUnit))+"\n                    ")]),e._v(" "),i("div",{staticClass:"hyperlink",on:{click:e.onImageCleanup}},[e._v("\n                        "+e._s(e._TT("image","clean_up"))+"\n                    ")])]:0===e.count?[i("div",[e._v("\n                        "+e._s(String.format(e._TT("overview","images_desc"),e.count))+"\n                    ")])]:[i("div",[e._v(e._s(e._TT("overview","all_images_used_desc")))])]],2)])]),e._v(" "),i("div",{staticClass:"row row--second"},[i("div",{staticClass:"overview-panel overview-panel-stats"},[i("div",{staticClass:"overview-panel-stats-header"},[i("div",{staticClass:"overview-panel-stats-header-title"},[e._v("\n                    "+e._s(e.stats.headerText)+"\n                ")]),e._v(" "),i("div",{staticClass:"overview-panel-stats-header-actions"},[e.resource===e.RESOURCE_KEY.NET?i("div",{staticClass:"overview-panel-stats-header-actions-legends"},e._l(e.NETWORK_LEGENDS,(function(t){var n=t.name,o=t.color;return i("div",{key:n,staticClass:"overview-panel-stats-header-actions-legend"},[i("Dot",{attrs:{color:o,size:8}}),e._v(" "),i("span",{domProps:{textContent:e._s(n)}})],1)})),0):e._e(),e._v(" "),i("v-button-group",{attrs:{"syno-id":"overview-overview-button-group-0"}},e._l(e.RESOURCES,(function(t,n){return i("v-button",{key:n,staticClass:"overview-panel-stats-header-button",attrs:{"syno-id":"detail-project-detail-stat-tab-button-"+n,active:e.resource===n},on:{click:function(t){e.resource=n}}},[e._v("\n                            "+e._s(t)+"\n                        ")])})),1)],1)]),e._v(" "),i("div",{staticClass:"overview-panel-stats-chart"},[e.resource===e.RESOURCE_KEY.CPU?i("OverviewCpuChart",{ref:"chart"}):e._e(),e._v(" "),e.resource===e.RESOURCE_KEY.RAM?i("OverviewRamChart",{ref:"chart",on:{"max-change":e.onMaxChange}}):e._e(),e._v(" "),e.resource===e.RESOURCE_KEY.NET?i("OverviewNetChart",{ref:"chart",on:{"max-change":e.onMaxChange}}):e._e()],1)])])])};m._withStripped=!0;var f=i(7361),_=i.n(f);function v(e,t){return window._T(e,t)||`${e}:${t}`}const b={};function w(e,t){return _()(b,[e,t])||window._TT("SYNO.SDS.ContainerManager.Application",e,t)||`${e}:${t}`}function y(e,t){return(_()({chs:{wizard:{config_brdige_headline:"配置桥接网络",config_brdige_description:"在 Container Manager 中设置专用子网以进行容器间通信。",config_bridge_note:"如果默认子网与网络上的其他设备发生冲突,请自定义子网设置。",err_invalid_subnet:"使用 CIDR 表示法输入有效的子网(例如,172.17.0.1/16)。",err_subnet_conflict:"此子网已在您的 _DISKSTATION_ 上使用。请选择其他子网。",default_subnet_desc:"(默认)"},common:{subnet:"子网",custom_subnet:"子网 ID",custom:"自定义"}},cht:{wizard:{config_brdige_headline:"設定橋接網路",config_brdige_description:"請為 Container Manager 設定專屬的子網路,用於不同容器之間的通訊。",config_bridge_note:"若預設子網路與您的網路中其他裝置衝突,請自訂子網路設定。",err_invalid_subnet:"請使用 CIDR 表示法來輸入有效的子網路,例如:172.17.0.1/16。",err_subnet_conflict:"此子網路已在您的 _DISKSTATION_ 中使用。請選擇其他子網路。",default_subnet_desc:"(預設)"},common:{subnet:"子網路",custom_subnet:"子網路 ID",custom:"自訂"}},csy:{wizard:{config_brdige_headline:"Konfigurace síťového mostu",config_brdige_description:"Nastavte vyhrazenou podsíť v Container Manager pro komunikaci mezi kontejnery.",config_bridge_note:"Přizpůsobte nastavení podsítě, pokud výchozí podsíť způsobuje konflikt s jinými zařízeními ve vaší síti.",err_invalid_subnet:"Zadejte platnou podsíť pomocí notace CIDR (např. 172.17.0.1/16).",err_subnet_conflict:"Tato podsíť je již používána na vašem _DISKSTATION_. Vyberte jinou podsíť.",default_subnet_desc:"(Výchozí)"},common:{subnet:"Podsíť",custom_subnet:"ID podsítě",custom:"Vlastní"}},dan:{wizard:{config_brdige_headline:"Konfigurer bro netværk",config_brdige_description:"Opsæt et dedikeret undernet i Container Manager til container-til-container kommunikation.",config_bridge_note:"Tilpas undernetsindstillingerne, hvis standardundernettet forårsager konflikter med andre enheder på dit netværk.",err_invalid_subnet:"Indtast et gyldigt undernet ved hjælp af CIDR-notation (f.eks. 172.17.0.1/16).",err_subnet_conflict:"Dette undernet er allerede i brug på din _DISKSTATION_. Vælg et andet undernet.",default_subnet_desc:"(Standard)"},common:{subnet:"Undernet",custom_subnet:"Undernet-ID",custom:"Tilpasset"}},enu:{wizard:{config_brdige_headline:"Configure bridge network",config_brdige_description:"Set up a dedicated subnet in Container Manager for container-to-container communication.",config_bridge_note:"Customize the subnet settings if the default subnet causes any conflict with other devices on your network.",err_invalid_subnet:"Enter a valid subnet using CIDR notation (e.g., 172.17.0.1/16).",err_subnet_conflict:"This subnet is already in use on your _DISKSTATION_. Choose another subnet.",default_subnet_desc:"(Default)"},common:{subnet:"Subnet",custom_subnet:"Subnet ID",custom:"Custom"}},fre:{wizard:{config_brdige_headline:"Configurer le réseau bridge",config_brdige_description:"Configurez un sous-réseau dédié dans Container Manager pour la communication entre conteneurs.",config_bridge_note:"Personnalisez les paramètres de sous-réseau si le sous-réseau par défaut provoque un conflit avec d'autres appareils sur votre réseau.",err_invalid_subnet:"Saisissez un sous-réseau valide en utilisant la notation CIDR (par ex., 172.17.0.1/16).",err_subnet_conflict:"Ce sous-réseau est déjà utilisé sur votre _DISKSTATION_. Choisissez un autre sous-réseau.",default_subnet_desc:"(Par défaut)"},common:{subnet:"Sous-réseau",custom_subnet:"ID de sous-réseau",custom:"Personnalisé"}},ger:{wizard:{config_brdige_headline:"Bridge-Netzwerk konfigurieren",config_brdige_description:"Richten Sie ein dediziertes Subnetz im Container Manager für die Kommunikation zwischen Containern ein.",config_bridge_note:"Passen Sie die Subnetzeinstellungen an, wenn das Standardsubnetz Konflikte mit anderen Geräten in Ihrem Netzwerk verursacht.",err_invalid_subnet:"Geben Sie ein gültiges Subnetz im CIDR-Format ein (z.B. 172.17.0.1/16).",err_subnet_conflict:"Dieses Subnetz wird bereits auf Ihrer _DISKSTATION_ verwendet. Wählen Sie ein anderes Subnetz.",default_subnet_desc:"(Standard)"},common:{subnet:"Subnetz",custom_subnet:"Subnetz-ID",custom:"Benutzerdefiniert"}},hun:{wizard:{config_brdige_headline:"Híd hálózat konfigurálása",config_brdige_description:"Állítson be egy dedikált alhálózatot a Container Manager-ben a konténer-konténer közötti kommunikációhoz.",config_bridge_note:"Testreszabhatja az alhálózati beállításokat, ha az alapértelmezett alhálózat ütközik a hálózatán lévő más eszközökkel.",err_invalid_subnet:"Adjon meg egy érvényes alhálózatot CIDR jelöléssel (pl. 172.17.0.1/16).",err_subnet_conflict:"Ez az alhálózat már használatban van a _DISKSTATION_ eszközön. Válasszon egy másik alhálózatot.",default_subnet_desc:"(Alapértelmezés)"},common:{subnet:"Alhálózat",custom_subnet:"Alhálózat ID",custom:"Egyedi"}},ita:{wizard:{config_brdige_headline:"Configura rete bridge",config_brdige_description:"Imposta una subnet dedicata in Container Manager per la comunicazione tra container.",config_bridge_note:"Personalizza le impostazioni della subnet se la subnet predefinita causa conflitti con altri dispositivi sulla tua rete.",err_invalid_subnet:"Inserire una subnet valida utilizzando la notazione CIDR (es., 172.17.0.1/16).",err_subnet_conflict:"Questa subnet è già in uso sul tuo _DISKSTATION_. Scegli un'altra subnet.",default_subnet_desc:"(Predefinito)"},common:{subnet:"Subnet",custom_subnet:"Subnet ID",custom:"Personalizzato"}},jpn:{wizard:{config_brdige_headline:"ブリッジネットワークを構成",config_brdige_description:"Container Manager でコンテナ間通信のための専用サブネットをセットアップします。",config_bridge_note:"デフォルトのサブネットがネットワーク上の他のデバイスと競合する場合は、サブネット設定をカスタマイズしてください。",err_invalid_subnet:"CIDR 表記(例:172.17.0.1/16)を使用して有効なサブネットを入力してください。",err_subnet_conflict:"このサブネットはあなたの _DISKSTATION_ で既に使用されています。別のサブネットを選択してください。",default_subnet_desc:"(デフォルト)"},common:{subnet:"サブネット",custom_subnet:"サブネット ID",custom:"カスタム"}},krn:{wizard:{config_brdige_headline:"브리지 네트워크 구성",config_brdige_description:"Container Manager에서 컨테이너 간 통신을 위한 전용 서브넷을 설정하십시오.",config_bridge_note:"기본 서브넷이 네트워크의 다른 장치와 충돌을 일으키는 경우 서브넷 설정을 사용자 지정하십시오.",err_invalid_subnet:"CIDR 표기법을 사용하여 유효한 서브넷을 입력하십시오(예: 172.17.0.1/16).",err_subnet_conflict:"이 서브넷은 _DISKSTATION_에서 이미 사용 중입니다. 다른 서브넷을 선택하십시오.",default_subnet_desc:"(기본값)"},common:{subnet:"서브넷",custom_subnet:"서브넷 ID",custom:"사용자 지정"}},nld:{wizard:{config_brdige_headline:"Brugnetwerk configureren",config_brdige_description:"Stel een toegewijd subnet in Container Manager in voor communicatie tussen containers.",config_bridge_note:"Pas de subnetinstellingen aan als het standaardsubnet conflicten veroorzaakt met andere apparaten op uw netwerk.",err_invalid_subnet:"Voer een geldig subnet in met behulp van CIDR-notatie (bijv. 172.17.0.1/16).",err_subnet_conflict:"Dit subnet wordt al gebruikt op uw _DISKSTATION_. Kies een ander subnet.",default_subnet_desc:"(Standaard)"},common:{subnet:"Subnet",custom_subnet:"Subnet-ID",custom:"Aangepast"}},nor:{wizard:{config_brdige_headline:"Konfigurer bro-nettverk",config_brdige_description:"Sett opp et dedikert delnett i Container Manager for kommunikasjon mellom containere.",config_bridge_note:"Tilpass delnettinnstillingene hvis standard delnett forårsaker konflikt med andre enheter på nettverket ditt.",err_invalid_subnet:"Angi et gyldig delnett ved bruk av CIDR-notasjon (f.eks., 172.17.0.1/16).",err_subnet_conflict:"Dette delnettet er allerede i bruk på din _DISKSTATION_. Velg et annet delnett.",default_subnet_desc:"(Standard)"},common:{subnet:"Delnett",custom_subnet:"Delnett-ID",custom:"Egendefinert"}},plk:{wizard:{config_brdige_headline:"Konfiguruj sieć mostkową",config_brdige_description:"Skonfiguruj dedykowaną podsieć w Container Manager do komunikacji między kontenerami.",config_bridge_note:"Dostosuj ustawienia podsieci, jeśli domyślna podsieć powoduje konflikt z innymi urządzeniami w sieci.",err_invalid_subnet:"Wprowadź poprawną podsieć używając notacji CIDR (np. 172.17.0.1/16).",err_subnet_conflict:"Ta podsieć jest już używana na twoim _DISKSTATION_. Wybierz inną podsieć.",default_subnet_desc:"(Domyślna)"},common:{subnet:"Podsieć",custom_subnet:"Identyfikator podsieci",custom:"Niestandardowy"}},ptb:{wizard:{config_brdige_headline:"Configurar rede bridge",config_brdige_description:"Configure uma sub-rede dedicada no Container Manager para comunicação entre contêineres.",config_bridge_note:"Personalize as configurações de sub-rede se a sub-rede padrão causar algum conflito com outros dispositivos na sua rede.",err_invalid_subnet:"Insira uma sub-rede válida usando a notação CIDR (por exemplo, 172.17.0.1/16).",err_subnet_conflict:"Esta sub-rede já está em uso no seu _DISKSTATION_. Escolha outra sub-rede.",default_subnet_desc:"(Padrão)"},common:{subnet:"Sub rede",custom_subnet:"ID da sub-rede",custom:"Personalizado"}},ptg:{wizard:{config_brdige_headline:"Configurar rede bridge",config_brdige_description:"Configurar uma sub-rede dedicada no Container Manager para comunicação entre contentores.",config_bridge_note:"Personalize as definições de sub-rede se a sub-rede predefinida causar algum conflito com outros dispositivos na sua rede.",err_invalid_subnet:"Introduza uma sub-rede válida utilizando a notação CIDR (por exemplo, 172.17.0.1/16).",err_subnet_conflict:"Esta sub-rede já está a ser utilizada no seu _DISKSTATION_. Escolha outra sub-rede.",default_subnet_desc:"(Predefinido)"},common:{subnet:"Sub-rede",custom_subnet:"ID da sub-rede",custom:"Personalizar"}},rus:{wizard:{config_brdige_headline:"Настройка мостовой сети",config_brdige_description:"Настройте выделенную подсеть в Container Manager для связи между контейнерами.",config_bridge_note:"Настройте параметры подсети, если подсеть по умолчанию вызывает конфликт с другими устройствами в вашей сети.",err_invalid_subnet:"Введите действительную подсеть, используя нотацию CIDR (например, 172.17.0.1/16).",err_subnet_conflict:"Эта подсеть уже используется на вашем _DISKSTATION_. Выберите другую подсеть.",default_subnet_desc:"(По умолчанию)"},common:{subnet:"Подсеть",custom_subnet:"ID подсети",custom:"Пользовательский"}},spn:{wizard:{config_brdige_headline:"Configurar red de puente",config_brdige_description:"Configure una subred dedicada en Container Manager para la comunicación entre contenedores.",config_bridge_note:"Personalice la configuración de la subred si la subred predeterminada causa algún conflicto con otros dispositivos en su red.",err_invalid_subnet:"Introduzca una subred válida utilizando la notación CIDR (por ejemplo, 172.17.0.1/16).",err_subnet_conflict:"Esta subred ya está en uso en su _DISKSTATION_. Elija otra subred.",default_subnet_desc:"(Predeterminado)"},common:{subnet:"Subred",custom_subnet:"ID de subred",custom:"Personalizado"}},sve:{wizard:{config_brdige_headline:"Konfigurera bryggnätverk",config_brdige_description:"Ställ in ett dedikerat subnät i Container Manager för kommunikation mellan containrar.",config_bridge_note:"Anpassa subnätinställningarna om standardsubnätet orsakar någon konflikt med andra enheter i ditt nätverk.",err_invalid_subnet:"Ange ett giltigt subnät med CIDR-notation (t.ex. 172.17.0.1/16).",err_subnet_conflict:"Det här subnätet används redan på din _DISKSTATION_. Välj ett annat subnät.",default_subnet_desc:"(Standard)"},common:{subnet:"Subnät",custom_subnet:"Subnät-ID",custom:"Anpassa"}},tha:{wizard:{config_brdige_headline:"กำหนดค่าเครือข่ายบริดจ์",config_brdige_description:"ตั้งค่าเครือข่ายย่อยเฉพาะใน Container Manager สำหรับการสื่อสารระหว่างคอนเทนเนอร์",config_bridge_note:"ปรับแต่งการตั้งค่าซับเน็ตหากซับเน็ตค่าเริ่มต้นทำให้เกิดความขัดแย้งกับอุปกรณ์อื่นในเครือข่ายของคุณ",err_invalid_subnet:"ป้อนซับเน็ตที่ถูกต้องโดยใช้รูปแบบ CIDR (เช่น 172.17.0.1/16)",err_subnet_conflict:"ซับเน็ตนี้ถูกใช้งานอยู่บน _DISKSTATION_ ของคุณ เลือกซับเน็ตอื่น",default_subnet_desc:"(ค่าเริ่มต้น)"},common:{subnet:"ซับเน็ต",custom_subnet:"ซับเน็ต ID",custom:"กำหนดเอง"}},trk:{wizard:{config_brdige_headline:"Köprü ağını yapılandır",config_brdige_description:"Container Manager'da konteynerden konteynere iletişim için özel bir alt ağ kurun.",config_bridge_note:"Varsayılan alt ağ, ağınızdaki diğer cihazlarla herhangi bir çakışmaya neden oluyorsa alt ağ ayarlarını özelleştirin.",err_invalid_subnet:"CIDR notasyonu kullanarak geçerli bir alt ağ girin (ör. 172.17.0.1/16).",err_subnet_conflict:"Bu alt ağ, _DISKSTATION_ sisteminizde zaten kullanılıyor. Başka bir alt ağ seçin.",default_subnet_desc:"(Varsayılan)"},common:{subnet:"Alt ağ",custom_subnet:"Alt ağ ID",custom:"Özel"}}},[_S("lang")||"enu",e,t])||`${e}:${t}`).replace("_DISKSTATION_",_D("product")).replace("%DISKSTATION%",_D("product")).replace("_OSNAME_",_D("os_name")).replace("%OSNAME%",_D("os_name"))}const C=["B","KB","MB","GB","TB","PB"];function S(e=0,{si:t=!1,toFixed:i=0}={}){const n=t?1e3:1024,o=Math.pow(10,i);let r,s;for(r=0;r<C.length&&(s=Math.pow(n,r),!(e<s*n));r++);return{value:(Math.round(e*o/s)/o).toFixed(i),level:r,unit:C[r]}}function k(e=0){let{value:t,level:i,unit:n}=S(e,{toFixed:2});return i<C.indexOf("GB")&&(t=Math.round(t)),`${t} ${n}`}function x(e=0){const{value:t}=S(e,{toFixed:1});return t}function L(e=0){const{level:t}=S(e);return t}function E(e=0){const{unit:t}=S(e);return t}async function N(e=0){return await new Promise((t=>setTimeout(t,e)))}function I(e,t,i){/(((^https?)|(^ftp)):\/\/([-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-.?\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i.test(t)&&i(),i(new Error(_JSLIBSTR("extlang","urlText")))}function T(e,t,i){const n=w("error","registry_mirror_error_tip");let o;try{o=new URL(t)}catch(n){return SYNO.Debug.error(n),void i(new Error(n))}!["http:","https:"].includes(o.protocol)||""!==o.pathname&&"/"!==o.pathname||""!==o.search||t.includes("?")||""!==o.username||""!==o.password||t.includes("@")?i(new Error(n)):i()}function D(e=""){let t,i,n,o,r,s=e,a=-1;if((a=s.indexOf("|"))>-1&&(r=s.slice(a+1),s=s.slice(0,a)),(a=s.indexOf("/"))>-1){const e=s.slice(0,a);e.includes(".")||e.includes(":")?(t=e,s=s.slice(a+1)):t=""}return(a=s.indexOf("@"))>-1&&(o=s.slice(a+1),s=s.slice(0,a)),(a=s.indexOf(":"))>-1?(i=s.slice(0,a),n=s.slice(a+1)):(i=s,n=""),n=n||"latest",{registry:t,repository:i,tag:n,id:r,digest:o}}function A(e=""){const{registry:t,repository:i,tag:n,id:o}=D(e);let r=`${i}:${n}`;return t&&"docker.io"!==t&&"index.docker.io"!==t&&(r=t+"/"+r),o&&(r=r+"|"+o),r}function O(e=""){const{registry:t,repository:i,tag:n}=D(e);let o=`${i}:${n}`;return t&&(o=t+"/"+o),o}var M=function(){var e=this,t=e.$createElement;return(e._self._c||t)("Chart",{ref:"chart",staticClass:"overview-stats-chart",attrs:{"x-axis-max":e.xAxisMax,"y-axis-min":e.yAxisMin,"y-axis-max":e.yAxisMax,"y-axis-label-formatter":e.yAxisLabelFormatter,series:e.series,value:e.value,"value-formatter":e.valueFormatter}})};M._withStripped=!0;var R=function(){var e=this.$createElement;return(this._self._c||e)("div",{ref:"chart",staticClass:"docker-package"})};R._withStripped=!0;var P=i(2492),F=i.n(P),B=i(5905),W=i.n(B);const V={type:"line",showSymbol:!1,symbol:"circle",symbolSize:0};var z={props:{totalTime:{type:Number,default:6e5},xAxisMax:{type:Number},yAxisMax:{type:Number},yAxisMin:{type:Number},series:{type:Array,default:[]},yAxisLabelFormatter:{type:Function,default:e=>e},value:{type:Array,default:[]},valueFormatter:{type:Function,default:e=>e},options:{type:Object}},computed:{xAxisMin(){if(this.xAxisMax&&this.totalTime)return this.xAxisMax-this.totalTime},seriesWithBase(){return this.series.map((e=>({...V,...e})))},seriesWithData(){return W()(this.seriesWithBase,this.value,((e,t)=>({...e,data:t})))}},watch:{value:{deep:!0,handler(e){this.chart.setOption({series:e.map((e=>({data:e})))})}},series:{deep:!0,handler(e){this.chart.setOption({series:e})}},xAxisMax(){this.chart.setOption({xAxis:{min:this.xAxisMin,max:this.xAxisMax}})},xAxisMin(){this.chart.setOption({xAxis:{min:this.xAxisMin,max:this.xAxisMax}})},yAxisMax(){this.chart.setOption({yAxis:{min:this.yAxisMin,max:this.yAxisMax}})},yAxisMin(){this.chart.setOption({yAxis:{min:this.yAxisMin,max:this.yAxisMax}})}},async mounted(){await this.$nextTick(),this.chart=await this.initialize(),this.$emit("initialized")},methods:{async initialize(){const e=echarts.init(this.$refs.chart),t=echarts.syno.getDefaultOptions();return e.setOption(F()(t,{textStyle:{color:"#414B55",fontFamily:"Verdana, Microsoft JhengHei, sans-serif",fontSize:13,lineHeight:26},tooltip:{axisPointer:{lineStyle:{color:"rgba(198, 212, 224, 0.9)",width:1}},backgroundColor:"#FFFFFF",padding:[5,11],extraCssText:["border-color: rgba(198, 212, 224, 0.5)","border-radius: 4px","box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.1)"].join("; "),confine:!0,formatter:this.formatter},legend:{show:!1},grid:{left:50,top:12,bottom:18,right:1},xAxis:{axisLabel:!1,min:this.xAxisMin,max:this.xAxisMax},yAxis:{min:this.yAxisMin,max:this.yAxisMax,axisLabel:{formatter:this.yAxisLabelFormatter}},series:this.seriesWithData},this.options)),e},dispatchAction(...e){return this.chart.dispatchAction(...e)},resize(){this.chart.resize()},formatter(e=[]){return`\n                <div class="docker-chart-tooltip">\n                    ${this.formatterLabel(e)}\n                    ${this.formatterContent(e)}\n                </div>\n            `},formatterLabel(e=[]){const{axisValue:t}=e.find((({axisValue:e})=>e));return`\n                <div class="docker-chart-tooltip-label">\n                    ${SYNO.SDS.DateTimeFormatter(new Date(t),{type:"datetimesec"})}\n                </div>\n            `},formatterContent(e=[]){return`\n                <div class="docker-chart-tooltip-content">\n                    ${e.map((e=>this.formatterRow(e))).join("")}\n                </div>\n            `},formatterRow({color:e,seriesName:t,value:[i,n]}){return`\n                <div\n                    style="--color: ${e}"\n                    class="docker-chart-tooltip-content-row ${t===w("common","total")?"docker-chart-tooltip-content-row--total":""}"\n                >\n                    <div class="docker-chart-tooltip-content-row-name">${t}</div>\n                    <div class="docker-chart-tooltip-content-row-value">${this.valueFormatter(n)}</div>\n                </div>\n            `}}};function j(e,t,i,n,o,r,s,a){var l,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=i,c._compiled=!0),n&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),s?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},c._ssrRegister=l):o&&(l=a?function(){o.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:o),l)if(c.functional){c._injectStyles=l;var d=c.render;c.render=function(e,t){return l.call(t),d(e,t)}}else{var h=c.beforeCreate;c.beforeCreate=h?[].concat(h,l):[l]}return{exports:e,options:c}}i(7901);var H=j(z,R,[],!1,null,null,null);H.options.__file="src/components/Chart/Chart.vue";var U=H.exports,$={components:{Chart:U},computed:{...(0,g.mapGetters)("containers",["totalHistoryOfStats","lastStatsTime"]),isChartEmpty(){return 0===this.totalHistoryOfStats.length},xAxisMax(){return this.lastStatsTime}},watch:{max:{immediate:!0,handler(){this.$emit("max-change",this.max)}}}},K=(i(9105),j($,M,[],!1,null,null,null));K.options.__file="src/pages/Overview/Charts/OverviewBaseChart.vue";var q=K.exports,G={computed:{title:()=>w("project","total_cpu_usage"),series:()=>[{name:"CPU",color:"#2693FF",lineStyle:{color:"#2693FF",width:2},areaStyle:{color:"#2693FF",opacity:.15}}],yAxisMax(){return this.isChartEmpty?100:void 0},yAxisMin(){return this.isChartEmpty?0:void 0}},methods:{valueFormatter:e=>`${e.toFixed(2)}%`,yAxisLabelFormatter:e=>e>10||0===e?`${e}%`:`${e.toFixed(2)}%`}},Y=j({extends:q,mixins:[G],computed:{value(){return[this.totalHistoryOfStats.map((({time:e,cpu:t})=>[e,t]))]}}},void 0,void 0,!1,null,null,null);Y.options.__file="src/pages/Overview/Charts/OverviewCpuChart.vue";var Z=Y.exports,X={computed:{title:()=>w("overview","ram_usage"),series:()=>[{name:w("common","memory"),color:"#EB5E81",lineStyle:{color:"#EB5E81",width:2},areaStyle:{color:"#EB5E81",opacity:.15}}],yAxisMax(){return this.isChartEmpty?1024:void 0},yAxisMin(){return this.isChartEmpty?0:void 0},sizeBase(){return Math.pow(1024,this.sizeLevel)},sizeLevel(){return L(this.max)},max(){return this.value[0].map((([e,t])=>t)).reduce(((e,t)=>Math.max(e,t)),0)}},methods:{valueFormatter:e=>k(e),yAxisLabelFormatter(e){return Math.floor(e/this.sizeBase)}}},J=j({extends:q,mixins:[X],computed:{value(){return[this.totalHistoryOfStats.map((({time:e,ram:t})=>[e,t]))]}}},void 0,void 0,!1,null,null,null);J.options.__file="src/pages/Overview/Charts/OverviewRamChart.vue";var Q=J.exports,ee={computed:{title(){return`${w("common","network_usage")} (${C[this.sizeLevel]})`},series:()=>[{name:w("common","sent"),color:"#FAAF00",lineStyle:{color:"#FAAF00",width:2},areaStyle:{color:"#FAAF00",opacity:.15}},{name:w("common","received"),color:"#26BFBF",lineStyle:{color:"#26BFBF",width:2},areaStyle:{color:"#26BFBF",opacity:.15}}],max(){return this.value.map((e=>e.map((([e,t])=>t)).reduce(((e,t)=>Math.max(e,t)),0))).reduce(((e,t)=>Math.max(e,t)),0)},yAxisMax(){return this.isChartEmpty?1024:void 0},yAxisMin(){return this.isChartEmpty?0:void 0},sizeBase(){return Math.pow(1024,this.sizeLevel)},sizeLevel(){return L(this.max)}},methods:{valueFormatter:e=>k(e),yAxisLabelFormatter(e){return Math.floor(e/this.sizeBase)}}},te=j({extends:q,mixins:[ee],computed:{value(){return[this.totalHistoryOfStats.map((({time:e,upload:t})=>[e,t])),this.totalHistoryOfStats.map((({time:e,download:t})=>[e,t]))]}}},void 0,void 0,!1,null,null,null);te.options.__file="src/pages/Overview/Charts/OverviewNetChart.vue";var ie=te.exports,ne=function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",{class:e.classes,style:e.styles})};ne._withStripped=!0;var oe={props:{color:{type:String,default:"#ADB1B5"},type:{type:String,default:"normal",validator:e=>["normal","bordered","loading"].includes(e)},size:{type:Number,default:10}},computed:{styles(){const e=["blue","green","orange","red"].includes(this.color)?"":this.color;return{"--size":`${this.size}px`,"--color":e}},classes(){return{"docker-package":!0,dot:!0,[this.type]:!0,[this.color]:["blue","green","orange","red"].includes(this.color)}}}},re=(i(1945),j(oe,ne,[],!1,null,null,null));re.options.__file="src/components/Dot/Dot.vue";var se=re.exports,ae=function(){var e=this,t=e.$createElement;return(e._self._c||t)("v-icon",e._b({class:e.classes},"v-icon",e.icon,!1))};ae._withStripped=!0;var le=i(4486),ce=i.n(le),de=i(7523),he=i.n(de),ue=i(6604),ge=i.n(ue),pe=function(e,t){var i=t._c;return i("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",width:t.props.width,height:t.props.height}},[i("path",{attrs:{"fill-rule":"evenodd",d:"M15.25,4 C15.6642136,4 16,4.33578644 16,4.75 L16,9.25 C16,9.66421356 15.6642136,10 15.25,10 C14.8357864,10 14.5,9.66421356 14.5,9.25 L14.4993301,6.56 L9.06066017,12.0001546 C8.76776695,12.2930478 8.29289322,12.2930478 8,12.0001546 C7.73373344,11.733888 7.70952739,11.3172243 7.92738185,11.0236128 L8,10.9394944 L13.4393301,5.5 L10.75,5.50015456 C10.3357864,5.50015456 10,5.16436812 10,4.75015456 C10,4.33594099 10.3357864,4.00015456 10.75,4.00015456 L15.25,4 Z M4.75,16 C4.33578644,16 4,15.6642136 4,15.25 L4,5.75 C4,5.33578644 4.33578644,5 4.75,5 L7.75,5 C8.16421356,5 8.5,5.33578644 8.5,5.75 C8.5,6.16421356 8.16421356,6.5 7.75,6.5 L5.5,6.5 L5.5,14.5 L13.5,14.5 L13.5,12.2501546 C13.5,11.835941 13.8357864,11.5001546 14.25,11.5001546 C14.6642136,11.5001546 15,11.835941 15,12.2501546 L15,15.2501546 C15,15.3537079 14.9790133,15.4523596 14.9410613,15.5420884 L14.897603,15.6285394 C14.7837001,15.8229838 14.5847277,15.96155 14.3517706,15.9931534 L14.25,16.0001546 L4.75,16 Z"}})])};pe._withStripped=!0;var me=j({name:"vIconActionGoTo",props:{width:{type:[Number,String],default:20},height:{type:[Number,String],default:20}}},pe,[],!0,null,null,null);me.options.__file="images/default/svg/action_go_to.svg";var fe=me.exports,_e=function(e,t){var i=t._c;return i("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",width:t.props.width,height:t.props.height}},[i("path",{attrs:{"fill-rule":"evenodd",d:"M16,4 C16.5522847,4 17,4.44771525 17,5 L17,15 C17,15.5522847 16.5522847,16 16,16 L4,16 C3.44771525,16 3,15.5522847 3,15 L3,5 C3,4.44771525 3.44771525,4 4,4 L16,4 Z M15.5,5.5 L4.5,5.5 L4.5,14.5 L15.5,14.5 L15.5,5.5 Z M6.81929865,7.3212513 L6.91602515,7.37596228 L9.29198743,8.95993713 C9.42930279,9.0514807 9.54713148,9.1693094 9.63867505,9.30662475 C9.99608625,9.84274156 9.88470212,10.5545404 9.4012451,10.958409 L9.29198743,11.0400629 L6.91602515,12.6240377 C6.57137863,12.8538021 6.10572662,12.7606717 5.87596228,12.4160251 C5.6670856,12.1027101 5.72506409,11.6893906 5.99626991,11.4442056 L6.08397485,11.3759623 L8.146,10 L6.08397485,8.62403772 C5.77065984,8.41516104 5.66520938,8.01133589 5.8212513,7.68070135 L5.87596228,7.58397485 C6.08483896,7.27065984 6.48866411,7.16520938 6.81929865,7.3212513 Z M13.5,11 C13.7761424,11 14,11.2238576 14,11.5 L14,12 C14,12.2761424 13.7761424,12.5 13.5,12.5 L11.5,12.5 C11.2238576,12.5 11,12.2761424 11,12 L11,11.5 C11,11.2238576 11.2238576,11 11.5,11 L13.5,11 Z"}})])};_e._withStripped=!0;var ve=j({name:"vIconActionConsole",props:{width:{type:[Number,String],default:20},height:{type:[Number,String],default:20}}},_e,[],!0,null,null,null);ve.options.__file="images/default/svg/action_console.svg";var be=ve.exports,we=function(e,t){var i=t._c;return i("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",fill:"currentColor",width:t.props.width,height:t.props.height}},[i("g",{attrs:{fill:"none","fill-rule":"evenodd"}},[i("circle",{attrs:{cx:"24",cy:"24",r:"24",fill:"#E64040"}}),i("path",{attrs:{fill:"#FFF",d:"M24,34 C25.1045695,34 26,34.8954305 26,36 C26,37.1045695 25.1045695,38 24,38 C22.8954305,38 22,37.1045695 22,36 C22,34.8954305 22.8954305,34 24,34 Z M24,10 C25.1045695,10 26,10.8954305 26,12 L26,29 C26,30.1045695 25.1045695,31 24,31 C22.8954305,31 22,30.1045695 22,29 L22,12 C22,10.8954305 22.8954305,10 24,10 Z"}})])])};we._withStripped=!0;var ye=j({name:"vIconStatusError",props:{width:{type:[Number,String],default:48},height:{type:[Number,String],default:48}}},we,[],!0,null,null,null);ye.options.__file="images/default/svg/status_error.svg";var Ce=ye.exports,Se=function(e,t){var i=t._c;return i("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",fill:"currentColor",width:t.props.width,height:t.props.height}},[i("g",{attrs:{fill:"none","fill-rule":"evenodd"}},[i("circle",{attrs:{cx:"24",cy:"24",r:"24",fill:"#F58414"}}),i("path",{attrs:{fill:"#FFF",d:"M24,34 C25.1045695,34 26,34.8954305 26,36 C26,37.1045695 25.1045695,38 24,38 C22.8954305,38 22,37.1045695 22,36 C22,34.8954305 22.8954305,34 24,34 Z M24,10 C25.1045695,10 26,10.8954305 26,12 L26,29 C26,30.1045695 25.1045695,31 24,31 C22.8954305,31 22,30.1045695 22,29 L22,12 C22,10.8954305 22.8954305,10 24,10 Z"}})])])};Se._withStripped=!0;var ke=j({name:"vIconStatusWarning",props:{width:{type:[Number,String],default:48},height:{type:[Number,String],default:48}}},Se,[],!0,null,null,null);ke.options.__file="images/default/svg/status_warning.svg";var xe=ke.exports,Le=function(e,t){var i=t._c;return i("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",fill:"currentColor",width:t.props.width,height:t.props.height}},[i("g",{attrs:{fill:"none","fill-rule":"evenodd"}},[i("circle",{attrs:{cx:"24",cy:"24",r:"24",fill:"#057FEB"}}),i("path",{attrs:{fill:"#FFF",d:"M26,28.546719 C26,27.9944343 26.4477153,27.546719 27,27.546719 C27.2651403,27.546719 27.5194277,27.6520155 27.7069514,27.8394569 L29.5905167,29.7224276 C31.0771663,28.2698363 32,26.2426878 32,24 C32,20.2724501 29.4506308,17.1403373 26.0003581,16.2521271 L26.0008092,12.1660527 C31.6758377,13.1185422 36,18.05429 36,24 C36,27.3468456 34.629857,30.3736771 32.4198862,32.5501795 L34.1492904,34.2789652 C34.5399005,34.6694037 34.5400396,35.3025686 34.1496012,35.6931787 C33.9620522,35.8808102 33.7076317,35.9862273 33.442339,35.9862273 L27,35.9862273 C26.7628255,35.9862273 26.5449357,35.9036593 26.3735073,35.7656998 C26.2498664,35.7901081 26.1256647,35.8129917 26.0008092,35.8339473 L26,28.546719 Z M21.0042137,12 C21.2476424,12 21.4707557,12.0869799 21.6441703,12.2315563 C21.7618137,12.2077393 21.8807011,12.1859295 22.0001873,12.1658855 L22.0020184,12.933206 C22.0034742,12.9552826 22.0042137,12.9775549 22.0042137,13 L22.0042137,19.4430895 C22.0042137,19.9953742 21.5564985,20.4430895 21.0042137,20.4430895 C20.7389972,20.4430895 20.4846433,20.3377326 20.2971069,20.1501962 L18.4165636,18.2706628 C16.9257643,19.7237318 16,21.753754 16,24 C16,27.7279108 18.5498628,30.8602692 22.000644,31.7481308 L22.0001873,35.8341145 C16.3246685,34.8820355 12,29.946058 12,24 C12,20.649076 13.3734843,17.6189465 15.5881967,15.4418675 L13.8540175,13.7071068 C13.4634932,13.3165825 13.4634932,12.6834175 13.8540175,12.2928932 C14.0415538,12.1053568 14.2959078,12 14.5611242,12 L21.0042137,12 Z",transform:"rotate(90 24 23.993)"}})])])};Le._withStripped=!0;var Ee=j({name:"vIconStatusProcess",props:{width:{type:[Number,String],default:48},height:{type:[Number,String],default:48}}},Le,[],!0,null,null,null);Ee.options.__file="images/default/svg/status_process.svg";var Ne=Ee.exports,Ie=function(e,t){var i=t._c;return i("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 48 48",fill:"currentColor",width:t.props.width,height:t.props.height}},[i("defs",[i("circle",{attrs:{id:"092b29c77a3918d6bbd094f43cc06c36__a",cx:"24",cy:"24",r:"24"}})]),i("g",{attrs:{fill:"none","fill-rule":"evenodd"}},[i("use",{attrs:{"xlink:href":"#092b29c77a3918d6bbd094f43cc06c36__a",fill:"#14B41A"}}),i("path",{attrs:{fill:"#FFF",d:"M33.07007,15.5626825 L21.6312354,26.5345884 C21.2443533,26.905678 20.6336695,26.905678 20.2467875,26.5345884 L15.9242446,22.38849 C15.1505256,21.6463539 13.9292441,21.6463046 13.1554653,22.3883782 L12.6035003,22.9177266 C11.8062899,23.6822718 11.7798094,24.9483248 12.5443545,25.7455353 C12.563605,25.7656083 12.5832722,25.7852776 12.6033431,25.8045303 L19.5545392,32.472358 C20.3283072,33.2145831 21.5497226,33.2145903 22.3234994,32.4723744 L36.3909365,18.9787222 C37.1880727,18.2140996 37.2144303,16.948044 36.4498078,16.1509078 C36.4305498,16.1308309 36.4108751,16.1111581 36.3907964,16.0919021 L35.8388493,15.5625708 C35.0650704,14.8204972 33.8437889,14.8205465 33.07007,15.5626825 Z"}})])])};Ie._withStripped=!0;var Te=j({name:"vIconStatusSuccess",props:{width:{type:[Number,String],default:48},height:{type:[Number,String],default:48}}},Ie,[],!0,null,null,null);Te.options.__file="images/default/svg/status_success.svg";var De=Te.exports,Ae=function(e,t){var i=t._c;return i("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 120 120",fill:"currentColor",width:t.props.width,height:t.props.height}},[i("g",{attrs:{fill:"none","fill-rule":"evenodd"}},[i("circle",{attrs:{cx:"60",cy:"60",r:"60",fill:"#C6D4E0","fill-opacity":".4"}}),i("circle",{attrs:{cx:"67",cy:"47",r:"4",fill:"#FFF"}}),i("circle",{attrs:{cx:"53",cy:"70",r:"4",fill:"#FFF"}}),i("circle",{attrs:{cx:"81",cy:"60",r:"4",fill:"#FFF"}}),i("circle",{attrs:{cx:"39",cy:"60",r:"4",fill:"#FFF"}}),i("path",{attrs:{fill:"#FFF",d:"M92,29 C93.6568542,29 95,30.3431458 95,32 L95,88 C95,89.6568542 93.6568542,91 92,91 L28,91 C26.3431458,91 25,89.6568542 25,88 L25,32 C25,30.3431458 26.3431458,29 28,29 L92,29 Z M89,35 L31,35 L31,85 L89,85 L89,56.686 L81.8053132,61.2654922 C81.2707857,61.6056461 80.5856223,61.5710188 80.0901427,61.1926051 L79.9793234,61.0991902 L67.325,49.349 L54.2812978,70.7799204 C53.8546751,71.4808007 52.9522168,71.7015962 52.2560833,71.3026911 L52.1281427,71.2206002 L38.1281427,61.2206002 C37.4540238,60.7390867 37.2978863,59.8022616 37.7793998,59.1281427 C38.232589,58.4936779 39.0890992,58.3180478 39.7503142,58.7010217 L39.8718573,58.7793998 L52.558,67.841 L65.7187022,46.2200796 C66.1862295,45.4519989 67.209718,45.2730348 67.9075397,45.8054637 L68.0206766,45.9008098 L81.171,58.112 L89,53.13 L89,35 Z"}})])])};Ae._withStripped=!0;var Oe=j({name:"vIconEmptyState",props:{width:{type:[Number,String],default:120},height:{type:[Number,String],default:120}}},Ae,[],!0,null,null,null);Oe.options.__file="images/default/svg/empty_state.svg";var Me=Oe.exports,Re=function(e,t){var i=t._c;return i("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 120 120",fill:"currentColor",width:t.props.width,height:t.props.height}},[i("g",{attrs:{fill:"none","fill-rule":"evenodd"}},[i("circle",{attrs:{cx:"60",cy:"60",r:"60",fill:"#C6D4E0","fill-opacity":".4"}}),i("path",{attrs:{fill:"#FFF","fill-rule":"nonzero",d:"M85.914,61.6236625 L88.9922197,63.7226172 C91.5720087,65.4815642 92.2374325,68.9988046 90.4784855,71.5785935 C90.1372038,72.07914 89.7180659,72.52103 89.2375288,72.8878066 L88.9922197,73.0648593 L62.9155882,90.8443808 C61.0655413,92.1057764 58.6534566,92.1524948 56.7617773,90.9845359 L56.5458777,90.8443808 L30.4692461,73.0648593 C27.8894572,71.3059123 27.2240333,67.7886719 28.9829803,65.208883 C29.324262,64.7083365 29.7433999,64.2664465 30.2239371,63.8996699 L30.4692461,63.7226172 L33.546,61.6236625 L38.565,65.0456625 L33.6541013,68.3937382 L59.7307329,86.1732598 L85.8073645,68.3937382 L80.896,65.0446625 L85.914,61.6236625 Z M56.5458777,28.9824331 C58.4670802,27.6725223 60.9943856,27.6725223 62.9155882,28.9824331 L62.9155882,28.9824331 L88.9922197,46.7619547 C91.5720087,48.5209016 92.2374325,52.038142 90.4784855,54.617931 C90.0803236,55.2019018 89.5761906,55.7060348 88.9922197,56.1041967 L88.9922197,56.1041967 L62.9155882,73.8837183 C60.9943856,75.1936291 58.4670802,75.1936291 56.5458777,73.8837183 L56.5458777,73.8837183 L41.074,63.3346625 L36.055,59.9126625 L30.4692461,56.1041967 C27.8894572,54.3452498 27.2240333,50.8280094 28.9829803,48.2482204 C29.3811423,47.6642496 29.8852752,47.1601166 30.4692461,46.7619547 L30.4692461,46.7619547 Z M59.7307329,33.6535542 L33.6541013,51.4330757 L59.7307329,69.2125972 L73.37,59.9135542 L78.388,56.4915542 L78.388,56.491 L85.8073645,51.4330757 L59.7307329,33.6535542 Z"}})])])};Re._withStripped=!0;var Pe=j({name:"vIconEmptyProject",props:{width:{type:[Number,String],default:120},height:{type:[Number,String],default:120}}},Re,[],!0,null,null,null);Pe.options.__file="images/default/svg/empty_project.svg";var Fe=Pe.exports,Be=function(e,t){var i=t._c;return i("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 120 120",fill:"currentColor",width:t.props.width,height:t.props.height}},[i("g",{attrs:{fill:"none","fill-rule":"evenodd"}},[i("circle",{attrs:{cx:"60",cy:"60",r:"60",fill:"#C6D4E0","fill-opacity":".4"}}),i("path",{attrs:{fill:"#FFF","fill-rule":"nonzero",d:"M61.4968933,22.8618477 L91.4968933,40.134575 C92.4268469,40.6700027 93,41.6613643 93,42.7344423 L93,77.2655577 C93,78.3386357 92.4268469,79.3299973 91.4968933,79.865425 L61.4968933,97.1381523 C60.5702704,97.6716625 59.4297296,97.6716625 58.5031067,97.1381523 L28.5031067,79.865425 C27.5731531,79.3299973 27,78.3386357 27,77.2655577 L27,42.7344423 C27,41.6613643 27.5731531,40.6700027 28.5031067,40.134575 L58.5031067,22.8618477 C59.4297296,22.3283375 60.5702704,22.3283375 61.4968933,22.8618477 Z M33,47.184715 L33,75.531 L58.5,90.211715 L58.4995818,61.866 L33,47.184715 Z M87,47.183715 L61.4995818,61.866 L61.5,90.211715 L87,75.53 L87,47.183715 Z M60,28.923 L33.647,44.095715 L60,59.269 L86.352,44.095715 L60,28.923 Z"}})])])};Be._withStripped=!0;var We=j({name:"vIconEmptyContainer",props:{width:{type:[Number,String],default:120},height:{type:[Number,String],default:120}}},Be,[],!0,null,null,null);We.options.__file="images/default/svg/empty_container.svg";var Ve=We.exports,ze=function(e,t){var i=t._c;return i("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 120 120",fill:"currentColor",width:t.props.width,height:t.props.height}},[i("g",{attrs:{fill:"none","fill-rule":"evenodd"}},[i("circle",{attrs:{cx:"60",cy:"60",r:"60",fill:"#C6D4E0","fill-opacity":".4"}}),i("path",{attrs:{fill:"#FFF",d:"M60.2941176,32 C72.1006613,32 81.9729036,41.4350053 84.4185092,53.0583932 C93.1430099,53.7784325 100,61.0884483 100,70 C100,79.280923 92.5628044,86.824796 83.3230397,86.9969921 L83,87 L41,87 C29.4020203,87 20,77.5979797 20,66 C20,55.1665867 28.203272,46.2491502 38.7369944,45.1205124 C43.2443141,37.4273226 51.3395521,32 60.2941176,32 Z M60.2941176,38 C53.9731892,38 47.7873252,41.7960984 44.1188552,47.8107745 L43.9139105,48.1535867 L42.3844848,50.7640433 L39.376207,51.0863658 C31.8055373,51.8975268 26,58.3186642 26,66 C26,74.1794071 32.5467864,80.8297302 40.6861718,80.9967822 L41,81.0002601 L82.9441359,81.0002601 L83.2112405,80.9980338 C89.1953777,80.8865109 94,75.996869 94,70 C94,64.3646745 89.7425186,59.6676533 84.2121749,59.0655389 L83.9250028,59.038063 L79.4678868,58.670214 L78.5470656,54.2937675 C76.5867435,44.976818 68.8083935,38 60.2941176,38 Z"}})])])};ze._withStripped=!0;var je=j({name:"vIconEmptyImage",props:{width:{type:[Number,String],default:120},height:{type:[Number,String],default:120}}},ze,[],!0,null,null,null);je.options.__file="images/default/svg/empty_image.svg";var He=je.exports,Ue=function(e,t){var i=t._c;return i("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28",fill:"currentColor",width:t.props.width,height:t.props.height}},[i("path",{attrs:{"fill-rule":"evenodd",d:"M23.2619434,14.6043206 L24.3515367,15.3475453 C25.2641622,15.96979 25.4995624,17.2140481 24.8773178,18.1266736 C24.7716775,18.2816127 24.6449501,18.4206648 24.5010357,18.5399298 L24.3515367,18.6524547 L15.1266736,24.9421341 C14.4955755,25.3724283 13.6795993,25.4031636 13.02209,25.03434 L12.8733264,24.9421341 L3.64846328,18.6524547 C2.73583776,18.03021 2.50043757,16.7859519 3.12268224,15.8733264 C3.22832251,15.7183873 3.35504992,15.5793352 3.49896432,15.4600702 L3.64846328,15.3475453 L4.73694336,14.6043206 L6.51194336,15.8153206 L4.77513693,17 L14,23.2896794 L23.2248631,17 L21.4869434,15.8153206 L23.2619434,14.6043206 Z M14.97791,2.96566005 L15.1266736,3.05786595 L24.3515367,9.34754531 C25.2641622,9.96978999 25.4995624,11.2140481 24.8773178,12.1266736 C24.7716775,12.2816127 24.6449501,12.4206648 24.5010357,12.5399298 L24.3515367,12.6524547 L22.3749434,13.9993206 L20.5999434,15.2093206 L15.1266736,18.9421341 C14.4955755,19.3724283 13.6795993,19.4031636 13.02209,19.03434 L12.8733264,18.9421341 L7.39994336,15.2103206 L7.39894336,15.2103206 L5.62394336,13.9993206 L3.64846328,12.6524547 C2.73583776,12.03021 2.50043757,10.7859519 3.12268224,9.87332635 C3.22832251,9.7183873 3.35504992,9.57933519 3.49896432,9.46007018 L3.64846328,9.34754531 L12.8733264,3.05786595 C13.5044245,2.62757175 14.3204007,2.59683645 14.97791,2.96566005 Z M14,4.71032063 L4.77513693,11 L14,17.2896794 L23.2248631,11 L14,4.71032063 Z"}})])};Ue._withStripped=!0;var $e=j({name:"vIcon28Project",props:{width:{type:[Number,String],default:28},height:{type:[Number,String],default:28}}},Ue,[],!0,null,null,null);$e.options.__file="images/default/svg/28_project.svg";var Ke=$e.exports,qe=function(e,t){var i=t._c;return i("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28",fill:"currentColor",width:t.props.width,height:t.props.height}},[i("path",{attrs:{"fill-rule":"evenodd",d:"M15.5010723,2.3934134 L23.5010723,6.92212675 C24.4310259,7.44856337 25.004179,8.42327748 25.004179,9.47833585 L25.004179,18.5216641 C25.004179,19.5767225 24.4310259,20.5514366 23.5010723,21.0778733 L15.5010723,25.6065866 C14.5744494,26.1311378 13.4339086,26.1311378 12.5072857,25.6065866 L4.50728567,21.0778733 C3.57733214,20.5514366 3.004179,19.5767225 3.004179,18.5216641 L3.004179,9.47833585 C3.004179,8.42327748 3.57733214,7.44856337 4.50728567,6.92212675 L12.5072857,2.3934134 C13.4339086,1.8688622 14.5744494,1.8688622 15.5010723,2.3934134 Z M23.004179,9.609 L14.499711,14.5891642 L14.499179,23.903 L14.5031434,23.9024472 L22.5031434,19.3737338 C22.7786852,19.2177526 22.9602549,18.9437066 22.997202,18.6377327 L23.004179,18.5216641 L23.004179,9.609 Z M5.004179,9.789 L5.004179,18.5216641 C5.004179,18.834274 5.15513291,19.1257233 5.40639026,19.3098748 L5.50521456,19.3737338 L13.499179,23.899 L13.499711,14.5991642 L5.004179,9.789 Z M13.6241063,4.04018002 L13.5052146,4.09755281 L5.50521456,8.62626615 C5.42222004,8.67324845 5.34775109,8.7309421 5.2831918,8.79699327 L14,13.728 L22.598179,8.688 L22.5031434,8.62626615 L14.5031434,4.09755281 C14.2328784,3.9445587 13.9080198,3.92543444 13.6241063,4.04018002 Z"}})])};qe._withStripped=!0;var Ge=j({name:"vIcon28Container",props:{width:{type:[Number,String],default:28},height:{type:[Number,String],default:28}}},qe,[],!0,null,null,null);Ge.options.__file="images/default/svg/28_container.svg";var Ye=Ge.exports,Ze=function(e,t){var i=t._c;return i("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28",fill:"currentColor",width:t.props.width,height:t.props.height}},[i("path",{attrs:{"fill-rule":"evenodd",d:"M14.0941176,5 C18.0837726,5 21.3831889,8.23730747 21.9227267,12.086253 C24.2435413,12.5181345 26,14.5539458 26,17 C26,19.6887547 23.8776933,21.8818181 21.2168896,21.9953805 L21,22 L8,22 C4.6862915,22 2,19.3137085 2,16 C2,13.1603957 3.97260528,10.781518 6.62224711,10.1589357 C7.85850953,7.2150739 10.7939389,5 14.0941176,5 Z M14.0941176,7 C11.7984393,7 9.5918305,8.50925566 8.56790648,10.7038751 L8.466247,10.9333157 L8.07170285,11.8728278 L7.079725,12.1059113 C5.28944459,12.5265708 4,14.1337576 4,16 C4,18.1421954 5.68396847,19.8910789 7.80035966,19.9951047 L8,20 L20.9574118,20.0004535 L21.1316078,19.9971996 C22.7312121,19.9289289 24,18.6081382 24,17 C24,15.6102953 23.0472948,14.4174604 21.7305877,14.0902176 L21.5568274,14.0524976 L20.141887,13.7891907 L19.9420917,12.3638947 C19.5231339,9.37514099 16.9629097,7 14.0941176,7 Z"}})])};Ze._withStripped=!0;var Xe=j({name:"vIcon28Image",props:{width:{type:[Number,String],default:28},height:{type:[Number,String],default:28}}},Ze,[],!0,null,null,null);Xe.options.__file="images/default/svg/28_image.svg";var Je=Xe.exports,Qe=function(e,t){var i=t._c;return i("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 22",fill:"currentColor",width:t.props.width,height:t.props.height}},[i("path",{attrs:{"fill-rule":"evenodd",d:"M17.873,11.4786315 L18.0953905,11.6271129 C19.0404974,12.2595487 19.2842758,13.5241853 18.6398847,14.4517577 C18.5304846,14.6092344 18.3992468,14.7505639 18.2502103,14.8717822 L18.0953905,14.98615 L12.1667732,18.9533941 C11.509862,19.3929784 10.659524,19.422284 9.97682251,19.0413109 L9.83322678,18.9533941 L3.90460946,14.98615 C2.95950258,14.3537142 2.71572424,13.0890777 3.3601153,12.1615052 C3.46951541,12.0040286 3.60075319,11.8626991 3.74978967,11.7414807 L3.90460946,11.6271129 L4.126,11.4786315 L5.964,12.7086315 L5.07138268,13.3066315 L11,17.2738755 L16.9286173,13.3066315 L16.036,12.7086315 L17.873,11.4786315 Z M9.83322678,2.8532374 C10.5370602,2.3822542 11.4629398,2.3822542 12.1667732,2.8532374 L12.1667732,2.8532374 L18.0953905,6.82048148 C19.0404974,7.45291725 19.2842758,8.7175538 18.6398847,9.64512627 C18.4940179,9.85509512 18.3093285,10.0363579 18.0953905,10.1795185 L18.0953905,10.1795185 L12.1667732,14.1467626 C11.4629398,14.6177458 10.5370602,14.6177458 9.83322678,14.1467626 L9.83322678,14.1467626 L3.90460946,10.1795185 C2.95950258,9.54708275 2.71572424,8.2824462 3.3601153,7.35487373 C3.50598212,7.14490488 3.69067145,6.96364206 3.90460946,6.82048148 L3.90460946,6.82048148 Z M11,4.53275592 L5.07138268,8.53275592 L6.792,9.69375592 L8.623,10.9287559 L8.622,10.928 L11,12.5327559 L13.376,10.9287559 L15.207,9.69375592 L16.9286173,8.53275592 L11,4.53275592 Z"}})])};Qe._withStripped=!0;var et=j({name:"vIconSvgModuleListProject",props:{width:{type:[Number,String],default:22},height:{type:[Number,String],default:22}}},Qe,[],!0,null,null,null);et.options.__file="images/default/svg/module list/SVG_module_list_project.svg";var tt=et.exports,it=function(e,t){var i=t._c;return i("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 22",fill:"currentColor",width:t.props.width,height:t.props.height}},[i("path",{attrs:{"fill-rule":"evenodd",d:"M12.4968933,2.40013263 L17.4968933,5.27892051 C18.4268469,5.8143483 19,6.80570984 19,7.87878788 L19,13.6361712 C19,14.7016602 18.4348583,15.6872031 17.5152704,16.2253711 L12.5152704,19.1515074 C11.5793373,19.699241 10.4206627,19.699241 9.48472965,19.1515074 L4.48472965,16.2253711 C3.56514172,15.6872031 3,14.7016602 3,13.6361712 L3,7.87878788 C3,6.80570984 3.57315314,5.8143483 4.50310667,5.27892051 L9.50310667,2.40013263 C10.4297296,1.86662246 11.5702704,1.86662246 12.4968933,2.40013263 Z M5,8.115 L5,13.6361712 C5,13.9518716 5.14884391,14.2465163 5.39720566,14.4340863 L5.49490988,14.4992378 L10.4949099,17.4253742 L10.5,17.428 L10.5,11.282 L5,8.115 Z M17,8.115 L11.5,11.281 L11.5,17.427 L11.5050901,17.4253742 L16.5050901,14.4992378 C16.7775606,14.3397807 16.956679,14.0624963 16.9931193,13.7534039 L17,13.6361712 L17,8.115 Z M10.6199273,4.07502487 L10.5010356,4.13337754 L5.50103556,7.01216542 C5.43521168,7.05006401 5.3747506,7.0948154 5.32034283,7.14522521 L11,10.415285 L16.6796572,7.14522521 C16.6537186,7.12119263 16.6264042,7.09844612 16.5977887,7.0771151 L16.4989644,7.01216542 L11.4989644,4.13337754 C11.2286994,3.97777041 10.9038408,3.95831952 10.6199273,4.07502487 Z"}})])};it._withStripped=!0;var nt=j({name:"vIconSvgModuleListContainer",props:{width:{type:[Number,String],default:22},height:{type:[Number,String],default:22}}},it,[],!0,null,null,null);nt.options.__file="images/default/svg/module list/SVG_module_list_container.svg";var ot=nt.exports,rt=function(e,t){var i=t._c;return i("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 22",fill:"currentColor",width:t.props.width,height:t.props.height}},[i("path",{attrs:{"fill-rule":"evenodd",d:"M11.0705882,4 C13.9898778,4 16.416423,6.3110342 16.9087798,9.10440016 C18.680162,9.51526845 20,11.1035019 20,13 C20,15.1421954 18.3160315,16.8910789 16.1996403,16.9951047 L16,17 L7,17 C4.23857625,17 2,14.7614237 2,12 C2,9.64110577 3.63351346,7.66373905 5.83105496,7.13738526 C6.89855998,5.30466917 8.87715616,4 11.0705882,4 Z M11.0705882,6 C9.75301052,6 8.45540806,6.75800569 7.67766851,7.95192649 L7.5592606,8.14401591 L7.12874616,8.88313257 L6.29691694,9.08237179 C4.96083301,9.4023898 4,10.6050612 4,12 C4,13.5976809 5.24891996,14.9036609 6.82372721,14.9949073 L7,15 L15.9509735,15.000601 L16.101454,14.9975163 C17.1614084,14.9454169 18,14.0671215 18,13 C18,12.1202402 17.4265523,11.3555787 16.612295,11.0954456 L16.4568809,11.0526782 L15.1686871,10.7538844 L14.9391416,9.45156729 C14.5966212,7.50829244 12.9155815,6 11.0705882,6 Z"}})])};rt._withStripped=!0;var st=j({name:"vIconSvgModuleListImage",props:{width:{type:[Number,String],default:22},height:{type:[Number,String],default:22}}},rt,[],!0,null,null,null);st.options.__file="images/default/svg/module list/SVG_module_list_image.svg";var at=st.exports,lt=function(e,t){var i=t._c;return i("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 22",fill:"currentColor",width:t.props.width,height:t.props.height}},[i("path",{attrs:{"fill-rule":"evenodd",d:"M18,15 C18.5522847,15 19,15.4477153 19,16 C19,16.5522847 18.5522847,17 18,17 L9,17 C8.44771525,17 8,16.5522847 8,16 C8,15.4477153 8.44771525,15 9,15 L18,15 Z M6,15 L6,17 L3,17 L3,15 L6,15 Z M18,10 C18.5522847,10 19,10.4477153 19,11 C19,11.5522847 18.5522847,12 18,12 L9,12 C8.44771525,12 8,11.5522847 8,11 C8,10.4477153 8.44771525,10 9,10 L18,10 Z M6,10 L6,12 L3,12 L3,10 L6,10 Z M18,5 C18.5522847,5 19,5.44771525 19,6 C19,6.55228475 18.5522847,7 18,7 L9,7 C8.44771525,7 8,6.55228475 8,6 C8,5.44771525 8.44771525,5 9,5 L18,5 Z M6,5 L6,7 L3,7 L3,5 L6,5 Z"}})])};lt._withStripped=!0;var ct=j({name:"vIconSvgModuleListLog",props:{width:{type:[Number,String],default:22},height:{type:[Number,String],default:22}}},lt,[],!0,null,null,null);ct.options.__file="images/default/svg/module list/SVG_module_list_log.svg";var dt=ct.exports,ht=function(e,t){var i=t._c;return i("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 22",fill:"currentColor",width:t.props.width,height:t.props.height}},[i("path",{attrs:{"fill-rule":"evenodd",d:"M11.5,3.13 L18.4963101,7.13175686 C18.9758275,7.40576683 19.1424242,8.01662149 18.8684143,8.49613894 C18.6139764,8.94140514 18.069096,9.11685704 17.6086256,8.92026212 L17,8.58 L17.0001711,14 C17.0001711,15.1045695 16.1047406,16 15.0001711,16 L12,15.999 L12,17 L17.0001711,17 C17.5524559,17 18.0001711,17.4477153 18.0001711,18 C18.0001711,18.5522847 17.5524559,19 17.0001711,19 L5.00017112,19 C4.44788637,19 4.00017112,18.5522847 4.00017112,18 C4.00017112,17.4477153 4.44788637,17 5.00017112,17 L10,17 L10,15.999 L7.00017112,16 C5.89560162,16 5.00017112,15.1045695 5.00017112,14 L5,8.58 L4.49631006,8.86824314 C4.05104386,9.12268097 3.38636581,8.94140514 3.13192798,8.49613894 C2.87749015,8.05087274 3.02,7.41 3.50403218,7.13175686 C8.17069885,4.46509019 10.5040322,3.13175686 10.5040322,3.13175686 C10.7730358,2.97804052 11.23,2.97804052 11.5,3.13 Z M11.0001711,5.152 L7,7.437 L7.00017112,14 L15.0001711,14 L15,7.437 L11.0001711,5.152 Z M11.0001711,8 C11.8285982,8 12.5001711,8.67157288 12.5001711,9.5 L12.5001711,12.5 L9.50017112,12.5 L9.50017112,9.5 C9.50017112,8.67157288 10.171744,8 11.0001711,8 Z"}})])};ht._withStripped=!0;var ut=j({name:"vIconSvgModuleListNetwork",props:{width:{type:[Number,String],default:22},height:{type:[Number,String],default:22}}},ht,[],!0,null,null,null);ut.options.__file="images/default/svg/module list/SVG_module_list_network.svg";var gt=ut.exports,pt=function(e,t){var i=t._c;return i("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 22",fill:"currentColor",width:t.props.width,height:t.props.height}},[i("path",{attrs:{"fill-rule":"evenodd",d:"M13,9 C15.209139,9 17,10.790861 17,13 C17,13.8711715 16.7215013,14.6772962 16.2486785,15.3341995 L18.2071068,17.2928932 C18.5976311,17.6834175 18.5976311,18.3165825 18.2071068,18.7071068 C17.8466228,19.0675907 17.2793918,19.0953203 16.8871006,18.7902954 L16.7928932,18.7071068 L14.7928932,16.7071068 L14.7126813,16.6158296 C14.1935148,16.862175 13.6128528,17 13,17 C10.790861,17 9,15.209139 9,13 C9,10.790861 10.790861,9 13,9 Z M15,3 C15.5522847,3 16,3.44771525 16,4 L16.000963,7.80325037 C15.3935565,7.45173416 14.7188084,7.20365268 14.0008069,7.08309386 L14,5 L5,5 L5,16 L7.80325037,16.000963 C8.26784354,16.8037622 8.91312139,17.4889261 9.6834702,18.0008411 L4,18 C3.44771525,18 3,17.5522847 3,17 L3,4 C3,3.44771525 3.44771525,3 4,3 L15,3 Z M13,11 C11.8954305,11 11,11.8954305 11,13 C11,14.1045695 11.8954305,15 13,15 C14.1045695,15 15,14.1045695 15,13 C15,11.8954305 14.1045695,11 13,11 Z"}})])};pt._withStripped=!0;var mt=j({name:"vIconSvgModuleListRegistry",props:{width:{type:[Number,String],default:22},height:{type:[Number,String],default:22}}},pt,[],!0,null,null,null);mt.options.__file="images/default/svg/module list/SVG_module_list_registry.svg";var ft=mt.exports,_t=function(e,t){var i=t._c;return i("svg",{attrs:{viewBox:"0 0 64 64",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",fill:"currentColor",width:t.props.width,height:t.props.height}},[i("title",[t._v("64/folder")]),i("g",{attrs:{id:"7d28b9db6ec4c898ba266a77f150ec69__2021Q1-7.0-file-station-icon",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"}},[i("g",{attrs:{id:"7d28b9db6ec4c898ba266a77f150ec69__64/folder"}},[i("path",{attrs:{d:"M8,8 L27.7567169,8 C28.5527464,8 29.3161405,8.31637167 29.8788125,8.87945524 L35,14.0043882 L35,14.0043882 L56.0000001,14.0005485 C57.6568542,13.9996971 59.0002455,15.3425973 59.0005484,16.9994515 C59.0005485,16.9996343 59.0005485,16.9998172 59,17 L59,47 C59,48.6568542 57.6568542,50 56,50 L8,50 C6.34314575,50 5,48.6568542 5,47 L5,11 C5,9.34314575 6.34314575,8 8,8 Z",id:"7d28b9db6ec4c898ba266a77f150ec69__Rectangle",fill:"#FCBC30"}}),i("rect",{attrs:{id:"7d28b9db6ec4c898ba266a77f150ec69__Rectangle",fill:"#FFD359",x:"5",y:"21",width:"54",height:"35",rx:"3"}})])])])};_t._withStripped=!0;var vt=j({name:"vIconFolder",props:{width:{type:[Number,String],default:64},height:{type:[Number,String],default:64}}},_t,[],!0,null,null,null);vt.options.__file="images/default/svg/folder.svg";var bt=vt.exports,wt=function(e,t){var i=t._c;return i("svg",{attrs:{viewBox:"0 0 64 64",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",fill:"currentColor",width:t.props.width,height:t.props.height}},[i("title",[t._v("64/xxx")]),i("g",{attrs:{id:"f4a0ac43dd3c1631220ee337c749b692__2021Q1-7.0-file-station-icon",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"}},[i("g",{attrs:{id:"f4a0ac43dd3c1631220ee337c749b692__64/xxx",fill:"#FFFFFF",stroke:"#C6CACF","stroke-width":"3"}},[i("path",{attrs:{d:"M41.7573593,5.5 C42.155184,5.5 42.5367149,5.65803526 42.8180195,5.93933983 L42.8180195,5.93933983 L55.0606602,18.1819805 C55.3419647,18.4632851 55.5,18.844816 55.5,19.2426407 L55.5,19.2426407 L55.5,57 C55.5,57.4142136 55.3321068,57.7892136 55.0606602,58.0606602 C54.7892136,58.3321068 54.4142136,58.5 54,58.5 L54,58.5 L10,58.5 C9.58578644,58.5 9.21078644,58.3321068 8.93933983,58.0606602 C8.66789322,57.7892136 8.5,57.4142136 8.5,57 L8.5,57 L8.5,7 C8.5,6.58578644 8.66789322,6.21078644 8.93933983,5.93933983 C9.21078644,5.66789322 9.58578644,5.5 10,5.5 L10,5.5 Z",id:"f4a0ac43dd3c1631220ee337c749b692__Rectangle"}})])])])};wt._withStripped=!0;var yt=j({name:"vIconXxx",props:{width:{type:[Number,String],default:64},height:{type:[Number,String],default:64}}},wt,[],!0,null,null,null);yt.options.__file="images/default/svg/xxx.svg";var Ct=yt.exports,St=function(e,t){var i=t._c;return i("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",width:t.props.width,height:t.props.height}},[i("path",{attrs:{"fill-rule":"evenodd",d:"M9,12 L8.1014078,12.898918 C8.50930546,14.6752011 10.0999411,16 12,16 C13.1844621,16 14.2486807,15.4851768 14.9810963,14.6670901 L17.3761352,14.6670389 C16.3942624,16.6424618 14.3556662,18 12,18 C9.56673795,18 7.47177858,16.551554 6.53030209,14.4698423 L5,16 L5,12 L9,12 Z M12,6 C14.4336503,6 16.5288899,7.44890818 17.4701484,9.53115413 L19,8 L19,12 L15,12 L15.8990504,11.1030795 C15.4918869,9.32579214 13.9007711,8 12,8 C10.8155379,8 9.75131929,8.51482318 9.01890374,9.33290985 L6.62386477,9.3329611 C7.60573758,7.35753815 9.64433378,6 12,6 Z"}})])};St._withStripped=!0;var kt=j({name:"vIconRowUpdating",props:{width:{type:[Number,String],default:24},height:{type:[Number,String],default:24}}},St,[],!0,null,null,null);kt.options.__file="images/default/svg/row_updating.svg";var xt=kt.exports,Lt=function(e,t){var i=t._c;return i("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",width:t.props.width,height:t.props.height}},[i("path",{attrs:{"fill-rule":"evenodd",d:"M18,17 C18.5522847,17 19,17.4477153 19,18 C19,18.5522847 18.5522847,19 18,19 L6,19 C5.44771525,19 5,18.5522847 5,18 C5,17.4477153 5.44771525,17 6,17 L18,17 Z M12,5 C12.5522847,5 13,5.44771525 13,6 L13,12.6 L15.0935922,10.5062816 C15.4353009,10.1645728 15.9893203,10.1645728 16.331029,10.5062816 C16.6727378,10.8479903 16.6727378,11.4020097 16.331029,11.7437184 L12.6187184,15.456029 C12.4763398,15.5984077 12.2971017,15.6814619 12.1117203,15.7051917 L12,15.7123106 C11.776068,15.7123106 11.5521359,15.6268834 11.3812816,15.456029 L7.66897097,11.7437184 C7.32726221,11.4020097 7.32726221,10.8479903 7.66897097,10.5062816 C8.01067972,10.1645728 8.56469908,10.1645728 8.90640783,10.5062816 L11,12.6 L11,6 C11,5.44771525 11.4477153,5 12,5 Z"}})])};Lt._withStripped=!0;var Et=j({name:"vIconRowDownloading",props:{width:{type:[Number,String],default:24},height:{type:[Number,String],default:24}}},Lt,[],!0,null,null,null);Et.options.__file="images/default/svg/row_downloading.svg";var Nt=Et.exports,It=function(e,t){var i=t._c;return i("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",width:t.props.width,height:t.props.height}},[i("path",{attrs:{"fill-rule":"evenodd",d:"M9.41372819,9.49099823 L14.5090018,14.5862718 C14.266104,14.9252578 13.9915839,15.3742442 13.6854418,15.9332309 L13.41529,16.4393012 L13.0927043,17.0701287 L12.5094818,18.2343405 L11.8690827,19.5357233 C11.7947507,19.687942 11.71936,19.8427009 11.6429104,20 C8.54724458,19.092642 6.38249004,17.4633614 5.14864675,15.1121583 C5.50519651,14.9379579 6.0544944,14.6228682 6.6303806,14.2594243 L7.12663332,13.9382175 C7.78665099,13.499908 8.41938909,13.0329741 8.77681899,12.6755442 C8.29527371,12.9205677 7.52103199,13.1571404 6.45409381,13.3852622 L5.89623335,13.4986189 L5.28959015,13.6105671 L4.55950378,13.7332901 C4.28310941,12.9196627 4.09660815,12.036323 4,11.0832712 C5.69436875,11.0135087 7.49894481,10.482751 9.41372819,9.49099823 Z M19.6042754,4.39572464 C20.1319082,4.9233575 20.1319082,5.77881938 19.6042754,6.30645224 L15.464,10.446 L15.7828202,10.7648166 C16.4863306,11.4683271 16.4863306,12.6089429 15.7828202,13.3124534 L15.145911,13.9493626 L10.0506374,8.85408903 L10.6875466,8.21717983 C11.3910571,7.51366936 12.5316729,7.51366936 13.2351834,8.21717983 L13.553,8.535 L17.6935478,4.39572464 C18.2211806,3.86809179 19.0766425,3.86809179 19.6042754,4.39572464 Z"}})])};It._withStripped=!0;var Tt=j({name:"vIconClear",props:{width:{type:[Number,String],default:24},height:{type:[Number,String],default:24}}},It,[],!0,null,null,null);Tt.options.__file="images/default/svg/clear.svg";var Dt=Tt.exports,At=function(e,t){var i=t._c;return i("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",width:t.props.width,height:t.props.height}},[i("path",{attrs:{"fill-rule":"evenodd",d:"M17.0044225,5 C17.5542648,5 18,5.4463114 18,5.99754465 L18,14 L14.3209726,10.9890553 C12.9676023,12.055574 10.7164881,13.8784723 9.66471374,15.0080377 C8.98223178,15.7409973 8.18214798,16.7724649 8.25625858,18.6013233 C8.30727325,19.860234 5.24649357,18.0515106 6.17575366,14.3905648 C6.79941815,11.9335542 9.28530775,9.4917552 10.8528741,8.15146121 L7,5 L17.0044225,5 Z"}})])};At._withStripped=!0;var Ot=j({name:"vIconGoToDetails",props:{width:{type:[Number,String],default:24},height:{type:[Number,String],default:24}}},At,[],!0,null,null,null);Ot.options.__file="images/default/svg/go_to_details.svg";var Mt=Ot.exports,Rt=function(e,t){var i=t._c;return i("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",width:t.props.width,height:t.props.height}},[i("path",{attrs:{"fill-rule":"evenodd",d:"M12,4 C16.418278,4 20,7.581722 20,12 C20,16.418278 16.418278,20 12,20 C7.581722,20 4,16.418278 4,12 C4,7.581722 7.581722,4 12,4 Z M12,6 C8.6862915,6 6,8.6862915 6,12 C6,15.3137085 8.6862915,18 12,18 C15.3137085,18 18,15.3137085 18,12 C18,8.6862915 15.3137085,6 12,6 Z M12,14 C12.5522847,14 13,14.4477153 13,15 C13,15.5522847 12.5522847,16 12,16 C11.4477153,16 11,15.5522847 11,15 C11,14.4477153 11.4477153,14 12,14 Z M12,8 C12.5522847,8 13,8.44771525 13,9 L13,12 C13,12.5522847 12.5522847,13 12,13 C11.4477153,13 11,12.5522847 11,12 L11,9 C11,8.44771525 11.4477153,8 12,8 Z"}})])};Rt._withStripped=!0;var Pt=j({name:"vIcon24Warning",props:{width:{type:[Number,String],default:24},height:{type:[Number,String],default:24}}},Rt,[],!0,null,null,null);Pt.options.__file="images/default/svg/24_warning.svg";var Ft=Pt.exports,Bt=function(e,t){var i=t._c;return i("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",width:t.props.width,height:t.props.height}},[i("path",{attrs:{"fill-rule":"evenodd",d:"M18.873,12.4786315 L19.0953905,12.6271129 C20.0404974,13.2595487 20.2842758,14.5241853 19.6398847,15.4517577 C19.5304846,15.6092344 19.3992468,15.7505639 19.2502103,15.8717822 L19.0953905,15.98615 L13.1667732,19.9533941 C12.509862,20.3929784 11.659524,20.422284 10.9768225,20.0413109 L10.8332268,19.9533941 L4.90460946,15.98615 C3.95950258,15.3537142 3.71572424,14.0890777 4.3601153,13.1615052 C4.46951541,13.0040286 4.60075319,12.8626991 4.74978967,12.7414807 L4.90460946,12.6271129 L5.126,12.4786315 L6.964,13.7086315 L6.07138268,14.3066315 L12,18.2738755 L17.9286173,14.3066315 L17.036,13.7086315 L18.873,12.4786315 Z M10.8332268,3.8532374 C11.5370602,3.3822542 12.4629398,3.3822542 13.1667732,3.8532374 L13.1667732,3.8532374 L19.0953905,7.82048148 C20.0404974,8.45291725 20.2842758,9.7175538 19.6398847,10.6451263 C19.4940179,10.8550951 19.3093285,11.0363579 19.0953905,11.1795185 L19.0953905,11.1795185 L13.1667732,15.1467626 C12.4629398,15.6177458 11.5370602,15.6177458 10.8332268,15.1467626 L10.8332268,15.1467626 L4.90460946,11.1795185 C3.95950258,10.5470827 3.71572424,9.2824462 4.3601153,8.35487373 C4.50598212,8.14490488 4.69067145,7.96364206 4.90460946,7.82048148 L4.90460946,7.82048148 Z M12,5.53275592 L6.07138268,9.53275592 L7.792,10.6937559 L9.623,11.9287559 L9.622,11.928 L12,13.5327559 L14.376,11.9287559 L16.207,10.6937559 L17.9286173,9.53275592 L12,5.53275592 Z"}})])};Bt._withStripped=!0;var Wt=j({name:"vIcon24Project",props:{width:{type:[Number,String],default:24},height:{type:[Number,String],default:24}}},Bt,[],!0,null,null,null);Wt.options.__file="images/default/svg/24_project.svg";var Vt=Wt.exports,zt=function(e,t){var i=t._c;return i("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",width:t.props.width,height:t.props.height}},[i("path",{attrs:{"fill-rule":"evenodd",d:"M13.4968933,3.40013263 L18.4968933,6.27892051 C19.4268469,6.8143483 20,7.80570984 20,8.87878788 L20,14.6361712 C20,15.7016602 19.4348583,16.6872031 18.5152704,17.2253711 L13.5152704,20.1515074 C12.5793373,20.699241 11.4206627,20.699241 10.4847296,20.1515074 L5.48472965,17.2253711 C4.56514172,16.6872031 4,15.7016602 4,14.6361712 L4,8.87878788 C4,7.80570984 4.57315314,6.8143483 5.50310667,6.27892051 L10.5031067,3.40013263 C11.4297296,2.86662246 12.5702704,2.86662246 13.4968933,3.40013263 Z M6,9.115 L6,14.6361712 C6,14.9518716 6.14884391,15.2465163 6.39720566,15.4340863 L6.49490988,15.4992378 L11.4949099,18.4253742 L11.5,18.428 L11.5,12.282 L6,9.115 Z M18,9.115 L12.5,12.281 L12.5,18.427 L12.5050901,18.4253742 L17.5050901,15.4992378 C17.7775606,15.3397807 17.956679,15.0624963 17.9931193,14.7534039 L18,14.6361712 L18,9.115 Z M11.6199273,5.07502487 L11.5010356,5.13337754 L6.50103556,8.01216542 C6.43521168,8.05006401 6.3747506,8.0948154 6.32034283,8.14522521 L12,11.415285 L17.6796572,8.14522521 C17.6537186,8.12119263 17.6264042,8.09844612 17.5977887,8.0771151 L17.4989644,8.01216542 L12.4989644,5.13337754 C12.2286994,4.97777041 11.9038408,4.95831952 11.6199273,5.07502487 Z"}})])};zt._withStripped=!0;var jt=j({name:"vIcon24Container",props:{width:{type:[Number,String],default:24},height:{type:[Number,String],default:24}}},zt,[],!0,null,null,null);jt.options.__file="images/default/svg/24_container.svg";var Ht=jt.exports;const Ut={ACTION_GO_TO:"docker-action-go-to",ACTION_CONSOLE:"docker-action-console",STATUS_ERROR:"docker-status-error",STATUS_WARNING:"docker-status-warning",STATUS_PROCESS:"docker-status-process",STATUS_SUCCESS:"docker-status-success",EMPTY_PROJECT:"docker-empty-project",EMPTY_STATS:"docker-empty-stats",EMPTY_CONTAINER:"docker-empty-container",EMPTY_IMAGE:"docker-empty-image",PROJECT_28:"docker-project-28",CONTAINER_28:"docker-container-28",IMAGE_28:"docker-image-28",MODULE_LIST_PROJECT:"docker-module-list-project",MODULE_LIST_CONTAINER:"docker-module-list-container",MODULE_LIST_IMAGE:"docker-module-list-image",MODULE_LIST_LOG:"docker-module-list-log",MODULE_LIST_NETWORK:"docker-module-list-network",MODULE_LIST_REGISTRY:"docker-module-list-registry",FOLDER:"docker-folder",XXX:"docker-xxx",ROW_UPDATING:"docker-row-updating",ROW_DOWNLOADING:"docker-row-downloading",CLEAR:"docker-clear",GO_TO_DETAILS:"docker-go-to-details",WARNING_24:"docker-warning-24",PROJECT_24:"docker-project-24",CONTAINER_24:"docker-container-24"},$t={ACTION_GO_TO:{name:Ut.ACTION_GO_TO,component:fe,type:"svg"},ACTION_CONSOLE:{name:Ut.ACTION_CONSOLE,component:be,type:"svg"},STATUS_ERROR:{name:Ut.STATUS_ERROR,component:Ce,type:"svg"},STATUS_WARNING:{name:Ut.STATUS_WARNING,component:xe,type:"svg"},STATUS_PROCESS:{name:Ut.STATUS_PROCESS,component:Ne,type:"svg"},STATUS_SUCCESS:{name:Ut.STATUS_SUCCESS,component:De,type:"svg"},EMPTY_PROJECT:{name:Ut.EMPTY_PROJECT,component:Fe,type:"svg"},EMPTY_STATS:{name:Ut.EMPTY_STATS,component:Me,type:"svg"},EMPTY_CONTAINER:{name:Ut.EMPTY_CONTAINER,component:Ve,type:"svg"},EMPTY_IMAGE:{name:Ut.EMPTY_IMAGE,component:He,type:"svg"},PROJECT_28:{name:Ut.PROJECT_28,component:Ke,type:"svg"},CONTAINER_28:{name:Ut.CONTAINER_28,component:Ye,type:"svg"},IMAGE_28:{name:Ut.IMAGE_28,component:Je,type:"svg"},MODULE_LIST_PROJECT:{name:Ut.MODULE_LIST_PROJECT,component:tt,type:"svg"},MODULE_LIST_CONTAINER:{name:Ut.MODULE_LIST_CONTAINER,component:ot,type:"svg"},MODULE_LIST_IMAGE:{name:Ut.MODULE_LIST_IMAGE,component:at,type:"svg"},MODULE_LIST_LOG:{name:Ut.MODULE_LIST_LOG,component:dt,type:"svg"},MODULE_LIST_NETWORK:{name:Ut.MODULE_LIST_NETWORK,component:gt,type:"svg"},MODULE_LIST_REGISTRY:{name:Ut.MODULE_LIST_REGISTRY,component:ft,type:"svg"},FOLDER:{name:Ut.FOLDER,component:bt,type:"svg"},XXX:{name:Ut.XXX,component:Ct,type:"svg"},ROW_UPDATING:{name:Ut.ROW_UPDATING,component:xt,type:"svg"},ROW_DOWNLOADING:{name:Ut.ROW_DOWNLOADING,component:Nt,type:"svg"},CLEAR:{name:Ut.CLEAR,component:Dt,type:"svg"},GO_TO_DETAILS:{name:Ut.GO_TO_DETAILS,component:Mt,type:"svg"},WARNING_24:{name:Ut.WARNING_24,component:Ft,type:"svg"},PROJECT_24:{name:Ut.PROJECT_24,component:Vt,type:"svg"},CONTAINER_24:{name:Ut.CONTAINER_24,component:Ht,type:"svg"}},Kt=ge()($t,(({_:e,...t})=>t)),qt=he()(Kt,(({name:e})=>e));ce()($t,(({name:e,component:t})=>{Vue.prototype.$iconManager.register(e,t)}));var Gt={props:{name:{type:String,required:!0,validator:(e,t)=>d()(Ut,t)},small:{type:Boolean,default:!1}},computed:{classes(){return{"docker-package":!0,icon:!0,small:this.small}},icon(){return qt[this.name]}}},Yt=(i(5847),j(Gt,ae,[],!1,null,null,null));Yt.options.__file="src/components/Icon/Icon.vue";var Zt=Yt.exports;const Xt={WEBAPI_ERR_DOCKER_FILE_EXIST:1e3,WEBAPI_ERR_CONTAINER_RUNNING:1001,WEBAPI_ERR_BROKEN_PROFILE:1002,WEBAPI_ERR_DOCKER_API_HELPER_FAIL:1003,WEBAPI_ERR_DOCKER_API_FAIL_LOG:1004,WEBAPI_ERR_ILLEGAL_FILE:1005,WEBAPI_ERR_REGISTRY_GET_ERR:1050,WEBAPI_ERR_REGISTRY_MANAGER_FAIL:1051,WEBAPI_ERR_REGISTRY_REMOTE_FAIL:1052,WEBAPI_ERR_REGISTRY_BAD_RESULT:1053,WEBAPI_DOCKER_SUCCESS:1200,WEBAPI_ERR_DOCKER_BAD_PARAMETER:1201,WEBAPI_ERR_DOCKER_UNKOWN:1202,WEBAPI_ERR_CONTAINER_FAIL_ATTACH:1300,WEBAPI_ERR_CONTAINER_NOT_EXIST:1301,WEBAPI_ERR_CONTAINER_CONFLICT:1302,WEBAPI_ERR_CONTAINER_PORT_CONFLICT:1303,WEBAPI_ERR_CONTAINER_BAD_CMD_PARAM:1304,WEBAPI_ERR_CONTAINER_IMPORT_IMAGE_ONLY:1305,WEBAPI_ERR_CONTAINER_NAME_CONFLICT:1306,WEBAPI_ERR_CONTAINER_NO_CONNECTED_NETWORK:1307,WEBAPI_ERR_CONTAINER_CIRCULAR_LINK:1308,WEBAPI_ERR_CONTAINER_NONSUPPORTED_C2_BINDS:1309,WEBAPI_ERR_CONTAINER_UNKNOWN_CAPABILITY:1310,WEBAPI_ERR_IMAGE_CONFLICT:1400,WEBAPI_ERR_IMAGE_NOT_EXIST:1401,WEBAPI_ERR_IMAGE_CREATE_PARSE_FAIL:1402,WEBAPI_ERR_IMAGE_LOAD_PARSE_FAIL:1403,WS_ERR_CLIENT_ATTACH:1500,WS_ERR_EXEC_END:1501,WS_ERR_UNKNOWN:1502,WS_ATTACH_SUCC:1503,WS_ATTACH_CLIENT:1504,WS_ATTACH_FAIL_TTY:1505,WEBAPI_ERR_NETWORK_NAME_CONFLCT:1800,WEBAPI_ERR_NETWORK_CONNECT_DISCONNECT_FAIL:1801,WEBAPI_ERR_NETWORK_CREATE_FAIL:1802,WEBAPI_ERR_NETWORK_SUBNET4_DUPLICATE:1803,WEBAPI_ERR_NETWORK_SUBNET6_DUPLICATE:1804,WEBAPI_ERR_NETWORK_GATEWAY4_DUPLICATE:1805,WEBAPI_ERR_NETWORK_GATEWAY6_DUPLICATE:1806,WEBAPI_ERR_NETWORK_GATEWAY4_OUTOFRANGE:1807,WEBAPI_ERR_NETWORK_GATEWAY6_OUTOFRANGE:1808,WEBAPI_ERR_NETWORK_SUBNET_OVERLAP:1809,WEBAPI_ERR_NETWORK_NOT_FOUND:1810,WEBAPI_ERR_MIGRATE_IMPORT:2001,WEBAPI_ERR_PROJECT_NAME_DUPLICATED:2102,WEBAPI_ERR_PROJECT_PATH_DUPLICATED:2103,WEBAPI_CORE_ERR_SHARE_SPACE_NOT_ENOUGH:3320},Jt={[Xt.WEBAPI_ERR_DOCKER_FILE_EXIST]:[w,"error","container_exist"],[Xt.WEBAPI_ERR_DOCKER_API_FAIL_LOG]:[w,"error","docker_api_fail_log"],[Xt.WEBAPI_ERR_DOCKER_UNKOWN]:[v,"error","error_error_system"],[Xt.WEBAPI_ERR_CONTAINER_CIRCULAR_LINK]:[w,"error","container_circular_link"],[Xt.WEBAPI_ERR_CONTAINER_UNKNOWN_CAPABILITY]:[w,"error","unknown_capability"],[Xt.WEBAPI_ERR_IMAGE_LOAD_PARSE_FAIL]:[w,"error","invalid_files_format"],[Xt.WEBAPI_ERR_CONTAINER_PORT_CONFLICT]:[w,"error","container_port_conflict"],[Xt.WEBAPI_ERR_PROJECT_NAME_DUPLICATED]:[w,"error","project_name_duplicated"],[Xt.WEBAPI_ERR_PROJECT_PATH_DUPLICATED]:[w,"error","project_path_duplicated"],[Xt.WEBAPI_ERR_CONTAINER_RUNNING]:[v,"error","error_error_system"],[Xt.WEBAPI_ERR_BROKEN_PROFILE]:[w,"error","invalid_files_format"],[Xt.WEBAPI_ERR_DOCKER_API_HELPER_FAIL]:[v,"error","error_error_system"],[Xt.WEBAPI_ERR_ILLEGAL_FILE]:[v,"error","error_error_system"],[Xt.WEBAPI_ERR_REGISTRY_GET_ERR]:[v,"error","error_error_system"],[Xt.WEBAPI_ERR_REGISTRY_MANAGER_FAIL]:[v,"error","error_error_system"],[Xt.WEBAPI_ERR_REGISTRY_REMOTE_FAIL]:[w,"error","registry_remote_fail"],[Xt.WEBAPI_ERR_REGISTRY_BAD_RESULT]:[w,"error","registry_bad_result"],[Xt.WEBAPI_DOCKER_SUCCESS]:"",[Xt.WEBAPI_ERR_DOCKER_BAD_PARAMETER]:[v,"error","error_error_system"],[Xt.WEBAPI_ERR_DOCKER_UNKOWN]:[v,"error","error_error_system"],[Xt.WEBAPI_ERR_CONTAINER_FAIL_ATTACH]:[v,"error","error_error_system"],[Xt.WEBAPI_ERR_CONTAINER_NOT_EXIST]:[w,"error","container_not_exist"],[Xt.WEBAPI_ERR_CONTAINER_CONFLICT]:[v,"error","error_error_system"],[Xt.WEBAPI_ERR_CONTAINER_BAD_CMD_PARAM]:[w,"error","bad_cmd_param"],[Xt.WEBAPI_ERR_CONTAINER_IMPORT_IMAGE_ONLY]:[w,"notification","import_image"],[Xt.WEBAPI_ERR_CONTAINER_NAME_CONFLICT]:[w,"error","container_name_conflict"],[Xt.WEBAPI_ERR_CONTAINER_NO_CONNECTED_NETWORK]:[w,"error","container_no_connected_network"],[Xt.WEBAPI_ERR_CONTAINER_NONSUPPORTED_C2_BINDS]:[w,"error","c2_share_volume_binds"],[Xt.WEBAPI_ERR_IMAGE_CONFLICT]:[w,"error","image_delete_depend_error"],[Xt.WEBAPI_ERR_IMAGE_NOT_EXIST]:[w,"error","image_not_exist"],[Xt.WEBAPI_ERR_IMAGE_CREATE_PARSE_FAIL]:[w,"error","invalid_files_format"],[Xt.WS_ERR_CLIENT_ATTACH]:[w,"error","ws_client_attach"],[Xt.WS_ERR_EXEC_END]:[w,"error","ws_exec_end"],[Xt.WS_ERR_UNKNOWN]:[w,"error","ws_close"],[Xt.WS_ATTACH_SUCC]:"",[Xt.WS_ATTACH_CLIENT]:[w,"error","term_attach_fail"],[Xt.WS_ATTACH_FAIL_TTY]:[w,"error","term_attach_fail_tty"],[Xt.WEBAPI_ERR_NETWORK_NAME_CONFLCT]:[w,"error","network_exist"],[Xt.WEBAPI_ERR_NETWORK_CONNECT_DISCONNECT_FAIL]:[w,"error","network_connect_disconnect_fail"],[Xt.WEBAPI_ERR_NETWORK_CREATE_FAIL]:[w,"error","network_create_fail"],[Xt.WEBAPI_ERR_NETWORK_SUBNET4_DUPLICATE]:[w,"error","network_ipv4_subnet_duplicate"],[Xt.WEBAPI_ERR_NETWORK_SUBNET6_DUPLICATE]:[w,"error","network_ipv6_subnet_duplicate"],[Xt.WEBAPI_ERR_NETWORK_GATEWAY4_DUPLICATE]:[w,"error","network_ipv4_gateway_duplicate"],[Xt.WEBAPI_ERR_NETWORK_GATEWAY6_DUPLICATE]:[w,"error","network_ipv6_gateway_duplicate"],[Xt.WEBAPI_ERR_NETWORK_GATEWAY4_OUTOFRANGE]:[w,"error","network_ipv4_gateway_outofrange"],[Xt.WEBAPI_ERR_NETWORK_GATEWAY6_OUTOFRANGE]:[w,"error","network_ipv6_gateway_outofrange"],[Xt.WEBAPI_ERR_NETWORK_SUBNET_OVERLAP]:[w,"error","network_subnet_overlap"],[Xt.WEBAPI_ERR_NETWORK_NOT_FOUND]:[w,"error","network_not_found"],[Xt.WEBAPI_CORE_ERR_SHARE_SPACE_NOT_ENOUGH]:[w,"error","space_not_enough"]};function Qt(e){const[t,...i]=Jt[e]||[];return t?t(...i):""}var ei=i(5161),ti=i.n(ei);const ii={OVERVIEW:"overview",PROJECT_LIST:"project-list",PROJECT_DETAIL:"project-detail",CONTAINER_LIST:"container-list",CONTAINER_DETAIL:"container-detail",REGISTRY:"registry",IMAGE_LIST:"image-list",IMAGE_DETAIL:"image-detail",NETWORK:"network",LOG:"log"},ni=ti()(ii),oi={CREATED:"CREATED",RUNNING:"RUNNING",RUNNING_HEALTHY:"RUNNING-HEALTHY",RUNNING_UNHEALTHY:"RUNNING-UNHEALTHY",STOPPED:"STOPPED",STOPPED_ERROR_EXIT:"STOPPED-ERROR-EXIT",FAIL_TO_RUN:"FAIL-TO-RUN",RESTARTING:"RESTARTING"},ri=[oi.RESTARTING,oi.FAIL_TO_RUN,oi.STOPPED_ERROR_EXIT,oi.RUNNING_UNHEALTHY,oi.RUNNING_HEALTHY,oi.RUNNING,oi.STOPPED,oi.CREATED],si={IN_USED:"IN_USED",UN_USED:"UN_USED",DOWNLOADING:"DOWNLOADING",UPGRADING:"UPGRADING"},ai={BUILDING:"BUILDING",BUILD_FAILED:"BUILD_FAILED",CREATED:"CREATED",RUNNING:"RUNNING",WARNING:"WARNING",FAILURE:"ERROR",STOPPED:"STOPPED"},li=[ai.BUILDING,ai.BUILD_FAILED,ai.FAILURE,ai.WARNING,ai.RUNNING,ai.STOPPED,ai.CREATED],ci="#057FEB",di="#057feb33",hi=["#2693FF","#EB5E81","#FAAF00","#26BFBF","#FF8000","#996DF2","#81CC3D","#BC8E59","#F98383","#B9B57F"],ui={LOADING:"LOADING",SUCCESS:"SUCCESS",ERROR:"ERROR"},gi=["AUDIT_WRITE","CHOWN","DAC_OVERRIDE","FOWNER","FSETID","KILL","MKNOD","NET_BIND_SERVICE","NET_RAW","SETFCAP","SETGID","SETPCAP","SETUID","SYS_CHROOT"],pi=["AUDIT_CONTROL","AUDIT_READ","BLOCK_SUSPEND","BPF","CHECKPOINT_RESTORE","DAC_READ_SEARCH","IPC_LOCK","IPC_OWNER","LEASE","LINUX_IMMUTABLE","MAC_ADMIN","MAC_OVERRIDE","NET_ADMIN","NET_BROADCAST","PERFMON","SYS_ADMIN","SYS_BOOT","SYS_MODULE","SYS_NICE","SYS_PACCT","SYS_PTRACE","SYS_RAWIO","SYS_RESOURCE","SYS_TIME","SYS_TTY_CONFIG","SYSLOG","WAKE_ALARM"],mi=[...gi,...pi],fi={HTTP:"http",HTTPS:"https"};var _i={methods:{getContainerStatusColor({status:e,exporting:t}){if(t)return"blue";switch(e){case oi.RUNNING:case oi.RUNNING_HEALTHY:return"green";case oi.RUNNING_UNHEALTHY:return"orange";case oi.STOPPED_ERROR_EXIT:case oi.FAIL_TO_RUN:return"red";case oi.STOPPED:case oi.CREATED:case oi.RESTARTING:default:return}},getContainerStatusType:({status:e,loading:t})=>e===oi.RESTARTING||t?"loading":void 0,getContainerStatusTooltip({status:e,loading:t,exporting:i,humanUpFor:n,exitCode:o,error:r,created:s,latestHealthLog:a}){if(i)return w("container","exporting_tip");if(e===oi.RESTARTING)return w("container","status_restarting");if(t)return v("common","loading");switch(e){case oi.CREATED:return SYNO.SDS.formatString(w("container","created_tip"),SYNO.SDS.DateTimeFormatter(new Date(1e3*s)));case oi.RUNNING:return SYNO.SDS.formatString(w("container","running_tip"),n);case oi.RUNNING_HEALTHY:return SYNO.SDS.formatString(w("container","running_healthy_tip"),n);case oi.RUNNING_UNHEALTHY:return SYNO.SDS.formatString(w("container","running_unhealthy_tip"),n)+(a.length>0?`: ${a}`:"");case oi.STOPPED:return w("container","stopped_tip");case oi.STOPPED_ERROR_EXIT:case oi.FAIL_TO_RUN:return SYNO.SDS.formatString(w("container","error_tip"),o,r);default:return}},containerLocalSortFunc({field:e,sort:t}){switch(e){case"status":return({status:e,exporting:i,loading:n},{status:o,exporting:r,loading:s})=>{let a,l;return a=n?-1:i?ri.length:ri.indexOf(e),l=s?-1:r?ri.length:ri.indexOf(o),"DESC"===t?a<l?1:-1:"ASC"===t?a<l?-1:1:0};case"project":return({project:e},{project:i})=>{const{name:n=""}=e||{},{name:o=""}=i||{};return"DESC"===t?n<o?1:-1:"ASC"===t?n<o?-1:1:0};default:return}}}};const{WEBAPI_ERR_MIGRATE_IMPORT:vi}=Xt,bi={CPU:"CPU",RAM:"RAM",NET:"NET"},wi={EMPTY:"EMPTY",STOPPED:"STOPPED",GOOD:"GOOD",WARNING:"WARNING",FAILURE:"FAILURE",PROCESS:"PROCESS"},yi=[wi.FAILURE,wi.WARNING,wi.GOOD,wi.STOPPED,wi.EMPTY];var Ci={inject:["_T","_TT","_ERROR_MESSAGE","_STRING_FORMAT","ICON_NAME","PAGE_KEYS","getWindowOrAppWindow"],mixins:[_i],components:{OverviewCpuChart:Z,OverviewRamChart:Q,OverviewNetChart:ie,Dot:se,Icon:Zt},computed:{...(0,g.mapState)(["migrate"]),...(0,g.mapGetters)("images",["count","totalSize","inUseSize","unusedImageNames","updatableImageNames"]),...(0,g.mapGetters)("projects",{_projects:"rows"}),...(0,g.mapGetters)("containers",{_containers:"rows"}),containers(){return[...this._containers].sort((({status:e,exporting:t},{status:i,exporting:n})=>(t?ri.length:ri.indexOf(e))<(n?ri.length:ri.indexOf(i))?-1:1))},projects(){return[...this._projects].sort((({status:e},{status:t})=>li.indexOf(e)<li.indexOf(t)?-1:1))},projectsAreRunning(){return this.projects.filter((({status:e})=>e!==ai.STOPPED))},projectsAreWarning(){return this.projects.filter((({status:e})=>e===ai.WARNING))},projectsAreError(){return this.projects.filter((({status:e})=>[ai.FAILURE,ai.BUILD_FAILED].includes(e)))},projectsSummaryStatus(){return this.projectsAreError.length>0?wi.FAILURE:this.projectsAreWarning.length>0?wi.WARNING:0===this.projects.length?wi.EMPTY:0===this.projectsAreRunning.length?wi.STOPPED:wi.GOOD},containersAreRunning(){return this.containers.filter((({status:e})=>[oi.RUNNING,oi.RUNNING_HEALTHY,oi.RUNNING_UNHEALTHY,oi.RUNNING_EXPORTING].includes(e)))},containersAreWarning(){return this.containers.filter((({status:e})=>[oi.RUNNING_UNHEALTHY].includes(e)))},containersAreError(){return this.containers.filter((({status:e})=>[oi.STOPPED_ERROR_EXIT,oi.FAIL_TO_RUN].includes(e)))},containersSummaryStatus(){return this.containersAreError.length>0?wi.FAILURE:this.containersAreWarning.length>0?wi.WARNING:0===this.containers.length?wi.EMPTY:0===this.containersAreRunning.length?wi.STOPPED:wi.GOOD},summaryStatus(){if(this.progress.migrating)return wi.PROCESS;if(this.migrate.containers.length>0)return wi.WARNING;const[e]=[this.containersSummaryStatus,this.projectsprojectsSummaryStatus].sort(((e,t)=>yi.indexOf(e)<yi.indexOf(t)));return e||wi.EMPTY},summaryStatusIconName(){switch(this.summaryStatus){case wi.EMPTY:case wi.STOPPED:return Ut.EMPTY_CONTAINER;case wi.PROCESS:return Ut.STATUS_PROCESS;case wi.FAILURE:return Ut.STATUS_ERROR;case wi.WARNING:return Ut.STATUS_WARNING;case wi.GOOD:default:return Ut.STATUS_SUCCESS}},summaryStatusIconClass(){return{"overview-panel-infomation-status-no-service-icon":[wi.EMPTY,wi.STOPPED].includes(this.summaryStatus)}},summaryStatusTitle(){if(this.progress.migrating)return SYNO.SDS.formatString(w("migrater","migrating"),this.migratingPercent);if(this.migrate.containers.length>0)return w("migrater","attention_required");switch(this.summaryStatus){case wi.STOPPED:return w("overview","no_services_running");case wi.EMPTY:default:return w("overview","no_services_exist");case wi.GOOD:return w("container","healthy");case wi.WARNING:return v("error","error_system_abnormal_warning");case wi.FAILURE:return v("error","error_error")}},summaryStatusDescription(){if(this.progress.migrating)switch(this.progress.state){case"pulling-image":return SYNO.SDS.formatString(w("migrater","pulling_image"),this.migratingContainerImage);case"creating-container":return SYNO.SDS.formatString(w("migrater","creating_container"),this.migratingContainerName);case"cleanup":return w("migrater","cleanup");default:return""}if(this.migrate.containers.length>0)return SYNO.SDS.formatString(w("migrater","attention_required_desc"),this.migrate.containers.length||0);switch(this.summaryStatus){case wi.EMPTY:case wi.STOPPED:default:return"";case wi.GOOD:return w("overview","services_running_well_desc");case wi.WARNING:return w("overview","services_attention_desc");case wi.FAILURE:return w("overview","services_error_desc")}},projectRowText(){switch(this.projectsSummaryStatus){case wi.EMPTY:default:return w("overview","no_project");case wi.STOPPED:return w("overview","no_project_running");case wi.GOOD:return SYNO.SDS.formatString(w("overview","projects_running"),this.projectsAreRunning.length);case wi.WARNING:return SYNO.SDS.formatString(w("overview","partial_projects_warning"),this.projectsAreWarning.length,this.projectsAreRunning.length);case wi.FAILURE:return SYNO.SDS.formatString(w("overview","partial_projects_error"),this.projectsAreError.length,this.projectsAreRunning.length)}},containerRowText(){switch(this.containersSummaryStatus){case wi.EMPTY:default:return w("overview","no_container_here");case wi.STOPPED:return w("overview","no_container_running");case wi.GOOD:return SYNO.SDS.formatString(w("overview","containers_running"),this.containersAreRunning.length);case wi.WARNING:return SYNO.SDS.formatString(w("overview","partial_containers_warning"),this.containersAreWarning.length,this.containersAreRunning.length);case wi.FAILURE:return SYNO.SDS.formatString(w("overview","partial_containers_error"),this.containersAreError.length,this.containers.length)}},humanTotalSize(){return x(this.totalSize)},humanTotalSizeUnit(){return` ${E(this.totalSize)}`},humanUnusedSize(){return x(this.totalSize-this.inUseSize)},humanUnusedSizeUnit(){return E(this.totalSize-this.inUseSize)},migratingContainerName(){if(!this.progress.migrating)return"";const e=this.progress.container;return e.Name.startsWith("/")?e.Name.substr(1):e.Name},migratingContainerImage(){return this.progress.migrating?this.progress.container.Config.Image:""},migratingPercent(){return this.progress.migrating?this.progress.finished?100:0===this.progress.total?99:Math.round(100*(this.progress.current-.5)/this.progress.total):0}},watch:{migrate:{deep:!0,handler({task_id:e}){this.pollingData({task_id:e})}},resource:{immediate:!0,async handler(){await this.$nextTick();const e=_()(this,"$refs.chart.max",0);this.stats.headerText=this.getStatsHeaderText(e)}}},data(){const e=[{color:"#FAAF00",name:w("common","sent")},{color:"#26BFBF",name:w("common","received")}],t={[bi.CPU]:"CPU",[bi.RAM]:w("common","memory"),[bi.NET]:w("common","network")};return{progress:{pollingId:"",finished:!0,migrating:!1,current:-1,total:-1,state:"",container:{}},OVERVIEW_STATUS:wi,RESOURCE_KEY:bi,RESOURCES:t,NETWORK_LEGENDS:e,resource:bi.CPU,stats:{headerText:""}}},beforeDestroy(){this.progress.pollingId&&SYNO.API.Request.Polling.Unregister(this.progress.pollingId)},methods:{...(0,g.mapActions)(["fetchMigrateStatus"]),...(0,g.mapActions)("images",["fetchImageList","deleteImageList","updateImageList"]),migratable(){return this.migrate.container.length>0},openMigraterDialog(){const{window:e}=this.getWindowOrAppWindow().openModalWindow(SYNO.SDS.Docker.Modals.Migrater,{containers:this.migrate.containers||[],errors:this.migrate.errors||{}});e.$on("close",(({payload:{confirm:e,task_id:t}})=>{e&&this.pollingData({task_id:t})}))},async pollingData({task_id:e=""}){if(!e)return!1;this.progress.migrating=!0,await new Promise(((t,i)=>{const n=SYNO.API.Request.Polling.Register({webapi:{api:"SYNO.Docker.Migrate",method:"import_status",version:1,params:{task_id:e}},status_callback:(e,o={})=>{if(!e){const{code:e,errors:t}=o;return e===vi&&this.showMigratedToast(t.total-t.count,t.count),SYNO.API.Request.Polling.Unregister(n),void i({code:e,errors:t})}const{finished:r,total:s}=o;if(r)return this.showMigratedToast(s,0),SYNO.API.Request.Polling.Unregister(n),void t(o);const{containers:a=[],current:l,state:c}=o;this.progress.current=l,this.progress.state=c,this.progress.total=s,this.progress.container=a[l-1],this.progress.finished=r},interval:5,immediate:!0});this.progress.pollingId=n}));try{await this.fetchMigrateStatus()}catch(e){const t=this._ERROR_MESSAGE(e);await this.getWindowOrAppWindow().getMsgBox().alert("",t)}return this.progress.migrating=!1,!0},showMigratedToast(e=0,t=0){let i="";i=0===t?SYNO.SDS.formatString(this._TT("migrater","success_toast"),e):0===e?SYNO.SDS.formatString(this._TT("migrater","failure_toast"),t):SYNO.SDS.formatString(this._TT("migrater","partial_success_toast"),e,t),this.getWindowOrAppWindow().getToastBox(i,!1,null,{delay:3e3})},async onImageCleanup(){if("confirm"===await this.getWindowOrAppWindow().getMsgBox().confirmDelete("",SYNO.SDS.formatString(w("image","clenup_confirm_text"),`<b>${this.unusedImageNames.join(", ")}</b>`),void 0,{useHtml:!0})){try{await this.deleteImageList(this.unusedImageNames)}catch(e){const t=this._ERROR_MESSAGE(e);return void await this.getWindowOrAppWindow().getMsgBox().alert("",t)}this.fetchImageList(),this.getWindowOrAppWindow().getToastBox(1===this.unusedImageNames.length?SYNO.SDS.formatString(w("image","a_image_deleted_toast"),this.unusedImageNames[0]):SYNO.SDS.formatString(w("image","images_deleted_toast"),this.unusedImageNames.length))}},getProjectColorByStatus(e){switch(e){case ai.RUNNING:return"green";case ai.WARNING:return"orange";case ai.FAILURE:case ai.BUILD_FAILED:case ai.CREATED:return"red";default:return}},getStatsHeaderText(e=0){const t=E(e);switch(this.resource){case bi.CPU:return w("project","total_cpu_usage");case bi.RAM:return SYNO.SDS.formatString(w("project","total_memory_usage"),t);case bi.NET:return SYNO.SDS.formatString(w("common","total_network"),t)}},onMaxChange(e=0){this.stats.headerText=this.getStatsHeaderText(e)},async onResize(){if(await this.$nextTick(),!d()(this,"$refs.chart.$refs.chart.chart"))return;const{chart:e}=this.$refs.chart.$refs.chart;e.resize()}}},Si=(i(9285),j(Ci,m,[],!1,null,null,null));Si.options.__file="src/pages/Overview/Overview.vue";var ki=Si.exports,xi=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-spin",{attrs:{spinning:!e.loading,tip:e._T("common","loading")}},[0===e._rows.length?i("v-empty-view",{attrs:{icon:e.ICON_PROP.EMPTY_PROJECT,text:e._TT("project","project_empty_text")},on:{"action-click":e.openProjectCreateWizard}}):i("v-panel",{staticClass:"docker-table-list docker-project-list",attrs:{"syno-id":"project-project-panel-0",tbar:"",fbar:!1},scopedSlots:e._u([{key:"tbar",fn:function(){return[i("v-button",{attrs:{"syno-id":"project-project-button-0"},on:{click:e.openProjectCreateWizard}},[e._v("\n                "+e._s(e._T("common","create"))+"\n            ")]),e._v(" "),i("v-button",{attrs:{"syno-id":"project-project-button-1",disabled:!e.singleSelectedRow||e.singleSelectedRow.deleting},on:{click:function(t){return e.goProjectDetailPage(e.singleSelectedProjectId)}}},[e._v("\n                "+e._s(e._TT("container","detail"))+"\n            ")]),e._v(" "),i("v-button",{attrs:{"syno-id":"project-project-button-2",type:"dropdown",disabled:!e.singleSelectedRow||e.singleSelectedRow.loading},scopedSlots:e._u([{key:"dropdown",fn:function(){return[i("v-button-dropdown",[i("project-action-menu",{attrs:{"project-id":e.singleSelectedProjectId,"project-name":e.singleSelectedProjectName,status:e.singleSelectedStatus},on:{"go-page":function(t){return e.$emit("go-page",t)}}})],1)]},proxy:!0}])},[e._v("\n                "+e._s(e._T("common","action"))+"\n                ")])]},proxy:!0},{key:"tbar-right",fn:function(){return[i("v-search-input",{attrs:{"syno-id":"project-list-search-input",placeholder:e._TT("registry","search"),clearable:!0},on:{input:e.onSearchInput},model:{value:e.state.keyword,callback:function(t){e.$set(e.state,"keyword",t)},expression:"state.keyword"}})]},proxy:!0},{key:"body",fn:function(){return[i("v-data-table",{staticClass:"h100p",attrs:{"syno-id":"project-project-data-table-0",pagination:!1,columns:e.columns,"current-data":e.rows,"local-sort-func":e.localSortFunc,"cell-tooltip-default-props":{overflowOnly:!0}},on:{"selected-change":function(t){e.selectedData=t},dataloaded:function(t){e.selectedData=[]},rowdblclick:function(t){return e.goProjectDetailPage(e.singleSelectedProjectId)},"cell-contextmenu":e.onContextMenu,refresh:function(t){return e.fetchProjectList()}},scopedSlots:e._u([{key:"status",fn:function(t){var n=t.data,o=t.row;return[i("Dot",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.getProjectStatusText(o),expression:"getProjectStatusText(row)"}],attrs:{color:e.getProjectColorByStatus(n),type:e.getProjectTypeByStatus(o)}})]}},{key:"name",fn:function(t){var n=t.row,o=n.id,r=n.name,s=n.deleting,a=n.is_package;return[i("div",{staticClass:"docker-project-name"},[i("span",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{overflowOnly:!0,content:r},expression:"{\n                                overflowOnly: true,\n                                content: name\n                            }"}],class:{"docker-project-name-link":!0,link:!s},on:{click:function(t){return e.goProjectDetailPage(o)}}},[e._v("\n                            "+e._s(r)+"\n                        ")]),e._v(" "),a?i("v-whitetip",{attrs:{size:"small",content:e._TT("container","package_deny_operation")}}):e._e()],1)]}},{key:"containers",fn:function(t){var n=t.data;return[i("v-whitetip",{attrs:{size:"small","force-simple":"","tooltip-options":{disabled:0===n.length}},scopedSlots:e._u([{key:"custom",fn:function(){return[i("span",{staticClass:"container-count link"},[e._v(e._s(n&&n.length||0))])]},proxy:!0}],null,!0)},[e._v(" "),i("div",{staticClass:"docker-package docker-status-tip-wrapper"},e._l(n,(function(t){var n=t.name,o=t.status;return i("div",{key:n,staticClass:"docker-status-tip",on:{click:function(t){return e.$emit("go-page",{page:e.PAGE_KEYS.CONTAINER_DETAIL,name:n})}}},[i("Dot",{attrs:{color:e.getContainerColorByStatus(o)}}),e._v(" "),i("span",{staticClass:"docker-status-tip-name link"},[e._v(e._s(n))])],1)})),0)])]}},{key:"created_at",fn:function(t){var i=t.data;return[e._v("\n                    "+e._s(e.getHumanCreatedAt(i))+"\n                ")]}},{key:"action",fn:function(t){var n=t.row,o=n.id,r=n.name,s=n.status,a=n.link,l=n.enable_service_portal;return[[e.PROJECT_STATUS.BUILDING,e.PROJECT_STATUS.FAILURE,e.PROJECT_STATUS.BUILD_FAILED].includes(s)?i("icon",{attrs:{name:e.ICON_NAME.ACTION_CONSOLE},nativeOn:{click:function(t){return function(){return e.openProjectActionLogDialog({projectId:o,projectName:r})}.apply(null,arguments)}}}):[e.PROJECT_STATUS.RUNNING,e.PROJECT_STATUS.WARNING].includes(s)?l&&a?i("a",{attrs:{href:a,target:"_blank"}},[i("icon",{attrs:{name:e.ICON_NAME.ACTION_GO_TO}})],1):e._e():void 0]}}])}),e._v(" "),e.isContextMenuShown?i("v-portal",{attrs:{"mount-to":"body","target-style":e.portalStyles}},[i("project-action-menu",e._b({directives:[{name:"clickoutside",rawName:"v-clickoutside",value:e.clickoutside,expression:"clickoutside"}],on:{"menu-close":function(t){e.isContextMenuShown=!1},"go-page":function(t){return e.$emit("go-page",t)}}},"project-action-menu",e.contextMenuProps,!1))],1):e._e()]},proxy:!0}])})],1)};xi._withStripped=!0;var Li=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-menu",{attrs:{"syno-id":"project-project-menu-0","close-on-select":""},on:{"menu-close":function(t){return e.$emit("menu-close")}}},[i("v-menu-item",{attrs:{"syno-id":"project-project-menu-item-0",title:e._TT("common","build"),disabled:!e.buildable},on:{click:e.openProjectBuildDialog}}),e._v(" "),e.hideStart?e._e():i("v-menu-item",{attrs:{"syno-id":"project-project-menu-item-1",title:e._TT("container","start"),disabled:!e.startable},on:{click:e.openProjectStartDialog}}),e._v(" "),e.hideStop?e._e():i("v-menu-item",{attrs:{"syno-id":"project-project-menu-item-2",title:e._TT("container","stop"),disabled:!e.stopable},on:{click:e.openProjectStopDialog}}),e._v(" "),i("v-menu-item",{attrs:{"syno-id":"project-project-menu-item-3",title:e._TT("container","restart"),disabled:!e.restartable},on:{click:e.openProjectRestartDialog}}),e._v(" "),i("v-menu-item",{attrs:{"syno-id":"project-project-menu-item-2",title:e._TT("common","clean"),disabled:!e.downable},on:{click:e.openProjectCleanDialog}}),e._v(" "),i("v-menu-item",{attrs:{"syno-id":"project-project-menu-item-4",title:e._TT("container","delete"),disabled:!e.deletable},on:{click:function(t){return e.deleteProject()}}}),e._v(" "),i("v-menu-divider",{attrs:{"syno-id":"project-project-menu-divider-0"}}),e._v(" "),e.hideDetail?e._e():i("v-menu-item",{attrs:{"syno-id":"project-project-menu-item-5",title:e._TT("container","detail"),disabled:!e.status},on:{click:function(t){return e.goProjectDetailPage()}}}),e._v(" "),i("v-menu-item",{attrs:{"syno-id":"project-project-menu-item-6",disabled:!e.terminalable,title:e._TT("common","terminal_action")},on:{click:function(t){return e.openProjectActionLogDialog()}}})],1)};Li._withStripped=!0;var Ei=i(2628),Ni=i.n(Ei),Ii=i(1469),Ti=i.n(Ii);function Di(e){return"[object Object]"===Object.prototype.toString.call(e)}function Ai(e,t){return Ti()(t)?t.reduce(((e,t)=>e[t]),e):t.split("/").reduce(((e,t)=>e[t]),e)}function Oi(e,t){return Array.isArray(t)?t.reduce(((t,i)=>Object.assign(t,{[i](){const t=Ai(this.$store.state,e(this));return t&&t[i]}})),{}):Di(t)?Object.entries(t).reduce(((t,[i,n])=>Object.assign(t,{[i](){const t=Ai(this.$store.state,e(this));return"function"==typeof n?n.call(this,t):t[n]}})),{}):(console.warn("mapInstanceState requires an array or object as the second argument"),{})}function Mi(e,t){return Array.isArray(t)?t.reduce(((t,i)=>Object.assign(t,{[i](){return this.$store.getters[`${e(this)}/${i}`]}})),{}):Di(t)?Object.entries(t).reduce(((t,[i,n])=>Object.assign(t,{[i](){return this.$store.getters[`${e(this)}/${n}`]}})),{}):(console.warn("mapInstanceGetters requires an array or object as the second argument"),{})}function Ri(e,t){return Array.isArray(t)?t.reduce(((t,i)=>Object.assign(t,{[i](t){return this.$store.dispatch(`${e(this)}/${i}`,t)}})),{}):Di(t)?Object.entries(t).reduce(((t,[i,n])=>Object.assign(t,{[i](t){return this.$store.dispatch(`${e(this)}/${n}`,t)}})),{}):(console.warn("mapInstanceActions requires an array or object as the second argument"),{})}const Pi="BUILD",Fi="START",Bi="STOP",Wi="RESTART",Vi="CLEAN",zi="LOG";var ji={inject:["_ERROR_MESSAGE","getWindowOrAppWindow"],props:{onProjectDeleted:{type:Function,default:()=>{}}},computed:{...Mi((({projectId:e})=>`projects/byId/${e}`),["buildable","startable","stopable","downable","restartable","deletable","terminalable"])},methods:{...(0,g.mapActions)("projects",{actionDeleteProject:"deleteProject",fetchProjectDetail:"fetchProjectDetail"}),getDialogClass(e){switch(e){case Pi:return SYNO.SDS.Docker.Project.ProjectBuildDialog;case Fi:return SYNO.SDS.Docker.Project.ProjectStartDialog;case Bi:return SYNO.SDS.Docker.Project.ProjectStopDialog;case Wi:return SYNO.SDS.Docker.Project.ProjectRestartDialog;case Vi:return SYNO.SDS.Docker.Project.ProjectCleanDialog;case zi:return SYNO.SDS.Docker.Project.ProjectActionLogDialog;default:return null}},openActionDialog(e,{projectId:t=this.projectId,projectName:i=this.projectName||this.name,...n}={}){const o=this.getDialogClass(e);if(!o)return!1;this.$emit("update:isOpen",!1);const{window:r}=this.getWindowOrAppWindow().openModalWindow(o,{projectId:t,projectName:i,...n});r.$on("close",(()=>this.fetchProjectDetail({id:t})))},openProjectBuildDialog(e){return this.openActionDialog(Pi,e)},openProjectStartDialog(e){return this.openActionDialog(Fi,e)},openProjectStopDialog(e){return this.openActionDialog(Bi,e)},openProjectRestartDialog(e){return this.openActionDialog(Wi,e)},openProjectCleanDialog(e){return this.openActionDialog(Vi,e)},openProjectActionLogDialog(e){return this.openActionDialog(zi,e)},goProjectDetailPage(e=this.projectId){var t;this.$emit("update:isOpen",!1),e&&((null===(t=this.$store.state.projects.byId[e])||void 0===t?void 0:t.deleting)||this.$emit("go-page",{page:ii.PROJECT_DETAIL,projectId:e}))},async deleteProject({projectId:e=this.projectId,projectName:t=this.projectName}={}){if(this.$emit("update:isOpen",!1),e&&t){if("confirm"!==await this.getWindowOrAppWindow().getMsgBox().confirmDelete("",SYNO.SDS.formatString(w("project","project_delete_confirm_text"),t),void 0,{useHtml:!0}))return!1;try{await this.actionDeleteProject(e)}catch(e){const t=this._ERROR_MESSAGE(e);await this.getWindowOrAppWindow().getMsgBox().alert("",t)}this.onProjectDeleted(),this.getWindowOrAppWindow().getToastBox(SYNO.SDS.formatString(w("project","deleted_toast"),t))}}}},Hi=j({inject:["_T","_TT"],mixins:[ji],props:{hideStart:{type:Boolean,default:!1},hideStop:{type:Boolean,default:!1},hideDetail:{type:Boolean,default:!1},projectId:{type:String},projectName:{type:String},status:{type:String,validator:Ni()(ai)}},computed:{}},Li,[],!1,null,null,null);Hi.options.__file="src/pages/Project/Shared/ActionMenu/ProjectActionMenu.vue";var Ui=Hi.exports,$i={inject:["_T","_TT","_ERROR_MESSAGE","PROJECT_STATUS","PAGE_KEYS","ICON_PROP","ICON_NAME","getAppWindow"],mixins:[ji],components:{Dot:se,Icon:Zt,ProjectActionMenu:Ui},computed:{...(0,g.mapState)("projects",["loading"]),...(0,g.mapGetters)("projects",{_rows:"rows"}),rows(){return this._rows.filter((({name:e="",path:t=""})=>[e,t].some((e=>e.includes(this.state.keyword))))).map(((e={})=>({...e,_rowInfo:{disabled:e.deleting}})))},columns:()=>[{title:v("common","status"),field:"status",width:73,align:"center",hideMenuItem:!0},{title:v("common","name"),field:"name",defaultWidth:"10%",tooltip:!0,hideMenuItem:!0},{title:w("project","project_path"),field:"path",defaultWidth:"20%",tooltip:!0,hideMenuItem:!0,disableSort:!0},{title:w("project","containers"),field:"containers",defaultWidth:"10%"},{title:w("common","created_at"),field:"created_at",defaultWidth:"20%",tooltip:!0},{title:v("common","action"),field:"action",width:36,disableSort:!0,hideMenuItem:!0}],portalStyles(){return{top:`${this.mouse.y}px`,left:`${this.mouse.x}px`}},selectedRows(){return this.selectedData.rows||[]},singleSelectedRow(){return this.selectedRows.length>0?this.selectedRows[0]:void 0},singleSelectedProjectId(){return this.singleSelectedRow?this.singleSelectedRow.id:void 0},singleSelectedProjectName(){return this.singleSelectedRow?this.singleSelectedRow.name:void 0},singleSelectedStatus(){return this.singleSelectedRow?this.singleSelectedRow.status:void 0}},data:()=>({state:{keyword:""},isContextMenuShown:!1,mouse:{x:0,y:0},contextMenuProps:{},selectedData:{}}),async mounted(){await this.$nextTick(),this.unregisters=await Promise.all([this.pollingProjectList()]).catch((async e=>{const t=this._ERROR_MESSAGE(e);return await this.getWindowOrAppWindow().getMsgBox().alert("",t),[]}))},beforeDestroy(){this.unregisters.forEach((e=>e&&e()))},methods:{...(0,g.mapActions)("projects",["fetchProjectList","pollingProjectList"]),openProjectCreateWizard(){const{window:e}=this.getAppWindow().openModalWindow(SYNO.SDS.Docker.Project.ProjectCreateWizard);e.$on("close",(async({payload:e})=>{const{success:t,id:i,name:n,services:o,is_run_instantly:r,should_go_webstation:s}=e;t&&this.onCreateProjectSuccess(e),r&&this.getAppWindow().openModalWindow(SYNO.SDS.Docker.Project.ProjectBuildDialog,{projectId:i,projectName:n}),s&&(await this.getAppWindow().getMsgBox().alert("",SYNO.SDS.formatString(this._TT("wizard","go_webstation_alert"),n),void 0,{useHtml:!0}),SYNO.SDS.AppLaunch("SYNO.SDS.WebStation.Application",{wizard:"create_service_portal",category:"Docker",services:o.map((({service:e})=>e))}))}))},async onCreateProjectSuccess({name:e}){try{await this.fetchProjectList()}catch(e){const t=this._ERROR_MESSAGE(e);return void this.getAppWindow().getMsgBox().alert("",t)}this.getAppWindow().getToastBox(SYNO.SDS.formatString(w("project","created_toast"),e))},clickoutside(){this.isContextMenuShown=!1,this.mouse.x=0,this.mouse.y=0,this.contextMenuProps={}},onContextMenu({id:e,name:t,status:i,loading:n},o,r,s,{pageX:a,pageY:l}){n||(this.isContextMenuShown=!0,this.contextMenuProps={projectId:e,projectName:t,status:i},this.mouse.x=a,this.mouse.y=l)},getProjectColorByStatus(e){switch(e){case ai.RUNNING:return"green";case ai.WARNING:return"orange";case ai.FAILURE:case ai.BUILD_FAILED:return"red";case ai.CREATED:default:return}},getProjectTypeByStatus({status:e,loading:t}){if(t)return"loading";switch(e){case ai.BUILDING:return"loading";default:return}},getProjectStatusText({status:e,loading:t,containers:i}){if(e===ai.BUILDING)return w("project","starting");if(t)return v("common","loading");switch(e){case ai.BUILD_FAILED:return w("project","build_failed");case ai.CREATED:return w("project","created");case ai.RUNNING:return w("container","status_running");case ai.WARNING:return w("project","partial_running");case ai.FAILURE:{const e=i.filter((({status:e})=>[oi.STOPPED_ERROR_EXIT,oi.FAIL_TO_RUN].includes(e))).length;return String.format(w("project","partial_fail_to_run"),e)}case ai.STOPPED:return w("container","status_stopped")}},getContainerColorByStatus(e){switch(e){case oi.RUNNING:case oi.RUNNING_HEALTHY:return"green";case oi.RUNNING_UNHEALTHY:return"orange";case oi.STOPPED_ERROR_EXIT:case oi.FAIL_TO_RUN:return"red";case oi.STOPPED:case oi.CREATED:default:return}},getHumanCreatedAt:e=>SYNO.SDS.DateTimeFormatter(new Date(e)),localSortFunc({field:e,sort:t}){switch(e){case"status":return({status:e,loading:i},{status:n,loading:o})=>{const r=i?-1:li.indexOf(e),s=o?-1:li.indexOf(n);return"DESC"===t?r<s?1:-1:"ASC"===t?r<s?-1:1:0};default:return}}}},Ki=(i(3098),j($i,xi,[],!1,null,null,null));Ki.options.__file="src/pages/Project/List/ProjectList.vue";var qi=Ki.exports,Gi=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("StatusPanel",{staticClass:"docker-project-detail",attrs:{title:e.name,description:e.path,"icon-name":e.ICON_NAME.PROJECT_28,"icon-color":e.iconColor,"icon-type":e.iconType,"icon-tip-disabled":!1,"icon-tip-content":e.getProjectStatusText()},on:{"back-page":function(t){return e.$emit("back-page")}},scopedSlots:e._u([{key:"header-actions",fn:function(){return[e.startable?i("v-button",{attrs:{disabled:!e.loaded,"syno-id":"detail-project-detail-button-0"},on:{click:function(t){return e.openProjectStartDialog()}}},[e._v("\n            "+e._s(e._TT("container","start"))+"\n        ")]):e.stopable?i("v-button",{attrs:{disabled:!e.loaded,"syno-id":"project-project-detail-button-0"},on:{click:function(t){return e.openProjectStopDialog()}}},[e._v("\n            "+e._s(e._TT("container","stop"))+"\n        ")]):e._e(),e._v(" "),i("v-button",{attrs:{"syno-id":"project-project-button-2",type:"dropdown",disabled:!e.loaded},scopedSlots:e._u([{key:"dropdown",fn:function(){return[i("v-button-dropdown",[i("project-action-menu",{attrs:{"hide-start":e.startable,"hide-stop":!e.startable&&e.stopable,"hide-detail":"","project-id":e.projectId,"project-name":e.name,status:e.status,"on-project-deleted":e.onProjectDeleted},on:{"go-page":function(t){return e.$emit("go-page",t)}}})],1)]},proxy:!0}])},[e._v("\n            "+e._s(e._TT("container","action"))+"\n            ")])]},proxy:!0},e.is_package?{key:"docker-status-panel-header-title-slot",fn:function(){return[i("v-whitetip",{attrs:{size:"small",content:e._TT("container","package_deny_operation")}})]},proxy:!0}:null],null,!0)},[e._v(" "),e._v(" "),i("v-tabs",{attrs:{"syno-id":"project-project-detail-tabs-0",fbar:!1,beforeTabChange:e.beforeTabChange},on:{change:e.onTabChange},model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},e._l(e.TABS,(function(t){return i("v-tab-pane",{key:t.key,attrs:{"syno-id":"project-project-detail-tab-pane-"+t.key,"tab-key":t.key,tab:t.title}},[i(t.component,{key:e.random,ref:t.key,refInFor:!0,tag:"component",attrs:{"project-id":e.projectId,"project-name":e.name,stats:e.stats},on:{"go-page":function(t){return e.$emit("go-page",t)},"back-page":function(t){return e.$emit("back-page")},"project-updated":e.onProjectUpdated}})],1)})),1)],1)};Gi._withStripped=!0;var Yi=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-spin",{staticClass:"docker-status-panel",attrs:{spinning:e.loading,"only-mask":e.onlyMask,tip:e.loadingText}},[i("div",{staticClass:"docker-status-panel-header"},[i("div",{staticClass:"docker-status-panel-header-left"},[i("v-icon",{staticClass:"docker-status-panel-back-icon",attrs:{name:"pagination-left",type:"svg"},nativeOn:{click:function(t){return e.$emit("back-page")}}}),e._v(" "),i("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{content:e.iconTipContent,disabled:e.iconTipDisabled},expression:"{\n                    content: iconTipContent,\n                    disabled: iconTipDisabled\n                }"}],staticClass:"docker-status-panel-header-category"},[i("Icon",{staticClass:"docker-status-panel-header-category-icon",attrs:{name:e.iconName}}),e._v(" "),i("Dot",{staticClass:"docker-status-panel-header-category-status",attrs:{color:e.iconColor,type:e.iconType}})],1),e._v(" "),i("div",{staticClass:"docker-status-panel-header-text"},[i("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{content:e.title,overflowOnly:!0},expression:"{ content: title, overflowOnly: true }"}],staticClass:"docker-status-panel-header-title-wrapper"},[i("span",{staticClass:"docker-status-panel-header-title"},[e._v("\n                        "+e._s(e.title)+"\n                    ")]),e._v(" "),e._t("docker-status-panel-header-title-slot")],2),e._v(" "),i("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{overflowOnly:!0,content:e.description},expression:"{ overflowOnly: true, content: description }"}],staticClass:"docker-status-panel-header-description"},[e._t("description",(function(){return[e._v("\n                        "+e._s(e.description)+"\n                    ")]}))],2)])],1),e._v(" "),i("div",{staticClass:"docker-status-panel-header-right"},[i("v-toolbar",[e._t("header-actions")],2)],1)]),e._v(" "),i("div",{staticClass:"docker-status-panel-content"},[e._t("default")],2)])};Yi._withStripped=!0;var Zi={components:{Icon:Zt,Dot:se},props:{loading:{type:Boolean,default:!1},onlyMask:{type:Boolean},loadingText:{type:Boolean,default:_T("common","loading")},iconName:{type:String},iconColor:{type:String},iconType:{type:String},title:{type:String},description:{type:String},iconTipDisabled:{type:Boolean,default:!0},iconTipContent:{type:String,default:""}}},Xi=(i(5348),j(Zi,Yi,[],!1,null,null,null));Xi.options.__file="src/components/StatusPanel/StatusPanel.vue";var Ji=Xi.exports,Qi={data:()=>({random:Math.random()}),methods:{async forceRerender(){await this.$nextTick(),this.random=Math.random()}}},en=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-panel",{staticClass:"docker-project-detail-container-list",attrs:{"syno-id":"project-project-detail-panel-0",fbar:!1,loading:e.api_status===e.API_STATUS.LOADING||e.containerListApiStatus===e.API_STATUS.LOADING},scopedSlots:e._u([{key:"body",fn:function(){return[i("v-data-table",{staticClass:"h100p",attrs:{"syno-id":"project-project-detail-containers-tab-data-table-0",columns:e.columns,"current-data":e.rows,"cell-tooltip-default-props":{overflowOnly:!0},"local-sort-func":e.containerLocalSortFunc},on:{"selected-change":function(t){e.selectedData=t},dataloaded:function(t){e.selectedData=[]},rowdblclick:function(t){return e.$emit("go-page",{page:e.PAGE_KEYS.CONTAINER_DETAIL,name:e.singleSelectedContainerName})},refresh:function(t){return e.refresh()}},scopedSlots:e._u([{key:"status",fn:function(t){var n=t.row;return[i("Dot",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.getContainerStatusTooltip(n),expression:"getContainerStatusTooltip(row)"}],attrs:{color:e.getContainerStatusColor(n)}})]}},{key:"name",fn:function(t){var n=t.data;return[i("span",{staticClass:"link",on:{click:function(t){return e.$emit("go-page",{page:e.PAGE_KEYS.CONTAINER_DETAIL,name:n})}}},[e._v("\n                    "+e._s(n)+"\n                ")])]}},{key:"image",fn:function(t){var n=t.row,o=n.image,r=n.imageKey;return[i("span",{staticClass:"link",on:{click:function(t){return e.$emit("go-page",{page:e.PAGE_KEYS.IMAGE_DETAIL,name:r})}}},[e._v("\n                    "+e._s(o)+"\n                ")])]}},{key:"cpu",fn:function(t){var i=t.data;return[e._v("\n                "+e._s(i>0?i.toFixed(2)+"%":"-")+"\n            ")]}},{key:"ram",fn:function(t){var i=t.data;return[e._v("\n                "+e._s(i>0?e.getHumanFileSize(i):"-")+"\n            ")]}},{key:"empty-area",fn:function(){return[i("div",{staticClass:"empty-wrapper",domProps:{innerHTML:e._s(e._TT("project","no_containers_desc"))}})]},proxy:!0}])})]},proxy:!0}])})};en._withStripped=!0;var tn={inject:["_TT","PAGE_KEYS","API_STATUS"],mixins:[_i],components:{Dot:se},props:{projectId:{type:String,required:!0}},computed:{...(0,g.mapState)("cotnainers",{containerListApiStatus:"status"}),...Oi((({projectId:e})=>`projects/byId/${e}`),["api_status"]),...Mi((({projectId:e})=>`projects/byId/${e}`),{rows:"containers"}),columns:()=>[{title:v("common","status"),field:"status",width:72},{title:v("common","name"),field:"name",width:200,tooltip:!0},{title:w("common","image"),field:"image",tooltip:!0},{title:"CPU",field:"cpu",width:70},{title:w("common","memory"),field:"ram",width:75},{title:w("common","network"),field:"network",tip:w("project","network_usage_tip"),width:134}],selectedRows(){return this.selectedData.rows||[]},singleSelectedRow(){return this.selectedRows.length>0?this.selectedRows[0]:void 0},singleSelectedContainerName(){return this.singleSelectedRow?this.singleSelectedRow.name:void 0}},data:()=>({getHumanFileSize:k,selectedData:[]}),methods:{...(0,g.mapActions)("containers",["fetchContainerList"]),...(0,g.mapActions)("projects",["fetchProjectDetail"]),async refresh(){try{await this.fetchProjectDetail({id:this.projectId}),await this.fetchContainerList()}catch(e){const t=this._ERROR_MESSAGE(e);await this.getAppWindow().getMsgBox().alert("",t)}}}},nn=(i(1332),j(tn,en,[],!1,null,null,null));nn.options.__file="src/pages/Project/Detail/ProjectDetailContainersTab.vue";var on=nn.exports,rn=function(){var e=this,t=e.$createElement,i=e._self._c||t;return e.shouldShownStats?i("v-panel",{staticClass:"docker-project-detail-stats",attrs:{"syno-id":"project-project-detail-panel-0",fbar:!1,tbar:""},scopedSlots:e._u([{key:"tbar",fn:function(){return[i("div",{staticClass:"docker-project-detail-stats-header"},[i("v-form-item",{attrs:{label:e._TT("common","interval")}},[i("v-single-select",{attrs:{"syno-id":"detail-project-detail-stat-tab-single-select-0",width:200,options:e.options},model:{value:e.interval,callback:function(t){e.interval=t},expression:"interval"}})],1),e._v(" "),i("v-button-group",{attrs:{"syno-id":"detail-project-detail-stat-tab-button-group-0"}},e._l(e.RESOURCES,(function(t,n){return i("v-button",{key:n,attrs:{"syno-id":"detail-project-detail-stat-tab-button-"+n,active:e.resource===n},on:{click:function(t){e.resource=n}}},[e._v("\n                    "+e._s(t)+"\n                ")])})),1)],1)]},proxy:!0},{key:"scroll-body",fn:function(){return[i("div",{staticClass:"stats-content-wrapper"},[e.resource===e.RESOURCE_KEY.CPU?i("ProjectDetailStatsCpuChart",{ref:"chart",staticClass:"docker-project-detail-stats-chart",attrs:{"project-id":e.projectId,"is-legend-disabled":e.isLegendDisabled},on:{"update:is-legend-disabled":e.onUpdateIsLegendDisabled,initialized:e.onInitialized}}):e._e(),e._v(" "),e.resource===e.RESOURCE_KEY.RAM?i("ProjectDetailStatsRamChart",{ref:"chart",staticClass:"docker-project-detail-stats-chart",attrs:{"project-id":e.projectId,"is-legend-disabled":e.isLegendDisabled},on:{"update:is-legend-disabled":e.onUpdateIsLegendDisabled,initialized:e.onInitialized}}):e._e(),e._v(" "),e.resource===e.RESOURCE_KEY.NET?i("ProjectDetailStatsNetChart",{ref:"chart",staticClass:"docker-project-detail-stats-chart",attrs:{"project-id":e.projectId,"is-legend-disabled":e.isLegendDisabled},on:{"update:is-legend-disabled":e.onUpdateIsLegendDisabled,initialized:e.onInitialized}}):e._e(),e._v(" "),i("ProjectDetailStatsFooter",{ref:"footer",attrs:{"project-id":e.projectId,"is-legend-disabled":e.isLegendDisabled},on:{"legend-click":e.onFooterLegendClick}})],1)]},proxy:!0}])}):i("v-empty-view",{attrs:{"hide-action":"",icon:e.ICON_PROP.EMPTY_STATS,text:e._TT("project","stats_mask")}})};rn._withStripped=!0;var sn=i(690),an=i.n(sn),ln=i(7557),cn=i.n(ln),dn=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"docker-project-stats-panel"},[i("div",{staticClass:"docker-project-stats-panel-title"},[e._v(e._s(e.title))]),e._v(" "),i("Chart",{ref:"chart",staticClass:"docker-project-stats-panel-chart",attrs:{"x-axis-max":e.xAxisMax,"y-axis-min":e.yAxisMin,"y-axis-max":e.yAxisMax,"y-axis-label-formatter":e.yAxisLabelFormatter,series:e.series,value:e.value,"value-formatter":e.valueFormatter},on:{initialized:e.onInitialized}})],1)};dn._withStripped=!0;const hn={type:"line",showSymbol:!1,symbol:"circle",symbolSize:0};var un={components:{Chart:U},props:{title:{type:String,required:!0},projectId:{type:String,required:!0},isLegendDisabled:{type:Object,default:{}}},computed:{...(0,g.mapState)("containers",["statsTimestamps"]),...Mi((({projectId:e})=>`projects/byId/${e}`),["containers"]),isAllLegendDisabled(){return this.series.every((({id:e})=>this.isLegendDisabled[e]))},isChartEmpty(){return this.isAllLegendDisabled||0===this.value.length||this.value.some((e=>0===e.length))},xAxisMax(){var e;return null===(e=this.containers.find((({time:e})=>e)))||void 0===e?void 0:e.time},yAxisMax(){},yAxisMin(){},series(){return[{...hn,id:"_total_",name:w("common","total"),lineStyle:{width:0},areaStyle:{color:ci,opacity:.05},z:1,color:di},...this.containers.map((({id:e,name:t},i)=>({...hn,id:e,name:t,lineStyle:{color:hi[i%hi.length],width:2},z:i+2,color:hi[i%hi.length]})))]},value:()=>[]},methods:{onInitialized(){ce()(this.isLegendDisabled,((e,t)=>{this.$refs.chart.dispatchAction({type:e?"legendUnSelect":"legendSelect",name:t})})),this.$emit("initialized")},onLegendClick(e){this.isLegendDisabled[e]?(this.$refs.chart.dispatchAction({type:"legendSelect",name:e}),this.$emit("update:is-legend-disabled",{name:e,value:!1})):(this.$refs.chart.dispatchAction({type:"legendUnSelect",name:e}),this.$emit("update:is-legend-disabled",{name:e,value:!0}))},resize(){this.$refs.chart.resize()}}},gn=(i(2942),j(un,dn,[],!1,null,null,null));gn.options.__file="src/pages/Project/Detail/Stats/Charts/ProjectDetailStatsBaseChart.vue";var pn=gn.exports,mn=j({extends:pn,mixins:[cn()(G,"computed.series")],computed:{value(){const e=this.containers.map((({statsByTimestamp:e})=>this.statsTimestamps.map((t=>{var i;return[t,(null===(i=e[t])||void 0===i?void 0:i.cpu)||0]}))));return[an()(e).map((e=>e.reduce((([e,t],[i,n])=>[i,t+n])))),...e]}}},void 0,void 0,!1,null,null,null);mn.options.__file="src/pages/Project/Detail/Stats/Charts/ProjectDetailStatsCpuChart.vue";var fn=mn.exports,_n=j({extends:pn,computed:{...Mi((({projectId:e})=>`projects/byId/${e}`),["containers"]),title(){return SYNO.SDS.formatString(w("project","total_memory_usage"),C[this.sizeLevel])},yAxisMax(){return this.isChartEmpty?1024:void 0},yAxisMin(){return this.isChartEmpty?0:void 0},sizeBase(){return Math.pow(1024,this.sizeLevel)},sizeLevel(){return L(this.max)},max(){return this.total.map((([e,t])=>t)).reduce(((e,t)=>Math.max(e,t)),0)},total(){return an()(this.containerValue).map((e=>e.reduce((([e,t],[i,n])=>[i,t+n]))))},containerValue(){return this.containers.map((({statsByTimestamp:e})=>this.statsTimestamps.map((t=>{var i;return[t,(null===(i=e[t])||void 0===i?void 0:i.ram)||0]}))))},value(){return[this.total,...this.containerValue]}},methods:{valueFormatter:e=>k(e),yAxisLabelFormatter(e){return Math.floor(e/this.sizeBase)}}},void 0,void 0,!1,null,null,null);_n.options.__file="src/pages/Project/Detail/Stats/Charts/ProjectDetailStatsRamChart.vue";var vn=_n.exports,bn=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"docker-project-detail-network-stats-chart"},[i("ProjectDetailStatsNetDownloadChart",{ref:"downloadchart",staticClass:"docker-project-detail-network-download-stats-chart",attrs:{"project-id":e.projectId,"is-legend-disabled":e.isLegendDisabled},on:{"update:is-legend-disabled":function(t){return e.$emit("update:is-legend-disabled",t)},initialized:e.onInitialized}}),e._v(" "),i("ProjectDetailStatsNetUploadChart",{ref:"uploadchart",staticClass:"docker-project-detail-network-upload-stats-chart",attrs:{"project-id":e.projectId,"is-legend-disabled":e.isLegendDisabled},on:{"update:is-legend-disabled":function(t){return e.$emit("update:is-legend-disabled",t)},initialized:e.onInitialized}})],1)};bn._withStripped=!0;var wn=j({extends:pn,computed:{...Mi((({projectId:e})=>`projects/byId/${e}`),["containers"]),title(){return SYNO.SDS.formatString(w("project","total_network_received"),C[this.sizeLevel])},yAxisMax(){return this.isChartEmpty?1024:void 0},yAxisMin(){return this.isChartEmpty?0:void 0},sizeBase(){return Math.pow(1024,this.sizeLevel)},sizeLevel(){return L(this.max)},max(){return this.total.map((([e,t])=>t)).reduce(((e,t)=>Math.max(e,t)),0)},total(){return an()(this.containerValue).map((e=>e.reduce((([e,t],[i,n])=>[i,t+n]))))},containerValue(){return this.containers.map((({statsByTimestamp:e})=>this.statsTimestamps.map((t=>{var i;return[t,(null===(i=e[t])||void 0===i?void 0:i.download)||0]}))))},value(){return[this.total,...this.containerValue]}},methods:{valueFormatter:e=>k(e),yAxisLabelFormatter(e){return Math.floor(e/this.sizeBase)}}},void 0,void 0,!1,null,null,null);wn.options.__file="src/pages/Project/Detail/Stats/Charts/ProjectDetailStatsNetDownloadChart.vue";var yn=wn.exports,Cn=j({extends:pn,computed:{...Mi((({projectId:e})=>`projects/byId/${e}`),["containers"]),title(){return SYNO.SDS.formatString(w("project","total_network_sent"),C[this.sizeLevel])},yAxisMax(){return this.isChartEmpty?1024:void 0},yAxisMin(){return this.isChartEmpty?0:void 0},sizeBase(){return Math.pow(1024,this.sizeLevel)},sizeLevel(){return L(this.max)},max(){return this.total.map((([e,t])=>t)).reduce(((e,t)=>Math.max(e,t)),0)},total(){return an()(this.containerValue).map((e=>e.reduce((([e,t],[i,n])=>[i,t+n]))))},containerValue(){return this.containers.map((({statsByTimestamp:e})=>this.statsTimestamps.map((t=>{var i;return[t,(null===(i=e[t])||void 0===i?void 0:i.upload)||0]}))))},value(){return[this.total,...this.containerValue]}},methods:{valueFormatter:e=>k(e),yAxisLabelFormatter(e){return Math.floor(e/this.sizeBase)}}},void 0,void 0,!1,null,null,null);Cn.options.__file="src/pages/Project/Detail/Stats/Charts/ProjectDetailStatsNetUploadChart.vue";var Sn={components:{ProjectDetailStatsNetDownloadChart:yn,ProjectDetailStatsNetUploadChart:Cn.exports},props:{projectId:{type:String,required:!0},isLegendDisabled:{type:Object,default:{}}},data:()=>({count:2}),methods:{onInitialized(){--this.count>0||this.$emit("initialized")},getAllRefs(){return[this.$refs.downloadchart,this.$refs.uploadchart]},getAllChart(){return this.getAllRefs().map((e=>e.$refs.chart.chart))},connectCharts(){echarts.connect(this.getAllChart())},disconnectCharts(){echarts.disconnect(this.getAllChart())},dispatchAction(e={}){this.getAllChart().forEach((t=>t.dispatchAction(e)))},resize(){this.getAllChart().forEach((e=>e.resize()))},onLegendClick(e){this.getAllRefs().find((e=>e)).onLegendClick(e)}}},kn=(i(5634),j(Sn,bn,[],!1,null,null,null));kn.options.__file="src/pages/Project/Detail/Stats/Charts/ProjectDetailStatsNetChart.vue";var xn=kn.exports,Ln=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"docker-project-detail-stats-footer"},[i("div",{class:{"container-chip":!0,"container-chip--total":!0,link:!0,disabled:e.isLegendDisabled[e._TT("common","total")]},on:{click:function(t){e.$emit("legend-click",e._TT("common","total"))}}},[i("Dot",{attrs:{size:8,color:e.isLegendDisabled[e._TT("common","total")]?void 0:"#057FEB33"}}),e._v(" "),i("div",{staticClass:"container-chip-name"},[e._v(e._s(e._TT("common","total")))])],1),e._v(" "),e._l(e.containers,(function(t,n){var o=t.id,r=t.name;return i("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{content:r,overflowOnly:function(e){return e.querySelector(".container-chip-name")}},expression:"{\n            content: name,\n            overflowOnly: (el) => el.querySelector('.container-chip-name')\n        }"}],key:o,class:{"container-chip":!0,link:!0,disabled:e.isLegendDisabled[r]},on:{click:function(t){return e.$emit("legend-click",r)}}},[i("Dot",{attrs:{size:8,color:e.isLegendDisabled[r]?void 0:e.COLORS[n%e.COLORS.length]}}),e._v(" "),i("div",{staticClass:"container-chip-name"},[e._v(e._s(r))])],1)}))],2)};Ln._withStripped=!0;var En=j({inject:["COLORS","GRAY_COLOR","_TT"],components:{Dot:se},props:{projectId:{type:String,required:!0},isLegendDisabled:{type:Object,required:!0}},computed:{...Mi((({projectId:e})=>`projects/byId/${e}`),["containers"])}},Ln,[],!1,null,null,null);En.options.__file="src/pages/Project/Detail/Stats/ProjectDetailStatsFooter.vue";var Nn=En.exports;const In={CPU:"CPU",RAM:"RAM",NET:"NET"};var Tn={inject:["_TT","PROJECT_STATUS","ICON_PROP","COLORS","GRAY_COLOR"],components:{Dot:se,ProjectDetailStatsCpuChart:fn,ProjectDetailStatsRamChart:vn,ProjectDetailStatsNetChart:xn,ProjectDetailStatsFooter:Nn},props:{projectId:{type:String,required:!0},stats:{type:String}},computed:{...Mi((({projectId:e})=>`projects/byId/${e}`),["containers"]),shouldShownStats(){return this.containers.some((({status:e})=>[oi.RUNNING,oi.RUNNING_HEALTHY,oi.RUNNING_UNHEALTHY].includes(e)))},options:()=>[10,15,20,25,30,60,300].map((e=>({label:`${e} secs`,value:e})))},data(){const e={[In.CPU]:"CPU",[In.RAM]:w("common","memory"),[In.NET]:w("common","network")};return{RESOURCE_KEY:In,RESOURCES:e,interval:10,resource:this.stats||In.CPU,isLegendDisabled:{}}},methods:{async resize(){var e;await this.$nextTick(),null===(e=this.$refs.chart)||void 0===e||e.resize()},onUpdateIsLegendDisabled({name:e,value:t}){this.$set(this.isLegendDisabled,e,t)},onFooterLegendClick(e){this.$refs.chart.onLegendClick(e)}}},Dn=(i(6253),j(Tn,rn,[],!1,null,null,null));Dn.options.__file="src/pages/Project/Detail/Stats/ProjectDetailStatsTab.vue";var An=Dn.exports,On=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-panel",e._b({staticClass:"project-detail-editor-panel",attrs:{"syno-id":"project-project-detail-panel-0",confirm:e.confirm,cancel:e.cancel,fbar:e.editable},scopedSlots:e._u([{key:"body",fn:function(){return[i("YamlEditor",{ref:"editor",staticClass:"h100p",attrs:{"read-only":!e.editable,"default-value":e.defaultContent,schema:e.schema},on:{input:function(t){e.content=t}}}),e._v(" "),e.editable?e._e():i("div",{staticClass:"readonly-foot-note"},[e._v("\n            "+e._s(e.is_package?e._TT("container","package_deny_operation"):e._TT("project","editor_mask"))+"\n        ")])]},proxy:!0}])},"v-panel",e.panel,!1))};On._withStripped=!0;const Mn=Symbol.for("yaml.alias"),Rn=Symbol.for("yaml.document"),Pn=Symbol.for("yaml.map"),Fn=Symbol.for("yaml.pair"),Bn=Symbol.for("yaml.scalar"),Wn=Symbol.for("yaml.seq"),Vn=Symbol.for("yaml.node.type"),zn=e=>!!e&&"object"==typeof e&&e[Vn]===Mn,jn=e=>!!e&&"object"==typeof e&&e[Vn]===Rn,Hn=e=>!!e&&"object"==typeof e&&e[Vn]===Pn,Un=e=>!!e&&"object"==typeof e&&e[Vn]===Fn,$n=e=>!!e&&"object"==typeof e&&e[Vn]===Bn,Kn=e=>!!e&&"object"==typeof e&&e[Vn]===Wn;function qn(e){if(e&&"object"==typeof e)switch(e[Vn]){case Pn:case Wn:return!0}return!1}function Gn(e){if(e&&"object"==typeof e)switch(e[Vn]){case Mn:case Pn:case Bn:case Wn:return!0}return!1}class Yn{constructor(e){Object.defineProperty(this,Vn,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}}const Zn=Symbol("break visit"),Xn=Symbol("skip children"),Jn=Symbol("remove node");function Qn(e,t){const i=no(t);jn(e)?eo(null,e.contents,i,Object.freeze([e]))===Jn&&(e.contents=null):eo(null,e,i,Object.freeze([]))}function eo(e,t,i,n){const o=oo(e,t,i,n);if(Gn(o)||Un(o))return ro(e,n,o),eo(e,o,i,n);if("symbol"!=typeof o)if(qn(t)){n=Object.freeze(n.concat(t));for(let e=0;e<t.items.length;++e){const o=eo(e,t.items[e],i,n);if("number"==typeof o)e=o-1;else{if(o===Zn)return Zn;o===Jn&&(t.items.splice(e,1),e-=1)}}}else if(Un(t)){n=Object.freeze(n.concat(t));const e=eo("key",t.key,i,n);if(e===Zn)return Zn;e===Jn&&(t.key=null);const o=eo("value",t.value,i,n);if(o===Zn)return Zn;o===Jn&&(t.value=null)}return o}async function to(e,t){const i=no(t);jn(e)?await io(null,e.contents,i,Object.freeze([e]))===Jn&&(e.contents=null):await io(null,e,i,Object.freeze([]))}async function io(e,t,i,n){const o=await oo(e,t,i,n);if(Gn(o)||Un(o))return ro(e,n,o),io(e,o,i,n);if("symbol"!=typeof o)if(qn(t)){n=Object.freeze(n.concat(t));for(let e=0;e<t.items.length;++e){const o=await io(e,t.items[e],i,n);if("number"==typeof o)e=o-1;else{if(o===Zn)return Zn;o===Jn&&(t.items.splice(e,1),e-=1)}}}else if(Un(t)){n=Object.freeze(n.concat(t));const e=await io("key",t.key,i,n);if(e===Zn)return Zn;e===Jn&&(t.key=null);const o=await io("value",t.value,i,n);if(o===Zn)return Zn;o===Jn&&(t.value=null)}return o}function no(e){return"object"==typeof e&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function oo(e,t,i,n){return"function"==typeof i?i(e,t,n):Hn(t)?i.Map?.(e,t,n):Kn(t)?i.Seq?.(e,t,n):Un(t)?i.Pair?.(e,t,n):$n(t)?i.Scalar?.(e,t,n):zn(t)?i.Alias?.(e,t,n):void 0}function ro(e,t,i){const n=t[t.length-1];if(qn(n))n.items[e]=i;else if(Un(n))"key"===e?n.key=i:n.value=i;else{if(!jn(n)){const e=zn(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${e} parent`)}n.contents=i}}Qn.BREAK=Zn,Qn.SKIP=Xn,Qn.REMOVE=Jn,to.BREAK=Zn,to.SKIP=Xn,to.REMOVE=Jn;const so={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"};class ao{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},ao.defaultYaml,e),this.tags=Object.assign({},ao.defaultTags,t)}clone(){const e=new ao(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new ao(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:ao.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},ao.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:ao.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},ao.defaultTags),this.atNextDocument=!1);const i=e.trim().split(/[ \t]+/),n=i.shift();switch(n){case"%TAG":{if(2!==i.length&&(t(0,"%TAG directive should contain exactly two parts"),i.length<2))return!1;const[e,n]=i;return this.tags[e]=n,!0}case"%YAML":{if(this.yaml.explicit=!0,1!==i.length)return t(0,"%YAML directive should contain exactly one part"),!1;const[e]=i;return"1.1"===e||"1.2"===e?(this.yaml.version=e,!0):(t(6,`Unsupported YAML version ${e}`,/^\d+\.\d+$/.test(e)),!1)}default:return t(0,`Unknown directive ${n}`,!0),!1}}tagName(e,t){if("!"===e)return"!";if("!"!==e[0])return t(`Not a valid tag: ${e}`),null;if("<"===e[1]){const i=e.slice(2,-1);return"!"===i||"!!"===i?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(">"!==e[e.length-1]&&t("Verbatim tags must end with a >"),i)}const[,i,n]=e.match(/^(.*!)([^!]*)$/);n||t(`The ${e} tag has no suffix`);const o=this.tags[i];return o?o+decodeURIComponent(n):"!"===i?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,i]of Object.entries(this.tags))if(e.startsWith(i))return t+e.substring(i.length).replace(/[!,[\]{}]/g,(e=>so[e]));return"!"===e[0]?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],i=Object.entries(this.tags);let n;if(e&&i.length>0&&Gn(e.contents)){const t={};Qn(e.contents,((e,i)=>{Gn(i)&&i.tag&&(t[i.tag]=!0)})),n=Object.keys(t)}else n=[];for(const[o,r]of i)"!!"===o&&"tag:yaml.org,2002:"===r||e&&!n.some((e=>e.startsWith(r)))||t.push(`%TAG ${o} ${r}`);return t.join("\n")}}function lo(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const t=JSON.stringify(e);throw new Error(`Anchor must not contain whitespace or control characters: ${t}`)}return!0}function co(e){const t=new Set;return Qn(e,{Value(e,i){i.anchor&&t.add(i.anchor)}}),t}function ho(e,t){for(let i=1;;++i){const n=`${e}${i}`;if(!t.has(n))return n}}ao.defaultYaml={explicit:!1,version:"1.2"},ao.defaultTags={"!!":"tag:yaml.org,2002:"};class uo extends Yn{constructor(e){super(Mn),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let t;return Qn(e,{Node:(e,i)=>{if(i===this)return Qn.BREAK;i.anchor===this.source&&(t=i)}}),t}toJSON(e,t){if(!t)return{source:this.source};const{anchors:i,doc:n,maxAliasCount:o}=t,r=this.resolve(n);if(!r){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(e)}const s=i.get(r);if(!s||void 0===s.res)throw new ReferenceError("This should not happen: Alias anchor was not resolved?");if(o>=0&&(s.count+=1,0===s.aliasCount&&(s.aliasCount=go(n,r,i)),s.count*s.aliasCount>o))throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack");return s.res}toString(e,t,i){const n=`*${this.source}`;if(e){if(lo(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(e)}if(e.implicitKey)return`${n} `}return n}}function go(e,t,i){if(zn(t)){const n=t.resolve(e),o=i&&n&&i.get(n);return o?o.count*o.aliasCount:0}if(qn(t)){let n=0;for(const o of t.items){const t=go(e,o,i);t>n&&(n=t)}return n}if(Un(t)){const n=go(e,t.key,i),o=go(e,t.value,i);return Math.max(n,o)}return 1}function po(e,t,i){if(Array.isArray(e))return e.map(((e,t)=>po(e,String(t),i)));if(e&&"function"==typeof e.toJSON){if(!i||!$n(n=e)&&!qn(n)||!n.anchor)return e.toJSON(t,i);const o={aliasCount:0,count:1,res:void 0};i.anchors.set(e,o),i.onCreate=e=>{o.res=e,delete i.onCreate};const r=e.toJSON(t,i);return i.onCreate&&i.onCreate(r),r}var n;return"bigint"!=typeof e||i?.keep?e:Number(e)}const mo=e=>!e||"function"!=typeof e&&"object"!=typeof e;class fo extends Yn{constructor(e){super(Bn),this.value=e}toJSON(e,t){return t?.keep?this.value:po(this.value,e,t)}toString(){return String(this.value)}}function _o(e,t,i){if(jn(e)&&(e=e.contents),Gn(e))return e;if(Un(e)){const t=i.schema[Pn].createNode?.(i.schema,null,i);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||"function"==typeof BigInt&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:n,onAnchor:o,onTagObj:r,schema:s,sourceObjects:a}=i;let l;if(n&&e&&"object"==typeof e){if(l=a.get(e),l)return l.anchor||(l.anchor=o(e)),new uo(l.anchor);l={anchor:null,node:null},a.set(e,l)}t?.startsWith("!!")&&(t="tag:yaml.org,2002:"+t.slice(2));let c=function(e,t,i){if(t){const e=i.filter((e=>e.tag===t)),n=e.find((e=>!e.format))??e[0];if(!n)throw new Error(`Tag ${t} not found`);return n}return i.find((t=>t.identify?.(e)&&!t.format))}(e,t,s.tags);if(!c){if(e&&"function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!=typeof e){const t=new fo(e);return l&&(l.node=t),t}c=e instanceof Map?s[Pn]:Symbol.iterator in Object(e)?s[Wn]:s[Pn]}r&&(r(c),delete i.onTagObj);const d=c?.createNode?c.createNode(i.schema,e,i):new fo(e);return t&&(d.tag=t),l&&(l.node=d),d}function vo(e,t,i){let n=i;for(let e=t.length-1;e>=0;--e){const i=t[e];if("number"==typeof i&&Number.isInteger(i)&&i>=0){const e=[];e[i]=n,n=e}else n=new Map([[i,n]])}return _o(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}fo.BLOCK_FOLDED="BLOCK_FOLDED",fo.BLOCK_LITERAL="BLOCK_LITERAL",fo.PLAIN="PLAIN",fo.QUOTE_DOUBLE="QUOTE_DOUBLE",fo.QUOTE_SINGLE="QUOTE_SINGLE";const bo=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;class wo extends Yn{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map((t=>Gn(t)||Un(t)?t.clone(e):t)),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(bo(e))this.add(t);else{const[i,...n]=e,o=this.get(i,!0);if(qn(o))o.addIn(n,t);else{if(void 0!==o||!this.schema)throw new Error(`Expected YAML collection at ${i}. Remaining path: ${n}`);this.set(i,vo(this.schema,n,t))}}}deleteIn(e){const[t,...i]=e;if(0===i.length)return this.delete(t);const n=this.get(t,!0);if(qn(n))return n.deleteIn(i);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${i}`)}getIn(e,t){const[i,...n]=e,o=this.get(i,!0);return 0===n.length?!t&&$n(o)?o.value:o:qn(o)?o.getIn(n,t):void 0}hasAllNullValues(e){return this.items.every((t=>{if(!Un(t))return!1;const i=t.value;return null==i||e&&$n(i)&&null==i.value&&!i.commentBefore&&!i.comment&&!i.tag}))}hasIn(e){const[t,...i]=e;if(0===i.length)return this.has(t);const n=this.get(t,!0);return!!qn(n)&&n.hasIn(i)}setIn(e,t){const[i,...n]=e;if(0===n.length)this.set(i,t);else{const e=this.get(i,!0);if(qn(e))e.setIn(n,t);else{if(void 0!==e||!this.schema)throw new Error(`Expected YAML collection at ${i}. Remaining path: ${n}`);this.set(i,vo(this.schema,n,t))}}}}wo.maxFlowStringSingleLineLength=60;const yo=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function Co(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const So=(e,t,i)=>e.endsWith("\n")?Co(i,t):i.includes("\n")?"\n"+Co(i,t):(e.endsWith(" ")?"":" ")+i,ko="flow",xo="block",Lo="quoted";function Eo(e,t,i="flow",{indentAtStart:n,lineWidth:o=80,minContentWidth:r=20,onFold:s,onOverflow:a}={}){if(!o||o<0)return e;const l=Math.max(1+r,1+o-t.length);if(e.length<=l)return e;const c=[],d={};let h,u,g=o-t.length;"number"==typeof n&&(n>o-Math.max(2,r)?c.push(0):g=o-n);let p,m=!1,f=-1,_=-1,v=-1;for(i===xo&&(f=No(e,f),-1!==f&&(g=f+l));p=e[f+=1];){if(i===Lo&&"\\"===p){switch(_=f,e[f+1]){case"x":f+=3;break;case"u":f+=5;break;case"U":f+=9;break;default:f+=1}v=f}if("\n"===p)i===xo&&(f=No(e,f)),g=f+l,h=void 0;else{if(" "===p&&u&&" "!==u&&"\n"!==u&&"\t"!==u){const t=e[f+1];t&&" "!==t&&"\n"!==t&&"\t"!==t&&(h=f)}if(f>=g)if(h)c.push(h),g=h+l,h=void 0;else if(i===Lo){for(;" "===u||"\t"===u;)u=p,p=e[f+=1],m=!0;const t=f>v+1?f-2:_-1;if(d[t])return e;c.push(t),d[t]=!0,g=t+l,h=void 0}else m=!0}u=p}if(m&&a&&a(),0===c.length)return e;s&&s();let b=e.slice(0,c[0]);for(let n=0;n<c.length;++n){const o=c[n],r=c[n+1]||e.length;0===o?b=`\n${t}${e.slice(0,r)}`:(i===Lo&&d[o]&&(b+=`${e[o]}\\`),b+=`\n${t}${e.slice(o+1,r)}`)}return b}function No(e,t){let i=e[t+1];for(;" "===i||"\t"===i;){do{i=e[t+=1]}while(i&&"\n"!==i);i=e[t+1]}return t}const Io=e=>({indentAtStart:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),To=e=>/^(%|---|\.\.\.)/m.test(e);function Do(e,t){const i=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return i;const{implicitKey:n}=t,o=t.options.doubleQuotedMinMultiLineLength,r=t.indent||(To(e)?"  ":"");let s="",a=0;for(let e=0,t=i[e];t;t=i[++e])if(" "===t&&"\\"===i[e+1]&&"n"===i[e+2]&&(s+=i.slice(a,e)+"\\ ",e+=1,a=e,t="\\"),"\\"===t)switch(i[e+1]){case"u":{s+=i.slice(a,e);const t=i.substr(e+2,4);switch(t){case"0000":s+="\\0";break;case"0007":s+="\\a";break;case"000b":s+="\\v";break;case"001b":s+="\\e";break;case"0085":s+="\\N";break;case"00a0":s+="\\_";break;case"2028":s+="\\L";break;case"2029":s+="\\P";break;default:"00"===t.substr(0,2)?s+="\\x"+t.substr(2):s+=i.substr(e,6)}e+=5,a=e+1}break;case"n":if(n||'"'===i[e+2]||i.length<o)e+=1;else{for(s+=i.slice(a,e)+"\n\n";"\\"===i[e+2]&&"n"===i[e+3]&&'"'!==i[e+4];)s+="\n",e+=2;s+=r," "===i[e+2]&&(s+="\\"),e+=1,a=e+1}break;default:e+=1}return s=a?s+i.slice(a):i,n?s:Eo(s,r,Lo,Io(t))}function Ao(e,t){if(!1===t.options.singleQuote||t.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return Do(e,t);const i=t.indent||(To(e)?"  ":""),n="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&\n${i}`)+"'";return t.implicitKey?n:Eo(n,i,ko,Io(t))}function Oo(e,t){const{singleQuote:i}=t.options;let n;if(!1===i)n=Do;else{const t=e.includes('"'),o=e.includes("'");n=t&&!o?Ao:o&&!t?Do:i?Ao:Do}return n(e,t)}function Mo({comment:e,type:t,value:i},n,o,r){const{blockQuote:s,commentString:a,lineWidth:l}=n.options;if(!s||/\n[\t ]+$/.test(i)||/^\s*$/.test(i))return Oo(i,n);const c=n.indent||(n.forceBlockIndent||To(i)?"  ":""),d="literal"===s||"folded"!==s&&t!==fo.BLOCK_FOLDED&&(t===fo.BLOCK_LITERAL||!function(e,t,i){if(!t||t<0)return!1;const n=t-i,o=e.length;if(o<=n)return!1;for(let t=0,i=0;t<o;++t)if("\n"===e[t]){if(t-i>n)return!0;if(i=t+1,o-i<=n)return!1}return!0}(i,l,c.length));if(!i)return d?"|\n":">\n";let h,u;for(u=i.length;u>0;--u){const e=i[u-1];if("\n"!==e&&"\t"!==e&&" "!==e)break}let g=i.substring(u);const p=g.indexOf("\n");-1===p?h="-":i===g||p!==g.length-1?(h="+",r&&r()):h="",g&&(i=i.slice(0,-g.length),"\n"===g[g.length-1]&&(g=g.slice(0,-1)),g=g.replace(/\n+(?!\n|$)/g,`$&${c}`));let m,f=!1,_=-1;for(m=0;m<i.length;++m){const e=i[m];if(" "===e)f=!0;else{if("\n"!==e)break;_=m}}let v=i.substring(0,_<m?_+1:m);v&&(i=i.substring(v.length),v=v.replace(/\n+/g,`$&${c}`));let b=(d?"|":">")+(f?c?"2":"1":"")+h;return e&&(b+=" "+a(e.replace(/ ?[\r\n]+/g," ")),o&&o()),d?`${b}\n${c}${v}${i=i.replace(/\n+/g,`$&${c}`)}${g}`:`${b}\n${c}${Eo(`${v}${i=i.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`)}${g}`,c,xo,Io(n))}`}function Ro(e,t,i,n){const{implicitKey:o,inFlow:r}=t,s="string"==typeof e.value?e:Object.assign({},e,{value:String(e.value)});let{type:a}=e;a!==fo.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(s.value)&&(a=fo.QUOTE_DOUBLE);const l=e=>{switch(e){case fo.BLOCK_FOLDED:case fo.BLOCK_LITERAL:return o||r?Oo(s.value,t):Mo(s,t,i,n);case fo.QUOTE_DOUBLE:return Do(s.value,t);case fo.QUOTE_SINGLE:return Ao(s.value,t);case fo.PLAIN:return function(e,t,i,n){const{type:o,value:r}=e,{actualString:s,implicitKey:a,indent:l,inFlow:c}=t;if(a&&/[\n[\]{},]/.test(r)||c&&/[[\]{},]/.test(r))return Oo(r,t);if(!r||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(r))return a||c||!r.includes("\n")?Oo(r,t):Mo(e,t,i,n);if(!a&&!c&&o!==fo.PLAIN&&r.includes("\n"))return Mo(e,t,i,n);if(""===l&&To(r))return t.forceBlockIndent=!0,Mo(e,t,i,n);const d=r.replace(/\n+/g,`$&\n${l}`);if(s){const e=e=>e.default&&"tag:yaml.org,2002:str"!==e.tag&&e.test?.test(d),{compat:i,tags:n}=t.doc.schema;if(n.some(e)||i?.some(e))return Oo(r,t)}return a?d:Eo(d,l,ko,Io(t))}(s,t,i,n);default:return null}};let c=l(a);if(null===c){const{defaultKeyType:e,defaultStringType:i}=t.options,n=o&&e||i;if(c=l(n),null===c)throw new Error(`Unsupported default string type ${n}`)}return c}function Po(e,t){const i=Object.assign({blockQuote:!0,commentString:yo,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let n;switch(i.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:e,indent:"",indentStep:"number"==typeof i.indent?" ".repeat(i.indent):"  ",inFlow:n,options:i}}function Fo(e,t,i,n){if(Un(e))return e.toString(t,i,n);if(zn(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let o;const r=Gn(e)?e:t.doc.createNode(e,{onTagObj:e=>o=e});o||(o=function(e,t){if(t.tag){const i=e.filter((e=>e.tag===t.tag));if(i.length>0)return i.find((e=>e.format===t.format))??i[0]}let i,n;if($n(t)){n=t.value;const o=e.filter((e=>e.identify?.(n)));i=o.find((e=>e.format===t.format))??o.find((e=>!e.format))}else n=t,i=e.find((e=>e.nodeClass&&n instanceof e.nodeClass));if(!i)throw new Error(`Tag not resolved for ${n?.constructor?.name??typeof n} value`);return i}(t.doc.schema.tags,r));const s=function(e,t,{anchors:i,doc:n}){if(!n.directives)return"";const o=[],r=($n(e)||qn(e))&&e.anchor;r&&lo(r)&&(i.add(r),o.push(`&${r}`));const s=e.tag?e.tag:t.default?null:t.tag;return s&&o.push(n.directives.tagString(s)),o.join(" ")}(r,o,t);s.length>0&&(t.indentAtStart=(t.indentAtStart??0)+s.length+1);const a="function"==typeof o.stringify?o.stringify(r,t,i,n):$n(r)?Ro(r,t,i,n):r.toString(t,i,n);return s?$n(r)||"{"===a[0]||"["===a[0]?`${s} ${a}`:`${s}\n${t.indent}${a}`:a}function Bo(e,t){"debug"!==e&&"warn"!==e||("undefined"!=typeof process&&process.emitWarning?process.emitWarning(t):console.warn(t))}function Wo(e,t,{key:i,value:n}){if(e?.doc.schema.merge&&Vo(i))if(n=zn(n)?n.resolve(e.doc):n,Kn(n))for(const i of n.items)zo(e,t,i);else if(Array.isArray(n))for(const i of n)zo(e,t,i);else zo(e,t,n);else{const o=po(i,"",e);if(t instanceof Map)t.set(o,po(n,o,e));else if(t instanceof Set)t.add(o);else{const r=function(e,t,i){if(null===t)return"";if("object"!=typeof t)return String(t);if(Gn(e)&&i&&i.doc){const t=Po(i.doc,{});t.anchors=new Set;for(const e of i.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;const n=e.toString(t);if(!i.mapKeyWarned){let e=JSON.stringify(n);e.length>40&&(e=e.substring(0,36)+'..."'),Bo(i.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),i.mapKeyWarned=!0}return n}return JSON.stringify(t)}(i,o,e),s=po(n,r,e);r in t?Object.defineProperty(t,r,{value:s,writable:!0,enumerable:!0,configurable:!0}):t[r]=s}}return t}const Vo=e=>"<<"===e||$n(e)&&"<<"===e.value&&(!e.type||e.type===fo.PLAIN);function zo(e,t,i){const n=e&&zn(i)?i.resolve(e.doc):i;if(!Hn(n))throw new Error("Merge sources must be maps or map aliases");const o=n.toJSON(null,e,Map);for(const[e,i]of o)t instanceof Map?t.has(e)||t.set(e,i):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:i,writable:!0,enumerable:!0,configurable:!0});return t}function jo(e,t,i){const n=_o(e,void 0,i),o=_o(t,void 0,i);return new Ho(n,o)}class Ho{constructor(e,t=null){Object.defineProperty(this,Vn,{value:Fn}),this.key=e,this.value=t}clone(e){let{key:t,value:i}=this;return Gn(t)&&(t=t.clone(e)),Gn(i)&&(i=i.clone(e)),new Ho(t,i)}toJSON(e,t){return Wo(t,t?.mapAsMap?new Map:{},this)}toString(e,t,i){return e?.doc?function({key:e,value:t},i,n,o){const{allNullValues:r,doc:s,indent:a,indentStep:l,options:{commentString:c,indentSeq:d,simpleKeys:h}}=i;let u=Gn(e)&&e.comment||null;if(h){if(u)throw new Error("With simple keys, key nodes cannot have comments");if(qn(e))throw new Error("With simple keys, collection cannot be used as a key value")}let g=!h&&(!e||u&&null==t&&!i.inFlow||qn(e)||($n(e)?e.type===fo.BLOCK_FOLDED||e.type===fo.BLOCK_LITERAL:"object"==typeof e));i=Object.assign({},i,{allNullValues:!1,implicitKey:!g&&(h||!r),indent:a+l});let p=!1,m=!1,f=Fo(e,i,(()=>p=!0),(()=>m=!0));if(!g&&!i.inFlow&&f.length>1024){if(h)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");g=!0}if(i.inFlow){if(r||null==t)return p&&n&&n(),""===f?"?":g?`? ${f}`:f}else if(r&&!h||null==t&&g)return f=`? ${f}`,u&&!p?f+=So(f,i.indent,c(u)):m&&o&&o(),f;p&&(u=null),g?(u&&(f+=So(f,i.indent,c(u))),f=`? ${f}\n${a}:`):(f=`${f}:`,u&&(f+=So(f,i.indent,c(u))));let _="",v=null;Gn(t)?(t.spaceBefore&&(_="\n"),t.commentBefore&&(_+=`\n${Co(c(t.commentBefore),i.indent)}`),v=t.comment):t&&"object"==typeof t&&(t=s.createNode(t)),i.implicitKey=!1,g||u||!$n(t)||(i.indentAtStart=f.length+1),m=!1,d||!(l.length>=2)||i.inFlow||g||!Kn(t)||t.flow||t.tag||t.anchor||(i.indent=i.indent.substr(2));let b=!1;const w=Fo(t,i,(()=>b=!0),(()=>m=!0));let y=" ";return _||u?y=""!==w||i.inFlow?`${_}\n${i.indent}`:"\n"===_?"\n\n":_:!g&&qn(t)?("["===w[0]||"{"===w[0])&&!w.includes("\n")||(y=`\n${i.indent}`):""!==w&&"\n"!==w[0]||(y=""),f+=y+w,i.inFlow?b&&n&&n():v&&!b?f+=So(f,i.indent,c(v)):m&&o&&o(),f}(this,e,t,i):JSON.stringify(this)}}function Uo(e,t,i){return(t.inFlow??e.flow?Ko:$o)(e,t,i)}function $o({comment:e,items:t},i,{blockItemPrefix:n,flowChars:o,itemIndent:r,onChompKeep:s,onComment:a}){const{indent:l,options:{commentString:c}}=i,d=Object.assign({},i,{indent:r,type:null});let h=!1;const u=[];for(let e=0;e<t.length;++e){const o=t[e];let s=null;if(Gn(o))!h&&o.spaceBefore&&u.push(""),qo(i,u,o.commentBefore,h),o.comment&&(s=o.comment);else if(Un(o)){const e=Gn(o.key)?o.key:null;e&&(!h&&e.spaceBefore&&u.push(""),qo(i,u,e.commentBefore,h))}h=!1;let a=Fo(o,d,(()=>s=null),(()=>h=!0));s&&(a+=So(a,r,c(s))),h&&s&&(h=!1),u.push(n+a)}let g;if(0===u.length)g=o.start+o.end;else{g=u[0];for(let e=1;e<u.length;++e){const t=u[e];g+=t?`\n${l}${t}`:"\n"}}return e?(g+="\n"+Co(c(e),l),a&&a()):h&&s&&s(),g}function Ko({comment:e,items:t},i,{flowChars:n,itemIndent:o,onComment:r}){const{indent:s,indentStep:a,options:{commentString:l}}=i;o+=a;const c=Object.assign({},i,{indent:o,inFlow:!0,type:null});let d=!1,h=0;const u=[];for(let e=0;e<t.length;++e){const n=t[e];let r=null;if(Gn(n))n.spaceBefore&&u.push(""),qo(i,u,n.commentBefore,!1),n.comment&&(r=n.comment);else if(Un(n)){const e=Gn(n.key)?n.key:null;e&&(e.spaceBefore&&u.push(""),qo(i,u,e.commentBefore,!1),e.comment&&(d=!0));const t=Gn(n.value)?n.value:null;t?(t.comment&&(r=t.comment),t.commentBefore&&(d=!0)):null==n.value&&e&&e.comment&&(r=e.comment)}r&&(d=!0);let s=Fo(n,c,(()=>r=null));e<t.length-1&&(s+=","),r&&(s+=So(s,o,l(r))),!d&&(u.length>h||s.includes("\n"))&&(d=!0),u.push(s),h=u.length}let g;const{start:p,end:m}=n;if(0===u.length)g=p+m;else if(d||(d=u.reduce(((e,t)=>e+t.length+2),2)>wo.maxFlowStringSingleLineLength),d){g=p;for(const e of u)g+=e?`\n${a}${s}${e}`:"\n";g+=`\n${s}${m}`}else g=`${p} ${u.join(" ")} ${m}`;return e&&(g+=So(g,l(e),s),r&&r()),g}function qo({indent:e,options:{commentString:t}},i,n,o){if(n&&o&&(n=n.replace(/^\n+/,"")),n){const o=Co(t(n),e);i.push(o.trimStart())}}function Go(e,t){const i=$n(t)?t.value:t;for(const n of e)if(Un(n)){if(n.key===t||n.key===i)return n;if($n(n.key)&&n.key.value===i)return n}}class Yo extends wo{constructor(e){super(Pn,e),this.items=[]}static get tagName(){return"tag:yaml.org,2002:map"}add(e,t){let i;i=Un(e)?e:e&&"object"==typeof e&&"key"in e?new Ho(e.key,e.value):new Ho(e,e?.value);const n=Go(this.items,i.key),o=this.schema?.sortMapEntries;if(n){if(!t)throw new Error(`Key ${i.key} already set`);$n(n.value)&&mo(i.value)?n.value.value=i.value:n.value=i.value}else if(o){const e=this.items.findIndex((e=>o(i,e)<0));-1===e?this.items.push(i):this.items.splice(e,0,i)}else this.items.push(i)}delete(e){const t=Go(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const i=Go(this.items,e)?.value;return(!t&&$n(i)?i.value:i)??void 0}has(e){return!!Go(this.items,e)}set(e,t){this.add(new Ho(e,t),!0)}toJSON(e,t,i){const n=i?new i:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(n);for(const e of this.items)Wo(t,n,e);return n}toString(e,t,i){if(!e)return JSON.stringify(this);for(const e of this.items)if(!Un(e))throw new Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Uo(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:i,onComment:t})}}const Zo={collection:"map",createNode:function(e,t,i){const{keepUndefined:n,replacer:o}=i,r=new Yo(e),s=(e,s)=>{if("function"==typeof o)s=o.call(t,e,s);else if(Array.isArray(o)&&!o.includes(e))return;(void 0!==s||n)&&r.items.push(jo(e,s,i))};if(t instanceof Map)for(const[e,i]of t)s(e,i);else if(t&&"object"==typeof t)for(const e of Object.keys(t))s(e,t[e]);return"function"==typeof e.sortMapEntries&&r.items.sort(e.sortMapEntries),r},default:!0,nodeClass:Yo,tag:"tag:yaml.org,2002:map",resolve:(e,t)=>(Hn(e)||t("Expected a mapping for this tag"),e)};class Xo extends wo{constructor(e){super(Wn,e),this.items=[]}static get tagName(){return"tag:yaml.org,2002:seq"}add(e){this.items.push(e)}delete(e){const t=Jo(e);return"number"==typeof t&&this.items.splice(t,1).length>0}get(e,t){const i=Jo(e);if("number"!=typeof i)return;const n=this.items[i];return!t&&$n(n)?n.value:n}has(e){const t=Jo(e);return"number"==typeof t&&t<this.items.length}set(e,t){const i=Jo(e);if("number"!=typeof i)throw new Error(`Expected a valid index, not ${e}.`);const n=this.items[i];$n(n)&&mo(t)?n.value=t:this.items[i]=t}toJSON(e,t){const i=[];t?.onCreate&&t.onCreate(i);let n=0;for(const e of this.items)i.push(po(e,String(n++),t));return i}toString(e,t,i){return e?Uo(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+"  ",onChompKeep:i,onComment:t}):JSON.stringify(this)}}function Jo(e){let t=$n(e)?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),"number"==typeof t&&Number.isInteger(t)&&t>=0?t:null}const Qo={collection:"seq",createNode:function(e,t,i){const{replacer:n}=i,o=new Xo(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let r of t){if("function"==typeof n){const i=t instanceof Set?r:String(e++);r=n.call(t,i,r)}o.items.push(_o(r,void 0,i))}}return o},default:!0,nodeClass:Xo,tag:"tag:yaml.org,2002:seq",resolve:(e,t)=>(Kn(e)||t("Expected a sequence for this tag"),e)},er={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(e,t,i,n)=>Ro(e,t=Object.assign({actualString:!0},t),i,n)},tr={identify:e=>null==e,createNode:()=>new fo(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new fo(null),stringify:({source:e},t)=>"string"==typeof e&&tr.test.test(e)?e:t.options.nullStr},ir={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new fo("t"===e[0]||"T"===e[0]),stringify:({source:e,value:t},i)=>e&&ir.test.test(e)&&t===("t"===e[0]||"T"===e[0])?e:t?i.options.trueStr:i.options.falseStr};function nr({format:e,minFractionDigits:t,tag:i,value:n}){if("bigint"==typeof n)return String(n);const o="number"==typeof n?n:Number(n);if(!isFinite(o))return isNaN(o)?".nan":o<0?"-.inf":".inf";let r=JSON.stringify(n);if(!e&&t&&(!i||"tag:yaml.org,2002:float"===i)&&/^\d/.test(r)){let e=r.indexOf(".");e<0&&(e=r.length,r+=".");let i=t-(r.length-e-1);for(;i-- >0;)r+="0"}return r}const or={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN))$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:nr},rr={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():nr(e)}},sr={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new fo(parseFloat(e)),i=e.indexOf(".");return-1!==i&&"0"===e[e.length-1]&&(t.minFractionDigits=e.length-i-1),t},stringify:nr},ar=e=>"bigint"==typeof e||Number.isInteger(e),lr=(e,t,i,{intAsBigInt:n})=>n?BigInt(e):parseInt(e.substring(t),i);function cr(e,t,i){const{value:n}=e;return ar(n)&&n>=0?i+n.toString(t):nr(e)}const dr={identify:e=>ar(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,i)=>lr(e,2,8,i),stringify:e=>cr(e,8,"0o")},hr={identify:ar,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,i)=>lr(e,0,10,i),stringify:nr},ur={identify:e=>ar(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,i)=>lr(e,2,16,i),stringify:e=>cr(e,16,"0x")},gr=[Zo,Qo,er,tr,ir,dr,hr,ur,or,rr,sr];function pr(e){return"bigint"==typeof e||Number.isInteger(e)}const mr=({value:e})=>JSON.stringify(e),fr=[Zo,Qo].concat([{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:mr},{identify:e=>null==e,createNode:()=>new fo(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:mr},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:e=>"true"===e,stringify:mr},{identify:pr,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:i})=>i?BigInt(e):parseInt(e,10),stringify:({value:e})=>pr(e)?e.toString():JSON.stringify(e)},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:mr}],{default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)}),_r={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if("function"==typeof Buffer)return Buffer.from(e,"base64");if("function"==typeof atob){const t=atob(e.replace(/[\n\r]/g,"")),i=new Uint8Array(t.length);for(let e=0;e<t.length;++e)i[e]=t.charCodeAt(e);return i}return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:i},n,o,r){const s=i;let a;if("function"==typeof Buffer)a=s instanceof Buffer?s.toString("base64"):Buffer.from(s.buffer).toString("base64");else{if("function"!=typeof btoa)throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");{let e="";for(let t=0;t<s.length;++t)e+=String.fromCharCode(s[t]);a=btoa(e)}}if(t||(t=fo.BLOCK_LITERAL),t!==fo.QUOTE_DOUBLE){const e=Math.max(n.options.lineWidth-n.indent.length,n.options.minContentWidth),i=Math.ceil(a.length/e),o=new Array(i);for(let t=0,n=0;t<i;++t,n+=e)o[t]=a.substr(n,e);a=o.join(t===fo.BLOCK_LITERAL?"\n":" ")}return Ro({comment:e,type:t,value:a},n,o,r)}};function vr(e,t){if(Kn(e))for(let i=0;i<e.items.length;++i){let n=e.items[i];if(!Un(n)){if(Hn(n)){n.items.length>1&&t("Each pair must have its own sequence indicator");const e=n.items[0]||new Ho(new fo(null));if(n.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${n.commentBefore}\n${e.key.commentBefore}`:n.commentBefore),n.comment){const t=e.value??e.key;t.comment=t.comment?`${n.comment}\n${t.comment}`:n.comment}n=e}e.items[i]=Un(n)?n:new Ho(n)}}else t("Expected a sequence for this tag");return e}function br(e,t,i){const{replacer:n}=i,o=new Xo(e);o.tag="tag:yaml.org,2002:pairs";let r=0;if(t&&Symbol.iterator in Object(t))for(let e of t){let s,a;if("function"==typeof n&&(e=n.call(t,String(r++),e)),Array.isArray(e)){if(2!==e.length)throw new TypeError(`Expected [key, value] tuple: ${e}`);s=e[0],a=e[1]}else if(e&&e instanceof Object){const t=Object.keys(e);if(1!==t.length)throw new TypeError(`Expected { key: value } tuple: ${e}`);s=t[0],a=e[s]}else s=e;o.items.push(jo(s,a,i))}return o}const wr={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:vr,createNode:br};class yr extends Xo{constructor(){super(),this.add=Yo.prototype.add.bind(this),this.delete=Yo.prototype.delete.bind(this),this.get=Yo.prototype.get.bind(this),this.has=Yo.prototype.has.bind(this),this.set=Yo.prototype.set.bind(this),this.tag=yr.tag}toJSON(e,t){if(!t)return super.toJSON(e);const i=new Map;t?.onCreate&&t.onCreate(i);for(const e of this.items){let n,o;if(Un(e)?(n=po(e.key,"",t),o=po(e.value,n,t)):n=po(e,"",t),i.has(n))throw new Error("Ordered maps must not include duplicate keys");i.set(n,o)}return i}}yr.tag="tag:yaml.org,2002:omap";const Cr={collection:"seq",identify:e=>e instanceof Map,nodeClass:yr,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const i=vr(e,t),n=[];for(const{key:e}of i.items)$n(e)&&(n.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):n.push(e.value));return Object.assign(new yr,i)},createNode(e,t,i){const n=br(e,t,i),o=new yr;return o.items=n.items,o}};function Sr({value:e,source:t},i){return t&&(e?kr:xr).test.test(t)?t:e?i.options.trueStr:i.options.falseStr}const kr={identify:e=>!0===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new fo(!0),stringify:Sr},xr={identify:e=>!1===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>new fo(!1),stringify:Sr},Lr={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:nr},Er={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():nr(e)}},Nr={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new fo(parseFloat(e.replace(/_/g,""))),i=e.indexOf(".");if(-1!==i){const n=e.substring(i+1).replace(/_/g,"");"0"===n[n.length-1]&&(t.minFractionDigits=n.length)}return t},stringify:nr},Ir=e=>"bigint"==typeof e||Number.isInteger(e);function Tr(e,t,i,{intAsBigInt:n}){const o=e[0];if("-"!==o&&"+"!==o||(t+=1),e=e.substring(t).replace(/_/g,""),n){switch(i){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}const t=BigInt(e);return"-"===o?BigInt(-1)*t:t}const r=parseInt(e,i);return"-"===o?-1*r:r}function Dr(e,t,i){const{value:n}=e;if(Ir(n)){const e=n.toString(t);return n<0?"-"+i+e.substr(1):i+e}return nr(e)}const Ar={identify:Ir,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,i)=>Tr(e,2,2,i),stringify:e=>Dr(e,2,"0b")},Or={identify:Ir,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,i)=>Tr(e,1,8,i),stringify:e=>Dr(e,8,"0")},Mr={identify:Ir,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,i)=>Tr(e,0,10,i),stringify:nr},Rr={identify:Ir,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,i)=>Tr(e,2,16,i),stringify:e=>Dr(e,16,"0x")};class Pr extends Yo{constructor(e){super(e),this.tag=Pr.tag}add(e){let t;t=Un(e)?e:"object"==typeof e&&"key"in e&&"value"in e&&null===e.value?new Ho(e.key,null):new Ho(e,null),Go(this.items,t.key)||this.items.push(t)}get(e,t){const i=Go(this.items,e);return!t&&Un(i)?$n(i.key)?i.key.value:i.key:i}set(e,t){if("boolean"!=typeof t)throw new Error("Expected boolean value for set(key, value) in a YAML set, not "+typeof t);const i=Go(this.items,e);i&&!t?this.items.splice(this.items.indexOf(i),1):!i&&t&&this.items.push(new Ho(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,i){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,i);throw new Error("Set items must all have null values")}}Pr.tag="tag:yaml.org,2002:set";const Fr={collection:"map",identify:e=>e instanceof Set,nodeClass:Pr,default:!1,tag:"tag:yaml.org,2002:set",resolve(e,t){if(Hn(e)){if(e.hasAllNullValues(!0))return Object.assign(new Pr,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e},createNode(e,t,i){const{replacer:n}=i,o=new Pr(e);if(t&&Symbol.iterator in Object(t))for(let e of t)"function"==typeof n&&(e=n.call(t,e,e)),o.items.push(jo(e,null,i));return o}};function Br(e,t){const i=e[0],n="-"===i||"+"===i?e.substring(1):e,o=e=>t?BigInt(e):Number(e),r=n.replace(/_/g,"").split(":").reduce(((e,t)=>e*o(60)+o(t)),o(0));return"-"===i?o(-1)*r:r}function Wr(e){let{value:t}=e,i=e=>e;if("bigint"==typeof t)i=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return nr(e);let n="";t<0&&(n="-",t*=i(-1));const o=i(60),r=[t%o];return t<60?r.unshift(0):(t=(t-r[0])/o,r.unshift(t%o),t>=60&&(t=(t-r[0])/o,r.unshift(t))),n+r.map((e=>e<10?"0"+String(e):String(e))).join(":").replace(/000000\d*$/,"")}const Vr={identify:e=>"bigint"==typeof e||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:i})=>Br(e,i),stringify:Wr},zr={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>Br(e,!1),stringify:Wr},jr={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){const t=e.match(jr.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,i,n,o,r,s,a]=t.map(Number),l=t[7]?Number((t[7]+"00").substr(1,3)):0;let c=Date.UTC(i,n-1,o,r||0,s||0,a||0,l);const d=t[8];if(d&&"Z"!==d){let e=Br(d,!1);Math.abs(e)<30&&(e*=60),c-=6e4*e}return new Date(c)},stringify:({value:e})=>e.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")},Hr=[Zo,Qo,er,tr,kr,xr,Ar,Or,Mr,Rr,Lr,Er,Nr,_r,Cr,wr,Fr,Vr,zr,jr],Ur=new Map([["core",gr],["failsafe",[Zo,Qo,er]],["json",fr],["yaml11",Hr],["yaml-1.1",Hr]]),$r={binary:_r,bool:ir,float:sr,floatExp:rr,floatNaN:or,floatTime:zr,int:hr,intHex:ur,intOct:dr,intTime:Vr,map:Zo,null:tr,omap:Cr,pairs:wr,seq:Qo,set:Fr,timestamp:jr},Kr={"tag:yaml.org,2002:binary":_r,"tag:yaml.org,2002:omap":Cr,"tag:yaml.org,2002:pairs":wr,"tag:yaml.org,2002:set":Fr,"tag:yaml.org,2002:timestamp":jr};function qr(e,t){let i=Ur.get(t);if(!i){if(!Array.isArray(e)){const e=Array.from(Ur.keys()).filter((e=>"yaml11"!==e)).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}i=[]}if(Array.isArray(e))for(const t of e)i=i.concat(t);else"function"==typeof e&&(i=e(i.slice()));return i.map((e=>{if("string"!=typeof e)return e;const t=$r[e];if(t)return t;const i=Object.keys($r).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown custom tag "${e}"; use one of ${i}`)}))}const Gr=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class Yr{constructor({compat:e,customTags:t,merge:i,resolveKnownTags:n,schema:o,sortMapEntries:r,toStringDefaults:s}){this.compat=Array.isArray(e)?qr(e,"compat"):e?qr(null,e):null,this.merge=!!i,this.name="string"==typeof o&&o||"core",this.knownTags=n?Kr:{},this.tags=qr(t,this.name),this.toStringOptions=s??null,Object.defineProperty(this,Pn,{value:Zo}),Object.defineProperty(this,Bn,{value:er}),Object.defineProperty(this,Wn,{value:Qo}),this.sortMapEntries="function"==typeof r?r:!0===r?Gr:null}clone(){const e=Object.create(Yr.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function Zr(e,t,i,n){if(n&&"object"==typeof n)if(Array.isArray(n))for(let t=0,i=n.length;t<i;++t){const i=n[t],o=Zr(e,n,String(t),i);void 0===o?delete n[t]:o!==i&&(n[t]=o)}else if(n instanceof Map)for(const t of Array.from(n.keys())){const i=n.get(t),o=Zr(e,n,t,i);void 0===o?n.delete(t):o!==i&&n.set(t,o)}else if(n instanceof Set)for(const t of Array.from(n)){const i=Zr(e,n,t,t);void 0===i?n.delete(t):i!==t&&(n.delete(t),n.add(i))}else for(const[t,i]of Object.entries(n)){const o=Zr(e,n,t,i);void 0===o?delete n[t]:o!==i&&(n[t]=o)}return e.call(t,i,n)}class Xr{constructor(e,t,i){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Vn,{value:Rn});let n=null;"function"==typeof t||Array.isArray(t)?n=t:void 0===i&&t&&(i=t,t=void 0);const o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,uniqueKeys:!0,version:"1.2"},i);this.options=o;let{version:r}=o;i?._directives?(this.directives=i._directives.atDocument(),this.directives.yaml.explicit&&(r=this.directives.yaml.version)):this.directives=new ao({version:r}),this.setSchema(r,i),this.contents=void 0===e?null:this.createNode(e,n,i)}clone(){const e=Object.create(Xr.prototype,{[Vn]:{value:Rn}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=Gn(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){Jr(this.contents)&&this.contents.add(e)}addIn(e,t){Jr(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const i=co(this);e.anchor=!t||i.has(t)?ho(t||"a",i):t}return new uo(e.anchor)}createNode(e,t,i){let n;if("function"==typeof t)e=t.call({"":e},"",e),n=t;else if(Array.isArray(t)){const e=e=>"number"==typeof e||e instanceof String||e instanceof Number,i=t.filter(e).map(String);i.length>0&&(t=t.concat(i)),n=t}else void 0===i&&t&&(i=t,t=void 0);const{aliasDuplicateObjects:o,anchorPrefix:r,flow:s,keepUndefined:a,onTagObj:l,tag:c}=i??{},{onAnchor:d,setAnchors:h,sourceObjects:u}=function(e,t){const i=[],n=new Map;let o=null;return{onAnchor:n=>{i.push(n),o||(o=co(e));const r=ho(t,o);return o.add(r),r},setAnchors:()=>{for(const e of i){const t=n.get(e);if("object"!=typeof t||!t.anchor||!$n(t.node)&&!qn(t.node)){const t=new Error("Failed to resolve repeated object (this should not happen)");throw t.source=e,t}t.node.anchor=t.anchor}},sourceObjects:n}}(this,r||"a"),g=_o(e,c,{aliasDuplicateObjects:o??!0,keepUndefined:a??!1,onAnchor:d,onTagObj:l,replacer:n,schema:this.schema,sourceObjects:u});return s&&qn(g)&&(g.flow=!0),h(),g}createPair(e,t,i={}){const n=this.createNode(e,null,i),o=this.createNode(t,null,i);return new Ho(n,o)}delete(e){return!!Jr(this.contents)&&this.contents.delete(e)}deleteIn(e){return bo(e)?null!=this.contents&&(this.contents=null,!0):!!Jr(this.contents)&&this.contents.deleteIn(e)}get(e,t){return qn(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return bo(e)?!t&&$n(this.contents)?this.contents.value:this.contents:qn(this.contents)?this.contents.getIn(e,t):void 0}has(e){return!!qn(this.contents)&&this.contents.has(e)}hasIn(e){return bo(e)?void 0!==this.contents:!!qn(this.contents)&&this.contents.hasIn(e)}set(e,t){null==this.contents?this.contents=vo(this.schema,[e],t):Jr(this.contents)&&this.contents.set(e,t)}setIn(e,t){bo(e)?this.contents=t:null==this.contents?this.contents=vo(this.schema,Array.from(e),t):Jr(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){let i;switch("number"==typeof e&&(e=String(e)),e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new ao({version:"1.1"}),i={merge:!0,resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new ao({version:e}),i={merge:!1,resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,i=null;break;default:{const t=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else{if(!i)throw new Error("With a null YAML version, the { schema: Schema } option is required");this.schema=new Yr(Object.assign(i,t))}}toJS({json:e,jsonArg:t,mapAsMap:i,maxAliasCount:n,onAnchor:o,reviver:r}={}){const s={anchors:new Map,doc:this,keep:!e,mapAsMap:!0===i,mapKeyWarned:!1,maxAliasCount:"number"==typeof n?n:100,stringify:Fo},a=po(this.contents,t??"",s);if("function"==typeof o)for(const{count:e,res:t}of s.anchors.values())o(t,e);return"function"==typeof r?Zr(r,{"":a},"",a):a}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return function(e,t){const i=[];let n=!0===t.directives;if(!1!==t.directives&&e.directives){const t=e.directives.toString(e);t?(i.push(t),n=!0):e.directives.docStart&&(n=!0)}n&&i.push("---");const o=Po(e,t),{commentString:r}=o.options;if(e.commentBefore){1!==i.length&&i.unshift("");const t=r(e.commentBefore);i.unshift(Co(t,""))}let s=!1,a=null;if(e.contents){if(Gn(e.contents)){if(e.contents.spaceBefore&&n&&i.push(""),e.contents.commentBefore){const t=r(e.contents.commentBefore);i.push(Co(t,""))}o.forceBlockIndent=!!e.comment,a=e.contents.comment}const t=a?void 0:()=>s=!0;let l=Fo(e.contents,o,(()=>a=null),t);a&&(l+=So(l,"",r(a))),"|"!==l[0]&&">"!==l[0]||"---"!==i[i.length-1]?i.push(l):i[i.length-1]=`--- ${l}`}else i.push(Fo(e.contents,o));if(e.directives?.docEnd)if(e.comment){const t=r(e.comment);t.includes("\n")?(i.push("..."),i.push(Co(t,""))):i.push(`... ${t}`)}else i.push("...");else{let t=e.comment;t&&s&&(t=t.replace(/^\n+/,"")),t&&(s&&!a||""===i[i.length-1]||i.push(""),i.push(Co(r(t),"")))}return i.join("\n")+"\n"}(this,e)}}function Jr(e){if(qn(e))return!0;throw new Error("Expected a YAML collection as document contents")}class Qr extends Error{constructor(e,t,i,n){super(),this.name=e,this.code=i,this.message=n,this.pos=t}}class es extends Qr{constructor(e,t,i){super("YAMLParseError",e,t,i)}}class ts extends Qr{constructor(e,t,i){super("YAMLWarning",e,t,i)}}const is=(e,t)=>i=>{if(-1===i.pos[0])return;i.linePos=i.pos.map((e=>t.linePos(e)));const{line:n,col:o}=i.linePos[0];i.message+=` at line ${n}, column ${o}`;let r=o-1,s=e.substring(t.lineStarts[n-1],t.lineStarts[n]).replace(/[\n\r]+$/,"");if(r>=60&&s.length>80){const e=Math.min(r-39,s.length-79);s="…"+s.substring(e),r-=e-1}if(s.length>80&&(s=s.substring(0,79)+"…"),n>1&&/^ *$/.test(s.substring(0,r))){let i=e.substring(t.lineStarts[n-2],t.lineStarts[n-1]);i.length>80&&(i=i.substring(0,79)+"…\n"),s=i+s}if(/[^ ]/.test(s)){let e=1;const t=i.linePos[1];t&&t.line===n&&t.col>o&&(e=Math.min(t.col-o,80-r));const a=" ".repeat(r)+"^".repeat(e);i.message+=`:\n\n${s}\n${a}\n`}};function ns(e,{flow:t,indicator:i,next:n,offset:o,onError:r,startOnNewline:s}){let a=!1,l=s,c=s,d="",h="",u=!1,g=!1,p=!1,m=null,f=null,_=null,v=null,b=null;for(const n of e)switch(p&&("space"!==n.type&&"newline"!==n.type&&"comma"!==n.type&&r(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),p=!1),n.type){case"space":!t&&l&&"doc-start"!==i&&"\t"===n.source[0]&&r(n,"TAB_AS_INDENT","Tabs are not allowed as indentation"),c=!0;break;case"comment":{c||r(n,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const e=n.source.substring(1)||" ";d?d+=h+e:d=e,h="",l=!1;break}case"newline":l?d?d+=n.source:a=!0:h+=n.source,l=!0,u=!0,(m||f)&&(g=!0),c=!0;break;case"anchor":m&&r(n,"MULTIPLE_ANCHORS","A node can have at most one anchor"),n.source.endsWith(":")&&r(n.offset+n.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),m=n,null===b&&(b=n.offset),l=!1,c=!1,p=!0;break;case"tag":f&&r(n,"MULTIPLE_TAGS","A node can have at most one tag"),f=n,null===b&&(b=n.offset),l=!1,c=!1,p=!0;break;case i:(m||f)&&r(n,"BAD_PROP_ORDER",`Anchors and tags must be after the ${n.source} indicator`),v&&r(n,"UNEXPECTED_TOKEN",`Unexpected ${n.source} in ${t??"collection"}`),v=n,l=!1,c=!1;break;case"comma":if(t){_&&r(n,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),_=n,l=!1,c=!1;break}default:r(n,"UNEXPECTED_TOKEN",`Unexpected ${n.type} token`),l=!1,c=!1}const w=e[e.length-1],y=w?w.offset+w.source.length:o;return p&&n&&"space"!==n.type&&"newline"!==n.type&&"comma"!==n.type&&("scalar"!==n.type||""!==n.source)&&r(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),{comma:_,found:v,spaceBefore:a,comment:d,hasNewline:u,hasNewlineAfterProp:g,anchor:m,tag:f,end:y,start:b??y}}function os(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes("\n"))return!0;if(e.end)for(const t of e.end)if("newline"===t.type)return!0;return!1;case"flow-collection":for(const t of e.items){for(const e of t.start)if("newline"===e.type)return!0;if(t.sep)for(const e of t.sep)if("newline"===e.type)return!0;if(os(t.key)||os(t.value))return!0}return!1;default:return!0}}function rs(e,t,i){if("flow-collection"===t?.type){const n=t.end[0];n.indent!==e||"]"!==n.source&&"}"!==n.source||!os(t)||i(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function ss(e,t,i){const{uniqueKeys:n}=e.options;if(!1===n)return!1;const o="function"==typeof n?n:(t,i)=>t===i||$n(t)&&$n(i)&&t.value===i.value&&!("<<"===t.value&&e.schema.merge);return t.some((e=>o(e.key,i)))}const as="All mapping items must start at the same column";function ls(e,t,i,n){let o="";if(e){let r=!1,s="";for(const a of e){const{source:e,type:l}=a;switch(l){case"space":r=!0;break;case"comment":{i&&!r&&n(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const t=e.substring(1)||" ";o?o+=s+t:o=t,s="";break}case"newline":o&&(s+=e),r=!0;break;default:n(a,"UNEXPECTED_TOKEN",`Unexpected ${l} at node end`)}t+=e.length}}return{comment:o,offset:t}}const cs="Block collections are not allowed within flow collections",ds=e=>e&&("block-map"===e.type||"block-seq"===e.type);function hs(e,t,i){const n=e.offset,o=function({offset:e,props:t},i,n){if("block-scalar-header"!==t[0].type)return n(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:o}=t[0],r=o[0];let s=0,a="",l=-1;for(let t=1;t<o.length;++t){const i=o[t];if(a||"-"!==i&&"+"!==i){const n=Number(i);!s&&n?s=n:-1===l&&(l=e+t)}else a=i}-1!==l&&n(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${o}`);let c=!1,d="",h=o.length;for(let e=1;e<t.length;++e){const o=t[e];switch(o.type){case"space":c=!0;case"newline":h+=o.source.length;break;case"comment":i&&!c&&n(o,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),h+=o.source.length,d=o.source.substring(1);break;case"error":n(o,"UNEXPECTED_TOKEN",o.message),h+=o.source.length;break;default:{n(o,"UNEXPECTED_TOKEN",`Unexpected token in block scalar header: ${o.type}`);const e=o.source;e&&"string"==typeof e&&(h+=e.length)}}}return{mode:r,indent:s,chomp:a,comment:d,length:h}}(e,t,i);if(!o)return{value:"",type:null,comment:"",range:[n,n,n]};const r=">"===o.mode?fo.BLOCK_FOLDED:fo.BLOCK_LITERAL,s=e.source?function(e){const t=e.split(/\n( *)/),i=t[0],n=i.match(/^( *)/),o=[n?.[1]?[n[1],i.slice(n[1].length)]:["",i]];for(let e=1;e<t.length;e+=2)o.push([t[e],t[e+1]]);return o}(e.source):[];let a=s.length;for(let e=s.length-1;e>=0;--e){const t=s[e][1];if(""!==t&&"\r"!==t)break;a=e}if(0===a){const t="+"===o.chomp&&s.length>0?"\n".repeat(Math.max(1,s.length-1)):"";let i=n+o.length;return e.source&&(i+=e.source.length),{value:t,type:r,comment:o.comment,range:[n,i,i]}}let l=e.indent+o.indent,c=e.offset+o.length,d=0;for(let e=0;e<a;++e){const[t,n]=s[e];if(""!==n&&"\r"!==n){if(t.length<l){const e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";i(c+t.length,"MISSING_CHAR",e)}0===o.indent&&(l=t.length),d=e;break}0===o.indent&&t.length>l&&(l=t.length),c+=t.length+n.length+1}for(let e=s.length-1;e>=a;--e)s[e][0].length>l&&(a=e+1);let h="",u="",g=!1;for(let e=0;e<d;++e)h+=s[e][0].slice(l)+"\n";for(let e=d;e<a;++e){let[t,n]=s[e];c+=t.length+n.length+1;const a="\r"===n[n.length-1];if(a&&(n=n.slice(0,-1)),n&&t.length<l){const e="Block scalar lines must not be less indented than their "+(o.indent?"explicit indentation indicator":"first line");i(c-n.length-(a?2:1),"BAD_INDENT",e),t=""}r===fo.BLOCK_LITERAL?(h+=u+t.slice(l)+n,u="\n"):t.length>l||"\t"===n[0]?(" "===u?u="\n":g||"\n"!==u||(u="\n\n"),h+=u+t.slice(l)+n,u="\n",g=!0):""===n?"\n"===u?h+="\n":u="\n":(h+=u+n,u=" ",g=!1)}switch(o.chomp){case"-":break;case"+":for(let e=a;e<s.length;++e)h+="\n"+s[e][0].slice(l);"\n"!==h[h.length-1]&&(h+="\n");break;default:h+="\n"}const p=n+o.length+e.source.length;return{value:h,type:r,comment:o.comment,range:[n,p,p]}}function us(e,t,i){const{offset:n,type:o,source:r,end:s}=e;let a,l;const c=(e,t,o)=>i(n+e,t,o);switch(o){case"scalar":a=fo.PLAIN,l=function(e,t){let i="";switch(e[0]){case"\t":i="a tab character";break;case",":i="flow indicator character ,";break;case"%":i="directive indicator character %";break;case"|":case">":i=`block scalar indicator ${e[0]}`;break;case"@":case"`":i=`reserved character ${e[0]}`}return i&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${i}`),gs(e)}(r,c);break;case"single-quoted-scalar":a=fo.QUOTE_SINGLE,l=function(e,t){return"'"===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR","Missing closing 'quote"),gs(e.slice(1,-1)).replace(/''/g,"'")}(r,c);break;case"double-quoted-scalar":a=fo.QUOTE_DOUBLE,l=function(e,t){let i="";for(let n=1;n<e.length-1;++n){const o=e[n];if("\r"!==o||"\n"!==e[n+1])if("\n"===o){const{fold:t,offset:o}=ps(e,n);i+=t,n=o}else if("\\"===o){let o=e[++n];const r=ms[o];if(r)i+=r;else if("\n"===o)for(o=e[n+1];" "===o||"\t"===o;)o=e[1+ ++n];else if("\r"===o&&"\n"===e[n+1])for(o=e[1+ ++n];" "===o||"\t"===o;)o=e[1+ ++n];else if("x"===o||"u"===o||"U"===o){const r={x:2,u:4,U:8}[o];i+=fs(e,n+1,r,t),n+=r}else{const o=e.substr(n-1,2);t(n-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),i+=o}}else if(" "===o||"\t"===o){const t=n;let r=e[n+1];for(;" "===r||"\t"===r;)r=e[1+ ++n];"\n"===r||"\r"===r&&"\n"===e[n+2]||(i+=n>t?e.slice(t,n+1):o)}else i+=o}return'"'===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR",'Missing closing "quote'),i}(r,c);break;default:return i(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${o}`),{value:"",type:null,comment:"",range:[n,n+r.length,n+r.length]}}const d=n+r.length,h=ls(s,d,t,i);return{value:l,type:a,comment:h.comment,range:[n,d,h.offset]}}function gs(e){let t,i;try{t=new RegExp("(.*?)(?<![ \t])[ \t]*\r?\n","sy"),i=new RegExp("[ \t]*(.*?)(?:(?<![ \t])[ \t]*)?\r?\n","sy")}catch(e){t=/(.*?)[ \t]*\r?\n/ys,i=/[ \t]*(.*?)[ \t]*\r?\n/ys}let n=t.exec(e);if(!n)return e;let o=n[1],r=" ",s=t.lastIndex;for(i.lastIndex=s;n=i.exec(e);)""===n[1]?"\n"===r?o+=r:r="\n":(o+=r+n[1],r=" "),s=i.lastIndex;const a=/[ \t]*(.*)/ys;return a.lastIndex=s,n=a.exec(e),o+r+(n?.[1]??"")}function ps(e,t){let i="",n=e[t+1];for(;!(" "!==n&&"\t"!==n&&"\n"!==n&&"\r"!==n||"\r"===n&&"\n"!==e[t+2]);)"\n"===n&&(i+="\n"),n=e[(t+=1)+1];return i||(i=" "),{fold:i,offset:t}}const ms={0:"\0",a:"",b:"\b",e:"",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function fs(e,t,i,n){const o=e.substr(t,i),r=o.length===i&&/^[0-9a-fA-F]+$/.test(o)?parseInt(o,16):NaN;if(isNaN(r)){const o=e.substr(t-2,i+2);return n(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),o}return String.fromCodePoint(r)}function _s(e,t,i,n){const{value:o,type:r,comment:s,range:a}="block-scalar"===t.type?hs(t,e.options.strict,n):us(t,e.options.strict,n),l=i?e.directives.tagName(i.source,(e=>n(i,"TAG_RESOLVE_FAILED",e))):null,c=i&&l?function(e,t,i,n,o){if("!"===i)return e[Bn];const r=[];for(const t of e.tags)if(!t.collection&&t.tag===i){if(!t.default||!t.test)return t;r.push(t)}for(const e of r)if(e.test?.test(t))return e;const s=e.knownTags[i];return s&&!s.collection?(e.tags.push(Object.assign({},s,{default:!1,test:void 0})),s):(o(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${i}`,"tag:yaml.org,2002:str"!==i),e[Bn])}(e.schema,o,l,i,n):"scalar"===t.type?function({directives:e,schema:t},i,n,o){const r=t.tags.find((e=>e.default&&e.test?.test(i)))||t[Bn];if(t.compat){const s=t.compat.find((e=>e.default&&e.test?.test(i)))??t[Bn];r.tag!==s.tag&&o(n,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${e.tagString(r.tag)} or ${e.tagString(s.tag)}`,!0)}return r}(e,o,t,n):e.schema[Bn];let d;try{const r=c.resolve(o,(e=>n(i??t,"TAG_RESOLVE_FAILED",e)),e.options);d=$n(r)?r:new fo(r)}catch(e){const r=e instanceof Error?e.message:String(e);n(i??t,"TAG_RESOLVE_FAILED",r),d=new fo(o)}return d.range=a,d.source=o,r&&(d.type=r),l&&(d.tag=l),c.format&&(d.format=c.format),s&&(d.comment=s),d}function vs(e,t,i){if(t){null===i&&(i=t.length);for(let n=i-1;n>=0;--n){let i=t[n];switch(i.type){case"space":case"comment":case"newline":e-=i.source.length;continue}for(i=t[++n];"space"===i?.type;)e+=i.source.length,i=t[++n];break}}return e}const bs={composeNode:ws,composeEmptyNode:ys};function ws(e,t,i,n){const{spaceBefore:o,comment:r,anchor:s,tag:a}=i;let l,c=!0;switch(t.type){case"alias":l=function({options:e},{offset:t,source:i,end:n},o){const r=new uo(i.substring(1));""===r.source&&o(t,"BAD_ALIAS","Alias cannot be an empty string"),r.source.endsWith(":")&&o(t+i.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const s=t+i.length,a=ls(n,s,e.strict,o);return r.range=[t,s,a.offset],a.comment&&(r.comment=a.comment),r}(e,t,n),(s||a)&&n(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":l=_s(e,t,a,n),s&&(l.anchor=s.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":l=function(e,t,i,n,o){let r;switch(i.type){case"block-map":r=function({composeNode:e,composeEmptyNode:t},i,n,o){const r=new Yo(i.schema);i.atRoot&&(i.atRoot=!1);let s=n.offset;for(const a of n.items){const{start:l,key:c,sep:d,value:h}=a,u=ns(l,{indicator:"explicit-key-ind",next:c??d?.[0],offset:s,onError:o,startOnNewline:!0}),g=!u.found;if(g){if(c&&("block-seq"===c.type?o(s,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in c&&c.indent!==n.indent&&o(s,"BAD_INDENT",as)),!u.anchor&&!u.tag&&!d){u.comment&&(r.comment?r.comment+="\n"+u.comment:r.comment=u.comment);continue}(u.hasNewlineAfterProp||os(c))&&o(c??l[l.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else u.found?.indent!==n.indent&&o(s,"BAD_INDENT",as);const p=u.end,m=c?e(i,c,u,o):t(i,p,l,null,u,o);i.schema.compat&&rs(n.indent,c,o),ss(i,r.items,m)&&o(p,"DUPLICATE_KEY","Map keys must be unique");const f=ns(d??[],{indicator:"map-value-ind",next:h,offset:m.range[2],onError:o,startOnNewline:!c||"block-scalar"===c.type});if(s=f.end,f.found){g&&("block-map"!==h?.type||f.hasNewline||o(s,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),i.options.strict&&u.start<f.found.offset-1024&&o(m.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const l=h?e(i,h,f,o):t(i,s,d,null,f,o);i.schema.compat&&rs(n.indent,h,o),s=l.range[2];const c=new Ho(m,l);i.options.keepSourceTokens&&(c.srcToken=a),r.items.push(c)}else{g&&o(m.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),f.comment&&(m.comment?m.comment+="\n"+f.comment:m.comment=f.comment);const e=new Ho(m);i.options.keepSourceTokens&&(e.srcToken=a),r.items.push(e)}}return r.range=[n.offset,s,s],r}(e,t,i,o);break;case"block-seq":r=function({composeNode:e,composeEmptyNode:t},i,n,o){const r=new Xo(i.schema);i.atRoot&&(i.atRoot=!1);let s=n.offset;for(const{start:a,value:l}of n.items){const c=ns(a,{indicator:"seq-item-ind",next:l,offset:s,onError:o,startOnNewline:!0});if(s=c.end,!c.found){if(!(c.anchor||c.tag||l)){c.comment&&(r.comment=c.comment);continue}l&&"block-seq"===l.type?o(s,"BAD_INDENT","All sequence items must start at the same column"):o(s,"MISSING_CHAR","Sequence item without - indicator")}const d=l?e(i,l,c,o):t(i,s,a,null,c,o);i.schema.compat&&rs(n.indent,l,o),s=d.range[2],r.items.push(d)}return r.range=[n.offset,s,s],r}(e,t,i,o);break;case"flow-collection":r=function({composeNode:e,composeEmptyNode:t},i,n,o){const r="{"===n.start.source,s=r?"flow map":"flow sequence",a=r?new Yo(i.schema):new Xo(i.schema);a.flow=!0;const l=i.atRoot;l&&(i.atRoot=!1);let c=n.offset+n.start.source.length;for(let l=0;l<n.items.length;++l){const d=n.items[l],{start:h,key:u,sep:g,value:p}=d,m=ns(h,{flow:s,indicator:"explicit-key-ind",next:u??g?.[0],offset:c,onError:o,startOnNewline:!1});if(!m.found){if(!(m.anchor||m.tag||g||p)){0===l&&m.comma?o(m.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${s}`):l<n.items.length-1&&o(m.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${s}`),m.comment&&(a.comment?a.comment+="\n"+m.comment:a.comment=m.comment),c=m.end;continue}!r&&i.options.strict&&os(u)&&o(u,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(0===l)m.comma&&o(m.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${s}`);else if(m.comma||o(m.start,"MISSING_CHAR",`Missing , between ${s} items`),m.comment){let e="";e:for(const t of h)switch(t.type){case"comma":case"space":break;case"comment":e=t.source.substring(1);break e;default:break e}if(e){let t=a.items[a.items.length-1];Un(t)&&(t=t.value??t.key),t.comment?t.comment+="\n"+e:t.comment=e,m.comment=m.comment.substring(e.length+1)}}if(r||g||m.found){const n=m.end,l=u?e(i,u,m,o):t(i,n,h,null,m,o);ds(u)&&o(l.range,"BLOCK_IN_FLOW",cs);const f=ns(g??[],{flow:s,indicator:"map-value-ind",next:p,offset:l.range[2],onError:o,startOnNewline:!1});if(f.found){if(!r&&!m.found&&i.options.strict){if(g)for(const e of g){if(e===f.found)break;if("newline"===e.type){o(e,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}m.start<f.found.offset-1024&&o(f.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else p&&("source"in p&&p.source&&":"===p.source[0]?o(p,"MISSING_CHAR",`Missing space after : in ${s}`):o(f.start,"MISSING_CHAR",`Missing , or : between ${s} items`));const _=p?e(i,p,f,o):f.found?t(i,f.end,g,null,f,o):null;_?ds(p)&&o(_.range,"BLOCK_IN_FLOW",cs):f.comment&&(l.comment?l.comment+="\n"+f.comment:l.comment=f.comment);const v=new Ho(l,_);if(i.options.keepSourceTokens&&(v.srcToken=d),r){const e=a;ss(i,e.items,l)&&o(n,"DUPLICATE_KEY","Map keys must be unique"),e.items.push(v)}else{const e=new Yo(i.schema);e.flow=!0,e.items.push(v),a.items.push(e)}c=_?_.range[2]:f.end}else{const n=p?e(i,p,m,o):t(i,m.end,g,null,m,o);a.items.push(n),c=n.range[2],ds(p)&&o(n.range,"BLOCK_IN_FLOW",cs)}}const d=r?"}":"]",[h,...u]=n.end;let g=c;if(h&&h.source===d)g=h.offset+h.source.length;else{const e=s[0].toUpperCase()+s.substring(1);o(c,l?"MISSING_CHAR":"BAD_INDENT",l?`${e} must end with a ${d}`:`${e} in block collection must be sufficiently indented and end with a ${d}`),h&&1!==h.source.length&&u.unshift(h)}if(u.length>0){const e=ls(u,g,i.options.strict,o);e.comment&&(a.comment?a.comment+="\n"+e.comment:a.comment=e.comment),a.range=[n.offset,g,e.offset]}else a.range=[n.offset,g,g];return a}(e,t,i,o)}if(!n)return r;const s=t.directives.tagName(n.source,(e=>o(n,"TAG_RESOLVE_FAILED",e)));if(!s)return r;const a=r.constructor;if("!"===s||s===a.tagName)return r.tag=a.tagName,r;const l=Hn(r)?"map":"seq";let c=t.schema.tags.find((e=>e.collection===l&&e.tag===s));if(!c){const e=t.schema.knownTags[s];if(!e||e.collection!==l)return o(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,!0),r.tag=s,r;t.schema.tags.push(Object.assign({},e,{default:!1})),c=e}const d=c.resolve(r,(e=>o(n,"TAG_RESOLVE_FAILED",e)),t.options),h=Gn(d)?d:new fo(d);return h.range=r.range,h.tag=s,c?.format&&(h.format=c.format),h}(bs,e,t,a,n),s&&(l.anchor=s.source.substring(1));break;default:n(t,"UNEXPECTED_TOKEN","error"===t.type?t.message:`Unsupported token (type: ${t.type})`),l=ys(e,t.offset,void 0,null,i,n),c=!1}return s&&""===l.anchor&&n(s,"BAD_ALIAS","Anchor cannot be an empty string"),o&&(l.spaceBefore=!0),r&&("scalar"===t.type&&""===t.source?l.comment=r:l.commentBefore=r),e.options.keepSourceTokens&&c&&(l.srcToken=t),l}function ys(e,t,i,n,{spaceBefore:o,comment:r,anchor:s,tag:a},l){const c=_s(e,{type:"scalar",offset:vs(t,i,n),indent:-1,source:""},a,l);return s&&(c.anchor=s.source.substring(1),""===c.anchor&&l(s,"BAD_ALIAS","Anchor cannot be an empty string")),o&&(c.spaceBefore=!0),r&&(c.comment=r),c}function Cs(e){if("number"==typeof e)return[e,e+1];if(Array.isArray(e))return 2===e.length?e:[e[0],e[1]];const{offset:t,source:i}=e;return[t,t+("string"==typeof i?i.length:1)]}function Ss(e){let t="",i=!1,n=!1;for(let o=0;o<e.length;++o){const r=e[o];switch(r[0]){case"#":t+=(""===t?"":n?"\n\n":"\n")+(r.substring(1)||" "),i=!0,n=!1;break;case"%":"#"!==e[o+1]?.[0]&&(o+=1),i=!1;break;default:i||(n=!0),i=!1}}return{comment:t,afterEmptyLine:n}}class ks{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,i,n)=>{const o=Cs(e);n?this.warnings.push(new ts(o,t,i)):this.errors.push(new es(o,t,i))},this.directives=new ao({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:i,afterEmptyLine:n}=Ss(this.prelude);if(i){const o=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${i}`:i;else if(n||e.directives.docStart||!o)e.commentBefore=i;else if(qn(o)&&!o.flow&&o.items.length>0){let e=o.items[0];Un(e)&&(e=e.key);const t=e.commentBefore;e.commentBefore=t?`${i}\n${t}`:i}else{const e=o.commentBefore;o.commentBefore=e?`${i}\n${e}`:i}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Ss(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,i=-1){for(const t of e)yield*this.next(t);yield*this.end(t,i)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,((t,i,n)=>{const o=Cs(e);o[0]+=t,this.onError(o,"BAD_DIRECTIVE",i,n)})),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const t=function(e,t,{offset:i,start:n,value:o,end:r},s){const a=Object.assign({_directives:t},e),l=new Xr(void 0,a),c={atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},d=ns(n,{indicator:"doc-start",next:o??r?.[0],offset:i,onError:s,startOnNewline:!0});d.found&&(l.directives.docStart=!0,!o||"block-map"!==o.type&&"block-seq"!==o.type||d.hasNewline||s(d.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=o?ws(c,o,d,s):ys(c,d.end,n,null,d,s);const h=l.contents.range[2],u=ls(r,h,!1,s);return u.comment&&(l.comment=u.comment),l.range=[i,h,u.offset],l}(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,i=new es(Cs(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(i):this.doc.errors.push(i);break}case"doc-end":{if(!this.doc){const t="Unexpected doc-end without preceding document";this.errors.push(new es(Cs(e),"UNEXPECTED_TOKEN",t));break}this.doc.directives.docEnd=!0;const t=ls(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){const e=this.doc.comment;this.doc.comment=e?`${e}\n${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new es(Cs(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const e=Object.assign({_directives:this.directives},this.options),i=new Xr(void 0,e);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,t,t],this.decorate(i,!1),yield i}}}function xs(e,t=!0,i){if(e){const n=(e,t,n)=>{const o="number"==typeof e?e:Array.isArray(e)?e[0]:e.offset;if(!i)throw new es([o,o+1],t,n);i(o,t,n)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return us(e,t,n);case"block-scalar":return hs(e,t,n)}}return null}function Ls(e,t){const{implicitKey:i=!1,indent:n,inFlow:o=!1,offset:r=-1,type:s="PLAIN"}=t,a=Ro({type:s,value:e},{implicitKey:i,indent:n>0?" ".repeat(n):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}}),l=t.end??[{type:"newline",offset:-1,indent:n,source:"\n"}];switch(a[0]){case"|":case">":{const e=a.indexOf("\n"),t=a.substring(0,e),i=a.substring(e+1)+"\n",o=[{type:"block-scalar-header",offset:r,indent:n,source:t}];return Ns(o,l)||o.push({type:"newline",offset:-1,indent:n,source:"\n"}),{type:"block-scalar",offset:r,indent:n,props:o,source:i}}case'"':return{type:"double-quoted-scalar",offset:r,indent:n,source:a,end:l};case"'":return{type:"single-quoted-scalar",offset:r,indent:n,source:a,end:l};default:return{type:"scalar",offset:r,indent:n,source:a,end:l}}}function Es(e,t,i={}){let{afterKey:n=!1,implicitKey:o=!1,inFlow:r=!1,type:s}=i,a="indent"in e?e.indent:null;if(n&&"number"==typeof a&&(a+=2),!s)switch(e.type){case"single-quoted-scalar":s="QUOTE_SINGLE";break;case"double-quoted-scalar":s="QUOTE_DOUBLE";break;case"block-scalar":{const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");s=">"===t.source[0]?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:s="PLAIN"}const l=Ro({type:s,value:t},{implicitKey:o||null===a,indent:null!==a&&a>0?" ".repeat(a):"",inFlow:r,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":!function(e,t){const i=t.indexOf("\n"),n=t.substring(0,i),o=t.substring(i+1)+"\n";if("block-scalar"===e.type){const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");t.source=n,e.source=o}else{const{offset:t}=e,i="indent"in e?e.indent:-1,r=[{type:"block-scalar-header",offset:t,indent:i,source:n}];Ns(r,"end"in e?e.end:void 0)||r.push({type:"newline",offset:-1,indent:i,source:"\n"});for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:"block-scalar",indent:i,props:r,source:o})}}(e,l);break;case'"':Is(e,l,"double-quoted-scalar");break;case"'":Is(e,l,"single-quoted-scalar");break;default:Is(e,l,"scalar")}}function Ns(e,t){if(t)for(const i of t)switch(i.type){case"space":case"comment":e.push(i);break;case"newline":return e.push(i),!0}return!1}function Is(e,t,i){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=i,e.source=t;break;case"block-scalar":{const n=e.props.slice(1);let o=t.length;"block-scalar-header"===e.props[0].type&&(o-=e.props[0].source.length);for(const e of n)e.offset+=o;delete e.props,Object.assign(e,{type:i,source:t,end:n});break}case"block-map":case"block-seq":{const n={type:"newline",offset:e.offset+t.length,indent:e.indent,source:"\n"};delete e.items,Object.assign(e,{type:i,source:t,end:[n]});break}default:{const n="indent"in e?e.indent:-1,o="end"in e&&Array.isArray(e.end)?e.end.filter((e=>"space"===e.type||"comment"===e.type||"newline"===e.type)):[];for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:i,indent:n,source:t,end:o})}}}const Ts=e=>"type"in e?Ds(e):As(e);function Ds(e){switch(e.type){case"block-scalar":{let t="";for(const i of e.props)t+=Ds(i);return t+e.source}case"block-map":case"block-seq":{let t="";for(const i of e.items)t+=As(i);return t}case"flow-collection":{let t=e.start.source;for(const i of e.items)t+=As(i);for(const i of e.end)t+=i.source;return t}case"document":{let t=As(e);if(e.end)for(const i of e.end)t+=i.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(const i of e.end)t+=i.source;return t}}}function As({start:e,key:t,sep:i,value:n}){let o="";for(const t of e)o+=t.source;if(t&&(o+=Ds(t)),i)for(const e of i)o+=e.source;return n&&(o+=Ds(n)),o}const Os=Symbol("break visit"),Ms=Symbol("skip children"),Rs=Symbol("remove item");function Ps(e,t){"type"in e&&"document"===e.type&&(e={start:e.start,value:e.value}),Fs(Object.freeze([]),e,t)}function Fs(e,t,i){let n=i(t,e);if("symbol"==typeof n)return n;for(const o of["key","value"]){const r=t[o];if(r&&"items"in r){for(let t=0;t<r.items.length;++t){const n=Fs(Object.freeze(e.concat([[o,t]])),r.items[t],i);if("number"==typeof n)t=n-1;else{if(n===Os)return Os;n===Rs&&(r.items.splice(t,1),t-=1)}}"function"==typeof n&&"key"===o&&(n=n(t,e))}}return"function"==typeof n?n(t,e):n}Ps.BREAK=Os,Ps.SKIP=Ms,Ps.REMOVE=Rs,Ps.itemAtPath=(e,t)=>{let i=e;for(const[e,n]of t){const t=i?.[e];if(!t||!("items"in t))return;i=t.items[n]}return i},Ps.parentCollection=(e,t)=>{const i=Ps.itemAtPath(e,t.slice(0,-1))?.[t[t.length-1][0]];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};const Bs="\ufeff",Ws="",Vs="",zs="",js=e=>!!e&&"items"in e,Hs=e=>!!e&&("scalar"===e.type||"single-quoted-scalar"===e.type||"double-quoted-scalar"===e.type||"block-scalar"===e.type);function Us(e){switch(e){case Bs:return"<BOM>";case Ws:return"<DOC>";case Vs:return"<FLOW_END>";case zs:return"<SCALAR>";default:return JSON.stringify(e)}}function $s(e){switch(e){case Bs:return"byte-order-mark";case Ws:return"doc-mode";case Vs:return"flow-error-end";case zs:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case"\n":case"\r\n":return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function Ks(e){switch(e){case void 0:case" ":case"\n":case"\r":case"\t":return!0;default:return!1}}const qs="0123456789ABCDEFabcdef".split(""),Gs="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()".split(""),Ys=",[]{}".split(""),Zs=" ,[]{}\n\r\t".split(""),Xs=e=>!e||Zs.includes(e);class Js{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){e&&(this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null),this.atEnd=!t;let i=this.next??"stream";for(;i&&(t||this.hasChars(1));)i=yield*this.parseNext(i)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;" "===t||"\t"===t;)t=this.buffer[++e];return!t||"#"===t||"\n"===t||"\r"===t&&"\n"===this.buffer[e+1]}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let i=0;for(;" "===t;)t=this.buffer[++i+e];if("\r"===t){const t=this.buffer[i+e+1];if("\n"===t||!t&&!this.atEnd)return e+i+1}return"\n"===t||i>=this.indentNext||!t&&!this.atEnd?e+i:-1}if("-"===t||"."===t){const t=this.buffer.substr(e,3);if(("---"===t||"..."===t)&&Ks(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return("number"!=typeof e||-1!==e&&e<this.pos)&&(e=this.buffer.indexOf("\n",this.pos),this.lineEndPos=e),-1===e?this.atEnd?this.buffer.substring(this.pos):null:("\r"===this.buffer[e-1]&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(null===e)return this.setNext("stream");if(e[0]===Bs&&(yield*this.pushCount(1),e=e.substring(1)),"%"===e[0]){let t=e.length;const i=e.indexOf("#");if(-1!==i){const n=e[i-1];" "!==n&&"\t"!==n||(t=i-1)}for(;;){const i=e[t-1];if(" "!==i&&"\t"!==i)break;t-=1}const n=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-n),this.pushNewline(),"stream"}if(this.atLineEnd()){const t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield Ws,yield*this.parseLineStart()}*parseLineStart(){const e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if("-"===e||"."===e){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const e=this.peek(3);if("---"===e&&Ks(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,"doc";if("..."===e&&Ks(this.charAt(3)))return yield*this.pushCount(3),"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Ks(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if(("-"===e||"?"===e||":"===e)&&Ks(t)){const e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(null===e)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Xs),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=(yield*this.parseBlockScalarHeader()),t+=(yield*this.pushSpaces(!0)),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,i=-1;do{e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=i=t):t=0,t+=(yield*this.pushSpaces(!0))}while(e+t>0);const n=this.getLine();if(null===n)return this.setNext("flow");if((-1!==i&&i<this.indentNext&&"#"!==n[0]||0===i&&(n.startsWith("---")||n.startsWith("..."))&&Ks(n[3]))&&(i!==this.indentNext-1||1!==this.flowLevel||"]"!==n[0]&&"}"!==n[0]))return this.flowLevel=0,yield Vs,yield*this.parseLineStart();let o=0;for(;","===n[o];)o+=(yield*this.pushCount(1)),o+=(yield*this.pushSpaces(!0)),this.flowKey=!1;switch(o+=(yield*this.pushIndicators()),n[o]){case void 0:return"flow";case"#":return yield*this.pushCount(n.length-o),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Xs),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const e=this.charAt(1);if(this.flowKey||Ks(e)||","===e)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let t=this.buffer.indexOf(e,this.pos+1);if("'"===e)for(;-1!==t&&"'"===this.buffer[t+1];)t=this.buffer.indexOf("'",t+2);else for(;-1!==t;){let e=0;for(;"\\"===this.buffer[t-1-e];)e+=1;if(e%2==0)break;t=this.buffer.indexOf('"',t+1)}const i=this.buffer.substring(0,t);let n=i.indexOf("\n",this.pos);if(-1!==n){for(;-1!==n;){const e=this.continueScalar(n+1);if(-1===e)break;n=i.indexOf("\n",e)}-1!==n&&(t=n-("\r"===i[n-1]?2:1))}if(-1===t){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const t=this.buffer[++e];if("+"===t)this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if("-"!==t)break}return yield*this.pushUntil((e=>Ks(e)||"#"===e))}*parseBlockScalar(){let e,t=this.pos-1,i=0;e:for(let n=this.pos;e=this.buffer[n];++n)switch(e){case" ":i+=1;break;case"\n":t=n,i=0;break;case"\r":{const e=this.buffer[n+1];if(!e&&!this.atEnd)return this.setNext("block-scalar");if("\n"===e)break}default:break e}if(!e&&!this.atEnd)return this.setNext("block-scalar");if(i>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=i:this.indentNext+=this.blockScalarIndent;do{const e=this.continueScalar(t+1);if(-1===e)break;t=this.buffer.indexOf("\n",e)}while(-1!==t);if(-1===t){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}if(!this.blockScalarKeep)for(;;){let e=t-1,n=this.buffer[e];"\r"===n&&(n=this.buffer[--e]);const o=e;for(;" "===n||"\t"===n;)n=this.buffer[--e];if(!("\n"===n&&e>=this.pos&&e+1+i>o))break;t=e}return yield zs,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let t,i=this.pos-1,n=this.pos-1;for(;t=this.buffer[++n];)if(":"===t){const t=this.buffer[n+1];if(Ks(t)||e&&","===t)break;i=n}else if(Ks(t)){let o=this.buffer[n+1];if("\r"===t&&("\n"===o?(n+=1,t="\n",o=this.buffer[n+1]):i=n),"#"===o||e&&Ys.includes(o))break;if("\n"===t){const e=this.continueScalar(n+1);if(-1===e)break;n=Math.max(n,e-2)}}else{if(e&&Ys.includes(t))break;i=n}return t||this.atEnd?(yield zs,yield*this.pushToIndex(i+1,!0),e?"flow":"doc"):this.setNext("plain-scalar")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){const i=this.buffer.slice(this.pos,e);return i?(yield i,this.pos+=i.length,i.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Xs))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,t=this.charAt(1);if(Ks(t)||e&&Ys.includes(t))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if("<"===this.charAt(1)){let e=this.pos+2,t=this.buffer[e];for(;!Ks(t)&&">"!==t;)t=this.buffer[++e];return yield*this.pushToIndex(">"===t?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(Gs.includes(t))t=this.buffer[++e];else{if("%"!==t||!qs.includes(this.buffer[e+1])||!qs.includes(this.buffer[e+2]))break;t=this.buffer[e+=3]}return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return"\n"===e?yield*this.pushCount(1):"\r"===e&&"\n"===this.charAt(1)?yield*this.pushCount(2):0}*pushSpaces(e){let t,i=this.pos-1;do{t=this.buffer[++i]}while(" "===t||e&&"\t"===t);const n=i-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=i),n}*pushUntil(e){let t=this.pos,i=this.buffer[t];for(;!e(i);)i=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}class Qs{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,i=this.lineStarts.length;for(;t<i;){const n=t+i>>1;this.lineStarts[n]<e?t=n+1:i=n}return this.lineStarts[t]===e?{line:t+1,col:1}:0===t?{line:0,col:e}:{line:t,col:e-this.lineStarts[t-1]+1}}}}function ea(e,t){for(let i=0;i<e.length;++i)if(e[i].type===t)return!0;return!1}function ta(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function ia(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function na(e){switch(e.type){case"document":return e.start;case"block-map":{const t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function oa(e){if(0===e.length)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;"space"===e[++t]?.type;);return e.splice(t,e.length)}function ra(e){if("flow-seq-start"===e.start.type)for(const t of e.items)!t.sep||t.value||ea(t.start,"explicit-key-ind")||ea(t.sep,"map-value-ind")||(t.key&&(t.value=t.key),delete t.key,ia(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}class sa{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Js,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&0===this.offset&&this.onNewLine(0);for(const i of this.lexer.lex(e,t))yield*this.next(i);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar)return this.atScalar=!1,yield*this.step(),void(this.offset+=e.length);const t=$s(e);if(t)if("scalar"===t)this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&" "===e[0]&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const t=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:t,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if("doc-end"!==this.type||e&&"doc-end"===e.type){if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}else{for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source})}}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(t)if(0===this.stack.length)yield t;else{const e=this.peek(1);switch("block-scalar"===t.type?t.indent="indent"in e?e.indent:0:"flow-collection"===t.type&&"document"===e.type&&(t.indent=0),"flow-collection"===t.type&&ra(t),e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{const i=e.items[e.items.length-1];if(i.value)return e.items.push({start:[],key:t,sep:[]}),void(this.onKeyLine=!0);if(!i.sep)return Object.assign(i,{key:t,sep:[]}),void(this.onKeyLine=!ea(i.start,"explicit-key-ind"));i.value=t;break}case"block-seq":{const i=e.items[e.items.length-1];i.value?e.items.push({start:[],value:t}):i.value=t;break}case"flow-collection":{const i=e.items[e.items.length-1];return void(!i||i.value?e.items.push({start:[],key:t,sep:[]}):i.sep?i.value=t:Object.assign(i,{key:t,sep:[]}))}default:yield*this.pop(),yield*this.pop(t)}if(!("document"!==e.type&&"block-map"!==e.type&&"block-seq"!==e.type||"block-map"!==t.type&&"block-seq"!==t.type)){const i=t.items[t.items.length-1];i&&!i.sep&&!i.value&&i.start.length>0&&-1===ta(i.start)&&(0===t.indent||i.start.every((e=>"comment"!==e.type||e.indent<t.indent)))&&("document"===e.type?e.end=i.start:e.items.push({start:i.start}),t.items.splice(-1,1))}}else{const e="Tried to pop an empty stack";yield{type:"error",offset:this.offset,source:"",message:e}}}*stream(){switch(this.type){case"directive-line":return void(yield{type:"directive",offset:this.offset,source:this.source});case"byte-order-mark":case"space":case"comment":case"newline":return void(yield this.sourceToken);case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};return"doc-start"===this.type&&e.start.push(this.sourceToken),void this.stack.push(e)}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":return void(-1!==ta(e.start)?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken));case"anchor":case"tag":case"space":case"comment":case"newline":return void e.start.push(this.sourceToken)}const t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if("map-value-ind"===this.type){const t=oa(na(this.peek(2)));let i;e.end?(i=e.end,i.push(this.sourceToken),delete e.end):i=[this.sourceToken];const n={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:i}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=n}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":return void e.props.push(this.sourceToken);case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){const i="end"in t.value?t.value.end:void 0;"comment"===(Array.isArray(i)?i[i.length-1]:void 0)?.type?i?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){const i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i))return Array.prototype.push.apply(i,t.start),i.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const i=!this.onKeyLine&&this.indent===e.indent&&t.sep;let n=[];if(i&&t.sep&&!t.value){const i=[];for(let n=0;n<t.sep.length;++n){const o=t.sep[n];switch(o.type){case"newline":i.push(n);break;case"space":break;case"comment":o.indent>e.indent&&(i.length=0);break;default:i.length=0}}i.length>=2&&(n=t.sep.splice(i[1]))}switch(this.type){case"anchor":case"tag":return void(i||t.value?(n.push(this.sourceToken),e.items.push({start:n}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"explicit-key-ind":return t.sep||ea(t.start,"explicit-key-ind")?i||t.value?(n.push(this.sourceToken),e.items.push({start:n})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]}):t.start.push(this.sourceToken),void(this.onKeyLine=!0);case"map-value-ind":if(ea(t.start,"explicit-key-ind"))if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(ea(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]});else if(ia(t.key)&&!ea(t.sep,"newline")){const e=oa(t.start),i=t.key,n=t.sep;n.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:i,sep:n}]})}else n.length>0?t.sep=t.sep.concat(n,this.sourceToken):t.sep.push(this.sourceToken);else if(ea(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const e=oa(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||i?e.items.push({start:n,key:null,sep:[this.sourceToken]}):ea(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return void(this.onKeyLine=!0);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const o=this.flowScalar(this.type);return void(i||t.value?(e.items.push({start:n,key:o,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(o):(Object.assign(t,{key:o,sep:[]}),this.onKeyLine=!0))}default:{const o=this.startBlockValue(e);if(o)return i&&"block-seq"!==o.type&&ea(t.start,"explicit-key-ind")&&e.items.push({start:n}),void this.stack.push(o)}}}yield*this.pop(),yield*this.step()}*blockSequence(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const i="end"in t.value?t.value.end:void 0;"comment"===(Array.isArray(i)?i[i.length-1]:void 0)?.type?i?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){const i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i))return Array.prototype.push.apply(i,t.start),i.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;return void t.start.push(this.sourceToken);case"seq-item-ind":if(this.indent!==e.indent)break;return void(t.value||ea(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken))}if(this.indent>e.indent){const t=this.startBlockValue(e);if(t)return void this.stack.push(t)}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if("flow-error-end"===this.type){let e;do{yield*this.pop(),e=this.peek(1)}while(e&&"flow-collection"===e.type)}else if(0===e.end.length){switch(this.type){case"comma":case"explicit-key-ind":return void(!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken));case"map-value-ind":return void(!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]}));case"space":case"comment":case"newline":case"anchor":case"tag":return void(!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const i=this.flowScalar(this.type);return void(!t||t.value?e.items.push({start:[],key:i,sep:[]}):t.sep?this.stack.push(i):Object.assign(t,{key:i,sep:[]}))}case"flow-map-end":case"flow-seq-end":return void e.end.push(this.sourceToken)}const i=this.startBlockValue(e);i?this.stack.push(i):(yield*this.pop(),yield*this.step())}else{const t=this.peek(2);if("block-map"===t.type&&("map-value-ind"===this.type&&t.indent===e.indent||"newline"===this.type&&!t.items[t.items.length-1].sep))yield*this.pop(),yield*this.step();else if("map-value-ind"===this.type&&"flow-collection"!==t.type){const i=oa(na(t));ra(e);const n=e.end.splice(1,e.end.length);n.push(this.sourceToken);const o={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:i,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const t=oa(na(e));return t.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t}]}}case"map-value-ind":{this.onKeyLine=!0;const t=oa(na(e));return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return"comment"===this.type&&!(this.indent<=t)&&e.every((e=>"newline"===e.type||"space"===e.type))}*documentEnd(e){"doc-mode"!==this.type&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop())}}}function aa(e){const t=!1!==e.prettyErrors;return{lineCounter:e.lineCounter||t&&new Qs||null,prettyErrors:t}}function la(e,t={}){const{lineCounter:i,prettyErrors:n}=aa(t),o=new sa(i?.addNewLine),r=new ks(t),s=Array.from(r.compose(o.parse(e)));if(n&&i)for(const t of s)t.errors.forEach(is(e,i)),t.warnings.forEach(is(e,i));return s.length>0?s:Object.assign([],{empty:!0},r.streamInfo())}function ca(e,t={}){const{lineCounter:i,prettyErrors:n}=aa(t),o=new sa(i?.addNewLine),r=new ks(t);let s=null;for(const t of r.compose(o.parse(e),!0,e.length))if(s){if("silent"!==s.options.logLevel){s.errors.push(new es(t.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}else s=t;return n&&i&&(s.errors.forEach(is(e,i)),s.warnings.forEach(is(e,i))),s}function da(e,t,i){let n;"function"==typeof t?n=t:void 0===i&&t&&"object"==typeof t&&(i=t);const o=ca(e,i);if(!o)return null;if(o.warnings.forEach((e=>Bo(o.options.logLevel,e))),o.errors.length>0){if("silent"!==o.options.logLevel)throw o.errors[0];o.errors=[]}return o.toJS(Object.assign({reviver:n},i))}function ha(e,t,i){let n=null;if("function"==typeof t||Array.isArray(t)?n=t:void 0===i&&t&&(i=t),"string"==typeof i&&(i=i.length),"number"==typeof i){const e=Math.round(i);i=e<1?void 0:e>8?{indent:8}:{indent:e}}if(void 0===e){const{keepUndefined:e}=i??t??{};if(!e)return}return new Xr(e,n,i).toString(i)}var ua,ga=r,pa=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"docker-yaml-code-editor"},[i("div",{ref:"editor",class:e.editorClasses}),e._v(" "),i("transition",{attrs:{name:"grow-height"}},[e.problems.length>0?i("v-perfect-scrollbar",{class:e.problemsClasses},e._l(e.problems,(function(t,n){return i("div",{key:n,staticClass:"docker-yaml-code-editor-problem",on:{click:function(){return e.focusCursorByProblem(t)}}},[i("icon",{attrs:{small:"",name:e.getIconNameByProblem(t)}}),e._v(" "),i("span",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{content:t.message,overflowOnly:!0},expression:"{\n                        content: problem.message,\n                        overflowOnly: true\n                    }"}],staticClass:"docker-yaml-code-editor-problem-text"},[e._v("\n                    "+e._s(t.message)+"\n                ")])],1)})),0):e._e()],1)],1)};function ma(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)}pa._withStripped=!0;const fa="en";let _a,va,ba,wa=!1,ya=!1,Ca=!1,Sa=!1,ka=!1,xa=!1,La=!1,Ea=!1,Na=!1,Ia=null;const Ta="object"==typeof self?self:"object"==typeof i.g?i.g:{};let Da;void 0!==Ta.vscode&&void 0!==Ta.vscode.process?Da=Ta.vscode.process:"undefined"!=typeof process&&(Da=process);const Aa="string"==typeof(null===(ua=null==Da?void 0:Da.versions)||void 0===ua?void 0:ua.electron),Oa=Aa&&"renderer"===(null==Da?void 0:Da.type);if("object"!=typeof navigator||Oa)if("object"==typeof Da){wa="win32"===Da.platform,ya="darwin"===Da.platform,Ca="linux"===Da.platform,Sa=Ca&&!!Da.env.SNAP&&!!Da.env.SNAP_REVISION,La=Aa,Na=!!Da.env.CI||!!Da.env.BUILD_ARTIFACTSTAGINGDIRECTORY,_a=fa,Ia=fa;const e=Da.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e),i=t.availableLanguages["*"];_a=t.locale,Ia=i||fa,va=t._translationsConfigFile}catch(e){}ka=!0}else console.error("Unable to resolve platform.");else ba=navigator.userAgent,wa=ba.indexOf("Windows")>=0,ya=ba.indexOf("Macintosh")>=0,Ea=(ba.indexOf("Macintosh")>=0||ba.indexOf("iPad")>=0||ba.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Ca=ba.indexOf("Linux")>=0,xa=!0,_a=navigator.language,Ia=_a;let Ma=0;ya?Ma=1:wa?Ma=3:Ca&&(Ma=2);const Ra=wa,Pa=ya,Fa=Ca,Ba=ka,Wa=xa,Va=xa&&"function"==typeof Ta.importScripts,za=Ea,ja=ba,Ha=(()=>{if("function"==typeof Ta.postMessage&&!Ta.importScripts){let e=[];Ta.addEventListener("message",(t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let i=0,n=e.length;i<n;i++){const n=e[i];if(n.id===t.data.vscodeScheduleAsyncWork)return e.splice(i,1),void n.callback()}}));let t=0;return i=>{const n=++t;e.push({id:n,callback:i}),Ta.postMessage({vscodeScheduleAsyncWork:n},"*")}}return e=>setTimeout(e)})(),Ua=ya||Ea?2:wa?1:3;let $a=!0,Ka=!1;function qa(){if(!Ka){Ka=!0;const e=new Uint8Array(2);e[0]=1,e[1]=2;const t=new Uint16Array(e.buffer);$a=513===t[0]}return $a}const Ga=!!(ja&&ja.indexOf("Chrome")>=0),Ya=!!(ja&&ja.indexOf("Firefox")>=0),Za=!!(!Ga&&ja&&ja.indexOf("Safari")>=0),Xa=!!(ja&&ja.indexOf("Edg/")>=0),Ja=(ja&&ja.indexOf("Android"),"`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?"),Qa=function(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const i of Ja)e.indexOf(i)>=0||(t+="\\"+i);return t+="\\s]+)",new RegExp(t,"g")}();function el(e){let t=Qa;if(e&&e instanceof RegExp)if(e.global)t=e;else{let i="g";e.ignoreCase&&(i+="i"),e.multiline&&(i+="m"),e.unicode&&(i+="u"),t=new RegExp(e.source,i)}return t.lastIndex=0,t}const tl={maxLen:1e3,windowSize:15,timeBudget:150};function il(e,t,i,n,o=tl){if(i.length>o.maxLen){let r=e-o.maxLen/2;return r<0?r=0:n+=r,il(e,t,i=i.substring(r,e+o.maxLen/2),n,o)}const r=Date.now(),s=e-1-n;let a=-1,l=null;for(let e=1;!(Date.now()-r>=o.timeBudget);e++){const n=s-o.windowSize*e;t.lastIndex=Math.max(0,n);const r=nl(t,i,s,a);if(!r&&l)break;if(l=r,n<=0)break;a=n}if(l){const e={word:l[0],startColumn:n+1+l.index,endColumn:n+1+l.index+l[0].length};return t.lastIndex=0,e}return null}function nl(e,t,i,n){let o;for(;o=e.exec(t);){const t=o.index||0;if(t<=i&&e.lastIndex>=i)return o;if(n>0&&t>n)return null}return null}function ol(e,t=0){return e[e.length-(1+t)]}function rl(e,t,i=((e,t)=>e===t)){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(let n=0,o=e.length;n<o;n++)if(!i(e[n],t[n]))return!1;return!0}function sl(e){return e.filter((e=>!!e))}function al(e){return Array.isArray(e)&&e.length>0}function ll(e,t=(e=>e)){const i=new Set;return e.filter((e=>{const n=t(e);return!i.has(n)&&(i.add(n),!0)}))}function cl(e,t){return e.length>0?e[0]:t}function dl(e,t){let i="number"==typeof t?e:0;"number"==typeof t?i=e:(i=0,t=e);const n=[];if(i<=t)for(let e=i;e<t;e++)n.push(e);else for(let e=i;e>t;e--)n.push(e);return n}function hl(e,t,i){const n=e.slice(0,t),o=e.slice(t);return n.concat(i,o)}function ul(e,t){const i=e.indexOf(t);i>-1&&(e.splice(i,1),e.unshift(t))}function gl(e,t){const i=e.indexOf(t);i>-1&&(e.splice(i,1),e.push(t))}function pl(e,t,i,n){const o=ml(e,t),r=e.splice(o,i);return function(e,t,i){const n=ml(e,t),o=e.length,r=i.length;e.length=o+r;for(let t=o-1;t>=n;t--)e[t+r]=e[t];for(let t=0;t<r;t++)e[t+n]=i[t]}(e,o,n),r}function ml(e,t){return t<0?Math.max(t+e.length,0):Math.min(t,e.length)}function fl(e,t){return(i,n)=>t(e(i),e(n))}class _l{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}takeWhile(e){let t=this.firstIdx;for(;t<this.items.length&&e(this.items[t]);)t++;const i=t===this.firstIdx?null:this.items.slice(this.firstIdx,t);return this.firstIdx=t,i}takeFromEndWhile(e){let t=this.lastIdx;for(;t>=0&&e(this.items[t]);)t--;const i=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,i}peek(){return this.items[this.firstIdx]}dequeue(){const e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){const t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}}function vl(e){return"string"==typeof e}function bl(e){return!("object"!=typeof e||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function wl(e){return"number"==typeof e&&!isNaN(e)}function yl(e){return!!e&&"function"==typeof e[Symbol.iterator]}function Cl(e){return!0===e||!1===e}function Sl(e){return void 0===e}function kl(e){return!xl(e)}function xl(e){return Sl(e)||null===e}function Ll(e,t){if(!e)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}function El(e){return"function"==typeof e}function Nl(e,t){if(vl(t)){if(typeof e!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(El(t)){try{if(e instanceof t)return}catch(e){}if(!xl(e)&&e.constructor===t)return;if(1===t.length&&!0===t.call(void 0,e))return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function Il(e){const t=[];for(const i of function(e){let t=[],i=Object.getPrototypeOf(e);for(;Object.prototype!==i;)t=t.concat(Object.getOwnPropertyNames(i)),i=Object.getPrototypeOf(i);return t}(e))"function"==typeof e[i]&&t.push(i);return t}function Tl(e){return null===e?void 0:e}function Dl(e,t="Unreachable"){throw new Error(t)}function Al(e){if(!e||"object"!=typeof e)return e;if(e instanceof RegExp)return e;const t=Array.isArray(e)?[]:{};return Object.keys(e).forEach((i=>{e[i]&&"object"==typeof e[i]?t[i]=Al(e[i]):t[i]=e[i]})),t}const Ol=Object.prototype.hasOwnProperty;function Ml(e,t,i=!0){return bl(e)?(bl(t)&&Object.keys(t).forEach((n=>{n in e?i&&(bl(e[n])&&bl(t[n])?Ml(e[n],t[n],i):e[n]=t[n]):e[n]=t[n]})),e):t}function Rl(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;let i,n;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(!Rl(e[i],t[i]))return!1}else{const o=[];for(n in e)o.push(n);o.sort();const r=[];for(n in t)r.push(n);if(r.sort(),!Rl(o,r))return!1;for(i=0;i<o.length;i++)if(!Rl(e[o[i]],t[o[i]]))return!1}return!0}function Pl(e,t,i){const n=t(e);return void 0===n?i:n}const Fl={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!1}};class Bl{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class Wl{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class Vl{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return jl(e,t)}compute(e,t,i){return i}}class zl{constructor(e,t){this.newValue=e,this.didChange=t}}function jl(e,t){if("object"!=typeof e||"object"!=typeof t||!e||!t)return new zl(t,e!==t);if(Array.isArray(e)||Array.isArray(t)){const i=Array.isArray(e)&&Array.isArray(t)&&rl(e,t);return new zl(t,i)}let i=!1;for(const n in t)if(t.hasOwnProperty(n)){const o=jl(e[n],t[n]);o.didChange&&(e[n]=o.newValue,i=!0)}return new zl(e,i)}class Hl{constructor(e){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0}applyUpdate(e,t){return jl(e,t)}validate(e){return this.defaultValue}}class Ul{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return jl(e,t)}validate(e){return void 0===e?this.defaultValue:e}compute(e,t,i){return i}}function $l(e,t){return void 0===e?t:"false"!==e&&Boolean(e)}class Kl extends Ul{constructor(e,t,i,n){void 0!==n&&(n.type="boolean",n.default=i),super(e,t,i,n)}validate(e){return $l(e,this.defaultValue)}}function ql(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 Gl extends Ul{constructor(e,t,i,n,o,r){void 0!==r&&(r.type="integer",r.default=i,r.minimum=n,r.maximum=o),super(e,t,i,r),this.minimum=n,this.maximum=o}static clampedInt(e,t,i,n){return ql(e,t,i,n)}validate(e){return Gl.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}class Yl extends Ul{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 e<t?t:e>i?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(Yl.float(e,this.defaultValue))}}class Zl extends Ul{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 Zl.string(e,this.defaultValue)}}function Xl(e,t,i){return"string"!=typeof e||-1===i.indexOf(e)?t:e}class Jl extends Ul{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 Xl(e,this.defaultValue,this._allowedValues)}}class Ql extends Vl{constructor(e,t,i,n,o,r,s){void 0!==s&&(s.type="string",s.enum=o,s.default=n),super(e,t,i,s),this._allowedValues=o,this._convert=r}validate(e){return"string"!=typeof e||-1===this._allowedValues.indexOf(e)?this.defaultValue:this._convert(e)}}var ec;!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"}(ec||(ec={}));class tc extends Vl{constructor(){super(45,"fontLigatures",tc.OFF,{anyOf:[{type:"boolean",description:ma(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:ma(0,"Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:ma(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?tc.OFF:"true"===e?tc.ON:e:Boolean(e)?tc.ON:tc.OFF}}tc.OFF='"liga" off, "calt" off',tc.ON='"liga" on, "calt" on';class ic extends Vl{constructor(){super(47,"fontWeight",lc.fontWeight,{anyOf:[{type:"number",minimum:ic.MINIMUM_VALUE,maximum:ic.MAXIMUM_VALUE,errorMessage:ma(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:ic.SUGGESTION_VALUES}],default:lc.fontWeight,description:ma(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(Gl.clampedInt(e,lc.fontWeight,ic.MINIMUM_VALUE,ic.MAXIMUM_VALUE))}}ic.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],ic.MINIMUM_VALUE=1,ic.MAXIMUM_VALUE=1e3;class nc extends Hl{constructor(){super(131)}compute(e,t,i){return nc.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 r=t.stableMinimapLayoutInput,s=r&&e.outerHeight===r.outerHeight&&e.lineHeight===r.lineHeight&&e.typicalHalfwidthCharacterWidth===r.typicalHalfwidthCharacterWidth&&e.pixelRatio===r.pixelRatio&&e.scrollBeyondLastLine===r.scrollBeyondLastLine&&e.minimap.enabled===r.minimap.enabled&&e.minimap.side===r.minimap.side&&e.minimap.size===r.minimap.size&&e.minimap.showSlider===r.minimap.showSlider&&e.minimap.renderCharacters===r.minimap.renderCharacters&&e.minimap.maxColumn===r.minimap.maxColumn&&e.minimap.scale===r.minimap.scale&&e.verticalScrollbarWidth===r.verticalScrollbarWidth&&e.isViewportWrapping===r.isViewportWrapping,a=e.lineHeight,l=e.typicalHalfwidthCharacterWidth,c=e.scrollBeyondLastLine,d=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=d?2:3;let w=Math.floor(o*n);const y=w/o;let C=!1,S=!1,k=b*h,x=h/o,L=1;if("fill"===g||"fit"===g){const{typicalViewportLineCount:i,extraLinesBeyondLastLine:r,desiredRatio:l,minimapLineCount:d}=nc.computeContainedMinimapLineCount({viewLineCount:f,scrollBeyondLastLine:c,height:n,lineHeight:a,pixelRatio:o});if(f/d>1)C=!0,S=!0,h=1,k=1,x=h/o;else{let n=!1,c=h+1;if("fit"===g){const e=Math.ceil((f+r)*k);v&&s&&_<=t.stableFitRemainingWidth?(n=!0,c=t.stableFitMaxMinimapScale):n=e>w}if("fill"===g||n){C=!0;const n=h;k=Math.min(a*o,Math.max(1,Math.floor(1/l))),v&&s&&_<=t.stableFitRemainingWidth&&(c=t.stableFitMaxMinimapScale),h=Math.min(c,Math.max(1,Math.floor(k/b))),h>n&&(L=Math.min(2,h/n)),x=h/o/L,w=Math.ceil(Math.max(i,f+r)*k),v?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=_,t.stableFitMaxMinimapScale=h):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}const E=Math.floor(u*x),N=Math.min(E,Math.max(0,Math.floor((_-m-2)*x/(l+x)))+8);let I=Math.floor(o*N);const T=I/o;return I=Math.floor(I*L),{renderMinimap:d?1:2,minimapLeft:"left"===p?0:i-N-m,minimapWidth:N,minimapHeightIsEditorHeight:C,minimapIsSampling:S,minimapScale:h,minimapLineHeight:k,minimapCanvasInnerWidth:I,minimapCanvasInnerHeight:w,minimapCanvasOuterWidth:T,minimapCanvasOuterHeight:y}}static computeLayout(e,t){const i=0|t.outerWidth,n=0|t.outerHeight,o=0|t.lineHeight,r=0|t.lineNumbersDigitCount,s=t.typicalHalfwidthCharacterWidth,a=t.maxDigitWidth,l=t.pixelRatio,c=t.viewLineCount,d=e.get(123),h="inherit"===d?e.get(122):d,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),y=e.get(92),C=y.verticalScrollbarSize,S=y.verticalHasArrows,k=y.arrowSize,x=y.horizontalScrollbarSize,L=e.get(58),E=e.get(37);let N;if("string"==typeof L&&/^\d+(\.\d+)?ch$/.test(L)){const e=parseFloat(L.substr(0,L.length-2));N=Gl.clampedInt(e*s,0,0,1e3)}else N=Gl.clampedInt(L,0,0,1e3);E&&(N+=16);let I=0;if(_){const e=Math.max(r,v);I=Math.round(e*a)}let T=0;f&&(T=o);let D=0,A=D+T,O=A+I,M=O+N;const R=i-T-I-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 W=nc._computeMinimapLayout({outerWidth:i,outerHeight:n,lineHeight:o,typicalHalfwidthCharacterWidth:s,pixelRatio:l,scrollBeyondLastLine:b,minimap:w,verticalScrollbarWidth:C,viewLineCount:c,remainingWidth:R,isViewportWrapping:F},t.memory||new Wl);0!==W.renderMinimap&&0===W.minimapLeft&&(D+=W.minimapWidth,A+=W.minimapWidth,O+=W.minimapWidth,M+=W.minimapWidth);const V=R-W.minimapWidth,z=Math.max(1,Math.floor((V-C-2)/s)),j=S?k:0;return F&&(B=Math.max(1,z),"bounded"===u&&(B=Math.min(B,g))),{width:i,height:n,glyphMarginLeft:D,glyphMarginWidth:T,lineNumbersLeft:A,lineNumbersWidth:I,decorationsLeft:O,decorationsWidth:N,contentLeft:M,contentWidth:V,minimap:W,viewportColumn:z,isWordWrapMinified:P,isViewportWrapping:F,wrappingColumn:B,verticalScrollbarWidth:C,horizontalScrollbarHeight:x,overviewRuler:{top:j,width:C,height:n-2*j,right:0}}}}function oc(e){const t=e.get(87);return"editable"===t?e.get(81):"on"!==t}function rc(e,t){if("string"!=typeof e)return t;switch(e){case"hidden":return 2;case"visible":return 3;default:return 1}}const sc="inUntrustedWorkspace";function ac(e,t,i){const n=i.indexOf(e);return-1===n?t:i[n]}const lc={fontFamily:Pa?"Menlo, Monaco, 'Courier New', monospace":Fa?"'Droid Sans Mono', 'monospace', monospace":"Consolas, 'Courier New', monospace",fontWeight:"normal",fontSize:Pa?12:14,lineHeight:0,letterSpacing:0},cc=[];function dc(e){return cc[e.id]=e,e}const hc={acceptSuggestionOnCommitCharacter:dc(new Kl(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:ma(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:dc(new Jl(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",ma(0,"Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:ma(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:dc(new class extends Vl{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[ma(0,"The editor will use platform APIs to detect when a Screen Reader is attached."),ma(0,"The editor will be permanently optimized for usage with a Screen Reader. Word wrapping will be disabled."),ma(0,"The editor will never be optimized for usage with a Screen Reader.")],default:"auto",description:ma(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:dc(new Gl(3,"accessibilityPageSize",10,1,1073741824,{description:ma(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:dc(new Zl(4,"ariaLabel",ma(0,"Editor content"))),autoClosingBrackets:dc(new Jl(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",ma(0,"Use language configurations to determine when to autoclose brackets."),ma(0,"Autoclose brackets only when the cursor is to the left of whitespace."),""],description:ma(0,"Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingDelete:dc(new Jl(6,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",ma(0,"Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:ma(0,"Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:dc(new Jl(7,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",ma(0,"Type over closing quotes or brackets only if they were automatically inserted."),""],description:ma(0,"Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:dc(new Jl(8,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",ma(0,"Use language configurations to determine when to autoclose quotes."),ma(0,"Autoclose quotes only when the cursor is to the left of whitespace."),""],description:ma(0,"Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:dc(new Ql(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:[ma(0,"The editor will not insert indentation automatically."),ma(0,"The editor will keep the current line's indentation."),ma(0,"The editor will keep the current line's indentation and honor language defined brackets."),ma(0,"The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),ma(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:ma(0,"Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:dc(new Kl(10,"automaticLayout",!1)),autoSurround:dc(new Jl(11,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[ma(0,"Use language configurations to determine when to automatically surround selections."),ma(0,"Surround with quotes but not brackets."),ma(0,"Surround with brackets but not quotes."),""],description:ma(0,"Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:dc(new class extends Vl{constructor(){const e={enabled:Fl.bracketPairColorizationOptions.enabled};super(12,"bracketPairColorization",e,{"editor.bracketPairColorization.enabled":{type:"boolean",default:e.enabled,description:ma(0,"Controls whether bracket pair colorization is enabled or not. Use 'workbench.colorCustomizations' to override the bracket highlight colors.")}})}validate(e){return e&&"object"==typeof e?{enabled:$l(e.enabled,this.defaultValue.enabled)}:this.defaultValue}}),bracketPairGuides:dc(new class extends Vl{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:[ma(0,"Enables bracket pair guides."),ma(0,"Enables bracket pair guides only for the active bracket pair."),ma(0,"Disables bracket pair guides.")],default:e.bracketPairs,description:ma(0,"Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[ma(0,"Enables horizontal guides as addition to vertical bracket pair guides."),ma(0,"Enables horizontal guides only for the active bracket pair."),ma(0,"Disables horizontal bracket pair guides.")],default:e.bracketPairsHorizontal,description:ma(0,"Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:e.highlightActiveBracketPair,description:ma(0,"Controls whether the editor should highlight the active bracket pair.")},"editor.guides.indentation":{type:"boolean",default:e.indentation,description:ma(0,"Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:"boolean",default:e.highlightActiveIndentation,description:ma(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:ac(t.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:ac(t.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:$l(t.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:$l(t.indentation,this.defaultValue.indentation),highlightActiveIndentation:$l(t.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation)}}}),stickyTabStops:dc(new Kl(104,"stickyTabStops",!1,{description:ma(0,"Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:dc(new Kl(14,"codeLens",!0,{description:ma(0,"Controls whether the editor shows CodeLens.")})),codeLensFontFamily:dc(new Zl(15,"codeLensFontFamily","",{description:ma(0,"Controls the font family for CodeLens.")})),codeLensFontSize:dc(new Gl(16,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:ma(0,"Controls the font size in pixels for CodeLens. When set to `0`, 90% of `#editor.fontSize#` is used.")})),colorDecorators:dc(new Kl(17,"colorDecorators",!0,{description:ma(0,"Controls whether the editor should render the inline color decorators and color picker.")})),columnSelection:dc(new Kl(18,"columnSelection",!1,{description:ma(0,"Enable that the selection with the mouse and keys is doing column selection.")})),comments:dc(new class extends Vl{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(19,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:ma(0,"Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:ma(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:$l(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:$l(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}),contextmenu:dc(new Kl(20,"contextmenu",!0)),copyWithSyntaxHighlighting:dc(new Kl(21,"copyWithSyntaxHighlighting",!0,{description:ma(0,"Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:dc(new Ql(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:ma(0,"Control the cursor animation style.")})),cursorSmoothCaretAnimation:dc(new Kl(23,"cursorSmoothCaretAnimation",!1,{description:ma(0,"Controls whether the smooth caret animation should be enabled.")})),cursorStyle:dc(new Ql(24,"cursorStyle",ec.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],(function(e){switch(e){case"line":return ec.Line;case"block":return ec.Block;case"underline":return ec.Underline;case"line-thin":return ec.LineThin;case"block-outline":return ec.BlockOutline;case"underline-thin":return ec.UnderlineThin}}),{description:ma(0,"Controls the cursor style.")})),cursorSurroundingLines:dc(new Gl(25,"cursorSurroundingLines",0,0,1073741824,{description:ma(0,"Controls the minimal number of visible leading and trailing lines surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:dc(new Jl(26,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[ma(0,"`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),ma(0,"`cursorSurroundingLines` is enforced always.")],description:ma(0,"Controls when `cursorSurroundingLines` should be enforced.")})),cursorWidth:dc(new Gl(27,"cursorWidth",0,0,1073741824,{markdownDescription:ma(0,"Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:dc(new Kl(28,"disableLayerHinting",!1)),disableMonospaceOptimizations:dc(new Kl(29,"disableMonospaceOptimizations",!1)),domReadOnly:dc(new Kl(30,"domReadOnly",!1)),dragAndDrop:dc(new Kl(31,"dragAndDrop",!0,{description:ma(0,"Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:dc(new class extends Kl{constructor(){super(32,"emptySelectionClipboard",!0,{description:ma(0,"Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}}),extraEditorClassName:dc(new Zl(33,"extraEditorClassName","")),fastScrollSensitivity:dc(new Yl(34,"fastScrollSensitivity",5,(e=>e<=0?5:e),{markdownDescription:ma(0,"Scrolling speed multiplier when pressing `Alt`.")})),find:dc(new class extends Vl{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:ma(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:[ma(0,"Never seed search string from the editor selection."),ma(0,"Always seed search string from the editor selection, including word at cursor position."),ma(0,"Only seed search string from the editor selection.")],description:ma(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:[ma(0,"Never turn on Find in Selection automatically (default)."),ma(0,"Always turn on Find in Selection automatically."),ma(0,"Turn on Find in Selection automatically when multiple lines of content are selected.")],description:ma(0,"Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:ma(0,"Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:Pa},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:ma(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:ma(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:$l(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:"boolean"==typeof e.seedSearchStringFromSelection?e.seedSearchStringFromSelection?"always":"never":Xl(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:"boolean"==typeof e.autoFindInSelection?e.autoFindInSelection?"always":"never":Xl(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:$l(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:$l(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:$l(t.loop,this.defaultValue.loop)}}}),fixedOverflowWidgets:dc(new Kl(36,"fixedOverflowWidgets",!1)),folding:dc(new Kl(37,"folding",!0,{description:ma(0,"Controls whether the editor has code folding enabled.")})),foldingStrategy:dc(new Jl(38,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[ma(0,"Use a language-specific folding strategy if available, else the indentation-based one."),ma(0,"Use the indentation-based folding strategy.")],description:ma(0,"Controls the strategy for computing folding ranges.")})),foldingHighlight:dc(new Kl(39,"foldingHighlight",!0,{description:ma(0,"Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:dc(new Kl(40,"foldingImportsByDefault",!1,{description:ma(0,"Controls whether the editor automatically collapses import ranges.")})),foldingMaximumRegions:dc(new Gl(41,"foldingMaximumRegions",5e3,10,65e3,{description:ma(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:dc(new Kl(42,"unfoldOnClickAfterEndOfLine",!1,{description:ma(0,"Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:dc(new Zl(43,"fontFamily",lc.fontFamily,{description:ma(0,"Controls the font family.")})),fontInfo:dc(new class extends Hl{constructor(){super(44)}compute(e,t,i){return e.fontInfo}}),fontLigatures2:dc(new tc),fontSize:dc(new class extends Ul{constructor(){super(46,"fontSize",lc.fontSize,{type:"number",minimum:6,maximum:100,default:lc.fontSize,description:ma(0,"Controls the font size in pixels.")})}validate(e){const t=Yl.float(e,this.defaultValue);return 0===t?lc.fontSize:Yl.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}}),fontWeight:dc(new ic),formatOnPaste:dc(new Kl(48,"formatOnPaste",!1,{description:ma(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:dc(new Kl(49,"formatOnType",!1,{description:ma(0,"Controls whether the editor should automatically format the line after typing.")})),glyphMargin:dc(new Kl(50,"glyphMargin",!0,{description:ma(0,"Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:dc(new class extends Vl{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:[ma(0,"Show peek view of the results (default)"),ma(0,"Go to the primary result and show a peek view"),ma(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:ma(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:ma(0,"Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:ma(0,"Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleDeclarations":Object.assign({description:ma(0,"Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleImplementations":Object.assign({description:ma(0,"Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleReferences":Object.assign({description:ma(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:ma(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:ma(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:ma(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:ma(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:ma(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,r;if(!e||"object"!=typeof e)return this.defaultValue;const s=e;return{multiple:Xl(s.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:null!==(t=s.multipleDefinitions)&&void 0!==t?t:Xl(s.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:null!==(i=s.multipleTypeDefinitions)&&void 0!==i?i:Xl(s.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:null!==(n=s.multipleDeclarations)&&void 0!==n?n:Xl(s.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:null!==(o=s.multipleImplementations)&&void 0!==o?o:Xl(s.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:null!==(r=s.multipleReferences)&&void 0!==r?r:Xl(s.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:Zl.string(s.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:Zl.string(s.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:Zl.string(s.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:Zl.string(s.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:Zl.string(s.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}),hideCursorInOverviewRuler:dc(new Kl(52,"hideCursorInOverviewRuler",!1,{description:ma(0,"Controls whether the cursor should be hidden in the overview ruler.")})),hover:dc(new class extends Vl{constructor(){const e={enabled:!0,delay:300,sticky:!0,above:!0};super(53,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:ma(0,"Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:ma(0,"Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:ma(0,"Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.above":{type:"boolean",default:e.above,description:ma(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:$l(t.enabled,this.defaultValue.enabled),delay:Gl.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:$l(t.sticky,this.defaultValue.sticky),above:$l(t.above,this.defaultValue.above)}}}),inDiffEditor:dc(new Kl(54,"inDiffEditor",!1)),letterSpacing:dc(new Yl(56,"letterSpacing",lc.letterSpacing,(e=>Yl.clamp(e,-5,20)),{description:ma(0,"Controls the letter spacing in pixels.")})),lightbulb:dc(new class extends Vl{constructor(){const e={enabled:!0};super(57,"lightbulb",e,{"editor.lightbulb.enabled":{type:"boolean",default:e.enabled,description:ma(0,"Enables the code action lightbulb in the editor.")}})}validate(e){return e&&"object"==typeof e?{enabled:$l(e.enabled,this.defaultValue.enabled)}:this.defaultValue}}),lineDecorationsWidth:dc(new Ul(58,"lineDecorationsWidth",10)),lineHeight:dc(new class extends Yl{constructor(){super(59,"lineHeight",lc.lineHeight,(e=>Yl.clamp(e,0,150)),{markdownDescription:ma(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:dc(new class extends Vl{constructor(){super(60,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[ma(0,"Line numbers are not rendered."),ma(0,"Line numbers are rendered as absolute number."),ma(0,"Line numbers are rendered as distance in lines to cursor position."),ma(0,"Line numbers are rendered every 10 lines.")],default:"on",description:ma(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:dc(new Gl(61,"lineNumbersMinChars",5,1,300)),linkedEditing:dc(new Kl(62,"linkedEditing",!1,{description:ma(0,"Controls whether the editor has linked editing enabled. Depending on the language, related symbols, e.g. HTML tags, are updated while editing.")})),links:dc(new Kl(63,"links",!0,{description:ma(0,"Controls whether the editor should detect links and make them clickable.")})),matchBrackets:dc(new Jl(64,"matchBrackets","always",["always","near","never"],{description:ma(0,"Highlight matching brackets.")})),minimap:dc(new class extends Vl{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:ma(0,"Controls whether the minimap is shown.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[ma(0,"The minimap has the same size as the editor contents (and might scroll)."),ma(0,"The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),ma(0,"The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:ma(0,"Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:ma(0,"Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:ma(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:ma(0,"Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:ma(0,"Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:ma(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:$l(t.enabled,this.defaultValue.enabled),size:Xl(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:Xl(t.side,this.defaultValue.side,["right","left"]),showSlider:Xl(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:$l(t.renderCharacters,this.defaultValue.renderCharacters),scale:Gl.clampedInt(t.scale,1,1,3),maxColumn:Gl.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}),mouseStyle:dc(new Jl(66,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:dc(new Yl(67,"mouseWheelScrollSensitivity",1,(e=>0===e?1:e),{markdownDescription:ma(0,"A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:dc(new Kl(68,"mouseWheelZoom",!1,{markdownDescription:ma(0,"Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:dc(new Kl(69,"multiCursorMergeOverlapping",!0,{description:ma(0,"Merge multiple cursors when they are overlapping.")})),multiCursorModifier:dc(new Ql(70,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],(function(e){return"ctrlCmd"===e?Pa?"metaKey":"ctrlKey":"altKey"}),{markdownEnumDescriptions:[ma(0,"Maps to `Control` on Windows and Linux and to `Command` on macOS."),ma(0,"Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:ma(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:dc(new Jl(71,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[ma(0,"Each cursor pastes a single line of the text."),ma(0,"Each cursor pastes the full text.")],markdownDescription:ma(0,"Controls pasting when the line count of the pasted text matches the cursor count.")})),occurrencesHighlight:dc(new Kl(72,"occurrencesHighlight",!0,{description:ma(0,"Controls whether the editor should highlight semantic symbol occurrences.")})),overviewRulerBorder:dc(new Kl(73,"overviewRulerBorder",!0,{description:ma(0,"Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:dc(new Gl(74,"overviewRulerLanes",3,0,3)),padding:dc(new class extends Vl{constructor(){super(75,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:ma(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:ma(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:Gl.clampedInt(t.top,0,0,1e3),bottom:Gl.clampedInt(t.bottom,0,0,1e3)}}}),parameterHints:dc(new class extends Vl{constructor(){const e={enabled:!0,cycle:!1};super(76,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:ma(0,"Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:ma(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:$l(t.enabled,this.defaultValue.enabled),cycle:$l(t.cycle,this.defaultValue.cycle)}}}),peekWidgetDefaultFocus:dc(new Jl(77,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[ma(0,"Focus the tree when opening peek"),ma(0,"Focus the editor when opening peek")],description:ma(0,"Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:dc(new Kl(78,"definitionLinkOpensInPeek",!1,{description:ma(0,"Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:dc(new class extends Vl{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:ma(0,"Enable quick suggestions inside strings.")},comments:{type:"boolean",default:e.comments,description:ma(0,"Enable quick suggestions inside comments.")},other:{type:"boolean",default:e.other,description:ma(0,"Enable quick suggestions outside of strings and comments.")}}}],default:e,description:ma(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:$l(t.other,this.defaultValue.other),comments:$l(t.comments,this.defaultValue.comments),strings:$l(t.strings,this.defaultValue.strings)};return!!(i.other&&i.comments&&i.strings)||!!(i.other||i.comments||i.strings)&&i}return this.defaultValue}}),quickSuggestionsDelay:dc(new Gl(80,"quickSuggestionsDelay",10,0,1073741824,{description:ma(0,"Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:dc(new Kl(81,"readOnly",!1)),renameOnType:dc(new Kl(82,"renameOnType",!1,{description:ma(0,"Controls whether the editor auto renames on type."),markdownDeprecationMessage:ma(0,"Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:dc(new Kl(83,"renderControlCharacters",!0,{description:ma(0,"Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:dc(new Kl(84,"renderFinalNewline",!0,{description:ma(0,"Render last line number when the file ends with a newline.")})),renderLineHighlight:dc(new Jl(85,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",ma(0,"Highlights both the gutter and the current line.")],description:ma(0,"Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:dc(new Kl(86,"renderLineHighlightOnlyWhenFocus",!1,{description:ma(0,"Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:dc(new Jl(87,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:dc(new Jl(88,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",ma(0,"Render whitespace characters except for single spaces between words."),ma(0,"Render whitespace characters only on selected text."),ma(0,"Render only trailing whitespace characters."),""],description:ma(0,"Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:dc(new Gl(89,"revealHorizontalRightPadding",30,0,1e3)),roundedSelection:dc(new Kl(90,"roundedSelection",!0,{description:ma(0,"Controls whether selections should have rounded corners.")})),rulers:dc(new class extends Vl{constructor(){const e=[],t={type:"number",description:ma(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:ma(0,"Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:ma(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:Gl.clampedInt(i,0,0,1e4),color:null});else if(i&&"object"==typeof i){const e=i;t.push({column:Gl.clampedInt(e.column,0,0,1e4),color:e.color})}return t.sort(((e,t)=>e.column-t.column)),t}return this.defaultValue}}),scrollbar:dc(new class extends Vl{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:[ma(0,"The vertical scrollbar will be visible only when necessary."),ma(0,"The vertical scrollbar will always be visible."),ma(0,"The vertical scrollbar will always be hidden.")],default:"auto",description:ma(0,"Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[ma(0,"The horizontal scrollbar will be visible only when necessary."),ma(0,"The horizontal scrollbar will always be visible."),ma(0,"The horizontal scrollbar will always be hidden.")],default:"auto",description:ma(0,"Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:ma(0,"The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:ma(0,"The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:ma(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=Gl.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),n=Gl.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:Gl.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:rc(t.vertical,this.defaultValue.vertical),horizontal:rc(t.horizontal,this.defaultValue.horizontal),useShadows:$l(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:$l(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:$l(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:$l(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:$l(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:i,horizontalSliderSize:Gl.clampedInt(t.horizontalSliderSize,i,0,1e3),verticalScrollbarSize:n,verticalSliderSize:Gl.clampedInt(t.verticalSliderSize,n,0,1e3),scrollByPage:$l(t.scrollByPage,this.defaultValue.scrollByPage)}}}),scrollBeyondLastColumn:dc(new Gl(93,"scrollBeyondLastColumn",5,0,1073741824,{description:ma(0,"Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:dc(new Kl(94,"scrollBeyondLastLine",!0,{description:ma(0,"Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:dc(new Kl(95,"scrollPredominantAxis",!0,{description:ma(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:dc(new Kl(96,"selectionClipboard",!0,{description:ma(0,"Controls whether the Linux primary clipboard should be supported."),included:Fa})),selectionHighlight:dc(new Kl(97,"selectionHighlight",!0,{description:ma(0,"Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:dc(new Kl(98,"selectOnLineNumbers",!0)),showFoldingControls:dc(new Jl(99,"showFoldingControls","mouseover",["always","mouseover"],{enumDescriptions:[ma(0,"Always show the folding controls."),ma(0,"Only show the folding controls when the mouse is over the gutter.")],description:ma(0,"Controls when the folding controls on the gutter are shown.")})),showUnused:dc(new Kl(100,"showUnused",!0,{description:ma(0,"Controls fading out of unused code.")})),showDeprecated:dc(new Kl(126,"showDeprecated",!0,{description:ma(0,"Controls strikethrough deprecated variables.")})),inlayHints:dc(new class extends Vl{constructor(){const e={enabled:!0,fontSize:0,fontFamily:""};super(127,"inlayHints",e,{"editor.inlayHints.enabled":{type:"boolean",default:e.enabled,description:ma(0,"Enables the inlay hints in the editor.")},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:ma(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:ma(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:$l(t.enabled,this.defaultValue.enabled),fontSize:Gl.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:Zl.string(t.fontFamily,this.defaultValue.fontFamily)}}}),snippetSuggestions:dc(new Jl(101,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[ma(0,"Show snippet suggestions on top of other suggestions."),ma(0,"Show snippet suggestions below other suggestions."),ma(0,"Show snippets suggestions with other suggestions."),ma(0,"Do not show snippet suggestions.")],description:ma(0,"Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:dc(new class extends Vl{constructor(){super(102,"smartSelect",{selectLeadingAndTrailingWhitespace:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:ma(0,"Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"}})}validate(e){return e&&"object"==typeof e?{selectLeadingAndTrailingWhitespace:$l(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace)}:this.defaultValue}}),smoothScrolling:dc(new Kl(103,"smoothScrolling",!1,{description:ma(0,"Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:dc(new Gl(105,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:dc(new class extends Vl{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:[ma(0,"Insert suggestion without overwriting text right of the cursor."),ma(0,"Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:ma(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:ma(0,"Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:ma(0,"Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:ma(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:ma(0,"Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:ma(0,"Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:ma(0,"Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:e.preview,description:ma(0,"Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:ma(0,"Controls whether suggest details show inline with the label or only in the details widget")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:ma(0,"This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:ma(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:ma(0,"When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:ma(0,"When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:ma(0,"When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:ma(0,"When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:ma(0,"When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:ma(0,"When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:ma(0,"When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:ma(0,"When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:ma(0,"When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:ma(0,"When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:ma(0,"When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:ma(0,"When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:ma(0,"When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:ma(0,"When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:ma(0,"When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:ma(0,"When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:ma(0,"When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:ma(0,"When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:ma(0,"When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:ma(0,"When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:ma(0,"When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:ma(0,"When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:ma(0,"When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:ma(0,"When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:ma(0,"When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:ma(0,"When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:ma(0,"When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:ma(0,"When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:ma(0,"When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{insertMode:Xl(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:$l(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:$l(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:$l(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:$l(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),showIcons:$l(t.showIcons,this.defaultValue.showIcons),showStatusBar:$l(t.showStatusBar,this.defaultValue.showStatusBar),preview:$l(t.preview,this.defaultValue.preview),previewMode:Xl(t.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:$l(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:$l(t.showMethods,this.defaultValue.showMethods),showFunctions:$l(t.showFunctions,this.defaultValue.showFunctions),showConstructors:$l(t.showConstructors,this.defaultValue.showConstructors),showDeprecated:$l(t.showDeprecated,this.defaultValue.showDeprecated),showFields:$l(t.showFields,this.defaultValue.showFields),showVariables:$l(t.showVariables,this.defaultValue.showVariables),showClasses:$l(t.showClasses,this.defaultValue.showClasses),showStructs:$l(t.showStructs,this.defaultValue.showStructs),showInterfaces:$l(t.showInterfaces,this.defaultValue.showInterfaces),showModules:$l(t.showModules,this.defaultValue.showModules),showProperties:$l(t.showProperties,this.defaultValue.showProperties),showEvents:$l(t.showEvents,this.defaultValue.showEvents),showOperators:$l(t.showOperators,this.defaultValue.showOperators),showUnits:$l(t.showUnits,this.defaultValue.showUnits),showValues:$l(t.showValues,this.defaultValue.showValues),showConstants:$l(t.showConstants,this.defaultValue.showConstants),showEnums:$l(t.showEnums,this.defaultValue.showEnums),showEnumMembers:$l(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:$l(t.showKeywords,this.defaultValue.showKeywords),showWords:$l(t.showWords,this.defaultValue.showWords),showColors:$l(t.showColors,this.defaultValue.showColors),showFiles:$l(t.showFiles,this.defaultValue.showFiles),showReferences:$l(t.showReferences,this.defaultValue.showReferences),showFolders:$l(t.showFolders,this.defaultValue.showFolders),showTypeParameters:$l(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:$l(t.showSnippets,this.defaultValue.showSnippets),showUsers:$l(t.showUsers,this.defaultValue.showUsers),showIssues:$l(t.showIssues,this.defaultValue.showIssues)}}}),inlineSuggest:dc(new class extends Vl{constructor(){const e={enabled:!0,mode:"subwordSmart"};super(55,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:ma(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:$l(t.enabled,this.defaultValue.enabled),mode:Xl(t.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"])}}}),suggestFontSize:dc(new Gl(107,"suggestFontSize",0,0,1e3,{markdownDescription:ma(0,"Font size for the suggest widget. When set to `0`, the value of `#editor.fontSize#` is used.")})),suggestLineHeight:dc(new Gl(108,"suggestLineHeight",0,0,1e3,{markdownDescription:ma(0,"Line height for the suggest widget. When set to `0`, the value of `#editor.lineHeight#` is used. The minimum value is 8.")})),suggestOnTriggerCharacters:dc(new Kl(109,"suggestOnTriggerCharacters",!0,{description:ma(0,"Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:dc(new Jl(110,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[ma(0,"Always select the first suggestion."),ma(0,"Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),ma(0,"Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:ma(0,"Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:dc(new Jl(111,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[ma(0,"Tab complete will insert the best matching suggestion when pressing tab."),ma(0,"Disable tab completions."),ma(0,"Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:ma(0,"Enables tab completions.")})),tabIndex:dc(new Gl(112,"tabIndex",0,-1,1073741824)),unicodeHighlight:dc(new class extends Vl{constructor(){const e={nonBasicASCII:sc,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:sc,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(113,"unicodeHighlight",e,{"editor.unicodeHighlight.nonBasicASCII":{restricted:!0,type:["boolean","string"],enum:[!0,!1,sc],default:e.nonBasicASCII,description:ma(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.")},"editor.unicodeHighlight.invisibleCharacters":{restricted:!0,type:"boolean",default:e.invisibleCharacters,description:ma(0,"Controls whether characters that just reserve space or have no width at all are highlighted.")},"editor.unicodeHighlight.ambiguousCharacters":{restricted:!0,type:"boolean",default:e.ambiguousCharacters,description:ma(0,"Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale.")},"editor.unicodeHighlight.includeComments":{restricted:!0,type:["boolean","string"],enum:[!0,!1,sc],default:e.includeComments,description:ma(0,"Controls whether characters in comments should also be subject to unicode highlighting.")},"editor.unicodeHighlight.includeStrings":{restricted:!0,type:["boolean","string"],enum:[!0,!1,sc],default:e.includeStrings,description:ma(0,"Controls whether characters in strings should also be subject to unicode highlighting.")},"editor.unicodeHighlight.allowedCharacters":{restricted:!0,type:"object",default:e.allowedCharacters,description:ma(0,"Defines allowed characters that are not being highlighted."),additionalProperties:{type:"boolean"}},"editor.unicodeHighlight.allowedLocales":{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:e.allowedLocales,description:ma(0,"Unicode characters that are common in allowed locales are not being highlighted.")}})}applyUpdate(e,t){let i=!1;t.allowedCharacters&&(Rl(e.allowedCharacters,t.allowedCharacters)||(e=Object.assign(Object.assign({},e),{allowedCharacters:t.allowedCharacters}),i=!0)),t.allowedLocales&&(Rl(e.allowedLocales,t.allowedLocales)||(e=Object.assign(Object.assign({},e),{allowedLocales:t.allowedLocales}),i=!0));const n=super.applyUpdate(e,t);return i?new zl(n.newValue,!0):n}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{nonBasicASCII:ac(t.nonBasicASCII,sc,[!0,!1,sc]),invisibleCharacters:$l(t.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:$l(t.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:ac(t.includeComments,sc,[!0,!1,sc]),includeStrings:ac(t.includeStrings,sc,[!0,!1,sc]),allowedCharacters:this.validateBooleanMap(e.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(e.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(e,t){if("object"!=typeof e||!e)return t;const i={};for(const[t,n]of Object.entries(e))!0===n&&(i[t]=!0);return i}}),unusualLineTerminators:dc(new Jl(114,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[ma(0,"Unusual line terminators are automatically removed."),ma(0,"Unusual line terminators are ignored."),ma(0,"Unusual line terminators prompt to be removed.")],description:ma(0,"Remove unusual line terminators that might cause problems.")})),useShadowDOM:dc(new Kl(115,"useShadowDOM",!0)),useTabStops:dc(new Kl(116,"useTabStops",!0,{description:ma(0,"Inserting and deleting whitespace follows tab stops.")})),wordSeparators:dc(new Zl(117,"wordSeparators",Ja,{description:ma(0,"Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:dc(new Jl(118,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[ma(0,"Lines will never wrap."),ma(0,"Lines will wrap at the viewport width."),ma(0,"Lines will wrap at `#editor.wordWrapColumn#`."),ma(0,"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:ma(0,"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:dc(new Zl(119,"wordWrapBreakAfterCharacters"," \t})]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),wordWrapBreakBeforeCharacters:dc(new Zl(120,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔([{「£¥$£¥++")),wordWrapColumn:dc(new Gl(121,"wordWrapColumn",80,1,1073741824,{markdownDescription:ma(0,"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:dc(new Jl(122,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:dc(new Jl(123,"wordWrapOverride2","inherit",["off","on","inherit"])),wrappingIndent:dc(new Ql(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:[ma(0,"No indentation. Wrapped lines begin at column 1."),ma(0,"Wrapped lines get the same indentation as the parent."),ma(0,"Wrapped lines get +1 indentation toward the parent."),ma(0,"Wrapped lines get +2 indentation toward the parent.")],description:ma(0,"Controls the indentation of wrapped lines.")})),wrappingStrategy:dc(new Jl(125,"wrappingStrategy","simple",["simple","advanced"],{enumDescriptions:[ma(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."),ma(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:ma(0,"Controls the algorithm that computes wrapping points.")})),editorClassName:dc(new class extends Hl{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:dc(new class extends Hl{constructor(){super(129)}compute(e,t,i){return e.pixelRatio}}),tabFocusMode:dc(new class extends Hl{constructor(){super(130)}compute(e,t,i){return!!t.get(81)||e.tabFocusMode}}),layoutInfo:dc(new nc),wrappingInfo:dc(new class extends Hl{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}}})},uc=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout((()=>{if(e.stack)throw new Error(e.message+"\n\n"+e.stack);throw e}),0)}}emit(e){this.listeners.forEach((t=>{t(e)}))}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}};function gc(e){_c(e)||uc.onUnexpectedError(e)}function pc(e){_c(e)||uc.onUnexpectedExternalError(e)}function mc(e){if(e instanceof Error){let{name:t,message:i}=e;return{$isError:!0,name:t,message:i,stack:e.stacktrace||e.stack}}return e}const fc="Canceled";function _c(e){return e instanceof vc||e instanceof Error&&e.name===fc&&e.message===fc}class vc extends Error{constructor(){super(fc),this.name=this.message}}function bc(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")}class wc extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}function yc(e){const t=this;let i,n=!1;return function(){return n||(n=!0,i=e.apply(t,arguments)),i}}var Cc;!function(e){e.is=function(e){return e&&"object"==typeof e&&"function"==typeof e[Symbol.iterator]};const t=Object.freeze([]);e.empty=function(){return t},e.single=function*(e){yield e},e.from=function(e){return e||t},e.isEmpty=function(e){return!e||!0===e[Symbol.iterator]().next().done},e.first=function(e){return e[Symbol.iterator]().next().value},e.some=function(e,t){for(const i of e)if(t(i))return!0;return!1},e.find=function(e,t){for(const i of e)if(t(i))return i},e.filter=function*(e,t){for(const i of e)t(i)&&(yield i)},e.map=function*(e,t){let i=0;for(const n of e)yield t(n,i++)},e.concat=function*(...e){for(const t of e)for(const e of t)yield e},e.concatNested=function*(e){for(const t of e)for(const e of t)yield e},e.reduce=function(e,t,i){let n=i;for(const i of e)n=t(n,i);return n},e.slice=function*(e,t,i=e.length){for(t<0&&(t+=e.length),i<0?i+=e.length:i>e.length&&(i=e.length);t<i;t++)yield e[t]},e.consume=function(t,i=Number.POSITIVE_INFINITY){const n=[];if(0===i)return[n,t];const o=t[Symbol.iterator]();for(let t=0;t<i;t++){const t=o.next();if(t.done)return[n,e.empty()];n.push(t.value)}return[n,{[Symbol.iterator]:()=>o}]},e.equals=function(e,t,i=((e,t)=>e===t)){const n=e[Symbol.iterator](),o=t[Symbol.iterator]();for(;;){const e=n.next(),t=o.next();if(e.done!==t.done)return!1;if(e.done)return!0;if(!i(e.value,t.value))return!1}}}(Cc||(Cc={}));class Sc extends Error{constructor(e){super(`Encountered errors while disposing of store. Errors: [${e.join(", ")}]`),this.errors=e}}function kc(e){if(Cc.is(e)){let t=[];for(const i of e)if(i)try{i.dispose()}catch(e){t.push(e)}if(1===t.length)throw t[0];if(t.length>1)throw new Sc(t);return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function xc(...e){const t=Lc((()=>kc(e)));return t}function Lc(e){const t={dispose:yc((()=>{e()}))};return t}class Ec{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){try{kc(this._toDispose.values())}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?Ec.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}}Ec.DISABLE_DISPOSED_WARNING=!1;class Nc{constructor(){this._store=new Ec,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}Nc.None=Object.freeze({dispose(){}});class Ic{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){var t;this._isDisposed||e===this._value||(null===(t=this._value)||void 0===t||t.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,null===(e=this._value)||void 0===e||e.dispose(),this._value=void 0}clearAndLeak(){const e=this._value;return this._value=void 0,e}}class Tc{constructor(){this.dispose=()=>{},this.unset=()=>{},this.isset=()=>!1}set(e){let t=e;return this.unset=()=>t=void 0,this.isset=()=>void 0!==t,this.dispose=()=>{t&&(t(),t=void 0)},this}}class Dc{constructor(e){this.object=e}dispose(){}}class Ac{constructor(e){this.element=e,this.next=Ac.Undefined,this.prev=Ac.Undefined}}Ac.Undefined=new Ac(void 0);class Oc{constructor(){this._first=Ac.Undefined,this._last=Ac.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Ac.Undefined}clear(){let e=this._first;for(;e!==Ac.Undefined;){const t=e.next;e.prev=Ac.Undefined,e.next=Ac.Undefined,e=t}this._first=Ac.Undefined,this._last=Ac.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const i=new Ac(e);if(this._first===Ac.Undefined)this._first=i,this._last=i;else if(t){const e=this._last;this._last=i,i.prev=e,e.next=i}else{const e=this._first;this._first=i,i.next=e,e.prev=i}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(i))}}shift(){if(this._first!==Ac.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==Ac.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==Ac.Undefined&&e.next!==Ac.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===Ac.Undefined&&e.next===Ac.Undefined?(this._first=Ac.Undefined,this._last=Ac.Undefined):e.next===Ac.Undefined?(this._last=this._last.prev,this._last.next=Ac.Undefined):e.prev===Ac.Undefined&&(this._first=this._first.next,this._first.prev=Ac.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==Ac.Undefined;)yield e.element,e=e.next}}const Mc=Ta.performance&&"function"==typeof Ta.performance.now;class Rc{constructor(e){this._highResolution=Mc&&e,this._startTime=this._now(),this._stopTime=-1}static create(e=!0){return new Rc(e)}stop(){this._stopTime=this._now()}elapsed(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?Ta.performance.now():Date.now()}}var Pc;!function(e){function t(e){return(t,i=null,n)=>{let o,r=!1;return o=e((e=>{if(!r)return o?o.dispose():r=!0,t.call(i,e)}),null,n),r&&o.dispose(),o}}function i(e,t,i){return s(((i,n=null,o)=>e((e=>i.call(n,t(e))),null,o)),i)}function n(e,t,i){return s(((i,n=null,o)=>e((e=>{t(e),i.call(n,e)}),null,o)),i)}function o(e,t,i){return s(((i,n=null,o)=>e((e=>t(e)&&i.call(n,e)),null,o)),i)}function r(e,t,n,o){let r=n;return i(e,(e=>(r=t(r,e),r)),o)}function s(e,t){let i;const n=new Vc({onFirstListenerAdd(){i=e(n.fire,n)},onLastListenerRemove(){i.dispose()}});return t&&t.add(n),n.event}function a(e,t,i=100,n=!1,o,r){let s,a,l,c=0;const d=new Vc({leakWarningThreshold:o,onFirstListenerAdd(){s=e((e=>{c++,a=t(a,e),n&&!l&&(d.fire(a),a=void 0),clearTimeout(l),l=setTimeout((()=>{const e=a;a=void 0,l=void 0,(!n||c>1)&&d.fire(e),c=0}),i)}))},onLastListenerRemove(){s.dispose()}});return r&&r.add(d),d.event}function l(e,t=((e,t)=>e===t),i){let n,r=!0;return o(e,(e=>{const i=r||!t(e,n);return r=!1,n=e,i}),i)}e.None=()=>Nc.None,e.once=t,e.map=i,e.forEach=n,e.filter=o,e.signal=function(e){return e},e.any=function(...e){return(t,i=null,n)=>xc(...e.map((e=>e((e=>t.call(i,e)),null,n))))},e.reduce=r,e.debounce=a,e.latch=l,e.split=function(t,i,n){return[e.filter(t,i,n),e.filter(t,(e=>!i(e)),n)]},e.buffer=function(e,t=!1,i=[]){let n=i.slice(),o=e((e=>{n?n.push(e):s.fire(e)}));const r=()=>{n&&n.forEach((e=>s.fire(e))),n=null},s=new Vc({onFirstListenerAdd(){o||(o=e((e=>s.fire(e))))},onFirstListenerDidAdd(){n&&(t?setTimeout(r):r())},onLastListenerRemove(){o&&o.dispose(),o=null}});return s.event};class c{constructor(e){this.event=e}map(e){return new c(i(this.event,e))}forEach(e){return new c(n(this.event,e))}filter(e){return new c(o(this.event,e))}reduce(e,t){return new c(r(this.event,e,t))}latch(){return new c(l(this.event))}debounce(e,t=100,i=!1,n){return new c(a(this.event,e,t,i,n))}on(e,t,i){return this.event(e,t,i)}once(e,i,n){return t(this.event)(e,i,n)}}e.chain=function(e){return new c(e)},e.fromNodeEventEmitter=function(e,t,i=(e=>e)){const n=(...e)=>o.fire(i(...e)),o=new Vc({onFirstListenerAdd:()=>e.on(t,n),onLastListenerRemove:()=>e.removeListener(t,n)});return o.event},e.fromDOMEventEmitter=function(e,t,i=(e=>e)){const n=(...e)=>o.fire(i(...e)),o=new Vc({onFirstListenerAdd:()=>e.addEventListener(t,n),onLastListenerRemove:()=>e.removeEventListener(t,n)});return o.event},e.toPromise=function(e){return new Promise((i=>t(e)(i)))},e.runAndSubscribe=function(e,t){return t(void 0),e((e=>t(e)))},e.runAndSubscribeWithStore=function(e,t){let i=null;function n(e){null==i||i.dispose(),i=new Ec,t(e,i)}n(void 0);const o=e((e=>n(e)));return Lc((()=>{o.dispose(),null==i||i.dispose()}))}}(Pc||(Pc={}));class Fc{constructor(e){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${e}_${Fc._idPool++}`}start(e){this._stopWatch=new Rc(!0),this._listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this._elapsedOverall+=e,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${e.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}Fc._idPool=0;class Bc{constructor(e){this.value=e}static create(){var e;return new Bc(null!==(e=(new Error).stack)&&void 0!==e?e:"")}print(){console.warn(this.value.split("\n").slice(2).join("\n"))}}class Wc{constructor(e,t,i){this.callback=e,this.callbackThis=t,this.stack=i,this.subscription=new Tc}invoke(e){this.callback.call(this.callbackThis,e)}}class Vc{constructor(e){var t;this._disposed=!1,this._options=e,this._leakageMon=void 0,this._perfMon=(null===(t=this._options)||void 0===t?void 0:t._profName)?new Fc(this._options._profName):void 0}dispose(){var e,t,i,n;this._disposed||(this._disposed=!0,this._listeners&&this._listeners.clear(),null===(e=this._deliveryQueue)||void 0===e||e.clear(),null===(i=null===(t=this._options)||void 0===t?void 0:t.onLastListenerRemove)||void 0===i||i.call(t),null===(n=this._leakageMon)||void 0===n||n.dispose())}get event(){return this._event||(this._event=(e,t,i)=>{var n,o,r;this._listeners||(this._listeners=new Oc);const s=this._listeners.isEmpty();let a,l;s&&(null===(n=this._options)||void 0===n?void 0:n.onFirstListenerAdd)&&this._options.onFirstListenerAdd(this),this._leakageMon&&this._listeners.size>=30&&(l=Bc.create(),a=this._leakageMon.check(l,this._listeners.size+1));const c=new Wc(e,t,l),d=this._listeners.push(c);s&&(null===(o=this._options)||void 0===o?void 0:o.onFirstListenerDidAdd)&&this._options.onFirstListenerDidAdd(this),(null===(r=this._options)||void 0===r?void 0:r.onListenerDidAdd)&&this._options.onListenerDidAdd(this,e,t);const h=c.subscription.set((()=>{a&&a(),!this._disposed&&(d(),this._options&&this._options.onLastListenerRemove)&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this))}));return i instanceof Ec?i.add(h):Array.isArray(i)&&i.push(h),h}),this._event}fire(e){var t,i;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new Oc);for(let t of this._listeners)this._deliveryQueue.push([t,e]);for(null===(t=this._perfMon)||void 0===t||t.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[e,t]=this._deliveryQueue.shift();try{e.invoke(t)}catch(e){gc(e)}}null===(i=this._perfMon)||void 0===i||i.stop()}}}class zc extends Vc{constructor(e){super(e),this._isPaused=0,this._eventQueue=new Oc,this._mergeFn=null==e?void 0:e.merge}pause(){this._isPaused++}resume(){if(0!==this._isPaused&&0==--this._isPaused)if(this._mergeFn){const e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}else for(;!this._isPaused&&0!==this._eventQueue.size;)super.fire(this._eventQueue.shift())}fire(e){this._listeners&&(0!==this._isPaused?this._eventQueue.push(e):super.fire(e))}}class jc extends zc{constructor(e){var t;super(e),this._delay=null!==(t=e.delay)&&void 0!==t?t:100}fire(e){this._handle||(this.pause(),this._handle=setTimeout((()=>{this._handle=void 0,this.resume()}),this._delay)),super.fire(e)}}class Hc{constructor(){this.buffers=[]}wrapEvent(e){return(t,i,n)=>e((e=>{const n=this.buffers[this.buffers.length-1];n?n.push((()=>t.call(i,e))):t.call(i,e)}),void 0,n)}bufferEvents(e){const t=[];this.buffers.push(t);const i=e();return this.buffers.pop(),t.forEach((e=>e())),i}}class Uc{constructor(){this.listening=!1,this.inputEvent=Pc.None,this.inputEventListener=Nc.None,this.emitter=new Vc({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}const $c=Object.freeze((function(e,t){const i=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(i)}}}));var Kc;!function(e){e.isCancellationToken=function(t){return t===e.None||t===e.Cancelled||t instanceof qc||!(!t||"object"!=typeof t)&&"boolean"==typeof t.isCancellationRequested&&"function"==typeof t.onCancellationRequested},e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Pc.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:$c})}(Kc||(Kc={}));class qc{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?$c:(this._emitter||(this._emitter=new Vc),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class Gc{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new qc),this._token}cancel(){this._token?this._token instanceof qc&&this._token.cancel():this._token=Kc.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof qc&&this._token.dispose():this._token=Kc.None}}class Yc{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const Zc=new Yc,Xc=new Yc,Jc=new Yc,Qc=new Array(230),ed={},td=[],id=Object.create(null),nd=Object.create(null),od=[],rd=[];for(let e=0;e<=193;e++)od[e]=-1;for(let e=0;e<=127;e++)rd[e]=-1;var sd;let ad;if(function(){const e="",t=[[0,1,0,"None",0,"unknown",0,"VK_UNKNOWN",e,e],[0,1,1,"Hyper",0,e,0,e,e,e],[0,1,2,"Super",0,e,0,e,e,e],[0,1,3,"Fn",0,e,0,e,e,e],[0,1,4,"FnLock",0,e,0,e,e,e],[0,1,5,"Suspend",0,e,0,e,e,e],[0,1,6,"Resume",0,e,0,e,e,e],[0,1,7,"Turbo",0,e,0,e,e,e],[0,1,8,"Sleep",0,e,0,"VK_SLEEP",e,e],[0,1,9,"WakeUp",0,e,0,e,e,e],[31,0,10,"KeyA",31,"A",65,"VK_A",e,e],[32,0,11,"KeyB",32,"B",66,"VK_B",e,e],[33,0,12,"KeyC",33,"C",67,"VK_C",e,e],[34,0,13,"KeyD",34,"D",68,"VK_D",e,e],[35,0,14,"KeyE",35,"E",69,"VK_E",e,e],[36,0,15,"KeyF",36,"F",70,"VK_F",e,e],[37,0,16,"KeyG",37,"G",71,"VK_G",e,e],[38,0,17,"KeyH",38,"H",72,"VK_H",e,e],[39,0,18,"KeyI",39,"I",73,"VK_I",e,e],[40,0,19,"KeyJ",40,"J",74,"VK_J",e,e],[41,0,20,"KeyK",41,"K",75,"VK_K",e,e],[42,0,21,"KeyL",42,"L",76,"VK_L",e,e],[43,0,22,"KeyM",43,"M",77,"VK_M",e,e],[44,0,23,"KeyN",44,"N",78,"VK_N",e,e],[45,0,24,"KeyO",45,"O",79,"VK_O",e,e],[46,0,25,"KeyP",46,"P",80,"VK_P",e,e],[47,0,26,"KeyQ",47,"Q",81,"VK_Q",e,e],[48,0,27,"KeyR",48,"R",82,"VK_R",e,e],[49,0,28,"KeyS",49,"S",83,"VK_S",e,e],[50,0,29,"KeyT",50,"T",84,"VK_T",e,e],[51,0,30,"KeyU",51,"U",85,"VK_U",e,e],[52,0,31,"KeyV",52,"V",86,"VK_V",e,e],[53,0,32,"KeyW",53,"W",87,"VK_W",e,e],[54,0,33,"KeyX",54,"X",88,"VK_X",e,e],[55,0,34,"KeyY",55,"Y",89,"VK_Y",e,e],[56,0,35,"KeyZ",56,"Z",90,"VK_Z",e,e],[22,0,36,"Digit1",22,"1",49,"VK_1",e,e],[23,0,37,"Digit2",23,"2",50,"VK_2",e,e],[24,0,38,"Digit3",24,"3",51,"VK_3",e,e],[25,0,39,"Digit4",25,"4",52,"VK_4",e,e],[26,0,40,"Digit5",26,"5",53,"VK_5",e,e],[27,0,41,"Digit6",27,"6",54,"VK_6",e,e],[28,0,42,"Digit7",28,"7",55,"VK_7",e,e],[29,0,43,"Digit8",29,"8",56,"VK_8",e,e],[30,0,44,"Digit9",30,"9",57,"VK_9",e,e],[21,0,45,"Digit0",21,"0",48,"VK_0",e,e],[3,1,46,"Enter",3,"Enter",13,"VK_RETURN",e,e],[9,1,47,"Escape",9,"Escape",27,"VK_ESCAPE",e,e],[1,1,48,"Backspace",1,"Backspace",8,"VK_BACK",e,e],[2,1,49,"Tab",2,"Tab",9,"VK_TAB",e,e],[10,1,50,"Space",10,"Space",32,"VK_SPACE",e,e],[83,0,51,"Minus",83,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[81,0,52,"Equal",81,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[87,0,53,"BracketLeft",87,"[",219,"VK_OEM_4","[","OEM_4"],[89,0,54,"BracketRight",89,"]",221,"VK_OEM_6","]","OEM_6"],[88,0,55,"Backslash",88,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,0,56,"IntlHash",0,e,0,e,e,e],[80,0,57,"Semicolon",80,";",186,"VK_OEM_1",";","OEM_1"],[90,0,58,"Quote",90,"'",222,"VK_OEM_7","'","OEM_7"],[86,0,59,"Backquote",86,"`",192,"VK_OEM_3","`","OEM_3"],[82,0,60,"Comma",82,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[84,0,61,"Period",84,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[85,0,62,"Slash",85,"/",191,"VK_OEM_2","/","OEM_2"],[8,1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",e,e],[59,1,64,"F1",59,"F1",112,"VK_F1",e,e],[60,1,65,"F2",60,"F2",113,"VK_F2",e,e],[61,1,66,"F3",61,"F3",114,"VK_F3",e,e],[62,1,67,"F4",62,"F4",115,"VK_F4",e,e],[63,1,68,"F5",63,"F5",116,"VK_F5",e,e],[64,1,69,"F6",64,"F6",117,"VK_F6",e,e],[65,1,70,"F7",65,"F7",118,"VK_F7",e,e],[66,1,71,"F8",66,"F8",119,"VK_F8",e,e],[67,1,72,"F9",67,"F9",120,"VK_F9",e,e],[68,1,73,"F10",68,"F10",121,"VK_F10",e,e],[69,1,74,"F11",69,"F11",122,"VK_F11",e,e],[70,1,75,"F12",70,"F12",123,"VK_F12",e,e],[0,1,76,"PrintScreen",0,e,0,e,e,e],[79,1,77,"ScrollLock",79,"ScrollLock",145,"VK_SCROLL",e,e],[7,1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",e,e],[19,1,79,"Insert",19,"Insert",45,"VK_INSERT",e,e],[14,1,80,"Home",14,"Home",36,"VK_HOME",e,e],[11,1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",e,e],[20,1,82,"Delete",20,"Delete",46,"VK_DELETE",e,e],[13,1,83,"End",13,"End",35,"VK_END",e,e],[12,1,84,"PageDown",12,"PageDown",34,"VK_NEXT",e,e],[17,1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",e],[15,1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",e],[18,1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",e],[16,1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",e],[78,1,89,"NumLock",78,"NumLock",144,"VK_NUMLOCK",e,e],[108,1,90,"NumpadDivide",108,"NumPad_Divide",111,"VK_DIVIDE",e,e],[103,1,91,"NumpadMultiply",103,"NumPad_Multiply",106,"VK_MULTIPLY",e,e],[106,1,92,"NumpadSubtract",106,"NumPad_Subtract",109,"VK_SUBTRACT",e,e],[104,1,93,"NumpadAdd",104,"NumPad_Add",107,"VK_ADD",e,e],[3,1,94,"NumpadEnter",3,e,0,e,e,e],[94,1,95,"Numpad1",94,"NumPad1",97,"VK_NUMPAD1",e,e],[95,1,96,"Numpad2",95,"NumPad2",98,"VK_NUMPAD2",e,e],[96,1,97,"Numpad3",96,"NumPad3",99,"VK_NUMPAD3",e,e],[97,1,98,"Numpad4",97,"NumPad4",100,"VK_NUMPAD4",e,e],[98,1,99,"Numpad5",98,"NumPad5",101,"VK_NUMPAD5",e,e],[99,1,100,"Numpad6",99,"NumPad6",102,"VK_NUMPAD6",e,e],[100,1,101,"Numpad7",100,"NumPad7",103,"VK_NUMPAD7",e,e],[101,1,102,"Numpad8",101,"NumPad8",104,"VK_NUMPAD8",e,e],[102,1,103,"Numpad9",102,"NumPad9",105,"VK_NUMPAD9",e,e],[93,1,104,"Numpad0",93,"NumPad0",96,"VK_NUMPAD0",e,e],[107,1,105,"NumpadDecimal",107,"NumPad_Decimal",110,"VK_DECIMAL",e,e],[92,0,106,"IntlBackslash",92,"OEM_102",226,"VK_OEM_102",e,e],[58,1,107,"ContextMenu",58,"ContextMenu",93,e,e,e],[0,1,108,"Power",0,e,0,e,e,e],[0,1,109,"NumpadEqual",0,e,0,e,e,e],[71,1,110,"F13",71,"F13",124,"VK_F13",e,e],[72,1,111,"F14",72,"F14",125,"VK_F14",e,e],[73,1,112,"F15",73,"F15",126,"VK_F15",e,e],[74,1,113,"F16",74,"F16",127,"VK_F16",e,e],[75,1,114,"F17",75,"F17",128,"VK_F17",e,e],[76,1,115,"F18",76,"F18",129,"VK_F18",e,e],[77,1,116,"F19",77,"F19",130,"VK_F19",e,e],[0,1,117,"F20",0,e,0,"VK_F20",e,e],[0,1,118,"F21",0,e,0,"VK_F21",e,e],[0,1,119,"F22",0,e,0,"VK_F22",e,e],[0,1,120,"F23",0,e,0,"VK_F23",e,e],[0,1,121,"F24",0,e,0,"VK_F24",e,e],[0,1,122,"Open",0,e,0,e,e,e],[0,1,123,"Help",0,e,0,e,e,e],[0,1,124,"Select",0,e,0,e,e,e],[0,1,125,"Again",0,e,0,e,e,e],[0,1,126,"Undo",0,e,0,e,e,e],[0,1,127,"Cut",0,e,0,e,e,e],[0,1,128,"Copy",0,e,0,e,e,e],[0,1,129,"Paste",0,e,0,e,e,e],[0,1,130,"Find",0,e,0,e,e,e],[0,1,131,"AudioVolumeMute",112,"AudioVolumeMute",173,"VK_VOLUME_MUTE",e,e],[0,1,132,"AudioVolumeUp",113,"AudioVolumeUp",175,"VK_VOLUME_UP",e,e],[0,1,133,"AudioVolumeDown",114,"AudioVolumeDown",174,"VK_VOLUME_DOWN",e,e],[105,1,134,"NumpadComma",105,"NumPad_Separator",108,"VK_SEPARATOR",e,e],[110,0,135,"IntlRo",110,"ABNT_C1",193,"VK_ABNT_C1",e,e],[0,1,136,"KanaMode",0,e,0,e,e,e],[0,0,137,"IntlYen",0,e,0,e,e,e],[0,1,138,"Convert",0,e,0,e,e,e],[0,1,139,"NonConvert",0,e,0,e,e,e],[0,1,140,"Lang1",0,e,0,e,e,e],[0,1,141,"Lang2",0,e,0,e,e,e],[0,1,142,"Lang3",0,e,0,e,e,e],[0,1,143,"Lang4",0,e,0,e,e,e],[0,1,144,"Lang5",0,e,0,e,e,e],[0,1,145,"Abort",0,e,0,e,e,e],[0,1,146,"Props",0,e,0,e,e,e],[0,1,147,"NumpadParenLeft",0,e,0,e,e,e],[0,1,148,"NumpadParenRight",0,e,0,e,e,e],[0,1,149,"NumpadBackspace",0,e,0,e,e,e],[0,1,150,"NumpadMemoryStore",0,e,0,e,e,e],[0,1,151,"NumpadMemoryRecall",0,e,0,e,e,e],[0,1,152,"NumpadMemoryClear",0,e,0,e,e,e],[0,1,153,"NumpadMemoryAdd",0,e,0,e,e,e],[0,1,154,"NumpadMemorySubtract",0,e,0,e,e,e],[0,1,155,"NumpadClear",126,"Clear",12,"VK_CLEAR",e,e],[0,1,156,"NumpadClearEntry",0,e,0,e,e,e],[5,1,0,e,5,"Ctrl",17,"VK_CONTROL",e,e],[4,1,0,e,4,"Shift",16,"VK_SHIFT",e,e],[6,1,0,e,6,"Alt",18,"VK_MENU",e,e],[57,1,0,e,57,"Meta",0,"VK_COMMAND",e,e],[5,1,157,"ControlLeft",5,e,0,"VK_LCONTROL",e,e],[4,1,158,"ShiftLeft",4,e,0,"VK_LSHIFT",e,e],[6,1,159,"AltLeft",6,e,0,"VK_LMENU",e,e],[57,1,160,"MetaLeft",57,e,0,"VK_LWIN",e,e],[5,1,161,"ControlRight",5,e,0,"VK_RCONTROL",e,e],[4,1,162,"ShiftRight",4,e,0,"VK_RSHIFT",e,e],[6,1,163,"AltRight",6,e,0,"VK_RMENU",e,e],[57,1,164,"MetaRight",57,e,0,"VK_RWIN",e,e],[0,1,165,"BrightnessUp",0,e,0,e,e,e],[0,1,166,"BrightnessDown",0,e,0,e,e,e],[0,1,167,"MediaPlay",0,e,0,e,e,e],[0,1,168,"MediaRecord",0,e,0,e,e,e],[0,1,169,"MediaFastForward",0,e,0,e,e,e],[0,1,170,"MediaRewind",0,e,0,e,e,e],[114,1,171,"MediaTrackNext",119,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",e,e],[115,1,172,"MediaTrackPrevious",120,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",e,e],[116,1,173,"MediaStop",121,"MediaStop",178,"VK_MEDIA_STOP",e,e],[0,1,174,"Eject",0,e,0,e,e,e],[117,1,175,"MediaPlayPause",122,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",e,e],[0,1,176,"MediaSelect",123,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",e,e],[0,1,177,"LaunchMail",124,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",e,e],[0,1,178,"LaunchApp2",125,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",e,e],[0,1,179,"LaunchApp1",0,e,0,"VK_MEDIA_LAUNCH_APP1",e,e],[0,1,180,"SelectTask",0,e,0,e,e,e],[0,1,181,"LaunchScreenSaver",0,e,0,e,e,e],[0,1,182,"BrowserSearch",115,"BrowserSearch",170,"VK_BROWSER_SEARCH",e,e],[0,1,183,"BrowserHome",116,"BrowserHome",172,"VK_BROWSER_HOME",e,e],[112,1,184,"BrowserBack",117,"BrowserBack",166,"VK_BROWSER_BACK",e,e],[113,1,185,"BrowserForward",118,"BrowserForward",167,"VK_BROWSER_FORWARD",e,e],[0,1,186,"BrowserStop",0,e,0,"VK_BROWSER_STOP",e,e],[0,1,187,"BrowserRefresh",0,e,0,"VK_BROWSER_REFRESH",e,e],[0,1,188,"BrowserFavorites",0,e,0,"VK_BROWSER_FAVORITES",e,e],[0,1,189,"ZoomToggle",0,e,0,e,e,e],[0,1,190,"MailReply",0,e,0,e,e,e],[0,1,191,"MailForward",0,e,0,e,e,e],[0,1,192,"MailSend",0,e,0,e,e,e],[109,1,0,e,109,"KeyInComposition",229,e,e,e],[111,1,0,e,111,"ABNT_C2",194,"VK_ABNT_C2",e,e],[91,1,0,e,91,"OEM_8",223,"VK_OEM_8",e,e],[0,1,0,e,0,e,0,"VK_KANA",e,e],[0,1,0,e,0,e,0,"VK_HANGUL",e,e],[0,1,0,e,0,e,0,"VK_JUNJA",e,e],[0,1,0,e,0,e,0,"VK_FINAL",e,e],[0,1,0,e,0,e,0,"VK_HANJA",e,e],[0,1,0,e,0,e,0,"VK_KANJI",e,e],[0,1,0,e,0,e,0,"VK_CONVERT",e,e],[0,1,0,e,0,e,0,"VK_NONCONVERT",e,e],[0,1,0,e,0,e,0,"VK_ACCEPT",e,e],[0,1,0,e,0,e,0,"VK_MODECHANGE",e,e],[0,1,0,e,0,e,0,"VK_SELECT",e,e],[0,1,0,e,0,e,0,"VK_PRINT",e,e],[0,1,0,e,0,e,0,"VK_EXECUTE",e,e],[0,1,0,e,0,e,0,"VK_SNAPSHOT",e,e],[0,1,0,e,0,e,0,"VK_HELP",e,e],[0,1,0,e,0,e,0,"VK_APPS",e,e],[0,1,0,e,0,e,0,"VK_PROCESSKEY",e,e],[0,1,0,e,0,e,0,"VK_PACKET",e,e],[0,1,0,e,0,e,0,"VK_DBE_SBCSCHAR",e,e],[0,1,0,e,0,e,0,"VK_DBE_DBCSCHAR",e,e],[0,1,0,e,0,e,0,"VK_ATTN",e,e],[0,1,0,e,0,e,0,"VK_CRSEL",e,e],[0,1,0,e,0,e,0,"VK_EXSEL",e,e],[0,1,0,e,0,e,0,"VK_EREOF",e,e],[0,1,0,e,0,e,0,"VK_PLAY",e,e],[0,1,0,e,0,e,0,"VK_ZOOM",e,e],[0,1,0,e,0,e,0,"VK_NONAME",e,e],[0,1,0,e,0,e,0,"VK_PA1",e,e],[0,1,0,e,0,e,0,"VK_OEM_CLEAR",e,e]];let i=[],n=[];for(const e of t){const[t,o,r,s,a,l,c,d,h,u]=e;if(n[r]||(n[r]=!0,td[r]=s,id[s]=r,nd[s.toLowerCase()]=r,o&&(od[r]=a,0!==a&&3!==a&&5!==a&&4!==a&&6!==a&&57!==a&&(rd[a]=r))),!i[a]){if(i[a]=!0,!l)throw new Error(`String representation missing for key code ${a} around scan code ${s}`);Zc.define(a,l),Xc.define(a,h||l),Jc.define(a,u||h||l)}c&&(Qc[c]=a),d&&(ed[d]=a)}rd[3]=46}(),function(e){e.toString=function(e){return Zc.keyCodeToStr(e)},e.fromString=function(e){return Zc.strToKeyCode(e)},e.toUserSettingsUS=function(e){return Xc.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return Jc.keyCodeToStr(e)},e.fromUserSettings=function(e){return Xc.strToKeyCode(e)||Jc.strToKeyCode(e)},e.toElectronAccelerator=function(e){if(e>=93&&e<=108)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return Zc.keyCodeToStr(e)}}(sd||(sd={})),void 0!==Ta.vscode&&void 0!==Ta.vscode.process){const e=Ta.vscode.process;ad={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd:()=>e.cwd()}}else ad="undefined"!=typeof process?{get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd:()=>process.env.VSCODE_CWD||process.cwd()}:{get platform(){return Ra?"win32":Pa?"darwin":"linux"},get arch(){},get env(){return{}},cwd:()=>"/"};const ld=ad.cwd,cd=ad.env,dd=ad.platform,hd=46,ud=47,gd=92,pd=58;class md extends Error{constructor(e,t,i){let n;"string"==typeof t&&0===t.indexOf("not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";const o=-1!==e.indexOf(".")?"property":"argument";let r=`The "${e}" ${o} ${n} of type ${t}`;r+=". Received type "+typeof i,super(r),this.code="ERR_INVALID_ARG_TYPE"}}function fd(e,t){if("string"!=typeof e)throw new md(t,"string",e)}function _d(e){return e===ud||e===gd}function vd(e){return e===ud}function bd(e){return e>=65&&e<=90||e>=97&&e<=122}function wd(e,t,i,n){let o="",r=0,s=-1,a=0,l=0;for(let c=0;c<=e.length;++c){if(c<e.length)l=e.charCodeAt(c);else{if(n(l))break;l=ud}if(n(l)){if(s===c-1||1===a);else if(2===a){if(o.length<2||2!==r||o.charCodeAt(o.length-1)!==hd||o.charCodeAt(o.length-2)!==hd){if(o.length>2){const e=o.lastIndexOf(i);-1===e?(o="",r=0):(o=o.slice(0,e),r=o.length-1-o.lastIndexOf(i)),s=c,a=0;continue}if(0!==o.length){o="",r=0,s=c,a=0;continue}}t&&(o+=o.length>0?`${i}..`:"..",r=2)}else o.length>0?o+=`${i}${e.slice(s+1,c)}`:o=e.slice(s+1,c),r=c-s-1;s=c,a=0}else l===hd&&-1!==a?++a:a=-1}return o}function yd(e,t){if(null===t||"object"!=typeof t)throw new md("pathObject","Object",t);const i=t.dir||t.root,n=t.base||`${t.name||""}${t.ext||""}`;return i?i===t.root?`${i}${n}`:`${i}${e}${n}`:n}const Cd={resolve(...e){let t="",i="",n=!1;for(let o=e.length-1;o>=-1;o--){let r;if(o>=0){if(r=e[o],fd(r,"path"),0===r.length)continue}else 0===t.length?r=ld():(r=cd[`=${t}`]||ld(),(void 0===r||r.slice(0,2).toLowerCase()!==t.toLowerCase()&&r.charCodeAt(2)===gd)&&(r=`${t}\\`));const s=r.length;let a=0,l="",c=!1;const d=r.charCodeAt(0);if(1===s)_d(d)&&(a=1,c=!0);else if(_d(d))if(c=!0,_d(r.charCodeAt(1))){let e=2,t=e;for(;e<s&&!_d(r.charCodeAt(e));)e++;if(e<s&&e!==t){const i=r.slice(t,e);for(t=e;e<s&&_d(r.charCodeAt(e));)e++;if(e<s&&e!==t){for(t=e;e<s&&!_d(r.charCodeAt(e));)e++;e!==s&&e===t||(l=`\\\\${i}\\${r.slice(t,e)}`,a=e)}}}else a=1;else bd(d)&&r.charCodeAt(1)===pd&&(l=r.slice(0,2),a=2,s>2&&_d(r.charCodeAt(2))&&(c=!0,a=3));if(l.length>0)if(t.length>0){if(l.toLowerCase()!==t.toLowerCase())continue}else t=l;if(n){if(t.length>0)break}else if(i=`${r.slice(a)}\\${i}`,n=c,c&&t.length>0)break}return i=wd(i,!n,"\\",_d),n?`${t}\\${i}`:`${t}${i}`||"."},normalize(e){fd(e,"path");const t=e.length;if(0===t)return".";let i,n=0,o=!1;const r=e.charCodeAt(0);if(1===t)return vd(r)?"\\":e;if(_d(r))if(o=!0,_d(e.charCodeAt(1))){let o=2,r=o;for(;o<t&&!_d(e.charCodeAt(o));)o++;if(o<t&&o!==r){const s=e.slice(r,o);for(r=o;o<t&&_d(e.charCodeAt(o));)o++;if(o<t&&o!==r){for(r=o;o<t&&!_d(e.charCodeAt(o));)o++;if(o===t)return`\\\\${s}\\${e.slice(r)}\\`;o!==r&&(i=`\\\\${s}\\${e.slice(r,o)}`,n=o)}}}else n=1;else bd(r)&&e.charCodeAt(1)===pd&&(i=e.slice(0,2),n=2,t>2&&_d(e.charCodeAt(2))&&(o=!0,n=3));let s=n<t?wd(e.slice(n),!o,"\\",_d):"";return 0!==s.length||o||(s="."),s.length>0&&_d(e.charCodeAt(t-1))&&(s+="\\"),void 0===i?o?`\\${s}`:s:o?`${i}\\${s}`:`${i}${s}`},isAbsolute(e){fd(e,"path");const t=e.length;if(0===t)return!1;const i=e.charCodeAt(0);return _d(i)||t>2&&bd(i)&&e.charCodeAt(1)===pd&&_d(e.charCodeAt(2))},join(...e){if(0===e.length)return".";let t,i;for(let n=0;n<e.length;++n){const o=e[n];fd(o,"path"),o.length>0&&(void 0===t?t=i=o:t+=`\\${o}`)}if(void 0===t)return".";let n=!0,o=0;if("string"==typeof i&&_d(i.charCodeAt(0))){++o;const e=i.length;e>1&&_d(i.charCodeAt(1))&&(++o,e>2&&(_d(i.charCodeAt(2))?++o:n=!1))}if(n){for(;o<t.length&&_d(t.charCodeAt(o));)o++;o>=2&&(t=`\\${t.slice(o)}`)}return Cd.normalize(t)},relative(e,t){if(fd(e,"from"),fd(t,"to"),e===t)return"";const i=Cd.resolve(e),n=Cd.resolve(t);if(i===n)return"";if((e=i.toLowerCase())===(t=n.toLowerCase()))return"";let o=0;for(;o<e.length&&e.charCodeAt(o)===gd;)o++;let r=e.length;for(;r-1>o&&e.charCodeAt(r-1)===gd;)r--;const s=r-o;let a=0;for(;a<t.length&&t.charCodeAt(a)===gd;)a++;let l=t.length;for(;l-1>a&&t.charCodeAt(l-1)===gd;)l--;const c=l-a,d=s<c?s:c;let h=-1,u=0;for(;u<d;u++){const i=e.charCodeAt(o+u);if(i!==t.charCodeAt(a+u))break;i===gd&&(h=u)}if(u!==d){if(-1===h)return n}else{if(c>d){if(t.charCodeAt(a+u)===gd)return n.slice(a+u+1);if(2===u)return n.slice(a+u)}s>d&&(e.charCodeAt(o+u)===gd?h=u:2===u&&(h=3)),-1===h&&(h=0)}let g="";for(u=o+h+1;u<=r;++u)u!==r&&e.charCodeAt(u)!==gd||(g+=0===g.length?"..":"\\..");return a+=h,g.length>0?`${g}${n.slice(a,l)}`:(n.charCodeAt(a)===gd&&++a,n.slice(a,l))},toNamespacedPath(e){if("string"!=typeof e)return e;if(0===e.length)return"";const t=Cd.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===gd){if(t.charCodeAt(1)===gd){const e=t.charCodeAt(2);if(63!==e&&e!==hd)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(bd(t.charCodeAt(0))&&t.charCodeAt(1)===pd&&t.charCodeAt(2)===gd)return`\\\\?\\${t}`;return e},dirname(e){fd(e,"path");const t=e.length;if(0===t)return".";let i=-1,n=0;const o=e.charCodeAt(0);if(1===t)return _d(o)?e:".";if(_d(o)){if(i=n=1,_d(e.charCodeAt(1))){let o=2,r=o;for(;o<t&&!_d(e.charCodeAt(o));)o++;if(o<t&&o!==r){for(r=o;o<t&&_d(e.charCodeAt(o));)o++;if(o<t&&o!==r){for(r=o;o<t&&!_d(e.charCodeAt(o));)o++;if(o===t)return e;o!==r&&(i=n=o+1)}}}}else bd(o)&&e.charCodeAt(1)===pd&&(i=t>2&&_d(e.charCodeAt(2))?3:2,n=i);let r=-1,s=!0;for(let i=t-1;i>=n;--i)if(_d(e.charCodeAt(i))){if(!s){r=i;break}}else s=!1;if(-1===r){if(-1===i)return".";r=i}return e.slice(0,r)},basename(e,t){void 0!==t&&fd(t,"ext"),fd(e,"path");let i,n=0,o=-1,r=!0;if(e.length>=2&&bd(e.charCodeAt(0))&&e.charCodeAt(1)===pd&&(n=2),void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let s=t.length-1,a=-1;for(i=e.length-1;i>=n;--i){const l=e.charCodeAt(i);if(_d(l)){if(!r){n=i+1;break}}else-1===a&&(r=!1,a=i+1),s>=0&&(l===t.charCodeAt(s)?-1==--s&&(o=i):(s=-1,o=a))}return n===o?o=a:-1===o&&(o=e.length),e.slice(n,o)}for(i=e.length-1;i>=n;--i)if(_d(e.charCodeAt(i))){if(!r){n=i+1;break}}else-1===o&&(r=!1,o=i+1);return-1===o?"":e.slice(n,o)},extname(e){fd(e,"path");let t=0,i=-1,n=0,o=-1,r=!0,s=0;e.length>=2&&e.charCodeAt(1)===pd&&bd(e.charCodeAt(0))&&(t=n=2);for(let a=e.length-1;a>=t;--a){const t=e.charCodeAt(a);if(_d(t)){if(!r){n=a+1;break}}else-1===o&&(r=!1,o=a+1),t===hd?-1===i?i=a:1!==s&&(s=1):-1!==i&&(s=-1)}return-1===i||-1===o||0===s||1===s&&i===o-1&&i===n+1?"":e.slice(i,o)},format:yd.bind(null,"\\"),parse(e){fd(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.length;let n=0,o=e.charCodeAt(0);if(1===i)return _d(o)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(_d(o)){if(n=1,_d(e.charCodeAt(1))){let t=2,o=t;for(;t<i&&!_d(e.charCodeAt(t));)t++;if(t<i&&t!==o){for(o=t;t<i&&_d(e.charCodeAt(t));)t++;if(t<i&&t!==o){for(o=t;t<i&&!_d(e.charCodeAt(t));)t++;t===i?n=t:t!==o&&(n=t+1)}}}}else if(bd(o)&&e.charCodeAt(1)===pd){if(i<=2)return t.root=t.dir=e,t;if(n=2,_d(e.charCodeAt(2))){if(3===i)return t.root=t.dir=e,t;n=3}}n>0&&(t.root=e.slice(0,n));let r=-1,s=n,a=-1,l=!0,c=e.length-1,d=0;for(;c>=n;--c)if(o=e.charCodeAt(c),_d(o)){if(!l){s=c+1;break}}else-1===a&&(l=!1,a=c+1),o===hd?-1===r?r=c:1!==d&&(d=1):-1!==r&&(d=-1);return-1!==a&&(-1===r||0===d||1===d&&r===a-1&&r===s+1?t.base=t.name=e.slice(s,a):(t.name=e.slice(s,r),t.base=e.slice(s,a),t.ext=e.slice(r,a))),t.dir=s>0&&s!==n?e.slice(0,s-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},Sd={resolve(...e){let t="",i=!1;for(let n=e.length-1;n>=-1&&!i;n--){const o=n>=0?e[n]:ld();fd(o,"path"),0!==o.length&&(t=`${o}/${t}`,i=o.charCodeAt(0)===ud)}return t=wd(t,!i,"/",vd),i?`/${t}`:t.length>0?t:"."},normalize(e){if(fd(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===ud,i=e.charCodeAt(e.length-1)===ud;return 0===(e=wd(e,!t,"/",vd)).length?t?"/":i?"./":".":(i&&(e+="/"),t?`/${e}`:e)},isAbsolute:e=>(fd(e,"path"),e.length>0&&e.charCodeAt(0)===ud),join(...e){if(0===e.length)return".";let t;for(let i=0;i<e.length;++i){const n=e[i];fd(n,"path"),n.length>0&&(void 0===t?t=n:t+=`/${n}`)}return void 0===t?".":Sd.normalize(t)},relative(e,t){if(fd(e,"from"),fd(t,"to"),e===t)return"";if((e=Sd.resolve(e))===(t=Sd.resolve(t)))return"";const i=e.length,n=i-1,o=t.length-1,r=n<o?n:o;let s=-1,a=0;for(;a<r;a++){const i=e.charCodeAt(1+a);if(i!==t.charCodeAt(1+a))break;i===ud&&(s=a)}if(a===r)if(o>r){if(t.charCodeAt(1+a)===ud)return t.slice(1+a+1);if(0===a)return t.slice(1+a)}else n>r&&(e.charCodeAt(1+a)===ud?s=a:0===a&&(s=0));let l="";for(a=1+s+1;a<=i;++a)a!==i&&e.charCodeAt(a)!==ud||(l+=0===l.length?"..":"/..");return`${l}${t.slice(1+s)}`},toNamespacedPath:e=>e,dirname(e){if(fd(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===ud;let i=-1,n=!0;for(let t=e.length-1;t>=1;--t)if(e.charCodeAt(t)===ud){if(!n){i=t;break}}else n=!1;return-1===i?t?"/":".":t&&1===i?"//":e.slice(0,i)},basename(e,t){void 0!==t&&fd(t,"ext"),fd(e,"path");let i,n=0,o=-1,r=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let s=t.length-1,a=-1;for(i=e.length-1;i>=0;--i){const l=e.charCodeAt(i);if(l===ud){if(!r){n=i+1;break}}else-1===a&&(r=!1,a=i+1),s>=0&&(l===t.charCodeAt(s)?-1==--s&&(o=i):(s=-1,o=a))}return n===o?o=a:-1===o&&(o=e.length),e.slice(n,o)}for(i=e.length-1;i>=0;--i)if(e.charCodeAt(i)===ud){if(!r){n=i+1;break}}else-1===o&&(r=!1,o=i+1);return-1===o?"":e.slice(n,o)},extname(e){fd(e,"path");let t=-1,i=0,n=-1,o=!0,r=0;for(let s=e.length-1;s>=0;--s){const a=e.charCodeAt(s);if(a!==ud)-1===n&&(o=!1,n=s+1),a===hd?-1===t?t=s:1!==r&&(r=1):-1!==t&&(r=-1);else if(!o){i=s+1;break}}return-1===t||-1===n||0===r||1===r&&t===n-1&&t===i+1?"":e.slice(t,n)},format:yd.bind(null,"/"),parse(e){fd(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.charCodeAt(0)===ud;let n;i?(t.root="/",n=1):n=0;let o=-1,r=0,s=-1,a=!0,l=e.length-1,c=0;for(;l>=n;--l){const t=e.charCodeAt(l);if(t!==ud)-1===s&&(a=!1,s=l+1),t===hd?-1===o?o=l:1!==c&&(c=1):-1!==o&&(c=-1);else if(!a){r=l+1;break}}if(-1!==s){const n=0===r&&i?1:r;-1===o||0===c||1===c&&o===s-1&&o===r+1?t.base=t.name=e.slice(n,s):(t.name=e.slice(n,o),t.base=e.slice(n,s),t.ext=e.slice(o,s))}return r>0?t.dir=e.slice(0,r-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};Sd.win32=Cd.win32=Cd,Sd.posix=Cd.posix=Sd;const kd="win32"===dd?Cd.normalize:Sd.normalize,xd="win32"===dd?Cd.resolve:Sd.resolve,Ld="win32"===dd?Cd.relative:Sd.relative,Ed="win32"===dd?Cd.dirname:Sd.dirname,Nd="win32"===dd?Cd.basename:Sd.basename,Id="win32"===dd?Cd.extname:Sd.extname,Td="win32"===dd?Cd.sep:Sd.sep,Dd=/^\w[\w\d+.-]*$/,Ad=/^\//,Od=/^\/\//;function Md(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!Dd.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!Ad.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(Od.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const Rd="",Pd="/",Fd=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class Bd{constructor(e,t,i,n,o,r=!1){"object"==typeof e?(this.scheme=e.scheme||Rd,this.authority=e.authority||Rd,this.path=e.path||Rd,this.query=e.query||Rd,this.fragment=e.fragment||Rd):(this.scheme=function(e,t){return e||t?e:"file"}(e,r),this.authority=t||Rd,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==Pd&&(t=Pd+t):t=Pd}return t}(this.scheme,i||Rd),this.query=n||Rd,this.fragment=o||Rd,Md(this,r))}static isUri(e){return e instanceof Bd||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}get fsPath(){return Ud(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:i,path:n,query:o,fragment:r}=e;return void 0===t?t=this.scheme:null===t&&(t=Rd),void 0===i?i=this.authority:null===i&&(i=Rd),void 0===n?n=this.path:null===n&&(n=Rd),void 0===o?o=this.query:null===o&&(o=Rd),void 0===r?r=this.fragment:null===r&&(r=Rd),t===this.scheme&&i===this.authority&&n===this.path&&o===this.query&&r===this.fragment?this:new Vd(t,i,n,o,r)}static parse(e,t=!1){const i=Fd.exec(e);return i?new Vd(i[2]||Rd,Gd(i[4]||Rd),Gd(i[5]||Rd),Gd(i[7]||Rd),Gd(i[9]||Rd),t):new Vd(Rd,Rd,Rd,Rd,Rd)}static file(e){let t=Rd;if(Ra&&(e=e.replace(/\\/g,Pd)),e[0]===Pd&&e[1]===Pd){const i=e.indexOf(Pd,2);-1===i?(t=e.substring(2),e=Pd):(t=e.substring(2,i),e=e.substring(i)||Pd)}return new Vd("file",t,e,Rd,Rd)}static from(e){const t=new Vd(e.scheme,e.authority,e.path,e.query,e.fragment);return Md(t,!0),t}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let i;return i=Ra&&"file"===e.scheme?Bd.file(Cd.join(Ud(e,!0),...t)).path:Sd.join(e.path,...t),e.with({path:i})}toString(e=!1){return $d(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof Bd)return e;{const t=new Vd(e);return t._formatted=e.external,t._fsPath=e._sep===Wd?e.fsPath:null,t}}return e}}const Wd=Ra?1:void 0;class Vd extends Bd{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=Ud(this,!1)),this._fsPath}toString(e=!1){return e?$d(this,!0):(this._formatted||(this._formatted=$d(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=Wd),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const zd={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function jd(e,t){let i,n=-1;for(let o=0;o<e.length;o++){const r=e.charCodeAt(o);if(r>=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||45===r||46===r||95===r||126===r||t&&47===r)-1!==n&&(i+=encodeURIComponent(e.substring(n,o)),n=-1),void 0!==i&&(i+=e.charAt(o));else{void 0===i&&(i=e.substr(0,o));const t=zd[r];void 0!==t?(-1!==n&&(i+=encodeURIComponent(e.substring(n,o)),n=-1),i+=t):-1===n&&(n=o)}}return-1!==n&&(i+=encodeURIComponent(e.substring(n))),void 0!==i?i:e}function Hd(e){let t;for(let i=0;i<e.length;i++){const n=e.charCodeAt(i);35===n||63===n?(void 0===t&&(t=e.substr(0,i)),t+=zd[n]):void 0!==t&&(t+=e[i])}return void 0!==t?t:e}function Ud(e,t){let i;return i=e.authority&&e.path.length>1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,Ra&&(i=i.replace(/\//g,"\\")),i}function $d(e,t){const i=t?Hd:jd;let n="",{scheme:o,authority:r,path:s,query:a,fragment:l}=e;if(o&&(n+=o,n+=":"),(r||"file"===o)&&(n+=Pd,n+=Pd),r){let e=r.indexOf("@");if(-1!==e){const t=r.substr(0,e);r=r.substr(e+1),e=t.indexOf(":"),-1===e?n+=i(t,!1):(n+=i(t.substr(0,e),!1),n+=":",n+=i(t.substr(e+1),!1)),n+="@"}r=r.toLowerCase(),e=r.indexOf(":"),-1===e?n+=i(r,!1):(n+=i(r.substr(0,e),!1),n+=r.substr(e))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){const e=s.charCodeAt(1);e>=65&&e<=90&&(s=`/${String.fromCharCode(e+32)}:${s.substr(3)}`)}else if(s.length>=2&&58===s.charCodeAt(1)){const e=s.charCodeAt(0);e>=65&&e<=90&&(s=`${String.fromCharCode(e+32)}:${s.substr(2)}`)}n+=i(s,!0)}return a&&(n+="?",n+=i(a,!1)),l&&(n+="#",n+=t?l:jd(l,!1)),n}function Kd(e){try{return decodeURIComponent(e)}catch(t){return e.length>3?e.substr(0,3)+Kd(e.substr(3)):e}}const qd=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Gd(e){return e.match(qd)?e.replace(qd,(e=>Kd(e))):e}class Yd{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new Yd(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return Yd.equals(this,e)}static equals(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return Yd.isBefore(this,e)}static isBefore(e,t){return e.lineNumber<t.lineNumber||!(t.lineNumber<e.lineNumber)&&e.column<t.column}isBeforeOrEqual(e){return Yd.isBeforeOrEqual(this,e)}static isBeforeOrEqual(e,t){return e.lineNumber<t.lineNumber||!(t.lineNumber<e.lineNumber)&&e.column<=t.column}static compare(e,t){const i=0|e.lineNumber,n=0|t.lineNumber;return i===n?(0|e.column)-(0|t.column):i-n}clone(){return new Yd(this.lineNumber,this.column)}toString(){return"("+this.lineNumber+","+this.column+")"}static lift(e){return new Yd(e.lineNumber,e.column)}static isIPosition(e){return e&&"number"==typeof e.lineNumber&&"number"==typeof e.column}}class Zd{constructor(e,t,i,n){e>i||e===i&&t>n?(this.startLineNumber=i,this.startColumn=n,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=i,this.endColumn=n)}isEmpty(){return Zd.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return Zd.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumber<e.startLineNumber||t.lineNumber>e.endLineNumber||t.lineNumber===e.startLineNumber&&t.column<e.startColumn||t.lineNumber===e.endLineNumber&&t.column>e.endColumn)}static strictContainsPosition(e,t){return!(t.lineNumber<e.startLineNumber||t.lineNumber>e.endLineNumber||t.lineNumber===e.startLineNumber&&t.column<=e.startColumn||t.lineNumber===e.endLineNumber&&t.column>=e.endColumn)}containsRange(e){return Zd.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumber<e.startLineNumber||t.endLineNumber<e.startLineNumber||t.startLineNumber>e.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumn<e.startColumn||t.endLineNumber===e.endLineNumber&&t.endColumn>e.endColumn)}strictContainsRange(e){return Zd.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumber<e.startLineNumber||t.endLineNumber<e.startLineNumber||t.startLineNumber>e.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn||t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)}plusRange(e){return Zd.plusRange(this,e)}static plusRange(e,t){let i,n,o,r;return t.startLineNumber<e.startLineNumber?(i=t.startLineNumber,n=t.startColumn):t.startLineNumber===e.startLineNumber?(i=t.startLineNumber,n=Math.min(t.startColumn,e.startColumn)):(i=e.startLineNumber,n=e.startColumn),t.endLineNumber>e.endLineNumber?(o=t.endLineNumber,r=t.endColumn):t.endLineNumber===e.endLineNumber?(o=t.endLineNumber,r=Math.max(t.endColumn,e.endColumn)):(o=e.endLineNumber,r=e.endColumn),new Zd(i,n,o,r)}intersectRanges(e){return Zd.intersectRanges(this,e)}static intersectRanges(e,t){let i=e.startLineNumber,n=e.startColumn,o=e.endLineNumber,r=e.endColumn,s=t.startLineNumber,a=t.startColumn,l=t.endLineNumber,c=t.endColumn;return i<s?(i=s,n=a):i===s&&(n=Math.max(n,a)),o>l?(o=l,r=c):o===l&&(r=Math.min(r,c)),i>o||i===o&&n>r?null:new Zd(i,n,o,r)}equalsRange(e){return Zd.equalsRange(this,e)}static equalsRange(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return Zd.getEndPosition(this)}static getEndPosition(e){return new Yd(e.endLineNumber,e.endColumn)}getStartPosition(){return Zd.getStartPosition(this)}static getStartPosition(e){return new Yd(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new Zd(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new Zd(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return Zd.collapseToStart(this)}static collapseToStart(e){return new Zd(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}static fromPositions(e,t=e){return new Zd(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new Zd(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn}static areIntersectingOrTouching(e,t){return!(e.endLineNumber<t.startLineNumber||e.endLineNumber===t.startLineNumber&&e.endColumn<t.startColumn||t.endLineNumber<e.startLineNumber||t.endLineNumber===e.startLineNumber&&t.endColumn<e.startColumn)}static areIntersecting(e,t){return!(e.endLineNumber<t.startLineNumber||e.endLineNumber===t.startLineNumber&&e.endColumn<=t.startColumn||t.endLineNumber<e.startLineNumber||t.endLineNumber===e.startLineNumber&&t.endColumn<=e.startColumn)}static compareRangesUsingStarts(e,t){if(e&&t){const i=0|e.startLineNumber,n=0|t.startLineNumber;if(i===n){const i=0|e.startColumn,n=0|t.startColumn;if(i===n){const i=0|e.endLineNumber,n=0|t.endLineNumber;return i===n?(0|e.endColumn)-(0|t.endColumn):i-n}return i-n}return i-n}return(e?1:0)-(t?1:0)}static compareRangesUsingEnds(e,t){return e.endLineNumber===t.endLineNumber?e.endColumn===t.endColumn?e.startLineNumber===t.startLineNumber?e.startColumn-t.startColumn:e.startLineNumber-t.startLineNumber:e.endColumn-t.endColumn:e.endLineNumber-t.endLineNumber}static spansMultipleLines(e){return e.endLineNumber>e.startLineNumber}toJSON(){return this}}class Xd extends Zd{constructor(e,t,i,n){super(e,t,i,n),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=i,this.positionColumn=n}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return Xd.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return 0===this.getDirection()?new Xd(this.startLineNumber,this.startColumn,e,t):new Xd(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new Yd(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new Yd(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,t){return 0===this.getDirection()?new Xd(e,t,this.endLineNumber,this.endColumn):new Xd(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new Xd(e.lineNumber,e.column,t.lineNumber,t.column)}static fromRange(e,t){return 0===t?new Xd(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new Xd(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new Xd(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let i=0,n=e.length;i<n;i++)if(!this.selectionsEqual(e[i],t[i]))return!1;return!0}static isISelection(e){return e&&"number"==typeof e.selectionStartLineNumber&&"number"==typeof e.selectionStartColumn&&"number"==typeof e.positionLineNumber&&"number"==typeof e.positionColumn}static createWithDirection(e,t,i,n,o){return 0===o?new Xd(e,t,i,n):new Xd(i,n,e,t)}}var Jd,Qd,eh,th,ih,nh,oh,rh,sh=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class ah extends Nc{constructor(e,t,i){super(),this._registry=e,this._languageId=t,this._factory=i,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}get isResolved(){return this._isResolved}dispose(){this._isDisposed=!0,super.dispose()}resolve(){return sh(this,void 0,void 0,(function*(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}))}_create(){return sh(this,void 0,void 0,(function*(){const e=yield Promise.resolve(this._factory.createTokenizationSupport());this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}))}}class lh{constructor(e,t,i){this.id=e,this.definition=t,this.description=i,lh._allCodicons.push(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}static getAll(){return lh._allCodicons}}lh._allCodicons=[],lh.add=new lh("add",{fontCharacter:"\\ea60"}),lh.plus=new lh("plus",lh.add.definition),lh.gistNew=new lh("gist-new",lh.add.definition),lh.repoCreate=new lh("repo-create",lh.add.definition),lh.lightbulb=new lh("lightbulb",{fontCharacter:"\\ea61"}),lh.lightBulb=new lh("light-bulb",{fontCharacter:"\\ea61"}),lh.repo=new lh("repo",{fontCharacter:"\\ea62"}),lh.repoDelete=new lh("repo-delete",{fontCharacter:"\\ea62"}),lh.gistFork=new lh("gist-fork",{fontCharacter:"\\ea63"}),lh.repoForked=new lh("repo-forked",{fontCharacter:"\\ea63"}),lh.gitPullRequest=new lh("git-pull-request",{fontCharacter:"\\ea64"}),lh.gitPullRequestAbandoned=new lh("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),lh.recordKeys=new lh("record-keys",{fontCharacter:"\\ea65"}),lh.keyboard=new lh("keyboard",{fontCharacter:"\\ea65"}),lh.tag=new lh("tag",{fontCharacter:"\\ea66"}),lh.tagAdd=new lh("tag-add",{fontCharacter:"\\ea66"}),lh.tagRemove=new lh("tag-remove",{fontCharacter:"\\ea66"}),lh.person=new lh("person",{fontCharacter:"\\ea67"}),lh.personFollow=new lh("person-follow",{fontCharacter:"\\ea67"}),lh.personOutline=new lh("person-outline",{fontCharacter:"\\ea67"}),lh.personFilled=new lh("person-filled",{fontCharacter:"\\ea67"}),lh.gitBranch=new lh("git-branch",{fontCharacter:"\\ea68"}),lh.gitBranchCreate=new lh("git-branch-create",{fontCharacter:"\\ea68"}),lh.gitBranchDelete=new lh("git-branch-delete",{fontCharacter:"\\ea68"}),lh.sourceControl=new lh("source-control",{fontCharacter:"\\ea68"}),lh.mirror=new lh("mirror",{fontCharacter:"\\ea69"}),lh.mirrorPublic=new lh("mirror-public",{fontCharacter:"\\ea69"}),lh.star=new lh("star",{fontCharacter:"\\ea6a"}),lh.starAdd=new lh("star-add",{fontCharacter:"\\ea6a"}),lh.starDelete=new lh("star-delete",{fontCharacter:"\\ea6a"}),lh.starEmpty=new lh("star-empty",{fontCharacter:"\\ea6a"}),lh.comment=new lh("comment",{fontCharacter:"\\ea6b"}),lh.commentAdd=new lh("comment-add",{fontCharacter:"\\ea6b"}),lh.alert=new lh("alert",{fontCharacter:"\\ea6c"}),lh.warning=new lh("warning",{fontCharacter:"\\ea6c"}),lh.search=new lh("search",{fontCharacter:"\\ea6d"}),lh.searchSave=new lh("search-save",{fontCharacter:"\\ea6d"}),lh.logOut=new lh("log-out",{fontCharacter:"\\ea6e"}),lh.signOut=new lh("sign-out",{fontCharacter:"\\ea6e"}),lh.logIn=new lh("log-in",{fontCharacter:"\\ea6f"}),lh.signIn=new lh("sign-in",{fontCharacter:"\\ea6f"}),lh.eye=new lh("eye",{fontCharacter:"\\ea70"}),lh.eyeUnwatch=new lh("eye-unwatch",{fontCharacter:"\\ea70"}),lh.eyeWatch=new lh("eye-watch",{fontCharacter:"\\ea70"}),lh.circleFilled=new lh("circle-filled",{fontCharacter:"\\ea71"}),lh.primitiveDot=new lh("primitive-dot",{fontCharacter:"\\ea71"}),lh.closeDirty=new lh("close-dirty",{fontCharacter:"\\ea71"}),lh.debugBreakpoint=new lh("debug-breakpoint",{fontCharacter:"\\ea71"}),lh.debugBreakpointDisabled=new lh("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),lh.debugHint=new lh("debug-hint",{fontCharacter:"\\ea71"}),lh.primitiveSquare=new lh("primitive-square",{fontCharacter:"\\ea72"}),lh.edit=new lh("edit",{fontCharacter:"\\ea73"}),lh.pencil=new lh("pencil",{fontCharacter:"\\ea73"}),lh.info=new lh("info",{fontCharacter:"\\ea74"}),lh.issueOpened=new lh("issue-opened",{fontCharacter:"\\ea74"}),lh.gistPrivate=new lh("gist-private",{fontCharacter:"\\ea75"}),lh.gitForkPrivate=new lh("git-fork-private",{fontCharacter:"\\ea75"}),lh.lock=new lh("lock",{fontCharacter:"\\ea75"}),lh.mirrorPrivate=new lh("mirror-private",{fontCharacter:"\\ea75"}),lh.close=new lh("close",{fontCharacter:"\\ea76"}),lh.removeClose=new lh("remove-close",{fontCharacter:"\\ea76"}),lh.x=new lh("x",{fontCharacter:"\\ea76"}),lh.repoSync=new lh("repo-sync",{fontCharacter:"\\ea77"}),lh.sync=new lh("sync",{fontCharacter:"\\ea77"}),lh.clone=new lh("clone",{fontCharacter:"\\ea78"}),lh.desktopDownload=new lh("desktop-download",{fontCharacter:"\\ea78"}),lh.beaker=new lh("beaker",{fontCharacter:"\\ea79"}),lh.microscope=new lh("microscope",{fontCharacter:"\\ea79"}),lh.vm=new lh("vm",{fontCharacter:"\\ea7a"}),lh.deviceDesktop=new lh("device-desktop",{fontCharacter:"\\ea7a"}),lh.file=new lh("file",{fontCharacter:"\\ea7b"}),lh.fileText=new lh("file-text",{fontCharacter:"\\ea7b"}),lh.more=new lh("more",{fontCharacter:"\\ea7c"}),lh.ellipsis=new lh("ellipsis",{fontCharacter:"\\ea7c"}),lh.kebabHorizontal=new lh("kebab-horizontal",{fontCharacter:"\\ea7c"}),lh.mailReply=new lh("mail-reply",{fontCharacter:"\\ea7d"}),lh.reply=new lh("reply",{fontCharacter:"\\ea7d"}),lh.organization=new lh("organization",{fontCharacter:"\\ea7e"}),lh.organizationFilled=new lh("organization-filled",{fontCharacter:"\\ea7e"}),lh.organizationOutline=new lh("organization-outline",{fontCharacter:"\\ea7e"}),lh.newFile=new lh("new-file",{fontCharacter:"\\ea7f"}),lh.fileAdd=new lh("file-add",{fontCharacter:"\\ea7f"}),lh.newFolder=new lh("new-folder",{fontCharacter:"\\ea80"}),lh.fileDirectoryCreate=new lh("file-directory-create",{fontCharacter:"\\ea80"}),lh.trash=new lh("trash",{fontCharacter:"\\ea81"}),lh.trashcan=new lh("trashcan",{fontCharacter:"\\ea81"}),lh.history=new lh("history",{fontCharacter:"\\ea82"}),lh.clock=new lh("clock",{fontCharacter:"\\ea82"}),lh.folder=new lh("folder",{fontCharacter:"\\ea83"}),lh.fileDirectory=new lh("file-directory",{fontCharacter:"\\ea83"}),lh.symbolFolder=new lh("symbol-folder",{fontCharacter:"\\ea83"}),lh.logoGithub=new lh("logo-github",{fontCharacter:"\\ea84"}),lh.markGithub=new lh("mark-github",{fontCharacter:"\\ea84"}),lh.github=new lh("github",{fontCharacter:"\\ea84"}),lh.terminal=new lh("terminal",{fontCharacter:"\\ea85"}),lh.console=new lh("console",{fontCharacter:"\\ea85"}),lh.repl=new lh("repl",{fontCharacter:"\\ea85"}),lh.zap=new lh("zap",{fontCharacter:"\\ea86"}),lh.symbolEvent=new lh("symbol-event",{fontCharacter:"\\ea86"}),lh.error=new lh("error",{fontCharacter:"\\ea87"}),lh.stop=new lh("stop",{fontCharacter:"\\ea87"}),lh.variable=new lh("variable",{fontCharacter:"\\ea88"}),lh.symbolVariable=new lh("symbol-variable",{fontCharacter:"\\ea88"}),lh.array=new lh("array",{fontCharacter:"\\ea8a"}),lh.symbolArray=new lh("symbol-array",{fontCharacter:"\\ea8a"}),lh.symbolModule=new lh("symbol-module",{fontCharacter:"\\ea8b"}),lh.symbolPackage=new lh("symbol-package",{fontCharacter:"\\ea8b"}),lh.symbolNamespace=new lh("symbol-namespace",{fontCharacter:"\\ea8b"}),lh.symbolObject=new lh("symbol-object",{fontCharacter:"\\ea8b"}),lh.symbolMethod=new lh("symbol-method",{fontCharacter:"\\ea8c"}),lh.symbolFunction=new lh("symbol-function",{fontCharacter:"\\ea8c"}),lh.symbolConstructor=new lh("symbol-constructor",{fontCharacter:"\\ea8c"}),lh.symbolBoolean=new lh("symbol-boolean",{fontCharacter:"\\ea8f"}),lh.symbolNull=new lh("symbol-null",{fontCharacter:"\\ea8f"}),lh.symbolNumeric=new lh("symbol-numeric",{fontCharacter:"\\ea90"}),lh.symbolNumber=new lh("symbol-number",{fontCharacter:"\\ea90"}),lh.symbolStructure=new lh("symbol-structure",{fontCharacter:"\\ea91"}),lh.symbolStruct=new lh("symbol-struct",{fontCharacter:"\\ea91"}),lh.symbolParameter=new lh("symbol-parameter",{fontCharacter:"\\ea92"}),lh.symbolTypeParameter=new lh("symbol-type-parameter",{fontCharacter:"\\ea92"}),lh.symbolKey=new lh("symbol-key",{fontCharacter:"\\ea93"}),lh.symbolText=new lh("symbol-text",{fontCharacter:"\\ea93"}),lh.symbolReference=new lh("symbol-reference",{fontCharacter:"\\ea94"}),lh.goToFile=new lh("go-to-file",{fontCharacter:"\\ea94"}),lh.symbolEnum=new lh("symbol-enum",{fontCharacter:"\\ea95"}),lh.symbolValue=new lh("symbol-value",{fontCharacter:"\\ea95"}),lh.symbolRuler=new lh("symbol-ruler",{fontCharacter:"\\ea96"}),lh.symbolUnit=new lh("symbol-unit",{fontCharacter:"\\ea96"}),lh.activateBreakpoints=new lh("activate-breakpoints",{fontCharacter:"\\ea97"}),lh.archive=new lh("archive",{fontCharacter:"\\ea98"}),lh.arrowBoth=new lh("arrow-both",{fontCharacter:"\\ea99"}),lh.arrowDown=new lh("arrow-down",{fontCharacter:"\\ea9a"}),lh.arrowLeft=new lh("arrow-left",{fontCharacter:"\\ea9b"}),lh.arrowRight=new lh("arrow-right",{fontCharacter:"\\ea9c"}),lh.arrowSmallDown=new lh("arrow-small-down",{fontCharacter:"\\ea9d"}),lh.arrowSmallLeft=new lh("arrow-small-left",{fontCharacter:"\\ea9e"}),lh.arrowSmallRight=new lh("arrow-small-right",{fontCharacter:"\\ea9f"}),lh.arrowSmallUp=new lh("arrow-small-up",{fontCharacter:"\\eaa0"}),lh.arrowUp=new lh("arrow-up",{fontCharacter:"\\eaa1"}),lh.bell=new lh("bell",{fontCharacter:"\\eaa2"}),lh.bold=new lh("bold",{fontCharacter:"\\eaa3"}),lh.book=new lh("book",{fontCharacter:"\\eaa4"}),lh.bookmark=new lh("bookmark",{fontCharacter:"\\eaa5"}),lh.debugBreakpointConditionalUnverified=new lh("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),lh.debugBreakpointConditional=new lh("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),lh.debugBreakpointConditionalDisabled=new lh("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),lh.debugBreakpointDataUnverified=new lh("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),lh.debugBreakpointData=new lh("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),lh.debugBreakpointDataDisabled=new lh("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),lh.debugBreakpointLogUnverified=new lh("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),lh.debugBreakpointLog=new lh("debug-breakpoint-log",{fontCharacter:"\\eaab"}),lh.debugBreakpointLogDisabled=new lh("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),lh.briefcase=new lh("briefcase",{fontCharacter:"\\eaac"}),lh.broadcast=new lh("broadcast",{fontCharacter:"\\eaad"}),lh.browser=new lh("browser",{fontCharacter:"\\eaae"}),lh.bug=new lh("bug",{fontCharacter:"\\eaaf"}),lh.calendar=new lh("calendar",{fontCharacter:"\\eab0"}),lh.caseSensitive=new lh("case-sensitive",{fontCharacter:"\\eab1"}),lh.check=new lh("check",{fontCharacter:"\\eab2"}),lh.checklist=new lh("checklist",{fontCharacter:"\\eab3"}),lh.chevronDown=new lh("chevron-down",{fontCharacter:"\\eab4"}),lh.dropDownButton=new lh("drop-down-button",lh.chevronDown.definition),lh.chevronLeft=new lh("chevron-left",{fontCharacter:"\\eab5"}),lh.chevronRight=new lh("chevron-right",{fontCharacter:"\\eab6"}),lh.chevronUp=new lh("chevron-up",{fontCharacter:"\\eab7"}),lh.chromeClose=new lh("chrome-close",{fontCharacter:"\\eab8"}),lh.chromeMaximize=new lh("chrome-maximize",{fontCharacter:"\\eab9"}),lh.chromeMinimize=new lh("chrome-minimize",{fontCharacter:"\\eaba"}),lh.chromeRestore=new lh("chrome-restore",{fontCharacter:"\\eabb"}),lh.circleOutline=new lh("circle-outline",{fontCharacter:"\\eabc"}),lh.debugBreakpointUnverified=new lh("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),lh.circleSlash=new lh("circle-slash",{fontCharacter:"\\eabd"}),lh.circuitBoard=new lh("circuit-board",{fontCharacter:"\\eabe"}),lh.clearAll=new lh("clear-all",{fontCharacter:"\\eabf"}),lh.clippy=new lh("clippy",{fontCharacter:"\\eac0"}),lh.closeAll=new lh("close-all",{fontCharacter:"\\eac1"}),lh.cloudDownload=new lh("cloud-download",{fontCharacter:"\\eac2"}),lh.cloudUpload=new lh("cloud-upload",{fontCharacter:"\\eac3"}),lh.code=new lh("code",{fontCharacter:"\\eac4"}),lh.collapseAll=new lh("collapse-all",{fontCharacter:"\\eac5"}),lh.colorMode=new lh("color-mode",{fontCharacter:"\\eac6"}),lh.commentDiscussion=new lh("comment-discussion",{fontCharacter:"\\eac7"}),lh.compareChanges=new lh("compare-changes",{fontCharacter:"\\eafd"}),lh.creditCard=new lh("credit-card",{fontCharacter:"\\eac9"}),lh.dash=new lh("dash",{fontCharacter:"\\eacc"}),lh.dashboard=new lh("dashboard",{fontCharacter:"\\eacd"}),lh.database=new lh("database",{fontCharacter:"\\eace"}),lh.debugContinue=new lh("debug-continue",{fontCharacter:"\\eacf"}),lh.debugDisconnect=new lh("debug-disconnect",{fontCharacter:"\\ead0"}),lh.debugPause=new lh("debug-pause",{fontCharacter:"\\ead1"}),lh.debugRestart=new lh("debug-restart",{fontCharacter:"\\ead2"}),lh.debugStart=new lh("debug-start",{fontCharacter:"\\ead3"}),lh.debugStepInto=new lh("debug-step-into",{fontCharacter:"\\ead4"}),lh.debugStepOut=new lh("debug-step-out",{fontCharacter:"\\ead5"}),lh.debugStepOver=new lh("debug-step-over",{fontCharacter:"\\ead6"}),lh.debugStop=new lh("debug-stop",{fontCharacter:"\\ead7"}),lh.debug=new lh("debug",{fontCharacter:"\\ead8"}),lh.deviceCameraVideo=new lh("device-camera-video",{fontCharacter:"\\ead9"}),lh.deviceCamera=new lh("device-camera",{fontCharacter:"\\eada"}),lh.deviceMobile=new lh("device-mobile",{fontCharacter:"\\eadb"}),lh.diffAdded=new lh("diff-added",{fontCharacter:"\\eadc"}),lh.diffIgnored=new lh("diff-ignored",{fontCharacter:"\\eadd"}),lh.diffModified=new lh("diff-modified",{fontCharacter:"\\eade"}),lh.diffRemoved=new lh("diff-removed",{fontCharacter:"\\eadf"}),lh.diffRenamed=new lh("diff-renamed",{fontCharacter:"\\eae0"}),lh.diff=new lh("diff",{fontCharacter:"\\eae1"}),lh.discard=new lh("discard",{fontCharacter:"\\eae2"}),lh.editorLayout=new lh("editor-layout",{fontCharacter:"\\eae3"}),lh.emptyWindow=new lh("empty-window",{fontCharacter:"\\eae4"}),lh.exclude=new lh("exclude",{fontCharacter:"\\eae5"}),lh.extensions=new lh("extensions",{fontCharacter:"\\eae6"}),lh.eyeClosed=new lh("eye-closed",{fontCharacter:"\\eae7"}),lh.fileBinary=new lh("file-binary",{fontCharacter:"\\eae8"}),lh.fileCode=new lh("file-code",{fontCharacter:"\\eae9"}),lh.fileMedia=new lh("file-media",{fontCharacter:"\\eaea"}),lh.filePdf=new lh("file-pdf",{fontCharacter:"\\eaeb"}),lh.fileSubmodule=new lh("file-submodule",{fontCharacter:"\\eaec"}),lh.fileSymlinkDirectory=new lh("file-symlink-directory",{fontCharacter:"\\eaed"}),lh.fileSymlinkFile=new lh("file-symlink-file",{fontCharacter:"\\eaee"}),lh.fileZip=new lh("file-zip",{fontCharacter:"\\eaef"}),lh.files=new lh("files",{fontCharacter:"\\eaf0"}),lh.filter=new lh("filter",{fontCharacter:"\\eaf1"}),lh.flame=new lh("flame",{fontCharacter:"\\eaf2"}),lh.foldDown=new lh("fold-down",{fontCharacter:"\\eaf3"}),lh.foldUp=new lh("fold-up",{fontCharacter:"\\eaf4"}),lh.fold=new lh("fold",{fontCharacter:"\\eaf5"}),lh.folderActive=new lh("folder-active",{fontCharacter:"\\eaf6"}),lh.folderOpened=new lh("folder-opened",{fontCharacter:"\\eaf7"}),lh.gear=new lh("gear",{fontCharacter:"\\eaf8"}),lh.gift=new lh("gift",{fontCharacter:"\\eaf9"}),lh.gistSecret=new lh("gist-secret",{fontCharacter:"\\eafa"}),lh.gist=new lh("gist",{fontCharacter:"\\eafb"}),lh.gitCommit=new lh("git-commit",{fontCharacter:"\\eafc"}),lh.gitCompare=new lh("git-compare",{fontCharacter:"\\eafd"}),lh.gitMerge=new lh("git-merge",{fontCharacter:"\\eafe"}),lh.githubAction=new lh("github-action",{fontCharacter:"\\eaff"}),lh.githubAlt=new lh("github-alt",{fontCharacter:"\\eb00"}),lh.globe=new lh("globe",{fontCharacter:"\\eb01"}),lh.grabber=new lh("grabber",{fontCharacter:"\\eb02"}),lh.graph=new lh("graph",{fontCharacter:"\\eb03"}),lh.gripper=new lh("gripper",{fontCharacter:"\\eb04"}),lh.heart=new lh("heart",{fontCharacter:"\\eb05"}),lh.home=new lh("home",{fontCharacter:"\\eb06"}),lh.horizontalRule=new lh("horizontal-rule",{fontCharacter:"\\eb07"}),lh.hubot=new lh("hubot",{fontCharacter:"\\eb08"}),lh.inbox=new lh("inbox",{fontCharacter:"\\eb09"}),lh.issueClosed=new lh("issue-closed",{fontCharacter:"\\eba4"}),lh.issueReopened=new lh("issue-reopened",{fontCharacter:"\\eb0b"}),lh.issues=new lh("issues",{fontCharacter:"\\eb0c"}),lh.italic=new lh("italic",{fontCharacter:"\\eb0d"}),lh.jersey=new lh("jersey",{fontCharacter:"\\eb0e"}),lh.json=new lh("json",{fontCharacter:"\\eb0f"}),lh.kebabVertical=new lh("kebab-vertical",{fontCharacter:"\\eb10"}),lh.key=new lh("key",{fontCharacter:"\\eb11"}),lh.law=new lh("law",{fontCharacter:"\\eb12"}),lh.lightbulbAutofix=new lh("lightbulb-autofix",{fontCharacter:"\\eb13"}),lh.linkExternal=new lh("link-external",{fontCharacter:"\\eb14"}),lh.link=new lh("link",{fontCharacter:"\\eb15"}),lh.listOrdered=new lh("list-ordered",{fontCharacter:"\\eb16"}),lh.listUnordered=new lh("list-unordered",{fontCharacter:"\\eb17"}),lh.liveShare=new lh("live-share",{fontCharacter:"\\eb18"}),lh.loading=new lh("loading",{fontCharacter:"\\eb19"}),lh.location=new lh("location",{fontCharacter:"\\eb1a"}),lh.mailRead=new lh("mail-read",{fontCharacter:"\\eb1b"}),lh.mail=new lh("mail",{fontCharacter:"\\eb1c"}),lh.markdown=new lh("markdown",{fontCharacter:"\\eb1d"}),lh.megaphone=new lh("megaphone",{fontCharacter:"\\eb1e"}),lh.mention=new lh("mention",{fontCharacter:"\\eb1f"}),lh.milestone=new lh("milestone",{fontCharacter:"\\eb20"}),lh.mortarBoard=new lh("mortar-board",{fontCharacter:"\\eb21"}),lh.move=new lh("move",{fontCharacter:"\\eb22"}),lh.multipleWindows=new lh("multiple-windows",{fontCharacter:"\\eb23"}),lh.mute=new lh("mute",{fontCharacter:"\\eb24"}),lh.noNewline=new lh("no-newline",{fontCharacter:"\\eb25"}),lh.note=new lh("note",{fontCharacter:"\\eb26"}),lh.octoface=new lh("octoface",{fontCharacter:"\\eb27"}),lh.openPreview=new lh("open-preview",{fontCharacter:"\\eb28"}),lh.package_=new lh("package",{fontCharacter:"\\eb29"}),lh.paintcan=new lh("paintcan",{fontCharacter:"\\eb2a"}),lh.pin=new lh("pin",{fontCharacter:"\\eb2b"}),lh.play=new lh("play",{fontCharacter:"\\eb2c"}),lh.run=new lh("run",{fontCharacter:"\\eb2c"}),lh.plug=new lh("plug",{fontCharacter:"\\eb2d"}),lh.preserveCase=new lh("preserve-case",{fontCharacter:"\\eb2e"}),lh.preview=new lh("preview",{fontCharacter:"\\eb2f"}),lh.project=new lh("project",{fontCharacter:"\\eb30"}),lh.pulse=new lh("pulse",{fontCharacter:"\\eb31"}),lh.question=new lh("question",{fontCharacter:"\\eb32"}),lh.quote=new lh("quote",{fontCharacter:"\\eb33"}),lh.radioTower=new lh("radio-tower",{fontCharacter:"\\eb34"}),lh.reactions=new lh("reactions",{fontCharacter:"\\eb35"}),lh.references=new lh("references",{fontCharacter:"\\eb36"}),lh.refresh=new lh("refresh",{fontCharacter:"\\eb37"}),lh.regex=new lh("regex",{fontCharacter:"\\eb38"}),lh.remoteExplorer=new lh("remote-explorer",{fontCharacter:"\\eb39"}),lh.remote=new lh("remote",{fontCharacter:"\\eb3a"}),lh.remove=new lh("remove",{fontCharacter:"\\eb3b"}),lh.replaceAll=new lh("replace-all",{fontCharacter:"\\eb3c"}),lh.replace=new lh("replace",{fontCharacter:"\\eb3d"}),lh.repoClone=new lh("repo-clone",{fontCharacter:"\\eb3e"}),lh.repoForcePush=new lh("repo-force-push",{fontCharacter:"\\eb3f"}),lh.repoPull=new lh("repo-pull",{fontCharacter:"\\eb40"}),lh.repoPush=new lh("repo-push",{fontCharacter:"\\eb41"}),lh.report=new lh("report",{fontCharacter:"\\eb42"}),lh.requestChanges=new lh("request-changes",{fontCharacter:"\\eb43"}),lh.rocket=new lh("rocket",{fontCharacter:"\\eb44"}),lh.rootFolderOpened=new lh("root-folder-opened",{fontCharacter:"\\eb45"}),lh.rootFolder=new lh("root-folder",{fontCharacter:"\\eb46"}),lh.rss=new lh("rss",{fontCharacter:"\\eb47"}),lh.ruby=new lh("ruby",{fontCharacter:"\\eb48"}),lh.saveAll=new lh("save-all",{fontCharacter:"\\eb49"}),lh.saveAs=new lh("save-as",{fontCharacter:"\\eb4a"}),lh.save=new lh("save",{fontCharacter:"\\eb4b"}),lh.screenFull=new lh("screen-full",{fontCharacter:"\\eb4c"}),lh.screenNormal=new lh("screen-normal",{fontCharacter:"\\eb4d"}),lh.searchStop=new lh("search-stop",{fontCharacter:"\\eb4e"}),lh.server=new lh("server",{fontCharacter:"\\eb50"}),lh.settingsGear=new lh("settings-gear",{fontCharacter:"\\eb51"}),lh.settings=new lh("settings",{fontCharacter:"\\eb52"}),lh.shield=new lh("shield",{fontCharacter:"\\eb53"}),lh.smiley=new lh("smiley",{fontCharacter:"\\eb54"}),lh.sortPrecedence=new lh("sort-precedence",{fontCharacter:"\\eb55"}),lh.splitHorizontal=new lh("split-horizontal",{fontCharacter:"\\eb56"}),lh.splitVertical=new lh("split-vertical",{fontCharacter:"\\eb57"}),lh.squirrel=new lh("squirrel",{fontCharacter:"\\eb58"}),lh.starFull=new lh("star-full",{fontCharacter:"\\eb59"}),lh.starHalf=new lh("star-half",{fontCharacter:"\\eb5a"}),lh.symbolClass=new lh("symbol-class",{fontCharacter:"\\eb5b"}),lh.symbolColor=new lh("symbol-color",{fontCharacter:"\\eb5c"}),lh.symbolCustomColor=new lh("symbol-customcolor",{fontCharacter:"\\eb5c"}),lh.symbolConstant=new lh("symbol-constant",{fontCharacter:"\\eb5d"}),lh.symbolEnumMember=new lh("symbol-enum-member",{fontCharacter:"\\eb5e"}),lh.symbolField=new lh("symbol-field",{fontCharacter:"\\eb5f"}),lh.symbolFile=new lh("symbol-file",{fontCharacter:"\\eb60"}),lh.symbolInterface=new lh("symbol-interface",{fontCharacter:"\\eb61"}),lh.symbolKeyword=new lh("symbol-keyword",{fontCharacter:"\\eb62"}),lh.symbolMisc=new lh("symbol-misc",{fontCharacter:"\\eb63"}),lh.symbolOperator=new lh("symbol-operator",{fontCharacter:"\\eb64"}),lh.symbolProperty=new lh("symbol-property",{fontCharacter:"\\eb65"}),lh.wrench=new lh("wrench",{fontCharacter:"\\eb65"}),lh.wrenchSubaction=new lh("wrench-subaction",{fontCharacter:"\\eb65"}),lh.symbolSnippet=new lh("symbol-snippet",{fontCharacter:"\\eb66"}),lh.tasklist=new lh("tasklist",{fontCharacter:"\\eb67"}),lh.telescope=new lh("telescope",{fontCharacter:"\\eb68"}),lh.textSize=new lh("text-size",{fontCharacter:"\\eb69"}),lh.threeBars=new lh("three-bars",{fontCharacter:"\\eb6a"}),lh.thumbsdown=new lh("thumbsdown",{fontCharacter:"\\eb6b"}),lh.thumbsup=new lh("thumbsup",{fontCharacter:"\\eb6c"}),lh.tools=new lh("tools",{fontCharacter:"\\eb6d"}),lh.triangleDown=new lh("triangle-down",{fontCharacter:"\\eb6e"}),lh.triangleLeft=new lh("triangle-left",{fontCharacter:"\\eb6f"}),lh.triangleRight=new lh("triangle-right",{fontCharacter:"\\eb70"}),lh.triangleUp=new lh("triangle-up",{fontCharacter:"\\eb71"}),lh.twitter=new lh("twitter",{fontCharacter:"\\eb72"}),lh.unfold=new lh("unfold",{fontCharacter:"\\eb73"}),lh.unlock=new lh("unlock",{fontCharacter:"\\eb74"}),lh.unmute=new lh("unmute",{fontCharacter:"\\eb75"}),lh.unverified=new lh("unverified",{fontCharacter:"\\eb76"}),lh.verified=new lh("verified",{fontCharacter:"\\eb77"}),lh.versions=new lh("versions",{fontCharacter:"\\eb78"}),lh.vmActive=new lh("vm-active",{fontCharacter:"\\eb79"}),lh.vmOutline=new lh("vm-outline",{fontCharacter:"\\eb7a"}),lh.vmRunning=new lh("vm-running",{fontCharacter:"\\eb7b"}),lh.watch=new lh("watch",{fontCharacter:"\\eb7c"}),lh.whitespace=new lh("whitespace",{fontCharacter:"\\eb7d"}),lh.wholeWord=new lh("whole-word",{fontCharacter:"\\eb7e"}),lh.window=new lh("window",{fontCharacter:"\\eb7f"}),lh.wordWrap=new lh("word-wrap",{fontCharacter:"\\eb80"}),lh.zoomIn=new lh("zoom-in",{fontCharacter:"\\eb81"}),lh.zoomOut=new lh("zoom-out",{fontCharacter:"\\eb82"}),lh.listFilter=new lh("list-filter",{fontCharacter:"\\eb83"}),lh.listFlat=new lh("list-flat",{fontCharacter:"\\eb84"}),lh.listSelection=new lh("list-selection",{fontCharacter:"\\eb85"}),lh.selection=new lh("selection",{fontCharacter:"\\eb85"}),lh.listTree=new lh("list-tree",{fontCharacter:"\\eb86"}),lh.debugBreakpointFunctionUnverified=new lh("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),lh.debugBreakpointFunction=new lh("debug-breakpoint-function",{fontCharacter:"\\eb88"}),lh.debugBreakpointFunctionDisabled=new lh("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),lh.debugStackframeActive=new lh("debug-stackframe-active",{fontCharacter:"\\eb89"}),lh.debugStackframeDot=new lh("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),lh.debugStackframe=new lh("debug-stackframe",{fontCharacter:"\\eb8b"}),lh.debugStackframeFocused=new lh("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),lh.debugBreakpointUnsupported=new lh("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),lh.symbolString=new lh("symbol-string",{fontCharacter:"\\eb8d"}),lh.debugReverseContinue=new lh("debug-reverse-continue",{fontCharacter:"\\eb8e"}),lh.debugStepBack=new lh("debug-step-back",{fontCharacter:"\\eb8f"}),lh.debugRestartFrame=new lh("debug-restart-frame",{fontCharacter:"\\eb90"}),lh.callIncoming=new lh("call-incoming",{fontCharacter:"\\eb92"}),lh.callOutgoing=new lh("call-outgoing",{fontCharacter:"\\eb93"}),lh.menu=new lh("menu",{fontCharacter:"\\eb94"}),lh.expandAll=new lh("expand-all",{fontCharacter:"\\eb95"}),lh.feedback=new lh("feedback",{fontCharacter:"\\eb96"}),lh.groupByRefType=new lh("group-by-ref-type",{fontCharacter:"\\eb97"}),lh.ungroupByRefType=new lh("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),lh.account=new lh("account",{fontCharacter:"\\eb99"}),lh.bellDot=new lh("bell-dot",{fontCharacter:"\\eb9a"}),lh.debugConsole=new lh("debug-console",{fontCharacter:"\\eb9b"}),lh.library=new lh("library",{fontCharacter:"\\eb9c"}),lh.output=new lh("output",{fontCharacter:"\\eb9d"}),lh.runAll=new lh("run-all",{fontCharacter:"\\eb9e"}),lh.syncIgnored=new lh("sync-ignored",{fontCharacter:"\\eb9f"}),lh.pinned=new lh("pinned",{fontCharacter:"\\eba0"}),lh.githubInverted=new lh("github-inverted",{fontCharacter:"\\eba1"}),lh.debugAlt=new lh("debug-alt",{fontCharacter:"\\eb91"}),lh.serverProcess=new lh("server-process",{fontCharacter:"\\eba2"}),lh.serverEnvironment=new lh("server-environment",{fontCharacter:"\\eba3"}),lh.pass=new lh("pass",{fontCharacter:"\\eba4"}),lh.stopCircle=new lh("stop-circle",{fontCharacter:"\\eba5"}),lh.playCircle=new lh("play-circle",{fontCharacter:"\\eba6"}),lh.record=new lh("record",{fontCharacter:"\\eba7"}),lh.debugAltSmall=new lh("debug-alt-small",{fontCharacter:"\\eba8"}),lh.vmConnect=new lh("vm-connect",{fontCharacter:"\\eba9"}),lh.cloud=new lh("cloud",{fontCharacter:"\\ebaa"}),lh.merge=new lh("merge",{fontCharacter:"\\ebab"}),lh.exportIcon=new lh("export",{fontCharacter:"\\ebac"}),lh.graphLeft=new lh("graph-left",{fontCharacter:"\\ebad"}),lh.magnet=new lh("magnet",{fontCharacter:"\\ebae"}),lh.notebook=new lh("notebook",{fontCharacter:"\\ebaf"}),lh.redo=new lh("redo",{fontCharacter:"\\ebb0"}),lh.checkAll=new lh("check-all",{fontCharacter:"\\ebb1"}),lh.pinnedDirty=new lh("pinned-dirty",{fontCharacter:"\\ebb2"}),lh.passFilled=new lh("pass-filled",{fontCharacter:"\\ebb3"}),lh.circleLargeFilled=new lh("circle-large-filled",{fontCharacter:"\\ebb4"}),lh.circleLargeOutline=new lh("circle-large-outline",{fontCharacter:"\\ebb5"}),lh.combine=new lh("combine",{fontCharacter:"\\ebb6"}),lh.gather=new lh("gather",{fontCharacter:"\\ebb6"}),lh.table=new lh("table",{fontCharacter:"\\ebb7"}),lh.variableGroup=new lh("variable-group",{fontCharacter:"\\ebb8"}),lh.typeHierarchy=new lh("type-hierarchy",{fontCharacter:"\\ebb9"}),lh.typeHierarchySub=new lh("type-hierarchy-sub",{fontCharacter:"\\ebba"}),lh.typeHierarchySuper=new lh("type-hierarchy-super",{fontCharacter:"\\ebbb"}),lh.gitPullRequestCreate=new lh("git-pull-request-create",{fontCharacter:"\\ebbc"}),lh.runAbove=new lh("run-above",{fontCharacter:"\\ebbd"}),lh.runBelow=new lh("run-below",{fontCharacter:"\\ebbe"}),lh.notebookTemplate=new lh("notebook-template",{fontCharacter:"\\ebbf"}),lh.debugRerun=new lh("debug-rerun",{fontCharacter:"\\ebc0"}),lh.workspaceTrusted=new lh("workspace-trusted",{fontCharacter:"\\ebc1"}),lh.workspaceUntrusted=new lh("workspace-untrusted",{fontCharacter:"\\ebc2"}),lh.workspaceUnspecified=new lh("workspace-unspecified",{fontCharacter:"\\ebc3"}),lh.terminalCmd=new lh("terminal-cmd",{fontCharacter:"\\ebc4"}),lh.terminalDebian=new lh("terminal-debian",{fontCharacter:"\\ebc5"}),lh.terminalLinux=new lh("terminal-linux",{fontCharacter:"\\ebc6"}),lh.terminalPowershell=new lh("terminal-powershell",{fontCharacter:"\\ebc7"}),lh.terminalTmux=new lh("terminal-tmux",{fontCharacter:"\\ebc8"}),lh.terminalUbuntu=new lh("terminal-ubuntu",{fontCharacter:"\\ebc9"}),lh.terminalBash=new lh("terminal-bash",{fontCharacter:"\\ebca"}),lh.arrowSwap=new lh("arrow-swap",{fontCharacter:"\\ebcb"}),lh.copy=new lh("copy",{fontCharacter:"\\ebcc"}),lh.personAdd=new lh("person-add",{fontCharacter:"\\ebcd"}),lh.filterFilled=new lh("filter-filled",{fontCharacter:"\\ebce"}),lh.wand=new lh("wand",{fontCharacter:"\\ebcf"}),lh.debugLineByLine=new lh("debug-line-by-line",{fontCharacter:"\\ebd0"}),lh.inspect=new lh("inspect",{fontCharacter:"\\ebd1"}),lh.layers=new lh("layers",{fontCharacter:"\\ebd2"}),lh.layersDot=new lh("layers-dot",{fontCharacter:"\\ebd3"}),lh.layersActive=new lh("layers-active",{fontCharacter:"\\ebd4"}),lh.compass=new lh("compass",{fontCharacter:"\\ebd5"}),lh.compassDot=new lh("compass-dot",{fontCharacter:"\\ebd6"}),lh.compassActive=new lh("compass-active",{fontCharacter:"\\ebd7"}),lh.azure=new lh("azure",{fontCharacter:"\\ebd8"}),lh.issueDraft=new lh("issue-draft",{fontCharacter:"\\ebd9"}),lh.gitPullRequestClosed=new lh("git-pull-request-closed",{fontCharacter:"\\ebda"}),lh.gitPullRequestDraft=new lh("git-pull-request-draft",{fontCharacter:"\\ebdb"}),lh.debugAll=new lh("debug-all",{fontCharacter:"\\ebdc"}),lh.debugCoverage=new lh("debug-coverage",{fontCharacter:"\\ebdd"}),lh.runErrors=new lh("run-errors",{fontCharacter:"\\ebde"}),lh.folderLibrary=new lh("folder-library",{fontCharacter:"\\ebdf"}),lh.debugContinueSmall=new lh("debug-continue-small",{fontCharacter:"\\ebe0"}),lh.beakerStop=new lh("beaker-stop",{fontCharacter:"\\ebe1"}),lh.graphLine=new lh("graph-line",{fontCharacter:"\\ebe2"}),lh.graphScatter=new lh("graph-scatter",{fontCharacter:"\\ebe3"}),lh.pieChart=new lh("pie-chart",{fontCharacter:"\\ebe4"}),lh.bracket=new lh("bracket",lh.json.definition),lh.bracketDot=new lh("bracket-dot",{fontCharacter:"\\ebe5"}),lh.bracketError=new lh("bracket-error",{fontCharacter:"\\ebe6"}),lh.lockSmall=new lh("lock-small",{fontCharacter:"\\ebe7"}),lh.azureDevops=new lh("azure-devops",{fontCharacter:"\\ebe8"}),lh.verifiedFilled=new lh("verified-filled",{fontCharacter:"\\ebe9"}),lh.newLine=new lh("newline",{fontCharacter:"\\ebea"}),lh.layout=new lh("layout",{fontCharacter:"\\ebeb"}),lh.layoutActivitybarLeft=new lh("layout-activitybar-left",{fontCharacter:"\\ebec"}),lh.layoutActivitybarRight=new lh("layout-activitybar-right",{fontCharacter:"\\ebed"}),lh.layoutPanelLeft=new lh("layout-panel-left",{fontCharacter:"\\ebee"}),lh.layoutPanelCenter=new lh("layout-panel-center",{fontCharacter:"\\ebef"}),lh.layoutPanelJustify=new lh("layout-panel-justify",{fontCharacter:"\\ebf0"}),lh.layoutPanelRight=new lh("layout-panel-right",{fontCharacter:"\\ebf1"}),lh.layoutPanel=new lh("layout-panel",{fontCharacter:"\\ebf2"}),lh.layoutSidebarLeft=new lh("layout-sidebar-left",{fontCharacter:"\\ebf3"}),lh.layoutSidebarRight=new lh("layout-sidebar-right",{fontCharacter:"\\ebf4"}),lh.layoutStatusbar=new lh("layout-statusbar",{fontCharacter:"\\ebf5"}),lh.layoutMenubar=new lh("layout-menubar",{fontCharacter:"\\ebf6"}),lh.layoutCentered=new lh("layout-centered",{fontCharacter:"\\ebf7"}),lh.target=new lh("target",{fontCharacter:"\\ebf8"}),lh.indent=new lh("indent",{fontCharacter:"\\ebf9"}),lh.recordSmall=new lh("record-small",{fontCharacter:"\\ebfa"}),lh.errorSmall=new lh("error-small",{fontCharacter:"\\ebfb"}),lh.arrowCircleDown=new lh("arrow-circle-down",{fontCharacter:"\\ebfc"}),lh.arrowCircleLeft=new lh("arrow-circle-left",{fontCharacter:"\\ebfd"}),lh.arrowCircleRight=new lh("arrow-circle-right",{fontCharacter:"\\ebfe"}),lh.arrowCircleUp=new lh("arrow-circle-up",{fontCharacter:"\\ebff"}),lh.dialogError=new lh("dialog-error",lh.error.definition),lh.dialogWarning=new lh("dialog-warning",lh.warning.definition),lh.dialogInfo=new lh("dialog-info",lh.info.definition),lh.dialogClose=new lh("dialog-close",lh.close.definition),lh.treeItemExpanded=new lh("tree-item-expanded",lh.chevronDown.definition),lh.treeFilterOnTypeOn=new lh("tree-filter-on-type-on",lh.listFilter.definition),lh.treeFilterOnTypeOff=new lh("tree-filter-on-type-off",lh.listSelection.definition),lh.treeFilterClear=new lh("tree-filter-clear",lh.close.definition),lh.treeItemLoading=new lh("tree-item-loading",lh.loading.definition),lh.menuSelection=new lh("menu-selection",lh.check.definition),lh.menuSubmenu=new lh("menu-submenu",lh.chevronRight.definition),lh.menuBarMore=new lh("menubar-more",lh.more.definition),lh.scrollbarButtonLeft=new lh("scrollbar-button-left",lh.triangleLeft.definition),lh.scrollbarButtonRight=new lh("scrollbar-button-right",lh.triangleRight.definition),lh.scrollbarButtonUp=new lh("scrollbar-button-up",lh.triangleUp.definition),lh.scrollbarButtonDown=new lh("scrollbar-button-down",lh.triangleDown.definition),lh.toolBarMore=new lh("toolbar-more",lh.more.definition),lh.quickInputBack=new lh("quick-input-back",lh.arrowLeft.definition),function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9-]+",e.iconModifierExpression="~[A-Za-z]+",e.iconNameCharacter="[A-Za-z0-9~-]";const t=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function i(e){if(e instanceof lh)return["codicon","codicon-"+e.id];const n=t.exec(e.id);if(!n)return i(lh.error);let[,o,r]=n;const s=["codicon","codicon-"+o];return r&&s.push("codicon-modifier-"+r.substr(1)),s}e.asClassNameArray=i,e.asClassName=function(e){return i(e).join(" ")},e.asCSSSelector=function(e){return"."+i(e).join(".")}}(Jd||(Jd={}));class ch{static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static getFontStyle(e){return(15360&e)>>>10}static getForeground(e){return(8372224&e)>>>14}static getBackground(e){return(4286578688&e)>>>23}static getClassNameFromMetadata(e){let t="mtk"+this.getForeground(e);const i=this.getFontStyle(e);return 1&i&&(t+=" mtki"),2&i&&(t+=" mtkb"),4&i&&(t+=" mtku"),8&i&&(t+=" mtks"),t}static getInlineStyleFromMetadata(e,t){const i=this.getForeground(e),n=this.getFontStyle(e);let o=`color: ${t[i]};`;1&n&&(o+="font-style: italic;"),2&n&&(o+="font-weight: bold;");let r="";return 4&n&&(r+=" underline"),8&n&&(r+=" line-through"),r&&(o+=`text-decoration:${r};`),o}static getPresentationFromMetadata(e){const t=this.getForeground(e),i=this.getFontStyle(e);return{foreground:t,italic:Boolean(1&i),bold:Boolean(2&i),underline:Boolean(4&i),strikethrough:Boolean(8&i)}}}class dh{constructor(e,t,i){this._tokenBrand=void 0,this.offset=e,this.type=t,this.language=i}toString(){return"("+this.offset+", "+this.type+")"}}class hh{constructor(e,t){this._tokenizationResultBrand=void 0,this.tokens=e,this.endState=t}}class uh{constructor(e,t){this._encodedTokenizationResultBrand=void 0,this.tokens=e,this.endState=t}}!function(e){const t=new Map;t.set(0,lh.symbolMethod),t.set(1,lh.symbolFunction),t.set(2,lh.symbolConstructor),t.set(3,lh.symbolField),t.set(4,lh.symbolVariable),t.set(5,lh.symbolClass),t.set(6,lh.symbolStruct),t.set(7,lh.symbolInterface),t.set(8,lh.symbolModule),t.set(9,lh.symbolProperty),t.set(10,lh.symbolEvent),t.set(11,lh.symbolOperator),t.set(12,lh.symbolUnit),t.set(13,lh.symbolValue),t.set(15,lh.symbolEnum),t.set(14,lh.symbolConstant),t.set(15,lh.symbolEnum),t.set(16,lh.symbolEnumMember),t.set(17,lh.symbolKeyword),t.set(27,lh.symbolSnippet),t.set(18,lh.symbolText),t.set(19,lh.symbolColor),t.set(20,lh.symbolFile),t.set(21,lh.symbolReference),t.set(22,lh.symbolCustomColor),t.set(23,lh.symbolFolder),t.set(24,lh.symbolTypeParameter),t.set(25,lh.account),t.set(26,lh.issues),e.toIcon=function(e){let i=t.get(e);return i||(console.info("No codicon found for CompletionItemKind "+e),i=lh.symbolProperty),i};const i=new Map;i.set("method",0),i.set("function",1),i.set("constructor",2),i.set("field",3),i.set("variable",4),i.set("class",5),i.set("struct",6),i.set("interface",7),i.set("module",8),i.set("property",9),i.set("event",10),i.set("operator",11),i.set("unit",12),i.set("value",13),i.set("constant",14),i.set("enum",15),i.set("enum-member",16),i.set("enumMember",16),i.set("keyword",17),i.set("snippet",27),i.set("text",18),i.set("color",19),i.set("file",20),i.set("reference",21),i.set("customcolor",22),i.set("folder",23),i.set("type-parameter",24),i.set("typeParameter",24),i.set("account",25),i.set("issue",26),e.fromString=function(e,t){let n=i.get(e);return void 0!==n||t||(n=9),n}}(Qd||(Qd={})),function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"}(eh||(eh={})),function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(th||(th={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(ih||(ih={})),function(e){const t=new Map;t.set(0,lh.symbolFile),t.set(1,lh.symbolModule),t.set(2,lh.symbolNamespace),t.set(3,lh.symbolPackage),t.set(4,lh.symbolClass),t.set(5,lh.symbolMethod),t.set(6,lh.symbolProperty),t.set(7,lh.symbolField),t.set(8,lh.symbolConstructor),t.set(9,lh.symbolEnum),t.set(10,lh.symbolInterface),t.set(11,lh.symbolFunction),t.set(12,lh.symbolVariable),t.set(13,lh.symbolConstant),t.set(14,lh.symbolString),t.set(15,lh.symbolNumber),t.set(16,lh.symbolBoolean),t.set(17,lh.symbolArray),t.set(18,lh.symbolObject),t.set(19,lh.symbolKey),t.set(20,lh.symbolNull),t.set(21,lh.symbolEnumMember),t.set(22,lh.symbolStruct),t.set(23,lh.symbolEvent),t.set(24,lh.symbolOperator),t.set(25,lh.symbolTypeParameter),e.toIcon=function(e){let i=t.get(e);return i||(console.info("No codicon found for SymbolKind "+e),i=lh.symbolProperty),i}}(nh||(nh={}));class gh{constructor(e){this.value=e}}gh.Comment=new gh("comment"),gh.Imports=new gh("imports"),gh.Region=new gh("region"),function(e){e.is=function(e){return!(!e||"object"!=typeof e)&&"string"==typeof e.id&&"string"==typeof e.title}}(oh||(oh={})),function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"}(rh||(rh={}));const ph=new class{constructor(){this._map=new Map,this._factories=new Map,this._onDidChange=new Vc,this.onDidChange=this._onDidChange.event,this._colorMap=null}fire(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,t){return this._map.set(e,t),this.fire([e]),Lc((()=>{this._map.get(e)===t&&(this._map.delete(e),this.fire([e]))}))}registerFactory(e,t){var i;null===(i=this._factories.get(e))||void 0===i||i.dispose();const n=new ah(this,e,t);return this._factories.set(e,n),Lc((()=>{const t=this._factories.get(e);t&&t===n&&(this._factories.delete(e),t.dispose())}))}getOrCreate(e){return sh(this,void 0,void 0,(function*(){const t=this.get(e);if(t)return t;const i=this._factories.get(e);return!i||i.isResolved?null:(yield i.resolve(),this.get(e))}))}get(e){return this._map.get(e)||null}isResolved(e){if(this.get(e))return!0;const t=this._factories.get(e);return!(t&&!t.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._map.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}};var mh,fh,_h,vh,bh,wh,yh,Ch,Sh,kh,xh,Lh,Eh,Nh,Ih,Th,Dh,Ah,Oh,Mh,Rh,Ph,Fh,Bh,Wh,Vh,zh,jh,Hh,Uh,$h,Kh,qh,Gh,Yh,Zh,Xh;!function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"}(mh||(mh={})),function(e){e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"}(fh||(fh={})),function(e){e[e.Method=0]="Method",e[e.Function=1]="Function",e[e.Constructor=2]="Constructor",e[e.Field=3]="Field",e[e.Variable=4]="Variable",e[e.Class=5]="Class",e[e.Struct=6]="Struct",e[e.Interface=7]="Interface",e[e.Module=8]="Module",e[e.Property=9]="Property",e[e.Event=10]="Event",e[e.Operator=11]="Operator",e[e.Unit=12]="Unit",e[e.Value=13]="Value",e[e.Constant=14]="Constant",e[e.Enum=15]="Enum",e[e.EnumMember=16]="EnumMember",e[e.Keyword=17]="Keyword",e[e.Text=18]="Text",e[e.Color=19]="Color",e[e.File=20]="File",e[e.Reference=21]="Reference",e[e.Customcolor=22]="Customcolor",e[e.Folder=23]="Folder",e[e.TypeParameter=24]="TypeParameter",e[e.User=25]="User",e[e.Issue=26]="Issue",e[e.Snippet=27]="Snippet"}(_h||(_h={})),function(e){e[e.Deprecated=1]="Deprecated"}(vh||(vh={})),function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"}(bh||(bh={})),function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"}(wh||(wh={})),function(e){e[e.NotSet=0]="NotSet",e[e.ContentFlush=1]="ContentFlush",e[e.RecoverFromMarkers=2]="RecoverFromMarkers",e[e.Explicit=3]="Explicit",e[e.Paste=4]="Paste",e[e.Undo=5]="Undo",e[e.Redo=6]="Redo"}(yh||(yh={})),function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(Ch||(Ch={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(Sh||(Sh={})),function(e){e[e.None=0]="None",e[e.Keep=1]="Keep",e[e.Brackets=2]="Brackets",e[e.Advanced=3]="Advanced",e[e.Full=4]="Full"}(kh||(kh={})),function(e){e[e.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",e[e.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",e[e.accessibilitySupport=2]="accessibilitySupport",e[e.accessibilityPageSize=3]="accessibilityPageSize",e[e.ariaLabel=4]="ariaLabel",e[e.autoClosingBrackets=5]="autoClosingBrackets",e[e.autoClosingDelete=6]="autoClosingDelete",e[e.autoClosingOvertype=7]="autoClosingOvertype",e[e.autoClosingQuotes=8]="autoClosingQuotes",e[e.autoIndent=9]="autoIndent",e[e.automaticLayout=10]="automaticLayout",e[e.autoSurround=11]="autoSurround",e[e.bracketPairColorization=12]="bracketPairColorization",e[e.guides=13]="guides",e[e.codeLens=14]="codeLens",e[e.codeLensFontFamily=15]="codeLensFontFamily",e[e.codeLensFontSize=16]="codeLensFontSize",e[e.colorDecorators=17]="colorDecorators",e[e.columnSelection=18]="columnSelection",e[e.comments=19]="comments",e[e.contextmenu=20]="contextmenu",e[e.copyWithSyntaxHighlighting=21]="copyWithSyntaxHighlighting",e[e.cursorBlinking=22]="cursorBlinking",e[e.cursorSmoothCaretAnimation=23]="cursorSmoothCaretAnimation",e[e.cursorStyle=24]="cursorStyle",e[e.cursorSurroundingLines=25]="cursorSurroundingLines",e[e.cursorSurroundingLinesStyle=26]="cursorSurroundingLinesStyle",e[e.cursorWidth=27]="cursorWidth",e[e.disableLayerHinting=28]="disableLayerHinting",e[e.disableMonospaceOptimizations=29]="disableMonospaceOptimizations",e[e.domReadOnly=30]="domReadOnly",e[e.dragAndDrop=31]="dragAndDrop",e[e.emptySelectionClipboard=32]="emptySelectionClipboard",e[e.extraEditorClassName=33]="extraEditorClassName",e[e.fastScrollSensitivity=34]="fastScrollSensitivity",e[e.find=35]="find",e[e.fixedOverflowWidgets=36]="fixedOverflowWidgets",e[e.folding=37]="folding",e[e.foldingStrategy=38]="foldingStrategy",e[e.foldingHighlight=39]="foldingHighlight",e[e.foldingImportsByDefault=40]="foldingImportsByDefault",e[e.foldingMaximumRegions=41]="foldingMaximumRegions",e[e.unfoldOnClickAfterEndOfLine=42]="unfoldOnClickAfterEndOfLine",e[e.fontFamily=43]="fontFamily",e[e.fontInfo=44]="fontInfo",e[e.fontLigatures=45]="fontLigatures",e[e.fontSize=46]="fontSize",e[e.fontWeight=47]="fontWeight",e[e.formatOnPaste=48]="formatOnPaste",e[e.formatOnType=49]="formatOnType",e[e.glyphMargin=50]="glyphMargin",e[e.gotoLocation=51]="gotoLocation",e[e.hideCursorInOverviewRuler=52]="hideCursorInOverviewRuler",e[e.hover=53]="hover",e[e.inDiffEditor=54]="inDiffEditor",e[e.inlineSuggest=55]="inlineSuggest",e[e.letterSpacing=56]="letterSpacing",e[e.lightbulb=57]="lightbulb",e[e.lineDecorationsWidth=58]="lineDecorationsWidth",e[e.lineHeight=59]="lineHeight",e[e.lineNumbers=60]="lineNumbers",e[e.lineNumbersMinChars=61]="lineNumbersMinChars",e[e.linkedEditing=62]="linkedEditing",e[e.links=63]="links",e[e.matchBrackets=64]="matchBrackets",e[e.minimap=65]="minimap",e[e.mouseStyle=66]="mouseStyle",e[e.mouseWheelScrollSensitivity=67]="mouseWheelScrollSensitivity",e[e.mouseWheelZoom=68]="mouseWheelZoom",e[e.multiCursorMergeOverlapping=69]="multiCursorMergeOverlapping",e[e.multiCursorModifier=70]="multiCursorModifier",e[e.multiCursorPaste=71]="multiCursorPaste",e[e.occurrencesHighlight=72]="occurrencesHighlight",e[e.overviewRulerBorder=73]="overviewRulerBorder",e[e.overviewRulerLanes=74]="overviewRulerLanes",e[e.padding=75]="padding",e[e.parameterHints=76]="parameterHints",e[e.peekWidgetDefaultFocus=77]="peekWidgetDefaultFocus",e[e.definitionLinkOpensInPeek=78]="definitionLinkOpensInPeek",e[e.quickSuggestions=79]="quickSuggestions",e[e.quickSuggestionsDelay=80]="quickSuggestionsDelay",e[e.readOnly=81]="readOnly",e[e.renameOnType=82]="renameOnType",e[e.renderControlCharacters=83]="renderControlCharacters",e[e.renderFinalNewline=84]="renderFinalNewline",e[e.renderLineHighlight=85]="renderLineHighlight",e[e.renderLineHighlightOnlyWhenFocus=86]="renderLineHighlightOnlyWhenFocus",e[e.renderValidationDecorations=87]="renderValidationDecorations",e[e.renderWhitespace=88]="renderWhitespace",e[e.revealHorizontalRightPadding=89]="revealHorizontalRightPadding",e[e.roundedSelection=90]="roundedSelection",e[e.rulers=91]="rulers",e[e.scrollbar=92]="scrollbar",e[e.scrollBeyondLastColumn=93]="scrollBeyondLastColumn",e[e.scrollBeyondLastLine=94]="scrollBeyondLastLine",e[e.scrollPredominantAxis=95]="scrollPredominantAxis",e[e.selectionClipboard=96]="selectionClipboard",e[e.selectionHighlight=97]="selectionHighlight",e[e.selectOnLineNumbers=98]="selectOnLineNumbers",e[e.showFoldingControls=99]="showFoldingControls",e[e.showUnused=100]="showUnused",e[e.snippetSuggestions=101]="snippetSuggestions",e[e.smartSelect=102]="smartSelect",e[e.smoothScrolling=103]="smoothScrolling",e[e.stickyTabStops=104]="stickyTabStops",e[e.stopRenderingLineAfter=105]="stopRenderingLineAfter",e[e.suggest=106]="suggest",e[e.suggestFontSize=107]="suggestFontSize",e[e.suggestLineHeight=108]="suggestLineHeight",e[e.suggestOnTriggerCharacters=109]="suggestOnTriggerCharacters",e[e.suggestSelection=110]="suggestSelection",e[e.tabCompletion=111]="tabCompletion",e[e.tabIndex=112]="tabIndex",e[e.unicodeHighlighting=113]="unicodeHighlighting",e[e.unusualLineTerminators=114]="unusualLineTerminators",e[e.useShadowDOM=115]="useShadowDOM",e[e.useTabStops=116]="useTabStops",e[e.wordSeparators=117]="wordSeparators",e[e.wordWrap=118]="wordWrap",e[e.wordWrapBreakAfterCharacters=119]="wordWrapBreakAfterCharacters",e[e.wordWrapBreakBeforeCharacters=120]="wordWrapBreakBeforeCharacters",e[e.wordWrapColumn=121]="wordWrapColumn",e[e.wordWrapOverride1=122]="wordWrapOverride1",e[e.wordWrapOverride2=123]="wordWrapOverride2",e[e.wrappingIndent=124]="wrappingIndent",e[e.wrappingStrategy=125]="wrappingStrategy",e[e.showDeprecated=126]="showDeprecated",e[e.inlayHints=127]="inlayHints",e[e.editorClassName=128]="editorClassName",e[e.pixelRatio=129]="pixelRatio",e[e.tabFocusMode=130]="tabFocusMode",e[e.layoutInfo=131]="layoutInfo",e[e.wrappingInfo=132]="wrappingInfo"}(xh||(xh={})),function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(Lh||(Lh={})),function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"}(Eh||(Eh={})),function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(Nh||(Nh={})),function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"}(Ih||(Ih={})),function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"}(Th||(Th={})),function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"}(Dh||(Dh={})),function(e){e[e.DependsOnKbLayout=-1]="DependsOnKbLayout",e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.Digit0=21]="Digit0",e[e.Digit1=22]="Digit1",e[e.Digit2=23]="Digit2",e[e.Digit3=24]="Digit3",e[e.Digit4=25]="Digit4",e[e.Digit5=26]="Digit5",e[e.Digit6=27]="Digit6",e[e.Digit7=28]="Digit7",e[e.Digit8=29]="Digit8",e[e.Digit9=30]="Digit9",e[e.KeyA=31]="KeyA",e[e.KeyB=32]="KeyB",e[e.KeyC=33]="KeyC",e[e.KeyD=34]="KeyD",e[e.KeyE=35]="KeyE",e[e.KeyF=36]="KeyF",e[e.KeyG=37]="KeyG",e[e.KeyH=38]="KeyH",e[e.KeyI=39]="KeyI",e[e.KeyJ=40]="KeyJ",e[e.KeyK=41]="KeyK",e[e.KeyL=42]="KeyL",e[e.KeyM=43]="KeyM",e[e.KeyN=44]="KeyN",e[e.KeyO=45]="KeyO",e[e.KeyP=46]="KeyP",e[e.KeyQ=47]="KeyQ",e[e.KeyR=48]="KeyR",e[e.KeyS=49]="KeyS",e[e.KeyT=50]="KeyT",e[e.KeyU=51]="KeyU",e[e.KeyV=52]="KeyV",e[e.KeyW=53]="KeyW",e[e.KeyX=54]="KeyX",e[e.KeyY=55]="KeyY",e[e.KeyZ=56]="KeyZ",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.NumLock=78]="NumLock",e[e.ScrollLock=79]="ScrollLock",e[e.Semicolon=80]="Semicolon",e[e.Equal=81]="Equal",e[e.Comma=82]="Comma",e[e.Minus=83]="Minus",e[e.Period=84]="Period",e[e.Slash=85]="Slash",e[e.Backquote=86]="Backquote",e[e.BracketLeft=87]="BracketLeft",e[e.Backslash=88]="Backslash",e[e.BracketRight=89]="BracketRight",e[e.Quote=90]="Quote",e[e.OEM_8=91]="OEM_8",e[e.IntlBackslash=92]="IntlBackslash",e[e.Numpad0=93]="Numpad0",e[e.Numpad1=94]="Numpad1",e[e.Numpad2=95]="Numpad2",e[e.Numpad3=96]="Numpad3",e[e.Numpad4=97]="Numpad4",e[e.Numpad5=98]="Numpad5",e[e.Numpad6=99]="Numpad6",e[e.Numpad7=100]="Numpad7",e[e.Numpad8=101]="Numpad8",e[e.Numpad9=102]="Numpad9",e[e.NumpadMultiply=103]="NumpadMultiply",e[e.NumpadAdd=104]="NumpadAdd",e[e.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",e[e.NumpadSubtract=106]="NumpadSubtract",e[e.NumpadDecimal=107]="NumpadDecimal",e[e.NumpadDivide=108]="NumpadDivide",e[e.KEY_IN_COMPOSITION=109]="KEY_IN_COMPOSITION",e[e.ABNT_C1=110]="ABNT_C1",e[e.ABNT_C2=111]="ABNT_C2",e[e.AudioVolumeMute=112]="AudioVolumeMute",e[e.AudioVolumeUp=113]="AudioVolumeUp",e[e.AudioVolumeDown=114]="AudioVolumeDown",e[e.BrowserSearch=115]="BrowserSearch",e[e.BrowserHome=116]="BrowserHome",e[e.BrowserBack=117]="BrowserBack",e[e.BrowserForward=118]="BrowserForward",e[e.MediaTrackNext=119]="MediaTrackNext",e[e.MediaTrackPrevious=120]="MediaTrackPrevious",e[e.MediaStop=121]="MediaStop",e[e.MediaPlayPause=122]="MediaPlayPause",e[e.LaunchMediaPlayer=123]="LaunchMediaPlayer",e[e.LaunchMail=124]="LaunchMail",e[e.LaunchApp2=125]="LaunchApp2",e[e.Clear=126]="Clear",e[e.MAX_VALUE=127]="MAX_VALUE"}(Ah||(Ah={})),function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(Oh||(Oh={})),function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"}(Mh||(Mh={})),function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"}(Rh||(Rh={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXTAREA=1]="TEXTAREA",e[e.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",e[e.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",e[e.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",e[e.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",e[e.CONTENT_TEXT=6]="CONTENT_TEXT",e[e.CONTENT_EMPTY=7]="CONTENT_EMPTY",e[e.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",e[e.CONTENT_WIDGET=9]="CONTENT_WIDGET",e[e.OVERVIEW_RULER=10]="OVERVIEW_RULER",e[e.SCROLLBAR=11]="SCROLLBAR",e[e.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",e[e.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"}(Ph||(Ph={})),function(e){e[e.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",e[e.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",e[e.TOP_CENTER=2]="TOP_CENTER"}(Fh||(Fh={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(Bh||(Bh={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.None=2]="None"}(Wh||(Wh={})),function(e){e[e.Off=0]="Off",e[e.On=1]="On",e[e.Relative=2]="Relative",e[e.Interval=3]="Interval",e[e.Custom=4]="Custom"}(Vh||(Vh={})),function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"}(zh||(zh={})),function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"}(jh||(jh={})),function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"}(Hh||(Hh={})),function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"}(Uh||(Uh={})),function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}($h||($h={})),function(e){e[e.File=0]="File",e[e.Module=1]="Module",e[e.Namespace=2]="Namespace",e[e.Package=3]="Package",e[e.Class=4]="Class",e[e.Method=5]="Method",e[e.Property=6]="Property",e[e.Field=7]="Field",e[e.Constructor=8]="Constructor",e[e.Enum=9]="Enum",e[e.Interface=10]="Interface",e[e.Function=11]="Function",e[e.Variable=12]="Variable",e[e.Constant=13]="Constant",e[e.String=14]="String",e[e.Number=15]="Number",e[e.Boolean=16]="Boolean",e[e.Array=17]="Array",e[e.Object=18]="Object",e[e.Key=19]="Key",e[e.Null=20]="Null",e[e.EnumMember=21]="EnumMember",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"}(Kh||(Kh={})),function(e){e[e.Deprecated=1]="Deprecated"}(qh||(qh={})),function(e){e[e.Hidden=0]="Hidden",e[e.Blink=1]="Blink",e[e.Smooth=2]="Smooth",e[e.Phase=3]="Phase",e[e.Expand=4]="Expand",e[e.Solid=5]="Solid"}(Gh||(Gh={})),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"}(Yh||(Yh={})),function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"}(Zh||(Zh={})),function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"}(Xh||(Xh={}));class Jh{static chord(e,t){return function(e,t){return(e|(65535&t)<<16>>>0)>>>0}(e,t)}}function Qh(){return{editor:void 0,languages:void 0,CancellationTokenSource:Gc,Emitter:Vc,KeyCode:Ah,KeyMod:Jh,Position:Yd,Range:Zd,Selection:Xd,SelectionDirection:Uh,MarkerSeverity:Oh,MarkerTag:Mh,Uri:Bd,Token:dh}}Jh.CtrlCmd=2048,Jh.Shift=1024,Jh.Alt=512,Jh.WinCtrl=256;var eu,tu=i(3379),iu=i.n(tu),nu=i(7795),ou=i.n(nu),ru=i(569),su=i.n(ru),au=i(3565),lu=i.n(au),cu=i(9216),du=i.n(cu),hu=i(4589),uu=i.n(hu),gu=i(643),pu={};pu.styleTagTransform=uu(),pu.setAttributes=lu(),pu.insert=su().bind(null,"head"),pu.domAPI=ou(),pu.insertStyleElement=du(),iu()(gu.Z,pu),gu.Z&&gu.Z.locals&&gu.Z.locals;class mu{constructor(e){this.executor=e,this._didRun=!1}getValue(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}const fu=/{(\d+)}/g;function _u(e,...t){return 0===t.length?e:e.replace(fu,(function(e,i){const n=parseInt(i,10);return isNaN(n)||n<0||n>=t.length?e:t[n]}))}function vu(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function bu(e,t){if(!e||!t)return e;const i=t.length;if(0===i||0===e.length)return e;let n=0;for(;e.indexOf(t,n)===n;)n+=i;return e.substring(n)}function wu(e,t,i={}){if(!e)throw new Error("Cannot create regex from empty string");t||(e=vu(e)),i.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));let n="";return i.global&&(n+="g"),i.matchCase||(n+="i"),i.multiline&&(n+="m"),i.unicode&&(n+="u"),new RegExp(e,n)}function yu(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")}function Cu(e){return e.split(/\r\n|\r|\n/)}function Su(e){for(let t=0,i=e.length;t<i;t++){const i=e.charCodeAt(t);if(32!==i&&9!==i)return t}return-1}function ku(e,t=0,i=e.length){for(let n=t;n<i;n++){const i=e.charCodeAt(n);if(32!==i&&9!==i)return e.substring(t,n)}return e.substring(t,i)}function xu(e,t=e.length-1){for(let i=t;i>=0;i--){const t=e.charCodeAt(i);if(32!==t&&9!==t)return i}return-1}function Lu(e,t){return e<t?-1:e>t?1:0}function Eu(e,t,i=0,n=e.length,o=0,r=t.length){for(;i<n&&o<r;i++,o++){let n=e.charCodeAt(i),r=t.charCodeAt(o);if(n<r)return-1;if(n>r)return 1}const s=n-i,a=r-o;return s<a?-1:s>a?1:0}function Nu(e,t){return Iu(e,t,0,e.length,0,t.length)}function Iu(e,t,i=0,n=e.length,o=0,r=t.length){for(;i<n&&o<r;i++,o++){let s=e.charCodeAt(i),a=t.charCodeAt(o);if(s===a)continue;if(s>=128||a>=128)return Eu(e.toLowerCase(),t.toLowerCase(),i,n,o,r);Tu(s)&&(s-=32),Tu(a)&&(a-=32);const l=s-a;if(0!==l)return l}const s=n-i,a=r-o;return s<a?-1:s>a?1:0}function Tu(e){return e>=97&&e<=122}function Du(e){return e>=65&&e<=90}function Au(e,t){return e.length===t.length&&0===Iu(e,t)}function Ou(e,t){const i=t.length;return!(t.length>e.length)&&0===Iu(e,t,0,i)}function Mu(e,t){let i,n=Math.min(e.length,t.length);for(i=0;i<n;i++)if(e.charCodeAt(i)!==t.charCodeAt(i))return i;return n}function Ru(e,t){let i,n=Math.min(e.length,t.length);const o=e.length-1,r=t.length-1;for(i=0;i<n;i++)if(e.charCodeAt(o-i)!==t.charCodeAt(r-i))return i;return n}function Pu(e){return 55296<=e&&e<=56319}function Fu(e){return 56320<=e&&e<=57343}function Bu(e,t){return t-56320+(e-55296<<10)+65536}function Wu(e,t,i){const n=e.charCodeAt(i);if(Pu(n)&&i+1<t){const t=e.charCodeAt(i+1);if(Fu(t))return Bu(n,t)}return n}class Vu{constructor(e,t=0){this._str=e,this._len=e.length,this._offset=t}get offset(){return this._offset}setOffset(e){this._offset=e}prevCodePoint(){const e=function(e,t){const i=e.charCodeAt(t-1);if(Fu(i)&&t>1){const n=e.charCodeAt(t-2);if(Pu(n))return Bu(n,i)}return i}(this._str,this._offset);return this._offset-=e>=65536?2:1,e}nextCodePoint(){const e=Wu(this._str,this._len,this._offset);return this._offset+=e>=65536?2:1,e}eol(){return this._offset>=this._len}}class zu{constructor(e,t=0){this._iterator=new Vu(e,t)}get offset(){return this._iterator.offset}nextGraphemeLength(){const e=ig.getInstance(),t=this._iterator,i=t.offset;let n=e.getGraphemeBreakType(t.nextCodePoint());for(;!t.eol();){const i=t.offset,o=e.getGraphemeBreakType(t.nextCodePoint());if(tg(n,o)){t.setOffset(i);break}n=o}return t.offset-i}prevGraphemeLength(){const e=ig.getInstance(),t=this._iterator,i=t.offset;let n=e.getGraphemeBreakType(t.prevCodePoint());for(;t.offset>0;){const i=t.offset,o=e.getGraphemeBreakType(t.prevCodePoint());if(tg(o,n)){t.setOffset(i);break}n=o}return i-t.offset}eol(){return this._iterator.eol()}}function ju(e,t){return new zu(e,t).nextGraphemeLength()}function Hu(e,t){return new zu(e,t).prevGraphemeLength()}const Uu=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function $u(e){return Uu.test(e)}const Ku=/^[\t\n\r\x20-\x7E]*$/;function qu(e){return Ku.test(e)}const Gu=/[\u2028\u2029]/;function Yu(e){return Gu.test(e)}function Zu(e){return e>=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function Xu(e){return e>=127462&&e<=127487||8986===e||8987===e||9200===e||9203===e||e>=9728&&e<=10175||11088===e||11093===e||e>=127744&&e<=128591||e>=128640&&e<=128764||e>=128992&&e<=129008||e>=129280&&e<=129535||e>=129648&&e<=129782}const Ju=String.fromCharCode(65279);function Qu(e){return!!(e&&e.length>0&&65279===e.charCodeAt(0))}function eg(e){return(e%=52)<26?String.fromCharCode(97+e):String.fromCharCode(65+e-26)}function tg(e,t){return 0===e?5!==t&&7!==t:!(2===e&&3===t||4!==e&&2!==e&&3!==e&&4!==t&&2!==t&&3!==t&&(8===e&&(8===t||9===t||11===t||12===t)||!(11!==e&&9!==e||9!==t&&10!==t)||(12===e||10===e)&&10===t||5===t||13===t||7===t||1===e||13===e&&14===t||6===e&&6===t))}class ig{constructor(){this._data=JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}static getInstance(){return ig._INSTANCE||(ig._INSTANCE=new ig),ig._INSTANCE}getGraphemeBreakType(e){if(e<32)return 10===e?3:13===e?2:4;if(e<127)return 0;const t=this._data,i=t.length/3;let n=1;for(;n<=i;)if(e<t[3*n])n*=2;else{if(!(e>t[3*n+1]))return t[3*n+2];n=2*n+1}return 0}}function ng(e){return 127995<=e&&e<=127999}ig._INSTANCE=null;class og{constructor(e){this.confusableDictionary=e}static getInstance(e){return og.cache.get(Array.from(e))}static getLocales(){return og._locales.getValue()}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}eu=og,og.ambiguousCharacterData=new mu((()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}'))),og.cache=new class{constructor(e){this.computeFn=e,this.lastCache=void 0,this.lastArgKey=void 0}get(e){const t=JSON.stringify(e);return this.lastArgKey!==t&&(this.lastArgKey=t,this.lastCache=this.computeFn(e)),this.lastCache}}((e=>{function t(e){const t=new Map;for(let i=0;i<e.length;i+=2)t.set(e[i],e[i+1]);return t}function i(e,t){if(!e)return t;const i=new Map;for(const[n,o]of e)t.has(n)&&i.set(n,o);return i}const n=eu.ambiguousCharacterData.getValue();let o,r=e.filter((e=>!e.startsWith("_")&&e in n));0===r.length&&(r=["_default"]);for(const e of r)o=i(o,t(n[e]));const s=function(e,t){const i=new Map(e);for(const[e,n]of t)i.set(e,n);return i}(t(n._common),o);return new og(s)})),og._locales=new mu((()=>Object.keys(og.ambiguousCharacterData.getValue()).filter((e=>!e.startsWith("_")))));class rg{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static getData(){return this._data||(this._data=new Set(rg.getRawData())),this._data}static isInvisibleCharacter(e){return rg.getData().has(e)}static get codePoints(){return rg.getData()}}rg._data=void 0;class sg{constructor(){this._zoomFactor=1}getZoomFactor(){return this._zoomFactor}}sg.INSTANCE=new sg;class ag extends Nc{constructor(){super(),this._onDidChange=this._register(new Vc),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 lg extends Nc{constructor(){super(),this._onDidChange=this._register(new Vc),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio();const e=this._register(new ag);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 cg=new class{constructor(){this._pixelRatioMonitor=null}_getOrCreatePixelRatioMonitor(){return this._pixelRatioMonitor||(this._pixelRatioMonitor=new lg),this._pixelRatioMonitor}get value(){return this._getOrCreatePixelRatioMonitor().value}get onDidChange(){return this._getOrCreatePixelRatioMonitor().onDidChange}};function dg(){return sg.INSTANCE.getZoomFactor()}const hg=navigator.userAgent,ug=hg.indexOf("Firefox")>=0,gg=hg.indexOf("AppleWebKit")>=0,pg=hg.indexOf("Chrome")>=0,mg=!pg&&hg.indexOf("Safari")>=0,fg=!pg&&!mg&&gg,_g=hg.indexOf("Electron/")>=0,vg=hg.indexOf("Android")>=0,bg=window.matchMedia&&window.matchMedia("(display-mode: standalone)").matches;class wg{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 yg(e){return new wg(e)}function Cg(e,t){e instanceof wg?(e.setFontFamily(t.getMassagedFontFamily(mg?lc.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(mg?lc.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 Sg{constructor(e,t){this.chr=e,this.type=t,this.width=0}fulfill(e){this.width=e}}class kg{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");Cg(t,this._bareFontInfo),e.appendChild(t);const i=document.createElement("div");Cg(i,this._bareFontInfo),i.style.fontWeight="bold",e.appendChild(i);const n=document.createElement("div");Cg(n,this._bareFontInfo),n.style.fontStyle="italic",e.appendChild(n);const o=[];for(const e of this._requests){let r;0===e.type&&(r=t),2===e.type&&(r=i),1===e.type&&(r=n),r.appendChild(document.createElement("br"));const s=document.createElement("span");kg._render(s,e),r.appendChild(s),o.push(s)}this._container=e,this._testElements=o}static _render(e,t){if(" "===t.chr){let t=" ";for(let e=0;e<8;e++)t+=t;e.innerText=t}else{let i=t.chr;for(let e=0;e<8;e++)i+=i;e.textContent=i}}_readFromDomElements(){for(let e=0,t=this._requests.length;e<t;e++){const t=this._requests[e],i=this._testElements[e];t.fulfill(i.offsetWidth/256)}}}const xg=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new Vc,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(e){e=Math.min(Math.max(-5,e),20),this._zoomLevel!==e&&(this._zoomLevel=e,this._onDidChangeZoomLevel.fire(this._zoomLevel))}},Lg=Pa?1.5:1.35;class Eg{constructor(e){this._bareFontInfoBrand=void 0,this.pixelRatio=e.pixelRatio,this.fontFamily=String(e.fontFamily),this.fontWeight=String(e.fontWeight),this.fontSize=e.fontSize,this.fontFeatureSettings=e.fontFeatureSettings,this.lineHeight=0|e.lineHeight,this.letterSpacing=e.letterSpacing}static createFromValidatedSettings(e,t,i){const n=e.get(43),o=e.get(47),r=e.get(46),s=e.get(45),a=e.get(59),l=e.get(56);return Eg._create(n,o,r,s,a,l,t,i)}static _create(e,t,i,n,o,r,s,a){0===o?o=Lg*i:o<8&&(o*=i),(o=Math.round(o))<8&&(o=8);const l=1+(a?0:.1*xg.getZoomLevel());return new Eg({pixelRatio:s,fontFamily:e,fontWeight:t,fontSize:i*=l,fontFeatureSettings:n,lineHeight:o*=l,letterSpacing:r})}getId(){return`${this.pixelRatio}-${this.fontFamily}-${this.fontWeight}-${this.fontSize}-${this.fontFeatureSettings}-${this.lineHeight}-${this.letterSpacing}`}getMassagedFontFamily(e){const t=Eg._wrapInQuotes(this.fontFamily);return e&&this.fontFamily!==e?`${t}, ${e}`:t}static _wrapInQuotes(e){return/[,"']/.test(e)?e:/[+ ]/.test(e)?`"${e}"`:e}}class Ng extends Eg{constructor(e,t){super(e),this._editorStylingBrand=void 0,this.version=1,this.isTrusted=t,this.isMonospace=e.isMonospace,this.typicalHalfwidthCharacterWidth=e.typicalHalfwidthCharacterWidth,this.typicalFullwidthCharacterWidth=e.typicalFullwidthCharacterWidth,this.canUseHalfwidthRightwardsArrow=e.canUseHalfwidthRightwardsArrow,this.spaceWidth=e.spaceWidth,this.middotWidth=e.middotWidth,this.wsmiddotWidth=e.wsmiddotWidth,this.maxDigitWidth=e.maxDigitWidth}equals(e){return this.fontFamily===e.fontFamily&&this.fontWeight===e.fontWeight&&this.fontSize===e.fontSize&&this.fontFeatureSettings===e.fontFeatureSettings&&this.lineHeight===e.lineHeight&&this.letterSpacing===e.letterSpacing&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===e.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.maxDigitWidth===e.maxDigitWidth}}class Ig{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(e){const t=e.getId();return!!this._values[t]}get(e){const t=e.getId();return this._values[t]}put(e,t){const i=e.getId();this._keys[i]=e,this._values[i]=t}remove(e){const t=e.getId();delete this._keys[t],delete this._values[t]}getValues(){return Object.keys(this._keys).map((e=>this._values[e]))}}const Tg=new class extends Nc{constructor(){super(),this._onDidChange=this._register(new Vc),this.onDidChange=this._onDidChange.event,this._cache=new Ig,this._evictUntrustedReadingsTimeout=-1}dispose(){-1!==this._evictUntrustedReadingsTimeout&&(window.clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearAllFontInfos(){this._cache=new Ig,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 Ng({pixelRatio:cg.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 Sg(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),r=this._createRequest(" ",0,t,i),s=this._createRequest("0",0,t,i),a=this._createRequest("1",0,t,i),l=this._createRequest("2",0,t,i),c=this._createRequest("3",0,t,i),d=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 e=0,n=w.length;e<n;e++)this._createRequest(w.charAt(e),0,t,i),this._createRequest(w.charAt(e),1,t,i),this._createRequest(w.charAt(e),2,t,i);!function(e,t){new kg(e,t).read()}(e,t);const y=Math.max(s.width,a.width,l.width,c.width,d.width,h.width,u.width,g.width,p.width,m.width);let C=e.fontFeatureSettings===tc.OFF;const S=i[0].width;for(let e=1,t=i.length;C&&e<t;e++){const t=S-i[e].width;if(t<-.001||t>.001){C=!1;break}}let k=!0;return C&&_.width!==S&&(k=!1),_.width>f.width&&(k=!1),new Ng({pixelRatio:cg.value,fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,fontFeatureSettings:e.fontFeatureSettings,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:C,typicalHalfwidthCharacterWidth:n.width,typicalFullwidthCharacterWidth:o.width,canUseHalfwidthRightwardsArrow:k,spaceWidth:r.width,middotWidth:v.width,wsmiddotWidth:b.width,maxDigitWidth:y},!0)}};var Dg;!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]||[]}}(Dg||(Dg={}));const Ag=Mg("instantiationService");function Og(e,t,i){t[Dg.DI_TARGET]===t?t[Dg.DI_DEPENDENCIES].push({id:e,index:i}):(t[Dg.DI_DEPENDENCIES]=[{id:e,index:i}],t[Dg.DI_TARGET]=t)}function Mg(e){if(Dg.serviceIds.has(e))return Dg.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");Og(t,e,n)};return t.toString=()=>e,Dg.serviceIds.set(e,t),t}const Rg=Mg("codeEditorService");function Pg(e,t){if(!e)throw new Error(t?`Assertion failed (${t})`:"Assertion Failed")}const Fg={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0};class Bg extends Nc{constructor(e,t={}){super(),this._onDidUpdate=this._register(new Vc),this._editor=e,this._options=Ml(t,Fg,!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 Zd(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)})})):0===e.modifiedEndLineNumber?this.ranges.push({rhs:!0,range:new Zd(e.modifiedStartLineNumber,1,e.modifiedStartLineNumber+1,1)}):this.ranges.push({rhs:!0,range:new Zd(e.modifiedStartLineNumber,1,e.modifiedEndLineNumber+1,1)})})),this.ranges.sort(((e,t)=>Zd.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<o&&!t;n++){const o=this.ranges[n].range;i.isBeforeOrEqual(o.getStartPosition())&&(this.nextIdx=n+(e?0:-1),t=!0)}t||(this.nextIdx=e?0:this.ranges.length-1),this.nextIdx<0&&(this.nextIdx=this.ranges.length-1)}else this.nextIdx=0}_move(e,t){if(Pg(!this.disposed,"Illegal State - diff navigator has been disposed"),!this.canNavigate())return;-1===this.nextIdx?this._initIdx(e):e?(this.nextIdx+=1,this.nextIdx>=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 Wg={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"};var Vg,zg,jg,Hg;!function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(Vg||(Vg={})),function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"}(zg||(zg={})),function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"}(jg||(jg={}));class Ug{constructor(e){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,0|e.tabSize),this.indentSize=0|e.tabSize,this.insertSpaces=Boolean(e.insertSpaces),this.defaultEOL=0|e.defaultEOL,this.trimAutoWhitespace=Boolean(e.trimAutoWhitespace),this.bracketPairColorizationOptions=e.bracketPairColorizationOptions}equals(e){return this.tabSize===e.tabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace&&Rl(this.bracketPairColorizationOptions,e.bracketPairColorizationOptions)}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}}class $g{constructor(e,t){this._findMatchBrand=void 0,this.range=e,this.matches=t}}class Kg{constructor(e,t,i,n,o,r){this.identifier=e,this.range=t,this.text=i,this.forceMoveMarkers=n,this.isAutoWhitespaceEdit=o,this._isTracked=r}}class qg{constructor(e,t,i){this.regex=e,this.wordSeparators=t,this.simpleSearch=i}}class Gg{constructor(e,t,i){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=i}}function Yg(e){return!e.isTooLargeForSyncing()&&!e.isForSimpleWidget}!function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(Hg||(Hg={}));class Zg{constructor(e){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=e.open,this.close=e.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(e.notIn))for(let t=0,i=e.notIn.length;t<i;t++)switch(e.notIn[t]){case"string":this._inString=!1;break;case"comment":this._inComment=!1;break;case"regex":this._inRegEx=!1}}isOK(e){switch(e){case 0:return!0;case 1:return this._inComment;case 2:return this._inString;case 3:return this._inRegEx}}shouldAutoClose(e,t){if(0===e.getTokenCount())return!0;const i=e.findTokenIndexAtOffset(t-2),n=e.getStandardTokenType(i);return this.isOK(n)}_findNeutralCharacterInRange(e,t){for(let i=e;i<=t;i++){const e=String.fromCharCode(i);if(!this.open.includes(e)&&!this.close.includes(e))return e}return null}findNeutralCharacter(){return this._neutralCharacterSearched||(this._neutralCharacterSearched=!0,this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(48,57)),this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(97,122)),this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(65,90))),this._neutralCharacter}}class Xg{constructor(e){this.autoClosingPairsOpenByStart=new Map,this.autoClosingPairsOpenByEnd=new Map,this.autoClosingPairsCloseByStart=new Map,this.autoClosingPairsCloseByEnd=new Map,this.autoClosingPairsCloseSingleChar=new Map;for(const t of e)Jg(this.autoClosingPairsOpenByStart,t.open.charAt(0),t),Jg(this.autoClosingPairsOpenByEnd,t.open.charAt(t.open.length-1),t),Jg(this.autoClosingPairsCloseByStart,t.close.charAt(0),t),Jg(this.autoClosingPairsCloseByEnd,t.close.charAt(t.close.length-1),t),1===t.close.length&&1===t.open.length&&Jg(this.autoClosingPairsCloseSingleChar,t.close,t)}}function Jg(e,t,i){e.has(t)?e.get(t).push(i):e.set(t,[i])}function Qg(e,t){const i=e.getCount(),n=e.findTokenIndexAtOffset(t),o=e.getLanguageId(n);let r=n;for(;r+1<i&&e.getLanguageId(r+1)===o;)r++;let s=n;for(;s>0&&e.getLanguageId(s-1)===o;)s--;return new ep(e,o,s,r+1,e.getStartOffset(s),e.getEndOffset(r))}class ep{constructor(e,t,i,n,o,r){this._scopedLineTokensBrand=void 0,this._actual=e,this.languageId=t,this._firstTokenIndex=i,this._lastTokenIndex=n,this.firstCharOffset=o,this._lastCharOffset=r}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 tp(e){return 0!=(3&e)}class ip{constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map((e=>new Zg(e))):e.brackets?this._autoClosingPairs=e.brackets.map((e=>new Zg({open:e[0],close:e[1]}))):this._autoClosingPairs=[],e.colorizedBracketPairs?this._colorizedBracketPairs=np(e.colorizedBracketPairs.map((e=>[e[0],e[1]]))):e.brackets?this._colorizedBracketPairs=np(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 Zg({open:t.open,close:t.close||""}))}this._autoCloseBefore="string"==typeof e.autoCloseBefore?e.autoCloseBefore:ip.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 np(e){return e.filter((([e,t])=>""!==e&&""!==t))}ip.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED=";:.,=}])> \n\t";const op="undefined"!=typeof Buffer;let rp,sp,ap,lp;class cp{constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}static wrap(e){return op&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new cp(e)}toString(){return op?this.buffer.toString():(rp||(rp=new TextDecoder),rp.decode(this.buffer))}}function dp(e,t){return e[t+0]<<0>>>0|e[t+1]<<8>>>0}function hp(e,t,i){e[i+0]=255&t,t>>>=8,e[i+1]=255&t}function up(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 gp(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 pp(e,t){return e[t]}function mp(e,t,i){e[i]=t}function fp(){return sp||(sp=new TextDecoder("UTF-16LE")),sp}function _p(){return lp||(lp=qa()?fp():(ap||(ap=new TextDecoder("UTF-16BE")),ap)),lp}const vp="undefined"!=typeof TextDecoder;let bp,wp;function yp(e,t,i){const n=[];let o=0;for(let r=0;r<i;r++){const i=dp(e,t);t+=2,n[o++]=String.fromCharCode(i)}return n.join("")}vp?(bp=e=>new Cp(e),wp=function(e,t,i){const n=new Uint16Array(e.buffer,t,i);return i>0&&(65279===n[0]||65534===n[0])?yp(e,t,i):fp().decode(n)}):(bp=e=>new Sp,wp=yp);class Cp{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 _p().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||Pu(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<t;i++)this._buffer[this._bufferLength++]=e.charCodeAt(i)}}class Sp{constructor(){this._pieces=[],this._piecesLen=0}reset(){this._pieces=[],this._piecesLen=0}build(){return this._pieces.join("")}write1(e){this._pieces[this._piecesLen++]=String.fromCharCode(e)}appendASCII(e){this._pieces[this._piecesLen++]=String.fromCharCode(e)}appendASCIIString(e){this._pieces[this._piecesLen++]=e}}class kp{constructor(e,t,i,n,o,r){this._richEditBracketBrand=void 0,this.languageId=e,this.index=t,this.open=i,this.close=n,this.forwardRegex=o,this.reversedRegex=r,this._openSet=kp._toSet(this.open),this._closeSet=kp._toSet(this.close)}isOpen(e){return this._openSet.has(e)}isClose(e){return this._closeSet.has(e)}static _toSet(e){const t=new Set;for(const i of e)t.add(i);return t}}class xp{constructor(e,t){this._richEditBracketsBrand=void 0;const i=function(e){const t=e.length;e=e.map((e=>[e[0].toLowerCase(),e[1].toLowerCase()]));const i=[];for(let e=0;e<t;e++)i[e]=e;const n=(e,t)=>{const[i,n]=e,[o,r]=t;return i===o||i===r||n===o||n===r},o=(e,n)=>{const o=Math.min(e,n),r=Math.max(e,n);for(let e=0;e<t;e++)i[e]===r&&(i[e]=o)};for(let r=0;r<t;r++){const s=e[r];for(let a=r+1;a<t;a++)n(s,e[a])&&o(i[r],i[a])}const r=[];for(let n=0;n<t;n++){const o=[],s=[];for(let r=0;r<t;r++)if(i[r]===n){const[t,i]=e[r];o.push(t),s.push(i)}o.length>0&&r.push({open:o,close:s})}return r}(t);this.brackets=i.map(((t,n)=>new kp(e,n,t.open,t.close,function(e,t,i,n){let o=[];o=o.concat(e),o=o.concat(t);for(let e=0,t=o.length;e<t;e++)Lp(o[e],i,n,o);return o=Np(o),o.sort(Ep),o.reverse(),Tp(o)}(t.open,t.close,i,n),function(e,t,i,n){let o=[];o=o.concat(e),o=o.concat(t);for(let e=0,t=o.length;e<t;e++)Lp(o[e],i,n,o);return o=Np(o),o.sort(Ep),o.reverse(),Tp(o.map(Dp))}(t.open,t.close,i,n)))),this.forwardRegex=function(e){let t=[];for(const i of e){for(const e of i.open)t.push(e);for(const e of i.close)t.push(e)}return t=Np(t),Tp(t)}(this.brackets),this.reversedRegex=function(e){let t=[];for(const i of e){for(const e of i.open)t.push(e);for(const e of i.close)t.push(e)}return t=Np(t),Tp(t.map(Dp))}(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const e of this.brackets){for(const t of e.open)this.textIsBracket[t]=e,this.textIsOpenBracket[t]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,t.length);for(const t of e.close)this.textIsBracket[t]=e,this.textIsOpenBracket[t]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,t.length)}}}function Lp(e,t,i,n){for(let o=0,r=t.length;o<r;o++){if(o===i)continue;const r=t[o];for(const t of r.open)t.indexOf(e)>=0&&n.push(t);for(const t of r.close)t.indexOf(e)>=0&&n.push(t)}}function Ep(e,t){return e.length-t.length}function Np(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 Ip(e){const t=/^[\w ]+$/.test(e);return e=vu(e),t?`\\b${e}\\b`:e}function Tp(e){return wu(`(${e.map(Ip).join(")|(")})`,!0)}const Dp=function(){let e=null,t=null;return function(i){return e!==i&&(e=i,t=function(e){if(vp){const t=new Uint16Array(e.length);let i=0;for(let n=e.length-1;n>=0;n--)t[i++]=e.charCodeAt(n);return _p().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 Ap{static _findPrevBracketInText(e,t,i,n){const o=i.match(e);if(!o)return null;const r=i.length-(o.index||0),s=o[0].length,a=n+r;return new Zd(t,a-s+1,t,a+1)}static findPrevBracketInRange(e,t,i,n,o){const r=Dp(i).substring(i.length-o,i.length-n);return this._findPrevBracketInText(e,t,r,n)}static findNextBracketInText(e,t,i,n){const o=i.match(e);if(!o)return null;const r=o.index||0,s=o[0].length;if(0===s)return null;const a=n+r;return new Zd(t,a+1,t,a+1+s)}static findNextBracketInRange(e,t,i,n,o){const r=i.substring(n,o);return this.findNextBracketInText(e,t,r,n)}}class Op{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 ll(e)}onElectricCharacter(e,t,i){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;const n=t.findTokenIndexAtOffset(i-1);if(tp(t.getStandardTokenType(n)))return null;const o=this._richEditBrackets.reversedRegex,r=t.getLineContent().substring(0,i-1)+e,s=Ap.findPrevBracketInRange(o,1,r,0,r.length);if(!s)return null;const a=r.substring(s.startColumn-1,s.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[a])return null;const l=t.getActualLineContentBefore(s.startColumn-1);return/^\s*$/.test(l)?{matchOpenBracket:a}:null}}function Mp(e){return e.global&&(e.lastIndex=0),!0}class Rp{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&Mp(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&Mp(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&Mp(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&Mp(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 Pp{constructor(e){(e=e||{}).brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach((e=>{const t=Pp._createOpenBracketRegExp(e[0]),i=Pp._createCloseBracketRegExp(e[1]);t&&i&&this._brackets.push({open:e[0],openRegExp:t,close:e[1],closeRegExp:i})})),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,i,n){if(e>=3)for(let e=0,o=this._regExpRules.length;e<o;e++){const o=this._regExpRules[e];if([{reg:o.beforeText,text:i},{reg:o.afterText,text:n},{reg:o.previousLineText,text:t}].every((e=>!e.reg||(e.reg.lastIndex=0,e.reg.test(e.text)))))return o.action}if(e>=2&&i.length>0&&n.length>0)for(let e=0,t=this._brackets.length;e<t;e++){const t=this._brackets[e];if(t.openRegExp.test(i)&&t.closeRegExp.test(n))return{indentAction:Hg.IndentOutdent}}if(e>=2&&i.length>0)for(let e=0,t=this._brackets.length;e<t;e++)if(this._brackets[e].openRegExp.test(i))return{indentAction:Hg.Indent};return null}static _createOpenBracketRegExp(e){let t=vu(e);return/\B/.test(t.charAt(0))||(t="\\b"+t),t+="\\s*$",Pp._safeRegExp(t)}static _createCloseBracketRegExp(e){let t=vu(e);return/\B/.test(t.charAt(t.length-1))||(t+="\\b"),t="^\\s*"+t,Pp._safeRegExp(t)}static _safeRegExp(e){try{return new RegExp(e)}catch(e){return gc(e),null}}}const Fp=Mg("configurationService");function Bp(e,t){const i=Object.create(null);for(let n in e)Wp(i,n,e[n],t);return i}function Wp(e,t,i,n){const o=t.split("."),r=o.pop();let s=e;for(let e=0;e<o.length;e++){let i=o[e],r=s[i];switch(typeof r){case"undefined":r=s[i]=Object.create(null);break;case"object":break;default:return void n(`Ignoring ${t} as ${o.slice(0,e+1).join(".")} is ${JSON.stringify(r)}`)}s=r}if("object"==typeof s&&null!==s)try{s[r]=i}catch(e){n(`Ignoring ${t} as ${o.join(".")} is ${JSON.stringify(s)}`)}else n(`Ignoring ${t} as ${o.join(".")} is ${JSON.stringify(s)}`)}function Vp(e,t){zp(e,t.split("."))}function zp(e,t){const i=t.shift();if(0!==t.length){if(-1!==Object.keys(e).indexOf(i)){const n=e[i];"object"!=typeof n||Array.isArray(n)||(zp(n,t),0===Object.keys(n).length&&delete e[i])}}else delete e[i]}function jp(e,t,i){const n=function(e,t){let i=e;for(const e of t){if("object"!=typeof i||null===i)return;i=i[e]}return i}(e,t.split("."));return void 0===n?i:n}const Hp=Mg("languageService");class Up{constructor(e,t=[],i=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=i}}const $p=[];function Kp(e,t,i){t instanceof Up||(t=new Up(t,[],i)),$p.push([e,t])}function qp(){return $p}var Gp=function(e,t){return function(i,n){t(i,n,e)}};class Yp{constructor(e){this.languageId=e}affects(e){return!this.languageId||this.languageId===e}}const Zp=Mg("languageConfigurationService");let Xp=class extends Nc{constructor(e,t){super(),this.configurationService=e,this.languageService=t,this.onDidChangeEmitter=this._register(new Vc),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const i=new Set(Object.values(Jp));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 Yp(void 0));else for(const e of n)this.languageService.isRegisteredLanguageId(e)&&(this.configurations.delete(e),this.onDidChangeEmitter.fire(new Yp(e)))}))),this._register(tm.onDidChange((e=>{this.configurations.delete(e.languageId),this.onDidChangeEmitter.fire(new Yp(e.languageId))})))}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=function(e,t,i){let n=tm.getLanguageConfiguration(e);if(!n){if(!i.isRegisteredLanguageId(e))throw new Error(`Language id "${e}" is not configured nor known`);n=new rm(e,{})}const o=function(e,t){const i=t.getValue(Jp.brackets,{overrideIdentifier:e}),n=t.getValue(Jp.colorizedBracketPairs,{overrideIdentifier:e});return{brackets:Qp(i),colorizedBracketPairs:Qp(n)}}(n.languageId,t),r=nm([n.underlyingConfig,o]);return new rm(n.languageId,r)}(e,this.configurationService,this.languageService),this.configurations.set(e,t)),t}};Xp=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([Gp(0,Fp),Gp(1,Hp)],Xp);const Jp={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function Qp(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 em{constructor(e){this.languageId=e}}const tm=new class{constructor(){this._entries=new Map,this._onDidChange=new Vc,this.onDidChange=this._onDidChange.event}register(e,t,i=0){let n=this._entries.get(e);n||(n=new im(e),this._entries.set(e,n));const o=n.register(t,i);return this._onDidChange.fire(new em(e)),Lc((()=>{o.dispose(),this._onDidChange.fire(new em(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,r=-1;for(o=t-1;o>=1;o--){if(e.getLanguageIdAtPosition(o,0)!==n)return r;const t=e.getLineContent(o);if(!i.shouldIgnore(t)&&!/^\s+$/.test(t)&&""!==t)return o;r=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 r=this.getPrecedingValidLine(t,i,o);if(r<0)return null;if(r<1)return{indentation:"",action:null};const s=t.getLineContent(r);if(o.shouldIncrease(s)||o.shouldIndentNextLine(s))return{indentation:ku(s),action:Hg.Indent,line:r};if(o.shouldDecrease(s))return{indentation:ku(s),action:null,line:r};{if(1===r)return{indentation:ku(t.getLineContent(r)),action:null,line:r};const e=r-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:ku(t.getLineContent(i+1)),action:null,line:i+1}}if(n)return{indentation:ku(t.getLineContent(r)),action:null,line:r};for(let e=r;e>0;e--){const i=t.getLineContent(e);if(o.shouldIncrease(i))return{indentation:ku(i),action:Hg.Indent,line:e};if(o.shouldIndentNextLine(i)){let i=0;for(let n=e-1;n>0;n--)if(!o.shouldIndentNextLine(t.getLineContent(e))){i=n;break}return{indentation:ku(t.getLineContent(i+1)),action:null,line:i+1}}if(o.shouldDecrease(i))return{indentation:ku(i),action:null,line:e}}return{indentation:ku(t.getLineContent(1)),action:null,line:1}}}getGoodIndentForLine(e,t,i,n,o){if(e<4)return null;const r=this.getLanguageConfiguration(i);if(!r)return null;const s=this.getIndentRulesSupport(i);if(!s)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=r.onEnter(e,"",t.getLineContent(i),"");if(n){let e=ku(t.getLineContent(i));return n.removeText&&(e=e.substring(0,e.length-n.removeText)),n.indentAction===Hg.Indent||n.indentAction===Hg.IndentOutdent?e=o.shiftIndent(e):n.indentAction===Hg.Outdent&&(e=o.unshiftIndent(e)),s.shouldDecrease(l)&&(e=o.unshiftIndent(e)),n.appendText&&(e+=n.appendText),ku(e)}}return s.shouldDecrease(l)?a.action===Hg.Indent?a.indentation:o.unshiftIndent(a.indentation):a.action===Hg.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),r=Qg(o,i.startColumn-1),s=r.getLineContent();let a,l,c=!1;r.firstCharOffset>0&&o.getLanguageId(0)!==r.languageId?(c=!0,a=s.substr(0,i.startColumn-1-r.firstCharOffset)):a=o.getLineContent().substring(0,i.startColumn-1),l=i.isEmpty()?s.substr(i.startColumn-1-r.firstCharOffset):this.getScopedLineTokens(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-r.firstCharOffset);const d=this.getIndentRulesSupport(r.languageId);if(!d)return null;const h=a,u=ku(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=ku(o.getLineContent()),m=this.getInheritIndentForLine(e,g,i.startLineNumber+1);if(!m){const e=c?p:u;return{beforeEnter:e,afterEnter:e}}let f=c?p:m.indentation;return m.action===Hg.Indent&&(f=n.shiftIndent(f)),d.shouldDecrease(l)&&(f=n.unshiftIndent(f)),{beforeEnter:c?p:u,afterEnter:f}}getIndentActionForType(e,t,i,n,o){if(e<4)return null;const r=this.getScopedLineTokens(t,i.startLineNumber,i.startColumn);if(r.firstCharOffset)return null;const s=this.getIndentRulesSupport(r.languageId);if(!s)return null;const a=r.getLineContent(),l=a.substr(0,i.startColumn-1-r.firstCharOffset);let c;if(c=i.isEmpty()?a.substr(i.startColumn-1-r.firstCharOffset):this.getScopedLineTokens(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-r.firstCharOffset),!s.shouldDecrease(l+c)&&s.shouldDecrease(l+n+c)){const n=this.getInheritIndentForLine(e,t,i.startLineNumber,!1);if(!n)return null;let r=n.indentation;return n.action!==Hg.Indent&&(r=o.unshiftIndent(r)),r}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 r=n.getLineContent(),s=r.substr(0,i.startColumn-1-n.firstCharOffset);let a;a=i.isEmpty()?r.substr(i.startColumn-1-n.firstCharOffset):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 c=o.onEnter(e,l,s,a);if(!c)return null;const d=c.indentAction;let h=c.appendText;const u=c.removeText||0;h?d===Hg.Indent&&(h="\t"+h):h=d===Hg.Indent||d===Hg.IndentOutdent?"\t":"";let g=this.getIndentationAtPosition(t,i.startLineNumber,i.startColumn);return u&&(g=g.substring(0,g.length-u)),{indentAction:d,appendText:h,removeText:u,indentation:g}}getIndentationAtPosition(e,t,i){let n=ku(e.getLineContent(t));return n.length>i-1&&(n=n.substring(0,i-1)),n}getScopedLineTokens(e,t,i){return e.forceTokenization(t),Qg(e.getLineTokens(t),void 0===i?e.getLineMaxColumn(t)-1:i-1)}};class im{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){const i=new om(e,t,++this._order);return this._entries.push(i),this._resolved=null,Lc((()=>{for(let e=0;e<this._entries.length;e++)if(this._entries[e]===i){this._entries.splice(e,1),this._resolved=null;break}}))}getResolvedConfiguration(){if(!this._resolved){const e=this._resolve();e&&(this._resolved=new rm(this.languageId,e))}return this._resolved}_resolve(){return 0===this._entries.length?null:(this._entries.sort(om.cmp),nm(this._entries.map((e=>e.configuration))))}}function nm(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 om{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 rm{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 Pp(this.underlyingConfig):null,this.comments=rm._handleComments(this.underlyingConfig),this.characterPair=new ip(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||Qa,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new Rp(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{}}getWordDefinition(){return el(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new xp(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new Op(this.brackets)),this._electricCharacter}onEnter(e,t,i,n){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,i,n):null}getAutoClosingPairs(){return new Xg(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}}Kp(Zp,Xp);const sm=new class{clone(){return this}equals(e){return this===e}};const am=Mg("modelService");var lm=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))},cm=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 dm(e){const t=new Gc,i=e(t.token),n=new Promise(((e,n)=>{const o=t.token.onCancellationRequested((()=>{o.dispose(),t.dispose(),n(new vc)}));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)}}}class hm{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 um=Symbol("MicrotaskDelay");class gm{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===um?(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 vc),this.completionPromise=null)}cancelTimeout(){var e;null===(e=this.deferred)||void 0===e||e.dispose(),this.deferred=null}dispose(){this.cancel()}}class pm{constructor(e){this.delayer=new gm(e),this.throttler=new hm}trigger(e,t){return this.delayer.trigger((()=>this.throttler.queue(e)),t)}dispose(){this.delayer.dispose()}}function mm(e,t){return t?new Promise(((i,n)=>{const o=setTimeout((()=>{r.dispose(),i()}),e),r=t.onCancellationRequested((()=>{clearTimeout(o),r.dispose(),n(new vc)}))})):dm((t=>mm(e,t)))}function fm(e,t=0){const i=setTimeout(e,t);return Lc((()=>clearTimeout(i)))}class _m{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 vm{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 bm{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 wm;wm="function"!=typeof requestIdleCallback||"function"!=typeof cancelIdleCallback?e=>{Ha((()=>{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 ym{constructor(e){this._didRun=!1,this._executor=()=>{try{this._value=e()}catch(e){this._error=e}finally{this._didRun=!0}},this._handle=wm((()=>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 Cm{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 vc),this.rejected=!0,e()}))}}var Sm;!function(e){e.settled=function(e){return lm(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)=>lm(this,void 0,void 0,(function*(){try{yield e(t,i)}catch(e){i(e)}}))))}}(Sm||(Sm={}));class km{constructor(e){this._state=0,this._results=[],this._error=null,this._onStateChanged=new Vc,queueMicrotask((()=>lm(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(e){this.reject(e)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}}))))}static fromArray(e){return new km((t=>{t.emitMany(e)}))}static fromPromise(e){return new km((t=>lm(this,void 0,void 0,(function*(){t.emitMany(yield e)}))))}static fromPromises(e){return new km((t=>lm(this,void 0,void 0,(function*(){yield Promise.all(e.map((e=>lm(this,void 0,void 0,(function*(){return t.emitOne(yield e)})))))}))))}static merge(e){return new km((t=>lm(this,void 0,void 0,(function*(){yield Promise.all(e.map((e=>{var i,n;return lm(this,void 0,void 0,(function*(){var o,r;try{for(i=cm(e);!(n=yield i.next()).done;){const e=n.value;t.emitOne(e)}}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&(yield r.call(i))}finally{if(o)throw o.error}}}))})))}))))}[Symbol.asyncIterator](){let e=0;return{next:()=>lm(this,void 0,void 0,(function*(){for(;;){if(2===this._state)throw this._error;if(e<this._results.length)return{done:!1,value:this._results[e++]};if(1===this._state)return{done:!0,value:void 0};yield Pc.toPromise(this._onStateChanged.event)}}))}}static map(e,t){return new km((i=>lm(this,void 0,void 0,(function*(){var n,o;try{for(var r,s=cm(e);!(r=yield s.next()).done;){const e=r.value;i.emitOne(t(e))}}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=s.return)&&(yield o.call(s))}finally{if(n)throw n.error}}}))))}map(e){return km.map(this,e)}static filter(e,t){return new km((i=>lm(this,void 0,void 0,(function*(){var n,o;try{for(var r,s=cm(e);!(r=yield s.next()).done;){const e=r.value;t(e)&&i.emitOne(e)}}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=s.return)&&(yield o.call(s))}finally{if(n)throw n.error}}}))))}filter(e){return km.filter(this,e)}static coalesce(e){return km.filter(e,(e=>!!e))}coalesce(){return km.coalesce(this)}static toPromise(e){var t,i,n,o;return lm(this,void 0,void 0,(function*(){const r=[];try{for(t=cm(e);!(i=yield t.next()).done;){const e=i.value;r.push(e)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(o=t.return)&&(yield o.call(t))}finally{if(n)throw n.error}}return r}))}toPromise(){return km.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())}}km.EMPTY=km.fromArray([]);let xm=!1;function Lm(e){Wa&&(xm||(xm=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(e.message))}class Em{constructor(e,t,i,n){this.vsWorker=e,this.req=t,this.method=i,this.args=n,this.type=0}}class Nm{constructor(e,t,i,n){this.vsWorker=e,this.seq=t,this.res=i,this.err=n,this.type=1}}class Im{constructor(e,t,i,n){this.vsWorker=e,this.req=t,this.eventName=i,this.arg=n,this.type=2}}class Tm{constructor(e,t,i){this.vsWorker=e,this.req=t,this.event=i,this.type=3}}class Dm{constructor(e,t){this.vsWorker=e,this.req=t,this.type=4}}class Am{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}sendMessage(e,t){const i=String(++this._lastSentReq);return new Promise(((n,o)=>{this._pendingReplies[i]={resolve:n,reject:o},this._send(new Em(this._workerId,i,e,t))}))}listen(e,t){let i=null;const n=new Vc({onFirstListenerAdd:()=>{i=String(++this._lastSentReq),this._pendingEmitters.set(i,n),this._send(new Im(this._workerId,i,e,t))},onLastListenerRemove:()=>{this._pendingEmitters.delete(i),this._send(new Dm(this._workerId,i)),i=null}});return n.event}handleMessage(e){e&&e.vsWorker&&(-1!==this._workerId&&e.vsWorker!==this._workerId||this._handleMessage(e))}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq])return void console.warn("Got reply to unknown seq");let t=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let i=e.err;return e.err.$isError&&(i=new Error,i.name=e.err.name,i.message=e.err.message,i.stack=e.err.stack),void t.reject(i)}t.resolve(e.res)}_handleRequestMessage(e){let t=e.req;this._handler.handleMessage(e.method,e.args).then((e=>{this._send(new Nm(this._workerId,t,e,void 0))}),(e=>{e.detail instanceof Error&&(e.detail=mc(e.detail)),this._send(new Nm(this._workerId,t,void 0,mc(e)))}))}_handleSubscribeEventMessage(e){const t=e.req,i=this._handler.handleEvent(e.eventName,e.arg)((e=>{this._send(new Tm(this._workerId,t,e))}));this._pendingEvents.set(t,i)}_handleEventMessage(e){this._pendingEmitters.has(e.req)?this._pendingEmitters.get(e.req).fire(e.event):console.warn("Got event for unknown req")}_handleUnsubscribeEventMessage(e){this._pendingEvents.has(e.req)?(this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)):console.warn("Got unsubscribe for unknown req")}_send(e){let t=[];if(0===e.type)for(let i=0;i<e.args.length;i++)e.args[i]instanceof ArrayBuffer&&t.push(e.args[i]);else 1===e.type&&e.res instanceof ArrayBuffer&&t.push(e.res);this._handler.sendMessage(e,t)}}class Om extends Nc{constructor(e,t,i){super();let n=null;this._worker=this._register(e.create("vs/base/common/worker/simpleWorker",(e=>{this._protocol.handleMessage(e)}),(e=>{n&&n(e)}))),this._protocol=new Am({sendMessage:(e,t)=>{this._worker.postMessage(e,t)},handleMessage:(e,t)=>{if("function"!=typeof i[e])return Promise.reject(new Error("Missing method "+e+" on main thread host."));try{return Promise.resolve(i[e].apply(i,t))}catch(e){return Promise.reject(e)}},handleEvent:(e,t)=>{if(Rm(e)){const n=i[e].call(i,t);if("function"!=typeof n)throw new Error(`Missing dynamic event ${e} on main thread host.`);return n}if(Mm(e)){const t=i[e];if("function"!=typeof t)throw new Error(`Missing event ${e} on main thread host.`);return t}throw new Error(`Malformed event name ${e}`)}}),this._protocol.setWorkerId(this._worker.getId());let o=null;void 0!==Ta.require&&"function"==typeof Ta.require.getConfig?o=Ta.require.getConfig():void 0!==Ta.requirejs&&(o=Ta.requirejs.s.contexts._.config);const r=Il(i);this._onModuleLoaded=this._protocol.sendMessage("$initialize",[this._worker.getId(),JSON.parse(JSON.stringify(o)),t,r]);const s=(e,t)=>this._request(e,t),a=(e,t)=>this._protocol.listen(e,t);this._lazyProxy=new Promise(((e,i)=>{n=i,this._onModuleLoaded.then((t=>{e(function(e,t,i){const n=e=>function(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)},o=e=>function(t){return i(e,t)};let r={};for(const t of e)Rm(t)?r[t]=o(t):Mm(t)?r[t]=i(t,void 0):r[t]=n(t);return r}(t,s,a))}),(e=>{i(e),this._onError("Worker failed to load "+t,e)}))}))}getProxyObject(){return this._lazyProxy}_request(e,t){return new Promise(((i,n)=>{this._onModuleLoaded.then((()=>{this._protocol.sendMessage(e,t).then(i,n)}),n)}))}_onError(e,t){console.error(e),console.info(t)}}function Mm(e){return"o"===e[0]&&"n"===e[1]&&Du(e.charCodeAt(2))}function Rm(e){return/^onDynamic/.test(e)&&Du(e.charCodeAt(9))}var Pm;const Fm=null===(Pm=window.trustedTypes)||void 0===Pm?void 0:Pm.createPolicy("defaultWorkerFactory",{createScriptURL:e=>e});class Bm{constructor(e,t,i,n,o){this.id=t;const r=function(e){if(Ta.MonacoEnvironment){if("function"==typeof Ta.MonacoEnvironment.getWorker)return Ta.MonacoEnvironment.getWorker("workerMain.js",e);if("function"==typeof Ta.MonacoEnvironment.getWorkerUrl){const t=Ta.MonacoEnvironment.getWorkerUrl("workerMain.js",e);return new Worker(Fm?Fm.createScriptURL(t):t,{name:e})}}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}(i);"function"==typeof r.then?this.worker=r:this.worker=Promise.resolve(r),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 Wm{constructor(e){this._label=e,this._webWorkerFailedBeforeError=!1}create(e,t,i){let n=++Wm.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new Bm(e,n,this._label||"anonymous"+n,t,(e=>{Lm(e),this._webWorkerFailedBeforeError=e,i(e)}))}}Wm.LAST_WORKER_ID=0;class Vm{constructor(e,t,i,n){this.originalStart=e,this.originalLength=t,this.modifiedStart=i,this.modifiedLength=n}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}function zm(e,t){switch(typeof e){case"object":return null===e?jm(349,t):Array.isArray(e)?(i=e,n=jm(104579,n=t),i.reduce(((e,t)=>zm(t,e)),n)):function(e,t){return t=jm(181387,t),Object.keys(e).sort().reduce(((t,i)=>(t=Hm(i,t),zm(e[i],t))),t)}(e,t);case"string":return Hm(e,t);case"boolean":return function(e,t){return jm(e?433:863,t)}(e,t);case"number":return jm(e,t);case"undefined":return jm(937,t);default:return jm(617,t)}var i,n}function jm(e,t){return(t<<5)-t+e|0}function Hm(e,t){t=jm(149417,t);for(let i=0,n=e.length;i<n;i++)t=jm(e.charCodeAt(i),t);return t}function Um(e,t,i=32){const n=i-t;return(e<<t|(~((1<<n)-1)&e)>>>n)>>>0}function $m(e,t=0,i=e.byteLength,n=0){for(let o=0;o<i;o++)e[t+o]=n}function Km(e,t=32){return e instanceof ArrayBuffer?Array.from(new Uint8Array(e)).map((e=>e.toString(16).padStart(2,"0"))).join(""):function(e,t,i="0"){for(;e.length<t;)e=i+e;return e}((e>>>0).toString(16),t/4)}class qm{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){const t=e.length;if(0===t)return;const i=this._buff;let n,o,r=this._buffLen,s=this._leftoverHighSurrogate;for(0!==s?(n=s,o=-1,s=0):(n=e.charCodeAt(0),o=0);;){let a=n;if(Pu(n)){if(!(o+1<t)){s=n;break}{const t=e.charCodeAt(o+1);Fu(t)?(o++,a=Bu(n,t)):a=65533}}else Fu(n)&&(a=65533);if(r=this._push(i,r,a),o++,!(o<t))break;n=e.charCodeAt(o)}this._buffLen=r,this._leftoverHighSurrogate=s}_push(e,t,i){return i<128?e[t++]=i:i<2048?(e[t++]=192|(1984&i)>>>6,e[t++]=128|(63&i)>>>0):i<65536?(e[t++]=224|(61440&i)>>>12,e[t++]=128|(4032&i)>>>6,e[t++]=128|(63&i)>>>0):(e[t++]=240|(1835008&i)>>>18,e[t++]=128|(258048&i)>>>12,e[t++]=128|(4032&i)>>>6,e[t++]=128|(63&i)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),Km(this._h0)+Km(this._h1)+Km(this._h2)+Km(this._h3)+Km(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,$m(this._buff,this._buffLen),this._buffLen>56&&(this._step(),$m(this._buff));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=qm._bigBlock32,t=this._buffDV;for(let i=0;i<64;i+=4)e.setUint32(i,t.getUint32(i,!1),!1);for(let t=64;t<320;t+=4)e.setUint32(t,Um(e.getUint32(t-12,!1)^e.getUint32(t-32,!1)^e.getUint32(t-56,!1)^e.getUint32(t-64,!1),1),!1);let i,n,o,r=this._h0,s=this._h1,a=this._h2,l=this._h3,c=this._h4;for(let t=0;t<80;t++)t<20?(i=s&a|~s&l,n=1518500249):t<40?(i=s^a^l,n=1859775393):t<60?(i=s&a|s&l|a&l,n=2400959708):(i=s^a^l,n=3395469782),o=Um(r,5)+i+c+n+e.getUint32(4*t,!1)&4294967295,c=l,l=a,a=Um(s,30),s=r,r=o;this._h0=this._h0+r&4294967295,this._h1=this._h1+s&4294967295,this._h2=this._h2+a&4294967295,this._h3=this._h3+l&4294967295,this._h4=this._h4+c&4294967295}}qm._bigBlock32=new DataView(new ArrayBuffer(320));class Gm{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let i=0,n=e.length;i<n;i++)t[i]=e.charCodeAt(i);return t}}function Ym(e,t,i){return new Qm(new Gm(e),new Gm(t)).ComputeDiff(i).changes}class Zm{static Assert(e,t){if(!e)throw new Error(t)}}class Xm{static Copy(e,t,i,n,o){for(let r=0;r<o;r++)i[n+r]=e[t+r]}static Copy2(e,t,i,n,o){for(let r=0;r<o;r++)i[n+r]=e[t+r]}}class Jm{constructor(){this.m_changes=[],this.m_originalStart=1073741824,this.m_modifiedStart=1073741824,this.m_originalCount=0,this.m_modifiedCount=0}MarkNextChange(){(this.m_originalCount>0||this.m_modifiedCount>0)&&this.m_changes.push(new Vm(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class Qm{constructor(e,t,i=null){this.ContinueProcessingPredicate=i,this._originalSequence=e,this._modifiedSequence=t;const[n,o,r]=Qm._getElements(e),[s,a,l]=Qm._getElements(t);this._hasStrings=r&&l,this._originalStringElements=n,this._originalElementsOrHash=o,this._modifiedStringElements=s,this._modifiedElementsOrHash=a,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&"string"==typeof e[0]}static _getElements(e){const t=e.getElements();if(Qm._isStringArray(t)){const e=new Int32Array(t.length);for(let i=0,n=t.length;i<n;i++)e[i]=Hm(t[i],0);return[t,e,!0]}return t instanceof Int32Array?[[],t,!1]:[[],new Int32Array(t),!1]}ElementsAreEqual(e,t){return this._originalElementsOrHash[e]===this._modifiedElementsOrHash[t]&&(!this._hasStrings||this._originalStringElements[e]===this._modifiedStringElements[t])}ElementsAreStrictEqual(e,t){return!!this.ElementsAreEqual(e,t)&&Qm._getStrictElement(this._originalSequence,e)===Qm._getStrictElement(this._modifiedSequence,t)}static _getStrictElement(e,t){return"function"==typeof e.getStrictElement?e.getStrictElement(t):null}OriginalElementsAreEqual(e,t){return this._originalElementsOrHash[e]===this._originalElementsOrHash[t]&&(!this._hasStrings||this._originalStringElements[e]===this._originalStringElements[t])}ModifiedElementsAreEqual(e,t){return this._modifiedElementsOrHash[e]===this._modifiedElementsOrHash[t]&&(!this._hasStrings||this._modifiedStringElements[e]===this._modifiedStringElements[t])}ComputeDiff(e){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,e)}_ComputeDiff(e,t,i,n,o){const r=[!1];let s=this.ComputeDiffRecursive(e,t,i,n,r);return o&&(s=this.PrettifyChanges(s)),{quitEarly:r[0],changes:s}}ComputeDiffRecursive(e,t,i,n,o){for(o[0]=!1;e<=t&&i<=n&&this.ElementsAreEqual(e,i);)e++,i++;for(;t>=e&&n>=i&&this.ElementsAreEqual(t,n);)t--,n--;if(e>t||i>n){let o;return i<=n?(Zm.Assert(e===t+1,"originalStart should only be one more than originalEnd"),o=[new Vm(e,0,i,n-i+1)]):e<=t?(Zm.Assert(i===n+1,"modifiedStart should only be one more than modifiedEnd"),o=[new Vm(e,t-e+1,i,0)]):(Zm.Assert(e===t+1,"originalStart should only be one more than originalEnd"),Zm.Assert(i===n+1,"modifiedStart should only be one more than modifiedEnd"),o=[]),o}const r=[0],s=[0],a=this.ComputeRecursionPoint(e,t,i,n,r,s,o),l=r[0],c=s[0];if(null!==a)return a;if(!o[0]){const r=this.ComputeDiffRecursive(e,l,i,c,o);let s=[];return s=o[0]?[new Vm(l+1,t-(l+1)+1,c+1,n-(c+1)+1)]:this.ComputeDiffRecursive(l+1,t,c+1,n,o),this.ConcatenateChanges(r,s)}return[new Vm(e,t-e+1,i,n-i+1)]}WALKTRACE(e,t,i,n,o,r,s,a,l,c,d,h,u,g,p,m,f,_){let v=null,b=null,w=new Jm,y=t,C=i,S=u[0]-m[0]-n,k=-1073741824,x=this.m_forwardHistory.length-1;do{const t=S+e;t===y||t<C&&l[t-1]<l[t+1]?(g=(d=l[t+1])-S-n,d<k&&w.MarkNextChange(),k=d,w.AddModifiedElement(d+1,g),S=t+1-e):(g=(d=l[t-1]+1)-S-n,d<k&&w.MarkNextChange(),k=d-1,w.AddOriginalElement(d,g+1),S=t-1-e),x>=0&&(e=(l=this.m_forwardHistory[x])[0],y=1,C=l.length-1)}while(--x>=-1);if(v=w.getReverseChanges(),_[0]){let e=u[0]+1,t=m[0]+1;if(null!==v&&v.length>0){const i=v[v.length-1];e=Math.max(e,i.getOriginalEnd()),t=Math.max(t,i.getModifiedEnd())}b=[new Vm(e,h-e+1,t,p-t+1)]}else{w=new Jm,y=r,C=s,S=u[0]-m[0]-a,k=1073741824,x=f?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const e=S+o;e===y||e<C&&c[e-1]>=c[e+1]?(g=(d=c[e+1]-1)-S-a,d>k&&w.MarkNextChange(),k=d+1,w.AddOriginalElement(d+1,g+1),S=e+1-o):(g=(d=c[e-1])-S-a,d>k&&w.MarkNextChange(),k=d,w.AddModifiedElement(d+1,g+1),S=e-1-o),x>=0&&(o=(c=this.m_reverseHistory[x])[0],y=1,C=c.length-1)}while(--x>=-1);b=w.getChanges()}return this.ConcatenateChanges(v,b)}ComputeRecursionPoint(e,t,i,n,o,r,s){let a=0,l=0,c=0,d=0,h=0,u=0;e--,i--,o[0]=0,r[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const g=t-e+(n-i),p=g+1,m=new Int32Array(p),f=new Int32Array(p),_=n-i,v=t-e,b=e-i,w=t-n,y=(v-_)%2==0;m[_]=e,f[v]=t,s[0]=!1;for(let C=1;C<=g/2+1;C++){let g=0,S=0;c=this.ClipDiagonalBound(_-C,C,_,p),d=this.ClipDiagonalBound(_+C,C,_,p);for(let e=c;e<=d;e+=2){a=e===c||e<d&&m[e-1]<m[e+1]?m[e+1]:m[e-1]+1,l=a-(e-_)-b;const i=a;for(;a<t&&l<n&&this.ElementsAreEqual(a+1,l+1);)a++,l++;if(m[e]=a,a+l>g+S&&(g=a,S=l),!y&&Math.abs(e-v)<=C-1&&a>=f[e])return o[0]=a,r[0]=l,i<=f[e]&&C<=1448?this.WALKTRACE(_,c,d,b,v,h,u,w,m,f,a,t,o,l,n,r,y,s):null}const k=(g-e+(S-i)-C)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(g,k))return s[0]=!0,o[0]=g,r[0]=S,k>0&&C<=1448?this.WALKTRACE(_,c,d,b,v,h,u,w,m,f,a,t,o,l,n,r,y,s):(e++,i++,[new Vm(e,t-e+1,i,n-i+1)]);h=this.ClipDiagonalBound(v-C,C,v,p),u=this.ClipDiagonalBound(v+C,C,v,p);for(let g=h;g<=u;g+=2){a=g===h||g<u&&f[g-1]>=f[g+1]?f[g+1]-1:f[g-1],l=a-(g-v)-w;const p=a;for(;a>e&&l>i&&this.ElementsAreEqual(a,l);)a--,l--;if(f[g]=a,y&&Math.abs(g-_)<=C&&a<=m[g])return o[0]=a,r[0]=l,p>=m[g]&&C<=1448?this.WALKTRACE(_,c,d,b,v,h,u,w,m,f,a,t,o,l,n,r,y,s):null}if(C<=1447){let e=new Int32Array(d-c+2);e[0]=_-c+1,Xm.Copy2(m,c,e,1,d-c+1),this.m_forwardHistory.push(e),e=new Int32Array(u-h+2),e[0]=v-h+1,Xm.Copy2(f,h,e,1,u-h+1),this.m_reverseHistory.push(e)}}return this.WALKTRACE(_,c,d,b,v,h,u,w,m,f,a,t,o,l,n,r,y,s)}PrettifyChanges(e){for(let t=0;t<e.length;t++){const i=e[t],n=t<e.length-1?e[t+1].originalStart:this._originalElementsOrHash.length,o=t<e.length-1?e[t+1].modifiedStart:this._modifiedElementsOrHash.length,r=i.originalLength>0,s=i.modifiedLength>0;for(;i.originalStart+i.originalLength<n&&i.modifiedStart+i.modifiedLength<o&&(!r||this.OriginalElementsAreEqual(i.originalStart,i.originalStart+i.originalLength))&&(!s||this.ModifiedElementsAreEqual(i.modifiedStart,i.modifiedStart+i.modifiedLength));){const e=this.ElementsAreStrictEqual(i.originalStart,i.modifiedStart);if(this.ElementsAreStrictEqual(i.originalStart+i.originalLength,i.modifiedStart+i.modifiedLength)&&!e)break;i.originalStart++,i.modifiedStart++}let a=[null];t<e.length-1&&this.ChangesOverlap(e[t],e[t+1],a)&&(e[t]=a[0],e.splice(t+1,1),t--)}for(let t=e.length-1;t>=0;t--){const i=e[t];let n=0,o=0;if(t>0){const i=e[t-1];n=i.originalStart+i.originalLength,o=i.modifiedStart+i.modifiedLength}const r=i.originalLength>0,s=i.modifiedLength>0;let a=0,l=this._boundaryScore(i.originalStart,i.originalLength,i.modifiedStart,i.modifiedLength);for(let e=1;;e++){const t=i.originalStart-e,c=i.modifiedStart-e;if(t<n||c<o)break;if(r&&!this.OriginalElementsAreEqual(t,t+i.originalLength))break;if(s&&!this.ModifiedElementsAreEqual(c,c+i.modifiedLength))break;const d=(t===n&&c===o?5:0)+this._boundaryScore(t,i.originalLength,c,i.modifiedLength);d>l&&(l=d,a=e)}i.originalStart-=a,i.modifiedStart-=a;const c=[null];t>0&&this.ChangesOverlap(e[t-1],e[t],c)&&(e[t-1]=c[0],e.splice(t,1),t++)}if(this._hasStrings)for(let t=1,i=e.length;t<i;t++){const i=e[t-1],n=e[t],o=n.originalStart-i.originalStart-i.originalLength,r=i.originalStart,s=n.originalStart+n.originalLength,a=s-r,l=i.modifiedStart,c=n.modifiedStart+n.modifiedLength,d=c-l;if(o<5&&a<20&&d<20){const e=this._findBetterContiguousSequence(r,a,l,d,o);if(e){const[t,r]=e;t===i.originalStart+i.originalLength&&r===i.modifiedStart+i.modifiedLength||(i.originalLength=t-i.originalStart,i.modifiedLength=r-i.modifiedStart,n.originalStart=t+o,n.modifiedStart=r+o,n.originalLength=s-n.originalStart,n.modifiedLength=c-n.modifiedStart)}}}return e}_findBetterContiguousSequence(e,t,i,n,o){if(t<o||n<o)return null;const r=e+t-o+1,s=i+n-o+1;let a=0,l=0,c=0;for(let t=e;t<r;t++)for(let e=i;e<s;e++){const i=this._contiguousSequenceScore(t,e,o);i>0&&i>a&&(a=i,l=t,c=e)}return a>0?[l,c]:null}_contiguousSequenceScore(e,t,i){let n=0;for(let o=0;o<i;o++){if(!this.ElementsAreEqual(e+o,t+o))return 0;n+=this._originalStringElements[e+o].length}return n}_OriginalIsBoundary(e){return e<=0||e>=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._OriginalIsBoundary(i-1)||this._OriginalIsBoundary(i))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._ModifiedIsBoundary(i-1)||this._ModifiedIsBoundary(i))return!0}return!1}_boundaryScore(e,t,i,n){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(i,n)?1:0)}ConcatenateChanges(e,t){let i=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],i)){const n=new Array(e.length+t.length-1);return Xm.Copy(e,0,n,0,e.length-1),n[e.length-1]=i[0],Xm.Copy(t,1,n,e.length,t.length-1),n}{const i=new Array(e.length+t.length);return Xm.Copy(e,0,i,0,e.length),Xm.Copy(t,0,i,e.length,t.length),i}}ChangesOverlap(e,t,i){if(Zm.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),Zm.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){const n=e.originalStart;let o=e.originalLength;const r=e.modifiedStart;let s=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(o=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(s=t.modifiedStart+t.modifiedLength-e.modifiedStart),i[0]=new Vm(n,o,r,s),!0}return i[0]=null,!1}ClipDiagonalBound(e,t,i,n){if(e>=0&&e<n)return e;const o=t%2==0;return e<0?o===(i%2==0)?0:1:o===((n-i-1)%2==0)?n-1:n-2}}function ef(e,t,i,n){return new Qm(e,t,i).ComputeDiff(n)}class tf{constructor(e){const t=[],i=[];for(let n=0,o=e.length;n<o;n++)t[n]=af(e[n],1),i[n]=lf(e[n],1);this.lines=e,this._startColumns=t,this._endColumns=i}getElements(){const e=[];for(let t=0,i=this.lines.length;t<i;t++)e[t]=this.lines[t].substring(this._startColumns[t]-1,this._endColumns[t]-1);return e}getStrictElement(e){return this.lines[e]}getStartLineNumber(e){return e+1}getEndLineNumber(e){return e+1}createCharSequence(e,t,i){const n=[],o=[],r=[];let s=0;for(let a=t;a<=i;a++){const t=this.lines[a],i=e?this._startColumns[a]:1,l=e?this._endColumns[a]:t.length+1;for(let e=i;e<l;e++)n[s]=t.charCodeAt(e-1),o[s]=a+1,r[s]=e,s++}return new nf(n,o,r)}}class nf{constructor(e,t,i){this._charCodes=e,this._lineNumbers=t,this._columns=i}getElements(){return this._charCodes}getStartLineNumber(e){return this._lineNumbers[e]}getStartColumn(e){return this._columns[e]}getEndLineNumber(e){return this._lineNumbers[e]}getEndColumn(e){return this._columns[e]+1}}class of{constructor(e,t,i,n,o,r,s,a){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=i,this.originalEndColumn=n,this.modifiedStartLineNumber=o,this.modifiedStartColumn=r,this.modifiedEndLineNumber=s,this.modifiedEndColumn=a}static createFromDiffChange(e,t,i){let n,o,r,s,a,l,c,d;return 0===e.originalLength?(n=0,o=0,r=0,s=0):(n=t.getStartLineNumber(e.originalStart),o=t.getStartColumn(e.originalStart),r=t.getEndLineNumber(e.originalStart+e.originalLength-1),s=t.getEndColumn(e.originalStart+e.originalLength-1)),0===e.modifiedLength?(a=0,l=0,c=0,d=0):(a=i.getStartLineNumber(e.modifiedStart),l=i.getStartColumn(e.modifiedStart),c=i.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),d=i.getEndColumn(e.modifiedStart+e.modifiedLength-1)),new of(n,o,r,s,a,l,c,d)}}class rf{constructor(e,t,i,n,o){this.originalStartLineNumber=e,this.originalEndLineNumber=t,this.modifiedStartLineNumber=i,this.modifiedEndLineNumber=n,this.charChanges=o}static createFromDiffResult(e,t,i,n,o,r,s){let a,l,c,d,h;if(0===t.originalLength?(a=i.getStartLineNumber(t.originalStart)-1,l=0):(a=i.getStartLineNumber(t.originalStart),l=i.getEndLineNumber(t.originalStart+t.originalLength-1)),0===t.modifiedLength?(c=n.getStartLineNumber(t.modifiedStart)-1,d=0):(c=n.getStartLineNumber(t.modifiedStart),d=n.getEndLineNumber(t.modifiedStart+t.modifiedLength-1)),r&&t.originalLength>0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&o()){const r=i.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),a=n.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);let l=ef(r,a,o,!0).changes;s&&(l=function(e){if(e.length<=1)return e;const t=[e[0]];let i=t[0];for(let n=1,o=e.length;n<o;n++){const o=e[n],r=o.originalStart-(i.originalStart+i.originalLength),s=o.modifiedStart-(i.modifiedStart+i.modifiedLength);Math.min(r,s)<3?(i.originalLength=o.originalStart+o.originalLength-i.originalStart,i.modifiedLength=o.modifiedStart+o.modifiedLength-i.modifiedStart):(t.push(o),i=o)}return t}(l)),h=[];for(let e=0,t=l.length;e<t;e++)h.push(of.createFromDiffChange(l[e],r,a))}return new rf(a,l,c,d,h)}}class sf{constructor(e,t,i){this.shouldComputeCharChanges=i.shouldComputeCharChanges,this.shouldPostProcessCharChanges=i.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=i.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=i.shouldMakePrettyDiff,this.originalLines=e,this.modifiedLines=t,this.original=new tf(e),this.modified=new tf(t),this.continueLineDiff=cf(i.maxComputationTime),this.continueCharDiff=cf(0===i.maxComputationTime?0:Math.min(i.maxComputationTime,5e3))}computeDiff(){if(1===this.original.lines.length&&0===this.original.lines[0].length)return 1===this.modified.lines.length&&0===this.modified.lines[0].length?{quitEarly:!1,changes:[]}:{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.lines.length,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};if(1===this.modified.lines.length&&0===this.modified.lines[0].length)return{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:this.original.lines.length,modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};const e=ef(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),t=e.changes,i=e.quitEarly;if(this.shouldIgnoreTrimWhitespace){const e=[];for(let i=0,n=t.length;i<n;i++)e.push(rf.createFromDiffResult(this.shouldIgnoreTrimWhitespace,t[i],this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges));return{quitEarly:i,changes:e}}const n=[];let o=0,r=0;for(let e=-1,i=t.length;e<i;e++){const s=e+1<i?t[e+1]:null,a=s?s.originalStart:this.originalLines.length,l=s?s.modifiedStart:this.modifiedLines.length;for(;o<a&&r<l;){const e=this.originalLines[o],t=this.modifiedLines[r];if(e!==t){{let i=af(e,1),s=af(t,1);for(;i>1&&s>1&&e.charCodeAt(i-2)===t.charCodeAt(s-2);)i--,s--;(i>1||s>1)&&this._pushTrimWhitespaceCharChange(n,o+1,1,i,r+1,1,s)}{let i=lf(e,1),s=lf(t,1);const a=e.length+1,l=t.length+1;for(;i<a&&s<l&&e.charCodeAt(i-1)===e.charCodeAt(s-1);)i++,s++;(i<a||s<l)&&this._pushTrimWhitespaceCharChange(n,o+1,i,a,r+1,s,l)}}o++,r++}s&&(n.push(rf.createFromDiffResult(this.shouldIgnoreTrimWhitespace,s,this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges)),o+=s.originalLength,r+=s.modifiedLength)}return{quitEarly:i,changes:n}}_pushTrimWhitespaceCharChange(e,t,i,n,o,r,s){if(this._mergeTrimWhitespaceCharChange(e,t,i,n,o,r,s))return;let a;this.shouldComputeCharChanges&&(a=[new of(t,i,t,n,o,r,o,s)]),e.push(new rf(t,t,o,o,a))}_mergeTrimWhitespaceCharChange(e,t,i,n,o,r,s){const a=e.length;if(0===a)return!1;const l=e[a-1];return 0!==l.originalEndLineNumber&&0!==l.modifiedEndLineNumber&&l.originalEndLineNumber+1===t&&l.modifiedEndLineNumber+1===o&&(l.originalEndLineNumber=t,l.modifiedEndLineNumber=o,this.shouldComputeCharChanges&&l.charChanges&&l.charChanges.push(new of(t,i,t,n,o,r,o,s)),!0)}}function af(e,t){const i=Su(e);return-1===i?t:i+1}function lf(e,t){const i=xu(e);return-1===i?t:i+2}function cf(e){if(0===e)return()=>!0;const t=Date.now();return()=>Date.now()-t<e}function df(e){return e<0?0:e>255?255:0|e}function hf(e){return e<0?0:e>4294967295?4294967295:0|e}class uf{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=hf(e);const i=this.values,n=this.prefixSum,o=t.length;return 0!==o&&(this.values=new Uint32Array(i.length+o),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e),e+o),this.values.set(t,e),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=hf(e),t=hf(t),this.values[e]!==t&&(this.values[e]=t,e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),!0)}removeValues(e,t){e=hf(e),t=hf(t);const i=this.values,n=this.prefixSum;if(e>=i.length)return!1;const o=i.length-e;return t>=o&&(t=o),0!==t&&(this.values=new Uint32Array(i.length-t),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return 0===this.values.length?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=hf(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let i=t;i<=e;i++)this.prefixSum[i]=this.prefixSum[i-1]+this.values[i];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,i=this.values.length-1,n=0,o=0,r=0;for(;t<=i;)if(n=t+(i-t)/2|0,o=this.prefixSum[n],r=o-this.values[n],e<r)i=n-1;else{if(!(e>=o))break;t=n+1}return new pf(n,e-r)}}class gf{constructor(e){this._values=e,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(e){return this._ensureValid(),0===e?0:this._prefixSum[e-1]}getIndexOf(e){this._ensureValid();const t=this._indexBySum[e],i=t>0?this._prefixSum[t-1]:0;return new pf(t,e-i)}removeValues(e,t){this._values.splice(e,t),this._invalidate(e)}insertValues(e,t){this._values=hl(this._values,e,t),this._invalidate(e)}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,t=this._values.length;e<t;e++){const t=this._values[e],i=e>0?this._prefixSum[e-1]:0;this._prefixSum[e]=i+t;for(let n=0;n<t;n++)this._indexBySum[i+n]=e}this._prefixSum.length=this._values.length,this._indexBySum.length=this._prefixSum[this._prefixSum.length-1],this._isValid=!0,this._validEndIndex=this._values.length-1}}setValue(e,t){this._values[e]!==t&&(this._values[e]=t,this._invalidate(e))}}class pf{constructor(e,t){this.index=e,this.remainder=t,this._prefixSumIndexOfResultBrand=void 0,this.index=e,this.remainder=t}}class mf{constructor(e){const t=df(e);this._defaultValue=t,this._asciiMap=mf._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){const t=new Uint8Array(256);for(let i=0;i<256;i++)t[i]=e;return t}set(e,t){const i=df(t);e>=0&&e<256?this._asciiMap[e]=i:this._map.set(e,i)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}}class ff{constructor(e,t,i){const n=new Uint8Array(e*t);for(let o=0,r=e*t;o<r;o++)n[o]=i;this._data=n,this.rows=e,this.cols=t}get(e,t){return this._data[e*this.cols+t]}set(e,t,i){this._data[e*this.cols+t]=i}}class _f{constructor(e){let t=0,i=0;for(let n=0,o=e.length;n<o;n++){const[o,r,s]=e[n];r>t&&(t=r),o>i&&(i=o),s>i&&(i=s)}t++,i++;const n=new ff(i,t,0);for(let t=0,i=e.length;t<i;t++){const[i,o,r]=e[t];n.set(i,o,r)}this._states=n,this._maxCharCode=t}nextState(e,t){return t<0||t>=this._maxCharCode?0:this._states.get(e,t)}}let vf=null,bf=null;class wf{static _createLink(e,t,i,n,o){let r=o-1;do{const i=t.charCodeAt(r);if(2!==e.get(i))break;r--}while(r>n);if(n>0){const e=t.charCodeAt(n-1),i=t.charCodeAt(r);(40===e&&41===i||91===e&&93===i||123===e&&125===i)&&r--}return{range:{startLineNumber:i,startColumn:n+1,endLineNumber:i,endColumn:r+2},url:t.substring(n,r+1)}}static computeLinks(e,t=function(){return null===vf&&(vf=new _f([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),vf}()){const i=function(){if(null===bf){bf=new mf(0);const e=" \t<>'\"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…";for(let t=0;t<e.length;t++)bf.set(e.charCodeAt(t),1);const t=".,;";for(let e=0;e<t.length;e++)bf.set(t.charCodeAt(e),2)}return bf}(),n=[];for(let o=1,r=e.getLineCount();o<=r;o++){const r=e.getLineContent(o),s=r.length;let a=0,l=0,c=0,d=1,h=!1,u=!1,g=!1,p=!1;for(;a<s;){let e=!1;const s=r.charCodeAt(a);if(13===d){let t;switch(s){case 40:h=!0,t=0;break;case 41:t=h?0:1;break;case 91:g=!0,u=!0,t=0;break;case 93:g=!1,t=u?0:1;break;case 123:p=!0,t=0;break;case 125:t=p?0:1;break;case 39:t=34===c||96===c?0:1;break;case 34:t=39===c||96===c?0:1;break;case 96:t=39===c||34===c?0:1;break;case 42:t=42===c?1:0;break;case 124:t=124===c?1:0;break;case 32:t=g?0:1;break;default:t=i.get(s)}1===t&&(n.push(wf._createLink(i,r,o,l,a)),e=!0)}else if(12===d){let t;91===s?(u=!0,t=0):t=i.get(s),1===t?e=!0:d=13}else d=t.nextState(d,s),0===d&&(e=!0);e&&(d=1,h=!1,u=!1,p=!1,l=a+1,c=s),a++}13===d&&n.push(wf._createLink(i,r,o,l,s))}return n}}class yf{constructor(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}navigateValueSet(e,t,i,n,o){if(e&&t){const i=this.doNavigateValueSet(t,o);if(i)return{range:e,value:i}}if(i&&n){const e=this.doNavigateValueSet(n,o);if(e)return{range:i,value:e}}return null}doNavigateValueSet(e,t){const i=this.numberReplace(e,t);return null!==i?i:this.textReplace(e,t)}numberReplace(e,t){const i=Math.pow(10,e.length-(e.lastIndexOf(".")+1));let n=Number(e),o=parseFloat(e);return isNaN(n)||isNaN(o)||n!==o?null:0!==n||t?(n=Math.floor(n*i),n+=t?i:-i,String(n/i)):null}textReplace(e,t){return this.valueSetsReplace(this._defaultValueSet,e,t)}valueSetsReplace(e,t,i){let n=null;for(let o=0,r=e.length;null===n&&o<r;o++)n=this.valueSetReplace(e[o],t,i);return n}valueSetReplace(e,t,i){let n=e.indexOf(t);return n>=0?(n+=i?1:-1,n<0?n=e.length-1:n%=e.length,e[n]):null}}yf.INSTANCE=new yf;class Cf extends mf{constructor(e){super(0);for(let t=0,i=e.length;t<i;t++)this.set(e.charCodeAt(t),2);this.set(32,1),this.set(9,1)}}const Sf=function(e){const t={};return e=>(t.hasOwnProperty(e)||(t[e]=(e=>new Cf(e))(e)),t[e])}();class kf{constructor(e,t,i,n){this.searchString=e,this.isRegex=t,this.matchCase=i,this.wordSeparators=n}parseSearchRequest(){if(""===this.searchString)return null;let e;e=this.isRegex?function(e){if(!e||0===e.length)return!1;for(let t=0,i=e.length;t<i;t++)if(92===e.charCodeAt(t)){if(t++,t>=i)break;const n=e.charCodeAt(t);if(110===n||114===n||87===n)return!0}return!1}(this.searchString):this.searchString.indexOf("\n")>=0;let t=null;try{t=wu(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch(e){return null}if(!t)return null;let i=!this.isRegex&&!e;return i&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(i=this.matchCase),new qg(t,this.wordSeparators?Sf(this.wordSeparators):null,i?this.searchString:null)}}function xf(e,t,i){if(!i)return new $g(e,null);const n=[];for(let e=0,i=t.length;e<i;e++)n[e]=t[e];return new $g(e,n)}class Lf{constructor(e){const t=[];let i=0;for(let n=0,o=e.length;n<o;n++)10===e.charCodeAt(n)&&(t[i++]=n);this._lineFeedsOffsets=t}findLineFeedCountBeforeOffset(e){const t=this._lineFeedsOffsets;let i=0,n=t.length-1;if(-1===n)return 0;if(e<=t[0])return 0;for(;i<n;){const o=i+((n-i)/2>>0);t[o]>=e?n=o-1:t[o+1]>=e?(i=o,n=o):i=o+1}return i+1}}class Ef{static findMatches(e,t,i,n,o){const r=t.parseSearchRequest();return r?r.regex.multiline?this._doFindMatchesMultiline(e,i,new If(r.wordSeparators,r.regex),n,o):this._doFindMatchesLineByLine(e,i,r,n,o):[]}static _getMultilineMatchRange(e,t,i,n,o,r){let s,a,l=0;if(n?(l=n.findLineFeedCountBeforeOffset(o),s=t+o+l):s=t+o,n){const e=n.findLineFeedCountBeforeOffset(o+r.length)-l;a=s+r.length+e}else a=s+r.length;const c=e.getPositionAt(s),d=e.getPositionAt(a);return new Zd(c.lineNumber,c.column,d.lineNumber,d.column)}static _doFindMatchesMultiline(e,t,i,n,o){const r=e.getOffsetAt(t.getStartPosition()),s=e.getValueInRange(t,1),a="\r\n"===e.getEOL()?new Lf(s):null,l=[];let c,d=0;for(i.reset(0);c=i.next(s);)if(l[d++]=xf(this._getMultilineMatchRange(e,r,s,a,c.index,c[0]),c,n),d>=o)return l;return l}static _doFindMatchesLineByLine(e,t,i,n,o){const r=[];let s=0;if(t.startLineNumber===t.endLineNumber){const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return s=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,s,r,n,o),r}const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);s=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,s,r,n,o);for(let a=t.startLineNumber+1;a<t.endLineNumber&&s<o;a++)s=this._findMatchesInLine(i,e.getLineContent(a),a,0,s,r,n,o);if(s<o){const a=e.getLineContent(t.endLineNumber).substring(0,t.endColumn-1);s=this._findMatchesInLine(i,a,t.endLineNumber,0,s,r,n,o)}return r}static _findMatchesInLine(e,t,i,n,o,r,s,a){const l=e.wordSeparators;if(!s&&e.simpleSearch){const s=e.simpleSearch,c=s.length,d=t.length;let h=-c;for(;-1!==(h=t.indexOf(s,h+c));)if((!l||Nf(l,t,d,h,c))&&(r[o++]=new $g(new Zd(i,h+1+n,i,h+1+c+n),null),o>=a))return o;return o}const c=new If(e.wordSeparators,e.regex);let d;c.reset(0);do{if(d=c.next(t),d&&(r[o++]=xf(new Zd(i,d.index+1+n,i,d.index+1+d[0].length+n),d,s),o>=a))return o}while(d);return o}static findNextMatch(e,t,i,n){const o=t.parseSearchRequest();if(!o)return null;const r=new If(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindNextMatchMultiline(e,i,r,n):this._doFindNextMatchLineByLine(e,i,r,n)}static _doFindNextMatchMultiline(e,t,i,n){const o=new Yd(t.lineNumber,1),r=e.getOffsetAt(o),s=e.getLineCount(),a=e.getValueInRange(new Zd(o.lineNumber,o.column,s,e.getLineMaxColumn(s)),1),l="\r\n"===e.getEOL()?new Lf(a):null;i.reset(t.column-1);let c=i.next(a);return c?xf(this._getMultilineMatchRange(e,r,a,l,c.index,c[0]),c,n):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new Yd(1,1),i,n):null}static _doFindNextMatchLineByLine(e,t,i,n){const o=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r),a=this._findFirstMatchInLine(i,s,r,t.column,n);if(a)return a;for(let t=1;t<=o;t++){const s=(r+t-1)%o,a=e.getLineContent(s+1),l=this._findFirstMatchInLine(i,a,s+1,1,n);if(l)return l}return null}static _findFirstMatchInLine(e,t,i,n,o){e.reset(n-1);const r=e.next(t);return r?xf(new Zd(i,r.index+1,i,r.index+1+r[0].length),r,o):null}static findPreviousMatch(e,t,i,n){const o=t.parseSearchRequest();if(!o)return null;const r=new If(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindPreviousMatchMultiline(e,i,r,n):this._doFindPreviousMatchLineByLine(e,i,r,n)}static _doFindPreviousMatchMultiline(e,t,i,n){const o=this._doFindMatchesMultiline(e,new Zd(1,1,t.lineNumber,t.column),i,n,9990);if(o.length>0)return o[o.length-1];const r=e.getLineCount();return t.lineNumber!==r||t.column!==e.getLineMaxColumn(r)?this._doFindPreviousMatchMultiline(e,new Yd(r,e.getLineMaxColumn(r)),i,n):null}static _doFindPreviousMatchLineByLine(e,t,i,n){const o=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r).substring(0,t.column-1),a=this._findLastMatchInLine(i,s,r,n);if(a)return a;for(let t=1;t<=o;t++){const s=(o+r-t-1)%o,a=e.getLineContent(s+1),l=this._findLastMatchInLine(i,a,s+1,n);if(l)return l}return null}static _findLastMatchInLine(e,t,i,n){let o,r=null;for(e.reset(0);o=e.next(t);)r=xf(new Zd(i,o.index+1,i,o.index+1+o[0].length),o,n);return r}}function Nf(e,t,i,n,o){return function(e,t,i,n,o){if(0===n)return!0;const r=t.charCodeAt(n-1);if(0!==e.get(r))return!0;if(13===r||10===r)return!0;if(o>0){const i=t.charCodeAt(n);if(0!==e.get(i))return!0}return!1}(e,t,0,n,o)&&function(e,t,i,n,o){if(n+o===i)return!0;const r=t.charCodeAt(n+o);if(0!==e.get(r))return!0;if(13===r||10===r)return!0;if(o>0){const i=t.charCodeAt(n+o-1);if(0!==e.get(i))return!0}return!1}(e,t,i,n,o)}class If{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let i;do{if(this._prevMatchStartIndex+this._prevMatchLength===t)return null;if(i=this._searchRegex.exec(e),!i)return null;const n=i.index,o=i[0].length;if(n===this._prevMatchStartIndex&&o===this._prevMatchLength){if(0===o){Wu(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=n,this._prevMatchLength=o,!this._wordSeparators||Nf(this._wordSeparators,e,t,n,o))return i}while(i);return null}}class Tf{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=og.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const t of rg.codePoints)Df(String.fromCodePoint(t))||e.add(t);if(this.options.ambiguousCharacters)for(const t of this.ambiguousCharacters.getConfusableCodePoints())e.add(t);for(const t of this.allowedCodePoints)e.delete(t);return e}shouldHighlightNonBasicASCII(e,t){const i=e.codePointAt(0);if(this.allowedCodePoints.has(i))return 0;if(this.options.nonBasicASCII)return 1;let n=!1,o=!1;if(t)for(let e of t){const t=e.codePointAt(0),i=qu(e);n=n||i,i||this.ambiguousCharacters.isAmbiguous(t)||rg.isInvisibleCharacter(t)||(o=!0)}return!n&&o?0:this.options.invisibleCharacters&&!Df(e)&&rg.isInvisibleCharacter(i)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(i)?3:0}}function Df(e){return" "===e||"\n"===e||"\t"===e}var Af=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class Of extends class{constructor(e,t,i,n){this._uri=e,this._lines=t,this._eol=i,this._versionId=n,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return null===this._cachedTextValue&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const t=e.changes;for(const e of t)this._acceptDeleteRange(e.range),this._acceptInsertText(new Yd(e.range.startLineNumber,e.range.startColumn),e.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,t=this._lines.length,i=new Uint32Array(t);for(let n=0;n<t;n++)i[n]=this._lines[n].length+e;this._lineStarts=new uf(i)}}_setLineText(e,t){this._lines[e]=t,this._lineStarts&&this._lineStarts.setValue(e,this._lines[e].length+this._eol.length)}_acceptDeleteRange(e){if(e.startLineNumber!==e.endLineNumber)this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.endLineNumber-1].substring(e.endColumn-1)),this._lines.splice(e.startLineNumber,e.endLineNumber-e.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(e.startLineNumber,e.endLineNumber-e.startLineNumber);else{if(e.startColumn===e.endColumn)return;this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.startLineNumber-1].substring(e.endColumn-1))}}_acceptInsertText(e,t){if(0===t.length)return;const i=Cu(t);if(1===i.length)return void this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+i[0]+this._lines[e.lineNumber-1].substring(e.column-1));i[i.length-1]+=this._lines[e.lineNumber-1].substring(e.column-1),this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+i[0]);const n=new Uint32Array(i.length-1);for(let t=1;t<i.length;t++)this._lines.splice(e.lineNumber+t-1,0,i[t]),n[t-1]=i[t].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(e.lineNumber,n)}}{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}getLinesContent(){return this._lines.slice(0)}getLineCount(){return this._lines.length}getLineContent(e){return this._lines[e-1]}getWordAtPosition(e,t){const i=il(e.column,el(t),this._lines[e.lineNumber-1],0);return i?new Zd(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn):null}words(e){const t=this._lines,i=this._wordenize.bind(this);let n=0,o="",r=0,s=[];return{*[Symbol.iterator](){for(;;)if(r<s.length){const e=o.substring(s[r].start,s[r].end);r+=1,yield e}else{if(!(n<t.length))break;o=t[n],s=i(o,e),r=0,n+=1}}}}getLineWords(e,t){const i=this._lines[e-1],n=this._wordenize(i,t),o=[];for(const e of n)o.push({word:i.substring(e.start,e.end),startColumn:e.start+1,endColumn:e.end+1});return o}_wordenize(e,t){const i=[];let n;for(t.lastIndex=0;(n=t.exec(e))&&0!==n[0].length;)i.push({start:n.index,end:n.index+n[0].length});return i}getValueInRange(e){if((e=this._validateRange(e)).startLineNumber===e.endLineNumber)return this._lines[e.startLineNumber-1].substring(e.startColumn-1,e.endColumn-1);const t=this._eol,i=e.startLineNumber-1,n=e.endLineNumber-1,o=[];o.push(this._lines[i].substring(e.startColumn-1));for(let e=i+1;e<n;e++)o.push(this._lines[e]);return o.push(this._lines[n].substring(0,e.endColumn-1)),o.join(t)}offsetAt(e){return e=this._validatePosition(e),this._ensureLineStarts(),this._lineStarts.getPrefixSum(e.lineNumber-2)+(e.column-1)}positionAt(e){e=Math.floor(e),e=Math.max(0,e),this._ensureLineStarts();const t=this._lineStarts.getIndexOf(e),i=this._lines[t.index].length;return{lineNumber:1+t.index,column:1+Math.min(t.remainder,i)}}_validateRange(e){const t=this._validatePosition({lineNumber:e.startLineNumber,column:e.startColumn}),i=this._validatePosition({lineNumber:e.endLineNumber,column:e.endColumn});return t.lineNumber!==e.startLineNumber||t.column!==e.startColumn||i.lineNumber!==e.endLineNumber||i.column!==e.endColumn?{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:i.lineNumber,endColumn:i.column}:e}_validatePosition(e){if(!Yd.isIPosition(e))throw new Error("bad position");let{lineNumber:t,column:i}=e,n=!1;if(t<1)t=1,i=1,n=!0;else if(t>this._lines.length)t=this._lines.length,i=this._lines[t-1].length+1,n=!0;else{const e=this._lines[t-1].length+1;i<1?(i=1,n=!0):i>e&&(i=e,n=!0)}return n?{lineNumber:t,column:i}:e}}class Mf{constructor(e,t){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=t,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(e){return this._models[e]}_getModels(){const e=[];return Object.keys(this._models).forEach((t=>e.push(this._models[t]))),e}acceptNewModel(e){this._models[e.url]=new Of(Bd.parse(e.url),e.lines,e.EOL,e.versionId)}acceptModelChanged(e,t){this._models[e]&&this._models[e].onEvents(t)}acceptRemovedModel(e){this._models[e]&&delete this._models[e]}computeUnicodeHighlights(e,t,i){return Af(this,void 0,void 0,(function*(){const n=this._getModel(e);return n?class{static computeUnicodeHighlights(e,t,i){const n=i?i.startLineNumber:1,o=i?i.endLineNumber:e.getLineCount(),r=new Tf(t),s=r.getCandidateCodePoints();let a;a="allNonBasicAscii"===s?new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):new RegExp(`[${vu(Array.from(s).map((e=>String.fromCodePoint(e))).join(""))}]`,"g");const l=new If(null,a),c=[];let d,h=!1,u=0,g=0,p=0;e:for(let t=n,i=o;t<=i;t++){const i=e.getLineContent(t),n=i.length;l.reset(0);do{if(d=l.next(i),d){let e=d.index,o=d.index+d[0].length;e>0&&Pu(i.charCodeAt(e-1))&&e--,o+1<n&&Pu(i.charCodeAt(o-1))&&o++;const s=i.substring(e,o),a=il(e+1,Qa,i,0),l=r.shouldHighlightNonBasicASCII(s,a?a.word:null);if(0!==l){3===l?u++:2===l?g++:1===l?p++:Dl();const i=1e3;if(c.length>=i){h=!0;break e}c.push(new Zd(t,e+1,t,o+1))}}}while(d)}return{ranges:c,hasMore:h,ambiguousCharacterCount:u,invisibleCharacterCount:g,nonBasicAsciiCharacterCount:p}}static computeUnicodeHighlightReason(e,t){const i=new Tf(t);switch(i.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{const n=e.codePointAt(0),o=i.ambiguousCharacters.getPrimaryConfusable(n),r=og.getLocales().filter((e=>!og.getInstance(new Set([...t.allowedLocales,e])).isAmbiguous(n)));return{kind:0,confusableWith:String.fromCodePoint(o),notAmbiguousInLocales:r}}case 1:return{kind:2}}}}.computeUnicodeHighlights(n,t,i):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}))}computeDiff(e,t,i,n){return Af(this,void 0,void 0,(function*(){const o=this._getModel(e),r=this._getModel(t);if(!o||!r)return null;const s=o.getLinesContent(),a=r.getLinesContent(),l=new sf(s,a,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:i,shouldMakePrettyDiff:!0,maxComputationTime:n}).computeDiff(),c=!(l.changes.length>0)&&this._modelsAreIdentical(o,r);return{quitEarly:l.quitEarly,identical:c,changes:l.changes}}))}_modelsAreIdentical(e,t){const i=e.getLineCount();if(i!==t.getLineCount())return!1;for(let n=1;n<=i;n++)if(e.getLineContent(n)!==t.getLineContent(n))return!1;return!0}computeMoreMinimalEdits(e,t){return Af(this,void 0,void 0,(function*(){const i=this._getModel(e);if(!i)return t;const n=[];let o;t=t.slice(0).sort(((e,t)=>e.range&&t.range?Zd.compareRangesUsingStarts(e.range,t.range):(e.range?0:1)-(t.range?0:1)));for(let{range:e,text:r,eol:s}of t){if("number"==typeof s&&(o=s),Zd.isEmpty(e)&&!r)continue;const t=i.getValueInRange(e);if(r=r.replace(/\r\n|\n|\r/g,i.eol),t===r)continue;if(Math.max(r.length,t.length)>Mf._diffLimit){n.push({range:e,text:r});continue}const a=Ym(t,r,!1),l=i.offsetAt(Zd.lift(e).getStartPosition());for(const e of a){const t=i.positionAt(l+e.originalStart),o=i.positionAt(l+e.originalStart+e.originalLength),s={text:r.substr(e.modifiedStart,e.modifiedLength),range:{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:o.lineNumber,endColumn:o.column}};i.getValueInRange(s.range)!==s.text&&n.push(s)}}return"number"==typeof o&&n.push({eol:o,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),n}))}computeLinks(e){return Af(this,void 0,void 0,(function*(){const t=this._getModel(e);return t?function(e){return e&&"function"==typeof e.getLineCount&&"function"==typeof e.getLineContent?wf.computeLinks(e):[]}(t):null}))}textualSuggest(e,t,i,n){return Af(this,void 0,void 0,(function*(){const o=new Rc(!0),r=new RegExp(i,n),s=new Set;e:for(let i of e){const e=this._getModel(i);if(e)for(let i of e.words(r))if(i!==t&&isNaN(Number(i))&&(s.add(i),s.size>Mf._suggestionsLimit))break e}return{words:Array.from(s),duration:o.elapsed()}}))}computeWordRanges(e,t,i,n){return Af(this,void 0,void 0,(function*(){const o=this._getModel(e);if(!o)return Object.create(null);const r=new RegExp(i,n),s=Object.create(null);for(let e=t.startLineNumber;e<t.endLineNumber;e++){const t=o.getLineWords(e,r);for(const i of t){if(!isNaN(Number(i.word)))continue;let t=s[i.word];t||(t=[],s[i.word]=t),t.push({startLineNumber:e,startColumn:i.startColumn,endLineNumber:e,endColumn:i.endColumn})}}return s}))}navigateValueSet(e,t,i,n,o){return Af(this,void 0,void 0,(function*(){const r=this._getModel(e);if(!r)return null;const s=new RegExp(n,o);t.startColumn===t.endColumn&&(t={startLineNumber:t.startLineNumber,startColumn:t.startColumn,endLineNumber:t.endLineNumber,endColumn:t.endColumn+1});const a=r.getValueInRange(t),l=r.getWordAtPosition({lineNumber:t.startLineNumber,column:t.startColumn},s);if(!l)return null;const c=r.getValueInRange(l);return yf.INSTANCE.navigateValueSet(t,a,l,c,i)}))}loadForeignModule(e,t,i){const n={host:function(e,t){const i=e=>function(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)};let n={};for(const t of e)n[t]=i(t);return n}(i,((e,t)=>this._host.fhr(e,t))),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(n,t),Promise.resolve(Il(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(e,t){if(!this._foreignModule||"function"!=typeof this._foreignModule[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(e){return Promise.reject(e)}}}Mf._diffLimit=1e5,Mf._suggestionsLimit=1e4,"function"==typeof importScripts&&(Ta.monaco=Qh());const Rf=Mg("textResourceConfigurationService"),Pf=Mg("textResourcePropertiesService"),Ff=Mg("logService");var Bf;!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"}(Bf||(Bf={}));const Wf=Bf.Info;class Vf extends Nc{constructor(){super(...arguments),this.level=Wf,this._onDidChangeLogLevel=this._register(new Vc)}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}}class zf extends Vf{constructor(e=Wf){super(),this.setLevel(e)}trace(e,...t){this.getLevel()<=Bf.Trace&&console.log("%cTRACE","color: #888",e,...t)}debug(e,...t){this.getLevel()<=Bf.Debug&&console.log("%cDEBUG","background: #eee; color: #888",e,...t)}info(e,...t){this.getLevel()<=Bf.Info&&console.log("%c INFO","color: #33f",e,...t)}error(e,...t){this.getLevel()<=Bf.Error&&console.log("%c  ERR","color: #f33",e,...t)}dispose(){}}class jf extends Nc{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 Hf=Mg("ILanguageFeaturesService");var Uf=function(e,t){return function(i,n){t(i,n,e)}},$f=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function Kf(e,t){const i=e.getModel(t);return!!i&&!i.isTooLargeForSyncing()}let qf=class extends Nc{constructor(e,t,i,n,o){super(),this._modelService=e,this._workerManager=this._register(new Yf(this._modelService,n)),this._logService=i,this._register(o.linkProvider.register({language:"*",hasAccessToAllModels:!0},{provideLinks:(e,t)=>Kf(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 Gf(this._workerManager,t,this._modelService,n)))}dispose(){super.dispose()}canComputeUnicodeHighlights(e){return Kf(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(al(t)){if(!Kf(this._modelService,e))return Promise.resolve(t);const i=Rc.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,mm(1e3).then((()=>t))])}return Promise.resolve(void 0)}canNavigateValueSet(e){return Kf(this._modelService,e)}navigateValueSet(e,t,i){return this._workerManager.withWorker().then((n=>n.navigateValueSet(e,t,i)))}canComputeWordRanges(e){return Kf(this._modelService,e)}computeWordRanges(e,t){return this._workerManager.withWorker().then((i=>i.computeWordRanges(e,t)))}};qf=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([Uf(0,am),Uf(1,Rf),Uf(2,Ff),Uf(3,Zp),Uf(4,Hf)],qf);class Gf{constructor(e,t,i,n){this.languageConfigurationService=n,this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=t,this._modelService=i}provideCompletionItems(e,t){return $f(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)Kf(this._modelService,e.uri)&&n.push(e.uri);else for(const t of this._modelService.getModels())Kf(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(),r=e.getWordAtPosition(t),s=r?new Zd(t.lineNumber,r.startColumn,t.lineNumber,r.endColumn):Zd.fromPositions(t),a=s.setEndPosition(t.lineNumber,t.column),l=yield this._workerManager.withWorker(),c=yield l.textualSuggest(n,null==r?void 0:r.word,o);return c?{duration:c.duration,suggestions:c.words.map((e=>({kind:18,label:e,insertText:e,range:{insert:a,replace:s}})))}:void 0}))}}class Yf extends Nc{constructor(e,t){super(),this.languageConfigurationService=t,this._modelService=e,this._editorWorkerClient=null,this._lastWorkerUsedTime=(new Date).getTime(),this._register(new vm).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(){this._editorWorkerClient&&0===this._modelService.getModels().length&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){this._editorWorkerClient&&(new Date).getTime()-this._lastWorkerUsedTime>3e5&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=(new Date).getTime(),this._editorWorkerClient||(this._editorWorkerClient=new Qf(this._modelService,!1,"editorWorkerService",this.languageConfigurationService)),Promise.resolve(this._editorWorkerClient)}}class Zf extends Nc{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 vm;e.cancelAndSet((()=>this._checkStopModelSync()),Math.round(3e4)),this._register(e)}}dispose(){for(let e in this._syncedModels)kc(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 e of t)this._stopModelSync(e)}_beginModelSync(e,t){const i=this._modelService.getModel(e);if(!i)return;if(!t&&i.isTooLargeForSyncing())return;const n=e.toString();this._proxy.acceptNewModel({url:i.uri.toString(),lines:i.getLinesContent(),EOL:i.getEOL(),versionId:i.getVersionId()});const o=new Ec;o.add(i.onDidChangeContent((e=>{this._proxy.acceptModelChanged(n.toString(),e)}))),o.add(i.onWillDispose((()=>{this._stopModelSync(n)}))),o.add(Lc((()=>{this._proxy.acceptRemovedModel(n)}))),this._syncedModels[n]=o}_stopModelSync(e){const t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],kc(t)}}class Xf{constructor(e){this._instance=e,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class Jf{constructor(e){this._workerClient=e}fhr(e,t){return this._workerClient.fhr(e,t)}}class Qf extends Nc{constructor(e,t,i,n){super(),this.languageConfigurationService=n,this._disposed=!1,this._modelService=e,this._keepIdleModels=t,this._workerFactory=new Wm(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 Om(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new Jf(this)))}catch(e){Lm(e),this._worker=new Xf(new Mf(new Jf(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,(e=>(Lm(e),this._worker=new Xf(new Mf(new Jf(this),null)),this._getOrCreateWorker().getProxyObject())))}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new Zf(e,this._modelService,this._keepIdleModels))),this._modelManager}_withSyncedResources(e,t=!1){return $f(this,void 0,void 0,(function*(){return this._disposed?Promise.reject(function(){const e=new Error(fc);return e.name=e.message,e}()):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 $f(this,void 0,void 0,(function*(){const n=yield this._withSyncedResources(e),o=i.source,r=yu(i);return n.textualSuggest(e.map((e=>e.toString())),t,o,r)}))}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(),r=o.source,s=yu(o);return i.computeWordRanges(e.toString(),t,r,s)}))}navigateValueSet(e,t,i){return this._withSyncedResources([e]).then((n=>{const o=this._modelService.getModel(e);if(!o)return null;const r=this.languageConfigurationService.getLanguageConfiguration(o.getLanguageId()).getWordDefinition(),s=r.source,a=yu(r);return n.navigateValueSet(e.toString(),t,i,s,a)}))}dispose(){super.dispose(),this._disposed=!0}}class e_ extends Qf{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(e){return Promise.reject(e)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then((e=>{const t=this._foreignModuleHost?Il(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 t_{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=t_.defaultTokenMetadata,n=new Uint32Array(2);return n[0]=e.length,n[1]=i,new t_(n,e,t)}equals(e){return e instanceof t_&&this.slicedEquals(e,0,this._tokensCount)}slicedEquals(e,t,i){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;const n=t<<1,o=n+(i<<1);for(let t=n;t<o;t++)if(this._tokens[t]!==e._tokens[t])return!1;return!0}getLineContent(){return this._text}getCount(){return this._tokensCount}getStartOffset(e){return e>0?this._tokens[e-1<<1]:0}getMetadata(e){return this._tokens[1+(e<<1)]}getLanguageId(e){const t=this._tokens[1+(e<<1)],i=ch.getLanguageId(t);return this._languageIdCodec.decodeLanguageId(i)}getStandardTokenType(e){const t=this._tokens[1+(e<<1)];return ch.getTokenType(t)}getForeground(e){const t=this._tokens[1+(e<<1)];return ch.getForeground(t)}getClassName(e){const t=this._tokens[1+(e<<1)];return ch.getClassNameFromMetadata(t)}getInlineStyle(e,t){const i=this._tokens[1+(e<<1)];return ch.getInlineStyleFromMetadata(i,t)}getPresentation(e){const t=this._tokens[1+(e<<1)];return ch.getPresentationFromMetadata(t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return t_.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,i){return new i_(this,e,t,i)}static convertToEndOffset(e,t){const i=(e.length>>>1)-1;for(let t=0;t<i;t++)e[t<<1]=e[t+1<<1];e[i<<1]=t}static findIndexInTokensArray(e,t){if(e.length<=2)return 0;let i=0,n=(e.length>>>1)-1;for(;i<n;){const o=i+Math.floor((n-i)/2),r=e[o<<1];if(r===t)return o+1;r<t?i=o+1:r>t&&(n=o)}return i}withInserted(e){if(0===e.length)return this;let t=0,i=0,n="";const o=new Array;let r=0;for(;;){const s=t<this._tokensCount?this._tokens[t<<1]:-1,a=i<e.length?e[i]:null;if(-1!==s&&(null===a||s<=a.offset)){n+=this._text.substring(r,s);const e=this._tokens[1+(t<<1)];o.push(n.length,e),t++,r=s}else{if(!a)break;if(a.offset>r){n+=this._text.substring(r,a.offset);const e=this._tokens[1+(t<<1)];o.push(n.length,e),r=a.offset}n+=a.text,o.push(n.length,a.tokenMetadata),i++}}return new t_(new Uint32Array(o),n,this._languageIdCodec)}}t_.defaultTokenMetadata=16793600;class i_{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 t=this._firstTokenIndex,n=e.getCount();t<n&&!(e.getStartOffset(t)>=i);t++)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 i_&&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 n_{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<i;n++)if(!n_._equals(e[n],t[n]))return!1;return!0}static extractWrapped(e,t,i){if(0===e.length)return e;const n=t+1,o=i+1,r=i-t,s=[];let a=0;for(const t of e)t.endColumn<=n||t.startColumn>=o||(s[a++]=new n_(Math.max(1,t.startColumn-n+1),Math.min(r+1,t.endColumn-n+1),t.className,t.type));return s}static filter(e,t,i,n){if(0===e.length)return[];const o=[];let r=0;for(let s=0,a=e.length;s<a;s++){const a=e[s],l=a.range;if(l.endLineNumber<t||l.startLineNumber>t)continue;if(l.isEmpty()&&(0===a.type||3===a.type))continue;const c=l.startLineNumber===t?l.startColumn:i,d=l.endLineNumber===t?l.endColumn:n;o[r++]=new n_(c,d,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=n_._typeCompare(e.type,t.type);return 0!==i?i:e.className!==t.className?e.className<t.className?-1:1:0}}class o_{constructor(e,t,i,n){this.startOffset=e,this.endOffset=t,this.className=i,this.metadata=n}}class r_{constructor(){this.stopOffsets=[],this.classNames=[],this.metadata=[],this.count=0}static _metadata(e){let t=0;for(let i=0,n=e.length;i<n;i++)t|=e[i];return t}consumeLowerThan(e,t,i){for(;this.count>0&&this.stopOffsets[0]<e;){let e=0;for(;e+1<this.count&&this.stopOffsets[e]===this.stopOffsets[e+1];)e++;i.push(new o_(t,this.stopOffsets[e],this.classNames.join(" "),r_._metadata(this.metadata))),t=this.stopOffsets[e]+1,this.stopOffsets.splice(0,e+1),this.classNames.splice(0,e+1),this.metadata.splice(0,e+1),this.count-=e+1}return this.count>0&&t<e&&(i.push(new o_(t,e-1,this.classNames.join(" "),r_._metadata(this.metadata))),t=e),t}insert(e,t,i){if(0===this.count||this.stopOffsets[this.count-1]<=e)this.stopOffsets.push(e),this.classNames.push(t),this.metadata.push(i);else for(let n=0;n<this.count;n++)if(this.stopOffsets[n]>=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t),this.metadata.splice(n,0,i);break}this.count++}}class s_{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 a_{constructor(e,t){this.startOffset=e,this.endOffset=t}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}}class l_{constructor(e,t,i,n,o,r,s,a,l,c,d,h,u,g,p,m,f,_,v){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.continuesWithWrappedLine=n,this.isBasicASCII=o,this.containsRTL=r,this.fauxIndentLength=s,this.lineTokens=a,this.lineDecorations=l.sort(n_.compare),this.tabSize=c,this.startVisibleColumn=d,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<t.startOffset?-1:1)),Math.abs(g-h)<Math.abs(u-h)?(this.renderSpaceWidth=g,this.renderSpaceCharCode=11825):(this.renderSpaceWidth=u,this.renderSpaceCharCode=183)}sameSelection(e){if(null===this.selectionsOnLine)return null===e;if(null===e)return!1;if(e.length!==this.selectionsOnLine.length)return!1;for(let t=0;t<this.selectionsOnLine.length;t++)if(!this.selectionsOnLine[t].equals(e[t]))return!1;return!0}equals(e){return this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineContent===e.lineContent&&this.continuesWithWrappedLine===e.continuesWithWrappedLine&&this.isBasicASCII===e.isBasicASCII&&this.containsRTL===e.containsRTL&&this.fauxIndentLength===e.fauxIndentLength&&this.tabSize===e.tabSize&&this.startVisibleColumn===e.startVisibleColumn&&this.spaceWidth===e.spaceWidth&&this.renderSpaceWidth===e.renderSpaceWidth&&this.renderSpaceCharCode===e.renderSpaceCharCode&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.fontLigatures===e.fontLigatures&&n_.equalsArr(this.lineDecorations,e.lineDecorations)&&this.lineTokens.equals(e.lineTokens)&&this.sameSelection(e.selectionsOnLine)}}class c_{constructor(e,t){this.partIndex=e,this.charIndex=t}}class d_{constructor(e,t){this.length=e,this._data=new Uint32Array(this.length),this._absoluteOffsets=new Uint32Array(this.length)}static getPartIndex(e){return(4294901760&e)>>>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=d_.getPartIndex(t),n=d_.getCharIndex(t);return new c_(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,r=this.length-1;for(;o+1<r;){const e=o+r>>>1,t=this._data[e];if(t===n)return e;t>n?r=e:o=e}if(o===r)return o;const s=this._data[o],a=this._data[r];if(s===n)return o;if(a===n)return r;const l=d_.getPartIndex(s),c=d_.getCharIndex(s);let d;return d=l!==d_.getPartIndex(a)?t:d_.getCharIndex(a),i-c<=d-i?o:r}}class h_{constructor(e,t,i){this._renderLineOutputBrand=void 0,this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=i}}function u_(e,t){if(0===e.lineContent.length){if(e.lineDecorations.length>0){t.appendASCIIString("<span>");let i=0,n=0,o=0;for(const r of e.lineDecorations)1!==r.type&&2!==r.type||(t.appendASCIIString('<span class="'),t.appendASCIIString(r.className),t.appendASCIIString('"></span>'),1===r.type&&(o|=1,i++),2===r.type&&(o|=2,n++));t.appendASCIIString("</span>");const r=new d_(1,i+n);return r.setColumnInfo(1,i,0,0),new h_(r,!1,o)}return t.appendASCIIString("<span><span></span></span>"),new h_(new d_(0,0),!1,0)}return function(e,t){const i=e.fontIsMonospace,n=e.canUseHalfwidthRightwardsArrow,o=e.containsForeignElements,r=e.lineContent,s=e.len,a=e.isOverflowing,l=e.parts,c=e.fauxIndentLength,d=e.tabSize,h=e.startVisibleColumn,u=e.containsRTL,g=e.spaceWidth,p=e.renderSpaceCharCode,m=e.renderWhitespace,f=e.renderControlCharacters,_=new d_(s+1,l.length);let v=!1,b=0,w=h,y=0,C=0,S=0,k=0;u?t.appendASCIIString('<span dir="ltr">'):t.appendASCIIString("<span>");for(let e=0,a=l.length;e<a;e++){k+=S;const a=l[e],h=a.endIndex,u=a.type,x=0!==m&&a.isWhitespace(),L=x&&!i&&("mtkw"===u||!o),E=b===h&&a.isPseudoAfter();if(y=0,t.appendASCIIString('<span class="'),t.appendASCIIString(L?"mtkz":u),t.appendASCII(34),x){let i=0;{let e=b,t=w;for(;e<h;e++){const n=0|(9===r.charCodeAt(e)?d-t%d:1);i+=n,e>=c&&(t+=n)}}for(L&&(t.appendASCIIString(' style="width:'),t.appendASCIIString(String(g*i)),t.appendASCIIString('px"')),t.appendASCII(62);b<h;b++){let i;if(_.setColumnInfo(b+1,e-C,y,k),C=0,9===r.charCodeAt(b)){i=d-w%d|0,!n||i>1?t.write1(8594):t.write1(65515);for(let e=2;e<=i;e++)t.write1(160)}else i=1,t.write1(p);y+=i,b>=c&&(w+=i)}S=i}else{let i=0;for(t.appendASCII(62);b<h;b++){_.setColumnInfo(b+1,e-C,y,k),C=0;const n=r.charCodeAt(b);let o=1,s=1;switch(n){case 9:o=d-w%d,s=o;for(let e=1;e<=o;e++)t.write1(160);break;case 32:t.write1(160);break;case 60:t.appendASCIIString("&lt;");break;case 62:t.appendASCIIString("&gt;");break;case 38:t.appendASCIIString("&amp;");break;case 0:f?t.write1(9216):t.appendASCIIString("&#00;");break;case 65279:case 8232:case 8233:case 133:t.write1(65533);break;default:Zu(n)&&s++,f&&n<32?t.write1(9216+n):f&&127===n?t.write1(9249):f&&f_(n)?(t.appendASCIIString("[U+"),t.appendASCIIString(n.toString(16).toUpperCase().padStart(4,"0")),t.appendASCIIString("]"),o=8):t.write1(n)}y+=o,i+=o,b>=c&&(w+=s)}S=i}E?C++:C=0,b>=s&&!v&&a.isPseudoAfter()&&(v=!0,_.setColumnInfo(b+1,e,y,k)),t.appendASCIIString("</span>")}return v||_.setColumnInfo(s+1,l.length-1,y,k),a&&t.appendASCIIString("<span>&hellip;</span>"),t.appendASCIIString("</span>"),new h_(_,u,o)}(function(e){const t=e.lineContent;let i,n;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter<t.length?(i=!0,n=e.stopRenderingLineAfter):(i=!1,n=t.length);let o=function(e,t,i){const n=[];let o=0;t>0&&(n[o++]=new s_(t,"",0));for(let r=0,s=e.getCount();r<s;r++){const s=e.getEndOffset(r);if(s<=t)continue;const a=e.getClassName(r);if(s>=i){n[o++]=new s_(i,a,0);break}n[o++]=new s_(s,a,0)}return n}(e.lineTokens,e.fauxIndentLength,n);e.renderControlCharacters&&!e.isBasicASCII&&(o=function(e,t){const i=[];let n=new s_(0,"",0),o=0;for(const r of t){const t=r.endIndex;for(;o<t;o++)f_(e.charCodeAt(o))&&(o>n.endIndex&&(n=new s_(o,r.type,r.metadata),i.push(n)),n=new s_(o+1,"mtkcontrol",r.metadata),i.push(n));o>n.endIndex&&(n=new s_(t,r.type,r.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,r=e.fauxIndentLength,s=e.tabSize,a=e.startVisibleColumn,l=e.useMonospaceOptimizations,c=e.selectionsOnLine,d=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,y=Su(t);-1===y?(w=!0,y=i,b=i):b=xu(t);let C=!1,S=0,k=c&&c[S],x=a%s;for(let e=r;e<i;e++){const o=t.charCodeAt(e);let a;if(k&&e>=k.endOffset&&(S++,k=c&&c[S]),e<y||e>b)a=!0;else if(9===o)a=!0;else if(32===o)if(d)if(C)a=!0;else{const n=e+1<i?t.charCodeAt(e+1):0;a=32===n||9===n}else a=!0;else a=!1;if(a&&c&&(a=!!k&&k.startOffset<=e&&k.endOffset>e),a&&h&&(a=w||e>b),C){if(!a||!l&&x>=s){if(u)for(let t=(p>0?g[p-1].endIndex:r)+1;t<=e;t++)g[p++]=new s_(t,"mtkw",1);else g[p++]=new s_(e,"mtkw",1);x%=s}}else(e===_||a&&e>r)&&(g[p++]=new s_(e,f,0),x%=s);for(9===o?x=s:Zu(o)?x+=2:x++,C=a;e===_&&(m++,m<v);)f=n[m].type,_=n[m].endIndex}let L=!1;if(C)if(o&&d){const e=i>0?t.charCodeAt(i-1):0,n=i>1?t.charCodeAt(i-2):0;32===e&&32!==n&&9!==n||(L=!0)}else L=!0;if(L)if(u)for(let e=(p>0?g[p-1].endIndex:r)+1;e<=i;e++)g[p++]=new s_(e,"mtkw",1);else g[p++]=new s_(i,"mtkw",1);else g[p++]=new s_(i,f,0);return g}(e,t,n,o));let r=0;if(e.lineDecorations.length>0){for(let t=0,i=e.lineDecorations.length;t<i;t++){const i=e.lineDecorations[t];3===i.type||1===i.type?r|=1:2===i.type&&(r|=2)}o=function(e,t,i,n){n.sort(n_.compare);const o=class{static normalize(e,t){if(0===t.length)return[];const i=[],n=new r_;let o=0;for(let r=0,s=t.length;r<s;r++){const s=t[r];let a=s.startColumn,l=s.endColumn;const c=s.className,d=1===s.type?2:2===s.type?4:0;a>1&&Pu(e.charCodeAt(a-2))&&a--,l>1&&Pu(e.charCodeAt(l-2))&&l--;const h=a-1,u=l-2;o=n.consumeLowerThan(h,o,i),0===n.count&&(o=h),n.insert(u,c,d)}return n.consumeLowerThan(1073741824,o,i),i}}.normalize(e,n),r=o.length;let s=0;const a=[];let l=0,c=0;for(let e=0,t=i.length;e<t;e++){const t=i[e],n=t.endIndex,d=t.type,h=t.metadata;for(;s<r&&o[s].startOffset<n;){const e=o[s];if(e.startOffset>c&&(c=e.startOffset,a[l++]=new s_(c,d,h)),!(e.endOffset+1<=n)){c=n,a[l++]=new s_(c,d+" "+e.className,h|e.metadata);break}c=e.endOffset+1,a[l++]=new s_(c,d+" "+e.className,h|e.metadata),s++}n>c&&(c=n,a[l++]=new s_(c,d,h))}const d=i[i.length-1].endIndex;if(s<r&&o[s].startOffset===d)for(;s<r&&o[s].startOffset===d;){const e=o[s];a[l++]=new s_(c,e.className,e.metadata),s++}return a}(t,0,o,e.lineDecorations)}return e.containsRTL||(o=function(e,t,i){let n=0;const o=[];let r=0;if(i)for(let i=0,s=t.length;i<s;i++){const s=t[i],a=s.endIndex;if(n+50<a){const t=s.type,i=s.metadata;let l=-1,c=n;for(let s=n;s<a;s++)32===e.charCodeAt(s)&&(l=s),-1!==l&&s-c>=50&&(o[r++]=new s_(l+1,t,i),c=l+1,l=-1);c!==a&&(o[r++]=new s_(a,t,i))}else o[r++]=s;n=a}else for(let e=0,i=t.length;e<i;e++){const i=t[e],s=i.endIndex,a=s-n;if(a>50){const e=i.type,t=i.metadata,l=Math.ceil(a/50);for(let i=1;i<l;i++){const s=n+50*i;o[r++]=new s_(s,e,t)}o[r++]=new s_(s,e,t)}else o[r++]=i;n=s}return o}(t,o,!e.isBasicASCII||e.fontLigatures)),new m_(e.useMonospaceOptimizations,e.canUseHalfwidthRightwardsArrow,t,n,i,o,r,e.fauxIndentLength,e.tabSize,e.startVisibleColumn,e.containsRTL,e.spaceWidth,e.renderSpaceCharCode,e.renderWhitespace,e.renderControlCharacters)}(e),t)}class g_{constructor(e,t,i,n){this.characterMapping=e,this.html=t,this.containsRTL=i,this.containsForeignElements=n}}function p_(e){const t=bp(1e4),i=u_(e,t);return new g_(i.characterMapping,t.build(),i.containsRTL,i.containsForeignElements)}class m_{constructor(e,t,i,n,o,r,s,a,l,c,d,h,u,g,p){this.fontIsMonospace=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.len=n,this.isOverflowing=o,this.parts=r,this.containsForeignElements=s,this.fauxIndentLength=a,this.tabSize=l,this.startVisibleColumn=c,this.containsRTL=d,this.spaceWidth=h,this.renderSpaceCharCode=u,this.renderWhitespace=g,this.renderControlCharacters=p}}function f_(e){return e<32?9!==e:127===e||e>=8234&&e<=8238||e>=8294&&e<=8297||e>=8206&&e<=8207||1564===e}class __{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 v_{constructor(e,t){this.tabSize=e,this.data=t}}class b_{constructor(e,t,i,n,o,r,s){this._viewLineDataBrand=void 0,this.content=e,this.continuesWithWrappedLine=t,this.minColumn=i,this.maxColumn=n,this.startVisibleColumn=o,this.tokens=r,this.inlineDecorations=s}}class w_{constructor(e,t,i,n,o,r,s,a,l,c){this.minColumn=e,this.maxColumn=t,this.content=i,this.continuesWithWrappedLine=n,this.isBasicASCII=w_.isBasicASCII(i,r),this.containsRTL=w_.containsRTL(i,this.isBasicASCII,o),this.tokens=s,this.inlineDecorations=a,this.tabSize=l,this.startVisibleColumn=c}static isBasicASCII(e,t){return!t||qu(e)}static containsRTL(e,t,i){return!(t||!i)&&$u(e)}}class y_{constructor(e,t,i){this.range=e,this.inlineClassName=t,this.type=i}}class C_{constructor(e,t,i,n){this.startOffset=e,this.endOffset=t,this.inlineClassName=i,this.inlineClassNameAffectsLetterSpacing=n}toInlineDecoration(e){return new y_(new Zd(e,this.startOffset+1,e,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}class S_{constructor(e,t){this._viewModelDecorationBrand=void 0,this.range=e,this.options=t}}class k_{constructor(e,t,i){this.color=e,this.zIndex=t,this.data=i}static cmp(e,t){return e.zIndex===t.zIndex?e.color<t.color?-1:e.color>t.color?1:0:e.zIndex-t.zIndex}}function x_(e){return"string"==typeof e}function L_(e){return!x_(e)}function E_(e){return!e}function N_(e,t){return e.ignoreCase&&t?t.toLowerCase():t}function I_(e){return e.replace(/[&<>'"_]/g,"-")}function T_(e,t){return new Error(`${e.languageId}: ${t}`)}function D_(e,t,i,n,o){let r=null;return t.replace(/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g,(function(t,s,a,l,c,d,h,u,g){return E_(a)?E_(l)?!E_(c)&&c<n.length?N_(e,n[c]):!E_(h)&&e&&"string"==typeof e[h]?e[h]:(null===r&&(r=o.split("."),r.unshift(o)),!E_(d)&&d<r.length?N_(e,r[d]):""):N_(e,i):"$"}))}function A_(e,t){let i=t;for(;i&&i.length>0;){const t=e.tokenizer[i];if(t)return t;const n=i.lastIndexOf(".");i=n<0?null:i.substr(0,n)}return null}class O_{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 M_(e,t);let i=M_.getStackElementId(e);i.length>0&&(i+="|"),i+=t;let n=this._entries[i];return n||(n=new M_(e,t),this._entries[i]=n,n)}}O_._INSTANCE=new O_(5);class M_{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 M_._equals(this,e)}push(e){return O_.create(this,e)}pop(){return this.parent}popall(){let e=this;for(;e.parent;)e=e.parent;return e}switchTo(e){return O_.create(this.parent,e)}}class R_{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 R_(this.languageId,this.state)}}class P_{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 F_(e,t);if(null!==e&&e.depth>=this._maxCacheDepth)return new F_(e,t);const i=M_.getStackElementId(e);let n=this._entries[i];return n||(n=new F_(e,null),this._entries[i]=n,n)}}P_._INSTANCE=new P_(5);class F_{constructor(e,t){this.stack=e,this.embeddedLanguageData=t}clone(){return(this.embeddedLanguageData?this.embeddedLanguageData.clone():null)===this.embeddedLanguageData?this:P_.create(this.stack,this.embeddedLanguageData)}equals(e){return e instanceof F_&&!!this.stack.equals(e.stack)&&(null===this.embeddedLanguageData&&null===e.embeddedLanguageData||null!==this.embeddedLanguageData&&null!==e.embeddedLanguageData&&this.embeddedLanguageData.equals(e.embeddedLanguageData))}}class B_{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 dh(e,t,this._languageId)))}nestedLanguageTokenize(e,t,i,n){const o=i.languageId,r=i.state,s=ph.get(o);if(!s)return this.enterLanguage(o),this.emit(n,""),r;const a=s.tokenize(e,t,r);if(0!==n)for(const e of a.tokens)this._tokens.push(new dh(e.offset+n,e.type,e.language));else this._tokens=this._tokens.concat(a.tokens);return this._lastTokenType=null,this._lastTokenLanguage=null,this._languageId=null,a.endState}finalize(e){return new hh(this._tokens,e)}}class W_{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,r=null!==i?i.length:0;if(0===n&&0===o&&0===r)return new Uint32Array(0);if(0===n&&0===o)return i;if(0===o&&0===r)return e;const s=new Uint32Array(n+o+r);null!==e&&s.set(e);for(let e=0;e<o;e++)s[n+e]=t[e];return null!==i&&s.set(i,n+o),s}nestedLanguageTokenize(e,t,i,n){const o=i.languageId,r=i.state,s=ph.get(o);if(!s)return this.enterLanguage(o),this.emit(n,""),r;const a=s.tokenizeEncoded(e,t,r);if(0!==n)for(let e=0,t=a.tokens.length;e<t;e+=2)a.tokens[e]+=n;return this._prependTokens=W_._merge(this._prependTokens,this._tokens,a.tokens),this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0,a.endState}finalize(e){return new uh(W_._merge(this._prependTokens,this._tokens,null),e)}}class V_{constructor(e,t,i,n){this._languageService=e,this._standaloneThemeService=t,this._languageId=i,this._lexer=n,this._embeddedLanguages=Object.create(null),this.embeddedLoaded=Promise.resolve(void 0);let o=!1;this._tokenizationRegistryListener=ph.onDidChange((e=>{if(o)return;let t=!1;for(let i=0,n=e.changedLanguages.length;i<n;i++){const n=e.changedLanguages[i];if(this._embeddedLanguages[n]){t=!0;break}}t&&(o=!0,ph.fire([this._languageId]),o=!1)}))}dispose(){this._tokenizationRegistryListener.dispose()}getLoadStatus(){const e=[];for(let t in this._embeddedLanguages){const i=ph.get(t);if(i){if(i instanceof V_){const t=i.getLoadStatus();!1===t.loaded&&e.push(t.promise)}}else ph.isResolved(t)||e.push(ph.getOrCreate(t))}return 0===e.length?{loaded:!0}:{loaded:!1,promise:Promise.all(e).then((e=>{}))}}getInitialState(){const e=O_.create(null,this._lexer.start);return P_.create(e,null)}tokenize(e,t,i){const n=new B_,o=this._tokenize(e,t,i,n);return n.finalize(o)}tokenizeEncoded(e,t,i){const n=new W_(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=A_(this._lexer,t.stack.state),!i))throw T_(this._lexer,"tokenizer state is not defined: "+t.stack.state);let n=-1,o=!1;for(const t of i){if(!L_(t.action)||"@pop"!==t.action.nextEmbedded)continue;o=!0;let i=t.regex;const r=t.regex.source;if("^(?:"===r.substr(0,4)&&")"===r.substr(r.length-1,1)){const e=(i.ignoreCase?"i":"")+(i.unicode?"u":"");i=new RegExp(r.substr(4,r.length-5),e)}const s=e.search(i);-1===s||0!==s&&t.matchOnlyAtLineStart||(-1===n||s<n)&&(n=s)}if(!o)throw T_(this._lexer,'no rule containing nextEmbedded: "@pop" in tokenizer embedded state: '+t.stack.state);return n}_nestedTokenize(e,t,i,n,o){const r=this._findLeavingNestedLanguageOffset(e,i);if(-1===r){const r=o.nestedLanguageTokenize(e,t,i.embeddedLanguageData,n);return P_.create(i.stack,new R_(i.embeddedLanguageData.languageId,r))}const s=e.substring(0,r);s.length>0&&o.nestedLanguageTokenize(s,!1,i.embeddedLanguageData,n);const a=e.substring(r);return this._myTokenize(a,t,i,n+r,o)}_safeRuleName(e){return e?e.name:"(unknown)"}_myTokenize(e,t,i,n,o){o.enterLanguage(this._languageId);const r=e.length,s=t&&this._lexer.includeLF?e+"\n":e,a=s.length;let l=i.embeddedLanguageData,c=i.stack,d=0,h=null,u=!0;for(;u||d<a;){const i=d,m=c.depth,f=h?h.groups.length:0,_=c.state;let v=null,b=null,w=null,y=null,C=null;if(h){v=h.matches;const e=h.groups.shift();b=e.matched,w=e.action,y=h.rule,0===h.groups.length&&(h=null)}else{if(!u&&d>=a)break;u=!1;let e=this._lexer.tokenizer[_];if(!e&&(e=A_(this._lexer,_),!e))throw T_(this._lexer,"tokenizer state is not defined: "+_);let t=s.substr(d);for(const i of e)if((0===d||!i.matchOnlyAtLineStart)&&(v=t.match(i.regex),v)){b=v[0],w=i.action;break}}if(v||(v=[""],b=""),w||(d<a&&(v=[s.charAt(d)],b=v[0]),w=this._lexer.defaultToken),null===b)break;for(d+=b.length;!function(e){return Array.isArray(e)}(w)&&L_(w)&&w.test;)w=w.test(b,v,_,d===a);let S=null;if("string"==typeof w||Array.isArray(w))S=w;else if(w.group)S=w.group;else if(null!==w.token&&void 0!==w.token){if(S=w.tokenSubst?D_(this._lexer,w.token,b,v,_):w.token,w.nextEmbedded)if("@pop"===w.nextEmbedded){if(!l)throw T_(this._lexer,"cannot pop embedded language if not inside one");l=null}else{if(l)throw T_(this._lexer,"cannot enter embedded language from within an embedded language");C=D_(this._lexer,w.nextEmbedded,b,v,_)}if(w.goBack&&(d=Math.max(0,d-w.goBack)),w.switchTo&&"string"==typeof w.switchTo){let e=D_(this._lexer,w.switchTo,b,v,_);if("@"===e[0]&&(e=e.substr(1)),!A_(this._lexer,e))throw T_(this._lexer,"trying to switch to a state '"+e+"' that is undefined in rule: "+this._safeRuleName(y));c=c.switchTo(e)}else{if(w.transform&&"function"==typeof w.transform)throw T_(this._lexer,"action.transform not supported");if(w.next)if("@push"===w.next){if(c.depth>=this._lexer.maxStack)throw T_(this._lexer,"maximum tokenizer stack size reached: ["+c.state+","+c.parent.state+",...]");c=c.push(_)}else if("@pop"===w.next){if(c.depth<=1)throw T_(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(y));c=c.pop()}else if("@popall"===w.next)c=c.popall();else{let e=D_(this._lexer,w.next,b,v,_);if("@"===e[0]&&(e=e.substr(1)),!A_(this._lexer,e))throw T_(this._lexer,"trying to set a next state '"+e+"' that is undefined in rule: "+this._safeRuleName(y));c=c.push(e)}}w.log&&"string"==typeof w.log&&(g=this._lexer,p=this._lexer.languageId+": "+D_(this._lexer,w.log,b,v,_),console.log(`${g.languageId}: ${p}`))}if(null===S)throw T_(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(y));const k=i=>{const r=this._languageService.getLanguageIdByLanguageName(i)||this._languageService.getLanguageIdByMimeType(i)||i,s=this._getNestedEmbeddedLanguageData(r);if(d<a){const i=e.substr(d);return this._nestedTokenize(i,t,P_.create(c,s),n+d,o)}return P_.create(c,s)};if(Array.isArray(S)){if(h&&h.groups.length>0)throw T_(this._lexer,"groups cannot be nested: "+this._safeRuleName(y));if(v.length!==S.length+1)throw T_(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(y));let e=0;for(let t=1;t<v.length;t++)e+=v[t].length;if(e!==b.length)throw T_(this._lexer,"with groups, all characters should be matched in consecutive groups in rule: "+this._safeRuleName(y));h={rule:y,matches:v,groups:[]};for(let e=0;e<S.length;e++)h.groups[e]={action:S[e],matched:v[e+1]};d-=b.length}else{{if("@rematch"===S&&(d-=b.length,b="",v=null,S="",null!==C))return k(C);if(0===b.length){if(0===a||m!==c.depth||_!==c.state||(h?h.groups.length:0)!==f)continue;throw T_(this._lexer,"no progress in tokenizer in rule: "+this._safeRuleName(y))}let e=null;if(x_(S)&&0===S.indexOf("@brackets")){const t=S.substr("@brackets".length),i=z_(this._lexer,b);if(!i)throw T_(this._lexer,"@brackets token returned but no bracket defined as: "+b);e=I_(i.token+t)}else e=I_(""===S?"":S+this._lexer.tokenPostfix);i<r&&o.emit(i+n,e)}if(null!==C)return k(C)}}var g,p;return P_.create(c,l)}_getNestedEmbeddedLanguageData(e){if(!this._languageService.isRegisteredLanguageId(e))return new R_(e,sm);e!==this._languageId&&(ph.getOrCreate(e),this._embeddedLanguages[e]=!0);const t=ph.get(e);return new R_(e,t?t.getInitialState():sm)}}function z_(e,t){if(!t)return null;t=N_(e,t);const i=e.brackets;for(const e of i){if(e.open===t)return{token:e.token,bracketType:1};if(e.close===t)return{token:e.token,bracketType:-1}}return null}var j_;const H_=null===(j_=window.trustedTypes)||void 0===j_?void 0:j_.createPolicy("standaloneColorizer",{createHTML:e=>e});class U_{static colorizeElement(e,t,i,n){const o=(n=n||{}).theme||"vs",r=n.mimeType||i.getAttribute("lang")||i.getAttribute("data-lang");if(!r)return console.error("Mode not detected"),Promise.resolve();const s=t.getLanguageIdByMimeType(r)||r;e.setTheme(o);const a=i.firstChild?i.firstChild.nodeValue:"";return i.className+=" "+o,this.colorize(t,a||"",s,n).then((e=>{var t;const n=null!==(t=null==H_?void 0:H_.createHTML(e))&&void 0!==t?t:e;i.innerHTML=n}),(e=>console.error(e)))}static colorize(e,t,i,n){return o=this,r=void 0,a=function*(){const o=e.languageIdCodec;let r=4;n&&"number"==typeof n.tabSize&&(r=n.tabSize),Qu(t)&&(t=t.substr(1));const s=Cu(t);if(!e.isRegisteredLanguageId(i))return $_(s,r,o);const a=yield ph.getOrCreate(i);return a?function(e,t,i,n){return new Promise(((o,r)=>{const s=()=>{const a=function(e,t,i,n){let o=[],r=i.getInitialState();for(let s=0,a=e.length;s<a;s++){const a=e[s],l=i.tokenizeEncoded(a,!0,r);t_.convertToEndOffset(l.tokens,a.length);const c=new t_(l.tokens,a,n),d=w_.isBasicASCII(a,!0),h=w_.containsRTL(a,d,!0),u=p_(new l_(!1,!0,a,!1,d,h,0,c.inflate(),[],t,0,0,0,0,-1,"none",!1,!1,null));o=o.concat(u.html),o.push("<br/>"),r=l.endState}return o.join("")}(e,t,i,n);if(i instanceof V_){const e=i.getLoadStatus();if(!1===e.loaded)return void e.promise.then(s,r)}o(a)};s()}))}(s,r,a,o):$_(s,r,o)},new((s=void 0)||(s=Promise))((function(e,t){function i(e){try{l(a.next(e))}catch(e){t(e)}}function n(e){try{l(a.throw(e))}catch(e){t(e)}}function l(t){var o;t.done?e(t.value):(o=t.value,o instanceof s?o:new s((function(e){e(o)}))).then(i,n)}l((a=a.apply(o,r||[])).next())}));var o,r,s,a}static colorizeLine(e,t,i,n,o=4){const r=w_.isBasicASCII(e,t),s=w_.containsRTL(e,r,i);return p_(new l_(!1,!0,e,!1,r,s,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 $_(e,t,i){let n=[];const o=new Uint32Array(2);o[0]=0,o[1]=16793600;for(let r=0,s=e.length;r<s;r++){const s=e[r];o[0]=s.length;const a=new t_(o,s,i),l=w_.isBasicASCII(s,!0),c=w_.containsRTL(s,l,!0),d=p_(new l_(!1,!0,s,!1,l,c,0,a,[],t,0,0,0,0,-1,"none",!1,!1,null));n=n.concat(d.html),n.push("<br/>")}return n.join("")}Ba||document.queryCommandSupported&&document.queryCommandSupported("copy")||navigator&&navigator.clipboard&&navigator.clipboard.writeText,Ba||navigator&&navigator.clipboard&&navigator.clipboard.readText,Ba||bg||navigator.keyboard,"ontouchstart"in window||navigator.maxTouchPoints;const K_=window.PointerEvent&&("ontouchstart"in window||window.navigator.maxTouchPoints>0||navigator.maxTouchPoints>0);function q_(e,t){if(0===e)return null;const i=(65535&e)>>>0,n=(4294901760&e)>>>16;return new Z_(0!==n?[G_(i,t),G_(n,t)]:[G_(i,t)])}function G_(e,t){const i=!!(2048&e),n=!!(256&e);return new Y_(2===t?n:i,!!(1024&e),!!(512&e),2===t?i:n,255&e)}class Y_{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 Z_([this])}isDuplicateModifierCase(){return this.ctrlKey&&5===this.keyCode||this.shiftKey&&4===this.keyCode||this.altKey&&6===this.keyCode||this.metaKey&&57===this.keyCode}}class Z_{constructor(e){if(0===e.length)throw bc("parts");this.parts=e}}class X_{constructor(e,t,i,n,o,r){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyLabel=o,this.keyAriaLabel=r}}const J_=Pa?256:2048,Q_=Pa?2048:256;class ev{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 sd.fromString(t)}const t=e.keyCode;if(3===t)return 7;if(ug){if(59===t)return 80;if(107===t)return 81;if(109===t)return 83;if(Pa&&224===t)return 57}else if(gg){if(91===t)return 57;if(Pa&&93===t)return 57;if(!Pa&&92===t)return 57}return Qc[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|=J_),this.altKey&&(t|=512),this.shiftKey&&(t|=1024),this.metaKey&&(t|=Q_),t|=e,t}_computeRuntimeKeybinding(){let e=0;return 5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode),new Y_(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}}let tv=!1,iv=null;function nv(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 tv=!0,null}catch(e){return tv=!0,null}return e.parent}class ov{static getSameOriginWindowChain(){if(!iv){iv=[];let e,t=window;do{e=nv(t),e?iv.push({window:t,iframeElement:t.frameElement||null}):iv.push({window:t,iframeElement:null}),t=e}while(t)}return iv.slice(0)}static hasDifferentOriginAncestor(){return iv||this.getSameOriginWindowChain(),tv}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let i=0,n=0,o=this.getSameOriginWindowChain();for(const e of o){if(i+=e.window.scrollY,n+=e.window.scrollX,e.window===t)break;if(!e.iframeElement)break;let o=e.iframeElement.getBoundingClientRect();i+=o.top,n+=o.left}return{top:i,left:n}}}class rv{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=ov.getPositionOfChildWindowRelativeToAncestorWindow(self,e.view);this.posx-=t.left,this.posy-=t.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class sv{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=ug&&!Pa?-e.deltaY/3:-e.deltaY:this.deltaY=-e.deltaY/40}if(void 0!==t.wheelDeltaX)this.deltaX=mg&&Ra?-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=ug&&!Pa?-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 av;!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"}(av||(av={}));const lv=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 r=`path=${encodeURIComponent(e.path)}`;return"string"==typeof o&&(r+=`&tkn=${encodeURIComponent(o)}`),Bd.from({scheme:Wa?this._preferredWebSchema:av.vscodeRemoteResource,authority:`${i}:${n}`,path:"/vscode-remote-resource",query:r})}};class cv{asBrowserUri(e,t){const i=this.toUri(e,t);return i.scheme===av.vscodeRemote?lv.rewrite(i):i.scheme===av.file&&(Ba||Va&&Ta.origin===`${av.vscodeFileResource}://${cv.FALLBACK_AUTHORITY}`)?i.with({scheme:av.vscodeFileResource,authority:i.authority||cv.FALLBACK_AUTHORITY,query:null,fragment:null}):i}toUri(e,t){return Bd.isUri(e)?e:Bd.parse(t.toUrl(e))}}cv.FALLBACK_AUTHORITY="vscode-app";const dv=new cv;function hv(e){for(;e.firstChild;)e.firstChild.remove()}function uv(e){var t;return null!==(t=null==e?void 0:e.isConnected)&&void 0!==t&&t}class gv{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 pv(e,t,i,n){return new gv(e,t,i,n)}let mv=function(e,t,i,n){let o=i;return"click"===t||"mousedown"===t?o=function(e){return function(t){return e(new rv(t))}}(i):"keydown"!==t&&"keypress"!==t&&"keyup"!==t||(o=function(e){return function(t){return e(new ev(t))}}(i)),pv(e,t,o,n)};function fv(e,t){return pv(e,"mouseout",(i=>{let n=i.relatedTarget;for(;n&&n!==e;)n=n.parentNode;n!==e&&t(i)}))}function _v(e,t,i){let n=null;const o=e=>r.fire(e),r=new Vc({onFirstListenerAdd:()=>{n||(n=new gv(e,t,o,i))},onLastListenerRemove:()=>{n&&(n.dispose(),n=null)}});return r}let vv,bv,wv=null;class yv{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){gc(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(yv.sort),t.shift().execute();n=!1};bv=(t,n=0)=>{let r=new yv(t,n);return e.push(r),i||(i=!0,function(e){if(!wv){const e=e=>setTimeout((()=>e((new Date).getTime())),0);wv=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame||e}wv.call(self,e)}(o)),r},vv=(e,i)=>{if(n){let n=new yv(e,i);return t.push(n),n}return bv(e,i)}}();const Cv=function(e,t){return t};class Sv extends Nc{constructor(e,t,i,n=Cv,o=8){super();let r=null,s=0,a=this._register(new _m),l=()=>{s=(new Date).getTime(),i(r),r=null};this._register(pv(e,t,(e=>{r=n(r,e);let t=(new Date).getTime()-s;t>=o?(a.cancel(),l()):a.setIfNotSet(l,o-t)})))}}function kv(e,t,i,n,o){return new Sv(e,t,i,n,o)}function xv(e){return document.defaultView.getComputedStyle(e,null)}function Lv(e){if(e!==document.body)return new Nv(e.clientWidth,e.clientHeight);if(za&&window.visualViewport)return new Nv(window.visualViewport.width,window.visualViewport.height);if(window.innerWidth&&window.innerHeight)return new Nv(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientHeight)return new Nv(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new Nv(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}class Ev{static convertToPixels(e,t){return parseFloat(t)||0}static getDimension(e,t,i){let n=xv(e),o="0";return n&&(o=n.getPropertyValue?n.getPropertyValue(t):n.getAttribute(i)),Ev.convertToPixels(e,o)}static getBorderLeftWidth(e){return Ev.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){return Ev.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return Ev.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return Ev.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return Ev.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return Ev.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return Ev.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return Ev.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return Ev.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return Ev.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return Ev.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return Ev.getDimension(e,"margin-bottom","marginBottom")}}class Nv{constructor(e,t){this.width=e,this.height=t}with(e=this.width,t=this.height){return e!==this.width||t!==this.height?new Nv(e,t):this}static is(e){return"object"==typeof e&&"number"==typeof e.height&&"number"==typeof e.width}static lift(e){return e instanceof Nv?e:new Nv(e.width,e.height)}static equals(e,t){return e===t||!(!e||!t)&&e.width===t.width&&e.height===t.height}}function Iv(e){let t=e.getBoundingClientRect();return{left:t.left+Tv.scrollX,top:t.top+Tv.scrollY,width:t.width,height:t.height}}Nv.None=new Nv(0,0);const Tv=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 Dv(e){let t=Ev.getMarginLeft(e)+Ev.getMarginRight(e);return e.offsetWidth+t}function Av(e){let t=Ev.getBorderLeftWidth(e)+Ev.getBorderRightWidth(e),i=Ev.getPaddingLeft(e)+Ev.getPaddingRight(e);return e.offsetWidth-t-i}function Ov(e){let t=Ev.getBorderTopWidth(e)+Ev.getBorderBottomWidth(e),i=Ev.getPaddingTop(e)+Ev.getPaddingBottom(e);return e.offsetHeight-t-i}function Mv(e){let t=Ev.getMarginTop(e)+Ev.getMarginBottom(e);return e.offsetHeight+t}function Rv(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function Pv(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 Fv(e,t,i){return!!Pv(e,t,i)}function Bv(e){return e&&!!e.host&&!!e.mode}function Wv(e){return!!Vv(e)}function Vv(e){for(;e.parentNode;){if(e===document.body)return null;e=e.parentNode}return Bv(e)?e:null}function zv(){let e=document.activeElement;for(;null==e?void 0:e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function jv(e=document.getElementsByTagName("head")[0]){let t=document.createElement("style");return t.type="text/css",t.media="screen",e.appendChild(t),t}let Hv=null;function Uv(e,t,i=function(){return Hv||(Hv=jv()),Hv}()){i&&t&&i.sheet.insertRule(e+"{"+t+"}",0)}function $v(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName}const Kv={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:gg?"webkitAnimationStart":"animationstart",ANIMATION_END:gg?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:gg?"webkitAnimationIteration":"animationiteration"},qv=function(e,t){e.preventDefault?e.preventDefault():e.returnValue=!1,t&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)};class Gv extends Nc{constructor(e){super(),this._onDidFocus=this._register(new Vc),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new Vc),this.onDidBlur=this._onDidBlur.event;let t=Gv.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=()=>{Gv.hasFocusWithin(e)!==t&&(t?o():n())},this._register(pv(e,Kv.FOCUS,n,!0)),this._register(pv(e,Kv.BLUR,o,!0)),this._register(pv(e,Kv.FOCUS_IN,(()=>this._refreshStateHandler()))),this._register(pv(e,Kv.FOCUS_OUT,(()=>this._refreshStateHandler())))}static hasFocusWithin(e){const t=Vv(e);return Rv(t?t.activeElement:document.activeElement,e)}}function Yv(e){return new Gv(e)}function Zv(e,...t){if(e.append(...t),1===t.length&&"string"!=typeof t[0])return t[0]}function Xv(e,...t){e.innerText="",Zv(e,...t)}const Jv=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var Qv;function eb(e,t,i,...n){let o=Jv.exec(t);if(!o)throw new Error("Bad use of emmet");i=Object.assign({},i||{});let r,s=o[1]||"div";return r=e!==Qv.HTML?document.createElementNS(e,s):document.createElement(s),o[3]&&(r.id=o[3]),o[4]&&(r.className=o[4].replace(/\./g," ").trim()),Object.keys(i).forEach((e=>{const t=i[e];void 0!==t&&(/^on\w+$/.test(e)?r[e]=t:"selected"===e?t&&r.setAttribute(e,"true"):r.setAttribute(e,t))})),r.append(...n),r}function tb(e,t,...i){return eb(Qv.HTML,e,t,...i)}function ib(...e){for(let t of e)t.style.display="",t.removeAttribute("aria-hidden")}function nb(...e){for(let t of e)t.style.display="none",t.setAttribute("aria-hidden","true")}function ob(e){const t=window.devicePixelRatio*e;return Math.max(1,Math.floor(t))/window.devicePixelRatio}function rb(e){window.open(e,"_blank","noopener")}function sb(e){return e?`url('${dv.asBrowserUri(e).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function ab(e){return`'${e.replace(/'/g,"%27")}'`}!function(e){e.HTML="http://www.w3.org/1999/xhtml",e.SVG="http://www.w3.org/2000/svg"}(Qv||(Qv={})),tb.SVG=function(e,t,...i){return eb(Qv.SVG,e,t,...i)},lv.setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http");class lb extends Vc{constructor(){super(),this._subscriptions=new Ec,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(pv(window,"keydown",(e=>{if(e.defaultPrevented)return;const t=new ev(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(pv(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(pv(document.body,"mousedown",(()=>{this._keyStatus.lastKeyPressed=void 0}),!0)),this._subscriptions.add(pv(document.body,"mouseup",(()=>{this._keyStatus.lastKeyPressed=void 0}),!0)),this._subscriptions.add(pv(document.body,"mousemove",(e=>{e.buttons&&(this._keyStatus.lastKeyPressed=void 0)}),!0)),this._subscriptions.add(pv(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 lb.instance||(lb.instance=new lb),lb.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}var cb=i(93),db={};let hb,ub,gb,pb,mb;function fb(e){hb&&(ub.textContent!==e?(hv(gb),_b(ub,e)):(hv(ub),_b(gb,e)))}function _b(e,t){hv(e),t.length>2e4&&(t=t.substr(0,2e4)),e.textContent=t,e.style.visibility="hidden",e.style.visibility="visible"}db.styleTagTransform=uu(),db.setAttributes=lu(),db.insert=su().bind(null,"head"),db.domAPI=ou(),db.insertStyleElement=du(),iu()(cb.Z,db),cb.Z&&cb.Z.locals&&cb.Z.locals;const vb=Mg("markerDecorationsService"),bb=Mg("textModelService");var wb=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class yb extends Nc{constructor(e,t="",i="",n=!0,o){super(),this._onDidChange=this._register(new Vc),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 wb(this,void 0,void 0,(function*(){this._actionCallback&&(yield this._actionCallback(e))}))}}class Cb extends Nc{constructor(){super(...arguments),this._onBeforeRun=this._register(new Vc),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new Vc),this.onDidRun=this._onDidRun.event}run(e,t){return wb(this,void 0,void 0,(function*(){if(!e.enabled)return;let i;this._onBeforeRun.fire({action:e});try{yield this.runAction(e,t)}catch(e){i=e}this._onDidRun.fire({action:e,error:i})}))}runAction(e,t){return wb(this,void 0,void 0,(function*(){yield e.run(t)}))}}class Sb extends yb{constructor(e){super(Sb.ID,e,e?"separator text":"separator"),this.checked=!1,this.enabled=!1}}Sb.ID="vs.actions.separator";class kb{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 wb(this,void 0,void 0,(function*(){}))}}class xb extends yb{constructor(){super(xb.ID,ma(0,"(empty)"),void 0,!1)}}xb.ID="vs.actions.empty";const Lb=Mg("commandService"),Eb=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new Vc,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 i of e.description.args)t.push(i.constraint);const i=e.handler;e.handler=function(e,...n){return function(e,t){const i=Math.min(e.length,t.length);for(let n=0;n<i;n++)Nl(e[n],t[n])}(n,t),i(e,...n)}}const{id:i}=e;let n=this._commands.get(i);n||(n=new Oc,this._commands.set(i,n));let o=n.unshift(e),r=Lc((()=>{o();const e=this._commands.get(i);(null==e?void 0:e.isEmpty())&&this._commands.delete(i)}));return this._onDidRegisterCommand.fire(i),r}registerCommandAlias(e,t){return Eb.registerCommand(e,((e,...i)=>e.get(Lb).executeCommand(t,...i)))}getCommand(e){const t=this._commands.get(e);if(t&&!t.isEmpty())return Cc.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}};Eb.registerCommand("noop",(()=>{}));const Nb=new Map;Nb.set("false",!1),Nb.set("true",!0),Nb.set("isMac",Pa),Nb.set("isLinux",Fa),Nb.set("isWindows",Ra),Nb.set("isWeb",Wa),Nb.set("isMacNative",Pa&&!Wa),Nb.set("isEdge",Xa),Nb.set("isFirefox",Ya),Nb.set("isChrome",Ga),Nb.set("isSafari",Za);const Ib=Object.prototype.hasOwnProperty;class Tb{static has(e){return Mb.create(e)}static equals(e,t){return Rb.create(e,t)}static regex(e,t){return $b.create(e,t)}static not(e){return Wb.create(e)}static and(...e){return Gb.create(e,null)}static or(...e){return Yb.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 Yb.create(i.map((e=>this._deserializeAndExpression(e,t))),null,!0)}static _deserializeAndExpression(e,t){let i=e.split("&&");return Gb.create(i.map((e=>this._deserializeOne(e,t))),null)}static _deserializeOne(e,t){if((e=e.trim()).indexOf("!=")>=0){let i=e.split("!=");return Bb.create(i[0].trim(),this._deserializeValue(i[1],t))}if(e.indexOf("==")>=0){let i=e.split("==");return Rb.create(i[0].trim(),this._deserializeValue(i[1],t))}if(e.indexOf("=~")>=0){let i=e.split("=~");return $b.create(i[0].trim(),this._deserializeRegexValue(i[1],t))}if(e.indexOf(" in ")>=0){let t=e.split(" in ");return Pb.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(e)){const t=e.split(">=");return jb.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(e)){const t=e.split(">");return zb.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(e)){const t=e.split("<=");return Ub.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(e)){const t=e.split("<");return Hb.create(t[0].trim(),t[1].trim())}return/^\!\s*/.test(e)?Wb.create(e.substr(1).trim()):Mb.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(!(i=e)||"string"!=typeof i||0===i.trim().length){if(t)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}var i;let n=e.indexOf("/"),o=e.lastIndexOf("/");if(n===o||n<0){if(t)throw new Error(`bad regexp-value '${e}', missing /-enclosure`);return console.warn(`bad regexp-value '${e}', missing /-enclosure`),null}let r=e.slice(n+1,o),s="i"===e[o+1]?"i":"";try{return new RegExp(r,s)}catch(i){if(t)throw new Error(`bad regexp-value '${e}', parse error: ${i}`);return console.warn(`bad regexp-value '${e}', parse error: ${i}`),null}}}function Db(e,t){return e.cmp(t)}class Ab{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 Ob.INSTANCE}}Ab.INSTANCE=new Ab;class Ob{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 Ab.INSTANCE}}Ob.INSTANCE=new Ob;class Mb{constructor(e,t){this.key=e,this.negated=t,this.type=2}static create(e,t=null){const i=Nb.get(e);return"boolean"==typeof i?i?Ob.INSTANCE:Ab.INSTANCE:new Mb(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:Jb(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=Nb.get(this.key);return"boolean"==typeof e?e?Ob.INSTANCE:Ab.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=Wb.create(this.key,this)),this.negated}}class Rb{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?Mb.create(e,i):Wb.create(e,i);const n=Nb.get(e);return"boolean"==typeof n?t===(n?"true":"false")?Ob.INSTANCE:Ab.INSTANCE:new Rb(e,t,i)}cmp(e){return e.type!==this.type?this.type-e.type:Qb(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=Nb.get(this.key);if("boolean"==typeof e){const t=e?"true":"false";return this.value===t?Ob.INSTANCE:Ab.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=Bb.create(this.key,this.value,this)),this.negated}}class Pb{constructor(e,t){this.key=e,this.valueKey=t,this.type=10,this.negated=null}static create(e,t){return new Pb(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:Qb(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&&Ib.call(t,i)}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=Fb.create(this)),this.negated}}class Fb{constructor(e){this._actual=e,this.type=11}static create(e){return new Fb(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 Bb{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?Wb.create(e,i):Mb.create(e,i);const n=Nb.get(e);return"boolean"==typeof n?t===(n?"true":"false")?Ab.INSTANCE:Ob.INSTANCE:new Bb(e,t,i)}cmp(e){return e.type!==this.type?this.type-e.type:Qb(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=Nb.get(this.key);if("boolean"==typeof e){const t=e?"true":"false";return this.value===t?Ab.INSTANCE:Ob.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=Rb.create(this.key,this.value,this)),this.negated}}class Wb{constructor(e,t){this.key=e,this.negated=t,this.type=3}static create(e,t=null){const i=Nb.get(e);return"boolean"==typeof i?i?Ab.INSTANCE:Ob.INSTANCE:new Wb(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:Jb(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=Nb.get(this.key);return"boolean"==typeof e?e?Ab.INSTANCE:Ob.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Mb.create(this.key,this)),this.negated}}function Vb(e,t){if("string"==typeof e){const t=parseFloat(e);isNaN(t)||(e=t)}return"string"==typeof e||"number"==typeof e?t(e):Ab.INSTANCE}class zb{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=12}static create(e,t,i=null){return Vb(t,(t=>new zb(e,t,i)))}cmp(e){return e.type!==this.type?this.type-e.type:Qb(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=Ub.create(this.key,this.value,this)),this.negated}}class jb{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=13}static create(e,t,i=null){return Vb(t,(t=>new jb(e,t,i)))}cmp(e){return e.type!==this.type?this.type-e.type:Qb(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=Hb.create(this.key,this.value,this)),this.negated}}class Hb{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=14}static create(e,t,i=null){return Vb(t,(t=>new Hb(e,t,i)))}cmp(e){return e.type!==this.type?this.type-e.type:Qb(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=jb.create(this.key,this.value,this)),this.negated}}class Ub{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=15}static create(e,t,i=null){return Vb(t,(t=>new Ub(e,t,i)))}cmp(e){return e.type!==this.type?this.type-e.type:Qb(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=zb.create(this.key,this.value,this)),this.negated}}class $b{constructor(e,t){this.key=e,this.regexp=t,this.type=7,this.negated=null}static create(e,t){return new $b(e,t)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.key<e.key)return-1;if(this.key>e.key)return 1;const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return t<i?-1:t>i?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=Kb.create(this)),this.negated}}class Kb{constructor(e){this._actual=e,this.type=8}static create(e){return new Kb(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 qb(e){let t=null;for(let i=0,n=e.length;i<n;i++){const n=e[i].substituteConstants();if(e[i]!==n&&null===t){t=[];for(let n=0;n<i;n++)t[n]=e[n]}null!==t&&(t[i]=n)}return null===t?e:t}class Gb{constructor(e,t){this.expr=e,this.negated=t,this.type=6}static create(e,t){return Gb._normalizeArr(e,t)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.length<e.expr.length)return-1;if(this.expr.length>e.expr.length)return 1;for(let t=0,i=this.expr.length;t<i;t++){const i=Db(this.expr[t],e.expr[t]);if(0!==i)return i}return 0}equals(e){if(e.type===this.type){if(this.expr.length!==e.expr.length)return!1;for(let t=0,i=this.expr.length;t<i;t++)if(!this.expr[t].equals(e.expr[t]))return!1;return!0}return!1}substituteConstants(){const e=qb(this.expr);return e===this.expr?this:Gb.create(e,this.negated)}evaluate(e){for(let t=0,i=this.expr.length;t<i;t++)if(!this.expr[t].evaluate(e))return!1;return!0}static _normalizeArr(e,t){const i=[];let n=!1;for(const t of e)if(t)if(1!==t.type){if(0===t.type)return Ab.INSTANCE;6!==t.type?i.push(t):i.push(...t.expr)}else n=!0;if(0===i.length&&n)return Ob.INSTANCE;if(0!==i.length){if(1===i.length)return i[0];i.sort(Db);for(let e=1;e<i.length;e++)i[e-1].equals(i[e])&&(i.splice(e,1),e--);if(1===i.length)return i[0];for(;i.length>1;){const e=i[i.length-1];if(9!==e.type)break;i.pop();const t=i.pop(),n=0===i.length,o=Yb.create(e.expr.map((e=>Gb.create([e,t],null))),null,n);o&&(i.push(o),i.sort(Db))}return 1===i.length?i[0]:new Gb(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=Yb.create(e,this,!0)}return this.negated}}class Yb{constructor(e,t){this.expr=e,this.negated=t,this.type=9}static create(e,t,i){return Yb._normalizeArr(e,t,i)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.length<e.expr.length)return-1;if(this.expr.length>e.expr.length)return 1;for(let t=0,i=this.expr.length;t<i;t++){const i=Db(this.expr[t],e.expr[t]);if(0!==i)return i}return 0}equals(e){if(e.type===this.type){if(this.expr.length!==e.expr.length)return!1;for(let t=0,i=this.expr.length;t<i;t++)if(!this.expr[t].equals(e.expr[t]))return!1;return!0}return!1}substituteConstants(){const e=qb(this.expr);return e===this.expr?this:Yb.create(e,this.negated,!1)}evaluate(e){for(let t=0,i=this.expr.length;t<i;t++)if(this.expr[t].evaluate(e))return!0;return!1}static _normalizeArr(e,t,i){let n=[],o=!1;if(e){for(let t=0,i=e.length;t<i;t++){const i=e[t];if(i)if(0!==i.type){if(1===i.type)return Ob.INSTANCE;9!==i.type?n.push(i):n=n.concat(i.expr)}else o=!0}if(0===n.length&&o)return Ab.INSTANCE;n.sort(Db)}if(0!==n.length){if(1===n.length)return n[0];for(let e=1;e<n.length;e++)n[e-1].equals(n[e])&&(n.splice(e,1),e--);if(1===n.length)return n[0];if(i){for(let e=0;e<n.length;e++)for(let t=e+1;t<n.length;t++)ew(n[e],n[t])&&(n.splice(t,1),t--);if(1===n.length)return n[0]}return new Yb(n,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){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 tw(t))for(const t of tw(i))n.push(Gb.create([e,t],null));const o=0===e.length;e.unshift(Yb.create(n,null,o))}this.negated=e[0]}return this.negated}}class Zb extends Mb{constructor(e,t,i){super(e,null),this._defaultValue=t,"object"==typeof i?Zb._info.push(Object.assign(Object.assign({},i),{key:e})):!0!==i&&Zb._info.push({key:e,description:i,type:null!=t?typeof t:void 0})}static all(){return Zb._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 Rb.create(this.key,e)}}Zb._info=[];const Xb=Mg("contextKeyService");function Jb(e,t){return e<t?-1:e>t?1:0}function Qb(e,t,i,n){return e<i?-1:e>i?1:t<n?-1:t>n?1:0}function ew(e,t){if(6===t.type&&9!==e.type&&6!==e.type)for(const i of t.expr)if(e.equals(i))return!0;const i=tw(e.negate()).concat(tw(t));i.sort(Db);for(let e=0;e<i.length;e++){const t=i[e].negate();for(let n=e+1;n<i.length;n++){const e=i[n];if(t.equals(e))return!0}}return!1}function tw(e){return 9===e.type?e.expr:[e]}const iw=new class{constructor(){this.data=new Map}add(e,t){Pg(vl(e)),Pg(bl(t)),Pg(!this.data.has(e),"There is already an extension with this id"),this.data.set(e,t)}as(e){return this.data.get(e)||null}};var nw;!function(e){e.DARK="dark",e.LIGHT="light",e.HIGH_CONTRAST="hc"}(nw||(nw={}));const ow=Mg("themeService");var rw,sw;function aw(e){return{id:e}}function lw(e){switch(e){case nw.DARK:return"vs-dark";case nw.HIGH_CONTRAST:return"hc-black";default:return"vs"}}!function(e){e.isThemeColor=function(e){return e&&"object"==typeof e&&"string"==typeof e.id}}(rw||(rw={})),function(e){e.isThemeIcon=function(e){return e&&"object"==typeof e&&"string"==typeof e.id&&(void 0===e.color||rw.isThemeColor(e.color))};const t=new RegExp(`^\\$\\((${Jd.iconNameExpression}(?:${Jd.iconModifierExpression})?)\\)$`);e.fromString=function(e){const i=t.exec(e);if(!i)return;let[,n]=i;return{id:n}},e.fromId=function(e){return{id:e}},e.modify=function(e,t){let i=e.id;const n=i.lastIndexOf("~");return-1!==n&&(i=i.substring(0,n)),t&&(i=`${i}~${t}`),{id:i}},e.getModifier=function(e){const t=e.id.lastIndexOf("~");if(-1!==t)return e.id.substring(t+1)},e.isEqual=function(e,t){var i,n;return e.id===t.id&&(null===(i=e.color)||void 0===i?void 0:i.id)===(null===(n=t.color)||void 0===n?void 0:n.id)},e.asThemeIcon=function(e,t){return{id:e.id,color:t?aw(t):void 0}},e.asClassNameArray=Jd.asClassNameArray,e.asClassName=Jd.asClassName,e.asCSSSelector=Jd.asCSSSelector}(sw||(sw={}));const cw="base.contributions.theming";let dw=new class{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new Vc}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),Lc((()=>{const t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)}))}getThemingParticipants(){return this.themingParticipants}};function hw(e){return dw.onColorThemeChange(e)}iw.add(cw,dw);class uw extends Nc{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 gw=function(e,t){return function(i,n){t(i,n,e)}};function pw(e){return void 0!==e.command}class mw{constructor(e){this.id=mw._idPool++,this._debugName=e}}mw._idPool=0,mw.CommandPalette=new mw("CommandPalette"),mw.DebugBreakpointsContext=new mw("DebugBreakpointsContext"),mw.DebugCallStackContext=new mw("DebugCallStackContext"),mw.DebugConsoleContext=new mw("DebugConsoleContext"),mw.DebugVariablesContext=new mw("DebugVariablesContext"),mw.DebugWatchContext=new mw("DebugWatchContext"),mw.DebugToolBar=new mw("DebugToolBar"),mw.EditorContext=new mw("EditorContext"),mw.SimpleEditorContext=new mw("SimpleEditorContext"),mw.EditorContextCopy=new mw("EditorContextCopy"),mw.EditorContextPeek=new mw("EditorContextPeek"),mw.EditorTitle=new mw("EditorTitle"),mw.EditorTitleRun=new mw("EditorTitleRun"),mw.EditorTitleContext=new mw("EditorTitleContext"),mw.EmptyEditorGroup=new mw("EmptyEditorGroup"),mw.EmptyEditorGroupContext=new mw("EmptyEditorGroupContext"),mw.ExplorerContext=new mw("ExplorerContext"),mw.ExtensionContext=new mw("ExtensionContext"),mw.GlobalActivity=new mw("GlobalActivity"),mw.LayoutControlMenuSubmenu=new mw("LayoutControlMenuSubmenu"),mw.LayoutControlMenu=new mw("LayoutControlMenu"),mw.MenubarMainMenu=new mw("MenubarMainMenu"),mw.MenubarAppearanceMenu=new mw("MenubarAppearanceMenu"),mw.MenubarDebugMenu=new mw("MenubarDebugMenu"),mw.MenubarEditMenu=new mw("MenubarEditMenu"),mw.MenubarCopy=new mw("MenubarCopy"),mw.MenubarFileMenu=new mw("MenubarFileMenu"),mw.MenubarGoMenu=new mw("MenubarGoMenu"),mw.MenubarHelpMenu=new mw("MenubarHelpMenu"),mw.MenubarLayoutMenu=new mw("MenubarLayoutMenu"),mw.MenubarNewBreakpointMenu=new mw("MenubarNewBreakpointMenu"),mw.MenubarPanelAlignmentMenu=new mw("MenubarPanelAlignmentMenu"),mw.MenubarPanelPositionMenu=new mw("MenubarPanelPositionMenu"),mw.MenubarPreferencesMenu=new mw("MenubarPreferencesMenu"),mw.MenubarRecentMenu=new mw("MenubarRecentMenu"),mw.MenubarSelectionMenu=new mw("MenubarSelectionMenu"),mw.MenubarSwitchEditorMenu=new mw("MenubarSwitchEditorMenu"),mw.MenubarSwitchGroupMenu=new mw("MenubarSwitchGroupMenu"),mw.MenubarTerminalMenu=new mw("MenubarTerminalMenu"),mw.MenubarViewMenu=new mw("MenubarViewMenu"),mw.MenubarHomeMenu=new mw("MenubarHomeMenu"),mw.OpenEditorsContext=new mw("OpenEditorsContext"),mw.ProblemsPanelContext=new mw("ProblemsPanelContext"),mw.SCMChangeContext=new mw("SCMChangeContext"),mw.SCMResourceContext=new mw("SCMResourceContext"),mw.SCMResourceFolderContext=new mw("SCMResourceFolderContext"),mw.SCMResourceGroupContext=new mw("SCMResourceGroupContext"),mw.SCMSourceControl=new mw("SCMSourceControl"),mw.SCMTitle=new mw("SCMTitle"),mw.SearchContext=new mw("SearchContext"),mw.StatusBarWindowIndicatorMenu=new mw("StatusBarWindowIndicatorMenu"),mw.StatusBarRemoteIndicatorMenu=new mw("StatusBarRemoteIndicatorMenu"),mw.TestItem=new mw("TestItem"),mw.TestItemGutter=new mw("TestItemGutter"),mw.TestPeekElement=new mw("TestPeekElement"),mw.TestPeekTitle=new mw("TestPeekTitle"),mw.TouchBarContext=new mw("TouchBarContext"),mw.TitleBarContext=new mw("TitleBarContext"),mw.TunnelContext=new mw("TunnelContext"),mw.TunnelPrivacy=new mw("TunnelPrivacy"),mw.TunnelProtocol=new mw("TunnelProtocol"),mw.TunnelPortInline=new mw("TunnelInline"),mw.TunnelTitle=new mw("TunnelTitle"),mw.TunnelLocalAddressInline=new mw("TunnelLocalAddressInline"),mw.TunnelOriginInline=new mw("TunnelOriginInline"),mw.ViewItemContext=new mw("ViewItemContext"),mw.ViewContainerTitle=new mw("ViewContainerTitle"),mw.ViewContainerTitleContext=new mw("ViewContainerTitleContext"),mw.ViewTitle=new mw("ViewTitle"),mw.ViewTitleContext=new mw("ViewTitleContext"),mw.CommentThreadTitle=new mw("CommentThreadTitle"),mw.CommentThreadActions=new mw("CommentThreadActions"),mw.CommentTitle=new mw("CommentTitle"),mw.CommentActions=new mw("CommentActions"),mw.InteractiveToolbar=new mw("InteractiveToolbar"),mw.InteractiveCellTitle=new mw("InteractiveCellTitle"),mw.InteractiveCellExecute=new mw("InteractiveCellExecute"),mw.InteractiveInputExecute=new mw("InteractiveInputExecute"),mw.NotebookToolbar=new mw("NotebookToolbar"),mw.NotebookCellTitle=new mw("NotebookCellTitle"),mw.NotebookCellInsert=new mw("NotebookCellInsert"),mw.NotebookCellBetween=new mw("NotebookCellBetween"),mw.NotebookCellListTop=new mw("NotebookCellTop"),mw.NotebookCellExecute=new mw("NotebookCellExecute"),mw.NotebookCellExecutePrimary=new mw("NotebookCellExecutePrimary"),mw.NotebookDiffCellInputTitle=new mw("NotebookDiffCellInputTitle"),mw.NotebookDiffCellMetadataTitle=new mw("NotebookDiffCellMetadataTitle"),mw.NotebookDiffCellOutputsTitle=new mw("NotebookDiffCellOutputsTitle"),mw.NotebookOutputToolbar=new mw("NotebookOutputToolbar"),mw.NotebookEditorLayoutConfigure=new mw("NotebookEditorLayoutConfigure"),mw.BulkEditTitle=new mw("BulkEditTitle"),mw.BulkEditContext=new mw("BulkEditContext"),mw.TimelineItemContext=new mw("TimelineItemContext"),mw.TimelineTitle=new mw("TimelineTitle"),mw.TimelineTitleContext=new mw("TimelineTitleContext"),mw.AccountsContext=new mw("AccountsContext"),mw.PanelTitle=new mw("PanelTitle"),mw.AuxiliaryBarTitle=new mw("AuxiliaryBarTitle"),mw.TerminalInstanceContext=new mw("TerminalInstanceContext"),mw.TerminalEditorInstanceContext=new mw("TerminalEditorInstanceContext"),mw.TerminalNewDropdownContext=new mw("TerminalNewDropdownContext"),mw.TerminalTabContext=new mw("TerminalTabContext"),mw.TerminalTabEmptyAreaContext=new mw("TerminalTabEmptyAreaContext"),mw.TerminalInlineTabContext=new mw("TerminalInlineTabContext"),mw.WebviewContext=new mw("WebviewContext"),mw.InlineCompletionsActions=new mw("InlineCompletionsActions"),mw.NewFile=new mw("NewFile");const fw=Mg("menuService"),_w=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new Vc,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:e=>e===mw.CommandPalette}}addCommand(e){return this.addCommands(Cc.single(e))}addCommands(e){for(const t of e)this._commands.set(t.id,t);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Lc((()=>{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(Cc.single({id:e,item:t}))}appendMenuItems(e){const t=new Set,i=new Oc;for(const{id:n,item:o}of e){let e=this._menuItems.get(n);e||(e=new Oc,this._menuItems.set(n,e)),i.push(e.push(o)),t.add(n)}return this._onDidChangeMenu.fire(t),Lc((()=>{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===mw.CommandPalette&&this._appendImplicitItems(t),t}_appendImplicitItems(e){const t=new Set;for(const i of e)pw(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 vw extends kb{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[,t]of i)t.length>0&&(e.push(...t),e.push(new Sb));return e.length&&e.pop(),e}}let bw=class e{constructor(t,i,n,o,r){var s,a;if(this._commandService=r,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===(s=t.tooltip)||void 0===s?void 0:s.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,r):void 0,this._options=n,sw.isThemeIcon(t.icon)&&(this.class=Jd.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)}};bw=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([gw(3,Xb),gw(4,Lb)],bw);class ww{constructor(){this._coreKeybindings=[],this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(e){if(1===Ua){if(e&&e.win)return e.win}else if(2===Ua){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e}registerKeybindingRule(e){const t=ww.bindToCurrentPlatform(e);if(t&&t.primary){const i=q_(t.primary,Ua);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<n;i++){const n=q_(t.secondary[i],Ua);n&&this._registerDefaultKeybinding(n,e.id,e.args,e.weight,-i-1,e.when)}}registerCommandAndKeybindingRule(e){this.registerKeybindingRule(e),Eb.registerCommand(e)}static _mightProduceChar(e){return e>=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&&ww._mightProduceChar(e.keyCode)&&console.warn("Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ",e," for ",t)}_registerDefaultKeybinding(e,t,i,n,o,r){1===Ua&&this._assertNoCtrlAlt(e.parts[0],t),this._coreKeybindings.push({keybinding:e.parts,command:t,commandArgs:i,when:r,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(Cw)),this._cachedMergedKeybindings.slice(0)}}const yw=new ww;function Cw(e,t){return e.weight1!==t.weight1?e.weight1-t.weight1:e.command<t.command?-1:e.command>t.command?1:e.weight2-t.weight2}iw.add("platform.keybindingsRegistry",yw);const Sw=Mg("telemetryService");class kw{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?Tb.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};yw.registerKeybindingRule(i)}}Eb.registerCommand({id:this.id,handler:(e,t)=>this.runCommand(e,t),description:this._description})}_registerMenuItem(e){_w.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 xw extends kw{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<this._implementations.length;e++)if(this._implementations[e].implementation===i)return void this._implementations.splice(e,1)}}}runCommand(e,t){const i=e.get(Ff);i.trace(`Executing Command '${this.id}' which has ${this._implementations.length} bound.`);for(const n of this._implementations){const o=n.implementation(e,t);if(o){if(i.trace(`Command '${this.id}' was handled by '${n.name}'.`),"boolean"==typeof o)return;return o}}i.trace(`The Command '${this.id}' was not handled by any implementation.`)}}class Lw extends kw{constructor(e,t){super(t),this.command=e}runCommand(e,t){return this.command.runCommand(e,t)}}class Ew extends kw{static bindToContribution(e){return class extends Ew{constructor(e){super(e),this._callback=e.handler}runEditorCommand(t,i,n){const o=e(i);o&&this._callback(o,n)}}}runCommand(e,t){const i=e.get(Rg),n=i.getFocusedCodeEditor()||i.getActiveCodeEditor();if(n)return n.invokeWithinContext((e=>{if(e.get(Xb).contextMatchesRules(Tl(this.precondition)))return this.runEditorCommand(e,n,t)}))}}class Nw extends Ew{constructor(e){super(Nw.convertOptions(e)),this.label=e.label,this.alias=e.alias}static convertOptions(e){let t;function i(t){return t.menuId||(t.menuId=mw.EditorContext),t.title||(t.title=e.label),t.when=Tb.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(Sw).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}function Iw(e){return Ow.INSTANCE.registerEditorCommand(e),e}function Tw(e){const t=new e;return Ow.INSTANCE.registerEditorAction(t),t}function Dw(e,t){Ow.INSTANCE.registerEditorContribution(e,t)}var Aw;!function(e){e.getEditorCommand=function(e){return Ow.INSTANCE.getEditorCommand(e)},e.getEditorActions=function(){return Ow.INSTANCE.getEditorActions()},e.getEditorContributions=function(){return Ow.INSTANCE.getEditorContributions()},e.getSomeEditorContributions=function(e){return Ow.INSTANCE.getEditorContributions().filter((t=>e.indexOf(t.id)>=0))},e.getDiffEditorContributions=function(){return Ow.INSTANCE.getDiffEditorContributions()}}(Aw||(Aw={}));class Ow{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 Mw(e){return e.register(),e}Ow.INSTANCE=new Ow,iw.add("editor.contributions",Ow.INSTANCE);const Rw=Mw(new xw({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:mw.MenubarEditMenu,group:"1_do",title:ma(0,"&&Undo"),order:1},{menuId:mw.CommandPalette,group:"",title:ma(0,"Undo"),order:1}]}));Mw(new Lw(Rw,{id:"default:undo",precondition:void 0}));const Pw=Mw(new xw({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:mw.MenubarEditMenu,group:"1_do",title:ma(0,"&&Redo"),order:2},{menuId:mw.CommandPalette,group:"",title:ma(0,"Redo"),order:1}]}));Mw(new Lw(Pw,{id:"default:redo",precondition:void 0}));const Fw=Mw(new xw({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:mw.MenubarSelectionMenu,group:"1_basic",title:ma(0,"&&Select All"),order:1},{menuId:mw.CommandPalette,group:"",title:ma(0,"Select All"),order:1}]}));let Bw=class{constructor(e,t){}dispose(){}};var Ww,Vw;Bw.ID="editor.contrib.markerDecorations",Bw=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(Ww=1,Vw=vb,function(e,t){Vw(e,t,Ww)})],Bw),Dw(Bw.ID,Bw);var zw=i(7337),jw={};jw.styleTagTransform=uu(),jw.setAttributes=lu(),jw.insert=su().bind(null,"head"),jw.domAPI=ou(),jw.insertStyleElement=du(),iu()(zw.Z,jw),zw.Z&&zw.Z.locals&&zw.Z.locals;class Hw extends Nc{constructor(e,t){super(),this._onDidChange=this._register(new Vc),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 Uw=Object.prototype.hasOwnProperty;class $w{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)}}const Kw=new class{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new Vc,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(e){this._tabFocus!==e&&(this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus))}},qw=Mg("accessibilityService"),Gw=new Zb("accessibilityModeEnabled",!1);let Yw=class extends Nc{constructor(e,t,i,n){super(),this._accessibilityService=n,this._onDidChange=this._register(new Vc),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new Vc),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._computeOptionsMemory=new Wl,this.isSimpleWidget=e,this._containerObserver=this._register(new Hw(i,t.dimension)),this._rawOptions=ey(t),this._validatedOptions=Qw.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(10)&&this._containerObserver.startObserving(),this._register(xg.onDidChangeZoomLevel((()=>this._recomputeOptions()))),this._register(Kw.onDidChangeTabFocus((()=>this._recomputeOptions()))),this._register(this._containerObserver.onDidChange((()=>this._recomputeOptions()))),this._register(Tg.onDidChange((()=>this._recomputeOptions()))),this._register(cg.onDidChange((()=>this._recomputeOptions()))),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized((()=>this._recomputeOptions())))}_recomputeOptions(){const e=this._computeOptions(),t=Qw.checkEquals(this.options,e);null!==t&&(this.options=e,this._onDidChangeFast.fire(t),this._onDidChange.fire(t))}_computeOptions(){const e=this._readEnvConfiguration(),t=Eg.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:Kw.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport};return Qw.computeOptions(this._validatedOptions,n)}_readEnvConfiguration(){return{extraEditorClassName:Zw(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:gg||ug,pixelRatio:cg.value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(e){return Tg.readFontInfo(e)}getRawOptions(){return this._rawOptions}updateOptions(e){const t=ey(e);Qw.applyUpdate(this._rawOptions,t)&&(this._validatedOptions=Qw.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 Zw(){let e="";return mg||fg||(e+="no-user-select "),mg&&(e+="no-minimap-shadow "),Pa&&(e+="mac "),e}Yw=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([function(e,t){return function(i,n){t(i,n,e)}}(3,qw)],Yw);class Xw{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class Jw{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 Qw{static validateOptions(e){const t=new Xw;for(const i of cc){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 Jw;for(const n of cc)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))&&rl(e,t);if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(!Qw._deepEquals(e[i],t[i]))return!1;return!0}static checkEquals(e,t){const i=[];let n=!1;for(const o of cc){const r=!Qw._deepEquals(e._read(o.id),t._read(o.id));i[o.id]=r,r&&(n=!0)}return n?new Bl(i):null}static applyUpdate(e,t){let i=!1;for(const n of cc)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 ey(e){const t=Al(e);return function(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 r=e.acceptSuggestionOnEnter;!0===r?e.acceptSuggestionOnEnter="on":!1===r&&(e.acceptSuggestionOnEnter="off");const s=e.tabCompletion;!1===s?e.tabCompletion="off":!0===s&&(e.tabCompletion="onlySnippets");const a=e.suggest;a&&"object"==typeof a.filteredTypes&&a.filteredTypes&&function(e,t){for(let i in e)if(Uw.call(e,i)&&!1===t({key:i,value:e[i]}))return}({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"},(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 c=e.parameterHints;!0===c?e.parameterHints={enabled:!0}:!1===c&&(e.parameterHints={enabled:!1});const d=e.autoIndent;!0===d?e.autoIndent="full":!1===d&&(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)}(t),t}function ty(e,t,i){let n=null,o=null;if("function"==typeof i.value?(n="value",o=i.value,0!==o.length&&console.warn("Memoize should only be used in functions with zero parameters")):"function"==typeof i.get&&(n="get",o=i.get),!o)throw new Error("not supported");const r=`$memoize$${t}`;i[n]=function(...e){return this.hasOwnProperty(r)||Object.defineProperty(this,r,{configurable:!1,enumerable:!1,writable:!1,value:o.apply(this,e)}),this[r]}}var iy;!function(e){e.Tap="-monaco-gesturetap",e.Change="-monaco-gesturechange",e.Start="-monaco-gesturestart",e.End="-monaco-gesturesend",e.Contextmenu="-monaco-gesturecontextmenu"}(iy||(iy={}));class ny extends Nc{constructor(){super(),this.dispatched=!1,this.activeTouches={},this.handle=null,this.targets=[],this.ignoreTargets=[],this._lastSetTapCountTime=0,this._register(pv(document,"touchstart",(e=>this.onTouchStart(e)),{passive:!1})),this._register(pv(document,"touchend",(e=>this.onTouchEnd(e)))),this._register(pv(document,"touchmove",(e=>this.onTouchMove(e)),{passive:!1}))}static addTarget(e){return ny.isTouchDevice()?(ny.INSTANCE||(ny.INSTANCE=new ny),ny.INSTANCE.targets.push(e),{dispose:()=>{ny.INSTANCE.targets=ny.INSTANCE.targets.filter((t=>t!==e))}}):Nc.None}static ignoreTarget(e){return ny.isTouchDevice()?(ny.INSTANCE||(ny.INSTANCE=new ny),ny.INSTANCE.ignoreTargets.push(e),{dispose:()=>{ny.INSTANCE.ignoreTargets=ny.INSTANCE.ignoreTargets.filter((t=>t!==e))}}):Nc.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<n;i++){let n=e.targetTouches.item(i);this.activeTouches[n.identifier]={id:n.identifier,initialTarget:n.target,initialTimeStamp:t,initialPageX:n.pageX,initialPageY:n.pageY,rollingTimestamps:[t],rollingPageX:[n.pageX],rollingPageY:[n.pageY]};let o=this.newGestureEvent(iy.Start,n.target);o.pageX=n.pageX,o.pageY=n.pageY,this.dispatchEvent(o)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}onTouchEnd(e){let t=Date.now(),i=Object.keys(this.activeTouches).length;for(let n=0,o=e.changedTouches.length;n<o;n++){let o=e.changedTouches.item(n);if(!this.activeTouches.hasOwnProperty(String(o.identifier))){console.warn("move of an UNKNOWN touch",o);continue}let r=this.activeTouches[o.identifier],s=Date.now()-r.initialTimeStamp;if(s<ny.HOLD_DELAY&&Math.abs(r.initialPageX-ol(r.rollingPageX))<30&&Math.abs(r.initialPageY-ol(r.rollingPageY))<30){let e=this.newGestureEvent(iy.Tap,r.initialTarget);e.pageX=ol(r.rollingPageX),e.pageY=ol(r.rollingPageY),this.dispatchEvent(e)}else if(s>=ny.HOLD_DELAY&&Math.abs(r.initialPageX-ol(r.rollingPageX))<30&&Math.abs(r.initialPageY-ol(r.rollingPageY))<30){let e=this.newGestureEvent(iy.Contextmenu,r.initialTarget);e.pageX=ol(r.rollingPageX),e.pageY=ol(r.rollingPageY),this.dispatchEvent(e)}else if(1===i){let e=ol(r.rollingPageX),i=ol(r.rollingPageY),n=ol(r.rollingTimestamps)-r.rollingTimestamps[0],o=e-r.rollingPageX[0],s=i-r.rollingPageY[0];const a=this.targets.filter((e=>r.initialTarget instanceof Node&&e.contains(r.initialTarget)));this.inertia(a,t,Math.abs(o)/n,o>0?1:-1,e,Math.abs(s)/n,s>0?1:-1,i)}this.dispatchEvent(this.newGestureEvent(iy.End,r.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===iy.Tap){const t=(new Date).getTime();let i=0;i=t-this._lastSetTapCountTime>ny.CLEAR_TAP_COUNT_TIME?1:2,this._lastSetTapCountTime=t,e.tapCount=i}else e.type!==iy.Change&&e.type!==iy.Contextmenu||(this._lastSetTapCountTime=0);for(let t=0;t<this.ignoreTargets.length;t++)if(e.initialTarget instanceof Node&&this.ignoreTargets[t].contains(e.initialTarget))return;this.targets.forEach((t=>{e.initialTarget instanceof Node&&t.contains(e.initialTarget)&&(t.dispatchEvent(e),this.dispatched=!0)}))}inertia(e,t,i,n,o,r,s,a){this.handle=bv((()=>{let l=Date.now(),c=l-t,d=0,h=0,u=!0;i+=ny.SCROLL_FRICTION*c,r+=ny.SCROLL_FRICTION*c,i>0&&(u=!1,d=n*i*c),r>0&&(u=!1,h=s*r*c);let g=this.newGestureEvent(iy.Change);g.translationX=d,g.translationY=h,e.forEach((e=>e.dispatchEvent(g))),u||this.inertia(e,l,i,n,o+d,r,s,a+h)}))}onTouchMove(e){let t=Date.now();for(let i=0,n=e.changedTouches.length;i<n;i++){let n=e.changedTouches.item(i);if(!this.activeTouches.hasOwnProperty(String(n.identifier))){console.warn("end of an UNKNOWN touch",n);continue}let o=this.activeTouches[n.identifier],r=this.newGestureEvent(iy.Change,o.initialTarget);r.translationX=n.pageX-ol(o.rollingPageX),r.translationY=n.pageY-ol(o.rollingPageY),r.pageX=n.pageX,r.pageY=n.pageY,this.dispatchEvent(r),o.rollingPageX.length>3&&(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 oy(e,t){let i=new rv(t);return i.preventDefault(),{leftButton:i.leftButton,buttons:i.buttons,posx:i.posx,posy:i.posy}}ny.SCROLL_FRICTION=-.005,ny.HOLD_DELAY=700,ny.CLEAR_TAP_COUNT_TIME=400,function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([ty],ny,"isTouchDevice",null);class ry{constructor(){this._hooks=new Ec,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 r=ov.getSameOriginWindowChain(),s=za?"pointermove":"mousemove",a=r.map((e=>e.window.document)),l=Vv(e);l&&a.unshift(l);for(const e of a)this._hooks.add(kv(e,s,(e=>{e.buttons===t?this._mouseMoveCallback(e):this.stopMonitoring(!0)}),((e,t)=>this._mouseMoveEventMerger(e,t)))),this._hooks.add(pv(e,"mouseup",(e=>this.stopMonitoring(!0))));if(ov.hasDifferentOriginAncestor()){let e=r[r.length-1];this._hooks.add(pv(e.window.document,"mouseout",(e=>{"html"===new rv(e).target.tagName.toLowerCase()&&this.stopMonitoring(!0)}))),this._hooks.add(pv(e.window.document,"mouseover",(e=>{"html"===new rv(e).target.tagName.toLowerCase()&&this.stopMonitoring(!0)}))),this._hooks.add(pv(e.window.document.body,"mouseleave",(e=>{this.stopMonitoring(!0)})))}}}function sy(e,t){const i=Math.pow(10,t);return Math.round(e*i)/i}class ay{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=sy(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 ly{constructor(e,t,i,n){this._hslaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=sy(Math.max(Math.min(1,t),0),3),this.l=sy(Math.max(Math.min(1,i),0),3),this.a=sy(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,r=Math.max(t,i,n),s=Math.min(t,i,n);let a=0,l=0;const c=(s+r)/2,d=r-s;if(d>0){switch(l=Math.min(c<=.5?d/(2*c):d/(2-2*c),1),r){case t:a=(i-n)/d+(i<n?6:0);break;case i:a=(n-t)/d+2;break;case n:a=(t-i)/d+4}a*=60,a=Math.round(a)}return new ly(a,l,c,o)}static _hue2rgb(e,t,i){return i<0&&(i+=1),i>1&&(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 r,s,a;if(0===i)r=s=a=n;else{const e=n<.5?n*(1+i):n+i-n*i,o=2*n-e;r=ly._hue2rgb(o,e,t+1/3),s=ly._hue2rgb(o,e,t),a=ly._hue2rgb(o,e,t-1/3)}return new ay(Math.round(255*r),Math.round(255*s),Math.round(255*a),o)}}class cy{constructor(e,t,i,n){this._hsvaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=sy(Math.max(Math.min(1,t),0),3),this.v=sy(Math.max(Math.min(1,i),0),3),this.a=sy(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),r=o-Math.min(t,i,n),s=0===o?0:r/o;let a;return a=0===r?0:o===t?((i-n)/r%6+6)%6:o===i?(n-t)/r+2:(t-i)/r+4,new cy(Math.round(60*a),s,o,e.a)}static toRGBA(e){const{h:t,s:i,v:n,a:o}=e,r=n*i,s=r*(1-Math.abs(t/60%2-1)),a=n-r;let[l,c,d]=[0,0,0];return t<60?(l=r,c=s):t<120?(l=s,c=r):t<180?(c=r,d=s):t<240?(c=s,d=r):t<300?(l=s,d=r):t<=360&&(l=r,d=s),l=Math.round(255*(l+a)),c=Math.round(255*(c+a)),d=Math.round(255*(d+a)),new ay(l,c,d,o)}}class dy{constructor(e){if(!e)throw new Error("Color needs a value");if(e instanceof ay)this.rgba=e;else if(e instanceof ly)this._hsla=e,this.rgba=ly.toRGBA(e);else{if(!(e instanceof cy))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=cy.toRGBA(e)}}static fromHex(e){return dy.Format.CSS.parseHex(e)||dy.red}get hsla(){return this._hsla?this._hsla:ly.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:cy.fromRGBA(this.rgba)}equals(e){return!!e&&ay.equals(this.rgba,e.rgba)&&ly.equals(this.hsla,e.hsla)&&cy.equals(this.hsva,e.hsva)}getRelativeLuminance(){return sy(.2126*dy._relativeLuminanceForComponent(this.rgba.r)+.7152*dy._relativeLuminanceForComponent(this.rgba.g)+.0722*dy._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()<e.getRelativeLuminance()}lighten(e){return new dy(new ly(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*e,this.hsla.a))}darken(e){return new dy(new ly(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*e,this.hsla.a))}transparent(e){const{r:t,g:i,b:n,a:o}=this.rgba;return new dy(new ay(t,i,n,o*e))}isTransparent(){return 0===this.rgba.a}isOpaque(){return 1===this.rgba.a}opposite(){return new dy(new ay(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}toString(){return this._toString||(this._toString=dy.Format.CSS.format(this)),this._toString}static getLighterColor(e,t,i){if(e.isLighterThan(t))return e;i=i||.5;const n=e.getRelativeLuminance(),o=t.getRelativeLuminance();return i=i*(o-n)/o,e.lighten(i)}static getDarkerColor(e,t,i){if(e.isDarkerThan(t))return e;i=i||.5;const n=e.getRelativeLuminance();return i=i*(n-t.getRelativeLuminance())/n,e.darken(i)}}dy.white=new dy(new ay(255,255,255,1)),dy.black=new dy(new ay(0,0,0,1)),dy.red=new dy(new ay(255,0,0,1)),dy.blue=new dy(new ay(0,0,255,1)),dy.green=new dy(new ay(0,255,0,1)),dy.cyan=new dy(new ay(0,255,255,1)),dy.lightgrey=new dy(new ay(211,211,211,1)),dy.transparent=new dy(new ay(0,0,0,0)),function(e){let t;!function(t){let i;!function(t){function i(e){const t=e.toString(16);return 2!==t.length?"0"+t:t}function n(e){switch(e){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:case 65:return 10;case 98:case 66:return 11;case 99:case 67:return 12;case 100:case 68:return 13;case 101:case 69:return 14;case 102:case 70:return 15}return 0}t.formatRGB=function(t){return 1===t.rgba.a?`rgb(${t.rgba.r}, ${t.rgba.g}, ${t.rgba.b})`:e.Format.CSS.formatRGBA(t)},t.formatRGBA=function(e){return`rgba(${e.rgba.r}, ${e.rgba.g}, ${e.rgba.b}, ${+e.rgba.a.toFixed(2)})`},t.formatHSL=function(t){return 1===t.hsla.a?`hsl(${t.hsla.h}, ${(100*t.hsla.s).toFixed(2)}%, ${(100*t.hsla.l).toFixed(2)}%)`:e.Format.CSS.formatHSLA(t)},t.formatHSLA=function(e){return`hsla(${e.hsla.h}, ${(100*e.hsla.s).toFixed(2)}%, ${(100*e.hsla.l).toFixed(2)}%, ${e.hsla.a.toFixed(2)})`},t.formatHex=function(e){return`#${i(e.rgba.r)}${i(e.rgba.g)}${i(e.rgba.b)}`},t.formatHexA=function(t,n=!1){return n&&1===t.rgba.a?e.Format.CSS.formatHex(t):`#${i(t.rgba.r)}${i(t.rgba.g)}${i(t.rgba.b)}${i(Math.round(255*t.rgba.a))}`},t.format=function(t){return t.isOpaque()?e.Format.CSS.formatHex(t):e.Format.CSS.formatRGBA(t)},t.parseHex=function(t){const i=t.length;if(0===i)return null;if(35!==t.charCodeAt(0))return null;if(7===i){const i=16*n(t.charCodeAt(1))+n(t.charCodeAt(2)),o=16*n(t.charCodeAt(3))+n(t.charCodeAt(4)),r=16*n(t.charCodeAt(5))+n(t.charCodeAt(6));return new e(new ay(i,o,r,1))}if(9===i){const i=16*n(t.charCodeAt(1))+n(t.charCodeAt(2)),o=16*n(t.charCodeAt(3))+n(t.charCodeAt(4)),r=16*n(t.charCodeAt(5))+n(t.charCodeAt(6)),s=16*n(t.charCodeAt(7))+n(t.charCodeAt(8));return new e(new ay(i,o,r,s/255))}if(4===i){const i=n(t.charCodeAt(1)),o=n(t.charCodeAt(2)),r=n(t.charCodeAt(3));return new e(new ay(16*i+i,16*o+o,16*r+r))}if(5===i){const i=n(t.charCodeAt(1)),o=n(t.charCodeAt(2)),r=n(t.charCodeAt(3)),s=n(t.charCodeAt(4));return new e(new ay(16*i+i,16*o+o,16*r+r,(16*s+s)/255))}return null}}(i=t.CSS||(t.CSS={}))}(t=e.Format||(e.Format={}))}(dy||(dy={}));const hy="base.contributions.json",uy=new class{constructor(){this._onDidChangeSchema=new Vc,this.schemasById={}}registerSchema(e,t){var i;this.schemasById[(i=e,i.length>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 gy(e){return`--vscode-${e.replace(/\./g,"-")}`}iw.add(hy,uy);const py="base.contributions.colors",my=new class{constructor(){this._onDidChangeSchema=new Vc,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 r={id:e,description:i,defaults:t,needsTransparency:n,deprecationMessage:o};this.colorsById[e]=r;let s={type:"string",description:i,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return o&&(s.deprecationMessage=o),this.colorSchema.properties[e]=s,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 KS(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 fy(e,t,i,n,o){return my.registerColor(e,t,i,n,o)}iw.add(py,my);const _y=fy("foreground",{dark:"#CCCCCC",light:"#616161",hc:"#FFFFFF"},ma(0,"Overall foreground color. This color is only used if not overridden by a component.")),vy=(fy("errorForeground",{dark:"#F48771",light:"#A1260D",hc:"#F48771"},ma(0,"Overall foreground color for error messages. This color is only used if not overridden by a component.")),fy("descriptionForeground",{light:"#717171",dark:HS(_y,.7),hc:HS(_y,.7)},ma(0,"Foreground color for description text providing additional information, for example for a label.")),fy("icon.foreground",{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},ma(0,"The default color for icons in the workbench.")),fy("focusBorder",{dark:"#007FD4",light:"#0090F1",hc:"#F38518"},ma(0,"Overall border color for focused elements. This color is only used if not overridden by a component."))),by=fy("contrastBorder",{light:null,dark:null,hc:"#6FC3DF"},ma(0,"An extra border around elements to separate them from others for greater contrast.")),wy=fy("contrastActiveBorder",{light:null,dark:null,hc:vy},ma(0,"An extra border around active elements to separate them from others for greater contrast.")),yy=(fy("selection.background",{light:null,dark:null,hc:null},ma(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.")),fy("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hc:dy.black},ma(0,"Color for text separators.")),fy("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},ma(0,"Foreground color for links in text.")),fy("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},ma(0,"Foreground color for links in text when clicked on and on mouse hover.")),fy("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hc:"#D7BA7D"},ma(0,"Foreground color for preformatted text segments.")),fy("textBlockQuote.background",{light:"#7f7f7f1a",dark:"#7f7f7f1a",hc:null},ma(0,"Background color for block quotes in text.")),fy("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hc:dy.white},ma(0,"Border color for block quotes in text.")),fy("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hc:dy.black},ma(0,"Background color for code blocks in text.")),fy("widget.shadow",{dark:HS(dy.black,.36),light:HS(dy.black,.16),hc:null},ma(0,"Shadow color of widgets such as find/replace inside the editor."))),Cy=fy("input.background",{dark:"#3C3C3C",light:dy.white,hc:dy.black},ma(0,"Input box background.")),Sy=fy("input.foreground",{dark:_y,light:_y,hc:_y},ma(0,"Input box foreground.")),ky=fy("input.border",{dark:null,light:null,hc:by},ma(0,"Input box border.")),xy=(fy("inputOption.activeBorder",{dark:"#007ACC00",light:"#007ACC00",hc:by},ma(0,"Border color of activated options in input fields.")),fy("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hc:null},ma(0,"Background color of activated options in input fields.")),fy("inputOption.activeBackground",{dark:HS(vy,.4),light:HS(vy,.2),hc:dy.transparent},ma(0,"Background hover color of options in input fields.")),fy("inputOption.activeForeground",{dark:dy.white,light:dy.black,hc:null},ma(0,"Foreground color of activated options in input fields.")),fy("input.placeholderForeground",{light:HS(_y,.5),dark:HS(_y,.5),hc:HS(_y,.7)},ma(0,"Input box foreground color for placeholder text.")),fy("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hc:dy.black},ma(0,"Input validation background color for information severity."))),Ly=fy("inputValidation.infoForeground",{dark:null,light:null,hc:null},ma(0,"Input validation foreground color for information severity.")),Ey=fy("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hc:by},ma(0,"Input validation border color for information severity.")),Ny=fy("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hc:dy.black},ma(0,"Input validation background color for warning severity.")),Iy=fy("inputValidation.warningForeground",{dark:null,light:null,hc:null},ma(0,"Input validation foreground color for warning severity.")),Ty=fy("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hc:by},ma(0,"Input validation border color for warning severity.")),Dy=fy("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hc:dy.black},ma(0,"Input validation background color for error severity.")),Ay=fy("inputValidation.errorForeground",{dark:null,light:null,hc:null},ma(0,"Input validation foreground color for error severity.")),Oy=fy("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hc:by},ma(0,"Input validation border color for error severity.")),My=fy("dropdown.background",{dark:"#3C3C3C",light:dy.white,hc:dy.black},ma(0,"Dropdown background.")),Ry=(fy("dropdown.listBackground",{dark:null,light:null,hc:dy.black},ma(0,"Dropdown list background.")),fy("dropdown.foreground",{dark:"#F0F0F0",light:null,hc:dy.white},ma(0,"Dropdown foreground."))),Py=fy("dropdown.border",{dark:My,light:"#CECECE",hc:by},ma(0,"Dropdown border.")),Fy=(fy("checkbox.background",{dark:My,light:My,hc:My},ma(0,"Background color of checkbox widget.")),fy("checkbox.foreground",{dark:Ry,light:Ry,hc:Ry},ma(0,"Foreground color of checkbox widget.")),fy("checkbox.border",{dark:Py,light:Py,hc:Py},ma(0,"Border color of checkbox widget.")),fy("button.foreground",{dark:dy.white,light:dy.white,hc:dy.white},ma(0,"Button foreground color."))),By=fy("button.background",{dark:"#0E639C",light:"#007ACC",hc:null},ma(0,"Button background color.")),Wy=fy("button.hoverBackground",{dark:jS(By,.2),light:zS(By,.2),hc:null},ma(0,"Button background color when hovering.")),Vy=(fy("button.border",{dark:by,light:by,hc:by},ma(0,"Button border color.")),fy("button.secondaryForeground",{dark:dy.white,light:dy.white,hc:dy.white},ma(0,"Secondary button foreground color.")),fy("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hc:null},ma(0,"Secondary button background color."))),zy=(fy("button.secondaryHoverBackground",{dark:jS(Vy,.2),light:zS(Vy,.2),hc:null},ma(0,"Secondary button background color when hovering.")),fy("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hc:dy.black},ma(0,"Badge background color. Badges are small information labels, e.g. for search results count."))),jy=fy("badge.foreground",{dark:dy.white,light:"#333",hc:dy.white},ma(0,"Badge foreground color. Badges are small information labels, e.g. for search results count.")),Hy=fy("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hc:null},ma(0,"Scrollbar shadow to indicate that the view is scrolled.")),Uy=fy("scrollbarSlider.background",{dark:dy.fromHex("#797979").transparent(.4),light:dy.fromHex("#646464").transparent(.4),hc:HS(by,.6)},ma(0,"Scrollbar slider background color.")),$y=fy("scrollbarSlider.hoverBackground",{dark:dy.fromHex("#646464").transparent(.7),light:dy.fromHex("#646464").transparent(.7),hc:HS(by,.8)},ma(0,"Scrollbar slider background color when hovering.")),Ky=fy("scrollbarSlider.activeBackground",{dark:dy.fromHex("#BFBFBF").transparent(.4),light:dy.fromHex("#000000").transparent(.6),hc:by},ma(0,"Scrollbar slider background color when clicked on.")),qy=fy("progressBar.background",{dark:dy.fromHex("#0E70C0"),light:dy.fromHex("#0E70C0"),hc:by},ma(0,"Background color of the progress bar that can show for long running operations.")),Gy=fy("editorError.background",{dark:null,light:null,hc:null},ma(0,"Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),Yy=fy("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hc:null},ma(0,"Foreground color of error squigglies in the editor.")),Zy=fy("editorError.border",{dark:null,light:null,hc:dy.fromHex("#E47777").transparent(.8)},ma(0,"Border color of error boxes in the editor.")),Xy=fy("editorWarning.background",{dark:null,light:null,hc:null},ma(0,"Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),Jy=fy("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hc:null},ma(0,"Foreground color of warning squigglies in the editor.")),Qy=fy("editorWarning.border",{dark:null,light:null,hc:dy.fromHex("#FFCC00").transparent(.8)},ma(0,"Border color of warning boxes in the editor.")),eC=fy("editorInfo.background",{dark:null,light:null,hc:null},ma(0,"Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),tC=fy("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hc:"#3794FF"},ma(0,"Foreground color of info squigglies in the editor.")),iC=fy("editorInfo.border",{dark:null,light:null,hc:dy.fromHex("#3794FF").transparent(.8)},ma(0,"Border color of info boxes in the editor.")),nC=fy("editorHint.foreground",{dark:dy.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hc:null},ma(0,"Foreground color of hint squigglies in the editor.")),oC=fy("editorHint.border",{dark:null,light:null,hc:dy.fromHex("#eeeeee").transparent(.8)},ma(0,"Border color of hint boxes in the editor.")),rC=(fy("sash.hoverBorder",{dark:vy,light:vy,hc:vy},ma(0,"Border color of active sashes.")),fy("editor.background",{light:"#fffffe",dark:"#1E1E1E",hc:dy.black},ma(0,"Editor background color."))),sC=fy("editor.foreground",{light:"#333333",dark:"#BBBBBB",hc:dy.white},ma(0,"Editor default foreground color.")),aC=fy("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hc:"#0C141F"},ma(0,"Background color of editor widgets, such as find/replace.")),lC=fy("editorWidget.foreground",{dark:_y,light:_y,hc:_y},ma(0,"Foreground color of editor widgets, such as find/replace.")),cC=fy("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hc:by},ma(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.")),dC=(fy("editorWidget.resizeBorder",{light:null,dark:null,hc:null},ma(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.")),fy("quickInput.background",{dark:aC,light:aC,hc:aC},ma(0,"Quick picker background color. The quick picker widget is the container for pickers like the command palette."))),hC=fy("quickInput.foreground",{dark:lC,light:lC,hc:lC},ma(0,"Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),uC=fy("quickInputTitle.background",{dark:new dy(new ay(255,255,255,.105)),light:new dy(new ay(0,0,0,.06)),hc:"#000000"},ma(0,"Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),gC=fy("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hc:dy.white},ma(0,"Quick picker color for grouping labels.")),pC=fy("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hc:dy.white},ma(0,"Quick picker color for grouping borders.")),mC=fy("keybindingLabel.background",{dark:new dy(new ay(128,128,128,.17)),light:new dy(new ay(221,221,221,.4)),hc:dy.transparent},ma(0,"Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),fC=fy("keybindingLabel.foreground",{dark:dy.fromHex("#CCCCCC"),light:dy.fromHex("#555555"),hc:dy.white},ma(0,"Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),_C=fy("keybindingLabel.border",{dark:new dy(new ay(51,51,51,.6)),light:new dy(new ay(204,204,204,.4)),hc:new dy(new ay(111,195,223))},ma(0,"Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),vC=fy("keybindingLabel.bottomBorder",{dark:new dy(new ay(68,68,68,.6)),light:new dy(new ay(187,187,187,.4)),hc:new dy(new ay(111,195,223))},ma(0,"Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),bC=fy("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},ma(0,"Color of the editor selection.")),wC=fy("editor.selectionForeground",{light:null,dark:null,hc:"#000000"},ma(0,"Color of the selected text for high contrast.")),yC=fy("editor.inactiveSelectionBackground",{light:HS(bC,.5),dark:HS(bC,.5),hc:HS(bC,.5)},ma(0,"Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),CC=fy("editor.selectionHighlightBackground",{light:$S(bC,rC,.3,.6),dark:$S(bC,rC,.3,.6),hc:null},ma(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),SC=(fy("editor.selectionHighlightBorder",{light:null,dark:null,hc:wy},ma(0,"Border color for regions with the same content as the selection.")),fy("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hc:null},ma(0,"Color of the current search match.")),fy("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hc:null},ma(0,"Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0)),kC=(fy("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hc:null},ma(0,"Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),fy("editor.findMatchBorder",{light:null,dark:null,hc:wy},ma(0,"Border color of the current search match.")),fy("editor.findMatchHighlightBorder",{light:null,dark:null,hc:wy},ma(0,"Border color of the other search matches."))),xC=(fy("editor.findRangeHighlightBorder",{dark:null,light:null,hc:HS(wy,.4)},ma(0,"Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),fy("searchEditor.findMatchBackground",{light:HS(SC,.66),dark:HS(SC,.66),hc:SC},ma(0,"Color of the Search Editor query matches.")),fy("searchEditor.findMatchBorder",{light:HS(kC,.66),dark:HS(kC,.66),hc:kC},ma(0,"Border color of the Search Editor query matches.")),fy("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hc:"#ADD6FF26"},ma(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),fy("editorHoverWidget.background",{light:aC,dark:aC,hc:aC},ma(0,"Background color of the editor hover."))),LC=(fy("editorHoverWidget.foreground",{light:lC,dark:lC,hc:lC},ma(0,"Foreground color of the editor hover.")),fy("editorHoverWidget.border",{light:cC,dark:cC,hc:cC},ma(0,"Border color of the editor hover.")),fy("editorHoverWidget.statusBarBackground",{dark:jS(xC,.2),light:zS(xC,.05),hc:aC},ma(0,"Background color of the editor hover status bar.")),fy("editorLink.activeForeground",{dark:"#4E94CE",light:dy.blue,hc:dy.cyan},ma(0,"Color of active links.")),fy("editorInlayHint.foreground",{dark:HS(jy,.8),light:HS(jy,.8),hc:jy},ma(0,"Foreground color of inline hints"))),EC=fy("editorInlayHint.background",{dark:HS(zy,.6),light:HS(zy,.3),hc:zy},ma(0,"Background color of inline hints")),NC=(fy("editorInlayHint.typeForeground",{dark:LC,light:LC,hc:LC},ma(0,"Foreground color of inline hints for types")),fy("editorInlayHint.typeBackground",{dark:EC,light:EC,hc:EC},ma(0,"Background color of inline hints for types")),fy("editorInlayHint.parameterForeground",{dark:LC,light:LC,hc:LC},ma(0,"Foreground color of inline hints for parameters")),fy("editorInlayHint.parameterBackground",{dark:EC,light:EC,hc:EC},ma(0,"Background color of inline hints for parameters")),fy("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hc:"#FFCC00"},ma(0,"The color used for the lightbulb actions icon.")),fy("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},ma(0,"The color used for the lightbulb auto fix actions icon.")),new dy(new ay(155,185,85,.2))),IC=new dy(new ay(255,0,0,.2)),TC=fy("diffEditor.insertedTextBackground",{dark:NC,light:NC,hc:null},ma(0,"Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),DC=fy("diffEditor.removedTextBackground",{dark:IC,light:IC,hc:null},ma(0,"Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),AC=fy("diffEditor.insertedLineBackground",{dark:null,light:null,hc:null},ma(0,"Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),OC=fy("diffEditor.removedLineBackground",{dark:null,light:null,hc:null},ma(0,"Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),MC=fy("diffEditorGutter.insertedLineBackground",{dark:null,light:null,hc:null},ma(0,"Background color for the margin where lines got inserted.")),RC=fy("diffEditorGutter.removedLineBackground",{dark:null,light:null,hc:null},ma(0,"Background color for the margin where lines got removed.")),PC=fy("diffEditorOverview.insertedForeground",{dark:null,light:null,hc:null},ma(0,"Diff overview ruler foreground for inserted content.")),FC=fy("diffEditorOverview.removedForeground",{dark:null,light:null,hc:null},ma(0,"Diff overview ruler foreground for removed content.")),BC=fy("diffEditor.insertedTextBorder",{dark:null,light:null,hc:"#33ff2eff"},ma(0,"Outline color for the text that got inserted.")),WC=fy("diffEditor.removedTextBorder",{dark:null,light:null,hc:"#FF008F"},ma(0,"Outline color for text that got removed.")),VC=fy("diffEditor.border",{dark:null,light:null,hc:by},ma(0,"Border color between the two text editors.")),zC=fy("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hc:null},ma(0,"Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),jC=fy("list.focusBackground",{dark:null,light:null,hc:null},ma(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.")),HC=fy("list.focusForeground",{dark:null,light:null,hc:null},ma(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.")),UC=fy("list.focusOutline",{dark:vy,light:vy,hc:wy},ma(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.")),$C=fy("list.activeSelectionBackground",{dark:"#094771",light:"#0060C0",hc:null},ma(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.")),KC=fy("list.activeSelectionForeground",{dark:dy.white,light:dy.white,hc:null},ma(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.")),qC=fy("list.activeSelectionIconForeground",{dark:null,light:null,hc:null},ma(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.")),GC=fy("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hc:null},ma(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.")),YC=fy("list.inactiveSelectionForeground",{dark:null,light:null,hc:null},ma(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.")),ZC=fy("list.inactiveSelectionIconForeground",{dark:null,light:null,hc:null},ma(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.")),XC=fy("list.inactiveFocusBackground",{dark:null,light:null,hc:null},ma(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.")),JC=fy("list.inactiveFocusOutline",{dark:null,light:null,hc:null},ma(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.")),QC=fy("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hc:null},ma(0,"List/Tree background when hovering over items using the mouse.")),eS=fy("list.hoverForeground",{dark:null,light:null,hc:null},ma(0,"List/Tree foreground when hovering over items using the mouse.")),tS=fy("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hc:null},ma(0,"List/Tree drag and drop background when moving items around using the mouse.")),iS=fy("list.highlightForeground",{dark:"#18A3FF",light:"#0066BF",hc:vy},ma(0,"List/Tree foreground color of the match highlights when searching inside the list/tree."));var nS,oS;fy("list.focusHighlightForeground",{dark:iS,light:(nS=$C,oS=iS,"#9DDDFF",{op:5,if:nS,then:oS,else:"#9DDDFF"}),hc:iS},ma(0,"List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree.")),fy("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hc:"#B89500"},ma(0,"List/Tree foreground color for invalid items, for example an unresolved root in explorer.")),fy("list.errorForeground",{dark:"#F88070",light:"#B01011",hc:null},ma(0,"Foreground color of list items containing errors.")),fy("list.warningForeground",{dark:"#CCA700",light:"#855F00",hc:null},ma(0,"Foreground color of list items containing warnings."));const rS=fy("listFilterWidget.background",{light:"#efc1ad",dark:"#653723",hc:dy.black},ma(0,"Background color of the type filter widget in lists and trees.")),sS=fy("listFilterWidget.outline",{dark:dy.transparent,light:dy.transparent,hc:"#f38518"},ma(0,"Outline color of the type filter widget in lists and trees.")),aS=fy("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hc:by},ma(0,"Outline color of the type filter widget in lists and trees, when there are no matches.")),lS=(fy("list.filterMatchBackground",{dark:SC,light:SC,hc:null},ma(0,"Background color of the filtered match.")),fy("list.filterMatchBorder",{dark:kC,light:kC,hc:by},ma(0,"Border color of the filtered match.")),fy("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hc:"#a9a9a9"},ma(0,"Tree stroke color for the indentation guides."))),cS=fy("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hc:null},ma(0,"Table border color between columns.")),dS=fy("tree.tableOddRowsBackground",{dark:HS(_y,.04),light:HS(_y,.04),hc:null},ma(0,"Background color for odd table rows.")),hS=(fy("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hc:"#A7A8A9"},ma(0,"List/Tree foreground color for items that are deemphasized. ")),fy("quickInput.list.focusBackground",{dark:null,light:null,hc:null},"",void 0,ma(0,"Please use quickInputList.focusBackground instead"))),uS=fy("quickInputList.focusForeground",{dark:KC,light:KC,hc:KC},ma(0,"Quick picker foreground color for the focused item.")),gS=fy("quickInputList.focusIconForeground",{dark:qC,light:qC,hc:qC},ma(0,"Quick picker icon foreground color for the focused item.")),pS=fy("quickInputList.focusBackground",{dark:US(hS,$C),light:US(hS,$C),hc:null},ma(0,"Quick picker background color for the focused item.")),mS=fy("menu.border",{dark:null,light:null,hc:by},ma(0,"Border color of menus.")),fS=fy("menu.foreground",{dark:Ry,light:_y,hc:Ry},ma(0,"Foreground color of menu items.")),vS=fy("menu.background",{dark:My,light:My,hc:My},ma(0,"Background color of menu items.")),bS=fy("menu.selectionForeground",{dark:KC,light:KC,hc:KC},ma(0,"Foreground color of the selected menu item in menus.")),wS=fy("menu.selectionBackground",{dark:$C,light:$C,hc:$C},ma(0,"Background color of the selected menu item in menus.")),yS=fy("menu.selectionBorder",{dark:null,light:null,hc:wy},ma(0,"Border color of the selected menu item in menus.")),CS=fy("menu.separatorBackground",{dark:"#BBBBBB",light:"#888888",hc:by},ma(0,"Color of a separator menu item in menus.")),SS=fy("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hc:null},ma(0,"Toolbar background when hovering over actions using the mouse")),kS=(fy("toolbar.hoverOutline",{dark:null,light:null,hc:wy},ma(0,"Toolbar outline when hovering over actions using the mouse")),fy("toolbar.activeBackground",{dark:jS(SS,.1),light:zS(SS,.1),hc:null},ma(0,"Toolbar background when holding the mouse over actions")),fy("editor.snippetTabstopHighlightBackground",{dark:new dy(new ay(124,124,124,.3)),light:new dy(new ay(10,50,100,.2)),hc:new dy(new ay(124,124,124,.3))},ma(0,"Highlight background color of a snippet tabstop.")),fy("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hc:null},ma(0,"Highlight border color of a snippet tabstop.")),fy("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hc:null},ma(0,"Highlight background color of the final tabstop of a snippet.")),fy("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new dy(new ay(10,50,100,.5)),hc:"#525252"},ma(0,"Highlight border color of the final tabstop of a snippet.")),fy("breadcrumb.foreground",{light:HS(_y,.8),dark:HS(_y,.8),hc:HS(_y,.8)},ma(0,"Color of focused breadcrumb items.")),fy("breadcrumb.background",{light:rC,dark:rC,hc:rC},ma(0,"Background color of breadcrumb items.")),fy("breadcrumb.focusForeground",{light:zS(_y,.2),dark:jS(_y,.1),hc:jS(_y,.1)},ma(0,"Color of focused breadcrumb items.")),fy("breadcrumb.activeSelectionForeground",{light:zS(_y,.2),dark:jS(_y,.1),hc:jS(_y,.1)},ma(0,"Color of selected breadcrumb items.")),fy("breadcrumbPicker.background",{light:aC,dark:aC,hc:aC},ma(0,"Background color of breadcrumb item picker.")),dy.fromHex("#40C8AE").transparent(.5)),xS=dy.fromHex("#40A6FF").transparent(.5),LS=dy.fromHex("#606060").transparent(.4),ES=.4,NS=fy("merge.currentHeaderBackground",{dark:kS,light:kS,hc:null},ma(0,"Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),IS=(fy("merge.currentContentBackground",{dark:HS(NS,ES),light:HS(NS,ES),hc:HS(NS,ES)},ma(0,"Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),fy("merge.incomingHeaderBackground",{dark:xS,light:xS,hc:null},ma(0,"Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0)),TS=(fy("merge.incomingContentBackground",{dark:HS(IS,ES),light:HS(IS,ES),hc:HS(IS,ES)},ma(0,"Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),fy("merge.commonHeaderBackground",{dark:LS,light:LS,hc:null},ma(0,"Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0)),DS=(fy("merge.commonContentBackground",{dark:HS(TS,ES),light:HS(TS,ES),hc:HS(TS,ES)},ma(0,"Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),fy("merge.border",{dark:null,light:null,hc:"#C3DF6F"},ma(0,"Border color on headers and the splitter in inline merge-conflicts."))),AS=(fy("editorOverviewRuler.currentContentForeground",{dark:HS(NS,1),light:HS(NS,1),hc:DS},ma(0,"Current overview ruler foreground for inline merge-conflicts.")),fy("editorOverviewRuler.incomingContentForeground",{dark:HS(IS,1),light:HS(IS,1),hc:DS},ma(0,"Incoming overview ruler foreground for inline merge-conflicts.")),fy("editorOverviewRuler.commonContentForeground",{dark:HS(TS,1),light:HS(TS,1),hc:DS},ma(0,"Common ancestor overview ruler foreground for inline merge-conflicts.")),fy("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hc:"#AB5A00"},ma(0,"Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),fy("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},ma(0,"Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),fy("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hc:"#AB5A00"},ma(0,"Minimap marker color for find matches."),!0)),OS=(fy("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hc:"#ffffff"},ma(0,"Minimap marker color for repeating editor selections."),!0),fy("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hc:"#ffffff"},ma(0,"Minimap marker color for the editor selection."),!0)),MS=fy("minimap.errorHighlight",{dark:new dy(new ay(255,18,18,.7)),light:new dy(new ay(255,18,18,.7)),hc:new dy(new ay(255,50,50,1))},ma(0,"Minimap marker color for errors.")),RS=fy("minimap.warningHighlight",{dark:Jy,light:Jy,hc:Qy},ma(0,"Minimap marker color for warnings.")),PS=fy("minimap.background",{dark:null,light:null,hc:null},ma(0,"Minimap background color.")),FS=fy("minimap.foregroundOpacity",{dark:dy.fromHex("#000f"),light:dy.fromHex("#000f"),hc:dy.fromHex("#000f")},ma(0,'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.')),BS=fy("minimapSlider.background",{light:HS(Uy,.5),dark:HS(Uy,.5),hc:HS(Uy,.5)},ma(0,"Minimap slider background color.")),WS=fy("minimapSlider.hoverBackground",{light:HS($y,.5),dark:HS($y,.5),hc:HS($y,.5)},ma(0,"Minimap slider background color when hovering.")),VS=fy("minimapSlider.activeBackground",{light:HS(Ky,.5),dark:HS(Ky,.5),hc:HS(Ky,.5)},ma(0,"Minimap slider background color when clicked on."));function zS(e,t){return{op:0,value:e,factor:t}}function jS(e,t){return{op:1,value:e,factor:t}}function HS(e,t){return{op:2,value:e,factor:t}}function US(...e){return{op:3,values:e}}function $S(e,t,i,n){return{op:4,value:e,background:t,factor:i,transparency:n}}function KS(e,t){if(null!==e)return"string"==typeof e?"#"===e[0]?dy.fromHex(e):t.getColor(e):e instanceof dy?e:"object"==typeof e?function(e,t){var i,n,o;switch(e.op){case 0:return null===(i=KS(e.value,t))||void 0===i?void 0:i.darken(e.factor);case 1:return null===(n=KS(e.value,t))||void 0===n?void 0:n.lighten(e.factor);case 2:return null===(o=KS(e.value,t))||void 0===o?void 0:o.transparent(e.factor);case 3:for(const i of e.values){const e=KS(i,t);if(e)return e}return;case 5:return KS(t.defines(e.if)?e.then:e.else,t);case 4:{const i=KS(e.value,t);if(!i)return;const n=KS(e.background,t);return n?i.isDarkerThan(n)?dy.getLighterColor(i,n,e.factor).transparent(e.transparency):dy.getDarkerColor(i,n,e.factor).transparent(e.transparency):i.transparent(e.factor*e.transparency)}default:throw Dl()}}(e,t):void 0}fy("problemsErrorIcon.foreground",{dark:Yy,light:Yy,hc:Yy},ma(0,"The color used for the problems error icon.")),fy("problemsWarningIcon.foreground",{dark:Jy,light:Jy,hc:Jy},ma(0,"The color used for the problems warning icon.")),fy("problemsInfoIcon.foreground",{dark:tC,light:tC,hc:tC},ma(0,"The color used for the problems info icon.")),fy("charts.foreground",{dark:_y,light:_y,hc:_y},ma(0,"The foreground color used in charts.")),fy("charts.lines",{dark:HS(_y,.5),light:HS(_y,.5),hc:HS(_y,.5)},ma(0,"The color used for horizontal lines in charts.")),fy("charts.red",{dark:Yy,light:Yy,hc:Yy},ma(0,"The red color used in chart visualizations.")),fy("charts.blue",{dark:tC,light:tC,hc:tC},ma(0,"The blue color used in chart visualizations.")),fy("charts.yellow",{dark:Jy,light:Jy,hc:Jy},ma(0,"The yellow color used in chart visualizations.")),fy("charts.orange",{dark:AS,light:AS,hc:AS},ma(0,"The orange color used in chart visualizations.")),fy("charts.green",{dark:"#89D185",light:"#388A34",hc:"#89D185"},ma(0,"The green color used in chart visualizations.")),fy("charts.purple",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},ma(0,"The purple color used in chart visualizations."));const qS="vscode://schemas/workbench-colors";let GS=iw.as(hy);GS.registerSchema(qS,my.getColorSchema());const YS=new bm((()=>GS.notifySchemaChanged(qS)),200);my.onDidChangeSchema((()=>{YS.isScheduled()||YS.schedule()}));class ZS{constructor(e,t){this.x=e,this.y=t,this._pageCoordinatesBrand=void 0}toClientCoordinates(){return new XS(this.x-Tv.scrollX,this.y-Tv.scrollY)}}class XS{constructor(e,t){this.clientX=e,this.clientY=t,this._clientCoordinatesBrand=void 0}toPageCoordinates(){return new ZS(this.clientX+Tv.scrollX,this.clientY+Tv.scrollY)}}class JS{constructor(e,t,i,n){this.x=e,this.y=t,this.width=i,this.height=n,this._editorPagePositionBrand=void 0}}class QS{constructor(e,t){this.x=e,this.y=t,this._positionRelativeToEditorBrand=void 0}}function ek(e){const t=Iv(e);return new JS(t.left,t.top,t.width,t.height)}function tk(e,t,i){const n=t.width/e.offsetWidth,o=t.height/e.offsetHeight,r=(i.x-t.x)/n,s=(i.y-t.y)/o;return new QS(r,s)}class ik extends rv{constructor(e,t){super(e),this._editorMouseEventBrand=void 0,this.pos=new ZS(this.posx,this.posy),this.editorPos=ek(t),this.relativePos=tk(t,this.editorPos,this.pos)}}class nk{constructor(e){this._editorViewDomNode=e}_create(e){return new ik(e,this._editorViewDomNode)}onContextMenu(e,t){return pv(e,"contextmenu",(e=>{t(this._create(e))}))}onMouseUp(e,t){return pv(e,"mouseup",(e=>{t(this._create(e))}))}onMouseDown(e,t){return pv(e,"mousedown",(e=>{t(this._create(e))}))}onMouseLeave(e,t){return fv(e,(e=>{t(this._create(e))}))}onMouseMoveThrottled(e,t,i,n){return kv(e,"mousemove",t,((e,t)=>i(e,this._create(t))),n)}}class ok{constructor(e){this._editorViewDomNode=e}_create(e){return new ik(e,this._editorViewDomNode)}onPointerUp(e,t){return pv(e,"pointerup",(e=>{t(this._create(e))}))}onPointerDown(e,t){return pv(e,"pointerdown",(e=>{t(this._create(e))}))}onPointerLeave(e,t){return n=e=>{t(this._create(e))},pv(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 kv(e,"pointermove",t,((e,t)=>i(e,this._create(t))),n)}}class rk extends Nc{constructor(e){super(),this._editorViewDomNode=e,this._globalMouseMoveMonitor=this._register(new ry),this._keydownListener=null}startMonitoring(e,t,i,n,o){this._keydownListener=mv(document,"keydown",(e=>{e.toKeybinding().isModifierKey()||this._globalMouseMoveMonitor.stopMonitoring(!0,e.browserEvent)}),!0),this._globalMouseMoveMonitor.startMonitoring(e,t,((e,t)=>i(e,new ik(t,this._editorViewDomNode))),n,(e=>{this._keydownListener.dispose(),o(e)}))}stopMonitoring(){this._globalMouseMoveMonitor.stopMonitoring(!0)}}class sk{constructor(e){this._editor=e,this._instanceId=++sk._idPool,this._counter=0,this._rules=new Map,this._garbageCollectionScheduler=new bm((()=>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 ak(t,`dyn-rule-${this._instanceId}-${n}`,Wv(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())}}sk._idPool=0;class ak{constructor(e,t,i,n){this.key=e,this.className=t,this.properties=n,this._referenceCount=0,this._styleElement=jv(i),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(e,t){let i=`.${e} {`;for(const e in t){const n=t[e];let o;o="object"==typeof n?`var(${gy(n.id)})`:n,i+=`\n\t${lk(e)}: ${o};`}return i+="\n}",i}dispose(){this._styleElement.remove()}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}function lk(e){return e.replace(/(^[A-Z])/,(([e])=>e.toLowerCase())).replace(/([A-Z])/g,(([e])=>`-${e.toLowerCase()}`))}class ck extends Nc{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<n;i++){const n=e[i];switch(n.type){case 0:this.onCompositionStart(n)&&(t=!0);break;case 1:this.onCompositionEnd(n)&&(t=!0);break;case 2:this.onConfigurationChanged(n)&&(t=!0);break;case 3:this.onCursorStateChanged(n)&&(t=!0);break;case 4:this.onDecorationsChanged(n)&&(t=!0);break;case 5:this.onFlushed(n)&&(t=!0);break;case 6:this.onFocusChanged(n)&&(t=!0);break;case 7:this.onLanguageConfigurationChanged(n)&&(t=!0);break;case 8:this.onLineMappingChanged(n)&&(t=!0);break;case 9:this.onLinesChanged(n)&&(t=!0);break;case 10:this.onLinesDeleted(n)&&(t=!0);break;case 11:this.onLinesInserted(n)&&(t=!0);break;case 12:this.onRevealRangeRequest(n)&&(t=!0);break;case 13:this.onScrollChanged(n)&&(t=!0);break;case 15:this.onTokensChanged(n)&&(t=!0);break;case 14:this.onThemeChanged(n)&&(t=!0);break;case 16:this.onTokensColorsChanged(n)&&(t=!0);break;case 17:this.onZonesChanged(n)&&(t=!0);break;default:console.info("View received unknown event: "),console.info(n)}}t&&(this._shouldRender=!0)}}class dk extends ck{constructor(e){super(),this._context=e,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}}class hk{static write(e,t){e.setAttribute("data-mprt",String(t))}static read(e){const t=e.getAttribute("data-mprt");return null===t?0:parseInt(t,10)}static collect(e,t){const i=[];let n=0;for(;e&&e!==document.body&&e!==t;)e.nodeType===e.ELEMENT_NODE&&(i[n++]=this.read(e)),e=e.parentElement;const o=new Uint8Array(n);for(let e=0;e<n;e++)o[e]=i[n-e-1];return o}}class uk extends class{constructor(e,t){this._restrictedRenderingContextBrand=void 0,this._viewLayout=e,this.viewportData=t,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;const i=this._viewLayout.getCurrentViewport();this.scrollTop=i.top,this.scrollLeft=i.left,this.viewportWidth=i.width,this.viewportHeight=i.height}getScrolledTopFromAbsoluteTop(e){return e-this.scrollTop}getVerticalOffsetForLineNumber(e){return this._viewLayout.getVerticalOffsetForLineNumber(e)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}{constructor(e,t,i){super(e,t),this._renderingContextBrand=void 0,this._viewLines=i}linesVisibleRangesForRange(e,t){return this._viewLines.linesVisibleRangesForRange(e,t)}visibleRangeForPosition(e){return this._viewLines.visibleRangeForPosition(e)}}class gk{constructor(e,t,i){this.outsideRenderedLine=e,this.lineNumber=t,this.ranges=i}}class pk{constructor(e,t){this._horizontalRangeBrand=void 0,this.left=Math.round(e),this.width=Math.round(t)}static from(e){const t=new Array(e.length);for(let i=0,n=e.length;i<n;i++){const n=e[i];t[i]=new pk(n.left,n.width)}return t}toString(){return`[${this.left},${this.width}]`}}class mk{constructor(e,t){this._floatHorizontalRangeBrand=void 0,this.left=e,this.width=t}toString(){return`[${this.left},${this.width}]`}static compare(e,t){return e.left-t.left}}class fk{constructor(e,t){this.outsideRenderedLine=e,this.originalLeft=t,this.left=Math.round(this.originalLeft)}}class _k{constructor(e,t){this.outsideRenderedLine=e,this.ranges=t}}class vk{static _createRange(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange}static _detachRange(e,t){e.selectNodeContents(t)}static _readClientRects(e,t,i,n,o){const r=this._createRange();try{return r.setStart(e,t),r.setEnd(i,n),r.getClientRects()}catch(e){return null}finally{this._detachRange(r,o)}}static _mergeAdjacentRanges(e){if(1===e.length)return e;e.sort(mk.compare);const t=[];let i=0,n=e[0];for(let o=1,r=e.length;o<r;o++){const r=e[o];n.left+n.width+.9>=r.left?n.width=Math.max(n.width,r.left+r.width-n.left):(t[i++]=n,n=r)}return t[i++]=n,t}static _createHorizontalRangesFromClientRects(e,t,i){if(!e||0===e.length)return null;const n=[];for(let o=0,r=e.length;o<r;o++){const r=e[o];n[o]=new mk(Math.max(0,(r.left-t)/i),r.width/i)}return this._mergeAdjacentRanges(n)}static readHorizontalRanges(e,t,i,n,o,r,s,a){const l=e.children.length-1;if(0>l)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,r,s)}t!==n&&n>0&&0===o&&(n--,o=1073741824);let c=e.children[t].firstChild,d=e.children[n].firstChild;if(c&&d||(!c&&0===i&&t>0&&(c=e.children[t-1].firstChild,i=1073741824),!d&&0===o&&n>0&&(d=e.children[n-1].firstChild,o=1073741824)),!c||!d)return null;i=Math.min(c.textContent.length,Math.max(0,i)),o=Math.min(d.textContent.length,Math.max(0,o));const h=this._readClientRects(c,i,d,o,a);return this._createHorizontalRangesFromClientRects(h,r,s)}}const bk=!!Ba||!(Fa||ug||mg);let wk=!0;class yk{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 Ck{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 Sk{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=yg(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===nw.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),r=this._options,s=n_.filter(o.inlineDecorations,e,o.minColumn,o.maxColumn);let a=null;if(r.themeType===nw.HIGH_CONTRAST||"selection"===this._options.renderWhitespace){const t=i.selections;for(const i of t){if(i.endLineNumber<e||i.startLineNumber>e)continue;const t=i.startLineNumber===e?i.startColumn:o.minColumn,n=i.endLineNumber===e?i.endColumn:o.maxColumn;t<n&&(r.themeType===nw.HIGH_CONTRAST||"selection"!==this._options.renderWhitespace?s.push(new n_(t,n,"inline-selected-text",0)):(a||(a=[]),a.push(new a_(t-1,n-1))))}}const l=new l_(r.useMonospaceOptimizations,r.canUseHalfwidthRightwardsArrow,o.content,o.continuesWithWrappedLine,o.isBasicASCII,o.containsRTL,o.minColumn-1,o.tokens,s,o.tabSize,o.startVisibleColumn,r.spaceWidth,r.middotWidth,r.wsmiddotWidth,r.stopRenderingLineAfter,r.renderWhitespace,r.renderControlCharacters,r.fontLigatures!==tc.OFF,a);if(this._renderedViewLine&&this._renderedViewLine.input.equals(l))return!1;n.appendASCIIString('<div style="top:'),n.appendASCIIString(String(t)),n.appendASCIIString("px;height:"),n.appendASCIIString(String(this._options.lineHeight)),n.appendASCIIString('px;" class="'),n.appendASCIIString(Sk.CLASS_NAME),n.appendASCIIString('">');const c=u_(l,n);n.appendASCIIString("</div>");let d=null;return wk&&bk&&o.isBasicASCII&&r.useMonospaceOptimizations&&0===c.containsForeignElements&&o.content.length<300&&l.lineTokens.getCount()<100&&(d=new kk(this._renderedViewLine?this._renderedViewLine.domNode:null,l,c.characterMapping)),d||(d=Ek(this._renderedViewLine?this._renderedViewLine.domNode:null,l,c.characterMapping,c.containsRTL,c.containsForeignElements)),this._renderedViewLine=d,!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 kk}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof kk?this._renderedViewLine.monospaceAssumptionsAreValid():wk}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof kk&&(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 r=!1;-1!==o&&t>o+1&&i>o+1&&(r=!0),-1!==o&&t>o+1&&(t=o+1),-1!==o&&i>o+1&&(i=o+1);const s=this._renderedViewLine.getVisibleRangesForRange(e,t,i,n);return s&&s.length>0?new _k(r,s):null}getColumnOfNodeOffset(e,t,i){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t,i):1}}Sk.CLASS_NAME="view-line";class kk{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 wk;const e=this.getWidth(),t=this.domNode.domNode.firstChild.offsetWidth;return Math.abs(e-t)>=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),wk=!1),wk}toSlowRenderedLine(){return Ek(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(e,t,i,n){const o=this._getCharPosition(t),r=this._getCharPosition(i);return[new mk(o,r-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 c_(o,i),n)}}class xk{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 r=this._readPixelOffset(this.domNode,e,i,n);return-1===r?null:[new mk(o,r-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 mk(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 r=this._actualReadPixelOffset(e,t,i,n);return this._pixelOffsetCache[i]=r,r}return this._actualReadPixelOffset(e,t,i,n)}_actualReadPixelOffset(e,t,i,n){if(0===this._characterMapping.length){const t=vk.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),r=vk.readHorizontalRanges(this._getReadingTarget(e),o.partIndex,o.charIndex,o.partIndex,o.charIndex,n.clientRectDeltaLeft,n.clientRectScale,n.endNode);if(!r||0===r.length)return-1;const s=r[0].left;if(this.input.isBasicASCII){const e=this._characterMapping.getAbsoluteOffset(i),t=Math.round(this.input.spaceWidth*e);if(Math.abs(t-s)<=1)return t}return s}_readRawVisibleRangesForRange(e,t,i,n){if(1===t&&i===this._characterMapping.length)return[new mk(0,this.getWidth())];const o=this._characterMapping.getDomPosition(t),r=this._characterMapping.getDomPosition(i);return vk.readHorizontalRanges(this._getReadingTarget(e),o.partIndex,o.charIndex,r.partIndex,r.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 c_(o,i),n)}}class Lk extends xk{_readVisibleRangesForRange(e,t,i,n,o){const r=super._readVisibleRangesForRange(e,t,i,n,o);if(!r||0===r.length||i===n||1===i&&n===this._characterMapping.length)return r;if(!this.input.containsRTL){const i=this._readPixelOffset(e,t,n,o);if(-1!==i){const e=r[r.length-1];e.left<i&&(e.width=i-e.left)}}return r}}const Ek=gg?function(e,t,i,n,o){return new Lk(e,t,i,n,o)}:function(e,t,i,n,o){return new xk(e,t,i,n,o)};class Nk{static _nextVisibleColumn(e,t,i){return 9===e?Nk.nextRenderTabStop(t,i):Zu(e)||Xu(e)?t+2:t+1}static visibleColumnFromColumn(e,t,i){const n=Math.min(t-1,e.length),o=e.substring(0,n),r=new zu(o);let s=0;for(;!r.eol();){const e=Wu(o,n,r.offset);r.nextGraphemeLength(),s=this._nextVisibleColumn(e,s,i)}return s}static columnFromVisibleColumn(e,t,i){if(t<=0)return 1;const n=e.length,o=new zu(e);let r=0,s=1;for(;!o.eol();){const a=Wu(e,n,o.offset);o.nextGraphemeLength();const l=this._nextVisibleColumn(a,r,i),c=o.offset+1;if(l>=t)return l-t<t-r?c:s;r=l,s=c}return n+1}static nextRenderTabStop(e,t){return e+t-e%t}static nextIndentTabStop(e,t){return e+t-e%t}static prevRenderTabStop(e,t){return Math.max(0,e-1-(e-1)%t)}static prevIndentTabStop(e,t){return Math.max(0,e-1-(e-1)%t)}}class Ik{static whitespaceVisibleColumn(e,t,i){const n=e.length;let o=0,r=-1,s=-1;for(let a=0;a<n;a++){if(a===t)return[r,s,o];switch(o%i==0&&(r=a,s=o),e.charCodeAt(a)){case 32:o+=1;break;case 9:o=Nk.nextRenderTabStop(o,i);break;default:return[-1,-1,-1]}}return t===n?[r,s,o]:[-1,-1,-1]}static atomicPosition(e,t,i,n){const o=e.length,[r,s,a]=Ik.whitespaceVisibleColumn(e,t,i);if(-1===a)return-1;let l;switch(n){case 0:l=!0;break;case 1:l=!1;break;case 2:if(a%i==0)return t;l=a%i<=i/2}if(l){if(-1===r)return-1;let t=s;for(let n=r;n<o;++n){if(t===s+i)return r;switch(e.charCodeAt(n)){case 32:t+=1;break;case 9:t=Nk.nextRenderTabStop(t,i);break;default:return-1}}return t===s+i?r:-1}const c=Nk.nextRenderTabStop(a,i);let d=a;for(let n=t;n<o;n++){if(d===c)return n;switch(e.charCodeAt(n)){case 32:d+=1;break;case 9:d=Nk.nextRenderTabStop(d,i);break;default:return-1}}return d===c?o:-1}}class Tk{constructor(e=null){this.hitTarget=e,this.type=0}}class Dk{constructor(e,t,i){this.position=e,this.spanNode=t,this.injectedText=i,this.type=1}}var Ak;!function(e){e.createFromDOMInfo=function(e,t,i){const n=e.getPositionFromDOMInfo(t,i);return n?new Dk(n,t,null):new Tk(t)}}(Ak||(Ak={}));class Ok{constructor(e,t){this.lastViewCursorsRenderData=e,this.lastTextareaPosition=t}}class Mk{static _deduceRage(e,t=null){return!t&&e?new Zd(e.lineNumber,e.column,e.lineNumber,e.column):null!=t?t:null}static createUnknown(e,t,i){return{type:0,element:e,mouseColumn:t,position:i,range:this._deduceRage(i)}}static createTextarea(e,t){return{type:1,element:e,mouseColumn:t,position:null,range:null}}static createMargin(e,t,i,n,o,r){return{type:e,element:t,mouseColumn:i,position:n,range:o,detail:r}}static createViewZone(e,t,i,n,o){return{type:e,element:t,mouseColumn:i,position:n,range:this._deduceRage(n),detail:o}}static createContentText(e,t,i,n,o){return{type:6,element:e,mouseColumn:t,position:i,range:this._deduceRage(i,n),detail:o}}static createContentEmpty(e,t,i,n){return{type:7,element:e,mouseColumn:t,position:i,range:this._deduceRage(i),detail:n}}static createContentWidget(e,t,i){return{type:9,element:e,mouseColumn:t,position:null,range:null,detail:i}}static createScrollbar(e,t,i){return{type:11,element:e,mouseColumn:t,position:i,range:this._deduceRage(i)}}static createOverlayWidget(e,t,i){return{type:12,element:e,mouseColumn:t,position:null,range:null,detail:i}}static createOutsideEditor(e,t){return{type:13,element:null,mouseColumn:e,position:t,range:this._deduceRage(t)}}static _typeToString(e){return 1===e?"TEXTAREA":2===e?"GUTTER_GLYPH_MARGIN":3===e?"GUTTER_LINE_NUMBERS":4===e?"GUTTER_LINE_DECORATIONS":5===e?"GUTTER_VIEW_ZONE":6===e?"CONTENT_TEXT":7===e?"CONTENT_EMPTY":8===e?"CONTENT_VIEW_ZONE":9===e?"CONTENT_WIDGET":10===e?"OVERVIEW_RULER":11===e?"SCROLLBAR":12===e?"OVERLAY_WIDGET":"UNKNOWN"}static toString(e){return this._typeToString(e.type)+": "+e.position+" - "+e.range+" - "+JSON.stringify(e.detail)}}class Rk{static isTextArea(e){return 2===e.length&&3===e[0]&&6===e[1]}static isChildOfViewLines(e){return e.length>=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 Pk{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 Pk.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 r,s=null,a=null;return i.afterLineNumber!==o&&(a=new Yd(i.afterLineNumber+1,1)),i.afterLineNumber>0&&(s=new Yd(i.afterLineNumber,e.viewModel.getLineMaxColumn(i.afterLineNumber))),r=null===a?s:null===s?a:t<n?s:a,{viewZoneId:i.id,afterLineNumber:i.afterLineNumber,positionBefore:s,positionAfter:a,position:r}}return null}getFullLineRangeAtCoord(e){if(this._context.viewLayout.isAfterLines(e)){const e=this._context.viewModel.getLineCount(),t=this._context.viewModel.getLineMaxColumn(e);return{range:new Zd(e,t,e,t),isAfterLines:!0}}const t=this._context.viewLayout.getLineNumberAtVerticalOffset(e),i=this._context.viewModel.getLineMaxColumn(t);return{range:new Zd(t,1,t,i),isAfterLines:!1}}getLineNumberAtVerticalOffset(e){return this._context.viewLayout.getLineNumberAtVerticalOffset(e)}isAfterLines(e){return this._context.viewLayout.isAfterLines(e)}isInTopPadding(e){return this._context.viewLayout.isInTopPadding(e)}isInBottomPadding(e){return this._context.viewLayout.isInBottomPadding(e)}getVerticalOffsetForLineNumber(e){return this._context.viewLayout.getVerticalOffsetForLineNumber(e)}findAttribute(e,t){return Pk._findAttribute(e,t,this._viewHelper.viewDomNode)}static _findAttribute(e,t,i){for(;e&&e!==document.body;){if(e.hasAttribute&&e.hasAttribute(t))return e.getAttribute(t);if(e===i)return null;e=e.parentNode}return null}getLineWidth(e){return this._viewHelper.getLineWidth(e)}visibleRangeForPosition(e,t){return this._viewHelper.visibleRangeForPosition(e,t)}getPositionFromDOMInfo(e,t){return this._viewHelper.getPositionFromDOMInfo(e,t)}getCurrentScrollTop(){return this._context.viewLayout.getCurrentScrollTop()}getCurrentScrollLeft(){return this._context.viewLayout.getCurrentScrollLeft()}}class Fk extends class{constructor(e,t,i,n){this.editorPos=t,this.pos=i,this.relativePos=n,this.mouseVerticalOffset=Math.max(0,e.getCurrentScrollTop()+this.relativePos.y),this.mouseContentHorizontalOffset=e.getCurrentScrollLeft()+this.relativePos.x-e.layoutInfo.contentLeft,this.isInMarginArea=this.relativePos.x<e.layoutInfo.contentLeft&&this.relativePos.x>=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,Vk._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=hk.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.column<this._ctx.viewModel.getLineMaxColumn(e.lineNumber)?Nk.visibleColumnFromColumn(this._ctx.viewModel.getLineContent(e.lineNumber),e.column,this._ctx.viewModel.model.getOptions().tabSize)+1:this.mouseColumn}fulfillUnknown(e=null){return Mk.createUnknown(this.target,this._getMouseColumn(e),e)}fulfillTextarea(){return Mk.createTextarea(this.target,this._getMouseColumn())}fulfillMargin(e,t,i,n){return Mk.createMargin(e,this.target,this._getMouseColumn(t),t,i,n)}fulfillViewZone(e,t,i){return Mk.createViewZone(e,this.target,this._getMouseColumn(t),t,i)}fulfillContentText(e,t,i){return Mk.createContentText(this.target,this._getMouseColumn(e),e,t,i)}fulfillContentEmpty(e,t){return Mk.createContentEmpty(this.target,this._getMouseColumn(e),e,t)}fulfillContentWidget(e){return Mk.createContentWidget(this.target,this._getMouseColumn(),e)}fulfillScrollbar(e){return Mk.createScrollbar(this.target,this._getMouseColumn(e),e)}fulfillOverlayWidget(e){return Mk.createOverlayWidget(this.target,this._getMouseColumn(),e)}withTarget(e){return new Fk(this._ctx,this.editorPos,this.pos,this.relativePos,e)}}const Bk={isAfterLines:!0};function Wk(e){return{isAfterLines:!1,horizontalDistanceToText:e}}class Vk{constructor(e,t){this._context=e,this._viewHelper=t}mouseTargetIsWidget(e){const t=e.target,i=hk.collect(t,this._viewHelper.viewDomNode);return!(!Rk.isChildOfContentWidgets(i)&&!Rk.isChildOfOverflowingContentWidgets(i)&&!Rk.isChildOfOverlayWidgets(i))}createMouseTarget(e,t,i,n,o){const r=new Pk(this._context,this._viewHelper,e),s=new Fk(r,t,i,n,o);try{return Vk._createMouseTarget(r,s,!1)}catch(e){return s.fulfillUnknown()}}static _createMouseTarget(e,t,i){if(null===t.target){if(i)return t.fulfillUnknown();const n=Vk._doHitTest(e,t);return 1===n.type?Vk.createMouseTargetFromHitTestPosition(e,t,n.spanNode,n.position,n.injectedText):this._createMouseTarget(e,t.withTarget(n.hitTarget),!0)}const n=t;let o=null;return o=o||Vk._hitTestContentWidget(e,n),o=o||Vk._hitTestOverlayWidget(e,n),o=o||Vk._hitTestMinimap(e,n),o=o||Vk._hitTestScrollbarSlider(e,n),o=o||Vk._hitTestViewZone(e,n),o=o||Vk._hitTestMargin(e,n),o=o||Vk._hitTestViewCursor(e,n),o=o||Vk._hitTestTextArea(e,n),o=o||Vk._hitTestViewLines(e,n,i),o=o||Vk._hitTestScrollbar(e,n),o||t.fulfillUnknown()}static _hitTestContentWidget(e,t){if(Rk.isChildOfContentWidgets(t.targetPath)||Rk.isChildOfOverflowingContentWidgets(t.targetPath)){const i=e.findAttribute(t.target,"widgetId");return i?t.fulfillContentWidget(i):t.fulfillUnknown()}return null}static _hitTestOverlayWidget(e,t){if(Rk.isChildOfOverlayWidgets(t.targetPath)){const i=e.findAttribute(t.target,"widgetId");return i?t.fulfillOverlayWidget(i):t.fulfillUnknown()}return null}static _hitTestViewCursor(e,t){if(t.target){const i=e.lastRenderData.lastViewCursorsRenderData;for(const e of i)if(t.target===e.domNode)return t.fulfillContentText(e.position,null,{mightBeForeignElement:!1,injectedText:null})}if(t.isInContentArea){const i=e.lastRenderData.lastViewCursorsRenderData,n=t.mouseContentHorizontalOffset,o=t.mouseVerticalOffset;for(const r of i){if(n<r.contentLeft)continue;if(n>r.contentLeft+r.width)continue;const i=e.getVerticalOffsetForLineNumber(r.position.lineNumber);if(i<=o&&o<=i+r.height)return t.fulfillContentText(r.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 Rk.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 r={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,r):(o-=e.layoutInfo.glyphMarginWidth,o<=e.layoutInfo.lineNumbersWidth?t.fulfillMargin(3,n,i.range,r):(o-=e.layoutInfo.lineNumbersWidth,t.fulfillMargin(4,n,i.range,r)))}return null}static _hitTestViewLines(e,t,i){if(!Rk.isChildOfViewLines(t.targetPath))return null;if(e.isInTopPadding(t.mouseVerticalOffset))return t.fulfillContentEmpty(new Yd(1,1),Bk);if(e.isAfterLines(t.mouseVerticalOffset)||e.isInBottomPadding(t.mouseVerticalOffset)){const i=e.viewModel.getLineCount(),n=e.viewModel.getLineMaxColumn(i);return t.fulfillContentEmpty(new Yd(i,n),Bk)}if(i){if(Rk.isStrictChildOfViewLines(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(0===e.viewModel.getLineLength(i)){const n=e.getLineWidth(i),o=Wk(t.mouseContentHorizontalOffset-n);return t.fulfillContentEmpty(new Yd(i,1),o)}const n=e.getLineWidth(i);if(t.mouseContentHorizontalOffset>=n){const o=Wk(t.mouseContentHorizontalOffset-n),r=new Yd(i,e.viewModel.getLineMaxColumn(i));return t.fulfillContentEmpty(r,o)}}return t.fulfillUnknown()}const n=Vk._doHitTest(e,t);return 1===n.type?Vk.createMouseTargetFromHitTestPosition(e,t,n.spanNode,n.position,n.injectedText):this._createMouseTarget(e,t.withTarget(n.hitTarget),!0)}static _hitTestMinimap(e,t){if(Rk.isChildOfMinimap(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new Yd(i,n))}return null}static _hitTestScrollbarSlider(e,t){if(Rk.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 Yd(i,n))}}return null}static _hitTestScrollbar(e,t){if(Rk.isChildOfScrollableElement(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new Yd(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 Vk._getMouseColumn(n,t.get(44).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,t){return e<0?1:Math.round(e/t)+1}static createMouseTargetFromHitTestPosition(e,t,i,n,o){const r=n.lineNumber,s=n.column,a=e.getLineWidth(r);if(t.mouseContentHorizontalOffset>a){const e=Wk(t.mouseContentHorizontalOffset-a);return t.fulfillContentEmpty(n,e)}const l=e.visibleRangeForPosition(r,s);if(!l)return t.fulfillUnknown(n);const c=l.left;if(t.mouseContentHorizontalOffset===c)return t.fulfillContentText(n,null,{mightBeForeignElement:!!o,injectedText:o});const d=[];if(d.push({offset:l.left,column:s}),s>1){const t=e.visibleRangeForPosition(r,s-1);t&&d.push({offset:t.left,column:s-1})}if(s<e.viewModel.getLineMaxColumn(r)){const t=e.visibleRangeForPosition(r,s+1);t&&d.push({offset:t.left,column:s+1})}d.sort(((e,t)=>e.offset-t.offset));const h=t.pos.toClientCoordinates(),u=i.getBoundingClientRect(),g=u.left<=h.clientX&&h.clientX<=u.right;for(let e=1;e<d.length;e++){const i=d[e-1],s=d[e];if(i.offset<=t.mouseContentHorizontalOffset&&t.mouseContentHorizontalOffset<=s.offset){const e=new Zd(r,i.column,r,s.column);return t.fulfillContentText(n,e,{mightBeForeignElement:!g||!!o,injectedText:o})}}return t.fulfillContentText(n,null,{mightBeForeignElement:!g||!!o,injectedText:o})}static _doHitTestWithCaretRangeFromPoint(e,t){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.getVerticalOffsetForLineNumber(i)+Math.floor(e.lineHeight/2);let o=t.pos.y+(n-t.mouseVerticalOffset);o<=t.editorPos.y&&(o=t.editorPos.y+1),o>=t.editorPos.y+t.editorPos.height&&(o=t.editorPos.y+t.editorPos.height-1);const r=new ZS(t.pos.x,o),s=this._actualDoHitTestWithCaretRangeFromPoint(e,r.toClientCoordinates());return 1===s.type?s:this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates())}static _actualDoHitTestWithCaretRangeFromPoint(e,t){const i=Vv(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"),r=o.innerText;let s,a=e.left,l=0;if(t>e.left+e.width)l=r.length;else{const e=zk.getInstance();for(let n=0;n<r.length+1;n++){if(s=e.getCharWidth(r.charAt(n),i)/2,a+=s,t<a){l=n;break}a+=s}}n.setStart(o.firstChild,l),n.setEnd(o.firstChild,l)}return n}(i,t.clientX,t.clientY):i.caretRangeFromPoint(t.clientX,t.clientY):document.caretRangeFromPoint(t.clientX,t.clientY),!n||!n.startContainer)return new Tk;const o=n.startContainer;if(o.nodeType===o.TEXT_NODE){const t=o.parentNode,i=t?t.parentNode:null,r=i?i.parentNode:null;return(r&&r.nodeType===r.ELEMENT_NODE?r.className:null)===Sk.CLASS_NAME?Ak.createFromDOMInfo(e,t,n.startOffset):new Tk(o.parentNode)}if(o.nodeType===o.ELEMENT_NODE){const t=o.parentNode,i=t?t.parentNode:null;return(i&&i.nodeType===i.ELEMENT_NODE?i.className:null)===Sk.CLASS_NAME?Ak.createFromDOMInfo(e,o,o.textContent.length):new Tk(o)}return new Tk}static _doHitTestWithCaretPositionFromPoint(e,t){const i=document.caretPositionFromPoint(t.clientX,t.clientY);if(i.offsetNode.nodeType===i.offsetNode.TEXT_NODE){const t=i.offsetNode.parentNode,n=t?t.parentNode:null,o=n?n.parentNode:null;return(o&&o.nodeType===o.ELEMENT_NODE?o.className:null)===Sk.CLASS_NAME?Ak.createFromDOMInfo(e,i.offsetNode.parentNode,i.offset):new Tk(i.offsetNode.parentNode)}if(i.offsetNode.nodeType===i.offsetNode.ELEMENT_NODE){const t=i.offsetNode.parentNode,n=t&&t.nodeType===t.ELEMENT_NODE?t.className:null,o=t?t.parentNode:null,r=o&&o.nodeType===o.ELEMENT_NODE?o.className:null;if(n===Sk.CLASS_NAME){const t=i.offsetNode.childNodes[Math.min(i.offset,i.offsetNode.childNodes.length-1)];if(t)return Ak.createFromDOMInfo(e,t,0)}else if(r===Sk.CLASS_NAME)return Ak.createFromDOMInfo(e,i.offsetNode,0)}return new Tk(i.offsetNode)}static _snapToSoftTabBoundary(e,t){const i=t.getLineContent(e.lineNumber),{tabSize:n}=t.model.getOptions(),o=Ik.atomicPosition(i,e.column-1,n,2);return-1!==o?new Yd(e.lineNumber,o+1):e}static _doHitTest(e,t){let i=new Tk;if("function"==typeof document.caretRangeFromPoint?i=this._doHitTestWithCaretRangeFromPoint(e,t):document.caretPositionFromPoint&&(i=this._doHitTestWithCaretPositionFromPoint(e,t.pos.toClientCoordinates())),1===i.type){const t=e.viewModel.getInjectedTextAt(i.position),n=e.viewModel.normalizePosition(i.position,2);!t&&n.equals(i.position)||(i=new Dk(n,i.spanNode,t))}return 1===i.type&&e.stickyTabStops&&(i=new Dk(this._snapToSoftTabBoundary(i.position,e.viewModel),i.spanNode,i.injectedText)),i}}class zk{constructor(){this._cache={},this._canvas=document.createElement("canvas")}static getInstance(){return zk._INSTANCE||(zk._INSTANCE=new zk),zk._INSTANCE}getCharWidth(e,t){const i=e+t;if(this._cache[i])return this._cache[i];const n=this._canvas.getContext("2d");n.font=t;const o=n.measureText(e).width;return this._cache[i]=o,o}}function jk(e){return function(t,i){let n=!1;return e&&(n=e.mouseTargetIsWidget(i)),n||i.preventDefault(),i}}zk._INSTANCE=null;class Hk extends ck{constructor(e,t,i){super(),this._context=e,this.viewController=t,this.viewHelper=i,this.mouseTargetFactory=new Vk(this._context,i),this._mouseDownOperation=this._register(new Uk(this._context,this.viewController,this.viewHelper,((e,t)=>this._createMouseTarget(e,t)),(e=>this._getMouseColumn(e)))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(131).height;const n=new nk(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)),jk(this.mouseTargetFactory),Hk.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(pv(this.viewHelper.viewDomNode,Kv.MOUSE_WHEEL,(e=>{if(this.viewController.emitMouseWheel(e),!this._context.configuration.options.get(68))return;const t=new sv(e);if(Pa?(e.metaKey||e.ctrlKey)&&!e.shiftKey&&!e.altKey:e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey){const e=xg.getZoomLevel(),i=t.deltaY>0?1:-1;xg.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 XS(e,t).toPageCoordinates(),n=ek(this.viewHelper.viewDomNode);if(i.y<n.y||i.y>n.y+n.height||i.x<n.x||i.x>n.x+n.width)return null;const o=tk(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=Vv(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){this._mouseDownOperation.isActive()||e.timestamp<this.lastMouseLeaveTime||this.viewController.emitMouseMove({event:e,target:this._createMouseTarget(e,!0)})}_onMouseLeave(e){this.lastMouseLeaveTime=(new Date).getTime(),this.viewController.emitMouseLeave({event:e,target:null})}_onMouseUp(e){this.viewController.emitMouseUp({event:e,target:this._createMouseTarget(e,!0)})}_onMouseDown(e){const t=this._createMouseTarget(e,!0),i=6===t.type||7===t.type,n=2===t.type||3===t.type||4===t.type,o=3===t.type,r=this._context.configuration.options.get(98),s=8===t.type||5===t.type,a=9===t.type;let l=e.leftButton||e.middleButton;Pa&&e.leftButton&&e.ctrlKey&&(l=!1);const c=()=>{e.preventDefault(),this.viewHelper.focusTextArea()};if(l&&(i||o&&r))c(),this._mouseDownOperation.start(t.type,e);else if(n)e.preventDefault();else if(s){const i=t.detail;this.viewHelper.shouldSuppressMouseDownOnViewZone(i.viewZoneId)&&(c(),this._mouseDownOperation.start(t.type,e),e.preventDefault())}else a&&this.viewHelper.shouldSuppressMouseDownOnWidget(t.detail)&&(c(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:t})}}Hk.MOUSE_MOVE_MINIMUM_TIME=100;class Uk extends Nc{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 rk(this._viewHelper.viewDomNode)),this._onScrollTimeout=this._register(new _m),this._mouseState=new $k,this._currentSelection=new Xd(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,jk(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,jk(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.posy<t.y){const i=Math.max(n.getCurrentScrollTop()-(t.y-e.posy),0),r=Pk.getZoneAtCoord(this._context,i);if(r){const e=this._helpPositionJumpOverViewZone(r);if(e)return Mk.createOutsideEditor(o,e)}const s=n.getLineNumberAtVerticalOffset(i);return Mk.createOutsideEditor(o,new Yd(s,1))}if(e.posy>t.y+t.height){const t=n.getCurrentScrollTop()+e.relativePos.y,r=Pk.getZoneAtCoord(this._context,t);if(r){const e=this._helpPositionJumpOverViewZone(r);if(e)return Mk.createOutsideEditor(o,e)}const s=n.getLineNumberAtVerticalOffset(t);return Mk.createOutsideEditor(o,new Yd(s,i.getLineMaxColumn(s)))}const r=n.getLineNumberAtVerticalOffset(n.getCurrentScrollTop()+e.relativePos.y);return e.posx<t.x?Mk.createOutsideEditor(o,new Yd(r,1)):e.posx>t.x+t.width?Mk.createOutsideEditor(o,new Yd(r,i.getLineMaxColumn(r))):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 Mk.createViewZone(n.type,n.element,n.mouseColumn,e,n.detail)}return n}_helpPositionJumpOverViewZone(e){const t=new Yd(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 $k{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>$k.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 Kk,qk;$k.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"}(Kk||(Kk={}));class Gk{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 Gk(e.getValue(),e.getSelectionStart(),e.getSelectionEnd(),null,null)}collapseSelection(){return new Gk(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(Mu(e.value,t.value),e.selectionStart,t.selectionStart),o=Math.min(Ru(e.value,t.value),e.value.length-e.selectionEnd,t.value.length-t.selectionEnd),r=(e.value.substring(n,e.value.length-o),t.value.substring(n,t.value.length-o)),s=e.selectionStart-n,a=e.selectionEnd-n;if(t.selectionStart-n===t.selectionEnd-n){return{text:r,replacePrevCharCnt:e.selectionStart-n,replaceNextCharCnt:0,positionDelta:0}}return{text:r,replacePrevCharCnt:a-s,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(Mu(e.value,t.value),e.selectionEnd),n=Math.min(Ru(e.value,t.value),e.value.length-e.selectionEnd),o=e.value.substring(i,e.value.length-n),r=t.value.substring(i,t.value.length-n),s=(e.selectionStart,e.selectionEnd-i),a=(t.selectionStart,t.selectionEnd-i);return{text:r,replacePrevCharCnt:s,replaceNextCharCnt:o.length-s,positionDelta:a-r.length}}}Gk.EMPTY=new Gk("",0,0,null,null);class Yk{static _getPageOfLine(e,t){return Math.floor((e-1)/t)}static _getRangeForPage(e,t){const i=e*t;return new Zd(i+1,1,i+t+1,1)}static fromEditorSelection(e,t,i,n,o){const r=Yk._getPageOfLine(i.startLineNumber,n),s=Yk._getRangeForPage(r,n),a=Yk._getPageOfLine(i.endLineNumber,n),l=Yk._getRangeForPage(a,n),c=s.intersectRanges(new Zd(1,1,i.startLineNumber,i.startColumn));let d=t.getValueInRange(c,1);const h=t.getLineCount(),u=t.getLineMaxColumn(h),g=l.intersectRanges(new Zd(i.endLineNumber,i.endColumn,h,u));let p,m=t.getValueInRange(g,1);if(r===a||r+1===a)p=t.getValueInRange(i,1);else{const e=s.intersectRanges(i),n=l.intersectRanges(i);p=t.getValueInRange(e,1)+String.fromCharCode(8230)+t.getValueInRange(n,1)}if(o){const e=500;d.length>e&&(d=d.substring(d.length-e,d.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 Gk(d+p+m,d.length,d.length+p.length,new Yd(i.startLineNumber,i.startColumn),new Yd(i.endLineNumber,i.endColumn))}}!function(e){e.Tap="-monaco-textarea-synthetic-tap"}(qk||(qk={}));class Zk{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)}}Zk.INSTANCE=new Zk;class Xk{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 Jk extends Nc{constructor(e,t,i,n){super(),this._host=e,this._textArea=t,this._OS=i,this._browser=n,this._onFocus=this._register(new Vc),this.onFocus=this._onFocus.event,this._onBlur=this._register(new Vc),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new Vc),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new Vc),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new Vc),this.onCut=this._onCut.event,this._onPaste=this._register(new Vc),this.onPaste=this._onPaste.event,this._onType=this._register(new Vc),this.onType=this._onType.event,this._onCompositionStart=this._register(new Vc),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new Vc),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new Vc),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new Vc),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncTriggerCut=this._register(new bm((()=>this._onCut.fire()),0)),this._asyncFocusGainWriteScreenReaderContent=this._register(new bm((()=>this.writeScreenReaderContent("asyncFocusGain")),0)),this._textAreaState=Gk.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 ev(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 ev(e);this._onKeyUp.fire(t)}))),this._register(this._textArea.onCompositionStart((e=>{const t=new Xk;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=Gk.readFromTextArea(this._textArea),i=Gk.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=Gk.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=Gk.readFromTextArea(this._textArea),t=Gk.deduceAndroidCompositionInput(this._textAreaState,e);return this._textAreaState=e,this._onType.fire(t),void this._onCompositionEnd.fire()}const i=t.handleCompositionUpdate(e.data);this._textAreaState=Gk.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=Gk.readFromTextArea(this._textArea),i=Gk.deduceInput(this._textAreaState,t,2===this._OS);0===i.replacePrevCharCnt&&1===i.text.length&&Pu(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]=Qk.getTextData(e.clipboardData);t&&(i=i||Zk.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 pv(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 r=this._textArea.getValue();if(this._textAreaState.value!==r)return;const s=this._textArea.getSelectionStart(),a=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===s&&this._textAreaState.selectionEnd===a)return;const l=this._textAreaState.deduceEditorPosition(s),c=this._host.deduceModelPosition(l[0],l[1],l[2]),d=this._textAreaState.deduceEditorPosition(a),h=this._host.deduceModelPosition(d[0],d[1],d[2]),u=new Xd(c.lineNumber,c.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};Zk.INSTANCE.set(this._browser.isFirefox?t.text.replace(/\r\n/g,"\n"):t.text,i),e.preventDefault(),e.clipboardData&&Qk.setTextData(e.clipboardData,t.text,t.html,i)}}class Qk{static getTextData(e){const t=e.getData(Kk.text);let i=null;const n=e.getData("vscode-editor-data");if("string"==typeof n)try{i=JSON.parse(n),1!==i.version&&(i=null)}catch(e){}return[t,i]}static setTextData(e,t,i,n){e.setData(Kk.text,t),"string"==typeof i&&e.setData("text/html",i),e.setData("vscode-editor-data",JSON.stringify(n))}}class ex extends Nc{constructor(e){super(),this._actual=e,this.onKeyDown=this._register(_v(this._actual,"keydown")).event,this.onKeyUp=this._register(_v(this._actual,"keyup")).event,this.onCompositionStart=this._register(_v(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(_v(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(_v(this._actual,"compositionend")).event,this.onInput=this._register(_v(this._actual,"input")).event,this.onCut=this._register(_v(this._actual,"cut")).event,this.onCopy=this._register(_v(this._actual,"copy")).event,this.onPaste=this._register(_v(this._actual,"paste")).event,this.onFocus=this._register(_v(this._actual,"focus")).event,this.onBlur=this._register(_v(this._actual,"blur")).event,this._onSyntheticTap=this._register(new Vc),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(pv(this._actual,qk.Tap,(()=>this._onSyntheticTap.fire())))}hasFocus(){const e=Vv(this._actual);return e?e.activeElement===this._actual:!!uv(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 r=Vv(n);o=r?r.activeElement:document.activeElement;const s=o===n,a=n.selectionStart,l=n.selectionEnd;if(s&&a===t&&l===i)ug&&window.parent!==window&&n.focus();else{if(s)return this.setIgnoreSelectionChangeTime("setSelectionRange"),n.setSelectionRange(t,i),void(ug&&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(e){}}}}class tx extends Hk{constructor(e,t,i){super(e,t,i),this._register(ny.addTarget(this.viewHelper.linesContentDomNode)),this._register(pv(this.viewHelper.linesContentDomNode,iy.Tap,(e=>this.onTap(e)))),this._register(pv(this.viewHelper.linesContentDomNode,iy.Change,(e=>this.onChange(e)))),this._register(pv(this.viewHelper.linesContentDomNode,iy.Contextmenu,(e=>this._onContextMenu(new ik(e,this.viewHelper.viewDomNode),!1)))),this._lastPointerType="mouse",this._register(pv(this.viewHelper.linesContentDomNode,"pointerdown",(e=>{const t=e.pointerType;this._lastPointerType="mouse"!==t?"touch"===t?"touch":"pen":"mouse"})));const n=new ok(this.viewHelper.viewDomNode);this._register(n.onPointerMoveThrottled(this.viewHelper.viewDomNode,(e=>this._onMouseMove(e)),jk(this.mouseTargetFactory),Hk.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 ik(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 ix extends Hk{constructor(e,t,i){super(e,t,i),this._register(ny.addTarget(this.viewHelper.linesContentDomNode)),this._register(pv(this.viewHelper.linesContentDomNode,iy.Tap,(e=>this.onTap(e)))),this._register(pv(this.viewHelper.linesContentDomNode,iy.Change,(e=>this.onChange(e)))),this._register(pv(this.viewHelper.linesContentDomNode,iy.Contextmenu,(e=>this._onContextMenu(new ik(e,this.viewHelper.viewDomNode),!1))))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new ik(e,this.viewHelper.viewDomNode),!1);if(t.position){const e=document.createEvent("CustomEvent");e.initEvent(qk.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(e),this.viewController.moveTo(t.position)}}onChange(e){this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}}class nx extends Nc{constructor(e,t,i){super(),za&&K_?this.handler=this._register(new tx(e,t,i)):window.TouchEvent?this.handler=this._register(new ix(e,t,i)):this.handler=this._register(new Hk(e,t,i))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}var ox=i(504),rx={};rx.styleTagTransform=uu(),rx.setAttributes=lu(),rx.insert=su().bind(null,"head"),rx.domAPI=ou(),rx.insertStyleElement=du(),iu()(ox.Z,rx),ox.Z&&ox.Z.locals&&ox.Z.locals;var sx=i(6184),ax={};ax.styleTagTransform=uu(),ax.setAttributes=lu(),ax.insert=su().bind(null,"head"),ax.domAPI=ou(),ax.insertStyleElement=du(),iu()(sx.Z,ax),sx.Z&&sx.Z.locals&&sx.Z.locals;class lx extends ck{}const cx=fy("editor.lineHighlightBackground",{dark:null,light:null,hc:null},ma(0,"Background color for the highlight of line at the cursor position.")),dx=fy("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hc:"#f38518"},ma(0,"Background color for the border around the line at the cursor position.")),hx=fy("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hc:null},ma(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),ux=fy("editor.rangeHighlightBorder",{dark:null,light:null,hc:wy},ma(0,"Background color of the border around highlighted ranges."),!0),gx=fy("editor.symbolHighlightBackground",{dark:SC,light:SC,hc:null},ma(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),px=fy("editor.symbolHighlightBorder",{dark:null,light:null,hc:wy},ma(0,"Background color of the border around highlighted symbols."),!0),mx=fy("editorCursor.foreground",{dark:"#AEAFAD",light:dy.black,hc:dy.white},ma(0,"Color of the editor cursor.")),fx=fy("editorCursor.background",null,ma(0,"The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),_x=fy("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hc:"#e3e4e229"},ma(0,"Color of whitespace characters in the editor.")),vx=fy("editorIndentGuide.background",{dark:_x,light:_x,hc:_x},ma(0,"Color of the editor indentation guides.")),bx=fy("editorIndentGuide.activeBackground",{dark:_x,light:_x,hc:_x},ma(0,"Color of the active editor indentation guides.")),wx=fy("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hc:dy.white},ma(0,"Color of editor line numbers.")),yx=fy("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hc:wy},ma(0,"Color of editor active line number"),!1,ma(0,"Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")),Cx=fy("editorLineNumber.activeForeground",{dark:yx,light:yx,hc:yx},ma(0,"Color of editor active line number")),Sx=fy("editorRuler.foreground",{dark:"#5A5A5A",light:dy.lightgrey,hc:dy.white},ma(0,"Color of the editor rulers.")),kx=(fy("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hc:"#999999"},ma(0,"Foreground color of editor CodeLens")),fy("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hc:"#0064001a"},ma(0,"Background color behind matching brackets")),fy("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hc:by},ma(0,"Color for matching brackets boxes")),fy("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hc:"#7f7f7f4d"},ma(0,"Color of the overview ruler border."))),xx=fy("editorOverviewRuler.background",null,ma(0,"Background color of the editor overview ruler. Only used when the minimap is enabled and placed on the right side of the editor.")),Lx=fy("editorGutter.background",{dark:rC,light:rC,hc:rC},ma(0,"Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),Ex=fy("editorUnnecessaryCode.border",{dark:null,light:null,hc:dy.fromHex("#fff").transparent(.8)},ma(0,"Border color of unnecessary (unused) source code in the editor.")),Nx=fy("editorUnnecessaryCode.opacity",{dark:dy.fromHex("#000a"),light:dy.fromHex("#0007"),hc:null},ma(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.")),Ix=(fy("editorGhostText.border",{dark:null,light:null,hc:dy.fromHex("#fff").transparent(.8)},ma(0,"Border color of ghost text in the editor.")),fy("editorGhostText.foreground",{dark:dy.fromHex("#ffffff56"),light:dy.fromHex("#0007"),hc:null},ma(0,"Foreground color of the ghost text in the editor.")),fy("editorGhostText.background",{dark:null,light:null,hc:null},ma(0,"Background color of the ghost text in the editor.")),new dy(new ay(0,122,204,.6))),Tx=(fy("editorOverviewRuler.rangeHighlightForeground",{dark:Ix,light:Ix,hc:Ix},ma(0,"Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),fy("editorOverviewRuler.errorForeground",{dark:new dy(new ay(255,18,18,.7)),light:new dy(new ay(255,18,18,.7)),hc:new dy(new ay(255,50,50,1))},ma(0,"Overview ruler marker color for errors."))),Dx=fy("editorOverviewRuler.warningForeground",{dark:Jy,light:Jy,hc:Qy},ma(0,"Overview ruler marker color for warnings.")),Ax=fy("editorOverviewRuler.infoForeground",{dark:tC,light:tC,hc:iC},ma(0,"Overview ruler marker color for infos.")),Ox=fy("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hc:"#FFD700"},ma(0,"Foreground color of brackets (1). Requires enabling bracket pair colorization.")),Mx=fy("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hc:"#DA70D6"},ma(0,"Foreground color of brackets (2). Requires enabling bracket pair colorization.")),Rx=fy("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hc:"#87CEFA"},ma(0,"Foreground color of brackets (3). Requires enabling bracket pair colorization.")),Px=fy("editorBracketHighlight.foreground4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},ma(0,"Foreground color of brackets (4). Requires enabling bracket pair colorization.")),Fx=fy("editorBracketHighlight.foreground5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},ma(0,"Foreground color of brackets (5). Requires enabling bracket pair colorization.")),Bx=fy("editorBracketHighlight.foreground6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},ma(0,"Foreground color of brackets (6). Requires enabling bracket pair colorization.")),Wx=fy("editorBracketHighlight.unexpectedBracket.foreground",{dark:new dy(new ay(255,18,18,.8)),light:new dy(new ay(255,18,18,.8)),hc:new dy(new ay(255,50,50,1))},ma(0,"Foreground color of unexpected brackets.")),Vx=fy("editorBracketPairGuide.background1",{dark:"#00000000",light:"#00000000",hc:"#00000000"},ma(0,"Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),zx=fy("editorBracketPairGuide.background2",{dark:"#00000000",light:"#00000000",hc:"#00000000"},ma(0,"Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),jx=fy("editorBracketPairGuide.background3",{dark:"#00000000",light:"#00000000",hc:"#00000000"},ma(0,"Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),Hx=fy("editorBracketPairGuide.background4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},ma(0,"Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),Ux=fy("editorBracketPairGuide.background5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},ma(0,"Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),$x=fy("editorBracketPairGuide.background6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},ma(0,"Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),Kx=fy("editorBracketPairGuide.activeBackground1",{dark:"#00000000",light:"#00000000",hc:"#00000000"},ma(0,"Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),qx=fy("editorBracketPairGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hc:"#00000000"},ma(0,"Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),Gx=fy("editorBracketPairGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hc:"#00000000"},ma(0,"Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),Yx=fy("editorBracketPairGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},ma(0,"Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),Zx=fy("editorBracketPairGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},ma(0,"Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),Xx=fy("editorBracketPairGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},ma(0,"Background color of active bracket pair guides (6). Requires enabling bracket pair guides."));fy("editorUnicodeHighlight.border",{dark:"#BD9B03",light:"#CEA33D",hc:"#ff0000"},ma(0,"Border color used to highlight unicode characters.")),hw(((e,t)=>{const i=e.getColor(rC);i&&t.addRule(`.monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: ${i}; }`);const n=e.getColor(sC);n&&t.addRule(`.monaco-editor, .monaco-editor .inputarea.ime-input { color: ${n}; }`);const o=e.getColor(Lx);o&&t.addRule(`.monaco-editor .margin { background-color: ${o}; }`);const r=e.getColor(hx);r&&t.addRule(`.monaco-editor .rangeHighlight { background-color: ${r}; }`);const s=e.getColor(ux);s&&t.addRule(`.monaco-editor .rangeHighlight { border: 1px ${"hc"===e.type?"dotted":"solid"} ${s}; }`);const a=e.getColor(gx);a&&t.addRule(`.monaco-editor .symbolHighlight { background-color: ${a}; }`);const l=e.getColor(px);l&&t.addRule(`.monaco-editor .symbolHighlight { border: 1px ${"hc"===e.type?"dotted":"solid"} ${l}; }`);const c=e.getColor(_x);c&&(t.addRule(`.monaco-editor .mtkw { color: ${c} !important; }`),t.addRule(`.monaco-editor .mtkz { color: ${c} !important; }`))}));class Jx extends lx{constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new Yd(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 Yd(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?'<span class="relative-current-line-number">'+i+"</span>":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=Fa?this._lineHeight%2==0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,o='<div class="'+Jx.CLASS_NAME+t+'" style="left:'+this._lineNumbersLeft+"px;width:"+this._lineNumbersWidth+'px;">',r=this._context.viewModel.getLineCount(),s=[];for(let e=i;e<=n;e++){const n=e-i;if(!this._renderFinalNewline&&e===r&&0===this._context.viewModel.getLineLength(e)){s[n]="";continue}const a=this._getLineRenderLineNumber(e);a?e===this._activeLineNumber?s[n]='<div class="active-line-number '+Jx.CLASS_NAME+t+'" style="left:'+this._lineNumbersLeft+"px;width:"+this._lineNumbersWidth+'px;">'+a+"</div>":s[n]=o+a+"</div>":s[n]=""}this._renderResult=s}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}Jx.CLASS_NAME="line-numbers",hw(((e,t)=>{const i=e.getColor(wx);i&&t.addRule(`.monaco-editor .line-numbers { color: ${i}; }`);const n=e.getColor(Cx);n&&t.addRule(`.monaco-editor .line-numbers.active-line-number { color: ${n}; }`)}));class Qx extends dk{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=yg(document.createElement("div")),this._domNode.setClassName(Qx.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=yg(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(Qx.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)}}Qx.CLASS_NAME="glyph-margin",Qx.OUTER_CLASS_NAME="margin";var eL=i(7548),tL={};tL.styleTagTransform=uu(),tL.setAttributes=lu(),tL.insert=su().bind(null,"head"),tL.domAPI=ou(),tL.insertStyleElement=du(),iu()(eL.Z,tL),eL.Z&&eL.Z.locals&&eL.Z.locals;class iL{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 Yd(this.modelLineNumber,this.distanceToModelLineStart+1),i=new Yd(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 nL=ug;class oL extends dk{constructor(e,t,i){super(e),this._primaryCursorPosition=new Yd(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 Xd(1,1,1,1)],this._modelSelections=[new Xd(1,1,1,1)],this._lastRenderPosition=null,this.textArea=yg(document.createElement("textarea")),hk.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",ma(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=yg(document.createElement("div")),this.textAreaCover.setPosition("absolute");const r={getLineCount:()=>this._context.viewModel.getLineCount(),getLineMaxColumn:e=>this._context.viewModel.getLineMaxColumn(e),getValueInRange:(e,t)=>this._context.viewModel.getValueInRange(e,t)},a={getDataToCopy:()=>{const e=this._context.viewModel.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,Ra),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 r,s=null;if(this._copyWithSyntaxHighlighting&&o.length<65536){const e=this._context.viewModel.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);e&&(r=e.html,s=e.mode)}return{isFromEmptySelection:i,multicursorText:n,text:o,html:r,mode:s}},getScreenReaderContent:e=>{if(1===this._accessibilitySupport){if(Pa){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 Gk(i,i.length,i.length,t,t)}}return Gk.EMPTY}if(vg){const e=this._selections[0];if(e.isEmpty()){const t=e.getStartPosition(),[i,n]=this._getAndroidWordAtPosition(t);if(i.length>0)return new Gk(i,n,n,t,t)}return Gk.EMPTY}return Yk.fromEditorSelection(e,r,this._selections[0],this._accessibilityPageSize,0===this._accessibilitySupport)},deduceModelPosition:(e,t,i)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(e,t,i)},l=this._register(new ex(this.textArea.domNode));this._textAreaInput=this._register(new Jk(a,l,Ua,s)),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),r=o.lastIndexOf("\t"),s=o.length-r-1,a=i.getStartPosition(),l=Math.min(a.column-1,s);return{distanceToModelLineStart:a.column-1-l,widthOfHiddenTextBefore: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");Cg(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)}})(),{distanceToModelLineEnd:r}=(()=>{const e=t.value.substring(Math.max(t.selectionStart,t.selectionEnd)),n=e.indexOf("\n"),o=-1===n?e:e.substring(0,n),r=o.indexOf("\t"),s=-1===r?o.length:o.length-r-1,a=i.getEndPosition(),l=Math.min(this._context.viewModel.model.getLineMaxColumn(a.lineNumber)-a.column,s);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(a.lineNumber)-a.column-l}})();this._context.viewModel.revealRange("keyboard",!0,Zd.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new iL(this._context,i.startLineNumber,n,o,r),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=Sf('`~!@#$%^&*()-=+[{]}\\|;:",.<>/?');let n=!0,o=e.column,r=!0,s=e.column,a=0;for(;a<50&&(n||r);){if(n&&o<=1&&(n=!1),n){const e=t.charCodeAt(o-2);0!==i.get(e)?n=!1:o--}if(r&&s>t.length&&(r=!1),r){const e=t.charCodeAt(s-1);0!==i.get(e)?r=!1:s++}a++}return[t.substring(o-1,s-1),e.column-o]}_getWordBeforePosition(e){const t=this._context.viewModel.getLineContent(e.lineNumber),i=Sf(this._context.configuration.options.get(117));let n=e.column,o=0;for(;n>1;){const r=t.charCodeAt(n-2);if(0!==i.get(r)||o>50)return t.substring(n-1,e.column-1);o++,n--}return t.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){const t=this._context.viewModel.getLineContent(e.lineNumber).charAt(e.column-2);if(!Pu(t.charCodeAt(0)))return t}return""}_getAriaLabel(e){return 1===e.get(2)?ma(0,"The editor is not accessible at this time. Press {0} for options.",Fa?"Shift+Alt+F1":"Alt+F1"):e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const t=e.get(3);2===this._accessibilitySupport&&t===hc.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 Yd(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,r=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));let s=this._visibleTextArea.widthOfHiddenLineTextBefore,a=this._contentLeft+e.left-this._scrollLeft,l=t.left-e.left+1;if(a<this._contentLeft){const e=this._contentLeft-a;a+=e,s+=e,l-=e}l>this._contentWidth&&(l=this._contentWidth);const c=this._context.viewModel.getViewLineData(i.lineNumber),d=c.tokens.findTokenIndexAtOffset(i.column-1),h=d===c.tokens.findTokenIndexAtOffset(n.column-1),u=this._visibleTextArea.definePresentation(h?c.tokens.getPresentation(d):null);this.textArea.domNode.scrollTop=r*this._lineHeight,this.textArea.domNode.scrollLeft=s,this._doRender({lastRenderPosition:null,top:o,left:a,width:l,height:this._lineHeight,useCover:!1,color:(ph.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(e<this._contentLeft||e>this._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(Pa){this._doRender({lastRenderPosition:this._primaryCursorPosition,top:t,left:e,width:nL?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:nL?0:1,height:nL?0:1,useCover:!1})}_newlinecount(e){let t=0,i=-1;for(;i=e.indexOf("\n",i+1),-1!==i;)t++;return t}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:nL?0:1,height:nL?0:1,useCover:!0})}_doRender(e){this._lastRenderPosition=e.lastRenderPosition;const t=this.textArea,i=this.textAreaCover;Cg(t,this._fontInfo),t.setTop(e.top),t.setLeft(e.left),t.setWidth(e.width),t.setHeight(e.height),t.setColor(e.color?dy.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 "+Qx.OUTER_CLASS_NAME):0!==n.get(60).renderType?i.setClassName("monaco-editor-background textAreaCover "+Jx.CLASS_NAME):i.setClassName("monaco-editor-background textAreaCover")}}function rL(e,t,i){let n=Su(e);return-1===n&&(n=e.length),function(e,t,i){let n=0;for(let i=0;i<e.length;i++)"\t"===e.charAt(i)?n+=t:n++;let o="";if(!i){const e=Math.floor(n/t);n%=t;for(let t=0;t<e;t++)o+="\t"}for(let e=0;e<n;e++)o+=" ";return o}(e.substring(0,n),t,i)+e.substring(n)}const sL=()=>!0,aL=()=>!1,lL=e=>" "===e||"\t"===e;class cL{constructor(e,t,i,n){this.languageConfigurationService=n,this._cursorMoveConfigurationBrand=void 0,this._languageId=e;const o=i.options,r=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(r.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 s=this.languageConfigurationService.getLanguageConfiguration(e).getSurroundingPairs();if(s)for(const e of s)this.surroundingPairs[e.open]=e.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=Qg(t,i-1),o=this.languageConfigurationService.getLanguageConfiguration(n.languageId).electricCharacter;return o?o.onElectricCharacter(e,n,i-n.firstCharOffset):null}normalizeIndentation(e){return rL(e,this.indentSize,this.insertSpaces)}_getShouldAutoClose(e,t){switch(t){case"beforeWhitespace":return lL;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(e);case"always":return sL;case"never":return aL}}_getLanguageDefinedShouldAutoClose(e){const t=this.languageConfigurationService.getLanguageConfiguration(e).getAutoCloseBeforeSet();return e=>-1!==t.indexOf(e)}visibleColumnFromColumn(e,t){return Nk.visibleColumnFromColumn(e.getLineContent(t.lineNumber),t.column,this.tabSize)}columnFromVisibleColumn(e,t,i){const n=Nk.columnFromVisibleColumn(e.getLineContent(t),i,this.tabSize),o=e.getLineMinColumn(t);if(n<o)return o;const r=e.getLineMaxColumn(t);return n>r?r:n}}class dL{constructor(e,t){this._cursorStateBrand=void 0,this.modelState=e,this.viewState=t}static fromModelState(e){return new hL(e)}static fromViewState(e){return new uL(e)}static fromModelSelection(e){const t=Xd.liftSelection(e),i=new gL(Zd.fromPositions(t.getSelectionStart()),0,t.getPosition(),0);return dL.fromModelState(i)}static fromModelSelections(e){const t=[];for(let i=0,n=e.length;i<n;i++)t[i]=this.fromModelSelection(e[i]);return t}equals(e){return this.viewState.equals(e.viewState)&&this.modelState.equals(e.modelState)}}class hL{constructor(e){this.modelState=e,this.viewState=null}}class uL{constructor(e){this.modelState=null,this.viewState=e}}class gL{constructor(e,t,i,n){this._singleCursorStateBrand=void 0,this.selectionStart=e,this.selectionStartLeftoverVisibleColumns=t,this.position=i,this.leftoverVisibleColumns=n,this.selection=gL._computeSelection(this.selectionStart,this.position)}equals(e){return this.selectionStartLeftoverVisibleColumns===e.selectionStartLeftoverVisibleColumns&&this.leftoverVisibleColumns===e.leftoverVisibleColumns&&this.position.equals(e.position)&&this.selectionStart.equalsRange(e.selectionStart)}hasSelection(){return!this.selection.isEmpty()||!this.selectionStart.isEmpty()}move(e,t,i,n){return e?new gL(this.selectionStart,this.selectionStartLeftoverVisibleColumns,new Yd(t,i),n):new gL(new Zd(t,i,t,i),n,new Yd(t,i),n)}static _computeSelection(e,t){return e.isEmpty()||!t.isBeforeOrEqual(e.getStartPosition())?Xd.fromPositions(e.getStartPosition(),t):Xd.fromPositions(e.getEndPosition(),t)}}class pL{constructor(e,t,i){this._editOperationResultBrand=void 0,this.type=e,this.commands=t,this.shouldPushStackElementBefore=i.shouldPushStackElementBefore,this.shouldPushStackElementAfter=i.shouldPushStackElementAfter}}function mL(e){return"'"===e||'"'===e||"`"===e}class fL{static columnSelect(e,t,i,n,o,r){const s=Math.abs(o-i)+1,a=i>o,l=n>r,c=n<r,d=[];for(let o=0;o<s;o++){const s=i+(a?-o:o),h=e.columnFromVisibleColumn(t,s,n),u=e.columnFromVisibleColumn(t,s,r),g=e.visibleColumnFromColumn(t,new Yd(s,h)),p=e.visibleColumnFromColumn(t,new Yd(s,u));if(c){if(g>r)continue;if(p<n)continue}if(l){if(p>n)continue;if(g<r)continue}d.push(new gL(new Zd(s,h,s,h),0,new Yd(s,u),0))}if(0===d.length)for(let e=0;e<s;e++){const n=i+(a?-e:e),o=t.getLineMaxColumn(n);d.push(new gL(new Zd(n,o,n,o),0,new Yd(n,o),0))}return{viewStates:d,reversed:a,fromLineNumber:i,fromVisualColumn:n,toLineNumber:o,toVisualColumn:r}}static columnSelectLeft(e,t,i){let n=i.toViewVisualColumn;return n>0&&n--,fL.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),r=Math.max(i.fromViewLineNumber,i.toViewLineNumber);for(let i=o;i<=r;i++){const o=t.getLineMaxColumn(i),r=e.visibleColumnFromColumn(t,new Yd(i,o));n=Math.max(n,r)}let s=i.toViewVisualColumn;return s<n&&s++,this.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,s)}static columnSelectUp(e,t,i,n){const o=n?e.pageSize:1,r=Math.max(1,i.toViewLineNumber-o);return this.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,r,i.toViewVisualColumn)}static columnSelectDown(e,t,i,n){const o=n?e.pageSize:1,r=Math.min(t.getLineCount(),i.toViewLineNumber+o);return this.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,r,i.toViewVisualColumn)}}class _L{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return Xd.fromPositions(i.getEndPosition())}}class vL{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return Xd.fromPositions(i.getStartPosition())}}class bL{constructor(e,t,i,n,o=!1){this._range=e,this._text=t,this._columnDeltaOffset=n,this._lineNumberDeltaOffset=i,this.insertsAutoWhitespace=o}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return Xd.fromPositions(i.getEndPosition().delta(this._lineNumberDeltaOffset,this._columnDeltaOffset))}}class wL{constructor(e,t,i,n=!1){this._range=e,this._text=t,this._initialSelection=i,this._forceMoveMarkers=n,this._selectionId=null}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=t.trackSelection(this._initialSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}class yL{constructor(e,t,i){this._cursorPositionBrand=void 0,this.lineNumber=e,this.column=t,this.leftoverVisibleColumns=i}}class CL{static leftPosition(e,t){if(t.column>e.getLineMinColumn(t.lineNumber))return t.delta(void 0,-Hu(e.getLineContent(t.lineNumber),t.column-1));if(t.lineNumber>1){const i=t.lineNumber-1;return new Yd(i,e.getLineMaxColumn(i))}return t}static leftPositionAtomicSoftTabs(e,t,i){if(t.column<=e.getLineIndentColumn(t.lineNumber)){const n=e.getLineMinColumn(t.lineNumber),o=e.getLineContent(t.lineNumber),r=Ik.atomicPosition(o,t.column-1,i,0);if(-1!==r&&r+1>=n)return new Yd(t.lineNumber,r+1)}return this.leftPosition(e,t)}static left(e,t,i){const n=e.stickyTabStops?CL.leftPositionAtomicSoftTabs(t,i,e.tabSize):CL.leftPosition(t,i);return new yL(n.lineNumber,n.column,0)}static moveLeft(e,t,i,n,o){let r,s;if(i.hasSelection()&&!n)r=i.selection.startLineNumber,s=i.selection.startColumn;else{const n=i.position.delta(void 0,-(o-1)),a=t.normalizePosition(CL.clipPositionColumn(n,t),0),l=CL.left(e,t,a);r=l.lineNumber,s=l.column}return i.move(n,r,s,0)}static clipPositionColumn(e,t){return new Yd(e.lineNumber,CL.clipRange(e.column,t.getLineMinColumn(e.lineNumber),t.getLineMaxColumn(e.lineNumber)))}static clipRange(e,t,i){return e<t?t:e>i?i:e}static rightPosition(e,t,i){return i<e.getLineMaxColumn(t)?i+=ju(e.getLineContent(t),i-1):t<e.getLineCount()&&(t+=1,i=e.getLineMinColumn(t)),new Yd(t,i)}static rightPositionAtomicSoftTabs(e,t,i,n,o){if(i<e.getLineIndentColumn(t)){const o=e.getLineContent(t),r=Ik.atomicPosition(o,i-1,n,1);if(-1!==r)return new Yd(t,r+1)}return this.rightPosition(e,t,i)}static right(e,t,i){const n=e.stickyTabStops?CL.rightPositionAtomicSoftTabs(t,i.lineNumber,i.column,e.tabSize,e.indentSize):CL.rightPosition(t,i.lineNumber,i.column);return new yL(n.lineNumber,n.column,0)}static moveRight(e,t,i,n,o){let r,s;if(i.hasSelection()&&!n)r=i.selection.endLineNumber,s=i.selection.endColumn;else{const n=i.position.delta(void 0,o-1),a=t.normalizePosition(CL.clipPositionColumn(n,t),1),l=CL.right(e,t,a);r=l.lineNumber,s=l.column}return i.move(n,r,s,0)}static vertical(e,t,i,n,o,r,s,a){const l=Nk.visibleColumnFromColumn(t.getLineContent(i),n,e.tabSize)+o,c=t.getLineCount(),d=1===i&&1===n,h=i===c&&n===t.getLineMaxColumn(i),u=r<i?d:h;if((i=r)<1?(i=1,n=s?t.getLineMinColumn(i):Math.min(t.getLineMaxColumn(i),n)):i>c?(i=c,n=s?t.getLineMaxColumn(i):Math.min(t.getLineMaxColumn(i),n)):n=e.columnFromVisibleColumn(t,i,l),o=u?0:l-Nk.visibleColumnFromColumn(t.getLineContent(i),n,e.tabSize),void 0!==a){const e=new Yd(i,n),r=t.normalizePosition(e,a);o+=n-r.column,i=r.lineNumber,n=r.column}return new yL(i,n,o)}static down(e,t,i,n,o,r,s){return this.vertical(e,t,i,n,o,i+r,s,1)}static moveDown(e,t,i,n,o){let r,s;i.hasSelection()&&!n?(r=i.selection.endLineNumber,s=i.selection.endColumn):(r=i.position.lineNumber,s=i.position.column);const a=CL.down(e,t,r,s,i.leftoverVisibleColumns,o,!0);return i.move(n,a.lineNumber,a.column,a.leftoverVisibleColumns)}static translateDown(e,t,i){const n=i.selection,o=CL.down(e,t,n.selectionStartLineNumber,n.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),r=CL.down(e,t,n.positionLineNumber,n.positionColumn,i.leftoverVisibleColumns,1,!1);return new gL(new Zd(o.lineNumber,o.column,o.lineNumber,o.column),o.leftoverVisibleColumns,new Yd(r.lineNumber,r.column),r.leftoverVisibleColumns)}static up(e,t,i,n,o,r,s){return this.vertical(e,t,i,n,o,i-r,s,0)}static moveUp(e,t,i,n,o){let r,s;i.hasSelection()&&!n?(r=i.selection.startLineNumber,s=i.selection.startColumn):(r=i.position.lineNumber,s=i.position.column);const a=CL.up(e,t,r,s,i.leftoverVisibleColumns,o,!0);return i.move(n,a.lineNumber,a.column,a.leftoverVisibleColumns)}static translateUp(e,t,i){const n=i.selection,o=CL.up(e,t,n.selectionStartLineNumber,n.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),r=CL.up(e,t,n.positionLineNumber,n.positionColumn,i.leftoverVisibleColumns,1,!1);return new gL(new Zd(o.lineNumber,o.column,o.lineNumber,o.column),o.leftoverVisibleColumns,new Yd(r.lineNumber,r.column),r.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 r=i.position.lineNumber;for(;r<o&&this._isBlankLine(t,r);)r++;for(;r<o&&!this._isBlankLine(t,r);)r++;return i.move(n,r,t.getLineMinColumn(r),0)}static moveToBeginningOfLine(e,t,i,n){const o=i.position.lineNumber,r=t.getLineMinColumn(o),s=t.getLineFirstNonWhitespaceColumn(o)||r;let a;return a=i.position.column===s?r:s,i.move(n,o,a,0)}static moveToEndOfLine(e,t,i,n,o){const r=i.position.lineNumber,s=t.getLineMaxColumn(r);return i.move(n,r,s,o?1073741824-s:0)}static moveToBeginningOfBuffer(e,t,i,n){return i.move(n,1,1,0)}static moveToEndOfBuffer(e,t,i,n){const o=t.getLineCount(),r=t.getLineMaxColumn(o);return i.move(n,o,r,0)}}class SL{static deleteRight(e,t,i,n){const o=[];let r=3!==e;for(let e=0,s=n.length;e<s;e++){const s=n[e];let a=s;if(a.isEmpty()){const e=s.getPosition(),n=CL.right(t,i,e);a=new Zd(n.lineNumber,n.column,e.lineNumber,e.column)}a.isEmpty()?o[e]=null:(a.startLineNumber!==a.endLineNumber&&(r=!0),o[e]=new _L(a,""))}return[r,o]}static isAutoClosingPairDelete(e,t,i,n,o,r,s){if("never"===t&&"never"===i)return!1;if("never"===e)return!1;for(let a=0,l=r.length;a<l;a++){const l=r[a],c=l.getPosition();if(!l.isEmpty())return!1;const d=o.getLineContent(c.lineNumber);if(c.column<2||c.column>=d.length+1)return!1;const h=d.charAt(c.column-2),u=n.get(h);if(!u)return!1;if(mL(h)){if("never"===i)return!1}else if("never"===t)return!1;const g=d.charAt(c.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=s.length;t<i;t++){const i=s[t];if(c.lineNumber===i.startLineNumber&&c.column===i.startColumn){e=!0;break}}if(!e)return!1}}return!0}static _runAutoClosingPairDelete(e,t,i){const n=[];for(let e=0,t=i.length;e<t;e++){const t=i[e].getPosition(),o=new Zd(t.lineNumber,t.column-1,t.lineNumber,t.column+1);n[e]=new _L(o,"")}return[!0,n]}static deleteLeft(e,t,i,n,o){if(this.isAutoClosingPairDelete(t.autoClosingDelete,t.autoClosingBrackets,t.autoClosingQuotes,t.autoClosingPairs.autoClosingPairsOpenByEnd,i,n,o))return this._runAutoClosingPairDelete(t,i,n);const r=[];let s=2!==e;for(let e=0,o=n.length;e<o;e++){const o=SL.getDeleteRange(n[e],i,t);o.isEmpty()?r[e]=null:(o.startLineNumber!==o.endLineNumber&&(s=!0),r[e]=new _L(o,""))}return[s,r]}static getDeleteRange(e,t,i){if(!e.isEmpty())return e;const n=e.getPosition();if(i.useTabStops&&n.column>1){const e=t.getLineContent(n.lineNumber),o=Su(e),r=-1===o?e.length+1:o+1;if(n.column<=r){const e=i.visibleColumnFromColumn(t,n),o=Nk.prevIndentTabStop(e,i.indentSize),r=i.columnFromVisibleColumn(t,n.lineNumber,o);return new Zd(n.lineNumber,r,n.lineNumber,n.column)}}return Zd.fromPositions(SL.getPositionAfterDeleteLeft(n,t),n)}static getPositionAfterDeleteLeft(e,t){if(e.column>1){const i=function(e,t){if(0===e)return 0;const i=function(e,t){const i=new Vu(t,e);let n=i.prevCodePoint();for(;ng(n)||65039===n||8419===n;){if(0===i.offset)return;n=i.prevCodePoint()}if(!Xu(n))return;let o=i.offset;return o>0&&8205===i.prevCodePoint()&&(o=i.offset),o}(e,t);if(void 0!==i)return i;const n=new Vu(t,e);return n.prevCodePoint(),n.offset}(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 Yd(i,t.getLineMaxColumn(i))}return e}static cut(e,t,i){const n=[];let o=null;i.sort(((e,t)=>Yd.compare(e.getStartPosition(),t.getEndPosition())));for(let r=0,s=i.length;r<s;r++){const s=i[r];if(s.isEmpty())if(e.emptySelectionClipboard){const e=s.getPosition();let i,a,l,c;e.lineNumber<t.getLineCount()?(i=e.lineNumber,a=1,l=e.lineNumber+1,c=1):e.lineNumber>1&&(null==o?void 0:o.endLineNumber)!==e.lineNumber?(i=e.lineNumber-1,a=t.getLineMaxColumn(e.lineNumber-1),l=e.lineNumber,c=t.getLineMaxColumn(e.lineNumber)):(i=e.lineNumber,a=1,l=e.lineNumber,c=t.getLineMaxColumn(e.lineNumber));const d=new Zd(i,a,l,c);o=d,d.isEmpty()?n[r]=null:n[r]=new _L(d,"")}else n[r]=null;else n[r]=new _L(s,"")}return new pL(0,n,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}class kL{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),r=t.get(i);if(0===r){if(2===n)return this._createWord(e,n,r,o+1,this._findEndOfWord(e,t,n,o+1));n=1}else if(2===r){if(1===n)return this._createWord(e,n,r,o+1,this._findEndOfWord(e,t,n,o+1));n=2}else if(1===r&&0!==n)return this._createWord(e,n,r,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 r=n;r<o;r++){const n=e.charCodeAt(r),o=t.get(n);if(1===o)return r;if(1===i&&2===o)return r;if(2===i&&0===o)return r}return o}static _findNextWordOnLine(e,t,i){const n=t.getLineContent(i.lineNumber);return this._doFindNextWordOnLine(n,e,i)}static _doFindNextWordOnLine(e,t,i){let n=0;const o=e.length;for(let r=i.column-1;r<o;r++){const i=e.charCodeAt(r),o=t.get(i);if(0===o){if(2===n)return this._createWord(e,n,o,this._findStartOfWord(e,t,n,r-1),r);n=1}else if(2===o){if(1===n)return this._createWord(e,n,o,this._findStartOfWord(e,t,n,r-1),r);n=2}else if(1===o&&0!==n)return this._createWord(e,n,o,this._findStartOfWord(e,t,n,r-1),r)}return 0!==n?this._createWord(e,n,1,this._findStartOfWord(e,t,n,o-1),o):null}static _findStartOfWord(e,t,i,n){for(let o=n;o>=0;o--){const n=e.charCodeAt(o),r=t.get(n);if(1===r)return o+1;if(1===i&&2===r)return o+1;if(2===i&&0===r)return o+1}return 0}static moveWordLeft(e,t,i,n){let o=i.lineNumber,r=i.column;1===r&&o>1&&(o-=1,r=t.getLineMaxColumn(o));let s=kL._findPreviousWordOnLine(e,t,new Yd(o,r));if(0===n)return new Yd(o,s?s.start+1:1);if(1===n)return s&&2===s.wordType&&s.end-s.start==1&&0===s.nextCharClass&&(s=kL._findPreviousWordOnLine(e,t,new Yd(o,s.start+1))),new Yd(o,s?s.start+1:1);if(3===n){for(;s&&2===s.wordType;)s=kL._findPreviousWordOnLine(e,t,new Yd(o,s.start+1));return new Yd(o,s?s.start+1:1)}return s&&r<=s.end+1&&(s=kL._findPreviousWordOnLine(e,t,new Yd(o,s.start+1))),new Yd(o,s?s.end+1:1)}static _moveWordPartLeft(e,t){const i=t.lineNumber,n=e.getLineMaxColumn(i);if(1===t.column)return i>1?new Yd(i-1,e.getLineMaxColumn(i-1)):t;const o=e.getLineContent(i);for(let e=t.column-1;e>1;e--){const t=o.charCodeAt(e-2),r=o.charCodeAt(e-1);if(95===t&&95!==r)return new Yd(i,e);if(Tu(t)&&Du(r))return new Yd(i,e);if(Du(t)&&Du(r)&&e+1<n&&Tu(o.charCodeAt(e)))return new Yd(i,e)}return new Yd(i,1)}static moveWordRight(e,t,i,n){let o=i.lineNumber,r=i.column,s=!1;r===t.getLineMaxColumn(o)&&o<t.getLineCount()&&(s=!0,o+=1,r=1);let a=kL._findNextWordOnLine(e,t,new Yd(o,r));if(2===n)a&&2===a.wordType&&a.end-a.start==1&&0===a.nextCharClass&&(a=kL._findNextWordOnLine(e,t,new Yd(o,a.end+1))),r=a?a.end+1:t.getLineMaxColumn(o);else if(3===n){for(s&&(r=0);a&&(2===a.wordType||a.start+1<=r);)a=kL._findNextWordOnLine(e,t,new Yd(o,a.end+1));r=a?a.start+1:t.getLineMaxColumn(o)}else a&&!s&&r>=a.start+1&&(a=kL._findNextWordOnLine(e,t,new Yd(o,a.end+1))),r=a?a.start+1:t.getLineMaxColumn(o);return new Yd(o,r)}static _moveWordPartRight(e,t){const i=t.lineNumber,n=e.getLineMaxColumn(i);if(t.column===n)return i<e.getLineCount()?new Yd(i+1,1):t;const o=e.getLineContent(i);for(let e=t.column+1;e<n;e++){const t=o.charCodeAt(e-2),r=o.charCodeAt(e-1);if(95!==t&&95===r)return new Yd(i,e);if(Tu(t)&&Du(r))return new Yd(i,e);if(Du(t)&&Du(r)&&e+1<n&&Tu(o.charCodeAt(e)))return new Yd(i,e)}return new Yd(i,n)}static _deleteWordLeftWhitespace(e,t){const i=e.getLineContent(t.lineNumber),n=t.column-2,o=xu(i,n);return o+1<n?new Zd(t.lineNumber,o+2,t.lineNumber,t.column):null}static deleteWordLeft(e,t){const i=e.wordSeparators,n=e.model,o=e.selection,r=e.whitespaceHeuristics;if(!o.isEmpty())return o;if(SL.isAutoClosingPairDelete(e.autoClosingDelete,e.autoClosingBrackets,e.autoClosingQuotes,e.autoClosingPairs.autoClosingPairsOpenByEnd,e.model,[e.selection],e.autoClosedCharacters)){const t=e.selection.getPosition();return new Zd(t.lineNumber,t.column-1,t.lineNumber,t.column+1)}const s=new Yd(o.positionLineNumber,o.positionColumn);let a=s.lineNumber,l=s.column;if(1===a&&1===l)return null;if(r){const e=this._deleteWordLeftWhitespace(n,s);if(e)return e}let c=kL._findPreviousWordOnLine(i,n,s);return 0===t?c?l=c.start+1:l>1?l=1:(a--,l=n.getLineMaxColumn(a)):(c&&l<=c.end+1&&(c=kL._findPreviousWordOnLine(i,n,new Yd(a,c.start+1))),c?l=c.end+1:l>1?l=1:(a--,l=n.getLineMaxColumn(a))),new Zd(a,l,s.lineNumber,s.column)}static deleteInsideWord(e,t,i){if(!i.isEmpty())return i;const n=new Yd(i.positionLineNumber,i.positionColumn);return this._deleteInsideWordWhitespace(t,n)||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 r=Math.min(t.column-1,n-1);if(!this._charAtIsWhitespace(i,r))return null;for(;o>0&&this._charAtIsWhitespace(i,o-1);)o--;for(;r+1<n&&this._charAtIsWhitespace(i,r+1);)r++;return new Zd(t.lineNumber,o+1,t.lineNumber,r+2)}static _deleteInsideWordDetermineDeleteRange(e,t,i){const n=t.getLineContent(i.lineNumber),o=n.length;if(0===o)return i.lineNumber>1?new Zd(i.lineNumber-1,t.getLineMaxColumn(i.lineNumber-1),i.lineNumber,1):i.lineNumber<t.getLineCount()?new Zd(i.lineNumber,1,i.lineNumber+1,1):new Zd(i.lineNumber,1,i.lineNumber,1);const r=e=>e.start+1<=i.column&&i.column<=e.end+1,s=(e,t)=>(e=Math.min(e,i.column),t=Math.max(t,i.column),new Zd(i.lineNumber,e,i.lineNumber,t)),a=e=>{let t=e.start+1,i=e.end+1,r=!1;for(;i-1<o&&this._charAtIsWhitespace(n,i-1);)r=!0,i++;if(!r)for(;t>1&&this._charAtIsWhitespace(n,t-2);)t--;return s(t,i)},l=kL._findPreviousWordOnLine(e,t,i);if(l&&r(l))return a(l);const c=kL._findNextWordOnLine(e,t,i);return c&&r(c)?a(c):l&&c?s(l.end+1,c.start+1):l?s(l.start+1,l.end+1):c?s(c.start+1,c.end+1):s(1,o+1)}static _deleteWordPartLeft(e,t){if(!t.isEmpty())return t;const i=t.getPosition(),n=kL._moveWordPartLeft(e,i);return new Zd(i.lineNumber,i.column,n.lineNumber,n.column)}static _findFirstNonWhitespaceChar(e,t){const i=e.length;for(let n=t;n<i;n++){const t=e.charAt(n);if(" "!==t&&"\t"!==t)return n}return i}static _deleteWordRightWhitespace(e,t){const i=e.getLineContent(t.lineNumber),n=t.column-1,o=this._findFirstNonWhitespaceChar(i,n);return n+1<o?new Zd(t.lineNumber,t.column,t.lineNumber,o+1):null}static deleteWordRight(e,t){const i=e.wordSeparators,n=e.model,o=e.selection,r=e.whitespaceHeuristics;if(!o.isEmpty())return o;const s=new Yd(o.positionLineNumber,o.positionColumn);let a=s.lineNumber,l=s.column;const c=n.getLineCount(),d=n.getLineMaxColumn(a);if(a===c&&l===d)return null;if(r){const e=this._deleteWordRightWhitespace(n,s);if(e)return e}let h=kL._findNextWordOnLine(i,n,s);return 2===t?h?l=h.end+1:l<d||a===c?l=d:(a++,h=kL._findNextWordOnLine(i,n,new Yd(a,1)),l=h?h.start+1:n.getLineMaxColumn(a)):(h&&l>=h.start+1&&(h=kL._findNextWordOnLine(i,n,new Yd(a,h.end+1))),h?l=h.start+1:l<d||a===c?l=d:(a++,h=kL._findNextWordOnLine(i,n,new Yd(a,1)),l=h?h.start+1:n.getLineMaxColumn(a))),new Zd(a,l,s.lineNumber,s.column)}static _deleteWordPartRight(e,t){if(!t.isEmpty())return t;const i=t.getPosition(),n=kL._moveWordPartRight(e,i);return new Zd(i.lineNumber,i.column,n.lineNumber,n.column)}static _createWordAtPosition(e,t,i){const n=new Zd(t,i.start+1,t,i.end+1);return{word:e.getValueInRange(n),startColumn:n.startColumn,endColumn:n.endColumn}}static getWordAtPosition(e,t,i){const n=Sf(t),o=kL._findPreviousWordOnLine(n,e,i);if(o&&1===o.wordType&&o.start<=i.column-1&&i.column-1<=o.end)return kL._createWordAtPosition(e,i.lineNumber,o);const r=kL._findNextWordOnLine(n,e,i);return r&&1===r.wordType&&r.start<=i.column-1&&i.column-1<=r.end?kL._createWordAtPosition(e,i.lineNumber,r):null}static word(e,t,i,n,o){const r=Sf(e.wordSeparators),s=kL._findPreviousWordOnLine(r,t,o),a=kL._findNextWordOnLine(r,t,o);if(!n){let e,i;return s&&1===s.wordType&&s.start<=o.column-1&&o.column-1<=s.end?(e=s.start+1,i=s.end+1):a&&1===a.wordType&&a.start<=o.column-1&&o.column-1<=a.end?(e=a.start+1,i=a.end+1):(e=s?s.end+1:1,i=a?a.start+1:t.getLineMaxColumn(o.lineNumber)),new gL(new Zd(o.lineNumber,e,o.lineNumber,i),0,new Yd(o.lineNumber,i),0)}let l,c;s&&1===s.wordType&&s.start<o.column-1&&o.column-1<s.end?(l=s.start+1,c=s.end+1):a&&1===a.wordType&&a.start<o.column-1&&o.column-1<a.end?(l=a.start+1,c=a.end+1):(l=o.column,c=o.column);const d=o.lineNumber;let h;if(i.selectionStart.containsPosition(o))h=i.selectionStart.endColumn;else if(o.isBeforeOrEqual(i.selectionStart.getStartPosition())){h=l;const e=new Yd(d,h);i.selectionStart.containsPosition(e)&&(h=i.selectionStart.endColumn)}else{h=c;const e=new Yd(d,h);i.selectionStart.containsPosition(e)&&(h=i.selectionStart.startColumn)}return i.move(!0,d,h,0)}}class xL{static addCursorDown(e,t,i){const n=[];let o=0;for(let r=0,s=t.length;r<s;r++){const s=t[r];n[o++]=new dL(s.modelState,s.viewState),n[o++]=i?dL.fromModelState(CL.translateDown(e.cursorConfig,e.model,s.modelState)):dL.fromViewState(CL.translateDown(e.cursorConfig,e,s.viewState))}return n}static addCursorUp(e,t,i){const n=[];let o=0;for(let r=0,s=t.length;r<s;r++){const s=t[r];n[o++]=new dL(s.modelState,s.viewState),n[o++]=i?dL.fromModelState(CL.translateUp(e.cursorConfig,e.model,s.modelState)):dL.fromViewState(CL.translateUp(e.cursorConfig,e,s.viewState))}return n}static moveToBeginningOfLine(e,t,i){let n=[];for(let o=0,r=t.length;o<r;o++){const r=t[o];n[o]=this._moveToLineStart(e,r,i)}return n}static _moveToLineStart(e,t,i){const n=t.viewState.position.column,o=n===t.modelState.position.column,r=t.viewState.position.lineNumber,s=e.getLineFirstNonWhitespaceColumn(r);return o||n===s?this._moveToLineStartByModel(e,t,i):this._moveToLineStartByView(e,t,i)}static _moveToLineStartByView(e,t,i){return dL.fromViewState(CL.moveToBeginningOfLine(e.cursorConfig,e,t.viewState,i))}static _moveToLineStartByModel(e,t,i){return dL.fromModelState(CL.moveToBeginningOfLine(e.cursorConfig,e.model,t.modelState,i))}static moveToEndOfLine(e,t,i,n){const o=[];for(let r=0,s=t.length;r<s;r++){const s=t[r];o[r]=this._moveToLineEnd(e,s,i,n)}return o}static _moveToLineEnd(e,t,i,n){const o=t.viewState.position,r=e.getLineMaxColumn(o.lineNumber),s=o.column===r,a=t.modelState.position,l=e.model.getLineMaxColumn(a.lineNumber),c=r-o.column==l-a.column;return s||c?this._moveToLineEndByModel(e,t,i,n):this._moveToLineEndByView(e,t,i,n)}static _moveToLineEndByView(e,t,i,n){return dL.fromViewState(CL.moveToEndOfLine(e.cursorConfig,e,t.viewState,i,n))}static _moveToLineEndByModel(e,t,i,n){return dL.fromModelState(CL.moveToEndOfLine(e.cursorConfig,e.model,t.modelState,i,n))}static expandLineSelection(e,t){const i=[];for(let n=0,o=t.length;n<o;n++){const o=t[n],r=o.modelState.selection.startLineNumber,s=e.model.getLineCount();let a,l=o.modelState.selection.endLineNumber;l===s?a=e.model.getLineMaxColumn(s):(l++,a=1),i[n]=dL.fromModelState(new gL(new Zd(r,1,r,1),0,new Yd(l,a),0))}return i}static moveToBeginningOfBuffer(e,t,i){const n=[];for(let o=0,r=t.length;o<r;o++){const r=t[o];n[o]=dL.fromModelState(CL.moveToBeginningOfBuffer(e.cursorConfig,e.model,r.modelState,i))}return n}static moveToEndOfBuffer(e,t,i){const n=[];for(let o=0,r=t.length;o<r;o++){const r=t[o];n[o]=dL.fromModelState(CL.moveToEndOfBuffer(e.cursorConfig,e.model,r.modelState,i))}return n}static selectAll(e,t){const i=e.model.getLineCount(),n=e.model.getLineMaxColumn(i);return dL.fromModelState(new gL(new Zd(1,1,1,1),0,new Yd(i,n),0))}static line(e,t,i,n,o){const r=e.model.validatePosition(n),s=o?e.coordinatesConverter.validateViewPosition(new Yd(o.lineNumber,o.column),r):e.coordinatesConverter.convertModelPositionToViewPosition(r);if(!i||!t.modelState.hasSelection()){const t=e.model.getLineCount();let i=r.lineNumber+1,n=1;return i>t&&(i=t,n=e.model.getLineMaxColumn(i)),dL.fromModelState(new gL(new Zd(r.lineNumber,1,i,n),0,new Yd(i,n),0))}const a=t.modelState.selectionStart.getStartPosition().lineNumber;if(r.lineNumber<a)return dL.fromViewState(t.viewState.move(t.modelState.hasSelection(),s.lineNumber,1,0));if(r.lineNumber>a){const i=e.getLineCount();let n=s.lineNumber+1,o=1;return n>i&&(n=i,o=e.getLineMaxColumn(n)),dL.fromViewState(t.viewState.move(t.modelState.hasSelection(),n,o,0))}{const e=t.modelState.selectionStart.getEndPosition();return dL.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 dL.fromModelState(kL.word(e.cursorConfig,e.model,t.modelState,i,o))}static cancelSelection(e,t){if(!t.modelState.hasSelection())return new dL(t.modelState,t.viewState);const i=t.viewState.position.lineNumber,n=t.viewState.position.column;return dL.fromViewState(new gL(new Zd(i,n,i,n),0,new Yd(i,n),0))}static moveTo(e,t,i,n,o){const r=e.model.validatePosition(n),s=o?e.coordinatesConverter.validateViewPosition(new Yd(o.lineNumber,o.column),r):e.coordinatesConverter.convertModelPositionToViewPosition(r);return dL.fromViewState(t.viewState.move(i,s.lineNumber,s.column,0))}static simpleMove(e,t,i,n,o,r){switch(i){case 0:return 4===r?this._moveHalfLineLeft(e,t,n):this._moveLeft(e,t,n,o);case 1:return 4===r?this._moveHalfLineRight(e,t,n):this._moveRight(e,t,n,o);case 2:return 2===r?this._moveUpByViewLines(e,t,n,o):this._moveUpByModelLines(e,t,n,o);case 3:return 2===r?this._moveDownByViewLines(e,t,n,o):this._moveDownByModelLines(e,t,n,o);case 4:return 2===r?t.map((t=>dL.fromViewState(CL.moveToPrevBlankLine(e.cursorConfig,e,t.viewState,n)))):t.map((t=>dL.fromModelState(CL.moveToPrevBlankLine(e.cursorConfig,e.model,t.modelState,n))));case 5:return 2===r?t.map((t=>dL.fromViewState(CL.moveToNextBlankLine(e.cursorConfig,e,t.viewState,n)))):t.map((t=>dL.fromModelState(CL.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 r=e.getCompletelyVisibleViewRange(),s=e.coordinatesConverter.convertViewRangeToModelRange(r);switch(i){case 11:{const i=this._firstLineNumberInRange(e.model,s,o),r=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,r)]}case 13:{const i=this._lastLineNumberInRange(e.model,s,o),r=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,r)]}case 12:{const i=Math.round((s.startLineNumber+s.endLineNumber)/2),o=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,o)]}case 14:{const i=[];for(let o=0,s=t.length;o<s;o++){const s=t[o];i[o]=this.findPositionInViewportIfOutside(e,s,r,n)}return i}default:return null}}static findPositionInViewportIfOutside(e,t,i,n){const o=t.viewState.position.lineNumber;if(i.startLineNumber<=o&&o<=i.endLineNumber-1)return new dL(t.modelState,t.viewState);{let r;r=o>i.endLineNumber-1?i.endLineNumber-1:o<i.startLineNumber?i.startLineNumber:o;const s=CL.vertical(e.cursorConfig,e,o,t.viewState.position.column,t.viewState.leftoverVisibleColumns,r,!1);return dL.fromViewState(t.viewState.move(n,s.lineNumber,s.column,s.leftoverVisibleColumns))}}static _firstLineNumberInRange(e,t,i){let n=t.startLineNumber;return t.startColumn!==e.getLineMinColumn(n)&&n++,Math.min(t.endLineNumber,n+i-1)}static _lastLineNumberInRange(e,t,i){let n=t.startLineNumber;return t.startColumn!==e.getLineMinColumn(n)&&n++,Math.max(n,t.endLineNumber-i+1)}static _moveLeft(e,t,i,n){return t.map((t=>dL.fromViewState(CL.moveLeft(e.cursorConfig,e,t.viewState,i,n))))}static _moveHalfLineLeft(e,t,i){const n=[];for(let o=0,r=t.length;o<r;o++){const r=t[o],s=r.viewState.position.lineNumber,a=Math.round(e.getLineContent(s).length/2);n[o]=dL.fromViewState(CL.moveLeft(e.cursorConfig,e,r.viewState,i,a))}return n}static _moveRight(e,t,i,n){return t.map((t=>dL.fromViewState(CL.moveRight(e.cursorConfig,e,t.viewState,i,n))))}static _moveHalfLineRight(e,t,i){const n=[];for(let o=0,r=t.length;o<r;o++){const r=t[o],s=r.viewState.position.lineNumber,a=Math.round(e.getLineContent(s).length/2);n[o]=dL.fromViewState(CL.moveRight(e.cursorConfig,e,r.viewState,i,a))}return n}static _moveDownByViewLines(e,t,i,n){const o=[];for(let r=0,s=t.length;r<s;r++){const s=t[r];o[r]=dL.fromViewState(CL.moveDown(e.cursorConfig,e,s.viewState,i,n))}return o}static _moveDownByModelLines(e,t,i,n){const o=[];for(let r=0,s=t.length;r<s;r++){const s=t[r];o[r]=dL.fromModelState(CL.moveDown(e.cursorConfig,e.model,s.modelState,i,n))}return o}static _moveUpByViewLines(e,t,i,n){const o=[];for(let r=0,s=t.length;r<s;r++){const s=t[r];o[r]=dL.fromViewState(CL.moveUp(e.cursorConfig,e,s.viewState,i,n))}return o}static _moveUpByModelLines(e,t,i,n){const o=[];for(let r=0,s=t.length;r<s;r++){const s=t[r];o[r]=dL.fromModelState(CL.moveUp(e.cursorConfig,e.model,s.modelState,i,n))}return o}static _moveToViewPosition(e,t,i,n,o){return dL.fromViewState(t.viewState.move(i,n,o,0))}static _moveToModelPosition(e,t,i,n,o){return dL.fromModelState(t.modelState.move(i,n,o,0))}static _moveToViewMinColumn(e,t,i){const n=[];for(let o=0,r=t.length;o<r;o++){const r=t[o],s=r.viewState.position.lineNumber,a=e.getLineMinColumn(s);n[o]=this._moveToViewPosition(e,r,i,s,a)}return n}static _moveToViewFirstNonWhitespaceColumn(e,t,i){const n=[];for(let o=0,r=t.length;o<r;o++){const r=t[o],s=r.viewState.position.lineNumber,a=e.getLineFirstNonWhitespaceColumn(s);n[o]=this._moveToViewPosition(e,r,i,s,a)}return n}static _moveToViewCenterColumn(e,t,i){const n=[];for(let o=0,r=t.length;o<r;o++){const r=t[o],s=r.viewState.position.lineNumber,a=Math.round((e.getLineMaxColumn(s)+e.getLineMinColumn(s))/2);n[o]=this._moveToViewPosition(e,r,i,s,a)}return n}static _moveToViewMaxColumn(e,t,i){const n=[];for(let o=0,r=t.length;o<r;o++){const r=t[o],s=r.viewState.position.lineNumber,a=e.getLineMaxColumn(s);n[o]=this._moveToViewPosition(e,r,i,s,a)}return n}static _moveToViewLastNonWhitespaceColumn(e,t,i){const n=[];for(let o=0,r=t.length;o<r;o++){const r=t[o],s=r.viewState.position.lineNumber,a=e.getLineLastNonWhitespaceColumn(s);n[o]=this._moveToViewPosition(e,r,i,s,a)}return n}}var LL;!function(e){e.description={description:"Move cursor to a logical position in the view",args:[{name:"Cursor move argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory logical position value providing where to move the cursor.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'left', 'right', 'up', 'down', 'prevBlankLine', 'nextBlankLine',\n\t\t\t\t\t\t'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter'\n\t\t\t\t\t\t'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter'\n\t\t\t\t\t\t'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'line', 'wrappedLine', 'character', 'halfLine'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'select': If 'true' makes the selection. Default is 'false'.\n\t\t\t\t",constraint:function(e){if(!bl(e))return!1;const t=e;return!(!vl(t.to)||!Sl(t.select)&&!Cl(t.select)||!Sl(t.by)&&!vl(t.by)||!Sl(t.value)&&!wl(t.value))},schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["left","right","up","down","prevBlankLine","nextBlankLine","wrappedLineStart","wrappedLineEnd","wrappedLineColumnCenter","wrappedLineFirstNonWhitespaceCharacter","wrappedLineLastNonWhitespaceCharacter","viewPortTop","viewPortCenter","viewPortBottom","viewPortIfOutside"]},by:{type:"string",enum:["line","wrappedLine","character","halfLine"]},value:{type:"number",default:1},select:{type:"boolean",default:!1}}}}]},e.RawDirection={Left:"left",Right:"right",Up:"up",Down:"down",PrevBlankLine:"prevBlankLine",NextBlankLine:"nextBlankLine",WrappedLineStart:"wrappedLineStart",WrappedLineFirstNonWhitespaceCharacter:"wrappedLineFirstNonWhitespaceCharacter",WrappedLineColumnCenter:"wrappedLineColumnCenter",WrappedLineEnd:"wrappedLineEnd",WrappedLineLastNonWhitespaceCharacter:"wrappedLineLastNonWhitespaceCharacter",ViewPortTop:"viewPortTop",ViewPortCenter:"viewPortCenter",ViewPortBottom:"viewPortBottom",ViewPortIfOutside:"viewPortIfOutside"},e.RawUnit={Line:"line",WrappedLine:"wrappedLine",Character:"character",HalfLine:"halfLine"},e.parse=function(t){if(!t.to)return null;let i;switch(t.to){case e.RawDirection.Left:i=0;break;case e.RawDirection.Right:i=1;break;case e.RawDirection.Up:i=2;break;case e.RawDirection.Down:i=3;break;case e.RawDirection.PrevBlankLine:i=4;break;case e.RawDirection.NextBlankLine:i=5;break;case e.RawDirection.WrappedLineStart:i=6;break;case e.RawDirection.WrappedLineFirstNonWhitespaceCharacter:i=7;break;case e.RawDirection.WrappedLineColumnCenter:i=8;break;case e.RawDirection.WrappedLineEnd:i=9;break;case e.RawDirection.WrappedLineLastNonWhitespaceCharacter:i=10;break;case e.RawDirection.ViewPortTop:i=11;break;case e.RawDirection.ViewPortBottom:i=13;break;case e.RawDirection.ViewPortCenter:i=12;break;case e.RawDirection.ViewPortIfOutside:i=14;break;default:return null}let n=0;switch(t.by){case e.RawUnit.Line:n=1;break;case e.RawUnit.WrappedLine:n=2;break;case e.RawUnit.Character:n=3;break;case e.RawUnit.HalfLine:n=4}return{direction:i,unit:n,select:!!t.select,value:t.value||1}}}(LL||(LL={}));const EL=Object.create(null);function NL(e,t){if(t<=0)return"";EL[e]||(EL[e]=["",e]);const i=EL[e];for(let n=i.length;n<=t;n++)i[n]=i[n-1]+e;return i[t]}class IL{constructor(e,t){this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}static unshiftIndent(e,t,i,n,o){const r=Nk.visibleColumnFromColumn(e,t,i);if(o){const e=NL(" ",n);return NL(e,Nk.prevIndentTabStop(r,n)/n)}return NL("\t",Nk.prevRenderTabStop(r,i)/i)}static shiftIndent(e,t,i,n,o){const r=Nk.visibleColumnFromColumn(e,t,i);if(o){const e=NL(" ",n);return NL(e,Nk.nextIndentTabStop(r,n)/n)}return NL("\t",Nk.nextRenderTabStop(r,i)/i)}_addEditOperation(e,t,i){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,i):e.addEditOperation(t,i)}getEditOperations(e,t){const i=this._selection.startLineNumber;let n=this._selection.endLineNumber;1===this._selection.endColumn&&i!==n&&(n-=1);const{tabSize:o,indentSize:r,insertSpaces:s}=this._opts,a=i===n;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(i))&&(this._useLastEditRangeForCursorEndPosition=!0);let l=0,c=0;for(let d=i;d<=n;d++,l=c){c=0;const n=e.getLineContent(d);let h,u=Su(n);if((!this._opts.isUnshift||0!==n.length&&0!==u)&&(a||this._opts.isUnshift||0!==n.length)){if(-1===u&&(u=n.length),d>1&&Nk.visibleColumnFromColumn(n,u+1,o)%r!=0&&e.isCheapToTokenize(d-1)){const t=tm.getEnterAction(this._opts.autoIndent,e,new Zd(d-1,e.getLineMaxColumn(d-1),d-1,e.getLineMaxColumn(d-1)));if(t){if(c=l,t.appendText)for(let e=0,i=t.appendText.length;e<i&&c<r&&32===t.appendText.charCodeAt(e);e++)c++;t.removeText&&(c=Math.max(0,c-t.removeText));for(let e=0;e<c&&0!==u&&32===n.charCodeAt(u-1);e++)u--}}this._opts.isUnshift&&0===u||(h=this._opts.isUnshift?IL.unshiftIndent(n,u+1,o,r,s):IL.shiftIndent(n,u+1,o,r,s),this._addEditOperation(t,new Zd(d,1,d,u+1),h),d!==i||this._selection.isEmpty()||(this._selectionStartColumnStaysPut=this._selection.startColumn<=u+1))}}}else{!this._opts.isUnshift&&this._selection.isEmpty()&&0===e.getLineLength(i)&&(this._useLastEditRangeForCursorEndPosition=!0);const o=s?NL(" ",r):"\t";for(let s=i;s<=n;s++){const n=e.getLineContent(s);let l=Su(n);if((!this._opts.isUnshift||0!==n.length&&0!==l)&&(a||this._opts.isUnshift||0!==n.length)&&(-1===l&&(l=n.length),!this._opts.isUnshift||0!==l))if(this._opts.isUnshift){l=Math.min(l,r);for(let e=0;e<l;e++)if(9===n.charCodeAt(e)){l=e+1;break}this._addEditOperation(t,new Zd(s,1,s,l+1),"")}else this._addEditOperation(t,new Zd(s,1,s,1),o),s!==i||this._selection.isEmpty()||(this._selectionStartColumnStaysPut=1===this._selection.startColumn)}}this._selectionId=t.trackSelection(this._selection)}computeCursorState(e,t){if(this._useLastEditRangeForCursorEndPosition){const e=t.getInverseEditOperations()[0];return new Xd(e.range.endLineNumber,e.range.endColumn,e.range.endLineNumber,e.range.endColumn)}const i=t.getTrackedSelection(this._selectionId);if(this._selectionStartColumnStaysPut){const e=this._selection.startColumn;return i.startColumn<=e?i:0===i.getDirection()?new Xd(i.startLineNumber,e,i.endLineNumber,i.endColumn):new Xd(i.endLineNumber,i.endColumn,i.startLineNumber,e)}return i}}class TL{constructor(e,t,i){this._range=e,this._charBeforeSelection=t,this._charAfterSelection=i}getEditOperations(e,t){t.addTrackedEditOperation(new Zd(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),t.addTrackedEditOperation(new Zd(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)}computeCursorState(e,t){const i=t.getInverseEditOperations(),n=i[0].range,o=i[1].range;return new Xd(n.endLineNumber,n.endColumn,o.endLineNumber,o.endColumn-this._charAfterSelection.length)}}class DL{static indent(e,t,i){if(null===t||null===i)return[];const n=[];for(let t=0,o=i.length;t<o;t++)n[t]=new IL(i[t],{isUnshift:!1,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent});return n}static outdent(e,t,i){const n=[];for(let t=0,o=i.length;t<o;t++)n[t]=new IL(i[t],{isUnshift:!0,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent});return n}static shiftIndent(e,t,i){return i=i||1,IL.shiftIndent(t,t.length+i,e.tabSize,e.indentSize,e.insertSpaces)}static unshiftIndent(e,t,i){return i=i||1,IL.unshiftIndent(t,t.length+i,e.tabSize,e.indentSize,e.insertSpaces)}static _distributedPaste(e,t,i,n){const o=[];for(let e=0,t=i.length;e<t;e++)o[e]=new _L(i[e],n[e]);return new pL(0,o,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _simplePaste(e,t,i,n,o){const r=[];for(let e=0,t=i.length;e<t;e++){const t=i[e],s=t.getPosition();if(o&&!t.isEmpty()&&(o=!1),o&&n.indexOf("\n")!==n.length-1&&(o=!1),o){const i=new Zd(s.lineNumber,1,s.lineNumber,1);r[e]=new wL(i,n,t,!0)}else r[e]=new _L(t,n)}return new pL(0,r,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _distributePasteToCursors(e,t,i,n,o){if(n)return null;if(1===t.length)return null;if(o&&o.length===t.length)return o;if("spread"===e.multiCursorPaste){10===i.charCodeAt(i.length-1)&&(i=i.substr(0,i.length-1)),13===i.charCodeAt(i.length-1)&&(i=i.substr(0,i.length-1));const e=Cu(i);if(e.length===t.length)return e}return null}static paste(e,t,i,n,o,r){const s=this._distributePasteToCursors(e,i,n,o,r);return s?(i=i.sort(Zd.compareRangesUsingStarts),this._distributedPaste(e,t,i,s)):this._simplePaste(e,t,i,n,o)}static _goodIndentForLine(e,t,i){let n=null,o="";const r=tm.getInheritIndentForLine(e.autoIndent,t,i,!1);if(r)n=r.action,o=r.indentation;else if(i>1){let n;for(n=i-1;n>=1&&!(xu(t.getLineContent(n))>=0);n--);if(n<1)return null;const r=t.getLineMaxColumn(n),s=tm.getEnterAction(e.autoIndent,t,new Zd(n,r,n,r));s&&(o=s.indentation+s.appendText)}return n&&(n===Hg.Indent&&(o=DL.shiftIndent(e,o)),n===Hg.Outdent&&(o=DL.unshiftIndent(e,o)),o=e.normalizeIndentation(o)),o||null}static _replaceJumpToNextIndent(e,t,i,n){let o="";const r=i.getStartPosition();if(e.insertSpaces){const i=e.visibleColumnFromColumn(t,r),n=e.indentSize,s=n-i%n;for(let e=0;e<s;e++)o+=" "}else o="\t";return new _L(i,o,n)}static tab(e,t,i){const n=[];for(let o=0,r=i.length;o<r;o++){const r=i[o];if(r.isEmpty()){const i=t.getLineContent(r.startLineNumber);if(/^\s*$/.test(i)&&t.isCheapToTokenize(r.startLineNumber)){let s=this._goodIndentForLine(e,t,r.startLineNumber);s=s||"\t";const a=e.normalizeIndentation(s);if(!i.startsWith(a)){n[o]=new _L(new Zd(r.startLineNumber,1,r.startLineNumber,i.length+1),a,!0);continue}}n[o]=this._replaceJumpToNextIndent(e,t,r,!0)}else{if(r.startLineNumber===r.endLineNumber){const i=t.getLineMaxColumn(r.startLineNumber);if(1!==r.startColumn||r.endColumn!==i){n[o]=this._replaceJumpToNextIndent(e,t,r,!1);continue}}n[o]=new IL(r,{isUnshift:!1,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent})}}return n}static compositionType(e,t,i,n,o,r,s,a){const l=n.map((e=>this._compositionType(i,e,o,r,s,a)));return new pL(4,l,{shouldPushStackElementBefore:ML(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,i,n,o,r){if(!t.isEmpty())return null;const s=t.getPosition(),a=Math.max(1,s.column-n),l=Math.min(e.getLineMaxColumn(s.lineNumber),s.column+o),c=new Zd(s.lineNumber,a,s.lineNumber,l);return e.getValueInRange(c)===i&&0===r?null:new bL(c,i,0,r)}static _typeCommand(e,t,i){return i?new vL(e,t,!0):new _L(e,t,!0)}static _enter(e,t,i,n){if(0===e.autoIndent)return DL._typeCommand(n,"\n",i);if(!t.isCheapToTokenize(n.getStartPosition().lineNumber)||1===e.autoIndent){const o=ku(t.getLineContent(n.startLineNumber)).substring(0,n.startColumn-1);return DL._typeCommand(n,"\n"+e.normalizeIndentation(o),i)}const o=tm.getEnterAction(e.autoIndent,t,n);if(o){if(o.indentAction===Hg.None)return DL._typeCommand(n,"\n"+e.normalizeIndentation(o.indentation+o.appendText),i);if(o.indentAction===Hg.Indent)return DL._typeCommand(n,"\n"+e.normalizeIndentation(o.indentation+o.appendText),i);if(o.indentAction===Hg.IndentOutdent){const t=e.normalizeIndentation(o.indentation),r=e.normalizeIndentation(o.indentation+o.appendText),s="\n"+r+"\n"+t;return i?new vL(n,s,!0):new bL(n,s,-1,r.length-t.length,!0)}if(o.indentAction===Hg.Outdent){const t=DL.unshiftIndent(e,o.indentation);return DL._typeCommand(n,"\n"+e.normalizeIndentation(t+o.appendText),i)}}const r=ku(t.getLineContent(n.startLineNumber)).substring(0,n.startColumn-1);if(e.autoIndent>=4){const o=tm.getIndentForEnter(e.autoIndent,t,n,{unshiftIndent:t=>DL.unshiftIndent(e,t),shiftIndent:t=>DL.shiftIndent(e,t),normalizeIndentation:t=>e.normalizeIndentation(t)});if(o){let r=e.visibleColumnFromColumn(t,n.getEndPosition());const s=n.endColumn,a=Su(t.getLineContent(n.endLineNumber));if(n=a>=0?n.setEndPosition(n.endLineNumber,Math.max(n.endColumn,a+1)):n.setEndPosition(n.endLineNumber,t.getLineMaxColumn(n.endLineNumber)),i)return new vL(n,"\n"+e.normalizeIndentation(o.afterEnter),!0);{let t=0;return s<=a+1&&(e.insertSpaces||(r=Math.ceil(r/e.indentSize)),t=Math.min(r+1-e.normalizeIndentation(o.afterEnter).length-1,0)),new bL(n,"\n"+e.normalizeIndentation(o.afterEnter),0,t,!0)}}}return DL._typeCommand(n,"\n"+e.normalizeIndentation(r),i)}static _isAutoIndentType(e,t,i){if(e.autoIndent<4)return!1;for(let e=0,n=i.length;e<n;e++)if(!t.isCheapToTokenize(i[e].getEndPosition().lineNumber))return!1;return!0}static _runAutoIndentType(e,t,i,n){const o=tm.getIndentationAtPosition(t,i.startLineNumber,i.startColumn),r=tm.getIndentActionForType(e.autoIndent,t,i,n,{shiftIndent:t=>DL.shiftIndent(e,t),unshiftIndent:t=>DL.unshiftIndent(e,t)});if(null===r)return null;if(r!==e.normalizeIndentation(o)){const o=t.getLineFirstNonWhitespaceColumn(i.startLineNumber);return 0===o?DL._typeCommand(new Zd(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(r)+n,!1):DL._typeCommand(new Zd(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(r)+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 r=0,s=i.length;r<s;r++){const s=i[r];if(!s.isEmpty())return!1;const a=s.getPosition(),l=t.getLineContent(a.lineNumber);if(l.charAt(a.column-1)!==o)return!1;const c=mL(o);if(92===(a.column>2?l.charCodeAt(a.column-2):0)&&c)return!1;if("auto"===e.autoClosingOvertype){let e=!1;for(let t=0,i=n.length;t<i;t++){const i=n[t];if(a.lineNumber===i.startLineNumber&&a.column===i.startColumn){e=!0;break}}if(!e)return!1}}return!0}static _runAutoClosingOvertype(e,t,i,n,o){const r=[];for(let e=0,t=n.length;e<t;e++){const t=n[e].getPosition(),i=new Zd(t.lineNumber,t.column,t.lineNumber,t.column+1);r[e]=new _L(i,o)}return new pL(4,r,{shouldPushStackElementBefore:ML(e,4),shouldPushStackElementAfter:!1})}static _isBeforeClosingBrace(e,t){const i=t.charAt(0),n=e.autoClosingPairs.autoClosingPairsOpenByStart.get(i)||[],o=e.autoClosingPairs.autoClosingPairsCloseByStart.get(i)||[],r=n.some((e=>t.startsWith(e.open))),s=o.some((e=>t.startsWith(e.close)));return!r&&s}static _findAutoClosingPairOpen(e,t,i,n){const o=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(n);if(!o)return null;let r=null;for(const e of o)if(null===r||e.open.length>r.open.length){let o=!0;for(const r of i)if(t.getValueInRange(new Zd(r.lineNumber,r.column-e.open.length+1,r.lineNumber,r.column))+n!==e.open){o=!1;break}o&&(r=e)}return r}static _findContainedAutoClosingPair(e,t){if(t.open.length<=1)return null;const i=t.close.charAt(t.close.length-1),n=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(i)||[];let o=null;for(const e of n)e.open!==t.open&&t.open.includes(e.open)&&t.close.endsWith(e.close)&&(!o||e.open.length>o.open.length)&&(o=e);return o}static _getAutoClosingPairClose(e,t,i,n,o){const r=mL(n),s=r?e.autoClosingQuotes:e.autoClosingBrackets,a=r?e.shouldAutoCloseBefore.quote:e.shouldAutoCloseBefore.bracket;if("never"===s)return null;for(const e of i)if(!e.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}})),c=this._findAutoClosingPairOpen(e,t,l.map((e=>new Yd(e.lineNumber,e.beforeColumn))),n);if(!c)return null;const d=this._findContainedAutoClosingPair(e,c),h=d?d.close:"";let u=!0;for(const i of l){const{lineNumber:o,beforeColumn:r,afterColumn:l}=i,d=t.getLineContent(o),g=d.substring(0,r-1),p=d.substring(l-1);if(p.startsWith(h)||(u=!1),p.length>0){const t=p.charAt(0);if(!DL._isBeforeClosingBrace(e,p)&&!a(t))return null}if(1===c.open.length&&("'"===n||'"'===n)&&"always"!==s){const t=Sf(e.wordSeparators);if(g.length>0){const e=g.charCodeAt(g.length-1);if(0===t.get(e))return null}}if(!t.isCheapToTokenize(o))return null;t.forceTokenization(o);const m=Qg(t.getLineTokens(o),r-1);if(!c.shouldAutoClose(m,r-m.firstCharOffset))return null;const f=c.findNeutralCharacter();if(f){const e=t.getTokenTypeIfInsertingCharacter(o,r,f);if(!c.isOK(e))return null}}return u?c.close.substring(0,c.close.length-h.length):c.close}static _runAutoClosingOpenCharType(e,t,i,n,o,r,s){const a=[];for(let e=0,t=n.length;e<t;e++){const t=n[e];a[e]=new AL(t,o,!r,s)}return new pL(4,a,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}static _shouldSurroundChar(e,t){return mL(t)?"quotes"===e.autoSurround||"languageDefined"===e.autoSurround:"brackets"===e.autoSurround||"languageDefined"===e.autoSurround}static _isSurroundSelectionType(e,t,i,n){if(!DL._shouldSurroundChar(e,n)||!e.surroundingPairs.hasOwnProperty(n))return!1;const o=mL(n);for(let e=0,n=i.length;e<n;e++){const n=i[e];if(n.isEmpty())return!1;let r=!0;for(let e=n.startLineNumber;e<=n.endLineNumber;e++){const i=t.getLineContent(e),o=e===n.startLineNumber?n.startColumn-1:0,s=e===n.endLineNumber?n.endColumn-1:i.length,a=i.substring(o,s);if(/[^ \t]/.test(a)){r=!1;break}}if(r)return!1;if(o&&n.startLineNumber===n.endLineNumber&&n.startColumn+1===n.endColumn&&mL(t.getValueInRange(n)))return!1}return!0}static _runSurroundSelectionType(e,t,i,n,o){const r=[];for(let e=0,i=n.length;e<i;e++){const i=n[e],s=t.surroundingPairs[o];r[e]=new TL(i,o,s)}return new pL(0,r,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _isTypeInterceptorElectricChar(e,t,i){return!(1!==i.length||!t.isCheapToTokenize(i[0].getEndPosition().lineNumber))}static _typeInterceptorElectricChar(e,t,i,n,o){if(!t.electricChars.hasOwnProperty(o)||!n.isEmpty())return null;const r=n.getPosition();i.forceTokenization(r.lineNumber);const s=i.getLineTokens(r.lineNumber);let a;try{a=t.onElectricCharacter(o,s,r.column)}catch(e){return gc(e),null}if(!a)return null;if(a.matchOpenBracket){const n=(s.getLineContent()+o).lastIndexOf(a.matchOpenBracket)+1,l=i.bracketPairs.findMatchingBracketUp(a.matchOpenBracket,{lineNumber:r.lineNumber,column:n},500);if(l){if(l.startLineNumber===r.lineNumber)return null;const n=ku(i.getLineContent(l.startLineNumber)),s=t.normalizeIndentation(n),a=i.getLineContent(r.lineNumber),c=i.getLineFirstNonWhitespaceColumn(r.lineNumber)||r.column,d=s+a.substring(c-1,r.column-1)+o,h=new Zd(r.lineNumber,1,r.lineNumber,r.column),u=new _L(h,d);return new pL(OL(d,e),[u],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!0})}}return null}static compositionEndWithInterceptors(e,t,i,n,o,r){if(!n||Xd.selectionsArrEqual(n,o))return null;let s=null;for(const e of o){if(!e.isEmpty())return null;const t=e.getPosition(),n=i.getValueInRange(new Zd(t.lineNumber,t.column-1,t.lineNumber,t.column));if(null===s)s=n;else if(s!==n)return null}if(!s)return null;if(this._isAutoClosingOvertype(t,i,o,r,s)){const e=o.map((e=>new _L(new Zd(e.positionLineNumber,e.positionColumn,e.positionLineNumber,e.positionColumn+1),"",!1)));return new pL(4,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const a=this._getAutoClosingPairClose(t,i,o,s,!0);return null!==a?this._runAutoClosingOpenCharType(e,t,i,o,s,!0,a):null}static typeWithInterceptors(e,t,i,n,o,r,s){if(!e&&"\n"===s){const e=[];for(let t=0,r=o.length;t<r;t++)e[t]=DL._enter(i,n,!1,o[t]);return new pL(4,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!e&&this._isAutoIndentType(i,n,o)){const e=[];let t=!1;for(let r=0,a=o.length;r<a;r++)if(e[r]=this._runAutoIndentType(i,n,o[r],s),!e[r]){t=!0;break}if(!t)return new pL(4,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!e&&this._isAutoClosingOvertype(i,n,o,r,s))return this._runAutoClosingOvertype(t,i,n,o,s);if(!e){const e=this._getAutoClosingPairClose(i,n,o,s,!1);if(e)return this._runAutoClosingOpenCharType(t,i,n,o,s,!1,e)}if(this._isSurroundSelectionType(i,n,o,s))return this._runSurroundSelectionType(t,i,n,o,s);if(!e&&this._isTypeInterceptorElectricChar(i,n,o)){const e=this._typeInterceptorElectricChar(t,i,n,o[0],s);if(e)return e}const a=[];for(let e=0,t=o.length;e<t;e++)a[e]=new _L(o[e],s);const l=OL(s,t);return new pL(l,a,{shouldPushStackElementBefore:ML(t,l),shouldPushStackElementAfter:!1})}static typeWithoutInterceptors(e,t,i,n,o){const r=[];for(let e=0,t=n.length;e<t;e++)r[e]=new _L(n[e],o);const s=OL(o,e);return new pL(s,r,{shouldPushStackElementBefore:ML(e,s),shouldPushStackElementAfter:!1})}static lineInsertBefore(e,t,i){if(null===t||null===i)return[];const n=[];for(let o=0,r=i.length;o<r;o++){let r=i[o].positionLineNumber;if(1===r)n[o]=new vL(new Zd(1,1,1,1),"\n");else{r--;const i=t.getLineMaxColumn(r);n[o]=this._enter(e,t,!1,new Zd(r,i,r,i))}}return n}static lineInsertAfter(e,t,i){if(null===t||null===i)return[];const n=[];for(let o=0,r=i.length;o<r;o++){const r=i[o].positionLineNumber,s=t.getLineMaxColumn(r);n[o]=this._enter(e,t,!1,new Zd(r,s,r,s))}return n}static lineBreakInsert(e,t,i){const n=[];for(let o=0,r=i.length;o<r;o++)n[o]=this._enter(e,t,!0,i[o]);return n}}class AL extends bL{constructor(e,t,i,n){super(e,(i?t:"")+n,0,-n.length),this._openCharacter=t,this._closeCharacter=n,this.closeCharacterRange=null,this.enclosingRange=null}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return this.closeCharacterRange=new Zd(i.startLineNumber,i.endColumn-this._closeCharacter.length,i.endLineNumber,i.endColumn),this.enclosingRange=new Zd(i.startLineNumber,i.endColumn-this._openCharacter.length-this._closeCharacter.length,i.endLineNumber,i.endColumn),super.computeCursorState(e,t)}}function OL(e,t){return" "===e?5===t||6===t?6:5:4}function ML(e,t){return!(!PL(e)||PL(t))||5!==e&&RL(e)!==RL(t)}function RL(e){return 6===e||5===e?"space":e}function PL(e){return 4===e||5===e||6===e}var FL,BL,WL,VL;!function(e){e.editorSimpleInput=new Zb("editorSimpleInput",!1,!0),e.editorTextFocus=new Zb("editorTextFocus",!1,ma(0,"Whether the editor text has focus (cursor is blinking)")),e.focus=new Zb("editorFocus",!1,ma(0,"Whether the editor or an editor widget has focus (e.g. focus is in the find widget)")),e.textInputFocus=new Zb("textInputFocus",!1,ma(0,"Whether an editor or a rich text input has focus (cursor is blinking)")),e.readOnly=new Zb("editorReadonly",!1,ma(0,"Whether the editor is read only")),e.inDiffEditor=new Zb("inDiffEditor",!1,ma(0,"Whether the context is a diff editor")),e.columnSelection=new Zb("editorColumnSelection",!1,ma(0,"Whether `editor.columnSelection` is enabled")),e.writable=e.readOnly.toNegated(),e.hasNonEmptySelection=new Zb("editorHasSelection",!1,ma(0,"Whether the editor has text selected")),e.hasOnlyEmptySelection=e.hasNonEmptySelection.toNegated(),e.hasMultipleSelections=new Zb("editorHasMultipleSelections",!1,ma(0,"Whether the editor has multiple selections")),e.hasSingleSelection=e.hasMultipleSelections.toNegated(),e.tabMovesFocus=new Zb("editorTabMovesFocus",!1,ma(0,"Whether `Tab` will move focus out of the editor")),e.tabDoesNotMoveFocus=e.tabMovesFocus.toNegated(),e.isInWalkThroughSnippet=new Zb("isInEmbeddedEditor",!1,!0),e.canUndo=new Zb("canUndo",!1,!0),e.canRedo=new Zb("canRedo",!1,!0),e.hoverVisible=new Zb("editorHoverVisible",!1,ma(0,"Whether the editor hover is visible")),e.inCompositeEditor=new Zb("inCompositeEditor",void 0,ma(0,"Whether the editor is part of a larger editor (e.g. notebooks)")),e.notInCompositeEditor=e.inCompositeEditor.toNegated(),e.languageId=new Zb("editorLangId","",ma(0,"The language identifier of the editor")),e.hasCompletionItemProvider=new Zb("editorHasCompletionItemProvider",!1,ma(0,"Whether the editor has a completion item provider")),e.hasCodeActionsProvider=new Zb("editorHasCodeActionsProvider",!1,ma(0,"Whether the editor has a code actions provider")),e.hasCodeLensProvider=new Zb("editorHasCodeLensProvider",!1,ma(0,"Whether the editor has a code lens provider")),e.hasDefinitionProvider=new Zb("editorHasDefinitionProvider",!1,ma(0,"Whether the editor has a definition provider")),e.hasDeclarationProvider=new Zb("editorHasDeclarationProvider",!1,ma(0,"Whether the editor has a declaration provider")),e.hasImplementationProvider=new Zb("editorHasImplementationProvider",!1,ma(0,"Whether the editor has an implementation provider")),e.hasTypeDefinitionProvider=new Zb("editorHasTypeDefinitionProvider",!1,ma(0,"Whether the editor has a type definition provider")),e.hasHoverProvider=new Zb("editorHasHoverProvider",!1,ma(0,"Whether the editor has a hover provider")),e.hasDocumentHighlightProvider=new Zb("editorHasDocumentHighlightProvider",!1,ma(0,"Whether the editor has a document highlight provider")),e.hasDocumentSymbolProvider=new Zb("editorHasDocumentSymbolProvider",!1,ma(0,"Whether the editor has a document symbol provider")),e.hasReferenceProvider=new Zb("editorHasReferenceProvider",!1,ma(0,"Whether the editor has a reference provider")),e.hasRenameProvider=new Zb("editorHasRenameProvider",!1,ma(0,"Whether the editor has a rename provider")),e.hasSignatureHelpProvider=new Zb("editorHasSignatureHelpProvider",!1,ma(0,"Whether the editor has a signature help provider")),e.hasInlayHintsProvider=new Zb("editorHasInlayHintsProvider",!1,ma(0,"Whether the editor has an inline hints provider")),e.hasDocumentFormattingProvider=new Zb("editorHasDocumentFormattingProvider",!1,ma(0,"Whether the editor has a document formatting provider")),e.hasDocumentSelectionFormattingProvider=new Zb("editorHasDocumentSelectionFormattingProvider",!1,ma(0,"Whether the editor has a document selection formatting provider")),e.hasMultipleDocumentFormattingProvider=new Zb("editorHasMultipleDocumentFormattingProvider",!1,ma(0,"Whether the editor has multiple document formatting providers")),e.hasMultipleDocumentSelectionFormattingProvider=new Zb("editorHasMultipleDocumentSelectionFormattingProvider",!1,ma(0,"Whether the editor has multiple document selection formatting providers"))}(FL||(FL={}));class zL extends Ew{runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditorCommand(n,i||{})}}!function(e){e.description={description:"Scroll editor in the given direction",args:[{name:"Editor scroll argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory direction value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'up', 'down'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'line', 'wrappedLine', 'page', 'halfPage'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n\t\t\t\t",constraint:function(e){if(!bl(e))return!1;const t=e;return!(!vl(t.to)||!Sl(t.by)&&!vl(t.by)||!Sl(t.value)&&!wl(t.value)||!Sl(t.revealCursor)&&!Cl(t.revealCursor))},schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["up","down"]},by:{type:"string",enum:["line","wrappedLine","page","halfPage"]},value:{type:"number",default:1},revealCursor:{type:"boolean"}}}}]},e.RawDirection={Up:"up",Down:"down"},e.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage"},e.parse=function(t){let i,n;switch(t.to){case e.RawDirection.Up:i=1;break;case e.RawDirection.Down:i=2;break;default:return null}switch(t.by){case e.RawUnit.Line:n=1;break;case e.RawUnit.WrappedLine:n=2;break;case e.RawUnit.Page:n=3;break;case e.RawUnit.HalfPage:n=4;break;default:n=2}return{direction:i,unit:n,value:Math.floor(t.value||1),revealCursor:!!t.revealCursor,select:!!t.select}}}(BL||(BL={})),function(e){e.description={description:"Reveal the given line at the given logical position",args:[{name:"Reveal line argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'lineNumber': A mandatory line number value.\n\t\t\t\t\t* 'at': Logical position at which line has to be revealed.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'top', 'center', 'bottom'\n\t\t\t\t\t\t```\n\t\t\t\t",constraint:function(e){if(!bl(e))return!1;const t=e;return!(!wl(t.lineNumber)&&!vl(t.lineNumber)||!Sl(t.at)&&!vl(t.at))},schema:{type:"object",required:["lineNumber"],properties:{lineNumber:{type:["number","string"]},at:{type:"string",enum:["top","center","bottom"]}}}}]},e.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"}}(WL||(WL={}));class jL{constructor(e){e.addImplementation(1e4,"code-editor",((e,t)=>{const i=e.get(Rg).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(Rg).getActiveCodeEditor();return!!i&&(i.focus(),this._runEditorCommand(e,i,t))}))}_runEditorCommand(e,t,i){return this.runEditorCommand(e,t,i)||!0}}!function(e){class t extends zL{constructor(e){super(e),this._minimalReveal=e.minimalReveal,this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[xL.moveTo(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position,t.viewPosition)])&&e.revealPrimaryCursor(t.source,!0,this._minimalReveal)}}e.MoveTo=Iw(new t({id:"_moveTo",minimalReveal:!0,inSelectionMode:!1,precondition:void 0})),e.MoveToSelect=Iw(new t({id:"_moveToSelect",minimalReveal:!1,inSelectionMode:!0,precondition:void 0}));class i extends zL{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=>dL.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=Iw(new class extends i{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(e,t,i,n){const o=e.model.validatePosition(n.position),r=e.coordinatesConverter.validateViewPosition(new Yd(n.viewPosition.lineNumber,n.viewPosition.column),o),s=n.doColumnSelect?i.fromViewLineNumber:r.lineNumber,a=n.doColumnSelect?i.fromViewVisualColumn:n.mouseColumn-1;return fL.columnSelect(e.cursorConfig,e,s,a,r.lineNumber,n.mouseColumn-1)}}),e.CursorColumnSelectLeft=Iw(new class extends i{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:FL.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return fL.columnSelectLeft(e.cursorConfig,e,i)}}),e.CursorColumnSelectRight=Iw(new class extends i{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:0,kbExpr:FL.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return fL.columnSelectRight(e.cursorConfig,e,i)}});class n extends i{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return fL.columnSelectUp(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectUp=Iw(new n({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:0,kbExpr:FL.textInputFocus,primary:3600,linux:{primary:0}}})),e.CursorColumnSelectPageUp=Iw(new n({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:FL.textInputFocus,primary:3595,linux:{primary:0}}}));class o extends i{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return fL.columnSelectDown(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectDown=Iw(new o({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:0,kbExpr:FL.textInputFocus,primary:3602,linux:{primary:0}}})),e.CursorColumnSelectPageDown=Iw(new o({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:FL.textInputFocus,primary:3596,linux:{primary:0}}}));class r extends zL{constructor(){super({id:"cursorMove",precondition:void 0,description:LL.description})}runCoreEditorCommand(e,t){const i=LL.parse(t);i&&this._runCursorMove(e,t.source,i)}_runCursorMove(e,t,i){e.model.pushStackElement(),e.setCursorStates(t,3,r._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 xL.simpleMove(e,t,i.direction,n,o,i.unit);case 11:case 13:case 12:case 14:return xL.viewportMove(e,t,i.direction,n,o);default:return null}}}e.CursorMoveImpl=r,e.CursorMove=Iw(new r);class s extends zL{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,xL.simpleMove(e,e.getCursorStates(),i.direction,i.select,i.value,i.unit)),e.revealPrimaryCursor(t.source,!0)}}e.CursorLeft=Iw(new s({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:FL.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),e.CursorLeftSelect=Iw(new s({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:FL.textInputFocus,primary:1039}})),e.CursorRight=Iw(new s({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:0,kbExpr:FL.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),e.CursorRightSelect=Iw(new s({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:FL.textInputFocus,primary:1041}})),e.CursorUp=Iw(new s({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:0,kbExpr:FL.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),e.CursorUpSelect=Iw(new s({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:FL.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),e.CursorPageUp=Iw(new s({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:FL.textInputFocus,primary:11}})),e.CursorPageUpSelect=Iw(new s({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:FL.textInputFocus,primary:1035}})),e.CursorDown=Iw(new s({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:0,kbExpr:FL.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),e.CursorDownSelect=Iw(new s({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:FL.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),e.CursorPageDown=Iw(new s({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:FL.textInputFocus,primary:12}})),e.CursorPageDownSelect=Iw(new s({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:FL.textInputFocus,primary:1036}})),e.CreateCursor=Iw(new class extends zL{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(e,t){let i;i=t.wholeLine?xL.line(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition):xL.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,r=i.viewState?i.viewState.position:null;for(let i=0,s=n.length;i<s;i++){const s=n[i];if((!o||s.modelState.selection.containsPosition(o))&&(!r||s.viewState.selection.containsPosition(r)))return n.splice(i,1),e.model.pushStackElement(),void e.setCursorStates(t.source,3,n)}}n.push(i),e.model.pushStackElement(),e.setCursorStates(t.source,3,n)}}),e.LastCursorMoveToSelect=Iw(new class extends zL{constructor(){super({id:"_lastCursorMoveToSelect",precondition:void 0})}runCoreEditorCommand(e,t){const i=e.getLastAddedCursorIndex(),n=e.getCursorStates(),o=n.slice(0);o[i]=xL.moveTo(e,n[i],!0,t.position,t.viewPosition),e.model.pushStackElement(),e.setCursorStates(t.source,3,o)}});class a extends zL{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,xL.moveToBeginningOfLine(e,e.getCursorStates(),this._inSelectionMode)),e.revealPrimaryCursor(t.source,!0)}}e.CursorHome=Iw(new a({inSelectionMode:!1,id:"cursorHome",precondition:void 0,kbOpts:{weight:0,kbExpr:FL.textInputFocus,primary:14,mac:{primary:14,secondary:[2063]}}})),e.CursorHomeSelect=Iw(new a({inSelectionMode:!0,id:"cursorHomeSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:FL.textInputFocus,primary:1038,mac:{primary:1038,secondary:[3087]}}}));class l extends zL{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,this._exec(e.getCursorStates())),e.revealPrimaryCursor(t.source,!0)}_exec(e){const t=[];for(let i=0,n=e.length;i<n;i++){const n=e[i],o=n.modelState.position.lineNumber;t[i]=dL.fromModelState(n.modelState.move(this._inSelectionMode,o,1,0))}return t}}e.CursorLineStart=Iw(new l({inSelectionMode:!1,id:"cursorLineStart",precondition:void 0,kbOpts:{weight:0,kbExpr:FL.textInputFocus,primary:0,mac:{primary:287}}})),e.CursorLineStartSelect=Iw(new l({inSelectionMode:!0,id:"cursorLineStartSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:FL.textInputFocus,primary:0,mac:{primary:1311}}}));class c extends zL{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,xL.moveToEndOfLine(e,e.getCursorStates(),this._inSelectionMode,t.sticky||!1)),e.revealPrimaryCursor(t.source,!0)}}e.CursorEnd=Iw(new c({inSelectionMode:!1,id:"cursorEnd",precondition:void 0,kbOpts:{args:{sticky:!1},weight:0,kbExpr:FL.textInputFocus,primary:13,mac:{primary:13,secondary:[2065]}},description:{description:"Go to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:ma(0,"Stick to the end even when going to longer lines"),type:"boolean",default:!1}}}}]}})),e.CursorEndSelect=Iw(new c({inSelectionMode:!0,id:"cursorEndSelect",precondition:void 0,kbOpts:{args:{sticky:!1},weight:0,kbExpr:FL.textInputFocus,primary:1037,mac:{primary:1037,secondary:[3089]}},description:{description:"Select to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:ma(0,"Stick to the end even when going to longer lines"),type:"boolean",default:!1}}}}]}}));class d extends zL{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,this._exec(e,e.getCursorStates())),e.revealPrimaryCursor(t.source,!0)}_exec(e,t){const i=[];for(let n=0,o=t.length;n<o;n++){const o=t[n],r=o.modelState.position.lineNumber,s=e.model.getLineMaxColumn(r);i[n]=dL.fromModelState(o.modelState.move(this._inSelectionMode,r,s,0))}return i}}e.CursorLineEnd=Iw(new d({inSelectionMode:!1,id:"cursorLineEnd",precondition:void 0,kbOpts:{weight:0,kbExpr:FL.textInputFocus,primary:0,mac:{primary:291}}})),e.CursorLineEndSelect=Iw(new d({inSelectionMode:!0,id:"cursorLineEndSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:FL.textInputFocus,primary:0,mac:{primary:1315}}}));class h extends zL{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,xL.moveToBeginningOfBuffer(e,e.getCursorStates(),this._inSelectionMode)),e.revealPrimaryCursor(t.source,!0)}}e.CursorTop=Iw(new h({inSelectionMode:!1,id:"cursorTop",precondition:void 0,kbOpts:{weight:0,kbExpr:FL.textInputFocus,primary:2062,mac:{primary:2064}}})),e.CursorTopSelect=Iw(new h({inSelectionMode:!0,id:"cursorTopSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:FL.textInputFocus,primary:3086,mac:{primary:3088}}}));class u extends zL{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,xL.moveToEndOfBuffer(e,e.getCursorStates(),this._inSelectionMode)),e.revealPrimaryCursor(t.source,!0)}}e.CursorBottom=Iw(new u({inSelectionMode:!1,id:"cursorBottom",precondition:void 0,kbOpts:{weight:0,kbExpr:FL.textInputFocus,primary:2061,mac:{primary:2066}}})),e.CursorBottomSelect=Iw(new u({inSelectionMode:!0,id:"cursorBottomSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:FL.textInputFocus,primary:3085,mac:{primary:3090}}}));class g extends zL{constructor(){super({id:"editorScroll",precondition:void 0,description:BL.description})}runCoreEditorCommand(e,t){const i=BL.parse(t);i&&this._runEditorScroll(e,t.source,i)}_runEditorScroll(e,t,i){const n=this._computeDesiredScrollTop(e,i);if(i.revealCursor){const o=e.getCompletelyVisibleViewRangeAtScrollTop(n);e.setCursorStates(t,3,[xL.findPositionInViewportIfOutside(e,e.getPrimaryCursorState(),o,i.select)])}e.viewLayout.setScrollPosition({scrollTop:n},0)}_computeDesiredScrollTop(e,t){if(1===t.unit){const i=e.getCompletelyVisibleViewRange(),n=e.coordinatesConverter.convertViewRangeToModelRange(i);let o;o=1===t.direction?Math.max(1,n.startLineNumber-t.value):Math.min(e.model.getLineCount(),n.startLineNumber+t.value);const r=e.coordinatesConverter.convertModelPositionToViewPosition(new Yd(o,1));return e.viewLayout.getVerticalOffsetForLineNumber(r.lineNumber)}let i;i=3===t.unit?e.cursorConfig.pageSize*t.value:4===t.unit?Math.round(e.cursorConfig.pageSize/2)*t.value:t.value;const n=(1===t.direction?-1:1)*i;return e.viewLayout.getCurrentScrollTop()+n*e.cursorConfig.lineHeight}}e.EditorScrollImpl=g,e.EditorScroll=Iw(new g),e.ScrollLineUp=Iw(new class extends zL{constructor(){super({id:"scrollLineUp",precondition:void 0,kbOpts:{weight:0,kbExpr:FL.textInputFocus,primary:2064,mac:{primary:267}}})}runCoreEditorCommand(t,i){e.EditorScroll._runEditorScroll(t,i.source,{direction:1,unit:2,value:1,revealCursor:!1,select:!1})}}),e.ScrollPageUp=Iw(new class extends zL{constructor(){super({id:"scrollPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:FL.textInputFocus,primary:2059,win:{primary:523},linux:{primary:523}}})}runCoreEditorCommand(t,i){e.EditorScroll._runEditorScroll(t,i.source,{direction:1,unit:3,value:1,revealCursor:!1,select:!1})}}),e.ScrollLineDown=Iw(new class extends zL{constructor(){super({id:"scrollLineDown",precondition:void 0,kbOpts:{weight:0,kbExpr:FL.textInputFocus,primary:2066,mac:{primary:268}}})}runCoreEditorCommand(t,i){e.EditorScroll._runEditorScroll(t,i.source,{direction:2,unit:2,value:1,revealCursor:!1,select:!1})}}),e.ScrollPageDown=Iw(new class extends zL{constructor(){super({id:"scrollPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:FL.textInputFocus,primary:2060,win:{primary:524},linux:{primary:524}}})}runCoreEditorCommand(t,i){e.EditorScroll._runEditorScroll(t,i.source,{direction:2,unit:3,value:1,revealCursor:!1,select:!1})}});class p extends zL{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[xL.word(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position)]),e.revealPrimaryCursor(t.source,!0)}}e.WordSelect=Iw(new p({inSelectionMode:!1,id:"_wordSelect",precondition:void 0})),e.WordSelectDrag=Iw(new p({inSelectionMode:!0,id:"_wordSelectDrag",precondition:void 0})),e.LastCursorWordSelect=Iw(new class extends zL{constructor(){super({id:"lastCursorWordSelect",precondition:void 0})}runCoreEditorCommand(e,t){const i=e.getLastAddedCursorIndex(),n=e.getCursorStates(),o=n.slice(0),r=n[i];o[i]=xL.word(e,r,r.modelState.hasSelection(),t.position),e.model.pushStackElement(),e.setCursorStates(t.source,3,o)}});class m extends zL{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[xL.line(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position,t.viewPosition)]),e.revealPrimaryCursor(t.source,!1)}}e.LineSelect=Iw(new m({inSelectionMode:!1,id:"_lineSelect",precondition:void 0})),e.LineSelectDrag=Iw(new m({inSelectionMode:!0,id:"_lineSelectDrag",precondition:void 0}));class f extends zL{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){const i=e.getLastAddedCursorIndex(),n=e.getCursorStates(),o=n.slice(0);o[i]=xL.line(e,n[i],this._inSelectionMode,t.position,t.viewPosition),e.model.pushStackElement(),e.setCursorStates(t.source,3,o)}}e.LastCursorLineSelect=Iw(new f({inSelectionMode:!1,id:"lastCursorLineSelect",precondition:void 0})),e.LastCursorLineSelectDrag=Iw(new f({inSelectionMode:!0,id:"lastCursorLineSelectDrag",precondition:void 0})),e.CancelSelection=Iw(new class extends zL{constructor(){super({id:"cancelSelection",precondition:FL.hasNonEmptySelection,kbOpts:{weight:0,kbExpr:FL.textInputFocus,primary:9,secondary:[1033]}})}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[xL.cancelSelection(e,e.getPrimaryCursorState())]),e.revealPrimaryCursor(t.source,!0)}}),e.RemoveSecondaryCursors=Iw(new class extends zL{constructor(){super({id:"removeSecondaryCursors",precondition:FL.hasMultipleSelections,kbOpts:{weight:1,kbExpr:FL.textInputFocus,primary:9,secondary:[1033]}})}runCoreEditorCommand(e,t){var i;e.model.pushStackElement(),e.setCursorStates(t.source,3,[e.getPrimaryCursorState()]),e.revealPrimaryCursor(t.source,!0),i=ma(0,"Removed secondary cursors"),hb&&(Pa?fb(i):pb.textContent!==i?(hv(mb),_b(pb,i)):(hv(pb),_b(mb,i)))}}),e.RevealLine=Iw(new class extends zL{constructor(){super({id:"revealLine",precondition:void 0,description:WL.description})}runCoreEditorCommand(e,t){const i=t,n=i.lineNumber||0;let o="number"==typeof n?n+1:parseInt(n)+1;o<1&&(o=1);const r=e.model.getLineCount();o>r&&(o=r);const s=new Zd(o,1,o,e.model.getLineMaxColumn(o));let a=0;if(i.at)switch(i.at){case WL.RawAtArgument.Top:a=3;break;case WL.RawAtArgument.Center:a=1;break;case WL.RawAtArgument.Bottom:a=4}const l=e.coordinatesConverter.convertModelRangeToViewRange(s);e.revealRange(t.source,!1,l,a,0)}}),e.SelectAll=new class extends jL{constructor(){super(Fw)}runDOMCommand(){ug&&(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,[xL.selectAll(e,e.getPrimaryCursorState())])}},e.SetSelection=Iw(new class extends zL{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[dL.fromModelSelection(t.selection)])}})}(VL||(VL={}));const HL=Tb.and(FL.textInputFocus,FL.columnSelection);function UL(e,t){yw.registerKeybindingRule({id:e,primary:t,when:HL,weight:1})}function $L(e){return e.register(),e}var KL,qL;UL(VL.CursorColumnSelectLeft.id,1039),UL(VL.CursorColumnSelectRight.id,1041),UL(VL.CursorColumnSelectUp.id,1040),UL(VL.CursorColumnSelectPageUp.id,1035),UL(VL.CursorColumnSelectDown.id,1042),UL(VL.CursorColumnSelectPageDown.id,1036),function(e){class t extends Ew{runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditingCommand(t,n,i||{})}}e.CoreEditingCommand=t,e.LineBreakInsert=Iw(new class extends t{constructor(){super({id:"lineBreakInsert",precondition:FL.writable,kbOpts:{weight:0,kbExpr:FL.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,DL.lineBreakInsert(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection))))}}),e.Outdent=Iw(new class extends t{constructor(){super({id:"outdent",precondition:FL.writable,kbOpts:{weight:0,kbExpr:Tb.and(FL.editorTextFocus,FL.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,DL.outdent(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)))),e.pushUndoStop()}}),e.Tab=Iw(new class extends t{constructor(){super({id:"tab",precondition:FL.writable,kbOpts:{weight:0,kbExpr:Tb.and(FL.editorTextFocus,FL.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,DL.tab(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)))),e.pushUndoStop()}}),e.DeleteLeft=Iw(new class extends t{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:FL.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(e,t,i){const[n,o]=SL.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=Iw(new class extends t{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:0,kbExpr:FL.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(e,t,i){const[n,o]=SL.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 jL{constructor(){super(Rw)}runDOMCommand(){document.execCommand("undo")}runEditorCommand(e,t,i){if(t.hasModel()&&!0!==t.getOption(81))return t.getModel().undo()}},e.Redo=new class extends jL{constructor(){super(Pw)}runDOMCommand(){document.execCommand("redo")}runEditorCommand(e,t,i){if(t.hasModel()&&!0!==t.getOption(81))return t.getModel().redo()}}}(KL||(KL={}));class GL extends kw{constructor(e,t,i){super({id:e,precondition:void 0,description:i}),this._handlerId=t}runCommand(e,t){const i=e.get(Rg).getFocusedCodeEditor();i&&i.trigger("keyboard",this._handlerId,t)}}function YL(e,t){$L(new GL("default:"+e,e)),$L(new GL(e,e,t))}YL("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),YL("replacePreviousChar"),YL("compositionType"),YL("compositionStart"),YL("compositionEnd"),YL("paste"),YL("cut");class ZL{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){VL.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){const t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column<t?new Yd(e.lineNumber,t):e}_hasMulticursorModifier(e){switch(this.configuration.options.get(70)){case"altKey":return e.altKey;case"ctrlKey":return e.ctrlKey;case"metaKey":return e.metaKey;default:return!1}}_hasNonMulticursorModifier(e){switch(this.configuration.options.get(70)){case"altKey":return e.ctrlKey||e.metaKey;case"ctrlKey":return e.altKey||e.metaKey;case"metaKey":return e.ctrlKey||e.altKey;default:return!1}}dispatchMouse(e){const t=this.configuration.options,i=Fa&&t.get(96),n=t.get(18);e.middleButton&&!i?this._columnSelect(e.position,e.mouseColumn,e.inSelectionMode):e.startedOnLineNumbers?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelect(e.position):this._createCursor(e.position,!0):e.inSelectionMode?this._lineSelectDrag(e.position):this._lineSelect(e.position):e.mouseDownCount>=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){VL.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_moveToSelect(e){VL.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_columnSelect(e,t,i){e=this._validateViewColumn(e),VL.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:i})}_createCursor(e,t){e=this._validateViewColumn(e),VL.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e){VL.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelect(e){VL.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelectDrag(e){VL.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorWordSelect(e){VL.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelect(e){VL.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelectDrag(e){VL.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelect(e){VL.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelectDrag(e){VL.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_selectAll(){VL.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 XL{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 XL.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 JL{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(t<i){const i=t-e+1;return this._rendLineNumberStart-=i,null}if(e>n)return null;let o=0,r=0;for(let s=i;s<=n;s++){const i=s-this._rendLineNumberStart;e<=s&&s<=t&&(0===r?(o=i,r=1):r++)}if(e<i){let n=0;n=t<i?t-e+1:i-e,this._rendLineNumberStart-=n}return this._lines.splice(o,r)}onLinesChanged(e,t){if(0===this.getCount())return!1;const i=this.getStartLineNumber(),n=this.getEndLineNumber();let o=!1;for(let r=e;r<=t;r++)r>=i&&r<=n&&(this._lines[r-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 r=[];for(let e=0;e<i;e++)r[e]=this._createLine();const s=e-this._rendLineNumberStart,a=this._lines.slice(0,s),l=this._lines.slice(s,this._lines.length-i),c=this._lines.slice(this._lines.length-i,this._lines.length);return this._lines=a.concat(r).concat(l),c}onTokensChanged(e){if(0===this.getCount())return!1;const t=this.getStartLineNumber(),i=this.getEndLineNumber();let n=!1;for(let o=0,r=e.length;o<r;o++){const r=e[o];if(r.toLineNumber<t||r.fromLineNumber>i)continue;const s=Math.max(t,r.fromLineNumber),a=Math.min(i,r.toLineNumber);for(let e=s;e<=a;e++){const t=e-this._rendLineNumberStart;this._lines[t].onTokensChanged(),n=!0}}return n}}class QL{constructor(e){this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new JL((()=>this._host.createVisibleLine()))}_createDomNode(){const e=yg(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 e=0,i=t.length;e<i;e++){const i=t[e].getDomNode();i&&this.domNode.domNode.removeChild(i)}return!0}onLinesInserted(e){const t=this._linesCollection.onLinesInserted(e.fromLineNumber,e.toLineNumber);if(t)for(let e=0,i=t.length;e<i;e++){const i=t[e].getDomNode();i&&this.domNode.domNode.removeChild(i)}return!0}onScrollChanged(e){return e.scrollTopChanged}onTokensChanged(e){return this._linesCollection.onTokensChanged(e.ranges)}onZonesChanged(e){return!0}getStartLineNumber(){return this._linesCollection.getStartLineNumber()}getEndLineNumber(){return this._linesCollection.getEndLineNumber()}getVisibleLine(e){return this._linesCollection.getLine(e)}renderLines(e){const t=this._linesCollection._get(),i=new eE(this.domNode.domNode,this._host,e),n={rendLineNumberStart:t.rendLineNumberStart,lines:t.lines,linesLength:t.lines.length},o=i.render(n,e.startLineNumber,e.endLineNumber,e.relativeVerticalOffset);this._linesCollection._set(o.rendLineNumberStart,o.lines)}}class eE{constructor(e,t,i){this.domNode=e,this.host=t,this.viewportData=i}render(e,t,i,n){const o={rendLineNumberStart:e.rendLineNumberStart,lines:e.lines.slice(0),linesLength:e.linesLength};if(o.rendLineNumberStart+o.linesLength-1<t||i<o.rendLineNumberStart){o.rendLineNumberStart=t,o.linesLength=i-t+1,o.lines=[];for(let e=t;e<=i;e++)o.lines[e-t]=this.host.createVisibleLine();return this._finishRendering(o,!0,n),o}if(this._renderUntouchedLines(o,Math.max(t-o.rendLineNumberStart,0),Math.min(i-o.rendLineNumberStart,o.linesLength-1),n,t),o.rendLineNumberStart>t){const e=t,r=Math.min(i,o.rendLineNumberStart-1);e<=r&&(this._insertLinesBefore(o,e,r,n,t),o.linesLength+=r-e+1)}else if(o.rendLineNumberStart<t){const e=Math.min(o.linesLength,t-o.rendLineNumberStart);e>0&&(this._removeLinesBefore(o,e),o.linesLength-=e)}if(o.rendLineNumberStart=t,o.rendLineNumberStart+o.linesLength-1<i){const e=o.rendLineNumberStart+o.linesLength,r=i;e<=r&&(this._insertLinesAfter(o,e,r,n,t),o.linesLength+=r-e+1)}else if(o.rendLineNumberStart+o.linesLength-1>i){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 r=e.rendLineNumberStart,s=e.lines;for(let e=t;e<=i;e++){const t=r+e;s[e].layoutLine(t,n[t-o])}}_insertLinesBefore(e,t,i,n,o){const r=[];let s=0;for(let e=t;e<=i;e++)r[s++]=this.host.createVisibleLine();e.lines=r.concat(e.lines)}_removeLinesBefore(e,t){for(let i=0;i<t;i++){const t=e.lines[i].getDomNode();t&&this.domNode.removeChild(t)}e.lines.splice(0,t)}_insertLinesAfter(e,t,i,n,o){const r=[];let s=0;for(let e=t;e<=i;e++)r[s++]=this.host.createVisibleLine();e.lines=e.lines.concat(r)}_removeLinesAfter(e,t){const i=e.linesLength-t;for(let n=0;n<t;n++){const t=e.lines[i+n].getDomNode();t&&this.domNode.removeChild(t)}e.lines.splice(i,t)}_finishRenderingNewLines(e,t,i,n){eE._ttPolicy&&(i=eE._ttPolicy.createHTML(i));const o=this.domNode.lastChild;t||!o?this.domNode.innerHTML=i:o.insertAdjacentHTML("afterend",i);let r=this.domNode.lastChild;for(let t=e.linesLength-1;t>=0;t--){const i=e.lines[t];n[t]&&(i.setDomNode(r),r=r.previousSibling)}}_finishRenderingInvalidLines(e,t,i){const n=document.createElement("div");eE._ttPolicy&&(t=eE._ttPolicy.createHTML(t)),n.innerHTML=t;for(let t=0;t<e.linesLength;t++){const o=e.lines[t];if(i[t]){const e=n.firstChild,t=o.getDomNode();t.parentNode.replaceChild(e,t),o.setDomNode(e)}}}_finishRendering(e,t,i){const n=eE._sb,o=e.linesLength,r=e.lines,s=e.rendLineNumberStart,a=[];{n.reset();let l=!1;for(let e=0;e<o;e++){const t=r[e];a[e]=!1,t.getDomNode()||t.renderLine(e+s,i[e],this.viewportData,n)&&(a[e]=!0,l=!0)}l&&this._finishRenderingNewLines(e,t,n.build(),a)}{n.reset();let t=!1;const l=[];for(let e=0;e<o;e++){const o=r[e];(l[e]=!1,a[e])||o.renderLine(e+s,i[e],this.viewportData,n)&&(l[e]=!0,t=!0)}t&&this._finishRenderingInvalidLines(e,n.build(),l)}}}eE._ttPolicy=null===(qL=window.trustedTypes)||void 0===qL?void 0:qL.createPolicy("editorViewLayer",{createHTML:e=>e}),eE._sb=bp(1e5);class tE extends dk{constructor(e){super(e),this._visibleLines=new QL(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;e<t;e++)if(this._dynamicOverlays[e].shouldRender())return!0;return!1}dispose(){super.dispose();for(let e=0,t=this._dynamicOverlays.length;e<t;e++)this._dynamicOverlays[e].dispose();this._dynamicOverlays=[]}getDomNode(){return this.domNode}createVisibleLine(){return new iE(this._context.configuration,this._dynamicOverlays)}addDynamicOverlay(e){this._dynamicOverlays.push(e)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e);const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let n=t;n<=i;n++)this._visibleLines.getVisibleLine(n).onConfigurationChanged(e);return!0}onFlushed(e){return this._visibleLines.onFlushed(e)}onFocusChanged(e){return this._isFocused=e.isFocused,!0}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onScrollChanged(e){return this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._visibleLines.onZonesChanged(e)}prepareRender(e){const t=this._dynamicOverlays.filter((e=>e.shouldRender()));for(let i=0,n=t.length;i<n;i++){const n=t[i];n.prepareRender(e),n.onDidRender()}}render(e){this._viewOverlaysRender(e),this.domNode.toggleClassName("focused",this._isFocused)}_viewOverlaysRender(e){this._visibleLines.renderLines(e.viewportData)}}class iE{constructor(e,t){this._configuration=e,this._lineHeight=this._configuration.options.get(59),this._dynamicOverlays=t,this._domNode=null,this._renderedContent=null}getDomNode(){return this._domNode?this._domNode.domNode:null}setDomNode(e){this._domNode=yg(e)}onContentChanged(){}onTokensChanged(){}onConfigurationChanged(e){this._lineHeight=this._configuration.options.get(59)}renderLine(e,t,i,n){let o="";for(let t=0,n=this._dynamicOverlays.length;t<n;t++)o+=this._dynamicOverlays[t].render(i.startLineNumber,e);return this._renderedContent!==o&&(this._renderedContent=o,n.appendASCIIString('<div style="position:absolute;top:'),n.appendASCIIString(String(t)),n.appendASCIIString("px;width:100%;height:"),n.appendASCIIString(String(this._lineHeight)),n.appendASCIIString('px;">'),n.appendASCIIString(o),n.appendASCIIString("</div>"),!0)}layoutLine(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))}}class nE extends tE{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 oE extends tE{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),Cg(this.domNode,t.get(44))}onConfigurationChanged(e){const t=this._context.configuration.options;Cg(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 rE{constructor(e,t){this._coordinateBrand=void 0,this.top=e,this.left=t}}class sE extends dk{constructor(e,t){super(e),this._viewDomNode=t,this._widgets={},this.domNode=yg(document.createElement("div")),hk.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=yg(document.createElement("div")),hk.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 aE(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 aE{constructor(e,t,i){this._context=e,this._viewDomNode=t,this._actual=i,this.domNode=yg(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 r=e.top,s=r,a=t.top+this._lineHeight,l=r-n,c=s>=n,d=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),u<o.scrollLeft&&(u=o.scrollLeft),g<o.scrollLeft&&(g=o.scrollLeft),{fitsAbove:c,aboveTop:l,aboveLeft:u,fitsBelow:h,belowTop:d,belowLeft:g}}_layoutHorizontalSegmentInPage(e,t,i,n){const o=Math.max(0,t.left-n),r=Math.min(t.left+t.width+n,e.width);let s=t.left+i-Tv.scrollX;if(s+n>r){const e=s-(r-n);s-=e,i-=e}if(s<o){const e=s-o;s-=e,i-=e}return[i,s]}_layoutBoxInPage(e,t,i,n,o){const r=e.top-n,s=t.top+this._lineHeight,a=Iv(this._viewDomNode.domNode),l=a.top+r-Tv.scrollY,c=a.top+s-Tv.scrollY,d=Lv(document.body),[h,u]=this._layoutHorizontalSegmentInPage(d,a,e.left-o.scrollLeft+this._contentLeft,i),[g,p]=this._layoutHorizontalSegmentInPage(d,a,t.left-o.scrollLeft+this._contentLeft,i),m=l>=22,f=c+n<=d.height-22;return this._fixedOverflowWidgets?{fitsAbove:m,aboveTop:Math.max(l,22),aboveLeft:u,fitsBelow:f,belowTop:c,belowLeft:p}:{fitsAbove:m,aboveTop:r,aboveLeft:h,fitsBelow:f,belowTop:s,belowLeft:g}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new rE(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 e of t)e.lineNumber<i.lineNumber&&(i=e),e.lineNumber>n.lineNumber&&(n=e);let o=1073741824;for(const e of i.ranges)e.left<o&&(o=e.left);let r=1073741824;for(const e of n.ranges)e.left<r&&(r=e.left);const s=e.getVerticalOffsetForLineNumber(i.lineNumber)-e.scrollTop,a=new rE(s,o),l=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.scrollTop;return[a,new rE(l,r)]}_prepareRenderWidget(e){if(!this._preference||0===this._preference.length)return null;const[t,i]=this._getTopAndBottomLeft(e);if(!t||!i)return null;if(-1===this._cachedDomNodeOffsetWidth||-1===this._cachedDomNodeOffsetHeight){let e=null;if("function"==typeof this._actual.beforeRender&&(e=lE(this._actual.beforeRender,this._actual)),e)this._cachedDomNodeOffsetWidth=e.width,this._cachedDomNodeOffsetHeight=e.height;else{const e=this.domNode.domNode;this._cachedDomNodeOffsetWidth=e.offsetWidth,this._cachedDomNodeOffsetHeight=e.offsetHeight}}let n;n=this.allowEditorOverflow?this._layoutBoxInPage(t,i,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,e):this._layoutBoxInViewport(t,i,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,e);for(let e=1;e<=2;e++)for(const i of this._preference)if(1===i){if(!n)return null;if(2===e||n.fitsAbove)return{coordinate:new rE(n.aboveTop,n.aboveLeft),position:1}}else{if(2!==i)return this.allowEditorOverflow?{coordinate:this._prepareRenderWidgetAtExactPositionOverflowing(t),position:0}:{coordinate:t,position:0};if(!n)return null;if(2===e||n.fitsBelow)return{coordinate:new rE(n.belowTop,n.belowLeft),position:2}}return null}onBeforeRender(e){this._viewRange&&this._preference&&(this._viewRange.endLineNumber<e.startLineNumber||this._viewRange.startLineNumber>e.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&&lE(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&&lE(this._actual.afterRender,this._actual,this._renderData.position)}}function lE(e,t,...i){try{return e.call(t,...i)}catch(e){return null}}var cE=i(1260),dE={};dE.styleTagTransform=uu(),dE.setAttributes=lu(),dE.insert=su().bind(null,"head"),dE.domAPI=ou(),dE.insertStyleElement=du(),iu()(cE.Z,dE),cE.Z&&cE.Z.locals&&cE.Z.locals;class hE extends lx{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 Xd(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)),rl(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 r=0;const s=[];for(let e=i;e<=n;e++){const n=e-i;for(;r<o&&this._cursorLineNumbers[r]<e;)r++;r<o&&this._cursorLineNumbers[r]===e?s[n]=t:s[n]=""}this._renderData=s}render(e,t){if(!this._renderData)return"";const i=t-e;return i>=this._renderData.length?"":this._renderData[i]}_shouldRenderInMargin(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class uE extends hE{_renderOne(e){return`<div class="${"current-line"+(this._shouldRenderOther()?" current-line-both":"")}" style="width:${Math.max(e.scrollWidth,this._contentWidth)}px; height:${this._lineHeight}px;"></div>`}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}class gE extends hE{_renderOne(e){return`<div class="${"current-line"+(this._shouldRenderInMargin()?" current-line-margin":"")+(this._shouldRenderOther()?" current-line-margin-both":"")}" style="width:${this._contentLeft}px; height:${this._lineHeight}px;"></div>`}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}hw(((e,t)=>{const i=e.getColor(cx);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(dx)){const i=e.getColor(dx);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; }")))}}));var pE=i(1329),mE={};mE.styleTagTransform=uu(),mE.setAttributes=lu(),mE.insert=su().bind(null,"head"),mE.domAPI=ou(),mE.insertStyleElement=du(),iu()(pE.Z,mE),pE.Z&&pE.Z.locals&&pE.Z.locals;class fE extends lx{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 e=0,o=t.length;e<o;e++){const o=t[e];o.options.className&&(i[n++]=o)}i=i.sort(((e,t)=>{if(e.options.zIndex<t.options.zIndex)return-1;if(e.options.zIndex>t.options.zIndex)return 1;const i=e.options.className,n=t.options.className;return i<n?-1:i>n?1:Zd.compareRangesUsingStarts(e.range,t.range)}));const o=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,s=[];for(let e=o;e<=r;e++)s[e-o]="";this._renderWholeLineDecorations(e,i,s),this._renderNormalDecorations(e,i,s),this._renderResult=s}_renderWholeLineDecorations(e,t,i){const n=String(this._lineHeight),o=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber;for(let e=0,s=t.length;e<s;e++){const s=t[e];if(!s.options.isWholeLine)continue;const a='<div class="cdr '+s.options.className+'" style="left:0;width:100%;height:'+n+'px;"></div>',l=Math.max(s.range.startLineNumber,o),c=Math.min(s.range.endLineNumber,r);for(let e=l;e<=c;e++)i[e-o]+=a}}_renderNormalDecorations(e,t,i){const n=String(this._lineHeight),o=e.visibleRange.startLineNumber;let r=null,s=!1,a=null;for(let l=0,c=t.length;l<c;l++){const c=t[l];if(c.options.isWholeLine)continue;const d=c.options.className,h=Boolean(c.options.showIfCollapsed);let u=c.range;h&&1===u.endColumn&&u.endLineNumber!==u.startLineNumber&&(u=new Zd(u.startLineNumber,u.startColumn,u.endLineNumber-1,this._context.viewModel.getLineMaxColumn(u.endLineNumber-1))),r===d&&s===h&&Zd.areIntersectingOrTouching(a,u)?a=Zd.plusRange(a,u):(null!==r&&this._renderNormalDecoration(e,a,r,s,n,o,i),r=d,s=h,a=u)}null!==r&&this._renderNormalDecoration(e,a,r,s,n,o,i)}_renderNormalDecoration(e,t,i,n,o,r,s){const a=e.linesVisibleRangesForRange(t,"findMatch"===i);if(a)for(let e=0,t=a.length;e<t;e++){const t=a[e];if(t.outsideRenderedLine)continue;const l=t.lineNumber-r;if(n&&1===t.ranges.length){const e=t.ranges[0];if(e.width<this._typicalHalfwidthCharacterWidth){const i=Math.round(e.left+e.width/2),n=Math.max(0,Math.round(i-this._typicalHalfwidthCharacterWidth/2));t.ranges[0]=new pk(n,this._typicalHalfwidthCharacterWidth)}}for(let e=0,n=t.ranges.length;e<n;e++){const n=t.ranges[e],r='<div class="cdr '+i+'" style="left:'+String(n.left)+"px;width:"+String(n.width)+"px;height:"+o+'px;"></div>';s[l]+=r}}}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class _E extends Nc{onclick(e,t){this._register(pv(e,Kv.CLICK,(e=>t(new rv(e)))))}onmousedown(e,t){this._register(pv(e,Kv.MOUSE_DOWN,(e=>t(new rv(e)))))}onmouseover(e,t){this._register(pv(e,Kv.MOUSE_OVER,(e=>t(new rv(e)))))}onnonbubblingmouseout(e,t){this._register(fv(e,(e=>t(new rv(e)))))}onkeydown(e,t){this._register(pv(e,Kv.KEY_DOWN,(e=>t(new ev(e)))))}onkeyup(e,t){this._register(pv(e,Kv.KEY_UP,(e=>t(new ev(e)))))}oninput(e,t){this._register(pv(e,Kv.INPUT,t))}onblur(e,t){this._register(pv(e,Kv.BLUR,t))}onfocus(e,t){this._register(pv(e,Kv.FOCUS,t))}ignoreGesture(e){ny.ignoreTarget(e)}}class vE extends _E{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 ry),this.onmousedown(this.bgDomNode,(e=>this._arrowMouseDown(e))),this.onmousedown(this.domNode,(e=>this._arrowMouseDown(e))),this._mousedownRepeatTimer=this._register(new vm),this._mousedownScheduleRepeatTimer=this._register(new _m)}_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,oy,(e=>{}),(()=>{this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancel()})),e.preventDefault()}}class bE extends Nc{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 _m)}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 wE extends _E{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 bE(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._mouseMoveMonitor=this._register(new ry),this._shouldRender=!0,this.domNode=yg(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 vE(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,i,n){this.slider=yg(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=Iv(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,oy,(e=>{const t=this._sliderOrthogonalMousePosition(e),r=Math.abs(t-n);if(Ra&&r>140)return void this._setDesiredScrollPositionNow(o.getScrollPosition());const s=this._sliderMousePosition(e)-i;this._setDesiredScrollPositionNow(o.getDesiredScrollPositionFromDelta(s))}),(()=>{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 yE{constructor(e,t,i,n,o,r){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(i),this._arrowSize=Math.round(e),this._visibleSize=n,this._scrollSize=o,this._scrollPosition=r,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new yE(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 r=Math.max(0,i-e),s=Math.max(0,r-2*t),a=n>0&&n>i;if(!a)return{computedAvailableSize:Math.round(r),computedIsNeeded:a,computedSliderSize:Math.round(s),computedSliderRatio:0,computedSliderPosition:0};const l=Math.round(Math.max(20,Math.floor(i*s/n))),c=(s-l)/(n-i),d=o*c;return{computedAvailableSize:Math.round(r),computedIsNeeded:a,computedSliderSize:Math.round(l),computedSliderRatio:c,computedSliderPosition:Math.round(d)}}_refreshComputedValues(){const e=yE._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=e.computedAvailableSize,this._computedIsNeeded=e.computedIsNeeded,this._computedSliderSize=e.computedSliderSize,this._computedSliderRatio=e.computedSliderRatio,this._computedSliderPosition=e.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize;let i=this._scrollPosition;return t<this._computedSliderPosition?i-=this._visibleSize:i+=this._visibleSize,i}getDesiredScrollPositionFromDelta(e){if(!this._computedIsNeeded)return 0;const t=this._computedSliderPosition+e;return Math.round(t/this._computedSliderRatio)}}class CE extends wE{constructor(e,t,i){const n=e.getScrollDimensions(),o=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new yE(t.horizontalHasArrows?t.arrowSize:0,2===t.horizontal?0:t.horizontalScrollbarSize,2===t.vertical?0:t.verticalScrollbarSize,n.width,n.scrollWidth,o.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows){const e=(t.arrowSize-11)/2,i=(t.horizontalScrollbarSize-11)/2;this._createArrow({className:"scra",icon:lh.scrollbarButtonLeft,top:i,left:e,bottom:void 0,right:void 0,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new sv(null,1,0))}),this._createArrow({className:"scra",icon:lh.scrollbarButtonRight,top:i,left:void 0,bottom:void 0,right:e,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new sv(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 SE extends wE{constructor(e,t,i){const n=e.getScrollDimensions(),o=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new yE(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-11)/2,i=(t.verticalScrollbarSize-11)/2;this._createArrow({className:"scra",icon:lh.scrollbarButtonUp,top:e,left:i,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new sv(null,0,1))}),this._createArrow({className:"scra",icon:lh.scrollbarButtonDown,top:void 0,left:i,bottom:e,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new sv(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 kE{constructor(e,t,i,n,o,r,s){this._forceIntegerValues=e,this._scrollStateBrand=void 0,this._forceIntegerValues&&(t|=0,i|=0,n|=0,o|=0,r|=0,s|=0),this.rawScrollLeft=n,this.rawScrollTop=s,t<0&&(t=0),n+t>i&&(n=i-t),n<0&&(n=0),o<0&&(o=0),s+o>r&&(s=r-o),s<0&&(s=0),this.width=t,this.scrollWidth=i,this.scrollLeft=n,this.height=o,this.scrollHeight=r,this.scrollTop=s}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 kE(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 kE(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,r=this.height!==e.height,s=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:r,scrollHeightChanged:s,scrollTopChanged:a}}}class xE extends Nc{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new Vc),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new kE(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 NE(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=NE.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 LE{constructor(e,t,i){this.scrollLeft=e,this.scrollTop=t,this.isDone=i}}function EE(e,t){const i=t-e;return function(t){return e+i*(1-(n=1-t,Math.pow(n,3)));var n}}class NE{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 s,a;return e<t?(s=e+.75*i,a=t-.75*i):(s=e-.75*i,a=t+.75*i),n=EE(e,s),o=EE(a,t),r=.33,function(e){return e<r?n(e/r):o((e-r)/(1-r))}}var n,o,r;return EE(e,t)}dispose(){null!==this.animationFrameDisposable&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(e){this.to=e.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(e){const t=(e-this.startTime)/this.duration;if(t<1){const e=this.scrollLeft(t),i=this.scrollTop(t);return new LE(e,i,!1)}return new LE(this.to.scrollLeft,this.to.scrollTop,!0)}combine(e,t,i){return NE.start(e,t,i)}static start(e,t,i){i+=10;const n=Date.now()-10;return new NE(e,t,n,i)}}var IE=i(7198),TE={};TE.styleTagTransform=uu(),TE.setAttributes=lu(),TE.insert=su().bind(null,"head"),TE.domAPI=ou(),TE.insertStyleElement=du(),iu()(IE.Z,TE),IE.Z&&IE.Z.locals&&IE.Z.locals;class DE{constructor(e,t,i){this.timestamp=e,this.deltaX=t,this.deltaY=i,this.score=0}}class AE{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(-1===this._front&&-1===this._rear)return!1;let e=1,t=0,i=1,n=this._rear;for(;;){const o=n===this._front?e:Math.pow(2,-i);if(e-=o,t+=this._memory[n].score*o,n===this._front)break;n=(this._capacity+n-1)%this._capacity,i++}return t<=.5}accept(e,t,i){const n=new DE(e,t,i);n.score=this._computeScore(n),-1===this._front&&-1===this._rear?(this._memory[0]=n,this._front=0,this._rear=0):(this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=n)}_computeScore(e){if(Math.abs(e.deltaX)>0&&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}}AE.INSTANCE=new AE;class OE extends _E{constructor(e,t,i){super(),this._onScroll=this._register(new Vc),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new Vc),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};return t.horizontalSliderSize=void 0!==e.horizontalSliderSize?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=void 0!==e.verticalSliderSize?e.verticalSliderSize:t.verticalScrollbarSize,Pa&&(t.className+=" mac"),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 SE(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new CE(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=yg(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=yg(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=yg(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 _m),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}get options(){return this._options}dispose(){this._mouseWheelToDispose=kc(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,Pa&&(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=kc(this._mouseWheelToDispose),e)){const e=e=>{this._onMouseWheel(new sv(e))};this._mouseWheelToDispose.push(pv(this._listenOnDomNode,Kv.MOUSE_WHEEL,e,{passive:!1}))}}_onMouseWheel(e){const t=AE.INSTANCE;{const i=window.devicePixelRatio/dg();Ra||Fa?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 r=!Pa&&e.browserEvent&&e.browserEvent.shiftKey;!this._options.scrollYToX&&!r||o||(o=n,n=0),e.browserEvent&&e.browserEvent.altKey&&(o*=this._options.fastScrollSensitivity,n*=this._options.fastScrollSensitivity);const s=this._scrollable.getFutureScrollPosition();let a={};if(n){const e=50*n,t=s.scrollTop-(e<0?Math.floor(e):Math.ceil(e));this._verticalScrollbar.writeScrollPosition(a,t)}if(o){const e=50*o,t=s.scrollLeft-(e<0?Math.floor(e):Math.ceil(e));this._horizontalScrollbar.writeScrollPosition(a,t)}a=this._scrollable.validateScrollPosition(a),(s.scrollLeft!==a.scrollLeft||s.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":"",r=i||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${n}`),this._topShadowDomNode.setClassName(`shadow${o}`),this._topLeftShadowDomNode.setClassName(`shadow${r}${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 ME extends OE{constructor(e,t){(t=t||{}).mouseWheelSmoothScroll=!1;const i=new xE({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:e=>bv(e)});super(e,t,i),this._register(i)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}}class RE extends OE{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 PE extends OE{constructor(e,t){(t=t||{}).mouseWheelSmoothScroll=!1;const i=new xE({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:e=>bv(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 FE extends dk{constructor(e,t,i,n){super(e);const o=this._context.configuration.options,r=o.get(92),s=o.get(67),a=o.get(34),l=o.get(95),c={listenOnDomNode:i.domNode,className:"editor-scrollable "+lw(e.theme.type),useShadows:!1,lazyRender:!0,vertical:r.vertical,horizontal:r.horizontal,verticalHasArrows:r.verticalHasArrows,horizontalHasArrows:r.horizontalHasArrows,verticalScrollbarSize:r.verticalScrollbarSize,verticalSliderSize:r.verticalSliderSize,horizontalScrollbarSize:r.horizontalScrollbarSize,horizontalSliderSize:r.horizontalSliderSize,handleMouseWheel:r.handleMouseWheel,alwaysConsumeMouseWheel:r.alwaysConsumeMouseWheel,arrowSize:r.arrowSize,mouseWheelScrollSensitivity:s,fastScrollSensitivity:a,scrollPredominantAxis:l,scrollByPage:r.scrollByPage};this.scrollbar=this._register(new RE(t.domNode,c,this._context.viewLayout.getScrollable())),hk.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=yg(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const d=(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(pv(i.domNode,"scroll",(e=>d(i.domNode,!0,!0)))),this._register(pv(t.domNode,"scroll",(e=>d(t.domNode,!0,!1)))),this._register(pv(n.domNode,"scroll",(e=>d(n.domNode,!0,!1)))),this._register(pv(this.scrollbarDomNode.domNode,"scroll",(e=>d(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),r={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(r)}return e.hasChanged(131)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+lw(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}hw(((e,t)=>{const i=e.getColor(Hy);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(Uy);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($y);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 r=e.getColor(Ky);r&&t.addRule(`\n\t\t\t.monaco-scrollable-element > .scrollbar > .slider.active {\n\t\t\t\tbackground: ${r};\n\t\t\t}\n\t\t`)}));var BE=i(4827),WE={};WE.styleTagTransform=uu(),WE.setAttributes=lu(),WE.insert=su().bind(null,"head"),WE.domAPI=ou(),WE.insertStyleElement=du(),iu()(BE.Z,WE),BE.Z&&BE.Z.locals&&BE.Z.locals;class VE{constructor(e,t,i){this._decorationToRenderBrand=void 0,this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(i)}}class zE extends lx{_render(e,t,i){const n=[];for(let i=e;i<=t;i++)n[i-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<t.className?-1:1));let o=null,r=0;for(let s=0,a=i.length;s<a;s++){const a=i[s],l=a.className;let c=Math.max(a.startLineNumber,e)-e;const d=Math.min(a.endLineNumber,t)-e;o===l?(c=Math.max(r+1,c),r=Math.max(r,d)):(o=l,r=d);for(let e=c;e<=r;e++)n[e].push(o)}return n}}class jE extends zE{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(131);this._lineHeight=t.get(59),this._glyphMargin=t.get(50),this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(131);return this._lineHeight=t.get(59),this._glyphMargin=t.get(50),this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport(),i=[];let n=0;for(let e=0,o=t.length;e<o;e++){const o=t[e],r=o.options.glyphMarginClassName;r&&(i[n++]=new VE(o.range.startLineNumber,o.range.endLineNumber,r))}return i}prepareRender(e){if(!this._glyphMargin)return void(this._renderResult=null);const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=this._render(t,i,this._getDecorations(e)),o=this._lineHeight.toString(),r='" style="left:'+this._glyphMarginLeft.toString()+"px;width:"+this._glyphMarginWidth.toString()+"px;height:"+o+'px;"></div>',s=[];for(let e=t;e<=i;e++){const i=e-t,o=n[i];0===o.length?s[i]="":s[i]='<div class="cgmr codicon '+o.join(" ")+r}this._renderResult=s}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}var HE,UE=i(6848),$E={};$E.styleTagTransform=uu(),$E.setAttributes=lu(),$E.insert=su().bind(null,"head"),$E.domAPI=ou(),$E.insertStyleElement=du(),iu()(UE.Z,$E),UE.Z&&UE.Z.locals&&UE.Z.locals,function(e){e[e.Disabled=0]="Disabled",e[e.EnabledForActive=1]="EnabledForActive",e[e.Enabled=2]="Enabled"}(HE||(HE={}));class KE{constructor(e,t,i){this.visibleColumn=e,this.className=t,this.horizontalLine=i}}class qE{constructor(e,t){this.top=e,this.endColumn=t}}class GE extends class{constructor(){this._isDisposed=!1}dispose(){this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}{constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t}getLanguageConfiguration(e){return this.languageConfigurationService.getLanguageConfiguration(e)}_computeIndentLevel(e){return function(e,t){let i=0,n=0;const o=e.length;for(;n<o;){const o=e.charCodeAt(n);if(32===o)i++;else{if(9!==o)break;i=i-i%t+t}n++}return n===o?-1:i}(this.textModel.getLineContent(e+1),this.textModel.getOptions().tabSize)}getActiveIndentGuide(e,t,i){this.assertNotDisposed();const n=this.textModel.getLineCount();if(e<1||e>n)throw new Error("Illegal value for lineNumber");const o=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,r=Boolean(o&&o.offSide);let s=-2,a=-1,l=-2,c=-1;const d=e=>{if(-1!==s&&(-2===s||s>e-1)){s=-1,a=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){s=t,a=e;break}}}if(-2===l){l=-1,c=-1;for(let t=e;t<n;t++){const e=this._computeIndentLevel(t);if(e>=0){l=t,c=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<e-1)){g=-1,p=-1;for(let t=e;t<n;t++){const e=this._computeIndentLevel(t);if(e>=0){g=t,p=e;break}}}};let f=0,_=!0,v=0,b=!0,w=0,y=0;for(let o=0;_||b;o++){const s=e-o,g=e+o;o>1&&(s<1||s<t)&&(_=!1),o>1&&(g>n||g>i)&&(b=!1),o>5e4&&(_=!1,b=!1);let C=-1;if(_&&s>=1){const e=this._computeIndentLevel(s-1);e>=0?(l=s-1,c=e,C=Math.ceil(e/this.textModel.getOptions().indentSize)):(d(s),C=this._getIndentLevelForWhitespaceLine(r,a,c))}let S=-1;if(b&&g<=n){const e=this._computeIndentLevel(g-1);e>=0?(h=g-1,u=e,S=Math.ceil(e/this.textModel.getOptions().indentSize)):(m(g),S=this._getIndentLevelForWhitespaceLine(r,u,p))}if(0!==o){if(1===o){if(g<=n&&S>=0&&y+1===S){_=!1,f=g,v=g,w=S;continue}if(s>=1&&C>=0&&C-1===y){b=!1,f=s,v=s,w=C;continue}if(f=e,v=e,w=y,0===w)return{startLineNumber:f,endLineNumber:v,indent:w}}_&&(C>=w?f=s:_=!1),b&&(S>=w?v=g:b=!1)}else y=C}return{startLineNumber:f,endLineNumber:v,indent:w}}getLinesBracketGuides(e,t,i,n){var o,r,s,a,l;const c=[],d=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new Zd(e,1,t,this.textModel.getLineMaxColumn(t)));let h;i&&d.length>0&&(h=null===(o=function(e,t){const i=function(e,t){for(let i=e.length-1;i>=0;i--)if(t(e[i]))return i;return-1}(e,(e=>e.range.startLineNumber!==e.range.endLineNumber));if(-1!==i)return e[i]}(e<=i.lineNumber&&i.lineNumber<=t?d.filter((e=>Zd.strictContainsPosition(e.range,i))):this.textModel.bracketPairs.getBracketPairsInRange(Zd.fromPositions(i))))||void 0===o?void 0:o.range);const u=new _l(d),g=new Array,p=new Array,m=new YE;for(let i=e;i<=t;i++){let e=new Array;p.length>0&&(e=e.concat(p),p.length=0),c.push(e);for(const e of u.takeWhile((e=>e.openingBracketRange.startLineNumber<=i))||[]){if(e.range.startLineNumber===e.range.endLineNumber)continue;const t=Math.min(this.getVisibleColumnFromPosition(e.openingBracketRange.getStartPosition()),this.getVisibleColumnFromPosition(null!==(s=null===(r=e.closingBracketRange)||void 0===r?void 0:r.getStartPosition())&&void 0!==s?s:e.range.getEndPosition()),e.minVisibleColumnIndentation+1);let i=!1;e.closingBracketRange&&Su(this.textModel.getLineContent(e.closingBracketRange.startLineNumber))<e.closingBracketRange.startColumn-1&&(i=!0);const n=e.openingBracketRange.getStartPosition(),o=null!==(l=null===(a=e.closingBracketRange)||void 0===a?void 0:a.getStartPosition())&&void 0!==l?l:e.range.getEndPosition();void 0===e.closingBracketRange?g[e.nestingLevel]=null:g[e.nestingLevel]={nestingLevel:e.nestingLevel,guideVisibleColumn:t,start:n,visibleStartColumn:this.getVisibleColumnFromPosition(n),end:o,visibleEndColumn:this.getVisibleColumnFromPosition(o),bracketPair:e,renderHorizontalEndLineAtTheBottom:i}}for(const t of g){if(!t)continue;const o=h&&t.bracketPair.range.equalsRange(h),r=m.getInlineClassNameOfLevel(t.nestingLevel)+(n.highlightActive&&o?" "+m.activeClassName:"");(o&&n.horizontalGuides!==HE.Disabled||n.includeInactive&&n.horizontalGuides===HE.Enabled)&&(t.start.lineNumber===i&&t.guideVisibleColumn<t.visibleStartColumn&&e.push(new KE(t.guideVisibleColumn,r,new qE(!1,t.start.column))),t.end.lineNumber===i+1&&t.guideVisibleColumn<t.visibleEndColumn&&p.push(new KE(t.guideVisibleColumn,r,new qE(!t.renderHorizontalEndLineAtTheBottom,t.end.column))))}let t=Number.MAX_SAFE_INTEGER;for(let o=g.length-1;o>=0;o--){const r=g[o];if(!r)continue;const s=n.highlightActive&&h&&r.bracketPair.range.equalsRange(h),a=m.getInlineClassNameOfLevel(r.nestingLevel)+(s?" "+m.activeClassName:"");(s||n.includeInactive)&&r.renderHorizontalEndLineAtTheBottom&&r.end.lineNumber===i+1&&p.push(new KE(r.guideVisibleColumn,a,null)),r.end.lineNumber<=i||r.start.lineNumber>=i||r.guideVisibleColumn>=t&&!s||(t=r.guideVisibleColumn,(s||n.includeInactive)&&e.push(new KE(r.guideVisibleColumn,a,null)))}e.sort(((e,t)=>e.visibleColumn-t.visibleColumn))}return c}getVisibleColumnFromPosition(e){return Nk.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,r=Boolean(o&&o.offSide),s=new Array(t-e+1);let a=-2,l=-1,c=-2,d=-1;for(let o=e;o<=t;o++){const t=o-e,h=this._computeIndentLevel(o-1);if(h>=0)a=o-1,l=h,s[t]=Math.ceil(h/n.indentSize);else{if(-2===a){a=-1,l=-1;for(let e=o-2;e>=0;e--){const t=this._computeIndentLevel(e);if(t>=0){a=e,l=t;break}}}if(-1!==c&&(-2===c||c<o-1)){c=-1,d=-1;for(let e=o;e<i;e++){const t=this._computeIndentLevel(e);if(t>=0){c=e,d=t;break}}}s[t]=this._getIndentLevelForWhitespaceLine(r,l,d)}}return s}_getIndentLevelForWhitespaceLine(e,t,i){const n=this.textModel.getOptions();return-1===t||-1===i?0:t<i?1+Math.floor(t/n.indentSize):t===i||e?Math.ceil(i/n.indentSize):1+Math.floor(i/n.indentSize)}}class YE{constructor(){this.activeClassName="indent-active"}getInlineClassNameOfLevel(e){return"bracket-indent-guide lvl-"+e%30}}class ZE extends lx{constructor(e){super(),this._context=e,this._primaryPosition=null;const t=this._context.configuration.options,i=t.get(132),n=t.get(44);this._lineHeight=t.get(59),this._spaceWidth=n.spaceWidth,this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(13),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(132),n=t.get(44);return this._lineHeight=t.get(59),this._spaceWidth=n.spaceWidth,this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(13),!0}onCursorStateChanged(e){var t;const i=e.selections[0].getPosition();return!(null===(t=this._primaryPosition)||void 0===t?void 0:t.equals(i))&&(this._primaryPosition=i,!0)}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onLanguageConfigurationChanged(e){return!0}prepareRender(e){var t,i,n,o;if(!this._bracketPairGuideOptions.indentation&&!1===this._bracketPairGuideOptions.bracketPairs)return void(this._renderResult=null);const r=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber,a=e.scrollWidth,l=this._lineHeight,c=this._primaryPosition,d=this.getGuidesByLine(r,s,c),h=[];for(let c=r;c<=s;c++){const s=c-r,u=d[s];let g="";const p=null!==(i=null===(t=e.visibleRangeForPosition(new Yd(c,1)))||void 0===t?void 0:t.left)&&void 0!==i?i:0;for(const t of u){const i=p+(t.visibleColumn-1)*this._spaceWidth;if(i>a||this._maxIndentLeft>0&&i>this._maxIndentLeft)break;const r=t.horizontalLine?t.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",s=t.horizontalLine?(null!==(o=null===(n=e.visibleRangeForPosition(new Yd(c,t.horizontalLine.endColumn)))||void 0===n?void 0:n.left)&&void 0!==o?o:i+this._spaceWidth)-i:this._spaceWidth;g+=`<div class="core-guide ${t.className} ${r}" style="left:${i}px;height:${l}px;width:${s}px"></div>`}h[s]=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?HE.Enabled:"active"===this._bracketPairGuideOptions.bracketPairsHorizontal?HE.EnabledForActive:HE.Disabled,includeInactive:!0===this._bracketPairGuideOptions.bracketPairs}):null,o=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(e,t):null;let r=0,s=0,a=0;if(this._bracketPairGuideOptions.highlightActiveIndentation&&i){const n=this._context.viewModel.getActiveIndentGuide(i.lineNumber,e,t);r=n.startLineNumber,s=n.endLineNumber,a=n.indent}const{indentSize:l}=this._context.viewModel.model.getOptions(),c=[];for(let i=e;i<=t;i++){const t=new Array;c.push(t);const d=n?n[i-e]:[],h=new _l(d),u=o?o[i-e]:[];for(let e=1;e<=u;e++){const n=(e-1)*l+1,o=0===d.length&&r<=i&&i<=s&&e===a;t.push(...h.takeWhile((e=>e.visibleColumn<n))||[]);const c=h.peek();c&&c.visibleColumn===n&&!c.horizontalLine||t.push(new KE(n,o?"core-guide-indent-active":"core-guide-indent",null))}t.push(...h.takeWhile((e=>!0))||[])}return c}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function XE(e){if(!e||!e.isTransparent())return e}hw(((e,t)=>{const i=e.getColor(vx);i&&t.addRule(`.monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 ${i} inset; }`);const n=e.getColor(bx)||i;n&&t.addRule(`.monaco-editor .lines-content .core-guide-indent-active { box-shadow: 1px 0 0 0 ${n} inset; }`);const o=[{bracketColor:Ox,guideColor:Vx,guideColorActive:Kx},{bracketColor:Mx,guideColor:zx,guideColorActive:qx},{bracketColor:Rx,guideColor:jx,guideColorActive:Gx},{bracketColor:Px,guideColor:Hx,guideColorActive:Yx},{bracketColor:Fx,guideColor:Ux,guideColorActive:Zx},{bracketColor:Bx,guideColor:$x,guideColorActive:Xx}],r=new YE,s=o.map((t=>{var i,n;const o=e.getColor(t.bracketColor),r=e.getColor(t.guideColor),s=e.getColor(t.guideColorActive),a=XE(null!==(i=XE(r))&&void 0!==i?i:null==o?void 0:o.transparent(.3)),l=XE(null!==(n=XE(s))&&void 0!==n?n:o);if(a&&l)return{guideColor:a,guideColorActive:l}})).filter(kl);if(s.length>0){for(let e=0;e<30;e++){const i=s[e%s.length];t.addRule(`.monaco-editor .${r.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.${r.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),t.addRule(`.monaco-editor .horizontal-top.${r.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),t.addRule(`.monaco-editor .horizontal-bottom.${r.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}}));var JE=i(9565),QE={};QE.styleTagTransform=uu(),QE.setAttributes=lu(),QE.insert=su().bind(null,"head"),QE.domAPI=ou(),QE.insertStyleElement=du(),iu()(JE.Z,QE),JE.Z&&JE.Z.locals&&JE.Z.locals;class eN{constructor(){this._currentVisibleRange=new Zd(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class tN{constructor(e,t,i,n,o,r,s){this.minimalReveal=e,this.lineNumber=t,this.startColumn=i,this.endColumn=n,this.startScrollTop=o,this.stopScrollTop=r,this.scrollType=s,this.type="range",this.minLineNumber=t,this.maxLineNumber=t}}class iN{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 r=t[0].startLineNumber,s=t[0].endLineNumber;for(let e=1,i=t.length;e<i;e++){const i=t[e];r=Math.min(r,i.startLineNumber),s=Math.max(s,i.endLineNumber)}this.minLineNumber=r,this.maxLineNumber=s}}class nN extends dk{constructor(e,t){super(e),this._linesContent=t,this._textRangeRestingSpot=document.createElement("div"),this._visibleLines=new QL(this),this.domNode=this._visibleLines.domNode;const i=this._context.configuration,n=this._context.configuration.options,o=n.get(44),r=n.get(132),s=n.get(131);this._lineHeight=n.get(59),this._typicalHalfwidthCharacterWidth=o.typicalHalfwidthCharacterWidth,this._isViewportWrapping=r.isViewportWrapping,this._revealHorizontalRightPadding=n.get(89),this._horizontalScrollbarHeight=s.horizontalScrollbarHeight,this._cursorSurroundingLines=n.get(25),this._cursorSurroundingLinesStyle=n.get(26),this._canUseLayerHinting=!n.get(28),this._viewLineOptions=new Ck(i,this._context.theme.type),hk.write(this.domNode,7),this.domNode.setClassName("view-lines monaco-mouse-cursor-text"),Cg(this.domNode,o),this._maxLineWidth=0,this._asyncUpdateLineWidths=new bm((()=>{this._updateLineWidthsSlow()}),200),this._asyncCheckMonospaceFontAssumptions=new bm((()=>{this._checkMonospaceFontAssumptions()}),2e3),this._lastRenderedData=new eN,this._horizontalRevealRequest=null}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new Sk(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),Cg(this.domNode,i),this._onOptionsMaybeChanged(),e.hasChanged(131)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,t=new Ck(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 e=t;e<=i;e++)n=this._visibleLines.getVisibleLine(e).onSelectionChanged()||n;return n}onDecorationsChanged(e){{const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++)this._visibleLines.getVisibleLine(i).onDecorationsChanged()}return!0}onFlushed(e){const t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){const t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.minimalReveal,e.range,e.selections,e.verticalType);if(-1===t)return!1;let i=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?i={scrollTop:i.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new tN(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 iN(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.scrollTop<t||e.scrollTop>i)&&(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 Yd(n,1);const o=this._visibleLines.getStartLineNumber(),r=this._visibleLines.getEndLineNumber();if(n<o||n>r)return null;let s=this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(n,e,t);const a=this._context.viewModel.getLineMinColumn(n);return s<a&&(s=a),new Yd(n,s)}_getViewLineDomNode(e){for(;e&&1===e.nodeType;){if(e.className===Sk.CLASS_NAME)return e;e=e.parentElement}return null}_getLineNumberFor(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let n=t;n<=i;n++)if(e===this._visibleLines.getVisibleLine(n).getDomNode())return n;return-1}getLineWidth(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();return e<t||e>i?-1:this._visibleLines.getVisibleLine(e).getWidth()}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;const i=e.endLineNumber,n=Zd.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!n)return null;let o=[],r=0;const s=new yk(this.domNode.domNode,this._textRangeRestingSpot);let a=0;t&&(a=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new Yd(n.startLineNumber,1)).lineNumber);const l=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber();for(let e=n.startLineNumber;e<=n.endLineNumber;e++){if(e<l||e>c)continue;const d=e===n.startLineNumber?n.startColumn:1,h=e===n.endLineNumber?n.endColumn:this._context.viewModel.getLineMaxColumn(e),u=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,d,h,s);if(u){if(t&&e<i){const t=a;a=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new Yd(e+1,1)).lineNumber,t!==a&&(u.ranges[u.ranges.length-1].width+=this._typicalHalfwidthCharacterWidth)}o[r++]=new gk(u.outsideRenderedLine,e,pk.from(u.ranges))}}return 0===r?null:o}_visibleRangesForLineRange(e,t,i){return this.shouldRender()||e<this._visibleLines.getStartLineNumber()||e>this._visibleLines.getEndLineNumber()?null:this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,t,i,new yk(this.domNode.domNode,this._textRangeRestingSpot))}visibleRangeForPosition(e){const t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new fk(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 r=t;r<=i;r++){const t=this._visibleLines.getVisibleLine(r);!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 e=i;e<=n;e++)this._visibleLines.getVisibleLine(e).onMonospaceAssumptionsInvalidated()}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const t=this._horizontalRevealRequest;if(e.startLineNumber<=t.minLineNumber&&t.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const e=this._computeScrollLeftToReveal(t);e&&(this._isViewportWrapping||this._ensureMaxLineWidth(e.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:e.scrollLeft},t.scrollType))}}if(this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),Fa&&!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._maxLineWidth<t&&(this._maxLineWidth=t,this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth))}_computeScrollTopToRevealRange(e,t,i,n,o,r){const s=e.top,a=e.height,l=s+a;let c,d,h,u;if(o&&o.length>0){let e=o[0].startLineNumber,t=o[0].endLineNumber;for(let i=1,n=o.length;i<n;i++){const n=o[i];e=Math.min(e,n.startLineNumber),t=Math.max(t,n.endLineNumber)}c=!1,d=this._context.viewLayout.getVerticalOffsetForLineNumber(e),h=this._context.viewLayout.getVerticalOffsetForLineNumber(t)+this._lineHeight}else{if(!n)return-1;c=!0,d=this._context.viewLayout.getVerticalOffsetForLineNumber(n.startLineNumber),h=this._context.viewLayout.getVerticalOffsetForLineNumber(n.endLineNumber)+this._lineHeight}if("mouse"!==t&&!i||"default"!==this._cursorSurroundingLinesStyle){const e=Math.min(a/this._lineHeight/2,this._cursorSurroundingLines);d-=e*this._lineHeight,h+=Math.max(0,e-1)*this._lineHeight}else i||(d-=this._lineHeight);if(0!==r&&4!==r||(h+=i?this._horizontalScrollbarHeight:this._lineHeight),h-d>a){if(!c)return-1;u=d}else if(5===r||6===r)if(6===r&&s<=d&&h<=l)u=s;else{const e=d-Math.max(5*this._lineHeight,.2*a),t=h-a;u=Math.max(t,e)}else if(1===r||2===r)if(2===r&&s<=d&&h<=l)u=s;else{const e=(d+h)/2;u=Math.max(0,e-a/2)}else u=this._computeMinimumScrolling(s,l,d,h,3===r,4===r);return u}_computeScrollLeftToReveal(e){const t=this._context.viewLayout.getCurrentViewport(),i=t.left,n=i+t.width;let o=1073741824,r=0;if("range"===e.type){const t=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!t)return null;for(const e of t.ranges)o=Math.min(o,Math.round(e.left)),r=Math.max(r,Math.round(e.left+e.width))}else for(const t of e.selections){if(t.startLineNumber!==t.endLineNumber)return null;const e=this._visibleRangesForLineRange(t.startLineNumber,t.startColumn,t.endColumn);if(!e)return null;for(const t of e.ranges)o=Math.min(o,Math.round(t.left)),r=Math.max(r,Math.round(t.left+t.width))}return e.minimalReveal||(o=Math.max(0,o-nN.HORIZONTAL_EXTRA_PX),r+=this._revealHorizontalRightPadding),"selections"===e.type&&r-o>t.width?null:{scrollLeft:this._computeMinimumScrolling(i,n,o,r),maxHorizontalOffset:r}}_computeMinimumScrolling(e,t,i,n,o,r){o=!!o,r=!!r;const s=(t|=0)-(e|=0);return(n|=0)-(i|=0)<s?o?i:r?Math.max(0,n-s):i<e?i:n>t?Math.max(0,n-s):e:i}}nN.HORIZONTAL_EXTRA_PX=30;var oN=i(4444),rN={};rN.styleTagTransform=uu(),rN.setAttributes=lu(),rN.insert=su().bind(null,"head"),rN.domAPI=ou(),rN.insertStyleElement=du(),iu()(oN.Z,rN),oN.Z&&oN.Z.locals&&oN.Z.locals;class sN extends zE{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 e=0,o=t.length;e<o;e++){const o=t[e],r=o.options.linesDecorationsClassName;r&&(i[n++]=new VE(o.range.startLineNumber,o.range.endLineNumber,r));const s=o.options.firstLineDecorationClassName;s&&(i[n++]=new VE(o.range.startLineNumber,o.range.startLineNumber,s))}return i}prepareRender(e){const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=this._render(t,i,this._getDecorations(e)),o='" style="left:'+this._decorationsLeft.toString()+"px;width:"+this._decorationsWidth.toString()+'px;"></div>',r=[];for(let e=t;e<=i;e++){const i=e-t,s=n[i];let a="";for(let e=0,t=s.length;e<t;e++)a+='<div class="cldr '+s[e]+o;r[i]=a}this._renderResult=r}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}var aN=i(9364),lN={};lN.styleTagTransform=uu(),lN.setAttributes=lu(),lN.insert=su().bind(null,"head"),lN.domAPI=ou(),lN.insertStyleElement=du(),iu()(aN.Z,lN),aN.Z&&aN.Z.locals&&aN.Z.locals;class cN extends zE{constructor(e){super(),this._context=e,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport(),i=[];let n=0;for(let e=0,o=t.length;e<o;e++){const o=t[e],r=o.options.marginClassName;r&&(i[n++]=new VE(o.range.startLineNumber,o.range.endLineNumber,r))}return i}prepareRender(e){const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=this._render(t,i,this._getDecorations(e)),o=[];for(let e=t;e<=i;e++){const i=e-t,r=n[i];let s="";for(let e=0,t=r.length;e<t;e++)s+='<div class="cmdr '+r[e]+'" style=""></div>';o[i]=s}this._renderResult=o}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}var dN=i(563),hN={};hN.styleTagTransform=uu(),hN.setAttributes=lu(),hN.insert=su().bind(null,"head"),hN.domAPI=ou(),hN.insertStyleElement=du(),iu()(dN.Z,hN),dN.Z&&dN.Z.locals&&dN.Z.locals;class uN{constructor(e,t,i,n){this._rgba8Brand=void 0,this.r=uN._clamp(e),this.g=uN._clamp(t),this.b=uN._clamp(i),this.a=uN._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}}uN.Empty=new uN(0,0,0,0);class gN extends Nc{constructor(){super(),this._onDidChange=new Vc,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(ph.onDidChange((e=>{e.changedColorMap&&this._updateColorMap()})))}static getInstance(){return this._INSTANCE||(this._INSTANCE=new gN),this._INSTANCE}_updateColorMap(){const e=ph.getColorMap();if(!e)return this._colors=[uN.Empty],void(this._backgroundIsLight=!0);this._colors=[uN.Empty];for(let t=1;t<e.length;t++){const i=e[t].rgba;this._colors[t]=new uN(i.r,i.g,i.b,Math.round(255*i.a))}const t=e[2].getRelativeLuminance();this._backgroundIsLight=t>=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}}gN._INSTANCE=null;const pN=(()=>{const e=[];for(let t=32;t<=126;t++)e.push(t);return e.push(65533),e})();class mN{constructor(e,t){this.scale=t,this._minimapCharRendererBrand=void 0,this.charDataNormal=mN.soften(e,.8),this.charDataLight=mN.soften(e,50/60)}static soften(e,t){const i=new Uint8ClampedArray(e.length);for(let n=0,o=e.length;n<o;n++)i[n]=df(e[n]*t);return i}renderChar(e,t,i,n,o,r,s,a,l,c,d){const h=1*this.scale,u=2*this.scale,g=d?1:u;if(t+h>e.width||i+g>e.height)return void console.warn("bad render request outside image data");const p=c?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,_=s.r,v=s.g,b=s.b,w=o.r-_,y=o.g-v,C=o.b-b,S=Math.max(r,a),k=e.data;let x=m*h*u,L=i*f+4*t;for(let e=0;e<g;e++){let e=L;for(let t=0;t<h;t++){const t=p[x++]/255*(r/255);k[e++]=_+w*t,k[e++]=v+y*t,k[e++]=b+C*t,k[e++]=S}L+=f}}blockRenderChar(e,t,i,n,o,r,s,a){const l=1*this.scale,c=2*this.scale,d=a?1:c;if(t+l>e.width||i+d>e.height)return void console.warn("bad render request outside image data");const h=4*e.width,u=o/255*.5,g=r.r,p=r.g,m=r.b,f=g+(n.r-g)*u,_=p+(n.g-p)*u,v=m+(n.b-m)*u,b=Math.max(o,s),w=e.data;let y=i*h+4*t;for(let e=0;e<d;e++){let e=y;for(let t=0;t<l;t++)w[e++]=f,w[e++]=_,w[e++]=v,w[e++]=b;y+=h}}}const fN={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15},_N=e=>{const t=new Uint8ClampedArray(e.length/2);for(let i=0;i<e.length;i+=2)t[i>>1]=fN[e[i]]<<4|15&fN[e[i+1]];return t},vN={1:yc((()=>_N("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792"))),2:yc((()=>_N("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126")))};class bN{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let i;return i=vN[e]?new mN(vN[e](),e):bN.createFromSampleData(bN.createSampleData(t).data,e),this.lastFontFamily=t,this.lastCreated=i,i}static createSampleData(e){const t=document.createElement("canvas"),i=t.getContext("2d");t.style.height="16px",t.height=16,t.width=960,t.style.width="960px",i.fillStyle="#ffffff",i.font=`bold 16px ${e}`,i.textBaseline="middle";let n=0;for(const e of pN)i.fillText(String.fromCharCode(e),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=bN._downsample(e,t);return new mN(i,t)}static _downsampleChar(e,t,i,n,o){const r=1*o,s=2*o;let a=n,l=0;for(let n=0;n<s;n++){const o=n/s*16,c=(n+1)/s*16;for(let n=0;n<r;n++){const s=n/r*10,d=(n+1)/r*10;let h=0,u=0;for(let i=o;i<c;i++){const n=t+3840*Math.floor(i),o=1-(i-Math.floor(i));for(let t=s;t<d;t++){const i=1-(t-Math.floor(t)),r=n+4*Math.floor(t),s=i*o;u+=s,h+=e[r]*e[r+3]/255*s}}const g=h/u;l=Math.max(l,g),i[a++]=df(g)}}return l}static _downsample(e,t){const i=2*t*1*t,n=96*i,o=new Uint8ClampedArray(n);let r=0,s=0,a=0;for(let n=0;n<96;n++)a=Math.max(a,this._downsampleChar(e,s,o,r,t)),r+=i,s+=40;if(a>0){const e=255/a;for(let t=0;t<n;t++)o[t]*=e}return o}}class wN{constructor(e,t,i){const n=e.options,o=n.get(129),r=n.get(131),s=r.minimap,a=n.get(44),l=n.get(65);this.renderMinimap=s.renderMinimap,this.size=l.size,this.minimapHeightIsEditorHeight=s.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=n.get(94),this.showSlider=l.showSlider,this.pixelRatio=o,this.typicalHalfwidthCharacterWidth=a.typicalHalfwidthCharacterWidth,this.lineHeight=n.get(59),this.minimapLeft=s.minimapLeft,this.minimapWidth=s.minimapWidth,this.minimapHeight=r.height,this.canvasInnerWidth=s.minimapCanvasInnerWidth,this.canvasInnerHeight=s.minimapCanvasInnerHeight,this.canvasOuterWidth=s.minimapCanvasOuterWidth,this.canvasOuterHeight=s.minimapCanvasOuterHeight,this.isSampling=s.minimapIsSampling,this.editorHeight=r.height,this.fontScale=s.minimapScale,this.minimapLineHeight=s.minimapLineHeight,this.minimapCharWidth=1*this.fontScale,this.charRenderer=yc((()=>bN.create(this.fontScale,a.fontFamily))),this.defaultBackgroundColor=i.getColor(2),this.backgroundColor=wN._getMinimapBackground(t,this.defaultBackgroundColor),this.foregroundAlpha=wN._getMinimapForegroundOpacity(t)}static _getMinimapBackground(e,t){const i=e.getColor(PS);return i?new uN(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):t}static _getMinimapForegroundOpacity(e){const t=e.getColor(FS);return t?uN._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 yN{constructor(e,t,i,n,o,r,s,a){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=i,this._computedSliderRatio=n,this.sliderTop=o,this.sliderHeight=r,this.startLineNumber=s,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,r,s,a,l,c,d){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),r=n/(c-o),d=l*r,h=n>0,u=Math.floor(e.canvasInnerHeight/e.minimapLineHeight);return new yN(l,c,h,r,d,i,1,Math.min(s,u))}let m,f;if(r&&i!==s){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?(s-1)*u/h:Math.max(0,s*u/h-m),f=Math.min(e.minimapHeight-m,f);const _=f/(c-o),v=l*_;let b=0;if(e.scrollBeyondLastLine&&(b=o/p-1),g>=s+b)return new yN(l,c,f>0,_,v,m,1,s);{let e=Math.max(1,Math.floor(t-v*h/u));d&&d.scrollHeight===c&&(d.scrollTop>l&&(e=Math.min(e,d.startLineNumber)),d.scrollTop<l&&(e=Math.max(e,d.startLineNumber)));const i=Math.min(s,e+g-1);return new yN(l,c,!0,_,(t-e+(l-n)/p)*u/h,m,e,i)}}}class CN{constructor(e){this.dy=e}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}CN.INVALID=new CN(-1);class SN{constructor(e,t,i){this.renderedLayout=e,this._imageData=t,this._renderedLines=new JL((()=>CN.INVALID)),this._renderedLines._set(e.startLineNumber,i)}linesEquals(e){if(!this.scrollEquals(e))return!1;const t=this._renderedLines._get().lines;for(let e=0,i=t.length;e<i;e++)if(-1===t[e].dy)return!1;return!0}scrollEquals(e){return this.renderedLayout.startLineNumber===e.startLineNumber&&this.renderedLayout.endLineNumber===e.endLineNumber}_get(){const e=this._renderedLines._get();return{imageData:this._imageData,rendLineNumberStart:e.rendLineNumberStart,lines:e.lines}}onLinesChanged(e,t){return this._renderedLines.onLinesChanged(e,t)}onLinesDeleted(e,t){this._renderedLines.onLinesDeleted(e,t)}onLinesInserted(e,t){this._renderedLines.onLinesInserted(e,t)}onTokensChanged(e){return this._renderedLines.onTokensChanged(e)}}class kN{constructor(e,t,i,n){this._backgroundFillData=kN._createBackgroundFillData(t,i,n),this._buffers=[e.createImageData(t,i),e.createImageData(t,i)],this._lastUsedBuffer=0}getBuffer(){this._lastUsedBuffer=1-this._lastUsedBuffer;const e=this._buffers[this._lastUsedBuffer];return e.data.set(this._backgroundFillData),e}static _createBackgroundFillData(e,t,i){const n=i.r,o=i.g,r=i.b,s=i.a,a=new Uint8ClampedArray(e*t*4);let l=0;for(let i=0;i<t;i++)for(let t=0;t<e;t++)a[l]=n,a[l+1]=o,a[l+2]=r,a[l+3]=s,l+=4;return a}}class xN{constructor(e,t){this.samplingRatio=e,this.minimapLines=t}static compute(e,t,i){if(0===e.renderMinimap||!e.isSampling)return[null,[]];const n=e.pixelRatio,o=e.lineHeight,r=e.scrollBeyondLastLine,{minimapLineCount:s}=nc.computeContainedMinimapLineCount({viewLineCount:t,scrollBeyondLastLine:r,height:e.editorHeight,lineHeight:o,pixelRatio:n}),a=t/s,l=a/2;if(!i||0===i.minimapLines.length){const e=[];if(e[0]=1,s>1){for(let t=0,i=s-1;t<i;t++)e[t]=Math.round(t*a+l);e[s-1]=t}return[new xN(a,e),[]]}const c=i.minimapLines,d=c.length,h=[];let u=0,g=0,p=1,m=[],f=null;for(let e=0;e<s;e++){const i=Math.max(p,Math.round(e*a)),n=Math.max(i,Math.round((e+1)*a));for(;u<d&&c[u]<i;){if(m.length<10){const e=u+1+g;f&&"deleted"===f.type&&f._oldIndex===u-1?f.deleteToLineNumber++:(f={type:"deleted",_oldIndex:u,deleteFromLineNumber:e,deleteToLineNumber:e},m.push(f)),g--}u++}let o;if(u<d&&c[u]<=n)o=c[u],u++;else if(o=0===e?1:e+1===s?t:Math.round(e*a+l),m.length<10){const t=u+1+g;f&&"inserted"===f.type&&f._i===e-1?f.insertToLineNumber++:(f={type:"inserted",_i:e,insertFromLineNumber:t,insertToLineNumber:t},m.push(f)),g++}h[e]=o,p=o}if(m.length<10)for(;u<d;){const e=u+1+g;f&&"deleted"===f.type&&f._oldIndex===u-1?f.deleteToLineNumber++:(f={type:"deleted",_oldIndex:u,deleteFromLineNumber:e,deleteToLineNumber:e},m.push(f)),g--,u++}else m=[{type:"flush"}];return[new xN(a,h),m]}modelLineToMinimapLine(e){return Math.min(this.minimapLines.length,Math.max(1,Math.round(e/this.samplingRatio)))}modelLineRangeToMinimapLineRange(e,t){let i=this.modelLineToMinimapLine(e)-1;for(;i>0&&this.minimapLines[i-1]>=e;)i--;let n=this.modelLineToMinimapLine(t)-1;for(;n+1<this.minimapLines.length&&this.minimapLines[n+1]<=t;)n++;if(i===n){const n=this.minimapLines[i];if(n<e||n>t)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]<e.fromLineNumber);o--)this.minimapLines[o]<=e.toLineNumber?(this.minimapLines[o]=Math.max(1,e.fromLineNumber-1),i=Math.min(i,o),n=Math.max(n,o)):this.minimapLines[o]-=t;return[i,n]}onLinesInserted(e){const t=e.toLineNumber-e.fromLineNumber+1;for(let i=this.minimapLines.length-1;i>=0&&!(this.minimapLines[i]<e.fromLineNumber);i--)this.minimapLines[i]+=t}}class LN extends dk{constructor(e){super(e),this.tokensColorTracker=gN.getInstance(),this._selections=[],this._minimapSelections=null,this.options=new wN(this._context.configuration,this._context.theme,this.tokensColorTracker);const[t]=xN.compute(this.options,this._context.viewModel.getLineCount(),null);this._samplingState=t,this._shouldCheckSampling=!1,this._actual=new EN(e.theme,this)}dispose(){this._actual.dispose(),super.dispose()}getDomNode(){return this._actual.getDomNode()}_onOptionsMaybeChanged(){const e=new wN(this._context.configuration,this._context.theme,this.tokensColorTracker);return!this.options.equals(e)&&(this.options=e,this._recreateLineSampling(),this._actual.onDidChangeOptions(),!0)}onConfigurationChanged(e){return this._onOptionsMaybeChanged()}onCursorStateChanged(e){return this._selections=e.selections,this._minimapSelections=null,this._actual.onSelectionChanged()}onDecorationsChanged(e){return!!e.affectsMinimap&&this._actual.onDecorationsChanged()}onFlushed(e){return this._samplingState&&(this._shouldCheckSampling=!0),this._actual.onFlushed()}onLinesChanged(e){if(this._samplingState){const t=this._samplingState.modelLineRangeToMinimapLineRange(e.fromLineNumber,e.toLineNumber);return!!t&&this._actual.onLinesChanged(t[0],t[1])}return this._actual.onLinesChanged(e.fromLineNumber,e.toLineNumber)}onLinesDeleted(e){if(this._samplingState){const[t,i]=this._samplingState.onLinesDeleted(e);return t<=i&&this._actual.onLinesChanged(t+1,i+1),this._shouldCheckSampling=!0,!0}return this._actual.onLinesDeleted(e.fromLineNumber,e.toLineNumber)}onLinesInserted(e){return this._samplingState?(this._samplingState.onLinesInserted(e),this._shouldCheckSampling=!0,!0):this._actual.onLinesInserted(e.fromLineNumber,e.toLineNumber)}onScrollChanged(e){return this._actual.onScrollChanged()}onThemeChanged(e){return this._actual.onThemeChanged(),this._onOptionsMaybeChanged(),!0}onTokensChanged(e){if(this._samplingState){const t=[];for(const i of e.ranges){const e=this._samplingState.modelLineRangeToMinimapLineRange(i.fromLineNumber,i.toLineNumber);e&&t.push({fromLineNumber:e[0],toLineNumber:e[1]})}return!!t.length&&this._actual.onTokensChanged(t)}return this._actual.onTokensChanged(e.ranges)}onTokensColorsChanged(e){return this._onOptionsMaybeChanged(),this._actual.onTokensColorsChanged()}onZonesChanged(e){return this._actual.onZonesChanged()}prepareRender(e){this._shouldCheckSampling&&(this._shouldCheckSampling=!1,this._recreateLineSampling())}render(e){let t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber;this._samplingState&&(t=this._samplingState.modelLineToMinimapLine(t),i=this._samplingState.modelLineToMinimapLine(i));const n={viewportContainsWhitespaceGaps:e.viewportData.whitespaceViewportData.length>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]=xN.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(const e of i)switch(e.type){case"deleted":this._actual.onLinesDeleted(e.deleteFromLineNumber,e.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(e.insertFromLineNumber,e.insertToLineNumber);break;case"flush":this._actual.onFlushed()}}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,r=t-e+1;o<r;o++)i[o]?n[o]=this._context.viewModel.getViewLineData(this._samplingState.minimapLines[e+o-1]):n[o]=null;return n}return this._context.viewModel.getMinimapLinesRenderingData(e,t,i).data}getSelections(){if(null===this._minimapSelections)if(this._samplingState){this._minimapSelections=[];for(const e of this._selections){const[t,i]=this._samplingState.decorationLineRangeToMinimapLineRange(e.startLineNumber,e.endLineNumber);this._minimapSelections.push(new Xd(t,e.startColumn,i,e.endColumn))}}else this._minimapSelections=this._selections;return this._minimapSelections}getMinimapDecorationsInViewport(e,t){let i;if(this._samplingState){const n=this._samplingState.minimapLines[e-1],o=this._samplingState.minimapLines[t-1];i=new Zd(n,1,o,this._context.viewModel.getLineMaxColumn(o))}else i=new Zd(e,1,t,this._context.viewModel.getLineMaxColumn(t));const n=this._context.viewModel.getDecorationsInViewport(i);if(this._samplingState){const e=[];for(const t of n){if(!t.options.minimap)continue;const i=t.range,n=this._samplingState.modelLineToMinimapLine(i.startLineNumber),o=this._samplingState.modelLineToMinimapLine(i.endLineNumber);e.push(new S_(new Zd(n,i.startColumn,o,i.endColumn),t.options))}return e}return n}getOptions(){return this._context.viewModel.model.getOptions()}revealLineNumber(e){this._samplingState&&(e=this._samplingState.minimapLines[e-1]),this._context.viewModel.revealRange("mouse",!1,new Zd(e,1,e,1),1,0)}setScrollTop(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e},1)}}class EN extends Nc{constructor(e,t){super(),this._renderDecorations=!1,this._gestureInProgress=!1,this._theme=e,this._model=t,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(OS),this._domNode=yg(document.createElement("div")),hk.write(this._domNode,8),this._domNode.setClassName(this._getMinimapDomNodeClassName()),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._shadow=yg(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=yg(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=yg(document.createElement("canvas")),this._decorationsCanvas.setPosition("absolute"),this._decorationsCanvas.setClassName("minimap-decorations-layer"),this._decorationsCanvas.setLeft(0),this._domNode.appendChild(this._decorationsCanvas),this._slider=yg(document.createElement("div")),this._slider.setPosition("absolute"),this._slider.setClassName("minimap-slider"),this._slider.setLayerHinting(!0),this._slider.setContain("strict"),this._domNode.appendChild(this._slider),this._sliderHorizontal=yg(document.createElement("div")),this._sliderHorizontal.setPosition("absolute"),this._sliderHorizontal.setClassName("minimap-slider-horizontal"),this._slider.appendChild(this._sliderHorizontal),this._applyLayout(),this._mouseDownListener=mv(this._domNode.domNode,"mousedown",(e=>{if(e.preventDefault(),0===this._model.options.renderMinimap)return;if(!this._lastRenderData)return;if("proportional"!==this._model.options.size){if(e.leftButton&&this._lastRenderData){const t=Iv(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 ry,this._sliderMouseDownListener=mv(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=ny.addTarget(this._domNode.domNode),this._sliderTouchStartListener=pv(this._domNode.domNode,iy.Start,(e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(e))}),{passive:!1}),this._sliderTouchMoveListener=pv(this._domNode.domNode,iy.Change,(e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(e)}),{passive:!1}),this._sliderTouchEndListener=mv(this._domNode.domNode,iy.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 r=(e,n)=>{const r=Math.abs(n-t);if(Ra&&r>140)return void this._model.setScrollTop(o.scrollTop);const s=e-i;this._model.setScrollTop(o.getDesiredScrollTopFromDelta(s))};n!==i&&r(n,t),this._sliderMouseMoveMonitor.startMonitoring(this._slider.domNode,e,oy,(e=>r(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 kN(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(OS),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=yN.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(Zd.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,r=this._model.options.minimapLineHeight,s=this._model.options.minimapCharWidth,a=this._model.getOptions().tabSize,l=this._decorationsCanvas.domNode.getContext("2d");l.clearRect(0,0,n,o);const c=new NN(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(l,t,c,e,r),this._renderDecorationsLineHighlights(l,i,c,e,r);const d=new NN(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(l,t,d,e,r,a,s,n),this._renderDecorationsHighlights(l,i,d,e,r,a,s,n)}}_renderSelectionLineHighlights(e,t,i,n,o){if(!this._selectionColor||this._selectionColor.isTransparent())return;e.fillStyle=this._selectionColor.transparent(.5).toString();let r=0,s=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 c=(t-n.startLineNumber)*o,d=(l-n.startLineNumber)*o+o;s>=c||(s>r&&e.fillRect(8,r,e.canvas.width,s-r),r=c),s=d}s>r&&e.fillRect(8,r,e.canvas.width,s-r)}_renderDecorationsLineHighlights(e,t,i,n,o){const r=new Map;for(let s=t.length-1;s>=0;s--){const a=t[s],l=a.options.minimap;if(!l||l.position!==zg.Inline)continue;const c=Math.max(n.startLineNumber,a.range.startLineNumber),d=Math.min(n.endLineNumber,a.range.endLineNumber);if(c>d)continue;const h=l.getColor(this._theme.value);if(!h||h.isTransparent())continue;let u=r.get(h.toString());u||(u=h.transparent(.5).toString(),r.set(h.toString(),u)),e.fillStyle=u;for(let t=c;t<=d;t++){if(i.has(t))continue;i.set(t,!0);const r=(c-n.startLineNumber)*o;e.fillRect(8,r,e.canvas.width,o)}}}_renderSelectionsHighlights(e,t,i,n,o,r,s,a){if(this._selectionColor&&!this._selectionColor.isTransparent())for(const l of t){const t=Math.max(n.startLineNumber,l.startLineNumber),c=Math.min(n.endLineNumber,l.endLineNumber);if(!(t>c))for(let d=t;d<=c;d++)this.renderDecorationOnLine(e,i,l,this._selectionColor,n,d,o,o,r,s,a)}}_renderDecorationsHighlights(e,t,i,n,o,r,s,a){for(const l of t){const t=l.options.minimap;if(!t)continue;const c=Math.max(n.startLineNumber,l.range.startLineNumber),d=Math.min(n.endLineNumber,l.range.endLineNumber);if(c>d)continue;const h=t.getColor(this._theme.value);if(h&&!h.isTransparent())for(let u=c;u<=d;u++)switch(t.position){case zg.Inline:this.renderDecorationOnLine(e,i,l.range,h,n,u,o,o,r,s,a);continue;case zg.Gutter:{const t=(u-n.startLineNumber)*o,i=2;this.renderDecoration(e,h,i,t,2,o);continue}}}}renderDecorationOnLine(e,t,i,n,o,r,s,a,l,c,d){const h=(r-o.startLineNumber)*a;if(h+s<0||h>this._model.options.canvasInnerHeight)return;const{startLineNumber:u,endLineNumber:g}=i,p=u===r?i.startColumn:1,m=g===r?i.endColumn:this._model.getLineMaxColumn(r),f=this.getXOffsetForPosition(t,r,p,l,c,d),_=this.getXOffsetForPosition(t,r,m,l,c,d);this.renderDecoration(e,n,f,h,_-f,s)}getXOffsetForPosition(e,t,i,n,o,r){if(1===i)return 8;if((i-1)*o>=r)return r;let s=e.get(t);if(!s){const i=this._model.getLineContent(t);s=[8];let a=8;for(let e=1;e<i.length+1;e++){const t=i.charCodeAt(e-1),l=a+(9===t?n*o:Zu(t)?2*o:o);if(l>=r){s[e]=r;break}s[e]=l,a=l}e.set(t,s)}return i-1<s.length?s[i-1]:r}renderDecoration(e,t,i,n,o,r){e.fillStyle=t&&t.toString()||"",e.fillRect(i,n,o,r)}renderLines(e){const t=e.startLineNumber,i=e.endLineNumber,n=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){const t=this._lastRenderData._get();return new SN(e,t.imageData,t.lines)}const o=this._getBuffer();if(!o)return null;const[r,s,a]=EN._renderUntouchedLines(o,t,i,n,this._lastRenderData),l=this._model.getMinimapLinesRenderingData(t,i,a),c=this._model.getOptions().tabSize,d=this._model.options.defaultBackgroundColor,h=this._model.options.backgroundColor,u=this._model.options.foregroundAlpha,g=this._model.tokensColorTracker,p=g.backgroundIsLight(),m=this._model.options.renderMinimap,f=this._model.options.charRenderer(),_=this._model.options.fontScale,v=this._model.options.minimapCharWidth,b=(1===m?2:3)*_,w=n>b?Math.floor((n-b)/2):0,y=h.a/255,C=new uN(Math.round((h.r-d.r)*y+d.r),Math.round((h.g-d.g)*y+d.g),Math.round((h.b-d.b)*y+d.b),255);let S=0;const k=[];for(let e=0,r=i-t+1;e<r;e++)a[e]&&EN._renderLine(o,C,h.a,p,m,v,g,u,f,S,w,c,l[e],_,n),k[e]=new CN(S),S+=n;const x=-1===r?0:r,L=(-1===s?o.height:s)-x;return this._canvas.domNode.getContext("2d").putImageData(o,0,0,0,x,o.width,L),new SN(e,o,k)}static _renderUntouchedLines(e,t,i,n,o){const r=[];if(!o){for(let e=0,n=i-t+1;e<n;e++)r[e]=!0;return[-1,-1,r]}const s=o._get(),a=s.imageData.data,l=s.rendLineNumberStart,c=s.lines,d=c.length,h=e.width,u=e.data,g=(i-t+1)*n*h*4;let p=-1,m=-1,f=-1,_=-1,v=-1,b=-1,w=0;for(let e=t;e<=i;e++){const i=e-t,o=e-l,s=o>=0&&o<d?c[o].dy:-1;if(-1===s){r[i]=!0,w+=n;continue}const y=s*h*4,C=(s+n)*h*4,S=w*h*4,k=(w+n)*h*4;_===y&&b===S?(_=C,b=k):(-1!==f&&(u.set(a.subarray(f,_),v),-1===p&&0===f&&f===v&&(p=_),-1===m&&_===g&&f===v&&(m=f)),f=y,_=C,v=S,b=k),r[i]=!1,w+=n}return-1!==f&&(u.set(a.subarray(f,_),v),-1===p&&0===f&&f===v&&(p=_),-1===m&&_===g&&f===v&&(m=f)),[-1===p?-1:p/(4*h),-1===m?-1:m/(4*h),r]}static _renderLine(e,t,i,n,o,r,s,a,l,c,d,h,u,g,p){const m=u.content,f=u.tokens,_=e.width-r,v=1===p;let b=8,w=0,y=0;for(let u=0,p=f.getCount();u<p;u++){const p=f.getEndOffset(u),C=f.getForeground(u),S=s.getColor(C);for(;w<p;w++){if(b>_)return;const s=m.charCodeAt(w);if(9===s){const e=h-(w+y)%h;y+=e-1,b+=e*r}else if(32===s)b+=r;else{const h=Zu(s)?2:1;for(let u=0;u<h;u++)if(2===o?l.blockRenderChar(e,b,c+d,S,a,t,i,v):l.renderChar(e,b,c+d,s,S,a,t,i,g,n,v),b+=r,b>_)return}}}}}class NN{constructor(e,t,i){this._startLineNumber=e,this._endLineNumber=t,this._defaultValue=i,this._values=[];for(let e=0,t=this._endLineNumber-this._startLineNumber+1;e<t;e++)this._values[e]=i}has(e){return this.get(e)!==this._defaultValue}set(e,t){e<this._startLineNumber||e>this._endLineNumber||(this._values[e-this._startLineNumber]=t)}get(e){return e<this._startLineNumber||e>this._endLineNumber?this._defaultValue:this._values[e-this._startLineNumber]}}hw(((e,t)=>{const i=e.getColor(BS);i&&t.addRule(`.monaco-editor .minimap-slider .minimap-slider-horizontal { background: ${i}; }`);const n=e.getColor(WS);n&&t.addRule(`.monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: ${n}; }`);const o=e.getColor(VS);o&&t.addRule(`.monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: ${o}; }`);const r=e.getColor(Hy);r&&t.addRule(`.monaco-editor .minimap-shadow-visible { box-shadow: ${r} -6px 0 6px -6px inset; }`)}));var IN=i(9822),TN={};TN.styleTagTransform=uu(),TN.setAttributes=lu(),TN.insert=su().bind(null,"head"),TN.domAPI=ou(),TN.insertStyleElement=du(),iu()(IN.Z,TN),IN.Z&&IN.Z.locals&&IN.Z.locals;class DN extends dk{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=yg(document.createElement("div")),hk.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=yg(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 e=0,i=t.length;e<i;e++){const i=t[e];this._renderWidget(this._widgets[i])}}}class AN{constructor(e,t){const i=e.options;this.lineHeight=i.get(59),this.pixelRatio=i.get(129),this.overviewRulerLanes=i.get(74),this.renderBorder=i.get(73);const n=t.getColor(kx);this.borderColor=n?n.toString():null,this.hideCursor=i.get(52);const o=t.getColor(mx);this.cursorColor=o?o.transparent(.7).toString():null,this.themeType=t.type;const r=i.get(65),s=r.enabled,a=r.side,l=s?t.getColor(xx)||ph.getDefaultBackground():null;this.backgroundColor=null===l||"left"===a?null:dy.Format.CSS.formatHex(l);const c=i.get(131).overviewRuler;this.top=c.top,this.right=c.right,this.domWidth=c.width,this.domHeight=c.height,0===this.overviewRulerLanes?(this.canvasWidth=0,this.canvasHeight=0):(this.canvasWidth=this.domWidth*this.pixelRatio|0,this.canvasHeight=this.domHeight*this.pixelRatio|0);const[d,h]=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes);this.x=d,this.w=h}_initLanes(e,t,i){const n=t-e;if(i>=3){const t=Math.floor(n/3),i=Math.floor(n/3),o=n-t-i,r=e+t;return[[0,e,r,e,e+t+o,e,r,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 ON extends dk{constructor(e){super(e),this._domNode=yg(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=ph.onDidChange((e=>{e.changedColorMap&&this._updateSettings(!0)})),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){const t=new AN(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;t<i;t++)this._cursorPositions[t]=e.selections[t].getPosition();return this._cursorPositions.sort(Yd.compare),!0}onDecorationsChanged(e){return!!e.affectsOverviewRuler}onFlushed(e){return!0}onScrollChanged(e){return e.scrollHeightChanged}onZonesChanged(e){return!0}onThemeChanged(e){return this._updateSettings(!1)}getDomNode(){return this._domNode.domNode}prepareRender(e){}render(e){this._render()}_render(){if(0===this._settings.overviewRulerLanes)return this._domNode.setBackgroundColor(this._settings.backgroundColor?this._settings.backgroundColor:""),void this._domNode.setDisplay("none");this._domNode.setDisplay("block");const e=this._settings.canvasWidth,t=this._settings.canvasHeight,i=this._settings.lineHeight,n=this._context.viewLayout,o=t/this._context.viewLayout.getScrollHeight(),r=this._context.viewModel.getAllOverviewRulerDecorations(this._context.theme),s=6*this._settings.pixelRatio|0,a=s/2|0,l=this._domNode.domNode.getContext("2d");null===this._settings.backgroundColor?l.clearRect(0,0,e,t):(l.fillStyle=this._settings.backgroundColor,l.fillRect(0,0,e,t));const c=this._settings.x,d=this._settings.w;r.sort(k_.cmp);for(const e of r){const r=e.color,h=e.data;l.fillStyle=r;let u=0,g=0,p=0;for(let e=0,r=h.length/3;e<r;e++){const r=h[3*e],m=h[3*e+1],f=h[3*e+2];let _=n.getVerticalOffsetForLineNumber(m)*o|0,v=(n.getVerticalOffsetForLineNumber(f)+i)*o|0;if(v-_<s){let e=(_+v)/2|0;e<a?e=a:e+a>t&&(e=t-a),_=e-a,v=e+a}_>p+1||r!==u?(0!==e&&l.fillRect(c[u],g,d[u],p-g),u=r,g=_,p=v):v>p&&(p=v)}l.fillRect(c[u],g,d[u],p-g)}if(!this._settings.hideCursor&&this._settings.cursorColor){const e=2*this._settings.pixelRatio|0,i=e/2|0,r=this._settings.x[7],s=this._settings.w[7];l.fillStyle=this._settings.cursorColor;let a=-100,c=-100;for(let d=0,h=this._cursorPositions.length;d<h;d++){const h=this._cursorPositions[d];let u=n.getVerticalOffsetForLineNumber(h.lineNumber)*o|0;u<i?u=i:u+i>t&&(u=t-i);const g=u-i,p=g+e;g>c+1?(0!==d&&l.fillRect(r,a,s,c-a),a=g,c=p):p>c&&(c=p)}l.fillRect(r,a,s,c-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 MN{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 RN{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.color<t.color?-1:1}setColorZone(e){this._colorZone=e}getColorZones(){return this._colorZone}}class PN{constructor(e){this._getVerticalOffsetForLine=e,this._zones=[],this._colorZonesInvalid=!1,this._lineHeight=0,this._domWidth=0,this._domHeight=0,this._outerHeight=0,this._pixelRatio=1,this._lastAssignedId=0,this._color2Id=Object.create(null),this._id2Color=[]}getId2Color(){return this._id2Color}setZones(e){this._zones=e,this._zones.sort(RN.compare)}setLineHeight(e){return this._lineHeight!==e&&(this._lineHeight=e,this._colorZonesInvalid=!0,!0)}setPixelRatio(e){this._pixelRatio=e,this._colorZonesInvalid=!0}getDOMWidth(){return this._domWidth}getCanvasWidth(){return this._domWidth*this._pixelRatio}setDOMWidth(e){return this._domWidth!==e&&(this._domWidth=e,this._colorZonesInvalid=!0,!0)}getDOMHeight(){return this._domHeight}getCanvasHeight(){return this._domHeight*this._pixelRatio}setDOMHeight(e){return this._domHeight!==e&&(this._domHeight=e,this._colorZonesInvalid=!0,!0)}getOuterHeight(){return this._outerHeight}setOuterHeight(e){return this._outerHeight!==e&&(this._outerHeight=e,this._colorZonesInvalid=!0,!0)}resolveColorZones(){const e=this._colorZonesInvalid,t=Math.floor(this._lineHeight),i=Math.floor(this.getCanvasHeight()),n=i/Math.floor(this._outerHeight),o=Math.floor(4*this._pixelRatio/2),r=[];for(let s=0,a=this._zones.length;s<a;s++){const a=this._zones[s];if(!e){const e=a.getColorZones();if(e){r.push(e);continue}}const l=this._getVerticalOffsetForLine(a.startLineNumber),c=0===a.heightInLines?this._getVerticalOffsetForLine(a.endLineNumber)+t:l+a.heightInLines*t,d=Math.floor(n*l),h=Math.floor(n*c);let u=Math.floor((d+h)/2),g=h-u;g<o&&(g=o),u-g<0&&(u=g),u+g>i&&(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 MN(u-g,u+g,m);a.setColorZone(f),r.push(f)}return this._colorZonesInvalid=!1,r.sort(MN.compare),r}}class FN extends ck{constructor(e,t){super(),this._context=e;const i=this._context.configuration.options;this._domNode=yg(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new PN((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,r=0,s=0;for(const a of t){const t=a.colorId,l=a.from,c=a.to;t!==o?(e.fillRect(0,r,n,s-r),o=t,e.fillStyle=i[o],r=l,s=c):s>=l?s=Math.max(s,c):(e.fillRect(0,r,n,s-r),r=l,s=c)}e.fillRect(0,r,n,s-r)}}var BN=i(9443),WN={};WN.styleTagTransform=uu(),WN.setAttributes=lu(),WN.insert=su().bind(null,"head"),WN.domAPI=ou(),WN.insertStyleElement=du(),iu()(BN.Z,WN),BN.Z&&BN.Z.locals&&BN.Z.locals;class VN extends dk{constructor(e){super(e),this.domNode=yg(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(e<t){const{tabSize:i}=this._context.viewModel.model.getOptions(),n=i;let o=t-e;for(;o>0;){const e=yg(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<i;t++){const i=this._renderedRulers[t],n=this._rulers[t];i.setBoxShadow(n.color?`1px 0 0 0 ${n.color} inset`:""),i.setHeight(Math.min(e.scrollHeight,1e6)),i.setLeft(n.column*this._typicalHalfwidthCharacterWidth)}}}hw(((e,t)=>{const i=e.getColor(Sx);i&&t.addRule(`.monaco-editor .view-ruler { box-shadow: 1px 0 0 0 ${i} inset; }`)}));var zN=i(9649),jN={};jN.styleTagTransform=uu(),jN.setAttributes=lu(),jN.insert=su().bind(null,"head"),jN.domAPI=ou(),jN.insertStyleElement=du(),iu()(zN.Z,jN),zN.Z&&zN.Z.locals&&zN.Z.locals;class HN extends dk{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=yg(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":"")}}hw(((e,t)=>{const i=e.getColor(Hy);i&&t.addRule(`.monaco-editor .scroll-decoration { box-shadow: ${i} 0 6px 6px -6px inset; }`)}));var UN=i(2595),$N={};$N.styleTagTransform=uu(),$N.setAttributes=lu(),$N.insert=su().bind(null,"head"),$N.domAPI=ou(),$N.insertStyleElement=du(),iu()(UN.Z,$N),UN.Z&&UN.Z.locals&&UN.Z.locals;class KN{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class qN{constructor(e,t){this.lineNumber=e,this.ranges=t}}function GN(e){return new KN(e)}function YN(e){return new qN(e.lineNumber,e.ranges.map(GN))}class ZN extends lx{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;t<i;t++)if(e[t].ranges.length>1)return!0;return!1}_enrichVisibleRangesWithStyle(e,t,i){const n=this._typicalHalfwidthCharacterWidth/4;let o=null,r=null;if(i&&i.length>0&&t.length>0){const n=t[0].lineNumber;if(n===e.startLineNumber)for(let e=0;!o&&e<i.length;e++)i[e].lineNumber===n&&(o=i[e].ranges[0]);const s=t[t.length-1].lineNumber;if(s===e.endLineNumber)for(let e=i.length-1;!r&&e>=0;e--)i[e].lineNumber===s&&(r=i[e].ranges[0]);o&&!o.startStyle&&(o=null),r&&!r.startStyle&&(r=null)}for(let e=0,i=t.length;e<i;e++){const s=t[e].ranges[0],a=s.left,l=s.left+s.width,c={top:0,bottom:0},d={top:0,bottom:0};if(e>0){const i=t[e-1].ranges[0].left,o=t[e-1].ranges[0].left+t[e-1].ranges[0].width;XN(a-i)<n?c.top=2:a>i&&(c.top=1),XN(l-o)<n?d.top=2:i<l&&l<o&&(d.top=1)}else o&&(c.top=o.startStyle.top,d.top=o.endStyle.top);if(e+1<i){const i=t[e+1].ranges[0].left,o=t[e+1].ranges[0].left+t[e+1].ranges[0].width;XN(a-i)<n?c.bottom=2:i<a&&a<o&&(c.bottom=1),XN(l-o)<n?d.bottom=2:l<o&&(d.bottom=1)}else r&&(c.bottom=r.startStyle.bottom,d.bottom=r.endStyle.bottom);s.startStyle=c,s.endStyle=d}}_getVisibleRangesWithStyle(e,t,i){const n=(t.linesVisibleRangesForRange(e,!0)||[]).map(YN);return!this._visibleRangesHaveGaps(n)&&this._roundedSelection&&this._enrichVisibleRangesWithStyle(t.visibleRange,n,i),n}_createSelectionPiece(e,t,i,n,o){return'<div class="cslr '+i+'" style="top:'+e.toString()+"px;left:"+n.toString()+"px;width:"+o.toString()+"px;height:"+t+'px;"></div>'}_actualRenderOneSelection(e,t,i,n){if(0===n.length)return;const o=!!n[0].ranges[0].startStyle,r=this._lineHeight.toString(),s=(this._lineHeight-1).toString(),a=n[0].lineNumber,l=n[n.length-1].lineNumber;for(let c=0,d=n.length;c<d;c++){const d=n[c],h=d.lineNumber,u=h-t,g=!i||h!==l&&h!==a?r:s,p=i&&h===a?1:0;let m="",f="";for(let e=0,t=d.ranges.length;e<t;e++){const t=d.ranges[e];if(o){const e=t.startStyle,i=t.endStyle;if(1===e.top||1===e.bottom){m+=this._createSelectionPiece(p,g,ZN.SELECTION_CLASS_NAME,t.left-ZN.ROUNDED_PIECE_WIDTH,ZN.ROUNDED_PIECE_WIDTH);let i=ZN.EDITOR_BACKGROUND_CLASS_NAME;1===e.top&&(i+=" "+ZN.SELECTION_TOP_RIGHT),1===e.bottom&&(i+=" "+ZN.SELECTION_BOTTOM_RIGHT),m+=this._createSelectionPiece(p,g,i,t.left-ZN.ROUNDED_PIECE_WIDTH,ZN.ROUNDED_PIECE_WIDTH)}if(1===i.top||1===i.bottom){m+=this._createSelectionPiece(p,g,ZN.SELECTION_CLASS_NAME,t.left+t.width,ZN.ROUNDED_PIECE_WIDTH);let e=ZN.EDITOR_BACKGROUND_CLASS_NAME;1===i.top&&(e+=" "+ZN.SELECTION_TOP_LEFT),1===i.bottom&&(e+=" "+ZN.SELECTION_BOTTOM_LEFT),m+=this._createSelectionPiece(p,g,e,t.left+t.width,ZN.ROUNDED_PIECE_WIDTH)}}let i=ZN.SELECTION_CLASS_NAME;if(o){const e=t.startStyle,n=t.endStyle;0===e.top&&(i+=" "+ZN.SELECTION_TOP_LEFT),0===e.bottom&&(i+=" "+ZN.SELECTION_BOTTOM_LEFT),0===n.top&&(i+=" "+ZN.SELECTION_TOP_RIGHT),0===n.bottom&&(i+=" "+ZN.SELECTION_BOTTOM_RIGHT)}f+=this._createSelectionPiece(p,g,i,t.left,t.width)}e[u][0]+=m,e[u][1]+=f}}prepareRender(e){const t=[],i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber;for(let e=i;e<=n;e++)t[e-i]=["",""];const o=[];for(let n=0,r=this._selections.length;n<r;n++){const r=this._selections[n];if(r.isEmpty()){o[n]=null;continue}const s=this._getVisibleRangesWithStyle(r,e,this._previousFrameVisibleRangesWithStyle[n]);o[n]=s,this._actualRenderOneSelection(t,i,this._selections.length>1,s)}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 XN(e){return e<0?-e:e}ZN.SELECTION_CLASS_NAME="selected-text",ZN.SELECTION_TOP_LEFT="top-left-radius",ZN.SELECTION_BOTTOM_LEFT="bottom-left-radius",ZN.SELECTION_TOP_RIGHT="top-right-radius",ZN.SELECTION_BOTTOM_RIGHT="bottom-right-radius",ZN.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",ZN.ROUNDED_PIECE_WIDTH=10,hw(((e,t)=>{const i=e.getColor(bC);i&&t.addRule(`.monaco-editor .focused .selected-text { background-color: ${i}; }`);const n=e.getColor(yC);n&&t.addRule(`.monaco-editor .selected-text { background-color: ${n}; }`);const o=e.getColor(wC);o&&!o.isTransparent()&&t.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${o}; }`)}));var JN=i(4057),QN={};QN.styleTagTransform=uu(),QN.setAttributes=lu(),QN.insert=su().bind(null,"head"),QN.domAPI=ou(),QN.insertStyleElement=du(),iu()(JN.Z,QN),JN.Z&&JN.Z.locals&&JN.Z.locals;class eI{constructor(e,t,i,n,o,r){this.top=e,this.left=t,this.width=i,this.height=n,this.textContent=o,this.textContentClassName=r}}class tI{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=yg(document.createElement("div")),this._domNode.setClassName("cursor monaco-mouse-cursor-text"),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),Cg(this._domNode,i),this._domNode.setDisplay("none"),this._position=new Yd(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),Cg(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]=function(e,t){t>0&&Fu(e.charCodeAt(t))&&t--;const i=t+ju(e,t);return[i-Hu(e,i),i]}(i,t-1);return[new Yd(e,n+1),i.substring(n,o)]}_prepareRender(e){let t="";const[i,n]=this._getGraphemeAwarePosition();if(this._cursorStyle===ec.Line||this._cursorStyle===ec.LineThin){const o=e.visibleRangeForPosition(i);if(!o||o.outsideRenderedLine)return null;let r;this._cursorStyle===ec.Line?(r=ob(this._lineCursorWidth>0?this._lineCursorWidth:2),r>2&&(t=n)):r=ob(1);let s=o.left;r>=2&&s>=1&&(s-=1);const a=e.getVerticalOffsetForLineNumber(i.lineNumber)-e.bigNumbersDelta;return new eI(a,s,r,this._lineHeight,t,"")}const o=e.linesVisibleRangesForRange(new Zd(i.lineNumber,i.column,i.lineNumber,i.column+n.length),!1);if(!o||0===o.length)return null;const r=o[0];if(r.outsideRenderedLine||0===r.ranges.length)return null;const s=r.ranges[0],a=s.width<1?this._typicalHalfwidthCharacterWidth:s.width;let l="";if(this._cursorStyle===ec.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 c=e.getVerticalOffsetForLineNumber(i.lineNumber)-e.bigNumbersDelta,d=this._lineHeight;return this._cursorStyle!==ec.Underline&&this._cursorStyle!==ec.UnderlineThin||(c+=this._lineHeight-2,d=2),new eI(c,s.left,a,d,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 iI extends dk{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 tI(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=yg(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 _m,this._cursorFlatBlinkInterval=new vm,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 t=0,i=this._secondaryCursors.length;t<i;t++)this._secondaryCursors[t].onConfigurationChanged(e);return!0}_onCursorPositionChanged(e,t){if(this._primaryCursor.onCursorPositionChanged(e),this._updateBlinking(),this._secondaryCursors.length<t.length){const e=t.length-this._secondaryCursors.length;for(let t=0;t<e;t++){const e=new tI(this._context);this._domNode.domNode.insertBefore(e.getDomNode().domNode,this._primaryCursor.getDomNode().domNode.nextSibling),this._secondaryCursors.push(e)}}else if(this._secondaryCursors.length>t.length){const e=this._secondaryCursors.length-t.length;for(let t=0;t<e;t++)this._domNode.removeChild(this._secondaryCursors[0].getDomNode()),this._secondaryCursors.splice(0,1)}for(let e=0;e<t.length;e++)this._secondaryCursors[e].onCursorPositionChanged(t[e])}onCursorStateChanged(e){const t=[];for(let i=0,n=e.selections.length;i<n;i++)t[i]=e.selections[i].getPosition();this._onCursorPositionChanged(t[0],t.slice(1));const i=e.selections[0].isEmpty();return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,this._updateDomClassName()),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onFocusChanged(e){return this._editorHasFocus=e.isFocused,this._updateBlinking(),!1}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return!0}onTokensChanged(e){const t=t=>{for(let i=0,n=e.ranges.length;i<n;i++)if(e.ranges[i].fromLineNumber<=t.lineNumber&&t.lineNumber<=e.ranges[i].toLineNumber)return!0;return!1};if(t(this._primaryCursor.getPosition()))return!0;for(const e of this._secondaryCursors)if(t(e.getPosition()))return!0;return!1}onZonesChanged(e){return!0}_getCursorBlinking(){return this._isComposingInput?0:this._editorHasFocus?this._readOnly?5:this._cursorBlinking:0}_updateBlinking(){this._startCursorBlinkAnimation.cancel(),this._cursorFlatBlinkInterval.cancel();const e=this._getCursorBlinking(),t=0===e,i=5===e;t?this._hide():this._show(),this._blinkingEnabled=!1,this._updateDomClassName(),t||i||(1===e?this._cursorFlatBlinkInterval.cancelAndSet((()=>{this._isVisible?this._hide():this._show()}),iI.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet((()=>{this._blinkingEnabled=!0,this._updateDomClassName()}),iI.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case ec.Line:e+=" cursor-line-style";break;case ec.Block:e+=" cursor-block-style";break;case ec.Underline:e+=" cursor-underline-style";break;case ec.LineThin:e+=" cursor-line-thin-style";break;case ec.BlockOutline:e+=" cursor-block-outline-style";break;case ec.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;case 5:e+=" cursor-solid";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return this._cursorSmoothCaretAnimation&&(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e<t;e++)this._secondaryCursors[e].show();this._isVisible=!0}_hide(){this._primaryCursor.hide();for(let e=0,t=this._secondaryCursors.length;e<t;e++)this._secondaryCursors[e].hide();this._isVisible=!1}prepareRender(e){this._primaryCursor.prepareRender(e);for(let t=0,i=this._secondaryCursors.length;t<i;t++)this._secondaryCursors[t].prepareRender(e)}render(e){const t=[];let i=0;const n=this._primaryCursor.render(e);n&&(t[i++]=n);for(let n=0,o=this._secondaryCursors.length;n<o;n++){const o=this._secondaryCursors[n].render(e);o&&(t[i++]=o)}this._renderData=t}getLastRenderData(){return this._renderData}}iI.BLINK_INTERVAL=500,hw(((e,t)=>{const i=e.getColor(mx);if(i){let n=e.getColor(fx);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 nI=()=>{throw new Error("Invalid change accessor")};class oI extends dk{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=yg(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=yg(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){const e=this._context.viewLayout.getWhitespaces(),t=new Map;for(const i of e)t.set(i.id,i);let i=!1;return this._context.viewModel.changeWhitespace((e=>{const n=Object.keys(this._zones);for(let o=0,r=n.length;o<r;o++){const r=n[o],s=this._zones[r],a=this._computeWhitespaceProps(s.delegate);s.isInHiddenArea=a.isInHiddenArea;const l=t.get(r);!l||l.afterLineNumber===a.afterViewLineNumber&&l.height===a.heightInPx||(e.changeOneWhitespace(r,a.afterViewLineNumber,a.heightInPx),this._safeCallOnComputedHeight(s.delegate,a.heightInPx),i=!0)}})),i}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(131);return this._lineHeight=t.get(59),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,e.hasChanged(59)&&this._recomputeWhitespacesProps(),!0}onLineMappingChanged(e){return this._recomputeWhitespacesProps()}onLinesDeleted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}onLinesInserted(e){return!0}_getZoneOrdinal(e){return void 0!==e.afterColumn?e.afterColumn:1e4}_computeWhitespaceProps(e){if(0===e.afterLineNumber)return{isInHiddenArea:!1,afterViewLineNumber:0,heightInPx:this._heightInPixels(e),minWidthInPx:this._minWidthInPixels(e)};let t,i;if(void 0!==e.afterColumn)t=this._context.viewModel.model.validatePosition({lineNumber:e.afterLineNumber,column:e.afterColumn});else{const i=this._context.viewModel.model.validatePosition({lineNumber:e.afterLineNumber,column:1}).lineNumber;t=new Yd(i,this._context.viewModel.model.getLineMaxColumn(i))}i=t.column===this._context.viewModel.model.getLineMaxColumn(t.lineNumber)?this._context.viewModel.model.validatePosition({lineNumber:t.lineNumber+1,column:1}):this._context.viewModel.model.validatePosition({lineNumber:t.lineNumber,column:t.column+1});const n=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(t,e.afterColumnAffinity),o=this._context.viewModel.coordinatesConverter.modelPositionIsVisible(i);return{isInHiddenArea:!o,afterViewLineNumber:n.lineNumber,heightInPx:o?this._heightInPixels(e):0,minWidthInPx:this._minWidthInPixels(e)}}changeViewZones(e){let t=!1;return this._context.viewModel.changeWhitespace((i=>{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(e){gc(e)}}(e,n),n.addZone=nI,n.removeZone=nI,n.layoutZone=nI})),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:yg(t.domNode),marginDomNode:t.marginDomNode?yg(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(e){gc(e)}}_safeCallOnDomNodeTop(e,t){if("function"==typeof e.onDomNodeTop)try{e.onDomNodeTop(t)}catch(e){gc(e)}}prepareRender(e){}render(e){const t=e.viewportData.whitespaceViewportData,i={};let n=!1;for(const e of t)this._zones[e.id].isInHiddenArea||(i[e.id]=e,n=!0);const o=Object.keys(this._zones);for(let t=0,n=o.length;t<n;t++){const n=o[t],r=this._zones[n];let s=0,a=0,l="none";i.hasOwnProperty(n)?(s=i[n].verticalOffset-e.bigNumbersDelta,a=i[n].height,l="block",r.isVisible||(r.domNode.setAttribute("monaco-visible-view-zone","true"),r.isVisible=!0),this._safeCallOnDomNodeTop(r.delegate,e.getScrolledTopFromAbsoluteTop(i[n].verticalOffset))):(r.isVisible&&(r.domNode.removeAttribute("monaco-visible-view-zone"),r.isVisible=!1),this._safeCallOnDomNodeTop(r.delegate,e.getScrolledTopFromAbsoluteTop(-1e6))),r.domNode.setTop(s),r.domNode.setHeight(a),r.domNode.setDisplay(l),r.marginDomNode&&(r.marginDomNode.setTop(s),r.marginDomNode.setHeight(a),r.marginDomNode.setDisplay(l))}n&&(this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth)),this.marginDomNode.setWidth(this._contentLeft))}}class rI{constructor(e){this._theme=e}get type(){return this._theme.type}get value(){return this._theme}update(e){this._theme=e}getColor(e){return this._theme.getColor(e)}}class sI{constructor(e,t,i){this.configuration=e,this.theme=new rI(t),this.viewModel=i,this.viewLayout=i.viewLayout}addEventHandler(e){this.viewModel.addViewEventHandler(e)}removeEventHandler(e){this.viewModel.removeViewEventHandler(e)}}class aI{constructor(e,t,i,n){this.selections=e,this.startLineNumber=0|t.startLineNumber,this.endLineNumber=0|t.endLineNumber,this.relativeVerticalOffset=t.relativeVerticalOffset,this.bigNumbersDelta=0|t.bigNumbersDelta,this.whitespaceViewportData=i,this._model=n,this.visibleRange=new Zd(t.startLineNumber,this._model.getLineMinColumn(t.startLineNumber),t.endLineNumber,this._model.getLineMaxColumn(t.endLineNumber))}getViewLineRenderingData(e){return this._model.getViewLineRenderingData(this.visibleRange,e)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}class lI extends ck{constructor(e,t,i,n,o,r){super(),this._selections=[new Xd(1,1,1,1)],this._renderAnimationFrame=null;const s=new ZL(t,n,o,e);this._context=new sI(t,i,n),this._context.addEventHandler(this),this._viewParts=[],this._textAreaHandler=new oL(this._context,s,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=yg(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=yg(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=yg(document.createElement("div")),hk.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new FE(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new nN(this._context,this._linesContent),this._viewZones=new oI(this._context),this._viewParts.push(this._viewZones);const a=new ON(this._context);this._viewParts.push(a);const l=new HN(this._context);this._viewParts.push(l);const c=new nE(this._context);this._viewParts.push(c),c.addDynamicOverlay(new uE(this._context)),c.addDynamicOverlay(new ZN(this._context)),c.addDynamicOverlay(new ZE(this._context)),c.addDynamicOverlay(new fE(this._context));const d=new oE(this._context);this._viewParts.push(d),d.addDynamicOverlay(new gE(this._context)),d.addDynamicOverlay(new jE(this._context)),d.addDynamicOverlay(new cN(this._context)),d.addDynamicOverlay(new sN(this._context)),d.addDynamicOverlay(new Jx(this._context));const h=new Qx(this._context);h.getDomNode().appendChild(this._viewZones.marginDomNode),h.getDomNode().appendChild(d.getDomNode()),this._viewParts.push(h),this._contentWidgets=new sE(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new iI(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new DN(this._context),this._viewParts.push(this._overlayWidgets);const u=new VN(this._context);this._viewParts.push(u);const g=new LN(this._context);if(this._viewParts.push(g),a){const e=this._scrollbar.getOverviewRulerLayoutInfo();e.parent.insertBefore(a.getDomNode(),e.insertBefore)}this._linesContent.appendChild(c.getDomNode()),this._linesContent.appendChild(u.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(h.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(l.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(g.getDomNode()),this.domNode.appendChild(this._overflowGuardContainer),r?r.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode):this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this._applyLayout(),this._pointerHandler=this._register(new nx(this._context,s,this._createPointerHandlerHelper()))}_flushAccumulatedAndRenderNow(){this._renderNow()}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:e=>{this._textAreaHandler.textArea.domNode.dispatchEvent(e)},getLastRenderData:()=>{const e=this._viewCursors.getLastRenderData()||[],t=this._textAreaHandler.getLastRenderData();return new Ok(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 Yd(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)+" "+lw(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=vv(this._onRenderScheduled.bind(this),100))}_onRenderScheduled(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()}_renderNow(){!function(e){try{e()}catch(e){gc(e)}}((()=>this._actualRender()))}_getViewPartsToRender(){const e=[];let t=0;for(const i of this._viewParts)i.shouldRender()&&(e[t++]=i);return e}_actualRender(){if(!uv(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 aI(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 uk(this._context.viewLayout,i,this._viewLines);for(const t of e)t.prepareRender(n);for(const t of e)t.render(n),t.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 Yd(n.lineNumber,n.column));return o?o.left:-1}getTargetAtClientPoint(e,t){const i=this._pointerHandler.getTargetAtClientPoint(e,t);return i?XL.convertViewToModelMouseTarget(i,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(e){return new FN(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 Zd(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 cI{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new gL(new Zd(1,1,1,1),0,new Yd(1,1),0),new gL(new Zd(1,1,1,1),0,new Yd(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 dL(this.modelState,this.viewState)}readSelectionFromMarkers(e){const t=e.model._getTrackedRange(this._selTrackedRange);return Xd.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(),r=e.normalizePosition(i,2),s=this._validatePositionWithCache(e,n,i,r),a=this._validatePositionWithCache(e,o,n,s);return i.equals(r)&&n.equals(s)&&o.equals(a)?t:new gL(Zd.fromPositions(s,a),t.selectionStartLeftoverVisibleColumns+n.column-s.column,r,t.leftoverVisibleColumns+i.column-r.column)}_setState(e,t,i){if(i&&(i=cI._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),r=t.position.equals(o)?t.leftoverVisibleColumns:0;t=new gL(i,n,o,r)}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 gL(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 gL(n,t.selectionStartLeftoverVisibleColumns,o,t.leftoverVisibleColumns)}else{const n=e.coordinatesConverter.convertModelPositionToViewPosition(new Yd(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),o=e.coordinatesConverter.convertModelPositionToViewPosition(new Yd(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),r=new Zd(n.lineNumber,n.column,o.lineNumber,o.column),s=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);i=new gL(r,t.selectionStartLeftoverVisibleColumns,s,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=i,this._updateTrackedRange(e)}}class dI{constructor(e){this.context=e,this.cursors=[new cI(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(e=this.cursors,t=fl((e=>e.viewState.position),Yd.compare),function(e,t){if(0===e.length)return;let i=e[0];for(let n=1;n<e.length;n++){const o=e[n];t(o,i)>0&&(i=o)}return i}(e,((e,i)=>-t(e,i)))).viewState.position;var e,t}getBottomMostViewPosition(){return function(e,t){if(0===e.length)return;let i=e[0];for(let n=1;n<e.length;n++){const o=e[n];t(o,i)>=0&&(i=o)}return i}(this.cursors,fl((e=>e.viewState.position),Yd.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(dL.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(t<i){const e=i-t;for(let t=0;t<e;t++)this._addSecondaryCursor()}else if(t>i){const e=t-i;for(let t=0;t<e;t++)this._removeSecondaryCursor(this.cursors.length-2)}for(let t=0;t<i;t++)this.cursors[t+1].setState(this.context,e[t].modelState,e[t].viewState)}killSecondaryCursors(){this._setSecondaryStates([])}_addSecondaryCursor(){this.cursors.push(new cI(this.context)),this.lastAddedCursorIndex=this.cursors.length-1}getLastAddedCursorIndex(){return 1===this.cursors.length||0===this.lastAddedCursorIndex?0:this.lastAddedCursorIndex}_removeSecondaryCursor(e){this.lastAddedCursorIndex>=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;i<n;i++)t.push({index:i,selection:e[i].modelState.selection});t.sort(fl((e=>e.selection),Zd.compareRangesUsingStarts));for(let i=0;i<t.length-1;i++){const n=t[i],o=t[i+1],r=n.selection,s=o.selection;if(!this.context.cursorConfig.multiCursorMergeOverlapping)continue;let a;if(a=s.isEmpty()||r.isEmpty()?s.getStartPosition().isBeforeOrEqual(r.getEndPosition()):s.getStartPosition().isBefore(r.getEndPosition()),a){const r=n.index<o.index?i:i+1,s=n.index<o.index?i+1:i,a=t[s].index,l=t[r].index,c=t[s].selection,d=t[r].selection;if(!c.equalsSelection(d)){const i=c.plusRange(d),n=c.selectionStartLineNumber===c.startLineNumber&&c.selectionStartColumn===c.startColumn,o=d.selectionStartLineNumber===d.startLineNumber&&d.selectionStartColumn===d.startColumn;let s,h;a===this.lastAddedCursorIndex?(s=n,this.lastAddedCursorIndex=l):s=o,h=s?new Xd(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn):new Xd(i.endLineNumber,i.endColumn,i.startLineNumber,i.startColumn),t[r].selection=h;const u=dL.fromModelSelection(h);e[l].setState(this.context,u.modelState,u.viewState)}for(const e of t)e.index>a&&e.index--;e.splice(a,1),t.splice(s,1),this._removeSecondaryCursor(a-1),i--}}}}class hI{constructor(e,t,i,n){this._cursorContextBrand=void 0,this.model=e,this.viewModel=t,this.coordinatesConverter=i,this.cursorConfig=n}}class uI{constructor(){this.changeType=1}}class gI{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 gI(i.ownerId,i.range.startLineNumber,i.range.startColumn,i.options.before,0)),i.options.after&&i.options.after.content.length>0&&t.push(new gI(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 pI{constructor(e,t,i){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=i}}class mI{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class fI{constructor(e,t,i,n){this.changeType=4,this.injectedTexts=n,this.fromLineNumber=e,this.toLineNumber=t,this.detail=i}}class _I{constructor(){this.changeType=5}}class vI{constructor(e,t,i,n){this.changes=e,this.versionId=t,this.isUndoing=i,this.isRedoing=n,this.resultingSelection=null}containsEvent(e){for(let t=0,i=this.changes.length;t<i;t++)if(this.changes[t].changeType===e)return!0;return!1}static merge(e,t){const i=[].concat(e.changes).concat(t.changes),n=t.versionId,o=e.isUndoing||t.isUndoing,r=e.isRedoing||t.isRedoing;return new vI(i,n,o,r)}}class bI{constructor(e){this.changes=e}}class wI{constructor(e,t){this.rawContentChangedEvent=e,this.contentChangedEvent=t}merge(e){const t=vI.merge(this.rawContentChangedEvent,e.rawContentChangedEvent),i=wI._mergeChangeEvents(this.contentChangedEvent,e.contentChangedEvent);return new wI(t,i)}static _mergeChangeEvents(e,t){return{changes:[].concat(e.changes).concat(t.changes),eol:t.eol,versionId:t.versionId,isUndoing:e.isUndoing||t.isUndoing,isRedoing:e.isRedoing||t.isRedoing,isFlush:e.isFlush||t.isFlush}}}class yI{constructor(){this.type=0}}class CI{constructor(){this.type=1}}class SI{constructor(e){this.type=2,this._source=e}hasChanged(e){return this._source.hasChanged(e)}}class kI{constructor(e,t){this.type=3,this.selections=e,this.modelSelections=t}}class xI{constructor(e){this.type=4,e?(this.affectsMinimap=e.affectsMinimap,this.affectsOverviewRuler=e.affectsOverviewRuler):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0)}}class LI{constructor(){this.type=5}}class EI{constructor(e){this.type=6,this.isFocused=e}}class NI{constructor(){this.type=7}}class II{constructor(){this.type=8}}class TI{constructor(e,t){this.type=9,this.fromLineNumber=e,this.toLineNumber=t}}class DI{constructor(e,t){this.type=10,this.fromLineNumber=e,this.toLineNumber=t}}class AI{constructor(e,t){this.type=11,this.fromLineNumber=e,this.toLineNumber=t}}class OI{constructor(e,t,i,n,o,r,s){this.source=e,this.minimalReveal=t,this.range=i,this.selections=n,this.verticalType=o,this.revealHorizontal=r,this.scrollType=s,this.type=12}}class MI{constructor(e){this.type=13,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged}}class RI{constructor(e){this.theme=e,this.type=14}}class PI{constructor(e){this.type=15,this.ranges=e}}class FI{constructor(){this.type=16}}class BI{constructor(){this.type=17}}class WI extends Nc{constructor(){super(),this._onEvent=this._register(new Vc),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(e){this._addOutgoingEvent(e),this._emitOutgoingEvents()}_addOutgoingEvent(e){for(let t=0,i=this._outgoingEvents.length;t<i;t++)if(this._outgoingEvents[t].kind===e.kind)return void(this._outgoingEvents[t]=this._outgoingEvents[t].merge(e));this._outgoingEvents.push(e)}_emitOutgoingEvents(){for(;this._outgoingEvents.length>0;){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;t<i;t++)this._eventHandlers[t]===e&&console.warn("Detected duplicate listener in ViewEventDispatcher",e);this._eventHandlers.push(e)}removeViewEventHandler(e){for(let t=0;t<this._eventHandlers.length;t++)if(this._eventHandlers[t]===e){this._eventHandlers.splice(t,1);break}}beginEmitViewEvents(){return this._collectorCnt++,1===this._collectorCnt&&(this._collector=new VI),this._collector}endEmitViewEvents(){if(this._collectorCnt--,0===this._collectorCnt){const e=this._collector.outgoingEvents,t=this._collector.viewEvents;this._collector=null;for(const t of e)this._addOutgoingEvent(t);t.length>0&&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 VI{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}class zI{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 zI(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}class jI{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 jI(this.oldHasFocus,e.hasFocus)}}class HI{constructor(e,t,i,n,o,r,s,a){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=i,this._oldScrollTop=n,this.scrollWidth=o,this.scrollLeft=r,this.scrollHeight=s,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 HI(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}class UI{constructor(){this.kind=3}isNoOp(){return!1}merge(e){return this}}class $I{constructor(e,t,i,n,o,r,s){this.kind=6,this.oldSelections=e,this.selections=t,this.oldModelVersionId=i,this.modelVersionId=n,this.source=o,this.reason=r,this.reachedMaxCursorCount=s}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;n<i;n++)if(!e[n].equalsSelection(t[n]))return!1;return!0}isNoOp(){return $I._selectionsAreEqual(this.oldSelections,this.selections)&&this.oldModelVersionId===this.modelVersionId}merge(e){return 6!==e.kind?this:new $I(this.oldSelections,e.selections,this.oldModelVersionId,e.modelVersionId,e.source,e.reason,this.reachedMaxCursorCount||e.reachedMaxCursorCount)}}class KI{constructor(){this.kind=5}isNoOp(){return!1}merge(e){return this}}class qI extends Nc{constructor(e,t,i,n){super(),this._model=e,this._knownModelVersionId=this._model.getVersionId(),this._viewModel=t,this._coordinatesConverter=i,this.context=new hI(this._model,this._viewModel,this._coordinatesConverter,n),this._cursors=new dI(this.context),this._hasFocus=!1,this._isHandling=!1,this._isDoingComposition=!1,this._selectionsWhenCompositionStarted=null,this._columnSelectData=null,this._autoClosedActions=[],this._prevEditOperationType=0}dispose(){this._cursors.dispose(),this._autoClosedActions=kc(this._autoClosedActions),super.dispose()}updateConfiguration(e){this.context=new hI(this._model,this._viewModel,this._coordinatesConverter,e),this._cursors.updateContext(this.context)}onLineMappingChanged(e){this._knownModelVersionId===this._model.getVersionId()&&this.setStates(e,"viewModel",0,this.getCursorStates())}setHasFocus(e){this._hasFocus=e}_validateAutoClosedActions(){if(this._autoClosedActions.length>0){const e=this._cursors.getSelections();for(let t=0;t<this._autoClosedActions.length;t++){const i=this._autoClosedActions[t];i.isValid(e)||(i.dispose(),this._autoClosedActions.splice(t,1),t--)}}}getPrimaryCursorState(){return this._cursors.getPrimaryCursor()}getLastAddedCursorIndex(){return this._cursors.getLastAddedCursorIndex()}getCursorStates(){return this._cursors.getAll()}setStates(e,t,i,n){let o=!1;null!==n&&n.length>qI.MAX_CURSOR_COUNT&&(n=n.slice(0,qI.MAX_CURSOR_COUNT),o=!0);const r=GI.from(this._model,this);return this._cursors.setStates(n),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,i,r,o)}setCursorColumnSelectData(e){this._columnSelectData=e}revealPrimary(e,t,i,n,o,r){const s=this._cursors.getViewPositions();let a=null,l=null;s.length>1?l=this._cursors.getViewSelections():a=Zd.fromPositions(s[0],s[0]),e.emitViewEvent(new OI(t,i,a,l,n,o,r))}saveState(){const e=[],t=this._cursors.getSelections();for(let i=0,n=t.length;i<n;i++){const n=t[i];e.push({inSelectionMode:!n.isEmpty(),selectionStart:{lineNumber:n.selectionStartLineNumber,column:n.selectionStartColumn},position:{lineNumber:n.positionLineNumber,column:n.positionColumn}})}return e}restoreState(e,t){const i=[];for(let e=0,n=t.length;e<n;e++){const n=t[e];let o=1,r=1;n.position&&n.position.lineNumber&&(o=n.position.lineNumber),n.position&&n.position.column&&(r=n.position.column);let s=o,a=r;n.selectionStart&&n.selectionStart.lineNumber&&(s=n.selectionStart.lineNumber),n.selectionStart&&n.selectionStart.column&&(a=n.selectionStart.column),i.push({selectionStartLineNumber:s,selectionStartColumn:a,positionLineNumber:o,positionColumn:r})}this.setStates(e,"restoreState",0,dL.fromModelSelections(i)),this.revealPrimary(e,"restoreState",!1,0,!0,1)}onModelContentChanged(e,t){if(t instanceof bI){if(this._isHandling)return;this._isHandling=!0;try{this.setStates(e,"modelChange",0,this.getCursorStates())}finally{this._isHandling=!1}}else{if(this._knownModelVersionId=t.versionId,this._isHandling)return;const i=t.containsEvent(1);if(this._prevEditOperationType=0,i)this._cursors.dispose(),this._cursors=new dI(this.context),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,"model",1,null,!1);else if(this._hasFocus&&t.resultingSelection&&t.resultingSelection.length>0){const i=dL.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,dL.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,dL.fromModelSelections(i))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){const i=[],n=[];for(let o=0,r=e.length;o<r;o++)i.push({range:e[o],options:{description:"auto-closed-character",inlineClassName:"auto-closed-character",stickiness:1}}),n.push({range:t[o],options:{description:"auto-closed-enclosing",stickiness:1}});const o=this._model.deltaDecorations([],i),r=this._model.deltaDecorations([],n);this._autoClosedActions.push(new YI(this._model,o,r))}_executeEditOperation(e){if(!e)return;e.shouldPushStackElementBefore&&this._model.pushStackElement();const t=class{static executeCommands(e,t,i){const n={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},o=this._innerExecuteCommands(n,i);for(let e=0,t=n.trackedRanges.length;e<t;e++)n.model._setTrackedRange(n.trackedRanges[e],null,0);return o}static _innerExecuteCommands(e,t){if(this._arrayIsEmpty(t))return null;const i=this._getEditOperations(e,t);if(0===i.operations.length)return null;const n=i.operations,o=this._getLoserCursorMap(n);if(o.hasOwnProperty("0"))return console.warn("Ignoring commands"),null;const r=[];for(let e=0,t=n.length;e<t;e++)o.hasOwnProperty(n[e].identifier.major.toString())||r.push(n[e]);i.hadTrackedEditOperation&&r.length>0&&(r[0]._isTracked=!0);let s=e.model.pushEditOperations(e.selectionsBefore,r,(i=>{const n=[];for(let t=0;t<e.selectionsBefore.length;t++)n[t]=[];for(const e of i)e.identifier&&n[e.identifier.major].push(e);const o=(e,t)=>e.identifier.minor-t.identifier.minor,r=[];for(let i=0;i<e.selectionsBefore.length;i++)n[i].length>0?(n[i].sort(o),r[i]=t[i].computeCursorState(e.model,{getInverseEditOperations:()=>n[i],getTrackedSelection:t=>{const i=parseInt(t,10),n=e.model._getTrackedRange(e.trackedRanges[i]);return 0===e.trackedRangesDirection[i]?new Xd(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn):new Xd(n.endLineNumber,n.endColumn,n.startLineNumber,n.startColumn)}})):r[i]=e.selectionsBefore[i];return r}));s||(s=e.selectionsBefore);const a=[];for(let e in o)o.hasOwnProperty(e)&&a.push(parseInt(e,10));a.sort(((e,t)=>t-e));for(const e of a)s.splice(e,1);return s}static _arrayIsEmpty(e){for(let t=0,i=e.length;t<i;t++)if(e[t])return!1;return!0}static _getEditOperations(e,t){let i=[],n=!1;for(let o=0,r=t.length;o<r;o++){const r=t[o];if(r){const t=this._getEditOperationsFromCommand(e,o,r);i=i.concat(t.operations),n=n||t.hadTrackedEditOperation}}return{operations:i,hadTrackedEditOperation:n}}static _getEditOperationsFromCommand(e,t,i){const n=[];let o=0;const r=(e,r,s=!1)=>{Zd.isEmpty(e)&&""===r||n.push({identifier:{major:t,minor:o++},range:e,text:r,forceMoveMarkers:s,isAutoWhitespaceEdit:i.insertsAutoWhitespace})};let s=!1;const a={addEditOperation:r,addTrackedEditOperation:(e,t,i)=>{s=!0,r(e,t,i)},trackSelection:(t,i)=>{const n=Xd.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 r=e.trackedRanges.length,s=e.model._setTrackedRange(null,n,o);return e.trackedRanges[r]=s,e.trackedRangesDirection[r]=n.getDirection(),r.toString()}};try{i.getEditOperations(e.model,a)}catch(e){return gc(e),{operations:[],hadTrackedEditOperation:!1}}return{operations:n,hadTrackedEditOperation:s}}static _getLoserCursorMap(e){(e=e.slice(0)).sort(((e,t)=>-Zd.compareRangesUsingEnds(e.range,t.range)));const t={};for(let i=1;i<e.length;i++){const n=e[i-1],o=e[i];if(Zd.getStartPosition(n.range).isBefore(Zd.getEndPosition(o.range))){let r;r=n.identifier.major>o.identifier.major?n.identifier.major:o.identifier.major,t[r.toString()]=!0;for(let t=0;t<e.length;t++)e[t].identifier.major===r&&(e.splice(t,1),t<i&&i--,t--);i>0&&i--}}return t}}.executeCommands(this._model,this._cursors.getSelections(),e.commands);if(t){this._interpretCommandResult(t);const i=[],n=[];for(let t=0;t<e.commands.length;t++){const o=e.commands[t];o instanceof AL&&o.enclosingRange&&o.closeCharacterRange&&(i.push(o.closeCharacterRange),n.push(o.enclosingRange))}i.length>0&&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 r=GI.from(this._model,this);if(r.equals(n))return!1;const s=this._cursors.getSelections(),a=this._cursors.getViewSelections();if(e.emitViewEvent(new kI(a,s)),!n||n.cursorState.length!==r.cursorState.length||r.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 $I(a,s,l,r.modelVersionId,t||"keyboard",i,o))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;const t=[];for(let i=0,n=e.length;i<n;i++){const n=e[i];if(!n.text||n.text.indexOf("\n")>=0)return null;const o=n.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!o)return null;const r=o[1],s=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(r);if(!s||1!==s.length)return null;const a=s[0].open,l=n.text.length-o[2].length-1,c=n.text.lastIndexOf(a,l-1);if(-1===c)return null;t.push([c,l])}return t}executeEdits(e,t,i,n){let o=null;"snippet"===t&&(o=this._findAutoClosingPairs(i)),o&&(i[0]._isTracked=!0);const r=[],s=[],a=this._model.pushEditOperations(this.getSelections(),i,(e=>{if(o)for(let t=0,i=o.length;t<i;t++){const[i,n]=o[t],a=e[t],l=a.range.startLineNumber,c=a.range.startColumn-1+i,d=a.range.startColumn-1+n;r.push(new Zd(l,d+1,l,d+2)),s.push(new Zd(l,c+1,l,d+2))}const t=n(e);return t&&(this._isHandling=!0),t}));a&&(this._isHandling=!1,this.setSelections(e,t,a,0)),r.length>0&&this._pushAutoClosedAction(r,s)}_executeEdit(e,t,i,n=0){if(this.context.cursorConfig.readOnly)return;const o=GI.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(e){gc(e)}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 YI.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._selectionsWhenCompositionStarted=this.getSelections().slice(0)}endComposition(e,t){this._executeEdit((()=>{"keyboard"===t&&(this._executeEditOperation(DL.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<e;){const e=ju(t,i),n=t.substr(i,e);this._executeEditOperation(DL.typeWithInterceptors(this._isDoingComposition,this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),this.getAutoClosedCharacters(),n)),i+=e}}else this._executeEditOperation(DL.typeWithoutInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t))}),e,i)}compositionType(e,t,i,n,o,r){if(0!==t.length||0!==i||0!==n)this._executeEdit((()=>{this._executeEditOperation(DL.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,i,n,o))}),e,r);else if(0!==o){const t=this.getSelections().map((e=>{const t=e.getPosition();return new Xd(t.lineNumber,t.column+o,t.lineNumber,t.column+o)}));this.setSelections(e,r,t,0)}}paste(e,t,i,n,o){this._executeEdit((()=>{this._executeEditOperation(DL.paste(this.context.cursorConfig,this._model,this.getSelections(),t,i,n||[]))}),e,o,4)}cut(e,t){this._executeEdit((()=>{this._executeEditOperation(SL.cut(this.context.cursorConfig,this._model,this.getSelections()))}),e,t)}executeCommand(e,t,i){this._executeEdit((()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new pL(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))}),e,i)}executeCommands(e,t,i){this._executeEdit((()=>{this._executeEditOperation(new pL(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))}),e,i)}}qI.MAX_CURSOR_COUNT=1e4;class GI{constructor(e,t){this.modelVersionId=e,this.cursorState=t}static from(e,t){return new GI(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<i;t++)if(!this.cursorState[t].equals(e.cursorState[t]))return!1;return!0}}class YI{constructor(e,t,i){this._model=e,this._autoClosedCharactersDecorations=t,this._autoClosedEnclosingDecorations=i}static getAllAutoClosedCharacters(e){let t=[];for(const i of e)t=t.concat(i.getAutoClosedCharactersRanges());return t}dispose(){this._autoClosedCharactersDecorations=this._model.deltaDecorations(this._autoClosedCharactersDecorations,[]),this._autoClosedEnclosingDecorations=this._model.deltaDecorations(this._autoClosedEnclosingDecorations,[])}getAutoClosedCharactersRanges(){const e=[];for(let t=0;t<this._autoClosedCharactersDecorations.length;t++){const i=this._model.getDecorationRange(this._autoClosedCharactersDecorations[t]);i&&e.push(i)}return e}isValid(e){const t=[];for(let e=0;e<this._autoClosedEnclosingDecorations.length;e++){const i=this._model.getDecorationRange(this._autoClosedEnclosingDecorations[e]);if(i&&(t.push(i),i.startLineNumber!==i.endLineNumber))return!1}t.sort(Zd.compareRangesUsingStarts),e.sort(Zd.compareRangesUsingStarts);for(let i=0;i<e.length;i++){if(i>=t.length)return!1;if(!t[i].strictContainsRange(e[i]))return!1}return!0}}class ZI{constructor(e,t,i,n,o,r){this.id=e,this.label=t,this.alias=i,this._precondition=n,this._run=o,this._contextKeyService=r}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(){return this.isSupported()?this._run():Promise.resolve(void 0)}}const XI="base.contributions.configuration",JI={properties:{},patternProperties:{}},QI={properties:{},patternProperties:{}},eT={properties:{},patternProperties:{}},tT={properties:{},patternProperties:{}},iT={properties:{},patternProperties:{}},nT={properties:{},patternProperties:{}},oT="vscode://schemas/settings/resourceLanguage",rT=iw.as(hy),sT=new RegExp("\\[([^\\]]+)\\]","g"),aT="^(\\[([^\\]]+)\\])+$",lT=new RegExp(aT);function cT(e){const t=[];if(lT.test(e)){let i=sT.exec(e);for(;null==i?void 0:i.length;){const n=i[1].trim();n&&t.push(n),i=sT.exec(e)}}return ll(t)}const dT=new class{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new Vc,this._onDidUpdateConfiguration=new Vc,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:ma(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={},rT.registerSchema(oT,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){const i=this.doRegisterConfigurations(e,t);rT.registerSchema(oT,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:i})}registerDefaultConfigurations(e){var t;const i=[],n=[];for(const{overrides:o,source:r}of e)for(const e in o)if(i.push(e),lT.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:r,value:i});const s={type:"object",default:i,description:ma(0,"Configure settings to be overridden for {0} language.",e),$ref:oT,defaultDefaultValue:i,source:vl(r)?void 0:r};n.push(...cT(e)),this.configurationProperties[e]=s,this.defaultLanguageConfigurationOverridesNode.properties[e]=s}else{this.configurationDefaultsOverrides.set(e,{value:o[e],source:r});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=xl(e.scope)?o:e.scope;let r=[],s=e.properties;if(s)for(let e in s){if(t&&hT(e)){delete s[e];continue}const a=s[e];a.source=i,a.defaultDefaultValue=s[e].default,this.updatePropertyDefaultValue(e,a),lT.test(e)?a.scope=void 0:(a.scope=xl(a.scope)?o:a.scope,a.restricted=xl(a.restricted)?!!(null==n?void 0:n.includes(e)):a.restricted),!s[e].hasOwnProperty("included")||s[e].included?(this.configurationProperties[e]=s[e],!s[e].deprecationMessage&&s[e].markdownDeprecationMessage&&(s[e].deprecationMessage=s[e].markdownDeprecationMessage),r.push(e)):(this.excludedConfigurationProperties[e]=s[e],delete s[e])}let a=e.allOf;if(a)for(let e of a)r.push(...this.validateAndRegisterProperties(e,t,i,n,o));return r}getConfigurationProperties(){return this.configurationProperties}registerJSONConfiguration(e){const t=e=>{let i=e.properties;if(i)for(const e in i)this.updateSchema(e,i[e]);let n=e.allOf;n&&n.forEach(t)};t(e)}updateSchema(e,t){switch(JI.properties[e]=t,t.scope){case 1:QI.properties[e]=t;break;case 2:eT.properties[e]=t;break;case 6:tT.properties[e]=t;break;case 3:iT.properties[e]=t;break;case 4:nT.properties[e]=t;break;case 5:nT.properties[e]=t,this.resourceLanguageSettingsSchema.properties[e]=t}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const t=`[${e}]`,i={type:"object",description:ma(0,"Configure editor settings to be overridden for a language."),errorMessage:ma(0,"This setting does not support per-language configuration."),$ref:oT};this.updatePropertyDefaultValue(t,i),JI.properties[t]=i,QI.properties[t]=i,eT.properties[t]=i,tT.properties[t]=i,iT.properties[t]=i,nT.properties[t]=i}this._onDidSchemaChange.fire()}registerOverridePropertyPatternKey(){const e={type:"object",description:ma(0,"Configure editor settings to be overridden for a language."),errorMessage:ma(0,"This setting does not support per-language configuration."),$ref:oT};JI.patternProperties["^(\\[([^\\]]+)\\])+$"]=e,QI.patternProperties["^(\\[([^\\]]+)\\])+$"]=e,eT.patternProperties["^(\\[([^\\]]+)\\])+$"]=e,tT.patternProperties["^(\\[([^\\]]+)\\])+$"]=e,iT.patternProperties["^(\\[([^\\]]+)\\])+$"]=e,nT.patternProperties["^(\\[([^\\]]+)\\])+$"]=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;Sl(n)&&(n=t.defaultDefaultValue,o=void 0),Sl(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 hT(e){return e.trim()?lT.test(e)?ma(0,"Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",e):void 0!==dT.getConfigurationProperties()[e]?ma(0,"Cannot register '{0}'. This property is already registered.",e):null:ma(0,"Cannot register an empty property")}iw.add(XI,dT);const uT=new class{constructor(){this._onDidChangeLanguages=new Vc,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<i;t++)if(this._languages[t]===e)return void this._languages.splice(t,1)}}}getLanguages(){return this._languages}};iw.add("editor.modesRegistry",uT);const gT="plaintext";function pT(e,t,i,n,o,r,s){let a="<div>",l=n,c=0,d=!0;for(let h=0,u=t.getCount();h<u;h++){const u=t.getEndOffset(h);if(u<=n)continue;let g="";for(;l<u&&l<o;l++){const t=e.charCodeAt(l);switch(t){case 9:{let e=r-(l+c)%r;for(c+=e-1;e>0;)s&&d?(g+="&#160;",d=!1):(g+=" ",d=!0),e--;break}case 60:g+="&lt;",d=!1;break;case 62:g+="&gt;",d=!1;break;case 38:g+="&amp;",d=!1;break;case 0:g+="&#00;",d=!1;break;case 65279:case 8232:case 8233:case 133:g+="�",d=!1;break;case 13:g+="&#8203",d=!1;break;case 32:s&&d?(g+="&#160;",d=!1):(g+=" ",d=!0);break;default:g+=String.fromCharCode(t),d=!1}}if(a+=`<span style="${t.getInlineStyle(h,i)}">${g}</span>`,u>o||l>=o)break}return a+="</div>",a}uT.registerLanguage({id:gT,extensions:[".txt"],aliases:[ma(0,"Plain Text"),"text"],mimetypes:[Kk.text]}),tm.register(gT,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0),iw.as(XI).registerDefaultConfigurations([{overrides:{"[plaintext]":{"editor.unicodeHighlight.ambiguousCharacters":!1,"editor.unicodeHighlight.invisibleCharacters":!1}}}]);class mT{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 fT{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 vT{constructor(e,t,i,n){this._instanceId=eg(++vT.INSTANCE_COUNT),this._pendingChanges=new mT,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<o;){const r=n+o>>>1;t===e[r].afterLineNumber?i<e[r].ordinal?o=r:n=r+1:t<e[r].afterLineNumber?o=r:n=r+1}return n}setLineHeight(e){this._checkPendingChanges(),this._lineHeight=e}setPadding(e,t){this._paddingTop=e,this._paddingBottom=t}onFlushed(e){this._checkPendingChanges(),this._lineCount=e}changeWhitespace(e){let t=!1;try{e({insertWhitespace:(e,i,n,o)=>{t=!0,e|=0,i|=0,n|=0,o|=0;const r=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new fT(r,e,i,n,o)),r},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 e of i)n.add(e.id);const o=new Map;for(const e of t)o.set(e.id,e);const r=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},s=r(this._arr).concat(r(e));s.sort(((e,t)=>e.afterLineNumber===t.afterLineNumber?e.ordinal-t.ordinal:e.afterLineNumber-t.afterLineNumber)),this._arr=s,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){const t=vT.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;i<n;i++)if(t[i].id===e)return i;return-1}_changeOneWhitespace(e,t,i){const n=this._findWhitespaceIndex(e);if(-1!==n&&(this._arr[n].height!==i&&(this._arr[n].height=i,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,n-1)),this._arr[n].afterLineNumber!==t)){const e=this._arr[n];this._removeWhitespace(n),e.afterLineNumber=t,this._insertWhitespace(e)}}_removeWhitespace(e){this._arr.splice(e,1),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,e-1)}onLinesDeleted(e,t){this._checkPendingChanges(),e|=0,t|=0,this._lineCount-=t-e+1;for(let i=0,n=this._arr.length;i<n;i++){const n=this._arr[i].afterLineNumber;e<=n&&n<=t?this._arr[i].afterLineNumber=e-1:n>t&&(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<n;i++)e<=this._arr[i].afterLineNumber&&(this._arr[i].afterLineNumber+=t-e+1)}getWhitespacesTotalHeight(){return this._checkPendingChanges(),0===this._arr.length?0:this.getWhitespacesAccumulatedHeight(this._arr.length-1)}getWhitespacesAccumulatedHeight(e){this._checkPendingChanges(),e|=0;let t=Math.max(0,this._prefixSumValidIndex+1);0===t&&(this._arr[0].prefixSum=this._arr[0].height,t++);for(let i=t;i<=e;i++)this._arr[i].prefixSum=this._arr[i-1].prefixSum+this._arr[i].height;return this._prefixSumValidIndex=Math.max(this._prefixSumValidIndex,e),this._arr[e].prefixSum}getLinesTotalHeight(){return this._checkPendingChanges(),this._lineHeight*this._lineCount+this.getWhitespacesTotalHeight()+this._paddingTop+this._paddingBottom}getWhitespaceAccumulatedHeightBeforeLineNumber(e){this._checkPendingChanges(),e|=0;const t=this._findLastWhitespaceBeforeLineNumber(e);return-1===t?0:this.getWhitespacesAccumulatedHeight(t)}_findLastWhitespaceBeforeLineNumber(e){e|=0;const t=this._arr;let i=0,n=t.length-1;for(;i<=n;){const o=i+((n-i|0)/2|0)|0;if(t[o].afterLineNumber<e){if(o+1>=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 t<this._arr.length?t:-1}getFirstWhitespaceIndexAfterLineNumber(e){return this._checkPendingChanges(),e|=0,this._findFirstWhitespaceAfterLineNumber(e)}getVerticalOffsetForLineNumber(e){let t;return this._checkPendingChanges(),t=(e|=0)>1?this._lineHeight*(e-1):0,t+this.getWhitespaceAccumulatedHeightBeforeLineNumber(e)+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),-1===this._minWidth){let e=0;for(let t=0,i=this._arr.length;t<i;t++)e=Math.max(e,this._arr[t].minWidth);this._minWidth=e}return this._minWidth}isAfterLines(e){return this._checkPendingChanges(),e>this.getLinesTotalHeight()}isInTopPadding(e){return 0!==this._paddingTop&&(this._checkPendingChanges(),e<this._paddingTop)}isInBottomPadding(e){return 0!==this._paddingBottom&&(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<o;){const t=(n+o)/2|0,r=0|this.getVerticalOffsetForLineNumber(t);if(e>=r+i)n=t+1;else{if(e>=r)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 r=0|this._lineCount,s=0|this.getFirstWhitespaceIndexAfterLineNumber(n);const a=0|this.getWhitespacesCount();let l,c;-1===s?(s=a,c=r+1,l=0):(c=0|this.getAfterLineNumberForWhitespaceIndex(s),l=0|this.getHeightForWhitespaceIndex(s));let d=o,h=d;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 e=n;e<=r;e++){if(-1===f){const t=d,n=d+i;(t<=m&&m<n||t>m)&&(f=e)}for(d+=i,p[e-n]=h,h+=i;c===e;)h+=l,d+=l,s++,s>=a?c=r+1:(c=0|this.getAfterLineNumberForWhitespaceIndex(s),l=0|this.getHeightForWhitespaceIndex(s));if(d>=t){r=e;break}}-1===f&&(f=r);const _=0|this.getVerticalOffsetForLineNumber(r);let v=n,b=r;return v<b&&o<e&&v++,v<b&&_+i>t&&b--,{bigNumbersDelta:g,startLineNumber:n,endLineNumber:r,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<i;){const n=Math.floor((t+i)/2),o=this.getVerticalOffsetForWhitespaceIndex(n);if(e>=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 e=i;e<=n;e++){const i=this.getVerticalOffsetForWhitespaceIndex(e),n=this.getHeightForWhitespaceIndex(e);if(i>=t)break;o.push({id:this.getIdForWhitespaceIndex(e),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(e),verticalOffset:i,height:n})}return o}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].height}}vT.INSTANCE_COUNT=0;class bT{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 wT extends Nc{constructor(e,t){super(),this._onDidContentSizeChange=this._register(new Vc),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new bT(0,0,0,0),this._scrollable=this._register(new xE({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 zI(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 yT extends Nc{constructor(e,t,i){super(),this._configuration=e;const n=this._configuration.options,o=n.get(131),r=n.get(75);this._linesLayout=new vT(t,n.get(59),r.top,r.bottom),this._scrollable=this._register(new wT(0,i)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new bT(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(),r=o.contentWidth;this._scrollable.setScrollDimensions(new bT(i,o.contentWidth,n,this._getContentHeight(i,n,r)))}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 bT(t,e.contentWidth,i,this._getContentHeight(t,i,n)))}getCurrentViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new __(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new __(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 bT(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 CT{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 r;if(o.isWholeLine){const e=this._coordinatesConverter.convertModelPositionToViewPosition(new Yd(n.startLineNumber,1),0),t=this._coordinatesConverter.convertModelPositionToViewPosition(new Yd(n.endLineNumber,this.model.getLineMaxColumn(n.endLineNumber)),1);r=new Zd(e.lineNumber,e.column,t.lineNumber,t.column)}else r=this._coordinatesConverter.convertModelRangeToViewRange(n,1);i=new S_(r,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,oc(this.configuration.options)),i=e.startLineNumber,n=e.endLineNumber,o=[];let r=0;const s=[];for(let e=i;e<=n;e++)s[e-i]=[];for(let e=0,c=t.length;e<c;e++){const c=t[e],d=c.options;if(a=this.model,(l=c).options.hideInCommentTokens&&function(e,t){return ST(e,t.range,(e=>1===e))}(a,l)||l.options.hideInStringTokens&&function(e,t){return ST(e,t.range,(e=>2===e))}(a,l))continue;const h=this._getOrCreateViewModelDecoration(c),u=h.range;if(o[r++]=h,d.inlineClassName){const e=new y_(u,d.inlineClassName,d.inlineClassNameAffectsLetterSpacing?3:0),t=Math.max(i,u.startLineNumber),o=Math.min(n,u.endLineNumber);for(let n=t;n<=o;n++)s[n-i].push(e)}if(d.beforeContentClassName&&i<=u.startLineNumber&&u.startLineNumber<=n){const e=new y_(new Zd(u.startLineNumber,u.startColumn,u.startLineNumber,u.startColumn),d.beforeContentClassName,1);s[u.startLineNumber-i].push(e)}if(d.afterContentClassName&&i<=u.endLineNumber&&u.endLineNumber<=n){const e=new y_(new Zd(u.endLineNumber,u.endColumn,u.endLineNumber,u.endColumn),d.afterContentClassName,2);s[u.endLineNumber-i].push(e)}}var a,l;return{decorations:o,inlineDecorations:s}}}function ST(e,t,i){for(let n=t.startLineNumber;n<=t.endLineNumber;n++){const o=e.getLineTokens(n),r=n===t.startLineNumber,s=n===t.endLineNumber;let a=r?o.findTokenIndexAtOffset(t.startColumn-1):0;for(;a<o.getCount()&&!(s&&o.getStartOffset(a)>t.endColumn-1);){if(!i(o.getStandardTokenType(a)))return!1;a++}}return!0}class kT{constructor(e,t,i){this.range=e,this.nestingLevel=t,this.isInvalid=i}}class xT 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 LT{constructor(e,t){this.lineCount=e,this.columnCount=t}toString(){return`${this.lineCount},${this.columnCount}`}}LT.zero=new LT(0,0);const ET=Math.pow(2,26);function NT(e,t){return e*ET+t}function IT(e){const t=e,i=Math.floor(t/ET);return new LT(i,t-i*ET)}function TT(e,t){return t<ET?e+t:e-e%ET+t}function DT(e,t){return e<t}function AT(e,t){return e<=t}function OT(e,t){return e>=t}function MT(e){return NT(e.lineNumber-1,e.column-1)}function RT(e,t){const i=e,n=Math.floor(i/ET),o=i-n*ET,r=t,s=Math.floor(r/ET);return new Zd(n+1,o+1,s+1,r-s*ET+1)}class PT{constructor(e,t,i){this.startOffset=e,this.endOffset=t,this.newLength=i}}class FT{constructor(e,t){this.documentLength=t,this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map((e=>BT.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/ET),r=Math.floor(n/ET),s=n-r*ET;return o===r?NT(0,s-(i-o*ET)):NT(r-o,s)}(e,t?this.translateOldToCur(t.offsetObj):this.documentLength)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?NT(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):NT(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){const t=IT(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?NT(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):NT(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){for(;this.nextEditIdx<this.edits.length;){const t=this.edits[this.nextEditIdx],i=this.translateOldToCur(t.endOffsetAfterObj);if(!AT(i,e))break;{this.nextEditIdx++;const e=IT(i),n=IT(this.translateOldToCur(t.endOffsetBeforeObj)),o=e.lineCount-n.lineCount;this.deltaOldToNewLineCount+=o;const r=this.deltaLineIdxInOld===t.endOffsetBeforeObj.lineCount?this.deltaOldToNewColumnCount:0,s=e.columnCount-n.columnCount;this.deltaOldToNewColumnCount=r+s,this.deltaLineIdxInOld=t.endOffsetBeforeObj.lineCount}}}}class BT{constructor(e,t,i){this.endOffsetBeforeObj=IT(t),this.endOffsetAfterObj=IT(TT(e,i)),this.offsetObj=IT(e)}static from(e){return new BT(e.startOffset,e.endOffset,e.newLength)}}const WT=new Array;class VT{constructor(e,t){this.items=e,this.additionalItems=t}static create(e,t){if(e<=128&&0===t.length){let i=VT.cache[e];return i||(i=new VT(e,t),VT.cache[e]=i),i}return new VT(e,t)}static getEmpty(){return this.empty}add(e,t){const i=t.getKey(e);let n=i>>5;if(0===n){const e=1<<i|this.items;return e===this.items?this:VT.create(e,this.additionalItems)}n--;const o=this.additionalItems.slice(0);for(;o.length<n;)o.push(0);return o[n]|=1<<(31&i),VT.create(this.items,o)}merge(e){const t=this.items|e.items;if(this.additionalItems===WT&&e.additionalItems===WT)return t===this.items?this:t===e.items?e:VT.create(t,WT);const i=new Array;for(let t=0;t<Math.max(this.additionalItems.length,e.additionalItems.length);t++){const n=this.additionalItems[t]||0,o=e.additionalItems[t]||0;i.push(n|o)}return VT.create(t,i)}intersects(e){if(0!=(this.items&e.items))return!0;for(let t=0;t<Math.min(this.additionalItems.length,e.additionalItems.length);t++)if(0!=(this.additionalItems[t]&e.additionalItems[t]))return!0;return!1}}VT.cache=new Array(129),VT.empty=VT.create(0,WT);const zT={getKey:e=>e};class jT{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 HT{constructor(e){this._length=e}get length(){return this._length}}class UT extends HT{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=TT(n,t.length)),i&&(n=TT(n,i.length)),new UT(n,e,t,i,t?t.missingOpeningBracketIds:VT.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 UT(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(TT(e,this.openingBracket.length),t):Number.MAX_SAFE_INTEGER}}class $T extends HT{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,r=e.missingOpeningBracketIds;if(e.listHeight!==t.listHeight)throw new Error("Invalid list heights");if(o=TT(o,t.length),r=r.merge(t.missingOpeningBracketIds),i){if(e.listHeight!==i.listHeight)throw new Error("Invalid list heights");o=TT(o,i.length),r=r.merge(i.missingOpeningBracketIds)}return n?new qT(o,e.listHeight+1,e,t,i,r):new KT(o,e.listHeight+1,e,t,i,r)}static getEmpty(){return new YT(0,0,[],VT.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(){if(this.throwIfImmutable(),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;n<e;n++){const e=this.getChild(n);t=TT(t,e.length),i=i.merge(e.missingOpeningBracketIds)}this._length=t,this._missingOpeningBracketIds=i,this.cachedMinIndentation=-1}computeMinIndentation(e,t){if(-1!==this.cachedMinIndentation)return this.cachedMinIndentation;let i=Number.MAX_SAFE_INTEGER,n=e;for(let e=0;e<this.childrenLength;e++){const o=this.getChild(e);o&&(i=Math.min(i,o.computeMinIndentation(n,t)),n=TT(n,o.length))}return this.cachedMinIndentation=i,i}}class KT extends $T{constructor(e,t,i,n,o,r){super(e,t,r),this._item1=i,this._item2=n,this._item3=o}get childrenLength(){return null!==this._item3?3:2}getChild(e){switch(e){case 0:return this._item1;case 1:return this._item2;case 2:return this._item3}throw new Error("Invalid child index")}setChild(e,t){switch(e){case 0:return void(this._item1=t);case 1:return void(this._item2=t);case 2:return void(this._item3=t)}throw new Error("Invalid child index")}get children(){return this._item3?[this._item1,this._item2,this._item3]:[this._item1,this._item2]}get item1(){return this._item1}get item2(){return this._item2}get item3(){return this._item3}deepClone(){return new KT(this.length,this.listHeight,this._item1.deepClone(),this._item2.deepClone(),this._item3?this._item3.deepClone():null,this.missingOpeningBracketIds)}appendChildOfSameHeight(e){if(this._item3)throw new Error("Cannot append to a full (2,3) tree node");this.throwIfImmutable(),this._item3=e,this.handleChildrenChanged()}unappendChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const e=this._item3;return this._item3=null,this.handleChildrenChanged(),e}prependChildOfSameHeight(e){if(this._item3)throw new Error("Cannot prepend to a full (2,3) tree node");this.throwIfImmutable(),this._item3=this._item2,this._item2=this._item1,this._item1=e,this.handleChildrenChanged()}unprependChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const e=this._item1;return this._item1=this._item2,this._item2=this._item3,this._item3=null,this.handleChildrenChanged(),e}toMutable(){return this}}class qT extends KT{toMutable(){return new KT(this.length,this.listHeight,this.item1,this.item2,this.item3,this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}class GT extends $T{constructor(e,t,i,n){super(e,t,n),this._children=i}get childrenLength(){return this._children.length}getChild(e){return this._children[e]}setChild(e,t){this._children[e]=t}get children(){return this._children}deepClone(){const e=new Array(this._children.length);for(let t=0;t<this._children.length;t++)e[t]=this._children[t].deepClone();return new GT(this.length,this.listHeight,e,this.missingOpeningBracketIds)}appendChildOfSameHeight(e){this.throwIfImmutable(),this._children.push(e),this.handleChildrenChanged()}unappendChild(){this.throwIfImmutable();const e=this._children.pop();return this.handleChildrenChanged(),e}prependChildOfSameHeight(e){this.throwIfImmutable(),this._children.unshift(e),this.handleChildrenChanged()}unprependChild(){this.throwIfImmutable();const e=this._children.shift();return this.handleChildrenChanged(),e}toMutable(){return this}}class YT extends GT{toMutable(){return new GT(this.length,this.listHeight,[...this.children],this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}const ZT=[];class XT extends HT{get listHeight(){return 0}get childrenLength(){return 0}getChild(e){return null}get children(){return ZT}deepClone(){return this}}class JT extends XT{get kind(){return 0}get missingOpeningBracketIds(){return VT.getEmpty()}canBeReused(e){return!0}computeMinIndentation(e,t){const i=IT(e),n=(0===i.columnCount?i.lineCount:i.lineCount+1)+1,o=(r=TT(e,this.length),Math.floor(r/ET)+1);var r;let s=Number.MAX_SAFE_INTEGER;for(let e=n;e<=o;e++){const i=t.getLineFirstNonWhitespaceColumn(e),n=t.getLineContent(e);if(0===i)continue;const o=Nk.visibleColumnFromColumn(n,i,t.getOptions().tabSize);s=Math.min(s,o)}return s}}class QT extends XT{constructor(e,t,i){super(e),this.languageId=t,this.bracketIds=i}static create(e,t,i){return new QT(e,t,i)}get kind(){return 1}get missingOpeningBracketIds(){return VT.getEmpty()}canBeReused(e){return!1}computeMinIndentation(e,t){return Number.MAX_SAFE_INTEGER}}class eD extends XT{constructor(e,t){super(t),this.missingOpeningBracketIds=e}get kind(){return 3}canBeReused(e){return!e.intersects(this.missingOpeningBracketIds)}computeMinIndentation(e,t){return Number.MAX_SAFE_INTEGER}}class tD{constructor(e,t,i,n,o){this.length=e,this.kind=t,this.bracketId=i,this.bracketIds=n,this.astNode=o}}class iD{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.reader=new nD(this.textModel,this.bracketTokens),this._offset=0,this.didPeek=!1,this.peeked=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}get offset(){return this._offset}get length(){return NT(this.textBufferLineCount,this.textBufferLastLineLength)}skip(e){this.didPeek=!1,this._offset=TT(this._offset,e);const t=IT(this._offset);this.reader.setPosition(t.lineCount,t.columnCount)}read(){let e;return this.peeked?(this.didPeek=!1,e=this.peeked):e=this.reader.read(),e&&(this._offset=TT(this._offset,e.length)),e}peek(){return this.didPeek||(this.peeked=this.reader.read(),this.didPeek=!0),this.peeked}}class nD{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.lineIdx=0,this.line=null,this.lineCharOffset=0,this.lineTokens=null,this.lineTokenOffset=0,this.peekedToken=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}setPosition(e,t){e===this.lineIdx?(this.lineCharOffset=t,this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset)):(this.lineIdx=e,this.lineCharOffset=t,this.line=null),this.peekedToken=null}read(){if(this.peekedToken){const e=this.peekedToken;return this.peekedToken=null,this.lineCharOffset+=e.length,e}if(this.lineIdx>this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;null===this.line&&(this.lineTokens=this.textModel.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 r=null;if(this.lineTokenOffset<o){const s=n.getMetadata(this.lineTokenOffset);for(;this.lineTokenOffset+1<o&&s===n.getMetadata(this.lineTokenOffset+1);)this.lineTokenOffset++;const a=0===ch.getTokenType(s),l=n.getEndOffset(this.lineTokenOffset);if(a&&l!==this.lineCharOffset){const e=n.getLanguageId(this.lineTokenOffset),t=this.line.substring(this.lineCharOffset,l),i=this.bracketTokens.getSingleLanguageBracketTokens(e),o=i.regExpGlobal;if(o){o.lastIndex=0;const e=o.exec(t);e&&(r=i.getToken(e[0]),r&&(this.lineCharOffset+=e.index))}}if(i+=l-this.lineCharOffset,r){if(e!==this.lineIdx||t!==this.lineCharOffset){this.peekedToken=r;break}return this.lineCharOffset+=r.length,r}this.lineTokenOffset++,this.lineCharOffset=l}else{if(this.lineIdx===this.textBufferLineCount-1)break;if(this.lineIdx++,this.lineTokens=this.textModel.getLineTokens(this.lineIdx+1),this.lineTokenOffset=0,this.line=this.lineTokens.getLineContent(),this.lineCharOffset=0,i+=33,i>1e3)break}if(i>1500)break}const n=(o=e,r=t,s=this.lineIdx,a=this.lineCharOffset,o!==s?NT(s-o,a):NT(0,a-r));var o,r,s,a;return new tD(n,0,-1,VT.getEmpty(),new JT(n))}}class oD{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,r=0,s=0,a=0,l=0;const c=new Array;for(let e=0;e<60;e++)c.push(new tD(NT(0,e),0,-1,VT.getEmpty(),new JT(NT(0,e))));const d=new Array;for(let e=0;e<60;e++)d.push(new tD(NT(1,e),0,-1,VT.getEmpty(),new JT(NT(1,e))));if(i)for(i.lastIndex=0;null!==(o=i.exec(e));){const e=o.index,i=o[0];if("\n"===i)r++,s=e+1;else{if(a!==e){let t;if(l===r){const i=e-a;if(i<c.length)t=c[i];else{const e=NT(0,i);t=new tD(e,0,-1,VT.getEmpty(),new JT(e))}}else{const i=r-l,n=e-s;if(1===i&&n<d.length)t=d[n];else{const e=NT(i,n);t=new tD(e,0,-1,VT.getEmpty(),new JT(e))}}n.push(t)}n.push(t.getToken(i)),a=e+i.length,l=r}}const h=e.length;if(a!==h){const e=l===r?NT(0,h-a):NT(r-l,h-s);n.push(new tD(e,0,-1,VT.getEmpty(),new JT(e)))}this.length=NT(r,h-s),this.tokens=n}get offset(){return this._offset}read(){return this.tokens[this.idx++]||null}peek(){return this.tokens[this.idx]||null}skip(e){throw new wc}}class rD{constructor(e){this.map=e,this.hasRegExp=!1,this._regExpGlobal=null}static createFromLanguage(e,t){function i(e,i){return t.getKey(`${e}:::${i}`)}const n=e.characterPair.getColorizedBrackets(),o=new Map,r=new Set;for(const[t,s]of n){r.add(t);let n=o.get(s);const a=i(e.languageId,t);n||(n={openingBrackets:VT.getEmpty(),first:a},o.set(s,n)),n.openingBrackets=n.openingBrackets.add(a,zT)}const s=new Map;for(const[t,i]of o){const n=NT(0,t.length);s.set(t,new tD(n,2,i.first,i.openingBrackets,QT.create(n,e.languageId,i.openingBrackets)))}for(const t of r){const n=NT(0,t.length),o=i(e.languageId,t),r=VT.getEmpty().add(o,zT);s.set(t,new tD(n,1,o,r,QT.create(n,e.languageId,r)))}return new rD(s)}getRegExpStr(){if(this.isEmpty)return null;{const e=[...this.map.keys()];return e.sort(),e.reverse(),e.map((e=>function(e){const t=vu(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 sD{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=rD.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider).getRegExpStr();return t.getRegExpStr()!==i}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=rD.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}function aD(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<n;o++){const n=o<<1;e[o]=$T.create23(e[n],e[n+1],n+3===i?e[n+2]:null,t)}i=n}return $T.create23(e[0],e[1],i>=3?e[2]:null,t)}function lD(e,t){return Math.abs(e.listHeight-t.listHeight)}function cD(e,t){return e.listHeight===t.listHeight?$T.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 e=n.length-1;e>=0;e--){const t=n[e];o?t.childrenLength>=3?o=$T.create23(t.unappendChild(),o,null,!1):(t.appendChildOfSameHeight(o),o=void 0):t.handleChildrenChanged()}return o?$T.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 e=n.length-1;e>=0;e--){const t=n[e];o?t.childrenLength>=3?o=$T.create23(o,t.unprependChild(),null,!1):(t.prependChildOfSameHeight(o),o=void 0):t.handleChildrenChanged()}return o?$T.create23(o,e,null,!1):e}(t,e)}class dD{constructor(e){this.lastOffset=0,this.nextNodes=[e],this.offsets=[0],this.idxs=[]}readLongestNodeAt(e,t){if(DT(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){const i=uD(this.nextNodes);if(!i)return;const n=uD(this.offsets);if(DT(e,n))return;if(DT(n,e))if(TT(n,i.length)<=e)this.nextNodeAfterCurrent();else{const e=hD(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=hD(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=uD(this.offsets),t=uD(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),0===this.idxs.length)break;const i=uD(this.nextNodes),n=hD(i,this.idxs[this.idxs.length-1]);if(-1!==n){this.nextNodes.push(i.getChild(n)),this.offsets.push(TT(e,t.length)),this.idxs[this.idxs.length-1]=n;break}this.idxs.pop()}}}function hD(e,t=-1){for(;;){if(++t>=e.childrenLength)return-1;if(e.getChild(t))return t}}function uD(e){return e.length>0?e[e.length-1]:void 0}function gD(e,t,i,n){return new pD(e,t,i,n).parseDocument()}class pD{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 dD(i):void 0,this.positionMapper=new FT(t,e.length)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(VT.getEmpty());return e||(e=$T.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)}return 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<e.length&&e[t].listHeight===n;)t++;return t-i>=2?aD(0===i&&t===e.length?e:e.slice(i,t),!1):e[i]}let n=i(),o=i();if(!o)return n;for(let e=i();e;e=i())lD(n,o)<=lD(o,e)?(n=cD(n,o),o=e):o=cD(o,e);return cD(n,o)}(t):aD(t,this.createImmutableLists)}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=>!!DT(i.length,t)&&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 eD(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(),UT.create(t.astNode,n,o.astNode)):UT.create(t.astNode,n,null)}default:throw new Error("unexpected")}}}class mD extends Nc{constructor(e,t){if(super(),this.textModel=e,this.getLanguageConfiguration=t,this.didChangeEmitter=new Vc,this.denseKeyProvider=new jT,this.brackets=new sD(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,0===e.backgroundTokenizationState){const e=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),t=new oD(this.textModel.getValue(),e);this.initialAstWithoutTokens=gD(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 PT(NT(e.fromLineNumber-1,0),NT(e.toLineNumber,0),NT(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=Zd.lift(e.range);return new PT(MT(t.getStartPosition()),MT(t.getEndPosition()),function(e){const t=Cu(e);return NT(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 gD(new iD(this.textModel,this.brackets),e,n,i)}getBracketsInRange(e){const t=NT(e.startLineNumber-1,e.startColumn-1),i=NT(e.endLineNumber-1,e.endColumn-1),n=new Array,o=this.initialAstWithoutTokens||this.astWithTokens;return fD(o,0,o.length,t,i,n),n}getBracketPairsInRange(e,t){const i=new Array,n=MT(e.getStartPosition()),o=MT(e.getEndPosition()),r=this.initialAstWithoutTokens||this.astWithTokens,s=new vD(i,t,this.textModel);return bD(r,0,r.length,n,o,s),i}}function fD(e,t,i,n,o,r,s=0){if(4===e.kind)for(const a of e.children)i=TT(t,a.length),AT(t,o)&&OT(i,n)&&fD(a,t,i,n,o,r,s),t=i;else if(2===e.kind){if(s++,i=TT(t,e.openingBracket.length),AT(t,o)&&OT(i,n)){const n=RT(t,i);r.push(new kT(n,s-1,!e.closingBracket))}if(t=i,e.child){const a=e.child;i=TT(t,a.length),AT(t,o)&&OT(i,n)&&fD(a,t,i,n,o,r,s),t=i}if(e.closingBracket){if(i=TT(t,e.closingBracket.length),AT(t,o)&&OT(i,n)){const e=RT(t,i);r.push(new kT(e,s-1,!1))}t=i}}else if(3===e.kind){const e=RT(t,i);r.push(new kT(e,s-1,!0))}else if(1===e.kind){const e=RT(t,i);r.push(new kT(e,s-1,!1))}}class vD{constructor(e,t,i){this.result=e,this.includeMinIndentation=t,this.textModel=i}}function bD(e,t,i,n,o,r,s=0){var a;if(2===e.kind){const n=TT(t,e.openingBracket.length);let o=-1;r.includeMinIndentation&&(o=e.computeMinIndentation(t,r.textModel)),r.result.push(new xT(RT(t,i),RT(t,n),e.closingBracket?RT(TT(n,(null===(a=e.child)||void 0===a?void 0:a.length)||0),i):void 0,s,o)),s++}let l=t;for(const t of e.children){const e=l;l=TT(l,t.length),AT(e,o)&&AT(n,l)&&bD(t,e,l,n,o,r,s)}}class wD extends Nc{constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t,this.bracketPairsTree=this._register(new Ic),this.onDidChangeEmitter=new Vc,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 Ec;this.bracketPairsTree.value=(e=i.add(new mD(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),r=this.textModel.getLanguageIdAtPosition(o.lineNumber,o.column),s=this.languageConfigurationService.getLanguageConfiguration(r).brackets;if(!s)return null;const a=s.textIsBracket[n];return a?SD(this._findMatchingBracketUp(a,o,yD(i))):null}matchBracket(e,t){const i=yD(t);return this._matchBracket(this.textModel.validatePosition(e),i)}_establishBracketSearchOffsets(e,t,i,n){const o=t.getCount(),r=t.getLanguageId(n);let s=Math.max(0,e.column-1-i.maxBracketLength);for(let e=n-1;e>=0;e--){const i=t.getEndOffset(e);if(i<=s)break;if(tp(t.getStandardTokenType(e))||t.getLanguageId(e)!==r){s=i;break}}let a=Math.min(t.getLineContent().length,e.column-1+i.maxBracketLength);for(let e=n+1;e<o;e++){const i=t.getStartOffset(e);if(i>=a)break;if(tp(t.getStandardTokenType(e))||t.getLanguageId(e)!==r){a=i;break}}return{searchStartOffset:s,searchEndOffset:a}}_matchBracket(e,t){const i=e.lineNumber,n=this.textModel.getLineTokens(i),o=this.textModel.getLineContent(i),r=n.findTokenIndexAtOffset(e.column-1);if(r<0)return null;const s=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(r)).brackets;if(s&&!tp(n.getStandardTokenType(r))){let{searchStartOffset:a,searchEndOffset:l}=this._establishBracketSearchOffsets(e,n,s,r),c=null;for(;;){const n=Ap.findNextBracketInRange(s.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,s.textIsBracket[e],s.textIsOpenBracket[e],t);if(i){if(i instanceof CD)return null;c=i}}a=n.endColumn-1}if(c)return c}if(r>0&&n.getStartOffset(r)===e.column-1){const s=r-1,a=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(s)).brackets;if(a&&!tp(n.getStandardTokenType(s))){const{searchStartOffset:r,searchEndOffset:l}=this._establishBracketSearchOffsets(e,n,a,s),c=Ap.findPrevBracketInRange(a.reversedRegex,i,o,r,l);if(c&&c.startColumn<=e.column&&e.column<=c.endColumn){const e=o.substring(c.startColumn-1,c.endColumn-1).toLowerCase(),i=this._matchFoundBracket(c,a.textIsBracket[e],a.textIsOpenBracket[e],t);if(i)return i instanceof CD?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 CD?o:[e,o]:null}_findMatchingBracketUp(e,t,i){const n=e.languageId,o=e.reversedRegex;let r=-1,s=0;const a=(t,n,a,l)=>{for(;;){if(i&&++s%100==0&&!i())return CD.INSTANCE;const c=Ap.findPrevBracketInRange(o,t,n,a,l);if(!c)break;const d=n.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(d)?r++:e.isClose(d)&&r--,0===r)return c;l=c.startColumn-1}return null};for(let e=t.lineNumber;e>=1;e--){const i=this.textModel.getLineTokens(e),o=i.getCount(),r=this.textModel.getLineContent(e);let s=o-1,l=r.length,c=r.length;e===t.lineNumber&&(s=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1);let d=!0;for(;s>=0;s--){const t=i.getLanguageId(s)===n&&!tp(i.getStandardTokenType(s));if(t)d?l=i.getStartOffset(s):(l=i.getStartOffset(s),c=i.getEndOffset(s));else if(d&&l!==c){const t=a(e,r,l,c);if(t)return t}d=t}if(d&&l!==c){const t=a(e,r,l,c);if(t)return t}}return null}_findMatchingBracketDown(e,t,i){const n=e.languageId,o=e.forwardRegex;let r=1,s=0;const a=(t,n,a,l)=>{for(;;){if(i&&++s%100==0&&!i())return CD.INSTANCE;const c=Ap.findNextBracketInRange(o,t,n,a,l);if(!c)break;const d=n.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(d)?r++:e.isClose(d)&&r--,0===r)return c;a=c.endColumn-1}return null},l=this.textModel.getLineCount();for(let e=t.lineNumber;e<=l;e++){const i=this.textModel.getLineTokens(e),o=i.getCount(),r=this.textModel.getLineContent(e);let s=0,l=0,c=0;e===t.lineNumber&&(s=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1);let d=!0;for(;s<o;s++){const t=i.getLanguageId(s)===n&&!tp(i.getStandardTokenType(s));if(t)d||(l=i.getStartOffset(s)),c=i.getEndOffset(s);else if(d&&l!==c){const t=a(e,r,l,c);if(t)return t}d=t}if(d&&l!==c){const t=a(e,r,l,c);if(t)return t}}return null}findPrevBracket(e){const t=this.textModel.validatePosition(e);let i=null,n=null;for(let e=t.lineNumber;e>=1;e--){const o=this.textModel.getLineTokens(e),r=o.getCount(),s=this.textModel.getLineContent(e);let a=r-1,l=s.length,c=s.length;if(e===t.lineNumber){a=o.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1;const e=o.getLanguageId(a);i!==e&&(i=e,n=this.languageConfigurationService.getLanguageConfiguration(i).brackets)}let d=!0;for(;a>=0;a--){const t=o.getLanguageId(a);if(i!==t){if(n&&d&&l!==c){const t=Ap.findPrevBracketInRange(n.reversedRegex,e,s,l,c);if(t)return this._toFoundBracket(n,t);d=!1}i=t,n=this.languageConfigurationService.getLanguageConfiguration(i).brackets}const r=!!n&&!tp(o.getStandardTokenType(a));if(r)d?l=o.getStartOffset(a):(l=o.getStartOffset(a),c=o.getEndOffset(a));else if(n&&d&&l!==c){const t=Ap.findPrevBracketInRange(n.reversedRegex,e,s,l,c);if(t)return this._toFoundBracket(n,t)}d=r}if(n&&d&&l!==c){const t=Ap.findPrevBracketInRange(n.reversedRegex,e,s,l,c);if(t)return this._toFoundBracket(n,t)}}return null}findNextBracket(e){const t=this.textModel.validatePosition(e),i=this.textModel.getLineCount();let n=null,o=null;for(let e=t.lineNumber;e<=i;e++){const i=this.textModel.getLineTokens(e),r=i.getCount(),s=this.textModel.getLineContent(e);let a=0,l=0,c=0;if(e===t.lineNumber){a=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1;const e=i.getLanguageId(a);n!==e&&(n=e,o=this.languageConfigurationService.getLanguageConfiguration(n).brackets)}let d=!0;for(;a<r;a++){const t=i.getLanguageId(a);if(n!==t){if(o&&d&&l!==c){const t=Ap.findNextBracketInRange(o.forwardRegex,e,s,l,c);if(t)return this._toFoundBracket(o,t);d=!1}n=t,o=this.languageConfigurationService.getLanguageConfiguration(n).brackets}const r=!!o&&!tp(i.getStandardTokenType(a));if(r)d||(l=i.getStartOffset(a)),c=i.getEndOffset(a);else if(o&&d&&l!==c){const t=Ap.findNextBracketInRange(o.forwardRegex,e,s,l,c);if(t)return this._toFoundBracket(o,t)}d=r}if(o&&d&&l!==c){const t=Ap.findNextBracketInRange(o.forwardRegex,e,s,l,c);if(t)return this._toFoundBracket(o,t)}}return null}findEnclosingBrackets(e,t){const i=yD(t),n=this.textModel.validatePosition(e),o=this.textModel.getLineCount(),r=new Map;let s=[];const a=(e,t)=>{if(!r.has(e)){const i=[];for(let e=0,n=t?t.brackets.length:0;e<n;e++)i[e]=0;r.set(e,i)}s=r.get(e)};let l=0;const c=(e,t,n,o,r)=>{for(;;){if(i&&++l%100==0&&!i())return CD.INSTANCE;const a=Ap.findNextBracketInRange(e.forwardRegex,t,n,o,r);if(!a)break;const c=n.substring(a.startColumn-1,a.endColumn-1).toLowerCase(),d=e.textIsBracket[c];if(d&&(d.isOpen(c)?s[d.index]++:d.isClose(c)&&s[d.index]--,-1===s[d.index]))return this._matchFoundBracket(a,d,!1,i);o=a.endColumn-1}return null};let d=null,h=null;for(let e=n.lineNumber;e<=o;e++){const t=this.textModel.getLineTokens(e),i=t.getCount(),o=this.textModel.getLineContent(e);let r=0,s=0,l=0;if(e===n.lineNumber){r=t.findTokenIndexAtOffset(n.column-1),s=n.column-1,l=n.column-1;const e=t.getLanguageId(r);d!==e&&(d=e,h=this.languageConfigurationService.getLanguageConfiguration(d).brackets,a(d,h))}let u=!0;for(;r<i;r++){const i=t.getLanguageId(r);if(d!==i){if(h&&u&&s!==l){const t=c(h,e,o,s,l);if(t)return SD(t);u=!1}d=i,h=this.languageConfigurationService.getLanguageConfiguration(d).brackets,a(d,h)}const n=!!h&&!tp(t.getStandardTokenType(r));if(n)u||(s=t.getStartOffset(r)),l=t.getEndOffset(r);else if(h&&u&&s!==l){const t=c(h,e,o,s,l);if(t)return SD(t)}u=n}if(h&&u&&s!==l){const t=c(h,e,o,s,l);if(t)return SD(t)}}return null}_toFoundBracket(e,t){if(!t)return null;let i=this.textModel.getValueInRange(t);i=i.toLowerCase();const n=e.textIsBracket[i];return n?{range:t,open:n.open,close:n.close,isOpen:e.textIsOpenBracket[i]}:null}}function yD(e){if(void 0===e)return()=>!0;{const t=Date.now();return()=>Date.now()-t<=e}}class CD{constructor(){this._searchCanceledBrand=void 0}}function SD(e){return e instanceof CD?null:e}CD.INSTANCE=new CD;class kD extends Nc{constructor(e){super(),this.textModel=e,this.colorProvider=new xD,this.onDidChangeEmitter=new Vc,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 e of o)n.push({id:`bracket${e.range.toString()}-${e.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(e)},ownerId:0,range:e.range});return n}getAllDecorations(e,t){return void 0===e?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new Zd(1,1,this.textModel.getLineCount(),1),e,t):[]}}class xD{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 LD(e){return e.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}hw(((e,t)=>{const i=[Ox,Mx,Rx,Px,Fx,Bx],n=new xD;t.addRule(`.monaco-editor .${n.unexpectedClosingBracketClassName} { color: ${e.getColor(Wx)}; }`);const o=i.map((t=>e.getColor(t))).filter((e=>!!e)).filter((e=>!e.isTransparent()));for(let e=0;e<30;e++){const i=o[e%o.length];t.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(e)} { color: ${i}; }`)}}));class ED{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} "${LD(this.newText)}")`:0===this.newText.length?`(delete@${this.oldPosition} "${LD(this.oldText)}")`:`(replace@${this.oldPosition} "${LD(this.oldText)}" with "${LD(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,i){const n=t.length;gp(e,n,i),i+=4;for(let o=0;o<n;o++)hp(e,t.charCodeAt(o),i),i+=2;return i}static _readString(e,t){const i=up(e,t);return wp(e,t+=4,i)}writeSize(){return 8+ED._writeStringSize(this.oldText)+ED._writeStringSize(this.newText)}write(e,t){return gp(e,this.oldPosition,t),t+=4,gp(e,this.newPosition,t),t+=4,t=ED._writeString(e,this.oldText,t),ED._writeString(e,this.newText,t)}static read(e,t,i){const n=up(e,t),o=up(e,t+=4);t+=4;const r=ED._readString(e,t);t+=ED._writeStringSize(r);const s=ED._readString(e,t);return t+=ED._writeStringSize(s),i.push(new ED(n,r,o,s)),t}}class ND{constructor(e,t){this._prevEdits=e,this._currEdits=t,this._result=[],this._resultLen=0,this._prevLen=this._prevEdits.length,this._prevDeltaOffset=0,this._currLen=this._currEdits.length,this._currDeltaOffset=0}compress(){let e=0,t=0,i=this._getPrev(e),n=this._getCurr(t);for(;e<this._prevLen||t<this._currLen;){if(null===i){this._acceptCurr(n),n=this._getCurr(++t);continue}if(null===n){this._acceptPrev(i),i=this._getPrev(++e);continue}if(n.oldEnd<=i.newPosition){this._acceptCurr(n),n=this._getCurr(++t);continue}if(i.newEnd<=n.oldPosition){this._acceptPrev(i),i=this._getPrev(++e);continue}if(n.oldPosition<i.newPosition){const[e,t]=ND._splitCurr(n,i.newPosition-n.oldPosition);this._acceptCurr(e),n=t;continue}if(i.newPosition<n.oldPosition){const[e,t]=ND._splitPrev(i,n.oldPosition-i.newPosition);this._acceptPrev(e),i=t;continue}let o,r;if(n.oldEnd===i.newEnd)o=i,r=n,i=this._getPrev(++e),n=this._getCurr(++t);else if(n.oldEnd<i.newEnd){const[e,s]=ND._splitPrev(i,n.oldLength);o=e,r=n,i=s,n=this._getCurr(++t)}else{const[t,s]=ND._splitCurr(n,i.newLength);o=i,r=t,i=this._getPrev(++e),n=s}this._result[this._resultLen++]=new ED(o.oldPosition,o.oldText,r.newPosition,r.newText),this._prevDeltaOffset+=o.newLength-o.oldLength,this._currDeltaOffset+=r.newLength-r.oldLength}const o=ND._merge(this._result);return ND._removeNoOps(o)}_acceptCurr(e){this._result[this._resultLen++]=ND._rebaseCurr(this._prevDeltaOffset,e),this._currDeltaOffset+=e.newLength-e.oldLength}_getCurr(e){return e<this._currLen?this._currEdits[e]:null}_acceptPrev(e){this._result[this._resultLen++]=ND._rebasePrev(this._currDeltaOffset,e),this._prevDeltaOffset+=e.newLength-e.oldLength}_getPrev(e){return e<this._prevLen?this._prevEdits[e]:null}static _rebaseCurr(e,t){return new ED(t.oldPosition-e,t.oldText,t.newPosition,t.newText)}static _rebasePrev(e,t){return new ED(t.oldPosition,t.oldText,t.newPosition+e,t.newText)}static _splitPrev(e,t){const i=e.newText.substr(0,t),n=e.newText.substr(t);return[new ED(e.oldPosition,e.oldText,e.newPosition,i),new ED(e.oldEnd,"",e.newPosition+t,n)]}static _splitCurr(e,t){const i=e.oldText.substr(0,t),n=e.oldText.substr(t);return[new ED(e.oldPosition,i,e.newPosition,e.newText),new ED(e.oldPosition+t,n,e.newEnd,"")]}static _merge(e){if(0===e.length)return e;const t=[];let i=0,n=e[0];for(let o=1;o<e.length;o++){const r=e[o];n.oldEnd===r.oldPosition?n=new ED(n.oldPosition,n.oldText+r.oldText,n.newPosition,n.newText+r.newText):(t[i++]=n,n=r)}return t[i++]=n,t}static _removeNoOps(e){if(0===e.length)return e;const t=[];let i=0;for(let n=0;n<e.length;n++){const o=e[n];o.oldText!==o.newText&&(t[i++]=o)}return t}}function ID(e){return 47===e||92===e}function TD(e){return e.replace(/[\\/]/g,Sd.sep)}function DD(e,t=Sd.sep){if(!e)return"";const i=e.length,n=e.charCodeAt(0);if(ID(n)){if(ID(e.charCodeAt(1))&&!ID(e.charCodeAt(2))){let n=3;const o=n;for(;n<i&&!ID(e.charCodeAt(n));n++);if(o!==n&&!ID(e.charCodeAt(n+1)))for(n+=1;n<i;n++)if(ID(e.charCodeAt(n)))return e.slice(0,n+1).replace(/[\\/]/g,t)}return t}if(((o=n)>=65&&o<=90||o>=97&&o<=122)&&58===e.charCodeAt(1))return ID(e.charCodeAt(2))?e.slice(0,2)+t:e.slice(0,2);var o;let r=e.indexOf("://");if(-1!==r)for(r+=3;r<i;r++)if(ID(e.charCodeAt(r)))return e.slice(0,r+1);return""}function AD(e,t,i,n=Td){if(e===t)return!0;if(!e||!t)return!1;if(t.length>e.length)return!1;if(i){if(!Ou(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 OD(e){return Ud(e,!0)}class MD{constructor(e){this._ignorePathCasing=e}compare(e,t,i=!1){return e===t?0:Lu(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===av.file)return AD(OD(e),OD(t),this._ignorePathCasing(e))&&e.query===t.query&&(i||e.fragment===t.fragment);if(BD(e.authority,t.authority))return AD(e.path,t.path,this._ignorePathCasing(e),"/")&&e.query===t.query&&(i||e.fragment===t.fragment)}return!1}joinPath(e,...t){return Bd.joinPath(e,...t)}basenameOrAuthority(e){return PD(e)||e.authority}basename(e){return Sd.basename(e.path)}extname(e){return Sd.extname(e.path)}dirname(e){if(0===e.path.length)return e;let t;return e.scheme===av.file?t=Bd.file(Ed(OD(e))).path:(t=Sd.dirname(e.path),e.authority&&t.length&&47!==t.charCodeAt(0)&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return t=e.scheme===av.file?Bd.file(kd(OD(e))).path:Sd.normalize(e.path),e.with({path:t})}relativePath(e,t){if(e.scheme!==t.scheme||!BD(e.authority,t.authority))return;if(e.scheme===av.file){const i=Ld(OD(e),OD(t));return Ra?TD(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);e<t&&(i.charCodeAt(e)===n.charCodeAt(e)||i.charAt(e).toLowerCase()===n.charAt(e).toLowerCase());e++);i=n.substr(0,e)+i.substr(e)}return Sd.relative(i,n)}resolvePath(e,t){if(e.scheme===av.file){const i=Bd.file(xd(OD(e),t));return e.with({authority:i.authority,path:i.path})}var i;return-1===(i=t).indexOf("/")&&(i=TD(i)),/^[a-zA-Z]:(\/|$)/.test(i)&&(i="/"+i),t=i,e.with({path:Sd.resolve(e.path,t)})}isAbsolutePath(e){return!!e.path&&"/"===e.path[0]}isEqualAuthority(e,t){return e===t||void 0!==e&&void 0!==t&&Au(e,t)}hasTrailingPathSeparator(e,t=Td){if(e.scheme===av.file){const i=OD(e);return i.length>DD(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=Td){return WD(e,t)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,t=Td){let i=!1;if(e.scheme===av.file){const n=OD(e);i=void 0!==n&&n.length===DD(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||WD(e,t)?e:e.with({path:e.path+"/"})}}const RD=new MD((()=>!1)),PD=(new MD((e=>e.scheme!==av.file||!Fa)),new MD((e=>!0)),RD.isEqual.bind(RD),RD.isEqualOrParent.bind(RD),RD.getComparisonKey.bind(RD),RD.basenameOrAuthority.bind(RD),RD.basename.bind(RD)),FD=(RD.extname.bind(RD),RD.dirname.bind(RD),RD.joinPath.bind(RD),RD.normalizePath.bind(RD)),BD=(RD.relativePath.bind(RD),RD.resolvePath.bind(RD),RD.isAbsolutePath.bind(RD),RD.isEqualAuthority.bind(RD)),WD=RD.hasTrailingPathSeparator.bind(RD);var VD;function zD(e){return e.toString()}RD.removeTrailingPathSeparator.bind(RD),RD.addTrailingPathSeparator.bind(RD),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}}(VD||(VD={}));class jD{constructor(e,t,i,n,o,r,s){this.beforeVersionId=e,this.afterVersionId=t,this.beforeEOL=i,this.afterEOL=n,this.beforeCursorState=o,this.afterCursorState=r,this.changes=s}static create(e,t){const i=e.getAlternativeVersionId(),n=UD(e);return new jD(i,i,n,n,t,t,[])}append(e,t,i,n,o){var r,s;t.length>0&&(this.changes=(s=t,null===(r=this.changes)||0===r.length?s:new ND(r,s).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(gp(e,t?t.length:0,i),i+=4,t)for(const n of t)gp(e,n.selectionStartLineNumber,i),i+=4,gp(e,n.selectionStartColumn,i),i+=4,gp(e,n.positionLineNumber,i),i+=4,gp(e,n.positionColumn,i),i+=4;return i}static _readSelections(e,t,i){const n=up(e,t);t+=4;for(let o=0;o<n;o++){const n=up(e,t),o=up(e,t+=4),r=up(e,t+=4),s=up(e,t+=4);t+=4,i.push(new Xd(n,o,r,s))}return t}serialize(){let e=10+jD._writeSelectionsSize(this.beforeCursorState)+jD._writeSelectionsSize(this.afterCursorState)+4;for(const t of this.changes)e+=t.writeSize();const t=new Uint8Array(e);let i=0;gp(t,this.beforeVersionId,i),i+=4,gp(t,this.afterVersionId,i),i+=4,mp(t,this.beforeEOL,i),i+=1,mp(t,this.afterEOL,i),i+=1,i=jD._writeSelections(t,this.beforeCursorState,i),i=jD._writeSelections(t,this.afterCursorState,i),gp(t,this.changes.length,i),i+=4;for(const e of this.changes)i=e.write(t,i);return t.buffer}static deserialize(e){const t=new Uint8Array(e);let i=0;const n=up(t,i);i+=4;const o=up(t,i);i+=4;const r=pp(t,i);i+=1;const s=pp(t,i);i+=1;const a=[];i=jD._readSelections(t,i,a);const l=[];i=jD._readSelections(t,i,l);const c=up(t,i);i+=4;const d=[];for(let e=0;e<c;e++)i=ED.read(t,i,d);return new jD(n,o,r,s,a,l,d)}}class HD{constructor(e,t){this.model=e,this._data=jD.create(e,t)}get type(){return 0}get resource(){return Bd.isUri(this.model)?this.model:this.model.uri}get label(){return ma(0,"Typing")}toString(){return(this._data instanceof jD?this._data:jD.deserialize(this._data)).changes.map((e=>e.toString())).join(", ")}matchesResource(e){return(Bd.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 jD}append(e,t,i,n,o){this._data instanceof jD&&this._data.append(e,t,i,n,o)}close(){this._data instanceof jD&&(this._data=this._data.serialize())}open(){this._data instanceof jD||(this._data=jD.deserialize(this._data))}undo(){if(Bd.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof jD&&(this._data=this._data.serialize());const e=jD.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(Bd.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof jD&&(this._data=this._data.serialize());const e=jD.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof jD&&(this._data=this._data.serialize()),this._data.byteLength+168}}function UD(e){return"\n"===e.getEOL()?0:1}function $D(e){return!!e&&(e instanceof HD||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 e of this._editStackElementsArr){const t=zD(e.resource);this._editStackElementsMap.set(t,e)}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=zD(e);return this._editStackElementsMap.has(t)}setModel(e){const t=zD(Bd.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=zD(e.uri);return!!this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).canAppend(e)}append(e,t,i,n,o){const r=zD(e.uri);this._editStackElementsMap.get(r).append(e,t,i,n,o)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const e of this._editStackElementsArr)e.undo()}redo(){for(const e of this._editStackElementsArr)e.redo()}heapSize(e){const t=zD(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(`${PD(t.resource)}: ${t}`);return`{${e.join(", ")}}`}})}class KD{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);$D(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);$D(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e){const t=this._undoRedoService.getLastElement(this._model.uri);if($D(t)&&t.canAppend(this._model))return t;const i=new HD(this._model,e);return this._undoRedoService.pushElement(i),i}pushEOL(e){const t=this._getOrCreateEditStackElement(null);this._model.setEOL(e),t.append(this._model,[],UD(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,i){const n=this._getOrCreateEditStackElement(e),o=this._model.applyEdits(t,!0),r=KD._computeCursorState(i,o),s=o.map(((e,t)=>({index:t,textChange:e.textChange})));return s.sort(((e,t)=>e.textChange.oldPosition===t.textChange.oldPosition?e.index-t.index:e.textChange.oldPosition-t.textChange.oldPosition)),n.append(this._model,s.map((e=>e.textChange)),UD(this._model),this._model.getAlternativeVersionId(),r),r}static _computeCursorState(e,t){try{return e?e(t):null}catch(e){return gc(e),null}}}class qD{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function GD(e,t,i,n,o){let r;for(o.spacesDiff=0,o.looksLikeAlignment=!1,r=0;r<t&&r<n&&e.charCodeAt(r)===i.charCodeAt(r);r++);let s=0,a=0;for(let i=r;i<t;i++)32===e.charCodeAt(i)?s++:a++;let l=0,c=0;for(let e=r;e<n;e++)32===i.charCodeAt(e)?l++:c++;if(s>0&&a>0)return;if(l>0&&c>0)return;const d=Math.abs(a-c),h=Math.abs(s-l);if(0===d)return o.spacesDiff=h,void(h>0&&0<=l-1&&l-1<e.length&&l<i.length&&32!==i.charCodeAt(l)&&32===e.charCodeAt(l-1)&&44===e.charCodeAt(e.length-1)&&(o.looksLikeAlignment=!0));h%d!=0||(o.spacesDiff=h/d)}function YD(e,t,i){const n=Math.min(e.getLineCount(),1e4);let o=0,r=0,s="",a=0;const l=[2,4,6,8,3,5,7],c=[0,0,0,0,0,0,0,0,0],d=new qD;for(let l=1;l<=n;l++){const n=e.getLineLength(l),h=e.getLineContent(l),u=n<=65536;let g=!1,p=0,m=0,f=0;for(let t=0,i=n;t<i;t++){const i=u?h.charCodeAt(t):e.getLineCharCode(l,t);if(9===i)f++;else{if(32!==i){g=!0,p=t;break}m++}}if(!g)continue;if(f>0?o++:m>1&&r++,GD(s,a,h,p,d),d.looksLikeAlignment&&(!i||t!==d.spacesDiff))continue;const _=d.spacesDiff;_<=8&&c[_]++,s=h,a=p}let h=i;o!==r&&(h=o<r);let u=t;if(h){let e=h?0:.1*n;l.forEach((t=>{const i=c[t];i>e&&(e=i,u=t)})),4===u&&c[4]>0&&c[2]>0&&c[2]>=c[4]/2&&(u=2)}return{insertSpaces:h,tabSize:u}}function ZD(e){return(1&e.metadata)>>>0}function XD(e,t){e.metadata=254&e.metadata|t<<0}function JD(e){return(2&e.metadata)>>>1==1}function QD(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function eA(e){return(4&e.metadata)>>>2==1}function tA(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function iA(e,t){e.metadata=231&e.metadata|t<<3}function nA(e,t){e.metadata=223&e.metadata|(t?1:0)<<5}class oA{constructor(e,t,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,XD(this,1),this.start=t,this.end=i,this.delta=0,this.maxEnd=i,this.id=e,this.ownerId=0,this.options=null,tA(this,!1),iA(this,1),nA(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=null,QD(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;tA(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),iA(this,this.options.stickiness),nA(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 rA=new oA(null,0,0);rA.parent=rA,rA.left=rA,rA.right=rA,XD(rA,0);class sA{constructor(){this.root=rA,this.requestNormalizeDelta=!1}intervalSearch(e,t,i,n,o){return this.root===rA?[]:function(e,t,i,n,o,r){let s=e.root,a=0,l=0,c=0,d=0;const h=[];let u=0;for(;s!==rA;)if(JD(s))QD(s.left,!1),QD(s.right,!1),s===s.parent.right&&(a-=s.parent.delta),s=s.parent;else{if(!JD(s.left)){if(l=a+s.maxEnd,l<t){QD(s,!0);continue}if(s.left!==rA){s=s.left;continue}}if(c=a+s.start,c>i)QD(s,!0);else{if(d=a+s.end,d>=t){s.setCachedOffsets(c,d,r);let e=!0;n&&s.ownerId&&s.ownerId!==n&&(e=!1),o&&eA(s)&&(e=!1),e&&(h[u++]=s)}QD(s,!0),s.right===rA||JD(s.right)||(a+=s.delta,s=s.right)}}return QD(e.root,!1),h}(this,e,t,i,n,o)}search(e,t,i){return this.root===rA?[]:function(e,t,i,n){let o=e.root,r=0,s=0,a=0;const l=[];let c=0;for(;o!==rA;){if(JD(o)){QD(o.left,!1),QD(o.right,!1),o===o.parent.right&&(r-=o.parent.delta),o=o.parent;continue}if(o.left!==rA&&!JD(o.left)){o=o.left;continue}s=r+o.start,a=r+o.end,o.setCachedOffsets(s,a,n);let e=!0;t&&o.ownerId&&o.ownerId!==t&&(e=!1),i&&eA(o)&&(e=!1),e&&(l[c++]=o),QD(o,!0),o.right===rA||JD(o.right)||(r+=o.delta,o=o.right)}return QD(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!==rA;)JD(i)?(QD(i.left,!1),QD(i.right,!1),i=i.parent):i.left===rA||JD(i.left)?(i.ownerId===t&&(n[o++]=i),QD(i,!0),i.right===rA||JD(i.right)||(i=i.right)):i=i.left;return QD(e.root,!1),n}(this,e)}collectNodesPostOrder(){return function(e){let t=e.root;const i=[];let n=0;for(;t!==rA;)JD(t)?(QD(t.left,!1),QD(t.right,!1),t=t.parent):t.left===rA||JD(t.left)?t.right===rA||JD(t.right)?(i[n++]=t,QD(t,!0)):t=t.right:t=t.left;return QD(e.root,!1),i}(this)}insert(e){cA(this,e),this._normalizeDeltaIfNecessary()}delete(e){dA(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,r=i.end+n;i.setCachedOffsets(o,r,t)}acceptReplace(e,t,i,n){const o=function(e,t,i){let n=e.root,o=0,r=0,s=0,a=0;const l=[];let c=0;for(;n!==rA;)if(JD(n))QD(n.left,!1),QD(n.right,!1),n===n.parent.right&&(o-=n.parent.delta),n=n.parent;else{if(!JD(n.left)){if(r=o+n.maxEnd,r<t){QD(n,!0);continue}if(n.left!==rA){n=n.left;continue}}s=o+n.start,s>i?QD(n,!0):(a=o+n.end,a>=t&&(n.setCachedOffsets(s,a,0),l[c++]=n),QD(n,!0),n.right===rA||JD(n.right)||(o+=n.delta,n=n.right))}return QD(e.root,!1),l}(this,e,e+t);for(let e=0,t=o.length;e<t;e++)dA(this,o[e]);this._normalizeDeltaIfNecessary(),function(e,t,i,n){let o=e.root,r=0,s=0,a=0;const l=n-(i-t);for(;o!==rA;)if(JD(o))QD(o.left,!1),QD(o.right,!1),o===o.parent.right&&(r-=o.parent.delta),mA(o),o=o.parent;else{if(!JD(o.left)){if(s=r+o.maxEnd,s<t){QD(o,!0);continue}if(o.left!==rA){o=o.left;continue}}a=r+o.start,a>i?(o.start+=l,o.end+=l,o.delta+=l,(o.delta<-1073741824||o.delta>1073741824)&&(e.requestNormalizeDelta=!0),QD(o,!0)):(QD(o,!0),o.right===rA||JD(o.right)||(r+=o.delta,o=o.right))}QD(e.root,!1)}(this,e,e+t,i),this._normalizeDeltaIfNecessary();for(let r=0,s=o.length;r<s;r++){const s=o[r];s.start=s.cachedAbsoluteStart,s.end=s.cachedAbsoluteEnd,lA(s,e,e+t,i,n),s.maxEnd=s.end,cA(this,s)}this._normalizeDeltaIfNecessary()}_normalizeDeltaIfNecessary(){this.requestNormalizeDelta&&(this.requestNormalizeDelta=!1,function(e){let t=e.root,i=0;for(;t!==rA;)t.left===rA||JD(t.left)?t.right===rA||JD(t.right)?(t.start=i+t.start,t.end=i+t.end,t.delta=0,mA(t),QD(t,!0),QD(t.left,!1),QD(t.right,!1),t===t.parent.right&&(i-=t.parent.delta),t=t.parent):(i+=t.delta,t=t.right):t=t.left;QD(e.root,!1)}(this))}}function aA(e,t,i,n){return e<i||!(e>i)&&1!==n&&(2===n||t)}function lA(e,t,i,n,o){const r=function(e){return(24&e.metadata)>>>3}(e),s=0===r||2===r,a=1===r||2===r,l=i-t,c=n,d=Math.min(l,c),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&&aA(h,s,t,e)&&(u=!0),!p&&aA(g,a,t,e)&&(p=!0)}if(d>0&&!o){const e=l>c?2:0;!u&&aA(h,s,t+d,e)&&(u=!0),!p&&aA(g,a,t+d,e)&&(p=!0)}{const n=o?1:0;!u&&aA(h,s,i,n)&&(e.start=t+c,u=!0),!p&&aA(g,a,i,n)&&(e.end=t+c,p=!0)}const m=c-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 cA(e,t){if(e.root===rA)return t.parent=rA,t.left=rA,t.right=rA,XD(t,0),e.root=t,e.root;!function(e,t){let i=0,n=e.root;const o=t.start,r=t.end;for(;;)if(s=o,a=r,l=n.start+i,c=n.end+i,(s===l?a-c:s-l)<0){if(n.left===rA){t.start-=i,t.end-=i,t.maxEnd-=i,n.left=t;break}n=n.left}else{if(n.right===rA){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}var s,a,l,c;t.parent=n,t.left=rA,t.right=rA,XD(t,1)}(e,t),fA(t.parent);let i=t;for(;i!==e.root&&1===ZD(i.parent);)if(i.parent===i.parent.parent.left){const t=i.parent.parent.right;1===ZD(t)?(XD(i.parent,0),XD(t,0),XD(i.parent.parent,1),i=i.parent.parent):(i===i.parent.right&&(i=i.parent,uA(e,i)),XD(i.parent,0),XD(i.parent.parent,1),gA(e,i.parent.parent))}else{const t=i.parent.parent.left;1===ZD(t)?(XD(i.parent,0),XD(t,0),XD(i.parent.parent,1),i=i.parent.parent):(i===i.parent.left&&(i=i.parent,gA(e,i)),XD(i.parent,0),XD(i.parent.parent,1),uA(e,i.parent.parent))}return XD(e.root,0),t}function dA(e,t){let i,n;if(t.left===rA?(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===rA?(i=t.left,n=t):(n=function(e){for(;e.left!==rA;)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,XD(i,0),t.detach(),hA(),mA(i),void(e.root.parent=rA);const o=1===ZD(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,XD(n,ZD(t)),t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==rA&&(n.left.parent=n),n.right!==rA&&(n.right.parent=n)),t.detach(),o)return fA(i.parent),n!==t&&(fA(n),fA(n.parent)),void hA();let r;for(fA(i),fA(i.parent),n!==t&&(fA(n),fA(n.parent));i!==e.root&&0===ZD(i);)i===i.parent.left?(r=i.parent.right,1===ZD(r)&&(XD(r,0),XD(i.parent,1),uA(e,i.parent),r=i.parent.right),0===ZD(r.left)&&0===ZD(r.right)?(XD(r,1),i=i.parent):(0===ZD(r.right)&&(XD(r.left,0),XD(r,1),gA(e,r),r=i.parent.right),XD(r,ZD(i.parent)),XD(i.parent,0),XD(r.right,0),uA(e,i.parent),i=e.root)):(r=i.parent.left,1===ZD(r)&&(XD(r,0),XD(i.parent,1),gA(e,i.parent),r=i.parent.left),0===ZD(r.left)&&0===ZD(r.right)?(XD(r,1),i=i.parent):(0===ZD(r.left)&&(XD(r.right,0),XD(r,1),uA(e,r),r=i.parent.left),XD(r,ZD(i.parent)),XD(i.parent,0),XD(r.left,0),gA(e,i.parent),i=e.root));XD(i,0),hA()}function hA(){rA.parent=rA,rA.delta=0,rA.start=0,rA.end=0}function uA(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!==rA&&(i.left.parent=t),i.parent=t.parent,t.parent===rA?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i,mA(t),mA(i)}function gA(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!==rA&&(i.right.parent=t),i.parent=t.parent,t.parent===rA?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i,mA(t),mA(i)}function pA(e){let t=e.end;if(e.left!==rA){const i=e.left.maxEnd;i>t&&(t=i)}if(e.right!==rA){const i=e.right.maxEnd+e.delta;i>t&&(t=i)}return t}function mA(e){e.maxEnd=pA(e)}function fA(e){for(;e!==rA;){const t=pA(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}class _A{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!==vA)return bA(this.right);let e=this;for(;e.parent!==vA&&e.parent.left!==e;)e=e.parent;return e.parent===vA?vA:e.parent}prev(){if(this.left!==vA)return wA(this.left);let e=this;for(;e.parent!==vA&&e.parent.right!==e;)e=e.parent;return e.parent===vA?vA:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const vA=new _A(null,0);function bA(e){for(;e.left!==vA;)e=e.left;return e}function wA(e){for(;e.right!==vA;)e=e.right;return e}function yA(e){return e===vA?0:e.size_left+e.piece.length+yA(e.right)}function CA(e){return e===vA?0:e.lf_left+e.piece.lineFeedCnt+CA(e.right)}function SA(){vA.parent=vA}function kA(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!==vA&&(i.left.parent=t),i.parent=t.parent,t.parent===vA?e.root=i:t.parent.left===t?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i}function xA(e,t){const i=t.left;t.left=i.right,i.right!==vA&&(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===vA?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i}function LA(e,t){let i,n;if(t.left===vA?(n=t,i=n.right):t.right===vA?(n=t,i=n.left):(n=bA(t.right),i=n.right),n===e.root)return e.root=i,i.color=0,t.detach(),SA(),void(e.root.parent=vA);const o=1===n.color;if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?(i.parent=n.parent,IA(e,i)):(n.parent===t?i.parent=n:i.parent=n.parent,IA(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!==vA&&(n.left.parent=n),n.right!==vA&&(n.right.parent=n),n.size_left=t.size_left,n.lf_left=t.lf_left,IA(e,n)),t.detach(),i.parent.left===i){const t=yA(i),n=CA(i);if(t!==i.parent.size_left||n!==i.parent.lf_left){const o=t-i.parent.size_left,r=n-i.parent.lf_left;i.parent.size_left=t,i.parent.lf_left=n,NA(e,i.parent,o,r)}}if(IA(e,i.parent),o)return void SA();let r;for(;i!==e.root&&0===i.color;)i===i.parent.left?(r=i.parent.right,1===r.color&&(r.color=0,i.parent.color=1,kA(e,i.parent),r=i.parent.right),0===r.left.color&&0===r.right.color?(r.color=1,i=i.parent):(0===r.right.color&&(r.left.color=0,r.color=1,xA(e,r),r=i.parent.right),r.color=i.parent.color,i.parent.color=0,r.right.color=0,kA(e,i.parent),i=e.root)):(r=i.parent.left,1===r.color&&(r.color=0,i.parent.color=1,xA(e,i.parent),r=i.parent.left),0===r.left.color&&0===r.right.color?(r.color=1,i=i.parent):(0===r.left.color&&(r.right.color=0,r.color=1,kA(e,r),r=i.parent.left),r.color=i.parent.color,i.parent.color=0,r.left.color=0,xA(e,i.parent),i=e.root));i.color=0,SA()}function EA(e,t){for(IA(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&&kA(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,xA(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&&xA(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,kA(e,t.parent.parent))}e.root.color=0}function NA(e,t,i,n){for(;t!==e.root&&t!==vA;)t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}function IA(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=yA((t=t.parent).left)-t.size_left,n=CA(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}}vA.parent=vA,vA.left=vA,vA.right=vA,vA.color=0;const TA=65535;function DA(e){let t;return t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length),t.set(e,0),t}class AA{constructor(e,t,i,n,o){this.lineStarts=e,this.cr=t,this.lf=i,this.crlf=n,this.isBasicASCII=o}}function OA(e,t=!0){const i=[0];let n=1;for(let t=0,o=e.length;t<o;t++){const r=e.charCodeAt(t);13===r?t+1<o&&10===e.charCodeAt(t+1)?(i[n++]=t+2,t++):i[n++]=t+1:10===r&&(i[n++]=t+1)}return t?DA(i):i}class MA{constructor(e,t,i,n,o){this.bufferIndex=e,this.start=t,this.end=i,this.lineFeedCnt=n,this.length=o}}class RA{constructor(e,t){this.buffer=e,this.lineStarts=t}}class PA{constructor(e,t){this._pieces=[],this._tree=e,this._BOM=t,this._index=0,e.root!==vA&&e.iterate(e.root,(e=>(e!==vA&&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 FA{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&&i.nodeStartLineNumber+i.node.piece.lineFeedCnt>=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<i.length;n++){const o=i[n];(null===o.node.parent||o.nodeStartOffset>=e)&&(i[n]=null,t=!0)}if(t){const e=[];for(const t of i)null!==t&&e.push(t);this._cache=e}}}class BA{constructor(e,t,i){this.create(e,t,i)}create(e,t,i){this._buffers=[new RA("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=vA,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=i;let n=null;for(let t=0,i=e.length;t<i;t++)if(e[t].buffer.length>0){e[t].lineStarts||(e[t].lineStarts=OA(e[t].buffer));const i=new MA(t+1,{line:0,column:0},{line:e[t].lineStarts.length-1,column:e[t].buffer.length-e[t].lineStarts[e[t].lineStarts.length-1]},e[t].lineStarts.length-1,e[t].buffer.length);this._buffers.push(e[t]),n=this.rbInsertRight(n,i)}this._searchCache=new FA(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){const t=65535-Math.floor(21845),i=2*t;let n="",o=0;const r=[];if(this.iterate(this.root,(s=>{const a=this.getNodeContent(s),l=a.length;if(o<=t||o+l<i)return n+=a,o+=l,!0;const c=n.replace(/\r\n|\r|\n/g,e);return r.push(new RA(c,OA(c))),n=a,o=l,!0})),o>0){const t=n.replace(/\r\n|\r|\n/g,e);r.push(new RA(t,OA(t)))}this.create(r,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new PA(this,e)}getOffsetAt(e,t){let i=0,n=this.root;for(;n!==vA;)if(n.left!==vA&&n.lf_left+1>=e)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt+1>=e)return i+=n.size_left,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!==vA;)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 Yd(i+1,n-e+1)}return new Yd(i+1,o.remainder+1)}if(e-=t.size_left+t.piece.length,i+=t.lf_left+t.piece.lineFeedCnt,t.right===vA){const t=this.getOffsetAt(i+1,1);return new Yd(i+1,n-e-t+1)}t=t.right}return new Yd(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 r=n.substring(o+e.remainder,o+i.piece.length);for(i=i.next();i!==vA;){const e=this._buffers[i.piece.bufferIndex].buffer,n=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(i===t.node){r+=e.substring(n,n+t.remainder);break}r+=e.substr(n,i.piece.length),i=i.next()}return r}getLinesContent(){const e=[];let t=0,i="",n=!1;return this.iterate(this.root,(o=>{if(o===vA)return!0;const r=o.piece;let s=r.length;if(0===s)return!0;const a=this._buffers[r.bufferIndex].buffer,l=this._buffers[r.bufferIndex].lineStarts,c=r.start.line,d=r.end.line;let h=l[c]+r.start.column;if(n&&(10===a.charCodeAt(h)&&(h++,s--),e[t++]=i,i="",n=!1,0===s))return!0;if(c===d)return this._EOLNormalized||13!==a.charCodeAt(h+s-1)?i+=a.substr(h,s):(n=!0,i+=a.substr(h,s-1)),!0;i+=this._EOLNormalized?a.substring(h,Math.max(h,l[c+1]-this._EOLLength)):a.substring(h,l[c+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;for(let n=c+1;n<d;n++)i=this._EOLNormalized?a.substring(l[n],l[n+1]-this._EOLLength):a.substring(l[n],l[n+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;return this._EOLNormalized||13!==a.charCodeAt(l[d]+r.end.column-1)?i=a.substr(l[d],r.end.column):(n=!0,0===r.end.column?t--:i=a.substr(l[d],r.end.column-1)),!0})),n&&(e[t++]=i,i=""),e[t++]=i,e}getLength(){return this._length}getLineCount(){return this._lineCnt}getLineContent(e){return this._lastVisitedLine.lineNumber===e||(this._lastVisitedLine.lineNumber=e,e===this._lineCnt?this._lastVisitedLine.value=this.getLineRawContent(e):this._EOLNormalized?this._lastVisitedLine.value=this.getLineRawContent(e,this._EOLLength):this._lastVisitedLine.value=this.getLineRawContent(e).replace(/(\r\n|\r|\n)$/,"")),this._lastVisitedLine.value}_getCharCode(e){if(e.remainder===e.node.piece.length){const t=e.node.next();if(!t)return 0;const i=this._buffers[t.piece.bufferIndex],n=this.offsetInBuffer(t.piece.bufferIndex,t.piece.start);return i.buffer.charCodeAt(n)}{const t=this._buffers[e.node.piece.bufferIndex],i=this.offsetInBuffer(e.node.piece.bufferIndex,e.node.piece.start)+e.remainder;return t.buffer.charCodeAt(i)}}getLineCharCode(e,t){const i=this.nodeAt2(e,t+1);return this._getCharCode(i)}getLineLength(e){if(e===this.getLineCount()){const t=this.getOffsetAt(e,1);return this.getLength()-t}return this.getOffsetAt(e+1,1)-this.getOffsetAt(e,1)-this._EOLLength}findMatchesInNode(e,t,i,n,o,r,s,a,l,c,d){const h=this._buffers[e.piece.bufferIndex],u=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start),g=this.offsetInBuffer(e.piece.bufferIndex,o),p=this.offsetInBuffer(e.piece.bufferIndex,r);let m;const f={line:0,column:0};let _,v;t._wordSeparators?(_=h.buffer.substring(g,p),v=e=>e+g,t.reset(0)):(_=h.buffer,v=e=>e,t.reset(g));do{if(m=t.next(_),m){if(v(m.index)>=p)return c;this.positionInBuffer(e,v(m.index)-u,f);const t=this.getLineFeedCnt(e.piece.bufferIndex,o,f),r=f.line===o.line?f.column-o.column+n:f.column+1,s=r+m[0].length;if(d[c++]=xf(new Zd(i+t,r,i+t,s),m,a),v(m.index)+m[0].length>=p)return c;if(c>=l)return c}}while(m);return c}findMatchesLineByLine(e,t,i,n){const o=[];let r=0;const s=new If(t.wordSeparators,t.regex);let a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];const l=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===l)return[];let c=this.positionInBuffer(a.node,a.remainder);const d=this.positionInBuffer(l.node,l.remainder);if(a.node===l.node)return this.findMatchesInNode(a.node,s,e.startLineNumber,e.startColumn,c,d,t,i,n,r,o),o;let h=e.startLineNumber,u=a.node;for(;u!==l.node;){const l=this.getLineFeedCnt(u.piece.bufferIndex,c,u.piece.end);if(l>=1){const a=this._buffers[u.piece.bufferIndex].lineStarts,d=this.offsetInBuffer(u.piece.bufferIndex,u.piece.start),g=a[c.line+l],p=h===e.startLineNumber?e.startColumn:1;if(r=this.findMatchesInNode(u,s,h,p,c,this.positionInBuffer(u,g-d),t,i,n,r,o),r>=n)return o;h+=l}const d=h===e.startLineNumber?e.startColumn-1:0;if(h===e.endLineNumber){const a=this.getLineContent(h).substring(d,e.endColumn-1);return r=this._findMatchesInLine(t,s,a,e.endLineNumber,d,r,o,i,n),o}if(r=this._findMatchesInLine(t,s,this.getLineContent(h).substr(d),h,d,r,o,i,n),r>=n)return o;h++,a=this.nodeAt2(h,1),u=a.node,c=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 r=this._findMatchesInLine(t,s,l,e.endLineNumber,a,r,o,i,n),o}const g=h===e.startLineNumber?e.startColumn:1;return r=this.findMatchesInNode(l.node,s,h,g,c,d,t,i,n,r,o),o}_findMatchesInLine(e,t,i,n,o,r,s,a,l){const c=e.wordSeparators;if(!a&&e.simpleSearch){const t=e.simpleSearch,a=t.length,d=i.length;let h=-a;for(;-1!==(h=i.indexOf(t,h+a));)if((!c||Nf(c,i,d,h,a))&&(s[r++]=new $g(new Zd(n,h+1+o,n,h+1+a+o),null),r>=l))return r;return r}let d;t.reset(0);do{if(d=t.next(i),d&&(s[r++]=xf(new Zd(n,d.index+1+o,n,d.index+1+d[0].length+o),d,a),r>=l))return r}while(d);return r}insert(e,t,i=!1){if(this._EOLNormalized=this._EOLNormalized&&i,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==vA){const{node:i,remainder:n,nodeStartOffset:o}=this.nodeAt(e),r=i.piece,s=r.bufferIndex,a=this.positionInBuffer(i,n);if(0===i.piece.bufferIndex&&r.end.line===this._lastChangeBufferPos.line&&r.end.column===this._lastChangeBufferPos.column&&o+r.length===e&&t.length<TA)return this.appendToNode(i,t),void this.computeBufferMetadata();if(o===e)this.insertContentToNodeLeft(t,i),this._searchCache.validate(e);else if(o+i.piece.length>e){const e=[];let o=new MA(r.bufferIndex,a,r.end,this.getLineFeedCnt(r.bufferIndex,a,r.end),this.offsetInBuffer(s,r.end)-this.offsetInBuffer(s,a));if(this.shouldCheckCRLF()&&this.endWithCR(t)&&10===this.nodeCharCodeAt(i,n)){const e={line:o.start.line+1,column:0};o=new MA(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 c=i;for(let e=0;e<l.length;e++)c=this.rbInsertRight(c,l[e]);this.deleteNodes(e)}else this.insertContentToNodeRight(t,i)}else{const e=this.createNewPieces(t);let i=this.rbInsertLeft(null,e[0]);for(let t=1;t<e.length;t++)i=this.rbInsertRight(i,e[t])}this.computeBufferMetadata()}delete(e,t){if(this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",t<=0||this.root===vA)return;const i=this.nodeAt(e),n=this.nodeAt(e+t),o=i.node,r=n.node;if(o===r){const r=this.positionInBuffer(o,i.remainder),s=this.positionInBuffer(o,n.remainder);if(i.nodeStartOffset===e){if(t===o.piece.length){const e=o.next();return LA(this,o),this.validateCRLFWithPrevNode(e),void this.computeBufferMetadata()}return this.deleteNodeHead(o,s),this._searchCache.validate(e),this.validateCRLFWithPrevNode(o),void this.computeBufferMetadata()}return i.nodeStartOffset+o.piece.length===e+t?(this.deleteNodeTail(o,r),this.validateCRLFWithNextNode(o),void this.computeBufferMetadata()):(this.shrinkNode(o,r,s),void this.computeBufferMetadata())}const s=[],a=this.positionInBuffer(o,i.remainder);this.deleteNodeTail(o,a),this._searchCache.validate(e),0===o.piece.length&&s.push(o);const l=this.positionInBuffer(r,n.remainder);this.deleteNodeHead(r,l),0===r.piece.length&&s.push(r);for(let e=o.next();e!==vA&&e!==r;e=e.next())s.push(e);const c=0===o.piece.length?o.prev():o;this.deleteNodes(s),this.validateCRLFWithNextNode(c),this.computeBufferMetadata()}insertContentToNodeLeft(e,t){const i=[];if(this.shouldCheckCRLF()&&this.endWithCR(e)&&this.startWithLF(t)){const n=t.piece,o={line:n.start.line+1,column:0},r=new MA(n.bufferIndex,o,n.end,this.getLineFeedCnt(n.bufferIndex,o,n.end),n.length-1);t.piece=r,e+="\n",NA(this,t,-1,-1),0===t.piece.length&&i.push(t)}const n=this.createNewPieces(e);let o=this.rbInsertLeft(t,n[n.length-1]);for(let e=n.length-2;e>=0;e--)o=this.rbInsertLeft(o,n[e]);this.validateCRLFWithPrevNode(o),this.deleteNodes(i)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");const i=this.createNewPieces(e),n=this.rbInsertRight(t,i[0]);let o=n;for(let e=1;e<i.length;e++)o=this.rbInsertRight(o,i[e]);this.validateCRLFWithPrevNode(n)}positionInBuffer(e,t,i){const n=e.piece,o=e.piece.bufferIndex,r=this._buffers[o].lineStarts,s=r[n.start.line]+n.start.column+t;let a=n.start.line,l=n.end.line,c=0,d=0,h=0;for(;a<=l&&(c=a+(l-a)/2|0,h=r[c],c!==l);)if(d=r[c+1],s<h)l=c-1;else{if(!(s>=d))break;a=c+1}return i?(i.line=c,i.column=s-h,null):{line:c,column:s-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],r=n[i.line]+i.column;if(o>r+1)return i.line-t.line;const s=r-1;return 13===this._buffers[e].buffer.charCodeAt(s)?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;t<e.length;t++)LA(this,e[t])}createNewPieces(e){if(e.length>TA){const t=[];for(;e.length>TA;){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,TA),e=e.substring(TA));const o=OA(n);t.push(new MA(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 RA(n,o))}const i=OA(e);return t.push(new MA(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 RA(e,i)),t}let t=this._buffers[0].buffer.length;const i=OA(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<i.length;e++)i[e]+=t+1;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(i.slice(1)),this._buffers[0].buffer+="_"+e,t+=1}else{if(0!==t)for(let e=0;e<i.length;e++)i[e]+=t;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(i.slice(1)),this._buffers[0].buffer+=e}const o=this._buffers[0].buffer.length,r=this._buffers[0].lineStarts.length-1,s={line:r,column:o-this._buffers[0].lineStarts[r]},a=new MA(0,n,s,this.getLineFeedCnt(0,n,s),o-t);return this._lastChangeBufferPos=s,[a]}getLineRawContent(e,t=0){let i=this.root,n="";const o=this._searchCache.get2(e);if(o){i=o.node;const r=this.getAccumulatedValue(i,e-o.nodeStartLineNumber-1),s=this._buffers[i.piece.bufferIndex].buffer,a=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(o.nodeStartLineNumber+i.piece.lineFeedCnt!==e){const n=this.getAccumulatedValue(i,e-o.nodeStartLineNumber);return s.substring(a+r,a+n-t)}n=s.substring(a+r,a+i.piece.length)}else{let o=0;const r=e;for(;i!==vA;)if(i.left!==vA&&i.lf_left>=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),s=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:r-(e-1-i.lf_left)}),a.substring(l+n,l+s-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,r=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n=o.substring(r+t,r+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!==vA;){const e=this._buffers[i.piece.bufferIndex].buffer;if(i.piece.lineFeedCnt>0){const o=this.getAccumulatedValue(i,0),r=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n+=e.substring(r,r+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!==vA;)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),r=t,s=this.offsetInBuffer(i.bufferIndex,r),a=this.getLineFeedCnt(i.bufferIndex,i.start,r),l=a-n,c=s-o,d=i.length+c;e.piece=new MA(i.bufferIndex,i.start,r,a,d),NA(this,e,c,l)}deleteNodeHead(e,t){const i=e.piece,n=i.lineFeedCnt,o=this.offsetInBuffer(i.bufferIndex,i.start),r=t,s=this.getLineFeedCnt(i.bufferIndex,r,i.end),a=s-n,l=o-this.offsetInBuffer(i.bufferIndex,r),c=i.length+l;e.piece=new MA(i.bufferIndex,r,i.end,s,c),NA(this,e,l,a)}shrinkNode(e,t,i){const n=e.piece,o=n.start,r=n.end,s=n.length,a=n.lineFeedCnt,l=t,c=this.getLineFeedCnt(n.bufferIndex,n.start,l),d=this.offsetInBuffer(n.bufferIndex,t)-this.offsetInBuffer(n.bufferIndex,o);e.piece=new MA(n.bufferIndex,n.start,l,c,d),NA(this,e,d-s,c-a);const h=new MA(n.bufferIndex,i,r,this.getLineFeedCnt(n.bufferIndex,i,r),this.offsetInBuffer(n.bufferIndex,r)-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=OA(t,!1);for(let e=0;e<o.length;e++)o[e]+=n;if(i){const e=this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-2];this._buffers[0].lineStarts.pop(),this._lastChangeBufferPos={line:this._lastChangeBufferPos.line-1,column:n-e}}this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(o.slice(1));const r=this._buffers[0].lineStarts.length-1,s={line:r,column:this._buffers[0].buffer.length-this._buffers[0].lineStarts[r]},a=e.piece.length+t.length,l=e.piece.lineFeedCnt,c=this.getLineFeedCnt(0,e.piece.start,s),d=c-l;e.piece=new MA(e.piece.bufferIndex,e.piece.start,s,c,a),this._lastChangeBufferPos=s,NA(this,e,t.length,d)}nodeAt(e){let t=this.root;const i=this._searchCache.get(e);if(i)return{node:i.node,nodeStartOffset:i.nodeStartOffset,remainder:e-i.nodeStartOffset};let n=0;for(;t!==vA;)if(t.size_left>e)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!==vA;)if(i.left!==vA&&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),r=this.getAccumulatedValue(i,e-i.lf_left-1);return n+=i.size_left,{node:i,remainder:Math.min(o+t-1,r),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!==vA;){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===vA||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;return n!==i.length-1&&(!(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!==vA&&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 r=e.piece.length-1,s=e.piece.lineFeedCnt-1;e.piece=new MA(e.piece.bufferIndex,e.piece.start,o,s,r),NA(this,e,-1,-1),0===e.piece.length&&i.push(e);const a={line:t.piece.start.line+1,column:0},l=t.piece.length-1,c=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new MA(t.piece.bufferIndex,a,t.piece.end,c,l),NA(this,t,-1,-1),0===t.piece.length&&i.push(t);const d=this.createNewPieces("\r\n");this.rbInsertRight(e,d[0]);for(let e=0;e<i.length;e++)LA(this,i[e])}adjustCarriageReturnFromNext(e,t){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const i=t.next();if(this.startWithLF(i)){if(e+="\n",1===i.piece.length)LA(this,i);else{const e=i.piece,t={line:e.start.line+1,column:0},n=e.length-1,o=this.getLineFeedCnt(e.bufferIndex,t,e.end);i.piece=new MA(e.bufferIndex,t,e.end,o,n),NA(this,i,-1,-1)}return!0}}return!1}iterate(e,t){if(e===vA)return t(vA);const i=this.iterate(e.left,t);return i?t(e)&&this.iterate(e.right,t):i}getNodeContent(e){if(e===vA)return"";const t=this._buffers[e.piece.bufferIndex];let i;const n=e.piece,o=this.offsetInBuffer(n.bufferIndex,n.start),r=this.offsetInBuffer(n.bufferIndex,n.end);return i=t.buffer.substring(o,r),i}getPieceContent(e){const t=this._buffers[e.bufferIndex],i=this.offsetInBuffer(e.bufferIndex,e.start),n=this.offsetInBuffer(e.bufferIndex,e.end);return t.buffer.substring(i,n)}rbInsertRight(e,t){const i=new _A(t,1);if(i.left=vA,i.right=vA,i.parent=vA,i.size_left=0,i.lf_left=0,this.root===vA)this.root=i,i.color=0;else if(e.right===vA)e.right=i,i.parent=e;else{const t=bA(e.right);t.left=i,i.parent=t}return EA(this,i),i}rbInsertLeft(e,t){const i=new _A(t,1);if(i.left=vA,i.right=vA,i.parent=vA,i.size_left=0,i.lf_left=0,this.root===vA)this.root=i,i.color=0;else if(e.left===vA)e.left=i,i.parent=e;else{const t=wA(e.left);t.right=i,i.parent=t}return EA(this,i),i}}function WA(e){let t=0,i=0,n=0,o=0;for(let r=0,s=e.length;r<s;r++){const a=e.charCodeAt(r);13===a?(0===t&&(i=r),t++,r+1<s&&10===e.charCodeAt(r+1)?(o|=2,r++):o|=3,n=r+1):10===a&&(o|=1,0===t&&(i=r),t++,n=r+1)}return 0===t&&(i=e.length),[t,i,e.length-n,o]}class VA extends Nc{constructor(e,t,i,n,o,r,s){super(),this._onDidChangeContent=this._register(new Vc),this._BOM=t,this._mightContainNonBasicASCII=!r,this._mightContainRTL=n,this._mightContainUnusualLineTerminators=o,this._pieceTree=new BA(e,i,s)}mightContainRTL(){return this._mightContainRTL}mightContainUnusualLineTerminators(){return this._mightContainUnusualLineTerminators}resetMightContainUnusualLineTerminators(){this._mightContainUnusualLineTerminators=!1}mightContainNonBasicASCII(){return this._mightContainNonBasicASCII}getBOM(){return this._BOM}getEOL(){return this._pieceTree.getEOL()}createSnapshot(e){return this._pieceTree.createSnapshot(e?this._BOM:"")}getOffsetAt(e,t){return this._pieceTree.getOffsetAt(e,t)}getPositionAt(e){return this._pieceTree.getPositionAt(e)}getRangeAt(e,t){const i=e+t,n=this.getPositionAt(e),o=this.getPositionAt(i);return new Zd(n.lineNumber,n.column,o.lineNumber,o.column)}getValueInRange(e,t=0){if(e.isEmpty())return"";const i=this._getEndOfLine(t);return this._pieceTree.getValueInRange(e,i)}getValueLengthInRange(e,t=0){if(e.isEmpty())return 0;if(e.startLineNumber===e.endLineNumber)return e.endColumn-e.startColumn;const i=this.getOffsetAt(e.startLineNumber,e.startColumn);return this.getOffsetAt(e.endLineNumber,e.endColumn)-i}getCharacterCountInRange(e,t=0){if(this._mightContainNonBasicASCII){let i=0;const n=e.startLineNumber,o=e.endLineNumber;for(let t=n;t<=o;t++){const r=this.getLineContent(t),s=t===n?e.startColumn-1:0,a=t===o?e.endColumn-1:r.length;for(let e=s;e<a;e++)Pu(r.charCodeAt(e))?(i+=1,e+=1):i+=1}return i+=this._getEndOfLine(t).length*(o-n),i}return this.getValueLengthInRange(e,t)}getLength(){return this._pieceTree.getLength()}getLineCount(){return this._pieceTree.getLineCount()}getLinesContent(){return this._pieceTree.getLinesContent()}getLineContent(e){return this._pieceTree.getLineContent(e)}getLineCharCode(e,t){return this._pieceTree.getLineCharCode(e,t)}getLineLength(e){return this._pieceTree.getLineLength(e)}getLineFirstNonWhitespaceColumn(e){const t=Su(this.getLineContent(e));return-1===t?0:t+1}getLineLastNonWhitespaceColumn(e){const t=xu(this.getLineContent(e));return-1===t?0:t+2}_getEndOfLine(e){switch(e){case 1:return"\n";case 2:return"\r\n";case 0:return this.getEOL();default:throw new Error("Unknown EOL preference")}}setEOL(e){this._pieceTree.setEOL(e)}applyEdits(e,t,i){let n=this._mightContainRTL,o=this._mightContainUnusualLineTerminators,r=this._mightContainNonBasicASCII,s=!0,a=[];for(let t=0;t<e.length;t++){const i=e[t];s&&i._isTracked&&(s=!1);const l=i.range;if(i.text){let e=!0;r||(e=!qu(i.text),r=e),!n&&e&&(n=$u(i.text)),!o&&e&&(o=Yu(i.text))}let c="",d=0,h=0,u=0;if(i.text){let e;[d,h,u,e]=WA(i.text);const t=this.getEOL(),n="\r\n"===t?2:1;c=0===e||e===n?i.text:i.text.replace(/\r\n|\r|\n/g,t)}a[t]={sortIndex:t,identifier:i.identifier||null,range:l,rangeOffset:this.getOffsetAt(l.startLineNumber,l.startColumn),rangeLength:this.getValueLengthInRange(l),text:c,eolCount:d,firstLineLength:h,lastLineLength:u,forceMoveMarkers:Boolean(i.forceMoveMarkers),isAutoWhitespaceEdit:i.isAutoWhitespaceEdit||!1}}a.sort(VA._sortOpsAscending);let l=!1;for(let e=0,t=a.length-1;e<t;e++){const t=a[e].range.getEndPosition(),i=a[e+1].range.getStartPosition();if(i.isBeforeOrEqual(t)){if(i.isBefore(t))throw new Error("Overlapping ranges are not allowed!");l=!0}}s&&(a=this._reduceOperations(a));const c=i||t?VA._getInverseEditRanges(a):[],d=[];if(t)for(let e=0;e<a.length;e++){const t=a[e],i=c[e];if(t.isAutoWhitespaceEdit&&t.range.isEmpty())for(let e=i.startLineNumber;e<=i.endLineNumber;e++){let n="";e===i.startLineNumber&&(n=this.getLineContent(t.range.startLineNumber),-1!==Su(n))||d.push({lineNumber:e,oldContent:n})}}let h=null;if(i){let e=0;h=[];for(let t=0;t<a.length;t++){const i=a[t],n=c[t],o=this.getValueInRange(i.range),r=i.rangeOffset+e;e+=i.text.length-o.length,h[t]={sortIndex:i.sortIndex,identifier:i.identifier,range:n,text:o,textChange:new ED(i.rangeOffset,o,r,i.text)}}l||h.sort(((e,t)=>e.sortIndex-t.sortIndex))}this._mightContainRTL=n,this._mightContainUnusualLineTerminators=o,this._mightContainNonBasicASCII=r;const u=this._doApplyEdits(a);let g=null;if(t&&d.length>0){d.sort(((e,t)=>t.lineNumber-e.lineNumber)),g=[];for(let e=0,t=d.length;e<t;e++){const t=d[e].lineNumber;if(e>0&&d[e-1].lineNumber===t)continue;const i=d[e].oldContent,n=this.getLineContent(t);0!==n.length&&n!==i&&-1===Su(n)&&g.push(t)}}return this._onDidChangeContent.fire(),new Gg(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 Zd(i.startLineNumber,i.startColumn,n.endLineNumber,n.endColumn);let r=i.startLineNumber,s=i.startColumn;const a=[];for(let i=0,n=e.length;i<n;i++){const n=e[i],o=n.range;t=t||n.forceMoveMarkers,a.push(this.getValueInRange(new Zd(r,s,o.startLineNumber,o.startColumn))),n.text.length>0&&a.push(n.text),r=o.endLineNumber,s=o.endColumn}const l=a.join(""),[c,d,h]=WA(l);return{sortIndex:0,identifier:e[0].identifier,range:o,rangeOffset:this.getOffsetAt(o.startLineNumber,o.startColumn),rangeLength:this.getValueLengthInRange(o,0),text:l,eolCount:c,firstLineLength:d,lastLineLength:h,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(VA._sortOpsDescending);const t=[];for(let i=0;i<e.length;i++){const n=e[i],o=n.range.startLineNumber,r=n.range.startColumn,s=n.range.endLineNumber,a=n.range.endColumn;if(o===s&&r===a&&0===n.text.length)continue;n.text?(this._pieceTree.delete(n.rangeOffset,n.rangeLength),this._pieceTree.insert(n.rangeOffset,n.text,!0)):this._pieceTree.delete(n.rangeOffset,n.rangeLength);const l=new Zd(o,r,s,a);t.push({range:l,rangeLength:n.rangeLength,text:n.text,rangeOffset:n.rangeOffset,forceMoveMarkers:n.forceMoveMarkers})}return t}findMatchesLineByLine(e,t,i,n){return this._pieceTree.findMatchesLineByLine(e,t,i,n)}static _getInverseEditRanges(e){const t=[];let i=0,n=0,o=null;for(let r=0,s=e.length;r<s;r++){const s=e[r];let a,l,c;if(o?o.range.endLineNumber===s.range.startLineNumber?(a=i,l=n+(s.range.startColumn-o.range.endColumn)):(a=i+(s.range.startLineNumber-o.range.endLineNumber),l=s.range.startColumn):(a=s.range.startLineNumber,l=s.range.startColumn),s.text.length>0){const e=s.eolCount+1;c=1===e?new Zd(a,l,a,l+s.firstLineLength):new Zd(a,l,a+e-1,s.lastLineLength+1)}else c=new Zd(a,l,a,l);i=c.endLineNumber,n=c.endColumn,t.push(c),o=s}return t}static _sortOpsAscending(e,t){const i=Zd.compareRangesUsingEnds(e.range,t.range);return 0===i?e.sortIndex-t.sortIndex:i}static _sortOpsDescending(e,t){const i=Zd.compareRangesUsingEnds(e.range,t.range);return 0===i?t.sortIndex-e.sortIndex:-i}}class zA{constructor(e,t,i,n,o,r,s,a,l){this._chunks=e,this._bom=t,this._cr=i,this._lf=n,this._crlf=o,this._containsRTL=r,this._containsUnusualLineTerminators=s,this._isBasicASCII=a,this._normalizeEOL=l}_getEOL(e){const t=this._cr+this._lf+this._crlf,i=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":i>t/2?"\r\n":"\n"}create(e){const t=this._getEOL(e),i=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(let e=0,n=i.length;e<n;e++){const n=i[e].buffer.replace(/\r\n|\r|\n/g,t),o=OA(n);i[e]=new RA(n,o)}const n=new VA(i,this._bom,t,this._containsRTL,this._containsUnusualLineTerminators,this._isBasicASCII,this._normalizeEOL);return{textBuffer:n,disposable:n}}}class jA{constructor(){this.chunks=[],this.BOM="",this._hasPreviousChar=!1,this._previousChar=0,this._tmpLineStarts=[],this.cr=0,this.lf=0,this.crlf=0,this.containsRTL=!1,this.containsUnusualLineTerminators=!1,this.isBasicASCII=!0}acceptChunk(e){if(0===e.length)return;0===this.chunks.length&&Qu(e)&&(this.BOM=Ju,e=e.substr(1));const t=e.charCodeAt(e.length-1);13===t||t>=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,r=0,s=!0;for(let a=0,l=t.length;a<l;a++){const c=t.charCodeAt(a);13===c?a+1<l&&10===t.charCodeAt(a+1)?(r++,e[i++]=a+2,a++):(n++,e[i++]=a+1):10===c?(o++,e[i++]=a+1):s&&9!==c&&(c<32||c>126)&&(s=!1)}const a=new AA(DA(e),n,o,r,s);return e.length=0,a}(this._tmpLineStarts,e);this.chunks.push(new RA(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=$u(e)),this.isBasicASCII||this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=Yu(e))}finish(e=!0){return this._finish(),new zA(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=OA(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}}}class HA{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 UA{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 HA(e,[t]))}finalize(){return this._tokens}}class $A{constructor(e){this._default=e,this._store=[]}get(e){return e<this._store.length?this._store[e]:this._default}set(e,t){for(;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 e=0;e<t;e++)i[e]=this._default;this._store=hl(this._store,e,i)}}class KA{constructor(e,t){this.tokenizationSupport=e,this.initialState=t,this._lineBeginState=new $A(null),this._lineNeedsTokenization=new $A(!0),this._firstLineNeedsTokenization=0,this._lineBeginState.set(0,this.initialState)}get invalidLineStartIndex(){return this._firstLineNeedsTokenization}markMustBeTokenized(e){this._lineNeedsTokenization.set(e,!0),this._firstLineNeedsTokenization=Math.min(this._firstLineNeedsTokenization,e)}getBeginState(e){return this._lineBeginState.get(e)}setEndState(e,t,i){if(this._lineNeedsTokenization.set(t,!1),this._firstLineNeedsTokenization=t+1,t===e-1)return;const n=this._lineBeginState.get(t+1);if(null===n||!i.equals(n))return this._lineBeginState.set(t+1,i),void this.markMustBeTokenized(t+1);let o=t+1;for(;o<e&&!this._lineNeedsTokenization.get(o);)o++;this._firstLineNeedsTokenization=o}applyEdits(e,t){this.markMustBeTokenized(e.startLineNumber-1),this._lineBeginState.delete(e.startLineNumber,e.endLineNumber-e.startLineNumber),this._lineNeedsTokenization.delete(e.startLineNumber,e.endLineNumber-e.startLineNumber),this._lineBeginState.insert(e.startLineNumber,t),this._lineNeedsTokenization.insert(e.startLineNumber,t)}}class qA extends Nc{constructor(e,t){super(),this._textModel=e,this._languageIdCodec=t,this._isScheduled=!1,this._isDisposed=!1,this._tokenizationStateStore=null,this._register(ph.onDidChange((e=>{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<i;t++){const i=e.changes[t],[n]=WA(i.text);this._tokenizationStateStore.applyEdits(i.range,n)}this._beginBackgroundTokenization()}}handleDidChangeAttached(){this._beginBackgroundTokenization()}handleDidChangeLanguage(e){this._resetTokenizationState(),this._textModel.clearTokens()}_resetTokenizationState(){const[e,t]=function(e){if(e.isTooLargeForTokenization())return[null,null];const t=ph.get(e.getLanguageId());if(!t)return[null,null];let i;try{i=t.getInitialState()}catch(e){return gc(e),[null,null]}return[t,i]}(this._textModel);this._tokenizationStateStore=e&&t?new KA(e,t):null,this._beginBackgroundTokenization()}_beginBackgroundTokenization(){!this._isScheduled&&this._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&(this._isScheduled=!0,wm((e=>{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()<t?Ha(i):this._beginBackgroundTokenization())};i()}_backgroundTokenizeForAtLeast1ms(){const e=this._textModel.getLineCount(),t=new UA,i=Rc.create(!1);do{if(i.elapsed()>1)break;if(this._tokenizeOneInvalidLine(t)>=e)break}while(this._hasLinesToTokenize());this._textModel.setTokens(t.finalize(),!this._hasLinesToTokenize())}tokenizeViewport(e,t){const i=new UA;this._tokenizeViewport(i,e,t),this._textModel.setTokens(i.finalize(),!this._hasLinesToTokenize())}reset(){this._resetTokenizationState(),this._textModel.clearTokens()}forceTokenization(e){const t=new UA;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),r=o.substring(0,e.column-1)+t+o.substring(e.column-1),s=GA(this._languageIdCodec,n,this._tokenizationStateStore.tokenizationSupport,r,!0,i),a=new t_(s.tokens,r,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 r=this._tokenizationStateStore.getBeginState(n-1);if(!r)return null;const s=this._textModel.getLineContent(n),a=s.substring(0,o-1)+i+s.substring(o-1+t),l=this._textModel.getLanguageIdAtPosition(n,0),c=GA(this._languageIdCodec,l,this._tokenizationStateStore.tokenizationSupport,a,!0,r);return new t_(c.tokens,a,this._languageIdCodec)}isCheapToTokenize(e){if(!this._tokenizationStateStore)return!0;const t=this._tokenizationStateStore.invalidLineStartIndex+1;return!(e>t)&&(e<t||this._textModel.getLineLength(e)<2048)}_hasLinesToTokenize(){return!!this._tokenizationStateStore&&this._tokenizationStateStore.invalidLineStartIndex<this._textModel.getLineCount()}_tokenizeOneInvalidLine(e){if(!this._tokenizationStateStore||!this._hasLinesToTokenize())return this._textModel.getLineCount()+1;const t=this._tokenizationStateStore.invalidLineStartIndex+1;return this._updateTokensUntilLine(e,t),t}_updateTokensUntilLine(e,t){if(!this._tokenizationStateStore)return;const i=this._textModel.getLanguageId(),n=this._textModel.getLineCount(),o=t-1;for(let t=this._tokenizationStateStore.invalidLineStartIndex;t<=o;t++){const o=this._textModel.getLineContent(t+1),r=this._tokenizationStateStore.getBeginState(t),s=GA(this._languageIdCodec,i,this._tokenizationStateStore.tokenizationSupport,o,!0,r);e.add(t+1,s.tokens),this._tokenizationStateStore.setEndState(n,t,s.endState),t=this._tokenizationStateStore.invalidLineStartIndex-1}}_tokenizeViewport(e,t,i){if(!this._tokenizationStateStore)return;if(i<=this._tokenizationStateStore.invalidLineStartIndex)return;if(t<=this._tokenizationStateStore.invalidLineStartIndex)return void this._updateTokensUntilLine(e,i);let n=this._textModel.getLineFirstNonWhitespaceColumn(t);const o=[];let r=null;for(let e=t-1;n>1&&e>=1;e--){const t=this._textModel.getLineFirstNonWhitespaceColumn(e);if(0!==t&&t<n){if(r=this._tokenizationStateStore.getBeginState(e-1),r)break;o.push(this._textModel.getLineContent(e)),n=t}}r||(r=this._tokenizationStateStore.initialState);const s=this._textModel.getLanguageId();let a=r;for(let e=o.length-1;e>=0;e--)a=GA(this._languageIdCodec,s,this._tokenizationStateStore.tokenizationSupport,o[e],!1,a).endState;for(let n=t;n<=i;n++){const t=this._textModel.getLineContent(n),i=GA(this._languageIdCodec,s,this._tokenizationStateStore.tokenizationSupport,t,!0,a);e.add(n,i.tokens),this._tokenizationStateStore.markMustBeTokenized(n-1),a=i.endState}}}function GA(e,t,i,n,o,r){let s=null;if(i)try{s=i.tokenizeEncoded(n,o,r.clone())}catch(e){gc(e)}return s||(s=function(e,t){const i=new Uint32Array(2);return i[0]=0,i[1]=(16384|e<<0|2<<23)>>>0,new uh(i,null===t?sm:t)}(e.encodeLanguageId(t),r)),t_.convertToEndOffset(s.tokens,n.length),s}const YA=new Uint32Array(0).buffer;class ZA{static deleteBeginning(e,t){return null===e||e===YA?e:ZA.delete(e,0,t)}static deleteEnding(e,t){if(null===e||e===YA)return e;const i=XA(e),n=i[i.length-2];return ZA.delete(e,t,n)}static delete(e,t,i){if(null===e||e===YA||t===i)return e;const n=XA(e),o=n.length>>>1;if(0===t&&n[n.length-2]===i)return YA;const r=t_.findIndexInTokensArray(n,t),s=r>0?n[r-1<<1]:0;if(i<n[r<<1]){const s=i-t;for(let e=r;e<o;e++)n[e<<1]-=s;return e}let a,l;s!==t?(n[r<<1]=t,a=r+1<<1,l=t):(a=r<<1,l=s);const c=i-t;for(let e=r+1;e<o;e++){const t=n[e<<1]-c;t>l&&(n[a++]=t,n[a++]=n[1+(e<<1)],l=t)}if(a===n.length)return e;const d=new Uint32Array(a);return d.set(n.subarray(0,a),0),d.buffer}static append(e,t){if(t===YA)return e;if(e===YA)return t;if(null===e)return e;if(null===t)return null;const i=XA(e),n=XA(t),o=n.length>>>1,r=new Uint32Array(i.length+n.length);r.set(i,0);let s=i.length;const a=i[i.length-2];for(let e=0;e<o;e++)r[s++]=n[e<<1]+a,r[s++]=n[1+(e<<1)];return r.buffer}static insert(e,t,i){if(null===e||e===YA)return e;const n=XA(e),o=n.length>>>1;let r=t_.findIndexInTokensArray(n,t);r>0&&n[r-1<<1]===t&&r--;for(let e=r;e<o;e++)n[e<<1]+=i;return e}}function XA(e){return e instanceof Uint32Array?e:new Uint32Array(e)}class JA{constructor(e){this._lineTokens=[],this._len=0,this._languageIdCodec=e}flush(){this._lineTokens=[],this._len=0}getTokens(e,t,i){let n=null;if(t<this._len&&(n=this._lineTokens[t]),null!==n&&n!==YA)return new t_(XA(n),i,this._languageIdCodec);const o=new Uint32Array(2);return o[0]=i.length,o[1]=QA(this._languageIdCodec.encodeLanguageId(e)),new t_(o,i,this._languageIdCodec)}static _massageTokens(e,t,i){const n=i?XA(i):null;if(0===t){let t=!1;if(n&&n.length>1&&(t=ch.getLanguageId(n[1])!==e),!t)return YA}if(!n||0===n.length){const i=new Uint32Array(2);return i[0]=t,i[1]=QA(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 e=0;e<t;e++)i[e]=null;this._lineTokens=hl(this._lineTokens,e,i),this._len+=t}setTokens(e,t,i,n,o){const r=JA._massageTokens(this._languageIdCodec.encodeLanguageId(e),i,n);this._ensureLine(t);const s=this._lineTokens[t];return this._lineTokens[t]=r,!!o&&!JA._equals(s,r)}static _equals(e,t){if(!e||!t)return!e&&!t;const i=XA(e),n=XA(t);if(i.length!==n.length)return!1;for(let e=0,t=i.length;e<t;e++)if(i[e]!==n[e])return!1;return!0}acceptEdit(e,t,i){this._acceptDeleteRange(e),this._acceptInsertText(new Yd(e.startLineNumber,e.startColumn),t,i)}_acceptDeleteRange(e){const t=e.startLineNumber-1;if(t>=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;return void(this._lineTokens[t]=ZA.delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1))}this._lineTokens[t]=ZA.deleteEnding(this._lineTokens[t],e.startColumn-1);const i=e.endLineNumber-1;let n=null;i<this._len&&(n=ZA.deleteBeginning(this._lineTokens[i],e.endColumn-1)),this._lineTokens[t]=ZA.append(this._lineTokens[t],n),this._deleteLines(e.startLineNumber,e.endLineNumber-e.startLineNumber)}_acceptInsertText(e,t,i){if(0===t&&0===i)return;const n=e.lineNumber-1;n>=this._len||(0!==t?(this._lineTokens[n]=ZA.deleteEnding(this._lineTokens[n],e.column-1),this._lineTokens[n]=ZA.insert(this._lineTokens[n],e.column-1,i),this._insertLines(e.lineNumber,t)):this._lineTokens[n]=ZA.insert(this._lineTokens[n],e.column-1,i))}}function QA(e){return(16384|e<<0|2<<23)>>>0}class eO{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 e=0,t=this._pieces.length;e<t;e++){const o=this._pieces[e];if(o.endLineNumber<i.startLineNumber)continue;if(o.startLineNumber>i.endLineNumber){n=n||{index:e};break}if(o.removeTokens(i),o.isEmpty()){this._pieces.splice(e,1),e--,t--;continue}if(o.endLineNumber<i.startLineNumber)continue;if(o.startLineNumber>i.endLineNumber){n=n||{index:e};continue}const[r,s]=o.split(i);r.isEmpty()?n=n||{index:e}:s.isEmpty()||(this._pieces.splice(e,1,r,s),e++,t++,n=n||{index:e})}return n=n||{index:this._pieces.length},t.length>0&&(this._pieces=hl(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[eO._findFirstPieceWithLine(i,e)].getLineTokens(e);if(!n)return t;const o=t.getCount(),r=n.getCount();let s=0;const a=[];let l=0,c=0;const d=(e,t)=>{e!==c&&(c=e,a[l++]=e,a[l++]=t)};for(let e=0;e<r;e++){const i=n.getStartCharacter(e),r=n.getEndCharacter(e),a=n.getMetadata(e),l=((1&a?1024:0)|(2&a?2048:0)|(4&a?4096:0)|(8&a?8192:0)|(16&a?8372224:0)|(32&a?4286578688:0))>>>0,c=~l>>>0;for(;s<o&&t.getEndOffset(s)<=i;)d(t.getEndOffset(s),t.getMetadata(s)),s++;for(s<o&&t.getStartOffset(s)<i&&d(i,t.getMetadata(s));s<o&&t.getEndOffset(s)<r;)d(t.getEndOffset(s),t.getMetadata(s)&c|a&l),s++;if(s<o)d(r,t.getMetadata(s)&c|a&l),t.getEndOffset(s)===r&&s++;else{const e=Math.min(Math.max(0,s-1),o-1);d(r,t.getMetadata(e)&c|a&l)}}for(;s<o;)d(t.getEndOffset(s),t.getMetadata(s)),s++;return new t_(new Uint32Array(a),t.getLineContent(),this._languageIdCodec)}static _findFirstPieceWithLine(e,t){let i=0,n=e.length-1;for(;i<n;){let o=i+Math.floor((n-i)/2);if(e[o].endLineNumber<t)i=o+1;else{if(!(e[o].startLineNumber>t)){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 r of this._pieces)r.acceptEdit(e,t,i,n,o)}}const tO=Mg("undoRedoService");class iO{constructor(e,t){this.resource=e,this.elements=t}}class nO{constructor(){this.id=nO._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}}nO._ID=0,nO.None=new nO;class oO{constructor(){this.id=oO._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}}oO._ID=0,oO.None=new oO;var rO=function(e,t){return function(i,n){t(i,n,e)}};function sO(e,t){return("string"==typeof e?function(e){const t=new jA;return t.acceptChunk(e),t.finish()}(e):e).create(t)}let aO=0;class lO{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 cO=()=>{throw new Error("Invalid change accessor")};let dO=class e extends Nc{constructor(t,i,n,o=null,r,s,a){super(),this._undoRedoService=r,this._languageService=s,this._languageConfigurationService=a,this._onWillDispose=this._register(new Vc),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new CO((e=>this.handleBeforeFireDecorationsChangedEvent(e)))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeLanguage=this._register(new Vc),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new Vc),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new Vc),this.onDidChangeTokens=this._onDidChangeTokens.event,this._onDidChangeOptions=this._register(new Vc),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new Vc),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new Vc),this._eventEmitter=this._register(new SO),this._backgroundTokenizationState=0,this._onBackgroundTokenizationStateChanged=this._register(new Vc),aO++,this.id="$model"+aO,this.isForSimpleWidget=n.isForSimpleWidget,this._associatedResource=null==o?Bd.parse("inmemory://model/"+aO):o,this._attachedEditorCount=0;const{textBuffer:l,disposable:c}=sO(t,n.defaultEOL);this._buffer=l,this._bufferDisposable=c,this._options=e.resolveOptions(this._buffer,n);const d=this._buffer.getLineCount(),h=this._buffer.getValueLengthInRange(new Zd(1,1,d,this._buffer.getLineLength(d)+1),0);n.largeFileOptimizations?this._isTooLargeForTokenization=h>e.LARGE_FILE_SIZE_THRESHOLD||d>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=eg(aO),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new gO,this._commandManager=new KD(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._tokens=new JA(this._languageService.languageIdCodec),this._semanticTokens=new eO(this._languageService.languageIdCodec),this._tokenization=new qA(this,this._languageService.languageIdCodec),this._bracketPairColorizer=this._register(new wD(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new GE(this,this._languageConfigurationService)),this._decorationProvider=this._register(new kD(this)),this._register(this._decorationProvider.onDidChange((()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()})))}static resolveOptions(e,t){if(t.detectIndentation){const i=YD(e,t.tabSize,t.insertSpaces);return new Ug({tabSize:i.tabSize,indentSize:i.tabSize,insertSpaces:i.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new Ug({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 xc(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 VA([],"","\n",!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=Nc.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 wI(e,t)))}setValue(e){if(this._assertNotDisposed(),null===e)return;const{textBuffer:t,disposable:i}=sO(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,i)}_createContentChanged2(e,t,i,n,o,r,s){return{changes:[{range:e,rangeOffset:t,rangeLength:i,text:n}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:o,isRedoing:r,isFlush:s}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),o=this.getLineCount(),r=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 gO,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new vI([new uI],this._versionId,!1,!1),this._createContentChanged2(new Zd(1,1,o,r),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(),r=this.getLineMaxColumn(o);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new vI([new _I],this._versionId,!1,!1),this._createContentChanged2(new Zd(1,1,o,r),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;i<n;i++){const n=t[i],o=n.range,r=n.cachedAbsoluteStart-n.start,s=this._buffer.getOffsetAt(o.startLineNumber,o.startColumn),a=this._buffer.getOffsetAt(o.endLineNumber,o.endColumn);n.cachedAbsoluteStart=s,n.cachedAbsoluteEnd=a,n.cachedVersionId=e,n.start=s-r,n.end=a-r,mA(n)}}onBeforeAttached(){this._attachedEditorCount++,1===this._attachedEditorCount&&(this._tokenization.handleDidChangeAttached(),this._onDidChangeAttached.fire(void 0))}onBeforeDetached(){this._attachedEditorCount--,0===this._attachedEditorCount&&(this._tokenization.handleDidChangeAttached(),this._onDidChangeAttached.fire(void 0))}isAttachedToEditor(){return this._attachedEditorCount>0}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,r=void 0!==e.bracketColorizationOptions?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,s=new Ug({tabSize:t,indentSize:i,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:o,bracketPairColorizationOptions:r});if(this._options.equals(s))return;const a=this._options.createChangeEvent(s);this._options=s,this._bracketPairColorizer.handleDidChangeOptions(a),this._decorationProvider.handleDidChangeOptions(a),this._onDidChangeOptions.fire(a)}detectIndentation(e,t){this._assertNotDisposed();const i=YD(this._buffer,t,e);this.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize,indentSize:i.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),rL(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(Gu.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 lO(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),r=Math.floor("number"!=typeof n||isNaN(n)?1:n);if(o<1)o=1,r=1;else if(o>t)o=t,r=this.getLineMaxColumn(o);else if(r<=1)r=1;else{const e=this.getLineMaxColumn(o);r>=e&&(r=e)}const s=e.endLineNumber,a=e.endColumn;let l=Math.floor("number"!=typeof s||isNaN(s)?1:s),c=Math.floor("number"!=typeof a||isNaN(a)?1:a);if(l<1)l=1,c=1;else if(l>t)l=t,c=this.getLineMaxColumn(l);else if(c<=1)c=1;else{const e=this.getLineMaxColumn(l);c>=e&&(c=e)}return i===o&&n===r&&s===l&&a===c&&e instanceof Zd&&!(e instanceof Xd)?e:new Zd(o,r,l,c)}_isValidPosition(e,t,i){return"number"==typeof e&&"number"==typeof t&&(!isNaN(e)&&!isNaN(t)&&(!(e<1||t<1)&&((0|e)===e&&(0|t)===t&&(!(e>this._buffer.getLineCount())&&(1===t||!(t>this.getLineMaxColumn(e))&&(1!==i||!Pu(this._buffer.getLineCharCode(e,t-2))))))))}_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),r=this._buffer.getLineCount();if(n<1)return new Yd(1,1);if(n>r)return new Yd(r,this.getLineMaxColumn(r));if(o<=1)return new Yd(n,1);const s=this.getLineMaxColumn(n);return o>=s?new Yd(n,s):1===i&&Pu(this._buffer.getLineCharCode(n,o-2))?new Yd(n,o-1):new Yd(n,o)}validatePosition(e){return this._assertNotDisposed(),e instanceof Yd&&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,r=e.endColumn;if(!this._isValidPosition(i,n,0))return!1;if(!this._isValidPosition(o,r,0))return!1;if(1===t){const e=n>1?this._buffer.getLineCharCode(i,n-2):0,t=r>1&&r<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,r-2):0,s=Pu(e),a=Pu(t);return!s&&!a}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof Zd&&!(e instanceof Xd)&&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,r=i.lineNumber,s=i.column;{const e=o>1?this._buffer.getLineCharCode(n,o-2):0,t=s>1&&s<=this._buffer.getLineLength(r)?this._buffer.getLineCharCode(r,s-2):0,i=Pu(e),a=Pu(t);return i||a?n===r&&o===s?new Zd(n,o-1,r,s-1):i&&a?new Zd(n,o-1,r,s+1):i?new Zd(n,o-1,r,s):new Zd(n,o,r,s+1):new Zd(n,o,r,s)}}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 Zd(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,r,s=999){this._assertNotDisposed();let a=null;null!==t&&(Array.isArray(t)||(t=[t]),t.every((e=>Zd.isIRange(e)))&&(a=t.map((e=>this.validateRange(e))))),null===a&&(a=[this.getFullModelRange()]),a=a.sort(((e,t)=>e.startLineNumber-t.startLineNumber||e.startColumn-t.startColumn));const l=[];let c;if(l.push(a.reduce(((e,t)=>Zd.areIntersecting(e,t)?e.plusRange(t):(l.push(e),t)))),!i&&e.indexOf("\n")<0){const t=new kf(e,i,n,o).parseSearchRequest();if(!t)return[];c=e=>this.findMatchesLineByLine(e,t,r,s)}else c=t=>Ef.findMatches(this,new kf(e,i,n,o),t,r,s);return l.map(c).reduce(((e,t)=>e.concat(t)),[])}findNextMatch(e,t,i,n,o,r){this._assertNotDisposed();const s=this.validatePosition(t);if(!i&&e.indexOf("\n")<0){const t=new kf(e,i,n,o).parseSearchRequest();if(!t)return null;const a=this.getLineCount();let l=new Zd(s.lineNumber,s.column,a,this.getLineMaxColumn(a)),c=this.findMatchesLineByLine(l,t,r,1);return Ef.findNextMatch(this,new kf(e,i,n,o),s,r),c.length>0?c[0]:(l=new Zd(1,1,s.lineNumber,this.getLineMaxColumn(s.lineNumber)),c=this.findMatchesLineByLine(l,t,r,1),c.length>0?c[0]:null)}return Ef.findNextMatch(this,new kf(e,i,n,o),s,r)}findPreviousMatch(e,t,i,n,o,r){this._assertNotDisposed();const s=this.validatePosition(t);return Ef.findPreviousMatch(this,new kf(e,i,n,o),s,r)}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 Kg?e:new Kg(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<n;i++)t[i]=this._validateEditOperation(e[i]);return t}pushEditOperations(e,t,i){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(e,this._validateEditOperations(t),i)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_pushEditOperations(e,t,i){if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){const i=t.map((e=>({range:this.validateRange(e.range),text:e.text})));let n=!0;if(e)for(let t=0,o=e.length;t<o;t++){const o=e[t];let r=!1;for(let e=0,t=i.length;e<t;e++){const t=i[e].range,n=t.startLineNumber>o.endLineNumber,s=o.startLineNumber>t.endLineNumber;if(!n&&!s){r=!0;break}}if(!r){n=!1;break}}if(n)for(let e=0,n=this._trimAutoWhitespaceLines.length;e<n;e++){const n=this._trimAutoWhitespaceLines[e],o=this.getLineMaxColumn(n);let r=!0;for(let e=0,t=i.length;e<t;e++){const t=i[e].range,s=i[e].text;if(!(n<t.startLineNumber||n>t.endLineNumber||n===t.startLineNumber&&t.startColumn===o&&t.isEmpty()&&s&&s.length>0&&"\n"===s.charAt(0)||n===t.startLineNumber&&1===t.startColumn&&t.isEmpty()&&s&&s.length>0&&"\n"===s.charAt(s.length-1))){r=!1;break}}if(r){const e=new Zd(n,1,n,o);t.push(new Kg(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 Zd(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 Zd(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,r){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(r),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(),r=n.changes;if(this._trimAutoWhitespaceLines=n.trimAutoWhitespaceLineNumbers,0!==r.length){for(let e=0,t=r.length;e<t;e++){const t=r[e],[i,n,o]=WA(t.text);this._tokens.acceptEdit(t.range,i,n),this._semanticTokens.acceptEdit(t.range,i,n,o,t.text.length>0?t.text.charCodeAt(0):0),this._decorationsTree.acceptReplace(t.rangeOffset,t.rangeLength,t.text.length,t.forceMoveMarkers)}const e=[];this._increaseVersionId();let t=i;for(let i=0,n=r.length;i<n;i++){const n=r[i],[s]=WA(n.text);this._onDidChangeDecorations.fire();const a=n.range.startLineNumber,l=n.range.endLineNumber,c=l-a,d=s,h=Math.min(c,d),u=d-c,g=o-t-u+a,p=g,m=g+d,f=this._decorationsTree.getInjectedTextInInterval(this,this.getOffsetAt(new Yd(p,1)),this.getOffsetAt(new Yd(m,this.getLineMaxColumn(m))),0),_=gI.fromDecorations(f),v=new _l(_);for(let t=h;t>=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 pI(i,this.getLineContent(n),o))}if(h<c){const t=a+h;e.push(new mI(t+1,l))}if(h<d){const i=new _l(_),n=a+h,r=d-h,s=o-t-r+n+1,l=[],c=[];for(let e=0;e<r;e++){const t=s+e;c[e]=this.getLineContent(t),i.takeWhile((e=>e.lineNumber<t)),l[e]=i.takeWhile((e=>e.lineNumber===t))}e.push(new fI(n+1,a+d,c,l))}t+=u}this._emitContentChangedEvent(new vI(e,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:r,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 pI(e,this.getLineContent(e),this._getInjectedTextInLine(e))));this._onDidChangeInjectedText.fire(new bI(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,yO(t))},removeDecoration:t=>{this._deltaDecorationsImpl(e,[t],[])},deltaDecorations:(t,i)=>0===t.length&&0===i.length?[]:this._deltaDecorationsImpl(e,t,i)};let n=null;try{n=t(i)}catch(e){gc(e)}return i.addDecoration=cO,i.changeDecoration=cO,i.changeDecorationOptions=cO,i.removeDecoration=cO,i.deltaDecorations=cO,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:wO[i]}])[0]:null;if(!t)return this._decorationsTree.delete(n),delete this._decorations[n.id],null;const o=this._validateRangeRelaxedNoAllocations(t),r=this._buffer.getOffsetAt(o.startLineNumber,o.startColumn),s=this._buffer.getOffsetAt(o.endLineNumber,o.endColumn);return this._decorationsTree.delete(n),n.reset(this.getVersionId(),r,s,o),n.setOptions(wO[i]),this._decorationsTree.insert(n),n.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const t=this._decorationsTree.collectNodesFromOwner(e);for(let e=0,i=t.length;e<i;e++){const i=t[e];this._decorationsTree.delete(i),delete this._decorations[i.id]}}getDecorationOptions(e){const t=this._decorations[e];return t?t.options:null}getDecorationRange(e){const t=this._decorations[e];return t?this._decorationsTree.getNodeRange(this,t):null}getLineDecorations(e,t=0,i=!1){return e<1||e>this.getLineCount()?[]:this.getLinesDecorations(e,e,t,i)}getLinesDecorations(e,t,i=0,n=!1){const o=this.getLineCount(),r=Math.min(o,Math.max(1,e)),s=Math.min(o,Math.max(1,t)),a=this.getLineMaxColumn(s),l=new Zd(r,1,s,a),c=this._getDecorationsInRange(l,i,n);return c.push(...this._decorationProvider.getDecorationsInRange(l,i,n)),c}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 gI.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),r=this._buffer.getOffsetAt(n.endLineNumber,n.endColumn);this._decorationsTree.delete(i),i.reset(this.getVersionId(),o,r,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 r=0;const s=i.length;let a=0;const l=new Array(s);for(;r<o||a<s;){let c=null;if(r<o){do{c=this._decorations[t[r++]]}while(!c&&r<o);if(c){if(c.options.after){const e=this._decorationsTree.getNodeRange(this,c);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.endLineNumber)}if(c.options.before){const e=this._decorationsTree.getNodeRange(this,c);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.startLineNumber)}this._decorationsTree.delete(c),this._onDidChangeDecorations.checkAffectedAndFire(c.options)}}if(a<s){if(!c){const e=++this._lastDecorationId,t=`${this._instanceId};${e}`;c=new oA(t,0,0),this._decorations[t]=c}const t=i[a],o=this._validateRangeRelaxedNoAllocations(t.range),r=yO(t.options),s=this._buffer.getOffsetAt(o.startLineNumber,o.startColumn),d=this._buffer.getOffsetAt(o.endLineNumber,o.endColumn);c.ownerId=e,c.reset(n,s,d,o),c.setOptions(r),c.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(o.endLineNumber),c.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(o.startLineNumber),this._onDidChangeDecorations.checkAffectedAndFire(r),this._decorationsTree.insert(c),l[a]=c.id,a++}else c&&delete this._decorations[c.id]}return l}setTokens(e,t=!1){if(0!==e.length){const t=[];for(let i=0,n=e.length;i<n;i++){const n=e[i];let o=0,r=0,s=!1;for(let e=n.startLineNumber;e<=n.endLineNumber;e++)s?(this._tokens.setTokens(this._languageId,e-1,this._buffer.getLineLength(e),n.getLineTokens(e),!1),r=e):this._tokens.setTokens(this._languageId,e-1,this._buffer.getLineLength(e),n.getLineTokens(e),!0)&&(s=!0,o=e,r=e);s&&t.push({fromLineNumber:o,toLineNumber:r})}t.length>0&&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 Yd(e,t)),n=this.getLineTokens(i.lineNumber);return n.getLanguageId(n.findTokenIndexAtOffset(i.column-1))}getTokenTypeIfInsertingCharacter(e,t,i){const n=this.validatePosition(new Yd(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),r=o.findTokenIndexAtOffset(i.column-1),[s,a]=e._findLanguageBoundaries(o,r),l=il(i.column,this.getLanguageConfiguration(o.getLanguageId(r)).getWordDefinition(),n.substring(s,a),s);if(l&&l.startColumn<=t.column&&t.column<=l.endColumn)return l;if(r>0&&s===i.column-1){const[s,a]=e._findLanguageBoundaries(o,r-1),l=il(i.column,this.getLanguageConfiguration(o.getLanguageId(r-1)).getWordDefinition(),n.substring(s,a),s);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 o=t;o>=0&&e.getLanguageId(o)===i;o--)n=e.getStartOffset(o);let o=e.getLineContent().length;for(let n=t,r=e.getCount();n<r&&e.getLanguageId(n)===i;n++)o=e.getEndOffset(n);return[n,o]}getWordUntilPosition(e){const t=this.getWordAtPosition(e);return t?{word:t.word.substr(0,e.column-t.startColumn),startColumn:t.startColumn,endColumn:e.column}:{word:"",startColumn:e.column,endColumn:e.column}}normalizePosition(e,t){return e}getLineIndentColumn(e){return function(e){let t=0;for(const i of e){if(" "!==i&&"\t"!==i)break;t++}return t}(this.getLineContent(e))+1}};function hO(e){return!(!e.options.overviewRuler||!e.options.overviewRuler.color)}function uO(e){return!!e.options.after||!!e.options.before}dO.MODEL_SYNC_LIMIT=52428800,dO.LARGE_FILE_SIZE_THRESHOLD=20971520,dO.LARGE_FILE_LINE_COUNT_THRESHOLD=3e5,dO.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:Fl.tabSize,indentSize:Fl.indentSize,insertSpaces:Fl.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:Fl.trimAutoWhitespace,largeFileOptimizations:Fl.largeFileOptimizations,bracketPairColorizationOptions:Fl.bracketPairColorizationOptions},dO=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([rO(4,tO),rO(5,Hp),rO(6,Zp)],dO);class gO{constructor(){this._decorationsTree0=new sA,this._decorationsTree1=new sA,this._injectedTextDecorationsTree=new sA}ensureAllNodesHaveRanges(e){this.getAll(e,0,!1,!1)}_ensureNodesHaveRanges(e,t){for(const i of t)null===i.range&&(i.range=e.getRangeAt(i.cachedAbsoluteStart,i.cachedAbsoluteEnd));return t}getAllInInterval(e,t,i,n,o){const r=e.getVersionId(),s=this._intervalSearch(t,i,n,o,r);return this._ensureNodesHaveRanges(e,s)}_intervalSearch(e,t,i,n,o){const r=this._decorationsTree0.intervalSearch(e,t,i,n,o),s=this._decorationsTree1.intervalSearch(e,t,i,n,o),a=this._injectedTextDecorationsTree.intervalSearch(e,t,i,n,o);return r.concat(s).concat(a)}getInjectedTextInInterval(e,t,i,n){const o=e.getVersionId(),r=this._injectedTextDecorationsTree.intervalSearch(t,i,n,!1,o);return this._ensureNodesHaveRanges(e,r).filter((e=>e.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(),r=this._search(t,i,n,o);return this._ensureNodesHaveRanges(e,r)}_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),r=this._injectedTextDecorationsTree.search(e,t,n);return i.concat(o).concat(r)}}collectNodesFromOwner(e){const t=this._decorationsTree0.collectNodesFromOwner(e),i=this._decorationsTree1.collectNodesFromOwner(e),n=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return t.concat(i).concat(n)}collectNodesPostOrder(){const e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder(),i=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(t).concat(i)}insert(e){uO(e)?this._injectedTextDecorationsTree.insert(e):hO(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){uO(e)?this._injectedTextDecorationsTree.delete(e):hO(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){uO(e)?this._injectedTextDecorationsTree.resolveNode(e,t):hO(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 pO(e){return e.replace(/[^a-z0-9\-_]/gi," ")}class mO{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class fO extends mO{constructor(e){super(e),this._resolvedColor=null,this.position="number"==typeof e.position?e.position:Vg.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 _O extends mO{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?dy.fromHex(e):t.getColor(e.id)}}class vO{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 vO?e:new vO(e)}}class bO{constructor(e){var t,i;this.description=e.description,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?pO(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 fO(e.overviewRuler):null,this.minimap=e.minimap?new _O(e.minimap):null,this.glyphMarginClassName=e.glyphMarginClassName?pO(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?pO(e.linesDecorationsClassName):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?pO(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?pO(e.marginClassName):null,this.inlineClassName=e.inlineClassName?pO(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?pO(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?pO(e.afterContentClassName):null,this.after=e.after?vO.from(e.after):null,this.before=e.before?vO.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 bO(e)}static createDynamic(e){return new bO(e)}}bO.EMPTY=bO.register({description:"empty"});const wO=[bO.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),bO.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),bO.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),bO.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function yO(e){return e instanceof bO?e:bO.createDynamic(e)}class CO extends Nc{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new Vc),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 SO extends Nc{constructor(){super(),this._fastEmitter=this._register(new Vc),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new Vc),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 kO(e,t){return null===e?t?LO.INSTANCE:EO.INSTANCE:new xO(e,t)}class xO{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 r;if(null!==this._projectionData.injectionOffsets){const i=this._projectionData.injectionOffsets.map(((e,t)=>new gI(0,0,e+1,this._projectionData.injectionOptions[t],0)));r=gI.applyInjectedText(e.getLineContent(t),i).substring(n,o)}else r=e.getValueInRange({startLineNumber:t,startColumn:n+1,endLineNumber:t,endColumn:o+1});return i>0&&(r=IO(this._projectionData.wrappedTextIndentLength)+r),r}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,r,s){this._assertVisible();const a=this._projectionData,l=a.injectionOffsets,c=a.injectionOptions;let d,h=null;if(l){h=[];let e=0,t=0;for(let i=0;i<a.getOutputLineCount();i++){const n=new Array;h[i]=n;const o=i>0?a.breakOffsets[i-1]:0,r=a.breakOffsets[i];for(;t<l.length;){const s=c[t].content.length,d=l[t]+e,h=d+s;if(d>r)break;if(o<h){const e=c[t];if(e.inlineClassName){const t=i>0?a.wrappedTextIndentLength:0,s=t+Math.max(d-o,0),l=t+Math.min(h-o,r);s!==l&&n.push(new C_(s,l,e.inlineClassName,e.inlineClassNameAffectsLetterSpacing))}}if(!(h<=r))break;e+=s,t++}}}d=l?e.getLineTokens(t).withInserted(l.map(((e,t)=>({offset:e,text:c[t].content,tokenMetadata:t_.defaultTokenMetadata})))):e.getLineTokens(t);for(let e=i;e<i+n;e++){const t=o+e-i;r[t]?s[t]=this._getViewLineData(d,h?h[e]:null,e):s[t]=null}}_getViewLineData(e,t,i){this._assertVisible();const n=this._projectionData,o=i>0?n.wrappedTextIndentLength:0,r=i>0?n.breakOffsets[i-1]:0,s=n.breakOffsets[i],a=e.sliceAndInflate(r,s,o);let l=a.getLineContent();i>0&&(l=IO(n.wrappedTextIndentLength)+l);const c=this._projectionData.getMinOutputOffset(i)+1,d=l.length+1,h=i+1<this.getViewLineCount(),u=0===i?0:n.breakOffsetsVisibleColumn[i-1];return new b_(l,h,c,d,u,a,t)}getModelColumnOfViewPosition(e,t){return this._assertVisible(),this._projectionData.translateToInputOffset(e,t-1)+1}getViewPositionOfModelPosition(e,t,i=2){return this._assertVisible(),this._projectionData.translateToOutputPosition(t-1,i).toPosition(e)}getViewLineNumberOfModelPosition(e,t){return this._assertVisible(),e+this._projectionData.translateToOutputPosition(t-1).outputLineIndex}normalizePosition(e,t,i){const n=t.lineNumber-e;return this._projectionData.normalizeOutputPosition(e,t.column-1,i).toPosition(n)}getInjectedTextAt(e,t){return this._projectionData.getInjectedText(e,t-1)}_assertVisible(){if(!this._isVisible)throw new Error("Not supported")}}class LO{constructor(){}isVisible(){return!0}setVisible(e){return e?this:EO.INSTANCE}getProjectionData(){return null}getViewLineCount(){return 1}getViewLineContent(e,t,i){return e.getLineContent(t)}getViewLineLength(e,t,i){return e.getLineLength(t)}getViewLineMinColumn(e,t,i){return e.getLineMinColumn(t)}getViewLineMaxColumn(e,t,i){return e.getLineMaxColumn(t)}getViewLineData(e,t,i){const n=e.getLineTokens(t),o=n.getLineContent();return new b_(o,!1,1,o.length+1,0,n.inflate(),null)}getViewLinesData(e,t,i,n,o,r,s){r[o]?s[o]=this.getViewLineData(e,t,0):s[o]=null}getModelColumnOfViewPosition(e,t){return t}getViewPositionOfModelPosition(e,t){return new Yd(e,t)}getViewLineNumberOfModelPosition(e,t){return e}normalizePosition(e,t,i){return t}getInjectedTextAt(e,t){return null}}LO.INSTANCE=new LO;class EO{constructor(){}isVisible(){return!1}setVisible(e){return e?LO.INSTANCE:this}getProjectionData(){return null}getViewLineCount(){return 0}getViewLineContent(e,t,i){throw new Error("Not supported")}getViewLineLength(e,t,i){throw new Error("Not supported")}getViewLineMinColumn(e,t,i){throw new Error("Not supported")}getViewLineMaxColumn(e,t,i){throw new Error("Not supported")}getViewLineData(e,t,i){throw new Error("Not supported")}getViewLinesData(e,t,i,n,o,r,s){throw new Error("Not supported")}getModelColumnOfViewPosition(e,t){throw new Error("Not supported")}getViewPositionOfModelPosition(e,t){throw new Error("Not supported")}getViewLineNumberOfModelPosition(e,t){throw new Error("Not supported")}normalizePosition(e,t,i){throw new Error("Not supported")}getInjectedTextAt(e,t){throw new Error("Not supported")}}EO.INSTANCE=new EO;let NO=[""];function IO(e){if(e>=NO.length)for(let t=1;t<=e;t++)NO[t]=TO(t);return NO[e]}function TO(e){return new Array(e+1).join(" ")}class DO{constructor(e,t,i,n,o,r,s,a,l){this._editorId=e,this.model=t,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=i,this._monospaceLineBreaksComputerFactory=n,this.fontInfo=o,this.tabSize=r,this.wrappingStrategy=s,this.wrappingColumn=a,this.wrappingIndent=l,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new MO(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,r=this.createLineBreaksComputer(),s=new _l(gI.fromDecorations(n));for(let e=0;e<o;e++){const n=s.takeWhile((t=>t.lineNumber===e+1));r.addRequest(i[e],n,t?t[e]:null)}const a=r.finalize(),l=[],c=this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e))).sort(Zd.compareRangesUsingStarts);let d=1,h=0,u=-1,g=u+1<c.length?h+1:o+2;for(let e=0;e<o;e++){const t=e+1;t===g&&(u++,d=c[u].startLineNumber,h=c[u].endLineNumber,g=u+1<c.length?h+1:o+2);const i=t>=d&&t<=h,n=kO(a[e],!i);l[e]=n.getViewLineCount(),this.modelLineProjections[e]=n}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new gf(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(Zd.compareRangesUsingStarts);const i=[];let n=t[0].startLineNumber,o=t[0].endLineNumber;for(let e=1,r=t.length;e<r;e++){const r=t[e];r.startLineNumber>o+1?(i.push(new Zd(n,1,o,1)),n=r.startLineNumber,o=r.endLineNumber):r.endLineNumber>o&&(o=r.endLineNumber)}return i.push(new Zd(n,1,o,1)),i}(e.map((e=>this.model.validateRange(e)))),i=this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e))).sort(Zd.compareRangesUsingStarts);if(t.length===i.length){let e=!1;for(let n=0;n<t.length;n++)if(!t[n].equalsRange(i[n])){e=!0;break}if(!e)return!1}const n=t.map((e=>({range:e,options:bO.EMPTY})));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,n);const o=t;let r=1,s=0,a=-1,l=a+1<o.length?s+1:this.modelLineProjections.length+2,c=!1;for(let e=0;e<this.modelLineProjections.length;e++){const t=e+1;t===l&&(a++,r=o[a].startLineNumber,s=o[a].endLineNumber,l=a+1<o.length?s+1:this.modelLineProjections.length+2);let i=!1;if(t>=r&&t<=s?this.modelLineProjections[e].isVisible()&&(this.modelLineProjections[e]=this.modelLineProjections[e].setVisible(!1),i=!0):(c=!0,this.modelLineProjections[e].isVisible()||(this.modelLineProjections[e]=this.modelLineProjections[e].setVisible(!0),i=!0)),i){const t=this.modelLineProjections[e].getViewLineCount();this.projectedModelLineLineCounts.setValue(e,t)}}return c||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),r=this.wrappingStrategy===t,s=this.wrappingColumn===i,a=this.wrappingIndent===n;if(o&&r&&s&&a)return!1;const l=o&&r&&!s&&a;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=i,this.wrappingIndent=n;let c=null;if(l){c=[];for(let e=0,t=this.modelLineProjections.length;e<t;e++)c[e]=this.modelLineProjections[e].getProjectionData()}return this._constructLines(!1,c),!0}createLineBreaksComputer(){return("advanced"===this.wrappingStrategy?this._domLineBreaksComputerFactory:this._monospaceLineBreaksComputerFactory).createLineBreaksComputer(this.fontInfo,this.tabSize,this.wrappingColumn,this.wrappingIndent)}onModelFlushed(){this._constructLines(!0,null)}onModelLinesDeleted(e,t,i){if(!e||e<=this._validModelVersionId)return null;const n=1===t?1:this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,o=this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections.splice(t-1,i-t+1),this.projectedModelLineLineCounts.removeValues(t-1,i-t+1),new DI(n,o)}onModelLinesInserted(e,t,i,n){if(!e||e<=this._validModelVersionId)return null;const o=t>2&&!this.modelLineProjections[t-2].isVisible(),r=1===t?1:this.projectedModelLineLineCounts.getPrefixSum(t-1)+1;let s=0;const a=[],l=[];for(let e=0,t=n.length;e<t;e++){const t=kO(n[e],!o);a.push(t);const i=t.getViewLineCount();s+=i,l[e]=i}return this.modelLineProjections=this.modelLineProjections.slice(0,t-1).concat(a).concat(this.modelLineProjections.slice(t-1)),this.projectedModelLineLineCounts.insertValues(t-1,l),new AI(r,r+s-1)}onModelLineChanged(e,t,i){if(null!==e&&e<=this._validModelVersionId)return[!1,null,null,null];const n=t-1,o=this.modelLineProjections[n].getViewLineCount(),r=kO(i,this.modelLineProjections[n].isVisible());this.modelLineProjections[n]=r;const s=this.modelLineProjections[n].getViewLineCount();let a=!1,l=0,c=-1,d=0,h=-1,u=0,g=-1;return o>s?(l=this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,c=l+s-1,u=c+1,g=u+(o-s)-1,a=!0):o<s?(l=this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,c=l+o-1,d=c+1,h=d+(s-o)-1,a=!0):(l=this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,c=l+s-1),this.projectedModelLineLineCounts.setValue(n,s),[a,l<=c?new TI(l,c):null,d<=h?new AI(d,h):null,u<=g?new DI(u,g):null]}acceptVersionId(e){this._validModelVersionId=e,1!==this.modelLineProjections.length||this.modelLineProjections[0].isVisible()||this.setHiddenAreas([])}getViewLineCount(){return this.projectedModelLineLineCounts.getTotalSum()}_toValidViewLineNumber(e){if(e<1)return 1;const t=this.getViewLineCount();return e>t?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)),r=this.convertViewPositionToModelPosition(i,this.getViewLineMinColumn(i)),s=this.model.guides.getActiveIndentGuide(n.lineNumber,o.lineNumber,r.lineNumber),a=this.convertModelPositionToViewPosition(s.startLineNumber,1),l=this.convertModelPositionToViewPosition(s.endLineNumber,this.model.getLineMaxColumn(s.endLineNumber));return{startLineNumber:a.lineNumber,endLineNumber:l.lineNumber,indent:s.indent}}getViewLineInfo(e){e=this._toValidViewLineNumber(e);const t=this.projectedModelLineLineCounts.getIndexOf(e-1),i=t.index,n=t.remainder;return new AO(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 Yd(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 Yd(e.modelLineNumber,n)}getViewLineInfosGroupedByModelRanges(e,t){const i=this.getViewLineInfo(e),n=this.getViewLineInfo(t),o=new Array;let r=this.getModelStartPositionOfViewLine(i),s=new Array;for(let e=i.modelLineNumber;e<=n.modelLineNumber;e++){const t=this.modelLineProjections[e-1];if(t.isVisible()){const o=e===i.modelLineNumber?i.modelLineWrappedLineIdx:0,r=e===n.modelLineNumber?n.modelLineWrappedLineIdx+1:t.getViewLineCount();for(let t=o;t<r;t++)s.push(new AO(e,t))}if(!t.isVisible()&&r){const t=new Yd(e-1,this.model.getLineMaxColumn(e-1)+1),i=Zd.fromPositions(r,t);o.push(new OO(i,s)),s=[],r=null}else t.isVisible()&&!r&&(r=new Yd(e,1))}if(r){const e=Zd.fromPositions(r,this.getModelEndPositionOfViewLine(n));o.push(new OO(e,s))}return o}getViewLinesBracketGuides(e,t,i,n){const o=i?this.convertViewPositionToModelPosition(i.lineNumber,i.column):null,r=[];for(const i of this.getViewLineInfosGroupedByModelRanges(e,t)){const e=i.modelRange.startLineNumber,t=this.model.guides.getLinesBracketGuides(e,i.modelRange.endLineNumber,o,n);for(const n of i.viewLines)if(n.isWrappedLineContinuation&&1===this.getMinColumnOfViewLine(n))r.push([]);else{let i=t[n.modelLineNumber-e];i=i.map((e=>e.horizontalLine?new KE(e.visibleColumn,e.className,new qE(e.horizontalLine.top,this.convertModelPositionToViewPosition(n.modelLineNumber,e.horizontalLine.endColumn).column)):e)),r.push(i)}}return r}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 r=[],s=[],a=i.lineNumber-1,l=n.lineNumber-1;let c=null;for(let e=a;e<=l;e++){const t=this.modelLineProjections[e];if(t.isVisible()){const n=t.getViewLineNumberOfModelPosition(0,e===a?i.column:1),o=t.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(e+1)),l=o-n+1;let d=0;l>1&&1===t.getViewLineMinColumn(this.model,e+1,o)&&(d=0===n?1:2),r.push(l),s.push(d),null===c&&(c=new Yd(e+1,0))}else null!==c&&(o=o.concat(this.model.guides.getLinesIndentGuides(c.lineNumber,e)),c=null)}null!==c&&(o=o.concat(this.model.guides.getLinesIndentGuides(c.lineNumber,n.lineNumber)),c=null);const d=t-e+1,h=new Array(d);let u=0;for(let e=0,t=o.length;e<t;e++){let t=o[e];const i=Math.min(d-u,r[e]),n=s[e];let a;a=2===n?0:1===n?1:i;for(let e=0;e<i;e++)e===a&&(t=0),h[u++]=t}return h}getViewLineContent(e){const t=this.getViewLineInfo(e);return this.modelLineProjections[t.modelLineNumber-1].getViewLineContent(this.model,t.modelLineNumber,t.modelLineWrappedLineIdx)}getViewLineLength(e){const t=this.getViewLineInfo(e);return this.modelLineProjections[t.modelLineNumber-1].getViewLineLength(this.model,t.modelLineNumber,t.modelLineWrappedLineIdx)}getViewLineMinColumn(e){const t=this.getViewLineInfo(e);return this.modelLineProjections[t.modelLineNumber-1].getViewLineMinColumn(this.model,t.modelLineNumber,t.modelLineWrappedLineIdx)}getViewLineMaxColumn(e){const t=this.getViewLineInfo(e);return this.modelLineProjections[t.modelLineNumber-1].getViewLineMaxColumn(this.model,t.modelLineNumber,t.modelLineWrappedLineIdx)}getViewLineData(e){const t=this.getViewLineInfo(e);return this.modelLineProjections[t.modelLineNumber-1].getViewLineData(this.model,t.modelLineNumber,t.modelLineWrappedLineIdx)}getViewLinesData(e,t,i){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);const n=this.projectedModelLineLineCounts.getIndexOf(e-1);let o=e;const r=n.index,s=n.remainder,a=[];for(let n=r,l=this.model.getLineCount();n<l;n++){const l=this.modelLineProjections[n];if(!l.isVisible())continue;const c=n===r?s:0;let d=l.getViewLineCount()-c,h=!1;if(o+d>t&&(h=!0,d=t-o+1),l.getViewLinesData(this.model,n+1,c,d,o-e,i,a),o+=d,h)break}return a}validateViewPosition(e,t,i){e=this._toValidViewLineNumber(e);const n=this.projectedModelLineLineCounts.getIndexOf(e-1),o=n.index,r=n.remainder,s=this.modelLineProjections[o],a=s.getViewLineMinColumn(this.model,o+1,r),l=s.getViewLineMaxColumn(this.model,o+1,r);t<a&&(t=a),t>l&&(t=l);const c=s.getModelColumnOfViewPosition(r,t);return this.model.validatePosition(new Yd(o+1,c)).equals(i)?new Yd(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 Zd(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 Yd(i.modelLineNumber,n))}convertViewRangeToModelRange(e){const t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),i=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new Zd(t.lineNumber,t.column,i.lineNumber,i.column)}convertModelPositionToViewPosition(e,t,i=2){const n=this.model.validatePosition(new Yd(e,t)),o=n.lineNumber,r=n.column;let s=o-1,a=!1;for(;s>0&&!this.modelLineProjections[s].isVisible();)s--,a=!0;if(0===s&&!this.modelLineProjections[s].isVisible())return new Yd(1,1);const l=1+this.projectedModelLineLineCounts.getPrefixSum(s);let c;return c=a?this.modelLineProjections[s].getViewPositionOfModelPosition(l,this.model.getLineMaxColumn(s+1),i):this.modelLineProjections[o-1].getViewPositionOfModelPosition(l,r,i),c}convertModelRangeToViewRange(e,t=0){if(e.isEmpty()){const i=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,t);return Zd.fromPositions(i)}{const t=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,1),i=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn,0);return new Zd(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 Zd(n.lineNumber,1,o.lineNumber,o.column),t,i);let r=[];const s=n.lineNumber-1,a=o.lineNumber-1;let l=null;for(let e=s;e<=a;e++)if(this.modelLineProjections[e].isVisible())null===l&&(l=new Yd(e+1,e===s?n.column:1));else if(null!==l){const n=this.model.getLineMaxColumn(e);r=r.concat(this.model.getDecorationsInRange(new Zd(l.lineNumber,l.column,e,n),t,i)),l=null}null!==l&&(r=r.concat(this.model.getDecorationsInRange(new Zd(l.lineNumber,l.column,o.lineNumber,o.column),t,i)),l=null),r.sort(((e,t)=>{const i=Zd.compareRangesUsingStarts(e.range,t.range);return 0===i?e.id<t.id?-1:e.id>t.id?1:0:i}));let c=[],d=0,h=null;for(const e of r){const t=e.id;h!==t&&(h=t,c[d++]=e)}return c}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 AO{constructor(e,t){this.modelLineNumber=e,this.modelLineWrappedLineIdx=t}get isWrappedLineContinuation(){return this.modelLineWrappedLineIdx>0}}class OO{constructor(e,t){this.modelRange=e,this.viewLines=t}}class MO{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 RO{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new PO(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 DI(t,i)}onModelLinesInserted(e,t,i,n){return new AI(t,i)}onModelLineChanged(e,t,i){return[!1,new TI(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 e=0;e<i;e++)n[e]=0;return n}getViewLineContent(e){return this.model.getLineContent(e)}getViewLineLength(e){return this.model.getLineLength(e)}getViewLineMinColumn(e){return this.model.getLineMinColumn(e)}getViewLineMaxColumn(e){return this.model.getLineMaxColumn(e)}getViewLineData(e){const t=this.model.getLineTokens(e),i=t.getLineContent();return new b_(i,!1,1,i.length+1,0,t.inflate(),null)}getViewLinesData(e,t,i){const n=this.model.getLineCount();e=Math.min(Math.max(1,e),n),t=Math.min(Math.max(1,t),n);const o=[];for(let n=e;n<=t;n++){const t=n-e;o[t]=i[t]?this.getViewLineData(n):null}return o}getDecorationsInRange(e,t,i){return this.model.getDecorationsInRange(e,t,i)}normalizePosition(e,t){return this.model.normalizePosition(e,t)}getLineIndentColumn(e){return this.model.getLineIndentColumn(e)}getInjectedTextAt(e){return null}}class PO{constructor(e){this._lines=e}_validPosition(e){return this._lines.model.validatePosition(e)}_validRange(e){return this._lines.model.validateRange(e)}convertViewPositionToModelPosition(e){return this._validPosition(e)}convertViewRangeToModelRange(e){return this._validRange(e)}validateViewPosition(e,t){return this._validPosition(t)}validateViewRange(e,t){return this._validRange(t)}convertModelPositionToViewPosition(e){return this._validPosition(e)}convertModelRangeToViewRange(e){return this._validRange(e)}modelPositionIsVisible(e){const t=this._lines.model.getLineCount();return!(e.lineNumber<1||e.lineNumber>t)}getModelLineViewLineCount(e){return 1}getViewLineNumberOfModelPosition(e,t){return e}}class FO extends Nc{constructor(e,t,i,n,o,r,s,a){if(super(),this.languageConfigurationService=s,this._themeService=a,this._editorId=e,this._configuration=t,this.model=i,this._eventDispatcher=new WI,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new cL(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._tokenizeViewportSoon=this._register(new bm((()=>this.tokenizeViewport()),50)),this._updateConfigurationViewLineCount=this._register(new bm((()=>this._updateConfigurationViewLineCountNow()),0)),this._hasFocus=!1,this._viewportStartLine=-1,this._viewportStartLineTrackedRange=null,this._viewportStartLineDelta=0,this.model.isTooLargeForTokenization())this._lines=new RO(this.model);else{const e=this._configuration.options,t=e.get(44),i=e.get(125),r=e.get(132),s=e.get(124);this._lines=new DO(this._editorId,this.model,n,o,t,this.model.getOptions().tabSize,i,r.wrappingColumn,s)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new qI(i,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new yT(this._configuration,this.getLineCount(),r)),this._register(this.viewLayout.onDidScroll((e=>{e.scrollTopChanged&&this._tokenizeViewportSoon.schedule(),this._eventDispatcher.emitSingleViewEvent(new MI(e)),this._eventDispatcher.emitOutgoingEvent(new HI(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 CT(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(gN.getInstance().onDidChange((()=>{this._eventDispatcher.emitSingleViewEvent(new FI)}))),this._register(this._themeService.onDidColorThemeChange((e=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new RI(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 Zd(e.startLineNumber,this.getLineMinColumn(e.startLineNumber),e.endLineNumber,this.getLineMaxColumn(e.endLineNumber)),i=this._toModelVisibleRanges(t);for(const e of i)this.model.tokenizeViewport(e.startLineNumber,e.endLineNumber)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new EI(e)),this._eventDispatcher.emitOutgoingEvent(new jI(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new yI)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new CI)}_onConfigurationChanged(e,t){let i=null;if(-1!==this._viewportStartLine){const e=new Yd(this._viewportStartLine,this.getLineMinColumn(this._viewportStartLine));i=this.coordinatesConverter.convertViewPositionToModelPosition(e)}let n=!1;const o=this._configuration.options,r=o.get(44),s=o.get(125),a=o.get(132),l=o.get(124);if(this._lines.setWrappingSettings(r,s,a.wrappingColumn,l)&&(e.emitViewEvent(new LI),e.emitViewEvent(new II),e.emitViewEvent(new xI(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 xI(null))),e.emitViewEvent(new SI(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)}cL.shouldRecreate(t)&&(this.cursorConfig=new cL(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,r=e instanceof vI?e.versionId:null,s=this._lines.createLineBreaksComputer();for(const e of o)switch(e.changeType){case 4:for(let t=0;t<e.detail.length;t++){const i=e.detail[t];let n=e.injectedTexts[t];n&&(n=n.filter((e=>!e.ownerId||e.ownerId===this._editorId))),s.addRequest(i,n,null)}break;case 2:{let t=null;e.injectedText&&(t=e.injectedText.filter((e=>!e.ownerId||e.ownerId===this._editorId))),s.addRequest(e.detail,t,null);break}}const a=s.finalize(),l=new _l(a);for(const e of o)switch(e.changeType){case 1:this._lines.onModelFlushed(),t.emitViewEvent(new LI),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),i=!0;break;case 3:{const n=this._lines.onModelLinesDeleted(r,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(r,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,s,a,c]=this._lines.onModelLineChanged(r,e.lineNumber,i);n=o,s&&t.emitViewEvent(s),a&&(t.emitViewEvent(a),this.viewLayout.onLinesInserted(a.fromLineNumber,a.toLineNumber)),c&&(t.emitViewEvent(c),this.viewLayout.onLinesDeleted(c.fromLineNumber,c.toLineNumber));break}}null!==r&&this._lines.acceptVersionId(r),this.viewLayout.onHeightMaybeChanged(),!i&&n&&(t.emitViewEvent(new II),t.emitViewEvent(new xI(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<n;i++){const n=e.ranges[i],o=this.coordinatesConverter.convertModelPositionToViewPosition(new Yd(n.fromLineNumber,1)).lineNumber,r=this.coordinatesConverter.convertModelPositionToViewPosition(new Yd(n.toLineNumber,this.model.getLineMaxColumn(n.toLineNumber))).lineNumber;t[i]={fromLineNumber:o,toLineNumber:r}}this._eventDispatcher.emitSingleViewEvent(new PI(t)),e.tokenizationSupportChanged&&this._tokenizeViewportSoon.schedule()}))),this._register(this.model.onDidChangeLanguageConfiguration((e=>{this._eventDispatcher.emitSingleViewEvent(new NI),this.cursorConfig=new cL(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig)}))),this._register(this.model.onDidChangeLanguage((e=>{this.cursorConfig=new cL(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 LI),e.emitViewEvent(new II),e.emitViewEvent(new xI(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new cL(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 xI(e))})))}setHiddenAreas(e){let t=!1;try{const i=this._eventDispatcher.beginEmitViewEvents();t=this._lines.setHiddenAreas(e),t&&(i.emitViewEvent(new LI),i.emitViewEvent(new II),i.emitViewEvent(new xI(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 UI)}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),r=Math.min(this.getLineCount(),n.completelyVisibleEndLineNumber+i);return this._toModelVisibleRanges(new Zd(o,this.getLineMinColumn(o),r,this.getLineMaxColumn(r)))}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,r=t.startLineNumber,s=t.startColumn;const a=t.endLineNumber,l=t.endColumn;for(let e=0,t=i.length;e<t;e++){const t=i[e].startLineNumber,l=i[e].endLineNumber;l<r||t>a||(r<t&&(n[o++]=new Zd(r,s,t-1,this.model.getLineMaxColumn(t-1))),r=l+1,s=1)}return(r<a||r===a&&s<l)&&(n[o++]=new Zd(r,s,a,l)),n}getCompletelyVisibleViewRange(){const e=this.viewLayout.getLinesViewportData(),t=e.completelyVisibleStartLineNumber,i=e.completelyVisibleEndLineNumber;return new Zd(t,this.getLineMinColumn(t),i,this.getLineMaxColumn(i))}getCompletelyVisibleViewRangeAtScrollTop(e){const t=this.viewLayout.getLinesViewportDataAtScrollTop(e),i=t.completelyVisibleStartLineNumber,n=t.completelyVisibleEndLineNumber;return new Zd(i,this.getLineMinColumn(i),n,this.getLineMaxColumn(n))}saveState(){const e=this.viewLayout.saveState(),t=e.scrollTop,i=this.viewLayout.getLineNumberAtVerticalOffset(t),n=this.coordinatesConverter.convertViewPositionToModelPosition(new Yd(i,this.getLineMinColumn(i))),o=this.viewLayout.getVerticalOffsetForLineNumber(i)-t;return{scrollLeft:e.scrollLeft,firstPosition:n,firstPositionDeltaTop:o}}reduceRestoreState(e){if(void 0===e.firstPosition)return this._reduceRestoreStateCompatibility(e);const t=this.model.validatePosition(e.firstPosition),i=this.coordinatesConverter.convertModelPositionToViewPosition(t),n=this.viewLayout.getVerticalOffsetForLineNumber(i.lineNumber)-e.firstPositionDeltaTop;return{scrollLeft:e.scrollLeft,scrollTop:n}}_reduceRestoreStateCompatibility(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getLineCount(){return this._lines.getViewLineCount()}setViewport(e,t,i){this._viewportStartLine=e;const n=this.coordinatesConverter.convertViewPositionToModelPosition(new Yd(e,this.getLineMinColumn(e)));this._viewportStartLineTrackedRange=this.model._setTrackedRange(this._viewportStartLineTrackedRange,new Zd(n.lineNumber,n.column,n.lineNumber,n.column),1);const o=this.viewLayout.getVerticalOffsetForLineNumber(e),r=this.viewLayout.getCurrentScrollTop();this._viewportStartLineDelta=r-o}getActiveIndentGuide(e,t,i){return this._lines.getActiveIndentGuide(e,t,i)}getLinesIndentGuides(e,t){return this._lines.getViewLinesIndentGuides(e,t)}getBracketGuidesInRangeByLine(e,t,i,n){return this._lines.getViewLinesBracketGuides(e,t,i,n)}getLineContent(e){return this._lines.getViewLineContent(e)}getLineLength(e){return this._lines.getViewLineLength(e)}getLineMinColumn(e){return this._lines.getViewLineMinColumn(e)}getLineMaxColumn(e){return this._lines.getViewLineMaxColumn(e)}getLineFirstNonWhitespaceColumn(e){const t=Su(this.getLineContent(e));return-1===t?0:t+1}getLineLastNonWhitespaceColumn(e){const t=xu(this.getLineContent(e));return-1===t?0:t+2}getDecorationsInViewport(e){return this._decorations.getDecorationsViewportData(e).decorations}getInjectedTextAt(e){return this._lines.getInjectedTextAt(e)}getViewLineRenderingData(e,t){const i=this.model.mightContainRTL(),n=this.model.mightContainNonBasicASCII(),o=this.getTabSize(),r=this._lines.getViewLineData(t);let s=this._decorations.getDecorationsViewportData(e).inlineDecorations[t-e.startLineNumber];return r.inlineDecorations&&(s=[...s,...r.inlineDecorations.map((e=>e.toInlineDecoration(t)))]),new w_(r.minColumn,r.maxColumn,r.content,r.continuesWithWrappedLine,i,n,r.tokens,s,o,r.startVisibleColumn)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,t,i){const n=this._lines.getViewLinesData(e,t,i);return new v_(this.getTabSize(),n)}getAllOverviewRulerDecorations(e){const t=this.model.getOverviewRulerDecorations(this._editorId,oc(this._configuration.options)),i=new BO;for(const n of t){const t=n.options,o=t.overviewRuler;if(!o)continue;const r=o.position;if(0===r)continue;const s=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(s,t.zIndex,a,l,r)}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(Zd.compareRangesUsingStarts);let o=!1,r=!1;for(const t of e)t.isEmpty()?o=!0:r=!0;if(!r){if(!t)return"";const i=e.map((e=>e.startLineNumber));let o="";for(let e=0;e<i.length;e++)e>0&&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 s=[];for(const t of e)t.isEmpty()||s.push(this.model.getValueInRange(t,i?2:0));return 1===s.length?s[0]:s}getRichTextToCopy(e,t){const i=this.model.getLanguageId();if(i===gT)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 Zd(e,this.model.getLineMinColumn(e),e,this.model.getLineMaxColumn(e))}const o=this._configuration.options.get(44),r=this._getColorMap();let s;return/[:;\\\/<>]/.test(o.fontFamily)||o.fontFamily===lc.fontFamily?s=lc.fontFamily:(s=o.fontFamily,s=s.replace(/"/g,"'"),/[,']/.test(s)||/[+ ]/.test(s)&&(s=`'${s}'`),s=`${s}, ${lc.fontFamily}`),{mode:i,html:`<div style="color: ${r[1]};background-color: ${r[2]};font-family: ${s};font-weight: ${o.fontWeight};font-size: ${o.fontSize}px;line-height: ${o.lineHeight}px;white-space: pre;">`+this._getHTMLToCopy(n,r)+"</div>"}}_getHTMLToCopy(e,t){const i=e.startLineNumber,n=e.startColumn,o=e.endLineNumber,r=e.endColumn,s=this.getTabSize();let a="";for(let e=i;e<=o;e++){const l=this.model.getLineTokens(e),c=l.getLineContent(),d=e===i?n-1:0,h=e===o?r-1:c.length;a+=""===c?"<br>":pT(c,l.inflate(),t,d,h,s,Ra)}return a}_getColorMap(){const e=ph.getColorMap(),t=["#000000"];if(e)for(let i=1,n=e.length;i<n;i++)t[i]=dy.Format.CSS.formatHex(e[i]);return t}getPrimaryCursorState(){return this._cursor.getPrimaryCursorState()}getLastAddedCursorIndex(){return this._cursor.getLastAddedCursorIndex()}getCursorStates(){return this._cursor.getCursorStates()}setCursorStates(e,t,i){return this._withViewEventsCollector((n=>this._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 KI):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((r=>this._cursor.compositionType(r,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 Zd(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((t=>t.emitViewEvent(new OI(e,!1,i,null,0,!0,0))))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),i=new Zd(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((t=>t.emitViewEvent(new OI(e,!1,i,null,0,!0,0))))}revealRange(e,t,i,n,o){this._withViewEventsCollector((r=>r.emitViewEvent(new OI(e,!1,i,null,n,t,o))))}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new BI),this._eventDispatcher.emitOutgoingEvent(new UI))}_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 BO{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(e,t,i,n,o){const r=this._asMap[e];if(r){const e=r.data,t=e[e.length-3],s=e[e.length-1];if(t===o&&s+1>=i)return void(n>s&&(e[e.length-1]=n));e.push(o,i,n)}else{const r=new k_(e,t,[o,i,n]);this._asMap[e]=r,this.asArray.push(r)}}}class WO{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 VO;!function(e){e[e.Ignore=0]="Ignore",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error"}(VO||(VO={})),function(e){const t="error",i="warning",n="info";e.fromValue=function(o){return o?Au(t,o)?e.Error:Au(i,o)||Au("warn",o)?e.Warning:Au(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"}}}(VO||(VO={}));var zO=VO;const jO=Mg("notificationService");class HO{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 e=0;e<this.injectionOffsets.length&&i>this.injectionOffsets[e];e++)i<this.injectionOffsets[e]+this.injectionOptions[e].content.length?i=this.injectionOffsets[e]:i-=this.injectionOptions[e].content.length;return i}translateToOutputPosition(e,t=2){let i=e;if(null!==this.injectionOffsets)for(let n=0;n<this.injectionOffsets.length&&!(e<this.injectionOffsets[n])&&(1===t||e!==this.injectionOffsets[n]);n++)i+=this.injectionOptions[n].content.length;return this.offsetInInputWithInjectionsToOutputPosition(i,t)}offsetInInputWithInjectionsToOutputPosition(e,t=2){let i=0,n=this.breakOffsets.length-1,o=0,r=0;for(;i<=n;){o=i+(n-i)/2|0;const s=this.breakOffsets[o];if(r=o>0?this.breakOffsets[o-1]:0,0===t)if(e<=r)n=o-1;else{if(!(e>s))break;i=o+1}else if(e<r)n=o-1;else{if(!(e>=s))break;i=o+1}}let s=e-r;return o>0&&(s+=this.wrappedTextIndentLength),new KO(o,s)}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 KO(e-1,this.getMaxOutputOffset(e-1))}else if(1===i&&e<this.getOutputLineCount()-1&&t===this.getMaxOutputOffset(e))return new KO(e+1,this.getMinOutputOffset(e+1));return new KO(e,t)}outputPositionToOffsetInInputWithInjections(e,t){return e>0&&(t=Math.max(0,t-this.wrappedTextIndentLength)),(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&&UO(this.injectionOptions[i.injectedTextIndex].cursorStops))return i.offsetInInputWithInjections+i.length;{let e=i.offsetInInputWithInjections;if($O(this.injectionOptions[i.injectedTextIndex].cursorStops))return e;let t=i.injectedTextIndex-1;for(;t>=0&&this.injectionOffsets[t]===this.injectionOffsets[i.injectedTextIndex]&&!UO(this.injectionOptions[t].cursorStops)&&(e-=this.injectionOptions[t].content.length,!$O(this.injectionOptions[t].cursorStops));)t--;return e}}if(1===t){let e=i.offsetInInputWithInjections+i.length,t=i.injectedTextIndex;for(;t+1<this.injectionOffsets.length&&this.injectionOffsets[t+1]===this.injectionOffsets[t];)e+=this.injectionOptions[t+1].content.length,t++;return e}if(0===t){let e=i.offsetInInputWithInjections,t=i.injectedTextIndex;for(;t-1>=0&&this.injectionOffsets[t-1]===this.injectionOffsets[t];)e-=this.injectionOptions[t-1].content.length,t--;return e}Dl()}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;o<t.length;o++){const r=i[o].content.length,s=t[o]+n,a=t[o]+n+r;if(s>e)break;if(e<=a)return{injectedTextIndex:o,offsetInInputWithInjections:s,length:r};n+=r}}}}function UO(e){return null==e||e===jg.Right||e===jg.Both}function $O(e){return null==e||e===jg.Left||e===jg.Both}class KO{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(e){return new Yd(e+this.outputLineIndex,this.outputOffset+1)}}class qO{constructor(e,t){this.classifier=new GO(e,t)}static create(e){return new qO(e.get(120),e.get(119))}createLineBreaksComputer(e,t,i,n){const o=[],r=[],s=[];return{addRequest:(e,t,i)=>{o.push(e),r.push(t),s.push(i)},finalize:()=>{const a=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth,l=[];for(let e=0,c=o.length;e<c;e++){const c=r[e],d=s[e];!d||d.injectionOptions||c?l[e]=JO(this.classifier,o[e],c,t,i,a,n):l[e]=XO(this.classifier,d,o[e],t,i,a,n)}return YO.length=0,ZO.length=0,l}}}}class GO extends mf{constructor(e,t){super(0);for(let t=0;t<e.length;t++)this.set(e.charCodeAt(t),1);for(let e=0;e<t.length;e++)this.set(t.charCodeAt(e),2)}get(e){return 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 YO=[],ZO=[];function XO(e,t,i,n,o,r,s){if(-1===o)return null;const a=i.length;if(a<=1)return null;const l=t.breakOffsets,c=t.breakOffsetsVisibleColumn,d=iM(i,n,o,r,s),h=o-d,u=YO,g=ZO;let p=0,m=0,f=0,_=o;const v=l.length;let b=0;if(b>=0){let e=Math.abs(c[b]-_);for(;b+1<v;){const t=Math.abs(c[b+1]-_);if(t>=e)break;e=t,b++}}for(;b<v;){let t=b<0?0:l[b],o=b<0?0:c[b];m>t&&(t=m,o=f);let s=0,d=0,w=0,y=0;if(o<=_){let f=o,v=0===t?0:i.charCodeAt(t-1),b=0===t?0:e.get(v),C=!0;for(let o=t;o<a;o++){const t=o,a=i.charCodeAt(o);let l,c;if(Pu(a)?(o++,l=0,c=2):(l=e.get(a),c=QO(a,f,n,r)),t>m&&tM(0,b,a,l)&&(s=t,d=f),f+=c,f>_){t>m?(w=t,y=f-c):(w=o+1,y=f),f-d>h&&(s=0),C=!1;break}v=a,b=l}if(C){p>0&&(u[p]=l[l.length-1],g[p]=c[l.length-1],p++);break}}if(0===s){let a=o,l=i.charCodeAt(t),c=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(Fu(o)?(n--,g=0,p=2):(g=e.get(o),p=Zu(o)?r:1),a<=_){if(0===w&&(w=t,y=a),a<=_-h)break;if(tM(0,g,l,c)){s=t,d=a;break}}a-=p,l=o,c=g}if(0!==s){const e=h-(y-d);if(e<=n){const t=i.charCodeAt(w);let o;o=Pu(t)?2:QO(t,y,n,r),e-o<0&&(s=0)}}if(u){b--;continue}}if(0===s&&(s=w,d=y),s<=m){const e=i.charCodeAt(m);Pu(e)?(s=m+2,d=f+2):(s=m+1,d=f+QO(e,f,n,r))}for(m=s,u[p]=s,f=d,g[p]=d,p++,_=d+h;b<0||b<v&&c[b]<d;)b++;let C=Math.abs(c[b]-_);for(;b+1<v;){const e=Math.abs(c[b+1]-_);if(e>=C)break;C=e,b++}}return 0===p?null:(u.length=p,g.length=p,YO=t.breakOffsets,ZO=t.breakOffsetsVisibleColumn,t.breakOffsets=u,t.breakOffsetsVisibleColumn=g,t.wrappedTextIndentLength=d,t)}function JO(e,t,i,n,o,r,s){const a=gI.applyInjectedText(t,i);let l,c;if(i&&i.length>0?(l=i.map((e=>e.options)),c=i.map((e=>e.column-1))):(l=null,c=null),-1===o)return l?new HO(c,l,[a.length],[],0):null;const d=a.length;if(d<=1)return l?new HO(c,l,[a.length],[],0):null;const h=iM(a,n,o,r,s),u=o-h,g=[],p=[];let m=0,f=0,_=0,v=o,b=a.charCodeAt(0),w=e.get(b),y=QO(b,0,n,r),C=1;Pu(b)&&(y+=1,b=a.charCodeAt(1),w=e.get(b),C++);for(let t=C;t<d;t++){const i=t,o=a.charCodeAt(t);let s,l;Pu(o)?(t++,s=0,l=2):(s=e.get(o),l=QO(o,y,n,r)),tM(0,w,o,s)&&(f=i,_=y),y+=l,y>v&&((0===f||y-_>u)&&(f=i,_=y-l),g[m]=f,p[m]=_,m++,v=_+u,f=0),b=o,w=s}return 0!==m||i&&0!==i.length?(g[m]=d,p[m]=y,new HO(c,l,g,p,h)):null}function QO(e,t,i,n){return 9===e?i-t%i:Zu(e)||e<32?n:1}function eM(e,t){return t-e%t}function tM(e,t,i,n){return 32!==i&&(2===t||3===t&&2!==n||1===n||3===n&&1!==t)}function iM(e,t,i,n,o){let r=0;if(0!==o){const s=Su(e);if(-1!==s){for(let i=0;i<s;i++)r+=9===e.charCodeAt(i)?eM(r,t):1;const a=3===o?2:2===o?1:0;for(let e=0;e<a;e++)r+=eM(r,t);r+n>i&&(r=0)}}return r}var nM;const oM=null===(nM=window.trustedTypes)||void 0===nM?void 0:nM.createPolicy("domLineBreaksComputer",{createHTML:e=>e});class rM{static create(){return new rM}constructor(){}createLineBreaksComputer(e,t,i,n){const o=[],r=[];return{addRequest:(e,t,i)=>{o.push(e),r.push(t)},finalize:()=>function(e,t,i,n,o,r){var s;function a(t){const i=r[t];if(i){const n=gI.applyInjectedText(e[t],i),o=i.map((e=>e.options)),r=i.map((e=>e.column-1));return new HO(r,o,[n.length],[],0)}return null}if(-1===n){const t=[];for(let i=0,n=e.length;i<n;i++)t[i]=a(i);return t}const l=Math.round(n*t.typicalHalfwidthCharacterWidth),c=3===o?2:2===o?1:0,d=Math.round(i*c),h=Math.ceil(t.spaceWidth*d),u=document.createElement("div");Cg(u,t);const g=bp(1e4),p=[],m=[],f=[],_=[],v=[];for(let n=0;n<e.length;n++){const s=gI.applyInjectedText(e[n],r[n]);let a=0,c=0,d=l;if(0!==o)if(a=Su(s),-1===a)a=0;else{for(let e=0;e<a;e++)c+=9===s.charCodeAt(e)?i-c%i:1;const e=Math.ceil(t.spaceWidth*c);e+t.typicalFullwidthCharacterWidth>l?(a=0,c=0):d=l-e}const u=s.substr(a),b=sM(u,c,i,d,g,h);p[n]=a,m[n]=c,f[n]=u,_[n]=b[0],v[n]=b[1]}const b=g.build(),w=null!==(s=null==oM?void 0:oM.createHTML(b))&&void 0!==s?s:b;u.innerHTML=w,u.style.position="absolute",u.style.top="10000",u.style.wordWrap="break-word",document.body.appendChild(u);const y=document.createRange(),C=Array.prototype.slice.call(u.children,0),S=[];for(let t=0;t<e.length;t++){const e=aM(y,C[t],f[t],_[t]);if(null===e){S[t]=a(t);continue}const i=p[t],n=m[t]+d,o=v[t],s=[];for(let t=0,i=e.length;t<i;t++)s[t]=o[e[t]];if(0!==i)for(let t=0,n=e.length;t<n;t++)e[t]+=i;let l,c;const h=r[t];h?(l=h.map((e=>e.options)),c=h.map((e=>e.column-1))):(l=null,c=null),S[t]=new HO(c,l,e,s,n)}return document.body.removeChild(u),S}(o,e,t,i,n,r)}}}function sM(e,t,i,n,o,r){if(0!==r){const e=String(r);o.appendASCIIString('<div style="text-indent: -'),o.appendASCIIString(e),o.appendASCIIString("px; padding-left: "),o.appendASCIIString(e),o.appendASCIIString("px; box-sizing: border-box; width:")}else o.appendASCIIString('<div style="width:');o.appendASCIIString(String(n)),o.appendASCIIString('px;">');const s=e.length;let a=t,l=0;const c=[],d=[];let h=0<s?e.charCodeAt(0):0;o.appendASCIIString("<span>");for(let t=0;t<s;t++){0!==t&&t%16384==0&&o.appendASCIIString("</span><span>"),c[t]=l,d[t]=a;const n=h;h=t+1<s?e.charCodeAt(t+1):0;let r=1,u=1;switch(n){case 9:r=i-a%i,u=r;for(let e=1;e<=r;e++)e<r?o.write1(160):o.appendASCII(32);break;case 32:32===h?o.write1(160):o.appendASCII(32);break;case 60:o.appendASCIIString("&lt;");break;case 62:o.appendASCIIString("&gt;");break;case 38:o.appendASCIIString("&amp;");break;case 0:o.appendASCIIString("&#00;");break;case 65279:case 8232:case 8233:case 133:o.write1(65533);break;default:Zu(n)&&u++,n<32?o.write1(9216+n):o.write1(n)}l+=r,a+=u}return o.appendASCIIString("</span>"),c[e.length]=l,d[e.length]=a,o.appendASCIIString("</div>"),[c,d]}function aM(e,t,i,n){if(i.length<=1)return null;const o=Array.prototype.slice.call(t.children,0),r=[];try{lM(e,o,n,0,null,i.length-1,null,r)}catch(e){return console.log(e),null}return 0===r.length?null:(r.push(i.length),r)}function lM(e,t,i,n,o,r,s,a){if(n===r)return;if(o=o||cM(e,t,i[n],i[n+1]),s=s||cM(e,t,i[r],i[r+1]),Math.abs(o[0].top-s[0].top)<=.1)return;if(n+1===r)return void a.push(r);const l=n+(r-n)/2|0,c=cM(e,t,i[l],i[l+1]);lM(e,t,i,n,o,l,c,a),lM(e,t,i,l,c,r,s,a)}function cM(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 dM=function(e,t){return function(i,n){t(i,n,e)}};let hM=0;class uM{constructor(e,t,i,n,o){this.model=e,this.viewModel=t,this.view=i,this.hasRealView=n,this.listenersToRemove=o}dispose(){kc(this.listenersToRemove),this.model.onBeforeDetached(),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}let gM=class e extends Nc{constructor(e,t,i,n,o,r,s,a,l,c,d,h){super(),this.languageConfigurationService=d,this._onDidDispose=this._register(new Vc),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new Vc),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new Vc),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new Vc),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new Vc),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new Vc),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeConfiguration=this._register(new Vc),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidChangeModel=this._register(new Vc),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new Vc),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new Vc),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new Vc),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new Vc),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new pM),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new pM),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new Vc),this.onWillType=this._onWillType.event,this._onDidType=this._register(new Vc),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new Vc),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new Vc),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new Vc),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new Vc),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new Vc),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new Vc),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new Vc),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new Vc),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onContextMenu=this._register(new Vc),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new Vc),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new Vc),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new Vc),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new Vc),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new Vc),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new Vc),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new Vc),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new Vc),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new Vc),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=++hM,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=i.telemetryData,this._configuration=this._register(this._createConfiguration(i.isSimpleWidget||!1,u,c)),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(s.createScoped(this._domElement)),this._notificationService=l,this._codeEditorService=o,this._commandService=r,this._themeService=a,this._register(new mM(this,this._contextKeyService)),this._register(new fM(this,this._contextKeyService,h)),this._instantiationService=n.createChild(new WO([Xb,this._contextKeyService])),this._modelData=null,this._contributions={},this._actions={},this._focusTracker=new _M(e),this._register(this._focusTracker.onChange((()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())}))),this._contentWidgets={},this._overlayWidgets={},g=Array.isArray(i.contributions)?i.contributions:Aw.getEditorContributions();for(const e of g)if(this._contributions[e.id])gc(new Error(`Cannot have two contributions with the same id ${e.id}`));else try{const t=this._instantiationService.createInstance(e.ctor,this);this._contributions[e.id]=t}catch(e){gc(e)}Aw.getEditorActions().forEach((e=>{if(this._actions[e.id])return void gc(new Error(`Cannot have two actions with the same id ${e.id}`));const t=new ZI(e.id,e.label,e.alias,Tl(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 Yw(e,t,this._domElement,i)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return Wg.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose();const e=Object.keys(this._contributions);for(let t=0,i=e.length;t<i;t++){const i=e[t];this._contributions[i].dispose()}this._contributions={},this._actions={},this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(e){return this._instantiationService.invokeFunction(e)}updateOptions(e){this._configuration.updateOptions(e||{})}getOptions(){return this._configuration.options}getOption(e){return this._configuration.options.get(e)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(e){return this._modelData?kL.getWordAtPosition(this._modelData.model,this._configuration.options.get(117),e):null}getValue(e=null){if(!this._modelData)return"";const t=!(!e||!e.preserveBOM);let i=0;return e&&e.lineEnding&&"\n"===e.lineEnding?i=1:e&&e.lineEnding&&"\r\n"===e.lineEnding&&(i=2),this._modelData.model.getValue(i,t)}setValue(e){this._modelData&&this._modelData.model.setValue(e)}getModel(){return this._modelData?this._modelData.model:null}setModel(e=null){const t=e;if(null===this._modelData&&null===t)return;if(this._modelData&&this._modelData.model===t)return;const i=this.hasTextFocus(),n=this._detachModel();this._attachModel(t),i&&this.hasModel()&&this.focus();const o={oldModelUrl:n?n.uri:null,newModelUrl:t?t.uri:null};this._removeDecorationTypes(),this._onDidChangeModel.fire(o),this._postDetachModelCleanup(n)}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(let e in this._decorationTypeSubtypes){const t=this._decorationTypeSubtypes[e];for(let i in t)this._removeDecorationType(e+"-"+i)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetForPosition(e,t,i){const n=e.model.validatePosition({lineNumber:t,column:i}),o=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(n);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(o.lineNumber)}getTopForLineNumber(t){return this._modelData?e._getVerticalOffsetForPosition(this._modelData,t,1):-1}getTopForPosition(t,i){return this._modelData?e._getVerticalOffsetForPosition(this._modelData,t,i):-1}setHiddenAreas(e){this._modelData&&this._modelData.viewModel.setHiddenAreas(e.map((e=>Zd.lift(e))))}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),i=this._modelData.model.getOptions().tabSize;return Nk.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(!Yd.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(!Zd.isIRange(e))throw new Error("Invalid arguments");const o=this._modelData.model.validateRange(e),r=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(o);this._modelData.viewModel.revealRange("api",i,r,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 Zd(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(!Yd.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new Zd(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=Xd.isISelection(e),n=Zd.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 Xd(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 Zd(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(!Zd.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(Zd.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;t<i;t++)if(!Xd.isISelection(e[t]))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(t,e,i)}}getContentWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getContentWidth():-1}getScrollWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollWidth():-1}getScrollLeft(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollLeft():-1}getContentHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getContentHeight():-1}getScrollHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollHeight():-1}getScrollTop(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollTop():-1}setScrollLeft(e,t=1){if(this._modelData){if("number"!=typeof e)throw new Error("Invalid arguments");this._modelData.viewModel.viewLayout.setScrollPosition({scrollLeft:e},t)}}setScrollTop(e,t=1){if(this._modelData){if("number"!=typeof e)throw new Error("Invalid arguments");this._modelData.viewModel.viewLayout.setScrollPosition({scrollTop:e},t)}}setScrollPosition(e,t=1){this._modelData&&this._modelData.viewModel.viewLayout.setScrollPosition(e,t)}saveViewState(){if(!this._modelData)return null;const e={},t=Object.keys(this._contributions);for(const i of t){const t=this._contributions[i];"function"==typeof t.saveViewState&&(e[i]=t.saveViewState())}return{cursorState:this._modelData.viewModel.saveCursorState(),viewState:this._modelData.viewModel.saveState(),contributionsState:e}}restoreViewState(e){if(!this._modelData||!this._modelData.hasRealView)return;const t=e;if(t&&t.cursorState&&t.viewState){const e=t.cursorState;Array.isArray(e)?e.length>0&&this._modelData.viewModel.restoreCursorState(e):this._modelData.viewModel.restoreCursorState([e]);const i=t.contributionsState||{},n=Object.keys(this._contributions);for(let e=0,t=n.length;e<t;e++){const t=n[e],o=this._contributions[t];"function"==typeof o.restoreViewState&&o.restoreViewState(i[t])}const o=this._modelData.viewModel.reduceRestoreState(t.viewState);this._modelData.view.restoreState(o)}}getContribution(e){return this._contributions[e]||null}getActions(){const e=[],t=Object.keys(this._actions);for(let i=0,n=t.length;i<n;i++){const n=t[i];e.push(this._actions[n])}return e}getSupportedActions(){let e=this.getActions();return e=e.filter((e=>e.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,gc):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 r=this._modelData.viewModel.getSelection().getStartPosition();this._modelData.viewModel.paste(t,i,n,e);const s=this._modelData.viewModel.getSelection().getStartPosition();"keyboard"===e&&this._onDidPaste.fire({range:new Zd(r.lineNumber,r.column,s.lineNumber,s.column),languageId:o})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,i){const n=Aw.getEditorCommand(t);return!!n&&((i=i||{}).source=e,this._instantiationService.invokeFunction((e=>{Promise.resolve(n.runEditorCommand(e,this,i)).then(void 0,gc)})),!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,oc(this._configuration.options)):null}getDecorationsInRange(e){return this._modelData?this._modelData.model.getDecorationsInRange(e,this._id,oc(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())&&console.warn("Overwriting a content widget with the same id."),this._contentWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(t)}layoutContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const i=this._contentWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(i)}}removeContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const e=this._contentWidgets[t];delete this._contentWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(e)}}addOverlayWidget(e){const t={widget:e,position:e.getPosition()};this._overlayWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(t)}layoutOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const i=this._overlayWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(i)}}removeOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const e=this._overlayWidgets[t];delete this._overlayWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(e)}}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){Cg(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 FO(this._id,this._configuration,e,rM.create(),qO.create(this._configuration.options),(e=>bv(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(ma(0,"The number of cursors has been limited to {0}.",qI.MAX_CURSOR_COUNT));const t=[];for(let i=0,n=e.selections.length;i<n;i++)t[i]=e.selections[i].getPosition();const i={position:t[0],secondaryPositions:t.slice(1),reason:e.reason,source:e.source};this._onDidChangeCursorPosition.fire(i);const n={selection:e.selections[0],secondarySelections:e.selections.slice(1),modelVersionId:e.modelVersionId,oldSelections:e.oldSelections,oldModelVersionId:e.oldModelVersionId,source:e.source,reason:e.reason};this._onDidChangeCursorSelection.fire(n);break}}})));const[n,o]=this._createView(i);if(o){this._domElement.appendChild(n.domNode.domNode);let t=Object.keys(this._contentWidgets);for(let e=0,i=t.length;e<i;e++){const i=t[e];n.addContentWidget(this._contentWidgets[i])}t=Object.keys(this._overlayWidgets);for(let e=0,i=t.length;e<i;e++){const i=t[e];n.addOverlayWidget(this._overlayWidgets[i])}n.render(!1,!0),n.domNode.domNode.setAttribute("data-uri",e.uri.toString())}this._modelData=new uM(e,i,n,o,t)}_createView(e){let t;t=this.isSimpleWidget?{paste:(e,t,i,n)=>{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 XL(e.coordinatesConverter);return 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),[new lI(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}};gM=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([dM(3,Ag),dM(4,Rg),dM(5,Lb),dM(6,Xb),dM(7,ow),dM(8,jO),dM(9,qw),dM(10,Zp),dM(11,Hf)],gM);class pM extends Nc{constructor(){super(),this._onDidChangeToTrue=this._register(new Vc),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new Vc),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 mM extends Nc{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=FL.editorSimpleInput.bindTo(t),this._editorFocus=FL.focus.bindTo(t),this._textInputFocus=FL.textInputFocus.bindTo(t),this._editorTextFocus=FL.editorTextFocus.bindTo(t),this._editorTabMovesFocus=FL.tabMovesFocus.bindTo(t),this._editorReadonly=FL.readOnly.bindTo(t),this._inDiffEditor=FL.inDiffEditor.bindTo(t),this._editorColumnSelection=FL.columnSelection.bindTo(t),this._hasMultipleSelections=FL.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=FL.hasNonEmptySelection.bindTo(t),this._canUndo=FL.canUndo.bindTo(t),this._canRedo=FL.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 fM extends Nc{constructor(e,t,i){super(),this._editor=e,this._contextKeyService=t,this._languageFeaturesService=i,this._langId=FL.languageId.bindTo(t),this._hasCompletionItemProvider=FL.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=FL.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=FL.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=FL.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=FL.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=FL.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=FL.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=FL.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=FL.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=FL.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=FL.hasReferenceProvider.bindTo(t),this._hasRenameProvider=FL.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=FL.hasSignatureHelpProvider.bindTo(t),this._hasInlayHintsProvider=FL.hasInlayHintsProvider.bindTo(t),this._hasDocumentFormattingProvider=FL.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=FL.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=FL.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=FL.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInWalkThrough=FL.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===av.walkThroughSnippet)})):this.reset()}}class _M extends Nc{constructor(e){super(),this._onChange=this._register(new Vc),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(Yv(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 vM=encodeURIComponent("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 3' enable-background='new 0 0 6 3' height='3' width='6'><g fill='"),bM=encodeURIComponent("'><polygon points='5.5,0 2.5,3 1.1,3 4.1,0'/><polygon points='4,0 6,2 6,0.6 5.4,0'/><polygon points='0,2 1,3 2.4,3 0,0.6'/></g></svg>");function wM(e){return vM+encodeURIComponent(e.toString())+bM}const yM=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" height="3" width="12"><g fill="'),CM=encodeURIComponent('"><circle cx="1" cy="1" r="1"/><circle cx="5" cy="1" r="1"/><circle cx="9" cy="1" r="1"/></g></svg>');hw(((e,t)=>{const i=e.getColor(Zy);i&&t.addRule(`.monaco-editor .squiggly-error { border-bottom: 4px double ${i}; }`);const n=e.getColor(Yy);n&&t.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${wM(n)}") repeat-x bottom left; }`);const o=e.getColor(Gy);o&&t.addRule(`.monaco-editor .squiggly-error::before { display: block; content: ''; width: 100%; height: 100%; background: ${o}; }`);const r=e.getColor(Qy);r&&t.addRule(`.monaco-editor .squiggly-warning { border-bottom: 4px double ${r}; }`);const s=e.getColor(Jy);s&&t.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${wM(s)}") repeat-x bottom left; }`);const a=e.getColor(Xy);a&&t.addRule(`.monaco-editor .squiggly-warning::before { display: block; content: ''; width: 100%; height: 100%; background: ${a}; }`);const l=e.getColor(iC);l&&t.addRule(`.monaco-editor .squiggly-info { border-bottom: 4px double ${l}; }`);const c=e.getColor(tC);c&&t.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${wM(c)}") repeat-x bottom left; }`);const d=e.getColor(eC);d&&t.addRule(`.monaco-editor .squiggly-info::before { display: block; content: ''; width: 100%; height: 100%; background: ${d}; }`);const h=e.getColor(oC);h&&t.addRule(`.monaco-editor .squiggly-hint { border-bottom: 2px dotted ${h}; }`);const u=e.getColor(nC);var g;u&&t.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${g=u,yM+encodeURIComponent(g.toString())+CM}") no-repeat bottom left; }`);const p=e.getColor(Nx);p&&t.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${p.rgba.a}; }`);const m=e.getColor(Ex);m&&t.addRule(`.monaco-editor.showUnused .squiggly-unnecessary { border-bottom: 2px dashed ${m}; }`);const f=e.getColor(sC)||"inherit";t.addRule(`.monaco-editor.showDeprecated .squiggly-inline-deprecated { text-decoration: line-through; text-decoration-color: ${f}}`)}));var SM=i(2360),kM={};kM.styleTagTransform=uu(),kM.setAttributes=lu(),kM.insert=su().bind(null,"head"),kM.domAPI=ou(),kM.insertStyleElement=du(),iu()(SM.Z,kM),SM.Z&&SM.Z.locals&&SM.Z.locals;class xM{constructor(e,t,i){const n=e=>this.emitter.fire(e);this.emitter=new Vc({onFirstListenerAdd:()=>e.addEventListener(t,n,i),onLastListenerRemove:()=>e.removeEventListener(t,n,i)})}get event(){return this.emitter.event}dispose(){this.emitter.dispose()}}function LM(e){return e.preventDefault(),e.stopPropagation(),e}var EM=i(1629),NM={};NM.styleTagTransform=uu(),NM.setAttributes=lu(),NM.insert=su().bind(null,"head"),NM.domAPI=ou(),NM.insertStyleElement=du(),iu()(EM.Z,NM),EM.Z&&EM.Z.locals&&EM.Z.locals;var IM,TM=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};!function(e){e.North="north",e.South="south",e.East="east",e.West="west"}(IM||(IM={}));const DM=new Vc,AM=new Vc;class OM{constructor(){this.disposables=new Ec}get onPointerMove(){return this.disposables.add(new xM(window,"mousemove")).event}get onPointerUp(){return this.disposables.add(new xM(window,"mouseup")).event}dispose(){this.disposables.dispose()}}TM([ty],OM.prototype,"onPointerMove",null),TM([ty],OM.prototype,"onPointerUp",null);class MM{constructor(e){this.el=e,this.disposables=new Ec}get onPointerMove(){return this.disposables.add(new xM(this.el,iy.Change)).event}get onPointerUp(){return this.disposables.add(new xM(this.el,iy.End)).event}dispose(){this.disposables.dispose()}}TM([ty],MM.prototype,"onPointerMove",null),TM([ty],MM.prototype,"onPointerUp",null);class RM{constructor(e){this.factory=e}get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}dispose(){}}TM([ty],RM.prototype,"onPointerMove",null),TM([ty],RM.prototype,"onPointerUp",null);const PM="pointer-events-disabled";class FM extends Nc{constructor(e,t,i){super(),this.hoverDelay=300,this.hoverDelayer=this._register(new gm(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new Vc),this._onDidStart=this._register(new Vc),this._onDidChange=this._register(new Vc),this._onDidReset=this._register(new Vc),this._onDidEnd=this._register(new Vc),this.orthogonalStartSashDisposables=this._register(new Ec),this.orthogonalStartDragHandleDisposables=this._register(new Ec),this.orthogonalEndSashDisposables=this._register(new Ec),this.orthogonalEndDragHandleDisposables=this._register(new Ec),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=Zv(e,tb(".monaco-sash")),i.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${i.orthogonalEdge}`),Pa&&this.el.classList.add("mac");const n=this._register(new xM(this.el,"mousedown")).event;this._register(n((e=>this.onPointerStart(e,new OM)),this));const o=this._register(new xM(this.el,"dblclick")).event;this._register(o(this.onPointerDoublePress,this));const r=this._register(new xM(this.el,"mouseenter")).event;this._register(r((()=>FM.onMouseEnter(this))));const s=this._register(new xM(this.el,"mouseleave")).event;this._register(s((()=>FM.onMouseLeave(this)))),this._register(ny.addTarget(this.el));const a=Pc.map(this._register(new xM(this.el,iy.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 MM(this.el))),this));const l=this._register(new xM(this.el,iy.Tap)).event,c=Pc.map(Pc.filter(Pc.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(c(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(DM.event((e=>{this.size=e,this.layout()})))),this._register(AM.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",!1),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=Zv(this.el,tb(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add(Lc((()=>this._orthogonalStartDragHandle.remove()))),this.orthogonalStartDragHandleDisposables.add(new xM(this._orthogonalStartDragHandle,"mouseenter")).event((()=>FM.onMouseEnter(e)),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new xM(this._orthogonalStartDragHandle,"mouseleave")).event((()=>FM.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=Zv(this.el,tb(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add(Lc((()=>this._orthogonalEndDragHandle.remove()))),this.orthogonalEndDragHandleDisposables.add(new xM(this._orthogonalEndDragHandle,"mouseenter")).event((()=>FM.onMouseEnter(e)),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new xM(this._orthogonalEndDragHandle,"mouseleave")).event((()=>FM.onMouseLeave(e)),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalEndSash=e}onPointerStart(e,t){qv(e);let i=!1;if(!e.__orthogonalSashEvent){const n=this.getOrthogonalSash(e);n&&(i=!0,e.__orthogonalSashEvent=!0,n.onPointerStart(e,new RM(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new RM(t))),!this.state)return;const n=("iframe",Array.prototype.slice.call(document.getElementsByTagName("iframe"),0));for(const e of n)e.classList.add(PM);const o=e.pageX,r=e.pageY,s=e.altKey,a={startX:o,currentX:o,startY:r,currentY:r,altKey:s};this.el.classList.add("active"),this._onDidStart.fire(a);const l=jv(this.el),c=()=>{let e="";e=i?"all-scroll":1===this.orientation?1===this.state?"s-resize":2===this.state?"n-resize":Pa?"row-resize":"ns-resize":1===this.state?"e-resize":2===this.state?"w-resize":Pa?"col-resize":"ew-resize",l.textContent=`* { cursor: ${e} !important; }`},d=new Ec;c(),i||this.onDidEnablementChange.event(c,null,d),t.onPointerMove((e=>{qv(e,!1);const t={startX:o,currentX:e.pageX,startY:r,currentY:e.pageY,altKey:s};this._onDidChange.fire(t)}),null,d),t.onPointerUp((e=>{qv(e,!1),this.el.removeChild(l),this.el.classList.remove("active"),this._onDidEnd.fire(),d.dispose();for(const e of n)e.classList.remove(PM)}),null,d),d.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&&FM.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&FM.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){FM.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 BM{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 BM(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)}}var WM=i(4504),VM={};VM.styleTagTransform=uu(),VM.setAttributes=lu(),VM.insert=su().bind(null,"head"),VM.domAPI=ou(),VM.insertStyleElement=du(),iu()(WM.Z,VM),WM.Z&&WM.Z.locals&&WM.Z.locals;const zM={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:Kk.text,TERMINALS:"Terminals"};class jM{constructor(e){this.data=e}update(){}getData(){return this.data}}const HM={CurrentDragAndDropData:void 0};var UM=i(2757),$M={};$M.styleTagTransform=uu(),$M.setAttributes=lu(),$M.insert=su().bind(null,"head"),$M.domAPI=ou(),$M.insertStyleElement=du(),iu()(UM.Z,$M),UM.Z&&UM.Z.locals&&UM.Z.locals;class KM extends Nc{constructor(e,t,i={}){super(),this.options=i,this._context=e||this,this._action=t,t instanceof yb&&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 Cb)),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(ny.addTarget(e));const i=this.options&&this.options.draggable;i&&(e.draggable=!0,ug&&this._register(pv(e,Kv.DRAG_START,(e=>{var t;return null===(t=e.dataTransfer)||void 0===t?void 0:t.setData(zM.TEXT,this._action.label)})))),this._register(pv(t,iy.Tap,(e=>this.onClick(e,!0)))),this._register(pv(t,Kv.MOUSE_DOWN,(e=>{i||qv(e,!0),this._action.enabled&&0===e.button&&t.classList.add("active")}))),Pa&&this._register(pv(t,Kv.CONTEXT_MENU,(e=>{0===e.button&&!0===e.ctrlKey&&this.onClick(e)}))),this._register(pv(t,Kv.CLICK,(e=>{qv(e,!0),this.options&&this.options.isMenu||this.onClick(e)}))),this._register(pv(t,Kv.DBLCLICK,(e=>{qv(e,!0)}))),[Kv.MOUSE_UP,Kv.MOUSE_OUT].forEach((e=>{this._register(pv(t,e,(e=>{qv(e),t.classList.remove("active")})))}))}onClick(e,t=!1){var i;qv(e,!0);const n=xl(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 qM extends KM{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=Zv(this.element,tb("a.action-label"))),this.label&&(this._action.id===Sb.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&&(Zv(this.element,tb("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=ma(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 GM;class YM extends Nc{constructor(e,t={}){var i,n,o,r,s,a;let l,c;switch(super(),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new Vc),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new Vc({onFirstListenerAdd:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new Vc),this.onDidRun=this._onDidRun.event,this._onBeforeRun=this._register(new Vc),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!==(r=null===(o=this.options.triggerKeys)||void 0===o?void 0:o.keyDown)&&void 0!==r&&r,keys:null!==(a=null===(s=this.options.triggerKeys)||void 0===s?void 0:s.keys)&&void 0!==a?a:[3,10]},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new Cb,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],c=[17];break;case 1:l=[16],c=[18],this.domNode.className+=" vertical"}this._register(pv(this.domNode,Kv.KEY_DOWN,(e=>{const t=new ev(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():c&&(t.equals(c[0])||t.equals(c[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 KM&&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(pv(this.domNode,Kv.KEY_UP,(e=>{const t=new ev(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(Yv(this.domNode)),this._register(this.focusTracker.onDidBlur((()=>{zv()!==this.domNode&&Rv(zv(),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 KM&&e.isEnabled()));e instanceof KM&&e.setFocusable(!0)}else this.viewItems.forEach((e=>{e instanceof KM&&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;e<this.actionsList.children.length;e++){const t=this.actionsList.children[e];if(Rv(zv(),t)){this.focusedItem=e;break}}}get context(){return this._context}set context(e){this._context=e,this.viewItems.forEach((t=>t.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=wl(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(pv(i,Kv.CONTEXT_MENU,(e=>{qv(e,!0)}))),this.options.actionViewItemProvider&&(o=this.options.actionViewItemProvider(e)),o||(o=new qM(this.context,e,t)),o.actionRunner=this._actionRunner,o.setActionContext(this.context),o.render(i),this.focusable&&o instanceof KM&&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(){kc(this.viewItems),this.viewItems=[],this._actionIds=[],hv(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;El(o.focus)||(n=!1),this.options.focusOnlyEnabledItems&&El(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 KM){const i=null===t._context||void 0===t._context?e:t._context;this.run(t._action,i)}}run(e,t){return i=this,n=void 0,r=function*(){yield this._actionRunner.run(e,t)},new((o=void 0)||(o=Promise))((function(e,t){function s(e){try{l(r.next(e))}catch(e){t(e)}}function a(e){try{l(r.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof o?i:new o((function(e){e(i)}))).then(s,a)}l((r=r.apply(i,n||[])).next())}));var i,n,o,r}dispose(){kc(this.viewItems),this.viewItems=[],this._actionIds=[],this.getContainer().remove(),super.dispose()}}!function(e){e.getDefinition=function(e,t){let i=e.defaults;for(;sw.isThemeIcon(i);){const e=ZM.getIcon(i.id);if(!e)return;i=e.defaults}return i}}(GM||(GM={}));const ZM=new class{constructor(){this._onDidChange=new Vc,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:ma(0,"The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:ma(0,"The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${Jd.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 r={id:e,description:i,defaults:t,deprecationMessage:n};this.iconsById[e]=r;let s={$ref:"#/definitions/icons"};return n&&(s.deprecationMessage=n),i&&(s.markdownDescription=`${i}: $(${e})`),this.iconSchema.properties[e]=s,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(;sw.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(`|<i class="${t(o)}"></i>|${o.id}|${sw.isThemeIcon(o.defaults)?o.defaults.id:o.id}|${o.description||""}|`);i.push("| preview     | identifier                        "),i.push("| ----------- | --------------------------------- |");for(const o of n.filter((e=>!sw.isThemeIcon(e.defaults))).sort(e))i.push(`|<i class="${t(o)}"></i>|${o.id}|`);return i.join("\n")}};function XM(e,t,i,n){return ZM.registerIcon(e,t,i,n)}function JM(){return ZM}iw.add("base.contributions.icons",ZM),function(){for(const e of lh.getAll())ZM.registerIcon(e.id,e.definition,e.description)}();const QM="vscode://schemas/icons";let eR=iw.as(hy);eR.registerSchema(QM,ZM.getIconSchema());const tR=new bm((()=>eR.notifySchemaChanged(QM)),200);ZM.onDidChange((()=>{tR.isScheduled()||tR.schedule()})),XM("widget-close",lh.close,ma(0,"Icon for the close action in widgets.")),XM("goto-previous-location",lh.arrowUp,ma(0,"Icon for goto previous editor location.")),XM("goto-next-location",lh.arrowDown,ma(0,"Icon for goto next editor location.")),sw.modify(lh.sync,"spin"),sw.modify(lh.loading,"spin");var iR;class nR{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 oR{constructor(e){this.entries=e}}const rR=XM("diff-review-insert",lh.add,ma(0,"Icon for 'Insert' in diff review.")),sR=XM("diff-review-remove",lh.remove,ma(0,"Icon for 'Remove' in diff review.")),aR=XM("diff-review-close",lh.close,ma(0,"Icon for 'Close' in diff review."));let lR=class e extends Nc{constructor(e,t){super(),this._languageService=t,this._width=0,this._diffEditor=e,this._isVisible=!1,this.shadow=yg(document.createElement("div")),this.shadow.setClassName("diff-review-shadow"),this.actionBarContainer=yg(document.createElement("div")),this.actionBarContainer.setClassName("diff-review-actions"),this._actionBar=this._register(new YM(this.actionBarContainer.domNode)),this._actionBar.push(new yb("diffreview.close",ma(0,"Close"),"close-diff-review "+sw.asClassName(aR),!0,(()=>{return e=this,t=void 0,n=function*(){return this.hide()},new((i=void 0)||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}));var e,t,i,n})),{label:!1,icon:!0}),this.domNode=yg(document.createElement("div")),this.domNode.setClassName("diff-review monaco-editor-background"),this._content=yg(document.createElement("div")),this._content.setClassName("diff-review-content"),this._content.setAttribute("role","code"),this.scrollbar=this._register(new PE(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(mv(this.domNode.domNode,"click",(e=>{e.preventDefault();const t=Pv(e.target,"diff-review-row");t&&this._goToRow(t)}))),this._register(mv(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;e<i;e++)if(this._diffs[e]===this._currentDiff){t=e;break}e=this._diffs.length+t-1}else e=this._findDiffIndex(this._diffEditor.getPosition());if(0===this._diffs.length)return;e%=this._diffs.length;const t=this._diffs[e].entries;this._diffEditor.setPosition(new Yd(t[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:t[0].modifiedLineStart,endColumn:1073741824,endLineNumber:t[t.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow())}next(){let e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let t=-1;for(let e=0,i=this._diffs.length;e<i;e++)if(this._diffs[e]===this._currentDiff){t=e;break}e=t+1}else e=this._findDiffIndex(this._diffEditor.getPosition());if(0===this._diffs.length)return;e%=this._diffs.length;const t=this._diffs[e].entries;this._diffEditor.setPosition(new Yd(t[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:t[0].modifiedLineStart,endColumn:1073741824,endLineNumber:t[t.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow())}accept(){let e=-1;const t=this._getCurrentFocusedRow();if(t){const i=parseInt(t.getAttribute("data-line"),10);isNaN(i)||(e=i)}this.hide(),-1!==e&&(this._diffEditor.setPosition(new Yd(e,1)),this._diffEditor.revealPosition(new Yd(e,1),1))}hide(){this._isVisible=!1,this._diffEditor.updateOptions({readOnly:!1}),this._diffEditor.focus(),this._diffEditor.doLayout(),this._render()}_getPrevRow(){const e=this._getCurrentFocusedRow();return e?e.previousElementSibling?e.previousElementSibling:e:this._getFirstRow()}_getNextRow(){const e=this._getCurrentFocusedRow();return e?e.nextElementSibling?e.nextElementSibling:e:this._getFirstRow()}_getFirstRow(){return this.domNode.domNode.querySelector(".diff-review-row")}_getCurrentFocusedRow(){const e=document.activeElement;return e&&/diff-review-row/.test(e.className)?e:null}_goToRow(e){const t=this._getCurrentFocusedRow();e.tabIndex=0,e.focus(),t&&t!==e&&(t.tabIndex=-1),this.scrollbar.scanDomNode()}isVisible(){return this._isVisible}layout(e,t,i){this._width=t,this.shadow.setTop(e-6),this.shadow.setWidth(t),this.shadow.setHeight(this._isVisible?6:0),this.domNode.setTop(e),this.domNode.setWidth(t),this.domNode.setHeight(i),this._content.setHeight(i),this._content.setWidth(t),this._isVisible?(this.actionBarContainer.setAttribute("aria-hidden","false"),this.actionBarContainer.setDisplay("block")):(this.actionBarContainer.setAttribute("aria-hidden","true"),this.actionBarContainer.setDisplay("none"))}_compute(){const t=this._diffEditor.getLineChanges();if(!t||0===t.length)return[];const i=this._diffEditor.getOriginalEditor().getModel(),n=this._diffEditor.getModifiedEditor().getModel();return i&&n?e._mergeAdjacent(t,i.getLineCount(),n.getLineCount()):[]}static _mergeAdjacent(e,t,i){if(!e||0===e.length)return[];const n=[];let o=0;for(let r=0,s=e.length;r<s;r++){const a=e[r],l=a.originalStartLineNumber,c=a.originalEndLineNumber,d=a.modifiedStartLineNumber,h=a.modifiedEndLineNumber,u=[];let g=0;{const t=0===c?l:l-1,i=0===h?d:d-1;let n=1,o=1;if(r>0){const t=e[r-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,a=i-3+1;if(s<n){const e=n-s;s+=e,a+=e}if(a<o){const e=o-a;s+=e,a+=e}u[g++]=new nR(s,t,a,i)}0!==c&&(u[g++]=new nR(l,c,0,0)),0!==h&&(u[g++]=new nR(0,0,d,h));{const n=0===c?l+1:c+1,o=0===h?d+1:h+1;let a=t,p=i;if(r+1<s){const t=e[r+1];a=0===t.originalEndLineNumber?t.originalStartLineNumber:t.originalStartLineNumber-1,p=0===t.modifiedEndLineNumber?t.modifiedStartLineNumber:t.modifiedStartLineNumber-1}let m=n+3-1,f=o+3-1;if(m>a){const e=a-m;m+=e,f+=e}if(f>p){const e=p-f;m+=e,f+=e}u[g++]=new nR(n,m,o,f)}n[o++]=new oR(u)}let r=n[0].entries;const s=[];let a=0;for(let e=1,t=n.length;e<t;e++){const t=n[e].entries,i=r[r.length-1],o=t[0];0===i.getType()&&0===o.getType()&&o.originalLineStart<=i.originalLineEnd?(r[r.length-1]=new nR(i.originalLineStart,o.originalLineEnd,i.modifiedLineStart,o.modifiedLineEnd),r=r.concat(t.slice(1))):(s[a++]=new oR(r),r=t)}return s[a++]=new oR(r),s}_findDiffIndex(e){const t=e.lineNumber;for(let e=0,i=this._diffs.length;e<i;e++){const i=this._diffs[e].entries;if(t<=i[i.length-1].modifiedLineEnd)return e}return 0}_render(){const t=this._diffEditor.getOriginalEditor().getOptions(),i=this._diffEditor.getModifiedEditor().getOptions(),n=this._diffEditor.getOriginalEditor().getModel(),o=this._diffEditor.getModifiedEditor().getModel(),r=n.getOptions(),s=o.getOptions();if(!this._isVisible||!n||!o)return hv(this._content.domNode),this._currentDiff=null,void this.scrollbar.scanDomNode();this._diffEditor.updateOptions({readOnly:!0});const a=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs[a]===this._currentDiff)return;this._currentDiff=this._diffs[a];const l=this._diffs[a].entries,c=document.createElement("div");c.className="diff-review-table",c.setAttribute("role","list"),c.setAttribute("aria-label",'Difference review. Use "Stage | Unstage | Revert Selected Ranges" commands'),Cg(c,i.get(44));let d=0,h=0,u=0,g=0;for(let e=0,t=l.length;e<t;e++){const t=l[e],i=t.originalLineStart,n=t.originalLineEnd,o=t.modifiedLineStart,r=t.modifiedLineEnd;0!==i&&(0===d||i<d)&&(d=i),0!==n&&(0===h||n>h)&&(h=n),0!==o&&(0===u||o<u)&&(u=o),0!==r&&(0===g||r>g)&&(g=r)}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-d+1,_=g-u+1;m.appendChild(document.createTextNode(`${a+1}/${this._diffs.length}: @@ -${d},${f} +${u},${_} @@`)),p.setAttribute("data-line",String(u));const v=e=>0===e?ma(0,"no lines changed"):1===e?ma(0,"1 line changed"):ma(0,"{0} lines changed",e),b=v(f),w=v(_);p.setAttribute("aria-label",ma(0,"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",a+1,this._diffs.length,d,b,u,w)),p.appendChild(m),p.setAttribute("role","listitem"),c.appendChild(p);const y=i.get(59);let C=u;for(let a=0,d=l.length;a<d;a++){const d=l[a];e._renderSection(c,d,C,y,this._width,t,n,r,i,o,s,this._languageService.languageIdCodec),0!==d.modifiedLineStart&&(C=d.modifiedLineEnd)}hv(this._content.domNode),this._content.domNode.appendChild(c),this.scrollbar.scanDomNode()}static _renderSection(t,i,n,o,r,s,a,l,c,d,h,u){const g=i.getType();let p="diff-review-row",m="",f=null;switch(g){case 1:p="diff-review-row line-insert",m=" char-insert",f=rR;break;case 2:p="diff-review-row line-delete",m=" char-delete",f=sR}const _=i.originalLineStart,v=i.originalLineEnd,b=i.modifiedLineStart,w=i.modifiedLineEnd,y=Math.max(w-b,v-_),C=s.get(131),S=C.glyphMarginWidth+C.lineNumbersWidth,k=c.get(131),x=10+k.glyphMarginWidth+k.lineNumbersWidth;for(let i=0;i<=y;i++){const v=0===_?0:_+i,w=0===b?0:b+i,y=document.createElement("div");y.style.minWidth=r+"px",y.className=p,y.setAttribute("role","listitem"),0!==w&&(n=w),y.setAttribute("data-line",String(n));const C=document.createElement("div");C.className="diff-review-cell",C.style.height=`${o}px`,y.appendChild(C);const k=document.createElement("span");k.style.width=S+"px",k.style.minWidth=S+"px",k.className="diff-review-line-number"+m,0!==v?k.appendChild(document.createTextNode(String(v))):k.innerText=" ",C.appendChild(k);const L=document.createElement("span");L.style.width=x+"px",L.style.minWidth=x+"px",L.style.paddingRight="10px",L.className="diff-review-line-number"+m,0!==w?L.appendChild(document.createTextNode(String(w))):L.innerText=" ",C.appendChild(L);const E=document.createElement("span");if(E.className="diff-review-spacer",f){const e=document.createElement("span");e.className=sw.asClassName(f),e.innerText="  ",E.appendChild(e)}else E.innerText="  ";let N;if(C.appendChild(E),0!==w){let t=this._renderLine(d,c,h.tabSize,w,u);e._ttPolicy&&(t=e._ttPolicy.createHTML(t)),C.insertAdjacentHTML("beforeend",t),N=d.getLineContent(w)}else{let t=this._renderLine(a,s,l.tabSize,v,u);e._ttPolicy&&(t=e._ttPolicy.createHTML(t)),C.insertAdjacentHTML("beforeend",t),N=a.getLineContent(v)}0===N.length&&(N=ma(0,"blank"));let I="";switch(g){case 0:I=v===w?ma(0,"{0} unchanged line {1}",N,v):ma(0,"{0} original line {1} modified line {2}",N,v,w);break;case 1:I=ma(0,"+ {0} modified line {1}",N,w);break;case 2:I=ma(0,"- {0} original line {1}",N,v)}y.setAttribute("aria-label",I),t.appendChild(y)}}static _renderLine(e,t,i,n,o){const r=e.getLineContent(n),s=t.get(44),a=t_.createEmpty(r,o),l=w_.isBasicASCII(r,e.mightContainNonBasicASCII()),c=w_.containsRTL(r,l,e.mightContainRTL());return p_(new l_(s.isMonospace&&!t.get(29),s.canUseHalfwidthRightwardsArrow,r,!1,l,c,0,a,[],i,0,s.spaceWidth,s.middotWidth,s.wsmiddotWidth,t.get(105),t.get(88),t.get(83),t.get(45)!==tc.OFF,null)).html}};function cR(e){const t=e.get(Rg),i=t.listDiffEditors(),n=t.getActiveCodeEditor();if(!n)return null;for(let e=0,t=i.length;e<t;e++){const t=i[e];if(t.getModifiedEditor().getId()===n.getId()||t.getOriginalEditor().getId()===n.getId())return t}return null}lR._ttPolicy=null===(iR=window.trustedTypes)||void 0===iR?void 0:iR.createPolicy("diffReview",{createHTML:e=>e}),lR=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([function(e,t){return function(i,n){t(i,n,e)}}(1,Hp)],lR),hw(((e,t)=>{const i=e.getColor(wx);i&&t.addRule(`.monaco-diff-editor .diff-review-line-number { color: ${i}; }`);const n=e.getColor(Hy);n&&t.addRule(`.monaco-diff-editor .diff-review-shadow { box-shadow: ${n} 0 -6px 6px -6px inset; }`)})),Tw(class extends Nw{constructor(){super({id:"editor.action.diffReview.next",label:ma(0,"Go to Next Difference"),alias:"Go to Next Difference",precondition:Tb.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:65,weight:100}})}run(e,t){const i=cR(e);i&&i.diffReviewNext()}}),Tw(class extends Nw{constructor(){super({id:"editor.action.diffReview.prev",label:ma(0,"Go to Previous Difference"),alias:"Go to Previous Difference",precondition:Tb.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:1089,weight:100}})}run(e,t){const i=cR(e);i&&i.diffReviewPrev()}});const dR=Mg("editorWorkerService"),hR=Mg("contextViewService"),uR=Mg("contextMenuService");var gR=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class pR extends Nc{constructor(e,t,i,n,o,r){super(),this._viewZoneId=e,this._marginDomNode=t,this.editor=i,this.diff=n,this._contextMenuService=o,this._clipboardService=r,this._visibility=!1,this._marginDomNode.style.zIndex="10",this._diffActions=document.createElement("div"),this._diffActions.className=lh.lightBulb.classNames+" lightbulb-glyph",this._diffActions.style.position="absolute";const s=i.getOption(59),a=i.getModel().getEOL();this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=`${s}px`,this._diffActions.style.lineHeight=`${s}px`,this._marginDomNode.appendChild(this._diffActions);const l=[],c=0===n.modifiedEndLineNumber;l.push(new yb("diff.clipboard.copyDeletedContent",c?n.originalEndLineNumber>n.modifiedStartLineNumber?ma(0,"Copy deleted lines"):ma(0,"Copy deleted line"):n.originalEndLineNumber>n.modifiedStartLineNumber?ma(0,"Copy changed lines"):ma(0,"Copy changed line"),void 0,!0,(()=>gR(this,void 0,void 0,(function*(){const e=new Zd(n.originalStartLineNumber,1,n.originalEndLineNumber+1,1),t=n.originalModel.getValueInRange(e);yield this._clipboardService.writeText(t)})))));let d,h=0;n.originalEndLineNumber>n.modifiedStartLineNumber&&(d=new yb("diff.clipboard.copyDeletedLineContent",ma(0,c?"Copy deleted line ({0})":"Copy changed line ({0})",n.originalStartLineNumber),void 0,!0,(()=>gR(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(d)),i.getOption(81)||l.push(new yb("diff.inline.revertChange",ma(0,"Revert this change"),void 0,!0,(()=>gR(this,void 0,void 0,(function*(){const e=new Zd(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 Zd(n.modifiedStartLineNumber,e,n.modifiedStartLineNumber,e),text:a+t}])}else{const e=i.getModel().getLineMaxColumn(n.modifiedEndLineNumber);i.executeEdits("diffEditor",[{range:new Zd(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,e),text:t}])}})))));const u=(e,t)=>{this._contextMenuService.showContextMenu({getAnchor:()=>({x:e,y:t}),getActions:()=>(d&&(d.label=ma(0,c?"Copy deleted line ({0})":"Copy changed line ({0})",n.originalStartLineNumber+h)),l),autoSelectFirstItem:!0})};this._register(mv(this._diffActions,"mousedown",(e=>{const{top:t,height:i}=Iv(this._diffActions),n=Math.floor(s/3);e.preventDefault(),u(e.posx,t+i+n)}))),this._register(i.onMouseMove((e=>{(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,s)):this.visibility=!1}))),this._register(i.onMouseDown((e=>{!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,s),u(e.event.posx,e.event.posy+s))})))}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}=Iv(e),o=t-n,r=Math.floor(o/i),s=r*i;if(this._diffActions.style.top=`${s}px`,this.diff.viewLineCounts){let e=0;for(let t=0;t<this.diff.viewLineCounts.length;t++)if(e+=this.diff.viewLineCounts[t],r<e)return t}return r}}const mR=Mg("clipboardService");Object.freeze({total(){},worked(){},done(){}}),Object.freeze({report(){}});const fR=Mg("editorProgressService");var _R,vR=function(e,t){return function(i,n){t(i,n,e)}};class bR{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?BM.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,r=i.zones.length;o<r;o++){const r=i.zones[o];r.suppressMouseDown=!0;const s=t.addZone(r);this._zones.push(s),this._zonesMap[String(s)]=!0,i.zones[o].diff&&r.marginDomNode&&(r.suppressMouseDown=!1,0!==(null===(n=i.zones[o].diff)||void 0===n?void 0:n.originalModel.getValueLength())&&this._inlineDiffMargins.push(new pR(s,r.marginDomNode,e,i.zones[o].diff,this._contextMenuService,this._clipboardService)))}})),o&&o.restore(e),this._decorations=e.deltaDecorations(this._decorations,i.decorations),t&&t.setZones(i.overviewZones)}}let wR=0;const yR=XM("diff-insert",lh.add,ma(0,"Line decoration for inserts in the diff editor.")),CR=XM("diff-remove",lh.remove,ma(0,"Line decoration for removals in the diff editor.")),SR=null===(_R=window.trustedTypes)||void 0===_R?void 0:_R.createPolicy("diffEditorWidget",{createHTML:e=>e});let kR=class e extends Nc{constructor(t,i,n,o,r,s,a,l,c,d,h,u){super(),this._editorProgressService=u,this._onDidDispose=this._register(new Vc),this.onDidDispose=this._onDidDispose.event,this._onDidUpdateDiff=this._register(new Vc),this.onDidUpdateDiff=this._onDidUpdateDiff.event,this._onDidContentSizeChange=this._register(new Vc),this._lastOriginalWarning=null,this._lastModifiedWarning=null,this._editorWorkerService=r,this._codeEditorService=l,this._contextKeyService=this._register(s.createScoped(t)),this._instantiationService=a.createChild(new WO([Xb,this._contextKeyService])),this._contextKeyService.createKey("isInDiffEditor",!0),this._themeService=c,this._notificationService=d,this._id=++wR,this._state=0,this._updatingDiffProgress=null,this._domElement=t,i=i||{},this._options=BR(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 bm((()=>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=yg(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(mv(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 bR(h,o),this._modifiedEditorState=new bR(h,o),this._isVisible=!0,this._isHandlingScrollEvent=!1,this._elementSizeObserver=this._register(new Hw(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(lR,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 TR(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new AR(this._createDataSource(),this._options.enableSplitViewResizing)),this._register(c.onDidColorThemeChange((t=>{this._strategy&&this._strategy.applyColors(t)&&this._updateDecorationsRunner.schedule(),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)})));const g=Aw.getDiffEditorContributions();for(const e of g)try{this._register(a.createInstance(e.ctor,this))}catch(e){gc(e)}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+=lw(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(gM,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 Wg.IDiffEditor}getLineChanges(){return this._diffComputationResult?this._diffComputationResult.changes:null}getOriginalEditor(){return this._originalEditor}getModifiedEditor(){return this._modifiedEditor}updateOptions(t){const i=BR(t,this._options),n=(r=i,{enableSplitViewResizing:(o=this._options).enableSplitViewResizing!==r.enableSplitViewResizing,renderSideBySide:o.renderSideBySide!==r.renderSideBySide,maxComputationTime:o.maxComputationTime!==r.maxComputationTime,maxFileSize:o.maxFileSize!==r.maxFileSize,ignoreTrimWhitespace:o.ignoreTrimWhitespace!==r.ignoreTrimWhitespace,renderIndicators:o.renderIndicators!==r.renderIndicators,originalEditable:o.originalEditable!==r.originalEditable,diffCodeLens:o.diffCodeLens!==r.diffCodeLens,renderOverviewRuler:o.renderOverviewRuler!==r.renderOverviewRuler,diffWordWrap:o.diffWordWrap!==r.diffWordWrap});var o,r;this._options=i;const s=n.ignoreTrimWhitespace||n.renderIndicators,a=this._isVisible&&(n.maxComputationTime||n.maxFileSize);s?this._beginUpdateDecorations():a&&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 TR(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new AR(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,r=e=>{const t=e.getValueLength();return 0===o||t<=o};r(t)&&r(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(ma(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=hc.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),r=i>0?o/i:0;return{height:Math.max(0,Math.floor(e.height*r)),top:Math.floor(t*r)}}_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<t(i[0]))return null;let n=0,o=i.length-1;for(;n<o;){const r=Math.floor((n+o)/2),s=t(i[r]),a=r+1<=o?t(i[r+1]):1073741824;e<s?o=r-1:e>=a?n=r+1:(n=r,o=r)}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,r=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-i;return s<=o?n+Math.min(s,r):n+r-o+s}_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,r=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-n;return s<=r?i+Math.min(s,o):i+o-r+s}getDiffLineInformationForOriginal(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(e)}:null}getDiffLineInformationForModified(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(e)}:null}};kR.ONE_OVERVIEW_WIDTH=15,kR.ENTIRE_DIFF_OVERVIEW_WIDTH=30,kR.UPDATE_DIFF_DECORATIONS_DELAY=200,kR=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([vR(3,mR),vR(4,dR),vR(5,Xb),vR(6,Ag),vR(7,Rg),vR(8,ow),vR(9,jO),vR(10,uR),vR(11,fR)],kR);class xR extends Nc{constructor(e){super(),this._dataSource=e,this._insertColor=null,this._removeColor=null}applyColors(e){const t=e.getColor(PC)||(e.getColor(TC)||NC).transparent(2),i=e.getColor(FC)||(e.getColor(DC)||IC).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 r=this._getViewZones(e,n,o,i),s=this._getOriginalEditorDecorations(r,e,t,i),a=this._getModifiedEditorDecorations(r,e,t,i);return{original:{decorations:s.decorations,overviewZones:s.overviewZones,zones:r.original},modified:{decorations:a.decorations,overviewZones:a.overviewZones,zones:r.modified}}}}class LR{constructor(e){this._source=e,this._index=-1,this.current=null,this.advance()}advance(){this._index++,this._index<this._source.length?this.current=this._source[this._index]:this.current=null}}class ER{constructor(e,t,i,n,o){this._lineChanges=e,this._originalForeignVZ=t,this._modifiedForeignVZ=i,this._originalEditor=n,this._modifiedEditor=o}static _getViewLineCount(e,t,i){const n=e.getModel(),o=e._getViewModel();if(n&&o){const e=FR(n,o,t,i);return e.endLineNumber-e.startLineNumber+1}return i-t+1}getViewZones(){const e=this._originalEditor.getOption(59),t=this._modifiedEditor.getOption(59),i=-1!==this._originalEditor.getOption(132).wrappingColumn,n=-1!==this._modifiedEditor.getOption(132).wrappingColumn,o=i||n,r=this._originalEditor.getModel(),s=this._originalEditor._getViewModel().coordinatesConverter,a=this._modifiedEditor._getViewModel().coordinatesConverter,l=[],c=[];let d=0,h=0,u=0,g=0,p=0,m=0;const f=(e,t)=>e.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 LR(this._modifiedForeignVZ),b=new LR(this._originalForeignVZ);let w=1,y=1;for(let i=0,n=this._lineChanges.length;i<=n;i++){const C=i<n?this._lineChanges[i]:null;null!==C?(u=C.originalStartLineNumber+(C.originalEndLineNumber>0?-1:0),g=C.modifiedStartLineNumber+(C.modifiedEndLineNumber>0?-1:0),h=C.originalEndLineNumber>0?ER._getViewLineCount(this._originalEditor,C.originalStartLineNumber,C.originalEndLineNumber):0,d=C.modifiedEndLineNumber>0?ER._getViewLineCount(this._modifiedEditor,C.modifiedStartLineNumber,C.modifiedEndLineNumber):0,p=Math.max(C.originalStartLineNumber,C.originalEndLineNumber),m=Math.max(C.modifiedStartLineNumber,C.modifiedEndLineNumber)):(u+=1e7+h,g+=1e7+d,p=u,m=g);let S=[],k=[];if(o){let e;e=C?C.originalEndLineNumber>0?C.originalStartLineNumber-w:C.modifiedStartLineNumber-y:r.getLineCount()-w+1;for(let t=0;t<e;t++){const e=w+t,i=y+t,n=s.getModelLineViewLineCount(e),o=a.getModelLineViewLineCount(i);n<o?S.push({afterLineNumber:e,heightInLines:o-n,domNode:null,marginDomNode:null}):n>o&&k.push({afterLineNumber:i,heightInLines:n-o,domNode:null,marginDomNode:null})}C&&(w=(C.originalEndLineNumber>0?C.originalEndLineNumber:C.originalStartLineNumber)+1,y=(C.modifiedEndLineNumber>0?C.modifiedEndLineNumber:C.modifiedStartLineNumber)+1)}for(;v.current&&v.current.afterLineNumber<=m;){let e;e=v.current.afterLineNumber<=g?u-g+v.current.afterLineNumber:p;let i=null;C&&C.modifiedStartLineNumber<=v.current.afterLineNumber&&v.current.afterLineNumber<=C.modifiedEndLineNumber&&(i=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),S.push({afterLineNumber:e,heightInLines:v.current.height/t,domNode:null,marginDomNode:i}),v.advance()}for(;b.current&&b.current.afterLineNumber<=p;){let t;t=b.current.afterLineNumber<=u?g-u+b.current.afterLineNumber:m,k.push({afterLineNumber:t,heightInLines:b.current.height/e,domNode:null}),b.advance()}if(null!==C&&MR(C)){const e=this._produceOriginalFromDiff(C,h,d);e&&S.push(e)}if(null!==C&&RR(C)){const e=this._produceModifiedFromDiff(C,h,d);e&&k.push(e)}let x=0,L=0;for(S=S.sort(f),k=k.sort(f);x<S.length&&L<k.length;){const e=S[x],t=k[L],i=e.afterLineNumber-u,n=t.afterLineNumber-g;i<n?(_(l,e),x++):n<i?(_(c,t),L++):e.shouldNotShrink?(_(l,e),x++):t.shouldNotShrink?(_(c,t),L++):e.heightInLines>=t.heightInLines?(e.heightInLines-=t.heightInLines,L++):(t.heightInLines-=e.heightInLines,x++)}for(;x<S.length;)_(l,S[x]),x++;for(;L<k.length;)_(c,k[L]),L++}return{original:ER._ensureDomNodes(l),modified:ER._ensureDomNodes(c)}}static _ensureDomNodes(e){return e.map((e=>(e.domNode||(e.domNode=PR()),e)))}}function NR(e,t,i,n,o){return{range:new Zd(e,t,i,n),options:o}}const IR={charDelete:bO.register({description:"diff-editor-char-delete",className:"char-delete"}),charDeleteWholeLine:bO.register({description:"diff-editor-char-delete-whole-line",className:"char-delete",isWholeLine:!0}),charInsert:bO.register({description:"diff-editor-char-insert",className:"char-insert"}),charInsertWholeLine:bO.register({description:"diff-editor-char-insert-whole-line",className:"char-insert",isWholeLine:!0}),lineInsert:bO.register({description:"diff-editor-line-insert",className:"line-insert",marginClassName:"gutter-insert",isWholeLine:!0}),lineInsertWithSign:bO.register({description:"diff-editor-line-insert-with-sign",className:"line-insert",linesDecorationsClassName:"insert-sign "+sw.asClassName(yR),marginClassName:"gutter-insert",isWholeLine:!0}),lineDelete:bO.register({description:"diff-editor-line-delete",className:"line-delete",marginClassName:"gutter-delete",isWholeLine:!0}),lineDeleteWithSign:bO.register({description:"diff-editor-line-delete-with-sign",className:"line-delete",linesDecorationsClassName:"delete-sign "+sw.asClassName(CR),marginClassName:"gutter-delete",isWholeLine:!0}),lineDeleteMargin:bO.register({description:"diff-editor-line-delete-margin",marginClassName:"gutter-delete"})};class TR extends xR{constructor(e,t){super(e),this._disableSash=!1===t,this._sashRatio=null,this._sashPosition=null,this._startSashPosition=null,this._sash=this._register(new FM(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?kR.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*TR.MINIMUM_EDITOR_WIDTH?(i<TR.MINIMUM_EDITOR_WIDTH&&(i=TR.MINIMUM_EDITOR_WIDTH),i>t-TR.MINIMUM_EDITOR_WIDTH&&(i=t-TR.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?kR.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 DR(e,t,i,n,o).getViewZones()}_getOriginalEditorDecorations(e,t,i,n){const o=this._dataSource.getOriginalEditor(),r=String(this._removeColor),s={decorations:[],overviewZones:[]},a=o.getModel(),l=o._getViewModel();for(const e of t)if(RR(e)){s.decorations.push({range:new Zd(e.originalStartLineNumber,1,e.originalEndLineNumber,1073741824),options:n?IR.lineDeleteWithSign:IR.lineDelete}),MR(e)&&e.charChanges||s.decorations.push(NR(e.originalStartLineNumber,1,e.originalEndLineNumber,1073741824,IR.charDeleteWholeLine));const t=FR(a,l,e.originalStartLineNumber,e.originalEndLineNumber);if(s.overviewZones.push(new RN(t.startLineNumber,t.endLineNumber,0,r)),e.charChanges)for(const t of e.charChanges)if(RR(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),s.decorations.push(NR(e,i,e,n,IR.charDelete))}else s.decorations.push(NR(t.originalStartLineNumber,t.originalStartColumn,t.originalEndLineNumber,t.originalEndColumn,IR.charDelete))}return s}_getModifiedEditorDecorations(e,t,i,n){const o=this._dataSource.getModifiedEditor(),r=String(this._insertColor),s={decorations:[],overviewZones:[]},a=o.getModel(),l=o._getViewModel();for(const e of t)if(MR(e)){s.decorations.push({range:new Zd(e.modifiedStartLineNumber,1,e.modifiedEndLineNumber,1073741824),options:n?IR.lineInsertWithSign:IR.lineInsert}),RR(e)&&e.charChanges||s.decorations.push(NR(e.modifiedStartLineNumber,1,e.modifiedEndLineNumber,1073741824,IR.charInsertWholeLine));const t=FR(a,l,e.modifiedStartLineNumber,e.modifiedEndLineNumber);if(s.overviewZones.push(new RN(t.startLineNumber,t.endLineNumber,0,r)),e.charChanges)for(const t of e.charChanges)if(MR(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),s.decorations.push(NR(e,i,e,n,IR.charInsert))}else s.decorations.push(NR(t.modifiedStartLineNumber,t.modifiedStartColumn,t.modifiedEndLineNumber,t.modifiedEndColumn,IR.charInsert))}return s}}TR.MINIMUM_EDITOR_WIDTH=100;class DR extends ER{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 AR extends xR{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(),r=this._dataSource.getModifiedEditor();return new OR(e,t,i,o,r,n).getViewZones()}_getOriginalEditorDecorations(e,t,i,n){const o=String(this._removeColor),r={decorations:[],overviewZones:[]},s=this._dataSource.getOriginalEditor(),a=s.getModel(),l=s._getViewModel();let c=0;for(const i of t)if(RR(i)){for(r.decorations.push({range:new Zd(i.originalStartLineNumber,1,i.originalEndLineNumber,1073741824),options:IR.lineDeleteMargin});c<e.modified.length;){const t=e.modified[c];if(t.diff&&t.diff.originalStartLineNumber>=i.originalStartLineNumber)break;c++}let t=0;if(c<e.modified.length){const n=e.modified[c];n.diff&&n.diff.originalStartLineNumber===i.originalStartLineNumber&&n.diff.originalEndLineNumber===i.originalEndLineNumber&&n.diff.modifiedStartLineNumber===i.modifiedStartLineNumber&&n.diff.modifiedEndLineNumber===i.modifiedEndLineNumber&&(t=n.heightInLines)}const n=FR(a,l,i.originalStartLineNumber,i.originalEndLineNumber);r.overviewZones.push(new RN(n.startLineNumber,n.endLineNumber,t,o))}return r}_getModifiedEditorDecorations(e,t,i,n){const o=this._dataSource.getModifiedEditor(),r=String(this._insertColor),s={decorations:[],overviewZones:[]},a=o.getModel(),l=o._getViewModel();for(const e of t)if(MR(e)){s.decorations.push({range:new Zd(e.modifiedStartLineNumber,1,e.modifiedEndLineNumber,1073741824),options:n?IR.lineInsertWithSign:IR.lineInsert});const t=FR(a,l,e.modifiedStartLineNumber,e.modifiedEndLineNumber);if(s.overviewZones.push(new RN(t.startLineNumber,t.endLineNumber,0,r)),e.charChanges){for(const t of e.charChanges)if(MR(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),s.decorations.push(NR(e,i,e,n,IR.charInsert))}else s.decorations.push(NR(t.modifiedStartLineNumber,t.modifiedStartColumn,t.modifiedEndLineNumber,t.modifiedEndColumn,IR.charInsert))}else s.decorations.push(NR(e.modifiedStartLineNumber,1,e.modifiedEndLineNumber,1073741824,IR.charInsertWholeLine))}return s}layout(){return Math.max(5,this._decorationsLeft)}}class OR extends ER{constructor(e,t,i,n,o,r){super(e,t,i,n,o),this._originalModel=n.getModel(),this._renderIndicators=r,this._pendingLineChange=[],this._pendingViewZones=[],this._lineBreaksComputer=this._modifiedEditor._getViewModel().createLineBreaksComputer()}getViewZones(){const e=super.getViewZones();return this._finalize(e),e}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){const e=document.createElement("div");return e.className="inline-added-margin-view-zone",e}_produceOriginalFromDiff(e,t,i){const n=document.createElement("div");return n.className="inline-added-margin-view-zone",{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:i,domNode:document.createElement("div"),marginDomNode:n}}_produceModifiedFromDiff(e,t,i){const n=document.createElement("div");n.className="view-lines line-delete monaco-mouse-cursor-text";const o=document.createElement("div");o.className="inline-deleted-margin-view-zone";const r={shouldNotShrink:!0,afterLineNumber:0===e.modifiedEndLineNumber?e.modifiedStartLineNumber:e.modifiedStartLineNumber-1,heightInLines:t,minWidthInPx:0,domNode:n,marginDomNode:o,diff:{originalStartLineNumber:e.originalStartLineNumber,originalEndLineNumber:e.originalEndLineNumber,modifiedStartLineNumber:e.modifiedStartLineNumber,modifiedEndLineNumber:e.modifiedEndLineNumber,originalModel:this._originalModel,viewLineCounts:null}};for(let t=e.originalStartLineNumber;t<=e.originalEndLineNumber;t++)this._lineBreaksComputer.addRequest(this._originalModel.getLineContent(t),null,null);return this._pendingLineChange.push(e),this._pendingViewZones.push(r),r}_finalize(e){const t=this._modifiedEditor.getOptions(),i=this._modifiedEditor.getModel().getOptions().tabSize,n=t.get(44),o=t.get(29),r=n.typicalHalfwidthCharacterWidth,s=t.get(93),a=this._originalModel.mightContainNonBasicASCII(),l=this._originalModel.mightContainRTL(),c=t.get(59),d=t.get(131).decorationsWidth,h=t.get(105),u=t.get(88),g=t.get(83),p=t.get(45),m=this._lineBreaksComputer.finalize();let f=0;for(let t=0;t<this._pendingLineChange.length;t++){const _=this._pendingLineChange[t],v=this._pendingViewZones[t],b=v.domNode;Cg(b,n);const w=v.marginDomNode;Cg(w,n);const y=[];if(_.charChanges)for(const e of _.charChanges)RR(e)&&y.push(new y_(new Zd(e.originalStartLineNumber,e.originalStartColumn,e.originalEndLineNumber,e.originalEndColumn),"char-delete",0));const C=y.length>0,S=bp(1e4);let k=0,x=0,L=null;for(let t=_.originalStartLineNumber;t<=_.originalEndLineNumber;t++){const r=t-_.originalStartLineNumber,s=this._originalModel.getLineTokens(t),b=s.getLineContent(),E=m[f++],N=n_.filter(y,t,1,b.length+1);if(E){let m=0;for(const e of E.breakOffsets){const t=s.sliceAndInflate(m,e,0),r=b.substring(m,e);k=Math.max(k,this._renderOriginalLine(x++,r,t,n_.extractWrapped(N,m,e),C,a,l,n,o,c,d,h,u,g,p,i,S,w)),m=e}for(L||(L=[]);L.length<r;)L[L.length]=1;L[r]=E.breakOffsets.length,v.heightInLines+=E.breakOffsets.length-1;const f=document.createElement("div");f.className="gutter-delete",e.original.push({afterLineNumber:t,afterColumn:0,heightInLines:E.breakOffsets.length-1,domNode:PR(),marginDomNode:f})}else k=Math.max(k,this._renderOriginalLine(x++,b,s,N,C,a,l,n,o,c,d,h,u,g,p,i,S,w))}k+=s;const E=S.build(),N=SR?SR.createHTML(E):E;if(b.innerHTML=N,v.minWidthInPx=k*r,L){const e=_.originalEndLineNumber-_.originalStartLineNumber;for(;L.length<=e;)L[L.length]=1}v.diff.viewLineCounts=L}e.original.sort(((e,t)=>e.afterLineNumber-t.afterLineNumber))}_renderOriginalLine(e,t,i,n,o,r,s,a,l,c,d,h,u,g,p,m,f,_){f.appendASCIIString('<div class="view-line'),o||f.appendASCIIString(" char-delete"),f.appendASCIIString('" style="top:'),f.appendASCIIString(String(e*c)),f.appendASCIIString('px;width:1000000px;">');const v=w_.isBasicASCII(t,r),b=w_.containsRTL(t,v,s),w=u_(new l_(a.isMonospace&&!l,a.canUseHalfwidthRightwardsArrow,t,!1,v,b,0,i,n,m,0,a.spaceWidth,a.middotWidth,a.wsmiddotWidth,h,u,g,p!==tc.OFF,null),f);if(f.appendASCIIString("</div>"),this._renderIndicators){const t=document.createElement("div");t.className=`delete-sign ${sw.asClassName(CR)}`,t.setAttribute("style",`position:absolute;top:${e*c}px;width:${d}px;height:${c}px;right:0;`),_.appendChild(t)}return w.characterMapping.getAbsoluteOffset(w.characterMapping.length)}}function MR(e){return e.modifiedEndLineNumber>0}function RR(e){return e.originalEndLineNumber>0}function PR(){const e=document.createElement("div");return e.className="diagonal-fill",e}function FR(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 Zd(i,e.getLineMinColumn(i),n,e.getLineMaxColumn(n)))}function BR(e,t){return{enableSplitViewResizing:$l(e.enableSplitViewResizing,t.enableSplitViewResizing),renderSideBySide:$l(e.renderSideBySide,t.renderSideBySide),maxComputationTime:ql(e.maxComputationTime,t.maxComputationTime,0,1073741824),maxFileSize:ql(e.maxFileSize,t.maxFileSize,0,1073741824),ignoreTrimWhitespace:$l(e.ignoreTrimWhitespace,t.ignoreTrimWhitespace),renderIndicators:$l(e.renderIndicators,t.renderIndicators),originalEditable:$l(e.originalEditable,t.originalEditable),diffCodeLens:$l(e.diffCodeLens,t.diffCodeLens),renderOverviewRuler:$l(e.renderOverviewRuler,t.renderOverviewRuler),diffWordWrap:(i=e.diffWordWrap,n=t.diffWordWrap,Xl(i,n,["off","on","inherit"]))};var i,n}hw(((e,t)=>{const i=e.getColor(TC);i&&t.addRule(`.monaco-editor .char-insert, .monaco-diff-editor .char-insert { background-color: ${i}; }`);const n=e.getColor(AC)||i;n&&t.addRule(`.monaco-editor .line-insert, .monaco-diff-editor .line-insert { background-color: ${n}; }`);const o=e.getColor(MC)||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 r=e.getColor(DC);r&&t.addRule(`.monaco-editor .char-delete, .monaco-diff-editor .char-delete { background-color: ${r}; }`);const s=e.getColor(OC)||r;s&&t.addRule(`.monaco-editor .line-delete, .monaco-diff-editor .line-delete { background-color: ${s}; }`);const a=e.getColor(RC)||s;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(BC);l&&t.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px ${"hc"===e.type?"dashed":"solid"} ${l}; }`);const c=e.getColor(WC);c&&t.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px ${"hc"===e.type?"dashed":"solid"} ${c}; }`);const d=e.getColor(Hy);d&&t.addRule(`.monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px ${d}; }`);const h=e.getColor(VC);h&&t.addRule(`.monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid ${h}; }`);const u=e.getColor(Uy);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($y);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(Ky);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(zC);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`)}));let WR=class extends Nc{constructor(e){super(),this._themeService=e,this._onCodeEditorAdd=this._register(new Vc),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new Vc),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onDiffEditorAdd=this._register(new Vc),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new Vc),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)}};WR=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([function(e,t){return function(i,n){t(i,n,e)}}(0,ow)],WR);var VR=function(e,t){return function(i,n){t(i,n,e)}};let zR=class extends WR{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===av.http||i===av.https)return rb(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}};zR=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([VR(0,Xb),VR(1,ow)],zR),Kp(Rg,zR);const jR=Mg("layoutService");var HR=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},UR=function(e,t){return function(i,n){t(i,n,e)}};let $R=class{constructor(e){this._codeEditorService=e,this.onDidLayout=Pc.None}get dimension(){return this._dimension||(this._dimension=Lv(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()}};$R=HR([UR(0,Rg)],$R);let KR=class extends $R{constructor(e,t){super(t),this._container=e}get hasContainer(){return!1}get container(){return this._container}};KR=HR([UR(1,Rg)],KR),Kp(jR,$R);const qR=Mg("dialogService");var GR=function(e,t){return function(i,n){t(i,n,e)}},YR=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function ZR(e){return e.scheme===av.file?e.fsPath:e.path}let XR=0;class JR{constructor(e,t,i,n,o,r,s){this.id=++XR,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=r,this.sourceOrder=s,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 QR{constructor(e,t){this.resourceLabel=e,this.reason=t}}class eP{constructor(){this.elements=new Map}createMessage(){const e=[],t=[];for(const[,i]of this.elements)(0===i.reason?e:t).push(i.resourceLabel);let i=[];return e.length>0&&i.push(ma(0,"The following files have been closed and modified on disk: {0}.",e.join(", "))),t.length>0&&i.push(ma(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 tP{constructor(e,t,i,n,o,r,s){this.id=++XR,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=r,this.sourceOrder=s,this.removedResources=null,this.invalidatedResources=null}canSplit(){return"function"==typeof this.actual.split}removeResource(e,t,i){this.removedResources||(this.removedResources=new eP),this.removedResources.has(t)||this.removedResources.set(t,new QR(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 eP),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new QR(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":"  VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class iP{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<this._past.length;t++)e.push(`   * [UNDO] ${this._past[t]}`);for(let t=this._future.length-1;t>=0;t--)e.push(`   * [REDO] ${this._future[t]}`);return e.join("\n")}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,t){1===e.type?e.setValid(this.resourceLabel,this.strResource,t):e.setValid(t)}setElementsValidFlag(e,t){for(const i of this._past)t(i.actual)&&this._setElementValidFlag(i,e);for(const i of this._future)t(i.actual)&&this._setElementValidFlag(i,e)}pushElement(e){for(const e of this._future)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){const t=[];for(let e=0,i=this._past.length;e<i;e++)t.push(this._past[e].id);for(let e=this._future.length-1;e>=0;e--)t.push(this._future[e].id);return new iO(e,t)}restoreSnapshot(e){const t=e.elements.length;let i=!0,n=0,o=-1;for(let r=0,s=this._past.length;r<s;r++,n++){const s=this._past[r];i&&(n>=t||s.id!==e.elements[n])&&(i=!1,o=0),i||1!==s.type||s.removeResource(this.resourceLabel,this.strResource,0)}let r=-1;for(let o=this._future.length-1;o>=0;o--,n++){const s=this._future[o];i&&(n>=t||s.id!==e.elements[n])&&(i=!1,r=o),i||1!==s.type||s.removeResource(this.resourceLabel,this.strResource,0)}-1!==o&&(this._past=this._past.slice(0,o)),-1!==r&&(this._future=this._future.slice(r+1)),this.versionId++}getElements(){const e=[],t=[];for(const t of this._past)e.push(t.actual);for(const e of this._future)t.push(e.actual);return{past:e,future:t}}getClosestPastElement(){return 0===this._past.length?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return 0===this._future.length?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,t){for(let i=this._past.length-1;i>=0;i--)if(this._past[i]===e){t.has(this.strResource)?this._past[i]=t.get(this.strResource):this._past.splice(i,1);break}this.versionId++}splitFutureWorkspaceElement(e,t){for(let i=this._future.length-1;i>=0;i--)if(this._future[i]===e){t.has(this.strResource)?this._future[i]=t.get(this.strResource):this._future.splice(i,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}}class nP{constructor(e){this.editStacks=e,this._versionIds=[];for(let e=0,t=this.editStacks.length;e<t;e++)this._versionIds[e]=this.editStacks[e].versionId}isValid(){for(let e=0,t=this.editStacks.length;e<t;e++)if(this._versionIds[e]!==this.editStacks[e].versionId)return!1;return!0}}const oP=new iP("","");oP.locked=!0;let rP=class{constructor(e,t){this._dialogService=e,this._notificationService=t,this._editStacks=new Map,this._uriComparisonKeyComputers=[]}getUriComparisonKey(e){for(const t of this._uriComparisonKeyComputers)if(t[0]===e.scheme)return t[1].getComparisonKey(e);return e.toString()}_print(e){console.log("------------------------------------"),console.log(`AFTER ${e}: `);let t=[];for(const e of this._editStacks)t.push(e[1].toString());console.log(t.join("\n"))}pushElement(e,t=nO.None,i=oO.None){if(0===e.type){const n=ZR(e.resource),o=this.getUriComparisonKey(e.resource);this._pushElement(new JR(e,n,o,t.id,t.nextOrder(),i.id,i.nextOrder()))}else{const n=new Set,o=[],r=[];for(const t of e.resources){const e=ZR(t),i=this.getUriComparisonKey(t);n.has(i)||(n.add(i),o.push(e),r.push(i))}1===o.length?this._pushElement(new JR(e,o[0],r[0],t.id,t.nextOrder(),i.id,i.nextOrder())):this._pushElement(new tP(e,o,r,t.id,t.nextOrder(),i.id,i.nextOrder()))}}_pushElement(e){for(let t=0,i=e.strResources.length;t<i;t++){const i=e.resourceLabels[t],n=e.strResources[t];let o;this._editStacks.has(n)?o=this._editStacks.get(n):(o=new iP(i,n),this._editStacks.set(n,o)),o.pushElement(e)}}getLastElement(e){const t=this.getUriComparisonKey(e);if(this._editStacks.has(t)){const e=this._editStacks.get(t);if(e.hasFutureElements())return null;const i=e.getClosestPastElement();return i?i.actual:null}return null}_splitPastWorkspaceElement(e,t){const i=e.actual.split(),n=new Map;for(const e of i){const t=ZR(e.resource),i=this.getUriComparisonKey(e.resource),o=new JR(e,t,i,0,0,0,0);n.set(o.strResource,o)}for(const i of e.strResources)t&&t.has(i)||this._editStacks.get(i).splitPastWorkspaceElement(e,n)}_splitFutureWorkspaceElement(e,t){const i=e.actual.split(),n=new Map;for(const e of i){const t=ZR(e.resource),i=this.getUriComparisonKey(e.resource),o=new JR(e,t,i,0,0,0,0);n.set(o.strResource,o)}for(const i of e.strResources)t&&t.has(i)||this._editStacks.get(i).splitFutureWorkspaceElement(e,n)}removeElements(e){const t="string"==typeof e?e:this.getUriComparisonKey(e);this._editStacks.has(t)&&(this._editStacks.get(t).dispose(),this._editStacks.delete(t))}setElementsValidFlag(e,t,i){const n=this.getUriComparisonKey(e);this._editStacks.has(n)&&this._editStacks.get(n).setElementsValidFlag(t,i)}createSnapshot(e){const t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).createSnapshot(e):new iO(e,[])}restoreSnapshot(e){const t=this.getUriComparisonKey(e.resource);if(this._editStacks.has(t)){const i=this._editStacks.get(t);i.restoreSnapshot(e),i.hasPastElements()||i.hasFutureElements()||(i.dispose(),this._editStacks.delete(t))}}getElements(e){const t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).getElements():{past:[],future:[]}}_findClosestUndoElementWithSource(e){if(!e)return[null,null];let t=null,i=null;for(const[n,o]of this._editStacks){const r=o.getClosestPastElement();r&&r.sourceId===e&&(!t||r.sourceOrder>t.sourceOrder)&&(t=r,i=n)}return[t,i]}canUndo(e){if(e instanceof oO){const[,t]=this._findClosestUndoElementWithSource(e.id);return!!t}const t=this.getUriComparisonKey(e);return!!this._editStacks.has(t)&&this._editStacks.get(t).hasPastElements()}_onError(e,t){gc(e);for(const e of t.strResources)this.removeElements(e);this._notificationService.error(e)}_acquireLocks(e){for(const t of e.editStacks)if(t.locked)throw new Error("Cannot acquire edit stack lock");for(const t of e.editStacks)t.locked=!0;return()=>{for(const t of e.editStacks)t.locked=!1}}_safeInvokeWithLocks(e,t,i,n,o){const r=this._acquireLocks(i);let s;try{s=t()}catch(t){return r(),n.dispose(),this._onError(t,e)}return s?s.then((()=>(r(),n.dispose(),o())),(t=>(r(),n.dispose(),this._onError(t,e)))):(r(),n.dispose(),o())}_invokeWorkspacePrepare(e){return YR(this,void 0,void 0,(function*(){if(void 0===e.actual.prepareUndoRedo)return Nc.None;const t=e.actual.prepareUndoRedo();return void 0===t?Nc.None:t}))}_invokeResourcePrepare(e,t){if(1!==e.actual.type||void 0===e.actual.prepareUndoRedo)return t(Nc.None);const i=e.actual.prepareUndoRedo();return i?"function"==typeof(n=i).dispose&&0===n.dispose.length?t(i):i.then((e=>t(e))):t(Nc.None);var n}_getAffectedEditStacks(e){const t=[];for(const i of e.strResources)t.push(this._editStacks.get(i)||oP);return new nP(t)}_tryToSplitAndUndo(e,t,i,n){if(t.canSplit())return this._splitPastWorkspaceElement(t,i),this._notificationService.warn(n),new sP(this._undo(e,0,!0));for(const e of t.strResources)this.removeElements(e);return this._notificationService.warn(n),new sP}_checkWorkspaceUndo(e,t,i,n){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,ma(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,ma(0,"Could not undo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const o=[];for(const e of i.editStacks)e.getClosestPastElement()!==t&&o.push(e.resourceLabel);if(o.length>0)return this._tryToSplitAndUndo(e,t,null,ma(0,"Could not undo '{0}' across all files because changes were made to {1}",t.label,o.join(", ")));const r=[];for(const e of i.editStacks)e.locked&&r.push(e.resourceLabel);return r.length>0?this._tryToSplitAndUndo(e,t,null,ma(0,"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,r.join(", "))):i.isValid()?null:this._tryToSplitAndUndo(e,t,null,ma(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 YR(this,void 0,void 0,(function*(){if(t.canSplit()&&!this._isPartOfUndoGroup(t)){const o=yield this._dialogService.show(zO.Info,ma(0,"Would you like to undo '{0}' across all files?",t.label),[ma(0,"Undo in {0} Files",i.editStacks.length),ma(0,"Undo this File"),ma(0,"Cancel")],{cancelId:2});if(2===o.choice)return;if(1===o.choice)return this._splitPastWorkspaceElement(t,null),this._undo(e,0,!0);const r=this._checkWorkspaceUndo(e,t,i,!1);if(r)return r.returnValue;n=!0}let o;try{o=yield this._invokeWorkspacePrepare(t)}catch(e){return this._onError(e,t)}const r=this._checkWorkspaceUndo(e,t,i,!0);if(r)return o.dispose(),r.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 nP([e]),n,(()=>this._continueUndoInGroup(t.groupId,i))))));{const e=ma(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 r=o.getClosestPastElement();r&&r.groupId===e&&(!t||r.groupOrder>t.groupOrder)&&(t=r,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 oO){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){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 YR(this,void 0,void 0,(function*(){if(1!==(yield this._dialogService.show(zO.Info,ma(0,"Would you like to undo '{0}'?",i.label),[ma(0,"Yes"),ma(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 r=o.getClosestFutureElement();r&&r.sourceId===e&&(!t||r.sourceOrder<t.sourceOrder)&&(t=r,i=n)}return[t,i]}canRedo(e){if(e instanceof oO){const[,t]=this._findClosestRedoElementWithSource(e.id);return!!t}const t=this.getUriComparisonKey(e);return!!this._editStacks.has(t)&&this._editStacks.get(t).hasFutureElements()}_tryToSplitAndRedo(e,t,i,n){if(t.canSplit())return this._splitFutureWorkspaceElement(t,i),this._notificationService.warn(n),new sP(this._redo(e));for(const e of t.strResources)this.removeElements(e);return this._notificationService.warn(n),new sP}_checkWorkspaceRedo(e,t,i,n){if(t.removedResources)return this._tryToSplitAndRedo(e,t,t.removedResources,ma(0,"Could not redo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(n&&t.invalidatedResources)return this._tryToSplitAndRedo(e,t,t.invalidatedResources,ma(0,"Could not redo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const o=[];for(const e of i.editStacks)e.getClosestFutureElement()!==t&&o.push(e.resourceLabel);if(o.length>0)return this._tryToSplitAndRedo(e,t,null,ma(0,"Could not redo '{0}' across all files because changes were made to {1}",t.label,o.join(", ")));const r=[];for(const e of i.editStacks)e.locked&&r.push(e.resourceLabel);return r.length>0?this._tryToSplitAndRedo(e,t,null,ma(0,"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,r.join(", "))):i.isValid()?null:this._tryToSplitAndRedo(e,t,null,ma(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 YR(this,void 0,void 0,(function*(){let n;try{n=yield this._invokeWorkspacePrepare(t)}catch(e){return this._onError(e,t)}const o=this._checkWorkspaceRedo(e,t,i,!0);if(o)return n.dispose(),o.returnValue;for(const e of i.editStacks)e.moveForward(t);return this._safeInvokeWithLocks(t,(()=>t.actual.redo()),i,n,(()=>this._continueRedoInGroup(t.groupId)))}))}_resourceRedo(e,t){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,(i=>(e.moveForward(t),this._safeInvokeWithLocks(t,(()=>t.actual.redo()),new nP([e]),i,(()=>this._continueRedoInGroup(t.groupId))))));{const e=ma(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 r=o.getClosestFutureElement();r&&r.groupId===e&&(!t||r.groupOrder<t.groupOrder)&&(t=r,i=n)}return[t,i]}_continueRedoInGroup(e){if(!e)return;const[,t]=this._findClosestRedoElementInGroup(e);return t?this._redo(t):void 0}redo(e){if(e instanceof oO){const[,t]=this._findClosestRedoElementWithSource(e.id);return t?this._redo(t):void 0}return"string"==typeof e?this._redo(e):this._redo(this.getUriComparisonKey(e))}_redo(e){if(!this._editStacks.has(e))return;const t=this._editStacks.get(e),i=t.getClosestFutureElement();if(i){if(i.groupId){const[e,t]=this._findClosestRedoElementInGroup(i.groupId);if(i!==e&&t)return this._redo(t)}try{return 1===i.type?this._workspaceRedo(e,i):this._resourceRedo(t,i)}finally{}}}};rP=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([GR(0,qR),GR(1,jO)],rP);class sP{constructor(e){this.returnValue=e}}var aP,lP;Kp(tO,rP);class cP{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos<this._value.length-1}cmp(e){return e.charCodeAt(0)-this._value.charCodeAt(this._pos)}value(){return this._value[this._pos]}}class dP{constructor(e=!0){this._caseSensitive=e}reset(e){return this._value=e,this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let e=!0;for(;this._to<this._value.length;this._to++)if(46===this._value.charCodeAt(this._to)){if(!e)break;this._from++}else e=!1;return this}cmp(e){return this._caseSensitive?Eu(e,this._value,0,e.length,this._from,this._to):Iu(e,this._value,0,e.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}class hP{constructor(e=!0,t=!0){this._splitOnBackslash=e,this._caseSensitive=t}reset(e){this._from=0,this._to=0,this._value=e,this._valueLen=e.length;for(let t=e.length-1;t>=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<this._valueLen}next(){this._from=this._to;let e=!0;for(;this._to<this._valueLen;this._to++){const t=this._value.charCodeAt(this._to);if(47===t||this._splitOnBackslash&&92===t){if(!e)break;this._from++}else e=!1}return this}cmp(e){return this._caseSensitive?Eu(e,this._value,0,e.length,this._from,this._to):Iu(e,this._value,0,e.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}class uP{constructor(e){this._ignorePathCasing=e,this._states=[],this._stateIdx=0}reset(e){return this._value=e,this._states=[],this._value.scheme&&this._states.push(1),this._value.authority&&this._states.push(2),this._value.path&&(this._pathIterator=new hP(!1,!this._ignorePathCasing(e)),this._pathIterator.reset(e.path),this._pathIterator.value()&&this._states.push(3)),this._value.query&&this._states.push(4),this._value.fragment&&this._states.push(5),this._stateIdx=0,this}next(){return 3===this._states[this._stateIdx]&&this._pathIterator.hasNext()?this._pathIterator.next():this._stateIdx+=1,this}hasNext(){return 3===this._states[this._stateIdx]&&this._pathIterator.hasNext()||this._stateIdx<this._states.length-1}cmp(e){if(1===this._states[this._stateIdx])return Nu(e,this._value.scheme);if(2===this._states[this._stateIdx])return Nu(e,this._value.authority);if(3===this._states[this._stateIdx])return this._pathIterator.cmp(e);if(4===this._states[this._stateIdx])return Lu(e,this._value.query);if(5===this._states[this._stateIdx])return Lu(e,this._value.fragment);throw new Error}value(){if(1===this._states[this._stateIdx])return this._value.scheme;if(2===this._states[this._stateIdx])return this._value.authority;if(3===this._states[this._stateIdx])return this._pathIterator.value();if(4===this._states[this._stateIdx])return this._value.query;if(5===this._states[this._stateIdx])return this._value.fragment;throw new Error}}class gP{constructor(){this.height=1}rotateLeft(){const e=this.right;return this.right=e.left,e.left=this,this.updateHeight(),e.updateHeight(),e}rotateRight(){const e=this.left;return this.left=e.right,e.right=this,this.updateHeight(),e.updateHeight(),e}updateHeight(){this.height=1+Math.max(this.heightLeft,this.heightRight)}balanceFactor(){return this.heightRight-this.heightLeft}get heightLeft(){var e,t;return null!==(t=null===(e=this.left)||void 0===e?void 0:e.height)&&void 0!==t?t:0}get heightRight(){var e,t;return null!==(t=null===(e=this.right)||void 0===e?void 0:e.height)&&void 0!==t?t:0}}class pP{constructor(e){this._iter=e}static forUris(e=(()=>!1)){return new pP(new uP(e))}static forStrings(){return new pP(new cP)}static forConfigKeys(){return new pP(new dP)}clear(){this._root=void 0}set(e,t){const i=this._iter.reset(e);let n;this._root||(this._root=new gP,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 gP,n.left.segment=i.value()),o.push([-1,n]),n=n.left;else if(e<0)n.right||(n.right=new gP,n.right.segment=i.value()),o.push([1,n]),n=n.right;else{if(!i.hasNext())break;i.next(),n.mid||(n.mid=new gP,n.mid.segment=i.value()),o.push([0,n]),n=n.mid}}const r=n.value;n.value=t,n.key=e;for(let e=o.length-1;e>=0;e--){const t=o[e][1];t.updateHeight();const i=t.balanceFactor();if(i<-1||i>1){const i=o[e][0],n=o[e+1][0];if(1===i&&1===n)o[e][1]=t.rotateLeft();else if(-1===i&&-1===n)o[e][1]=t.rotateRight();else if(1===i&&-1===n)t.right=o[e+1][1]=o[e+1][1].rotateRight(),o[e][1]=t.rotateLeft();else{if(-1!==i||1!==n)throw new Error;t.left=o[e+1][1]=o[e+1][1].rotateLeft(),o[e][1]=t.rotateRight()}if(e>0)switch(o[e-1][0]){case-1:o[e-1][1].left=o[e][1];break;case 1:o[e-1][1].right=o[e][1];break;case 0:o[e-1][1].mid=o[e][1]}else this._root=o[0][1]}}return r}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 r=this._root;for(;r;){const e=n.cmp(r.segment);if(e>0)o.push([-1,r]),r=r.left;else if(e<0)o.push([1,r]),r=r.right;else{if(!n.hasNext())break;n.next(),o.push([0,r]),r=r.mid}}if(r){if(t?(r.left=void 0,r.mid=void 0,r.right=void 0,r.height=1):(r.key=void 0,r.value=void 0),!r.mid&&!r.value)if(r.left&&r.right){const e=this._min(r.right),{key:t,value:i,segment:n}=e;this._delete(e.key,!1),r.key=t,r.value=i,r.segment=n}else{const e=null!==(i=r.left)&&void 0!==i?i:r.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 mP{constructor(e,t){this.uri=e,this.value=t}}class fP{constructor(e,t){this[aP]="ResourceMap",e instanceof fP?(this.map=new Map(e.map),this.toKey=null!=t?t:fP.defaultToKey):(this.map=new Map,this.toKey=null!=e?e:fP.defaultToKey)}set(e,t){return this.map.set(this.toKey(e),new mP(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[t,i]of this.map)e(i.value,i.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]}*[(aP=Symbol.toStringTag,Symbol.iterator)](){for(let[,e]of this.map)yield[e.uri,e.value]}}fP.defaultToKey=e=>e.toString();class _P{constructor(){this[lP]="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:this.addItemLast(n);break;case 1:this.addItemFirst(n);break;case 2:default:this.addItemLast(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}[(lP=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 vP extends _P{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 bP(e,t,i){return Math.min(Math.max(e,t),i)}class wP{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 yP{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<this._values.length&&(this._n+=1),this._val=this._sum/this._n,this._val}get value(){return this._val}}const CP=Mg("ILanguageFeatureDebounceService");var SP;!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}}(SP||(SP={}));class kP{constructor(e,t,i,n,o,r){this._logService=e,this._name=t,this._registry=i,this._default=n,this._min=o,this._max=r,this._cache=new vP(50,.7)}_key(e){return e.id+this._registry.all(e).reduce(((e,t)=>zm(SP.of(t),e)),0)}get(e){const t=this._key(e),i=this._cache.get(t);return i?bP(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 yP(6),this._cache.set(i,n));const o=bP(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 wP;for(const[,t]of this._cache)e.update(t.value);return e.value}default(){return bP(0|this._overall()||this._default,this._min,this._max)}}let xP=class{constructor(e){this._logService=e,this._data=new Map}for(e,t,i){var n,o,r;const s=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(s,2),l=null!==(r=null==i?void 0:i.key)&&void 0!==r?r:void 0,c=`${SP.of(e)},${s}${l?","+l:""}`;let d=this._data.get(c);return d||(d=new kP(this._logService,t,e,0|this._overallAverage()||1.5*s,s,a),this._data.set(c,d)),d}_overallAverage(){let e=new wP;for(let t of this._data.values())e.update(t.default());return e.value}};xP=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([function(e,t){return function(i,n){t(i,n,e)}}(0,Ff)],xP),Kp(CP,xP,!0);const LP=Mg("IWorkspaceEditService");class EP{constructor(e){this.metadata=e}static convert(e){return e.edits.map((e=>{if(bl(t=e)&&Bd.isUri(t.resource)&&bl(t.edit))return new NP(e.resource,e.edit,e.modelVersionId,e.metadata);var t;if(function(e){return bl(e)&&(Boolean(e.newUri)||Boolean(e.oldUri))}(e))return new IP(e.oldUri,e.newUri,e.options,e.metadata);throw new Error("Unsupported edit")}))}}class NP extends EP{constructor(e,t,i,n){super(n),this.resource=e,this.textEdit=t,this.versionId=i}}class IP extends EP{constructor(e,t,i,n){super(n),this.oldResource=e,this.newResource=t,this.options=i}}const TP=Object.freeze({id:"editor",order:5,type:"object",title:ma(0,"Editor"),scope:5}),DP=Object.assign(Object.assign({},TP),{properties:{"editor.tabSize":{type:"number",default:Fl.tabSize,minimum:1,markdownDescription:ma(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:Fl.insertSpaces,markdownDescription:ma(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:Fl.detectIndentation,markdownDescription:ma(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:Fl.trimAutoWhitespace,description:ma(0,"Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:Fl.largeFileOptimizations,description:ma(0,"Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:ma(0,"Controls whether completions should be computed based on words in the document.")},"editor.wordBasedSuggestionsMode":{enum:["currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[ma(0,"Only suggest words from the active document."),ma(0,"Suggest words from all open documents of the same language."),ma(0,"Suggest words from all open documents.")],description:ma(0,"Controls from which documents word based completions are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[ma(0,"Semantic highlighting enabled for all color themes."),ma(0,"Semantic highlighting disabled for all color themes."),ma(0,"Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:ma(0,"Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:ma(0,"Keep peek editors open even when double clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:ma(0,"Lines above this length will not be tokenized for performance reasons")},"editor.language.brackets":{type:"array",default:!1,description:ma(0,"Defines the bracket symbols that increase or decrease the indentation."),items:{type:"array",items:[{type:"string",description:ma(0,"The opening bracket character or string sequence.")},{type:"string",description:ma(0,"The closing bracket character or string sequence.")}]}},"editor.language.colorizedBracketPairs":{type:"array",default:!1,description:ma(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:ma(0,"The opening bracket character or string sequence.")},{type:"string",description:ma(0,"The closing bracket character or string sequence.")}]}},"diffEditor.maxComputationTime":{type:"number",default:5e3,description:ma(0,"Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:50,description:ma(0,"Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:ma(0,"Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:ma(0,"When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:ma(0,"Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:!1,description:ma(0,"Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:"inherit",markdownEnumDescriptions:[ma(0,"Lines will never wrap."),ma(0,"Lines will wrap at the viewport width."),ma(0,"Lines will wrap according to the `#editor.wordWrap#` setting.")]}}});for(const e of cc){const t=e.schema;if(void 0!==t)if(void 0!==(AP=t).type||void 0!==AP.anyOf)DP.properties[`editor.${e.name}`]=t;else for(const e in t)Object.hasOwnProperty.call(t,e)&&(DP.properties[e]=t[e])}var AP;let OP=null;function MP(){return null===OP&&(OP=Object.create(null),Object.keys(DP.properties).forEach((e=>{OP[e]=!0}))),OP}iw.as(XI).registerConfiguration(DP);class RP{static insert(e,t){return{range:new Zd(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 PP{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?jp(this.contents,e):this.contents}getOverrideValue(e,t){const i=this.getContentsForOverrideIdentifer(t);return i?e?jp(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=Al(this.contents),i=Al(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=>rl(t.identifiers,e.identifiers)));t?(this.mergeContents(t.contents,e.contents),t.keys.push(...e.keys),t.keys=ll(t.keys)):i.push(Al(e))}for(const e of o.keys)-1===n.indexOf(e)&&n.push(e)}return new PP(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 e of ll([...Object.keys(this.contents),...Object.keys(t)])){let n=this.contents[e],o=t[e];o&&("object"==typeof n&&"object"==typeof o?(n=Al(n),this.mergeContents(n,o)):n=o),i[e]=n}return new PP(i,this.keys,this.overrides)}mergeContents(e,t){for(const i of Object.keys(t))i in e&&bl(e[i])&&bl(t[i])?this.mergeContents(e[i],t[i]):e[i]=Al(t[i])}checkAndFreeze(e){return this.isFrozen&&!Object.isFrozen(e)?function(e){if(!e||"object"!=typeof e)return e;const t=[e];for(;t.length>0;){const e=t.shift();Object.freeze(e);for(const i in e)if(Ol.call(e,i)){const n=e[i];"object"!=typeof n||Object.isFrozen(n)||t.push(n)}}return e}(e):e}getContentsForOverrideIdentifer(e){let t=null,i=null;const n=e=>{e&&(i?this.mergeContents(i,e):i=Al(e))};for(const i of this.overrides)rl(i.identifiers,[e])?t=i.contents:i.identifiers.includes(e)&&n(i.contents);return n(t),i}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(e,t){this.addKey(e),Wp(this.contents,e,t,(e=>{throw new Error(e)}))}removeValue(e){this.removeKey(e)&&Vp(this.contents,e)}addKey(e){let t=this.keys.length;for(let i=0;i<t;i++)0===e.indexOf(this.keys[i])&&(t=i);this.keys.splice(t,1,e)}removeKey(e){let t=this.keys.indexOf(e);return-1!==t&&(this.keys.splice(t,1),!0)}}class FP extends PP{constructor(e={}){const t=iw.as(XI).getConfigurationProperties(),i=Object.keys(t),n=Object.create(null),o=[];for(const i in t){const o=e[i];Wp(n,i,void 0!==o?o:t[i].default,(e=>console.error(`Conflict in default settings: ${e}`)))}for(const e of Object.keys(n))lT.test(e)&&o.push({identifiers:cT(e),keys:Object.keys(n[e]),contents:Bp(n[e],(e=>console.error(`Conflict in default settings file: ${e}`)))});super(n,i,o)}}class BP{constructor(e,t,i=new PP,n=new PP,o=new fP,r=new PP,s=new fP,a=!0){this._defaultConfiguration=e,this._localUserConfiguration=t,this._remoteUserConfiguration=i,this._workspaceConfiguration=n,this._folderConfigurations=o,this._memoryConfiguration=r,this._memoryConfigurationByResource=s,this._freeze=a,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new fP,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 PP,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),r=t.resource&&this._memoryConfigurationByResource.get(t.resource)||this._memoryConfiguration,s=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),c=t.overrideIdentifier?this.remoteUserConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this.remoteUserConfiguration.freeze().getValue(e),d=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?r.override(t.overrideIdentifier).getValue(e):r.getValue(e),g=n.getValue(e),p=ll((m=n.overrides.map((e=>e.identifiers)),[].concat(...m))).filter((t=>void 0!==n.getOverrideValue(e,t)));var m;return{defaultValue:s,userValue:a,userLocalValue:l,userRemoteValue:c,workspaceValue:d,workspaceFolderValue:h,memoryValue:u,value:g,default:void 0!==s?{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!==c?{value:this.remoteUserConfiguration.freeze().getValue(e),override:t.overrideIdentifier?this.remoteUserConfiguration.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,workspace:void 0!==d?{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:r.getValue(e),override:t.overrideIdentifier?r.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(Bd.revive(t[0]),this.parseConfigurationModel(t[1])),e)),new fP);return new BP(t,i,new PP,n,o,new PP,new fP,!1)}static parseConfigurationModel(e){return new PP(e.contents,e.keys,e.overrides).freeze()}}class WP{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 r=new PP;this.affectedKeys.forEach((e=>r.setValue(e,{}))),this.affectedKeysTree=r.contents}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=BP.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(e,t){var i;return!!this.doesAffectedKeysTreeContains(this.affectedKeysTree,e)&&(!t||!Rl(this.previousConfiguration?this.previousConfiguration.getValue(e,t,null===(i=this.previous)||void 0===i?void 0:i.workspace):void 0,this.currentConfiguraiton.getValue(e,t,this.currentWorkspace)))}doesAffectedKeysTreeContains(e,t){let i,n=Bp({[t]:!0},(()=>{}));for(;"object"==typeof n&&(i=Object.keys(n)[0]);){if(!(e=e[i]))return!1;n=n[i]}return!0}}const VP=/^(cursor|delete)/;class zP extends Nc{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 Vc),this._currentChord=null,this._currentChordChecker=new vm,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=jP.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new _m,this._logging=!1}get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:Pc.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 console.warn("Unexpected keyboard event mapped to a chord"),null;const[n]=i.getDispatchParts();if(null===n)return null;const o=this._contextKeyService.getContext(t),r=this._currentChord?this._currentChord.keypress:null;return this._getResolver().resolve(o,r,n)}_enterChordMode(e,t){this._currentChord={keypress:e,label:t},this._currentChordStatusMessage=this._notificationService.status(ma(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=jP.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=jP.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 jP(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 console.warn("Unexpected keyboard event mapped to a chord"),!1;let o=null,r=null;if(i){const[t]=e.getSingleModifierDispatchParts();o=t,r=t}else[o]=e.getDispatchParts(),r=this._currentChord?this._currentChord.keypress:null;if(null===o)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),n;const s=this._contextKeyService.getContext(t),a=e.getLabel(),l=this._getResolver().resolve(s,r,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(ma(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))),VP.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 jP{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}}}jP.EMPTY=new jP(null);const HP=Mg("keybindingService");class UP{constructor(e,t,i){this._log=i,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(const t of e){const e=t.command;e&&"-"!==e.charAt(0)&&this._defaultBoundCommands.set(e,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=UP.handleRemovals([].concat(e).concat(t));for(let e=0,t=this._keybindings.length;e<t;e++){let t=this._keybindings[e];0!==t.keypressParts.length&&(t.when&&0===t.when.type||this._addKeyPress(t.keypressParts[0],t))}}static _isTargetedForRemoval(e,t,i,n){if(t&&e.keypressParts[0]!==t)return!1;if(i&&e.keypressParts[1]!==i)return!1;if(n){if(!e.when)return!1;if(!function(e,t){const i=e?e.substituteConstants():void 0,n=t?t.substituteConstants():void 0;return!i&&!n||!(!i||!n)&&i.equals(n)}(n,e.when))return!1}return!0}static handleRemovals(e){const t=new Map;for(let i=0,n=e.length;i<n;i++){const n=e[i];if(n.command&&"-"===n.command.charAt(0)){const e=n.command.substring(1);t.has(e)?t.get(e).push(n):t.set(e,[n])}}if(0===t.size)return e;const i=[];for(let n=0,o=e.length;n<o;n++){const o=e[n];if(!o.command||0===o.command.length){i.push(o);continue}if("-"===o.command.charAt(0))continue;const r=t.get(o.command);if(!r||!o.isDefault){i.push(o);continue}let s=!1;for(const e of r){const t=e.keypressParts[0],i=e.keypressParts[1],n=e.when;if(this._isTargetedForRemoval(o,t,i,n)){s=!0;break}}s||i.push(o)}return i}_addKeyPress(e,t){const i=this._map.get(e);if(void 0===i)return this._map.set(e,[t]),void this._addToLookupMap(t);for(let e=i.length-1;e>=0;e--){let n=i[e];if(n.command===t.command)continue;const o=n.keypressParts.length>1,r=t.keypressParts.length>1;o&&r&&n.keypressParts[1]!==t.keypressParts[1]||UP.whenIsEntirelyIncluded(n.when,t.when)&&this._removeFromLookupMap(n)}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<n;i++)if(t[i]===e)return void t.splice(i,1)}static whenIsEntirelyIncluded(e,t){return!t||1===t.type||!(!e||1===e.type)&&ew(e,t)}getKeybindings(){return this._keybindings}lookupPrimaryKeybinding(e,t){const i=this._lookupMap.get(e);if(void 0===i||0===i.length)return null;if(1===i.length)return i[0];for(let e=i.length-1;e>=0;e--){const n=i[e];if(t.contextMatchesRules(n.when))return n}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;t<o;t++){let o=e[t];o.keypressParts[1]===i&&n.push(o)}}else{const e=this._map.get(i);if(void 0===e)return this._log("\\ No keybinding entries."),null;n=e}let o=this._findCommand(e,n);return o?null===t&&o.keypressParts.length>1&&null!==o.keypressParts[1]?(this._log(`\\ From ${n.length} keybinding entries, matched chord, when: ${$P(o.when)}, source: ${KP(o)}.`),{enterChord:!0,leaveChord:!1,commandId:null,commandArgs:null,bubble:!1}):(this._log(`\\ From ${n.length} keybinding entries, matched ${o.command}, when: ${$P(o.when)}, source: ${KP(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(UP._contextMatchesRules(e,n.when))return n}return null}static _contextMatchesRules(e,t){return!t||t.evaluate(e)}}function $P(e){return e?`${e.serialize()}`:"no when condition"}function KP(e){return e.extensionId?e.isBuiltinExtension?`built-in extension ${e.extensionId}`:`user extension ${e.extensionId}`:e.isDefault?"built-in":"user"}class qP{constructor(e,t,i,n,o,r,s){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=e,this.keypressParts=e?GP(e.getDispatchParts()):[],e&&0===this.keypressParts.length&&(this.keypressParts=GP(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=r,this.isBuiltinExtension=s}}function GP(e){let t=[];for(let i=0,n=e.length;i<n;i++){const n=e[i];if(!n)return t;t.push(n)}return t}class YP{constructor(e,t,i=t){this.modifierLabels=[null],this.modifierLabels[2]=e,this.modifierLabels[1]=t,this.modifierLabels[3]=i}toLabel(e,t,i){if(0===t.length)return null;const n=[];for(let o=0,r=t.length;o<r;o++){const r=t[o],s=i(r);if(null===s)return null;n[o]=QP(r,s,this.modifierLabels[e])}return n.join(" ")}}const ZP=new YP({ctrlKey:"⌃",shiftKey:"⇧",altKey:"⌥",metaKey:"⌘",separator:""},{ctrlKey:ma(0,"Ctrl"),shiftKey:ma(0,"Shift"),altKey:ma(0,"Alt"),metaKey:ma(0,"Windows"),separator:"+"},{ctrlKey:ma(0,"Ctrl"),shiftKey:ma(0,"Shift"),altKey:ma(0,"Alt"),metaKey:ma(0,"Super"),separator:"+"}),XP=new YP({ctrlKey:ma(0,"Control"),shiftKey:ma(0,"Shift"),altKey:ma(0,"Option"),metaKey:ma(0,"Command"),separator:"+"},{ctrlKey:ma(0,"Control"),shiftKey:ma(0,"Shift"),altKey:ma(0,"Alt"),metaKey:ma(0,"Windows"),separator:"+"},{ctrlKey:ma(0,"Control"),shiftKey:ma(0,"Shift"),altKey:ma(0,"Alt"),metaKey:ma(0,"Super"),separator:"+"}),JP=new YP({ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Cmd",separator:"+"},{ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Super",separator:"+"});function QP(e,t,i){if(null===t)return"";const n=[];return e.ctrlKey&&n.push(i.ctrlKey),e.shiftKey&&n.push(i.shiftKey),e.altKey&&n.push(i.altKey),e.metaKey&&n.push(i.metaKey),""!==t&&n.push(t),n.join(i.separator)}new YP({ctrlKey:"ctrl",shiftKey:"shift",altKey:"alt",metaKey:"cmd",separator:"+"},{ctrlKey:"ctrl",shiftKey:"shift",altKey:"alt",metaKey:"win",separator:"+"},{ctrlKey:"ctrl",shiftKey:"shift",altKey:"alt",metaKey:"meta",separator:"+"});class eF extends class extends class{}{constructor(e,t){if(super(),0===t.length)throw bc("parts");this._os=e,this._parts=t}getLabel(){return ZP.toLabel(this._os,this._parts,(e=>this._getLabel(e)))}getAriaLabel(){return XP.toLabel(this._os,this._parts,(e=>this._getAriaLabel(e)))}getElectronAccelerator(){return this._parts.length>1||this._parts[0].isDuplicateModifierCase()?null:JP.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 X_(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 sd.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":sd.toString(e.keyCode)}_getElectronAccelerator(e){return sd.toElectronAccelerator(e.keyCode)}_getDispatchPart(e){return eF.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+=sd.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=od[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 Y_)return e;const t=this._scanCodeToKeyCode(e.scanCode);return 0===t?null:new Y_(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,t)}static resolveUserBinding(e,t){const i=GP(e.map((e=>this._resolveSimpleUserBinding(e))));return i.length>0?[new eF(new Z_(i),t)]:[]}}const tF=Mg("labelService"),iF=Mg("contextService");class nF{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}}}var oF,rF,sF,aF,lF,cF,dF,hF,uF;ma(0,"Code Workspace"),function(e){e.noSelection=ma(0,"No selection"),e.singleSelectionRange=ma(0,"Line {0}, Column {1} ({2} selected)"),e.singleSelection=ma(0,"Line {0}, Column {1}"),e.multiSelectionRange=ma(0,"{0} selections ({1} characters selected)"),e.multiSelection=ma(0,"{0} selections"),e.emergencyConfOn=ma(0,"Now changing the setting `accessibilitySupport` to 'on'."),e.openingDocs=ma(0,"Now opening the Editor Accessibility documentation page."),e.readonlyDiffEditor=ma(0," in a read-only pane of a diff editor."),e.editableDiffEditor=ma(0," in a pane of a diff editor."),e.readonlyEditor=ma(0," in a read-only code editor"),e.editableEditor=ma(0," in a code editor"),e.changeConfigToOnMac=ma(0,"To configure the editor to be optimized for usage with a Screen Reader press Command+E now."),e.changeConfigToOnWinLinux=ma(0,"To configure the editor to be optimized for usage with a Screen Reader press Control+E now."),e.auto_on=ma(0,"The editor is configured to be optimized for usage with a Screen Reader."),e.auto_off=ma(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=ma(0,"Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}."),e.tabFocusModeOnMsgNoKb=ma(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=ma(0,"Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}."),e.tabFocusModeOffMsgNoKb=ma(0,"Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding."),e.openDocMac=ma(0,"Press Command+H now to open a browser window with more information related to editor accessibility."),e.openDocWinLinux=ma(0,"Press Control+H now to open a browser window with more information related to editor accessibility."),e.outroMsg=ma(0,"You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape."),e.showAccessibilityHelpAction=ma(0,"Show Accessibility Help")}(oF||(oF={})),function(e){e.inspectTokensAction=ma(0,"Developer: Inspect Tokens")}(rF||(rF={})),function(e){e.gotoLineActionLabel=ma(0,"Go to Line/Column...")}(sF||(sF={})),function(e){e.helpQuickAccessActionLabel=ma(0,"Show all Quick Access Providers")}(aF||(aF={})),function(e){e.quickCommandActionLabel=ma(0,"Command Palette"),e.quickCommandHelp=ma(0,"Show And Run Commands")}(lF||(lF={})),function(e){e.quickOutlineActionLabel=ma(0,"Go to Symbol..."),e.quickOutlineByCategoryActionLabel=ma(0,"Go to Symbol by Category...")}(cF||(cF={})),function(e){e.editorViewAccessibleLabel=ma(0,"Editor content"),e.accessibilityHelpMessage=ma(0,"Press Alt+F1 for Accessibility Options.")}(dF||(dF={})),function(e){e.toggleHighContrast=ma(0,"Toggle High Contrast Theme")}(hF||(hF={})),function(e){e.bulkEditServiceSummary=ma(0,"Made {0} edits in {1} files")}(uF||(uF={}));const gF=Mg("workspaceTrustManagementService");var pF;!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)},r={start:Math.max(t.end,e.start),end:e.end};return i(o)||n.push(o),i(r)||n.push(r),n}}(pF||(pF={}));var mF,fF=i(6328),_F={};function vF(e,t,i){const n=i.mode===mF.ALIGN?i.offset:i.offset+i.size,o=i.mode===mF.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}_F.styleTagTransform=uu(),_F.setAttributes=lu(),_F.insert=su().bind(null,"head"),_F.domAPI=ou(),_F.insertStyleElement=du(),iu()(fF.Z,_F),fF.Z&&fF.Z.locals&&fF.Z.locals,function(e){e[e.AVOID=0]="AVOID",e[e.ALIGN=1]="ALIGN"}(mF||(mF={}));class bF extends Nc{constructor(e,t){super(),this.container=null,this.delegate=null,this.toDisposeOnClean=Nc.None,this.toDisposeOnSetContainer=Nc.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=tb(".context-view"),this.useFixedPosition=!1,this.useShadowDOM=!1,nb(this.view),this.setContainer(e,t),this._register(Lc((()=>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=tb(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const e=document.createElement("style");e.textContent=wF,this.shadowRoot.appendChild(e),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(tb("slot"))}else this.container.appendChild(this.view);const i=new Ec;bF.BUBBLE_UP_EVENTS.forEach((e=>{i.add(mv(this.container,e,(e=>{this.onDOMEvent(e,!1)})))})),bF.BUBBLE_DOWN_EVENTS.forEach((e=>{i.add(mv(this.container,e,(e=>{this.onDOMEvent(e,!0)}),!0))})),this.toDisposeOnSetContainer=i}}show(e){this.isVisible()&&this.hide(),hv(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",ib(this.view),this.toDisposeOnClean=e.render(this.view)||Nc.None,this.delegate=e,this.doLayout(),this.delegate.focus&&this.delegate.focus()}getViewElement(){return this.view}layout(){this.isVisible()&&(!1!==this.delegate.canRelayout||za&&K_?(this.delegate.layout&&this.delegate.layout(),this.doLayout()):this.hide())}doLayout(){if(!this.isVisible())return;let e,t=this.delegate.getAnchor();if($v(t)){let i=Iv(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=Dv(this.view),n=Mv(this.view),o=this.delegate.anchorPosition||0,r=this.delegate.anchorAlignment||0;let s,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===r?0:1,mode:mF.ALIGN};s=vF(window.innerHeight,n,t)+window.pageYOffset,pF.intersects({start:s,end:s+n},{start:t.offset,end:t.offset+t.size})&&(l.mode=mF.AVOID),a=vF(window.innerWidth,i,l)}else{const t={offset:e.left,size:e.width,position:0===r?0:1},l={offset:e.top,size:e.height,position:0===o?0:1,mode:mF.ALIGN};a=vF(window.innerWidth,i,t),pF.intersects({start:a,end:a+i},{start:t.offset,end:t.offset+t.size})&&(l.mode=mF.AVOID),s=vF(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===r?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const l=Iv(this.container);this.view.style.top=s-(this.useFixedPosition?Iv(this.view).top:l.top)+"px",this.view.style.left=a-(this.useFixedPosition?Iv(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(),nb(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):t&&!Rv(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}bF.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],bF.BUBBLE_DOWN_EVENTS=["click"];let wF='\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';let yF=class extends Nc{constructor(e){super(),this.layoutService=e,this.currentViewDisposable=Nc.None,this.container=e.hasContainer?e.container:null,this.contextView=this._register(new bF(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=Lc((()=>{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)}};yF=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([function(e,t){return function(i,n){t(i,n,e)}}(0,jR)],yF);const CF="**",SF=/\//g;function kF(e){switch(e){case 0:return"";case 1:return"[^/\\\\]*?";default:return"(?:[/\\\\]|[^/\\\\]+[/\\\\]|[/\\\\][^/\\\\]+)*?"}}function xF(e,t){if(!e)return[];const i=[];let n=!1,o=!1,r="";for(const s of e){switch(s){case t:if(!n&&!o){i.push(r),r="";continue}break;case"{":n=!0;break;case"}":n=!1;break;case"[":o=!0;break;case"]":o=!1}r+=s}return r&&i.push(r),i}function LF(e){if(!e)return"";let t="";const i=xF(e,"/");if(i.every((e=>e===CF)))t=".*";else{let e=!1;i.forEach(((n,o)=>{if(n===CF)return void(e||(t+=kF(2),e=!0));let r=!1,s="",a=!1,l="";for(const e of n)if("}"!==e&&r)s+=e;else if(!a||"]"===e&&l)switch(e){case"{":r=!0;continue;case"[":a=!0;continue;case"}":{const e=`(?:${xF(s,",").map((e=>LF(e))).join("|")})`;t+=e,r=!1,s="";break}case"]":t+="["+l+"]",a=!1,l="";break;case"?":t+="[^/\\\\]";continue;case"*":t+=kF(1);continue;default:t+=vu(e)}else{let t;t="-"===e?e:"^"!==e&&"!"!==e||l?"/"===e?"":vu(e):"^",l+=t}o<i.length-1&&(i[o+1]!==CF||o+2<i.length)&&(t+="[/\\\\]"),e=!1}))}return t}const EF=/^\*\*\/\*\.[\w\.-]+$/,NF=/^\*\*\/([\w\.-]+)\/?$/,IF=/^{\*\*\/\*?[\w\.-]+\/?(,\*\*\/\*?[\w\.-]+\/?)*}$/,TF=/^{\*\*\/\*?[\w\.-]+(\/(\*\*)?)?(,\*\*\/\*?[\w\.-]+(\/(\*\*)?)?)*}$/,DF=/^\*\*((\/[\w\.-]+)+)\/?$/,AF=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,OF=new vP(1e4),MF=function(){return!1},RF=function(){return null};function PF(e,t){if(!e)return RF;let i;i="string"!=typeof e?e.pattern:e,i=i.trim();const n=`${i}_${!!t.trimForExclusions}`;let o,r=OF.get(n);if(r)return FF(r,e);if(EF.test(i)){const e=i.substr(4);r=function(t,n){return"string"==typeof t&&t.endsWith(e)?i:null}}else r=(o=NF.exec(BF(i,t)))?function(e,t){const i=`/${e}`,n=`\\${e}`,o=function(o,r){return"string"!=typeof o?null:r?r===e?t:null:o===e||o.endsWith(i)||o.endsWith(n)?t:null},r=[e];return o.basenames=r,o.patterns=[t],o.allBasenames=r,o}(o[1],i):(t.trimForExclusions?TF:IF).test(i)?function(e,t){const i=zF(e.slice(1,-1).split(",").map((e=>PF(e,t))).filter((e=>e!==RF)),e),n=i.length;if(!n)return RF;if(1===n)return i[0];const o=function(t,n){for(let o=0,r=i.length;o<r;o++)if(i[o](t,n))return e;return null},r=i.find((e=>!!e.allBasenames));r&&(o.allBasenames=r.allBasenames);const s=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return s.length&&(o.allPaths=s),o}(i,t):(o=DF.exec(BF(i,t)))?WF(o[1].substr(1),i,!0):(o=AF.exec(BF(i,t)))?WF(o[1],i,!1):function(e){try{const t=new RegExp(`^${LF(e)}$`);return function(i){return t.lastIndex=0,"string"==typeof i&&t.test(i)?e:null}}catch(e){return RF}}(i);return OF.set(n,r),FF(r,e)}function FF(e,t){return"string"==typeof t?e:function(i,n){return AD(i,t.base,!Fa)?e(i.substr(t.base.length+1),n):null}}function BF(e,t){return t.trimForExclusions&&e.endsWith("/**")?e.substr(0,e.length-2):e}function WF(e,t,i){const n=Td===Sd.sep,o=n?e:e.replace(SF,Td),r=Td+o,s=Sd.sep+e,a=i?function(i,a){return"string"!=typeof i||i!==o&&!i.endsWith(r)&&(n||i!==e&&!i.endsWith(s))?null:t}:function(i,r){return"string"!=typeof i||i!==o&&(n||i!==e)?null:t};return a.allPaths=[(i?"*/":"./")+e],a}function VF(e,t={}){if(!e)return MF;if("string"==typeof e||function(e){const t=e;return!!t&&("string"==typeof t.base&&"string"==typeof t.pattern)}(e)){const i=PF(e,t);if(i===RF)return MF;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=zF(Object.getOwnPropertyNames(e).map((i=>function(e,t,i){if(!1===t)return RF;const n=PF(e,i);if(n===RF)return RF;if("boolean"==typeof t)return n;if(t){const i=t.when;if("string"==typeof i){const t=(t,o,r,s)=>{if(!s||!n(t,o))return null;const a=s(i.replace("$(basename)",r));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!==RF))),n=i.length;if(!n)return RF;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<o;n++){const o=i[n](e,t);if(o)return o}return null},t=i.find((e=>!!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 r=0,s=i.length;r<s;r++){const s=i[r];s.requiresSiblings&&n&&(t||(t=Nd(e)),o||(o=t.substr(0,t.length-Id(e).length)));const a=s(e,t,o,n);if(a)return a}return null},r=i.find((e=>!!e.allBasenames));r&&(o.allBasenames=r.allBasenames);const s=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return s.length&&(o.allPaths=s),o}(e,t)}function zF(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<i;e++)o.push(t)}else o=i.reduce(((e,t)=>{const i=t.patterns;return i?e.concat(i):e}),[]);const r=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};r.basenames=n,r.patterns=o,r.allBasenames=n;const s=e.filter((e=>!e.basenames));return s.push(r),s}let jF=[],HF=[],UF=[];function $F(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:false,filenameLowercase:e.filename?e.filename.toLowerCase():void 0,extensionLowercase:e.extension?e.extension.toLowerCase():void 0,filepatternLowercase:e.filepattern?VF(e.filepattern.toLowerCase()):void 0,filepatternOnPath:!!e.filepattern&&e.filepattern.indexOf(Sd.sep)>=0}}(e);jF.push(n),n.userConfigured?UF.push(n):HF.push(n),i&&!n.userConfigured&&jF.forEach((e=>{e.mime===n.mime||e.userConfigured||(n.extension&&e.extension===n.extension&&console.warn(`Overwriting extension <<${n.extension}>> to now point to mime <<${n.mime}>>`),n.filename&&e.filename===n.filename&&console.warn(`Overwriting filename <<${n.filename}>> to now point to mime <<${n.mime}>>`),n.filepattern&&e.filepattern===n.filepattern&&console.warn(`Overwriting filepattern <<${n.filepattern}>> to now point to mime <<${n.mime}>>`),n.firstline&&e.firstline===n.firstline&&console.warn(`Overwriting firstline <<${n.firstline}>> to now point to mime <<${n.mime}>>`))}))}(e,0,t)}function KF(e,t,i){var n;let o,r,s;for(let a=i.length-1;a>=0;a--){const l=i[a];if(t===l.filenameLowercase){o=l;break}if(l.filepattern&&(!r||l.filepattern.length>r.filepattern.length)){const i=l.filepatternOnPath?e:t;(null===(n=l.filepatternLowercase)||void 0===n?void 0:n.call(l,i))&&(r=l)}l.extension&&(!s||l.extension.length>s.extension.length)&&t.endsWith(l.extensionLowercase)&&(s=l)}return o?o.mime:r?r.mime:s?s.mime:void 0}const qF=Object.prototype.hasOwnProperty,GF="vs.editor.nullLanguage";tm.register(GF,{});class YF{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(GF,0),this._register(gT,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]||GF}}class ZF extends Nc{constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new Vc),this.onDidChange=this._onDidChange.event,ZF.instanceCount++,this._warnOnOverwrite=t,this.languageIdCodec=new YF,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(uT.onDidChangeLanguages((e=>{this._initializeFromRegistry()}))))}dispose(){ZF.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},jF=jF.filter((e=>e.userConfigured)),HF=[];const e=[].concat(uT.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}))})),iw.as(XI).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(e){const t=e.id;let i;qF.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)$F({id:i,mime:n,extension:e},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(let o of t.filenames)$F({id:i,mime:n,filename:o},this._warnOnOverwrite),e.filenames.push(o);if(Array.isArray(t.filenamePatterns))for(let e of t.filenamePatterns)$F({id:i,mime:n,filepattern:e},this._warnOnOverwrite);if("string"==typeof t.firstLine&&t.firstLine.length>0){let e=t.firstLine;"^"!==e.charAt(0)&&(e="^"+e);try{const t=new RegExp(e);"^"!==(o=t).source&&"^$"!==o.source&&"$"!==o.source&&"^\\s*$"!==o.source&&o.exec("")&&0===o.lastIndex||$F({id:i,mime:n,firstline:t},this._warnOnOverwrite)}catch(e){gc(e)}}var o;e.aliases.push(i);let r=null;if(void 0!==t.aliases&&Array.isArray(t.aliases)&&(r=0===t.aliases.length?[null]:t.aliases),null!==r)for(const t of r)t&&0!==t.length&&e.aliases.push(t);const s=null!==r&&r.length>0;if(s&&null===r[0]);else{const t=(s?r[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&&qF.call(this._languages,e)}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(e){const t=e.toLowerCase();return qF.call(this._lowercaseNameMap,t)?this._lowercaseNameMap[t]:null}getLanguageIdByMimeType(e){return e&&qF.call(this._mimeTypesMap,e)?this._mimeTypesMap[e]:null}guessLanguageIdByFilepathOrFirstLine(e,t){return e||t?sl(function(e,t){let i;if(e)switch(e.scheme){case av.file:i=e.fsPath;break;case av.data:i=VD.parseMetaData(e).get(VD.META_DATA_LABEL);break;default:i=e.path}if(!i)return[Kk.unknown];i=i.toLowerCase();const n=Nd(i),o=KF(i,n,UF);if(o)return[o,Kk.text];const r=KF(i,n,HF);if(r)return[r,Kk.text];if(t){const e=function(e){if(Qu(e)&&(e=e.substr(1)),e.length>0)for(let t=jF.length-1;t>=0;t--){const i=jF[t];if(!i.firstline)continue;const n=e.match(i.firstline);if(n&&n.length>0)return i.mime}}(t);if(e)return[e,Kk.text]}return[Kk.unknown]}(e,t).map((e=>this.getLanguageIdByMimeType(e)))):[]}}ZF.instanceCount=0;class XF extends Nc{constructor(e=!1){super(),this._onDidEncounterLanguage=this._register(new Vc),this.onDidEncounterLanguage=this._onDidEncounterLanguage.event,this._onDidChange=this._register(new Vc({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,XF.instanceCount++,this._encounteredLanguages=new Set,this._registry=this._register(new ZF(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange((()=>this._onDidChange.fire())))}dispose(){XF.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){return cl(this._registry.guessLanguageIdByFilepathOrFirstLine(e,t),null)}createById(e){return new JF(this.onDidChange,(()=>this._createAndGetLanguageIdentifier(e)))}createByFilepathOrFirstLine(e,t){return new JF(this.onDidChange,(()=>{const i=this.guessLanguageIdByFilepathOrFirstLine(e,t);return this._createAndGetLanguageIdentifier(i)}))}_createAndGetLanguageIdentifier(e){return e&&this.isRegisteredLanguageId(e)||(e=gT),this._encounteredLanguages.has(e)||(this._encounteredLanguages.add(e),ph.getOrCreate(e),this._onDidEncounterLanguage.fire(e)),e}}XF.instanceCount=0;class JF{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 Vc({onLastListenerRemove:()=>{this._dispose()}})),this._emitter.event}_evaluate(){const e=this._selector();e!==this.languageId&&(this.languageId=e,this._emitter&&this._emitter.fire(this.languageId))}}var QF=i(58),eB={};eB.styleTagTransform=uu(),eB.setAttributes=lu(),eB.insert=su().bind(null,"head"),eB.domAPI=ou(),eB.insertStyleElement=du(),iu()(QF.Z,eB),QF.Z&&QF.Z.locals&&QF.Z.locals;var tB=i(4081),iB={};function nB(e){let t=e.definition;for(;t instanceof lh;)t=t.definition;return`.codicon-${e.id}:before { content: '${t.fontCharacter}'; }`}function oB(...e){return function(t,i){for(let n=0,o=e.length;n<o;n++){const o=e[n](t,i);if(o)return o}return null}}iB.styleTagTransform=uu(),iB.setAttributes=lu(),iB.insert=su().bind(null,"head"),iB.domAPI=ou(),iB.insertStyleElement=du(),iu()(tB.Z,iB),tB.Z&&tB.Z.locals&&tB.Z.locals,sB.bind(void 0,!1);const rB=sB.bind(void 0,!0);function sB(e,t,i){if(!i||i.length<t.length)return null;let n;return n=e?Ou(i,t):0===i.indexOf(t),n?t.length>0?[{start:0,end:t.length}]:[]:null}function aB(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=aB(e,t,i+1,n+1))?pB({start:n,end:n+1},o):null}return aB(e,t,i,n+1)}function lB(e){return 97<=e&&e<=122}function cB(e){return 65<=e&&e<=90}function dB(e){return 48<=e&&e<=57}function hB(e){return 32===e||9===e||10===e||13===e}const uB=new Set;function gB(e){return lB(e)||cB(e)||dB(e)}function pB(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function mB(e,t){for(let i=t;i<e.length;i++){const t=e.charCodeAt(i);if(cB(t)||dB(t)||i>0&&!gB(e.charCodeAt(i-1)))return i}return e.length}function fB(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,r=n+1;for(o=fB(e,t,i+1,n+1);!o&&(r=mB(t,r))<t.length;)o=fB(e,t,i+1,r),r++;return null===o?null:pB({start:n,end:n+1},o)}}function _B(e,t){if(!t)return null;if(0===(t=t.trim()).length)return null;if(!function(e){let t=0,i=0,n=0,o=0;for(let r=0;r<e.length;r++)n=e.charCodeAt(r),cB(n)&&t++,lB(n)&&i++,hB(n)&&o++;return 0!==t&&0!==i||0!==o?t<=5:e.length<=30}(e))return null;if(t.length>60)return null;const i=function(e){let t=0,i=0,n=0,o=0,r=0;for(let s=0;s<e.length;s++)r=e.charCodeAt(s),cB(r)&&t++,lB(r)&&i++,gB(r)&&n++,dB(r)&&o++;return{upperPercent:t/e.length,lowerPercent:i/e.length,alphaPercent:n/e.length,numericPercent:o/e.length}}(t);if(!function(e){const{upperPercent:t,lowerPercent:i,alphaPercent:n,numericPercent:o}=e;return i>.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();o<t.length&&null===(n=fB(e,t,0,o));)o=mB(t,o+1);return n}"()[]{}<>`'\"-/;:,.?!".split("").forEach((e=>uB.add(e.charCodeAt(0))));const vB=oB(rB,_B,(function(e,t){const i=t.toLowerCase().indexOf(e.toLowerCase());return-1===i?null:[{start:i,end:i+e.length}]})),bB=oB(rB,_B,(function(e,t){return aB(e.toLowerCase(),t.toLowerCase(),0,0)})),wB=new vP(1e4);function yB(e,t,i=!1){if("string"!=typeof e||"string"!=typeof t)return null;let n=wB.get(e);n||(n=new RegExp(e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*"),"i"),wB.set(e,n));const o=n.exec(t);return o?[{start:o.index,end:o.index+o[0].length}]:i?bB(e,t):vB(e,t)}const CB=128;function SB(){const e=[],t=[];for(let e=0;e<=CB;e++)t[e]=0;for(let i=0;i<=CB;i++)e.push(t.slice(0));return e}function kB(e){const t=[];for(let i=0;i<=e;i++)t[i]=0;return t}const xB=kB(256),LB=kB(256),EB=SB(),NB=SB(),IB=SB();function TB(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!!Xu(i)}}function DB(e,t){if(t<0||t>=e.length)return!1;switch(e.charCodeAt(t)){case 32:case 9:return!0;default:return!1}}function AB(e,t,i){return t[e]!==i[e]}var OB;function MB(e,t,i,n,o,r,s){const a=e.length>CB?CB:e.length,l=n.length>CB?CB:n.length;if(i>=a||r>=l||a-i>l-r)return;if(!function(e,t,i,n,o,r,s=!1){for(;t<i&&o<r;)e[t]===n[o]&&(s&&(xB[t]=o),t+=1),o+=1;return t===i}(t,i,a,o,r,l,!0))return;!function(e,t,i,n,o,r){let s=e-1,a=t-1;for(;s>=i&&a>=n;)o[s]===r[a]&&(LB[s]=a,s--),a--}(a,l,i,r,t,o);let c=1,d=1,h=i,u=r;const g=[!1];for(c=1,h=i;h<a;c++,h++){const s=xB[h],p=LB[h],m=h+1<a?LB[h+1]:l;for(d=s-r+1,u=s;u<m;d++,u++){let a=Number.MIN_SAFE_INTEGER,m=!1;u<=p&&(a=RB(e,t,h,i,n,o,u,l,r,0===EB[c-1][d-1],g));let f=0;a!==Number.MAX_SAFE_INTEGER&&(m=!0,f=a+NB[c-1][d-1]);const _=u>s,v=_?NB[c][d-1]+(EB[c][d-1]>0?-5:0):0,b=u>s+1&&EB[c][d-1]>0,w=b?NB[c][d-2]+(EB[c][d-2]>0?-5:0):0;if(b&&(!_||w>=v)&&(!m||w>=f))NB[c][d]=w,IB[c][d]=3,EB[c][d]=0;else if(_&&(!m||v>=f))NB[c][d]=v,IB[c][d]=2,EB[c][d]=0;else{if(!m)throw new Error("not possible");NB[c][d]=f,IB[c][d]=1,EB[c][d]=EB[c-1][d-1]+1}}}if(!g[0]&&!s)return;c--,d--;const p=[NB[c][d],r];let m=0,f=0;for(;c>=1;){let e=d;do{const t=IB[c][e];if(3===t)e-=2;else{if(2!==t)break;e-=1}}while(e>=1);m>1&&t[i+c-1]===o[r+d-1]&&!AB(e+r-1,n,o)&&m+1>EB[c][e]&&(e=d),e===d?m++:m=1,f||(f=e),c--,d=e-1,p.push(d)}l===a&&(p[0]+=2);const _=f-a;return p[0]-=_,p}function RB(e,t,i,n,o,r,s,a,l,c,d){if(t[i]!==r[s])return Number.MIN_SAFE_INTEGER;let h=1,u=!1;return s===i-n?h=e[i]===o[s]?7:5:!AB(s,o,r)||0!==s&&AB(s-1,o,r)?!TB(r,s)||0!==s&&TB(r,s-1)?(TB(r,s-1)||DB(r,s-1))&&(h=5,u=!0):h=5:(h=e[i]===o[s]?7:5,u=!0),h>1&&i===n&&(d[0]=!0),u||(u=AB(s,o,r)||TB(r,s-1)||DB(r,s-1)),i===n?s>l&&(h-=u?3:5):h+=c?u?2:0:u?0:1,s+1===a&&(h-=u?3:5),h}!function(e){e.Default=[-100,0],e.isDefault=function(e){return!e||2===e.length&&-100===e[0]&&0===e[1]}}(OB||(OB={}));const PB="$(",FB=new RegExp(`\\$\\(${Jd.iconNameExpression}(?:${Jd.iconModifierExpression})?\\)`,"g"),BB=new RegExp(Jd.iconNameCharacter),WB=new RegExp(`(\\\\)?${FB.source}`,"g");new RegExp(`\\\\${FB.source}`,"g");const VB=new RegExp(`(\\s)?(\\\\)?${FB.source}(\\s)?`,"g");function zB(e){return-1===e.indexOf(PB)?e:e.replace(VB,((e,t,i,n)=>i?e:t||n||""))}function jB(e){const t=e.indexOf(PB);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(c)}}let r,s,a=-1,l="",c=0,d=t;const h=e.length;for(o(e.substr(0,t));d<h;)r=e[d],s=e[d+1],r===PB[0]&&s===PB[1]?(a=d,o(l),l=PB,d++):")"===r&&-1!==a?(c+=d-a+1,a=-1,l=""):-1!==a?BB.test(r)?l+=r:(o(l),a=-1,l=""):o(r),d++;return o(l),{text:n,iconOffsets:i}}(e,t)}function HB(e,t,i=!1){const{text:n,iconOffsets:o}=t;if(!o||0===o.length)return yB(e,n,i);const r=bu(n," "),s=n.length-r.length,a=yB(e,r,i);if(a)for(const e of a){const t=o[e.start+s]+s;e.start+=t,e.end+=t}return a}const UB=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,$B=/(&amp;)?(&amp;)([^\s&])/g;var KB;!function(e){e[e.Right=0]="Right",e[e.Left=1]="Left"}(KB||(KB={}));class qB extends YM{constructor(e,t,i={}){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");const n=document.createElement("div");n.classList.add("monaco-menu"),n.setAttribute("role","presentation"),super(n,{orientation:1,actionViewItemProvider:e=>this.doGetActionViewItem(e,i,o),context:i.context,actionRunner:i.actionRunner,ariaLabel:i.ariaLabel,focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...Pa||Fa?[10]:[]],keyDown:!0}}),this.menuElement=n,this.actionsList.setAttribute("role","menu"),this.actionsList.tabIndex=0,this.menuDisposables=this._register(new Ec),this.initializeOrUpdateStyleSheet(e,{}),this._register(ny.addTarget(n)),pv(n,Kv.KEY_DOWN,(e=>{new ev(e).equals(2)&&e.preventDefault()})),i.enableMnemonics&&this.menuDisposables.add(pv(n,Kv.KEY_DOWN,(e=>{const t=e.key.toLocaleLowerCase();if(this.mnemonics.has(t)){qv(e,!0);const i=this.mnemonics.get(t);if(1===i.length&&(i[0]instanceof YB&&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)}}}))),Fa&&this._register(pv(n,Kv.KEY_DOWN,(e=>{const t=new ev(e);t.equals(14)||t.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),qv(e,!0)):(t.equals(13)||t.equals(12))&&(this.focusedItem=0,this.focusPrevious(),qv(e,!0))}))),this._register(pv(this.domNode,Kv.MOUSE_OUT,(e=>{Rv(e.relatedTarget,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),e.stopPropagation())}))),this._register(pv(this.actionsList,Kv.MOUSE_OVER,(e=>{let t=e.target;if(t&&Rv(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(ny.addTarget(this.actionsList)),this._register(pv(this.actionsList,iy.Tap,(e=>{let t=e.initialTarget;if(t&&Rv(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 PE(n,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const r=this.scrollableElement.getDomNode();r.style.position="",this._register(pv(n,iy.Change,(e=>{qv(e,!0);const t=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:t-e.translationY})}))),this._register(pv(r,Kv.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))||(console.warn(`Found submenu cycle: ${e.id}`),!1)})),this.push(t,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter((e=>!(e instanceof ZB))).forEach(((e,t,i)=>{e.updatePositionInSet(t+1,i.length)}))}initializeOrUpdateStyleSheet(e,t){this.styleSheet||(Wv(e)?this.styleSheet=jv(e):(qB.globalStyleSheet||(qB.globalStyleSheet=jv()),this.styleSheet=qB.globalStyleSheet)),this.styleSheet.textContent=function(e,t){let i=`\n.monaco-menu {\n\tfont-size: 13px;\n\n}\n\n${nB(lh.menuSelection)}\n${nB(lh.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 r=e.scrollbarSliderActiveBackground;r&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .scrollbar > .slider.active {\n\t\t\t\t\tbackground: ${r};\n\t\t\t\t}\n\t\t\t`)}return i}(t,Wv(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}`:"",r=e.shadowColor?`0 2px 4px ${e.shadowColor}`:"";t.style.border=o,this.domNode.style.color=i,this.domNode.style.backgroundColor=n,t.style.boxShadow=r,this.viewItems&&this.viewItems.forEach((t=>{(t instanceof GB||t instanceof ZB)&&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.actionsList.children.length;t++)if(e===this.actionsList.children[t]){this.focusedItem=t;break}}updateFocus(e){super.updateFocus(e,!0,!0),void 0!==this.focusedItem&&this.scrollableElement.setScrollPosition({scrollTop:Math.round(this.menuElement.scrollTop)})}doGetActionViewItem(e,t,i){if(e instanceof Sb)return new ZB(t.context,e,{icon:!0});if(e instanceof kb){const n=new YB(e,e.actions,i,Object.assign(Object.assign({},t),{submenuIds:new Set([...t.submenuIds||[],e.id])}));if(t.enableMnemonics){const e=n.getMnemonic();if(e&&n.isEnabled()){let t=[];this.mnemonics.has(e)&&(t=this.mnemonics.get(e)),t.push(n),this.mnemonics.set(e,t)}}return n}{const i={enableMnemonics:t.enableMnemonics,useEventAsContext:t.useEventAsContext};if(t.getKeyBinding){const n=t.getKeyBinding(e);if(n){const e=n.getLabel();e&&(i.keybinding=e)}}const n=new GB(t.context,e,i);if(t.enableMnemonics){const e=n.getMnemonic();if(e&&n.isEnabled()){let t=[];this.mnemonics.has(e)&&(t=this.mnemonics.get(e)),t.push(n),this.mnemonics.set(e,t)}}return n}}}class GB extends KM{constructor(e,t,i={}){if(i.isMenu=!0,super(t,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="",this.options.label&&i.enableMnemonics){let e=this.getAction().label;if(e){let t=UB.exec(e);t&&(this.mnemonic=(t[1]?t[1]:t[3]).toLocaleLowerCase())}}this.runOnceToEnableMouseUp=new bm((()=>{this.element&&(this._register(pv(this.element,Kv.MOUSE_UP,(e=>{if(qv(e,!0),ug){if(new rv(e).rightButton)return;this.onClick(e)}else setTimeout((()=>{this.onClick(e)}),0)}))),this._register(pv(this.element,Kv.CONTEXT_MENU,(e=>{qv(e,!0)}))))}),100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=Zv(this.element,tb("a.action-menu-item")),this._action.id===Sb.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=Zv(this.item,tb("span.menu-item-check"+lh.menuSelection.cssSelector)),this.check.setAttribute("role","none"),this.label=Zv(this.item,tb("span.action-label")),this.options.label&&this.options.keybinding&&(Zv(this.item,tb("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){hv(this.label);let e=zB(this.getAction().label);if(e){const t=function(e){const t=UB,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=UB.exec(e);if(i){e=e.replace(/[<>&]/g,(function(e){switch(e){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return e}})),$B.lastIndex=0;let t=$B.exec(e);for(;t&&t[1];)t=$B.exec(e);const n=e=>e.replace(/&amp;&amp;/g,"&amp;");t?this.label.append(bu(n(e.substr(0,t.index))," "),tb("u",{"aria-hidden":"true"},t[3]),function(e,t){if(!e||!t)return e;const i=t.length,n=e.length;if(0===i||0===n)return e;let o=n,r=-1;for(;r=e.lastIndexOf(t,o-1),-1!==r&&r+i===o;){if(0===r)return"";o=r}return e.substring(0,o)}(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 YB extends GB{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 Ec),this.mouseOver=!1,this.expandDirection=n&&void 0!==n.expandDirection?n.expandDirection:KB.Right,this.showScheduler=new bm((()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))}),250),this.hideScheduler=new bm((()=>{this.element&&!Rv(zv(),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=Zv(this.item,tb("span.submenu-indicator"+lh.menuSubmenu.cssSelector)),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register(pv(this.element,Kv.KEY_UP,(e=>{let t=new ev(e);(t.equals(17)||t.equals(3))&&(qv(e,!0),this.createSubmenu(!0))}))),this._register(pv(this.element,Kv.KEY_DOWN,(e=>{let t=new ev(e);zv()===this.item&&(t.equals(17)||t.equals(3))&&qv(e,!0)}))),this._register(pv(this.element,Kv.MOUSE_OVER,(e=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())}))),this._register(pv(this.element,Kv.MOUSE_LEAVE,(e=>{this.mouseOver=!1}))),this._register(pv(this.element,Kv.FOCUS_OUT,(e=>{this.element&&!Rv(zv(),this.element)&&this.hideScheduler.schedule()}))),this._register(this.parentData.parent.onScroll((()=>{this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!1)}))))}updateEnabled(){}onClick(e){qv(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(e){}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=vF(e.width,t.width,{position:n===KB.Right?0:1,offset:i.left,size:i.width}),o.left>=i.left&&o.left<i.left+i.width&&(i.left+10+t.width<=e.width&&(o.left=i.left+10),i.top+=10,i.height=0),o.top=vF(e.height,t.height,{position:0,offset:i.top,size:0}),o.top+t.height===i.top&&o.top+i.height+t.height<=e.height&&(o.top+=i.height),o}createSubmenu(e=!0){if(this.element)if(this.parentData.submenu)this.parentData.submenu.focus(!1);else{this.updateAriaExpanded("true"),this.submenuContainer=Zv(this.element,tb("div.monaco-submenu")),this.submenuContainer.classList.add("menubar-menu-items-holder","context-view");const t=getComputedStyle(this.parentData.parent.domNode),i=parseFloat(t.paddingTop||"0")||0;this.submenuContainer.style.zIndex="1",this.submenuContainer.style.position="fixed",this.submenuContainer.style.top="0",this.submenuContainer.style.left="0",this.parentData.submenu=new qB(this.submenuContainer,this.submenuActions.length?this.submenuActions:[new xb],this.submenuOptions),this.menuStyle&&this.parentData.submenu.style(this.menuStyle);const n=this.element.getBoundingClientRect(),o={top:n.top-i,left:n.left,height:n.height+2*i,width:n.width},r=this.submenuContainer.getBoundingClientRect(),{top:s,left:a}=this.calculateSubmenuMenuLayout(new Nv(window.innerWidth,window.innerHeight),Nv.lift(r),o,this.expandDirection);this.submenuContainer.style.left=a-r.left+"px",this.submenuContainer.style.top=s-r.top+"px",this.submenuDisposables.add(pv(this.submenuContainer,Kv.KEY_UP,(e=>{new ev(e).equals(15)&&(qv(e,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))}))),this.submenuDisposables.add(pv(this.submenuContainer,Kv.KEY_DOWN,(e=>{new ev(e).equals(15)&&qv(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 ZB extends qM{style(e){this.label&&(this.label.style.borderBottomColor=e.separatorColor?`${e.separatorColor}`:"")}}var XB=i(4932),JB={};function QB(e,t){const i=Object.create(null);for(let n in t){const o=t[n];o&&(i[n]=KS(o,e))}return i}function eW(e,t,i){function n(){const n=QB(e.getColorTheme(),t);"function"==typeof i?i(n):i.style(n)}return n(),e.onDidColorThemeChange(n)}function tW(e,t,i){return eW(t,Object.assign(Object.assign({},iW),i||{}),e)}JB.styleTagTransform=uu(),JB.setAttributes=lu(),JB.insert=su().bind(null,"head"),JB.domAPI=ou(),JB.insertStyleElement=du(),iu()(XB.Z,JB),XB.Z&&XB.Z.locals&&XB.Z.locals;const iW={listFocusBackground:jC,listFocusForeground:HC,listFocusOutline:UC,listActiveSelectionBackground:$C,listActiveSelectionForeground:KC,listActiveSelectionIconForeground:qC,listFocusAndSelectionBackground:$C,listFocusAndSelectionForeground:KC,listInactiveSelectionBackground:GC,listInactiveSelectionIconForeground:ZC,listInactiveSelectionForeground:YC,listInactiveFocusBackground:XC,listInactiveFocusOutline:JC,listHoverBackground:QC,listHoverForeground:eS,listDropBackground:tS,listSelectionOutline:wy,listHoverOutline:wy,listFilterWidgetBackground:rS,listFilterWidgetOutline:sS,listFilterWidgetNoMatchesOutline:aS,listMatchesShadow:yy,treeIndentGuidesStroke:lS,tableColumnsBorder:cS,tableOddRowsBackgroundColor:dS},nW={shadowColor:yy,borderColor:mS,foregroundColor:fS,backgroundColor:vS,selectionForegroundColor:bS,selectionBackgroundColor:wS,selectionBorderColor:yS,separatorColor:CS,scrollbarShadow:Hy,scrollbarSliderBackground:Uy,scrollbarSliderHoverBackground:$y,scrollbarSliderActiveBackground:Ky};class oW{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=$v(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(tb(".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",pv(this.block,Kv.MOUSE_DOWN,(e=>e.stopPropagation())));const r=new Ec,s=e.actionRunner||new Cb;var a;return s.onBeforeRun(this.onActionRun,this,r),s.onDidRun(this.onDidActionRun,this,r),i=new qB(n,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:s,getKeyBinding:e.getKeyBinding?e.getKeyBinding:e=>this.keybindingService.lookupKeybinding(e.id)}),r.add((a=i,eW(this.themeService,Object.assign(Object.assign({},nW),undefined),a))),i.onDidCancel((()=>this.contextViewService.hideContextView(!0)),null,r),i.onDidBlur((()=>this.contextViewService.hideContextView(!0)),null,r),r.add(pv(window,Kv.BLUR,(()=>this.contextViewService.hideContextView(!0)))),r.add(pv(window,Kv.MOUSE_DOWN,(e=>{if(e.defaultPrevented)return;let t=new rv(e),i=t.target;if(!t.rightButton){for(;i;){if(i===n)return;i=i.parentElement}this.contextViewService.hideContextView(!0)}}))),xc(r,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&&!_c(e.error)&&this.notificationService.error(e.error)}}var rW=function(e,t){return function(i,n){t(i,n,e)}};let sW=class extends Nc{constructor(e,t,i,n,o){super(),this._onDidShowContextMenu=new Vc,this._onDidHideContextMenu=new Vc,this.contextMenuHandler=new oW(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()}})),lb.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};function aW(e){let t=JSON.parse(e);return t=lW(t),t}function lW(e,t=0){if(!e||t>200)return e;if("object"==typeof e){switch(e.$mid){case 1:return Bd.revive(e);case 2:return new RegExp(e.source,e.flags);case 14:return new Date(e.source)}if(e instanceof cp||e instanceof Uint8Array)return e;if(Array.isArray(e))for(let i=0;i<e.length;++i)e[i]=lW(e[i],t+1);else for(const i in e)Object.hasOwnProperty.call(e,i)&&(e[i]=lW(e[i],t+1))}return e}var cW;sW=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([rW(0,Sw),rW(1,jO),rW(2,hR),rW(3,HP),rW(4,ow)],sW),function(e){e[e.API=0]="API",e[e.USER=1]="USER"}(cW||(cW={}));var dW=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const hW=Mg("openerService");function uW(e,t){return Bd.isUri(e)?Au(e.scheme,t):Ou(e,t+":")}function gW(e,...t){return t.some((t=>uW(e,t)))}Object.freeze({_serviceBrand:void 0,registerOpener:()=>Nc.None,registerValidator:()=>Nc.None,registerExternalUriResolver:()=>Nc.None,setDefaultExternalOpener(){},registerExternalOpener:()=>Nc.None,open(){return dW(this,void 0,void 0,(function*(){return!1}))},resolveExternalUri(e){return dW(this,void 0,void 0,(function*(){return{resolved:e,dispose(){}}}))}});var pW=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},mW=function(e,t){return function(i,n){t(i,n,e)}},fW=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};let _W=class{constructor(e){this._commandService=e}open(e,t){return fW(this,void 0,void 0,(function*(){if(!uW(e,av.command))return!1;if(!(null==t?void 0:t.allowCommands))return!0;"string"==typeof e&&(e=Bd.parse(e));let i=[];try{i=aW(decodeURIComponent(e.query))}catch(t){try{i=aW(e.query)}catch(e){}}return Array.isArray(i)||(i=[i]),yield this._commandService.executeCommand(e.path,...i),!0}))}};_W=pW([mW(0,Lb)],_W);let vW=class{constructor(e){this._editorService=e}open(e,t){return fW(this,void 0,void 0,(function*(){"string"==typeof e&&(e=Bd.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===av.file&&(e=FD(e)),yield this._editorService.openCodeEditor({resource:e,options:Object.assign({selection:i,source:(null==t?void 0:t.fromUserGesture)?cW.USER:cW.API},null==t?void 0:t.editorOptions)},this._editorService.getFocusedCodeEditor(),null==t?void 0:t.openToSide),!0}))}};vW=pW([mW(0,Rg)],vW);let bW=class{constructor(e,t){this._openers=new Oc,this._validators=new Oc,this._resolvers=new Oc,this._resolvedUriTargets=new fP((e=>e.with({path:null,fragment:null,query:null}).toString())),this._externalOpeners=new Oc,this._defaultExternalOpener={openExternal:e=>fW(this,void 0,void 0,(function*(){return gW(e,av.http,av.https)?rb(e):window.location.href=e,!0}))},this._openers.push({open:(e,t)=>fW(this,void 0,void 0,(function*(){return!(!(null==t?void 0:t.openExternal)&&!gW(e,av.mailto,av.http,av.https,av.vsls)||(yield this._doOpenExternal(e,t),0))}))}),this._openers.push(new _W(t)),this._openers.push(new vW(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 fW(this,void 0,void 0,(function*(){const n="string"==typeof e?Bd.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 fW(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(e){}throw new Error("Could not resolve external URI: "+e.toString())}))}_doOpenExternal(e,t){return fW(this,void 0,void 0,(function*(){const i="string"==typeof e?Bd.parse(e):e;let n,o;try{n=(yield this.resolveExternalUri(i,t)).resolved}catch(e){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},Kc.None))return!0}return this._defaultExternalOpener.openExternal(o,{sourceUri:i},Kc.None)}))}dispose(){this._validators.clear()}};var wW,yW;bW=pW([mW(0,Rg),mW(1,Lb)],bW),function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(wW||(wW={})),function(e){e.compare=function(e,t){return t-e};const t=Object.create(null);t[e.Error]=ma(0,"Error"),t[e.Warning]=ma(0,"Warning"),t[e.Info]=ma(0,"Info"),e.toString=function(e){return t[e]||""},e.fromSeverity=function(t){switch(t){case zO.Error:return e.Error;case zO.Warning:return e.Warning;case zO.Info:return e.Info;case zO.Ignore:return e.Hint}},e.toSeverity=function(t){switch(t){case e.Error:return zO.Error;case e.Warning:return zO.Warning;case e.Info:return zO.Info;case e.Hint:return zO.Ignore}}}(wW||(wW={})),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(wW.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}(yW||(yW={}));const CW=Mg("markerService");var SW=function(e,t){return function(i,n){t(i,n,e)}};class kW extends Nc{constructor(e){super(),this.model=e,this._markersData=new Map,this._register(Lc((()=>{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 t=0;t<n.length;t++)this._markersData.set(n[t],e[t]);return 0!==i.length||0!==n.length}getMarker(e){return this._markersData.get(e.id)}}let xW=class extends Nc{constructor(e,t){super(),this._markerService=t,this._onDidChangeMarker=this._register(new Vc),this._markerDecorations=new fP,e.getModels().forEach((e=>this._onModelAdded(e))),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach((e=>e.dispose())),this._markerDecorations.clear()}getMarker(e,t){const i=this._markerDecorations.get(e);return i&&i.getMarker(t)||null}_handleMarkerChange(e){e.forEach((e=>{const t=this._markerDecorations.get(e);t&&this._updateDecorations(t)}))}_onModelAdded(e){const t=new kW(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!==av.inMemory&&e.uri.scheme!==av.internal&&e.uri.scheme!==av.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=Zd.lift(t);if(t.severity!==wW.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 Zd(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<i.endColumn&&(i=new Zd(i.startLineNumber,n,i.endLineNumber,i.endColumn),t.startColumn=n)}return i}_createDecorationOption(e){let t,i,n,o,r;switch(e.severity){case wW.Hint:t=this._hasMarkerTag(e,2)?void 0:this._hasMarkerTag(e,1)?"squiggly-unnecessary":"squiggly-hint",n=0;break;case wW.Warning:t="squiggly-warning",i=aw(Dx),n=20,r={color:aw(RS),position:zg.Inline};break;case wW.Info:t="squiggly-info",i=aw(Ax),n=10;break;case wW.Error:default:t="squiggly-error",i=aw(Tx),n=30,r={color:aw(MS),position:zg.Inline}}return e.tags&&(-1!==e.tags.indexOf(1)&&(o="squiggly-inline-unnecessary"),-1!==e.tags.indexOf(2)&&(o="squiggly-inline-deprecated")),{description:"marker-decoration",stickiness:1,className:t,showIfCollapsed:!0,overviewRuler:{color:i,position:Vg.Right},minimap:r,zIndex:n,inlineClassName:o}}_hasMarkerTag(e,t){return!!e.tags&&e.tags.indexOf(t)>=0}};xW=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([SW(0,am),SW(1,CW)],xW);class LW{constructor(e,t){this._startLineNumber=e,this._tokens=t,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}static create(e,t){return new LW(e,new EW(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 Zd(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,r]=this._tokens.split(t,e.startColumn-1,i,e.endColumn-1);return[new LW(this._startLineNumber,n),new LW(this._startLineNumber+r,o)]}applyEdit(e,t){const[i,n,o]=WA(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 Yd(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 r=e.lineNumber-this._startLineNumber;r<0?this._startLineNumber+=t:r>=this._tokens.getMaxDeltaLine()+1||this._tokens.acceptInsertText(r,e.column-1,t,i,n,o)}}class EW{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){const t=[];for(let i=0;i<this._tokenCount;i++)t.push(`(${this._getDeltaLine(i)+e},${this._getStartCharacter(i)}-${this._getEndCharacter(i)})`);return`[${t.join(",")}]`}getMaxDeltaLine(){const e=this._getTokenCount();return 0===e?-1:this._getDeltaLine(e-1)}getRange(){const e=this._getTokenCount();if(0===e)return null;const t=this._getStartCharacter(0),i=this._getDeltaLine(e-1),n=this._getEndCharacter(e-1);return new Zd(0,t+1,i,n+1)}_getTokenCount(){return this._tokenCount}_getDeltaLine(e){return this._tokens[4*e]}_getStartCharacter(e){return this._tokens[4*e+1]}_getEndCharacter(e){return this._tokens[4*e+2]}isEmpty(){return 0===this._getTokenCount()}getLineTokens(e){let t=0,i=this._getTokenCount()-1;for(;t<i;){const n=t+Math.floor((i-t)/2),o=this._getDeltaLine(n);if(o<e)t=n+1;else{if(!(o>e)){let o=n;for(;o>t&&this._getDeltaLine(o-1)===e;)o--;let r=n;for(;r<i&&this._getDeltaLine(r+1)===e;)r++;return new NW(this._tokens.subarray(4*o,4*r+4))}i=n-1}}return this._getDeltaLine(t)===e?new NW(this._tokens.subarray(4*t,4*t+4)):null}clear(){this._tokenCount=0}removeTokens(e,t,i,n){const o=this._tokens,r=this._tokenCount;let s=0,a=!1,l=0;for(let c=0;c<r;c++){const r=4*c,d=o[r],h=o[r+1],u=o[r+2],g=o[r+3];if((d>e||d===e&&u>=t)&&(d<i||d===i&&h<=n))a=!0;else{if(0===s&&(l=d),a){const e=4*s;o[e]=d-l,o[e+1]=h,o[e+2]=u,o[e+3]=g}s++}}return this._tokenCount=s,l}split(e,t,i,n){const o=this._tokens,r=this._tokenCount,s=[],a=[];let l=s,c=0,d=0;for(let s=0;s<r;s++){const r=4*s,h=o[r],u=o[r+1],g=o[r+2],p=o[r+3];if(h>e||h===e&&g>=t){if(h<i||h===i&&u<=n)continue;l!==a&&(l=a,c=0,d=h)}l[c++]=h-d,l[c++]=u,l[c++]=g,l[c++]=p}return[new EW(new Uint32Array(s)),new EW(new Uint32Array(a)),d]}acceptDeleteRange(e,t,i,n,o){const r=this._tokens,s=this._tokenCount,a=n-t;let l=0,c=!1;for(let d=0;d<s;d++){const h=4*d;let u=r[h],g=r[h+1],p=r[h+2];const m=r[h+3];if(u<t||u===t&&p<=i){l++;continue}if(u===t&&g<i)u===n&&p>o?p-=o-i:p=i;else if(u===t&&g===i){if(!(u===n&&p>o)){c=!0;continue}p-=o-i}else if(u<n||u===n&&g<o){if(!(u===n&&p>o)){c=!0;continue}u===t?(g=i,p=g+(p-o)):(g=0,p=g+(p-o))}else if(u>n){if(0===a&&!c){l=s;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;r[f]=u,r[f+1]=g,r[f+2]=p,r[f+3]=m,l++}this._tokenCount=l}acceptInsertText(e,t,i,n,o,r){const s=0===i&&1===n&&(r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122),a=this._tokens,l=this._tokenCount;for(let r=0;r<l;r++){const l=4*r;let c=a[l],d=a[l+1],h=a[l+2];if(!(c<e||c===e&&h<t)){if(c===e&&h===t){if(!s)continue;h+=1}else if(c===e&&d<t&&t<h)0===i?h+=n:h=t;else{if(c===e&&d===t&&s)continue;if(c===e)if(c+=i,0===i)d+=n,h+=n;else{const e=h-d;d=o+(d-t),h=d+e}else c+=i}a[l]=c,a[l+1]=d,a[l+2]=h}}}}class NW{constructor(e){this._tokens=e}getCount(){return this._tokens.length/4}getStartCharacter(e){return this._tokens[4*e+1]}getEndCharacter(e){return this._tokens[4*e+2]}getMetadata(e){return this._tokens[4*e+3]}}var IW=function(e,t){return function(i,n){t(i,n,e)}};let TW=class{constructor(e,t,i,n){this._legend=e,this._themeService=t,this._languageService=i,this._logService=n,this._hashTable=new AW,this._hasWarnedOverlappingTokens=!1}getMetadata(e,t,i){const n=this._languageService.languageIdCodec.encodeLanguageId(i),o=this._hashTable.get(e,t,n);let r;if(o)r=o.metadata,this._logService.getLevel()===Bf.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${e} / ${t}: foreground ${ch.getForeground(r)}, fontStyle ${ch.getFontStyle(r).toString(2)}`);else{let o=this._legend.tokenTypes[e];const s=[];if(o){let e=t;for(let t=0;e>0&&t<this._legend.tokenModifiers.length;t++)1&e&&s.push(this._legend.tokenModifiers[t]),e>>=1;e>0&&this._logService.getLevel()===Bf.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),s.push("not-in-legend"));const n=this._themeService.getColorTheme().getTokenStyleMetadata(o,s,i);void 0===n?r=2147483647:(r=0,void 0!==n.italic&&(r|=1|(n.italic?1:0)<<10),void 0!==n.bold&&(r|=2|(n.bold?2:0)<<10),void 0!==n.underline&&(r|=4|(n.underline?4:0)<<10),void 0!==n.strikethrough&&(r|=8|(n.strikethrough?8:0)<<10),n.foreground&&(r|=16|n.foreground<<14),0===r&&(r=2147483647))}else this._logService.getLevel()===Bf.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),r=2147483647,o="not-in-legend";this._hashTable.add(e,t,n,r),this._logService.getLevel()===Bf.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${o}) / ${t} (${s.join(" ")}): foreground ${ch.getForeground(r)}, fontStyle ${ch.getFontStyle(r).toString(2)}`)}return r}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,console.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}};TW=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([IW(1,ow),IW(2,Hp),IW(3,Ff)],TW);class DW{constructor(e,t,i,n){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=i,this.metadata=n,this.next=null}}class AW{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=AW._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<AW._SIZES.length?2/3*this._currentLength:0),this._elements=[],AW._nullOutEntries(this._elements,this._currentLength)}static _nullOutEntries(e,t){for(let i=0;i<t;i++)e[i]=null}_hash2(e,t){return(e<<5)-e+t|0}_hashFunc(e,t,i){return this._hash2(this._hash2(e,t),i)%this._currentLength}get(e,t,i){const n=this._hashFunc(e,t,i);let o=this._elements[n];for(;o;){if(o.tokenTypeIndex===e&&o.tokenModifierSet===t&&o.languageId===i)return o;o=o.next}return null}add(e,t,i,n){if(this._elementsCount++,0!==this._growCount&&this._elementsCount>=this._growCount){const e=this._elements;this._currentLengthIndex++,this._currentLength=AW._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<AW._SIZES.length?2/3*this._currentLength:0),this._elements=[],AW._nullOutEntries(this._elements,this._currentLength);for(const t of e){let e=t;for(;e;){const t=e.next;e.next=null,this._add(e),e=t}}}this._add(new DW(e,t,i,n))}_add(e){const t=this._hashFunc(e.tokenTypeIndex,e.tokenModifierSet,e.languageId);e.next=this._elements[t],this._elements[t]=e}}function OW(e){const t=new Uint32Array(function(e){let t=0;if(t+=2,"full"===e.type)t+=1+e.data.length;else{t+=1,t+=3*e.deltas.length;for(const i of e.deltas)i.data&&(t+=i.data.length)}return t}(e));let i=0;if(t[i++]=e.id,"full"===e.type)t[i++]=1,t[i++]=e.data.length,t.set(e.data,i),i+=e.data.length;else{t[i++]=2,t[i++]=e.deltas.length;for(const n of e.deltas)t[i++]=n.start,t[i++]=n.deleteCount,n.data?(t[i++]=n.data.length,t.set(n.data,i),i+=n.data.length):t[i++]=0}return function(e){const t=new Uint8Array(e.buffer,e.byteOffset,4*e.length);return qa()||function(e){for(let t=0,i=e.length;t<i;t+=4){const i=e[t+0],n=e[t+1],o=e[t+2],r=e[t+3];e[t+0]=r,e[t+1]=o,e[t+2]=n,e[t+3]=i}}(t),cp.wrap(t)}(t)}AW._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143];var MW=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function RW(e){return e&&!!e.data}function PW(e){return e&&Array.isArray(e.edits)}class FW{constructor(e,t,i){this.provider=e,this.tokens=t,this.error=i}}function BW(e,t){return e.has(t)}function WW(e,t,i,n,o){return MW(this,void 0,void 0,(function*(){const r=function(e,t){const i=e.orderedGroups(t);return i.length>0?i[0]:[]}(e,t),s=yield Promise.all(r.map((e=>MW(this,void 0,void 0,(function*(){let r,s=null;try{r=yield e.provideDocumentSemanticTokens(t,e===i?n:null,o)}catch(e){s=e,r=null}return r&&(RW(r)||PW(r))||(r=null),new FW(e,r,s)})))));for(const e of s){if(e.error)throw e.error;if(e.tokens)return e}return s.length>0?s[0]:null}))}class VW{constructor(e,t){this.provider=e,this.tokens=t}}function zW(e,t){const i=e.orderedGroups(t);return i.length>0?i[0]:[]}function jW(e,t,i,n){return MW(this,void 0,void 0,(function*(){const o=zW(e,t),r=yield Promise.all(o.map((e=>MW(this,void 0,void 0,(function*(){let o;try{o=yield e.provideDocumentRangeSemanticTokens(t,i,n)}catch(e){pc(e),o=null}return o&&RW(o)||(o=null),new VW(e,o)})))));for(const e of r)if(e.tokens)return e;return r.length>0?r[0]:null}))}Eb.registerCommand("_provideDocumentSemanticTokensLegend",((e,...t)=>MW(void 0,void 0,void 0,(function*(){const[i]=t;Ll(i instanceof Bd);const n=e.get(am).getModel(i);if(!n)return;const{documentSemanticTokensProvider:o}=e.get(Hf),r=function(e,t){const i=e.orderedGroups(t);return i.length>0?i[0]:null}(o,n);return r?r[0].getLegend():e.get(Lb).executeCommand("_provideDocumentRangeSemanticTokensLegend",i)})))),Eb.registerCommand("_provideDocumentSemanticTokens",((e,...t)=>MW(void 0,void 0,void 0,(function*(){const[i]=t;Ll(i instanceof Bd);const n=e.get(am).getModel(i);if(!n)return;const{documentSemanticTokensProvider:o}=e.get(Hf);if(!BW(o,n))return e.get(Lb).executeCommand("_provideDocumentRangeSemanticTokens",i,n.getFullModelRange());const r=yield WW(o,n,null,null,Kc.None);if(!r)return;const{provider:s,tokens:a}=r;if(!a||!RW(a))return;const l=OW({id:0,type:"full",data:a.data});return a.resultId&&s.releaseDocumentSemanticTokens(a.resultId),l})))),Eb.registerCommand("_provideDocumentRangeSemanticTokensLegend",((e,...t)=>MW(void 0,void 0,void 0,(function*(){const[i,n]=t;Ll(i instanceof Bd);const o=e.get(am).getModel(i);if(!o)return;const{documentRangeSemanticTokensProvider:r}=e.get(Hf),s=zW(r,o);if(0===s.length)return;if(1===s.length)return s[0].getLegend();if(!n||!Zd.isIRange(n))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),s[0].getLegend();const a=yield jW(r,o,Zd.lift(n),Kc.None);return a?a.provider.getLegend():void 0})))),Eb.registerCommand("_provideDocumentRangeSemanticTokens",((e,...t)=>MW(void 0,void 0,void 0,(function*(){const[i,n]=t;Ll(i instanceof Bd),Ll(Zd.isIRange(n));const o=e.get(am).getModel(i);if(!o)return;const{documentRangeSemanticTokensProvider:r}=e.get(Hf),s=yield jW(r,o,Zd.lift(n),Kc.None);return s&&s.tokens?OW({id:0,type:"full",data:s.tokens.data}):void 0}))));var HW=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},UW=function(e,t){return function(i,n){t(i,n,e)}};function $W(e){return e.toString()}function KW(e){const t=new qm,i=e.createSnapshot();let n;for(;n=i.read();)t.update(n);return t.digest()}class qW{constructor(e,t,i){this._modelEventListeners=new Ec,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 GW=Fa||Pa?1:2;class YW{constructor(e,t,i,n,o,r,s,a){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=i,this.sharesUndoRedoStack=n,this.heapSize=o,this.sha1=r,this.versionId=s,this.alternativeVersionId=a}}let ZW=class e extends Nc{constructor(e,t,i,n,o,r,s,a,l){super(),this._configurationService=e,this._resourcePropertiesService=t,this._themeService=i,this._logService=n,this._undoRedoService=o,this._languageService=r,this._languageConfigurationService=s,this._languageFeatureDebounceService=a,this._onModelAdded=this._register(new Vc),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new Vc),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new Vc),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._semanticStyling=this._register(new eV(this._themeService,this._languageService,this._logService)),this._register(this._configurationService.onDidChangeConfiguration((()=>this._updateModelOptions()))),this._updateModelOptions(),this._register(new QW(this._semanticStyling,this,this._themeService,this._configurationService,this._languageFeatureDebounceService,l))}static _readModelOptions(e,t){var i;let n=Fl.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 r=Fl.insertSpaces;e.editor&&void 0!==e.editor.insertSpaces&&(r="false"!==e.editor.insertSpaces&&Boolean(e.editor.insertSpaces));let s=GW;const a=e.eol;"\r\n"===a?s=2:"\n"===a&&(s=1);let l=Fl.trimAutoWhitespace;e.editor&&void 0!==e.editor.trimAutoWhitespace&&(l="false"!==e.editor.trimAutoWhitespace&&Boolean(e.editor.trimAutoWhitespace));let c=Fl.detectIndentation;e.editor&&void 0!==e.editor.detectIndentation&&(c="false"!==e.editor.detectIndentation&&Boolean(e.editor.detectIndentation));let d=Fl.largeFileOptimizations;e.editor&&void 0!==e.editor.largeFileOptimizations&&(d="false"!==e.editor.largeFileOptimizations&&Boolean(e.editor.largeFileOptimizations));let h=Fl.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:r,detectIndentation:c,defaultEOL:s,trimAutoWhitespace:l,largeFileOptimizations:d,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===Ua||2===Ua?"\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 r=this._configurationService.getValue("editor",{overrideIdentifier:t,resource:i}),s=this._getEOL(i,t);o=e._readModelOptions({editor:r,eol:s},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;n<o;n++){const o=i[n],r=this._models[o],s=r.model.getLanguageId(),a=r.model.uri,l=t[s+a],c=this.getCreationOptions(s,a,r.model.isForSimpleWidget);e._setModelOptionsForModel(r.model,c,l)}}static _setModelOptionsForModel(e,t,i){i&&i.defaultEOL!==t.defaultEOL&&1===e.getLineCount()&&e.setEOL(1===t.defaultEOL?0:1),i&&i.detectIndentation===t.detectIndentation&&i.insertSpaces===t.insertSpaces&&i.tabSize===t.tabSize&&i.indentSize===t.indentSize&&i.trimAutoWhitespace===t.trimAutoWhitespace&&Rl(i.bracketPairColorizationOptions,t.bracketPairColorizationOptions)||(t.detectIndentation?(e.detectIndentation(t.insertSpaces,t.tabSize),e.updateOptions({trimAutoWhitespace:t.trimAutoWhitespace,bracketColorizationOptions:t.bracketPairColorizationOptions})):e.updateOptions({insertSpaces:t.insertSpaces,tabSize:t.tabSize,indentSize:t.indentSize,trimAutoWhitespace:t.trimAutoWhitespace,bracketColorizationOptions:t.bracketPairColorizationOptions}))}_insertDisposedModel(e){this._disposedModels.set($W(e.uri),e),this._disposedModelsHeapSize+=e.heapSize}_removeDisposedModel(e){const t=this._disposedModels.get($W(e));return t&&(this._disposedModelsHeapSize-=t.heapSize),this._disposedModels.delete($W(e)),t}_ensureDisposedModelsHeapSize(e){if(this._disposedModelsHeapSize>e){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),r=new dO(e,t,o,i,this._undoRedoService,this._languageService,this._languageConfigurationService);if(i&&this._disposedModels.has($W(i))){const e=this._removeDisposedModel(i),t=this._undoRedoService.getElements(i),n=KW(r)===e.sha1;if(n||e.sharesUndoRedoStack){for(const e of t.past)$D(e)&&e.matchesResource(i)&&e.setModel(r);for(const e of t.future)$D(e)&&e.matchesResource(i)&&e.setModel(r);this._undoRedoService.setElementsValidFlag(i,!0,(e=>$D(e)&&e.matchesResource(i))),n&&(r._overwriteVersionId(e.versionId),r._overwriteAlternativeVersionId(e.alternativeVersionId),r._overwriteInitialUndoRedoSnapshot(e.initialUndoRedoSnapshot))}else null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}const s=$W(r.uri);if(this._models[s])throw new Error("ModelService: Cannot add model because it already exists!");const a=new qW(r,(e=>this._onWillDispose(e)),((e,t)=>this._onDidChangeLanguage(e,t)));return this._models[s]=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,gT,i,n),this._onModelAdded.fire(o.model),o.model}setMode(e,t){if(!t)return;const i=this._models[$W(e.uri)];i&&i.setLanguage(t)}getModels(){const e=[],t=Object.keys(this._models);for(let i=0,n=t.length;i<n;i++){const n=t[i];e.push(this._models[n].model)}return e}getModel(e){const t=$W(e),i=this._models[t];return i?i.model:null}getSemanticTokensProviderStyling(e){return this._semanticStyling.get(e)}_schemaShouldMaintainUndoRedoElements(e){return e.scheme===av.file||e.scheme===av.vscodeRemote||e.scheme===av.userData||e.scheme===av.vscodeNotebookCell||"fake-fs"===e.scheme}_onWillDispose(t){const i=$W(t.uri),n=this._models[i],o=this._undoRedoService.getUriComparisonKey(t.uri)!==t.uri.toString();let r=!1,s=0;if(o||this._shouldRestoreUndoStack()&&this._schemaShouldMaintainUndoRedoElements(t.uri)){const e=this._undoRedoService.getElements(t.uri);if(e.past.length>0||e.future.length>0){for(const i of e.past)$D(i)&&i.matchesResource(t.uri)&&(r=!0,s+=i.heapSize(t.uri),i.setModel(t.uri));for(const i of e.future)$D(i)&&i.matchesResource(t.uri)&&(r=!0,s+=i.heapSize(t.uri),i.setModel(t.uri))}}const a=e.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;if(r)if(!o&&s>a){const e=n.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}else this._ensureDisposedModelsHeapSize(a-s),this._undoRedoService.setElementsValidFlag(t.uri,!1,(e=>$D(e)&&e.matchesResource(t.uri))),this._insertDisposedModel(new YW(t.uri,n.model.getInitialUndoRedoSnapshot(),Date.now(),o,s,KW(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(),r=this.getCreationOptions(n,t.uri,t.isForSimpleWidget),s=this.getCreationOptions(o,t.uri,t.isForSimpleWidget);e._setModelOptionsForModel(t,s,r),this._onModelModeChanged.fire({model:t,oldLanguageId:n})}};ZW.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20971520,ZW=HW([UW(0,Fp),UW(1,Pf),UW(2,ow),UW(3,Ff),UW(4,tO),UW(5,Hp),UW(6,Zp),UW(7,CP),UW(8,Hf)],ZW);const XW="editor.semanticHighlighting";function JW(e,t,i){var n;const o=null===(n=i.getValue(XW,{overrideIdentifier:e.getLanguageId(),resource:e.uri}))||void 0===n?void 0:n.enabled;return"boolean"==typeof o?o:t.getColorTheme().semanticHighlighting}let QW=class extends Nc{constructor(e,t,i,n,o,r){super(),this._watchers=Object.create(null),this._semanticStyling=e;const s=e=>{this._watchers[e.uri.toString()]=new iV(e,this._semanticStyling,i,o,r)},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()];JW(e,i,n)?t||s(e):t&&a(e,t)}};this._register(t.onModelAdded((e=>{JW(e,i,n)&&s(e)}))),this._register(t.onModelRemoved((e=>{const t=this._watchers[e.uri.toString()];t&&a(e,t)}))),this._register(n.onDidChangeConfiguration((e=>{e.affectsConfiguration(XW)&&l()}))),this._register(i.onDidColorThemeChange(l))}};QW=HW([UW(1,am),UW(2,ow),UW(3,Fp),UW(4,CP),UW(5,Hf)],QW);class eV extends Nc{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 TW(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}}class tV{constructor(e,t,i){this.provider=e,this.resultId=t,this.data=i}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}let iV=class e extends Nc{constructor(t,i,n,o,r){super(),this._isDisposed=!1,this._model=t,this._semanticStyling=i,this._provider=r.documentSemanticTokensProvider,this._debounceInformation=o.for(this._provider,"DocumentSemanticTokens",{min:e.REQUEST_MIN_DELAY,max:e.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new bm((()=>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 s=()=>{kc(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))))};s(),this._register(this._provider.onDidChange((()=>{s(),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(!BW(this._provider,this._model))return void(this._currentDocumentResponse&&this._model.setSemanticTokens(null,!1));const e=new Gc,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,i=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,n=WW(this._provider,this._model,t,i,e.token);this._currentDocumentRequestCancellationTokenSource=e;const o=[],r=this._model.onDidChangeContent((e=>{o.push(e)})),s=new Rc(!1);n.then((e=>{if(this._debounceInformation.update(this._model,s.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,r.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&&(_c(e)||"string"==typeof e.message&&-1!==e.message.indexOf("busy"))||gc(e),this._currentDocumentRequestCancellationTokenSource=null,r.dispose(),o.length>0&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))}))}static _copy(e,t,i,n,o){for(let r=0;r<o;r++)i[n+r]=e[t+r]}_setDocumentSemanticTokens(t,i,n,o){const r=this._currentDocumentResponse,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 s();if(PW(i)){if(!r)return void this._model.setSemanticTokens(null,!0);if(0===i.edits.length)i={resultId:i.resultId,data:r.data};else{let t=0;for(const e of i.edits)t+=(e.data?e.data.length:0)-e.deleteCount;const n=r.data,o=new Uint32Array(n.length+t);let s=n.length,a=o.length;for(let t=i.edits.length-1;t>=0;t--){const r=i.edits[t],l=s-(r.start+r.deleteCount);l>0&&(e._copy(n,s-l,o,a-l,l),a-=l),r.data&&(e._copy(r.data,0,o,a-r.data.length,r.data.length),a-=r.data.length),s=r.start}s>0&&e._copy(n,0,o,0,s),i={resultId:i.resultId,data:o}}}if(RW(i)){this._currentDocumentResponse=new tV(t,i.resultId,i.data);const e=function(e,t,i){const n=e.data,o=e.data.length/5|0,r=Math.max(Math.ceil(o/1024),400),s=[];let a=0,l=1,c=0;for(;a<o;){const e=a;let d=Math.min(e+r,o);if(d<o){let t=d;for(;t-1>e&&0===n[5*t];)t--;if(t-1===e){let e=d;for(;e+1<o&&0===n[5*e];)e++;d=e}else d=t}let h=new Uint32Array(4*(d-e)),u=0,g=0,p=0,m=0,f=0;for(;a<d;){const e=5*a,o=n[e],r=n[e+1],s=l+o|0,d=0===o?c+r|0:r,_=n[e+2],v=n[e+3],b=n[e+4],w=t.getMetadata(v,b,i);2147483647!==w&&(0===g&&(g=s),p===s&&f>d&&(t.warnOverlappingSemanticTokens(s,d+1),m<d?h[u-4+2]=d:u-=4),h[u]=s-g,h[u+1]=d,h[u+2]=d+_,h[u+3]=w,u+=4,p=s,m=d,f=d+_),l=s,c=d,a++}u!==h.length&&(h=h.subarray(0,u));const _=LW.create(g,h);s.push(_)}return s}(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);s()}else this._model.setSemanticTokens(null,!1)}};iV.REQUEST_MIN_DELAY=300,iV.REQUEST_MAX_DELAY=2e3,iV=HW([UW(2,ow),UW(3,CP),UW(4,Hf)],iV);var nV=i(3198),oV={};oV.styleTagTransform=uu(),oV.setAttributes=lu(),oV.insert=su().bind(null,"head"),oV.domAPI=ou(),oV.insertStyleElement=du(),iu()(nV.Z,oV),nV.Z&&nV.Z.locals&&nV.Z.locals;const rV=new RegExp(`(\\\\)?\\$\\((${Jd.iconNameExpression}(?:${Jd.iconModifierExpression})?)\\)`,"g");function sV(e){const t=new Array;let i,n=0,o=0;for(;null!==(i=rV.exec(e));){o=i.index||0,t.push(e.substring(n,o)),n=(i.index||0)+i[0].length;const[,r,s]=i;t.push(r?`$(${s})`:aV({id:s}))}return n<e.length&&t.push(e.substring(n)),t}function aV(e){const t=tb("span");return t.classList.add(...Jd.asClassNameArray(e)),t}var lV=i(2013),cV={};cV.styleTagTransform=uu(),cV.setAttributes=lu(),cV.insert=su().bind(null,"head"),cV.domAPI=ou(),cV.insertStyleElement=du(),iu()(lV.Z,cV),lV.Z&&lV.Z.locals&&lV.Z.locals;const dV={buttonBackground:dy.fromHex("#0E639C"),buttonHoverBackground:dy.fromHex("#006BB3"),buttonForeground:dy.white};class hV extends Nc{constructor(e,t){super(),this._onDidClick=this._register(new Vc),this.options=t||Object.create(null),Ml(this.options,dV,!1),this.buttonForeground=this.options.buttonForeground,this.buttonBackground=this.options.buttonBackground,this.buttonHoverBackground=this.options.buttonHoverBackground,this.buttonSecondaryForeground=this.options.buttonSecondaryForeground,this.buttonSecondaryBackground=this.options.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=this.options.buttonSecondaryHoverBackground,this.buttonBorder=this.options.buttonBorder,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),e.appendChild(this._element),this._register(ny.addTarget(this._element)),[Kv.CLICK,iy.Tap].forEach((e=>{this._register(pv(this._element,e,(e=>{this.enabled?this._onDidClick.fire(e):qv(e)})))})),this._register(pv(this._element,Kv.KEY_DOWN,(e=>{const t=new ev(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&&qv(t,!0)}))),this._register(pv(this._element,Kv.MOUSE_OVER,(e=>{this._element.classList.contains("disabled")||this.setHoverBackground()}))),this._register(pv(this._element,Kv.MOUSE_OUT,(e=>{this.applyStyles()}))),this.focusTracker=this._register(Yv(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?Xv(this._element,...sV(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")}}var uV=i(477),gV={};gV.styleTagTransform=uu(),gV.setAttributes=lu(),gV.insert=su().bind(null,"head"),gV.domAPI=ou(),gV.insertStyleElement=du(),iu()(uV.Z,gV),uV.Z&&uV.Z.locals&&uV.Z.locals;const pV={badgeBackground:dy.fromHex("#4D4D4D"),badgeForeground:dy.fromHex("#FFFFFF")};class mV{constructor(e,t){this.count=0,this.options=t||Object.create(null),Ml(this.options,pV,!1),this.badgeBackground=this.options.badgeBackground,this.badgeForeground=this.options.badgeForeground,this.badgeBorder=this.options.badgeBorder,this.element=Zv(e,tb(".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=_u(this.countFormat,this.count),this.element.title=_u(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}}}var fV=i(4185),_V={};_V.styleTagTransform=uu(),_V.setAttributes=lu(),_V.insert=su().bind(null,"head"),_V.domAPI=ou(),_V.insertStyleElement=du(),iu()(fV.Z,_V),fV.Z&&fV.Z.locals&&fV.Z.locals;const vV="done",bV="active",wV="infinite",yV="infinite-long-running",CV="discrete",SV={progressBarBackground:dy.fromHex("#0E70C0")};class kV extends Nc{constructor(e,t){super(),this.options=t||Object.create(null),Ml(this.options,SV,!1),this.workedVal=0,this.progressBarBackground=this.options.progressBarBackground,this.showDelayedScheduler=this._register(new bm((()=>ib(this.element)),0)),this.longRunningScheduler=this._register(new bm((()=>this.infiniteLongRunning()),kV.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(bV,wV,yV,CV),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel()}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(vV),this.element.classList.contains(wV)?(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(CV,vV,yV),this.element.classList.add(bV,wV),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(yV)}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}}}kV.LONG_RUNNING_INFINITE_THRESHOLD=1e4;class xV{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}new xV("id#");var LV=i(3257),EV={};EV.styleTagTransform=uu(),EV.setAttributes=lu(),EV.insert=su().bind(null,"head"),EV.domAPI=ou(),EV.insertStyleElement=du(),iu()(LV.Z,EV),LV.Z&&LV.Z.locals&&LV.Z.locals;const NV={},IV=new xV("quick-input-button-icon-");function TV(e){if(!e)return;let t;const i=e.dark.toString();return NV[i]?t=NV[i]:(t=IV.nextId(),Uv(`.${t}`,`background-image: ${sb(e.light||e.dark)}`),Uv(`.vs-dark .${t}, .hc-black .${t}`,`background-image: ${sb(e.dark)}`),NV[i]=t),t}const DV={ctrlCmd:!1,alt:!1};var AV,OV;function MV(e,t={}){const i=RV(t);return FV(i,function(e,t){const i={type:1,children:[]};let n=0,o=i;const r=[],s=new PV(e);for(;!s.eos();){let e=s.next();const i="\\"===e&&0!==BV(s.peek(),t);if(i&&(e=s.next()),i||0===BV(e,t)||e!==s.peek())if("\n"===e)2===o.type&&(o=r.pop()),o.children.push({type:8});else if(2!==o.type){const t={type:2,content:e};o.children.push(t),r.push(o),o=t}else o.content+=e;else{s.advance(),2===o.type&&(o=r.pop());const i=BV(e,t);if(o.type===i||5===o.type&&6===i)o=r.pop();else{const e={type:i,children:[]};5===i&&(e.index=n,n++),o.children.push(e),r.push(o),o=e}}}return 2===o.type&&(o=r.pop()),r.length,i}(e,!!t.renderCodeSegments),t.actionHandler,t.renderCodeSegments),i}function RV(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"}(AV||(AV={})),function(e){e[e.NONE=0]="NONE",e[e.FIRST=1]="FIRST",e[e.SECOND=2]="SECOND",e[e.LAST=3]="LAST"}(OV||(OV={})),new class{constructor(e){this.options=e}};class PV{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 FV(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(mv(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=>{FV(o,e,i,n)}))}function BV(e,t){switch(e){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return t?7:0;default:return 0}}var WV=i(1188),VV={};VV.styleTagTransform=uu(),VV.setAttributes=lu(),VV.insert=su().bind(null,"head"),VV.domAPI=ou(),VV.insertStyleElement=du(),iu()(WV.Z,VV),WV.Z&&WV.Z.locals&&WV.Z.locals;const zV=tb,jV={inputBackground:dy.fromHex("#3C3C3C"),inputForeground:dy.fromHex("#CCCCCC"),inputValidationInfoBorder:dy.fromHex("#55AAFF"),inputValidationInfoBackground:dy.fromHex("#063B49"),inputValidationWarningBorder:dy.fromHex("#B89500"),inputValidationWarningBackground:dy.fromHex("#352A05"),inputValidationErrorBorder:dy.fromHex("#BE1100"),inputValidationErrorBackground:dy.fromHex("#5A1D1D")};class HV extends _E{constructor(e,t,i){var n;super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new Vc),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new Vc),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=i||Object.create(null),Ml(this.options,jV,!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=Zv(e,zV(".monaco-inputbox.idle"));let o=this.options.flexibleHeight?"textarea":"input",r=Zv(this.element,zV(".ibwrapper"));if(this.input=Zv(r,zV(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=Zv(r,zV("div.mirror")),this.mirror.innerText=" ",this.scrollableElement=new ME(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),Zv(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll((e=>this.input.scrollTop=e.scrollTop)));const t=this._register(new xM(document,"selectionchange")),i=Pc.filter(t.event,(()=>{const e=document.getSelection();return(null==e?void 0:e.anchorNode)===r}));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 YM(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:Mv(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 Dv(this.input)}set width(e){if(this.options.flexibleHeight&&this.options.flexibleWidth){let t=0;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=Dv(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:t=>{if(!this.message)return null;e=Zv(t,zV(".monaco-inputbox-container")),i();const n={inline:!0,className:"monaco-inputbox-message"},o=this.message.formatContent?MV(this.message.content,n):function(e,t={}){const i=RV(t);return i.textContent=e,i}(this.message.content,n);o.classList.add(this.classForType(this.message.type));const r=this.stylesForType(this.message.type);return o.style.backgroundColor=r.background?r.background.toString():"",o.style.color=r.foreground?r.foreground.toString():"",o.style.border=r.border?`1px solid ${r.border}`:"",Zv(e,o),null},onHide:()=>{this.state="closed"},layout:i}),t=3===this.message.type?ma(0,"Error: {0}",this.message.content):2===this.message.type?ma(0,"Warning: {0}",this.message.content):ma(0,"Info: {0}",this.message.content),fb(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=Mv(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()}}const UV=tb;class $V extends Nc{constructor(e){super(),this.parent=e,this.onKeyDown=e=>pv(this.inputBox.inputElement,Kv.KEY_DOWN,(t=>{e(new ev(t))})),this.onMouseDown=e=>pv(this.inputBox.inputElement,Kv.MOUSE_DOWN,(t=>{e(new rv(t))})),this.onDidChange=e=>this.inputBox.onDidChange(e),this.container=Zv(this.parent,UV(".quick-input-box")),this.inputBox=this._register(new HV(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===zO.Ignore?this.inputBox.hideMessage():this.inputBox.showMessage({type:e===zO.Info?1:e===zO.Warning?2:3,content:""})}stylesForType(e){return this.inputBox.stylesForType(e===zO.Info?1:e===zO.Warning?2:3)}setFocus(){this.inputBox.focus()}layout(){this.inputBox.layout()}style(e){this.inputBox.style(e)}}class KV{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=Zv(e,tb("span.monaco-highlighted-label"))}get element(){return this.domNode}set(e,t=[],i="",n){e||(e=""),n&&(e=KV.escapeNewLines(e,t)),this.didEverRender&&this.text===e&&this.title===i&&Rl(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<i.start){const n=this.text.substring(t,i.start);e.push(tb("span",void 0,...this.supportIcons?sV(n):[n])),t=i.end}const n=this.text.substring(i.start,i.end),o=tb("span.highlight",void 0,...this.supportIcons?sV(n):[n]);i.extraClasses&&o.classList.add(...i.extraClasses),e.push(o),t=i.end}if(t<this.text.length){const i=this.text.substring(t);e.push(tb("span",void 0,...this.supportIcons?sV(i):[i]))}Xv(this.domNode,...e),this.title?this.domNode.title=this.title:this.domNode.removeAttribute("title"),this.didEverRender=!0}static escapeNewLines(e,t){let i=0,n=0;return e.replace(/\r\n|\r|\n/g,((e,o)=>{n="\r\n"===e?-1:0,o+=i;for(const e of t)e.end<=o||(e.start>=o&&(e.start+=n),e.end>=o&&(e.end+=n));return i+=n,"⏎"}))}}var qV=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class GV{constructor(e,t,i){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=i}update(e,t){var i;return qV(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||vl(e)||e instanceof HTMLElement)n=e;else if(El(e.markdown)){this._hoverWidget||this.show(ma(0,"Loading..."),t),this._cancellationTokenSource=new Gc;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&&(!((t=e)instanceof class{constructor(e="",t=!1){var i,n,o;if(this.value=e,"string"!=typeof this.value)throw bc("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){var i;return this.value+=function(e){return e.replace(/[\\`*_{}[\]()#+\-!]/g,"\\$&")}(this.supportThemeIcons?(i=e,i.replace(WB,((e,t)=>t?e:`\\${e}`))):e).replace(/([ \t]+)/g,((e,t)=>"&nbsp;".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}}||t&&"object"==typeof t&&!("string"!=typeof t.value||"boolean"!=typeof t.isTrusted&&void 0!==t.isTrusted||"boolean"!=typeof t.supportThemeIcons&&void 0!==t.supportThemeIcons))||!!e.value);var t}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}}var YV=i(4269),ZV={};ZV.styleTagTransform=uu(),ZV.setAttributes=lu(),ZV.insert=su().bind(null,"head"),ZV.domAPI=ou(),ZV.insertStyleElement=du(),iu()(YV.Z,ZV),YV.Z&&YV.Z.locals&&YV.Z.locals;class XV{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 JV extends Nc{constructor(e,t){super(),this.customHovers=new Map,this.domNode=this._register(new XV(Zv(e,tb(".monaco-icon-label")))),this.labelContainer=Zv(this.domNode.element,tb(".monaco-icon-label-container"));const i=Zv(this.labelContainer,tb("span.monaco-icon-name-container"));this.descriptionContainer=this._register(new XV(Zv(this.labelContainer,tb("span.monaco-icon-description-container")))),(null==t?void 0:t.supportHighlights)||(null==t?void 0:t.supportIcons)?this.nameNode=new ez(i,!!t.supportIcons):this.nameNode=new QV(i),(null==t?void 0:t.supportDescriptionHighlights)?this.descriptionNodeFactory=()=>new KV(Zv(this.descriptionContainer.element,tb("span.label-description")),{supportIcons:!!t.supportIcons}):this.descriptionNodeFactory=()=>this._register(new XV(Zv(this.descriptionContainer.element,tb("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 KV?(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 r=(t,i)=>{var r;t&&(null==o||o.dispose(),o=void 0),i&&(null==n||n.dispose(),n=void 0),null===(r=e.onDidHideHover)||void 0===r||r.call(e)},s=(n,r,s)=>new _m((()=>qV(this,void 0,void 0,(function*(){o&&!o.isDisposed||(o=new GV(e,s||t,n>0),yield o.update(i,r))}))),n),a=pv(t,Kv.MOUSE_OVER,(()=>{if(n)return;const i=new Ec;i.add(pv(t,Kv.MOUSE_LEAVE,(e=>r(!1,e.fromElement===t)),!0)),i.add(pv(t,Kv.MOUSE_DOWN,(()=>r(!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(pv(t,Kv.MOUSE_MOVE,e,!0))}i.add(s(e.delay,!1,o)),n=i}),!0);return{show:e=>{r(!1,!0),s(0,e)},hide:()=>{r(!0,!0)},update:e=>qV(this,void 0,void 0,(function*(){i=e,yield null==o?void 0:o.update(i)})),dispose:()=>{a.dispose(),r(!0,!0)}}}(this.hoverDelegate,e,t);i&&this.customHovers.set(e,i)}else!function(e,t){vl(t)?e.title=zB(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 QV{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(this.label!==e||!Rl(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=Zv(this.container,tb("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<e.length;i++){const n=e[i],o=(null==t?void 0:t.domId)&&`${null==t?void 0:t.domId}_${i}`;Zv(this.container,tb("a.label-name",{id:o,"data-icon-label-count":e.length,"data-icon-label-index":i,role:"treeitem"},n)),i<e.length-1&&Zv(this.container,tb("span.label-separator",void 0,(null==t?void 0:t.separator)||"/"))}}}}class ez{constructor(e,t){this.container=e,this.supportIcons=t,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(this.label!==e||!Rl(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=new KV(Zv(this.container,tb("a.label-name",{id:null==t?void 0:t.domId})),{supportIcons:this.supportIcons})),this.singleLabel.set(e,null==t?void 0:t.matches,void 0,null==t?void 0:t.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const i=(null==t?void 0:t.separator)||"/",n=function(e,t,i){if(!i)return;let n=0;return e.map((e=>{const o={start:n,end:n+e.length},r=i.map((e=>pF.intersect(o,e))).filter((e=>!pF.isEmpty(e))).map((({start:e,end:t})=>({start:e-n,end:t-n})));return n=o.end+t.length,r}))}(e,i,null==t?void 0:t.matches);for(let o=0;o<e.length;o++){const r=e[o],s=n?n[o]:void 0,a=tb("a.label-name",{id:(null==t?void 0:t.domId)&&`${null==t?void 0:t.domId}_${o}`,"data-icon-label-count":e.length,"data-icon-label-index":o,role:"treeitem"});new KV(Zv(this.container,a),{supportIcons:this.supportIcons}).set(r,s,void 0,null==t?void 0:t.labelEscapeNewLines),o<e.length-1&&Zv(a,tb("span.label-separator",void 0,i))}}}}var tz=i(2298),iz={};iz.styleTagTransform=uu(),iz.setAttributes=lu(),iz.insert=su().bind(null,"head"),iz.domAPI=ou(),iz.insertStyleElement=du(),iu()(tz.Z,iz),tz.Z&&tz.Z.locals&&tz.Z.locals;const nz=tb;class oz{constructor(e,t,i){this.os=t,this.keyElements=new Set,this.options=i||Object.create(null),this.labelBackground=this.options.keybindingLabelBackground,this.labelForeground=this.options.keybindingLabelForeground,this.labelBorder=this.options.keybindingLabelBorder,this.labelBottomBorder=this.options.keybindingLabelBottomBorder,this.labelShadow=this.options.keybindingLabelShadow,this.domNode=Zv(e,nz(".monaco-keybinding")),this.didEverRender=!1,e.appendChild(this.domNode)}get element(){return this.domNode}set(e,t){this.didEverRender&&this.keybinding===e&&oz.areSame(this.matches,t)||(this.keybinding=e,this.matches=t,this.render())}render(){if(this.clear(),this.keybinding){let[e,t]=this.keybinding.getParts();e&&this.renderPart(this.domNode,e,this.matches?this.matches.firstPart:null),t&&(Zv(this.domNode,nz("span.monaco-keybinding-key-chord-separator",void 0," ")),this.renderPart(this.domNode,t,this.matches?this.matches.chordPart:null)),this.domNode.title=this.keybinding.getAriaLabel()||""}else this.options&&this.options.renderUnboundKeybindings&&this.renderUnbound(this.domNode);this.applyStyles(),this.didEverRender=!0}clear(){hv(this.domNode),this.keyElements.clear()}renderPart(e,t,i){const n=ZP.modifierLabels[this.os];t.ctrlKey&&this.renderKey(e,n.ctrlKey,Boolean(null==i?void 0:i.ctrlKey),n.separator),t.shiftKey&&this.renderKey(e,n.shiftKey,Boolean(null==i?void 0:i.shiftKey),n.separator),t.altKey&&this.renderKey(e,n.altKey,Boolean(null==i?void 0:i.altKey),n.separator),t.metaKey&&this.renderKey(e,n.metaKey,Boolean(null==i?void 0:i.metaKey),n.separator);const o=t.keyLabel;o&&this.renderKey(e,o,Boolean(null==i?void 0:i.keyCode),"")}renderKey(e,t,i,n){Zv(e,this.createKeyElement(t,i?".highlight":"")),n&&Zv(e,nz("span.monaco-keybinding-key-separator",void 0,n))}renderUnbound(e){Zv(e,this.createKeyElement(ma(0,"Unbound")))}createKeyElement(e,t=""){const i=nz("span.monaco-keybinding-key"+t,void 0,e);return this.keyElements.add(i),i}style(e){this.labelBackground=e.keybindingLabelBackground,this.labelForeground=e.keybindingLabelForeground,this.labelBorder=e.keybindingLabelBorder,this.labelBottomBorder=e.keybindingLabelBottomBorder,this.labelShadow=e.keybindingLabelShadow,this.applyStyles()}applyStyles(){var e;if(this.element){for(const t of this.keyElements)this.labelBackground&&(t.style.backgroundColor=null===(e=this.labelBackground)||void 0===e?void 0:e.toString()),this.labelBorder&&(t.style.borderColor=this.labelBorder.toString()),this.labelBottomBorder&&(t.style.borderBottomColor=this.labelBottomBorder.toString()),this.labelShadow&&(t.style.boxShadow=`inset 0 -1px 0 ${this.labelShadow}`);this.labelForeground&&(this.element.style.color=this.labelForeground.toString())}}static areSame(e,t){return e===t||!e&&!t||!!e&&!!t&&Rl(e.firstPart,t.firstPart)&&Rl(e.chordPart,t.chordPart)}}const rz=new ym((()=>{const e=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:e,collatorIsNumeric:e.resolvedOptions().numeric}}));new ym((()=>({collator:new Intl.Collator(void 0,{numeric:!0})}))),new ym((()=>({collator:new Intl.Collator(void 0,{numeric:!0,sensitivity:"accent"})})));var sz=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const az=tb;class lz{constructor(e){this.hidden=!1,this._onChecked=new Vc,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 cz{get templateId(){return cz.ID}renderTemplate(e){const t=Object.create(null);t.toDisposeElement=[],t.toDisposeTemplate=[],t.entry=Zv(e,az(".quick-input-list-entry"));const i=Zv(t.entry,az("label.quick-input-list-label"));t.toDisposeTemplate.push(mv(i,Kv.CLICK,(e=>{t.checkbox.offsetParent||e.preventDefault()}))),t.checkbox=Zv(i,az("input.quick-input-list-checkbox")),t.checkbox.type="checkbox",t.toDisposeTemplate.push(mv(t.checkbox,Kv.CHANGE,(e=>{t.element.checked=t.checkbox.checked})));const n=Zv(i,az(".quick-input-list-rows")),o=Zv(n,az(".quick-input-list-row")),r=Zv(n,az(".quick-input-list-row"));t.label=new JV(o,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0});const s=Zv(o,az(".quick-input-list-entry-keybinding"));t.keybinding=new oz(s,Ua);const a=Zv(r,az(".quick-input-list-label-meta"));return t.detail=new JV(a,{supportHighlights:!0,supportIcons:!0}),t.separator=Zv(t.entry,az(".quick-input-list-separator")),t.actionBar=new YM(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=kc(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:r}=e,s=Object.create(null);s.matches=n||[],s.descriptionTitle=e.saneDescription,s.descriptionMatches=o||[],s.extraClasses=e.item.iconClasses,s.italic=e.item.italic,s.strikethrough=e.item.strikethrough,i.label.setLabel(e.saneLabel,e.saneDescription,s),i.keybinding.set(e.item.keybinding),e.saneDetail&&i.detail.setLabel(e.saneDetail,void 0,{matches:r,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?TV(t.iconPath):void 0);t.alwaysVisible&&(n=n?`${n} always-visible`:"always-visible");const o=new yb(`id-${i}`,"",n,!0,(()=>{return i=this,n=void 0,r=function*(){e.fireButtonTriggered({button:t,item:e.item})},new((o=void 0)||(o=Promise))((function(e,t){function s(e){try{l(r.next(e))}catch(e){t(e)}}function a(e){try{l(r.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof o?i:new o((function(e){e(i)}))).then(s,a)}l((r=r.apply(i,n||[])).next())}));var i,n,o,r}));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=kc(i.toDisposeElement)}disposeTemplate(e){e.toDisposeElement=kc(e.toDisposeElement),e.toDisposeTemplate=kc(e.toDisposeTemplate)}}cz.ID="listelement";class dz{getHeight(e){return e.saneDetail?44:22}getTemplateId(e){return cz.ID}}var hz;!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"}(hz||(hz={}));class uz{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 Vc,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new Vc,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new Vc,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new Vc,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new Vc,this.onButtonTriggered=this._onButtonTriggered.event,this._onKeyDown=new Vc,this.onKeyDown=this._onKeyDown.event,this._onLeave=new Vc,this.onLeave=this._onLeave.event,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=t,this.container=Zv(this.parent,az(".quick-input-list"));const n=new dz,o=new gz;this.list=i.createList("QuickInput",this.container,n,[new cz],{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 ev(e);switch(t.keyCode){case 10:this.toggleCheckbox();break;case 31:(Pa?e.metaKey:e.ctrlKey)&&this.list.setFocus(dl(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(pv(this.container,Kv.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 Pc.map(this.list.onDidChangeFocus,(e=>e.elements.map((e=>e.item))))}get onDidChangeSelection(){return Pc.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<n;i++){const n=e[i];if(!n.hidden){if(!n.checked)return!1;t=!0}}return t}getCheckedCount(){let e=0;const t=this.elements;for(let i=0,n=t.length;i<n;i++)t[i].checked&&e++;return e}getVisibleCount(){let e=0;const t=this.elements;for(let i=0,n=t.length;i<n;i++)t[i].hidden||e++;return e}setAllVisibleChecked(e){try{this._fireCheckedEvents=!1,this.elements.forEach((t=>{t.hidden||(t.checked=e)}))}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(e){this.elementDisposables=kc(this.elementDisposables);const t=e=>this.fireButtonTriggered(e);this.inputElements=e,this.elements=e.reduce(((i,n,o)=>{var r,s,a;if("separator"!==n.type){const l=o&&e[o-1],c=n.label&&n.label.replace(/\r?\n/g," "),d=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||[c,h,u].map((e=>{return(t=e)?t.replace(/\$\((.*?)\)/g,((e,t)=>` ${t} `)).trim():"";var t})).filter((e=>!!e)).join(", "),p=this.parent.classList.contains("show-checkboxes");i.push(new lz({hasCheckbox:p,index:o,item:n,saneLabel:c,saneMeta:d,saneAriaLabel:g,saneDescription:h,saneDetail:u,labelHighlights:null===(r=n.highlights)||void 0===r?void 0:r.label,descriptionHighlights:null===(s=n.highlights)||void 0===s?void 0:s.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===hz.Next&&this.list.getFocus()[0]===this.list.length-1&&(e=hz.First),e===hz.Previous&&0===this.list.getFocus()[0]&&(e=hz.Last),e===hz.Second&&this.list.length<2&&(e=hz.First),e){case hz.First:this.list.focusFirst();break;case hz.Second:this.list.focusNth(1);break;case hz.Last:this.list.focusLast();break;case hz.Next:this.list.focusNext();break;case hz.Previous:this.list.focusPrevious();break;case hz.NextPage:this.list.focusNextPage();break;case hz.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?Tl(HB(e,jB(i.saneLabel))):void 0,o=this.matchOnDescription?Tl(HB(e,jB(i.saneDescription||""))):void 0,r=this.matchOnDetail?Tl(HB(e,jB(i.saneDetail||""))):void 0,s=this.matchOnMeta?Tl(HB(e,jB(i.saneMeta||""))):void 0;if(n||o||r||s?(i.labelHighlights=n,i.descriptionHighlights=o,i.detailHighlights=r,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||[];return n.length&&!o.length?-1:!n.length&&o.length?1:0===n.length&&0===o.length?0:function(e,t,i){const n=e.toLowerCase(),o=t.toLowerCase(),r=function(e,t,i){const n=e.toLowerCase(),o=t.toLowerCase(),r=n.startsWith(i),s=o.startsWith(i);if(r!==s)return r?-1:1;if(r&&s){if(n.length<o.length)return-1;if(n.length>o.length)return 1}return 0}(e,t,i);if(r)return r;const s=n.endsWith(i);if(s!==o.endsWith(i))return s?-1:1;const a=function(e,t,i=!1){const n=e||"",o=t||"",r=rz.value.collator.compare(n,o);return rz.value.collatorIsNumeric&&0===r&&n!==o?n<o?-1:1:r}(n,o);return 0!==a?a:n.localeCompare(o)}(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=kc(this.elementDisposables),this.disposables=kc(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)}}sz([ty],uz.prototype,"onDidChangeFocus",null),sz([ty],uz.prototype,"onDidChangeSelection",null);class gz{getWidgetAriaLabel(){return ma(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 pz=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const mz=tb,fz={iconClass:lh.quickInputBack.classNames,tooltip:ma(0,"Back"),handle:-1};class _z extends Nc{constructor(e){super(),this.ui=e,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.noValidationMessage=_z.noPromptMessage,this._severity=zO.Ignore,this.buttonsUpdated=!1,this.onDidTriggerButtonEmitter=this._register(new Vc),this.onDidHideEmitter=this._register(new Vc),this.onDisposeEmitter=this._register(new Vc),this.visibleDisposables=this._register(new Ec),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&&!za;this._ignoreFocusOut=e&&!za,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=AV.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||"&nbsp;"===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 _m,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===fz));this.ui.leftActionBar.push(e.map(((e,t)=>{const i=new yb(`id-${t}`,"",e.iconClass||TV(e.iconPath),!0,(()=>pz(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!==fz));this.ui.rightActionBar.push(t.map(((e,t)=>{const i=new yb(`id-${t}`,"",e.iconClass||TV(e.iconPath),!0,(()=>pz(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,Xv(this.ui.message,...sV(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?ma(0,"{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==zO.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()}}_z.noPromptMessage=ma(0,"Press 'Enter' to confirm your input or 'Escape' to cancel");class vz extends _z{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new Vc),this.onWillAcceptEmitter=this._register(new Vc),this.onDidAcceptEmitter=this._register(new Vc),this.onDidCustomEmitter=this._register(new Vc),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()?OV.NONE:OV.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new Vc),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new Vc),this.onDidTriggerItemButtonEmitter=this._register(new Vc),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){this._value!==e&&(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?DV: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(hz.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(hz.Next),this.canSelectMany&&this.ui.list.domFocus(),qv(e,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(hz.Previous):this.ui.list.focus(hz.Last),this.canSelectMany&&this.ui.list.domFocus(),qv(e,!0);break;case 12:this.ui.list.focus(hz.NextPage),this.canSelectMany&&this.ui.list.domFocus(),qv(e,!0);break;case 11:this.ui.list.focus(hz.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),qv(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(hz.First),qv(e,!0));break;case 13:!e.ctrlKey&&!e.metaKey||e.shiftKey||e.altKey||(this.ui.list.focus(hz.Last),qv(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&&rl(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&&rl(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&&rl(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 pv(this.ui.container,Kv.KEY_UP,(e=>{if(this.canSelectMany||!this._quickNavigate)return;const t=new ev(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||vz.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 OV.NONE:this._itemActivation=OV.FIRST;break;case OV.SECOND:this.ui.list.focus(hz.Second),this._itemActivation=OV.FIRST;break;case OV.LAST:this.ui.list.focus(hz.Last),this._itemActivation=OV.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(hz.First)),this.keepScrollPosition&&(this.scrollTop=e)}}vz.DEFAULT_ARIA_LABEL=ma(0,"Type to narrow down results.");class bz extends Nc{constructor(e){super(),this.options=e,this.comboboxAccessibility=!1,this.enabled=!0,this.onDidAcceptEmitter=this._register(new Vc),this.onDidCustomEmitter=this._register(new Vc),this.onDidTriggerButtonEmitter=this._register(new Vc),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new Vc),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new Vc),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(pv(window,Kv.KEY_DOWN,e,!0)),this._register(pv(window,Kv.KEY_UP,e,!0)),this._register(pv(window,Kv.MOUSE_DOWN,e,!0))}getUI(){if(this.ui)return this.ui;const e=Zv(this.parentElement,mz(".quick-input-widget.show-file-icons"));e.tabIndex=-1,e.style.display="none";const t=jv(e),i=Zv(e,mz(".quick-input-titlebar")),n=this._register(new YM(i));n.domNode.classList.add("quick-input-left-action-bar");const o=Zv(i,mz(".quick-input-title")),r=this._register(new YM(i));r.domNode.classList.add("quick-input-right-action-bar");const s=Zv(e,mz(".quick-input-description")),a=Zv(e,mz(".quick-input-header")),l=Zv(a,mz("input.quick-input-check-all"));l.type="checkbox",this._register(mv(l,Kv.CHANGE,(e=>{const t=l.checked;C.setAllVisibleChecked(t)}))),this._register(pv(l,Kv.CLICK,(e=>{(e.x||e.y)&&u.setFocus()})));const c=Zv(a,mz(".quick-input-description")),d=Zv(a,mz(".quick-input-and-message")),h=Zv(d,mz(".quick-input-filter")),u=this._register(new $V(h));u.setAttribute("aria-describedby",`${this.idPrefix}message`);const g=Zv(h,mz(".quick-input-visible-count"));g.setAttribute("aria-live","polite"),g.setAttribute("aria-atomic","true");const p=new mV(g,{countFormat:ma(0,"{0} Results")}),m=Zv(h,mz(".quick-input-count"));m.setAttribute("aria-live","polite");const f=new mV(m,{countFormat:ma(0,"{0} Selected")}),_=Zv(a,mz(".quick-input-action")),v=new hV(_);v.label=ma(0,"OK"),this._register(v.onDidClick((e=>{this.onDidAcceptEmitter.fire()})));const b=Zv(a,mz(".quick-input-action")),w=new hV(b);w.label=ma(0,"Custom"),this._register(w.onDidClick((e=>{this.onDidCustomEmitter.fire()})));const y=Zv(d,mz(`#${this.idPrefix}message.quick-input-message`)),C=this._register(new uz(e,this.idPrefix+"list",this.options));this._register(C.onChangedAllVisibleChecked((e=>{l.checked=e}))),this._register(C.onChangedVisibleCount((e=>{p.setCount(e)}))),this._register(C.onChangedCheckedCount((e=>{f.setCount(e)}))),this._register(C.onLeave((()=>{setTimeout((()=>{u.setFocus(),this.controller instanceof vz&&this.controller.canSelectMany&&C.clearFocus()}),0)}))),this._register(C.onDidChangeFocus((()=>{this.comboboxAccessibility&&this.getUI().inputBox.setAttribute("aria-activedescendant",this.getUI().list.getActiveDescendant()||"")})));const S=new kV(e);S.getContainer().classList.add("quick-input-progress");const k=Yv(e);return this._register(k),this._register(pv(e,Kv.FOCUS,(e=>{this.previousFocusElement=e.relatedTarget instanceof HTMLElement?e.relatedTarget:void 0}),!0)),this._register(k.onDidBlur((()=>{this.getUI().ignoreFocusOut||this.options.ignoreFocusOut()||this.hide(AV.Blur),this.previousFocusElement=void 0}))),this._register(pv(e,Kv.FOCUS,(e=>{u.setFocus()}))),this._register(pv(e,Kv.KEY_DOWN,(t=>{const i=new ev(t);switch(i.keyCode){case 3:qv(t,!0),this.onDidAcceptEmitter.fire();break;case 9:qv(t,!0),this.hide(AV.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]?(qv(t,!0),o[o.length-1].focus()):i.shiftKey||i.target!==o[o.length-1]||(qv(t,!0),o[0].focus())}}}))),this.ui={container:e,styleSheet:t,leftActionBar:n,titleBar:i,title:o,description1:s,description2:c,rightActionBar:r,checkAll:l,filterContainer:h,inputBox:u,visibleCountContainer:g,visibleCount:p,countContainer:m,count:f,okContainer:_,ok:v,message:y,customButtonContainer:b,customButton:w,list:C,progressBar:S,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=Kc.None){return new Promise(((n,o)=>{let r=e=>{r=n,t.onKeyMods&&t.onKeyMods(s.keyMods),n(e)};if(i.isCancellationRequested)return void r(void 0);const s=this.createQuickPick();let a;const l=[s,s.onDidAccept((()=>{if(s.canSelectMany)r(s.selectedItems.slice()),s.hide();else{const e=s.activeItems[0];e&&(r(e),s.hide())}})),s.onDidChangeActive((e=>{const i=e[0];i&&t.onDidFocus&&t.onDidFocus(i)})),s.onDidChangeSelection((e=>{if(!s.canSelectMany){const t=e[0];t&&(r(t),s.hide())}})),s.onDidTriggerItemButton((e=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton(Object.assign(Object.assign({},e),{removeItem:()=>{const t=s.items.indexOf(e.item);if(-1!==t){const e=s.items.slice(),i=e.splice(t,1),n=s.activeItems.filter((e=>e!==i[0])),o=s.keepScrollPosition;s.keepScrollPosition=!0,s.items=e,n&&(s.activeItems=n),s.keepScrollPosition=o}}})))),s.onDidChangeValue((e=>{!a||e||1===s.activeItems.length&&s.activeItems[0]===a||(s.activeItems=[a])})),i.onCancellationRequested((()=>{s.hide()})),s.onDidHide((()=>{kc(l),r(void 0)}))];s.title=t.title,s.canSelectMany=!!t.canPickMany,s.placeholder=t.placeHolder,s.ignoreFocusOut=!!t.ignoreFocusLost,s.matchOnDescription=!!t.matchOnDescription,s.matchOnDetail=!!t.matchOnDetail,s.matchOnLabel=void 0===t.matchOnLabel||t.matchOnLabel,s.autoFocusOnList=void 0===t.autoFocusOnList||t.autoFocusOnList,s.quickNavigate=t.quickNavigate,s.contextKey=t.contextKey,s.busy=!0,Promise.all([e,t.activeItem]).then((([e,t])=>{a=t,s.busy=!1,s.items=e,s.canSelectMany&&(s.selectedItems=e.filter((e=>"separator"!==e.type&&e.picked))),a&&(s.activeItems=[a])})),s.show(),Promise.resolve(e).then(void 0,(e=>{o(e),s.hide()}))}))}createQuickPick(){const e=this.getUI();return new vz(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(zO.Ignore),t.visibleCount.setCount(0),t.count.setCount(0),Xv(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();fz.tooltip=n?ma(0,"Back ({0})",n):ma(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=Tl(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,bz.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 r=[];this.styles.list.pickerGroupBorder&&r.push(`.quick-input-list .quick-input-list-entry { border-top-color:  ${this.styles.list.pickerGroupBorder}; }`),this.styles.list.pickerGroupForeground&&r.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)&&(r.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&r.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&r.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&r.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&r.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&r.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),r.push("}"));const s=r.join("\n");s!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=s)}}}bz.MAX_WIDTH=600;var wz=i(7703),yz={};yz.styleTagTransform=uu(),yz.setAttributes=lu(),yz.insert=su().bind(null,"head"),yz.domAPI=ou(),yz.insertStyleElement=du(),iu()(wz.Z,yz),wz.Z&&wz.Z.locals&&wz.Z.locals;class Cz{constructor(e){this.spliceables=e}splice(e,t,i){this.spliceables.forEach((n=>n.splice(e,t,i)))}}class Sz extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}function kz(e,t){const i=[];for(let n of t){if(e.start>=n.range.end)continue;if(e.end<n.range.start)break;const t=pF.intersect(e,n.range);pF.isEmpty(t)||i.push({range:t,size:n.size})}return i}function xz({start:e,end:t},i){return{start:e+i,end:t+i}}class Lz{constructor(){this.groups=[],this._size=0}splice(e,t,i=[]){const n=i.length-t,o=kz({start:0,end:e},this.groups),r=kz({start:e+t,end:Number.POSITIVE_INFINITY},this.groups).map((e=>({range:xz(e.range,n),size:e.size}))),s=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,r=n.size;i&&r===i.size?i.range.end=o:(i={range:{start:e,end:o},size:r},t.push(i))}return t}(e.reduce(((e,t)=>e.concat(t)),[]))}(o,s,r),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,r=i+o*n.size;if(e<r)return t+Math.floor((e-i)/n.size);t+=o,i=r}return t}indexAfter(e){return Math.min(this.indexAt(e)+1,this.count)}positionAt(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,r=i+o;if(e<r)return t+(e-i)*n.size;t+=o*n.size,i=r}return-1}}class Ez{constructor(e){this.renderers=e,this.cache=new Map}alloc(e){let t=this.getTemplateCache(e).pop();if(!t){const i=tb(".monaco-list-row");t={domNode:i,templateId:e,templateData:this.getRenderer(e).renderTemplate(i)}}return t}release(e){e&&this.releaseRow(e)}releaseRow(e){const{domNode:t,templateId:i}=e;t&&(t.classList.remove("scrolling"),function(e){try{e.parentElement&&e.parentElement.removeChild(e)}catch(e){}}(t)),this.getTemplateCache(i).push(e)}getTemplateCache(e){let t=this.cache.get(e);return t||(t=[],this.cache.set(e,t)),t}dispose(){this.cache.forEach(((e,t)=>{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 Nz=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const Iz={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 Tz{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class Dz{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class Az{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;t<e.files.length;t++){const i=e.files.item(t);i&&(i.size||i.type)&&this.files.push(i)}}}getData(){return{types:this.types,files:this.files}}}class Oz{constructor(e){(null==e?void 0:e.getSetSize)?this.getSetSize=e.getSetSize.bind(e):this.getSetSize=(e,t,i)=>i,(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 Mz{constructor(e,t,i,n=Iz){if(this.virtualDelegate=t,this.domId="list_id_"+ ++Mz.InstanceCount,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new gm(50),this.splicing=!1,this.dragOverAnimationStopDisposable=Nc.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=Nc.None,this.onDragLeaveTimeout=Nc.None,this.disposables=new Ec,this._onDidChangeContentHeight=new Vc,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 Lz;for(const e of i)this.renderers.set(e.templateId,e);this.cache=this.disposables.add(new Ez(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=Pl(n,(e=>e.horizontalScrolling),Iz.horizontalScrolling),this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.additionalScrollHeight=void 0===n.additionalScrollHeight?0:n.additionalScrollHeight,this.accessibilityProvider=new Oz(n.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",Pl(n,(e=>e.transformOptimization),Iz.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)"),this.disposables.add(ny.addTarget(this.rowsContainer)),this.scrollable=new xE({forceIntegerValues:!0,smoothScrollDuration:Pl(n,(e=>e.smoothScrolling),!1)?125:0,scheduleAtNextAnimationFrame:e=>bv(e)}),this.scrollableElement=this.disposables.add(new RE(this.rowsContainer,{alwaysConsumeMouseWheel:Pl(n,(e=>e.alwaysConsumeMouseWheel),Iz.alwaysConsumeMouseWheel),horizontal:1,vertical:Pl(n,(e=>e.verticalScrollMode),Iz.verticalScrollMode),useShadows:Pl(n,(e=>e.useShadows),Iz.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(pv(this.rowsContainer,iy.Change,(e=>this.onTouchChange(e)))),this.disposables.add(pv(this.scrollableElement.getDomNode(),"scroll",(e=>e.target.scrollTop=0))),this.disposables.add(pv(this.domNode,"dragover",(e=>this.onDragOver(this.toDragEvent(e))))),this.disposables.add(pv(this.domNode,"drop",(e=>this.onDrop(this.toDragEvent(e))))),this.disposables.add(pv(this.domNode,"dragleave",(e=>this.onDragLeave(this.toDragEvent(e))))),this.disposables.add(pv(this.domNode,"dragend",(e=>this.onDragEnd(e)))),this.setRowLineHeight=Pl(n,(e=>e.setRowLineHeight),Iz.setRowLineHeight),this.setRowHeight=Pl(n,(e=>e.setRowHeight),Iz.setRowHeight),this.supportDynamicHeights=Pl(n,(e=>e.supportDynamicHeights),Iz.supportDynamicHeights),this.dnd=Pl(n,(e=>e.dnd),Iz.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:Av(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},r=pF.intersect(n,o),s=new Map;for(let e=r.end-1;e>=r.start;e--){const t=this.items[e];if(t.dragStartDisposable.dispose(),t.row){let i=s.get(t.templateId);i||(i=[],s.set(t.templateId,i));const n=this.renderers.get(t.templateId);n&&n.disposeElement&&n.disposeElement(t.element,e,t.row.templateData,t.size),i.push(t.row)}t.row=null}const a={start:e+t,end:this.items.length},l=pF.intersect(a,n),c=pF.relativeComplement(a,n),d=i.map((e=>({id:String(this.itemId++),element:e,templateId:this.virtualDelegate.getTemplateId(e),size:this.virtualDelegate.getHeight(e),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(e),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:Nc.None,checkedDisposable:Nc.None})));let h;0===e&&t>=this.items.length?(this.rangeMap=new Lz,this.rangeMap.splice(0,0,d),h=this.items,this.items=d):(this.rangeMap.splice(e,t,d),h=this.items.splice(e,t,...d));const u=i.length-t,g=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),p=xz(l,u),m=pF.intersect(g,p);for(let e=m.start;e<m.end;e++)this.updateItemInDOM(this.items[e],e);const f=pF.relativeComplement(p,g);for(const e of f)for(let t=e.start;t<e.end;t++)this.removeItemFromDOM(t);const _=c.map((e=>xz(e,u))),v=[{start:e,end:e+i.length},..._].map((e=>pF.intersect(g,e))),b=this.getNextToLastElement(v);for(const e of v)for(let t=e.start;t<e.end;t++){const e=this.items[t],i=s.get(e.templateId),n=null==i?void 0:i.pop();this.insertItemInDOM(t,b,n)}for(const e of s.values())for(const t of e)this.cache.release(t);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),h.map((e=>e.element))}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=bv((()=>{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:Ov(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:Av(this.domNode)})}render(e,t,i,n,o,r=!1){const s=this.getRenderRange(t,i),a=pF.relativeComplement(s,e),l=pF.relativeComplement(e,s),c=this.getNextToLastElement(a);if(r){const t=pF.intersect(e,s);for(let e=t.start;e<t.end;e++)this.updateItemInDOM(this.items[e],e)}for(const e of a)for(let t=e.start;t<e.end;t++)this.insertItemInDOM(t,c);for(const e of l)for(let t=e.start;t<e.end;t++)this.removeItemFromDOM(t);void 0!==n&&(this.rowsContainer.style.left=`-${n}px`),this.rowsContainer.style.top=`-${t}px`,this.horizontalScrolling&&void 0!==o&&(this.rowsContainer.style.width=`${Math.max(o,this.renderWidth)}px`),this.lastRenderTop=t,this.lastRenderHeight=i}insertItemInDOM(e,t,i){const n=this.items[e];n.row||(n.row=null!=i?i:this.cache.alloc(n.templateId));const o=this.accessibilityProvider.getRole(n.element)||"listitem";n.row.domNode.setAttribute("role",o);const r=this.accessibilityProvider.isChecked(n.element);if("boolean"==typeof r)n.row.domNode.setAttribute("aria-checked",String(!!r));else if(r){const e=e=>n.row.domNode.setAttribute("aria-checked",String(!!e));e(r.value),n.checkedDisposable=r.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 s=this.renderers.get(n.templateId);if(!s)throw new Error(`No renderer found for template id ${n.templateId}`);s&&s.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=pv(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=ug?"-moz-fit-content":"fit-content",e.width=Av(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 Pc.map(this.disposables.add(new xM(this.domNode,"click")).event,(e=>this.toMouseEvent(e)))}get onMouseDblClick(){return Pc.map(this.disposables.add(new xM(this.domNode,"dblclick")).event,(e=>this.toMouseEvent(e)))}get onMouseMiddleClick(){return Pc.filter(Pc.map(this.disposables.add(new xM(this.domNode,"auxclick")).event,(e=>this.toMouseEvent(e))),(e=>1===e.browserEvent.button))}get onMouseDown(){return Pc.map(this.disposables.add(new xM(this.domNode,"mousedown")).event,(e=>this.toMouseEvent(e)))}get onContextMenu(){return Pc.any(Pc.map(this.disposables.add(new xM(this.domNode,"contextmenu")).event,(e=>this.toMouseEvent(e))),Pc.map(this.disposables.add(new xM(this.domNode,iy.Contextmenu)).event,(e=>this.toGestureEvent(e))))}get onTouchStart(){return Pc.map(this.disposables.add(new xM(this.domNode,"touchstart")).event,(e=>this.toTouchEvent(e)))}get onTap(){return Pc.map(this.disposables.add(new xM(this.rowsContainer,iy.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 console.error("Got bad scroll event:",e),t}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,t,i){if(!i.dataTransfer)return;const n=this.dnd.getDragElements(e);if(i.dataTransfer.effectAllowed="copyMove",i.dataTransfer.setData(zM.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=tb(".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 Tz(n),HM.CurrentDragAndDropData=new Dz(n),this.dnd.onDragStart&&this.dnd.onDragStart(this.currentDragData,i)}onDragOver(e){if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),HM.CurrentDragAndDropData&&"vscode-ui"===HM.CurrentDragAndDropData.getData())return!1;if(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer)return!1;if(!this.currentDragData)if(HM.CurrentDragAndDropData)this.currentDragData=HM.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new Az}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=ll(i).filter((e=>e>=-1&&e<this.length)).sort(((e,t)=>e-t)),i=-1===i[0]?[-1]:i,n=this.currentDragFeedback,o=i,Array.isArray(n)&&Array.isArray(o)?rl(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=Lc((()=>{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=Lc((()=>{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=fm((()=>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,HM.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,HM.CurrentDragAndDropData=void 0,this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=Nc.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const e=function(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=Bv(e)?null:xv(e);o&&(n-="rtl"!==o.direction?e.scrollLeft:-e.scrollLeft),e===t&&(n+=Ev.getBorderLeftWidth(e),i+=Ev.getBorderTopWidth(e),i+=e.offsetTop,n+=e.offsetLeft,t=e.offsetParent)}return{left:n,top:i}}(this.domNode).top;this.dragOverAnimationDisposable=function(e){const t=()=>{e(),i=bv(t)};let i=bv(t);return Lc((()=>i.dispose()))}(this.animateDragAndDropScrollTop.bind(this,e))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=fm((()=>{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,r;e===this.elementTop(n.start)?(o=n.start,r=0):n.end-n.start>1&&(o=n.start+1,r=this.elementTop(o)-e);let s=0;for(;;){const a=this.getRenderRange(e,t);let l=!1;for(let e=a.start;e<a.end;e++){const t=this.probeDynamicHeight(e);0!==t&&this.rangeMap.splice(e,1,[this.items[e]]),s+=t,l=l||0!==t}if(!l){0!==s&&this.eventuallyUpdateScrollDimensions();const t=pF.relativeComplement(n,a);for(const e of t)for(let t=e.start;t<e.end;t++)this.items[t].row&&this.removeItemFromDOM(t);const l=pF.relativeComplement(a,n);for(const e of l)for(let t=e.start;t<e.end;t++){const e=t+1,i=e<this.items.length?this.items[e].row:null,n=i?i.domNode:null;this.insertItemInDOM(t,n)}for(let e=a.start;e<a.end;e++)this.items[e].row&&this.updateItemInDOM(this.items[e],e);if("number"==typeof o){const t=this.scrollable.getFutureScrollPosition().scrollTop-e,n=this.elementTop(o)-r+t;this.setScrollTop(n,i)}return void this._onDidChangeContentHeight.fire(this.contentHeight)}}}probeDynamicHeight(e){const t=this.items[e];if(this.virtualDelegate.getDynamicHeight){const e=this.virtualDelegate.getDynamicHeight(t.element);if(null!==e){const i=t.size;return t.size=e,t.lastDynamicHeightWidth=this.renderWidth,e-i}}if(!t.hasDynamicHeight||t.lastDynamicHeightWidth===this.renderWidth)return 0;if(this.virtualDelegate.hasDynamicHeight&&!this.virtualDelegate.hasDynamicHeight(t.element))return 0;const i=t.size;if(!this.setRowHeight&&t.row){let e=t.row.domNode.offsetHeight;return t.size=e,t.lastDynamicHeightWidth=this.renderWidth,e-i}const n=this.cache.alloc(t.templateId);n.domNode.style.height="",this.rowsContainer.appendChild(n.domNode);const o=this.renderers.get(t.templateId);return o&&(o.renderElement(t.element,e,n.templateData,void 0),o.disposeElement&&o.disposeElement(t.element,e,n.templateData,void 0)),t.size=n.domNode.offsetHeight,this.virtualDelegate.setDynamicHeight&&this.virtualDelegate.setDynamicHeight(t.element,t.size),t.lastDynamicHeightWidth=this.renderWidth,this.rowsContainer.removeChild(n.domNode),this.cache.release(n),t.size-i}getNextToLastElement(e){const t=e[e.length-1];if(!t)return null;const i=this.items[t.end];return i&&i.row?i.row.domNode:null}getElementDomId(e){return`${this.domId}_${e}`}dispose(){if(this.items){for(const e of this.items)if(e.row){const t=this.renderers.get(e.row.templateId);t&&(t.disposeElement&&t.disposeElement(e.element,-1,e.row.templateData,void 0),t.disposeTemplate(e.row.templateData))}this.items=[]}this.domNode&&this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),kc(this.disposables)}}Mz.InstanceCount=0,Nz([ty],Mz.prototype,"onMouseClick",null),Nz([ty],Mz.prototype,"onMouseDblClick",null),Nz([ty],Mz.prototype,"onMouseMiddleClick",null),Nz([ty],Mz.prototype,"onMouseDown",null),Nz([ty],Mz.prototype,"onContextMenu",null),Nz([ty],Mz.prototype,"onTouchStart",null),Nz([ty],Mz.prototype,"onTap",null);var Rz,Pz=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Fz=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class Bz{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?n.push(o):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 Wz{constructor(e){this._trait=e,this.length=0,this.indexes=[],this.sortedIndexes=[],this._onChange=new Vc,this.onChange=this._onChange.event}get name(){return this._trait}get renderer(){return new Bz(this)}splice(e,t,i){var n;t=Math.max(0,Math.min(t,this.length-e));const o=i.length-t,r=e+t,s=[...this.sortedIndexes.filter((t=>t<e)),...i.map(((t,i)=>t?i+e:-1)).filter((e=>-1!==e)),...this.sortedIndexes.filter((e=>e>=r)).map((e=>e+o))],a=this.length+o;if(this.sortedIndexes.length>0&&0===s.length&&a>0){const t=null!==(n=this.sortedIndexes.find((t=>t>=e)))&&void 0!==n?n:a-1;s.push(Math.min(t,a-1))}this.renderer.splice(e,t,i.length),this._set(s,s),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(ij),t)}_set(e,t,i){const n=this.indexes,o=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;const r=tj(o,e);return this.renderer.renderIndexes(r),this._onChange.fire({indexes:e,browserEvent:i}),n}get(){return this.indexes}contains(e){return function(e,t,i){let n=0,o=e.length-1;for(;n<=o;){const r=(n+o)/2|0,s=i(e[r],t);if(s<0)n=r+1;else{if(!(s>0))return r;o=r-1}}return-(n+1)}(this.sortedIndexes,e,ij)>=0}dispose(){kc(this._onChange)}}Pz([ty],Wz.prototype,"renderer",null);class Vz extends Wz{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 zz{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 jz(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}function Hz(e){return!!e.classList.contains("monaco-editor")||!e.classList.contains("monaco-list")&&!!e.parentElement&&Hz(e.parentElement)}class Uz{constructor(e,t,i){this.list=e,this.view=t,this.disposables=new Ec,this.multipleSelectionDisposables=new Ec,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=>(Pa?e.metaKey:e.ctrlKey)&&31===e.keyCode)).on(this.onCtrlA,this,this.multipleSelectionDisposables)}get onKeyDown(){return Pc.chain(this.disposables.add(new xM(this.view.domNode,"keydown")).event).filter((e=>!jz(e.target))).map((e=>new ev(e)))}updateOptions(e){void 0!==e.multipleSelectionSupport&&(this.multipleSelectionDisposables.clear(),e.multipleSelectionSupport&&this.onKeyDown.filter((e=>(Pa?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(dl(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()}}Pz([ty],Uz.prototype,"onKeyDown",null),function(e){e[e.Idle=0]="Idle",e[e.Typing=1]="Typing"}(Rz||(Rz={}));const $z=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 Kz{constructor(e,t,i,n){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=i,this.delegate=n,this.enabled=!1,this.state=Rz.Idle,this.automaticKeyboardNavigation=!0,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new Ec,this.disposables=new Ec,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=Pc.chain(this.enabledDisposables.add(new xM(this.view.domNode,"keydown")).event).filter((e=>!jz(e.target))).filter((()=>this.automaticKeyboardNavigation||this.triggered)).map((e=>new ev(e))).filter((e=>this.delegate.mightProducePrintableCharacter(e))).forEach((e=>e.preventDefault())).map((e=>e.browserEvent.key)).event,t=Pc.debounce(e,(()=>null),800);Pc.reduce(Pc.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&&fb(i)}this.previouslyFocused=-1}onInput(e){if(!e)return this.state=Rz.Idle,void(this.triggered=!1);const t=this.list.getFocus(),i=t.length>0?t[0]:0,n=this.state===Rz.Idle?1:0;this.state=Rz.Typing;for(let t=0;t<this.list.length;t++){const o=(i+t+n)%this.list.length,r=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(this.view.element(o)),s=r&&r.toString();if(void 0===s||rB(e,s))return this.previouslyFocused=i,this.list.setFocus([o]),void this.list.reveal(o)}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class qz{constructor(e,t){this.list=e,this.view=t,this.disposables=new Ec,Pc.chain(this.disposables.add(new xM(t.domNode,"keydown")).event).filter((e=>!jz(e.target))).map((e=>new ev(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 Gz(e){return Pa?e.browserEvent.metaKey:e.browserEvent.ctrlKey}function Yz(e){return e.browserEvent.shiftKey}const Zz={isSelectionSingleChangeEvent:Gz,isSelectionRangeChangeEvent:Yz};class Xz{constructor(e){this.list=e,this.disposables=new Ec,this._onPointer=new Vc,this.onPointer=this._onPointer.event,!1!==e.options.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||Zz),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(ny.addTarget(e.getHTMLElement()))),Pc.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||Zz))}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){Hz(e.browserEvent.target)||document.activeElement!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(Hz(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(jz(e.browserEvent.target)||Hz(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(jz(e.browserEvent.target)||Hz(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=dl(Math.min(i,t),Math.max(i,t)+1),o=this.list.getSelection(),r=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--]);for(n.reverse(),o=i;o<e.length&&e[o]===t+(o-i);)n.push(e[o++]);return n}(tj(o,[i]),i);if(0===r.length)return;const s=tj(n,function(e,t){const i=[];let n=0,o=0;for(;n<e.length||o<t.length;)if(n>=e.length)i.push(t[o++]);else if(o>=t.length)i.push(e[n++]);else{if(e[n]===t[o]){n++,o++;continue}e[n]<t[o]?i.push(e[n++]):o++}return i}(o,r));this.list.setSelection(s,e.browserEvent),this.list.setFocus([t],e.browserEvent)}else if(this.isSelectionSingleChangeEvent(e)){const i=this.list.getSelection(),n=i.filter((e=>e!==t));this.list.setFocus([t]),this.list.setAnchor(t),i.length===n.length?this.list.setSelection([...n,t],e.browserEvent):this.list.setSelection(n,e.browserEvent)}}dispose(){this.disposables.dispose()}}class Jz{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}; }`):Pa||console.warn(`List with id '${this.selectorSuffix}' was styled with a non-opaque background color. This will break sub-pixel antialiasing.`)),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 Qz={listFocusBackground:dy.fromHex("#7FB0D0"),listActiveSelectionBackground:dy.fromHex("#0E639C"),listActiveSelectionForeground:dy.fromHex("#FFFFFF"),listActiveSelectionIconForeground:dy.fromHex("#FFFFFF"),listFocusAndSelectionBackground:dy.fromHex("#094771"),listFocusAndSelectionForeground:dy.fromHex("#FFFFFF"),listInactiveSelectionBackground:dy.fromHex("#3F3F46"),listInactiveSelectionIconForeground:dy.fromHex("#FFFFFF"),listHoverBackground:dy.fromHex("#2A2D2E"),listDropBackground:dy.fromHex("#383B3D"),treeIndentGuidesStroke:dy.fromHex("#a9a9a9"),tableColumnsBorder:dy.fromHex("#cccccc").transparent(.2),tableOddRowsBackgroundColor:dy.fromHex("#cccccc").transparent(.04)},ej={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI:()=>null,onDragStart(){},onDragOver:()=>!1,drop(){}}};function tj(e,t){const i=[];let n=0,o=0;for(;n<e.length||o<t.length;)if(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]<t[o]?i.push(e[n++]):i.push(t[o++])}return i}const ij=(e,t)=>e-t;class nj{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 r of this.renderers)r.renderElement(e,t,i[o++],n)}disposeElement(e,t,i,n){let o=0;for(const r of this.renderers)r.disposeElement&&r.disposeElement(e,t,i[o],n),o+=1}disposeTemplate(e){let t=0;for(const i of this.renderers)i.disposeTemplate(e[t++])}}class oj{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 rj{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,r;null===(r=(o=this.dnd).onDragLeave)||void 0===r||r.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 sj{constructor(e,t,i,n,o=ej){var r;this.user=e,this._options=o,this.focus=new Wz("focused"),this.anchor=new Wz("anchor"),this.eventBufferer=new Hc,this._ariaLabel="",this.disposables=new Ec,this._onDidDispose=new Vc,this.onDidDispose=this._onDidDispose.event;const s=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?null===(r=this._options.accessibilityProvider)||void 0===r?void 0:r.getWidgetRole():"list";this.selection=new Vz("listbox"!==s),Ml(o,Qz,!1);const a=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=o.accessibilityProvider,this.accessibilityProvider&&(a.push(new oj(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant&&this.accessibilityProvider.onDidChangeActiveDescendant(this.onDidChangeActiveDescendant,this,this.disposables)),n=n.map((e=>new nj(e.templateId,[...a,e])));const l=Object.assign(Object.assign({},o),{dnd:o.dnd&&new rj(this,o.dnd)});if(this.view=new Mz(t,i,n,l),this.view.domNode.setAttribute("role",s),o.styleController)this.styleController=o.styleController(this.view.domId);else{const e=jv(this.view.domNode);this.styleController=new Jz(e,this.view.domId)}if(this.spliceable=new Cz([new zz(this.focus,this.view,o.identityProvider),new zz(this.selection,this.view,o.identityProvider),new zz(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 qz(this,this.view)),("boolean"!=typeof o.keyboardSupport||o.keyboardSupport)&&(this.keyboardController=new Uz(this,this.view,o),this.disposables.add(this.keyboardController)),o.keyboardNavigationLabelProvider){const e=o.keyboardNavigationDelegate||$z;this.typeLabelController=new Kz(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 Pc.map(this.eventBufferer.wrapEvent(this.focus.onChange),(e=>this.toListEvent(e)))}get onDidChangeSelection(){return Pc.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=Pc.chain(this.disposables.add(new xM(this.view.domNode,"keydown")).event).map((e=>new ev(e))).filter((t=>e=58===t.keyCode||t.shiftKey&&68===t.keyCode)).map(LM).filter((()=>!1)).event,i=Pc.chain(this.disposables.add(new xM(this.view.domNode,"keyup")).event).forEach((()=>e=!1)).map((e=>new ev(e))).filter((e=>58===e.keyCode||e.shiftKey&&68===e.keyCode)).map(LM).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=Pc.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 Pc.any(t,i,n)}get onKeyDown(){return this.disposables.add(new xM(this.view.domNode,"keydown")).event}get onDidFocus(){return Pc.signal(this.disposables.add(new xM(this.view.domNode,"focus",!0)).event)}createMouseController(e){return new Xz(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 Sz(this.user,`Invalid start index: ${e}`);if(t<0)throw new Sz(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 t of e)if(t<0||t>=this.length)throw new Sz(this.user,`Invalid index ${t}`);this.selection.set(e,t)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map((e=>this.view.element(e)))}setAnchor(e){if(void 0!==e){if(e<0||e>=this.length)throw new Sz(this.user,`Invalid index ${e}`);this.anchor.set([e])}else this.anchor.set([])}getAnchor(){return cl(this.anchor.get(),void 0)}getAnchorElement(){const e=this.getAnchor();return void 0===e?void 0:this.element(e)}setFocus(e,t){for(const t of e)if(t<0||t>=this.length)throw new Sz(this.user,`Invalid index ${t}`);this.focus.set(e,t)}focusNext(e=1,t=!1,i,n){if(0===this.length)return;const o=this.focus.get(),r=this.findNextIndex(o.length>0?o[0]+e:0,t,n);r>-1&&this.setFocus([r],i)}focusPrevious(e=1,t=!1,i,n){if(0===this.length)return;const o=this.focus.get(),r=this.findPreviousIndex(o.length>0?o[0]-e:0,t,n);r>-1&&this.setFocus([r],i)}focusNextPage(e,t){return Fz(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 mm(0),yield this.focusNextPage(e,t))}}))}focusPreviousPage(e,t){return Fz(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),r=this.getFocusedElements()[0];if(r!==o){const n=this.findNextIndex(i,!1,t);n>-1&&r!==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 mm(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;n++){if(e>=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;n<this.length;n++){if(e<0&&!t)return-1;if(e=(this.length+e%this.length)%this.length,!i||i(this.element(e)))return e;e--}return-1}getFocus(){return this.focus.get()}getFocusedElements(){return this.getFocus().map((e=>this.view.element(e)))}reveal(e,t){if(e<0||e>=this.length)throw new Sz(this.user,`Invalid index ${e}`);const i=this.view.getScrollTop(),n=this.view.elementTop(e),o=this.view.elementHeight(e);if(wl(t)){const e=o-this.view.renderHeight;this.view.setScrollTop(e*bP(t,0,1)+n)}else{const e=n+o,t=i+this.view.renderHeight;n<i&&e>=t||(n<i||e>=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 Sz(this.user,`Invalid index ${e}`);const t=this.view.getScrollTop(),i=this.view.elementTop(e),n=this.view.elementHeight(e);if(i<t||i+n>t+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()}}Pz([ty],sj.prototype,"onDidChangeFocus",null),Pz([ty],sj.prototype,"onDidChangeSelection",null),Pz([ty],sj.prototype,"onContextMenu",null),Pz([ty],sj.prototype,"onKeyDown",null),Pz([ty],sj.prototype,"onDidFocus",null);class aj{constructor(e,t){this.renderer=e,this.modelProvider=t}get templateId(){return this.renderer.templateId}renderTemplate(e){return{data:this.renderer.renderTemplate(e),disposable:Nc.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 r=new Gc,s=o.resolve(e,r.token);i.disposable={dispose:()=>r.cancel()},this.renderer.renderPlaceholder(e,i.data),s.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 lj{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}}var cj=i(2470),dj={};dj.styleTagTransform=uu(),dj.setAttributes=lu(),dj.insert=su().bind(null,"head"),dj.domAPI=ou(),dj.insertStyleElement=du(),iu()(cj.Z,dj),cj.Z&&cj.Z.locals&&cj.Z.locals;const hj={separatorBorder:dy.transparent};class uj{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=bP(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 gj extends uj{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}}class pj extends uj{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}}var mj,fj;!function(e){e[e.Idle=0]="Idle",e[e.Busy=1]="Busy"}(mj||(mj={})),function(e){e.Distribute={type:"distribute"},e.Split=function(e){return{type:"split",index:e}},e.Invisible=function(e){return{type:"invisible",cachedVisibleSize:e}}}(fj||(fj={}));class _j extends Nc{constructor(e,t={}){var i,n,o,r,s;super(),this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=mj.Idle,this._onDidSashChange=this._register(new Vc),this._onDidSashReset=this._register(new Vc),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=Zv(this.el,tb(".sash-container")),this.viewContainer=tb(".split-view-container"),this.scrollable=new xE({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:bv}),this.scrollableElement=this._register(new RE(this.viewContainer,{vertical:0===this.orientation?null!==(r=t.scrollbarVisibility)&&void 0!==r?r:1:2,horizontal:1===this.orientation?null!==(s=t.scrollbarVisibility)&&void 0!==s?s:1:2},this.scrollable)),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll((e=>{this.viewContainer.scrollTop=e.scrollTop,this.viewContainer.scrollLeft=e.scrollLeft}))),Zv(this.el,this.scrollableElement.getDomNode()),this.style(t.styles||hj),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach(((e,t)=>{const i=Sl(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 t=0;t<this.viewItems.length;t++){const i=this.viewItems[t];i.size=bP(Math.round(this.proportions[t]*e),i.minimumSize,i.maximumSize)}else{const t=dl(this.viewItems.length),n=t.filter((e=>1===this.viewItems[e].priority)),o=t.filter((e=>2===this.viewItems[e].priority));this.resize(this.viewItems.length-1,e-i,void 0,n,o)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map((e=>e.size/this.contentSize)))}onSashStart({sash:e,start:t,alt:i}){for(const e of this.viewItems)e.enabled=!1;const n=this.sashItems.findIndex((t=>t.sash===e)),o=xc(pv(document.body,"keydown",(e=>r(this.sashDragState.current,e.altKey))),pv(document.body,"keyup",(()=>r(this.sashDragState.current,!1)))),r=(e,t)=>{const i=this.viewItems.map((e=>e.size));let r,s,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=dl(n,-1),t=dl(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),c=0===t.length?Number.NEGATIVE_INFINITY:t.reduce(((e,t)=>e+(i[t]-this.viewItems[t].viewMaximumSize)),0),d=Math.max(o,c),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);r={index:u,limitDelta:e.visible?d-t:d+t,size:e.size}}if("number"==typeof g){const e=this.viewItems[g],t=Math.floor(e.viewMinimumSize/2);s={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:r,snapAfter:s,disposable:o}};r(t,i)}onSashChange({current:e}){const{index:t,start:i,sizes:n,alt:o,minDelta:r,maxDelta:s,snapBefore:a,snapAfter:l}=this.sashDragState;this.sashDragState.current=e;const c=e-i,d=this.resize(t,c,n,void 0,void 0,r,s,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],r=o.size-o.maximumSize,s=o.size-o.minimumSize,a=e?t-1:t+1;this.resize(a,-d,i,void 0,void 0,r,s)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();for(const e of this.viewItems)e.enabled=!0}onViewChange(e,t){const i=this.viewItems.indexOf(e);i<0||i>=this.viewItems.length||(t=bP(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!==mj.Idle)throw new Error("Cant modify splitview");if(this.state=mj.Busy,e<0||e>=this.viewItems.length)return;const i=dl(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)),r=this.viewItems[e];t=bP(t=Math.round(t),r.minimumSize,Math.min(r.maximumSize,this.size)),r.size=t,this.relayout(n,o),this.state=mj.Idle}distributeViewSizes(){const e=[];let t=0;for(const i of this.viewItems)i.maximumSize-i.minimumSize>0&&(e.push(i),t+=i.size);const i=Math.floor(t/e.length);for(const t of e)t.size=bP(i,t.minimumSize,t.maximumSize);const n=dl(this.viewItems.length),o=n.filter((e=>1===this.viewItems[e].priority)),r=n.filter((e=>2===this.viewItems[e].priority));this.relayout(o,r)}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!==mj.Idle)throw new Error("Cant modify splitview");this.state=mj.Busy;const o=tb(".split-view-view");i===this.viewItems.length?this.viewContainer.appendChild(o):this.viewContainer.insertBefore(o,this.viewContainer.children.item(i));const r=xc(e.onDidChange((e=>this.onViewChange(a,e))),Lc((()=>this.viewContainer.removeChild(o))));let s;s="number"==typeof t?t:"split"===t.type?this.getViewSize(t.index)/2:"invisible"===t.type?{cachedVisibleSize:t.cachedVisibleSize}:e.minimumSize;const a=0===this.orientation?new gj(o,e,s,r):new pj(o,e,s,r);if(this.viewItems.splice(i,0,a),this.viewItems.length>1){let e={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash};const t=0===this.orientation?new FM(this.sashContainer,{getHorizontalSashTop:e=>this.getSashPosition(e),getHorizontalSashWidth:this.getSashOrthogonalSize},Object.assign(Object.assign({},e),{orientation:1})):new FM(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=xc(Pc.map(t.onDidStart,n)(this.onSashStart,this),Pc.map(t.onDidChange,n)(this.onSashChange,this),Pc.map(t.onDidEnd,(()=>this.sashItems.findIndex((e=>e.sash===t))))(this.onSashEnd,this),t.onDidReset((()=>{const e=this.sashItems.findIndex((e=>e.sash===t)),i=dl(e,-1),n=dl(e+1,this.viewItems.length),o=this.findFirstSnapIndex(i),r=this.findFirstSnapIndex(n);("number"!=typeof o||this.viewItems[o].visible)&&("number"!=typeof r||this.viewItems[r].visible)&&this._onDidSashReset.fire(e)})),t),r={sash:t,disposable:o};this.sashItems.splice(i-1,0,r)}let l;o.appendChild(e.element),"number"!=typeof t&&"split"===t.type&&(l=[t.index]),n||this.relayout([i],l),this.state=mj.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,r=Number.NEGATIVE_INFINITY,s=Number.POSITIVE_INFINITY,a,l){if(e<0||e>=this.viewItems.length)return 0;const c=dl(e,-1),d=dl(e+1,this.viewItems.length);if(o)for(const e of o)ul(c,e),ul(d,e);if(n)for(const e of n)gl(c,e),gl(d,e);const h=c.map((e=>this.viewItems[e])),u=c.map((e=>i[e])),g=d.map((e=>this.viewItems[e])),p=d.map((e=>i[e])),m=c.reduce(((e,t)=>e+(this.viewItems[t].minimumSize-i[t])),0),f=c.reduce(((e,t)=>e+(this.viewItems[t].maximumSize-i[t])),0),_=0===d.length?Number.POSITIVE_INFINITY:d.reduce(((e,t)=>e+(i[t]-this.viewItems[t].minimumSize)),0),v=0===d.length?Number.NEGATIVE_INFINITY:d.reduce(((e,t)=>e+(i[t]-this.viewItems[t].maximumSize)),0),b=Math.max(m,v,r),w=Math.min(_,f,s);let y=!1;if(a){const e=this.viewItems[a.index],i=t>=a.limitDelta;y=i!==e.visible,e.setVisible(i,a.size)}if(!y&&l){const e=this.viewItems[l.index],i=t<l.limitDelta;y=i!==e.visible,e.setVisible(i,l.size)}if(y)return this.resize(e,t,i,n,o,r,s);for(let e=0,i=t=bP(t,b,w);e<h.length;e++){const t=h[e],n=bP(u[e]+i,t.minimumSize,t.maximumSize);i-=n-u[e],t.size=n}for(let e=0,i=t;e<g.length;e++){const t=g[e],n=bP(p[e]-i,t.minimumSize,t.maximumSize);i+=n-p[e],t.size=n}return t}distributeEmptySpace(e){const t=this.viewItems.reduce(((e,t)=>e+t.size),0);let i=this.size-t;const n=dl(this.viewItems.length-1,-1),o=n.filter((e=>1===this.viewItems[e].priority)),r=n.filter((e=>2===this.viewItems[e].priority));for(const e of r)ul(n,e);for(const e of o)gl(n,e);"number"==typeof e&&gl(n,e);for(let e=0;0!==i&&e<n.length;e++){const t=this.viewItems[n[e]],o=bP(t.size+i,t.minimumSize,t.maximumSize);i-=o-t.size,t.size=o}}layoutViews(){this.contentSize=this.viewItems.reduce(((e,t)=>e+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 r=n.map((t=>e=t.maximumSize-t.size>0||e)).reverse();let s=0;for(let e=0;e<this.sashItems.length;e++){const{sash:n}=this.sashItems[e];s+=this.viewItems[e].size;const a=!(t[e]&&r[e+1]),l=!(i[e]&&o[e+1]);if(a&&l){const i=dl(e,-1),r=dl(e+1,this.viewItems.length),a=this.findFirstSnapIndex(i),l=this.findFirstSnapIndex(r),c="number"==typeof a&&!this.viewItems[a].visible,d="number"==typeof l&&!this.viewItems[l].visible;c&&o[e]&&(s>0||this.startSnappingEnabled)?n.state=1:d&&t[e]&&(s<this.contentSize||this.endSnappingEnabled)?n.state=2:n.state=0}else n.state=a&&!l?1:!a&&l?2:3}}getSashPosition(e){let t=0;for(let i=0;i<this.sashItems.length;i++)if(t+=this.viewItems[i].size,this.sashItems[i].sash===e)return t;return 0}findFirstSnapIndex(e){for(const t of e){const e=this.viewItems[t];if(e.visible&&e.snap)return t}for(const t of e){const e=this.viewItems[t];if(e.visible&&e.maximumSize-e.minimumSize>0)return;if(!e.visible&&e.snap)return t}}dispose(){super.dispose(),kc(this.viewItems),this.viewItems=[],this.sashItems.forEach((e=>e.disposable.dispose())),this.sashItems=[]}}var vj,bj=i(1728),wj={};wj.styleTagTransform=uu(),wj.setAttributes=lu(),wj.insert=su().bind(null,"head"),wj.domAPI=ou(),wj.insertStyleElement=du(),iu()(bj.Z,wj),bj.Z&&bj.Z.locals&&bj.Z.locals;class yj{constructor(e,t,i){this.columns=e,this.getColumnSize=i,this.templateId=yj.TemplateId,this.renderedTemplates=new Set;const n=new Map(t.map((e=>[e.templateId,e])));this.renderers=[];for(const t of e){const e=n.get(t.templateId);if(!e)throw new Error(`Table cell renderer for template id ${t.templateId} not found.`);this.renderers.push(e)}}renderTemplate(e){const t=Zv(e,tb(".monaco-table-tr")),i=[],n=[];for(let e=0;e<this.columns.length;e++){const o=this.renderers[e],r=Zv(t,tb(".monaco-table-td",{"data-col-index":e}));r.style.width=`${this.getColumnSize(e)}px`,i.push(r),n.push(o.renderTemplate(r))}const o={container:e,cellContainers:i,cellTemplateData:n};return this.renderedTemplates.add(o),o}renderElement(e,t,i,n){for(let o=0;o<this.columns.length;o++){const r=this.columns[o].project(e);this.renderers[o].renderElement(r,t,i.cellTemplateData[o],n)}}disposeElement(e,t,i,n){for(let o=0;o<this.columns.length;o++){const r=this.renderers[o];if(r.disposeElement){const s=this.columns[o].project(e);r.disposeElement(s,t,i.cellTemplateData[o],n)}}}disposeTemplate(e){for(let t=0;t<this.columns.length;t++)this.renderers[t].disposeTemplate(e.cellTemplateData[t]);hv(e.container),this.renderedTemplates.delete(e)}layoutColumn(e,t){for(const{cellContainers:i}of this.renderedTemplates)i[e].style.width=`${t}px`}}yj.TemplateId="row";class Cj{constructor(e,t){this.column=e,this.index=t,this._onDidLayout=new Vc,this.onDidLayout=this._onDidLayout.event,this.element=tb(".monaco-table-th",{"data-col-index":t,title:e.tooltip},e.label)}get minimumSize(){var e;return null!==(e=this.column.minimumWidth)&&void 0!==e?e:120}get maximumSize(){var e;return null!==(e=this.column.maximumWidth)&&void 0!==e?e:Number.POSITIVE_INFINITY}get onDidChange(){var e;return null!==(e=this.column.onDidChangeWidthConstraints)&&void 0!==e?e:Pc.None}layout(e){this._onDidLayout.fire([this.index,e])}}class Sj{constructor(e,t,i,n,o,r){this.virtualDelegate=i,this.domId="table_id_"+ ++Sj.InstanceCount,this.disposables=new Ec,this.cachedWidth=0,this.cachedHeight=0,this.domNode=Zv(t,tb(`.monaco-table.${this.domId}`));const s=n.map(((e,t)=>new Cj(e,t))),a={size:s.reduce(((e,t)=>e+t.column.weight),0),views:s.map((e=>({size:e.column.weight,view:e})))};this.splitview=this.disposables.add(new _j(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 yj(n,o,(e=>this.splitview.getViewSize(e)));var c;this.list=this.disposables.add(new sj(e,this.domNode,(c=i,{getHeight:e=>c.getHeight(e),getTemplateId:()=>yj.TemplateId}),[l],r)),Pc.any(...s.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=jv(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()}}Sj.InstanceCount=0,function(e){e[e.Unknown=0]="Unknown",e[e.Twistie=1]="Twistie",e[e.Element=2]="Element"}(vj||(vj={}));class kj extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}}class xj{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 Lj(e){return"object"==typeof e&&"visibility"in e&&"data"in e}function Ej(e){switch(e){case!0:return 1;case!1:return 0;default:return e}}function Nj(e){return"boolean"==typeof e.collapsible}class Ij{constructor(e,t,i,n={}){this.user=e,this.list=t,this.rootRef=[],this.eventBufferer=new Hc,this._onDidChangeCollapseState=new Vc,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new Vc,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new Vc,this.onDidSplice=this._onDidSplice.event,this.refilterDelayer=new gm(um),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=Cc.empty(),n={}){if(0===e.length)throw new kj(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,r){var s;void 0===n&&(n=Cc.empty()),void 0===r&&(r=null!==(s=o.diffDepth)&&void 0!==s?s:0);const{parentNode:a}=this.getParentNodeWithListIndex(t);if(!a.lastDiffIds)return this.spliceSimple(t,i,n,o);const l=[...n],c=t[t.length-1],d=new Qm({getElements:()=>a.lastDiffIds},{getElements:()=>[...a.children.slice(0,c),...l,...a.children.slice(c+i)].map((t=>e.getId(t.element).toString()))}).ComputeDiff(!1);if(d.quitEarly)return a.lastDiffIds=void 0,this.spliceSimple(t,i,l,o);const h=t.slice(0,-1),u=(t,i,n)=>{if(r>0)for(let s=0;s<n;s++)t--,i--,this.spliceSmart(e,[...h,t,0],Number.MAX_SAFE_INTEGER,l[i].children,o,r-1)};let g=Math.min(a.children.length,c+i),p=l.length;for(const e of d.changes.sort(((e,t)=>t.originalStart-e.originalStart)))u(g,p,g-(e.originalStart+e.originalLength)),g=e.originalStart,p=e.modifiedStart-c,this.spliceSimple([...h,g],e.originalLength,Cc.slice(l,p,p+e.modifiedLength),o);u(g,p,g)}spliceSimple(e,t,i=Cc.empty(),{onDidCreateNode:n,onDidDeleteNode:o,diffIdentityProvider:r}){const{parentNode:s,listIndex:a,revealed:l,visible:c}=this.getParentNodeWithListIndex(e),d=[],h=Cc.map(i,(e=>this.createTreeNode(e,s,s.visible?1:0,l,d,n))),u=e[e.length-1],g=s.children.length>0;let p=0;for(let e=u;e>=0&&e<s.children.length;e--){const t=s.children[e];if(t.visible){p=t.visibleChildIndex;break}}const m=[];let f=0,_=0;for(const e of h)m.push(e),_+=e.renderNodeCount,e.visible&&(e.visibleChildIndex=p+f++);const v=pl(s.children,u,t,m);r?s.lastDiffIds?pl(s.lastDiffIds,u,t,m.map((e=>r.getId(e.element).toString()))):s.lastDiffIds=s.children.map((e=>r.getId(e.element).toString())):s.lastDiffIds=void 0;let b=0;for(const e of v)e.visible&&b++;if(0!==b)for(let e=u+m.length;e<s.children.length;e++){const t=s.children[e];t.visible&&(t.visibleChildIndex-=b)}if(s.visibleChildrenCount+=f-b,l&&c){const e=v.reduce(((e,t)=>e+(t.visible?t.renderNodeCount:0)),0);this._updateAncestorsRenderNodeCount(s,_-e),this.list.splice(a,e,d)}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=s.children.length>0;g!==w&&this.setCollapsible(e.slice(0,-1),w);let y=s;for(;y;){if(2===y.visibility){this.refilterDelayer.trigger((()=>this.refilter()));break}y=y.parent}}rerender(e){if(0===e.length)throw new kj(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),r=this._setListNodeCollapseState(i,n,o,t);if(i!==this.root&&this.autoExpandSingleChildren&&r&&!Nj(t)&&i.collapsible&&!i.collapsed&&!t.recursive){let n=-1;for(let e=0;e<i.children.length;e++)if(i.children[e].visible){if(n>-1){n=-1;break}n=e}n>-1&&this._setCollapseState([...e,n],t)}return r}_setListNodeCollapseState(e,t,i,n){const o=this._setNodeCollapseState(e,n,!1);if(!i||!e.visible||!o)return o;const r=e.renderNodeCount,s=this.updateNodeAfterCollapseChange(e),a=r-(-1===t?0:1);return this.list.splice(t+1,a,s.slice(1)),o}_setNodeCollapseState(e,t,i){let n;if(e===this.root?n=!1:(Nj(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})),!Nj(t)&&t.recursive)for(const i of e.children)n=this._setNodeCollapseState(i,t,!0)||n;return n}expandTo(e){this.eventBufferer.bufferEvents((()=>{let t=this.getTreeNode(e);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,r){const s={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(s,i);s.visibility=a,n&&o.push(s);const l=e.children||Cc.empty(),c=n&&0!==a&&!s.collapsed,d=Cc.map(l,(e=>this.createTreeNode(e,s,a,c,o,r)));let h=0,u=1;for(const e of d)s.children.push(e),u+=e.renderNodeCount,e.visible&&(e.visibleChildIndex=h++);return s.collapsible=s.collapsible||s.children.length>0,s.visibleChildrenCount=h,s.visible=2===a?h>0:1===a,s.visible?s.collapsed||(s.renderNodeCount=u):(s.renderNodeCount=0,n&&o.pop()),r&&r(s),s}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 r=i.length;e.renderNodeCount=e===this.root?0:1;let s=!1;if(e.collapsed&&0===o)e.visibleChildrenCount=0;else{let t=0;for(const r of e.children)s=this._updateNodeAfterFilterChange(r,o,i,n&&!e.collapsed)||s,r.visible&&(r.visibleChildIndex=t++);e.visibleChildrenCount=t}return e!==this.root&&(e.visible=2===o?s:1===o,e.visibility=o),e.visible?e.collapsed||(e.renderNodeCount+=i.length-r):(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):Lj(i)?(e.filterData=i.data,Ej(i.visibility)):(e.filterData=void 0,Ej(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 kj(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),r=e[e.length-1];if(r<0||r>t.children.length)throw new kj(this.user,"Invalid tree location");const s=t.children[r];return{node:s,listIndex:i,revealed:n,visible:o&&s.visible}}getParentNodeWithListIndex(e,t=this.root,i=0,n=!0,o=!0){const[r,...s]=e;if(r<0||r>t.children.length)throw new kj(this.user,"Invalid tree location");for(let e=0;e<r;e++)i+=t.children[e].renderNodeCount;return n=n&&!t.collapsed,o=o&&t.visible,0===s.length?{parentNode:t,listIndex:i,revealed:n,visible:o}:this.getParentNodeWithListIndex(s,t.children[r],i+1,n,o)}getNode(e=[]){return this.getTreeNode(e)}getNodeLocation(e){const t=[];let i=e;for(;i.parent;)t.push(i.parent.children.indexOf(i)),i=i.parent;return t.reverse()}getParentNodeLocation(e){return 0===e.length?void 0:1===e.length?[]:function(e){if(0===e.length)throw new Error("Invalid tail call");return[e.slice(0,e.length-1),e[e.length-1]]}(e)[0]}getFirstElementChild(e){const t=this.getTreeNode(e);if(0!==t.children.length)return t.children[0].element}}var Tj,Dj=i(1766),Aj={};Aj.styleTagTransform=uu(),Aj.setAttributes=lu(),Aj.insert=su().bind(null,"head"),Aj.domAPI=ou(),Aj.insertStyleElement=du(),iu()(Dj.Z,Aj),Dj.Z&&Dj.Z.locals&&Dj.Z.locals;class Oj extends Tz{constructor(e){super(e.elements.map((e=>e.element))),this.data=e}}function Mj(e){return e instanceof Tz?new Oj(e):e}class Rj{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=Nc.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(Mj(e),t)}onDragOver(e,t,i,n,o=!0){const r=this.dnd.onDragOver(Mj(e),t&&t.element,i,n),s=this.autoExpandNode!==t;if(s&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),void 0===t)return r;if(s&&"boolean"!=typeof r&&r.autoExpand&&(this.autoExpandDisposable=fm((()=>{const e=this.modelProvider(),i=e.getNodeLocation(t);e.isCollapsed(i)&&e.setCollapsed(i,!1),this.autoExpandNode=void 0}),500)),"boolean"==typeof r||!r.accept||void 0===r.bubble||r.feedback)return o?r:{accept:"boolean"==typeof r?r:r.accept,effect:"boolean"==typeof r?void 0:r.effect,feedback:[i]};if(1===r.bubble){const i=this.modelProvider(),o=i.getNodeLocation(t),r=i.getParentNodeLocation(o),s=i.getNode(r),a=r&&i.getListIndex(r);return this.onDragOver(e,s,a,n,!1)}const a=this.modelProvider(),l=a.getNodeLocation(t),c=a.getListIndex(l),d=a.getListRenderCount(l);return Object.assign(Object.assign({},r),{feedback:dl(c,c+d)})}drop(e,t,i,n){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(Mj(e),t&&t.element,i,n)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}}class Pj{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"}(Tj||(Tj={}));class Fj{constructor(e,t=[]){this._elements=t,this.onDidChange=Pc.forEach(e,(e=>this._elements=e))}get elements(){return this._elements}}class Bj{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=Bj.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.renderedIndentGuides=new $w,this.activeIndentNodes=new Set,this.indentGuidesDisposable=Nc.None,this.disposables=new Ec,this.templateId=e.templateId,this.updateOptions(o),Pc.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=bP(e.indent,0,40)),void 0!==e.renderIndentGuides){const t=e.renderIndentGuides!==Tj.None;if(t!==this.shouldRenderIndentGuides&&(this.shouldRenderIndentGuides=t,this.indentGuidesDisposable.dispose(),t)){const e=new Ec;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=Zv(e,tb(".monaco-tl-row")),i=Zv(t,tb(".monaco-tl-indent")),n=Zv(t,tb(".monaco-tl-twistie")),o=Zv(t,tb(".monaco-tl-contents")),r=this.renderer.renderTemplate(o);return{container:e,indent:i,twistie:n,indentGuidesDisposable:Nc.None,templateData:r}}renderElement(e,t,i,n){"number"==typeof n&&(this.renderedNodes.set(e,{templateData:i,height:n}),this.renderedElements.set(e.element,e));const o=Bj.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(...lh.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(...lh.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(hv(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const i=new Ec,n=this.modelProvider();let o=e;for(;;){const e=n.getNodeLocation(o),r=n.getParentNodeLocation(e);if(!r)break;const s=n.getNode(r),a=tb(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(s)&&a.classList.add("active"),0===t.indent.childElementCount?t.indent.appendChild(a):t.indent.insertBefore(a,t.indent.firstElementChild),this.renderedIndentGuides.add(s,a),i.add(Lc((()=>this.renderedIndentGuides.delete(s,a)))),o=s}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(e){}})),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(),kc(this.disposables)}}Bj.DefaultIndent=8;class Wj{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 Ec,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:Lj(i)?Ej(i.visibility):i,0===n)return!1}if(this._totalCount++,this.tree.options.simpleKeyboardNavigation||!this._pattern)return this._matchCount++,{data:OB.Default,visibility:!0};const i=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),n=Array.isArray(i)?i:[i];for(const e of n){const t=e&&e.toString();if(void 0===t)return{data:OB.Default,visibility:!0};const i=MB(this._pattern,this._lowercasePattern,0,t,t.toLowerCase(),0,!0);if(i)return this._matchCount++,1===n.length?{data:i,visibility:!0}:{data:{label:t,score:i},visibility:!0}}return this.tree.options.filterOnType?2:{data:OB.Default,visibility:!0}}reset(){this._totalCount=0,this._matchCount=0}dispose(){kc(this.disposables)}}class Vj{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 Vc,this.positionClassName="ne",this.automaticKeyboardNavigation=!0,this.triggered=!1,this._onDidChangePattern=new Vc,this.enabledDisposables=new Ec,this.disposables=new Ec,this.domNode=tb(`.monaco-list-type-filter.${this.positionClassName}`),this.domNode.draggable=!0,this.disposables.add(pv(this.domNode,"dragstart",(()=>this.onDragStart()))),this.messageDomNode=Zv(i.getHTMLElement(),tb(".monaco-list-type-filter-message")),this.labelDomNode=Zv(this.domNode,tb("span.label"));const r=Zv(this.domNode,tb(".controls"));this._filterOnType=!!e.options.filterOnType,this.filterOnTypeDomNode=Zv(r,tb("input.filter")),this.filterOnTypeDomNode.type="checkbox",this.filterOnTypeDomNode.checked=this._filterOnType,this.filterOnTypeDomNode.tabIndex=-1,this.updateFilterOnTypeTitleAndIcon(),this.disposables.add(pv(this.filterOnTypeDomNode,"input",(()=>this.onDidChangeFilterOnType()))),this.clearDomNode=Zv(r,tb("button.clear"+lh.treeFilterClear.cssSelector)),this.clearDomNode.tabIndex=-1,this.clearDomNode.title=ma(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 xM(this.view.getHTMLElement(),"keydown")),t=Pc.chain(e.event).filter((e=>!jz(e.target)||e.target===this.filterOnTypeDomNode)).filter((e=>"Dead"!==e.key&&!/^Media/.test(e.key))).map((e=>new ev(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&&(Pa?e.altKey&&!e.metaKey:e.ctrlKey)&&!e.shiftKey)).forEach((e=>{e.stopPropagation(),e.preventDefault()})).event,i=this.enabledDisposables.add(new xM(this.clearDomNode,"click"));Pc.chain(Pc.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&&(Pa?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=>!OB.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}=Iv(e),i=e.clientWidth,n=i/2,o=this.domNode.clientWidth,r=new Ec;let s=this.positionClassName;const a=()=>{switch(s){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=s,this.domNode.className=`monaco-list-type-filter ${this.positionClassName}`,this.domNode.style.top="",this.domNode.style.left="",kc(r)};a(),this.domNode.classList.remove(s),this.domNode.classList.add("dragging"),r.add(Lc((()=>this.domNode.classList.remove("dragging")))),r.add(pv(document,"dragover",(e=>(e=>{e.preventDefault();const i=e.clientX-t;e.dataTransfer&&(e.dataTransfer.dropEffect="none"),s=i<n?"nw":"ne",a()})(e)))),r.add(pv(this.domNode,"dragend",(()=>l()))),HM.CurrentDragAndDropData=new jM("vscode-ui"),r.add(Lc((()=>HM.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(...lh.treeFilterOnTypeOff.classNamesArray),this.filterOnTypeDomNode.classList.add(...lh.treeFilterOnTypeOn.classNamesArray),this.filterOnTypeDomNode.title=ma(0,"Disable Filter on Type")):(this.filterOnTypeDomNode.classList.remove(...lh.treeFilterOnTypeOn.classNamesArray),this.filterOnTypeDomNode.classList.add(...lh.treeFilterOnTypeOff.classNamesArray),this.filterOnTypeDomNode.title=ma(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=ma(0,"No elements found"),this._empty=!0):(this.messageDomNode.innerText="",this._empty=!1),this.domNode.classList.toggle("no-matches",e),this.domNode.title=ma(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||!OB.isDefault(e.filterData)}dispose(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.dispose(),this._enabled=!1,this.triggered=!1),this._onDidChangePattern.dispose(),kc(this.disposables)}}function zj(e){let t=vj.Unknown;return Fv(e.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?t=vj.Twistie:Fv(e.browserEvent.target,"monaco-tl-contents","monaco-tl-row")&&(t=vj.Element),{browserEvent:e.browserEvent,element:e.element?e.element.element:null,target:t}}function jj(e,t){t(e),e.children.forEach((e=>jj(e,t)))}class Hj{constructor(e,t){this.getFirstViewElementWithTrait=e,this.identityProvider=t,this.nodes=[],this._onDidChange=new Vc,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)&&rl(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=>jj(e,i))),void this.set([...e.values()])}const i=new Set,n=e=>i.add(this.identityProvider.getId(e.element).toString());t.forEach((e=>jj(e,n)));const o=new Map,r=e=>o.set(this.identityProvider.getId(e.element).toString(),e);e.forEach((e=>jj(e,r)));const s=[];for(const e of this.nodes){const t=this.identityProvider.getId(e.element).toString();if(i.has(t)){const e=o.get(t);e&&s.push(e)}else s.push(e)}if(this.nodes.length>0&&0===s.length){const e=this.getFirstViewElementWithTrait();e&&s.push(e)}this._set(s,!0)}createNodeSet(){const e=new Set;for(const t of this.nodes)e.add(t);return e}}class Uj extends Xz{constructor(e,t){super(e),this.tree=t}onViewPointer(e){if(jz(e.browserEvent.target)||Hz(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,r=i.getNodeLocation(t),s=e.browserEvent.altKey;if(this.tree.setFocus([r]),i.setCollapsed(r,void 0,s),o&&n)return}super.onViewPointer(e)}onDoubleClick(e){!e.browserEvent.target.classList.contains("monaco-tl-twistie")&&this.tree.expandOnDoubleClick&&super.onDoubleClick(e)}}class $j extends sj{constructor(e,t,i,n,o,r,s,a){super(e,t,i,n,a),this.focusTrait=o,this.selectionTrait=r,this.anchorTrait=s}createMouseController(e){return new Uj(this,e.tree)}splice(e,t,i=[]){if(super.splice(e,t,i),0===i.length)return;const n=[],o=[];let r;i.forEach(((t,i)=>{this.focusTrait.has(t)&&n.push(e+i),this.selectionTrait.has(t)&&o.push(e+i),this.anchorTrait.has(t)&&(r=e+i)})),n.length>0&&super.setFocus(ll([...super.getFocus(),...n])),o.length>0&&super.setSelection(ll([...super.getSelection(),...o])),"number"==typeof r&&super.setAnchor(r)}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 Kj{constructor(e,t,i,n,o={}){this._user=e,this._options=o,this.eventBufferer=new Hc,this.disposables=new Ec,this._onWillRefilter=new Vc,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new Vc;const r=new Pj(i),s=new Uc,a=new Uc,l=new Fj(a.event);this.renderers=n.map((e=>new Bj(e,(()=>this.model),s.event,l,o)));for(let e of this.renderers)this.disposables.add(e);let c;o.keyboardNavigationLabelProvider&&(c=new Wj(this,o.keyboardNavigationLabelProvider,o.filter),o=Object.assign(Object.assign({},o),{filter:c}),this.disposables.add(c)),this.focus=new Hj((()=>this.view.getFocusedElements()[0]),o.identityProvider),this.selection=new Hj((()=>this.view.getSelectedElements()[0]),o.identityProvider),this.anchor=new Hj((()=>this.view.getAnchorElement()),o.identityProvider),this.view=new $j(e,t,r,this.renderers,this.focus,this.selection,this.anchor,Object.assign(Object.assign({},function(e,t){return t&&Object.assign(Object.assign({},t),{identityProvider:t.identityProvider&&{getId:e=>t.identityProvider.getId(e.element)},dnd:t.dnd&&new Rj(e,t.dnd),multipleSelectionController:t.multipleSelectionController&&{isSelectionSingleChangeEvent:e=>t.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},e),{element:e.element})),isSelectionRangeChangeEvent:e=>t.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))},accessibilityProvider:t.accessibilityProvider&&Object.assign(Object.assign({},t.accessibilityProvider),{getSetSize(t){const i=e(),n=i.getNodeLocation(t),o=i.getParentNodeLocation(n);return i.getNode(o).visibleChildrenCount},getPosInSet:e=>e.visibleChildIndex+1,isChecked:t.accessibilityProvider&&t.accessibilityProvider.isChecked?e=>t.accessibilityProvider.isChecked(e.element):void 0,getRole:t.accessibilityProvider&&t.accessibilityProvider.getRole?e=>t.accessibilityProvider.getRole(e.element):()=>"treeitem",getAriaLabel:e=>t.accessibilityProvider.getAriaLabel(e.element),getWidgetAriaLabel:()=>t.accessibilityProvider.getWidgetAriaLabel(),getWidgetRole:t.accessibilityProvider&&t.accessibilityProvider.getWidgetRole?()=>t.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:t.accessibilityProvider&&t.accessibilityProvider.getAriaLevel?e=>t.accessibilityProvider.getAriaLevel(e.element):e=>e.depth,getActiveDescendantId:t.accessibilityProvider.getActiveDescendantId&&(e=>t.accessibilityProvider.getActiveDescendantId(e.element))}),keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},t.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel:e=>t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}),enableKeyboardNavigation:t.simpleKeyboardNavigation})}((()=>this.model),o)),{tree:this})),this.model=this.createModel(e,this.view,o),s.input=this.model.onDidChangeCollapseState;const d=Pc.forEach(this.model.onDidSplice,(e=>{this.eventBufferer.bufferEvents((()=>{this.focus.onDidModelSplice(e),this.selection.onDidModelSplice(e)}))}));if(d((()=>null),null,this.disposables),a.input=Pc.chain(Pc.any(d,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=Pc.chain(this.view.onKeyDown).filter((e=>!jz(e.target))).map((e=>new ev(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||$z;this.typeFilterController=new Vj(this,this.model,this.view,c,e),this.focusNavigationFilter=e=>this.typeFilterController.shouldAllowFocus(e),this.disposables.add(this.typeFilterController)}this.styleElement=jv(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===Tj.Always)}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return Pc.map(this.view.onMouseDblClick,zj)}get onPointer(){return Pc.map(this.view.onPointer,zj)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return Pc.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===Tj.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(){kc(this.disposables),this.view.dispose()}}class qj{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new Ij(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=Cc.empty(),i={}){const n=this.getElementLocation(e);this._setChildren(n,this.preserveCollapseState(t),i)}_setChildren(e,t=Cc.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 r=e;if(n.add(r.element),this.nodes.set(r.element,r),this.identityProvider){const e=this.identityProvider.getId(r.element).toString();o.add(e),this.nodesByIdentity.set(e,r)}null===(t=i.onDidCreateNode)||void 0===t||t.call(i,r)},onDidDeleteNode:e=>{var t;if(null===e.element)return;const r=e;if(n.has(r.element)||this.nodes.delete(r.element),this.identityProvider){const e=this.identityProvider.getId(r.element).toString();o.has(e)||this.nodesByIdentity.delete(e)}null===(t=i.onDidDeleteNode)||void 0===t||t.call(i,r)}}))}preserveCollapseState(e=Cc.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),Cc.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 kj(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(null===e)throw new kj(this.user,"Invalid getParentNodeLocation call");const t=this.nodes.get(e);if(!t)throw new kj(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 kj(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(t)}}function Gj(e){return{element:{elements:[e.element],incompressible:e.incompressible||!1},children:Cc.map(Cc.from(e.children),Gj),collapsible:e.collapsible,collapsed:e.collapsed}}function Yj(e){const t=[e.element],i=e.incompressible||!1;let n,o;for(;[o,n]=Cc.consume(Cc.from(e.children),2),1===o.length&&!o[0].incompressible;)e=o[0],t.push(e.element);return{element:{elements:t,incompressible:i},children:Cc.map(Cc.concat(o,n),Yj),collapsible:e.collapsible,collapsed:e.collapsed}}function Zj(e,t=0){let i;return i=t<e.element.elements.length-1?[Zj(e,t+1)]:Cc.map(Cc.from(e.children),(e=>Zj(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 Xj(e){return Zj(e,0)}function Jj(e,t,i){return e.element===t?Object.assign(Object.assign({},e),{children:i}):Object.assign(Object.assign({},e),{children:Cc.map(Cc.from(e.children),(e=>Jj(e,t,i)))})}class Qj{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new qj(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=Cc.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=Cc.map(t,this.enabled?Yj:Gj);return void this._setChildren(null,e,{diffIdentityProvider:n,diffDepth:1/0})}const r=this.nodes.get(e);if(!r)throw new Error("Unknown compressed tree node");const s=this.model.getNode(r),a=this.model.getParentNodeLocation(r),l=this.model.getNode(a),c=Jj(Xj(s),e,t),d=(this.enabled?Yj:Gj)(c),h=l.children.map((e=>e===s?d:e));this._setChildren(l.element,h,{diffIdentityProvider:n,diffDepth:s.depth-l.depth})}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;const t=this.model.getNode().children,i=Cc.map(t,Xj),n=Cc.map(i,e?Yj:Gj);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 kj(this.user,`Tree element not found: ${e}`);return t}}const eH=e=>e[e.length-1];class tH{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 tH(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 iH{constructor(e,t,i={}){this.rootRef=null,this.elementMapper=i.elementMapper||eH;const n=e=>this.elementMapper(e.elements);this.nodeMapper=new xj((e=>new tH(n,e))),this.model=new Qj(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 Pc.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 Pc.map(this.model.onDidChangeCollapseState,(({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t})))}get onDidChangeRenderNodeCount(){return Pc.map(this.model.onDidChangeRenderNodeCount,(e=>this.nodeMapper.map(e)))}setChildren(e,t=Cc.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)}}class nH extends Kj{constructor(e,t,i,n,o={}){super(e,t,i,n,o),this.user=e}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}setChildren(e,t=Cc.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 qj(e,t,i)}}class oH{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)}}!function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([ty],oH.prototype,"compressedTreeNodeProvider",null);class rH extends nH{constructor(e,t,i,n,o={}){const r=()=>this;super(e,t,i,n.map((e=>new oH(r,e))),function(e,t){return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(i){let n;try{n=e().getCompressedTreeNode(i)}catch(e){return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i)}return 1===n.element.elements.length?t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i):t.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(n.element.elements)}}})}(r,o))}setChildren(e,t=Cc.empty(),i){this.model.setChildren(e,t,i)}createModel(e,t,i){return new iH(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 sH=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function aH(e){return Object.assign(Object.assign({},e),{children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0})}function lH(e,t){return!!t.parent&&(t.parent===e||lH(e,t.parent))}class cH{constructor(e){this.node=e}get element(){return this.node.element.element}get children(){return this.node.children.map((e=>new cH(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 dH{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(...lh.treeItemLoading.classNamesArray),!0):(t.classList.remove(...lh.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 hH(e){return{browserEvent:e.browserEvent,elements:e.elements.map((e=>e.element))}}function uH(e){return{browserEvent:e.browserEvent,element:e.element&&e.element.element,target:e.target}}class gH extends Tz{constructor(e){super(e.elements.map((e=>e.element))),this.data=e}}function pH(e){return e instanceof Tz?new gH(e):e}class mH{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(pH(e),t)}onDragOver(e,t,i,n,o=!0){return this.dnd.onDragOver(pH(e),t&&t.element,i,n)}drop(e,t,i,n){this.dnd.drop(pH(e),t&&t.element,i,n)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}}function fH(e){return e&&Object.assign(Object.assign({},e),{collapseByDefault:!0,identityProvider:e.identityProvider&&{getId:t=>e.identityProvider.getId(t.element)},dnd:e.dnd&&new mH(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 _H(e,t){t(e),e.children.forEach((e=>_H(e,t)))}class vH{constructor(e,t,i,n,o,r={}){this.user=e,this.dataSource=o,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new Vc,this._onDidChangeNodeSlowState=new Vc,this.nodeMapper=new xj((e=>new cH(e))),this.disposables=new Ec,this.identityProvider=r.identityProvider,this.autoExpandSingleChildren=void 0!==r.autoExpandSingleChildren&&r.autoExpandSingleChildren,this.sorter=r.sorter,this.collapseByDefault=r.collapseByDefault,this.tree=this.createTree(e,t,i,n,r),this.root=aH({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 Pc.map(this.tree.onDidChangeFocus,hH)}get onDidChangeSelection(){return Pc.map(this.tree.onDidChangeSelection,hH)}get onMouseDblClick(){return Pc.map(this.tree.onMouseDblClick,uH)}get onPointer(){return Pc.map(this.tree.onPointer,uH)}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 r=new Pj(i),s=n.map((e=>new dH(e,this.nodeMapper,this._onDidChangeNodeSlowState.event))),a=fH(o)||{};return new nH(e,t,r,s,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 sH(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 sH(this,void 0,void 0,(function*(){if(void 0===this.root.element)throw new kj(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield Pc.toPromise(this._onDidRender.event));const r=this.getDataNode(e);if(yield this.refreshAndRenderNode(r,t,n,o),i)try{this.tree.rerender(r)}catch(e){}}))}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 sH(this,void 0,void 0,(function*(){if(void 0===this.root.element)throw new kj(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield Pc.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 Pc.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 Pc.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 kj(this.user,`Data tree node not found: ${e}`);return t}refreshAndRenderNode(e,t,i,n){return sH(this,void 0,void 0,(function*(){yield this.refreshNode(e,t,i),this.render(e,i,n)}))}refreshNode(e,t,i){return sH(this,void 0,void 0,(function*(){let n;return this.subTreeRefreshPromises.forEach(((o,r)=>{!n&&function(e,t){return e===t||lH(e,t)||lH(t,e)}(r,e)&&(n=o.then((()=>this.refreshNode(e,t,i))))})),n||this.doRefreshSubTree(e,t,i)}))}doRefreshSubTree(e,t,i){return sH(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 Sm.settled(o.map((e=>this.doRefreshSubTree(e,t,i))))}finally{n()}}))}doRefreshNode(e,t,i){return sH(this,void 0,void 0,(function*(){let n;if(e.hasChildren=!!this.dataSource.hasChildren(e.element),e.hasChildren){const t=this.doGetChildren(e);if(yl(t))n=Promise.resolve(t);else{const i=mm(800);i.then((()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)}),(e=>null)),n=t.finally((()=>i.cancel()))}}else n=Promise.resolve(Cc.empty());try{const o=yield n;return this.setChildren(e,o,t,i)}catch(t){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),_c(t))return[];throw t}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}}))}doGetChildren(e){let t=this.refreshPromises.get(e);if(t)return t;const i=this.dataSource.getChildren(e.element);return yl(i)?this.processChildren(i):(t=dm((()=>sH(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(gc))}setChildren(e,t,i,n){const o=[...t];if(0===e.children.length&&0===o.length)return[];const r=new Map,s=new Map;for(const t of e.children)if(r.set(t.element,t),this.identityProvider){const e=this.tree.isCollapsed(t);s.set(t.id,{node:t,collapsed:e})}const a=[],l=o.map((t=>{const o=!!this.dataSource.hasChildren(t);if(!this.identityProvider){const i=aH({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(),c=s.get(l);if(c){const e=c.node;return r.delete(e.element),this.nodes.delete(e.element),this.nodes.set(t,e),e.element=t,e.hasChildren=o,i?c.collapsed?(e.children.forEach((e=>_H(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 d=aH({element:t,parent:e,id:l,hasChildren:o});return n&&n.viewState.focus&&n.viewState.focus.indexOf(l)>-1&&n.focus.push(d),n&&n.viewState.selection&&n.viewState.selection.indexOf(l)>-1&&n.selection.push(d),n&&n.viewState.expanded&&n.viewState.expanded.indexOf(l)>-1?a.push(d):o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(d.collapsedByDefault=!1,a.push(d)),d}));for(const e of r.values())_H(e,(e=>this.nodes.delete(e.element)));for(const e of l)this.nodes.set(e.element,e);return e.children.splice(0,e.children.length,...l),e!==this.root&&this.autoExpandSingleChildren&&1===l.length&&0===a.length&&(l[0].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?Cc.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 bH{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 bH(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 wH{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(...lh.treeItemLoading.classNamesArray),!0):(t.classList.remove(...lh.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=kc(this.disposables)}}class yH extends vH{constructor(e,t,i,n,o,r,s={}){super(e,t,i,o,r,s),this.compressionDelegate=n,this.compressibleNodeMapper=new xj((e=>new bH(e))),this.filter=s.filter}createTree(e,t,i,n,o){const r=new Pj(i),s=n.map((e=>new wH(e,this.nodeMapper,(()=>this.compressibleNodeMapper),this._onDidChangeNodeSlowState.event))),a=function(e){const t=e&&fH(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 rH(e,t,r,s,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()),r=n(this.tree.getFocus());super.render(e,t);const s=this.getSelection();let a=!1;const l=this.getFocus();let c=!1;const d=e=>{const t=e.element;if(t)for(let e=0;e<t.elements.length;e++){const n=i(t.elements[e].element),d=t.elements[t.elements.length-1].element;o.has(n)&&-1===s.indexOf(d)&&(s.push(d),a=!0),r.has(n)&&-1===l.indexOf(d)&&(l.push(d),c=!0)}e.children.forEach(d)};d(this.tree.getCompressedTreeNode(e===this.root?null:e)),a&&this.setSelection(s),c&&this.setFocus(l)}processChildren(e){return this.filter&&(e=Cc.filter(e,(e=>{const t="boolean"==typeof(i=this.filter.filter(e,1))?i?1:0:Lj(i)?Ej(i.visibility):Ej(i);var i;if(2===t)throw new Error("Recursive tree visibility not supported in async data compressed trees");return 1===t}))),super.processChildren(e)}}class CH extends Kj{constructor(e,t,i,n,o,r={}){super(e,t,i,n,r),this.user=e,this.dataSource=o,this.identityProvider=r.identityProvider}createModel(e,t,i){return new qj(e,t,i)}}new Zb("isMac",Pa,ma(0,"Whether the operating system is macOS")),new Zb("isLinux",Fa,ma(0,"Whether the operating system is Linux")),new Zb("isWindows",Ra,ma(0,"Whether the operating system is Windows")),new Zb("isWeb",Wa,ma(0,"Whether the platform is a web browser")),new Zb("isMacNative",Pa&&!Wa,ma(0,"Whether the operating system is macOS on a non-browser platform")),new Zb("isIOS",za,ma(0,"Whether the operating system is iOS")),new Zb("isDevelopment",!1,!0);const SH="inputFocus";new Zb(SH,!1,ma(0,"Whether keyboard focus is inside an input box"));var kH=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},xH=function(e,t){return function(i,n){t(i,n,e)}};const LH=Mg("listService");let EH=class{constructor(e){this._themeService=e,this.disposables=new Ec,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 Jz(jv(),"");this.disposables.add(tW(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),xc(e.onDidFocus((()=>this.setLastFocusedList(e))),Lc((()=>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()}};EH=kH([xH(0,ow)],EH);const NH=new Zb("listFocus",!0),IH=new Zb("listSupportsMultiselect",!0),TH=(Tb.and(NH,Tb.not(SH)),new Zb("listHasSelectionOrFocus",!1)),DH=new Zb("listDoubleSelection",!1),AH=new Zb("listMultiSelection",!1),OH=new Zb("listSelectionNavigation",!1),MH=new Zb("treeElementCanCollapse",!1),RH=new Zb("treeElementHasParent",!1),PH=new Zb("treeElementCanExpand",!1),FH=new Zb("treeElementHasChild",!1),BH="listAutomaticKeyboardNavigation";function WH(e,t){const i=e.createScoped(t.getHTMLElement());return NH.bindTo(i),i}const VH="workbench.list.multiSelectModifier",zH="workbench.list.openMode",jH="workbench.list.horizontalScrolling",HH="workbench.list.keyboardNavigation",UH="workbench.list.automaticKeyboardNavigation",$H="workbench.tree.indent",KH="workbench.tree.renderIndentGuides",qH="workbench.list.smoothScrolling",GH="workbench.list.mouseWheelScrollSensitivity",YH="workbench.list.fastScrollSensitivity",ZH="workbench.tree.expandMode";function XH(e){return"alt"===e.getValue(VH)}class JH extends Nc{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=XH(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(VH)&&(this.useAltAsMultipleSelectionModifier=XH(this.configurationService))})))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:Gz(e)}isSelectionRangeChangeEvent(e){return Yz(e)}}function QH(e,t,i){var n;const o=new Ec;return[Object.assign(Object.assign({},e),{keyboardNavigationDelegate:{mightProducePrintableCharacter:e=>i.mightProducePrintableCharacter(e)},smoothScrolling:Boolean(t.getValue(qH)),mouseWheelScrollSensitivity:t.getValue(GH),fastScrollSensitivity:t.getValue(YH),multipleSelectionController:null!==(n=e.multipleSelectionController)&&void 0!==n?n:o.add(new JH(t))}),o]}let eU=class extends sj{constructor(e,t,i,n,o,r,s,a,l,c){const d=void 0!==o.horizontalScrolling?o.horizontalScrolling:Boolean(l.getValue(jH)),[h,u]=QH(o,l,c);super(e,t,i,n,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},QB(a.getColorTheme(),iW)),h),{horizontalScrolling:d})),this.disposables.add(u),this.contextKeyService=WH(r,this),this.themeService=a,this.listSupportsMultiSelect=IH.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==o.multipleSelectionSupport),OH.bindTo(this.contextKeyService).set(Boolean(o.selectionNavigation)),this.listHasSelectionOrFocus=TH.bindTo(this.contextKeyService),this.listDoubleSelection=DH.bindTo(this.contextKeyService),this.listMultiSelection=AH.bindTo(this.contextKeyService),this.horizontalScrolling=o.horizontalScrolling,this._useAltAsMultipleSelectionModifier=XH(l),this.disposables.add(this.contextKeyService),this.disposables.add(s.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(VH)&&(this._useAltAsMultipleSelectionModifier=XH(l));let t={};if(e.affectsConfiguration(jH)&&void 0===this.horizontalScrolling){const e=Boolean(l.getValue(jH));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(qH)){const e=Boolean(l.getValue(qH));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration(GH)){const e=l.getValue(GH);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(YH)){const e=l.getValue(YH);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new oU(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=tW(this,this.themeService,e)}dispose(){var e;null===(e=this._styler)||void 0===e||e.dispose(),super.dispose()}};eU=kH([xH(5,Xb),xH(6,LH),xH(7,ow),xH(8,Fp),xH(9,HP)],eU);let tU=class extends class{constructor(e,t,i,n,o={}){const r=()=>this.model,s=n.map((e=>new aj(e,r)));this.list=new sj(e,t,i,s,function(e,t){return Object.assign(Object.assign({},t),{accessibilityProvider:t.accessibilityProvider&&new lj(e,t.accessibilityProvider)})}(r,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 Pc.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 Pc.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 Pc.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,dl(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,r,s,a,l,c){const d=void 0!==o.horizontalScrolling?o.horizontalScrolling:Boolean(l.getValue(jH)),[h,u]=QH(o,l,c);super(e,t,i,n,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},QB(a.getColorTheme(),iW)),h),{horizontalScrolling:d})),this.disposables=new Ec,this.disposables.add(u),this.contextKeyService=WH(r,this),this.themeService=a,this.horizontalScrolling=o.horizontalScrolling,this.listSupportsMultiSelect=IH.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==o.multipleSelectionSupport),OH.bindTo(this.contextKeyService).set(Boolean(o.selectionNavigation)),this._useAltAsMultipleSelectionModifier=XH(l),this.disposables.add(this.contextKeyService),this.disposables.add(s.register(this)),o.overrideStyles&&this.updateStyles(o.overrideStyles),o.overrideStyles&&this.disposables.add(tW(this,a,o.overrideStyles)),this.disposables.add(l.onDidChangeConfiguration((e=>{e.affectsConfiguration(VH)&&(this._useAltAsMultipleSelectionModifier=XH(l));let t={};if(e.affectsConfiguration(jH)&&void 0===this.horizontalScrolling){const e=Boolean(l.getValue(jH));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(qH)){const e=Boolean(l.getValue(qH));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration(GH)){const e=l.getValue(GH);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(YH)){const e=l.getValue(YH);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new oU(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=tW(this,this.themeService,e)}dispose(){var e;null===(e=this._styler)||void 0===e||e.dispose(),this.disposables.dispose(),super.dispose()}};tU=kH([xH(5,Xb),xH(6,LH),xH(7,ow),xH(8,Fp),xH(9,HP)],tU);let iU=class extends Sj{constructor(e,t,i,n,o,r,s,a,l,c,d){const h=void 0!==r.horizontalScrolling?r.horizontalScrolling:Boolean(c.getValue(jH)),[u,g]=QH(r,c,d);super(e,t,i,n,o,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},QB(l.getColorTheme(),iW)),u),{horizontalScrolling:h})),this.disposables.add(g),this.contextKeyService=WH(s,this),this.themeService=l,this.listSupportsMultiSelect=IH.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==r.multipleSelectionSupport),OH.bindTo(this.contextKeyService).set(Boolean(r.selectionNavigation)),this.listHasSelectionOrFocus=TH.bindTo(this.contextKeyService),this.listDoubleSelection=DH.bindTo(this.contextKeyService),this.listMultiSelection=AH.bindTo(this.contextKeyService),this.horizontalScrolling=r.horizontalScrolling,this._useAltAsMultipleSelectionModifier=XH(c),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),r.overrideStyles&&this.updateStyles(r.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(c.onDidChangeConfiguration((e=>{e.affectsConfiguration(VH)&&(this._useAltAsMultipleSelectionModifier=XH(c));let t={};if(e.affectsConfiguration(jH)&&void 0===this.horizontalScrolling){const e=Boolean(c.getValue(jH));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(qH)){const e=Boolean(c.getValue(qH));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration(GH)){const e=c.getValue(GH);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(YH)){const e=c.getValue(YH);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new rU(this,Object.assign({configurationService:c},r)),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=tW(this,this.themeService,e)}dispose(){var e;null===(e=this._styler)||void 0===e||e.dispose(),this.disposables.dispose(),super.dispose()}};iU=kH([xH(6,Xb),xH(7,LH),xH(8,ow),xH(9,Fp),xH(10,HP)],iU);class nU extends Nc{constructor(e,t){var i;super(),this.widget=e,this._onDidOpen=this._register(new Vc),this.onDidOpen=this._onDidOpen.event,this._register(Pc.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(zH)),this._register(null==t?void 0:t.configurationService.onDidChangeConfiguration((()=>{this.openOnSingleClick="doubleClick"!==(null==t?void 0:t.configurationService.getValue(zH))})))):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 oU extends nU{constructor(e,t){super(e,t),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class rU extends nU{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class sU extends nU{constructor(e,t){super(e,t)}getSelectedElement(){var e;return null!==(e=this.widget.getSelection()[0])&&void 0!==e?e:void 0}}function aU(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 lU=class extends nH{constructor(e,t,i,n,o,r,s,a,l,c,d){const{options:h,getAutomaticKeyboardNavigation:u,disposable:g}=gU(t,o,r,l,c,d);super(e,t,i,n,h),this.disposables.add(g),this.internals=new pU(this,o,u,o.overrideStyles,r,s,a,l,d),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};lU=kH([xH(5,Xb),xH(6,LH),xH(7,ow),xH(8,Fp),xH(9,HP),xH(10,qw)],lU);let cU=class extends rH{constructor(e,t,i,n,o,r,s,a,l,c,d){const{options:h,getAutomaticKeyboardNavigation:u,disposable:g}=gU(t,o,r,l,c,d);super(e,t,i,n,h),this.disposables.add(g),this.internals=new pU(this,o,u,o.overrideStyles,r,s,a,l,d),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};cU=kH([xH(5,Xb),xH(6,LH),xH(7,ow),xH(8,Fp),xH(9,HP),xH(10,qw)],cU);let dU=class extends CH{constructor(e,t,i,n,o,r,s,a,l,c,d,h){const{options:u,getAutomaticKeyboardNavigation:g,disposable:p}=gU(t,r,s,c,d,h);super(e,t,i,n,o,u),this.disposables.add(p),this.internals=new pU(this,r,g,r.overrideStyles,s,a,l,c,h),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};dU=kH([xH(6,Xb),xH(7,LH),xH(8,ow),xH(9,Fp),xH(10,HP),xH(11,qw)],dU);let hU=class extends vH{constructor(e,t,i,n,o,r,s,a,l,c,d,h){const{options:u,getAutomaticKeyboardNavigation:g,disposable:p}=gU(t,r,s,c,d,h);super(e,t,i,n,o,u),this.disposables.add(p),this.internals=new pU(this,r,g,r.overrideStyles,s,a,l,c,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)}};hU=kH([xH(6,Xb),xH(7,LH),xH(8,ow),xH(9,Fp),xH(10,HP),xH(11,qw)],hU);let uU=class extends yH{constructor(e,t,i,n,o,r,s,a,l,c,d,h,u){const{options:g,getAutomaticKeyboardNavigation:p,disposable:m}=gU(t,s,a,d,h,u);super(e,t,i,n,o,r,g),this.disposables.add(m),this.internals=new pU(this,s,p,s.overrideStyles,a,l,c,d,u),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};function gU(e,t,i,n,o,r){var s;const a=()=>{let e=Boolean(i.getContextKeyValue(BH));return e&&(e=Boolean(n.getValue(UH))),e},l=r.isScreenReaderOptimized(),c=t.simpleKeyboardNavigation||l?"simple":n.getValue(HH),d=void 0!==t.horizontalScrolling?t.horizontalScrolling:Boolean(n.getValue(jH)),[h,u]=QH(t,n,o),g=t.additionalScrollHeight;return{getAutomaticKeyboardNavigation:a,disposable:u,options:Object.assign(Object.assign({keyboardSupport:!1},h),{indent:"number"==typeof n.getValue($H)?n.getValue($H):void 0,renderIndentGuides:n.getValue(KH),smoothScrolling:Boolean(n.getValue(qH)),automaticKeyboardNavigation:a(),simpleKeyboardNavigation:"simple"===c,filterOnType:"filter"===c,horizontalScrolling:d,keyboardNavigationEventFilter:aU(e,o),additionalScrollHeight:g,hideTwistiesOfChildlessElements:t.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:null!==(s=t.expandOnlyOnTwistieClick)&&void 0!==s?s:"doubleClick"===n.getValue(ZH)})}}uU=kH([xH(7,Xb),xH(8,LH),xH(9,ow),xH(10,Fp),xH(11,HP),xH(12,qw)],uU);let pU=class{constructor(e,t,i,n,o,r,s,a,l){this.tree=e,this.themeService=s,this.disposables=[],this.contextKeyService=WH(o,e),this.listSupportsMultiSelect=IH.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==t.multipleSelectionSupport),OH.bindTo(this.contextKeyService).set(Boolean(t.selectionNavigation)),this.hasSelectionOrFocus=TH.bindTo(this.contextKeyService),this.hasDoubleSelection=DH.bindTo(this.contextKeyService),this.hasMultiSelection=AH.bindTo(this.contextKeyService),this.treeElementCanCollapse=MH.bindTo(this.contextKeyService),this.treeElementHasParent=RH.bindTo(this.contextKeyService),this.treeElementCanExpand=PH.bindTo(this.contextKeyService),this.treeElementHasChild=FH.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=XH(a);const c=new Set;c.add(BH);const d=()=>{const t=l.isScreenReaderOptimized()?"simple":a.getValue(HH);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,r.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(VH)&&(this._useAltAsMultipleSelectionModifier=XH(a)),n.affectsConfiguration($H)){const e=a.getValue($H);o=Object.assign(Object.assign({},o),{indent:e})}if(n.affectsConfiguration(KH)){const e=a.getValue(KH);o=Object.assign(Object.assign({},o),{renderIndentGuides:e})}if(n.affectsConfiguration(qH)){const e=Boolean(a.getValue(qH));o=Object.assign(Object.assign({},o),{smoothScrolling:e})}if(n.affectsConfiguration(HH)&&d(),n.affectsConfiguration(UH)&&(o=Object.assign(Object.assign({},o),{automaticKeyboardNavigation:i()})),n.affectsConfiguration(jH)&&void 0===t.horizontalScrolling){const e=Boolean(a.getValue(jH));o=Object.assign(Object.assign({},o),{horizontalScrolling:e})}if(n.affectsConfiguration(ZH)&&void 0===t.expandOnlyOnTwistieClick&&(o=Object.assign(Object.assign({},o),{expandOnlyOnTwistieClick:"doubleClick"===a.getValue(ZH)})),n.affectsConfiguration(GH)){const e=a.getValue(GH);o=Object.assign(Object.assign({},o),{mouseWheelScrollSensitivity:e})}if(n.affectsConfiguration(YH)){const e=a.getValue(YH);o=Object.assign(Object.assign({},o),{fastScrollSensitivity:e})}Object.keys(o).length>0&&e.updateOptions(o)})),this.contextKeyService.onDidChangeContext((t=>{t.affectsSome(c)&&e.updateOptions({automaticKeyboardNavigation:i()})})),l.onDidChangeScreenReaderOptimized((()=>d()))),this.navigator=new sU(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){kc(this.styler),this.styler=e?tW(this.tree,this.themeService,e):Nc.None}dispose(){this.disposables=kc(this.disposables),kc(this.styler),this.styler=void 0}};var mU;pU=kH([xH(4,Xb),xH(5,LH),xH(6,ow),xH(7,Fp),xH(8,qw)],pU),iw.as(XI).registerConfiguration({id:"workbench",order:7,title:ma(0,"Workbench"),type:"object",properties:{[VH]:{type:"string",enum:["ctrlCmd","alt"],enumDescriptions:[ma(0,"Maps to `Control` on Windows and Linux and to `Command` on macOS."),ma(0,"Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:ma(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.")},[zH]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:ma(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.")},[jH]:{type:"boolean",default:!1,description:ma(0,"Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[$H]:{type:"number",default:8,minimum:4,maximum:40,description:ma(0,"Controls tree indentation in pixels.")},[KH]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:ma(0,"Controls whether the tree should render indent guides.")},[qH]:{type:"boolean",default:!1,description:ma(0,"Controls whether lists and trees have smooth scrolling.")},[GH]:{type:"number",default:1,description:ma(0,"A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[YH]:{type:"number",default:5,description:ma(0,"Scrolling speed multiplier when pressing `Alt`.")},[HH]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[ma(0,"Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),ma(0,"Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),ma(0,"Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:ma(0,"Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter.")},[UH]:{type:"boolean",default:!0,markdownDescription:ma(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.")},[ZH]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:ma(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"}(mU||(mU={}));const fU="workbench.contributions.quickaccess";iw.add(fU,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)),Lc((()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)}))}getQuickAccessProviders(){return sl([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find((t=>e.startsWith(t.prefix)))||this.defaultProvider}});const _U=Mg("quickInputService");var vU=function(e,t){return function(i,n){t(i,n,e)}};let bU=class extends Nc{constructor(e,t){super(),this.quickInputService=e,this.instantiationService=t,this.registry=iw.as(fU),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,r]=this.getOrInstantiateProvider(e),s=this.visibleQuickAccess,a=null==s?void 0:s.descriptor;if(s&&r&&a===r)return e===r.prefix||(null==i?void 0:i.preserveValue)||(s.picker.value=e),void this.adjustValueSelection(s.picker,r,i);if(r&&!(null==i?void 0:i.preserveValue)){let t;if(s&&a&&a!==r){const e=s.value.substr(a.prefix.length);e&&(t=`${r.prefix}${e}`)}if(!t){const e=null==o?void 0:o.defaultFilterValue;e===mU.LAST?t=this.lastAcceptedPickerValues.get(r):"string"==typeof e&&(t=`${r.prefix}${e}`)}"string"==typeof t&&(e=t)}const l=new Ec,c=l.add(this.quickInputService.createQuickPick());let d;c.value=e,this.adjustValueSelection(c,r,i),c.placeholder=null==r?void 0:r.placeholder,c.quickNavigate=null==i?void 0:i.quickNavigateConfiguration,c.hideInput=!!c.quickNavigate&&!s,("number"==typeof(null==i?void 0:i.itemActivation)||(null==i?void 0:i.quickNavigateConfiguration))&&(c.itemActivation=null!==(n=null==i?void 0:i.itemActivation)&&void 0!==n?n:OV.SECOND),c.contextKey=null==r?void 0:r.contextKey,c.filterValue=e=>e.substring(r?r.prefix.length:0),(null==r?void 0:r.placeholder)&&(c.ariaLabel=null==r?void 0:r.placeholder),t&&(d=new Cm,l.add(yc(c.onWillAccept)((e=>{e.veto(),c.hide()})))),l.add(this.registerPickerListeners(c,o,r,e));const h=l.add(new Gc);return o&&l.add(o.provide(c,h.token)),yc(c.onDidHide)((()=>{0===c.selectedItems.length&&h.cancel(),l.dispose(),null==d||d.complete(c.selectedItems.slice(0))})),c.show(),t?null==d?void 0:d.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 Ec,r=this.visibleQuickAccess={picker:e,descriptor:i,value:n};return o.add(Lc((()=>{r===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)}))),o.add(e.onDidChangeValue((e=>{const[i]=this.getOrInstantiateProvider(e);i!==t?this.show(e,{preserveValue:!0}):r.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]}};bU=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([vU(0,_U),vU(1,Ag)],bU);var wU=function(e,t){return function(i,n){t(i,n,e)}};let yU=class extends uw{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(bU))),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(eU,e,t,i,n,o),styles:this.computeStyles()},r=this._register(new bz(Object.assign(Object.assign({},o),t)));return r.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 r.layout(t,null!==(n=null===(i=e.offset)||void 0===i?void 0:i.top)&&void 0!==n?n:0)}))),this._register(r.onShow((()=>this.resetContextKeys()))),this._register(r.onHide((()=>this.resetContextKeys()))),r}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new Zb(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=Kc.None){return this.controller.pick(e,t,i)}createQuickPick(){return this.controller.createQuickPick()}updateStyles(){this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:Object.assign({},QB(this.theme,{quickInputBackground:dC,quickInputForeground:hC,quickInputTitleBackground:uC,contrastBorder:by,widgetShadow:yy})),inputBox:QB(this.theme,{inputForeground:Sy,inputBackground:Cy,inputBorder:ky,inputValidationInfoBackground:xy,inputValidationInfoForeground:Ly,inputValidationInfoBorder:Ey,inputValidationWarningBackground:Ny,inputValidationWarningForeground:Iy,inputValidationWarningBorder:Ty,inputValidationErrorBackground:Dy,inputValidationErrorForeground:Ay,inputValidationErrorBorder:Oy}),countBadge:QB(this.theme,{badgeBackground:zy,badgeForeground:jy,badgeBorder:by}),button:QB(this.theme,{buttonForeground:Fy,buttonBackground:By,buttonHoverBackground:Wy,buttonBorder:by}),progressBar:QB(this.theme,{progressBarBackground:qy}),keybindingLabel:QB(this.theme,{keybindingLabelBackground:mC,keybindingLabelForeground:fC,keybindingLabelBorder:_C,keybindingLabelBottomBorder:vC,keybindingLabelShadow:yy}),list:QB(this.theme,{listBackground:dC,listInactiveFocusForeground:uS,listInactiveSelectionIconForeground:gS,listInactiveFocusBackground:pS,listFocusOutline:wy,listInactiveFocusOutline:wy,pickerGroupBorder:pC,pickerGroupForeground:gC})}}};yU=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([wU(0,Ag),wU(1,Xb),wU(2,ow),wU(3,qw),wU(4,jR)],yU);var CU=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},SU=function(e,t){return function(i,n){t(i,n,e)}};let kU=class extends yU{constructor(e,t,i,n,o,r){super(t,i,n,o,new KR(e.getContainerDomNode(),r)),this.host=void 0;const s=LU.get(e);if(s){const t=s.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)}};kU=CU([SU(1,Ag),SU(2,Xb),SU(3,ow),SU(4,qw),SU(5,Rg)],kU);let xU=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(kU,e);this.mapEditorToService.set(e,t),yc(e.onDidDispose)((()=>{i.dispose(),this.mapEditorToService.delete(e)}))}return t}get quickAccess(){return this.activeService.quickAccess}pick(e,t={},i=Kc.None){return this.activeService.pick(e,t,i)}createQuickPick(){return this.activeService.createQuickPick()}};xU=CU([SU(0,Ag),SU(1,Rg)],xU);class LU{constructor(e){this.editor=e,this.widget=new EU(this.editor)}static get(e){return e.getContribution(LU.ID)}dispose(){this.widget.dispose()}}LU.ID="editor.controller.quickInput";class EU{constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return EU.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}EU.ID="editor.contrib.quickInputWidget",Dw(LU.ID,LU);class NU{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 IU=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;class TU{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(e){if(null===e)return 0;const t=e.match(IU);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]=dy.fromHex("#"+e),i)}getColorMap(){return this._id2color.slice(0)}}class DU{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<o;n++){const o=e[n];let r=-1;if("string"==typeof o.fontStyle){r=0;const e=o.fontStyle.split(" ");for(let t=0,i=e.length;t<i;t++)switch(e[t]){case"italic":r|=1;break;case"bold":r|=2;break;case"underline":r|=4;break;case"strikethrough":r|=8}}let s=null;"string"==typeof o.foreground&&(s=o.foreground);let a=null;"string"==typeof o.background&&(a=o.background),t[i++]=new NU(o.token||"",n,r,s,a)}return t}(e),t)}static createFromParsedTokenTheme(e,t){return function(e,t){e.sort(((e,t)=>{const i=function(e,t){return e<t?-1:e>t?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 r=new TU;for(let e of t)r.getId(e);const s=r.getId(n),a=r.getId(o),l=new OU(i,s,a),c=new MU(l);for(let t=0,i=e.length;t<i;t++){const i=e[t];c.insert(i.token,i.fontStyle,r.getId(i.foreground),r.getId(i.background))}return new DU(r,c)}(e,t)}getColorMap(){return this._colorMap.getColorMap()}_match(e){return this._root.match(e)}match(e,t){let i=this._cache.get(t);if(void 0===i){const e=this._match(t),n=function(e){const t=e.match(AU);if(!t)return 0;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":case"regexp":return 3}throw new Error("Unexpected match for standard token type!")}(t);i=(e.metadata|n<<8)>>>0,this._cache.set(t,i)}return(i|e<<0)>>>0}}const AU=/\b(comment|string|regex|regexp)\b/;class OU{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 OU(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 MU{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 r,s;-1===o?(r=e,s=""):(r=e.substring(0,o),s=e.substring(o+1));let a=this._children.get(r);void 0===a&&(a=new MU(this._mainRule.clone()),this._children.set(r,a)),a.insert(s,t,i,n)}}const RU={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:{[rC]:"#FFFFFE",[sC]:"#000000",[yC]:"#E5EBF1",[vx]:"#D3D3D3",[bx]:"#939393",[CC]:"#ADD6FF4D"}},PU={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:{[rC]:"#1E1E1E",[sC]:"#D4D4D4",[yC]:"#3A3D41",[vx]:"#404040",[bx]:"#707070",[CC]:"#ADD6FF26"}},FU={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:{[rC]:"#000000",[sC]:"#FFFFFF",[vx]:"#FFFFFF",[bx]:"#FFFFFF"}};class BU{getIcon(e){const t=JM();let i=e.defaults;for(;sw.isThemeIcon(i);){const e=t.getIcon(i.id);if(!e)return;i=e.defaults}return i}}const WU="vs",VU="vs-dark",zU="hc-black",jU=iw.as(py),HU=iw.as(cw);class UU{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;const i=t.base;e.length>0?($U(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,dy.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){const t=KU(this.themeData.base);for(let i in t.colors)e.has(i)||e.set(i,dy.fromHex(t.colors[i]))}this.colors=e}return this.colors}getColor(e,t){return this.getColors().get(e)||(!1!==t?this.getDefault(e):void 0)}getDefault(e){let t=this.defaultColors[e];return t||(t=jU.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return Object.prototype.hasOwnProperty.call(this.getColors(),e)}get type(){switch(this.base){case WU:return nw.LIGHT;case zU:return nw.HIGH_CONTRAST;default:return nw.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){const i=KU(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=DU.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,i){const n=this.tokenTheme._match([e].concat(t).join(".")).metadata,o=ch.getForeground(n),r=ch.getFontStyle(n);return{foreground:o,italic:Boolean(1&r),bold:Boolean(2&r),underline:Boolean(4&r),strikethrough:Boolean(8&r)}}}function $U(e){return e===WU||e===VU||e===zU}function KU(e){switch(e){case WU:return RU;case VU:return PU;case zU:return FU}}function qU(e){const t=KU(e);return new UU(e,t)}const GU=Mg("themeService");var YU=function(e,t){return function(i,n){t(i,n,e)}};let ZU=class extends Nc{constructor(e,t){super(),this._contextKeyService=e,this._configurationService=t,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new Vc,this._accessibilityModeEnabledContext=Gw.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}};ZU=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([YU(0,Xb),YU(1,Fp)],ZU);var XU=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},JU=function(e,t){return function(i,n){t(i,n,e)}};let QU=class{constructor(e){this._commandService=e}createMenu(e,t,i){return new e$(e,Object.assign({emitEventsForSubmenuChanges:!1,eventDebounceDelay:50},i),this._commandService,t,this)}};QU=XU([JU(0,Lb)],QU);let e$=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 Ec,this._menuGroups=[],this._contextKeys=new Set,this._build();const r=new bm((()=>{this._build(),this._onDidChange.fire(this)}),t.eventDebounceDelay);this._disposables.add(r),this._disposables.add(_w.onDidChangeMenu((t=>{t.has(e)&&r.schedule()})));const s=this._disposables.add(new Ec);this._onDidChange=new Vc({onFirstListenerAdd:()=>{const e=new bm((()=>this._onDidChange.fire(this)),t.eventDebounceDelay);s.add(e),s.add(n.onDidChangeContext((t=>{t.affectsSome(this._contextKeys)&&e.schedule()})))},onLastListenerRemove:s.clear.bind(s)}),this.onDidChange=this._onDidChange.event}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}_build(){this._menuGroups.length=0,this._contextKeys.clear();const t=_w.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),pw(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&&_w.getMenuItems(t.submenu).forEach(this._collectContextKeys,this)}getActions(e){const t=[];for(let i of this._menuGroups){const[n,o]=i,r=[];for(const t of o)if(this._contextKeyService.contextMatchesRules(t.when)){const i=pw(t)?new bw(t.command,t.alt,e,this._contextKeyService,this._commandService):new vw(t,this._menuService,this._contextKeyService,e);r.push(i)}r.length>0&&t.push([n,r])}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 r=t.order||0,s=i.order||0;return r<s?-1:r>s?1:e._compareTitles(pw(t)?t.command.title:t.title,pw(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)}};e$=XU([JU(2,Lb),JU(3,Xb),JU(4,fw)],e$);var t$=function(e,t){return function(i,n){t(i,n,e)}},i$=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};let n$=class extends Nc{constructor(e,t){super(),this.layoutService=e,this.logService=t,this.mapTextToType=new Map,this.findText="",(mg||fg)&&this.installWebKitWriteTextWorkaround()}installWebKitWriteTextWorkaround(){const e=()=>{const e=new Cm;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=e,navigator.clipboard.write([new ClipboardItem({"text/plain":e.p})]).catch((t=>i$(this,void 0,void 0,(function*(){t instanceof Error&&"NotAllowedError"===t.name&&e.isRejected||this.logService.error(t)}))))};this.layoutService.hasContainer&&(this._register(pv(this.layoutService.container,"click",e)),this._register(pv(this.layoutService.container,"keydown",e)))}writeText(e,t){return i$(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(e){console.error(e)}const i=document.activeElement,n=document.body.appendChild(tb("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 i$(this,void 0,void 0,(function*(){if(e)return this.mapTextToType.get(e)||"";try{return yield navigator.clipboard.readText()}catch(e){return console.error(e),""}}))}readFindText(){return i$(this,void 0,void 0,(function*(){return this.findText}))}writeFindText(e){return i$(this,void 0,void 0,(function*(){this.findText=e}))}};n$=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([t$(0,jR),t$(1,Ff)],n$);const o$="data-keybinding-context";class r${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 s$ extends r${constructor(){super(-1,null)}setValue(e,t){return!1}removeValue(e){return!1}getValue(e){}}s$.INSTANCE=new s$;class a$ extends r${constructor(e,t,i){super(e,null),this._configurationService=t,this._values=pP.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration((e=>{if(6===e.source){const e=Array.from(Cc.map(this._values,(([e])=>e)));this._values.clear(),i.fire(new d$(e))}else{const t=[];for(const i of e.affectedKeys){const e=`config.${i}`,n=this._values.findSuperstr(e);void 0!==n&&(t.push(...Cc.map(n,(([e])=>e))),this._values.deleteSuperstr(e)),this._values.has(e)&&(t.push(e),this._values.delete(e))}i.fire(new d$(t))}}))}dispose(){this._listener.dispose()}getValue(e){if(0!==e.indexOf(a$._keyPrefix))return super.getValue(e);if(this._values.has(e))return this._values.get(e);const t=e.substr(a$._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)}}a$._keyPrefix="config.";class l${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 c${constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}}class d${constructor(e){this.keys=e}affectsSome(e){for(const t of this.keys)if(e.has(t))return!0;return!1}}class h${constructor(e){this.events=e}affectsSome(e){for(const t of this.events)if(t.affectsSome(e))return!0;return!1}}class u${constructor(e){this._onDidChangeContext=new zc({merge:e=>new h$(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 l$(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 p$(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 c$(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new c$(e))}getContext(e){return this._isDisposed?s$.INSTANCE:this.getContextValuesContainer(function(e){for(;e;){if(e.hasAttribute(o$)){const t=e.getAttribute(o$);return t?parseInt(t,10):NaN}e=e.parentElement}return 0}(e))}}let g$=class extends u${constructor(e){super(0),this._contexts=new Map,this._toDispose=new Ec,this._lastContextId=0;const t=new a$(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?s$.INSTANCE:this._contexts.get(e)||s$.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 r$(t,this.getContextValuesContainer(e))),t}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};g$=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([function(e,t){return function(i,n){t(i,n,e)}}(0,Fp)],g$);class p$ extends u${constructor(e,t){if(super(e.createChildContext()),this._parentChangeListener=new Ic,this._parent=e,this._updateParentChangeListener(),this._domNode=t,this._domNode.hasAttribute(o$)){let e="";this._domNode.classList&&(e=Array.from(this._domNode.classList.values()).join(", ")),console.error("Element already has context attribute"+(e?": "+e:""))}this._domNode.setAttribute(o$,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(o$),this._isDisposed=!0)}getContextValuesContainer(e){return this._isDisposed?s$.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)}}Eb.registerCommand("setContext",(function(e,t,i){e.get(Xb).createKey(String(t),i)})),Eb.registerCommand({id:"getContextKeyInfo",handler:()=>[...Zb.all()].sort(((e,t)=>e.key.localeCompare(t.key))),description:{description:ma(0,"A command that returns information about context keys"),args:[]}}),Eb.registerCommand("_generateContextKeyInfo",(function(){const e=[],t=new Set;for(let i of Zb.all())t.has(i.key)||(t.add(i.key),e.push(i));e.sort(((e,t)=>e.key.localeCompare(t.key))),console.log(JSON.stringify(e,void 0,2))}));class m${constructor(e){this.incoming=new Map,this.outgoing=new Map,this.data=e}}class f${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 e of this._nodes.values())e.outgoing.delete(t),e.incoming.delete(t)}lookupOrInsertNode(e){const t=this._hashFn(e);let i=this._nodes.get(t);return i||(i=new m$(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 _$ 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 v${constructor(e=new WO,t=!1,i){this._activeInstantiations=new Set,this._services=e,this._strict=t,this._parent=i,this._services.set(Ag,this)}createChild(e){return new v$(e,this._strict,this)}invokeFunction(e,...t){let i=b$.traceInvocation(e),n=!1;try{return e({get:e=>{if(n)throw"service accessor is only valid during the invocation of its target method"?new Error("Illegal state: service accessor is only valid during the invocation of its target method"):new Error("Illegal state");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 Up?(i=b$.traceCreation(e.ctor),n=this._createInstance(e.ctor,e.staticArguments.concat(t),i)):(i=b$.traceCreation(e),n=this._createInstance(e,t,i)),i.stop(),n}_createInstance(e,t=[],i){let n=Dg.getServiceDependencies(e).sort(((e,t)=>e.index-t.index)),o=[];for(const t of n){let n=this._getOrCreateServiceInstance(t.id,i);n||this._throwIfStrict(`[createInstance] ${e.name} depends on UNKNOWN service ${t.id}.`,!1),o.push(n)}let r=n.length>0?n[0].index:t.length;if(t.length!==r){console.warn(`[createInstance] First service dependency of ${e.name} at position ${r+1} conflicts with ${t.length} static arguments`);let i=r-t.length;t=i>0?t.concat(new Array(i)):t.slice(0,r)}return new e(...[...t,...o])}_setServiceInstance(e,t){if(this._services.get(e)instanceof Up)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 Up?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 f$((e=>e.id.toString()));let o=0;const r=[{id:e,desc:t,_trace:i}];for(;r.length;){const t=r.pop();if(n.lookupOrInsertNode(t),o++>1e3)throw new _$(n);for(let i of Dg.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 Up){const e={id:i.id,desc:o,_trace:t._trace.branch(i.id,!0)};n.insertEdge(t,e),r.push(e)}}}for(;;){const e=n.roots();if(0===e.length){if(!n.isEmpty())throw new _$(n);break}for(const{data:t}of e){if(this._getServiceInstanceOrDescriptor(t.id)instanceof Up){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 Up)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 ym((()=>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(t&&console.warn(t),this._strict)throw new Error(e)}}class b${constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}static traceInvocation(e){return b$._None}static traceCreation(e){return b$._None}branch(e,t){let i=new b$(2,e.toString());return this._dep.push([e,t,i]),i}stop(){let e=Date.now()-this._start;b$._totals+=e;let t=!1,i=[`${0===this.type?"CREATE":"CALL"} ${this.name}`,`${function e(i,n){let o=[],r=new Array(i+1).join("\t");for(const[s,a,l]of n._dep)if(a&&l){t=!0,o.push(`${r}CREATES -> ${s}`);let n=e(i+1,l);n&&o.push(n)}else o.push(`${r}uses -> ${s}`);return o.join("\n")}(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${b$._totals.toFixed(2)}ms)`];(e>2||t)&&console.log(i.join("\n"))}}b$._None=new class extends b${constructor(){super(-1,null)}stop(){}branch(){return this}},b$._totals=0;class w${constructor(){this._byResource=new fP,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 fP,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 r=this._byOwner.get(t);if(r&&(n=r.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:Cc.empty():Bd.isUri(e)?null!==(o=null===(n=this._byResource.get(e))||void 0===n?void 0:n.values())&&void 0!==o?o:Cc.empty():Cc.map(Cc.concat(...this._byOwner.values()),(e=>e[1]))}}class y${constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new fP,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===av.inMemory||e.scheme===av.walkThrough||e.scheme===av.walkThroughSnippet)return t;for(const{severity:i}of this._service.read({resource:e}))i===wW.Error?t.errors+=1:i===wW.Warning?t.warnings+=1:i===wW.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 C${constructor(){this._onMarkerChanged=new jc({delay:0,merge:C$._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new w$,this._stats=new y$(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(n=i,Array.isArray(n)&&0!==n.length){const n=[];for(const o of i){const i=C$._toMarker(e,t,o);i&&n.push(i)}this._data.set(t,e,n),this._onMarkerChanged.fire([t])}else this._data.delete(t,e)&&this._onMarkerChanged.fire([t]);var n}static _toMarker(e,t,i){let{code:n,severity:o,message:r,source:s,startLineNumber:a,startColumn:l,endLineNumber:c,endColumn:d,relatedInformation:h,tags:u}=i;if(r)return a=a>0?a:1,l=l>0?l:1,c=c>=a?c:a,d=d>0?d:l,{resource:t,owner:e,code:n,severity:o,message:r,source:s,startLineNumber:a,startColumn:l,endLineNumber:c,endColumn:d,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(C$._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),r=[];for(const t of e)for(const e of t)if(C$._accept(e,n)){const t=r.push(e);if(o>0&&t===o)return r}return r}{const e=[];for(let t of this._data.values())for(let i of t)if(C$._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 fP;for(let i of e)for(let e of i)t.set(e,!0);return Array.from(t.keys())}}var S$,k$=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,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"}(S$||(S$={}));class x$ extends Nc{constructor(e,t=Object.create(null)){super(),this.database=e,this.options=t,this._onDidChangeStorage=this._register(new Vc),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=S$.None,this.cache=new Map,this.flushDelayer=new pm(x$.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===S$.Closed)return;let i=!1;xl(t)?i=this.cache.delete(e):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 xl(i)?t:i}getBoolean(e,t){const i=this.get(e);return xl(i)?t:"true"===i}getNumber(e,t){const i=this.get(e);return xl(i)?t:parseInt(i,10)}set(e,t){return k$(this,void 0,void 0,(function*(){if(this.state===S$.Closed)return;if(xl(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 k$(this,void 0,void 0,(function*(){if(this.state!==S$.Closed)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 k$(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 k$(this,void 0,void 0,(function*(){return this.flushDelayer.trigger((()=>this.flushPending()),e)}))}dispose(){this.flushDelayer.dispose(),super.dispose()}}x$.DEFAULT_FLUSH_DELAY=100;class L${constructor(){this.onDidChangeItemsExternal=Pc.None,this.items=new Map}updateItems(e){return k$(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 E$="__$__targetStorageMarker",N$=Mg("storageService");var I$;!function(e){e[e.NONE=0]="NONE",e[e.SHUTDOWN=1]="SHUTDOWN"}(I$||(I$={}));class T$ extends Nc{constructor(e={flushInterval:T$.DEFAULT_FLUSH_INTERVAL}){super(),this.options=e,this._onDidChangeValue=this._register(new zc),this._onDidChangeTarget=this._register(new zc),this._onWillSaveState=this._register(new Vc),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._globalKeyTargets=void 0}emitDidChangeValue(e,t){t===E$?(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){xl(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 r=this.getKeyTargets(t);"number"==typeof i?r[e]!==i&&(r[e]=i,null===(n=this.getStorage(t))||void 0===n||n.set(E$,JSON.stringify(r))):"number"==typeof r[e]&&(delete r[e],null===(o=this.getStorage(t))||void 0===o||o.set(E$,JSON.stringify(r)))}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(E$,e);if(t)try{return JSON.parse(t)}catch(e){}return Object.create(null)}}function D$(e,t,i,n,o){if(Array.isArray(e)){let r=0;for(const s of e){const e=D$(s,t,i,n,o);if(10===e)return e;e>r&&(r=e)}return r}if("string"==typeof e)return n?"*"===e?5:e===i?10:0:0;if(e){const{language:a,pattern:l,scheme:c,hasAccessToAllModels:d,notebookType:h}=e;if(!n&&!d)return 0;let u=0;if(c)if(c===t.scheme)u=10;else{if("*"!==c)return 0;u=5}if(a)if(a===i)u=10;else{if("*"!==a)return 0;u=Math.max(u,5)}if(h)if(h===o)u=10;else{if("*"!==h)return 0;u=Math.max(u,5)}if(l){let e;if(e="string"==typeof l?l:Object.assign(Object.assign({},l),{base:kd(l.base)}),e!==t.fsPath&&(r=e,s=t.fsPath,!r||"string"!=typeof s||!VF(r)(s,void 0,undefined)))return 0;u=10}return u}return 0;var r,s}function A$(e){return"string"!=typeof e&&(Array.isArray(e)?e.every(A$):!!e.exclusive)}T$.DEFAULT_FLUSH_INTERVAL=6e4;class O${constructor(e){this._notebookTypeResolver=e,this._clock=0,this._entries=[],this._onDidChange=new Vc,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),Lc((()=>{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 e of this._entries)e._score>0&&t.push(e.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=D$(t.selector,e.uri,e.getLanguageId(),Yg(e),i),A$(t.selector)&&t._score>0){for(let e of this._entries)e._score=0;t._score=1e3;break}this._entries.sort(O$._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._score<t._score?1:e._score>t._score?-1:e._time<t._time?1:e._time>t._time?-1:0}}Kp(Hf,class{constructor(){this.referenceProvider=new O$(this._score.bind(this)),this.renameProvider=new O$(this._score.bind(this)),this.codeActionProvider=new O$(this._score.bind(this)),this.definitionProvider=new O$(this._score.bind(this)),this.typeDefinitionProvider=new O$(this._score.bind(this)),this.declarationProvider=new O$(this._score.bind(this)),this.implementationProvider=new O$(this._score.bind(this)),this.documentSymbolProvider=new O$(this._score.bind(this)),this.inlayHintsProvider=new O$(this._score.bind(this)),this.colorProvider=new O$(this._score.bind(this)),this.codeLensProvider=new O$(this._score.bind(this)),this.documentFormattingEditProvider=new O$(this._score.bind(this)),this.documentRangeFormattingEditProvider=new O$(this._score.bind(this)),this.onTypeFormattingEditProvider=new O$(this._score.bind(this)),this.signatureHelpProvider=new O$(this._score.bind(this)),this.hoverProvider=new O$(this._score.bind(this)),this.documentHighlightProvider=new O$(this._score.bind(this)),this.selectionRangeProvider=new O$(this._score.bind(this)),this.foldingRangeProvider=new O$(this._score.bind(this)),this.linkProvider=new O$(this._score.bind(this)),this.inlineCompletionsProvider=new O$(this._score.bind(this)),this.completionProvider=new O$(this._score.bind(this)),this.linkedEditingRangeProvider=new O$(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new O$(this._score.bind(this)),this.documentSemanticTokensProvider=new O$(this._score.bind(this))}_score(e){var t;return null===(t=this._notebookTypeResolver)||void 0===t?void 0:t.call(this,e)}},!0);var M$=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},R$=function(e,t){return function(i,n){t(i,n,e)}},P$=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class F${constructor(e){this.disposed=!1,this.model=e,this._onWillDispose=new Vc}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}let B$=class{constructor(e){this.modelService=e}createModelReference(e){const t=this.modelService.getModel(e);return t?Promise.resolve(new Dc(new F$(t))):Promise.reject(new Error("Model not found"))}};B$=M$([R$(0,am)],B$);class W${show(){return W$.NULL_PROGRESS_RUNNER}showWhile(e,t){return P$(this,void 0,void 0,(function*(){yield e}))}}W$.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};class V${info(e){return this.notify({severity:zO.Info,message:e})}warn(e){return this.notify({severity:zO.Warning,message:e})}error(e){return this.notify({severity:zO.Error,message:e})}notify(e){switch(e.severity){case zO.Error:console.error(e.message);break;case zO.Warning:console.warn(e.message);break;default:console.log(e.message)}return V$.NO_OP}status(e,t){return Nc.None}}V$.NO_OP=new class{};let z$=class{constructor(e){this._onWillExecuteCommand=new Vc,this._onDidExecuteCommand=new Vc,this.onWillExecuteCommand=this._onWillExecuteCommand.event,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){const i=Eb.getCommand(e);if(!i)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});const n=this._instantiationService.invokeFunction.apply(this._instantiationService,[i.handler,...t]);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(n)}catch(e){return Promise.reject(e)}}};z$=M$([R$(0,Ag)],z$);let j$=class extends zP{constructor(e,t,i,n,o,r){super(e,t,i,n,o),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];const s=e=>{const t=new Ec;t.add(pv(e,Kv.KEY_DOWN,(e=>{const t=new ev(e);this._dispatch(t,t.target)&&(t.preventDefault(),t.stopPropagation())}))),t.add(pv(e,Kv.KEY_UP,(e=>{const t=new ev(e);this._singleModifierDispatch(t,t.target)&&t.preventDefault()}))),this._domNodeListeners.push(new H$(e,t))},a=e=>{for(let t=0;t<this._domNodeListeners.length;t++){const i=this._domNodeListeners[t];i.domNode===e&&(this._domNodeListeners.splice(t,1),i.dispose())}},l=e=>{e.getOption(54)||s(e.getContainerDomNode())};this._register(r.onCodeEditorAdd(l)),this._register(r.onCodeEditorRemove((e=>{e.getOption(54)||a(e.getContainerDomNode())}))),r.listCodeEditors().forEach(l);const c=e=>{s(e.getContainerDomNode())};this._register(r.onDiffEditorAdd(c)),this._register(r.onDiffEditorRemove((e=>{a(e.getContainerDomNode())}))),r.listDiffEditors().forEach(c)}addDynamicKeybinding(e,t,i,n){const o=q_(t,Ua),r=new Ec;return o&&(this._dynamicKeybindings.push({keybinding:o.parts,command:e,when:n,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}),r.add(Lc((()=>{for(let t=0;t<this._dynamicKeybindings.length;t++)if(this._dynamicKeybindings[t].command===e)return this._dynamicKeybindings.splice(t,1),void this.updateResolver({source:1})})))),r.add(Eb.registerCommand(e,i)),this.updateResolver({source:1}),r}updateResolver(e){this._cachedResolver=null,this._onDidUpdateKeybindings.fire(e)}_getResolver(){if(!this._cachedResolver){const e=this._toNormalizedKeybindingItems(yw.getDefaultKeybindings(),!0),t=this._toNormalizedKeybindingItems(this._dynamicKeybindings,!1);this._cachedResolver=new UP(e,t,(e=>this._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,r=o.keybinding;if(r){const s=eF.resolveUserBinding(r,Ua);for(const r of s)i[n++]=new qP(r,o.command,o.commandArgs,e,t,null,!1)}else i[n++]=new qP(void 0,o.command,o.commandArgs,e,t,null,!1)}return i}resolveKeyboardEvent(e){const t=new Y_(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode).toChord();return new eF(t,Ua)}};j$=M$([R$(0,Xb),R$(1,Lb),R$(2,Sw),R$(3,jO),R$(4,Ff),R$(5,Rg)],j$);class H$ extends Nc{constructor(e,t){super(),this.domNode=e,this._register(t)}}function U$(e){return e&&"object"==typeof e&&(!e.overrideIdentifier||"string"==typeof e.overrideIdentifier)&&(!e.resource||e.resource instanceof Bd)}class $${constructor(){this._onDidChangeConfiguration=new Vc,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._configuration=new BP(new FP,new PP)}getValue(e,t){const i="string"==typeof e?e:void 0,n=U$(e)?e:U$(t)?t:{};return this._configuration.getValue(i,n,void 0)}updateValues(e){const t={data:this._configuration.toData()},i=[];for(const t of e){const[e,n]=t;this.getValue(e)!==n&&(this._configuration.updateValue(e,n),i.push(e))}if(i.length>0){const e=new WP({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 K$=class{constructor(e){this.configurationService=e,this._onDidChangeConfiguration=new Vc,this.configurationService.onDidChangeConfiguration((e=>{this._onDidChangeConfiguration.fire({affectedKeys:e.affectedKeys,affectsConfiguration:(t,i)=>e.affectsConfiguration(i)})}))}getValue(e,t,i){const n=Yd.isIPosition(t)&&t?"string"==typeof i?i:void 0:"string"==typeof t?t:void 0;return void 0===n?this.configurationService.getValue():this.configurationService.getValue(n)}};K$=M$([R$(0,Fp)],K$);let q$=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:Fa||Pa?"\n":"\r\n"}};q$=M$([R$(0,Fp)],q$);class G${constructor(){const e=Bd.from({scheme:G$.SCHEME,authority:"model",path:"/"});this.workspace={id:"4064f6ec-cb38-4ad0-af64-ee6467e63c82",folders:[new nF({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}}function Y$(e,t,i){if(!t)return;if(!(e instanceof $$))return;const n=[];Object.keys(t).forEach((e=>{(function(e){return MP()[`editor.${e}`]||!1})(e)&&n.push([`editor.${e}`,t[e]]),i&&function(e){return MP()[`diffEditor.${e}`]||!1}(e)&&n.push([`diffEditor.${e}`,t[e]])})),n.length>0&&e.updateValues(n)}G$.SCHEME="inmemory";let Z$=class{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}apply(e,t){return P$(this,void 0,void 0,(function*(){const t=new Map;for(let i of e){if(!(i instanceof NP))throw new Error("bad edit - only text edits are supported");const e=this._modelService.getModel(i.resource);if(!e)throw new Error("bad edit - model not found");if("number"==typeof i.versionId&&e.getVersionId()!==i.versionId)throw new Error("bad state - model changed in the meantime");let n=t.get(e);n||(n=[],t.set(e,n)),n.push(RP.replaceMove(Zd.lift(i.textEdit.range),i.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:_u(uF.bulkEditServiceSummary,i,n)}}))}};Z$=M$([R$(0,am)],Z$);let X$=class extends yF{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)}};X$=M$([R$(0,jR),R$(1,Rg)],X$);let J$=class extends sW{constructor(e,t,i,n,o){super(e,t,i,n,o),this.configure({blockMouse:!1})}};var Q$;J$=M$([R$(0,Sw),R$(1,jO),R$(2,hR),R$(3,HP),R$(4,ow)],J$),Kp(Fp,$$),Kp(Rf,K$),Kp(Pf,q$),Kp(iF,G$),Kp(tF,class{getUriLabel(e,t){return"file"===e.scheme?e.fsPath:e.path}}),Kp(Sw,class{publicLog(e,t){return Promise.resolve(void 0)}publicLog2(e,t){return this.publicLog(e,t)}}),Kp(qR,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})}}),Kp(jO,V$),Kp(CW,C$),Kp(Hp,class extends XF{constructor(){super()}}),Kp(GU,class extends Nc{constructor(){super(),this._onColorThemeChange=this._register(new Vc),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new Vc),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new BU,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(WU,qU(WU)),this._knownThemes.set(VU,qU(VU)),this._knownThemes.set(zU,qU(zU));const e=function(e){const t=new Vc,i=JM();return i.onDidChange((()=>t.fire())),null==e||e.onDidProductIconThemeChange((()=>t.fire())),{onDidChange:t.event,getCSS(){const t=e?e.getProductIconTheme():new BU,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: ${ab(o.id)}; }`):`.codicon-${e.id}:before { content: '${i.fontCharacter}'; }`},r=[];for(let e of i.getIcons()){const t=o(e);t&&r.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};`:"",s=t.src.map((e=>`${sb(e.location)} format('${e.format}')`)).join(", ");r.push(`@font-face { src: ${s}; font-family: ${ab(e)};${i}${o} font-display: block; }`)}return r.join("\n")}}}(this);var t;this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS}\n${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(WU),e.onDidChange((()=>{this._codiconCSS=e.getCSS(),this._updateCSS()})),t=()=>{this._updateActualTheme()},window.matchMedia("(forced-colors: active)").addEventListener("change",t)}registerEditorContainer(e){return Wv(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=jv(),this._globalStyleElement.className="monaco-colors",this._globalStyleElement.textContent=this._allCSS,this._styleElements.push(this._globalStyleElement)),Nc.None}_registerShadowDomContainer(e){const t=jv(e);return t.className="monaco-colors",t.textContent=this._allCSS,this._styleElements.push(t),{dispose:()=>{for(let e=0;e<this._styleElements.length;e++)if(this._styleElements[e]===t)return void this._styleElements.splice(e,1)}}}defineTheme(e,t){if(!/^[a-z0-9\-]+$/i.test(e))throw new Error("Illegal theme name!");if(!$U(t.base)&&!$U(e))throw new Error("Illegal theme base!");this._knownThemes.set(e,new UU(e,t)),$U(e)&&this._knownThemes.forEach((t=>{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(WU),this._desiredTheme=t,this._updateActualTheme()}_updateActualTheme(){const e=this._autoDetectHighContrast&&window.matchMedia("(forced-colors: active)").matches?this._knownThemes.get(zU):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)}};HU.getThemingParticipants().forEach((e=>e(this._theme,i,this._environment)));const n=[];for(const e of jU.getColors()){const t=this._theme.getColor(e.id,!0);t&&n.push(`${gy(e.id)}: ${t.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;i<n;i++){const n=e[i];t[i]=`.mtk${i} { color: ${n}; }`}return t.push(".mtki { font-style: italic; }"),t.push(".mtkb { font-weight: bold; }"),t.push(".mtku { text-decoration: underline; text-underline-position: under; }"),t.push(".mtks { text-decoration: line-through; }"),t.push(".mtks.mtku { text-decoration: underline line-through; text-underline-position: under; }"),t.join("\n")}(o)),this._themeCSS=e.join("\n"),this._updateCSS(),ph.setColorMap(o),this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS}\n${this._themeCSS}`,this._styleElements.forEach((e=>e.textContent=this._allCSS))}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}}),Kp(Ff,class extends jf{constructor(){super(new zf)}}),Kp(am,ZW),Kp(vb,xW),Kp(Xb,g$),Kp(fR,W$),Kp(N$,class extends T${constructor(){super(),this.globalStorage=this._register(new x$(new L$)),this.workspaceStorage=this._register(new x$(new L$)),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}}),Kp(dR,qf),Kp(LP,Z$),Kp(gF,class{constructor(){this._neverEmitter=new Vc,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}}),Kp(bb,B$),Kp(qw,ZU),Kp(LH,EH),Kp(Lb,z$),Kp(HP,j$),Kp(_U,xU),Kp(hR,X$),Kp(hW,bW),Kp(mR,n$),Kp(uR,J$),Kp(fw,QU),function(e){const t=new WO;for(const[e,i]of qp())t.set(e,i);const i=new v$(t,!0);t.set(Ag,i),e.get=function(e){const n=t.get(e);if(!n)throw new Error("Missing service "+e);return n instanceof Up?i.invokeFunction((t=>t.get(e))):n};let n=!1;e.initialize=function(e){if(n)return i;n=!0;for(const[e,i]of qp())t.get(e)||t.set(e,i);for(const i in e)if(e.hasOwnProperty(i)){const n=Mg(i);t.get(n)instanceof Up&&t.set(n,e[i])}return i}}(Q$||(Q$={}));var eK=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},tK=function(e,t){return function(i,n){t(i,n,e)}};let iK=0,nK=!1;let oK=class extends gM{constructor(e,t,i,n,o,r,s,a,l,c,d,h){const u=Object.assign({},t);u.ariaLabel=u.ariaLabel||dF.editorViewAccessibleLabel,u.ariaLabel=u.ariaLabel+";"+dF.accessibilityHelpMessage,super(e,u,{},i,n,o,r,a,l,c,d,h),this._standaloneKeybindingService=s instanceof j$?s:null,function(e){if(!e){if(nK)return;nK=!0}!function(e){hb=document.createElement("div"),hb.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"),hb.appendChild(e),e};ub=t(),gb=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"),hb.appendChild(e),e};pb=i(),mb=i(),e.appendChild(hb)}(e||document.body)}(u.ariaContainerElement)}addCommand(e,t,i){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;const n="DYNAMIC_"+ ++iK,o=Tb.deserialize(i);return this._standaloneKeybindingService.addDynamicKeybinding(n,e,t,o),n}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if("string"!=typeof e.id||"string"!=typeof e.label||"function"!=typeof e.run)throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),Nc.None;const t=e.id,i=e.label,n=Tb.and(Tb.equals("editorId",this.getId()),Tb.deserialize(e.precondition)),o=e.keybindings,r=Tb.and(n,Tb.deserialize(e.keybindingContext)),s=e.contextMenuGroupId||null,a=e.contextMenuOrder||0,l=(t,...i)=>Promise.resolve(e.run(this,...i)),c=new Ec,d=this.getId()+":"+t;if(c.add(Eb.registerCommand(d,l)),s){const e={command:{id:d,title:i},when:n,group:s,order:a};c.add(_w.appendMenuItem(mw.EditorContext,e))}if(Array.isArray(o))for(const e of o)c.add(this._standaloneKeybindingService.addDynamicKeybinding(d,e,l,r));const h=new ZI(d,i,i,n,l,this._contextKeyService);return this._actions[t]=h,c.add(Lc((()=>{delete this._actions[t]}))),c}_triggerCommand(e,t){if(this._codeEditorService instanceof zR)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,t)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,t)}};oK=eK([tK(2,Ag),tK(3,Rg),tK(4,Lb),tK(5,Xb),tK(6,HP),tK(7,ow),tK(8,jO),tK(9,qw),tK(10,Zp),tK(11,Hf)],oK);let rK=class extends oK{constructor(e,t,i,n,o,r,s,a,l,c,d,h,u,g,p){const m=Object.assign({},t);Y$(c,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,r,s,a,l,d,g,p),this._configurationService=c,this._standaloneThemeService=a,this._register(f),void 0===_){const e=u.getLanguageIdByMimeType(m.language)||m.language||gT;v=aK(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){Y$(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)}};rK=eK([tK(2,Ag),tK(3,Rg),tK(4,Lb),tK(5,Xb),tK(6,HP),tK(7,GU),tK(8,jO),tK(9,Fp),tK(10,qw),tK(11,am),tK(12,Hp),tK(13,Zp),tK(14,Hf)],rK);let sK=class extends kR{constructor(e,t,i,n,o,r,s,a,l,c,d,h){const u=Object.assign({},t);Y$(l,u,!0);const g=s.registerEditorContainer(e);"string"==typeof u.theme&&s.setTheme(u.theme),void 0!==u.autoDetectHighContrast&&s.setAutoDetectHighContrast(Boolean(u.autoDetectHighContrast)),super(e,u,{},h,o,n,i,r,s,a,c,d),this._configurationService=l,this._standaloneThemeService=s,this._register(g)}dispose(){super.dispose()}updateOptions(e){Y$(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(oK,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 aK(e,t,i,n,o){if(i=i||"",!n){const n=i.indexOf("\n");let r=i;return-1!==n&&(r=i.substring(0,n)),lK(e,i,t.createByFilepathOrFirstLine(o||null,r),o)}return lK(e,i,t.createById(n),o)}function lK(e,t,i,n){return e.createModel(t,i,n)}function cK(e,t){return"boolean"==typeof e?e:t}function dK(e,t){return"string"==typeof e?e:t}function hK(e,t=!1){t&&(e=e.map((function(e){return e.toLowerCase()})));const i=function(e){const t={};for(const i of e)t[i]=!0;return t}(e);return t?function(e){return void 0!==i[e.toLowerCase()]&&i.hasOwnProperty(e.toLowerCase())}:function(e){return void 0!==i[e]&&i.hasOwnProperty(e)}}function uK(e,t){t=t.replace(/@@/g,"");let i,n=0;do{i=!1,t=t.replace(/@(\w+)/g,(function(n,o){i=!0;let r="";if("string"==typeof e[o])r=e[o];else{if(!(e[o]&&e[o]instanceof RegExp))throw void 0===e[o]?T_(e,"language definition does not contain attribute '"+o+"', used at: "+t):T_(e,"attribute reference '"+o+"' must be a string, used at: "+t);r=e[o].source}return E_(r)?"":"(?:"+r+")"})),n++}while(i&&n<5);t=t.replace(/\x01/g,"@");const o=(e.ignoreCase?"i":"")+(e.unicode?"u":"");return new RegExp(t,o)}function gK(e,t,i,n){let o=-1,r=i,s=i.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);s&&(s[3]&&(o=parseInt(s[3]),s[2]&&(o+=100)),r=s[4]);let a,l="~",c=r;if(r&&0!==r.length?/^\w*$/.test(c)?l="==":(s=r.match(/^(@|!@|~|!~|==|!=)(.*)$/),s&&(l=s[1],c=s[2])):(l="!=",c=""),"~"!==l&&"!~"!==l||!/^(\w|\|)*$/.test(c))if("@"===l||"!@"===l){const i=e[c];if(!i)throw T_(e,"the @ match target '"+c+"' is not defined, in rule: "+t);if(!function(e,t){if(!t)return!1;if(!Array.isArray(t))return!1;for(const e of t)if("string"!=typeof e)return!1;return!0}(0,i))throw T_(e,"the @ match target '"+c+"' must be an array of strings, in rule: "+t);const n=hK(i,e.ignoreCase);a=function(e){return"@"===l?n(e):!n(e)}}else if("~"===l||"!~"===l)if(c.indexOf("$")<0){const t=uK(e,"^"+c+"$");a=function(e){return"~"===l?t.test(e):!t.test(e)}}else a=function(t,i,n,o){return uK(e,"^"+D_(e,c,i,n,o)+"$").test(t)};else if(c.indexOf("$")<0){const t=N_(e,c);a=function(e){return"=="===l?e===t:e!==t}}else{const t=N_(e,c);a=function(i,n,o,r,s){const a=D_(e,t,n,o,r);return"=="===l?i===a:i!==a}}else{const t=hK(c.split("|"),e.ignoreCase);a=function(e){return"~"===l?t(e):!t(e)}}return-1===o?{name:i,value:n,test:function(e,t,i,n){return a(e,e,t,i,n)}}:{name:i,value:n,test:function(e,t,i,n){const r=function(e,t,i,n){if(n<0)return e;if(n<t.length)return t[n];if(n>=100){n-=100;const e=i.split(".");if(e.unshift(i),n<e.length)return e[n]}return null}(e,t,i,o);return a(r||"",e,t,i,n)}}}function pK(e,t,i){if(i){if("string"==typeof i)return i;if(i.token||""===i.token){if("string"!=typeof i.token)throw T_(e,"a 'token' attribute must be of type string, in rule: "+t);{const n={token:i.token};if(i.token.indexOf("$")>=0&&(n.tokenSubst=!0),"string"==typeof i.bracket)if("@open"===i.bracket)n.bracket=1;else{if("@close"!==i.bracket)throw T_(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 T_(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,D_(e,o,"",[],""))))throw T_(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,r=i.length;o<r;o++)n[o]=pK(e,t,i[o]);return{group:n}}if(i.cases){const n=[];for(let o in i.cases)if(i.cases.hasOwnProperty(o)){const r=pK(e,t,i.cases[o]);"@default"===o||"@"===o||""===o?n.push({test:void 0,value:r,name:o}):"@eos"===o?n.push({test:function(e,t,i,n){return n},value:r,name:o}):n.push(gK(e,t,o,r))}const o=e.defaultToken;return{test:function(e,t,i,r){for(const o of n)if(!o.test||o.test(e,t,i,r))return o.value;return o}}}throw T_(e,"an action must be a string, an object with a 'token' or 'cases' attribute, or an array of actions; in rule: "+t)}return{token:""}}sK=eK([tK(2,Ag),tK(3,Xb),tK(4,dR),tK(5,Rg),tK(6,GU),tK(7,jO),tK(8,Fp),tK(9,uR),tK(10,fR),tK(11,mR)],sK);class mK{constructor(e){this.regex=new RegExp(""),this.action={token:""},this.matchOnlyAtLineStart=!1,this.name="",this.name=e}setRegex(e,t){let i;if("string"==typeof t)i=t;else{if(!(t instanceof RegExp))throw T_(e,"rules must start with a match string or regular expression: "+this.name);i=t.source}this.matchOnlyAtLineStart=i.length>0&&"^"===i[0],this.name=this.name+": "+i,this.regex=uK(e,"^(?:"+(this.matchOnlyAtLineStart?i.substr(1):i)+")")}setAction(e,t){this.action=pK(e,this.name,t)}}function fK(e,t){if(!t||"object"!=typeof t)throw new Error("Monarch: expecting a language definition object");const i={};i.languageId=e,i.includeLF=cK(t.includeLF,!1),i.noThrow=!1,i.maxStack=100,i.start="string"==typeof t.start?t.start:null,i.ignoreCase=cK(t.ignoreCase,!1),i.unicode=cK(t.unicode,!1),i.tokenPostfix=dK(t.tokenPostfix,"."+i.languageId),i.defaultToken=dK(t.defaultToken,"source"),i.usesEmbedded=!1;const n=t;function o(e,r,s){for(const a of s){let s=a.include;if(s){if("string"!=typeof s)throw T_(i,"an 'include' attribute must be a string at: "+e);if("@"===s[0]&&(s=s.substr(1)),!t.tokenizer[s])throw T_(i,"include target '"+s+"' is not defined at: "+e);o(e+"."+s,r,t.tokenizer[s])}else{const t=new mK(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 T_(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 T_(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=cK(a.matchOnlyAtLineStart,!1)),t.setRegex(n,a.regex),t.setAction(n,a.action)}r.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 T_(i,"a language definition must define the 'tokenizer' attribute as an object");i.tokenizer=[];for(let e in t.tokenizer)if(t.tokenizer.hasOwnProperty(e)){i.start||(i.start=e);const n=t.tokenizer[e];i.tokenizer[e]=new Array,o("tokenizer."+e,i.tokenizer[e],n)}if(i.usesEmbedded=n.usesEmbedded,t.brackets){if(!Array.isArray(t.brackets))throw T_(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 r=[];for(let e of t.brackets){let t=e;if(t&&Array.isArray(t)&&3===t.length&&(t={token:t[2],open:t[0],close:t[1]}),t.open===t.close)throw T_(i,"open and close brackets in a 'brackets' attribute must be different: "+t.open+"\n hint: use the 'bracket' attribute if matching on equal brackets is required.");if("string"!=typeof t.open||"string"!=typeof t.token||"string"!=typeof t.close)throw T_(i,"every element in the 'brackets' array must be a '{open,close,token}' object or array");r.push({token:t.token+i.tokenPostfix,open:N_(i,t.open),close:N_(i,t.close)})}return i.brackets=r,i.noThrow=!0,i}class _K{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 vK.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 uh(n.tokens,n.endState)}}class vK{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,r=e.length;o<r;o++){const r=e[o];let s=r.startIndex;0===o?s=0:s<n&&(s=n),i[o]=new dh(s,r.scopes,t),n=s}return i}static adaptTokenize(e,t,i,n){const o=t.tokenize(i,n),r=vK._toClassicTokens(o.tokens,e);let s;return s=o.endState.equals(n)?n:o.endState,new hh(r,s)}tokenize(e,t,i){return vK.adaptTokenize(this._languageId,this._actual,e,i)}_toBinaryTokens(e,t){const i=e.encodeLanguageId(this._languageId),n=this._standaloneThemeService.getColorTheme().tokenTheme,o=[];let r=0,s=0;for(let e=0,a=t.length;e<a;e++){const a=t[e],l=n.match(i,a.scopes);if(r>0&&o[r-1]===l)continue;let c=a.startIndex;0===e?c=0:c<s&&(c=s),o[r++]=c,o[r++]=l,s=c}const a=new Uint32Array(r);for(let e=0;e<r;e++)a[e]=o[e];return a}tokenizeEncoded(e,t,i){const n=this._actual.tokenize(e,i),o=this._toBinaryTokens(this._languageService.languageIdCodec,n.tokens);let r;return r=n.endState.equals(i)?i:n.endState,new uh(o,r)}}function bK(e){return e&&"function"==typeof e.then}function wK(e,t){return function(e){return"tokenizeEncoded"in e}(t)?new _K(e,t):new vK(e,t,Q$.get(Hp),Q$.get(GU))}function yK(e,t){const i={createTokenizationSupport:()=>{return i=this,n=void 0,r=function*(){const i=yield Promise.resolve(t.create());return i?"function"==typeof i.getInitialState?wK(e,i):new V_(Q$.get(Hp),Q$.get(GU),e,fK(e,i)):null},new((o=void 0)||(o=Promise))((function(e,t){function s(e){try{l(r.next(e))}catch(e){t(e)}}function a(e){try{l(r.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof o?i:new o((function(e){e(i)}))).then(s,a)}l((r=r.apply(i,n||[])).next())}));var i,n,o,r}};return ph.registerFactory(e,i)}const CK=Mg("IEditorCancelService"),SK=new Zb("cancellableOperation",!1,ma(0,"Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));Kp(CK,class{constructor(){this._tokens=new WeakMap}add(e,t){let i,n=this._tokens.get(e);return n||(n=e.invokeWithinContext((e=>({key:SK.bindTo(e.get(Xb)),tokens:new Oc}))),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),Iw(new class extends Ew{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:SK})}runEditorCommand(e,t){e.get(CK).cancel(t)}});class kK{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return"string"==typeof e?e.toLowerCase():e._lower}}var xK,LK=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class EK{static setFormatterSelector(e){return{dispose:EK._selectors.unshift(e)}}static select(e,t,i){return LK(this,void 0,void 0,(function*(){if(0===e.length)return;const n=Cc.first(EK._selectors);return n?yield n(e,t,i):void 0}))}}EK._selectors=new Oc,Eb.registerCommand("_executeFormatRangeProvider",(function(e,...t){return LK(this,void 0,void 0,(function*(){const[i,n,o]=t;Ll(Bd.isUri(i)),Ll(Zd.isIRange(n));const r=e.get(bb),s=e.get(dR),a=e.get(Hf),l=yield r.createModelReference(i);try{return function(e,t,i,n,o,r){return LK(this,void 0,void 0,(function*(){const s=t.documentRangeFormattingEditProvider.ordered(i);for(const t of s){let s=yield Promise.resolve(t.provideDocumentRangeFormattingEdits(i,n,o,r)).catch(pc);if(al(s))return yield e.computeMoreMinimalEdits(i.uri,s)}}))}(s,a,l.object.textEditorModel,Zd.lift(n),o,Kc.None)}finally{l.dispose()}}))})),Eb.registerCommand("_executeFormatDocumentProvider",(function(e,...t){return LK(this,void 0,void 0,(function*(){const[i,n]=t;Ll(Bd.isUri(i));const o=e.get(bb),r=e.get(dR),s=e.get(Hf),a=yield o.createModelReference(i);try{return function(e,t,i,n,o){return LK(this,void 0,void 0,(function*(){const r=function(e,t,i){const n=[],o=new Set,r=e.ordered(i);for(const e of r)n.push(e),e.extensionId&&o.add(kK.toKey(e.extensionId));const s=t.ordered(i);for(const e of s){if(e.extensionId){if(o.has(kK.toKey(e.extensionId)))continue;o.add(kK.toKey(e.extensionId))}n.push({displayName:e.displayName,extensionId:e.extensionId,provideDocumentFormattingEdits:(t,i,n)=>e.provideDocumentRangeFormattingEdits(t,t.getFullModelRange(),i,n)})}return n}(t.documentFormattingEditProvider,t.documentRangeFormattingEditProvider,i);for(const t of r){let r=yield Promise.resolve(t.provideDocumentFormattingEdits(i,n,o)).catch(pc);if(al(r))return yield e.computeMoreMinimalEdits(i.uri,r)}}))}(r,s,a.object.textEditorModel,n,Kc.None)}finally{a.dispose()}}))})),Eb.registerCommand("_executeFormatOnTypeProvider",(function(e,...t){return LK(this,void 0,void 0,(function*(){const[i,n,o,r]=t;Ll(Bd.isUri(i)),Ll(Yd.isIPosition(n)),Ll("string"==typeof o);const s=e.get(bb),a=e.get(dR),l=e.get(Hf),c=yield s.createModelReference(i);try{return function(e,t,i,n,o,r,s){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,r,s)).catch(pc).then((t=>e.computeMoreMinimalEdits(i.uri,t)))}(a,l,c.object.textEditorModel,Yd.lift(n),o,r,Kc.None)}finally{c.dispose()}}))})),hc.wrappingIndent.defaultValue=0,hc.glyphMargin.defaultValue=!1,hc.autoIndent.defaultValue=3,hc.overviewRulerLanes.defaultValue=2,EK.setFormatterSelector(((e,t,i)=>Promise.resolve(e[0])));const NK=Qh();NK.editor={create:function(e,t,i){return Q$.initialize(i||{}).createInstance(rK,e,t)},onDidCreateEditor:function(e){return Q$.get(Rg).onCodeEditorAdd((t=>{e(t)}))},createDiffEditor:function(e,t,i){return Q$.initialize(i||{}).createInstance(sK,e,t)},createDiffNavigator:function(e,t){return new Bg(e,t)},createModel:function(e,t,i){const n=Q$.get(Hp),o=n.getLanguageIdByMimeType(t)||t;return aK(Q$.get(am),n,e,o,i)},setModelLanguage:function(e,t){const i=Q$.get(Hp);Q$.get(am).setMode(e,i.createById(t))},setModelMarkers:function(e,t,i){e&&Q$.get(CW).changeOne(t,e.uri,i)},getModelMarkers:function(e){return Q$.get(CW).read(e)},onDidChangeMarkers:function(e){return Q$.get(CW).onMarkerChanged(e)},getModels:function(){return Q$.get(am).getModels()},getModel:function(e){return Q$.get(am).getModel(e)},onDidCreateModel:function(e){return Q$.get(am).onModelAdded(e)},onWillDisposeModel:function(e){return Q$.get(am).onModelRemoved(e)},onDidChangeModelLanguage:function(e){return Q$.get(am).onModelLanguageChanged((t=>{e({model:t.model,oldLanguage:t.oldLanguageId})}))},createWebWorker:function(e){return function(e,t,i){return new e_(e,t,i)}(Q$.get(am),Q$.get(Zp),e)},colorizeElement:function(e,t){const i=Q$.get(Hp),n=Q$.get(GU);return n.registerEditorContainer(e),U_.colorizeElement(n,i,e,t)},colorize:function(e,t,i){const n=Q$.get(Hp);return Q$.get(GU).registerEditorContainer(document.body),U_.colorize(n,e,t,i)},colorizeModelLine:function(e,t,i=4){return Q$.get(GU).registerEditorContainer(document.body),U_.colorizeModelLine(e,t,i)},tokenize:function(e,t){ph.getOrCreate(t);const i=(r=t,ph.get(r)||{getInitialState:()=>sm,tokenize:(e,t,i)=>function(e,t){return new hh([new dh(0,"",e)],t)}(r,i)}),n=Cu(e),o=[];var r;let s=i.getInitialState();for(let e=0,t=n.length;e<t;e++){const t=n[e],r=i.tokenize(t,!0,s);o[e]=r.tokens,s=r.endState}return o},defineTheme:function(e,t){Q$.get(GU).defineTheme(e,t)},setTheme:function(e){Q$.get(GU).setTheme(e)},remeasureFonts:function(){Tg.clearAllFontInfos()},registerCommand:function(e,t){return Eb.registerCommand({id:e,handler:t})},AccessibilitySupport:mh,ContentWidgetPositionPreference:wh,CursorChangeReason:yh,DefaultEndOfLine:Ch,EditorAutoIndentStrategy:kh,EditorOption:xh,EndOfLinePreference:Lh,EndOfLineSequence:Eh,MinimapPosition:Rh,MouseTargetType:Ph,OverlayWidgetPositionPreference:Fh,OverviewRulerLane:Bh,RenderLineNumbersType:Vh,RenderMinimap:zh,ScrollbarVisibility:Hh,ScrollType:jh,TextEditorCursorBlinkingStyle:Gh,TextEditorCursorStyle:Yh,TrackedRangeStickiness:Zh,WrappingIndent:Xh,InjectedTextCursorStops:Ih,PositionAffinity:Wh,ConfigurationChangedEvent:Bl,BareFontInfo:Eg,FontInfo:Ng,TextModelResolvedOptions:Ug,FindMatch:$g,ApplyUpdateResult:zl,EditorType:Wg,EditorOptions:hc},NK.languages={register:function(e){uT.registerLanguage(e)},getLanguages:function(){let e=[];return e=e.concat(uT.getLanguages()),e},onLanguage:function(e,t){const i=Q$.get(Hp).onDidEncounterLanguage((n=>{n===e&&(i.dispose(),t())}));return i},getEncodedLanguageId:function(e){return Q$.get(Hp).languageIdCodec.encodeLanguageId(e)},setLanguageConfiguration:function(e,t){if(!Q$.get(Hp).isRegisteredLanguageId(e))throw new Error(`Cannot set configuration for unknown language ${e}`);return tm.register(e,t,100)},setColorMap:function(e){const t=Q$.get(GU);if(e){const i=[null];for(let t=1,n=e.length;t<n;t++)i[t]=dy.fromHex(e[t]);t.setColorMapOverride(i)}else t.setColorMapOverride(null)},registerTokensProviderFactory:yK,setTokensProvider:function(e,t){if(!Q$.get(Hp).isRegisteredLanguageId(e))throw new Error(`Cannot set tokens provider for unknown language ${e}`);return bK(t)?yK(e,{create:()=>t}):ph.register(e,wK(e,t))},setMonarchTokensProvider:function(e,t){return bK(t)?yK(e,{create:()=>t}):ph.register(e,(t=>new V_(Q$.get(Hp),Q$.get(GU),e,fK(e,t)))(t))},registerReferenceProvider:function(e,t){return Q$.get(Hf).referenceProvider.register(e,t)},registerRenameProvider:function(e,t){return Q$.get(Hf).renameProvider.register(e,t)},registerCompletionItemProvider:function(e,t){return Q$.get(Hf).completionProvider.register(e,t)},registerSignatureHelpProvider:function(e,t){return Q$.get(Hf).signatureHelpProvider.register(e,t)},registerHoverProvider:function(e,t){return Q$.get(Hf).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 Zd(i.lineNumber,o.startColumn,i.lineNumber,o.endColumn)),e.range||(e.range=new Zd(i.lineNumber,i.column,i.lineNumber,i.column)),e}))}})},registerDocumentSymbolProvider:function(e,t){return Q$.get(Hf).documentSymbolProvider.register(e,t)},registerDocumentHighlightProvider:function(e,t){return Q$.get(Hf).documentHighlightProvider.register(e,t)},registerLinkedEditingRangeProvider:function(e,t){return Q$.get(Hf).linkedEditingRangeProvider.register(e,t)},registerDefinitionProvider:function(e,t){return Q$.get(Hf).definitionProvider.register(e,t)},registerImplementationProvider:function(e,t){return Q$.get(Hf).implementationProvider.register(e,t)},registerTypeDefinitionProvider:function(e,t){return Q$.get(Hf).typeDefinitionProvider.register(e,t)},registerCodeLensProvider:function(e,t){return Q$.get(Hf).codeLensProvider.register(e,t)},registerCodeActionProvider:function(e,t,i){return Q$.get(Hf).codeActionProvider.register(e,{providedCodeActionKinds:null==i?void 0:i.providedCodeActionKinds,provideCodeActions:(e,i,n,o)=>{const r=Q$.get(CW).read({resource:e.uri}).filter((e=>Zd.areIntersectingOrTouching(e,i)));return t.provideCodeActions(e,i,{markers:r,only:n.only},o)},resolveCodeAction:t.resolveCodeAction})},registerDocumentFormattingEditProvider:function(e,t){return Q$.get(Hf).documentFormattingEditProvider.register(e,t)},registerDocumentRangeFormattingEditProvider:function(e,t){return Q$.get(Hf).documentRangeFormattingEditProvider.register(e,t)},registerOnTypeFormattingEditProvider:function(e,t){return Q$.get(Hf).onTypeFormattingEditProvider.register(e,t)},registerLinkProvider:function(e,t){return Q$.get(Hf).linkProvider.register(e,t)},registerColorProvider:function(e,t){return Q$.get(Hf).colorProvider.register(e,t)},registerFoldingRangeProvider:function(e,t){return Q$.get(Hf).foldingRangeProvider.register(e,t)},registerDeclarationProvider:function(e,t){return Q$.get(Hf).declarationProvider.register(e,t)},registerSelectionRangeProvider:function(e,t){return Q$.get(Hf).selectionRangeProvider.register(e,t)},registerDocumentSemanticTokensProvider:function(e,t){return Q$.get(Hf).documentSemanticTokensProvider.register(e,t)},registerDocumentRangeSemanticTokensProvider:function(e,t){return Q$.get(Hf).documentRangeSemanticTokensProvider.register(e,t)},registerInlineCompletionsProvider:function(e,t){return Q$.get(Hf).inlineCompletionsProvider.register(e,t)},registerInlayHintsProvider:function(e,t){return Q$.get(Hf).inlayHintsProvider.register(e,t)},DocumentHighlightKind:Sh,CompletionItemKind:_h,CompletionItemTag:vh,CompletionItemInsertTextRule:fh,SymbolKind:Kh,SymbolTag:qh,IndentAction:Nh,CompletionTriggerKind:bh,SignatureHelpTriggerKind:$h,InlayHintKind:Th,InlineCompletionTriggerKind:Dh,FoldingRangeKind:gh};const IK=NK.CancellationTokenSource,TK=NK.Emitter,DK=NK.KeyCode,AK=NK.KeyMod,OK=NK.Position,MK=NK.Range,RK=NK.Selection,PK=NK.SelectionDirection,FK=NK.MarkerSeverity,BK=NK.MarkerTag,WK=NK.Uri,VK=NK.Token,zK=NK.editor,jK=NK.languages;((null===(xK=Ta.MonacoEnvironment)||void 0===xK?void 0:xK.globalAPI)||"function"==typeof define&&i.amdO)&&(self.monaco=NK),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 HK=Object.defineProperty,UK=Object.getOwnPropertyDescriptor,$K=Object.getOwnPropertyNames,KK=Object.prototype.hasOwnProperty,qK={};((e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of $K(t))KK.call(e,i)||"default"===i||HK(e,i,{get:()=>t[i],enumerable:!(n=UK(t,i))||n.enumerable})})(qK,a);var GK,YK,ZK,XK,JK,QK,eq,tq,iq,nq,oq,rq,sq,aq,lq,cq,dq,hq,uq,gq,pq,mq,fq,_q,vq,bq,wq,yq,Cq={},Sq={},kq=class{static getOrCreate(e){return Sq[e]||(Sq[e]=new kq(e)),Sq[e]}_languageId;_loadingTriggered;_lazyLoadPromise;_lazyLoadPromiseResolve;_lazyLoadPromiseReject;constructor(e){this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise(((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t}))}load(){return this._loadingTriggered||(this._loadingTriggered=!0,Cq[this._languageId].loader().then((e=>this._lazyLoadPromiseResolve(e)),(e=>this._lazyLoadPromiseReject(e)))),this._lazyLoadPromise}};!function(e){const t=e.id;Cq[t]=e,qK.languages.register(e);const i=kq.getOrCreate(t);qK.languages.registerTokensProviderFactory(t,{create:async()=>(await i.load()).language}),qK.languages.onLanguage(t,(async()=>{const e=await i.load();qK.languages.setLanguageConfiguration(t,e.conf)}))}({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>Promise.resolve().then(i.bind(i,3585))}),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647}(GK||(GK={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647}(YK||(YK={})),(yq=ZK||(ZK={})).create=function(e,t){return e===Number.MAX_VALUE&&(e=YK.MAX_VALUE),t===Number.MAX_VALUE&&(t=YK.MAX_VALUE),{line:e,character:t}},yq.is=function(e){var t=e;return oG.objectLiteral(t)&&oG.uinteger(t.line)&&oG.uinteger(t.character)},(wq=XK||(XK={})).create=function(e,t,i,n){if(oG.uinteger(e)&&oG.uinteger(t)&&oG.uinteger(i)&&oG.uinteger(n))return{start:ZK.create(e,t),end:ZK.create(i,n)};if(ZK.is(e)&&ZK.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments["+e+", "+t+", "+i+", "+n+"]")},wq.is=function(e){var t=e;return oG.objectLiteral(t)&&ZK.is(t.start)&&ZK.is(t.end)},function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){var t=e;return oG.defined(t)&&XK.is(t.range)&&(oG.string(t.uri)||oG.undefined(t.uri))}}(JK||(JK={})),function(e){e.create=function(e,t,i,n){return{targetUri:e,targetRange:t,targetSelectionRange:i,originSelectionRange:n}},e.is=function(e){var t=e;return oG.defined(t)&&XK.is(t.targetRange)&&oG.string(t.targetUri)&&(XK.is(t.targetSelectionRange)||oG.undefined(t.targetSelectionRange))&&(XK.is(t.originSelectionRange)||oG.undefined(t.originSelectionRange))}}(QK||(QK={})),function(e){e.create=function(e,t,i,n){return{red:e,green:t,blue:i,alpha:n}},e.is=function(e){var t=e;return oG.numberRange(t.red,0,1)&&oG.numberRange(t.green,0,1)&&oG.numberRange(t.blue,0,1)&&oG.numberRange(t.alpha,0,1)}}(eq||(eq={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){var t=e;return XK.is(t.range)&&eq.is(t.color)}}(tq||(tq={})),function(e){e.create=function(e,t,i){return{label:e,textEdit:t,additionalTextEdits:i}},e.is=function(e){var t=e;return oG.string(t.label)&&(oG.undefined(t.textEdit)||hq.is(t))&&(oG.undefined(t.additionalTextEdits)||oG.typedArray(t.additionalTextEdits,hq.is))}}(iq||(iq={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(nq||(nq={})),function(e){e.create=function(e,t,i,n,o){var r={startLine:e,endLine:t};return oG.defined(i)&&(r.startCharacter=i),oG.defined(n)&&(r.endCharacter=n),oG.defined(o)&&(r.kind=o),r},e.is=function(e){var t=e;return oG.uinteger(t.startLine)&&oG.uinteger(t.startLine)&&(oG.undefined(t.startCharacter)||oG.uinteger(t.startCharacter))&&(oG.undefined(t.endCharacter)||oG.uinteger(t.endCharacter))&&(oG.undefined(t.kind)||oG.string(t.kind))}}(oq||(oq={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){var t=e;return oG.defined(t)&&JK.is(t.location)&&oG.string(t.message)}}(rq||(rq={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(sq||(sq={})),function(e){e.Unnecessary=1,e.Deprecated=2}(aq||(aq={})),function(e){e.is=function(e){var t=e;return null!=t&&oG.string(t.href)}}(lq||(lq={})),function(e){e.create=function(e,t,i,n,o,r){var s={range:e,message:t};return oG.defined(i)&&(s.severity=i),oG.defined(n)&&(s.code=n),oG.defined(o)&&(s.source=o),oG.defined(r)&&(s.relatedInformation=r),s},e.is=function(e){var t,i=e;return oG.defined(i)&&XK.is(i.range)&&oG.string(i.message)&&(oG.number(i.severity)||oG.undefined(i.severity))&&(oG.integer(i.code)||oG.string(i.code)||oG.undefined(i.code))&&(oG.undefined(i.codeDescription)||oG.string(null===(t=i.codeDescription)||void 0===t?void 0:t.href))&&(oG.string(i.source)||oG.undefined(i.source))&&(oG.undefined(i.relatedInformation)||oG.typedArray(i.relatedInformation,rq.is))}}(cq||(cq={})),function(e){e.create=function(e,t){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];var o={title:e,command:t};return oG.defined(i)&&i.length>0&&(o.arguments=i),o},e.is=function(e){var t=e;return oG.defined(t)&&oG.string(t.title)&&oG.string(t.command)}}(dq||(dq={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){var t=e;return oG.objectLiteral(t)&&oG.string(t.newText)&&XK.is(t.range)}}(hq||(hq={})),function(e){e.create=function(e,t,i){var n={label:e};return void 0!==t&&(n.needsConfirmation=t),void 0!==i&&(n.description=i),n},e.is=function(e){var t=e;return void 0!==t&&oG.objectLiteral(t)&&oG.string(t.label)&&(oG.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(oG.string(t.description)||void 0===t.description)}}(uq||(uq={})),function(e){e.is=function(e){return"string"==typeof e}}(gq||(gq={})),function(e){e.replace=function(e,t,i){return{range:e,newText:t,annotationId:i}},e.insert=function(e,t,i){return{range:{start:e,end:e},newText:t,annotationId:i}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){var t=e;return hq.is(t)&&(uq.is(t.annotationId)||gq.is(t.annotationId))}}(pq||(pq={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return oG.defined(t)&&Eq.is(t.textDocument)&&Array.isArray(t.edits)}}(mq||(mq={})),function(e){e.create=function(e,t,i){var n={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(n.options=t),void 0!==i&&(n.annotationId=i),n},e.is=function(e){var t=e;return t&&"create"===t.kind&&oG.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||oG.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||oG.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||gq.is(t.annotationId))}}(fq||(fq={})),function(e){e.create=function(e,t,i,n){var o={kind:"rename",oldUri:e,newUri:t};return void 0===i||void 0===i.overwrite&&void 0===i.ignoreIfExists||(o.options=i),void 0!==n&&(o.annotationId=n),o},e.is=function(e){var t=e;return t&&"rename"===t.kind&&oG.string(t.oldUri)&&oG.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||oG.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||oG.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||gq.is(t.annotationId))}}(_q||(_q={})),function(e){e.create=function(e,t,i){var n={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(n.options=t),void 0!==i&&(n.annotationId=i),n},e.is=function(e){var t=e;return t&&"delete"===t.kind&&oG.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||oG.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||oG.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||gq.is(t.annotationId))}}(vq||(vq={})),function(e){e.is=function(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(e){return oG.string(e.kind)?fq.is(e)||_q.is(e)||vq.is(e):mq.is(e)})))}}(bq||(bq={}));var xq,Lq,Eq,Nq,Iq,Tq,Dq,Aq,Oq,Mq,Rq,Pq,Fq,Bq,Wq,Vq,zq,jq,Hq,Uq,$q,Kq,qq,Gq,Yq,Zq,Xq,Jq,Qq,eG,tG,iG=function(){function e(e,t){this.edits=e,this.changeAnnotations=t}return e.prototype.insert=function(e,t,i){var n,o;if(void 0===i?n=hq.insert(e,t):gq.is(i)?(o=i,n=pq.insert(e,t,i)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(i),n=pq.insert(e,t,o)),this.edits.push(n),void 0!==o)return o},e.prototype.replace=function(e,t,i){var n,o;if(void 0===i?n=hq.replace(e,t):gq.is(i)?(o=i,n=pq.replace(e,t,i)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(i),n=pq.replace(e,t,o)),this.edits.push(n),void 0!==o)return o},e.prototype.delete=function(e,t){var i,n;if(void 0===t?i=hq.del(e):gq.is(t)?(n=t,i=pq.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),i=pq.del(e,n)),this.edits.push(i),void 0!==n)return n},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),nG=function(){function e(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}return e.prototype.all=function(){return this._annotations},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.manage=function(e,t){var i;if(gq.is(e)?i=e:(i=this.nextId(),t=e),void 0!==this._annotations[i])throw new Error("Id "+i+" is already in use.");if(void 0===t)throw new Error("No annotation provided for id "+i);return this._annotations[i]=t,this._size++,i},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}();!function(){function e(e){var t=this;this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new nG(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((function(e){if(mq.is(e)){var i=new iG(e.edits,t._changeAnnotations);t._textEditChanges[e.textDocument.uri]=i}}))):e.changes&&Object.keys(e.changes).forEach((function(i){var n=new iG(e.changes[i]);t._textEditChanges[i]=n}))):this._workspaceEdit={}}Object.defineProperty(e.prototype,"edit",{get:function(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),e.prototype.getTextEditChange=function(e){if(Eq.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t={uri:e.uri,version:e.version};if(!(n=this._textEditChanges[t.uri])){var i={textDocument:t,edits:o=[]};this._workspaceEdit.documentChanges.push(i),n=new iG(o,this._changeAnnotations),this._textEditChanges[t.uri]=n}return n}if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var n;if(!(n=this._textEditChanges[e])){var o=[];this._workspaceEdit.changes[e]=o,n=new iG(o),this._textEditChanges[e]=n}return n},e.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new nG,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))},e.prototype.createFile=function(e,t,i){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var n,o,r;if(uq.is(t)||gq.is(t)?n=t:i=t,void 0===n?o=fq.create(e,i):(r=gq.is(n)?n:this._changeAnnotations.manage(n),o=fq.create(e,i,r)),this._workspaceEdit.documentChanges.push(o),void 0!==r)return r},e.prototype.renameFile=function(e,t,i,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var o,r,s;if(uq.is(i)||gq.is(i)?o=i:n=i,void 0===o?r=_q.create(e,t,n):(s=gq.is(o)?o:this._changeAnnotations.manage(o),r=_q.create(e,t,n,s)),this._workspaceEdit.documentChanges.push(r),void 0!==s)return s},e.prototype.deleteFile=function(e,t,i){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var n,o,r;if(uq.is(t)||gq.is(t)?n=t:i=t,void 0===n?o=vq.create(e,i):(r=gq.is(n)?n:this._changeAnnotations.manage(n),o=vq.create(e,i,r)),this._workspaceEdit.documentChanges.push(o),void 0!==r)return r}}(),function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return oG.defined(t)&&oG.string(t.uri)}}(xq||(xq={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return oG.defined(t)&&oG.string(t.uri)&&oG.integer(t.version)}}(Lq||(Lq={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return oG.defined(t)&&oG.string(t.uri)&&(null===t.version||oG.integer(t.version))}}(Eq||(Eq={})),function(e){e.create=function(e,t,i,n){return{uri:e,languageId:t,version:i,text:n}},e.is=function(e){var t=e;return oG.defined(t)&&oG.string(t.uri)&&oG.string(t.languageId)&&oG.integer(t.version)&&oG.string(t.text)}}(Nq||(Nq={})),function(e){e.PlainText="plaintext",e.Markdown="markdown"}(Iq||(Iq={})),function(e){e.is=function(t){var i=t;return i===e.PlainText||i===e.Markdown}}(Iq||(Iq={})),function(e){e.is=function(e){var t=e;return oG.objectLiteral(e)&&Iq.is(t.kind)&&oG.string(t.value)}}(Tq||(Tq={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(Dq||(Dq={})),function(e){e.PlainText=1,e.Snippet=2}(Aq||(Aq={})),function(e){e.Deprecated=1}(Oq||(Oq={})),function(e){e.create=function(e,t,i){return{newText:e,insert:t,replace:i}},e.is=function(e){var t=e;return t&&oG.string(t.newText)&&XK.is(t.insert)&&XK.is(t.replace)}}(Mq||(Mq={})),function(e){e.asIs=1,e.adjustIndentation=2}(Rq||(Rq={})),function(e){e.create=function(e){return{label:e}}}(Pq||(Pq={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(Fq||(Fq={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){var t=e;return oG.string(t)||oG.objectLiteral(t)&&oG.string(t.language)&&oG.string(t.value)}}(Bq||(Bq={})),function(e){e.is=function(e){var t=e;return!!t&&oG.objectLiteral(t)&&(Tq.is(t.contents)||Bq.is(t.contents)||oG.typedArray(t.contents,Bq.is))&&(void 0===e.range||XK.is(e.range))}}(Wq||(Wq={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(Vq||(Vq={})),function(e){e.create=function(e,t){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];var o={label:e};return oG.defined(t)&&(o.documentation=t),oG.defined(i)?o.parameters=i:o.parameters=[],o}}(zq||(zq={})),function(e){e.Text=1,e.Read=2,e.Write=3}(jq||(jq={})),function(e){e.create=function(e,t){var i={range:e};return oG.number(t)&&(i.kind=t),i}}(Hq||(Hq={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(Uq||(Uq={})),function(e){e.Deprecated=1}($q||($q={})),function(e){e.create=function(e,t,i,n,o){var r={name:e,kind:t,location:{uri:n,range:i}};return o&&(r.containerName=o),r}}(Kq||(Kq={})),function(e){e.create=function(e,t,i,n,o,r){var s={name:e,detail:t,kind:i,range:n,selectionRange:o};return void 0!==r&&(s.children=r),s},e.is=function(e){var t=e;return t&&oG.string(t.name)&&oG.number(t.kind)&&XK.is(t.range)&&XK.is(t.selectionRange)&&(void 0===t.detail||oG.string(t.detail))&&(void 0===t.deprecated||oG.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(qq||(qq={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(Gq||(Gq={})),function(e){e.create=function(e,t){var i={diagnostics:e};return null!=t&&(i.only=t),i},e.is=function(e){var t=e;return oG.defined(t)&&oG.typedArray(t.diagnostics,cq.is)&&(void 0===t.only||oG.typedArray(t.only,oG.string))}}(Yq||(Yq={})),function(e){e.create=function(e,t,i){var n={title:e},o=!0;return"string"==typeof t?(o=!1,n.kind=t):dq.is(t)?n.command=t:n.edit=t,o&&void 0!==i&&(n.kind=i),n},e.is=function(e){var t=e;return t&&oG.string(t.title)&&(void 0===t.diagnostics||oG.typedArray(t.diagnostics,cq.is))&&(void 0===t.kind||oG.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||dq.is(t.command))&&(void 0===t.isPreferred||oG.boolean(t.isPreferred))&&(void 0===t.edit||bq.is(t.edit))}}(Zq||(Zq={})),function(e){e.create=function(e,t){var i={range:e};return oG.defined(t)&&(i.data=t),i},e.is=function(e){var t=e;return oG.defined(t)&&XK.is(t.range)&&(oG.undefined(t.command)||dq.is(t.command))}}(Xq||(Xq={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){var t=e;return oG.defined(t)&&oG.uinteger(t.tabSize)&&oG.boolean(t.insertSpaces)}}(Jq||(Jq={})),function(e){e.create=function(e,t,i){return{range:e,target:t,data:i}},e.is=function(e){var t=e;return oG.defined(t)&&XK.is(t.range)&&(oG.undefined(t.target)||oG.string(t.target))}}(Qq||(Qq={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){var i=t;return void 0!==i&&XK.is(i.range)&&(void 0===i.parent||e.is(i.parent))}}(eG||(eG={})),function(e){function t(e,i){if(e.length<=1)return e;var n=e.length/2|0,o=e.slice(0,n),r=e.slice(n);t(o,i),t(r,i);for(var s=0,a=0,l=0;s<o.length&&a<r.length;){var c=i(o[s],r[a]);e[l++]=c<=0?o[s++]:r[a++]}for(;s<o.length;)e[l++]=o[s++];for(;a<r.length;)e[l++]=r[a++];return e}e.create=function(e,t,i,n){return new rG(e,t,i,n)},e.is=function(e){var t=e;return!!(oG.defined(t)&&oG.string(t.uri)&&(oG.undefined(t.languageId)||oG.string(t.languageId))&&oG.uinteger(t.lineCount)&&oG.func(t.getText)&&oG.func(t.positionAt)&&oG.func(t.offsetAt))},e.applyEdits=function(e,i){for(var n=e.getText(),o=t(i,(function(e,t){var i=e.range.start.line-t.range.start.line;return 0===i?e.range.start.character-t.range.start.character:i})),r=n.length,s=o.length-1;s>=0;s--){var a=o[s],l=e.offsetAt(a.range.start),c=e.offsetAt(a.range.end);if(!(c<=r))throw new Error("Overlapping edit");n=n.substring(0,l)+a.newText+n.substring(c,n.length),r=l}return n}}(tG||(tG={}));var oG,rG=function(){function e(e,t,i,n){this._uri=e,this._languageId=t,this._version=i,this._content=n,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),i=this.offsetAt(e.end);return this._content.substring(t,i)}return this._content},e.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(void 0===this._lineOffsets){for(var e=[],t=this._content,i=!0,n=0;n<t.length;n++){i&&(e.push(n),i=!1);var o=t.charAt(n);i="\r"===o||"\n"===o,"\r"===o&&n+1<t.length&&"\n"===t.charAt(n+1)&&n++}i&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),i=0,n=t.length;if(0===n)return ZK.create(0,e);for(;i<n;){var o=Math.floor((i+n)/2);t[o]>e?n=o:i=o+1}var r=i-1;return ZK.create(r,e-t[r])},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var i=t[e.line],n=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(i+e.character,n),i)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),e}();!function(e){var t=Object.prototype.toString;e.defined=function(e){return void 0!==e},e.undefined=function(e){return void 0===e},e.boolean=function(e){return!0===e||!1===e},e.string=function(e){return"[object String]"===t.call(e)},e.number=function(e){return"[object Number]"===t.call(e)},e.numberRange=function(e,i,n){return"[object Number]"===t.call(e)&&i<=e&&e<=n},e.integer=function(e){return"[object Number]"===t.call(e)&&-2147483648<=e&&e<=2147483647},e.uinteger=function(e){return"[object Number]"===t.call(e)&&0<=e&&e<=2147483647},e.func=function(e){return"[object Function]"===t.call(e)},e.objectLiteral=function(e){return null!==e&&"object"==typeof e},e.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)}}(oG||(oG={}));var sG="yaml";function aG(e){switch(e){case sq.Error:return FK.Error;case sq.Warning:return FK.Warning;case sq.Information:return FK.Info;case sq.Hint:return FK.Hint;default:return FK.Info}}function lG(e){switch(e){case aq.Deprecated:return BK.Deprecated;case aq.Unnecessary:return BK.Unnecessary}}function cG(e){var t;return{severity:aG(e.severity),startLineNumber:e.range.start.line+1,startColumn:e.range.start.character+1,endLineNumber:e.range.end.line+1,endColumn:e.range.end.character+1,message:e.message,code:String(e.code),source:e.source,tags:null==(t=e.tags)?void 0:t.map(lG)}}function dG(e){if(e)return{character:e.column-1,line:e.lineNumber-1}}function hG(e){if(e)return new MK(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function uG(e){return{start:{line:e.startLineNumber-1,character:e.startColumn-1},end:{line:e.endLineNumber-1,character:e.endColumn-1}}}function gG(e){return{message:e.message,range:uG(e),code:"object"==typeof e.code?e.code.value:e.code,source:e.source}}function pG(e){const t=jK.CompletionItemKind;switch(e){case Dq.Text:return t.Text;case Dq.Method:return t.Method;case Dq.Function:return t.Function;case Dq.Constructor:return t.Constructor;case Dq.Field:return t.Field;case Dq.Variable:return t.Variable;case Dq.Class:return t.Class;case Dq.Interface:return t.Interface;case Dq.Module:return t.Module;case Dq.Property:return t.Property;case Dq.Unit:return t.Unit;case Dq.Value:return t.Value;case Dq.Enum:return t.Enum;case Dq.Keyword:return t.Keyword;case Dq.Snippet:return t.Snippet;case Dq.Color:return t.Color;case Dq.File:return t.File;case Dq.Reference:return t.Reference;default:return t.Property}}function mG(e){if(e)return{range:hG(e.range),text:e.newText}}function fG(e){const t=jK.SymbolKind;switch(e){case Uq.File:return t.Array;case Uq.Module:return t.Module;case Uq.Namespace:return t.Namespace;case Uq.Package:return t.Package;case Uq.Class:return t.Class;case Uq.Method:return t.Method;case Uq.Property:return t.Property;case Uq.Field:return t.Field;case Uq.Constructor:return t.Constructor;case Uq.Enum:return t.Enum;case Uq.Interface:return t.Interface;case Uq.Function:return t.Function;case Uq.Variable:return t.Variable;case Uq.Constant:return t.Constant;case Uq.String:return t.String;case Uq.Number:return t.Number;case Uq.Boolean:return t.Boolean;case Uq.Array:return t.Array;default:return t.Function}}function _G(e){return{detail:e.detail||"",range:hG(e.range),name:e.name,kind:fG(e.kind),selectionRange:hG(e.selectionRange),children:e.children.map(_G),tags:[]}}function vG(e){return{range:hG(e.range),tooltip:e.tooltip,url:e.target}}function bG(e){const t=[];for(const[i,n]of Object.entries(e.changes))for(const e of n)t.push({resource:WK.parse(i),edit:{text:e.newText,range:hG(e.range)}});return{edits:t}}function wG(e){var t;return{title:e.title,diagnostics:e.diagnostics.map(cG),disabled:null==(t=e.disabled)?void 0:t.reason,edit:bG(e.edit),kind:e.kind,isPreferred:e.isPreferred}}var yG={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:jK.IndentAction.Indent}}]};var CG={completion:!0,customTags:[],enableSchemaRequest:!1,format:!0,isKubernetes:!1,hover:!0,schemas:[],validate:!0,yamlVersion:"1.2"},SG=function(e){const t=new TK;let i=e;const n={get onDidChange(){return t.event},get diagnosticsOptions(){return i},setDiagnosticsOptions(e){i={...CG,...e},t.fire(n)}};return n}(CG);jK.register({id:sG,extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml"]}),jK.onLanguage("yaml",(()=>{!function(e){const t=function(e,t){let i,n,{createData:o,interval:r=3e4,label:s,moduleId:a,stopWhenIdleFor:l=12e4}=t,c=0,d=!1;const h=()=>{i&&(i.dispose(),i=void 0),n=void 0},u=setInterval((()=>{i&&Date.now()-c>l&&h()}),r);return{dispose(){d=!0,clearInterval(u),h()},async getWorker(...t){if(d)throw new Error("Worker manager has been disposed");return c=Date.now(),n||(i=e.editor.createWebWorker({createData:o,label:s,moduleId:a}),n=i.getProxy()),await i.withSyncedResources(t),n},updateCreateData(e){o=e,h()}}}({editor:zK},{label:"yaml",moduleId:"monaco-yaml/yaml.worker",createData:{languageSettings:e.diagnosticsOptions,enableSchemaRequest:e.diagnosticsOptions.enableSchemaRequest}});var i;e.onDidChange((()=>{t.updateCreateData({languageSettings:e.diagnosticsOptions,enableSchemaRequest:e.diagnosticsOptions.enableSchemaRequest})})),jK.registerCompletionItemProvider(sG,(i=t.getWorker,{triggerCharacters:[" ",":"],async provideCompletionItems(e,t){const n=e.uri,o=await i(n),r=await o.doComplete(String(n),dG(t));if(!r)return;const s=e.getWordUntilPosition(t),a=new MK(t.lineNumber,s.startColumn,t.lineNumber,s.endColumn),l=r.items.map((e=>{const t={label:e.label,insertText:e.insertText||e.label,sortText:e.sortText,filterText:e.filterText,documentation:e.documentation,detail:e.detail,kind:pG(e.kind),range:a};return e.textEdit&&(t.range=hG("range"in e.textEdit?e.textEdit.range:e.textEdit.replace),t.insertText=e.textEdit.newText),e.additionalTextEdits&&(t.additionalTextEdits=e.additionalTextEdits.map(mG)),e.insertTextFormat===Aq.Snippet&&(t.insertTextRules=jK.CompletionItemInsertTextRule.InsertAsSnippet),t}));return{incomplete:r.isIncomplete,suggestions:l}}})),jK.registerHoverProvider(sG,function(e){return{async provideHover(t,i){const n=t.uri,o=await e(n),r=await o.doHover(String(n),dG(i));if(r)return{range:hG(r.range),contents:[{value:r.contents.value}]}}}}(t.getWorker)),jK.registerDefinitionProvider(sG,function(e){return{async provideDefinition(t,i){const n=t.uri,o=await e(n),r=await o.doDefinition(String(n),dG(i));return null==r?void 0:r.map((e=>({originSelectionRange:e.originSelectionRange,range:hG(e.targetRange),targetSelectionRange:e.targetSelectionRange,uri:WK.parse(e.targetUri)})))}}}(t.getWorker)),jK.registerDocumentSymbolProvider(sG,function(e){return{async provideDocumentSymbols(t){const i=t.uri,n=await e(i),o=await n.findDocumentSymbols(String(i));if(o)return o.map(_G)}}}(t.getWorker)),jK.registerDocumentFormattingEditProvider(sG,function(e){return{async provideDocumentFormattingEdits(t,i){const n=t.uri,o=await e(n),r=await o.format(String(n),function(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces,...e}}(i));if(r&&0!==r.length)return r.map(mG)}}}(t.getWorker)),jK.registerLinkProvider(sG,function(e){return{async provideLinks(t){const i=t.uri,n=await e(i);return{links:(await n.findLinks(String(i))).map(vG)}}}}(t.getWorker)),jK.registerCodeActionProvider(sG,function(e){return{async provideCodeActions(t,i,n){const o=t.uri,r=await e(o);return{actions:(await r.getCodeAction(String(o),uG(i),n.markers.map(gG))).map(wG),dispose(){}}}}}(t.getWorker)),function(e,t){const i=new Map,n=async t=>{(await e()).resetSchema(String(t))},o=async t=>{const i=await e(t),n=(await i.doValidation(String(t))).map(cG),o=zK.getModel(t);o&&o.getLanguageId()===sG&&zK.setModelMarkers(o,sG,n)},r=e=>{if(e.getLanguageId()!==sG)return;let t;i.set(String(e.uri),e.onDidChangeContent((()=>{clearTimeout(t),t=setTimeout((()=>o(e.uri)),500)}))),o(e.uri)},s=e=>{zK.setModelMarkers(e,sG,[]);const t=String(e.uri),n=i.get(t);n&&(n.dispose(),i.delete(t))};zK.onDidCreateModel(r),zK.onWillDisposeModel((e=>{s(e),n(e.uri)})),zK.onDidChangeModelLanguage((e=>{s(e.model),r(e.model),n(e.model.uri)})),t.onDidChange((()=>{for(const e of zK.getModels())e.getLanguageId()===sG&&(s(e),r(e))}));for(const e of zK.getModels())r(e)}(t.getWorker,e),jK.setLanguageConfiguration(sG,yG)}(SG)}));var kG=JSON.parse('{"$schema":"https://json-schema.org/draft-07/schema","$id":"compose_spec.json","type":"object","title":"Compose Specification","description":"The Compose file is a YAML file defining a multi-containers based application.","properties":{"version":{"type":"string","deprecated":true,"description":"declared for backward compatibility, ignored. Please remove it."},"name":{"type":"string","description":"define the Compose project name, until user defines one explicitly."},"include":{"type":"array","items":{"$ref":"#/definitions/include"},"description":"compose sub-projects to be included."},"services":{"type":"object","patternProperties":{"^[a-zA-Z0-9._-]+$":{"$ref":"#/definitions/service"}},"additionalProperties":false,"description":"The services that will be used by your application."},"networks":{"type":"object","patternProperties":{"^[a-zA-Z0-9._-]+$":{"$ref":"#/definitions/network"}},"description":"Networks that are shared among multiple services."},"volumes":{"type":"object","patternProperties":{"^[a-zA-Z0-9._-]+$":{"$ref":"#/definitions/volume"}},"additionalProperties":false,"description":"Named volumes that are shared among multiple services."},"secrets":{"type":"object","patternProperties":{"^[a-zA-Z0-9._-]+$":{"$ref":"#/definitions/secret"}},"additionalProperties":false,"description":"Secrets that are shared among multiple services."},"configs":{"type":"object","patternProperties":{"^[a-zA-Z0-9._-]+$":{"$ref":"#/definitions/config"}},"additionalProperties":false,"description":"Configurations that are shared among multiple services."}},"patternProperties":{"^x-":{}},"additionalProperties":false,"definitions":{"service":{"type":"object","description":"Configuration for a service.","properties":{"develop":{"$ref":"#/definitions/development"},"deploy":{"$ref":"#/definitions/deployment"},"annotations":{"$ref":"#/definitions/list_or_dict"},"attach":{"type":["boolean","string"]},"build":{"description":"Configuration options for building the service\'s image.","oneOf":[{"type":"string","description":"Path to the build context. Can be a relative path or a URL."},{"type":"object","properties":{"context":{"type":"string","description":"Path to the build context. Can be a relative path or a URL."},"dockerfile":{"type":"string","description":"Name of the Dockerfile to use for building the image."},"dockerfile_inline":{"type":"string","description":"Inline Dockerfile content to use instead of a Dockerfile from the build context."},"entitlements":{"type":"array","items":{"type":"string"},"description":"List of extra privileged entitlements to grant to the build process."},"args":{"$ref":"#/definitions/list_or_dict","description":"Build-time variables, specified as a map or a list of KEY=VAL pairs."},"ssh":{"$ref":"#/definitions/list_or_dict","description":"SSH agent socket or keys to expose to the build. Format is either a string or a list of \'default|<id>[=<socket>|<key>[,<key>]]\'."},"labels":{"$ref":"#/definitions/list_or_dict","description":"Labels to apply to the built image."},"cache_from":{"type":"array","items":{"type":"string"},"description":"List of sources the image builder should use for cache resolution"},"cache_to":{"type":"array","items":{"type":"string"},"description":"Cache destinations for the build cache."},"no_cache":{"type":["boolean","string"],"description":"Do not use cache when building the image."},"additional_contexts":{"$ref":"#/definitions/list_or_dict","description":"Additional build contexts to use, specified as a map of name to context path or URL."},"network":{"type":"string","description":"Network mode to use for the build. Options include \'default\', \'none\', \'host\', or a network name."},"pull":{"type":["boolean","string"],"description":"Always attempt to pull a newer version of the image."},"target":{"type":"string","description":"Build stage to target in a multi-stage Dockerfile."},"shm_size":{"type":["integer","string"],"description":"Size of /dev/shm for the build container. A string value can use suffix like \'2g\' for 2 gigabytes."},"extra_hosts":{"$ref":"#/definitions/extra_hosts","description":"Add hostname mappings for the build container."},"isolation":{"type":"string","description":"Container isolation technology to use for the build process."},"privileged":{"type":["boolean","string"],"description":"Give extended privileges to the build container."},"secrets":{"$ref":"#/definitions/service_config_or_secret","description":"Secrets to expose to the build. These are accessible at build-time."},"tags":{"type":"array","items":{"type":"string"},"description":"Additional tags to apply to the built image."},"ulimits":{"$ref":"#/definitions/ulimits","description":"Override the default ulimits for the build container."},"platforms":{"type":"array","items":{"type":"string"},"description":"Platforms to build for, e.g., \'linux/amd64\', \'linux/arm64\', or \'windows/amd64\'."}},"additionalProperties":false,"patternProperties":{"^x-":{}}}]},"blkio_config":{"type":"object","description":"Block IO configuration for the service.","properties":{"device_read_bps":{"type":"array","description":"Limit read rate (bytes per second) from a device.","items":{"$ref":"#/definitions/blkio_limit"}},"device_read_iops":{"type":"array","description":"Limit read rate (IO per second) from a device.","items":{"$ref":"#/definitions/blkio_limit"}},"device_write_bps":{"type":"array","description":"Limit write rate (bytes per second) to a device.","items":{"$ref":"#/definitions/blkio_limit"}},"device_write_iops":{"type":"array","description":"Limit write rate (IO per second) to a device.","items":{"$ref":"#/definitions/blkio_limit"}},"weight":{"type":["integer","string"],"description":"Block IO weight (relative weight) for the service, between 10 and 1000."},"weight_device":{"type":"array","description":"Block IO weight (relative weight) for specific devices.","items":{"$ref":"#/definitions/blkio_weight"}}},"additionalProperties":false},"cap_add":{"type":"array","items":{"type":"string"},"uniqueItems":true,"description":"Add Linux capabilities. For example, \'CAP_SYS_ADMIN\', \'SYS_ADMIN\', or \'NET_ADMIN\'."},"cap_drop":{"type":"array","items":{"type":"string"},"uniqueItems":true,"description":"Drop Linux capabilities. For example, \'CAP_SYS_ADMIN\', \'SYS_ADMIN\', or \'NET_ADMIN\'."},"cgroup":{"type":"string","enum":["host","private"],"description":"Specify the cgroup namespace to join. Use \'host\' to use the host\'s cgroup namespace, or \'private\' to use a private cgroup namespace."},"cgroup_parent":{"type":"string","description":"Specify an optional parent cgroup for the container."},"command":{"$ref":"#/definitions/command","description":"Override the default command declared by the container image, for example \'CMD\' in Dockerfile."},"configs":{"$ref":"#/definitions/service_config_or_secret","description":"Grant access to Configs on a per-service basis."},"container_name":{"type":"string","description":"Specify a custom container name, rather than a generated default name."},"cpu_count":{"oneOf":[{"type":"string"},{"type":"integer","minimum":0}],"description":"Number of usable CPUs."},"cpu_percent":{"oneOf":[{"type":"string"},{"type":"integer","minimum":0,"maximum":100}],"description":"Percentage of CPU resources to use."},"cpu_shares":{"type":["number","string"],"description":"CPU shares (relative weight) for the container."},"cpu_quota":{"type":["number","string"],"description":"Limit the CPU CFS (Completely Fair Scheduler) quota."},"cpu_period":{"type":["number","string"],"description":"Limit the CPU CFS (Completely Fair Scheduler) period."},"cpu_rt_period":{"type":["number","string"],"description":"Limit the CPU real-time period in microseconds or a duration."},"cpu_rt_runtime":{"type":["number","string"],"description":"Limit the CPU real-time runtime in microseconds or a duration."},"cpus":{"type":["number","string"],"description":"Number of CPUs to use. A floating-point value is supported to request partial CPUs."},"cpuset":{"type":"string","description":"CPUs in which to allow execution (0-3, 0,1)."},"credential_spec":{"type":"object","description":"Configure the credential spec for managed service account.","properties":{"config":{"type":"string","description":"The name of the credential spec Config to use."},"file":{"type":"string","description":"Path to a credential spec file."},"registry":{"type":"string","description":"Path to a credential spec in the Windows registry."}},"additionalProperties":false,"patternProperties":{"^x-":{}}},"depends_on":{"oneOf":[{"$ref":"#/definitions/list_of_strings"},{"type":"object","additionalProperties":false,"patternProperties":{"^[a-zA-Z0-9._-]+$":{"type":"object","additionalProperties":false,"patternProperties":{"^x-":{}},"properties":{"restart":{"type":["boolean","string"],"description":"Whether to restart dependent services when this service is restarted."},"required":{"type":"boolean","default":true,"description":"Whether the dependency is required for the dependent service to start."},"condition":{"type":"string","enum":["service_started","service_healthy","service_completed_successfully"],"description":"Condition to wait for. \'service_started\' waits until the service has started, \'service_healthy\' waits until the service is healthy (as defined by its healthcheck), \'service_completed_successfully\' waits until the service has completed successfully."}},"required":["condition"]}}}],"description":"Express dependency between services. Service dependencies cause services to be started in dependency order. The dependent service will wait for the dependency to be ready before starting."},"device_cgroup_rules":{"$ref":"#/definitions/list_of_strings","description":"Add rules to the cgroup allowed devices list."},"devices":{"type":"array","description":"List of device mappings for the container.","items":{"oneOf":[{"type":"string"},{"type":"object","required":["source"],"properties":{"source":{"type":"string","description":"Path on the host to the device."},"target":{"type":"string","description":"Path in the container where the device will be mapped."},"permissions":{"type":"string","description":"Cgroup permissions for the device (rwm)."}},"additionalProperties":false,"patternProperties":{"^x-":{}}}]}},"dns":{"$ref":"#/definitions/string_or_list","description":"Custom DNS servers to set for the service container."},"dns_opt":{"type":"array","items":{"type":"string"},"uniqueItems":true,"description":"Custom DNS options to be passed to the container\'s DNS resolver."},"dns_search":{"$ref":"#/definitions/string_or_list","description":"Custom DNS search domains to set on the service container."},"domainname":{"type":"string","description":"Custom domain name to use for the service container."},"entrypoint":{"$ref":"#/definitions/command","description":"Override the default entrypoint declared by the container image, for example \'ENTRYPOINT\' in Dockerfile."},"env_file":{"$ref":"#/definitions/env_file","description":"Add environment variables from a file or multiple files. Can be a single file path or a list of file paths."},"label_file":{"$ref":"#/definitions/label_file","description":"Add metadata to containers using files containing Docker labels."},"environment":{"$ref":"#/definitions/list_or_dict","description":"Add environment variables. You can use either an array or a list of KEY=VAL pairs."},"expose":{"type":"array","items":{"type":["string","number"]},"uniqueItems":true,"description":"Expose ports without publishing them to the host machine - they\'ll only be accessible to linked services."},"extends":{"oneOf":[{"type":"string"},{"type":"object","properties":{"service":{"type":"string","description":"The name of the service to extend."},"file":{"type":"string","description":"The file path where the service to extend is defined."}},"required":["service"],"additionalProperties":false}],"description":"Extend another service, in the current file or another file."},"provider":{"type":"object","description":"Specify a service which will not be manage by Compose directly, and delegate its management to an external provider.","properties":{"type":{"type":"string","description":"External component used by Compose to manage setup and teardown lifecycle of the service."},"options":{"type":"object","description":"Provider-specific options.","patternProperties":{"^.+$":{"type":["string","number","null"]}}}},"additionalProperties":false,"patternProperties":{"^x-":{}}},"external_links":{"type":"array","items":{"type":"string"},"uniqueItems":true,"description":"Link to services started outside this Compose application. Specify services as <service_name>:<alias>."},"extra_hosts":{"$ref":"#/definitions/extra_hosts","description":"Add hostname mappings to the container network interface configuration."},"gpus":{"$ref":"#/definitions/gpus","description":"Define GPU devices to use. Can be set to \'all\' to use all GPUs, or a list of specific GPU devices."},"group_add":{"type":"array","items":{"type":["string","number"]},"uniqueItems":true,"description":"Add additional groups which user inside the container should be member of."},"healthcheck":{"$ref":"#/definitions/healthcheck","description":"Configure a health check for the container to monitor its health status."},"hostname":{"type":"string","description":"Define a custom hostname for the service container."},"image":{"type":"string","description":"Specify the image to start the container from. Can be a repository/tag, a digest, or a local image ID."},"init":{"type":["boolean","string"],"description":"Run as an init process inside the container that forwards signals and reaps processes."},"ipc":{"type":"string","description":"IPC sharing mode for the service container. Use \'host\' to share the host\'s IPC namespace, \'service:[service_name]\' to share with another service, or \'shareable\' to allow other services to share this service\'s IPC namespace."},"isolation":{"type":"string","description":"Container isolation technology to use. Supported values are platform-specific."},"labels":{"$ref":"#/definitions/list_or_dict","description":"Add metadata to containers using Docker labels. You can use either an array or a list."},"links":{"type":"array","items":{"type":"string"},"uniqueItems":true,"description":"Link to containers in another service. Either specify both the service name and a link alias (SERVICE:ALIAS), or just the service name."},"logging":{"type":"object","description":"Logging configuration for the service.","properties":{"driver":{"type":"string","description":"Logging driver to use, such as \'json-file\', \'syslog\', \'journald\', etc."},"options":{"type":"object","description":"Options for the logging driver.","patternProperties":{"^.+$":{"type":["string","number","null"]}}}},"additionalProperties":false,"patternProperties":{"^x-":{}}},"mac_address":{"type":"string","description":"Container MAC address to set."},"mem_limit":{"type":["number","string"],"description":"Memory limit for the container. A string value can use suffix like \'2g\' for 2 gigabytes."},"mem_reservation":{"type":["string","integer"],"description":"Memory reservation for the container."},"mem_swappiness":{"type":["integer","string"],"description":"Container memory swappiness as percentage (0 to 100)."},"memswap_limit":{"type":["number","string"],"description":"Amount of memory the container is allowed to swap to disk. Set to -1 to enable unlimited swap."},"network_mode":{"type":"string","description":"Network mode. Values can be \'bridge\', \'host\', \'none\', \'service:[service name]\', or \'container:[container name]\'."},"networks":{"oneOf":[{"$ref":"#/definitions/list_of_strings"},{"type":"object","patternProperties":{"^[a-zA-Z0-9._-]+$":{"oneOf":[{"type":"object","properties":{"aliases":{"$ref":"#/definitions/list_of_strings","description":"Alternative hostnames for this service on the network."},"interface_name":{"type":"string","description":"Interface network name used to connect to network"},"ipv4_address":{"type":"string","description":"Specify a static IPv4 address for this service on this network."},"ipv6_address":{"type":"string","description":"Specify a static IPv6 address for this service on this network."},"link_local_ips":{"$ref":"#/definitions/list_of_strings","description":"List of link-local IPs."},"mac_address":{"type":"string","description":"Specify a MAC address for this service on this network."},"driver_opts":{"type":"object","description":"Driver options for this network.","patternProperties":{"^.+$":{"type":["string","number"]}}},"priority":{"type":"number","description":"Specify the priority for the network connection."},"gw_priority":{"type":"number","description":"Specify the gateway priority for the network connection."}},"additionalProperties":false,"patternProperties":{"^x-":{}}},{"type":"null"}]}},"additionalProperties":false}],"description":"Networks to join, referencing entries under the top-level networks key. Can be a list of network names or a mapping of network name to network configuration."},"oom_kill_disable":{"type":["boolean","string"],"description":"Disable OOM Killer for the container."},"oom_score_adj":{"oneOf":[{"type":"string"},{"type":"integer","minimum":-1000,"maximum":1000}],"description":"Tune host\'s OOM preferences for the container (accepts -1000 to 1000)."},"pid":{"type":["string","null"],"description":"PID mode for container."},"pids_limit":{"type":["number","string"],"description":"Tune a container\'s PIDs limit. Set to -1 for unlimited PIDs."},"platform":{"type":"string","description":"Target platform to run on, e.g., \'linux/amd64\', \'linux/arm64\', or \'windows/amd64\'."},"ports":{"type":"array","description":"Expose container ports. Short format ([HOST:]CONTAINER[/PROTOCOL]).","items":{"oneOf":[{"type":"number"},{"type":"string"},{"type":"object","properties":{"name":{"type":"string","description":"A human-readable name for this port mapping."},"mode":{"type":"string","description":"The port binding mode, either \'host\' for publishing a host port or \'ingress\' for load balancing."},"host_ip":{"type":"string","description":"The host IP to bind to."},"target":{"type":["integer","string"],"description":"The port inside the container."},"published":{"type":["string","integer"],"description":"The publicly exposed port."},"protocol":{"type":"string","description":"The port protocol (tcp or udp)."},"app_protocol":{"type":"string","description":"Application protocol to use with the port (e.g., http, https, mysql)."}},"additionalProperties":false,"patternProperties":{"^x-":{}}}]},"uniqueItems":true},"post_start":{"type":"array","items":{"$ref":"#/definitions/service_hook"},"description":"Commands to run after the container starts. If any command fails, the container stops."},"pre_stop":{"type":"array","items":{"$ref":"#/definitions/service_hook"},"description":"Commands to run before the container stops. If any command fails, the container stop is aborted."},"privileged":{"type":["boolean","string"],"description":"Give extended privileges to the service container."},"profiles":{"$ref":"#/definitions/list_of_strings","description":"List of profiles for this service. When profiles are specified, services are only started when the profile is activated."},"pull_policy":{"type":"string","pattern":"always|never|build|if_not_present|missing|refresh|daily|weekly|every_([0-9]+[wdhms])+","description":"Policy for pulling images. Options include: \'always\', \'never\', \'if_not_present\', \'missing\', \'build\', or time-based refresh policies."},"pull_refresh_after":{"type":"string","description":"Time after which to refresh the image. Used with pull_policy=refresh."},"read_only":{"type":["boolean","string"],"description":"Mount the container\'s filesystem as read only."},"restart":{"type":"string","description":"Restart policy for the service container. Options include: \'no\', \'always\', \'on-failure\', and \'unless-stopped\'."},"runtime":{"type":"string","description":"Runtime to use for this container, e.g., \'runc\'."},"scale":{"type":["integer","string"],"description":"Number of containers to deploy for this service."},"security_opt":{"type":"array","items":{"type":"string"},"uniqueItems":true,"description":"Override the default labeling scheme for each container."},"shm_size":{"type":["number","string"],"description":"Size of /dev/shm. A string value can use suffix like \'2g\' for 2 gigabytes."},"secrets":{"$ref":"#/definitions/service_config_or_secret","description":"Grant access to Secrets on a per-service basis."},"sysctls":{"$ref":"#/definitions/list_or_dict","description":"Kernel parameters to set in the container. You can use either an array or a list."},"stdin_open":{"type":["boolean","string"],"description":"Keep STDIN open even if not attached."},"stop_grace_period":{"type":"string","description":"Time to wait for the container to stop gracefully before sending SIGKILL (e.g., \'1s\', \'1m30s\')."},"stop_signal":{"type":"string","description":"Signal to stop the container (e.g., \'SIGTERM\', \'SIGINT\')."},"storage_opt":{"type":"object","description":"Storage driver options for the container."},"tmpfs":{"$ref":"#/definitions/string_or_list","description":"Mount a temporary filesystem (tmpfs) into the container. Can be a single value or a list."},"tty":{"type":["boolean","string"],"description":"Allocate a pseudo-TTY to service container."},"ulimits":{"$ref":"#/definitions/ulimits","description":"Override the default ulimits for a container."},"user":{"type":"string","description":"Username or UID to run the container process as."},"uts":{"type":"string","description":"UTS namespace to use. \'host\' shares the host\'s UTS namespace."},"userns_mode":{"type":"string","description":"User namespace to use. \'host\' shares the host\'s user namespace."},"volumes":{"type":"array","description":"Mount host paths or named volumes accessible to the container. Short syntax (VOLUME:CONTAINER_PATH[:MODE])","items":{"oneOf":[{"type":"string"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["bind","volume","tmpfs","cluster","npipe","image"],"description":"The mount type: bind for mounting host directories, volume for named volumes, tmpfs for temporary filesystems, cluster for cluster volumes, npipe for named pipes, or image for mounting from an image."},"source":{"type":"string","description":"The source of the mount, a path on the host for a bind mount, a docker image reference for an image mount, or the name of a volume defined in the top-level volumes key. Not applicable for a tmpfs mount."},"target":{"type":"string","description":"The path in the container where the volume is mounted."},"read_only":{"type":["boolean","string"],"description":"Flag to set the volume as read-only."},"consistency":{"type":"string","description":"The consistency requirements for the mount. Available values are platform specific."},"bind":{"type":"object","description":"Configuration specific to bind mounts.","properties":{"propagation":{"type":"string","description":"The propagation mode for the bind mount: \'shared\', \'slave\', \'private\', \'rshared\', \'rslave\', or \'rprivate\'."},"create_host_path":{"type":["boolean","string"],"description":"Create the host path if it doesn\'t exist."},"recursive":{"type":"string","enum":["enabled","disabled","writable","readonly"],"description":"Recursively mount the source directory."},"selinux":{"type":"string","enum":["z","Z"],"description":"SELinux relabeling options: \'z\' for shared content, \'Z\' for private unshared content."}},"additionalProperties":false,"patternProperties":{"^x-":{}}},"volume":{"type":"object","description":"Configuration specific to volume mounts.","properties":{"labels":{"$ref":"#/definitions/list_or_dict","description":"Labels to apply to the volume."},"nocopy":{"type":["boolean","string"],"description":"Flag to disable copying of data from a container when a volume is created."},"subpath":{"type":"string","description":"Path within the volume to mount instead of the volume root."}},"additionalProperties":false,"patternProperties":{"^x-":{}}},"tmpfs":{"type":"object","description":"Configuration specific to tmpfs mounts.","properties":{"size":{"oneOf":[{"type":"integer","minimum":0},{"type":"string"}],"description":"Size of the tmpfs mount in bytes."},"mode":{"type":["number","string"],"description":"File mode of the tmpfs in octal."}},"additionalProperties":false,"patternProperties":{"^x-":{}}},"image":{"type":"object","description":"Configuration specific to image mounts.","properties":{"subpath":{"type":"string","description":"Path within the image to mount instead of the image root."}},"additionalProperties":false,"patternProperties":{"^x-":{}}}},"additionalProperties":false,"patternProperties":{"^x-":{}}}]},"uniqueItems":true},"volumes_from":{"type":"array","items":{"type":"string"},"uniqueItems":true,"description":"Mount volumes from another service or container. Optionally specify read-only access (ro) or read-write (rw)."},"working_dir":{"type":"string","description":"The working directory in which the entrypoint or command will be run"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"healthcheck":{"type":"object","description":"Configuration options to determine whether the container is healthy.","properties":{"disable":{"type":["boolean","string"],"description":"Disable any container-specified healthcheck. Set to true to disable."},"interval":{"type":"string","description":"Time between running the check (e.g., \'1s\', \'1m30s\'). Default: 30s."},"retries":{"type":["number","string"],"description":"Number of consecutive failures needed to consider the container as unhealthy. Default: 3."},"test":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The test to perform to check container health. Can be a string or a list. The first item is either NONE, CMD, or CMD-SHELL. If it\'s CMD, the rest of the command is exec\'d. If it\'s CMD-SHELL, the rest is run in the shell."},"timeout":{"type":"string","description":"Maximum time to allow one check to run (e.g., \'1s\', \'1m30s\'). Default: 30s."},"start_period":{"type":"string","description":"Start period for the container to initialize before starting health-retries countdown (e.g., \'1s\', \'1m30s\'). Default: 0s."},"start_interval":{"type":"string","description":"Time between running the check during the start period (e.g., \'1s\', \'1m30s\'). Default: interval value."}},"additionalProperties":false,"patternProperties":{"^x-":{}}},"development":{"type":["object","null"],"description":"Development configuration for the service, used for development workflows.","properties":{"watch":{"type":"array","description":"Configure watch mode for the service, which monitors file changes and performs actions in response.","items":{"type":"object","required":["path","action"],"properties":{"ignore":{"$ref":"#/definitions/string_or_list","description":"Patterns to exclude from watching."},"include":{"$ref":"#/definitions/string_or_list","description":"Patterns to include in watching."},"path":{"type":"string","description":"Path to watch for changes."},"action":{"type":"string","enum":["rebuild","sync","restart","sync+restart","sync+exec"],"description":"Action to take when a change is detected: rebuild the container, sync files, restart the container, sync and restart, or sync and execute a command."},"target":{"type":"string","description":"Target path in the container for sync operations."},"exec":{"$ref":"#/definitions/service_hook","description":"Command to execute when a change is detected and action is sync+exec."}},"additionalProperties":false,"patternProperties":{"^x-":{}}}}},"additionalProperties":false,"patternProperties":{"^x-":{}}},"deployment":{"type":["object","null"],"description":"Deployment configuration for the service.","properties":{"mode":{"type":"string","description":"Deployment mode for the service: \'replicated\' (default) or \'global\'."},"endpoint_mode":{"type":"string","description":"Endpoint mode for the service: \'vip\' (default) or \'dnsrr\'."},"replicas":{"type":["integer","string"],"description":"Number of replicas of the service container to run."},"labels":{"$ref":"#/definitions/list_or_dict","description":"Labels to apply to the service."},"rollback_config":{"type":"object","description":"Configuration for rolling back a service update.","properties":{"parallelism":{"type":["integer","string"],"description":"The number of containers to rollback at a time. If set to 0, all containers rollback simultaneously."},"delay":{"type":"string","description":"The time to wait between each container group\'s rollback (e.g., \'1s\', \'1m30s\')."},"failure_action":{"type":"string","description":"Action to take if a rollback fails: \'continue\', \'pause\'."},"monitor":{"type":"string","description":"Duration to monitor each task for failures after it is created (e.g., \'1s\', \'1m30s\')."},"max_failure_ratio":{"type":["number","string"],"description":"Failure rate to tolerate during a rollback."},"order":{"type":"string","enum":["start-first","stop-first"],"description":"Order of operations during rollbacks: \'stop-first\' (default) or \'start-first\'."}},"additionalProperties":false,"patternProperties":{"^x-":{}}},"update_config":{"type":"object","description":"Configuration for updating a service.","properties":{"parallelism":{"type":["integer","string"],"description":"The number of containers to update at a time."},"delay":{"type":"string","description":"The time to wait between updating a group of containers (e.g., \'1s\', \'1m30s\')."},"failure_action":{"type":"string","description":"Action to take if an update fails: \'continue\', \'pause\', \'rollback\'."},"monitor":{"type":"string","description":"Duration to monitor each updated task for failures after it is created (e.g., \'1s\', \'1m30s\')."},"max_failure_ratio":{"type":["number","string"],"description":"Failure rate to tolerate during an update (0 to 1)."},"order":{"type":"string","enum":["start-first","stop-first"],"description":"Order of operations during updates: \'stop-first\' (default) or \'start-first\'."}},"additionalProperties":false,"patternProperties":{"^x-":{}}},"resources":{"type":"object","description":"Resource constraints and reservations for the service.","properties":{"limits":{"type":"object","description":"Resource limits for the service containers.","properties":{"cpus":{"type":["number","string"],"description":"Limit for how much of the available CPU resources, as number of cores, a container can use."},"memory":{"type":"string","description":"Limit on the amount of memory a container can allocate (e.g., \'1g\', \'1024m\')."},"pids":{"type":["integer","string"],"description":"Maximum number of PIDs available to the container."}},"additionalProperties":false,"patternProperties":{"^x-":{}}},"reservations":{"type":"object","description":"Resource reservations for the service containers.","properties":{"cpus":{"type":["number","string"],"description":"Reservation for how much of the available CPU resources, as number of cores, a container can use."},"memory":{"type":"string","description":"Reservation on the amount of memory a container can allocate (e.g., \'1g\', \'1024m\')."},"generic_resources":{"$ref":"#/definitions/generic_resources","description":"User-defined resources to reserve."},"devices":{"$ref":"#/definitions/devices","description":"Device reservations for the container."}},"additionalProperties":false,"patternProperties":{"^x-":{}}}},"additionalProperties":false,"patternProperties":{"^x-":{}}},"restart_policy":{"type":"object","description":"Restart policy for the service containers.","properties":{"condition":{"type":"string","description":"Condition for restarting the container: \'none\', \'on-failure\', \'any\'."},"delay":{"type":"string","description":"Delay between restart attempts (e.g., \'1s\', \'1m30s\')."},"max_attempts":{"type":["integer","string"],"description":"Maximum number of restart attempts before giving up."},"window":{"type":"string","description":"Time window used to evaluate the restart policy (e.g., \'1s\', \'1m30s\')."}},"additionalProperties":false,"patternProperties":{"^x-":{}}},"placement":{"type":"object","description":"Constraints and preferences for the platform to select a physical node to run service containers","properties":{"constraints":{"type":"array","items":{"type":"string"},"description":"Placement constraints for the service (e.g., \'node.role==manager\')."},"preferences":{"type":"array","description":"Placement preferences for the service.","items":{"type":"object","properties":{"spread":{"type":"string","description":"Spread tasks evenly across values of the specified node label."}},"additionalProperties":false,"patternProperties":{"^x-":{}}}},"max_replicas_per_node":{"type":["integer","string"],"description":"Maximum number of replicas of the service."}},"additionalProperties":false,"patternProperties":{"^x-":{}}}},"additionalProperties":false,"patternProperties":{"^x-":{}}},"generic_resources":{"type":"array","description":"User-defined resources for services, allowing services to reserve specialized hardware resources.","items":{"type":"object","properties":{"discrete_resource_spec":{"type":"object","description":"Specification for discrete (countable) resources.","properties":{"kind":{"type":"string","description":"Type of resource (e.g., \'GPU\', \'FPGA\', \'SSD\')."},"value":{"type":["number","string"],"description":"Number of resources of this kind to reserve."}},"additionalProperties":false,"patternProperties":{"^x-":{}}}},"additionalProperties":false,"patternProperties":{"^x-":{}}}},"devices":{"type":"array","description":"Device reservations for containers, allowing services to access specific hardware devices.","items":{"type":"object","properties":{"capabilities":{"$ref":"#/definitions/list_of_strings","description":"List of capabilities the device needs to have (e.g., \'gpu\', \'compute\', \'utility\')."},"count":{"type":["string","integer"],"description":"Number of devices of this type to reserve."},"device_ids":{"$ref":"#/definitions/list_of_strings","description":"List of specific device IDs to reserve."},"driver":{"type":"string","description":"Device driver to use (e.g., \'nvidia\')."},"options":{"$ref":"#/definitions/list_or_dict","description":"Driver-specific options for the device."}},"additionalProperties":false,"patternProperties":{"^x-":{}},"required":["capabilities"]}},"gpus":{"oneOf":[{"type":"string","enum":["all"],"description":"Use all available GPUs."},{"type":"array","description":"List of specific GPU devices to use.","items":{"type":"object","properties":{"capabilities":{"$ref":"#/definitions/list_of_strings","description":"List of capabilities the GPU needs to have (e.g., \'compute\', \'utility\')."},"count":{"type":["string","integer"],"description":"Number of GPUs to use."},"device_ids":{"$ref":"#/definitions/list_of_strings","description":"List of specific GPU device IDs to use."},"driver":{"type":"string","description":"GPU driver to use (e.g., \'nvidia\')."},"options":{"$ref":"#/definitions/list_or_dict","description":"Driver-specific options for the GPU."}}},"additionalProperties":false,"patternProperties":{"^x-":{}}}]},"include":{"description":"Compose application or sub-projects to be included.","oneOf":[{"type":"string"},{"type":"object","properties":{"path":{"$ref":"#/definitions/string_or_list","description":"Path to the Compose application or sub-project files to include."},"env_file":{"$ref":"#/definitions/string_or_list","description":"Path to the environment files to use to define default values when interpolating variables in the Compose files being parsed."},"project_directory":{"type":"string","description":"Path to resolve relative paths set in the Compose file"}},"additionalProperties":false}]},"network":{"type":["object","null"],"description":"Network configuration for the Compose application.","properties":{"name":{"type":"string","description":"Custom name for this network."},"driver":{"type":"string","description":"Specify which driver should be used for this network. Default is \'bridge\'."},"driver_opts":{"type":"object","description":"Specify driver-specific options defined as key/value pairs.","patternProperties":{"^.+$":{"type":["string","number"]}}},"ipam":{"type":"object","description":"Custom IP Address Management configuration for this network.","properties":{"driver":{"type":"string","description":"Custom IPAM driver, instead of the default."},"config":{"type":"array","description":"List of IPAM configuration blocks.","items":{"type":"object","properties":{"subnet":{"type":"string","description":"Subnet in CIDR format that represents a network segment."},"ip_range":{"type":"string","description":"Range of IPs from which to allocate container IPs."},"gateway":{"type":"string","description":"IPv4 or IPv6 gateway for the subnet."},"aux_addresses":{"type":"object","description":"Auxiliary IPv4 or IPv6 addresses used by Network driver.","additionalProperties":false,"patternProperties":{"^.+$":{"type":"string"}}}},"additionalProperties":false,"patternProperties":{"^x-":{}}}},"options":{"type":"object","description":"Driver-specific options for the IPAM driver.","additionalProperties":false,"patternProperties":{"^.+$":{"type":"string"}}}},"additionalProperties":false,"patternProperties":{"^x-":{}}},"external":{"type":["boolean","string","object"],"description":"Specifies that this network already exists and was created outside of Compose.","properties":{"name":{"deprecated":true,"type":"string","description":"Specifies the name of the external network. Deprecated: use the \'name\' property instead."}},"additionalProperties":false,"patternProperties":{"^x-":{}}},"internal":{"type":["boolean","string"],"description":"Create an externally isolated network."},"enable_ipv4":{"type":["boolean","string"],"description":"Enable IPv4 networking."},"enable_ipv6":{"type":["boolean","string"],"description":"Enable IPv6 networking."},"attachable":{"type":["boolean","string"],"description":"If true, standalone containers can attach to this network."},"labels":{"$ref":"#/definitions/list_or_dict","description":"Add metadata to the network using labels."}},"additionalProperties":false,"patternProperties":{"^x-":{}}},"volume":{"type":["object","null"],"description":"Volume configuration for the Compose application.","properties":{"name":{"type":"string","description":"Custom name for this volume."},"driver":{"type":"string","description":"Specify which volume driver should be used for this volume."},"driver_opts":{"type":"object","description":"Specify driver-specific options.","patternProperties":{"^.+$":{"type":["string","number"]}}},"external":{"type":["boolean","string","object"],"description":"Specifies that this volume already exists and was created outside of Compose.","properties":{"name":{"deprecated":true,"type":"string","description":"Specifies the name of the external volume. Deprecated: use the \'name\' property instead."}},"additionalProperties":false,"patternProperties":{"^x-":{}}},"labels":{"$ref":"#/definitions/list_or_dict","description":"Add metadata to the volume using labels."}},"additionalProperties":false,"patternProperties":{"^x-":{}}},"secret":{"type":"object","description":"Secret configuration for the Compose application.","properties":{"name":{"type":"string","description":"Custom name for this secret."},"environment":{"type":"string","description":"Name of an environment variable from which to get the secret value."},"file":{"type":"string","description":"Path to a file containing the secret value."},"external":{"type":["boolean","string","object"],"description":"Specifies that this secret already exists and was created outside of Compose.","properties":{"name":{"type":"string","description":"Specifies the name of the external secret."}}},"labels":{"$ref":"#/definitions/list_or_dict","description":"Add metadata to the secret using labels."},"driver":{"type":"string","description":"Specify which secret driver should be used for this secret."},"driver_opts":{"type":"object","description":"Specify driver-specific options.","patternProperties":{"^.+$":{"type":["string","number"]}}},"template_driver":{"type":"string","description":"Driver to use for templating the secret\'s value."}},"additionalProperties":false,"patternProperties":{"^x-":{}}},"config":{"type":"object","description":"Config configuration for the Compose application.","properties":{"name":{"type":"string","description":"Custom name for this config."},"content":{"type":"string","description":"Inline content of the config."},"environment":{"type":"string","description":"Name of an environment variable from which to get the config value."},"file":{"type":"string","description":"Path to a file containing the config value."},"external":{"type":["boolean","string","object"],"description":"Specifies that this config already exists and was created outside of Compose.","properties":{"name":{"deprecated":true,"type":"string","description":"Specifies the name of the external config. Deprecated: use the \'name\' property instead."}}},"labels":{"$ref":"#/definitions/list_or_dict","description":"Add metadata to the config using labels."},"template_driver":{"type":"string","description":"Driver to use for templating the config\'s value."}},"additionalProperties":false,"patternProperties":{"^x-":{}}},"command":{"oneOf":[{"type":"null","description":"No command specified, use the container\'s default command."},{"type":"string","description":"Command as a string, which will be executed in a shell (e.g., \'/bin/sh -c\')."},{"type":"array","description":"Command as an array of strings, which will be executed directly without a shell.","items":{"type":"string","description":"Part of the command (executable or argument)."}}],"description":"Command to run in the container, which can be specified as a string (shell form) or array (exec form)."},"service_hook":{"type":"object","description":"Configuration for service lifecycle hooks, which are commands executed at specific points in a container\'s lifecycle.","properties":{"command":{"$ref":"#/definitions/command","description":"Command to execute as part of the hook."},"user":{"type":"string","description":"User to run the command as."},"privileged":{"type":["boolean","string"],"description":"Whether to run the command with extended privileges."},"working_dir":{"type":"string","description":"Working directory for the command."},"environment":{"$ref":"#/definitions/list_or_dict","description":"Environment variables for the command."}},"additionalProperties":false,"patternProperties":{"^x-":{}},"required":["command"]},"env_file":{"oneOf":[{"type":"string","description":"Path to a file containing environment variables."},{"type":"array","description":"List of paths to files containing environment variables.","items":{"oneOf":[{"type":"string","description":"Path to a file containing environment variables."},{"type":"object","description":"Detailed configuration for an environment file.","additionalProperties":false,"properties":{"path":{"type":"string","description":"Path to the environment file."},"format":{"type":"string","description":"Format attribute lets you to use an alternative file formats for env_file. When not set, env_file is parsed according to Compose rules."},"required":{"type":["boolean","string"],"default":true,"description":"Whether the file is required. If true and the file doesn\'t exist, an error will be raised."}},"required":["path"]}]}}]},"label_file":{"oneOf":[{"type":"string","description":"Path to a file containing Docker labels."},{"type":"array","description":"List of paths to files containing Docker labels.","items":{"type":"string","description":"Path to a file containing Docker labels."}}]},"string_or_list":{"oneOf":[{"type":"string","description":"A single string value."},{"$ref":"#/definitions/list_of_strings","description":"A list of string values."}],"description":"Either a single string or a list of strings."},"list_of_strings":{"type":"array","description":"A list of unique string values.","items":{"type":"string","description":"A string value in the list."},"uniqueItems":true},"list_or_dict":{"oneOf":[{"type":"object","description":"A dictionary mapping keys to values.","patternProperties":{".+":{"type":["string","number","boolean","null"],"description":"Value for the key, which can be a string, number, boolean, or null."}},"additionalProperties":false},{"type":"array","description":"A list of unique string values.","items":{"type":"string","description":"A string value in the list."},"uniqueItems":true}],"description":"Either a dictionary mapping keys to values, or a list of strings."},"extra_hosts":{"oneOf":[{"type":"object","description":"list mapping hostnames to IP addresses.","patternProperties":{".+":{"oneOf":[{"type":"string","description":"IP address for the hostname."},{"type":"array","description":"List of IP addresses for the hostname.","items":{"type":"string","description":"IP address for the hostname."},"uniqueItems":false}]}},"additionalProperties":false},{"type":"array","description":"List of host:IP mappings in the format \'hostname:IP\'.","items":{"type":"string","description":"Host:IP mapping in the format \'hostname:IP\'."},"uniqueItems":true}],"description":"Additional hostnames to be defined in the container\'s /etc/hosts file."},"blkio_limit":{"type":"object","description":"Block IO limit for a specific device.","properties":{"path":{"type":"string","description":"Path to the device (e.g., \'/dev/sda\')."},"rate":{"type":["integer","string"],"description":"Rate limit in bytes per second or IO operations per second."}},"additionalProperties":false},"blkio_weight":{"type":"object","description":"Block IO weight for a specific device.","properties":{"path":{"type":"string","description":"Path to the device (e.g., \'/dev/sda\')."},"weight":{"type":["integer","string"],"description":"Relative weight for the device, between 10 and 1000."}},"additionalProperties":false},"service_config_or_secret":{"type":"array","description":"Configuration for service configs or secrets, defining how they are mounted in the container.","items":{"oneOf":[{"type":"string","description":"Name of the config or secret to grant access to."},{"type":"object","description":"Detailed configuration for a config or secret.","properties":{"source":{"type":"string","description":"Name of the config or secret as defined in the top-level configs or secrets section."},"target":{"type":"string","description":"Path in the container where the config or secret will be mounted. Defaults to /<source> for configs and /run/secrets/<source> for secrets."},"uid":{"type":"string","description":"UID of the file in the container. Default is 0 (root)."},"gid":{"type":"string","description":"GID of the file in the container. Default is 0 (root)."},"mode":{"type":["number","string"],"description":"File permission mode inside the container, in octal. Default is 0444 for configs and 0400 for secrets."}},"additionalProperties":false,"patternProperties":{"^x-":{}}}]}},"ulimits":{"type":"object","description":"Container ulimit options, controlling resource limits for processes inside the container.","patternProperties":{"^[a-z]+$":{"oneOf":[{"type":["integer","string"],"description":"Single value for both soft and hard limits."},{"type":"object","description":"Separate soft and hard limits.","properties":{"hard":{"type":["integer","string"],"description":"Hard limit for the ulimit type. This is the maximum allowed value."},"soft":{"type":["integer","string"],"description":"Soft limit for the ulimit type. This is the value that\'s actually enforced."}},"required":["soft","hard"],"additionalProperties":false,"patternProperties":{"^x-":{}}}]}}}}}');i(6535),zK.defineTheme("synology",{base:"vs",inherit:!0,rules:[{token:"type",foreground:"658B00"},{token:"",foreground:"808080"},{token:"string.yaml",foreground:"CD5555"},{token:"number",foreground:"005CAD"},{token:"keyword",foreground:"F29603"},{token:"comment",foreground:"A9A9A9"}],colors:{"editor.foreground":"#a9a9a9","editor.background":"#f5f8fa","editor.lineHighlightBackground":"#e1e4e680","editor.selectionBackground":"#057feb26","editorCursor.foreground":"#000000","editorLineNumber.foreground":"#adb1b5","editorLineNumber.activeForeground":"#adb1b5","editorError.foreground":"#E64040","editorWarning.foreground":"#F58414"}}),self.MonacoEnvironment={getWorkerUrl(e,t){switch(t){case"yaml":return"/webman/3rdparty/ContainerManager/dist/yaml.worker.bundle.js";default:return"/webman/3rdparty/ContainerManager/dist/editor.worker.bundle.js"}}};var xG={components:{Icon:Zt},props:{schema:{type:Object},defaultValue:{type:String},value:{type:String},options:{type:Object},readOnly:{type:Boolean,default:!1}},computed:{editorClasses(){return{"docker-yaml-code-editor-body":!0,"docker-yaml-code-editor-body--border-bottom":this.problems.length>0}},problemsClasses(){return{"docker-yaml-code-editor-problems":!0,"docker-yaml-code-editor-problems--one-line":1===this.problems.length,"docker-yaml-code-editor-problems--two-line":2===this.problems.length,"docker-yaml-code-editor-problems--three-line":3===this.problems.length,"docker-yaml-code-editor-problems--multiple-line":this.problems.length>3}},problems(){return this.isEditorTextEmpty?[{severity:FK.Error,message:w("project","error_yaml_empty")}]:this.markers}},data(){return{savedDefaultValue:this.defaultValue,isEditorTextEmpty:!1,editor:null,markers:[]}},watch:{value(){this.editor&&this.editor.setValue(this.value)},schema(){this.setupYamlScheme()},readOnly(e){this.editor&&this.editor.updateOptions({readOnly:e})}},async mounted(){await this.$nextTick(),this.disposable=zK.onDidChangeMarkers(this.onDidChangeMarkers),this.editor=this.generateEditor()},beforeDestroy(){this.disposable.dispose()},methods:{generateEditor(){this.setupYamlScheme(),zK.getModels().forEach((e=>e.dispose()));const e=zK.create(this.$refs.editor,{automaticLayout:!0,theme:"synology",model:zK.createModel(this.savedDefaultValue,"yaml",WK.parse("docker-compose.yaml")),minimap:{enabled:!1},renderIndentGuides:!1,renderWhitespace:!1,readOnly:this.readOnly,language:"yaml",overviewRulerBorder:!1,scrollbar:{horizontalScrollbarSize:8,vertical:"visible",verticalScrollbarSize:8},fontSize:13,lineHeight:20,lineDecorationsWidth:0,lineNumbersMinChars:5,padding:{top:4,bottom:4},...this.options});return e.onKeyUp(this.onKeyup),e},setupYamlScheme(){!function(e={}){SG.setDiagnosticsOptions(e)}({completion:!0,validate:!0,format:!0,schemas:[{uri:"https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json",fileMatch:["docker-compose.yaml"],schema:kG},{fileMatch:["docker-compose.yaml"],...this.schema}]})},focusCursorByProblem({startLineNumber:e,startColumn:t}={}){e&&t&&(this.editor.setPosition({lineNumber:e,column:t}),this.editor.focus(),this.editor.revealLine(e))},getIconNameByProblem:({severity:e}={})=>e===FK.Warning?Ut.STATUS_WARNING:Ut.STATUS_ERROR,onDidChangeMarkers([e]){this.markers=zK.getModelMarkers({resource:e}).filter((e=>e.severity!==FK.Hint))},onKeyup(){const e=this.editor.getValue();this.isEditorTextEmpty=""===e.trim(),this.$emit("input",e)},commit(){this.savedDefaultValue=this.editor.getValue()},reset(){this.editor.setValue(this.savedDefaultValue)},validate(){const e=this.editor.getValue();return this.isEditorTextEmpty=""===e.trim(),0===this.problems.length},validateVolumes(){const e=this.editor.getValue(),t=[];let i=!1,n={};try{n=ga.parse(e)}catch(e){return!0}return n&&n.services&&ce()(n.services,((e,i)=>{if(e.volumes)for(const i of e.volumes)"string"==typeof i?t.push(i.split(":")[0]):i.type&&i.source&&t.push(i.source)})),i=t.some((e=>"/"===e)),!i},isDirty(){return this.savedDefaultValue!==this.editor.getValue()}}},LG=(i(4541),j(xG,pa,[],!1,null,null,null));LG.options.__file="src/components/Project/YamlEditor.vue";var EG=LG.exports,NG={data:()=>({panel:{loading:!1,showStatusBar:!1,statusBarState:"loading",errorText:"",statusBarErrorText:"",loadingType:"statusbar",confirmText:_T("common","save"),cancelText:_T("common","reset"),confirmBtnDisabled:!1,cancelBtnDisabled:!1}}),methods:{loading(e=!0){this.displayLoading(e)},async onSuccess(){return await this.displaySuccess()},async onError(...e){return await this.displayError(...e)},displayLoading(e=!0){this.panel.loading=e,this.panel.statusBarState="loading",this.panel.showStatusBar=e,this.panel.confirmBtnDisabled=e,this.panel.cancelBtnDisabled=e},async displaySuccess(){this.panel.loading=!1,this.panel.confirmBtnDisabled=!1,this.panel.cancelBtnDisabled=!1,this.panel.statusBarState="success",this.panel.showStatusBar=!0,await N(5e3),this.panel.showStatusBar=!1},async displayError(e=this._T("common","error_system")){this.panel.loading=!1,this.panel.confirmBtnDisabled=!1,this.panel.cancelBtnDisabled=!1,this.panel.showStatusBar=!0,this.panel.statusBarState="error",this.panel.errorText=e,this.panel.statusBarErrorText=e,await N(5e3),this.panel.showStatusBar=!1}}},IG={inject:["_T","_TT","getWindowOrAppWindow"],mixins:[NG,ji],components:{YamlEditor:EG},props:{projectId:{type:String,required:!0},projectName:{type:String,required:!0}},computed:{...Oi((({projectId:e})=>`projects/byId/${e}`),["schema","service_portal_name","service_portal_port","service_portal_protocol","is_package"]),...Oi((({projectId:e})=>`projects/byId/${e}`),{defaultContent:"content"}),...Mi((({projectId:e})=>`projects/byId/${e}`),["editable"])},data:()=>({content:""}),methods:{...(0,g.mapActions)("projects",["registerProject","fetchProjectDetail"]),...Ri((({projectId:e})=>`projects/byId/${e}`),{updateProject:"update"}),isDirty(){return this.$refs.editor.isDirty()},async validate(){return await this.$refs.editor.validate()},async validateCompose(){var e;return await(null===(e=this.$refs.editor)||void 0===e?void 0:e.validateVolumes())},async confirm(){if(!this.isDirty())return this.displayError(_T("error","nochange_subject")),!0;if(!await this.validate()){const e=_T("common","forminvalid");return await this.getWindowOrAppWindow().getMsgBox().alert("",e),!1}if(!await this.validateCompose()){const e=w("project","alert_root_bind_mount");if("cancel"===await this.getWindowOrAppWindow().getMsgBox().confirm("",e,{confirm:{text:w("project","btn_continue_root_bind_mount")},cancel:{text:w("project","btn_cancel_root_bind_mount")}}))return!1}const e=this.shouldUnregisterServicePortals();if(e&&!await this.confirmShouldUnresgiterServicePortals())return!1;const t=await this.alertShouldRebuild();this.displayLoading();try{const i=await this.updateProject({content:this.content});this.$refs.editor.commit(),this.onSuccess(i,{shouldRebuild:t,shouldUnregisterServicePortals:e})}catch(e){return this.onError(e),!1}return!0},onSuccess({id:e,name:t},{shouldRebuild:i=!0,shouldUnregisterServicePortals:n=!1}={}){this.displaySuccess(),this.fetchProjectDetail({id:e}).then((()=>{n&&this.$emit("project-updated")})),i&&this.openProjectBuildDialog({projectId:e,projectName:t}),this.getWindowOrAppWindow().getToastBox(SYNO.SDS.formatString(w("project","updated_toast"),t))},async onError(e){const t=this._ERROR_MESSAGE(e);await this.getWindowOrAppWindow().getMsgBox().alert("",t)},cancel(){return this.$refs.editor.reset(),!0},async alertShouldRebuild(){return await new Promise((e=>{const{window:t}=this.getWindowOrAppWindow().openModalWindow(SYNO.SDS.Docker.Project.ProjectConfirmRebuildMessageBox);t.alert("",""),t.$on("close",(({payload:t})=>e(t)))}))},shouldUnregisterServicePortals(){var e,t;if(!this.service_portal_name||!this.service_portal_port)return!1;let i;try{i=ga.parse(this.content)||{}}catch(e){SYNO.Debug.error(e)}return!((null===(e=i.services)||void 0===e||null===(t=e[this.service_portal_name])||void 0===t?void 0:t.ports)||[]).map((e=>{const t=`${e}`;if(t.includes("/udp"))return;const[i]=t.split(":"),n=parseInt(i,10);return Number.isNaN(n)?void 0:n})).filter((e=>e)).includes(this.service_portal_port)},async confirmShouldUnresgiterServicePortals(){return"confirm"===await this.getWindowOrAppWindow().getMsgBox().confirm("",SYNO.SDS.formatString(this._TT("project","confirm_clean_portal"),this.projectName))}}},TG=(i(3039),j(IG,On,[],!1,null,null,null));TG.options.__file="src/pages/Project/Detail/ProjectDetailEditorTab.vue";var DG=TG.exports,AG=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-panel",e._b({staticClass:"project-detail-settings",attrs:{"syno-id":"project-project-detail-panel-0","confirm-btn-disabled":!e.editable,"cancel-btn-disabled":!e.editable,confirm:e.confirm,cancel:e.cancel},scopedSlots:e._u([{key:"body",fn:function(){return[i("v-spin",{attrs:{spinning:!e.editable,"show-icon":!1,tip:e._TT("project","settings_mask")}},[i("v-form",{ref:"form",attrs:{"syno-id":"project-project-detail-settings-tab-form-0"}},[i("v-fieldset",{attrs:{title:e._TT("common","general")}},[i("v-form-item",{attrs:{label:e._TT("project","project_name"),textonly:""}},[e._v("\n                        "+e._s(e.name)+"\n                    ")]),e._v(" "),i("v-form-item",{attrs:{label:e._TT("project","project_path"),textonly:""}},[e._v("\n                        "+e._s(e.path)+"\n                    ")])],1),e._v(" "),i("v-fieldset",{attrs:{title:e._TT("project","web_portal")}},[i("ProjectServicePortalFormItem",{key:e.random,ref:"servicePortalFormItem",attrs:{"yaml-text":e.content},model:{value:e.form,callback:function(t){e.form=t},expression:"form"}})],1)],1)],1)]},proxy:!0}])},"v-panel",e.panel,!1))};AG._withStripped=!0;var OG=i(8718),MG=i.n(OG),RG=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("fragment",[i("v-form-item",{attrs:{textonly:"","hide-label":""}},[e._v("\n        "+e._s(e._TT("container","enbale_service_portal_tip"))+"\n    ")]),e._v(" "),i("v-form-item",{attrs:{"hide-label":""}},[i("v-checkbox",{attrs:{"syno-id":"create-step-project-create-service-portal-checkbox-0",value:e.value.enable_service_portal},on:{input:function(t){return e.onUpdateServicePortal({enable_service_portal:t})}}},[e._v("\n            "+e._s(e._TT("common","register_service_portal"))+"\n        ")])],1),e._v(" "),i("v-form-multiple-item",{attrs:{"hide-label":"",indent:1}},[i("v-form-item",{attrs:{prop:"fields.name",rules:e.rules["fields.name"],"control-flex":"200px"}},[i("v-single-select",{attrs:{"syno-id":"create-step-project-create-service-portal-single-select-0",placeholder:"-",width:"auto",disabled:!e.value.enable_service_portal,value:e.value.service_portal_name,options:e.servicePortalNameOptions},on:{input:function(t){return e.onUpdateServicePortal({service_portal_name:t})}}})],1),e._v(" "),i("v-form-item",{attrs:{prop:"fields.port",rules:e.rules["fields.port"],"control-flex":"80px"}},[i("v-single-select",{attrs:{"syno-id":"create-step-project-create-service-portal-single-select-1",placeholder:"-",width:"auto",disabled:!e.value.enable_service_portal,value:e.value.service_portal_port,options:e.servicePortalPortOptions},on:{input:function(t){return e.onUpdateServicePortal({service_portal_port:t})}}})],1),e._v(" "),i("v-form-item",{attrs:{prop:"fields.protocol",rules:e.rules["fields.protocol"],"control-flex":"140px"}},[i("v-single-select",{attrs:{"syno-id":"create-step-project-create-service-portal-single-select-2",placeholder:"-",width:"auto",disabled:!e.value.enable_service_portal,value:e.value.service_portal_protocol,options:e.servicePortalProtocolOptions},on:{input:function(t){return e.onUpdateServicePortal({service_portal_protocol:t})}}})],1)],1)],1)};RG._withStripped=!0;var PG=i(3674),FG=i.n(PG),BG=i(8446),WG=i.n(BG),VG=i(3218),zG=i.n(VG),jG=i(5937),HG=i.n(jG);function UG(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function $G(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{},n=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(i).filter((function(e){return Object.getOwnPropertyDescriptor(i,e).enumerable})))),n.forEach((function(t){UG(e,t,i[t])}))}return e}var KG=function(e,t,i){Object.defineProperty(e,t,{configurable:!0,get:function(){return i},set:function(e){console.warn("tried to set frozen property ".concat(t," with ").concat(e))}})},qG={abstract:!0,name:"Fragment",props:{name:{type:String,default:function(){return Math.floor(Date.now()*Math.random()).toString(16)}},html:{type:String,default:null}},mounted:function(){var e=this.$el,t=e.parentNode;e.__isFragment=!0,e.__isMounted=!1;var i=document.createComment("fragment#".concat(this.name,"#head")),n=document.createComment("fragment#".concat(this.name,"#tail"));e.__head=i,e.__tail=n;var o=document.createDocumentFragment();if(o.appendChild(i),Array.from(e.childNodes).forEach((function(t){var i=!t.hasOwnProperty("__isFragmentChild__");o.appendChild(t),i&&(KG(t,"parentNode",e),KG(t,"__isFragmentChild__",!0))})),o.appendChild(n),this.html){var r=document.createElement("template");r.innerHTML=this.html,Array.from(r.content.childNodes).forEach((function(e){o.appendChild(e)}))}var s=e.nextSibling;t.insertBefore(o,e,!0),t.removeChild(e),KG(e,"parentNode",t),KG(e,"nextSibling",s),s&&KG(s,"previousSibling",e),e.__isMounted=!0},render:function(e){var t=this,i=this.$slots.default;return i&&i.length&&i.forEach((function(e){return e.data=$G({},e.data,{attrs:$G({fragment:t.name},(e.data||{}).attrs)})})),e("div",{attrs:{fragment:this.name}},i)}},GG={provide(){return{getWindow:this.getWindow,getAppWindow:this.getAppWindow,getWindowOrAppWindow:this.getWindowOrAppWindow,getInstance:this.getInstance}},computed:{styles:()=>({"--note":`"${_T("common","note")}${_T("common","colon")}"`,"--colon":`"${_T("common","colon")}"`})},methods:{findAppWindow(){return function e(t){var i;return null!=t&&null!==(i=t.$options)&&void 0!==i&&i.name?(t.$options.name||"").includes("AppWindow")?t:e(t.$options.owner):null}(this.getWindowOrAppWindow())},getWindowOrAppWindow(){const e=this.getWindow();return(e.$options.name||"").includes("Window")?e:this.getAppWindow()},getAppWindow(){return this.$root.$children[0].$children[0]},getWindow(){return this.$root.$children[0]},getInstance(){var e,t;return null===(e=this.getAppWindow())||void 0===e||null===(t=e.getInstance)||void 0===t?void 0:t.call(e)}}};function YG(){return function(e=0){if(!SYNO.SDS.StatusNotifier.isAppEnabled("SYNO.SDS.WebStation.Application"))return!1;const t=_()(SYNO.SDS.Config.FnMap["SYNO.SDS.WebStation.Application"],"config.version")||"";return"__PKG_VERSION__"===t||parseInt(t.split("-")[1],10)>=e}(322)}var ZG={mixins:[GG],methods:{async checkWebStationStatus(){return!!YG()||("confirm"===await this.getWindowOrAppWindow().getMsgBox().confirm("",SYNO.SDS.formatString(w("container","unsupported_service_portal_warning"),"WebStation"),{confirm:{text:v("backup","install")}},{useHtml:!0})&&await SYNO.SDS.AppLaunch("SYNO.SDS.PkgManApp.Instance",{action:"open",packages:["WebStation"]}),!1)}}};const{WEBAPI_ERR_CONTAINER_UNKNOWN_CAPABILITY:XG,WEBAPI_ERR_IMAGE_LOAD_PARSE_FAIL:JG}=Xt;function QG(...e){return eY(...e)}function eY(e={},t=[]){if(!e)return v("error","error_error_system");if(e instanceof Error)return v("error","error_error_system");const{code:i,errors:n={}}=e,o=Qt(i);if(!o)return v("error","error_error_system");const r=[];if(t.length>0)r.push(...t);else if(i===XG){const e=/"(.+)"/g.exec(n.errors)[1];r.push(e)}else i===JG?r.push(n.filename):n.errors&&r.push(n.errors);return SYNO.SDS.formatString(o,...r)}var tY={provide(){return{_T:this._T,_TT:this._TT,_ERROR_MESSAGE:this._ERROR_MESSAGE,_STRING_FORMAT:this._STRING_FORMAT}},methods:{_T:v,_TT:w,_STRING_FORMAT:(...e)=>SYNO.SDS.formatString(...e),_ERROR_MESSAGE:QG,getErrorMessage:eY}};function iY(e=[],t=""){return{message:t,validator:(t,i)=>!e.includes(i)}}_JSLIBSTR("extlang","invalidText");const nY=(e=[])=>[{type:"pattern",pattern:/^[a-z0-9][a-z0-9_-]*$/,required:!0,message:w("project","name_rule")},iY(e,w("error","project_name_duplicated"))],oY=(e=[])=>[{type:"string",required:!0},iY(e,w("error","project_path_duplicated"))],rY=(e=[])=>[{type:"string",required:!0,validator:(t,i)=>e.includes(i),message:_T("error","error_error")}],sY=(e=[])=>[{type:"number",required:!0,validator:(t,i)=>e.includes(i),message:_T("error","error_error")}],aY=[{type:"string",required:!0}];var lY=j({inject:["_TT"],mixins:[ZG],components:{Fragment:qG},props:{yamlText:{type:String,required:!0},value:{type:Object,required:!0}},computed:{portsOfService(){let e={};try{e=ga.parse(this.yamlText)||{}}catch(e){SYNO.Debug.error(e)}const t=ge()(e.services||{},(({ports:e=[]})=>{const t=e.flatMap((e=>{return t=e,zG()(t)?function(e={}){if("udp"===e.protocol)return[];if(!e.target)return[];const t=Number(e.published);return t?[t]:[]}(t):function(e=""){if(e.includes("/udp"))return[];const[,t]=function(e=""){const t=e.split(":");return 1===t.length?["","",t[0]]:2===t.length?["",t[0],t[1]]:3===t.length?[t[0],t[1],t[2]]:[t.slice(0,t.length-2).join(":"),t[t.length-2],t[t.length-1]]}(e),[i,n]=function(e=""){if(!e)return[0,0];const t=e.split("-"),i=Number(t[0]);if(Number.isNaN(i))return[0,0];if(1===t.length)return[i,i];const n=Number(t[1]);return Number.isNaN(i)||n<i?[0,0]:[i,n]}(t),o=[];if(0===i)return o;for(let e=i;e<n+1;e++)o.push(e);return o}(`${t}`);var t})).reduce(((e,t)=>e.add(t)),new Set);return Array.from(t)}));return HG()(t,(e=>e&&e.length>0))},servicePortalNames(){return ti()(this.portsOfService,((e,t)=>t))},servicePortalNameOptions(){return[...this.servicePortalNames.map((e=>({label:e,value:e}))),{hide:!0,label:"",value:""}]},servicePortalPorts(){return this.portsOfService[this.value.service_portal_name]||[]},servicePortalPortOptions(){return[...this.servicePortalPorts.map((e=>({label:`${e}`,value:e}))),{hide:!0,label:"",value:0}]},servicePortalProtocolOptions:()=>[{label:"HTTP",value:fi.HTTP},{label:"HTTPS",value:fi.HTTPS}],rules(){return{"fields.name":rY(this.servicePortalNames),"fields.port":sY(this.servicePortalPorts),"fields.protocol":aY}}},data:()=>({}),methods:{async setAPossiblePortalWhenNull(){var e,t,i,n;if(this.value.service_portal_name&&this.value.service_portal_port&&this.value.service_portal_protocol)return;const o=null===(e=this.servicePortalNameOptions)||void 0===e||null===(t=e[0])||void 0===t?void 0:t.value,r=null===(i=this.portsOfService)||void 0===i||null===(n=i[o])||void 0===n?void 0:n[0],s=fi.HTTP;this.$emit("input",{service_portal_name:o,service_portal_port:r,service_portal_protocol:s})},async checkWebPortalAvaliable(e){if(e&&0===this.servicePortalNameOptions.length){const e=this.getWindowOrAppWindow();return await e.getMsgBox().alert("",w("container","ranout_webservice_port")),!1}return!0},async onUpdateServicePortal(e={}){const{enable_service_portal:t=this.value.enable_service_portal,service_portal_name:i=this.value.service_portal_name,service_portal_port:n=this.value.service_portal_port,service_portal_protocol:o=this.value.service_portal_protocol}=e;if(WG()(e,MG()(this.value,FG()(e))))return;if(!await this.checkWebStationStatus())return;if(!await this.checkWebPortalAvaliable(t))return;const r=(this.portsOfService[i]||[]).includes(n)?n:0;this.$emit("input",{enable_service_portal:t,service_portal_name:i,service_portal_port:r,service_portal_protocol:o})}}},RG,[],!1,null,null,null);lY.options.__file="src/components/FormItem/ServicePortal/ProjectServicePortalFormItem.vue";var cY=lY.exports,dY={inject:["_TT","_ERROR_MESSAGE","getWindowOrAppWindow"],mixins:[Qi,NG],components:{ProjectServicePortalFormItem:cY},props:{projectId:{type:String,required:!0}},computed:{...Oi((({projectId:e})=>`projects/byId/${e}`),["name","path","content"]),...Mi((({projectId:e})=>`projects/byId/${e}`),["editable"])},data(){return{form:this.getInitialForm(),init_form:this.getInitialForm()}},methods:{getInitialForm(){return MG()(this.$store.state.projects.byId[this.projectId],["enable_service_portal","service_portal_name","service_portal_port","service_portal_protocol"])},async updateInitialForm(){const e=this.getInitialForm();this.form=e,this.init_form=e},...Ri((({projectId:e})=>`projects/byId/${e}`),{updateProject:"update"}),isDirty(){return this.$refs.form.isDirty()},async validate(){return this.$refs.form.validate()},async confirm(){if(!this.isDirty())return this.displayError(_T("error","nochange_subject")),!0;if(!await this.validate()){const e=_T("common","forminvalid");return await this.getWindowOrAppWindow().getMsgBox().alert("",e),!1}this.displayLoading();try{const e=await this.updateProject(this.form);this.$refs.form.commit(),this.onSuccess(e)}catch(e){return this.onError(e),!1}return!0},async onSuccess({name:e,enable_service_portal:t,service_portal_name:i,service_portal_port:n,service_portal_protocol:o,services:r=[]}){this.displaySuccess(),this.getWindowOrAppWindow().getToastBox(SYNO.SDS.formatString(w("project","updated_toast"),e)),(t||this.init_form.service_portal_name!==i||this.init_form.service_portal_port!==n||this.init_form.service_portal_protocol!==o)&&(await this.getWindowOrAppWindow().getMsgBox().alert("",SYNO.SDS.formatString(this._TT("wizard","go_webstation_alert"),e),void 0,{useHtml:!0}),SYNO.SDS.AppLaunch("SYNO.SDS.WebStation.Application",{wizard:"create_service_portal",category:"Docker",services:r.map((({service:e})=>e))}))},async onError(e){const t=this._ERROR_MESSAGE(e);await this.getWindowOrAppWindow().getMsgBox().alert("",t)},cancel(){return this.form=this.getInitialForm(),!0}}},hY=(i(1569),j(dY,AG,[],!1,null,null,null));hY.options.__file="src/pages/Project/Detail/ProjectDetailSettingsTab.vue";var uY=hY.exports;const gY="CONTAINERS",pY="STATS",mY="SETTINGS";var fY={inject:["_TT","_ERROR_MESSAGE","getAppWindow","ICON_NAME"],mixins:[Qi,ji],components:{StatusPanel:Ji,ProjectActionMenu:Ui},props:{projectId:{type:String,required:!0},tab:{type:String},stats:{type:String}},computed:{...Oi((({projectId:e})=>`projects/byId/${e}`),["loaded","loading","name","path","status","is_package"]),...Mi((({projectId:e})=>`projects/byId/${e}`),["stopable"]),...Mi((({projectId:e})=>`projects/byId/${e}`),{containers:"containers"}),iconColor(){switch(this.status){case ai.RUNNING:return"green";case ai.WARNING:return"orange";case ai.FAILURE:case ai.BUILD_FAILED:return"red";case ai.CREATED:default:return}},iconType(){if(this.loading||this.status===ai.BUILDING)return"loading"}},watch:{loaded(e){e&&this.forceRerender()}},data(){return{TABS:[{key:gY,title:w("project","containers"),component:on},{key:pY,title:w("common","stats"),component:An},{key:"EDITOR",title:w("project","yaml_configurations"),component:DG},{key:mY,title:w("project","settings"),component:uY}],activeTab:this.tab||gY}},async created(){await this.registerProject({id:this.projectId})},async mounted(){await this.$nextTick();try{await this.fetchProjectDetail({id:this.projectId})}catch(e){const t=this._ERROR_MESSAGE(e);await this.getAppWindow().getMsgBox().alert("",t)}this.unregisters=await Promise.all([this.pollingProjectDetail({id:this.projectId})]).catch((async e=>{const t=this._ERROR_MESSAGE(e);return await this.getWindowOrAppWindow().getMsgBox().alert("",t),[]}))},beforeDestroy(){this.unregisters.forEach((e=>e&&e()))},methods:{...(0,g.mapActions)("projects",["registerProject","fetchProjectDetail","pollingProjectDetail"]),async beforeTabChange(){if(!this.isDirty())return!0;const e=this.getAppWindow().getMsgBox();this.getAppWindow().lastFocusElement=null;const t=await e.confirmLostChange();return"save"===t?await this.confirm():"dont_save"===t&&await this.cancel()},getTabComponentByKey(e="CONTAINERS"){return _()(this,["$refs",e,0])},getActiveTabComponent(){return this.getTabComponentByKey(this.activeTab)},isDirty(){const{isDirty:e}=this.getActiveTabComponent()||{};return!!u()(e)&&e()},getProjectStatusText(){if(this.status===ai.BUILDING)return w("project","starting");if(this.loading)return _T("common","loading");switch(this.status){case ai.BUILD_FAILED:return w("project","build_failed");case ai.CREATED:return w("project","created");case ai.RUNNING:return w("container","status_running");case ai.WARNING:return w("project","partial_running");case ai.FAILURE:{const e=this.containers.filter((({status:e})=>[oi.STOPPED_ERROR_EXIT,oi.FAIL_TO_RUN].includes(e))).length;return String.format(w("project","partial_fail_to_run"),e)}case ai.STOPPED:return w("container","status_stopped");default:return}},async confirm(){const{confirm:e}=this.getActiveTabComponent()||{};return!u()(e)||await e()},async cancel(){const{cancel:e}=this.getActiveTabComponent()||{};return!u()(e)||await e()},async onTabChange(e){e===pY&&this.getTabComponentByKey(e).resize()},async onProjectDeleted(){this.$emit("go-page",{page:ii.PROJECT_LIST})},async onProjectUpdated(){var e,t,i,n;null===(e=this.$refs)||void 0===e||null===(t=e.SETTINGS)||void 0===t||null===(i=t[0])||void 0===i||null===(n=i.updateInitialForm)||void 0===n||n.call(i)}}},_Y=(i(4071),j(fY,Gi,[],!1,null,null,null));_Y.options.__file="src/pages/Project/Detail/ProjectDetail.vue";var vY=_Y.exports,bY=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-spin",{attrs:{spinning:e.loading,tip:e._T("common","loading")}},[0===e._rows.length?i("v-empty-view",{attrs:{icon:e.ICON_PROP.EMPTY_CONTAINER,text:e._TT("container","containers_empty_text")},on:{"action-click":function(t){return e.openContainerCreateWizard()}},scopedSlots:e._u([{key:"action",fn:function(){return[i("v-button",{attrs:{"syno-id":"list-container-list-button-0",suffix:"blue"},on:{click:function(t){return e.openContainerCreateWizard()}}},[e._v("\n                "+e._s(e._T("common","create"))+"\n            ")]),e._v(" "),i("v-button",{attrs:{"syno-id":"list-container-list-button-1",type:"dropdown",suffix:"blue"},scopedSlots:e._u([{key:"dropdown",fn:function(){return[i("v-menu",{attrs:{"syno-id":"list-container-list-menu-0"}},[i("v-menu-item",{attrs:{"syno-id":"list-container-list-menu-item-0",title:e._TT("image","add_from_dm")},on:{click:function(t){return e.openImportFromDSMDialog()}}}),e._v(" "),i("v-menu-item",{attrs:{"syno-id":"list-container-list-menu-item-1",title:e._TT("image","add_from_local")},on:{click:function(t){return e.openImportFromLocalDialog()}}})],1)]},proxy:!0}],null,!1,3912547445)},[e._v("\n                "+e._s(e._TT("container","import"))+"\n                ")])]},proxy:!0}],null,!1,1736953989)}):i("v-panel",{staticClass:"docker-table-list docker-container-list",attrs:{"syno-id":"container-container-panel-0",tbar:"",fbar:!1},scopedSlots:e._u([{key:"tbar",fn:function(){return[i("v-button",{attrs:{"syno-id":"container-container-button-0"},on:{click:function(t){return e.openContainerCreateWizard()}}},[e._v("\n                "+e._s(e._T("common","create"))+"\n            ")]),e._v(" "),i("v-button",{attrs:{"syno-id":"container-container-button-1",disabled:!e.singleSelectedRow||e.singleSelectedRow.deleting},on:{click:function(t){return e.goContainerDetailPage(e.singleSelectedContainerName)}}},[e._v("\n                "+e._s(e._TT("container","detail"))+"\n            ")]),e._v(" "),i("v-button",{attrs:{"syno-id":"container-container-button-2",type:"dropdown",disabled:e.selectedRows.some((function(e){return e.loading}))},scopedSlots:e._u([{key:"dropdown",fn:function(){return[i("v-button-dropdown",[i("ContainerActionMenu",{attrs:{names:e.selectedContainerNames,"hide-terminal":!e.singleSelectedRow,"hide-details":!e.singleSelectedRow,"hide-export":!e.singleSelectedRow},on:{"go-page":function(t){return e.$emit("go-page",t)}}})],1)]},proxy:!0}])},[e._v("\n                "+e._s(e._TT("container","action"))+"\n                ")])]},proxy:!0},{key:"tbar-right",fn:function(){return[i("v-search-input",{attrs:{"syno-id":"project-list-search-input",placeholder:e._TT("registry","search"),clearable:!0},on:{input:e.onSearchInput},model:{value:e.state.keyword,callback:function(t){e.$set(e.state,"keyword",t)},expression:"state.keyword"}})]},proxy:!0},{key:"body",fn:function(){return[i("v-data-table",{staticClass:"h100p",attrs:{"syno-id":"container-container-data-table-0",pagination:!1,"multiple-selected":!0,columns:e.columns,"current-data":e.rows,"cell-tooltip-default-props":{overflowOnly:!0},"local-sort-func":e.containerLocalSortFunc},on:{"selected-change":function(t){e.selectedData=t},dataloaded:function(t){e.selectedData=[]},rowdblclick:function(t){return e.goContainerDetailPage(e.singleSelectedContainerName)},"cell-contextmenu":e.onContextMenu,refresh:function(t){return e.load()},"column-display":function(t){return e.onColumnDisplay(t)}},scopedSlots:e._u([{key:"status",fn:function(t){var n=t.row;return[i("Dot",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.getContainerStatusTooltip(n),expression:"getContainerStatusTooltip(row)"}],attrs:{color:e.getContainerStatusColor(n),type:e.getContainerStatusType(n)}})]}},{key:"name",fn:function(t){var n=t.row,o=n.name,r=n.is_package,s=n.deleting;return[i("div",{staticClass:"docker-container-name"},[i("span",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{overflowOnly:!0,content:o},expression:"{\n                                overflowOnly: true,\n                                content: name\n                            }"}],class:{"docker-container-name-link":!0,link:!s},on:{click:function(t){return e.$emit("go-page",{page:e.PAGE_KEYS.CONTAINER_DETAIL,name:o})}}},[e._v("\n                            "+e._s(o)+"\n                        ")]),e._v(" "),r?i("v-whitetip",{attrs:{size:"small",content:e._TT("container","package_deny_operation")}}):e._e()],1)]}},{key:"image",fn:function(t){var n=t.row,o=n.imageName,r=n.imageKey;return[r?i("span",{staticClass:"link",on:{click:function(t){return e.$emit("go-page",{page:e.PAGE_KEYS.IMAGE_DETAIL,name:r})}}},[e._v("\n                        "+e._s(o)+"\n                    ")]):i("span",[e._v("\n                        "+e._s(o)+"\n                    ")])]}},{key:"project",fn:function(t){var n=t.data;return[n?[i("span",{staticClass:"link",on:{click:function(t){return e.$emit("go-page",{page:e.PAGE_KEYS.PROJECT_DETAIL,projectId:n.id})}}},[e._v("\n                            "+e._s(n.name)+"\n                        ")])]:[e._v("-")]]}},{key:"action",fn:function(t){var n=t.row,o=n.links;return[n.running?0===o.length?void 0:1===o.length?i("a",{attrs:{href:o[0],target:"_blank"}},[i("Icon",{attrs:{name:e.ICON_NAME.ACTION_GO_TO}})],1):i("v-button",{staticClass:"docker-container-list-portals-button",attrs:{"syno-id":"list-container-list-button-2",type:"styleless",display:"icon"},scopedSlots:e._u([{key:"icon",fn:function(){return[i("Icon",{attrs:{name:e.ICON_NAME.ACTION_GO_TO}})]},proxy:!0},{key:"dropdown",fn:function(){return[i("v-menu",{attrs:{"syno-id":"list-container-list-menu-1"}},e._l(o,(function(t){return i("v-menu-item",{key:t,attrs:{"syno-id":"list-container-list-menu-item-"+t,title:t},on:{click:function(){return e.openPortalLink(t)}}})})),1)]},proxy:!0}],null,!0)}):void 0]}},{key:"cpu",fn:function(t){var i=t.row,n=i.cpu,o=i.running;return[e._v("\n                    "+e._s(o?n.toFixed(2)+"%":"-")+"\n                ")]}},{key:"ram",fn:function(t){var i=t.row,n=i.ram,o=i.running;return[e._v("\n                    "+e._s(o?e.getHumanFileSize(n):"-")+"\n                ")]}},{key:"up_time",fn:function(t){var i=t.row.humanUpTime;return[e._v("\n                    "+e._s(i)+"\n                ")]}}])}),e._v(" "),e.isContextMenuShown?i("v-portal",{attrs:{"mount-to":"body","target-style":e.portalStyles}},[i("ContainerActionMenu",e._b({directives:[{name:"clickoutside",rawName:"v-clickoutside",value:e.clickoutside,expression:"clickoutside"}],attrs:{"hide-import":""},on:{"menu-close":function(t){e.isContextMenuShown=!1},"go-page":function(t){return e.$emit("go-page",t)}}},"ContainerActionMenu",e.contextMenuProps,!1))],1):e._e()]},proxy:!0}])})],1)};bY._withStripped=!0;var wY=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-menu",{attrs:{"syno-id":"container-container-menu-0","close-on-select":""},on:{"menu-close":function(t){return e.$emit("menu-close")}}},[e.hideStart?e._e():i("v-menu-item",{attrs:{"syno-id":"container-container-menu-item-0",title:e._TT("container","start"),disabled:!e.startable},on:{click:function(t){return e.startContainerList()}}}),e._v(" "),e.hideStop?e._e():i("v-menu-item",{attrs:{"syno-id":"container-container-menu-item-1",title:e._TT("container","stop"),disabled:!e.stopable},on:{click:function(t){return e.stopContainerList()}}}),e._v(" "),e.hideFStop?e._e():i("v-menu-item",{attrs:{"syno-id":"container-container-menu-item-1",title:e._TT("container","force_stop"),disabled:!e.fstopable},on:{click:function(t){return e.fstopContainerList()}}}),e._v(" "),e.hideRestart?e._e():i("v-menu-item",{attrs:{"syno-id":"container-container-menu-item-0",title:e._TT("container","restart"),disabled:!e.restartable},on:{click:function(t){return e.restartContainerList()}}}),e._v(" "),e.hideReset?e._e():i("v-menu-item",{attrs:{"syno-id":"container-container-menu-item-0",title:e._TT("container","clear"),disabled:!e.resetable},on:{click:function(t){return e.resetContainerList()}}}),e._v(" "),i("v-menu-divider",{attrs:{"syno-id":"action-menu-container-action-menu-menu-divider-0"}}),e._v(" "),e.hideDetails?e._e():i("v-menu-item",{attrs:{"syno-id":"container-container-menu-item-0",title:e._TT("container","detail"),disabled:!e.name},on:{click:function(t){return e.goContainerDetailPage()}}}),e._v(" "),e.hideDuplicate?e._e():i("v-menu-item",{attrs:{"syno-id":"container-container-menu-item-0",title:e._TT("common","duplicate"),disabled:!e.name||!e.duplicateable},on:{click:function(t){return e.openDuplicateDialog()}}}),e._v(" "),e.hideSettings?e._e():i("v-menu-item",{attrs:{"syno-id":"container-container-menu-item-0",title:e._T("common","common_settings"),disabled:!e.name||!e.settingable},on:{click:function(t){return e.openSettingsDialog()}}}),e._v(" "),i("v-menu-item",{attrs:{"syno-id":"container-container-menu-item-0",title:e._TT("container","delete"),disabled:!e.deletable},on:{click:function(t){return e.deleteContainerList()}}}),e._v(" "),e.hideTerminal?e._e():i("v-menu-divider",{attrs:{"syno-id":"container-container-menu-divider-0"}}),e._v(" "),e.hideTerminal?e._e():i("v-menu-item",{attrs:{"syno-id":"container-container-menu-item-0",title:e._TT("common","terminal_action"),disabled:!e.terminalable},on:{click:function(){return e.openTerminalDialog()}}}),e._v(" "),e.hideImport&&e.hideExport?e._e():i("v-menu-divider",{attrs:{"syno-id":"container-container-menu-divider-1"}}),e._v(" "),e.hideImport?e._e():i("v-menu-submenu",{attrs:{"syno-id":"container-container-menu-submenu-0",title:e._TT("container","import")}},[i("v-menu-item",{attrs:{"syno-id":"container-container-menu-item-0",title:e._TT("image","add_from_dm")},on:{click:function(t){return e.openImportFromDSMDialog()}}}),e._v(" "),i("v-menu-item",{attrs:{"syno-id":"container-container-menu-item-0",title:e._TT("image","add_from_local")},on:{click:function(t){return e.openImportFromLocalDialog()}}})],1),e._v(" "),e.hideExport?e._e():i("v-menu-item",{attrs:{"syno-id":"container-container-menu-item-0",title:e._TT("container","export"),disabled:!e.name||!e.exportable},on:{click:function(){return e.openExportDialog()}}})],1)};wY._withStripped=!0;var yY={inject:["getWindowOrAppWindow","_ERROR_MESSAGE"],props:{names:{type:Array,required:!0},onCotainerDeleted:{type:Function,default:()=>{}}},computed:{startable(){return this.checkActionEnable("startable")},stopable(){return this.checkActionEnable("stopable")},fstopable(){return this.checkActionEnable("fstopable")},restartable(){return this.checkActionEnable("restartable")},resetable(){return this.checkActionEnable("resetable")},deletable(){return this.checkActionEnable("deletable")},duplicateable(){return this.checkActionEnable("duplicateable")},exportable(){return this.checkActionEnable("exportable")},settingable(){return this.checkActionEnable("settingable")}},methods:{...(0,g.mapActions)("containers",["fetchContainerList","startContainer","stopContainer","fstopContainer","restartContainer","resetContainer"]),...(0,g.mapActions)("containers",{actionStartContainerList:"startContainerList",actionStopContainerList:"stopContainerList",actionFStopContainerList:"fstopContainerList",actionRestartContainerList:"restartContainerList",actionResetContainerList:"resetContainerList",actionDeleteContainerList:"deleteContainerList"}),checkActionEnable(e){return(this.names||[this.name]).reduce(((t,i)=>t&&this.$store.getters[`containers/byName/${i}/${e}`]),!0)},goContainerDetailPage(e=this.name){var t;e&&((null===(t=this.$store.state.containers.byName[e])||void 0===t?void 0:t.deleting)||this.$emit("go-page",{page:ii.CONTAINER_DETAIL,name:e}))},async startContainerList(e=this.names){this.$emit("update:isOpen",!1);try{await this.actionStartContainerList(e)}catch(e){const t=this._ERROR_MESSAGE(e);return void await this.getWindowOrAppWindow().getMsgBox().alert("",t)}this.getWindowOrAppWindow().getToastBox(1===e.length?SYNO.SDS.formatString(w("container","a_container_started_toast"),e[0]):SYNO.SDS.formatString(w("container","containers_started_toast"),e.length))},async stopContainerList(e=this.names){this.$emit("update:isOpen",!1);try{await this.actionStopContainerList(e)}catch(e){const t=this._ERROR_MESSAGE(e);return void await this.getWindowOrAppWindow().getMsgBox().alert("",t)}this.getWindowOrAppWindow().getToastBox(1===e.length?SYNO.SDS.formatString(w("container","a_container_stopped_toast"),e[0]):SYNO.SDS.formatString(w("container","containers_stopped_toast"),e.length))},async fstopContainerList(e=this.names){this.$emit("update:isOpen",!1);const t=e.map((e=>`<b>${e}</b>`)).join(", "),i=`\n                ${SYNO.SDS.formatString(w("container","force_stop_confirm"),e.length)}\n                <br />\n                ${t}\n            `;if("confirm"===await this.getWindowOrAppWindow().getMsgBox().confirm("",i,void 0,{useHtml:!0})){try{await this.actionFStopContainerList(e)}catch(e){const t=this._ERROR_MESSAGE(e);return void await this.getWindowOrAppWindow().getMsgBox().alert("",t)}this.getWindowOrAppWindow().getToastBox(1===e.length?SYNO.SDS.formatString(w("container","a_container_force_stopped_toast"),e[0]):SYNO.SDS.formatString(w("container","containers_force_stopped_toast"),e.length))}},async restartContainerList(e=this.names){this.$emit("update:isOpen",!1);try{await this.actionRestartContainerList(e)}catch(e){const t=this._ERROR_MESSAGE(e);return void await this.getWindowOrAppWindow().getMsgBox().alert("",t)}this.getWindowOrAppWindow().getToastBox(1===e.length?SYNO.SDS.formatString(w("container","a_container_restarted_toast"),e[0]):SYNO.SDS.formatString(w("container","containers_restarted_toast"),e.length))},async resetContainerList(e=this.names){this.$emit("update:isOpen",!1);try{await this.actionResetContainerList(e)}catch(e){const t=this._ERROR_MESSAGE(e);return void await this.getWindowOrAppWindow().getMsgBox().alert("",t)}this.getWindowOrAppWindow().getToastBox(1===e.length?SYNO.SDS.formatString(w("container","a_container_reset_toast"),e[0]):SYNO.SDS.formatString(w("container","containers_reset_toast"),e.length))},async deleteContainerByName(e=this.name){try{return this.deleteContainerList([e])}catch(e){const t=this._ERROR_MESSAGE(e);await this.getWindowOrAppWindow().getMsgBox().alert("",t)}},async deleteContainerList(e=this.names){if(this.$emit("update:isOpen",!1),0===e.length)return;const t=e.map((e=>`<b>${e}</b>`)).join(", "),i=`\n                ${SYNO.SDS.formatString(w("container","delete_confirm"),e.length)}\n                <br />\n                ${t}\n            `;if("confirm"===await this.getWindowOrAppWindow().getMsgBox().confirmDelete("",i,void 0,{useHtml:!0})){try{await this.actionDeleteContainerList(e)}catch(e){const t=this._ERROR_MESSAGE(e);return void await this.getWindowOrAppWindow().getMsgBox().alert("",t)}this.getWindowOrAppWindow().getToastBox(1===e.length?SYNO.SDS.formatString(w("container","a_container_deleted_toast"),e[0]):SYNO.SDS.formatString(w("container","containers_deleted_toast"),e.length)),this.onCotainerDeleted()}},openTerminalDialog(e=this.name){this.$emit("update:isOpen",!1),this.getWindowOrAppWindow().openModalWindow(SYNO.SDS.Docker.Container.TerminalDialog,{name:e})},openImportFromDSMDialog(){this.$emit("update:isOpen",!1);const e=this.getWindowOrAppWindow(),t=new SYNO.SDS.Utils.FileChooser.Chooser({owner:e,usage:{type:"open"},gotoPath:"/docker",treeFilter:function(e,t={}){return!["/home","/homes"].includes(t.spath)},listeners:{scope:this,choose:this.onImportChoose}});return t.open(),t},onImportChoose(e,{path:t},i){e.setStatusBusy();const{window:n}=e.openVueWindow("SYNO.SDS.Docker.Container.ImportFromDSMDialog",{path:t});n.$on("close",(({payload:{success:t=!1,container:i=""}}={})=>{e.clearStatusBusy(),t&&(e.close(),i&&this.getWindowOrAppWindow().getToastBox(SYNO.SDS.formatString(w("container","a_container_imported_toast"),i)))}))},openImportFromLocalDialog(){this.$emit("update:isOpen",!1);const{window:e}=this.getWindowOrAppWindow().openModalWindow(SYNO.SDS.Docker.Container.ImportFromLocalDialog);e.$on("close",(({payload:{success:e=!1,container:t=""}}={})=>{e&&t&&this.getWindowOrAppWindow().getToastBox(SYNO.SDS.formatString(w("container","a_container_imported_toast"),t))}))},openExportDialog(){this.$emit("update:isOpen",!1),this.getWindowOrAppWindow().openModalWindow(SYNO.SDS.Docker.Container.ExportContainerDialog,{name:this.name})},openSettingsDialog(){this.$emit("update:isOpen",!1);const{window:e}=this.getWindowOrAppWindow().openModalWindow(SYNO.SDS.Docker.Container.SettingsDialog,{name:this.name});e.$on("close",(({payload:{success:e=!1,name:t=""}}={})=>{e&&(this.fetchContainerList(),this.getWindowOrAppWindow().getToastBox(SYNO.SDS.formatString(w("container","a_container_updated_toast"),t)))}))},openDuplicateDialog(){this.$emit("update:isOpen",!1);const{window:e}=this.getWindowOrAppWindow().openModalWindow(SYNO.SDS.Docker.Container.DuplicateContainerDialog,{name:this.name});e.$on("close",(({payload:{success:e=!1,name:t=""}}={})=>{e&&(this.fetchContainerList(),this.getWindowOrAppWindow().getToastBox(SYNO.SDS.formatString(w("container","container_duplicated_toast"),t)))}))}}},CY=j({inject:["_T","_TT"],mixins:[yY],props:{hideStart:{type:Boolean},hideStop:{type:Boolean},hideFStop:{type:Boolean},hideRestart:{type:Boolean},hideReset:{type:Boolean},hideSettings:{type:Boolean},hideTerminal:{type:Boolean},hideImport:{type:Boolean},hideDetails:{type:Boolean},hideDuplicate:{type:Boolean},hideExport:{type:Boolean},deletable:{type:Boolean,default:!1}},computed:{...Mi((({name:e})=>`containers/byName/${e}`),["terminalable"]),name(){return 1===this.names.length?this.names[0]:void 0}}},wY,[],!1,null,null,null);CY.options.__file="src/pages/Container/Shared/ActionMenu/ContainerActionMenu.vue";var SY=CY.exports;const kY="columns-visibility-container-list";var xY={inject:["_T","_TT","_ERROR_MESSAGE","getWindowOrAppWindow","getInstance","PAGE_KEYS","ICON_PROP","ICON_NAME"],mixins:[_i,yY],components:{Dot:se,Icon:Zt,ContainerActionMenu:SY},computed:{...(0,g.mapState)("containers",["loading"]),...(0,g.mapGetters)("containers",{_rows:"rows"}),...(0,g.mapState)("images",{images:"allNames"}),rows(){return this._rows.filter((({name:e="",path:t="",project:i})=>[e,t,(null==i?void 0:i.name)||""].some((e=>e.includes(this.state.keyword))))).map(((e={})=>({...e,_rowInfo:{disabled:e.deleting}})))},portalStyles(){return{top:`${this.mouse.y}px`,left:`${this.mouse.x}px`}},selectedRows(){return this.selectedData.rows||[]},selectedContainerNames(){return this.selectedRows.map((({name:e})=>e))},singleSelectedRow(){return 1===this.selectedRows.length?this.selectedRows[0]:void 0},singleSelectedContainerName(){return this.singleSelectedRow?this.singleSelectedRow.name:void 0}},data(){var e;const t=(null===(e=this.getInstance())||void 0===e?void 0:e.getUserSettings(kY))||{};return{columns:[{title:v("common","status"),field:"status",align:"center",width:73,hideMenuItem:!0},{title:v("common","name"),field:"name",tooltip:!0,hideMenuItem:!0},{title:w("common","image"),field:"image",tooltip:!0,hideMenuItem:!0},{title:w("common","project"),field:"project",tooltip:({project:e})=>(null==e?void 0:e.name)||!1},{title:"CPU",field:"cpu",width:80,hide:!0},{title:w("common","memory"),field:"ram",width:80,hide:!0},{title:w("common","up_time"),field:"up_time",tooltip:!0},{title:w("container","action"),field:"action",disableSort:!0,hideMenuItem:!0,width:36}].map((e=>(t&&void 0!==t[e.field]&&(e.hide=!t[e.field]),e))),getHumanFileSize:k,state:{keyword:""},isContextMenuShown:!1,mouse:{x:0,y:0},contextMenuProps:{},selectedData:[]}},methods:{...(0,g.mapActions)("containers",["fetchContainerList"]),async load(){try{await this.fetchContainerList()}catch(e){const t=this._ERROR_MESSAGE(e);await this.getWindowOrAppWindow().getMsgBox().alert("",t)}},async goRegistryTabWhenNoImage(){return 0!==this.images.length||("confirm"===await this.getWindowOrAppWindow().getMsgBox().confirm("",this._TT("container","no_image_exists_warning"),{confirm:{text:this._TT("container","go_registry")}})&&this.$emit("go-page",{page:ii.REGISTRY}),!1)},async openContainerCreateWizard(){if(!await this.goRegistryTabWhenNoImage())return;const{window:e}=this.getWindowOrAppWindow().openModalWindow(SYNO.SDS.Docker.Container.ContainerCreateWizard);e.$on("close",(async({payload:{success:e,name:t}}={})=>{e&&(await this.load(),this.getWindowOrAppWindow().getToastBox(SYNO.SDS.formatString(w("container","created_toast"),t)))}))},openPortalLink(e=""){window.open(e,"_blank")},clickoutside(){this.isContextMenuShown=!1,this.mouse.x=0,this.mouse.y=0,this.contextMenuProps={}},async onContextMenu({loading:e},t,i,n,{pageX:o,pageY:r}){if(e)return!1;await this.$nextTick(),this.isContextMenuShown=!0,this.contextMenuProps={names:this.selectedContainerNames,hideTerminal:!this.singleSelectedRow,hideDetails:!this.singleSelectedRow,hideDuclipate:!this.singleSelectedRow,hideExport:!this.singleSelectedRow},this.mouse.x=o,this.mouse.y=r},onColumnDisplay({state:e=!1,column:{field:t}}){if(!t)return;const i=this.getInstance();if(!i)return;const n=i.getUserSettings(kY)||{};n[t]=e,i.setUserSettings(kY,n)}}},LY=(i(9481),j(xY,bY,[],!1,null,null,null));LY.options.__file="src/pages/Container/List/ContainerList.vue";var EY=LY.exports,NY=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("StatusPanelWithTabs",{key:e.random,ref:"panel",staticClass:"docker-container-details",attrs:{title:e.name,description:e.statusDescription,"icon-name":e.ICON_NAME.CONTAINER_28,"icon-color":e.iconColor,"icon-type":e.iconType,"active-tab":e.activeTab,tabs:e.TABS,"component-props":e.componentProps,"icon-tip-disabled":!1,"icon-tip-content":e.statusTooltip},on:{"update:activeTab":[function(t){e.activeTab=t},e.onTabChange],"update:active-tab":function(t){e.activeTab=t},"go-page":function(t){return e.$emit("go-page",t)},"set-page":function(t){return e.$emit("set-page",t)},"back-page":function(t){return e.$emit("back-page")}},scopedSlots:e._u([{key:"docker-status-panel-header-title-slot",fn:function(){return[e.project?i("span",{staticClass:"docker-container-details-header-running-in-project link",on:{click:e.goProject}},[e._v("\n            ("+e._s(String.format(e._TT("container","under_project"),e.project.name))+")\n        ")]):e._e(),e._v(" "),e.is_package?i("v-whitetip",{attrs:{size:"small",content:e._TT("container","package_deny_operation")}}):e._e()]},proxy:!0},{key:"description",fn:function(){return[e.shouldShowUptime?i("span",{domProps:{textContent:e._s(e.humanUpTime)}}):e._e(),e._v(" "),e.shouldShowUptime&&e.statusDescription?i("span",[e._v("-")]):e._e(),e._v(" "),i("span",{class:e.statusDescriptionClasses,domProps:{textContent:e._s(e.statusDescription)}})]},proxy:!0},{key:"header-actions",fn:function(){return[e.startable?i("v-button",{attrs:{"syno-id":"detail-container-detail-button-0",disabled:e.loading},on:{click:function(t){return e.startContainerList([e.name])}}},[e._v("\n            "+e._s(e._TT("container","start"))+"\n        ")]):e._e(),e._v(" "),e.stopable?i("v-button",{attrs:{"syno-id":"detail-container-detail-button-0",disabled:e.loading},on:{click:function(t){return e.stopContainerList([e.name])}}},[e._v("\n            "+e._s(e._TT("container","stop"))+"\n        ")]):e._e(),e._v(" "),e.duplicateable?i("v-button",{attrs:{"syno-id":"detail-container-detail-button-0",disabled:e.loading},on:{click:function(t){return e.openDuplicateDialog(e.name)}}},[e._v("\n            "+e._s(e._TT("common","duplicate"))+"\n        ")]):e._e(),e._v(" "),i("v-button",{attrs:{"syno-id":"detail-container-detail-button-2",type:"dropdown",disabled:e.loading},scopedSlots:e._u([{key:"dropdown",fn:function(){return[i("v-button-dropdown",[i("ContainerActionMenu",{attrs:{"hide-start":e.startable,"hide-stop":e.stopable,"hide-duplicate":e.duplicateable,"hide-import":"","hide-details":"",names:[e.name],"on-cotainer-deleted":e.onContainerDeleted},on:{"go-page":function(t){return e.$emit("go-page",t)},"set-page":function(t){return e.$emit("set-page",t)},"back-page":function(t){return e.$emit("back-page")}}})],1)]},proxy:!0}])},[e._v("\n            "+e._s(e._TT("container","action"))+"\n            ")])]},proxy:!0}])})};NY._withStripped=!0;var IY=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("StatusPanel",e._g(e._b({scopedSlots:e._u([e._l(e.$slots,(function(t,i){return{key:i,fn:function(){return[e._t(i)]},proxy:!0}}))],null,!0)},"StatusPanel",e.$props,!1),e.$listeners),[e._v(" "),[i("v-tabs",{attrs:{"syno-id":"status-panel-status-panel-with-tabs-tabs-0",fbar:!1,"active-tab-key":e.activeTab,beforeTabChange:e.beforeTabChange},on:{change:function(t){return e.$emit("update:activeTab",t)}}},e._l(e.tabs,(function(t){return i("v-tab-pane",{key:t.key,attrs:{"syno-id":"project-project-detail-tab-pane-"+t.key,"tab-key":t.key,tab:t.title}},[i(t.component,e._b({ref:t.key,refInFor:!0,tag:"component",attrs:{stats:e.stats},on:{"go-page":function(t){return e.$emit("go-page",t)},"set-page":function(t){return e.$emit("set-page",t)},"back-page":function(t){return e.$emit("back-page")}}},"component",e.componentProps,!1))],1)})),1)]],2)};IY._withStripped=!0;var TY=j({inject:["getAppWindow"],components:{Icon:Zt,StatusPanel:Ji},props:{...Ji.props,activeTab:{type:String,required:!0},tabs:{type:Array,required:!0},componentProps:{type:Object}},methods:{async beforeTabChange(){if(!this.isDirty())return!0;const e=this.getAppWindow().getMsgBox();this.getAppWindow().lastFocusElement=null;const t=await e.confirmLostChange();return"save"===t?await this.confirm():"dont_save"===t&&await this.cancel()},getTabComponentByKey(e){return _()(this,["$refs",e,0])},getActiveTabComponent(){return this.getTabComponentByKey(this.activeTab)||{}},isDirty(){const{isDirty:e}=this.getActiveTabComponent();return!!u()(e)&&e()},async confirm(){const{confirm:e}=this.getActiveTabComponent();return!u()(e)||await e()},async cancel(){const{cancel:e}=this.getActiveTabComponent();return!u()(e)||await e()}}},IY,[],!1,null,null,null);TY.options.__file="src/components/StatusPanel/StatusPanelWithTabs.vue";var DY=TY.exports,AY=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-panel",{attrs:{"syno-id":"detail-container-detail-general-panel-0",fbar:!1,loading:e.api_status===e.API_STATUS.LOADING},scopedSlots:e._u([{key:"body",fn:function(){return[i("v-data-table",{staticClass:"h100p",attrs:{"group-table":"","hide-header":"","syno-id":"detail-container-detail-general-data-table-0",columns:e.columns,"group-info":e.groupInfo,"current-data":e.rows,"show-paging-bar":!1},on:{refresh:function(t){return e.refresh()}},scopedSlots:e._u([{key:"key",fn:function(t){var n=t.row;return[i("span",{style:n.keyStyle},[e._v(e._s(n.key))])]}}])})]},proxy:!0}])})};AY._withStripped=!0;var OY=i(9242),MY=i.n(OY),RY=i(3311),PY=i.n(RY),FY=i(4654),BY=i.n(FY),WY=i(8630),VY=i.n(WY),zY=j({inject:["API_STATUS","_T","_ERROR_MESSAGE","getWindowOrAppWindow"],props:{name:{type:String,required:!0}},computed:{...Oi((({name:e})=>`containers/byName/${e}`),["api_status","profile","details"]),...Mi((({name:e})=>`containers/byName/${e}`),["id","imageName","humanUpTime","project","cpuPriortyText","memoryLimitText","links","network"]),columns:()=>[{title:!1,field:"key",width:200},{title:!1,field:"value"}],groupInfo(){return{category:"category",sortCategoryFn:(e,t)=>this.CATEGORY_ORDERS.indexOf(e)<this.CATEGORY_ORDERS.indexOf(t)}},rows(){return BY()({[this.CATEGORY_KEYS.GENERAL]:{[w("container","container_name")]:this.name,ID:_()(this.details,"Id"),[w("common","image_name")]:this.imageName,[w("common","created_at")]:this.getCreatedAt(),[w("common","started_at")]:`${this.getStartedAt()} (${this.humanUpTime})`,[w("common","project")]:_()(this.project,"name"),[w("container","cpu_priority")]:this.cpuPriortyText,[w("container","memory_limit")]:this.memoryLimitText,[w("wizard","restart_policy")]:this.getRestartPolicyText(),[w("container","web_portals")]:this.links.join(", ")},[this.CATEGORY_KEYS.PORT]:this.getPortMappingRows(),[this.CATEGORY_KEYS.VOLUME]:this.getVolumeRows(),[this.CATEGORY_KEYS.EVIRONMENT]:this.getEnvironmentRows(),[this.CATEGORY_KEYS.NETWORK]:this.getNetworkRows(),[this.CATEGORY_KEYS.CAPABILITIES]:{[w("wizard","cap_add")]:(_()(this.details,"HostConfig.CapAdd")||[]).join(", ")||null,[w("wizard","cap_drop")]:(_()(this.details,"HostConfig.CapDrop")||[]).join(", ")||null},[this.CATEGORY_KEYS.EXEC_COMMAND]:{[w("common","command")]:(_()(this.details,"Config.Cmd")||[]).join(" "),[w("container","entrypoint")]:_()(this.details,"Config.Entrypoint")||""},[this.CATEGORY_KEYS.LINK]:this.getLinkRows()},((e,t)=>VY()(e)?ti()(e,((e,i)=>({category:t,key:i,value:e}))):Ti()(e)?ti()(e,(({value:e,key:i,keyStyle:n})=>({category:t,keyStyle:n,key:i,value:e}))):null)).filter((({value:e})=>null!==e))}},data(){const e={GENERAL:w("common","general"),PORT:_T("common","port"),VOLUME:w("common","volume"),EVIRONMENT:w("container","env_variables"),NETWORK:w("common","network"),CAPABILITIES:w("container","capabilities_title"),EXEC_COMMAND:w("common","execution_command"),LINK:w("wizard","links")};return{CATEGORY_KEYS:e,CATEGORY_ORDERS:[e.GENERAL,e.PORT,e.VOLUME,e.EVIRONMENT,e.NETWORK,e.CAPABILITIES,e.EXEC_COMMAND,e.LINK]}},methods:{...(0,g.mapActions)("containers",["fetchContainerDetail"]),getCreatedAt(){return this.getFormattedDateFromISOString(_()(this.details,"Created"))},getStartedAt(){return"created"===_()(this.details,"State.Status")?"-":this.getFormattedDateFromISOString(_()(this.details,"State.StartedAt"))},getFormattedDateFromISOString:(e="")=>e?SYNO.SDS.DateTimeFormatter(new Date(e)):"-",getRestartPolicyText(){return"no"!==(_()(this.details,"HostConfig.RestartPolicy.Name")||"no")?_T("common","yes"):_T("common","no")},getPortMappingRows(){return MY()((e=>_()(e,"State.Running")?_()(e,"NetworkSettings.Ports"):_()(e,"HostConfig.PortBindings")),(e=>HG()(e,(e=>Ti()(e)))),(e=>ti()(e,(([{HostPort:e}],t)=>({key:t,value:e})))))(this.details)},getEnvironmentRows(){return ti()(_()(this.details,"Config.Env"),(e=>{const t=e.indexOf("=");return{key:e.slice(0,t),value:e.slice(t+1)}}))},getVolumeRows(){return[...ti()(_()(this.details,"HostConfig.Binds"),(e=>({key:"",value:e}))),...BY()(_()(this.details,"HostConfig.Mounts"),(({Type:e,Source:t,Target:i,ReadOnly:n})=>"bind"!==e?[]:[{key:"",value:`${t}:${i}:${n?"ro":"rw"}`}]))]},getLinkRows(){return ti()(_()(this.details,"HostConfig.Links"),(e=>({key:"",value:e})))},getNetworkRows(){var e,t;return BY()(null===(e=this.details)||void 0===e||null===(t=e.NetworkSettings)||void 0===t?void 0:t.Networks,((e,t)=>{const i=e.NetworkID||"",n=this.$store.state.networks.byId[i]||{};return[{key:w("network","name"),value:t},{key:w("network","driver"),value:n.driver,keyStyle:"padding-left: 32px"},{key:w("network","mac_addr"),value:e.MacAddress,keyStyle:"padding-left: 32px"},{key:_T("network","route_gateway"),value:e.Gateway,keyStyle:"padding-left: 32px"},{key:w("network","ip_addr"),value:e.IPAddress,keyStyle:"padding-left: 32px"},{key:w("network","ipv6_gateway"),value:e.IPv6Gateway||null,keyStyle:"padding-left: 32px"},{key:w("network","ipv6_addr"),value:e.GlobalIPv6Address||null,keyStyle:"padding-left: 32px"}]}))},getIpv4Gateway(){const e=this.getNetworkSettings("Gateway"),t=this.getNetworkSettings("IPPrefixLen");return e&&t?e+"/"+t:e},getIpv6Gateway(){const e=this.getNetworkSettings("IPv6Gateway"),t=this.getNetworkSettings("GlobalIPv6PrefixLen");return e&&t?e+"/"+t:e},getNetworkSettings(e=""){var t;if(!e)return null;const i=null===(t=this.details)||void 0===t?void 0:t.NetworkSettings;return _()(i,e)||PY()(ti()(null==i?void 0:i.Networks,(({[e]:t})=>t)),(e=>e))||null},async refresh(){try{await this.fetchContainerDetail({name:this.name})}catch(e){const t=this._ERROR_MESSAGE(e);await this.getWindowOrAppWindow().getMsgBox().alert("",t)}}}},AY,[],!1,null,null,null);zY.options.__file="src/pages/Container/Detail/ContainerDetailGeneral.vue";var jY=zY.exports,HY=function(){var e=this,t=e.$createElement,i=e._self._c||t;return e.running?i("v-panel",{staticClass:"docker-container-details-stats",attrs:{"syno-id":"detail-container-detail-stats-panel-0",fbar:!1},scopedSlots:e._u([{key:"scroll-body",fn:function(){return[i("div",{staticClass:"docker-container-details-stats-body"},[i("v-form-item",{staticClass:"docker-container-details-stats-header",attrs:{label:e._TT("common","interval")}},[i("v-single-select",{attrs:{"syno-id":"detail-project-detail-stat-tab-single-select-0",width:200,options:e.options},model:{value:e.interval,callback:function(t){e.interval=t},expression:"interval"}})],1),e._v(" "),i("div",{staticClass:"docker-container-details-stats-charts-rows"},[i("div",{staticClass:"docker-container-details-stats-charts-row"},[i("ContainerDetailsCpuStatsChart",{ref:"cpuChart",staticClass:"docker-container-details-stats-chart",attrs:{name:e.name,interval:e.interval},on:{initialized:e.onInitialized}}),e._v(" "),i("ContainerDetailsRamStatsChart",{ref:"ramChart",staticClass:"docker-container-details-stats-chart",attrs:{name:e.name,interval:e.interval},on:{initialized:e.onInitialized}})],1),e._v(" "),i("div",{staticClass:"docker-container-details-stats-charts-row"},[i("ContainerDetailsNetStatsChart",{ref:"netChart",staticClass:"docker-container-details-stats-chart",attrs:{name:e.name,interval:e.interval,legends:""},on:{initialized:e.onInitialized}})],1)]),e._v(" "),i("div",{staticClass:"docker-container-details-stats-footer"},[i("div",{staticClass:"docker-container-details-process-title"},[e._v("\n                    "+e._s(e._TT("container_detail","process"))+"\n                ")]),e._v(" "),i("v-data-table",{attrs:{"syno-id":"detail-container-detail-stats-data-table-0","show-paging-bar":!1,columns:e.columns,"current-data":e.rows}})],1)],1)]},proxy:!0}])}):i("v-empty-view",{attrs:{"hide-action":"",icon:e.ICON_PROP.EMPTY_STATS,text:e._TT("container","stats_mask")}})};HY._withStripped=!0;var UY=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"docker-package docker-chart"},[i("div",{staticClass:"docker-chart-header"},[i("div",{staticClass:"docker-chart-title"},[e._v(e._s(e.title))]),e._v(" "),e.legends?i("div",{staticClass:"docker-chart-legends"},e._l(e.series,(function(t){var n=t.color,o=t.name;return i("div",{key:o,class:{"docker-chart-legend":!0,"docker-chart-legend--disabled":e.isLegendDisabled[o],link:!0},on:{click:function(t){return e.onLegendClick(o)}}},[i("Dot",{attrs:{color:n,size:8}}),e._v(" "),i("span",[e._v(e._s(o))])],1)})),0):e._e()]),e._v(" "),i("Chart",{ref:"chart",staticClass:"docker-chart-pane",attrs:{"total-time":e.totalTime,"x-axis-max":e.xAxisMax,"y-axis-min":e.yAxisMin,"y-axis-max":e.yAxisMax,"y-axis-label-formatter":e.yAxisLabelFormatter,series:e.series,value:e.value,"value-formatter":e.valueFormatter,options:e.options},on:{initialized:function(t){return e.$emit("initialized")}}})],1)};UY._withStripped=!0;var $Y={components:{Dot:se,Chart:U},props:{...U.props,title:{type:String,required:!0},legends:{type:Boolean,default:!1}},computed:{isChartEmpty(){return this.value.every((e=>e&&0===e.length))}},data:()=>({isLegendDisabled:{}}),methods:{onLegendClick(e){const{chart:t}=this.$refs.chart;this.isLegendDisabled[e]?(t.dispatchAction({type:"legendSelect",name:e}),this.$set(this.isLegendDisabled,e,!1)):(t.dispatchAction({type:"legendUnSelect",name:e}),this.$set(this.isLegendDisabled,e,!0))}}},KY=(i(8338),j($Y,UY,[],!1,null,null,null));KY.options.__file="src/components/Chart/ChartPane.vue";var qY=j({extends:KY.exports,props:{name:{type:String,required:!0},interval:{type:Number}},computed:{...Mi((({name:e})=>`containers/byName/${e}`),["time","historyOfStats"]),historyOfStatsWithInterval(){let e=1e3*this.interval||0;return this.historyOfStats.reduceRight(((t,i)=>{const[{time:n=1/0}={}]=t;return n-i.time>=e&&t.unshift(i),t}),[])},totalTime(){return 60*this.interval*1e3},options:()=>({grid:{bottom:24}}),xAxisMax(){return this.time}}},void 0,void 0,!1,null,null,null);qY.options.__file="src/pages/Container/Detail/Charts/ContainerDetailsBaseStatsChart.vue";var GY=qY.exports,YY=j({extends:GY,mixins:[G],computed:{title:()=>w("container_detail","cpu"),value(){return[this.historyOfStatsWithInterval.map((({time:e,cpu:t})=>[e,t]))]}}},void 0,void 0,!1,null,null,null);YY.options.__file="src/pages/Container/Detail/Charts/ContainerDetailsCpuStatsChart.vue";var ZY=YY.exports,XY=j({extends:GY,mixins:[X],computed:{title(){return`${w("overview","ram_usage")} (${C[this.sizeLevel]})`},value(){return[this.historyOfStatsWithInterval.map((({time:e,ram:t})=>[e,t]))]}}},void 0,void 0,!1,null,null,null);XY.options.__file="src/pages/Container/Detail/Charts/ContainerDetailsRamStatsChart.vue";var JY=XY.exports,QY=j({extends:GY,mixins:[ee],computed:{value(){return[this.historyOfStatsWithInterval.map((({time:e,upload:t})=>[e,t])),this.historyOfStatsWithInterval.map((({time:e,download:t})=>[e,t]))]}}},void 0,void 0,!1,null,null,null);QY.options.__file="src/pages/Container/Detail/Charts/ContainerDetailsNetStatsChart.vue";var eZ={inject:["_T","_TT","ICON_PROP"],components:{ContainerDetailsCpuStatsChart:ZY,ContainerDetailsRamStatsChart:JY,ContainerDetailsNetStatsChart:QY.exports},props:{name:{type:String,required:!0}},computed:{...Oi((({name:e})=>`containers/byName/${e}`),["processes"]),...Mi((({name:e})=>`containers/byName/${e}`),["status","running"]),options:()=>[{label:`5 ${v("common","time_seconds")}`,value:5},{label:`10 ${v("common","time_seconds")}`,value:10},{label:`30 ${v("common","time_seconds")}`,value:30},{label:`1 ${v("common","time_minute")}`,value:60},{label:`5 ${v("common","time_minutes")}`,value:300},{label:`10 ${v("common","time_minutes")}`,value:600}],columns:()=>[{title:w("container_detail","pid"),field:"pid"},{title:w("container_detail","command"),field:"command",tooltip:{overflowOnly:!0}},{title:w("overview","cpu_usage"),field:"cpu"},{title:w("container_detail","memory"),field:"memory"}],rows(){return this.processes.map((({pid:e,command:t,cpu:i,memory:n})=>({pid:e,command:t,cpu:`${i}%`,memory:`${k(n)}`})))}},watch:{async processes(){await this.$nextTick(),this.getCharts().forEach((e=>e.resize()))}},data:()=>({count:3,interval:10}),async mounted(){this.unregister=await this.pollingProcess({name:this.name})},beforeDestroy(){this.disconnectCharts(),this.unregister()},methods:{...Ri((({name:e})=>`containers/byName/${e}`),["pollingProcess"]),getCharts(){return[this.$refs.cpuChart,this.$refs.ramChart,this.$refs.netChart].map((e=>_()(e,"$refs.chart.chart"))).filter((e=>e))},connectCharts(){echarts.connect(this.getCharts())},disconnectCharts(){echarts.disconnect(this.getCharts())},onInitialized(){--this.count>0||this.connectCharts()},async resize(){await this.$nextTick(),this.getCharts().forEach((e=>e.resize()))}}},tZ=(i(806),j(eZ,HY,[],!1,null,null,null));tZ.options.__file="src/pages/Container/Detail/ContainerDetailStats.vue";var iZ=tZ.exports,nZ=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-panel",{staticClass:"docker-container-details-log",attrs:{"syno-id":"detail-container-detail-log-panel-0",tbar:!0,fbar:!1,loading:e.state.loading},scopedSlots:e._u([{key:"tbar",fn:function(){return[i("v-button",{attrs:{"syno-id":"detail-container-detail-log-button-0",type:"split"},on:{click:function(t){return e.exportHtml()}},scopedSlots:e._u([{key:"dropdown",fn:function(){return[i("v-menu",{attrs:{"syno-id":"detail-container-detail-log-menu-0"}},[i("v-menu-item",{attrs:{"syno-id":"detail-container-detail-log-menu-item-0",title:"HTML"},on:{click:function(t){return e.exportHtml()}}}),e._v(" "),i("v-menu-item",{attrs:{"syno-id":"detail-container-detail-log-menu-item-1",title:"CSV"},on:{click:function(t){return e.exportCSV()}}})],1)]},proxy:!0}])},[e._v("\n            "+e._s(e._TT("container","export"))+"\n            ")])]},proxy:!0},{key:"tbar-right",fn:function(){return[i("v-search-input",{ref:"search",attrs:{"syno-id":"registry-registry-form-single-select-0",advanced:"",width:200,placeholder:e._T("log","search"),align:"tr->br","search-btn":e.searchBtn,"reset-btn":e.resetBtn,clearable:!0},on:{input:e.onInput},scopedSlots:e._u([{key:"advanced-panel",fn:function(){return[i("v-form",{staticClass:"docker-package docker-search-advanced-form",attrs:{"syno-id":"detail-container-detail-log-form-0",direction:"vertical"}},[i("v-form-item",{staticClass:"docker-search-form-item",attrs:{label:e._T("log","attr_keyword")}},[i("v-input",{attrs:{"syno-id":"detail-container-detail-log-input-0"},model:{value:e.form.keyword,callback:function(t){e.$set(e.form,"keyword",t)},expression:"form.keyword"}})],1),e._v(" "),i("v-form-multiple-item",{staticClass:"docker-search-form-item",attrs:{label:e._T("log","date_range")}},[i("v-form-item",[i("v-date-picker",{attrs:{"syno-id":"detail-container-detail-log-date-picker-0",placeholder:e._T("log","date_from"),"max-time":e.form.to?new Date(e.form.to):void 0,"allow-blank":"","time-optional":"","show-clear-button":""},model:{value:e.form.from,callback:function(t){e.$set(e.form,"from",t)},expression:"form.from"}})],1),e._v(" "),i("v-form-item",[i("v-date-picker",{attrs:{"syno-id":"detail-container-detail-log-date-picker-1",placeholder:e._T("log","date_to"),"min-time":e.form.from?new Date(e.form.from):void 0,"allow-blank":"","time-optional":"","show-clear-button":""},model:{value:e.form.to,callback:function(t){e.$set(e.form,"to",t)},expression:"form.to"}})],1)],1),e._v(" "),i("v-form-item",{staticClass:"docker-search-form-item",attrs:{label:e._TT("log","log_level")}},[i("v-single-select",{attrs:{"syno-id":"detail-container-detail-log-single-select-0",width:"100%",options:e.logLevelOpts},model:{value:e.form.logLevel,callback:function(t){e.$set(e.form,"logLevel",t)},expression:"form.logLevel"}})],1)],1)]},proxy:!0}]),model:{value:e.form.keyword,callback:function(t){e.$set(e.form,"keyword",t)},expression:"form.keyword"}})]},proxy:!0},{key:"body",fn:function(){return[i("v-data-table",{attrs:{"syno-id":"detail-container-detail-log-data-table-0",columns:e.columns,"current-data":e.rows,"cell-tooltip-default-props":{overflowOnly:!0},"has-cover":0===e.logs.length,pagination:"",total:e.total,"page-size":e.limit,pageNum:e.pageNum},on:{refresh:function(t){return e.search()},"switch-page":e.onSwitchPage,"update:pageSize":function(t){e.limit=t},"update:page-size":function(t){e.limit=t}},scopedSlots:e._u([{key:"cover",fn:function(){return[i("v-info-mask",[e._v("\n                    "+e._s(e._TT("common","no_log"))+"\n                ")])]},proxy:!0},{key:"text",fn:function(t){var n=t.data;return[i("span",{style:{userSelect:"all"}},[e._v(e._s(n))])]}}])})]},proxy:!0}])})};nZ._withStripped=!0;var oZ=i(3279),rZ=i.n(oZ);const sZ=function({onlyFirst:e=!1}={}){const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}();function aZ(e){if("string"!=typeof e)throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(sZ,"")}const lZ=[{label:v("log","log_all"),value:"all"},{label:v("log","info_level"),value:"stdout"},{label:v("log","error_level"),value:"stderr"}];var cZ={inject:["_T","_TT","_ERROR_MESSAGE","ICON_PROP","getWindowOrAppWindow"],props:{name:{type:String,required:!0}},computed:{columns:()=>[{title:v("log","log_time"),field:"created",width:200,disableSort:!0},{title:w("container_detail","log"),field:"text",tooltip:!0,disableSort:!0},{title:w("common","stream"),field:"stream",width:120,disableSort:!0}],rows(){return this.logs.map((({created:e,text:t,stream:i})=>({stream:i,created:SYNO.SDS.DateTimeFormatter(new Date(e)),text:aZ(t)})))}},data(){return{logs:[],form:this.getDefaultSearchFormOpt(),state:{loading:!0,loaded:!1},searchBtn:{text:v("log","search"),clickHandler:this.search},resetBtn:{text:v("common","reset"),clickHandler:this.reset},limit:1e3,sort_dir:"DESC",total:0,pageNum:1,logLevelOpts:lZ}},created(){this._searchDebounce=rZ()(this.deferSearch,250)},async mounted(){await this.load()},methods:{getDefaultSearchFormOpt:()=>({from:"",to:"",logLevel:lZ[0].value,keyword:""}),getDateParam(e){var t,i,n;return(null==e||null===(t=e.toISOString)||void 0===t||null===(i=t.call(e))||void 0===i||null===(n=i.split("T"))||void 0===n?void 0:n[0])||""},getLogLevelParam:e=>"all"===e?"":e,async load(){this.state.loading=!0;try{const{logs:e,total:t}=await synowebapi.promises.request({api:"SYNO.Docker.Container.Log",method:"get",version:1,params:{name:this.name,from:this.getDateParam(this.form.from),to:this.getDateParam(this.form.to),level:this.getLogLevelParam(this.form.logLevel),keyword:this.form.keyword,sort_dir:this.sort_dir,offset:this.limit*(this.pageNum-1),limit:this.limit}});this.logs=e,this.total=t}catch(e){const t=this._ERROR_MESSAGE(e);await this.getWindowOrAppWindow().getMsgBox().alert("",t)}this.state.loading=!1,this.state.loaded=!0},onInput(e){this._searchDebounce(e)},async deferSearch(){this.$options._searchDefer=this.$options._searchDefer||Promise.resolve(),this.$options._searchDefer=this.$options._searchDefer.then((async()=>{await this.search()}))},async search(){this.$refs.search.closeAdvancedPanel(),this.pageNum=1,await this.load()},async onSwitchPage(e){this.pageNum=e.pageNumber,await this.load()},async reset(){this.form=this.getDefaultSearchFormOpt(),await this.search()},async export(e=""){try{await synowebapi.promises.download({api:"SYNO.Docker.Container.Log",method:"export",version:1,params:{format:e,name:this.name,from:this.getDateParam(this.form.from),to:this.getDateParam(this.form.to),level:this.getLogLevelParam(this.form.logLevel),keyword:this.form.keyword,sort_dir:this.sort_dir,offset:0,limit:-1}})}catch(e){const t=this._ERROR_MESSAGE(e);return void await this.getWindowOrAppWindow().getMsgBox().alert("",t)}},exportHtml(){return this.export("html")},exportCSV(){return this.export("csv")}}},dZ=(i(6950),j(cZ,nZ,[],!1,null,null,null));dZ.options.__file="src/pages/Container/Detail/ContainerDetailLog.vue";var hZ=dZ.exports;const uZ="GENERAL",gZ="STATS";var pZ={inject:["ICON_NAME","getWindowOrAppWindow","_TT","_ERROR_MESSAGE"],mixins:[_i,yY,Qi],components:{StatusPanelWithTabs:DY,ContainerActionMenu:SY},props:{name:{type:String,required:!0},tab:{type:String}},computed:{...Oi((({name:e})=>`containers/byName/${e}`),["api_status","loading"]),...Mi((({name:e})=>`containers/byName/${e}`),["row","humanUpTime","status","error","startable","stopable","duplicateable","exporting","project","exitCode","created","humanUpFor","is_package","latestHealthLog","imageKey"]),statusDescriptionClasses(){if(this.exporting)return"blue-text";switch(this.status){case oi.CREATED:case oi.STOPPED:case oi.RESTARTING:return"tier2-text";case oi.RUNNING_HEALTHY:return"green-text";case oi.RUNNING_UNHEALTHY:return"orange-text";case oi.STOPPED_ERROR_EXIT:case oi.FAIL_TO_RUN:return"red-text";case oi.RUNNING:default:return""}},statusDescription(){if(this.exporting)return w("container","exporting");switch(this.status){case oi.CREATED:return w("container","created");case oi.RUNNING_HEALTHY:return w("container","healthy");case oi.RUNNING_UNHEALTHY:return this.latestHealthLog||w("container","unhealthy");case oi.STOPPED:return w("container","status_stopped");case oi.RESTARTING:return w("container","status_restarting");case oi.STOPPED_ERROR_EXIT:case oi.FAIL_TO_RUN:return this.error;case oi.RUNNING:default:return""}},statusTooltip(){return this.getContainerStatusTooltip(this.row)},iconColor(){return this.getContainerStatusColor(this.row)},iconType(){return this.getContainerStatusType(this.row)},componentProps(){return{name:this.name}},shouldShowUptime(){switch(this.status){case oi.RUNNING:case oi.RUNNING_HEALTHY:case oi.RUNNING_UNHEALTHY:return!0;default:return!1}}},watch:{async name(){await this.registerContainer({name:this.name}),await this.load()},api_status(e){e===ui.SUCCESS&&this.forceRerender()}},data(){return{TABS:[{key:uZ,title:w("common","general"),component:jY},{key:gZ,title:w("common","stats"),component:iZ},{key:"LOG",title:w("container_detail","log"),component:hZ}],activeTab:this.tab||uZ}},async created(){await this.registerContainer({name:this.name})},mounted(){this.load()},methods:{...(0,g.mapActions)("containers",["registerContainer","fetchContainerDetail"]),...(0,g.mapActions)("images",["fetchImageDetail"]),async load(){try{await this.fetchContainerDetail({name:this.name}),await this.$nextTick(),this.imageKey&&await this.fetchImageDetail(this.imageKey)}catch(e){const t=this._ERROR_MESSAGE(e);await this.getWindowOrAppWindow().getMsgBox().alert("",t)}},getTabComponentByKey(e="GENERAL"){return _()(this,["$refs","panel","$refs",e,0])},getActiveTabComponent(){return this.getTabComponentByKey(this.activeTab)},async onTabChange(e){e===gZ&&this.getTabComponentByKey(e).resize()},onContainerDeleted(){this.$emit("go-page",{page:ii.CONTAINER_LIST})},isDirty(){return this.$refs.panel.isDirty()},confirm(){return this.$refs.panel.confirm()},goProject(){this.$emit("go-page",{page:ii.PROJECT_DETAIL,projectId:this.project.id})}}},mZ=(i(8596),j(pZ,NY,[],!1,null,null,null));mZ.options.__file="src/pages/Container/Detail/ContainerDetail.vue";var fZ=mZ.exports,_Z=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-spin",{staticClass:"registry-wrapper",attrs:{spinning:e.isPanelLoading,tip:e.loadingText}},[i("v-panel",{attrs:{"syno-id":"registry-panel",tbar:"",fbar:!1},scopedSlots:e._u([{key:"tbar",fn:function(){return[i("v-button",{attrs:{"syno-id":"registry-download-btn",disabled:!e.selectedRow},on:{click:e.downloadImage}},[e._v("\n                "+e._s(e._T("backup","download"))+"\n            ")]),e._v(" "),i("v-button",{attrs:{"syno-id":"regirstry-settings-btn"},on:{click:e.openRegistrySettingsDlg}},[e._v("\n                "+e._s(e._T("common","common_settings"))+"\n            ")])]},proxy:!0},{key:"tbar-right",fn:function(){return[i("v-search-input",{attrs:{"syno-id":"filter-registry-input",placeholder:e._TT("registry","search"),clearable:!0},on:{input:e.debouncedFilterInput},model:{value:e.filter,callback:function(t){e.filter=t},expression:"filter"}})]},proxy:!0},{key:"body",fn:function(){return[e.isDockerHubUnreachable&&e.isChinaRegion?i("v-info-mask",[i("v-rich-text",{attrs:{text:e._TT("registry","docker_hub_unreachable")}})],1):e.isDockerHubUnreachable&&!e.isChinaRegion?i("v-info-mask",[i("v-rich-text",{attrs:{text:e._TT("network","check_network_and_retry")}})],1):[i("v-data-table",{ref:"table",staticClass:"h100p registry-table",attrs:{"syno-id":"registry-data-table-0","hide-header":"",columns:e.columns,pageSize:e.imagePageSize,pageNum:e.imagePageNum,total:e.imageTotal,"current-data":e.rows,"auto-row-height":"",pagination:""},on:{"selected-change":e.onSelectionChange,dataloaded:function(t){e.selectedData=[]},refresh:e.doImageSearch,"switch-page":e.onSwitchPage,rowdblclick:e.downloadImage,contextmenu:e.onContextMenu},scopedSlots:e._u([{key:"name",fn:function(e){var t=e.row;return[i("image-item",{ref:t.name,attrs:{image:t}})]}}])}),e._v(" "),e.isContextMenuShown?i("v-portal",{attrs:{"mount-to":"body","target-style":e.portalStyles}},[[i("v-menu",{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:e.clickoutside,expression:"clickoutside"}],attrs:{"syno-id":"registry-registry-menu-0","close-on-select":""},on:{"menu-close":function(t){e.isContextMenuShown=!1}}},[i("v-menu-item",{attrs:{"syno-id":"registry-registry-menu-item-0",title:e._TT("registry","image_download")},on:{click:e.downloadImage}}),e._v(" "),e.official?i("v-menu-item",{attrs:{"syno-id":"registry-registry-menu-item-1",title:e._TT("registry","open_docker_hub_page")},on:{click:e.openTab}}):e._e()],1)]],2):e._e()]]},proxy:!0}])})],1)};_Z._withStripped=!0;var vZ=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"registry-image-item"},[i("div",{staticClass:"content"},[i("div",{staticClass:"title-wrap"},[i("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{content:e.image.name,overflowOnly:!0},expression:"{ content: image.name, overflowOnly: true }"}],staticClass:"repo-name"},[e._v("\n                "+e._s(e.image.name)+"\n            ")]),e._v(" "),e.isOfficial?i("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.officialStr,expression:"officialStr"}],staticClass:"official-icon"}):e._e(),e._v(" "),e.isSupportedHub?i("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.starCntStr,expression:"starCntStr"}],staticClass:"star-wrap"},[i("div",{staticClass:"star-icon"}),e._v(" "),i("div",{staticClass:"star-count"},[e._v(e._s(e.image.star_count))])]):e._e()]),e._v(" "),e.image.description?i("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{content:e.image.description,overflowOnly:!0},expression:"{ content: image.description, overflowOnly: true }"}],staticClass:"repo-desc"},[e._v("\n            "+e._s(e.image.description)+"\n        ")]):e._e()]),e._v(" "),e.isSupportedHub?i("div",{staticClass:"link-btn-wrap"},[i("a",{staticClass:"link",attrs:{href:e.linkUrl,target:"_blank"}})]):e._e()])};vZ._withStripped=!0;const bZ="registry.hub.docker.com",wZ=/^(https?:\/\/)?registry.hub.docker.com/,yZ=/^(https?:\/\/)?index.docker.io/,CZ=/^(https:\/\/registry.hub.docker.com)\/(?:[A-Za-z]\/)?([A-Za-z0-9_-]+\/[A-Za-z0-9_.-]+)\/?$/,SZ="Docker Hub",kZ="Docker Hub (v1)",xZ=/^(https:\/\/)?docker\.io$/,LZ=/^(https:\/\/)?registry\.hub\.docker\.com$/,EZ=/^(https:\/\/)?hub\.docker\.com$/,NZ=/^(https:\/\/)?index\.docker\.io$/,IZ=/^(https:\/\/)?registry-1\.docker\.io$/,TZ="aliyuncs.com";function DZ(e){return!!wZ.test(e)||!!yZ.test(e)}function AZ(e){return e===SZ||e===kZ}function OZ(e){var t=/^([^/]*\/)?([^/]*)$/.exec(e);return t?SYNO.SDS.formatString("https://{0}/{1}/{2}/",bZ,t[1]?"r":"_",e):null}function MZ(e,t){return e===SZ||e===kZ||[xZ,LZ,EZ,NZ,IZ].some((e=>e.test(t)))}var RZ={isDockerHubShortName:AZ,isDockerHub:DZ,formDockerHubUrl:OZ,formDockerHubTagUrl:function(e){var t=/^([^/]*\/)?([^/]*)$/.exec(e);return t?SYNO.SDS.formatString("https://{0}/{1}/{2}/",bZ,t[1]?"r":"_",e)+"tags":null},shouldSearchRegistryWithOfficialKeyword:MZ,isDockerRepo:e=>e.match(CZ),isAliyunHubShortName:e=>"Aliyun Hub"===e,isAliyunHub:e=>"https://dev.aliyun.com"===e,isAliyunRelated:function(e){return e.includes(TZ)},toAliyunUrl:function(e){return"dev.aliyun.com"+e.split(TZ)[1]},formAliyunHubUrl:function(e){return e&&0!==e.length?`https://dev.aliyun.com/detail.html?&repoId=${e}`:null}},PZ={name:"ImageItem",mixins:[tY],data(){return{officialStr:this._TT("registry","official_image")}},props:{image:{type:Object,default:()=>({})}},computed:{starCntStr(){return this.isDockerHub?this._TT("registry","star_count"):this._TT("registry","download_times")},isDockerHub(){return RZ.isDockerHub(this.image.registry)},isAliyunHub(){return RZ.isAliyunHub(this.image.registry)},isOfficial(){return this.image.is_official},isSupportedHub(){return this.isDockerHub||this.isAliyunHub},linkUrl(){return this.isDockerHub?RZ.formDockerHubUrl(this.image.name):this.isAliyunHub?RZ.formAliyunHubUrl(this.image.aliInfo.repoId):"#"}}},FZ=(i(8738),j(PZ,vZ,[],!1,null,"77866b40",null));FZ.options.__file="src/pages/Registry/ImageItem.vue";var BZ={inject:["getAppWindow","isChinaRegion"],mixins:[tY,GG],components:{ImageItem:FZ.exports},computed:{...(0,g.mapState)("registries",["images","imageTotal","imagePageSize","imagePageNum","isDockerHubUnreachable"]),rows(){return Object.freeze(this.images)},loadingText(){return this._T("common","loading")},portalStyles(){return{top:`${this.mouse.y}px`,left:`${this.mouse.x}px`}}},created(){this.debouncedFilterInput=rZ()(this.onFilterInput,300)},data:()=>({isPanelLoading:!1,columns:[{field:"name"}],filter:"",selectedRow:null,isContextMenuShown:!1,official:!1,mouse:{x:0,y:0}}),async mounted(){await this.$nextTick(),this.setLoading(!0);try{await this.getRegistry()}catch(e){this.setLoading(!1),this.getAppWindow().getMsgBox().alert(this._T("error","error_error"),this.getErrorMessage(e))}this.clearImageFilter(),await this.triggerLoadImageList(this.updateImageNum.bind(this,1))},methods:{...(0,g.mapActions)("registries",["getRegistry","loadImageList","clearImageFilter","updateImageNum","updateImageKeyword"]),...(0,g.mapActions)(["clearNotification","setNotification"]),...(0,g.mapActions)("images",["downloadImageStart","pollingImageDownloadTasks"]),onSelectionChange(e){this.selectedRow=e.rows[0]},async openTab(){var e;if(!this.selectedRow)return;const t=(null===(e=this.$refs[this.selectedRow.name])||void 0===e?void 0:e.linkUrl)||"";t&&window.open(t,"_blank")},async downloadImage(){const e={repo:this.selectedRow.name,aliInfo:this.selectedRow.aliInfo},t=await this.loadImageTagList(e);if(1===t.length)return void this.pullImage({tag:t[0].tag,repository:e.repo});const{component:i}=this.getAppWindow().openModalWindow(SYNO.SDS.Docker.Registry.TagDialog2,{tags:t,repoInfo:e});i.$on("tagchoosed",this.pullImage)},async loadImageTagList(e){let t=[];this.isPanelLoading=!0;try{t=await synowebapi.promises.request({api:"SYNO.Docker.Registry",method:"tags",version:1,scope:this,params:e,timeout:3e5})}catch(e){SYNO.Debug.error(e)}finally{this.isPanelLoading=!1}return t||[]},clickoutside(){this.isContextMenuShown=!1,this.official=!1,this.mouse.x=0,this.mouse.y=0},async onContextMenu({event:e}){await this.$nextTick(),this.$refs[this.selectedRow.name]&&this.$refs[this.selectedRow.name].isSupportedHub&&(this.official=!0),this.isContextMenuShown=!0,this.mouse.x=e.pageX,this.mouse.y=e.pageY},async pullImage(e){this.isPanelLoading=!0;try{await this.downloadImageStart(e),this.$emit("go-page",{page:ii.IMAGE_LIST}),await this.pollingImageDownloadTasks()}catch(e){this.getAppWindow().getMsgBox().alert("",this.getErrorMessage(e))}this.isPanelLoading=!1;const{repository:t="",tag:i="latest"}=e;this.getAppWindow().getToastBox(SYNO.SDS.formatString(w("image","a_image_pulled_toast"),`${t}:${i}`))},openRegistrySettingsDlg(){const{component:e}=this.getAppWindow().openModalWindow(SYNO.SDS.Docker.Registry.SettingDialog);e.$on("registry-change",(async()=>{await this.triggerLoadImageList(this.updateImageNum.bind(this,1))}))},async onFilterInput(){await this.triggerLoadImageList(this.updateImageKeyword.bind(this,this.filter))},setLoading(e=!0){e?this.getAppWindow().setStatusBusy():this.getAppWindow().clearStatus()},async triggerLoadImageList(e){if(this.setLoading(!0),!this.isDockerHubUnreachable||!this.isChinaRegion)try{await e()}catch(e){SYNO.Debug.error(e)}this.setLoading(!1)},async onSwitchPage(e){await this.triggerLoadImageList(this.updateImageNum.bind(this,e.pageNumber))},async doImageSearch(){this.triggerLoadImageList(this.loadImageList.bind(this))}}},WZ=(i(1107),j(BZ,_Z,[],!1,null,null,null));WZ.options.__file="src/pages/Registry/Registry.vue";var VZ=WZ.exports,zZ=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-spin",{staticClass:"docker-image-list",attrs:{spinning:e.loading,tip:e._T("common","loading")}},[0===e._rows.length?i("v-empty-view",{attrs:{icon:e.ICON_PROP.EMPTY_IMAGE,text:e._TT("image","image_empty")},scopedSlots:e._u([{key:"action",fn:function(){return[i("v-button",{attrs:{"syno-id":"list-container-list-button-1",type:"dropdown",suffix:"blue"},scopedSlots:e._u([{key:"dropdown",fn:function(){return[i("v-menu",{attrs:{"syno-id":"list-image-list-menu-0"}},[i("v-menu-item",{attrs:{"syno-id":"list-image-list-menu-item-0",title:e._TT("image","add_from_url")},on:{click:function(t){return e.openImportFromUrlDialog()}}}),e._v(" "),i("v-menu-submenu",{attrs:{"syno-id":"list-image-list-menu-submenu-0",title:e._TT("image","add_from_file")}},[i("v-menu-item",{attrs:{"syno-id":"list-image-list-menu-item-1",title:e._TT("image","add_from_dm")},on:{click:function(t){return e.importFromDSM()}}}),e._v(" "),i("v-menu-item",{attrs:{"syno-id":"list-image-list-menu-item-2",title:e._TT("image","add_from_local")},on:{click:function(t){return e.importFromLocalFile()}}})],1)],1)]},proxy:!0}],null,!1,4025170588)},[e._v("\n                "+e._s(e._TT("container","import"))+"\n                ")])]},proxy:!0}],null,!1,2680558912)}):i("v-panel",{staticClass:"docker-table-list",attrs:{"syno-id":"image-image-panel-0",tbar:!0,fbar:!1},scopedSlots:e._u([{key:"tbar",fn:function(){return[i("v-button",{attrs:{"syno-id":"image-image-button-0",disabled:!e.singleSelectedRow||e.someSelectedImageDeleting||e.someSelectedImageNotRunnable},on:{click:function(t){return e.openContainerCreateWizard(e.singleSelectedImageName)}}},[e._v("\n                "+e._s(e._T("common","run"))+"\n            ")]),e._v(" "),i("v-button",{attrs:{"syno-id":"image-image-button-1",disabled:!e.singleSelectedRow||e.someSelectedImageDeleting},on:{click:function(t){return e.goImageDetailPage(e.singleSelectedImageName)}}},[e._v("\n                "+e._s(e._T("common","details"))+"\n            ")]),e._v(" "),i("v-button",{attrs:{"syno-id":"image-image-button-2",disabled:0===e.selectedImageNames.length||e.someSelectedImageDeleting},on:{click:function(t){return e.deleteImageList(e.selectedImageNames)}}},[e._v("\n                "+e._s(e._T("common","delete"))+"\n            ")]),e._v(" "),i("v-button",{attrs:{"syno-id":"image-image-button-3",disabled:0===e.unusedImageNames.length},on:{click:e.onImageCleanup}},[e._v("\n                "+e._s(e._TT("image","clean_up"))+"\n            ")]),e._v(" "),i("v-button",{attrs:{"syno-id":"image-image-button-4",type:"dropdown"},scopedSlots:e._u([{key:"dropdown",fn:function(){return[i("v-button-dropdown",[i("ImageActionMenu",{attrs:{"hide-run":"","hide-detail":"","hide-delete":"",names:e.selectedImageNames},on:{"go-page":function(t){return e.$emit("go-page",t)}}})],1)]},proxy:!0}])},[e._v("\n                "+e._s(e._TT("container","action"))+"\n                ")])]},proxy:!0},{key:"tbar-right",fn:function(){return[i("v-search-input",{attrs:{"syno-id":"project-list-search-input",placeholder:e._TT("registry","search"),clearable:!0},on:{input:e.onSearchInput},model:{value:e.state.keyword,callback:function(t){e.$set(e.state,"keyword",t)},expression:"state.keyword"}})]},proxy:!0},{key:"body",fn:function(){return[i("v-data-table",{staticClass:"h100p",attrs:{"syno-id":"image-image-data-table-0",pagination:!1,"multiple-selected":!0,columns:e.columns,"current-data":e.rows,"cell-tooltip-default-props":{overflowOnly:!0},"local-sort-func":e.localSortFunc},on:{"selected-change":function(t){e.selectedData=t},dataloaded:function(t){e.selectedData=[]},rowdblclick:function(t){return e.goImageDetailPage(e.singleSelectedImageName)},"cell-contextmenu":e.onContextMenu,refresh:function(t){return e.load()}},scopedSlots:e._u([{key:"status",fn:function(t){var n=t.data,o=t.row,r=o.deleting,s=o.upgrading,a=o.upgradePercentage,l=o.downloadPercentage;return[r?i("Dot",{attrs:{type:"loading"}}):n===e.IMAGE_STATUS.DOWNLOADING?i("Icon",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e._STRING_FORMAT(e._TT("image","downloading"),l),expression:"\n                            _STRING_FORMAT(_TT('image', 'downloading'), downloadPercentage)\n                        "}],staticClass:"blue-text",attrs:{name:e.ICON_NAME.ROW_DOWNLOADING}}):s?i("Icon",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e._STRING_FORMAT(e._TT("image","updating"),a),expression:"_STRING_FORMAT(_TT('image', 'updating'), upgradePercentage)"}],staticClass:"blue-text",attrs:{name:e.ICON_NAME.ROW_UPDATING}}):n===e.IMAGE_STATUS.IN_USED?i("Dot",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e._TT("image","in_use"),expression:"_TT('image', 'in_use')"}],attrs:{color:"blue"}}):i("Dot",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e._TT("image","unused"),expression:"_TT('image', 'unused')"}],attrs:{type:"bordered"}})]}},{key:"repository",fn:function(t){var n=t.data,o=t.row,r=o.status,s=o.name;return[i("span",{class:{link:r!==e.IMAGE_STATUS.DOWNLOADING},domProps:{textContent:e._s(n)},on:{click:function(t){return e.goImageDetailPage(s)}}})]}},{key:"tag",fn:function(t){var n=t.data,o=t.row,r=o.name,s=o.status,a=o.upgrading,l=o.upgradable,c=o.upgradePercentage,d=o.downloadPercentage;return o.repository,[i("span",{domProps:{textContent:e._s(n)}}),e._v(" "),a?i("span",[e._v("\n                        ("),i("span",{staticClass:"blue-text"},[e._v(e._s(e._STRING_FORMAT(e._TT("image","updating"),c)))]),e._v(")\n                    ")]):s===e.IMAGE_STATUS.DOWNLOADING?i("span",[e._v("\n                        ("),i("span",{staticClass:"blue-text"},[e._v(e._s(e._STRING_FORMAT(e._TT("image","downloading"),d)))]),e._v(")\n                    ")]):l?i("span",[e._v("\n                        ("),i("span",{staticClass:"hyperlink",on:{click:function(t){return e.openUpgradeImageDialog(r)}}},[e._v(e._s(e._TT("image","update")))]),e._v(")\n                    ")]):e._e()]}},{key:"size",fn:function(t){var i=t.row.humanSize;return[e._v("\n                    "+e._s(i)+"\n                ")]}},{key:"created",fn:function(t){var i=t.row.humanCreatedAt;return[e._v("\n                    "+e._s(i)+"\n                ")]}}])}),e._v(" "),e.isContextMenuShown?i("v-portal",{attrs:{"mount-to":"body","target-style":e.portalStyles}},[i("ImageActionMenu",e._b({directives:[{name:"clickoutside",rawName:"v-clickoutside",value:e.clickoutside,expression:"clickoutside"}],attrs:{"hide-import":""},on:{"menu-close":function(t){e.isContextMenuShown=!1},"go-page":function(t){return e.$emit("go-page",t)}}},"ImageActionMenu",e.contextMenuProps,!1))],1):e._e()]},proxy:!0}])})],1)};zZ._withStripped=!0;var jZ=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-menu",{attrs:{"syno-id":"image-image-menu-0","close-on-select":""},on:{"menu-close":function(t){return e.$emit("menu-close")}}},[e.hideRun?e._e():i("v-menu-item",{attrs:{disabled:!e.isRunnable,"syno-id":"image-image-menu-item-0",title:e._T("common","run")},on:{click:function(t){return e.openContainerCreateWizard()}}}),e._v(" "),e.hideDetail?e._e():i("v-menu-item",{attrs:{"syno-id":"image-image-menu-item-1",title:e._TT("container","detail")},on:{click:function(t){return e.goImageDetailPage()}}}),e._v(" "),e.upgradable?i("v-menu-item",{attrs:{"syno-id":"image-image-menu-item-2",title:e._TT("ddsm","update")},on:{click:function(t){return e.openUpgradeImageDialog()}}}):e._e(),e._v(" "),e.hideImport?e._e():i("v-menu-submenu",{attrs:{"syno-id":"image-image-menu-submenu-0",title:e._TT("container","import")}},[i("v-menu-item",{attrs:{"syno-id":"image-image-menu-item-3",title:e._TT("image","add_from_url")},on:{click:function(){return e.openImportFromUrlDialog()}}}),e._v(" "),i("v-menu-submenu",{attrs:{"syno-id":"image-image-menu-submenu-1",title:e._TT("image","add_from_file")}},[i("v-menu-item",{attrs:{"syno-id":"image-image-menu-item-4",title:e._TT("image","add_from_dm")},on:{click:function(){return e.importFromDSM()}}}),e._v(" "),i("v-menu-item",{attrs:{"syno-id":"image-image-menu-item-5",title:e._TT("image","add_from_local")},on:{click:function(){return e.importFromLocalFile()}}})],1)],1),e._v(" "),e.hideExport?e._e():i("v-menu-item",{attrs:{"syno-id":"image-image-menu-item-6",title:e._TT("common","export"),disabled:!e.name||e.deleting},on:{click:function(){return e.exportImage()}}}),e._v(" "),e.hideDelete?e._e():i("v-menu-item",{attrs:{"syno-id":"image-image-menu-item-7",title:e._T("common","delete")},on:{click:function(t){return e.deleteImageList(e.names)}}})],1)};jZ._withStripped=!0;var HZ=i(7187),UZ=i.n(HZ);const{WEBAPI_ERR_IMAGE_CREATE_PARSE_FAIL:$Z,WEBAPI_ERR_IMAGE_LOAD_PARSE_FAIL:KZ}=Xt;var qZ={inject:["getWindowOrAppWindow","_ERROR_MESSAGE"],props:{names:{type:Array,required:!0},onImageDeleted:{type:Function,default:()=>{}}},computed:{...(0,g.mapGetters)("images",["unusedImageNames","getImageInUse","getImageContainerNames"])},methods:{...(0,g.mapActions)("containers",["fetchContainerList","fetchImageList"]),...(0,g.mapActions)("images",{actionDeleteImageList:"deleteImageList",actionDeleteImage:"deleteImage",actionExportImage:"exportImage",actionUpgradeImage:"upgradeImage",pruneImage:"pruneImage"}),async openContainerCreateWizard(e=this.name){const{window:t}=this.getWindowOrAppWindow().openModalWindow(SYNO.SDS.Docker.Container.ContainerCreateWizard,{image:e});t.$on("close",(async({payload:{success:e,name:t}}={})=>{if(e){try{await this.fetchContainerList()}catch(e){const t=this._ERROR_MESSAGE(e);await this.getWindowOrAppWindow().getMsgBox().alert("",t)}this.getWindowOrAppWindow().getToastBox(SYNO.SDS.formatString(w("container","created_toast"),t))}}))},goImageDetailPage(e=this.name){var t;e&&((null===(t=this.$store.state.images.byName[e])||void 0===t?void 0:t.deleting)||this.$emit("go-page",{page:ii.IMAGE_DETAIL,name:e}))},openImportFromUrlDialog(){return this.$emit("update:isOpen",!1),this.getWindowOrAppWindow().openModalWindow(SYNO.SDS.Docker.Image.ImportFromUrlDialog)},async importFromLocalFile(){this.$emit("update:isOpen",!1);const e=this.getWindowOrAppWindow(),t=await this.chooseLocalFile(),i={filename:t};e.setStatusBusy();try{await synowebapi.promises.request({api:"SYNO.Docker.Image",method:"upload",version:1,formData:i})}catch(i){const n=[];throw[$Z,KZ].includes(null==i?void 0:i.code)&&n.push((null==t?void 0:t.name)||""),await e.getMsgBox().alert("",this._ERROR_MESSAGE(i,n)),i}finally{e.clearStatus()}this.fetchImageList(),this.getWindowOrAppWindow().getToastBox(SYNO.SDS.formatString(w("image","imported_toast"),t.name))},chooseLocalFile:async()=>await new Promise((e=>{const t=document.createElement("input");t.type="file",t.addEventListener("change",(({target:{files:[t]}})=>{e(t)})),t.click()})),async importFromDSM(){this.$emit("update:isOpen",!1);const e=this.getWindowOrAppWindow(),t=new SYNO.SDS.Utils.FileChooser.Chooser({owner:e,usage:{type:"open"},gotoPath:"/docker",treeFilter:function(e,t={}){return!["/home","/homes"].includes(t.spath)},listeners:{scope:this,choose:this.onImportChoose}});return t.open(),t},async onImportChoose(e,{path:t},i){e.setStatusBusy();try{await synowebapi.promises.request({api:"SYNO.Docker.Image",method:"import",version:1,params:{path:t}}),e.success=!0,e.close()}catch(i){const n=[];if([$Z,KZ].includes(null==i?void 0:i.code)){const e=t.split(/(\\|\/)/g).pop()||"";n.push(e)}return e.getMsgBox().alert("",this._ERROR_MESSAGE(i,n)),void e.clearStatusBusy()}this.fetchImageList(),this.getWindowOrAppWindow().getToastBox(SYNO.SDS.formatString(w("image","imported_toast"),t))},async deleteImageList(e=[]){if(this.$emit("update:isOpen",!1),0===e.length)return!1;const t=e.map((e=>`<b>${UZ()(O(e))}</b>`)).join(", "),i=1===e.length?SYNO.SDS.formatString(w("image","delete_a_image_confirm"),t):SYNO.SDS.formatString(w("image","delete_confirm"),e.length);if("confirm"!==await this.getWindowOrAppWindow().getMsgBox().confirmDelete("",i,void 0,{useHtml:!0}))return!1;const n=e.filter((e=>this.getImageInUse(e))).map((e=>({name:e,containers:this.getImageContainerNames(e)})));if(n.length>0){const e=`<ul>${n.map((({name:e,containers:t})=>SYNO.SDS.formatString(w("image","is_used_by"),`<b>${UZ()(O(e))}</b>`,t.map((e=>`<b>${e}</b>`)).join(", "))))}</ul>`;return await this.$nextTick(),await this.getWindowOrAppWindow().getMsgBox().alert("",SYNO.SDS.formatString(w("image","unable_delete_image"),e),void 0,{useHtml:!0}),!1}try{await this.actionDeleteImageList(e),this.getWindowOrAppWindow().getToastBox(1===e.length?SYNO.SDS.formatString(w("image","a_image_deleted_toast"),O(e[0])):SYNO.SDS.formatString(w("image","images_deleted_toast"),e.length))}catch(e){const t=this._ERROR_MESSAGE(e);await this.getWindowOrAppWindow().getMsgBox().alert("",t)}this.onImageDeleted()},async exportImage(e=this.name){if(this.$emit("update:isOpen",!1),!e)return;const t=await this.getSharePathFromFileChooser();await this.actionExportImage({name:e,path:t})},async getSharePathFromFileChooser(){return await new Promise((e=>{const t=new SYNO.SDS.Utils.FileChooser.Chooser({owner:this.getWindowOrAppWindow(),title:_T("mediaservice","select_folder"),folderToolbar:!0,usage:{type:"chooseDir"},gotoPath:"/docker",treeFilter:function(e,t={}){return!["/home","/homes"].includes(t.spath)&&"iso"!==t.mountType},listeners:{choose:(i,{path:n})=>{e(n),t.close()}}});t.open()}))},openUpgradeImageDialog(e=this.name){if(this.$emit("update:isOpen",!1),!e)return;const{window:t}=this.getWindowOrAppWindow().openModalWindow(SYNO.SDS.Docker.Image.UpgradeDialog,{name:e});t.$on("close",(({payload:{confirm:t=!1}}={})=>{t&&this.upgradeImage(e)}))},async upgradeImage(e){if(e){try{await this.actionUpgradeImage(e)}catch(e){const t=this._ERROR_MESSAGE(e);return void await this.getWindowOrAppWindow().getMsgBox().alert("",t)}this.getWindowOrAppWindow().getToastBox(SYNO.SDS.formatString(w("image","a_image_upgraded_toast"),e))}},async onImageCleanup(){if(0===this.unusedImageNames.length)return;const e=this.unusedImageNames.map((e=>`<b>${UZ()(O(e))}</b>`)).join(", ");if("confirm"===await this.getWindowOrAppWindow().getMsgBox().confirmDelete("",SYNO.SDS.formatString(w("image","clenup_confirm_text"),e),void 0,{useHtml:!0}))try{await this.pruneImage()}catch(e){const t=this._ERROR_MESSAGE(e);await this.getWindowOrAppWindow().getMsgBox().alert("",t)}}}},GZ=j({inject:["_T","_TT"],props:{hideRun:{type:Boolean},hideDetail:{type:Boolean},hideImport:{type:Boolean},hideDelete:{type:Boolean},hideExport:{type:Boolean}},mixins:[qZ],computed:{...(0,g.mapGetters)("images",["getImageStateByName","getImageIsRunnable"]),upgradable(){var e;return null===(e=this.getImageStateByName(this.name))||void 0===e?void 0:e.upgradable},deleting(){var e;return null===(e=this.getImageStateByName(this.name))||void 0===e?void 0:e.deleting},isRunnable(){return this.getImageIsRunnable(this.name)},name(){return 1===this.names.length?this.names[0]:void 0}}},jZ,[],!1,null,null,null);GZ.options.__file="src/pages/Image/Shared/ActionMenu/ImageActionMenu.vue";var YZ=GZ.exports;function ZZ(e,t){return e===si.IN_USED?0:t?1:e===si.DOWNLOADING?2:3}var XZ={inject:["_T","_TT","_ERROR_MESSAGE","_STRING_FORMAT","ICON_PROP","PAGE_KEYS","IMAGE_STATUS","ICON_NAME","getWindowOrAppWindow"],mixins:[qZ],components:{ImageActionMenu:YZ,Dot:se,Icon:Zt},computed:{...(0,g.mapState)("images",["loading"]),...(0,g.mapGetters)("images",["unusedImageNames"]),...(0,g.mapGetters)("images",{_rows:"rows"}),rows(){return this._rows.filter((({repository:e="",tag:t=""})=>[e,t].some((e=>e.includes(this.state.keyword))))).map((e=>({...e,_rowInfo:{unselectable:e.status===si.DOWNLOADING||e.deleting,disabled:e.deleting}})))},columns:()=>[{title:v("common","status"),field:"status",width:73,align:"center",hideMenuItem:!0},{title:v("common","name"),field:"repository",hideMenuItem:!0,tooltip:!0},{title:w("common","tag"),field:"tag",hideMenuItem:!0,defaultWidth:240,tooltip:!0},{title:v("common","size"),field:"size",defaultWidth:180,tooltip:!0},{title:w("common","created_at"),field:"created",defaultWidth:210,tooltip:!0}],portalStyles(){return{top:`${this.mouse.y}px`,left:`${this.mouse.x}px`}},selectedRows(){return this.selectedData.rows||[]},selectedImageNames(){return this.selectedRows.map((({name:e})=>e))},singleSelectedRow(){return 1===this.selectedRows.length?this.selectedRows[0]:void 0},singleSelectedImageName(){return this.singleSelectedRow?this.singleSelectedRow.name:void 0},someSelectedImageDeleting(){return this.selectedRows.some((({deleting:e})=>e))},someSelectedImageNotRunnable(){return this.selectedRows.some((({isRunnable:e})=>!e))}},async mounted(){this.unregister=await this.pollingImageList((async e=>{const t=this._ERROR_MESSAGE(e);await this.getAppWindow().getMsgBox().alert("",t)}))},beforeDestroy(){this.unregister()},data:()=>({state:{keyword:""},isContextMenuShown:!1,mouse:{x:0,y:0},contextMenuProps:{},selectedData:[]}),methods:{...(0,g.mapActions)("images",["pollingImageList","fetchImageList"]),async load(){try{await this.fetchImageList()}catch(e){const t=this._ERROR_MESSAGE(e);await this.getWindowOrAppWindow().getMsgBox().alert("",t)}},clickoutside(){this.isContextMenuShown=!1,this.mouse.x=0,this.mouse.y=0,this.contextMenuProps={}},async onContextMenu({status:e,deleting:t},i,n,o,{pageX:r,pageY:s}){e!==si.DOWNLOADING&&(t||(await this.$nextTick(),this.isContextMenuShown=!0,this.contextMenuProps={names:this.selectedImageNames,hideRun:!this.singleSelectedRow,hideDetail:!this.singleSelectedRow,hideExport:!this.singleSelectedRow},this.mouse.x=r,this.mouse.y=s))},localSortFunc({field:e,sort:t}){switch(e){case"status":return({status:e,upgrading:i},{status:n,upgrading:o})=>{const r=ZZ(e,i),s=ZZ(n,o);return"DESC"===t?r<s?1:-1:"ASC"===t?r<s?-1:1:0};case"tag":return({tag:e},{tag:i})=>"DESC"===t?"latest"===e?1:"latest"===i||e<i?-1:1:"ASC"===t?"latest"===e?-1:"latest"===i||e<i?1:-1:0;default:return}}}},JZ=(i(3020),j(XZ,zZ,[],!1,null,null,null));JZ.options.__file="src/pages/Image/List/ImageList.vue";var QZ=JZ.exports,eX=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("StatusPanel",{ref:"panel",attrs:{title:e.repository+":"+e.tag,"icon-name":e.ICON_NAME.IMAGE_28,"icon-color":e.iconColor,"icon-type":e.iconType},on:{"go-page":function(t){return e.$emit("go-page",t)},"back-page":function(t){return e.$emit("back-page")}},scopedSlots:e._u([{key:"description",fn:function(){return[e.status===e.IMAGE_STATUS.IN_USED?i("span",{staticClass:"blue-text"},[e._v(e._s(e._TT("image","in_use")))]):i("span",{staticClass:"tier2-text"},[e._v(e._s(e._TT("image","unused")))])]},proxy:!0},{key:"header-actions",fn:function(){return[i("v-button",{attrs:{"syno-id":"detail-image-detail-button-0",disabled:!e.isRunnable},on:{click:function(t){return e.openContainerCreateWizard()}}},[e._v("\n            "+e._s(e._T("common","run"))+"\n        ")]),e._v(" "),i("v-button",{attrs:{"syno-id":"detail-image-detail-button-1",type:"dropdown"},scopedSlots:e._u([{key:"dropdown",fn:function(){return[i("v-button-dropdown",[i("ImageActionMenu",{attrs:{"hide-run":"","hide-import":"","hide-detail":"",names:[e.name],"on-image-deleted":e.onImageDeleted},on:{"go-page":function(t){return e.$emit("go-page",t)}}})],1)]},proxy:!0}])},[e._v("\n            "+e._s(e._TT("container","action"))+"\n            ")])]},proxy:!0}])},[e._v(" "),e._v(" "),i("v-data-table",{staticClass:"docker-image-detail-table h100p",attrs:{"syno-id":"detail-image-detail-data-table-0","group-table":"","hide-header":"","show-paging-bar":!1,columns:e.columns,"group-info":e.groupInfo,"current-data":e.rows},on:{refresh:function(t){return e.load()}},scopedSlots:e._u([{key:"value",fn:function(t){var n=t.data,o=t.row.key;return[i("div",{staticClass:"docker-image-detail-cell"},[i("span",{domProps:{textContent:e._s(n)}}),e._v(" "),o===e._TT("common","tag")?[e.upgrading?[e._v("\n                        ("),i("span",{staticClass:"blue-text"},[e._v(e._s(e._STRING_FORMAT(e._TT("image","updating"),e.upgradePercentage)))]),e._v(")\n                    ")]:e.upgradable?[e._v("\n                        ("),i("span",{staticClass:"hyperlink",on:{click:function(t){return e.openUpgradeImageDialog(e.name)}}},[e._v(e._s(e._TT("image","update")))]),e._v(")\n                    ")]:e._e()]:e._e(),e._v(" "),o===e._TT("common","registry")?[e.isDockerhub?[i("a",{staticClass:"docker-image-detail-registry-link",attrs:{href:e.link,target:"_blank"}},[i("Icon",{attrs:{name:e.ICON_NAME.ACTION_GO_TO}})],1)]:e._e()]:e._e()],2)]}}])})],1)};eX._withStripped=!0;var tX={inject:["IMAGE_STATUS","ICON_NAME","_T","_TT","getWindowOrAppWindow","_ERROR_MESSAGE","_STRING_FORMAT"],mixins:[qZ],components:{StatusPanel:Ji,ImageActionMenu:YZ,Icon:Zt},props:{name:{type:String,required:!0}},computed:{...(0,g.mapGetters)("images",["getImageStateByName"]),id(){return this.getImageStateByName(A(this.name)).id},repository(){return this.getImageStateByName(A(this.name)).repository},tag(){return this.getImageStateByName(A(this.name)).tag},docker_version(){return this.getImageStateByName(A(this.name)).docker_version},author(){return this.getImageStateByName(A(this.name)).author},volumes(){return this.getImageStateByName(A(this.name)).volumes},ports(){return this.getImageStateByName(A(this.name)).ports},upgradable(){return this.getImageStateByName(A(this.name)).upgradable},entrypoint(){return this.getImageStateByName(A(this.name)).entrypoint},cmd(){return this.getImageStateByName(A(this.name)).cmd},upgrading(){return this.getImageStateByName(A(this.name)).upgrading},deleting(){return this.getImageStateByName(A(this.name)).deleting},...(0,g.mapGetters)("images",["getImageStatus","getImageUpgradePercentage","getImageIsDockerhub","getImageLink","getImageRegistryName","getImageIsRunnable","getImageHumanSize"]),status(){return this.getImageStatus(A(this.name))},upgradePercentage(){return this.getImageUpgradePercentage(A(this.name))},isDockerhub(){return this.getImageIsDockerhub(A(this.name))},link(){return this.getImageLink(A(this.name))},registryName(){return this.getImageRegistryName(A(this.name))},isRunnable(){return this.getImageIsRunnable(A(this.name))},size(){return this.getImageHumanSize(A(this.name))},columns:()=>[{title:!1,field:"key",width:200},{title:!1,field:"value"}],groupInfo(){return{category:"category",sortCategoryFn:(e,t)=>this.CATEGORY_ORDERS.indexOf(e)<this.CATEGORY_ORDERS.indexOf(t)}},rows(){return BY()({[this.CATEGORY_KEYS.GENERAL]:{[v("common","name")]:this.repository,ID:this.id,[w("common","tag")]:this.tag,[w("image","author")]:this.author||"-",[v("common","size")]:this.size||"-",[w("common","registry")]:this.registryName},[this.CATEGORY_KEYS.DOCKERFILE]:{[w("container","entrypoint")]:this.entrypoint.join(" ")||"-",[w("container","command")]:this.cmd.join(" ")||"-",[w("common","volume")]:this.volumes.join(", ")||"-",[w("image","exposed_ports")]:this.ports.map((({port:e,protocol:t})=>`${e}/${t}`)).join(", ")||"-"}},((e,t)=>ti()(e,((e,i)=>({category:t,key:i,value:e})))))},iconColor(){switch(this.status){case si.IN_USED:return"blue";default:return}},iconType(){if(this.deleting)return"loading";switch(this.status){case si.UN_USED:return"bordered";default:return}}},data(){const e={GENERAL:w("common","general"),DOCKERFILE:w("image","dockerfile_details")};return{CATEGORY_KEYS:e,CATEGORY_ORDERS:[e.GENERAL,e.DOCKERFILE]}},async created(){await this.registerImage(A(this.name))},async mounted(){await this.load()},methods:{...(0,g.mapActions)("images",["registerImage","fetchImageDetail"]),async load(){try{await this.fetchImageDetail(A(this.name))}catch(e){const t=this._ERROR_MESSAGE(e);await this.getWindowOrAppWindow().getMsgBox().alert("",t)}},async onImageDeleted(){this.$emit("go-page",{page:ii.IMAGE_LIST})}}},iX=(i(1313),j(tX,eX,[],!1,null,null,null));iX.options.__file="src/pages/Image/Detail/ImageDetail.vue";var nX=iX.exports,oX=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-panel",{attrs:{"syno-id":"network-network-panel-0",tbar:!0,fbar:!1},scopedSlots:e._u([{key:"tbar",fn:function(){return[i("v-button",{attrs:{"syno-id":"network-network-button-0"},on:{click:e.openAddNetworkDlg}},[e._v("\n            "+e._s(e._T("common","add"))+"\n        ")]),e._v(" "),i("v-button",{attrs:{"syno-id":"network-network-button-1",disabled:!e.canManage},on:{click:e.openManageContainerDlg}},[e._v("\n            "+e._s(e._T("network","network_manage"))+"\n        ")]),e._v(" "),i("v-button",{attrs:{"syno-id":"network-network-button-2",disabled:!e.canDelete},on:{click:e.deleteNetwork}},[e._v("\n            "+e._s(e._T("common","delete"))+"\n        ")]),e._v(" "),i("v-button",{attrs:{"syno-id":"network-network-button-3"},on:{click:e.openSettingsDialog}},[e._v("\n            "+e._s(e._T("common","common_settings"))+"\n        ")])]},proxy:!0},{key:"tbar-right",fn:function(){return[i("v-search-input",{attrs:{"syno-id":"network-filter",placeholder:e._TT("registry","search"),clearable:!0},on:{input:e.onInput},model:{value:e.filter,callback:function(t){e.filter=t},expression:"filter"}})]},proxy:!0},{key:"body",fn:function(){return[i("v-data-table",{ref:"table",staticClass:"h100p docker-network-table",attrs:{"syno-id":"network-network-data-table-0","show-paging-bar":!1,"multiple-selected":!0,columns:e.columns,"current-data":e.rows,"cell-tooltip-default-props":{overflowOnly:!0},expandable:{type:"advance"}},on:{"selected-change":e.onSelectionChange,dataloaded:function(t){e.selectedData=[]}},scopedSlots:e._u([{key:"containers",fn:function(t){var n=t.data;return[n.length>0?[i("v-whitetip",{scopedSlots:e._u([{key:"custom",fn:function(){return[i("span",[e._v(e._s(n.length))])]},proxy:!0}],null,!0)},[e._v(" "),i("div",{staticClass:"docker-package container-tip-wrapper"},e._l(n,(function(t){return i("div",{key:t,staticClass:"container-tip",on:{click:function(i){return e.$emit("go-page",{page:e.PAGE_KEYS.CONTAINER_DETAIL,name:t})}}},[i("Dot",{attrs:{color:e.getColorByContainerName(t)}}),e._v(" "),i("span",{staticClass:"container-tip-name"},[e._v(e._s(t))])],1)})),0)])]:[i("span",[e._v(e._s(n.length))])]]}},{key:"advance-expand-default",fn:function(t){var n=t.item;return[i("v-advance-panel-form",{attrs:{fields:e.getExpandableFields(n)},scopedSlots:e._u([{key:"subnet-label",fn:function(){return[e._v(e._s(""+e._T("firewall","firewall_source_network")+e._T("common","colon")))]},proxy:!0},{key:"subnet-value",fn:function(){return[e._v(e._s(n.subnet))]},proxy:!0},{key:"iprange-label",fn:function(){return[e._v(e._s(""+e._TT("network","iprange")+e._T("common","colon")))]},proxy:!0},{key:"iprange-value",fn:function(){return[e._v(e._s(n.iprange))]},proxy:!0},{key:"gateway-label",fn:function(){return[e._v(e._s(""+e._T("network","route_gateway")+e._T("common","colon")))]},proxy:!0},{key:"gateway-value",fn:function(){return[e._v(e._s(n.gateway))]},proxy:!0},{key:"ipv6-enable-label",fn:function(){return[e._v(e._s("IPv6"+e._T("common","colon")))]},proxy:!0},{key:"ipv6-enable-value",fn:function(){return[e._v(e._s(n.enable_ipv6?e._T("common","enable"):e._T("common","disabled")))]},proxy:!0},{key:"ipv6-subnet-label",fn:function(){return[e._v(e._s("IPv6 "+e._T("firewall","firewall_source_network")+e._T("common","colon")))]},proxy:!0},{key:"ipv6-subnet-value",fn:function(){return[e._v(e._s(n.ipv6_subnet))]},proxy:!0},{key:"ipv6-iprange-label",fn:function(){return[e._v(e._s("IPv6 "+e._TT("network","iprange")+e._T("common","colon")))]},proxy:!0},{key:"ipv6-iprange-value",fn:function(){return[e._v(e._s(n.ipv6_iprange))]},proxy:!0},{key:"ipv6-gateway-label",fn:function(){return[e._v(e._s("IPv6 "+e._T("network","route_gateway")+e._T("common","colon")))]},proxy:!0},{key:"ipv6-gateway-value",fn:function(){return[e._v(e._s(n.ipv6_gateway))]},proxy:!0},{key:"masquerade-label",fn:function(){return[e._v(e._s(""+e._TT("network","ip_masquerade")+e._T("common","colon")))]},proxy:!0},{key:"masquerade-value",fn:function(){return[e._v(e._s(n.disable_masquerade?e._T("common","close"):e._T("common","enable")))]},proxy:!0},{key:"containers-label",fn:function(){return[e._v(e._s(""+e._TT("common","container")+e._T("common","colon")))]},proxy:!0},{key:"containers-value",fn:function(){return[i("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{content:n.containers.join(", "),overflowOnly:!0},expression:"{\n                                content: item.containers.join(', '),\n                                overflowOnly: true\n                            }"}],style:{textOverflow:"ellipsis",overflow:"hidden"}},[e._v("\n                            "+e._s(n.containers.join(", "))+"\n                        ")])]},proxy:!0}],null,!0)})]}}])})]},proxy:!0}])})};oX._withStripped=!0;var rX={inject:["_T","_TT"],mixins:[_i,GG,tY],components:{Dot:se},computed:{...(0,g.mapGetters)("networks",["networkRows"]),...(0,g.mapGetters)("containers",["containerRows"]),selectedRows(){return this.selectedData},singleSelectedRow(){return this.selectedRows[0]},singleSelectedNetworkName(){return this.singleSelectedRow?this.singleSelectedRow.name:void 0},hasSelection(){return this.selectedRows.length>0},selectedNetworkNames(){return this.selectedRows.map((e=>`<b>${e.name}</b>`)).join(", ")},canDelete(){return!!this.hasSelection&&this.selectedRows.every((e=>0===e.containers.length&&"host"!==e.driver&&!("bridge"===e.driver&&"bridge"===e.name)))},canManage(){return!!this.hasSelection&&1===this.selectedRows.length&&"host"!==this.singleSelectedRow.driver}},async mounted(){await this.$nextTick(),await this.loadNetwork()},beforeDestroy(){this.unregPollNetworkList()},data:()=>({selectedData:[],rows:[],filter:"",columns:[{title:w("network","name"),field:"name",hideMenuItem:!0,tooltip:!0},{title:w("network","driver"),field:"driver",hideMenuItem:!0},{title:w("network","connected_containers"),field:"containers",hideMenuItem:!0}]}),watch:{networkRows(){this.filterRows()}},methods:{...(0,g.mapActions)("networks",["regPollNetworkList","unregPollNetworkList","reloadNetworkList"]),getContainerConfigByName(e){return{status:this.$store.getters[`containers/byName/${e}/status`],exporting:this.$store.getters[`containers/byName/${e}/exporting`]}},getColorByContainerName(e=""){const t=this.getContainerConfigByName(e);return this.getContainerStatusType(t)},getExpandableFields(e){const t=[];return e.subnet&&t.push({name:"subnet"}),e.iprange&&t.push({name:"iprange"}),e.gateway&&t.push({name:"gateway"}),t.push({name:"ipv6-enable"}),e.enable_ipv6&&(e.ipv6_subnet&&t.push({name:"ipv6-subnet"}),e.ipv6_iprange&&t.push({name:"ipv6-iprange"}),e.ipv6_gateway&&t.push({name:"ipv6-gateway"})),t.push({name:"masquerade"}),t.push({name:"containers"}),t},async loadNetwork(){const e=this.$refs.table;e.setLoading(!0),await this.regPollNetworkList(),e.setLoading(!1)},async reloadNetwork(){const e=this.$refs.table;e.setLoading(!0),await this.reloadNetworkList(),e.setLoading(!1)},onSelectionChange(e){this.selectedData=e.rows},openAddNetworkDlg(){const{component:e}=this.getAppWindow().openModalWindow(SYNO.SDS.Docker.Network.NetworkAddDialog);e.$on("networkadded",(async({name:e=""})=>{await this.reloadNetwork(),this.getAppWindow().getToastBox(SYNO.SDS.formatString(w("network","created_toast"),e))}))},openManageContainerDlg(){const{component:e}=this.getAppWindow().openModalWindow(SYNO.SDS.Docker.Network.ManageContainerDialog,{existingContainers:this.singleSelectedRow.containers,networkName:this.singleSelectedRow.name});e.$on("networkchanged",(async({name:e=""})=>{await this.reloadNetwork(),this.getAppWindow().getToastBox(SYNO.SDS.formatString(w("network","updated_toast"),e))}))},openSettingsDialog(){const e=this.networkRows.find((({name:e})=>"bridge"===e));if(!e)return;const t=`${e.gateway}/${e.subnet.split("/")[1]}`,i=this.networkRows.filter((({name:e})=>"bridge"!==e)).map((({subnet:e})=>e)).filter((e=>!!e));this.getAppWindow().openModalWindow(SYNO.SDS.Docker.Network.SettingsDialog,{defaultSubnet:t,dockerSubnets:i})},filterRows(){if(this.filter){const e=this.filter.toUpperCase();this.rows=this.networkRows.filter((t=>t.name.toUpperCase().includes(e)||t.driver.toUpperCase().includes(e)))}else this.rows=Object.freeze(this.networkRows)},onInput(){this.filterRows()},async deleteNetwork(){if(!this.hasSelection)return;let e="";if(e=1===this.selectedRows.length?SYNO.SDS.formatString(w("network","delete_a_network_confirm"),this.singleSelectedRow.name):SYNO.SDS.formatString(w("network","delete_network_confirm"),this.selectedNetworkNames),"confirm"===await this.getAppWindow().getMsgBox().confirmDelete("",e,null,{useHtml:!0})){this.$refs.table.setLoading(!0);const e=this.selectedRows;try{await synowebapi.promises.request({api:"SYNO.Docker.Network",method:"remove",version:1,params:{networks:e}})}catch({code:e,errors:t}){if(t.failed.length>0){const e=t.failed.map((e=>e.network||"")).join(", ");this.getAppWindow().getMsgBox().alert("",SYNO.SDS.formatString(this._TT("error","network_remove_failed"),e)),this.reloadNetwork()}return void this.$refs.table.setLoading(!1)}await this.reloadNetwork(),this.getAppWindow().getToastBox(1===e.length?SYNO.SDS.formatString(w("network","a_network_deleted_toast"),e[0].name):SYNO.SDS.formatString(w("network","networks_deleted_toast"),e.length))}}}},sX=(i(2670),j(rX,oX,[],!1,null,null,null));sX.options.__file="src/pages/Network/Network.vue";var aX=sX.exports,lX=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-panel",{attrs:{"syno-id":"log-panel",tbar:"",fbar:!1},scopedSlots:e._u([{key:"tbar",fn:function(){return[i("v-button",{attrs:{"syno-id":"log-clear-btn"},on:{click:e.clearLog}},[e._v("\n            "+e._s(e._TT("log","btn_clear"))+"\n        ")]),e._v(" "),i("v-button",{attrs:{"syno-id":"log-export-btn",type:"split"},on:{click:function(t){return e.exportLog("html")}},scopedSlots:e._u([{key:"dropdown",fn:function(){return[i("v-menu",{attrs:{"syno-id":"log-export-menu-0"}},[i("v-menu-item",{attrs:{"syno-id":"log-export-menu-item-0",title:e._T("log","html_type")},on:{click:function(t){return e.exportLog("html")}}}),e._v(" "),i("v-menu-item",{attrs:{"syno-id":"log-export-menu-item-1",title:e._T("log","csv_type")},on:{click:function(t){return e.exportLog("csv")}}})],1)]},proxy:!0}])},[e._v("\n            "+e._s(e._TT("log","btn_export"))+"\n            ")])]},proxy:!0},{key:"tbar-right",fn:function(){return[i("v-single-select",{attrs:{"syno-id":"filter-log-level-select",options:e.levelOpts},on:{input:e.onLevelChange},model:{value:e.level,callback:function(t){e.level=t},expression:"level"}}),e._v(" "),i("v-search-input",{attrs:{"syno-id":"filter-log-input",placeholder:e._TT("registry","search"),clearable:!0},on:{input:e.debouncedFilterInput},model:{value:e.filter,callback:function(t){e.filter=t},expression:"filter"}})]},proxy:!0},{key:"body",fn:function(){return[i("v-data-table",{ref:"table",staticClass:"h100p",attrs:{"syno-id":"log-data-table-0",columns:e.columns,pageSize:e.logPageSize,pageNum:e.logPageNum,total:e.logTotal,"cell-tooltip-default-props":{overflowOnly:!0},"current-data":e.logs,pagination:""},on:{refresh:e.onRefresh,"switch-page":e.onSwitchPage},scopedSlots:e._u([{key:"level",fn:function(t){var n=t.data;return["err"===n?[i("span",{staticClass:"red-status"},[e._v("Error")])]:"warn"===n?[i("span",{staticClass:"orange-status"},[e._v("Warning")])]:[e._v(" Information ")]]}},{key:"event",fn:function(t){var n=t.data;return[i("span",{style:{userSelect:"all"}},[e._v(e._s(n))])]}}])})]},proxy:!0}])})};lX._withStripped=!0;var cX=j({mixins:[tY,GG],data(){const e=[{value:"all",label:v("log","log_all")},{value:"information",label:v("log","info_level")},{value:"warning",label:v("log","warn_level")},{value:"error",label:v("log","error_level")}];return{filter:"",columns:[{defaultWidth:50,field:"time",title:v("log","log_time"),tooltip:!0},{defaultWidth:30,field:"level",title:v("log","logattr")},{defaultWidth:20,field:"user",title:v("log","log_account"),tooltip:!0},{defaultWidth:120,field:"event",title:v("log","log_action"),tooltip:!0}],levelOpts:e,level:e[0].value}},computed:{...(0,g.mapState)("log",["logs","logTotal","logPageNum","logPageSize"])},created(){this.debouncedFilterInput=rZ()(this.onFilterInput,300)},async mounted(){await this.$nextTick(),await this.triggerLoadLog(this.clearSearchParamsAndLoadLog.bind(this))},methods:{...(0,g.mapActions)("log",["updateLogLevel","updateKeyword","updateSortInfo","updatePageNum","clearSearchParamsAndLoadLog","loadLog"]),async onRefresh(){await this.triggerLoadLog(this.loadLog.bind(this))},async clearLog(){if("confirm"===await this.getAppWindow().getMsgBox().confirmDelete("",v("log","log_cfrm_clear"))){this.setTableLoading(!0);try{await synowebapi.promises.request({api:"SYNO.Docker.Log",version:1,method:"clear"})}catch(e){this.setTableLoading(!1),this.getAppWindow().getMsgBox().alert("",this.getErrorMessage(e))}this.setTableLoading(!1),this.triggerLoadLog(this.loadLog.bind(this))}},async exportLog(e){if("html"!==e&&"csv"!==e)throw new Error("no such format");try{await synowebapi.promises.download({version:1,api:"SYNO.Docker.Log",method:"export",params:{format:e,loglevel:"all"===this.level?"":this.level,filter_content:this.filter,datefrom:0,dateto:0}})}catch(e){this.getAppWindow().getMsgBox().alert("",this.getErrorMessage(e))}},async triggerLoadLog(e){const t=this.getAppWindow();this.setTableLoading(!0);try{await e()}catch(e){this.setTableLoading(!1),t.getMsgBox().alert(v("error","error_error"),this.getErrorMessage(e))}this.setTableLoading(!1)},async onFilterInput(){await this.triggerLoadLog(this.updateKeyword.bind(this,this.filter))},setTableLoading(e){this.$refs.table.setLoading(e)},async onLevelChange(e){await this.triggerLoadLog(this.updateLogLevel.bind(this,e))},async onSwitchPage(e){await this.triggerLoadLog(this.updatePageNum.bind(this,e.pageNumber))}}},lX,[],!1,null,null,null);cX.options.__file="src/pages/Log/Log.vue";var dX=cX.exports;const hX={[ii.OVERVIEW]:ki,[ii.PROJECT_LIST]:qi,[ii.PROJECT_DETAIL]:vY,[ii.CONTAINER_LIST]:EY,[ii.CONTAINER_DETAIL]:fZ,[ii.REGISTRY]:VZ,[ii.IMAGE_LIST]:QZ,[ii.IMAGE_DETAIL]:nX,[ii.NETWORK]:aX,[ii.LOG]:dX};var uX={inject:["PAGE_KEYS","getWindowOrAppWindow"],computed:{...(0,g.mapState)(["notificationMap"]),activePage(){const[{page:e}={}]=this.history;return e||ii.OVERVIEW},activePageOption(){return this.MODULE_OPTION_KEYS.includes(this.activePage)?this.activePage:this.activePage.includes("project")?ii.PROJECT_LIST:this.activePage.includes("container")?ii.CONTAINER_LIST:this.activePage.includes("image")?ii.IMAGE_LIST:ii.OVERVIEW},activePageComponent(){return hX[this.activePage]||hX[ii.OVERVIEW]},activePageParams(){const[{page:e,...t}={}]=this.history;return t},pageClasses(){return{"docker-page-layout":!0,"docker-page-layout--overview":this.activePage===ii.OVERVIEW}},helpParams(){switch(this.activePage){case ii.OVERVIEW:return"docker_overview.html";case ii.PROJECT_LIST:case ii.PROJECT_DETAIL:return"docker_project.html";case ii.CONTAINER_LIST:case ii.CONTAINER_DETAIL:return"docker_container.html";case ii.IMAGE_LIST:case ii.IMAGE_DETAIL:return"docker_image.html";case ii.REGISTRY:return"docker_registry.html";case ii.NETWORK:return"docker_network.html";case ii.LOG:return"docker_log.html";default:return}}},data(){const e=[{value:ii.OVERVIEW,display:w("common","overview")},{value:ii.PROJECT_LIST,display:w("common","project"),icon:Kt.MODULE_LIST_PROJECT},{value:ii.CONTAINER_LIST,display:w("common","container"),icon:Kt.MODULE_LIST_CONTAINER},{value:ii.IMAGE_LIST,display:w("common","image"),icon:Kt.MODULE_LIST_IMAGE},{value:ii.REGISTRY,display:w("common","registry"),icon:Kt.MODULE_LIST_REGISTRY},{value:ii.NETWORK,display:w("common","network"),icon:Kt.MODULE_LIST_NETWORK},{value:ii.LOG,display:w("container_detail","log"),icon:Kt.MODULE_LIST_LOG}],t=e.map((({value:e})=>e));return{MODULES:e,MODULE_OPTION_KEYS:t,history:[]}},created(){this.clearState()},async mounted(){await this.$nextTick(),Promise.all([this.fetchProjectList(),this.fetchPortals(),this.fetchNetworkList(),this.fetchImageList(),this.fetchSystem(),this.fetchMigrateStatus(),this.getRegistry(),this.pollingImageDownloadTasks()]).catch((async e=>{const t=this._ERROR_MESSAGE(e);await this.getWindowOrAppWindow().getMsgBox().alert("",t)})),this.unregisters=await Promise.all([this.listenWebStationPortalAdd(),this.pollingContainerList(),this.pollingContainerStatList()]).catch((async e=>{const t=this._ERROR_MESSAGE(e);return await this.getWindowOrAppWindow().getMsgBox().alert("",t),[]}))},beforeDestroy(){var e;this.clearState(),null===(e=this.unregisters)||void 0===e||e.forEach((e=>e&&e()))},methods:{...(0,g.mapActions)(["fetchMigrateStatus","clearState"]),...(0,g.mapActions)("projects",["fetchProjectList"]),...(0,g.mapActions)("containers",["pollingContainerList","pollingContainerStatList"]),...(0,g.mapActions)("portals",{listenWebStationPortalAdd:"listenWebStationPortalAdd",fetchPortals:"fetch"}),...(0,g.mapActions)("images",["fetchImageList","pollingImageDownloadTasks"]),...(0,g.mapActions)("networks",["fetchNetworkList"]),...(0,g.mapActions)("system",{fetchSystem:"fetch"}),...(0,g.mapActions)("registries",["getRegistry"]),handleParams(e,t={}){this.goPage(t)},goPage({page:e,...t}={}){ni.includes(e)&&this.history.unshift({page:e,...t})},setPage({page:e,...t}={}){ni.includes(e)&&this.history.splice(0,1,{page:e,...t})},backPage(){this.history.shift()},async onModuleClick(e){await this.confirmLostChange()&&(this.history=[{page:e}])},async confirmLostChange(){if(!d()(this,"$refs.page.isDirty")||!d()(this,"$refs.page.confirm"))return!0;const{isDirty:e,confirm:t}=this.$refs.page;if(!u()(e)||!u()(t))return!0;if(!e())return!0;const i=await this.getWindowOrAppWindow().getMsgBox().confirmLostChange();return"save"===i?await t():"dont_save"===i},async onResize(...e){if(await this.$nextTick(),!d()(this,"$refs.page.onResize"))return;const{onResize:t}=this.$refs.page;t(...e)},async close(){return await this.confirmLostChange()}}},gX=(i(6365),j(uX,l,[],!1,null,null,null));gX.options.__file="src/App.vue";var pX=gX.exports,mX=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-modal-window",{ref:"window",staticClass:"docker-capabilities-modal-window",attrs:{width:"550",height:"580","syno-id":"capabilities-capabilities-modal-window-0",title:e._TT("container","capabilities_title")}},[i("v-panel",{attrs:{"syno-id":"capabilities-capabilities-panel-0","fluid-footer":"",loading:e.loading,confirm:e.confirm,cancel:e.cancel,"confirm-text":e._T("common","ok")},scopedSlots:e._u([{key:"body",fn:function(){return[i("v-form",{ref:"form",attrs:{"syno-id":"capabilities-capabilities-form-0"}},[i("v-form-item",{attrs:{"syno-id":"capabilities-capabilities-v-form-item-0",textonly:"","hide-label":""}},[i("span",{domProps:{innerHTML:e._s(e._STRING_FORMAT(e._TT("container","capabilities_desc"),e.capabilityDescriptionLink))}})]),e._v(" "),i("v-data-table",{attrs:{"syno-id":"capabilities-capabilities-data-table-0","hide-refresh-btn":"",columns:e.columns,"current-data":e.capabilities}})],1)]},proxy:!0}])})],1)};mX._withStripped=!0;var fX={inject:["_STRING_FORMAT"],props:{defaultCapAdd:{default:[],required:!0,validator:e=>e instanceof Array||null===e},defaultCapDrop:{default:[],required:!0,validator:e=>e instanceof Array||null===e}},async mounted(){await this.$nextTick(),this.windowRef=this.$refs.window},computed:{CapAdd(){return this.capabilities.filter((({name:e})=>pi.includes(e))).filter((({selected:e})=>e)).map((({name:e})=>e))},CapDrop(){return this.capabilities.filter((({name:e})=>gi.includes(e))).filter((({selected:e})=>!e)).map((({name:e})=>e))},capabilityDescriptionLink:()=>"https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities",columns(){return[{title:this._TT("container","capability_enable"),field:"selected",action:"enable",align:"center",width:140},{title:this._TT("container","capability_name"),field:"name"}]}},data(){return{loading:!1,capabilities:[...pi.map((e=>({selected:(this.defaultCapAdd||[]).includes(e),name:e}))),...gi.map((e=>({selected:!(this.defaultCapDrop||[]).includes(e),name:e})))].sort((({name:e},{name:t})=>e<t?-1:1))}},methods:{async confirm(){return await this.windowRef.close({forceClose:!0,payload:{CapAdd:this.CapAdd,CapDrop:this.CapDrop}}),!0},cancel(){this.windowRef.close()}}},_X=(i(4895),j(fX,mX,[],!1,null,null,null));_X.options.__file="src/components/Capabilities/Capabilities.vue";var vX=_X.exports;async function bX(e=[],t=!1){return await synowebapi.promises.request({api:"SYNO.Docker.Migrate",method:"import",version:1,params:{containers:e,cleanup:t}})}const{WEBAPI_ERR_CONTAINER_UNKNOWN_CAPABILITY:wX}=Xt;var yX=j({extends:vX,props:{containerId:{type:String,required:!0}},methods:{async confirm(){if(!this.$refs.form.isDirty())return await this.windowRef.close({forceClose:!0}),!0;this.loading=!0;try{return await async function(e="",t={}){return await synowebapi.promises.request({api:"SYNO.Docker.Container",method:"set",version:1,params:{name:e,edit_name:e,profile:t}})}(this.containerId,{privileged:!1,CapAdd:this.CapAdd,CapDrop:this.CapDrop}),await this.windowRef.close({forceClose:!0,payload:{success:!0,CapAdd:this.CapAdd,CapDrop:this.CapDrop}}),!0}catch(e){if(!e)return await this.windowRef.getMsgBox().alert("",_T("common","error_system")),await this.windowRef.close({forceClose:!0}),!1;const{code:t,errors:i}=e;if(t!==wX)return await this.windowRef.getMsgBox().alert("",_T("common","error_system")),await this.windowRef.close({forceClose:!0}),!1;await this.windowRef.getMsgBox().alert("",this.getErrorMessage({code:t,errors:i}))}return this.loading=!1,!1}}},void 0,void 0,!1,null,null,null);yX.options.__file="src/components/Capabilities/EditCapabilities.vue";var CX=yX.exports,SX=function(){var e=this,t=e.$createElement,i=e._self._c||t;return e.containers.length>0?i("div",{staticClass:"docker-migrater-panel-wrapper"},[e.progress.migrating?i("div",{staticClass:"docker-migrater-panel"},[i("div",{staticClass:"docker-migrater-icon loading"}),e._v(" "),i("div",{staticClass:"docker-migrater-information"},[i("div",{staticClass:"header"},[e._v("\n                "+e._s(e._STRING_FORMAT(e._TT("migrater","migrating"),e.migratingPercent))+"\n            ")]),e._v(" "),i("div",[e.progress.total>0?i("span",[e._v(e._s(e.progress.current)+" / "+e._s(e.progress.total))]):e._e(),e._v(" "),"pulling-image"===e.progress.state?i("span",{staticClass:"description"},[e._v(e._s(e._STRING_FORMAT(e._TT("migrater","pulling_image"),e.migratingContainerImage)))]):e._e(),e._v(" "),"creating-container"===e.progress.state?i("span",{staticClass:"description"},[e._v(e._s(e._STRING_FORMAT(e._TT("migrater","creating_container"),e.migratingContainerName)))]):e._e(),e._v(" "),"cleanup"===e.progress.state?i("span",{staticClass:"description"},[e._v(e._s(e._TT("migrater","cleanup")))]):e._e()])])]):i("div",{staticClass:"docker-migrater-panel"},[i("div",{staticClass:"docker-migrater-icon"}),e._v(" "),i("div",{staticClass:"docker-migrater-information"},[i("div",{staticClass:"header"},[e._v("\n                "+e._s(e._TT("migrater","attention_required"))+"\n            ")]),e._v(" "),i("div",{staticClass:"description",domProps:{innerHTML:e._s(e._STRING_FORMAT(e._TT("migrater","attention_required_desc"),e.containers.length||0))}})]),e._v(" "),i("div",{staticClass:"docker-migrater-manage"},[i("v-button",{attrs:{"syno-id":"migrater-migrater-panel-button-0"},on:{click:e.openMigraterWindow}},[e._v("\n                "+e._s(e._TT("migrater","manage_btn"))+"\n            ")])],1)])]):e._e()};SX._withStripped=!0;const{WEBAPI_ERR_MIGRATE_IMPORT:kX}=Xt;async function xX(e){return await new Promise((t=>setTimeout(t,e)))}var LX={inject:["_STRING_FORMAT"],async mounted(){this.fetchData()},computed:{migratingContainerName(){if(!this.progress.migrating)return"";const e=this.progress.container;return e.Name.startsWith("/")?e.Name.substr(1):e.Name},migratingContainerImage(){return this.progress.migrating?this.progress.container.Config.Image:""},migratingPercent(){return this.progress.migrating?this.progress.finished?100:0===this.progress.total?99:Math.round(100*(this.progress.current-.5)/this.progress.total):0}},data:()=>({progress:{finished:!0,migrating:!1,current:-1,total:-1,state:"",container:{}},containers:[],errors:{}}),methods:{async pollingData({task_id:e=""}){if(!e)return!1;this.progress.migrating=!0;try{for(;!this._isDestroyed;){const{finished:t,containers:i=[],current:n,state:o,total:r}=await synowebapi.promises.request({api:"SYNO.Docker.Migrate",method:"import_status",version:1,params:{task_id:e}});if(this.progress.current=n,this.progress.state=o,this.progress.total=r,this.progress.container=i[n-1],this.progress.finished=t,this.progress.finished){this.showMigratedToast(r,0);break}await xX(500)}}catch({code:e,errors:t}){e===kX&&this.showMigratedToast(t.total-t.count,t.count)}return await this.fetchData(),this.progress.migrating=!1,!0},showMigratedToast(e=0,t=0){let i="";i=0===t?SYNO.SDS.formatString(this._TT("migrater","success_toast"),e):0===e?SYNO.SDS.formatString(this._TT("migrater","failure_toast"),t):SYNO.SDS.formatString(this._TT("migrater","partial_success_toast"),e,t),this._$extPanel.findAppWindow().getToastBox(i,!1,null,{delay:3e3})},async fetchData(){const{containers:e=[],errors:t={},task_id:i=""}=await synowebapi.promises.request({api:"SYNO.Docker.Migrate",method:"status",version:1});this.containers=e||[],this.errors=t||{},i&&this.pollingData({task_id:i})},openMigraterWindow(){this._$extPanel.findAppWindow().openVueWindow("SYNO.SDS.Docker.Modals.Migrater",{containers:this.containers,errors:this.errors}).window.$on("close",(({payload:{confirm:e,task_id:t}})=>{e&&this.pollingData({task_id:t})}))}}},EX=(i(6899),j(LX,SX,[],!1,null,null,null));EX.options.__file="src/components/Migrater/MigraterPanel.vue";var NX=EX.exports,IX=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-modal-window",{ref:"window",staticClass:"docker-migrater-modal-window",attrs:{width:"780",height:"580","syno-id":"migrater-migrater-window-modal-window-0",title:e._TT("migrater","manage_window_title")}},[i("v-panel",{attrs:{"syno-id":"migrater-migrater-modal-panel-0"},scopedSlots:e._u([{key:"body",fn:function(){return[i("v-form",{ref:"form",attrs:{"syno-id":"migrater-migrater-modal-form-0"}},[i("v-form-item",{attrs:{"syno-id":"migrater-migrater-modal-form-item-0",textonly:"","hide-label":""}},[i("span",{domProps:{innerHTML:e._s(e._TT("migrater","manage_desc"))}})]),e._v(" "),i("v-form-multiple-item",{attrs:{"hide-label":""}},[i("v-button",{attrs:{"syno-id":"migrater-migrater-modal-button-0",disabled:!e.shouldMigrateBtnEnabled},on:{click:e.confirm}},[e._v("\n                        "+e._s(e._TT("migrater","manage_confirm_btn"))+"\n                    ")]),e._v(" "),i("v-button",{attrs:{"syno-id":"migrater-migrater-modal-button-1"},on:{click:e.deleteAll}},[e._v("\n                        "+e._s(e._TT("common","delete_all"))+"\n                    ")])],1),e._v(" "),i("v-data-table",{attrs:{"syno-id":"migrater-migrater-modal-data-table-0","hide-refresh-btn":"","multiple-selected":"","selection-mode":"checkbox","selection-mode-column":e.checkboxColumn,columns:e.columns,"enable-hd-menu":!1,"current-data":e.currentData,"default-selected":e.defaultSelected},on:{"selected-change":function(t){var i=t.rows;return e.selectedContainerIds=i.map((function(e){return e.ID}))}},scopedSlots:e._u([{key:"Name",fn:function(t){var n=t.row;return[i("div",{staticClass:"docker-migrater-name-cell"},[i("span",{staticClass:"docker-migrater-name-cell-text"},[e._v(e._s(n.Name))]),e._v(" "),e.errors[n.ID]?i("span",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.errors[n.ID].error.message,expression:"errors[row.ID].error.message"}],staticClass:"docker-migrater-warning-tip"}):e._e(),e._v(" "),n.is_package?i("span",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e._TT("migrater","incompatible_package_tip"),expression:"_TT('migrater', 'incompatible_package_tip')"}],staticClass:"docker-migrater-warning-tip"}):e._e()])]}}])})],1)]},proxy:!0},{key:"fbar",fn:function(){return[i("div",{staticClass:"default pull-right"},[i("v-button",{attrs:{"syno-id":"docker-migrater-fbar-cancel",type:"footbar",suffix:"cancel"},on:{click:e.cancel}},[e._v("\n                    "+e._s(e._T("common","close"))+"\n                ")])],1)]},proxy:!0}])})],1)};IX._withStripped=!0;var TX={props:{containers:{type:Array,required:!0,default:[]},errors:{type:Object,required:!0,default:{}}},async mounted(){await this.$nextTick(),this.windowRef=this.$refs.window},computed:{checkboxColumn:()=>({width:58}),columns(){return[{title:this._TT("migrater","manage_container_name"),field:"Name",width:268},{title:this._TT("migrater","manage_image_name"),field:"ConfigImage",width:230},{title:this._TT("migrater","manage_created_time"),field:"Created"}]},currentData(){return this.containers.map((e=>({ID:e.ID,Name:e.Name.startsWith("/")?e.Name.substr(1):e.Name,ConfigImage:e.Config.Image,Created:SYNO.SDS.DateTimeFormatter(new Date(e.Created)),is_package:e.is_package,_rowInfo:{unselectable:e.is_package}})))},defaultSelected(){return this.containers.map(((e,t)=>t))},shouldMigrateBtnEnabled(){return this.selectedContainerIds.length>0}},data:()=>({selectedContainerIds:[]}),methods:{async confirmDialog(){const e=this.windowRef.openModalWindow(SYNO.SDS.Docker.MessageBox.Migrater,{containers:this.containers,selectedContainerIds:this.selectedContainerIds}).window;return e.alert("","",{confirm:{text:this._TT("common","continue")}}),await new Promise((t=>e.$on("close",(({payload:e})=>t(e)))))},async confirm(){const{confirm:e,task_id:t}=await this.confirmDialog();return!!e&&(await this.windowRef.close({forceClose:!0,payload:{confirm:!0,containerIds:this.selectedContainerIds,task_id:t}}),!0)},async deleteAll(){if("confirm"!==await this.windowRef.getMsgBox().confirmDelete("",this._TT("migrater","delete_all_confirm_alert_text"),{confirm:{text:this._TT("container","delete")}}))return!1;const{task_id:e}=await bX([],!0);await this.windowRef.close({forceClose:!0,payload:{confirm:!0,containerIds:[],task_id:e}})},cancel(){this.windowRef.close()}}},DX=(i(2718),j(TX,IX,[],!1,null,null,null));DX.options.__file="src/components/Migrater/MigraterModal.vue";var AX=DX.exports,OX=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-message-box-window",{ref:"window",staticClass:"docker-migrater-message-box",attrs:{"syno-id":"migrater-migrater-message-box-message-box-window-0",height:254,"do-confirm":e.confirm,"do-cancel":e.cancel},scopedSlots:e._u([{key:"content",fn:function(){return[i("span",{domProps:{innerHTML:e._s(e._TT("migrater","manage_alert_text"))}}),e._v(" "),0!==e.unselectedContainerCount?i("v-checkbox",{staticClass:"docker-migrater-message-box-checkbox",attrs:{"syno-id":"migrater-migrater-message-box-checkbox-0"},model:{value:e.hasToDeleteUnselected,callback:function(t){e.hasToDeleteUnselected=t},expression:"hasToDeleteUnselected"}},[e._v("\n            "+e._s(e._TT("migrater","delete_unselected_containers"))+"\n        ")]):e._e()]},proxy:!0}])})};OX._withStripped=!0;var MX={props:{containers:{type:Array,required:!0,default:[]},selectedContainerIds:{type:Array,required:!0,default:[]}},async mounted(){await this.$nextTick(),this.windowRef=this.$refs.window},computed:{unselectedContainerCount(){return this.containers.length-this.selectedContainerIds.length}},data:()=>({hasToDeleteUnselected:!1}),methods:{async confirm(){if(this.hasToDeleteUnselected&&"confirm"!==await this.windowRef.getMsgBox().confirm("",SYNO.SDS.formatString(this._TT("migrater","manage_alert_confirm_text"),this.unselectedContainerCount),{confirm:{text:this._TT("common","proceed")}},{useHtml:!0}))return!1;const{task_id:e}=await bX(this.selectedContainerIds,this.hasToDeleteUnselected);return await this.windowRef.close({forceClose:!0,payload:{confirm:!0,task_id:e}}),!0},async cancel(){this.windowRef.close()}}},RX=(i(9008),j(MX,OX,[],!1,null,null,null));RX.options.__file="src/components/Migrater/MigraterMessageBox.vue";var PX=RX.exports,FX=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-modal-window",{ref:"window",staticClass:"docker-package docker-registry-modal",attrs:{"syno-id":"registry-registry-modal-modal-window-0",title:e._TT("image","download_image"),width:650,height:550}},[i("RegistryPanel",{attrs:{fbar:"","hide-download-btn":"","selection-mode":"radio"}})],1)};FX._withStripped=!0;var BX=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-panel",{staticClass:"docker-registry-panel h100p",attrs:{"syno-id":"create-wizard-step-general-settings-panel-0",tbar:!0,fbar:e.fbar,loading:e.state.loading,"loading-text":e.loadingText,confirm:e.confirm,"confirm-btn-disabled":!e.selectedImage,"confirm-text":e._T("backup","download"),cancel:e.cancel},scopedSlots:e._u([{key:"tbar",fn:function(){return[e.hideImport?e._e():i("v-button",{attrs:{"syno-id":"registry-registry-panel-button-0",type:"dropdown"},scopedSlots:e._u([{key:"dropdown",fn:function(){return[i("v-menu",{attrs:{"syno-id":"registry-registry-panel-menu-0"}},[i("v-menu-item",{attrs:{"syno-id":"registry-registry-panel-menu-item-0",title:e._TT("image","add_from_url")},on:{click:function(t){return e.handleOpenImportFromUrl()}}}),e._v(" "),i("v-menu-submenu",{attrs:{"syno-id":"registry-registry-panel-menu-submenu-0",title:e._TT("image","add_from_file")}},[i("v-menu-item",{attrs:{"syno-id":"registry-registry-panel-menu-item-1",title:e._TT("image","add_from_dm")},on:{click:function(t){return e.handleImportFromDSM()}}}),e._v(" "),i("v-menu-item",{attrs:{"syno-id":"registry-registry-panel-menu-item-2",title:e._TT("image","add_from_local")},on:{click:function(t){return e.handleImportFromLocalFile()}}})],1)],1)]},proxy:!0}],null,!1,2842590159)},[e._v("\n            "+e._s(e._TT("container","import"))+"\n            ")]),e._v(" "),e.hideDownloadBtn?e._e():i("v-button",{attrs:{disabled:!e.selectedImage,"syno-id":"registry-registry-panel-button-1"},on:{click:function(t){return e.confirm()}}},[e._v("\n            "+e._s(e._T("backup","download"))+"\n        ")]),e._v(" "),i("v-button",{attrs:{"syno-id":"registry-registry-panel-button-2"},on:{click:function(t){return e.openRegistrySettingsDialog()}}},[e._v("\n            "+e._s(e._T("common","common_settings"))+"\n        ")])]},proxy:!0},{key:"tbar-right",fn:function(){return[i("v-search-input",{attrs:{"syno-id":"registry-registry-form-search-input-0",placeholder:e._TT("registry","search"),clearable:!0},on:{input:e.debouncedSearchInput},model:{value:e.form.filter,callback:function(t){e.$set(e.form,"filter",t)},expression:"form.filter"}})]},proxy:!0},{key:"body",fn:function(){return[i("v-data-table",{staticClass:"h100p border-box padding-bottom-6px",attrs:{"syno-id":"registry-registry-form-data-table-0","auto-row-height":"","hide-header":"",pagination:"","page-num":Math.floor(e.params.offset/e.params.limit)+1,"page-size":e.params.limit,"selection-mode-column":e.radioColumn,columns:e.columns,"enable-hd-menu":!1,"current-data":e.form.images,total:e.form.total},on:{"selected-change":function(t){var i=t.rows;return e.selectedImage=i[0]},"switch-page":function(t){var i=t.pageNumber,n=t.pageSize;return e.load({offset:(i-1)*n})},refresh:function(t){return e.load()}},scopedSlots:e._u([{key:"value",fn:function(t){var n=t.row,o=n.title,r=n.description,s=n.is_official,a=n.stars,l=n.link;return[i("div",{staticClass:"registry-row"},[i("div",{staticClass:"registry-row-item"},[i("div",{staticClass:"registry-row-item-title"},[i("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{overflowOnly:!0,content:o},expression:"{\n                                    overflowOnly: true,\n                                    content: title\n                                }"}],staticClass:"registry-row-item-text"},[e._v("\n                                "+e._s(o)+"\n                            ")]),e._v(" "),s?i("div",{staticClass:"registry-row-item-official"}):e._e(),e._v(" "),i("div",{staticClass:"registry-row-item-star"},[e._v("\n                                "+e._s(a)+"\n                            ")])]),e._v(" "),i("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{overflowOnly:!0,content:r},expression:"{\n                                overflowOnly: true,\n                                content: description\n                            }"}],staticClass:"registry-row-item-desc"},[e._v("\n                            "+e._s(r)+"\n                        ")])]),e._v(" "),l?i("a",{staticClass:"registry-row-link",attrs:{href:l,target:"blank"}}):e._e()])]}}])})]},proxy:!0}])})};BX._withStripped=!0;var WX={inject:["_T","_TT","_ERROR_MESSAGE","getWindowOrAppWindow"],mixins:[{computed:{loadingText(){return this.state.polling&&this.progressCurrentText?`${w("image","downloading_text")}... ${this.progressCurrentText}`:v("common","loading")},progressCurrentText(){return k(1024*this.state.progress.current*1024)||void 0}},data:()=>({state:{loading:!1,polling:!1,progress:{current:0}}}),methods:{async startPollingPullImageUsingDialog(e,{maskLoading:t=!1}={}){const i=await new Promise((t=>{e.chooseHandler=(e,i)=>t({query:e,tag:i}),e.onTagChoose=(e,i)=>t({query:e,tag:i}),e.on("close",(()=>t("close")))}));if("close"===i)return;let n=()=>{};t&&(SYNO.SDS.Docker.Utils.Helper.maskLoading(e),n=this.$watch("loadingText",(t=>{e.getEl().mask(t,"x-mask-loading")})));const o=await this.startPollingPullImage(e,i);return n(),e.close(),o},async startPollingPullImage(e,{query:t,tag:i}){if(!t||!i)return;const{username:n="",password:o=""}=e&&!e.isDestroyed&&e.formPanel&&e.formPanel.getForm&&e.formPanel.getForm().getValues()||{},r={tag:i,repository:t.repo,registry:t.url||"",username:n,password:o},s=await synowebapi.promises.request({api:"SYNO.Docker.Image",version:1,method:"pull_start",params:r});return await this.pollingPullImage(s)},async pollingPullImage({task_id:e}){this.state.polling=!0;const t=await new Promise((t=>{const i=SYNO.API.Request.Polling.Register({webapi:{api:"SYNO.Docker.Image",method:"pull_status",version:1,params:{task_id:e}},status_callback:(e,n)=>{if(!e)return void SYNO.API.Request.Polling.Unregister(i);const{finished:o,downloaded:r=0,repository:s,tag:a}=n||{};o&&(SYNO.API.Request.Polling.Unregister(i),t(`${s}:${a}`)),this.state.progress.current=r||0},interval:5,immediate:!0})}));return this.state.polling=!1,t}}},qZ],props:{hideImport:{type:Boolean,default:!1},hideDownloadBtn:{type:Boolean,default:!1},fbar:{type:Boolean,default:!1},selectionMode:{type:String}},computed:{...(0,g.mapState)("registries",["currentRegistry"]),...(0,g.mapGetters)("registries",["currentRegistryUrl"]),radioColumn:()=>({}),columns:()=>[{title:"",field:"value"}]},created(){this.debouncedSearchInput=rZ()(this.search,300)},watch:{currentRegistry:{immediate:!0,handler(){let e=this.form.filter;""===e&&MZ(this.currentRegistry,this.currentRegistryUrl)&&(e="official"),this.params.q=e}}},data:()=>({state:{loading:!1},selectedImage:void 0,form:{filter:"",images:[],total:0},params:{offset:0,limit:50,q:"official"}}),async mounted(){this.load(),await this.$nextTick()},methods:{...(0,g.mapActions)("images",["fetchImageList"]),async load({offset:e=0,limit:t=50,q:i=this.params.q}={}){this.state.loading=!0,this.params.offset=e,this.params.limit=t,this.params.q=i;try{const{data:e,total:t}=await synowebapi.promises.request({api:"SYNO.Docker.Registry",version:1,method:"search",params:this.params});this.form={...this.form,images:e.map((e=>({title:e.name,description:e.description,is_official:e.is_official,stars:e.star_count,link:this.generateLink(e)}))),total:t}}catch(e){const t=this._ERROR_MESSAGE(e);await this.getWindowOrAppWindow().getMsgBox().alert("",t)}this.state.loading=!1},generateLink:({registry:e,name:t})=>DZ(e)?OZ(t):"",async search(){let e=this.form.filter;""===e&&AZ(this.currentRegistry)&&(e="official"),await this.load({q:e})},openRegistryTagModalWindow(){if(!this.selectedImage)return;const e=this.getWindowOrAppWindow(),t=new SYNO.SDS.Docker.Registry.TagDialog({owner:e,query:{repo:this.selectedImage.title},chooseHandler:()=>{}});return e.openExtWindow(t).window},async handleImportFromDSM(){(await this.importFromDSM()).on("close",(({success:e})=>{e&&this.getWindowOrAppWindow().close({forceClose:!0})}))},async handleOpenImportFromUrl(){const{window:e}=this.openImportFromUrlDialog();e.$on("close",(({payload:{success:e,image:t=""}}={})=>{e&&this.getWindowOrAppWindow().close({forceClose:!0,payload:{success:!0,image:t}})}))},async handleImportFromLocalFile(){try{await this.importFromLocalFile(),this.getWindowOrAppWindow().close()}catch(e){return}},async confirm(){this.state.loading=!0;const e=this.openRegistryTagModalWindow(),t=await this.startPollingPullImageUsingDialog(e);return this.state.loading=!1,await this.fetchImageList(),this.getWindowOrAppWindow().close({forceClose:!0,payload:{success:!0,image:t}}),!0},cancel(){this.getWindowOrAppWindow().close()},openRegistrySettingsDialog(){const{component:e}=this.getWindowOrAppWindow().openModalWindow(SYNO.SDS.Docker.Registry.SettingDialog);e.$on("registry-change",(async()=>{this.form.filter="",await this.search()}))}}},VX=(i(7369),j(WX,BX,[],!1,null,null,null));VX.options.__file="src/pages/Registry/RegistryPanel.vue";var zX=j({components:{RegistryPanel:VX.exports}},FX,[],!1,null,null,null);zX.options.__file="src/dialogs/Registry/RegistryDialog.vue";var jX=zX.exports,HX=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-wizard-window",{ref:"window",staticClass:"docker-package",style:e.styles,attrs:{"syno-id":"create-wizard-create-wizard-wizard-window-0",title:e.title,width:740,height:580}},[i("v-wizard",e._b({class:e.wizardClasses,attrs:{"custom-buttons-group":e.buttons,"syno-id":"create-wizard-create-wizard-wizard-0","active-step-key":e.activeStep},on:{"current-step":function(t){return e.activeStep=t.stepKey}}},"v-wizard",e.panel,!1),e._l(e.STEPS,(function(t){return i(t.component,e._b({key:t.stepKey,ref:t.stepKey,refInFor:!0,tag:"component",attrs:{"syno-id":"create-wizard-create-wizard-wizard-step-"+t.stepKey,profile:e.profile,internal:e.internal},on:{"reload-images":function(t){return e.reloadImages()},"update:profile":function(t){return e.profile=Object.assign({},e.profile,t)},loading:function(t){return t?e.getWindow().setStatusBusy():e.getWindow().clearStatusBusy()},"display-error":function(t){return e.displayError(t)}}},"component",t,!1))})),1)],1)};HX._withStripped=!0;var UX=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-wizard-step",{staticClass:"docker-container-create-wizard-step-general-settings",attrs:{"syno-id":e.synoId,"step-key":e.stepKey,headline:e.headline,"next-step-key":e.nextStepKey,"pre-enter-next-step":e.preEnterNextStep}},[i("v-form",{ref:"form",attrs:{"syno-id":"create-step-general-settings-form-0",rules:e.rules,flex:"row"}},[i("v-form-item",{staticClass:"docker-container-create-wizard-form-item",attrs:{label:e._TT("common","image"),prop:e.FIELD_IMAGE,"control-flex":"auto","label-flex":"200px"}},[i("v-single-select",{ref:"select",attrs:{"syno-id":"create-step-general-settings-single-select-0",width:"auto",options:e.options,value:e.profile.image},on:{input:function(t){return e.$emit("update:profile",{image:t})}},scopedSlots:e._u([e.isChinaRegion?null:{key:"bottom-actions",fn:function(){return[i("v-select-divider-option"),e._v(" "),i("v-select-action-option",{attrs:{display:e._TT("container","add_image")},on:{click:function(t){return e.openRegistryDialog()}}})]},proxy:!0}],null,!0)})],1),e._v(" "),i("ContainerNameFormItem",{staticClass:"docker-container-create-wizard-form-item",attrs:{profile:e.profile,internal:e.internal},on:{"update:profile":function(t){return e.$emit("update:profile",t)}}}),e._v(" "),i("CreateGeneralFormItem",{attrs:{system:e.system,profile:e.profile,internal:e.internal},on:{"update:profile":function(t){return e.$emit("update:profile",t)}}}),e._v(" "),i("CreateServicePortalFormItem",{attrs:{profile:e.profile,internal:e.internal},on:{"update:profile":function(t){return e.$emit("update:profile",t)}}})],1)],1)};UX._withStripped=!0;var $X={props:{synoId:{type:String,required:!0},headline:{type:String,required:!0},stepKey:{type:String,required:!0},nextStepKey:{type:String,required:!0},profile:{type:Object,required:!0},internal:{type:Object,required:!0}}},KX=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-form-item",{ref:"formItem",staticClass:"docker-container-form-item-name",attrs:{label:e._TT("container","container_name"),prop:e.FIELD_NAME,"label-flex":"200px"},scopedSlots:e._u([e.required?{key:"label-after",fn:function(){return[i("span",{staticClass:"red-text"},[e._v("*")])]},proxy:!0}:null],null,!0)},[i("v-input",{attrs:{"syno-id":"container-name-form-item-container-name-form-item-input-0",value:e.profile.name},on:{input:function(t){return e.$emit("update:profile",{name:t})}}})],1)};KX._withStripped=!0;const qX=/^([0-9]{0,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$/;function GX(e=[],t=""){return{message:t,validator:(t,i)=>!e.includes(i)}}const YX={type:"string",required:!0,pattern:/^(\/[^/ ]*)+\/?$/,range:{min:1,max:1024},message:_JSLIBSTR("extlang","invalidText")},ZX="fields.name",XX="fields.image",JX="fields.host_port",QX="fields.container_port",eJ="fields.mount_point",tJ="fields.env_key",iJ="fields.env_value",nJ="fields.link_container",oJ="fields.link_alias";var rJ={props:{profile:{type:Object,required:!0},internal:{type:Object,required:!0}},data(){return{rules:{[ZX]:this.getContainerNameRules(),[XX]:this.getImageRules(),[JX]:this.getHostPortRowRules(),[QX]:this.getContainerPortRowRules(),[eJ]:this.getMountPointRowRules(),[tJ]:this.getEnvKeyRules(),[iJ]:this.getEnvValueRules(),[nJ]:this.getLinkContainerRules(),[oJ]:this.getLinkAliasRowRules()}}},methods:{getContainerNameRules(){return[{type:"string",required:!0,pattern:/^[a-zA-Z0-9][a-zA-Z0-9_.-]+$/,message:w("common","alphanumeric")},{message:w("common","alphanumeric"),validator:(e,t)=>2<=t.length&&t.length<=64},GX(this.internal.containers.filter((e=>e!==this.name)),w("error","container_name_conflict"))]},getImageRules:()=>[{type:"string",required:!0}],getEnvKeyRules(){return[{type:"string",required:!0},{validator:(e,t)=>1===this.profile.env_variables.map((({key:e})=>e)).filter((e=>e===t)).length,message:w("container","already_existed")}]},getEnvValueRules:()=>[{type:"string",required:!0}],getLinkContainerRules:()=>[{type:"string",required:!0}],getLinkAliasRowRules(){return[{type:"string",required:!0},{validator:(e,t)=>this.profile.links.map((({alias:e})=>e)).filter((e=>e===t)).length<2,message:w("container","already_existed")}]},getHostPortRowRules(){return[{pattern:qX,message:_JSLIBSTR("vtype","bad_port")},{validator:(e,t)=>this.profile.port_bindings.map((({host_port:e})=>e)).filter((e=>0!=+e)).filter((e=>+e==+t)).length<2,message:w("container","already_existed")}]},getContainerPortRowRules(){return[{required:!0,pattern:qX,message:_JSLIBSTR("vtype","bad_port")},{validator:(e,t)=>1===[...this.profile.port_bindings.map((({container_port:e})=>e)),...this.profile.service_portals.map((({port:e})=>e))].filter((e=>+e==+t)).length,message:w("container","already_existed")}]},getMountPointRowRules(){return[YX,{validator:(e,t)=>1===this.profile.volume_bindings.map((({mount_point:e})=>e)).filter((e=>e===t)).length,message:w("container","already_existed")}]}}},sJ={props:{profile:{type:Object,required:!0},internal:{type:Object,required:!0}}},aJ=j({inject:["_TT"],mixins:[sJ],watch:{"internal.image":{immediate:!0,handler(){this.profile.image&&this.shouldGenerateName&&this.$emit("update:profile",{name:this.generateNameFromImage(this.profile.image)})}}},computed:{shouldGenerateName:()=>!0,required:()=>!0},data:()=>({FIELD_NAME:ZX}),methods:{generateNameFromImage(e=""){const t=e.substring(0,e.lastIndexOf(":")).replace(/[/.:]/g,"-"),i=new Set(this.internal.containers);let n;for(n=1;n<1e3&&i.has(`${t}-${n}`);n++);return`${t}-${n}`}}},KX,[],!1,null,null,null);aJ.options.__file="src/components/FormItem/Container/ContainerNameFormItem/ContainerNameFormItem.vue";var lJ=aJ.exports,cJ=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("v-form-multiple-item",{attrs:{"hide-label":""}},[i("v-form-item",[i("v-checkbox",{attrs:{"syno-id":"containers-general-settings-form-checkbox-1",disabled:!e.form.enableResourceLimit,value:e.form.isResourceLimitChecked},on:{input:function(t){return e.onResourceLimitChange({isResourceLimitChecked:t})}}},[e._v("\n                "+e._s(e._TT("container","resource_limit"))+"\n            ")])],1),e._v(" "),i("v-form-item",[i("v-whitetip",{attrs:{content:e._TT("container","disable_resource_tip")}})],1)],1),e._v(" "),i("v-form-multiple-item",{attrs:{indent:1,label:e._TT("container","cpu_priority"),"label-flex":"200px"}},e._l(e.CPU_PRIOTIRY_RADIOS,(function(t){return i("v-form-item",{key:t.value,attrs:{value:t.value,"control-flex":"70px"}},[i("v-radio",{attrs:{value:t.value,"syno-id":"general-form-item-general-form-item-radio-"+t.value,disabled:!e.form.isResourceLimitChecked},on:{input:function(t){return e.onResourceLimitChange({cpu_priority:t})}},model:{value:e.form.cpu_priority,callback:function(t){e.$set(e.form,"cpu_priority",t)},expression:"form.cpu_priority"}},[e._v("\n                "+e._s(t.label)+"\n            ")])],1)})),1),e._v(" "),i("v-form-multiple-item",{attrs:{indent:1,label:e._TT("container","memory_limit"),"disable-label":!e.form.isResourceLimitChecked,"label-flex":"200px"}},[i("v-form-item",{attrs:{"control-flex":"180px"}},[i("v-slider",{attrs:{disabled:!e.form.isResourceLimitChecked,min:e.memoryMin,max:e.memoryMax,value:e.form.memory_limit},on:{input:function(t){return e.onResourceLimitChange({memory_limit:t})}}})],1),e._v(" "),i("v-form-item",{attrs:{"control-flex":"70px"}},[i("v-input",{attrs:{"syno-id":"general-general-form-item-input-1",disabled:!e.form.isResourceLimitChecked,value:e.form.memory_limit},on:{input:function(t){return e.onResourceLimitChange({memory_limit:parseInt(t)||0})},blur:function(t){return e.onBlurMemoryLimit()}}})],1),e._v(" "),i("v-form-item",{attrs:{textonly:""}},[e._v(" MB ")])],1),e._v(" "),i("v-form-multiple-item",{attrs:{"hide-label":""}},[i("v-form-item",[i("v-checkbox",{attrs:{"syno-id":"general-general-form-item-checkbox-1",value:e.profile.enable_restart_policy},on:{input:function(t){return e.$emit("update:profile",{enable_restart_policy:t})}}},[e._v("\n                "+e._s(e._TT("wizard","restart_policy"))+"\n            ")])],1),e._v(" "),i("v-form-item",[i("v-whitetip",{attrs:{content:e._TT("wizard","restart_policy_tip")}})],1)],1)],1)};cJ._withStripped=!0;var dJ=i(4691),hJ=i.n(dJ);var uJ={inject:["_T","_TT","getWindowOrAppWindow"],mixins:[sJ],data(){const e={10:w("container","low"),50:w("container","med"),90:w("container","high")};return{CPU_PRIOTIRY_RADIOS:[{value:10,label:e[10]},{value:50,label:e[50]},{value:90,label:e[90]}],memoryMin:6,memoryMax:this.getMemoryLimitMax(),form:this.getFormFromProfile()}},methods:{getMemoryLimitMax(){return _D("mem_default_mb")||this.internal.system.ram_size||4096},getFormFromProfile(){let{cpu_priority:e=0,memory_limit:t=0}=this.profile;const i=!(!e||!t),n=!i;return e=e||50,t=t/1024/1024||this.getMemoryLimitMax()||4096,{enableResourceLimit:n,isResourceLimitChecked:i,cpu_priority:e,memory_limit:t}},onBlurMemoryLimit(){this.form.memory_limit=hJ()(this.form.memory_limit,this.memoryMin,this.memoryMax)},onResourceLimitChange({isResourceLimitChecked:e=this.form.isResourceLimitChecked,cpu_priority:t=this.form.cpu_priority,memory_limit:i=this.form.memory_limit}){this.form.isResourceLimitChecked=e,this.form.cpu_priority=t,this.form.memory_limit=i;const n=hJ()(i,this.memoryMin,this.memoryMax);this.$emit("update:profile",{cpu_priority:e?this.form.cpu_priority:0,memory_limit:e?1024*n*1024:0})}}},gJ=(i(4446),j(uJ,cJ,[],!1,null,null,null));gJ.options.__file="src/components/FormItem/Container/GeneralFormItem/CreateGeneralFormItem.vue";var pJ=gJ.exports,mJ=function(){var e=this,t=e.$createElement,i=e._self._c||t;return e.isServicePortalEnabled?i("div",[i("v-form-multiple-item",{attrs:{indent:e.indent,"hide-label":"","label-flex":"200px"}},[i("v-form-item",{attrs:{"hide-label":""}},[i("v-checkbox",{attrs:{"syno-id":"containers-general-settings-form-checkbox-3",disabled:e.disabled},on:{input:function(t){return e.onEnableServicePortal(t)}},model:{value:e.form.enable_service_portal,callback:function(t){e.$set(e.form,"enable_service_portal",t)},expression:"form.enable_service_portal"}},[e._v("\n                "+e._s(e._TT("common","register_service_portal"))+"\n            ")])],1),e._v(" "),i("v-form-item",[i("v-whitetip",{attrs:{disabled:e.disabled,content:e._TT("container","enbale_service_portal_tip")}})],1)],1),e._v(" "),i("v-incremental-form-multiple-item",{attrs:{"syno-id":"containers-general-settings-form-incremental-form-multiple-item-0",indent:e.indent+1,"min-items-length":e.minServicePortalItemLength,label:e._TT("container","container_port"),"disabled-remove-button":!e.form.enable_service_portal||e.disabled,items:e.form.service_portals,"label-flex":"200px"},on:{"update:items":function(t){return e.$set(e.form,"service_portals",t)}},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.item;return[i("v-form-item",[i("v-single-select",{attrs:{"syno-id":"containers-general-settings-form-single-select-0",width:80,disabled:!e.form.enable_service_portal||e.disabled,options:e.portOptions},model:{value:n.port,callback:function(t){e.$set(n,"port",t)},expression:"item.port"}})],1),e._v(" "),i("v-form-item",[i("v-single-select",{attrs:{"syno-id":"containers-general-settings-form-single-select-1",width:130,disabled:!e.form.enable_service_portal||e.disabled,options:e.PROTOCOL_OPTIONS},model:{value:n.protocol,callback:function(t){e.$set(n,"protocol",t)},expression:"item.protocol"}})],1)]}},{key:"actions",fn:function(){return[i("v-button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{content:e._TT("container","ranout_webservice_port_tip"),disable:!e.shouldShowRanoutWebservicePortTip},expression:"{\n                    content: _TT('container', 'ranout_webservice_port_tip'),\n                    disable: !shouldShowRanoutWebservicePortTip\n                }"}],attrs:{"syno-id":"general-form-item-create-general-form-item-button-0",display:"icon-text",disabled:e.isAddServicePortalPortDisabled||e.disabled},on:{click:e.onAddServicePortalPort},scopedSlots:e._u([{key:"icon",fn:function(){return[i("v-icon",{attrs:{name:"incremental-form-multiple-item-plus","svg-icon-set":"set01"}})]},proxy:!0}],null,!1,2657367715)},[e._v("\n                "+e._s(e._TT("container","add_service_portal_port"))+"\n            ")])]},proxy:!0}],null,!1,1670976826)})],1):e._e()};mJ._withStripped=!0;const fJ="http",_J=[{label:"HTTP",value:fJ},{label:"HTTPS",value:"https"}];var vJ=j({inject:["_TT"],mixins:[ZG],props:{disabled:{type:Boolean,default:!1},profile:{type:Object,required:!0},internal:{type:Object,required:!0},indent:{type:Number,default:0}},computed:{minServicePortalItemLength:()=>1,isAddServicePortalPortDisabled(){return!this.form.enable_service_portal||0===this.avaiableServicePortalPorts.length},imageTcpPorts(){var e;return((null===(e=this.internal.image)||void 0===e?void 0:e.ports)||[]).filter((({protocol:e})=>"tcp"===e)).sort(((e,t)=>e<t?1:-1)).map((({port:e})=>e))},shouldShowRanoutWebservicePortTip(){return!!this.form.enable_service_portal&&0===this.avaiableServicePortalPorts.length},avaiableServicePortalPorts(){return this.imageTcpPorts.filter((e=>!this.registeredServicePortalPorts.includes(e)))},registeredServicePortalPorts(){return this.form.service_portals.map((({port:e})=>e))},portOptions(){return this.imageTcpPorts.map((e=>({label:e,value:e,filter:()=>this.avaiableServicePortalPorts.includes(e)})))},isServicePortalEnabled(){return 0!==this.imageTcpPorts.length}},data(){return{PROTOCOL_OPTIONS:_J,form:this.getFormFromProfile()}},watch:{"profile.image"(){this.onServicePortalChange({enable_service_portal:!1,service_portals:[]})},"internal.image"(){this.form.service_portals=this.getFormServicePortals()},"form.service_portals":{deep:!0,handler(){this.onServicePortalChange()}}},methods:{shouldSetDefaultWebPortal:()=>!0,getFormFromProfile(){return{enable_service_portal:this.profile.enable_service_portal||!1,service_portals:this.getFormServicePortals()}},getFormServicePortals(){const{service_portals:e=[]}=this.profile;if(e.length>0)return e.map((e=>({...e})));if(!this.shouldSetDefaultWebPortal())return[];const t=(this.internal.image.ports||[]).filter((({protocol:e})=>"tcp"===e)).sort(((e,t)=>e<t?1:-1)).map((({port:e})=>e));return 0===t.length?[]:[{port:t[0],protocol:fJ}]},async onAddServicePortalPort(){await this.checkWebStationStatus()&&(this.form.service_portals=[...this.form.service_portals,{port:this.avaiableServicePortalPorts[0]||"0",protocol:fJ}],this.onServicePortalChange())},async onRemoveServicePortalPort(e){await this.checkWebStationStatus()&&(this.form.service_portals.splice(e,1),this.onServicePortalChange())},async onEnableServicePortal(e=this.form.enable_service_portal){if(await this.checkWebStationStatus())return this.onServicePortalChange({enable_service_portal:e})},async onServicePortalChange({enable_service_portal:e=this.form.enable_service_portal,service_portals:t=this.form.service_portals}={}){this.form.service_portals=t,this.$emit("update:profile",{enable_service_portal:e,service_portals:e?t.map((({protocol:e,port:t})=>({protocol:e,port:t}))):[]})}}},mJ,[],!1,null,null,null);vJ.options.__file="src/components/FormItem/Container/ServicePortalFormItem/CreateServicePortalFormItem.vue";var bJ=vJ.exports;var wJ=j({inject:["_TT","getWindowOrAppWindow","isChinaRegion"],mixins:[$X,rJ],components:{ContainerNameFormItem:lJ,CreateGeneralFormItem:pJ,CreateServicePortalFormItem:bJ},computed:{options(){return this.internal.images.map((e=>({label:e,value:e})))}},data:()=>({FIELD_IMAGE:XX}),methods:{async preEnterNextStep(){if(!await this.$refs.form.validate()){const e=v("common","forminvalid");return await this.getWindowOrAppWindow().getMsgBox().alert("",e),!1}return!0},openRegistryDialog(){this.$refs.select.closeDropdown();const{window:e}=this.getWindowOrAppWindow().openModalWindow(SYNO.SDS.Docker.Registry.DownloadDialog);e.$on("close",(({payload:{success:e=!1,image:t=""}}={})=>{e&&this.$emit("reload-images"),t&&this.$emit("update:profile",{image:t.replace(/^docker\.io\//,"")})}))}}},UX,[],!1,null,null,null);wJ.options.__file="src/pages/Container/Create/StepGeneralSettings.vue";var yJ=wJ.exports,CJ=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-wizard-step",{staticClass:"docker-container-create-wizard-step-advanced-settings",attrs:{"syno-id":e.synoId,"step-key":e.stepKey,headline:e.headline,"next-step-key":e.nextStepKey,"pre-enter-next-step":e.preEnterNextStep},on:{activate:e.onActivate}},[i("v-form",{ref:"form",attrs:{"syno-id":"create-step-advanced-settings-form-0",rules:e.rules}},e._l(e.items,(function(t,n){return i(t,{key:e.random+n,tag:"component",attrs:{profile:e.profile,internal:e.internal},on:{"update:profile":function(t){return e.$emit("update:profile",t)}}})})),1)],1)};CJ._withStripped=!0;var SJ=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-fieldset",{attrs:{title:e._TT("container","port_setting")}},[i("v-form-item",{attrs:{"hide-label":"",textonly:""}},[i("span",{domProps:{innerHTML:e._s(e.descText)}})]),e._v(" "),i("v-incremental-form-multiple-item",{attrs:{"syno-id":"port-form-item-create-port-form-item-incremental-form-multiple-item-0","hide-label":"",items:e.form.port_bindings,"disabled-add-button":!e.internal.editable,"disabled-remove-button":!e.internal.editable,"add-text":e._T("common","add")},on:{"update:items":function(t){return e.$set(e.form,"port_bindings",t)},"add-item":function(){return e.onAddPortBinding()}},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.item;return[i("v-form-item",{attrs:{prop:e.FILED_HOST_PORT}},[i("v-input",{attrs:{"syno-id":"port-form-item-create-port-form-item-input-0","number-only":"",disabled:n.isServicePortalPort||!e.internal.editable,placeholder:e._TT("container","local_port")},model:{value:n.host_port,callback:function(t){e.$set(n,"host_port",t)},expression:"item.host_port"}})],1),e._v(" "),i("v-form-item",{attrs:{prop:e.FEILD_CONTAINER_PORT}},[i("v-input",{attrs:{"syno-id":"port-form-item-create-port-form-item-input-1","number-only":"",disabled:n.isServicePortalPort||!e.internal.editable,placeholder:e._TT("container","container_port")},model:{value:n.container_port,callback:function(t){e.$set(n,"container_port",t)},expression:"item.container_port"}})],1),e._v(" "),i("v-form-item",[i("v-single-select",{attrs:{"syno-id":"containers-port-settings-form-single-select-0",disabled:n.isServicePortalPort||!e.internal.editable,width:"196px",options:e.protocolOptions},model:{value:n.type,callback:function(t){e.$set(n,"type",t)},expression:"item.type"}})],1)]}},{key:"remove-field",fn:function(t){var n=t.item;return[i("v-button",{attrs:{"syno-id":"port-form-item-create-port-form-item-button-0",display:"icon",disabled:n.isServicePortalPort||!e.internal.editable},on:{click:function(t){return e.onRemovePortBinding(n)}},scopedSlots:e._u([{key:"icon",fn:function(){return[i("v-icon",{attrs:{name:"incremental-form-multiple-item-minus","svg-icon-set":"set01"}})]},proxy:!0}],null,!0)})]}}])})],1)};SJ._withStripped=!0;var kJ=j({inject:["_T","_TT"],mixins:[sJ],watch:{"form.port_bindings":{immediate:!0,deep:!0,handler(){this.onPortBindingChange()}}},computed:{descText:()=>w("container","create_port_settings_desc"),protocolOptions:()=>[{label:"TCP",value:"tcp"},{label:"UDP",value:"udp"},{label:"TCP / UDP",value:"tcp_udp"},{label:"HTTP",value:"http",hide:!0},{label:"HTTPS",value:"https",hide:!0}],port_bindings(){return this.form.port_bindings.filter((({isServicePortalPort:e})=>!e)).filter((({container_port:e})=>e)).map((({host_port:e,container_port:t,type:i})=>({host_port:""===e?0:parseInt(e),container_port:+t,type:i})))}},data(){return{FILED_HOST_PORT:JX,FEILD_CONTAINER_PORT:QX,form:this.getFormFromProfile()}},methods:{getFormFromProfile(){return{port_bindings:[...this.getRegisterToWebStationRows(),...this.getPortBindingRows(),...this.getDefaultImagePortRows()]}},getRegisterToWebStationRows(){const{service_portals:e=[]}=this.profile;return e.map((({protocol:e,port:t})=>({isServicePortalPort:!0,host_port:this._TT("container","registered_service_portal"),container_port:`${t}`,type:e})))},getPortBindingRows(){const{port_bindings:e=[]}=this.profile;return e.reduce(((e,t)=>{const{host_port:i,container_port:n,type:o}=t,r=e.findIndex((({host_port:e,container_port:t,type:r})=>i===e&&n===t&&o!==r));return r>=0?(e[r].type="tcp_udp",e):[...e,t]}),[]).map((({host_port:e,container_port:t,type:i})=>({isServicePortalPort:!1,host_port:0===e?"":`${e}`,container_port:`${t}`,type:i})))},getDefaultImagePortRows(){if(this.profile.port_bindings&&this.profile.port_bindings.length>0)return[];const{service_portals:e=[]}=this.profile,t=e.map((({port:e})=>e)),{ports:i=[]}=this.internal.image;return i.filter((({port:e})=>!t.includes(e))).reduce(((e,t)=>{const{port:i,protocol:n}=t,o=e.findIndex((({port:e,protocol:t})=>`${e}`==`${i}`&&n!==t));return o>=0?(e[o].protocol="tcp_udp",e):[...e,t]}),[]).map((({port:e,protocol:t})=>({isServicePortalPort:!1,host_port:"",container_port:`${e}`,type:t})))},onAddPortBinding({host_port:e="",container_port:t="",type:i="tcp"}={}){this.form.port_bindings.push({host_port:e,container_port:t,type:i}),this.onPortBindingChange()},onRemovePortBinding(e){const t=this.form.port_bindings.findIndex((t=>t===e));t<0||this.form.port_bindings.splice(t,1)},onPortBindingChange(){this.$emit("update:profile",{port_bindings:this.port_bindings})}}},SJ,[],!1,null,null,null);kJ.options.__file="src/components/FormItem/Container/PortFormItem/CreatePortFormItem.vue";var xJ=kJ.exports,LJ=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-fieldset",{staticClass:"docker-container-volume-form",attrs:{title:e._TT("container","volume_setting_title")}},[i("v-form-item",{attrs:{"hide-label":"",textonly:""}},[e._v("\n        "+e._s(e._TT("container","volume_settings_desc"))+"\n    ")]),e._v(" "),i("v-incremental-form-multiple-item",{attrs:{"syno-id":"volume-form-item-create-volume-form-item-incremental-form-multiple-item-0","hide-label":"","disabled-remove-button":!e.internal.editable,items:e.form.volume_bindings},on:{"update:items":function(t){return e.$set(e.form,"volume_bindings",t)}},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.item;return[i("v-form-item",{attrs:{"hide-label":"",textonly:""}},[i("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{content:n.host_volume_file,overflowOnly:e.getOverflowEl},expression:"{\n                        content: item.host_volume_file,\n                        overflowOnly: getOverflowEl\n                    }"}],staticClass:"docker-container-volume-form-item-host-volume-file"},[n.is_directory?i("Icon",{attrs:{small:"",name:e.ICON_NAME.FOLDER}}):i("Icon",{attrs:{small:"",name:e.ICON_NAME.XXX}}),e._v(" "),i("div",{staticClass:"name"},[e._v(e._s(n.host_volume_file))])],1)]),e._v(" "),i("v-form-item",{attrs:{prop:e.FIELD_MOUNT_POINT}},[i("v-input",{attrs:{"syno-id":"volume-form-item-create-volume-form-item-input-0",disabled:!e.internal.editable},model:{value:n.mount_point,callback:function(t){e.$set(n,"mount_point",t)},expression:"item.mount_point"}})],1),e._v(" "),i("v-form-item",[i("v-single-select",{attrs:{"syno-id":"volume-form-item-create-volume-form-item-single-select-0",width:"196px",disabled:!e.internal.editable,options:e.TYPE_OPTIONS},model:{value:n.type,callback:function(t){e.$set(n,"type",t)},expression:"item.type"}})],1)]}},{key:"actions",fn:function(){return[i("v-toolbar",[i("v-button",{attrs:{"syno-id":"volume-form-item-create-volume-form-item-button-1",disabled:!e.internal.editable,display:"icon-text"},on:{click:function(){return e.onAddFolderVolumeBinding()}},scopedSlots:e._u([{key:"icon",fn:function(){return[i("v-icon",{attrs:{name:"incremental-form-multiple-item-plus","svg-icon-set":"set01"}})]},proxy:!0}])},[e._v("\n                    "+e._s(e._TT("container","add_folder"))+"\n                ")]),e._v(" "),i("v-button",{attrs:{"syno-id":"volume-form-item-create-volume-form-item-button-0",disabled:!e.internal.editable,display:"icon-text"},on:{click:function(){return e.onAddFileVolumeBinding()}},scopedSlots:e._u([{key:"icon",fn:function(){return[i("v-icon",{attrs:{name:"incremental-form-multiple-item-plus","svg-icon-set":"set01"}})]},proxy:!0}])},[e._v("\n                    "+e._s(e._TT("container","add_file"))+"\n                ")])],1)]},proxy:!0}])})],1)};LJ._withStripped=!0;var EJ={inject:["_T","_TT","getWindowOrAppWindow","ICON_NAME"],mixins:[sJ],components:{Icon:Zt},computed:{volume_bindings(){return[...this.form.volume_bindings.map((({host_volume_file:e,mount_point:t,type:i})=>({host_volume_file:e,mount_point:t,type:i}))),...this.profile.volume_bindings.filter((({host_absolute_path:e})=>e))]}},watch:{"form.volume_bindings":{deep:!0,handler(){this.onVolumeBindingChange()}}},data(){return{FIELD_MOUNT_POINT:eJ,TYPE_OPTIONS:[{label:w("container","read_write"),value:"rw"},{label:w("container","read_only"),value:"ro"}],form:this.getFormFromProfile()}},methods:{getOverflowEl:e=>e.querySelector(".name"),getFormFromProfile(){const{volume_bindings:e=[]}=this.profile;return{volume_bindings:e.filter((({host_volume_file:e})=>e)).map((({host_volume_file:e="",mount_point:t="",type:i="rw",is_directory:n=!1})=>({host_volume_file:e,mount_point:t,type:i,is_directory:n})))}},onAddFileVolumeBinding(){this.openFileChooser({usage:{type:"open"}},{is_directory:!1})},onAddFolderVolumeBinding(){this.openFileChooser({usage:{type:"chooseDir"}},{is_directory:!0})},openFileChooser(e={},{is_directory:t=!0}){const i=new SYNO.SDS.Utils.FileChooser.Chooser({owner:this.getWindowOrAppWindow(),title:this._T("common","add"),folderToolbar:!0,gotoPath:"/docker",...e,treeFilter:function(e,t={}){return!["/home","/homes"].includes(t.spath)},listeners:{scope:this,choose:(e,i,n)=>{this.onAddVolumeBinding({is_directory:t,host_volume_file:i.path,mount_point:"",type:"rw"}),e.close()}}});return i.open(),i},onAddVolumeBinding({host_volume_file:e="",mount_point:t="",type:i="rw",is_directory:n}={}){this.form.volume_bindings.push({host_volume_file:e,mount_point:t,type:i,is_directory:n}),this.onVolumeBindingChange()},onVolumeBindingChange(){this.$emit("update:profile",{volume_bindings:this.volume_bindings})}}},NJ=(i(1958),j(EJ,LJ,[],!1,null,null,null));NJ.options.__file="src/components/FormItem/Container/VolumeFormItem/CreateVolumeFormItem.vue";var IJ=NJ.exports,TJ=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-fieldset",{attrs:{title:e._TT("wizard","environment")}},[i("v-form-item",{attrs:{"hide-label":"",textonly:""}},[i("span",{domProps:{innerHTML:e._s(e.descText)}})]),e._v(" "),i("v-incremental-form-multiple-item",{attrs:{"syno-id":"env-form-item-env-form-item-incremental-form-multiple-item-0","hide-label":"",items:e.form.env_variables,"disabled-add-button":!e.internal.editable,"disabled-remove-button":!e.internal.editable,"add-text":e._T("common","add")},on:{"update:items":function(t){return e.$set(e.form,"env_variables",t)},"add-item":function(){return e.onAddEnvVariables()}},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.item;return[i("v-form-item",{attrs:{prop:e.FIELD_ENV_KEY}},[i("v-input",{attrs:{"syno-id":"env-form-item-env-form-item-input-0",disabled:!e.internal.editable,placeholder:e._TT("container","header_variable")},model:{value:n.key,callback:function(t){e.$set(n,"key",t)},expression:"item.key"}})],1),e._v(" "),i("v-form-item",{attrs:{prop:e.FIELD_ENV_VALUE}},[i("v-input",{attrs:{"syno-id":"env-form-item-env-form-item-input-1",disabled:!e.internal.editable,placeholder:e._TT("container","header_value")},model:{value:n.value,callback:function(t){e.$set(n,"value",t)},expression:"item.value"}})],1)]}}])})],1)};TJ._withStripped=!0;var DJ=j({inject:["_T","_TT"],mixins:[sJ],computed:{descText:()=>w("container","env_settings_desc")},watch:{"form.env_variables":{deep:!0,handler(){this.onEnvVariablesChange()}}},data(){return{FIELD_ENV_KEY:tJ,FIELD_ENV_VALUE:iJ,form:this.getFormFromProfile()}},methods:{getFormFromProfile(){return{env_variables:this.profile.env_variables||[]}},onAddEnvVariables({key:e="",value:t=""}={}){this.form.env_variables.push({key:e,value:t})},onEnvVariablesChange(){this.$emit("update:profile",{env_variables:this.form.env_variables})}}},TJ,[],!1,null,null,null);DJ.options.__file="src/components/FormItem/Container/EnvFormItem/CreateEnvFormItem.vue";var AJ=DJ.exports,OJ=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-fieldset",{directives:[{name:"show",rawName:"v-show",value:!e.internal.is_package,expression:"!internal.is_package"}],attrs:{title:e._TT("container","capabilities_title")}},[i("v-form-item",{attrs:{"hide-label":""}},[i("v-radio",{attrs:{"syno-id":"capabilities-form-item-create-capabilities-form-item-radio-0",disabled:!e.internal.editable,value:!0,model:e.profile.privileged},on:{input:e.onChangePrivileged}},[e._v("\n            "+e._s(e._TT("container","use_high_privilege"))+"\n        ")])],1),e._v(" "),i("v-form-multiple-item",{attrs:{"hide-label":""}},[i("v-form-item",[i("v-radio",{attrs:{"syno-id":"capabilities-form-item-create-capabilities-form-item-radio-1",disabled:!e.internal.editable,value:!1,model:e.profile.privileged},on:{input:e.onChangePrivileged}},[e._v("\n                "+e._s(e._TT("container","custom_capabilities"))+"\n            ")])],1),e._v(" "),i("v-form-item",{style:{"margin-top":"4px"}},[i("v-whitetip",{attrs:{size:"small",disabled:!e.internal.editable,"has-margin":!1,content:e._TT("container","custom_capabilities_tip")}})],1)],1),e._v(" "),e.shouldCapShown?[i("v-form-item",{attrs:{"disable-label":!e.internal.editable,indent:1,label:e._TT("wizard","cap_add"),textonly:"","label-flex":"148px"}},[i("span",{class:{"disabled-text":!e.internal.editable}},[e._v("\n                "+e._s(e.form.CapAdd&&e.form.CapAdd.length&&e.form.CapAdd.join(", ")||"-")+"\n            ")])]),e._v(" "),i("v-form-item",{attrs:{"disable-label":!e.internal.editable,indent:1,label:e._TT("wizard","cap_drop"),textonly:"","label-flex":"148px"}},[i("span",{class:{"disabled-text":!e.internal.editable}},[e._v("\n                "+e._s(e.form.CapDrop&&e.form.CapDrop.length&&e.form.CapDrop.join(", ")||"-")+"\n            ")])])]:e._e(),e._v(" "),i("v-form-item",{attrs:{indent:1,"hide-label":""}},[i("v-button",{attrs:{"syno-id":"general-general-form-item-button-0",disabled:e.profile.privileged||!e.internal.editable},on:{click:e.openCapabilitiesWindow}},[e._v("\n            "+e._s(e._TT("container","custom_capabilities"))+"\n        ")])],1)],2)};OJ._withStripped=!0;var MJ=j({inject:["_T","_TT","getWindowOrAppWindow"],mixins:[sJ],data(){return{originalForm:this.getFormFromProfile(),form:this.getFormFromProfile()}},computed:{shouldCapShown:function(){var e,t;return(null===(e=this.form.CapAdd)||void 0===e?void 0:e.length)>0||(null===(t=this.form.CapDrop)||void 0===t?void 0:t.length)>0}},methods:{getFormFromProfile(){const{privileged:e=!1,CapAdd:t=[],CapDrop:i=[]}=this.profile;return{privileged:e,CapAdd:t,CapDrop:i}},isDirty(){return!WG()(this.form.CapAdd,this.originalForm.CapAdd)||!WG()(this.form.CapDrop,this.originalForm.CapDrop)},commit(){this.originalForm.CapAdd=this.form.CapAdd,this.originalForm.CapDrop=this.form.CapDrop},openCapabilitiesWindow(){const{window:e,component:t}=this.getWindowOrAppWindow().openModalWindow(SYNO.SDS.Docker.Modals.Capabilities,{defaultCapAdd:this.form.CapAdd,defaultCapDrop:this.form.CapDrop});return e.$on("close",(({payload:e})=>{const{CapAdd:t,CapDrop:i}=e;t&&i&&this.updatePrivilegeAndCap({CapAdd:t,CapDrop:i})})),{window:e,component:t}},async onChangePrivileged(e){e&&"confirm"!==await this.getWindowOrAppWindow().getMsgBox().confirm("",w("container","privilege_warning"))||this.updatePrivilegeAndCap({privileged:e})},updatePrivilegeAndCap({privileged:e=this.profile.privileged,CapAdd:t=this.form.CapAdd,CapDrop:i=this.form.CapDrop}){this.form.CapAdd=t,this.form.CapDrop=i,this.$emit("update:profile",{privileged:e,CapAdd:e?[]:t,CapDrop:e?[]:i})}}},OJ,[],!1,null,null,null);MJ.options.__file="src/components/FormItem/Container/CapabilitiesFormItem/CreateCapabilitiesFormItem.vue";var RJ=MJ.exports,PJ=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-fieldset",{attrs:{title:e._TT("wizard","links")}},[i("v-form-item",{attrs:{textonly:"","hide-label":""}},[e._v("\n        "+e._s(e._TT("container","link_settings_desc"))+"\n    ")]),e._v(" "),i("v-incremental-form-multiple-item",{attrs:{"syno-id":"link-form-item-create-link-form-item-incremental-form-multiple-item-0","hide-label":"",items:e.form.links,"disabled-add-button":e.isAddLinkDisabled||!e.internal.editable,"disabled-remove-button":!e.internal.editable,"add-text":e._T("common","add")},on:{"update:items":function(t){return e.$set(e.form,"links",t)},"add-item":function(){return e.onAddLink()}},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.item;return[i("v-form-item",{attrs:{prop:e.FIELD_LINK_CONTAINER}},[i("v-single-select",{attrs:{"syno-id":"link-form-item-create-link-form-item-input-0",width:200,disabled:!e.internal.editable,options:e.linkOptions},on:{select:function(t){var i=t.value;return e.onLinkContainerSelectChange(n,i)}},model:{value:n.link_container,callback:function(t){e.$set(n,"link_container",t)},expression:"item.link_container"}})],1),e._v(" "),i("v-form-item",{attrs:{prop:e.FIELD_LINK_ALIAS}},[i("v-input",{attrs:{"syno-id":"link-form-item-create-link-form-item-input-1",disabled:!e.internal.editable},model:{value:n.alias,callback:function(t){e.$set(n,"alias",t)},expression:"item.alias"}})],1)]}}])})],1)};PJ._withStripped=!0;var FJ=i(361),BJ=i.n(FJ),WJ=j({inject:["_T","_TT"],mixins:[sJ],computed:{isAddLinkDisabled(){return this.internal.containers.length===this.form.links.length},linkOptions(){const e=this.form.links.map((({link_container:e})=>e));return this.internal.containers.map((t=>({label:t,value:t,filter:()=>!e.includes(t)})))}},watch:{"form.links":{deep:!0,handler(){this.onLinkChange()}}},data(){return{FIELD_LINK_CONTAINER:nJ,FIELD_LINK_ALIAS:oJ,form:this.getFormFromProfile()}},methods:{getFormFromProfile(){const{links:e=[]}=this.profile;return{links:BJ()(e)}},onAddLink(){const e=this.form.links.map((({link_container:e})=>e)),t=this.internal.containers.find((t=>!e.includes(t)));return this.addLink({link_container:t,alias:t})},addLink({link_container:e=null,alias:t=""}={}){this.form.links.push({link_container:e,alias:t})},onLinkContainerSelectChange(e,t=""){e.link_container=t,e.alias=t},onLinkChange(){this.$emit("update:profile",{links:this.form.links})}}},PJ,[],!1,null,null,null);WJ.options.__file="src/components/FormItem/Container/LinkFormItem/CreateLinkFormItem.vue";var VJ=WJ.exports,zJ=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-fieldset",{attrs:{title:e._TT("common","command")}},[i("v-form-item",{attrs:{textonly:"",label:e._TT("container","entrypoint"),"label-flex":"200px"}},[e._v("\n        "+e._s((e.internal.image&&e.internal.image.entrypoint||[]).join(" ")||"-")+"\n    ")]),e._v(" "),i("v-form-item",{attrs:{label:e._TT("container","command"),"label-flex":"200px","control-flex":"300px"}},[i("v-input",{attrs:{"syno-id":"execution-command-form-item-execution-command-form-item-input-0",placeholder:(e.internal.image.cmd||[]).join(" ")},on:{blur:function(t){e.$emit("update:profile",{cmd_v2:e.form.cmd_v2.trim()})}},model:{value:e.form.cmd_v2,callback:function(t){e.$set(e.form,"cmd_v2",t)},expression:"form.cmd_v2"}})],1)],1)};zJ._withStripped=!0;var jJ=j({inject:["_TT"],mixins:[sJ],data(){return{form:{cmd_v2:this.profile.cmd_v2}}}},zJ,[],!1,null,null,null);jJ.options.__file="src/components/FormItem/Container/ExecutionCommandFormItem/ExecutionCommandFormItem.vue";var HJ=jJ.exports,UJ=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-fieldset",{attrs:{title:e._TT("common","network")}},[i("v-form-item",{attrs:{textonly:"","hide-label":""}},[e._v("\n        "+e._s(e._TT("container","network_settings_desc"))+"\n    ")]),e._v(" "),i("v-form-item",{attrs:{label:e._TT("common","network"),"label-flex":"200px","control-flex":"300px"}},[i("v-single-select",{attrs:{"syno-id":"network-form-item-network-form-item-single-select-0",width:"auto",options:e.options,value:e.form.network},on:{input:function(t){return e.onNetworkChange(t)}}})],1),e._v(" "),e.isRepoitoryShown?[i("v-form-item",{attrs:{label:e._TT("common","repository"),textonly:"","label-flex":"200px"}},[e._v("\n            "+e._s(e._T("firewall","firewall_source_network")+": "+e.subnet)+"\n        ")]),e._v(" "),i("v-form-item",{attrs:{textonly:"","label-flex":"200px"}},[e._v("\n            "+e._s(e._T("network","route_gateway")+": "+e.gateway)+"\n        ")]),e._v(" "),i("v-form-item",{attrs:{textonly:"","label-flex":"200px"}},[e._v("\n            "+e._s(e.isIpv6Enabled?"IPv6: "+e._T("common","enabled"):"IPv6: "+e._T("common","disabled"))+"\n        ")])]:e._e()],2)};UJ._withStripped=!0;var $J=j({inject:["_T","_TT"],mixins:[sJ],computed:{isRepoitoryShown(){return this.form.network&&"host"!==this.form.network.driver},driver(){var e;return(null===(e=this.form.network)||void 0===e?void 0:e.driver)||"-"},subnet(){var e;return(null===(e=this.form.network)||void 0===e?void 0:e.subnet)||"-"},gateway(){var e;return(null===(e=this.form.network)||void 0===e?void 0:e.gateway)||"-"},isIpv6Enabled(){const{ipv6_gateway:e,ipv6_iprange:t,ipv6_subnet:i}=this.form.network;return e||t||i},options(){return this.internal.networks.filter((({driver:e})=>!this.profile.enable_service_portal||["host","bridge"].includes(e))).map((e=>({label:e.name,value:e}))).sort((({value:{name:e}},{value:{name:t}})=>"host"===e||"host"===t?"host"===e?-1:1:"bridge"===e||"bridge"===t?"bridge"===e?-1:1:0))}},data(){const[{name:e}={}]=this.profile.network||[],t=this.internal.networks.find((({name:t})=>t===e)),i=this.internal.networks.find((({name:e})=>"bridge"===e));return{form:{network:t||i}}},methods:{onNetworkChange(e){this.form.network=e;const{driver:t,name:i}=e;this.$emit("update:profile",{use_host_network:"host"===t,network:"host"===t?[]:[{name:i,driver:t}]})}}},UJ,[],!1,null,null,null);$J.options.__file="src/components/FormItem/Container/NetworkFormItem/NetworkFormItem.vue";var KJ=$J.exports,qJ=j({inject:["getWindowOrAppWindow"],mixins:[$X,Qi,rJ],data:()=>({items:[xJ,IJ,AJ,RJ,KJ,HJ,VJ]}),methods:{onActivate(){this.forceRerender()},async preEnterNextStep(){if(!await this.$refs.form.validate()){const e=_T("common","forminvalid");return await this.getWindowOrAppWindow().getMsgBox().alert("",e),!1}return!0}}},CJ,[],!1,null,null,null);qJ.options.__file="src/pages/Container/Create/StepAdvancedSettings.vue";var GJ=qJ.exports,YJ=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-wizard-step",{staticClass:"flex-container",attrs:{"syno-id":e.synoId,"step-key":e.stepKey,headline:e.headline,"next-step-key":e.nextStepKey,finished:e.onFinished},on:{activate:e.onActivate}},[i("v-data-table",{staticClass:"flex-remained-height",attrs:{"syno-id":"create-wizard-step-summary-data-table-0","hide-refresh-btn":"","auto-row-height":"",columns:e.columns,"current-data":e.summary,"show-paging-bar":!1},scopedSlots:e._u([{key:"value",fn:function(t){var n=t.data;return["table"===t.row.display?[i("table",{staticClass:"summary-value-table"},[n.pre_row?i("tr",[i("td",[e._v(e._s(n.pre_row))]),e._v(" "),i("td"),e._v(" "),i("td")]):e._e(),e._v(" "),i("tr",e._l(n.headers,(function(t){return i("th",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{content:t,overflowOnly:!0},expression:"{ content: h, overflowOnly: true }"}],key:t},[e._v("\n                            "+e._s(t)+"\n                        ")])})),0),e._v(" "),e._l(n.rows,(function(t,n){return i("tr",{key:n},e._l(t,(function(t,n){return i("td",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{content:t,overflowOnly:!0},expression:"{ content: c, overflowOnly: true }"}],key:n},[e._v("\n                            "+e._s(t)+"\n                        ")])})),0)}))],2)]:[e._v("\n                "+e._s(n)+"\n            ")]]}}])}),e._v(" "),i("v-checkbox",{staticClass:"run-instantly-checkbox",attrs:{"syno-id":"create-wizard-step-summary-checkbox-0",disabled:e.profile.enable_service_portal},model:{value:e.form.is_run_instantly,callback:function(t){e.$set(e.form,"is_run_instantly",t)},expression:"form.is_run_instantly"}},[e._v("\n        "+e._s(e._TT("wizard","run_immediately"))+"\n    ")])],1)};function ZJ(e={}){return e.port_bindings?{...e,port_bindings:e.port_bindings.reduce(((e,t)=>{const{type:i}=t;return"tcp_udp"===i?[...e,{...t,type:"tcp"},{...t,type:"udp"}]:[...e,t]}),[])}:e}YJ._withStripped=!0;const{WEBAPI_ERR_DOCKER_API_FAIL_LOG:XJ,WEBAPI_ERR_CONTAINER_PORT_CONFLICT:JJ,WEBAPI_ERR_DOCKER_FILE_EXIST:QJ,WEBAPI_ERR_CONTAINER_CIRCULAR_LINK:eQ,WEBAPI_ERR_CONTAINER_UNKNOWN_CAPABILITY:tQ}=Xt;var iQ={inject:["_TT","getWindowOrAppWindow","_ERROR_MESSAGE"],mixins:[$X],props:{nextStepKey:{required:!1}},computed:{columns:()=>[{title:v("status","header_item"),field:"key"},{title:v("status","header_value"),field:"value",width:"70%"}]},watch:{"profile.enable_service_portal"(){this.profile.enable_service_portal&&(this.form.is_run_instantly=!0)}},data:()=>({summary:[],form:{is_run_instantly:!0}}),methods:{load(){this.generateSummaryTable()},generateSummaryTable(){this.summary=[this.generateNameRow(),this.generateRestartPolicyRow(),this.generatePortBindingsRow(),this.generateServicePortalsRow(),this.generateVolumeBindingsRow(),this.generateNetworkRow(),this.generateLinksRow(),this.generateEnvVariablesRow(),this.generateCpuPriorityRow(),this.generateMemoryLimitRow(),this.generateCmdRow(),this.generatePrivilegedRow(),this.generateCapabilitiesRow()].filter((e=>e))},generateNameRow(){return{key:w("container","container_name"),value:this.profile.name}},generatePortBindingsRow(){return!!this.profile.port_bindings&&0!==this.profile.port_bindings.length&&{display:"table",key:w("container","port_setting"),value:{headers:[w("container","local_port"),w("container","container_port"),w("common","type")],rows:this.profile.port_bindings.map((({host_port:e,container_port:t,type:i})=>[0===e?v("common","auto"):e,t,i.toUpperCase()]))}}},generateServicePortalsRow(){return!!this.profile.enable_service_portal&&0!==this.profile.service_portals.length&&{display:"table",key:w("container","registered_service_portal"),value:{pre_row:v("common","enable"),headers:[w("container","container_port"),v("app_port_alias","protocol")],rows:this.profile.service_portals.map((({port:e,protocol:t})=>[e,t.toUpperCase()]))}}},generateVolumeBindingsRow(){return!!this.profile.volume_bindings&&0!==this.profile.volume_bindings.length&&{display:"table",key:w("common","volume"),value:{headers:[w("container","file_folder"),w("container","mount_path"),w("container","read_only")],rows:this.profile.volume_bindings.map((({host_volume_file:e,mount_point:t,type:i})=>[e,t,"ro"===i?"Yes":"No"]))}}},generateNetworkRow(){return this.profile.use_host_network?{key:w("network","network_host"),value:v("common","yes")}:0!==this.profile.network.length&&{key:v("controlpanel","leaf_lan"),value:this.profile.network.map((({name:e})=>e)).sort().join(", ")}},generateLinksRow(){return!!this.profile.links&&0!==this.profile.links.length&&{display:"table",key:w("wizard","links"),value:{headers:[w("container","container_name"),w("common","alias")],rows:this.profile.links.map((({link_container:e,alias:t})=>[e,t]))}}},generateEnvVariablesRow(){return!!this.profile.env_variables&&0!==this.profile.env_variables.length&&{display:"table",key:w("container","env_variables"),value:{headers:[w("container","header_variable"),w("container","header_value")],rows:this.profile.env_variables.map((({key:e,value:t})=>[e,t]))}}},generateCpuPriorityRow(){const e={10:w("container","low"),50:w("container","med"),90:w("container","high")};return{key:w("container","cpu_priority"),value:e[this.profile.cpu_priority]||w("container","auto")}},generateMemoryLimitRow(){return{key:w("container","memory_limit"),value:this.profile.memory_limit>0?k(this.profile.memory_limit):w("container","no_limit")}},generateCmdRow(){return{key:this.profile.cmd_v2?w("container","command"):w("container","command")+`(${v("common","default")})`,value:this.profile.cmd_v2||this.internal.image.cmd.join(" ")}},generateCapabilitiesRow(){const{CapAdd:e=[],CapDrop:t=[]}=this.profile;if(0===e.length&&0===t.length)return!1;const i=Math.max(e.length,t.length),n=[];for(var o=0;o<i;o++)n.push([e[o]||"",t[o]||""]);return{display:"table",key:w("wizard","capabilities"),value:{headers:[w("wizard","cap_add"),w("wizard","cap_drop")],rows:n}}},generatePrivilegedRow(){return!!this.profile.privileged&&{key:w("container","privilege_setting"),value:w("container","use_high_privilege")}},generateRestartPolicyRow(){return!!this.profile.enable_restart_policy&&{key:w("wizard","restart_policy"),value:v("common","yes")}},async onActivate(){this.generateSummaryTable()},async onFinished(){this.$emit("loading",!0);try{const e=await synowebapi.promises.request({api:"SYNO.Docker.Container",method:"create",version:1,params:{is_run_instantly:this.form.is_run_instantly,profile:ZJ(this.profile)}});await this.onSuccess(e)}catch(e){await this.onError(e)}},async onSuccess({services:e=[],start_dependent_container:t,dependent_container:i=[]}={}){t&&i.length>0&&(await this.getWindowOrAppWindow().getMsgBox().alert("",SYNO.SDS.formatString(w("container","started_depend_containers"),i.join(", "))),await this.$nextTick()),this.profile.enable_service_portal&&(await this.getWindowOrAppWindow().getMsgBox().alert("",SYNO.SDS.formatString(w("wizard","go_webstation_alert"),this.profile.name),void 0,{useHtml:!0}),SYNO.SDS.AppLaunch("SYNO.SDS.WebStation.Application",{wizard:"create_service_portal",category:"Docker",services:e})),this.getWindowOrAppWindow().close({payload:{success:!0,name:this.profile.name}})},async onError(e={}){const{code:t}=e,i=this._ERROR_MESSAGE(e);await this.getWindowOrAppWindow().getMsgBox().alert("",i),t!==XJ?this.$emit("loading",!1):this.getWindowOrAppWindow().close()}}},nQ=(i(6444),j(iQ,YJ,[],!1,null,null,null));nQ.options.__file="src/pages/Container/Create/StepSummary.vue";var oQ=nQ.exports;const rQ="advanced-settings",sQ="summary";var aQ=j({mixins:[NG],props:{image:{type:String}},computed:{wizardClasses(){return this.activeStep===sQ?"wizard-step-container-overflow-hidden":""},title(){return this.profile.image?SYNO.SDS.formatString(w("wizard","create_container_imageinfo"),this.profile.image):this._TT("container","create_container")},buttons:()=>({next:{text:e=>e&&e.nextStepKey?_T("common","next"):_T("common","done")}})},watch:{"profile.image":{immediate:!0,async handler(e){await this.fetchImage(e)}}},data(){const e=this.getDefaultProfile(this.image),t=[{stepKey:"general-settings",nextStepKey:rQ,headline:w("helptoc","general_settings"),component:yJ},{stepKey:rQ,nextStepKey:sQ,headline:w("wizard","advance_setting"),component:GJ},{stepKey:sQ,headline:w("wizard","summary"),component:oQ}];return{STEPS:t,profile:e,internal:{system:this.$store.state.system.system,containers:this.$store.state.containers.allNames,images:this.$store.getters["images/allAvaliableNames"],networks:this.$store.getters["networks/rows"],image:{},editable:!0},activeStep:t[0].stepKey}},methods:{getDefaultProfile(e,t={}){const{cpu_priority:i=0,memory_limit:n=0}=this.profile||{};return{name:"",image:e,cpu_priority:i,memory_limit:n,privileged:!1,port_bindings:[],volume_bindings:[],env_variables:t.env||[],network:[{name:"bridge",driver:"bridge"}],use_host_network:!1,cmd_v2:""}},...(0,g.mapActions)("images",["fetchImageDetail","fetchImageList"]),async reloadImages(){this.getWindow().setStatusBusy(),await this.fetchImageList(),this.getWindow().clearStatusBusy(),this.internal.images=this.$store.getters["images/allAvaliableNames"]},async fetchImage(e){if(!e)return;await this.$nextTick(),this.getWindow().setStatusBusy();const t=await this.fetchImageDetail(e);this.internal.image=t,this.profile=this.getDefaultProfile(e,t),this.getWindow().clearStatusBusy()}}},HX,[],!1,null,null,null);aQ.options.__file="src/pages/Container/Create/ContainerCreateWizard.vue";var lQ=aQ.exports,cQ=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-modal-window",{ref:"window",staticClass:"docker-package docker-console-window",attrs:{"syno-id":"project-edit-project-dialog-modal-window-0",title:e.title||e._title,height:"500",width:"800"}},[i("v-panel",{attrs:{"syno-id":"terminals-project-action-dialog-panel-0"},scopedSlots:e._u([{key:"body",fn:function(){return[i("Console",{attrs:{value:e.value}})]},proxy:!0},{key:"fbar",fn:function(){return[i("div",{staticClass:"default pull-right"},[i("v-button",{attrs:{"syno-id":"docker-migrater-fbar-cancel",type:"footbar",suffix:"cancel"},on:{click:e.cancel}},[e._v("\n                    "+e._s(e._T("common","close"))+"\n                ")])],1)]},proxy:!0}])})],1)};cQ._withStripped=!0;var dQ=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-scrollbar",{ref:"scrollbar",staticClass:"docker-console-scrollbar-wrapper"},[i("pre",{staticClass:"docker-console"},[e._v(e._s(e.value))])])};dQ._withStripped=!0;var hQ={props:{value:{type:String}},watch:{value:{immediate:!0,handler(){this.scrollToBottomWhenReachEnd()}}},methods:{scrollToBottomWhenReachEnd(){var e;null!==(e=this.$refs.scrollbar)&&void 0!==e&&e.isReachBottom()&&this.scrollToBottom()},async scrollToBottom(){await this.$nextTick();const e=_()(this,"$refs.scrollbar.$refs.view");e&&(e.scrollTop=e.scrollHeight)}}},uQ=(i(5252),j(hQ,dQ,[],!1,null,null,null));uQ.options.__file="src/components/Console/Console.vue";var gQ={inject:["_ERROR_MESSAGE","getWindowOrAppWindow","findAppWindow"],components:{Console:uQ.exports},props:{title:{type:String,required:!0,default:""},projectId:{type:String,required:!0},projectName:{type:String,required:!0},method:{type:String,required:!0}},computed:{method(){throw new Error("it should be override by inheritee component")},webapiRequestParams(){return{version:1,api:"SYNO.Docker.Project",method:this.method,params:{id:this.projectId},onDownloadProgress:this.onDownloadProgress,responseFormat:"text"}}},data:()=>({value:""}),async mounted(){await this.$nextTick(),this.exec()},methods:{...(0,g.mapActions)("containers",["fetchContainerList"]),...(0,g.mapActions)("images",["fetchImageList"]),...(0,g.mapActions)("projects",["fetchProjectDetail","setProjectLoading","clearProjectLoading"]),async exec(){if(!this.method)throw new Error("project method should be defined");const e=this.findAppWindow();this.setProjectLoading(this.projectId);const t=await synowebapi.promises.request(this.webapiRequestParams);try{const{error:e}=JSON.parse(t);if(e){const t=this._ERROR_MESSAGE(e);return await this.getWindowOrAppWindow().getMsgBox().alert("",t),void this.getWindowOrAppWindow().close()}}catch(e){}this.clearProjectLoading(this.projectId),await Promise.all([this.fetchProjectDetail({id:this.projectId}),this.fetchContainerList(),this.fetchImageList()]),e.getToastBox(SYNO.SDS.formatString(w("project",this.toastKey),this.projectName))},onDownloadProgress(e){this.value=e.currentTarget.response},cancel(){this.$refs.window.close()}}},pQ=(i(8916),j(gQ,cQ,[],!1,null,null,null));pQ.options.__file="src/dialogs/Projects/Terminals/ProjectBaseActionDialog.vue";var mQ=pQ.exports,fQ=j({extends:mQ,computed:{method:()=>"build_stream",toastKey:()=>"builded_toast",_title(){return SYNO.SDS.formatString(w("project","terminal_build"),this.projectName)}}},void 0,void 0,!1,null,null,null);fQ.options.__file="src/dialogs/Projects/Terminals/ProjectBuildDialog.vue";var _Q=fQ.exports,vQ=j({extends:mQ,computed:{method:()=>"start_stream",toastKey:()=>"started_toast",_title(){return SYNO.SDS.formatString(w("project","terminal_start"),this.projectName)}}},void 0,void 0,!1,null,null,null);vQ.options.__file="src/dialogs/Projects/Terminals/ProjectStartDialog.vue";var bQ=vQ.exports,wQ=j({extends:mQ,computed:{method:()=>"stop_stream",toastKey:()=>"stopped_toast",_title(){return SYNO.SDS.formatString(w("project","terminal_stop"),this.projectName)}}},void 0,void 0,!1,null,null,null);wQ.options.__file="src/dialogs/Projects/Terminals/ProjectStopDialog.vue";var yQ=wQ.exports,CQ=j({extends:mQ,computed:{method:()=>"restart_stream",toastKey:()=>"restarted_toast",_title(){return SYNO.SDS.formatString(w("project","terminal_restart"),this.projectName)}}},void 0,void 0,!1,null,null,null);CQ.options.__file="src/dialogs/Projects/Terminals/ProjectRestartDialog.vue";var SQ=CQ.exports,kQ=j({extends:mQ,computed:{method:()=>"clean_stream",toastKey:()=>"cleaned_toast",_title(){return SYNO.SDS.formatString(w("project","terminal_clean"),this.projectName)}}},void 0,void 0,!1,null,null,null);kQ.options.__file="src/dialogs/Projects/Terminals/ProjectCleanDialog.vue";var xQ=kQ.exports,LQ=j({extends:mQ,computed:{method(){},_title(){return SYNO.SDS.formatString(w("project","terminal_log"),this.projectName)}},beforeDestroy(){SYNO.API.Request.Polling.Unregister(this.pollingId)},methods:{exec(){this.$refs.window.setStatusBusy(),this.pollingId=SYNO.API.Request.Polling.Register({webapi:{api:"SYNO.Docker.Project",method:"log",version:1,params:{id:this.projectId}},status_callback:(e,t)=>{e&&(this.$refs.window.clearStatus(),this.value=t)},interval:5,immediate:!0})}}},void 0,void 0,!1,null,null,null);LQ.options.__file="src/dialogs/Projects/Terminals/ProjectActionLogDialog.vue";var EQ=LQ.exports,NQ=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-wizard-window",{ref:"window",staticClass:"docker-package create-project-dialog",style:e.styles,attrs:{"syno-id":"create-wizard-create-wizard-wizard-window-0",title:e._TT("project","create_project"),width:740,height:580}},[i("v-wizard",{class:e.wizardClasses,attrs:{"custom-buttons-group":e.buttons,"syno-id":"create-wizard-create-wizard-wizard-0","active-step-key":e.activeStep,"show-status-bar":e.wizard.showStatusBar,"status-bar-state":e.wizard.statusBarState,"status-bar-error-text":e.wizard.statusBarErrorText},on:{"current-step":function(t){return e.activeStep=t.stepKey}}},e._l(e.STEPS,(function(t){return i(t.component,{key:t.stepKey,ref:t.stepKey,refInFor:!0,tag:"component",attrs:{"syno-id":"create-wizard-create-wizard-wizard-step-"+t.stepKey,headline:t.headline,"step-key":t.stepKey,"next-step-key":t.nextStepKey,internal:e.internal,profile:e.profile},on:{"update:profile":function(t){return e.profile=Object.assign({},e.profile,t)},"update:internal":function(t){return e.internal=Object.assign({},e.internal,t)},"update:loading":function(t){return t?e.$refs.window.setStatusBusy():e.$refs.window.clearStatusBusy()},"display-error":e.onDisplayError}})})),1)],1)};NQ._withStripped=!0;var IQ=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-wizard-step",{staticClass:"docker-create-project-general-step",attrs:{"syno-id":e.synoId,"step-key":e.stepKey,headline:e.headline,"next-step-key":e.nextStepKey,"pre-enter-next-step":e.preEnterNextStep}},[i("v-form",{ref:"form",staticClass:"h100p",attrs:{"syno-id":"create-step-project-create-general-form-0",rules:e.rules}},[i("v-form-item",{attrs:{label:e._TT("project","project_name"),prop:"fields.name"}},[i("v-input",{attrs:{"syno-id":"create-step-project-create-general-input-0",name:"fields.name"},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),e._v(" "),i("v-form-multiple-item",{attrs:{label:e._TT("project","project_path")}},[i("v-form-item",{attrs:{prop:"fields.share_path"}},[i("v-input",{attrs:{"syno-id":"create-step-project-create-general-input-1",readonly:"",name:"fields.share_path",value:e.form.share_path}})],1),e._v(" "),i("v-button",{staticClass:"set-path-btn",attrs:{"syno-id":"create-step-project-create-general-button-0"},on:{click:e.openFileChooser}},[e._v("\n                "+e._s(e._TT("project","choose_path"))+"\n            ")])],1),e._v(" "),e.state!==e.STATE.USE_EXISTING_YML?i("v-form-item",{attrs:{label:e._TT("project","source")}},[i("v-single-select",{attrs:{"syno-id":"create-step-project-create-general-single-select-0",options:e.options,width:null},model:{value:e.state,callback:function(t){e.state=t},expression:"state"}})],1):e._e(),e._v(" "),e.state===e.STATE.USE_UPLOAD_YML?i("v-form-item",{ref:"file-form-item",attrs:{label:e._T("common","file")}},[i("v-file-button",{attrs:{"syno-id":"create-step-project-create-general-button-0",accept:".yml,.yaml"},on:{files:e.onFileChange},model:{value:e.uploadFileName,callback:function(t){e.uploadFileName=t},expression:"uploadFileName"}})],1):e._e(),e._v(" "),e.state===e.STATE.USE_EXISTING_YML?i("v-form-item",{attrs:{textonly:"",label:e._T("common","file")}},[e._v("\n            "+e._s(e.composeName)+"\n        ")]):e._e(),e._v(" "),e.isEditorShown?i("YamlEditor",{key:e.random,ref:"editor",attrs:{"default-value":e.form.content},on:{input:function(t){e.form.content=t}}}):e._e()],1)],1)};IQ._withStripped=!0;const TQ={props:{synoId:{type:String,required:!0},stepKey:{type:String,required:!0},nextStepKey:{type:String,required:!0},headline:{type:String,required:!0},internal:{type:Object,required:!0},profile:{type:Object,required:!0}}},DQ={USE_EXISTING_YML:"USE_EXISTING_YML",USE_UPLOAD_YML:"USE_UPLOAD_YML",USE_EDITOR_ONLY:"USE_EDITOR_ONLY"};var AQ={inject:["_T","_TT","getWindowOrAppWindow"],mixins:[TQ,GG,Qi],components:{YamlEditor:EG},computed:{...(0,g.mapGetters)("projects",{projects:"allNames"}),STATE:()=>DQ,isEditorShown(){return this.state===DQ.USE_EXISTING_YML||(this.state===DQ.USE_UPLOAD_YML?""!==this.uploadFileName:this.state===DQ.USE_EDITOR_ONLY)},buildMethodText(){const e=this.options.find((({value:e})=>this.state===e));return e&&e.label||""},composeName(){const e=this.composePath.slice(this.composePath.lastIndexOf("/")+1);return["compose.yaml","compose.yml","docker-compose.yml","docker-compose.yaml"].find((t=>t===e))||""}},watch:{state(){this.prevNotUseExisitingYmlState=this.state===DQ.USE_EXISTING_YML?this.prevNotUseExisitingYmlState:this.state}},data(){const e=this.$store.getters["projects/allNames"],t=this.$store.getters["projects/rows"].map((({share_path:e})=>e));return{projects:e,prevNotUseExisitingYmlState:DQ.USE_UPLOAD_YML,state:DQ.USE_UPLOAD_YML,uploadFileName:"",composePath:"",form:{name:"",share_path:"",content:""},rules:{"fields.name":nY(e),"fields.share_path":oY(t)},options:[{label:w("project","ues_existing_path"),value:DQ.USE_EXISTING_YML,filter:()=>!1},{label:w("project","use_upload_compose"),value:DQ.USE_UPLOAD_YML},{label:w("project","use_editor_compose"),value:DQ.USE_EDITOR_ONLY}]}},methods:{async preEnterNextStep(){if(!await this.validate()){const e=v("common","forminvalid");return await this.getWindowOrAppWindow().getMsgBox().alert("",e),!1}if(!await this.validateCompose()){const e=w("project","alert_root_bind_mount");if("cancel"===await this.getWindowOrAppWindow().getMsgBox().confirm("",e,{confirm:{text:w("project","btn_continue_root_bind_mount")},cancel:{text:w("project","btn_cancel_root_bind_mount")}}))return!1}return this.$emit("update:profile",this.form),this.$emit("update:internal",{buildMethodText:this.buildMethodText}),!0},openFileChooser(){const e=this.getWindow(),t=new SYNO.SDS.Utils.FileChooser.Chooser({owner:e,usage:{type:"chooseDir"},folderToolbar:!0,gotoPath:"/docker",treeFilter:function(e,t={}){return!["/home","/homes"].includes(t.spath)},listeners:{choose:async(e,{path:t})=>{if(!t)return;e.setStatusBusy();const{is_docker_compose_yml_exist:i,content:n="",compose_path:o=""}=await async function(e=""){return await synowebapi.promises.request({api:"SYNO.Docker.Project",method:"get_share_info",version:1,params:{path:e}})}(t);if(e.clearStatusBusy(),i){if(!await this.openConfirmSharePathMessageBox(e))return;this.state=DQ.USE_EXISTING_YML}else this.state=this.prevNotUseExisitingYmlState;this.form.share_path=t,this.form.content=n,this.composePath=o,this.forceRerender(),e.close()}}});e.openExtWindow(t)},async openConfirmSharePathMessageBox(e){e.$options={messagebox:null};const t=e.openVueWindow("SYNO.SDS.Docker.Project.ProjectConfirmSharePathMessageBox").window;return t.alert("",""),new Promise((e=>t.$on("close",(({payload:t})=>e(t)))))},async onFileChange([e]=[]){await this.validateFileButton();const t=await this.readFileContent(e);return this.form.content=t,await this.forceRerender()},readFileContent:async e=>await new Promise(((t,i)=>{const n=new FileReader;n.addEventListener("load",(e=>t(e.target.result))),n.addEventListener("error",i),n.readAsText(e)})),async validate(){return(await Promise.all([this.$refs.form.validate(),this.validateFileButton(),!this.$refs.editor||this.$refs.editor.validate()])).every((e=>e))},async validateCompose(){return!this.$refs.editor||await this.$refs.editor.validateVolumes()},async validateFileButton(){const e=this.$refs["file-form-item"];return!e||(""===this.uploadFileName?(e.setInvalid(_JSLIBSTR("extlang","fieldblank"),"error"),!1):(e.resetInvalid(),!0))}}},OQ=(i(6715),j(AQ,IQ,[],!1,null,null,null));OQ.options.__file="src/pages/Project/Create/StepProjectCreateGeneral.vue";var MQ=OQ.exports,RQ=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-wizard-step",{attrs:{"syno-id":e.synoId,"step-key":e.stepKey,headline:e.headline,"next-step-key":e.nextStepKey,"pre-enter-next-step":e.preEnterNextStep},on:{activate:e.onActivate}},[i("v-form",{ref:"form",attrs:{"syno-id":"create-step-project-create-service-portal-form-0",rules:e.rules,flex:"row"}},[i("ProjectServicePortalFormItem",{ref:"servicePortalFormItem",attrs:{"yaml-text":e.profile.content},model:{value:e.form,callback:function(t){e.form=t},expression:"form"}})],1)],1)};RQ._withStripped=!0;var PQ=j({inject:["getWindowOrAppWindow"],mixins:[TQ],components:{ProjectServicePortalFormItem:cY},data:()=>({form:{enable_service_portal:!1,service_portal_name:"",service_portal_port:0,service_portal_protocol:""}}),methods:{onActivate(){var e,t;null===(e=this.$refs)||void 0===e||null===(t=e.servicePortalFormItem)||void 0===t||t.setAPossiblePortalWhenNull()},async preEnterNextStep(){if(!await this.$refs.form.validate()){const e=_T("common","forminvalid");return await this.getWindowOrAppWindow().getMsgBox().alert("",e),!1}return this.form.enable_service_portal?this.$emit("update:profile",this.form):this.$emit("update:profile",{enable_service_portal:!1,service_portal_name:"",service_portal_port:0,service_portal_protocol:""}),!0}}},RQ,[],!1,null,null,null);PQ.options.__file="src/pages/Project/Create/StepProjectCreateServicePortal.vue";var FQ=PQ.exports,BQ=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-wizard-step",{staticClass:"flex-container",attrs:{"syno-id":e.synoId,"step-key":e.stepKey,headline:e.headline,finished:e.onFinished},on:{activate:e.onActivate}},[i("v-data-table",{staticClass:"flex-remained-height",attrs:{"syno-id":"create-step-project-create-summary-data-table-0","hide-refresh-btn":"","auto-row-height":"",columns:e.columns,"current-data":e.summary,finished:e.onFinished,"show-paging-bar":!1}}),e._v(" "),i("v-checkbox",{staticClass:"run-instantly-checkbox",attrs:{"syno-id":"create-step-project-create-summary-checkbox-0",disabled:e.profile.enable_service_portal},model:{value:e.form.is_run_instantly,callback:function(t){e.$set(e.form,"is_run_instantly",t)},expression:"form.is_run_instantly"}},[e._v("\n        "+e._s(e._TT("project","start_project_instastantly"))+"\n    ")])],1)};BQ._withStripped=!0;var WQ=j({inject:["_T","_TT","_ERROR_MESSAGE"],mixins:[TQ,GG],props:{nextStepKey:{required:!1}},data(){return{columns:[{title:this._T("status","header_item"),field:"key"},{title:this._T("status","header_value"),field:"value",width:"70%"}],summary:[],form:{is_run_instantly:!0}}},methods:{onActivate(){this.summary=[this.generateNameRow(),this.generatePathRow(),this.generateBuildMethodRow(),this.generateFileRow(),this.generateWebPortalRow()].filter((e=>e))},generateNameRow(){return{key:w("project","project_name"),value:this.profile.name}},generatePathRow(){return{key:w("project","project_path"),value:this.profile.share_path}},generateBuildMethodRow(){return{key:w("project","source"),value:this.internal.buildMethodText}},generateFileRow:()=>({key:v("common","file"),value:"docker-compose.yml"}),generateWebPortalRow(){if(!this.profile.enable_service_portal)return;const{service_portal_name:e,service_portal_port:t,service_portal_protocol:i}=this.profile;return{key:w("project","web_portal"),value:`${i}-${e}-${t}`}},async onFinished(){this.$emit("update:loading",!0);try{const e=await synowebapi.promises.request({api:"SYNO.Docker.Project",method:"create",version:1,params:this.profile});await this.onSuccess(e)}catch(e){await this.onError(e)}},async onSuccess({id:e,name:t,enable_service_portal:i,services:n=[]}={}){const{is_run_instantly:o}=this.form;this.getWindow().close({payload:{success:!0,id:e,name:t,services:n,is_run_instantly:o,should_go_webstation:i}})},async onError(e={}){const t=this._ERROR_MESSAGE(e);await this.getWindow().getMsgBox().alert("",t),this.$emit("update:loading",!1)}}},BQ,[],!1,null,null,null);WQ.options.__file="src/pages/Project/Create/StepProjectCreateSummary.vue";var VQ=WQ.exports;const zQ="WEBPORTAL_SETTINGS",jQ="SUMMARY";var HQ={computed:{wizardClasses:()=>"wizard-step-container-overflow-hidden",buttons:()=>({next:{text:e=>e&&e.nextStepKey?_T("common","next"):_T("common","done")}})},data(){const e=[{stepKey:"GENERAL_SETTINGS",nextStepKey:zQ,headline:w("helptoc","general_settings"),component:MQ},{stepKey:zQ,nextStepKey:jQ,headline:w("project","web_portals_settings"),component:FQ},{stepKey:jQ,headline:w("wizard","summary"),component:VQ}];return{STEPS:e,activeStep:e[0].stepKey,wizard:{showStatusBar:!1,statusBarState:!1,statusBarErrorText:!1},internal:{buildMethodText:""},profile:{name:"",content:"",share_path:"",enable_service_portal:!1,service_portal_name:"",service_portal_port:0,service_portal_protocol:""}}},methods:{async onDisplayError(e){this.wizard.showStatusBar=!0,this.wizard.statusBarState="error",this.wizard.statusBarErrorText=e,await N(5e3),this.wizard.showStatusBar=!1}}},UQ=(i(4315),j(HQ,NQ,[],!1,null,null,null));UQ.options.__file="src/pages/Project/Create/ProjectCreateWizard.vue";var $Q=UQ.exports,KQ=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-message-box-window",{ref:"window",attrs:{"syno-id":"create-project-confirm-share-path-message-box-message-box-window-0","do-confirm":e.confirm},scopedSlots:e._u([{key:"content",fn:function(){return[i("v-form-item",{attrs:{textonly:"","hide-label":""}},[e._v("\n            "+e._s(e._TT("project","select_existing_path"))+"\n        ")]),e._v(" "),i("v-radio-group",{attrs:{"syno-id":"create-project-confirm-share-path-message-box-radio-group-0"},model:{value:e.value,callback:function(t){e.value=t},expression:"value"}},e._l(e.RADIOS,(function(t){var n=t.text,o=t.value;return i("v-radio",{key:o,attrs:{"syno-id":"create-project-confirm-share-path-message-box-radio-0",value:o}},[e._v("\n                "+e._s(n)+"\n            ")])})),1)]},proxy:!0}])})};KQ._withStripped=!0;const qQ="USE_EXISTING";var GQ=j({inject:["_TT"],data:()=>({RADIOS:[{text:w("project","ues_existing_path"),value:qQ},{text:w("project","reselect_path"),value:"RESELECT"}],value:qQ}),methods:{async confirm(){return this.$refs.window.close({forceClose:!0,payload:this.value===qQ})}}},KQ,[],!1,null,null,null);GQ.options.__file="src/pages/Project/Create/ProjectConfirmSharePathMessageBox.vue";var YQ=GQ.exports,ZQ=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-message-box-window",{ref:"window",attrs:{"syno-id":"detail-project-confirm-rebuild-message-box-message-box-window-0","do-confirm":e.confirm},scopedSlots:e._u([{key:"content",fn:function(){return[i("v-form-item",{attrs:{textonly:"","hide-label":""}},[e._v("\n            "+e._s(e._TT("project","confirm_rebuild_desc"))+"\n        ")]),e._v(" "),i("v-radio-group",{attrs:{"syno-id":"detail-project-confirm-rebuild-message-box-radio-group-0"},model:{value:e.value,callback:function(t){e.value=t},expression:"value"}},e._l(e.RADIOS,(function(t){var n=t.text,o=t.value;return i("v-radio",{key:o,attrs:{"syno-id":"detail-project-confirm-rebuild-message-box-radio-0",value:o}},[e._v("\n                "+e._s(n)+"\n            ")])})),1)]},proxy:!0}])})};ZQ._withStripped=!0;var XQ=j({inject:["_TT"],data(){const e={CHANGE_ONLY:"CHANGE_ONLY",REBUILD:"REBUILD"};return{RADIO_VALUE:e,RADIOS:[{text:w("project","confirm_rebuild_change_only"),value:e.CHANGE_ONLY},{text:w("project","confirm_rebuild_rebuild"),value:e.REBUILD}],value:e.REBUILD}},methods:{async confirm(){return this.$refs.window.close({forceClose:!0,payload:this.value===this.RADIO_VALUE.REBUILD})}}},ZQ,[],!1,null,null,null);XQ.options.__file="src/pages/Project/Detail/ProjectConfirmRebuildMessageBox.vue";var JQ=XQ.exports,QQ=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-modal-window",{ref:"win",attrs:{"syno-id":"create-network-dialog",title:e._TT("network","create"),width:600,height:470,"before-close":e.cancel}},[i("v-panel",{attrs:{"syno-id":"create-network-panel",confirm:e.confirm,cancel:e.close,"confirm-text":e._T("common","add")},scopedSlots:e._u([{key:"body",fn:function(){return[i("v-form",{ref:"form",attrs:{"syno-id":"create-network-form",rules:e.rules,flex:"row"}},[i("v-form-item",{attrs:{prop:"fields.name",label:""+e._TT("network","name")+e._T("common","colon"),"label-flex":"200px","control-flex":"340px"}},[i("v-input",{attrs:{"syno-id":"network-name-input",name:"name","max-length":"64"},model:{value:e.fields.name,callback:function(t){e.$set(e.fields,"name",t)},expression:"fields.name"}})],1),e._v(" "),i("v-form-item",{attrs:{prop:"fields.ipv4_config",label:""+e._TT("network","configure_ipv4")+e._T("common","colon"),"label-flex":"200px","control-flex":"340px"}},[i("v-single-select",{attrs:{"syno-id":"network-ipv4_config-select",options:e.ipv4Opts,width:"auto"},model:{value:e.fields.ipv4_configs,callback:function(t){e.$set(e.fields,"ipv4_configs",t)},expression:"fields.ipv4_configs"}})],1),e._v(" "),i("v-form-item",{attrs:{prop:"fields.subnet",label:""+e._T("firewall","firewall_source_network")+e._T("common","colon"),indent:1,"label-flex":"200px","control-flex":"340px"}},[i("v-input",{attrs:{"syno-id":"network-subnet-input",name:"subnet","max-length":"18",disabled:e.isIpv4Auto},model:{value:e.fields.subnet,callback:function(t){e.$set(e.fields,"subnet",t)},expression:"fields.subnet"}})],1),e._v(" "),i("v-form-item",{attrs:{prop:"fields.iprange",label:""+e._TT("network","iprange")+e._T("common","colon"),indent:1,"label-flex":"200px","control-flex":"340px"}},[i("v-input",{attrs:{"syno-id":"network-iprange-input",name:"iprange","max-length":"18",disabled:e.isIpv4Auto},model:{value:e.fields.iprange,callback:function(t){e.$set(e.fields,"iprange",t)},expression:"fields.iprange"}})],1),e._v(" "),i("v-form-item",{attrs:{prop:"fields.gateway",label:""+e._T("network","route_gateway")+e._T("common","colon"),indent:1,"label-flex":"200px","control-flex":"340px"}},[i("v-input",{attrs:{"syno-id":"network-gateway-input",name:"gateway","max-length":"15",disabled:e.isIpv4Auto},model:{value:e.fields.gateway,callback:function(t){e.$set(e.fields,"gateway",t)},expression:"fields.gateway"}})],1),e._v(" "),i("v-form-item",{attrs:{prop:"fields.ipv6_config",label:""+e._TT("network","configure_ipv6")+e._T("common","colon"),"label-flex":"200px","control-flex":"340px"}},[i("v-single-select",{attrs:{"syno-id":"network-ipv6_config-select",options:e.ipv6Opts,width:"auto"},model:{value:e.fields.ipv6_configs,callback:function(t){e.$set(e.fields,"ipv6_configs",t)},expression:"fields.ipv6_configs"}})],1),e._v(" "),i("v-form-item",{attrs:{prop:"fields.ipv6_subnet",label:"IPv6 "+e._T("firewall","firewall_source_network")+e._T("common","colon"),indent:1,"label-flex":"200px","control-flex":"340px"}},[i("v-input",{attrs:{"syno-id":"network-ipv6-subnet-input",name:"ipv6_subnet","max-length":"50",disabled:e.isIpV6Off},model:{value:e.fields.ipv6_subnet,callback:function(t){e.$set(e.fields,"ipv6_subnet",t)},expression:"fields.ipv6_subnet"}})],1),e._v(" "),i("v-form-item",{attrs:{prop:"fields.ipv6_iprange",label:"IPv6 "+e._TT("network","iprange")+e._T("common","colon"),indent:1,"label-flex":"200px","control-flex":"340px"}},[i("v-input",{attrs:{"syno-id":"network-ipv6-iprange-input",name:"ipv6_iprange","max-length":"50",disabled:e.isIpV6Off},model:{value:e.fields.ipv6_iprange,callback:function(t){e.$set(e.fields,"ipv6_iprange",t)},expression:"fields.ipv6_iprange"}})],1),e._v(" "),i("v-form-item",{attrs:{prop:"fields.ipv6_gateway",label:"IPv6 "+e._T("network","route_gateway")+e._T("common","colon"),indent:1,"label-flex":"200px","control-flex":"340px"}},[i("v-input",{attrs:{"syno-id":"network-ipv6-gateway-input",name:"ipv6_gateway","max-length":"50",disabled:e.isIpV6Off},model:{value:e.fields.ipv6_gateway,callback:function(t){e.$set(e.fields,"ipv6_gateway",t)},expression:"fields.ipv6_gateway"}})],1),e._v(" "),i("v-form-item",{attrs:{prop:"fields.disable_masquerade","hide-label":""}},[i("v-checkbox",{attrs:{"syno-id":"disable-masquerade"},model:{value:e.fields.disable_masquerade,callback:function(t){e.$set(e.fields,"disable_masquerade",t)},expression:"fields.disable_masquerade"}},[e._v(e._s(e._TT("network","disable_ip_masquerade")))])],1)],1)]},proxy:!0}])})],1)};function e1(e,t,i){return t.match(/^[a-zA-Z0-9][a-zA-Z0-9_.-]*$/)?i():i(new Error(SYNO.SDS.Docker.Utils.Helper.T("network","naming_rule")))}function t1(e,t,i){return t.match(/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$/)?i():i(new Error(SYNO.SDS.Docker.Utils.Helper.T("network","ipv4_cidr_rule")))}function i1(e,t,i){return t.match(/^([1-9][0-9]{0,1}|1[0-9][0-9]|2[01][0-9]|22[0-3])([.]([1-9]{0,1}[0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){2}[.]([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/)?i():i(new Error(_JSLIBSTR("vtype","bad_ip")))}function n1(e,t,i){return t.match(/^s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))(%.+)?s*(\/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8]))?$/)?i():i(new Error(SYNO.SDS.Docker.Utils.Helper.T("network","ipv6_cidr_rule")))}function o1(e,t,i){return t.match(/^((([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4})|(([0-9a-fA-F]{1,4}:){1,7}:)|(([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4})|(([0-9a-fA-F]{1,4}:){1,5}:([0-9a-fA-F]{1,4}:){0,1}[0-9a-fA-F]{1,4})|(([0-9a-fA-F]{1,4}:){1,4}:([0-9a-fA-F]{1,4}:){0,2}[0-9a-fA-F]{1,4})|(([0-9a-fA-F]{1,4}:){1,3}:([0-9a-fA-F]{1,4}:){0,3}[0-9a-fA-F]{1,4})|(([0-9a-fA-F]{1,4}:){1,2}:([0-9a-fA-F]{1,4}:){0,4}[0-9a-fA-F]{1,4})|([0-9a-fA-F]{1,4}::([0-9a-fA-F]{1,4}:){0,5}[0-9a-fA-F]{1,4})|(::([0-9a-fA-F]{1,4}:){0,6}[0-9a-fA-F]{1,4}))$/)?i():i(new Error(_JSLIBSTR("vtype","bad_v6ip")))}QQ._withStripped=!0;const{WEBAPI_ERR_NETWORK_SUBNET4_DUPLICATE:r1,WEBAPI_ERR_NETWORK_SUBNET6_DUPLICATE:s1,WEBAPI_ERR_NETWORK_GATEWAY4_DUPLICATE:a1,WEBAPI_ERR_NETWORK_GATEWAY4_OUTOFRANGE:l1,WEBAPI_ERR_NETWORK_GATEWAY6_DUPLICATE:c1,WEBAPI_ERR_NETWORK_GATEWAY6_OUTOFRANGE:d1}=Xt;var h1=j({inject:["_TT","_ERROR_MESSAGE"],data:()=>({fields:{name:"",ipv4_configs:"auto",subnet:"",iprange:"",gateway:"",ipv6_configs:"off",ipv6_subnet:"",ipv6_iprange:"",ipv6_gateway:"",disable_masquerade:!1},rules:{"fields.name":[{required:!0},{validator:e1}],"fields.subnet":[{required:!0},{validator:t1}],"fields.iprange":[{validator:t1}],"fields.gateway":[{required:!0},{validator:i1}],"fields.ipv6_subnet":[{required:!0},{validator:n1}],"fields.ipv6_range":[{validator:n1}],"fields.ipv6_gateway":[{required:!0},{validator:o1}]},ipv4Opts:[{label:v("common","auto"),value:"auto"},{label:v("common","manual"),value:"manual"}],ipv6Opts:[{label:w("common","off"),value:"off"},{label:v("common","manual"),value:"manual"}]}),computed:{isIpv4Auto(){return"auto"===this.fields.ipv4_configs},isIpV6Off(){return"off"===this.fields.ipv6_configs}},watch:{"fields.ipv4_configs":function(e){"auto"===e&&this.clearIpv4Values()},"fields.ipv6_configs":function(e){"off"===e&&this.clearIpv6Values()}},methods:{clearIpv4Values(){this.fields.iprange="",this.fields.subnet="",this.fields.gateway=""},clearIpv6Values(){this.fields.ipv6_gateway="",this.fields.ipv6_iprange="",this.fields.ipv6_subnet=""},getCreateParams(){const e={...this.fields};return e.enable_ipv6=!this.isIpV6Off,delete e.ipv6_configs,delete e.ipv4_configs,this.isIpV6Off&&(delete e.ipv6_subnet,delete e.ipv6_iprange,delete e.ipv6_gateway),this.isIpv4Auto&&(delete e.subnet,delete e.iprange,delete e.gateway),e},onCreateError(e={},t={}){const i=[],{code:n,errors:o}=e;switch(n){case r1:case s1:i.push(o.conflictNet);break;case a1:case l1:i.push(t.gateway);break;case c1:case d1:i.push(t.ipv6_gateway);break;default:i.push(t.name)}this.$refs.win.getMsgBox().alert("",this._ERROR_MESSAGE(e,i),null,{useHtml:!0})},async confirm(){const e=this.$refs.form;if(!await e.validate())return;const t=this.getCreateParams();this.$refs.win.setStatusBusy();try{await synowebapi.promises.request({api:"SYNO.Docker.Network",method:"create",version:1,params:t})}catch(e){return this.$refs.win.clearStatus(),void this.onCreateError(e,t)}this.$refs.win.clearStatus(),this.$emit("networkadded",{name:this.fields.name}),this.$refs.win.doClose()},async cancel(){if(this.$refs.form.isDirty())switch(await this.$refs.win.getMsgBox().confirmLostChange()){case"dont_save":return!0;case"save":return await this.confirm(),!0;default:return!1}return this.$refs.win.doClose(),!0},close(){var e,t;null===(e=this.$refs)||void 0===e||null===(t=e.win)||void 0===t||t.close()}}},QQ,[],!1,null,null,null);h1.options.__file="src/dialogs/Networks/NetworkAddDialog.vue";var u1=h1.exports,g1=function(){var e=this,t=this,i=t.$createElement,n=t._self._c||i;return n("v-modal-window",{ref:"win",attrs:{"syno-id":"manage-container-dialog",width:420,height:460,"before-close":t.cancel,title:t.title}},[n("v-panel",{attrs:{"syno-id":"manage-container-panel",confirm:t.confirm,cancel:function(){return e.$refs.win.close()}},scopedSlots:t._u([{key:"body",fn:function(){return[n("v-form",{staticClass:"manage-network-form",attrs:{"syno-id":"manage-container-form"}},[n("v-form-item",{attrs:{"hide-label":"",textonly:""}},[t._v("\n                    "+t._s(t._STRING_FORMAT(t._TT("network","manage_network_desc"),t.networkName))+"\n                ")]),t._v(" "),n("v-data-table",{ref:"table",staticClass:"h100p network-manage-table",attrs:{"syno-id":"manage-container-table",columns:t.columns,"current-data":t.containers,"selection-mode":"checkbox","default-selected":t.existingContainers.length>0,"multiple-selected":""},on:{"selected-change":t.onSelectionChange}})],1)]},proxy:!0}])})],1)};g1._withStripped=!0;var p1={inject:["_TT","_STRING_FORMAT"],data(){return{columns:[{field:"name",title:this._TT("container","container_name")}],selectedContainers:[],containers:[],isDirty:!1,title:`${this._T("network","network_manage")} - ${this.networkName}`}},props:{existingContainers:{type:Array,default:()=>[]},networkName:{type:String,required:!0}},async mounted(){await this.$nextTick(),this.getContainers()},methods:{async getContainers(){let e;this.$refs.table.setLoading(!0);try{e=await synowebapi.promises.request({api:"SYNO.Docker.Network",method:"list_container",version:1,scope:this,params:{limit:-1,offset:0}})}catch(e){return this.$refs.table.setLoading(!1),void this.$refs.win.getMsgBox().alert("",this.getErrorMessage(e,this.networkName),null,{useHtml:!0})}this.selectedContainers=[],this.containers=e.containers.map((e=>({...e,_rowInfo:{defaultSelected:this.existingContainers.includes(e.name)}}))),this.selectedContainers=this.$refs.table.currentData.filter((e=>e._rowInfo.defaultSelected)),this.$refs.table.setLoading(!1)},onSelectionChange(e){if(this.selectedContainers=e.rows,this.isDirty=!1,this.selectedContainers.length!==this.existingContainers.length)this.isDirty=!0;else{const e=this.selectedContainers.map((e=>e.name)).sort(),t=this.existingContainers.sort();e.forEach(((e,i)=>{t[i]!==e&&(this.isDirty=!0)}))}},onApplyError(e){let t=[];t=t.concat(e.errors.add_failed).concat(e.errors.remove_failed).map((e=>e.name)).join(", "),this.$refs.win.getMsgBox().alert("",this.getErrorMessage(e,this.networkName)+`<br> ${t}`,null,{useHtml:!0})},async confirm(){this.$refs.win.setStatusBusy();try{await synowebapi.promises.request({api:"SYNO.Docker.Network",method:"set",version:1,params:{networkName:this.networkName,containers:this.selectedContainers.map((e=>e.name))}})}catch(e){return this.$refs.win.clearStatus(),this.onApplyError(e),!1}return this.$emit("networkchanged",{name:this.networkName}),this.$refs.win.clearStatus(),this.$refs.win.doClose(),!0},async cancel(){if(this.isDirty)switch(await this.$refs.win.getMsgBox().confirmLostChange()){case"dont_save":return!0;case"save":return await this.confirm();default:return!1}return this.$refs.win.doClose(),!0}}},m1=i(9541),f1={};f1.styleTagTransform=uu(),f1.setAttributes=lu(),f1.insert=su().bind(null,"head"),f1.domAPI=ou(),f1.insertStyleElement=du(),iu()(m1.Z,f1),m1.Z&&m1.Z.locals&&m1.Z.locals;var _1=j(p1,g1,[],!1,null,"03023a12",null);_1.options.__file="src/dialogs/Networks/ManageContainerDialog.vue";var v1=_1.exports,b1=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-modal-window",{ref:"win",staticClass:"docker-package docker-tag-dialog",style:e.styles,attrs:{"syno-id":"tag-window",width:408,height:"auto","min-height":164,title:e._TT("registry","choose_tag")}},[i("v-panel",{attrs:{"syno-id":"tag-panel","confirm-text":e._T("backup","download"),confirm:e.confirm,cancel:function(){return e.$refs.win.close()}},scopedSlots:e._u([{key:"body",fn:function(){return[i("v-form",{attrs:{"syno-id":"tag-form",flex:"row"}},[i("v-form-item",{attrs:{label:e._TT("common","tag"),"label-flex":"120px","control-flex":"228px"}},[e.shouldUseInput?i("v-input",{attrs:{"syno-id":"registry-tag-dialog-input-0",placeholder:"latest"},model:{value:e.tag,callback:function(t){e.tag=t},expression:"tag"}}):i("v-single-select",{attrs:{"syno-id":"tag-single-select",width:"auto",options:e.tags,"display-field":"tag","value-field":"tag","virtual-scroll":""},model:{value:e.tag,callback:function(t){e.tag=t},expression:"tag"}})],1),e._v(" "),e.shouldUseInput?i("v-form-item",{attrs:{"hide-label":"",textonly:""}},[i("span",{staticClass:"foot-note"},[e._v("\n                        "+e._s(e._TT("registry","no_tag_description"))+"\n                    ")])]):e._e()],1)]},proxy:!0}])})],1)};b1._withStripped=!0;var w1={inject:["_TT"],data(){return{tag:0===this.tags.length?"latest":this.tags[0].tag}},props:{repoInfo:{type:Object,required:!0},tags:{type:Array,required:!0,default:[]}},computed:{shouldUseInput(){return 0===this.tags.length}},methods:{confirm(){const e=this.$refs.win,{aliInfo:t,repo:i}=this.repoInfo,n={tag:this.tag||"latest",repository:i};t&&(n.aliInfo=t),this.$emit("tagchoosed",n),e.doClose()},close:()=>!0}},y1=(i(5190),j(w1,b1,[],!1,null,null,null));y1.options.__file="src/dialogs/Registry/TagDialog.vue";var C1=y1.exports,S1=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-modal-window",{ref:"win",staticClass:"docker-package-win",attrs:{"syno-id":"registry-setting-window",width:500,height:500,title:e._TT("registry","registry_setting")}},[i("v-panel",{attrs:{"syno-id":"registry-setting-panel",tbar:""},scopedSlots:e._u([{key:"tbar",fn:function(){return[i("v-button",{attrs:{"syno-id":"add-registry-btn"},on:{click:e.onAddRegistry}},[e._v(e._s(e._T("common","add")))]),e._v(" "),i("v-button",{attrs:{"syno-id":"edit-registry-btn",disabled:!e.canEdit},on:{click:e.onEditRegistry}},[e._v(e._s(e._T("common","alt_edit")))]),e._v(" "),i("v-button",{attrs:{"syno-id":"delete-registry-btn",disabled:!e.canDelete},on:{click:e.onDeleteRegistry}},[e._v(e._s(e._T("common","delete")))]),e._v(" "),i("v-button",{attrs:{"syno-id":"use-registry-btn",disabled:!e.canUse},on:{click:e.onUseRegistry}},[e._v(e._s(e._TT("registry","use")))])]},proxy:!0},{key:"body",fn:function(){return[i("v-data-table",{ref:"table",staticClass:"h100p registry-list-table",attrs:{"syno-id":"registry-table","current-data":e.rows,columns:e.cols},on:{"selected-change":e.onSelectionChange,refresh:function(t){return e.getRegistryList()}},scopedSlots:e._u([{key:"using",fn:function(t){var n=t.row;return[e.currentRegistry===n.name?[i("div",{staticClass:"syno-sds-docker-registry-enabled"})]:e._e()]}}])})]},proxy:!0},{key:"fbar",fn:function(){return[i("div",{staticClass:"default pull-right button-region row"},[i("v-button",{attrs:{"syno-id":"close-btn",type:"footbar",suffix:"cancel"},on:{click:e.onClose}},[e._v(e._s(e._T("common","close")))])],1)]},proxy:!0}])})],1)};S1._withStripped=!0;var k1={inject:["getWindowOrAppWindow"],mixins:[tY],async mounted(){await this.$nextTick(),await this.getRegistryList()},data(){return{selectedRow:null,cols:[{title:this._TT("common","repository"),field:"name",minWidth:30},{title:this._TT("registry","url"),field:"url",minWidth:60},{title:this._TT("registry","using"),field:"using",minWidth:20}]}},computed:{...(0,g.mapGetters)("registries",["registryRows"]),...(0,g.mapState)("registries",["currentRegistry"]),rows(){return this.registryRows},canDelete(){return!!this.selectedRow&&!RZ.isDockerHubShortName(this.selectedRow.name)},canUse(){return this.selectedRow&&this.selectedRow.name!==this.currentRegistry},canEdit(){return this.selectedRow}},methods:{...(0,g.mapActions)("registries",["getRegistry"]),onSelectionChange(e){this.selectedRow=e.rows[0]},onAddRegistry(){const{window:e,component:t}=this.$refs.win.openModalWindow(SYNO.SDS.Docker.Registry.EditRegistryDialog,{mode:"create"});t.$on("registry-changed",this.getRegistry.bind(this)),e.$on("close",(({payload:{success:e=!1,name:t=""}}={})=>{e&&this.getWindowOrAppWindow().getToastBox(SYNO.SDS.formatString(w("registry","created_toast"),t))}))},onEditRegistry(){const{window:e,component:t}=this.$refs.win.openModalWindow(SYNO.SDS.Docker.Registry.EditRegistryDialog,{registry:this.selectedRow});t.$on("registry-changed",this.getRegistry.bind(this)),e.$on("close",(({payload:{success:e=!1,name:t=""}}={})=>{e&&(this.getRegistryList(),this.getWindowOrAppWindow().getToastBox(SYNO.SDS.formatString(w("registry","updated_toast"),t)))}))},async getRegistryList(){this.setTableLoading(!0);try{await this.getRegistry()}catch(e){this.$refs.win.getMsgBox().alert(this._T("error","error_error"),this.getErrorMessage(e))}this.setTableLoading(!1)},async onDeleteRegistry(){const e=this.$refs.win;e.setStatusBusy();const t=this.selectedRow.name;try{await synowebapi.promises.request({api:"SYNO.Docker.Registry",method:"delete",version:1,params:{name:t}})}catch(t){return e.clearStatus(),void e.getMsgBox().alert(this._T("error","error_error"),this.getErrorMessage(t))}e.clearStatus(),await this.getRegistryList(),this.getWindowOrAppWindow().getToastBox(SYNO.SDS.formatString(w("registry","deleted_toast"),t))},async onUseRegistry(){const e=this.$refs.win;e.setStatusBusy();const t=this.selectedRow.name;try{await synowebapi.promises.request({api:"SYNO.Docker.Registry",method:"using",version:1,params:{name:t}})}catch(t){return e.clearStatus(),void e.getMsgBox().alert(this._T("error","error_error"),this.getErrorMessage(t))}e.clearStatus(),await this.getRegistryList(),this.getWindowOrAppWindow().getToastBox(SYNO.SDS.formatString(w("registry","changed_toast"),t)),this.$emit("registry-change")},setTableLoading(e){this.$refs.table.setLoading(e)},onClose(){this.$refs.win.doClose()}}},x1=(i(8197),j(k1,S1,[],!1,null,"4258fe3a",null));x1.options.__file="src/dialogs/Registry/SettingDialog.vue";var L1=x1.exports,E1=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-modal-window",{ref:"win",staticClass:"docker-package-win",attrs:{"syno-id":"registry-edit-window",width:500,height:470,title:e._TT("registry","edit_registry"),"before-close":e.cancel}},[i("v-panel",{attrs:{"syno-id":"registry-edit-panel",confirm:e.confirm,cancel:e.close},scopedSlots:e._u([{key:"scroll-body",fn:function(){return[i("v-form",{ref:"form",attrs:{"syno-id":"registry-edit-form",rules:e.rules}},[i("v-fieldset",{attrs:{title:e._TT("registry","site_info"),collapsible:!1}},[i("v-form-item",{attrs:{prop:"fields.name",label:e._TT("registry","registry_name")+e._T("common","colon"),textonly:e.isDockerHub}},[e.isDockerHub?[e._v("\n                            "+e._s(e.fields.name)+"\n                        ")]:i("v-input",{attrs:{"syno-id":"registry-name-input",name:"name"},model:{value:e.fields.name,callback:function(t){e.$set(e.fields,"name",t)},expression:"fields.name"}})],2),e._v(" "),i("v-form-item",{attrs:{prop:"fields.url",label:e._TT("registry","registry_url")+e._T("common","colon"),textonly:e.isDockerHub}},[e.isDockerHub?[e._v("\n                            "+e._s(e.fields.url)+"\n                        ")]:i("v-input",{attrs:{"syno-id":"registry-url-input",name:"url"},model:{value:e.fields.url,callback:function(t){e.$set(e.fields,"url",t)},expression:"fields.url"}})],2),e._v(" "),e.isDockerHub?[i("v-form-item",{attrs:{prop:"fields.enable_registry_mirror","hide-label":""}},[i("v-checkbox",{attrs:{"syno-id":"enable-registry-mirror-checkbox"},model:{value:e.fields.enable_registry_mirror,callback:function(t){e.$set(e.fields,"enable_registry_mirror",t)},expression:"fields.enable_registry_mirror"}},[e._v("\n                                "+e._s(e._TT("registry","enable_registry_mirror")))])],1),e._v(" "),e.fields.enable_registry_mirror?i("v-incremental-form-multiple-item",{ref:"multiple-item",staticClass:"registry-mirror-urls",attrs:{indent:1,label:e._TT("registry","mirror_url")+e._T("common","colon"),items:e.fields.mirror_urls,"min-items-length":0,"max-items-length":10,"add-text":e._T("common","add")},on:{"update:items":function(t){return e.$set(e.fields,"mirror_urls",t)},"add-item":e.onAddMirror},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.item;return[i("v-col",{attrs:{flex:"initial"}},[i("v-form-item",{attrs:{prop:"mirror"}},[i("v-input",{attrs:{"syno-id":"registry-mirror-urls-input"},model:{value:n.url,callback:function(t){e.$set(n,"url",t)},expression:"item.url"}})],1)],1)]}}],null,!1,2068527730)}):e._e()]:e._e(),e._v(" "),i("v-form-item",{attrs:{prop:"fields.enable_trust_SSC","hide-label":""}},[i("v-checkbox",{attrs:{"syno-id":"enable-trust-SSC-checkbox"},model:{value:e.fields.enable_trust_SSC,callback:function(t){e.$set(e.fields,"enable_trust_SSC",t)},expression:"fields.enable_trust_SSC"}},[e._v("\n                            "+e._s(e._TT("registry","trust_ssc")))])],1)],2),e._v(" "),e.isDockerHub?e._e():i("v-fieldset",{attrs:{title:e._TT("registry","login_info"),collapsible:!1}},[i("v-form-item",{attrs:{prop:"fields.username",label:e._TT("registry","username_optional")+e._T("common","colon")}},[i("v-input",{attrs:{"syno-id":"username-input",name:"username"},model:{value:e.fields.username,callback:function(t){e.$set(e.fields,"username",t)},expression:"fields.username"}})],1),e._v(" "),i("v-form-item",{attrs:{prop:"fields.password",label:e._TT("registry","password_optional")+e._T("common","colon")}},[i("v-input",{attrs:{type:"password","syno-id":"pwd-input",name:"password","show-password-visibility-icon":!1},nativeOn:{click:function(t){return e.onPasswordInputClick()}},model:{value:e.fields.password,callback:function(t){e.$set(e.fields,"password",t)},expression:"fields.password"}})],1)],1)],1)]},proxy:!0}])})],1)};E1._withStripped=!0;const N1="12345678";var I1={mixins:[tY],props:{registry:{type:Object},mode:{type:String,default:"edit"}},data(){let e,t="edit"===this.mode&&RZ.isDockerHubShortName(this.registry.name);if("create"===this.mode)e={name:"",url:"",enable_registry_mirror:!1,mirror_urls:[],enable_trust_SSC:!1,username:"",password:""};else{const{name:t,url:i,enable_registry_mirror:n,mirror_urls:o,enable_trust_SSC:r,username:s}=this.registry;e={name:t,url:i,enable_registry_mirror:n,mirror_urls:(e=>e?e.map((e=>({url:e}))):[])(o),enable_trust_SSC:r,username:s,password:N1}}return{fields:e,rules:{"fields.name":[{required:!t},{validator:this.nameValidator.bind(this)}],"fields.url":[t?{}:{validator:I}],mirror:[{validator:T}]}}},computed:{...(0,g.mapState)("registries",["allNames"]),isDockerHub(){return"edit"===this.mode&&RZ.isDockerHubShortName(this.registry.name)}},methods:{nameValidator(e,t,i){return"edit"===this.mode&&t===this.registry.name?i():this.allNames.includes(t)?i(new Error(this._TT("registry","conflict_name"))):i()},sliceLastSlashOfURL:function(e){let t;for(t=e.length-1;"/"==e[t];t--);return e.slice(0,t+1)},async createRegistry(){const e=this.$refs.win,t=this.fields;t.url=this.sliceLastSlashOfURL(t.url),e.setStatusBusy();try{await synowebapi.promises.request({api:"SYNO.Docker.Registry",method:"create",version:1,params:t})}catch(t){return e.clearStatus(),e.getMsgBox().alert(this._T("error","error_error"),this.getErrorMessage(t)),!1}this.$emit("registry-changed"),e.clearStatus(),e.close({forceClose:!0,payload:{success:!0,name:this.fields.name}})},async editRegistry(){const e=this.$refs.win,t={...this.fields};if(t.url=this.sliceLastSlashOfURL(t.url),t.oldname=this.registry.name,t.handle_mirror=!1,t.password=t.password===N1?"":t.password,this.isDockerHub&&(t.mirror_urls=t.enable_registry_mirror?this.fields.mirror_urls.map((e=>e.url)).map(((e="")=>e.trim())).map((e=>this.sliceLastSlashOfURL(e))):[],t.handle_mirror=this.isMirrorChanged(t,this.registry),t.handle_mirror)&&"confirm"!==await e.getMsgBox().confirm("",this._TT("registry","restart_confirm")))return!1;e.setStatusBusy();try{await synowebapi.promises.request({api:"SYNO.Docker.Registry",method:"set",version:1,params:t})}catch(t){return e.clearStatus(),e.getMsgBox().alert(this._T("error","error_error"),this.getErrorMessage(t)),!1}this.$emit("registry-changed"),e.clearStatus(),e.close({forceClose:!0,payload:{success:!0,name:this.fields.name}})},onPasswordInputClick(){this.fields.password===N1&&(this.fields.password="")},isMirrorChanged:(e={},t={})=>e.enable_registry_mirror!==t.enable_registry_mirror||!WG()(e.mirror_urls,t.mirror_urls),isDirty(){return!!this.$refs.form.isDirty()&&""!==this.fields.password},async confirm(){return!!await this.$refs.form.validate()&&("create"===this.mode?await this.createRegistry():await this.editRegistry())},async cancel(){if("create"===this.mode)return!0;if(this.isDirty())switch(await this.$refs.win.getMsgBox().confirmLostChange()){case"dont_save":return!0;case"save":return await this.confirm();default:return!1}return!0},close(){this.$refs.win.close()},onAddMirror(){this.fields.mirror_urls.push({url:""})}}},T1=(i(5396),j(I1,E1,[],!1,null,null,null));T1.options.__file="src/dialogs/Registry/EditRegistryDialog.vue";var D1=T1.exports,A1=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-modal-window",{staticClass:"docker-package docker-container-import-dialog",style:e.styles,attrs:{"syno-id":"containers-import-dialog-modal-window-0",height:"auto",width:"640",title:e._TT("container","import_settings"),"before-close":e.close}},[i("v-panel",e._b({attrs:{"syno-id":"containers-import-dialog-panel-0","confirm-text":e._TT("container","import"),"cancel-text":e._T("common","cancel"),confirm:e.confirm,cancel:function(){return e.getWindowOrAppWindow().close()}},scopedSlots:e._u([{key:"body",fn:function(){return[i("v-form",{ref:"form",staticClass:"docker-import-form",attrs:{"syno-id":"capabilities-capabilities-form-0",rules:e.rules}},[e.showLocalFileBrowser?i("v-form-item",{ref:"file-form-item",attrs:{label:e._T("common","file")},scopedSlots:e._u([{key:"label-after",fn:function(){return[i("span",{staticClass:"red-text"},[e._v("*")])]},proxy:!0}],null,!1,3320429318)},[e._v(" "),i("v-file-button",{attrs:{"syno-id":"create-step-project-create-general-button-0"},on:{files:function(t){var i=t[0];return e.filename=i}},model:{value:e.path,callback:function(t){e.path=t},expression:"path"}})],1):e._e(),e._v(" "),e.showContainerField?i("v-form-item",{attrs:{prop:"fields.container",label:e._TT("container","container_name")},scopedSlots:e._u([{key:"label-after",fn:function(){return[i("span",{staticClass:"red-text"},[e._v("*")])]},proxy:!0}],null,!1,3320429318)},[e._v(" "),i("v-input",{attrs:{"syno-id":"containers-import-dialog-input-0","max-length":64},model:{value:e.form.container,callback:function(t){e.$set(e.form,"container",t)},expression:"form.container"}})],1):e._e(),e._v(" "),e.showImageField?i("v-form-item",{attrs:{prop:"fileds.repository",label:e._TT("common","repository")},scopedSlots:e._u([{key:"label-after",fn:function(){return[i("span",{staticClass:"red-text"},[e._v("*")])]},proxy:!0}],null,!1,3320429318)},[e._v(" "),i("v-input",{attrs:{"syno-id":"containers-import-dialog-input-1","max-length":64},model:{value:e.form.repository,callback:function(t){e.$set(e.form,"repository",t)},expression:"form.repository"}})],1):e._e(),e._v(" "),e.showImageField?i("v-form-item",{attrs:{prop:"fields.tag",label:e._TT("common","tag")},scopedSlots:e._u([{key:"label-after",fn:function(){return[i("span",{staticClass:"red-text"},[e._v("*")])]},proxy:!0}],null,!1,3320429318)},[e._v(" "),i("v-input",{attrs:{"syno-id":"containers-import-dialog-input-2","max-length":64},model:{value:e.form.tag,callback:function(t){e.$set(e.form,"tag",t)},expression:"form.tag"}})],1):e._e()],1)]},proxy:!0}])},"v-panel",e.panel,!1))],1)};A1._withStripped=!0;const{WEBAPI_ERR_IMAGE_CREATE_PARSE_FAIL:O1,WEBAPI_ERR_IMAGE_LOAD_PARSE_FAIL:M1,WEBAPI_ERR_CONTAINER_IMPORT_IMAGE_ONLY:R1}=Xt;function P1(e=[],t=""){return{message:t,validator:(t,i)=>!e.includes(i)}}var F1={inject:["_ERROR_MESSAGE"],mixins:[NG],computed:{showLocalFileBrowser:()=>!0,showContainerField(){return!this.path||this.path.match(/\.json$/)||this.path.match(/\.syno\.txz$/)},showImageField(){return!this.path||!this.path.match(/\.json$/)},api(){return this.path.match(/\.json$/)?"SYNO.Docker.Container.Profile":"SYNO.Docker.Container"},formData(){const e={};return"upload"===this.method?e.filename=this.filename:e.path=this.path,this.showContainerField&&(e.container=this.form.container),this.showImageField&&(e.repository=this.form.repository,e.tag=this.form.tag),e},method:()=>"upload",webapi(){return{api:this.api,method:this.method,version:1,formData:this.formData,timeout:864e5}},image(){return`${this.form.repository}:${this.form.tag}`}},watch:{path(){this.form=this.getFormFromPath()}},data(){const e={containers:this.$store.state.containers.allNames,images:this.$store.state.images.allNames};return{rules:{"fields.container":this.getContainerNameRules(e),"fields.tag":this.getTagNameRules(e),"fileds.repository":this.getRepositoryNameRules(e)},internal:e,path:"",filename:void 0,form:this.getFormFromPath()}},methods:{...(0,g.mapActions)("containers",["fetchContainerList"]),...(0,g.mapActions)("images",["fetchImageList"]),getFormFromPath(){if(!this.path)return{container:"",tag:"",repository:""};const e=this.path.split("/").pop().replace(/\.syno\.txz$/,"").replace(/\.syno\.json$/,"").replace(/\.syno\.tar$/,"").replace(/\(/g,"-").replace(/\)/g,"");return{container:e,tag:(new Date).format("Ymd"),repository:e}},getContainerNameRules:(e={})=>[{type:"string",required:!0,pattern:/^[a-zA-Z0-9][a-zA-Z0-9_.-]+$/,message:w("common","alphanumeric")},{message:w("common","alphanumeric"),validator:(e,t)=>2<=t.length&&t.length<=64},P1(e.containers,w("error","container_name_conflict"))],getTagNameRules(e={}){return[{type:"string",required:!0,pattern:/^[a-zA-Z0-9][a-zA-Z0-9._-]+$/,range:{min:2,max:64},message:w("common","repository_tag_naming_spec")},{validator:()=>!e.images.includes(this.image),message:()=>SYNO.SDS.formatString(w("common","already_existed"),this.image)}]},getRepositoryNameRules(e={}){return[{type:"string",required:!0,pattern:/^[a-zA-Z0-9]([a-zA-Z0-9._-]*\/)?[a-zA-Z0-9._-]+$/,range:{min:2,max:64},message:w("common","image_repository_naming_spec")},{validator:()=>!e.images.includes(this.image),message:()=>SYNO.SDS.formatString(w("common","already_existed"),this.image)}]},async validate(){return(await Promise.all([this.$refs.form.validate(),this.validateFileButton()])).every((e=>e))},async validateFileButton(){const e=this.$refs["file-form-item"];return!e||(""===this.path?(e.setInvalid(_JSLIBSTR("extlang","fieldblank"),"error"),!1):(e.resetInvalid(),!0))},async confirm(){if(!await this.validate())return!1;this.getWindowOrAppWindow().setStatusBusy();try{const e=await synowebapi.promises.request(this.webapi);this.onSuccess(e)}catch(e){return this.getWindowOrAppWindow().clearStatus(),void this.onError(e)}},async onSuccess(e={}){const{conflict_port:t=[]}=e||{};if((null==t?void 0:t.length)>0){const e=1===t.length?w("error","remap_container_conflict_port"):w("error","remap_container_conflict_ports"),i=t.join(", "),n=String.format(e,i);await this.getWindowOrAppWindow().getMsgBox().alert("",n,void 0,{useHtml:!0}),await this.$nextTick()}await this.reload(),this.getWindowOrAppWindow().close({forceClose:!0,payload:{success:!0,container:this.form.container}})},async onError(e){const t=[];if([O1,M1].includes(null==e?void 0:e.code)){const e=(this.showLocalFileBrowser?this.filename.name:this.path).split(/(\\|\/)/g).pop()||"";t.push(e)}const i=this._ERROR_MESSAGE(e,t);await this.getWindowOrAppWindow().getMsgBox().alert("",i),(null==e?void 0:e.code)===R1&&(await this.reload(),this.getWindowOrAppWindow().close({forceClose:!0,payload:{success:!0}}))},async close(){if(!this.$refs.form.isDirty())return!0;const e=await this.getWindowOrAppWindow().getMsgBox().confirmLostChange();return"save"===e?await this.confirm():"dont_save"===e},async reload(){await Promise.all([this.fetchContainerList(),this.fetchImageList()])}}},B1=(i(3852),j(F1,A1,[],!1,null,null,null));B1.options.__file="src/dialogs/Containers/ImportFromLocalDialog.vue";var W1=B1.exports,V1=j({extends:W1,props:{path:{type:String,required:!0}},computed:{showLocalFileBrowser:()=>!1,method:()=>"import",webapi(){return{api:this.api,method:this.method,version:1,params:this.formData,timeout:864e5}}}},void 0,void 0,!1,null,null,null);V1.options.__file="src/dialogs/Containers/ImportFromDSMDialog.vue";var z1=V1.exports,j1=function(){var e=this,t=this,i=t.$createElement,n=t._self._c||i;return n("v-modal-window",{ref:"window",staticClass:"docker-package docker-export-container-dialog",style:t.styles,attrs:{"syno-id":"containers-export-container-dialog-modal-window-0",height:"354",width:"640",title:t._TT("container","export")+" "+t.name,"before-close":t.close}},[n("v-panel",t._b({attrs:{"syno-id":"containers-export-container-dialog-panel-0","confirm-text":t._TT("common","export"),"cancel-text":t._T("common","cancel"),confirm:t.confirm,cancel:function(){return e.$refs.window.close()}},scopedSlots:t._u([{key:"body",fn:function(){return[n("v-form",{ref:"form",attrs:{"syno-id":"containers-export-container-dialog-form-0",rules:t.rules}},[n("v-form-item",{attrs:{label:t._TT("container","export_type")},scopedSlots:t._u([{key:"description",fn:function(){return[t._v("\n                        "+t._s(t.description)+"\n                    ")]},proxy:!0}])},[n("v-single-select",{attrs:{"syno-id":"containers-export-container-dialog-single-select-0",width:"auto",options:t.options},model:{value:t.form.profileOnly,callback:function(e){t.$set(t.form,"profileOnly",e)},expression:"form.profileOnly"}})],1),t._v(" "),n("v-form-item",{attrs:{label:t._TT("container","export_target")}},[n("v-radio-group",{attrs:{"syno-id":"containers-export-container-dialog-radio-group-0"},model:{value:t.form.exportToDSM,callback:function(e){t.$set(t.form,"exportToDSM",e)},expression:"form.exportToDSM"}},[n("v-radio",{attrs:{"syno-id":"containers-export-container-dialog-radio-0",value:!0}},[t._v("\n                            "+t._s(t._TT("container","export_to_diskstation"))+"\n                        ")]),t._v(" "),n("v-form-multiple-item",{attrs:{"hide-label":"",indent:"1"}},[n("v-form-item",{staticClass:"docker-export-path-form-item",attrs:{prop:"fields.path"}},[n("v-input",{attrs:{"syno-id":"containers-export-container-dialog-input-0",readonly:!0,disabled:!t.form.exportToDSM},model:{value:t.form.path,callback:function(e){t.$set(t.form,"path",e)},expression:"form.path"}})],1),t._v(" "),n("v-form-item",[n("v-button",{attrs:{"syno-id":"containers-export-container-dialog-button-0",disabled:!t.form.exportToDSM},on:{click:t.openChooser}},[t._v("\n                                    "+t._s(t._T("mediaservice","root_directory_path"))+"\n                                ")])],1)],1),t._v(" "),n("v-radio",{attrs:{"syno-id":"containers-export-container-dialog-radio-1",value:!1,disabled:!t.form.profileOnly}},[t._v("\n                            "+t._s(t._TT("container","export_to_local"))+"\n                        ")])],1)],1)],1)]},proxy:!0}])},"v-panel",t.panel,!1))],1)};j1._withStripped=!0;const H1=[{label:w("container","container_settings"),value:!0},{label:w("container","container_settings_container"),value:!1}];var U1={inject:["_T","_TT"],mixins:[NG],props:{name:{type:String,required:!0}},watch:{"form.profileOnly"(e){!1===e&&(this.form.exportToDSM=!0)}},computed:{description(){return this.form.profileOnly?w("container","container_settings_desc"):w("container","container_settings_container_desc")},webapi(){return{api:this.form.profileOnly?"SYNO.Docker.Container.Profile":"SYNO.Docker.Container",method:"export",version:1,params:{...this.form.exportToDSM?{path:this.form.path}:{},name:this.name}}}},data:()=>({form:{profileOnly:!0,exportToDSM:!1,path:""},rules:{"fields.path":[{type:"string",required:!0,message:_T("service","warning_select_dest")}]},options:H1}),methods:{openChooser(){const e=new SYNO.SDS.Utils.FileChooser.Chooser({owner:this.getWindowOrAppWindow(),title:this._T("common","add"),folderToolbar:!0,gotoPath:"/docker",usage:{type:"chooseDir"},treeFilter:function(e,t={}){return!["/home","/homes"].includes(t.spath)},listeners:{scope:this,choose:(e,t)=>{this.form.path=t.path,e.close()}}});return e.open(),e},async validate(){return!!await this.$refs.form.validate()},async confirm(){if(!await this.validate())return!1;this.getWindowOrAppWindow().setStatusBusy();try{await synowebapi.promises.download(this.webapi),this.getWindowOrAppWindow().close({forceClose:!0,payload:{success:!0,closeChooser:!0}})}catch(e){return this.getWindowOrAppWindow().clearStatus(),void this.onError()}},async close(){if(!this.$refs.form.isDirty())return!0;const e=await this.getWindowOrAppWindow().getMsgBox().confirmLostChange();return"save"===e?await this.confirm():"dont_save"===e}}},$1=(i(609),j(U1,j1,[],!1,null,null,null));$1.options.__file="src/dialogs/Containers/ExportContainerDialog.vue";var K1=$1.exports,q1=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-modal-window",{ref:"window",staticClass:"docker-package",attrs:{"syno-id":"create-from-container-modal-window-0",width:960,height:550,title:String.format(e._TT("common","duplicate_from"),e.name),"before-close":e.close}},[i("DuplicateForm",{key:e.random,ref:"form",attrs:{name:e.name}})],1)};q1._withStripped=!0;var G1=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-panel",e._b({staticClass:"container-detail-settings",attrs:{"syno-id":"create-from-container-panel-0","confirm-text":e._TT("common","duplicate"),confirm:e.confirm,cancel:e.cancel},scopedSlots:e._u([{key:"body",fn:function(){return[i("ContainerDetailSettingsForm",{ref:"form",attrs:{profile:e.profile,internal:e.internal},on:{"update:profile":function(t){return e.profile=Object.assign({},e.profile,t)},"update:form":function(t){return e.form=Object.assign({},e.form,t)}}}),e._v(" "),i("v-checkbox",{staticClass:"run-instantly-checkbox",attrs:{"syno-id":"create-from-container-checkbox-0",disabled:e.profile.enable_service_portal},model:{value:e.form.is_run_instantly,callback:function(t){e.$set(e.form,"is_run_instantly",t)},expression:"form.is_run_instantly"}},[e._v("\n            "+e._s(e._TT("wizard","run_immediately"))+"\n        ")])]},proxy:!0}])},"v-panel",e.panel,!1))};G1._withStripped=!0;var Y1=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-scrollbar",[i("v-form",{ref:"form",attrs:{"syno-id":"detail-container-detail-settings-form-0",rules:e.rules,flex:"row"}},[i("v-fieldset",{directives:[{name:"show",rawName:"v-show",value:!e.internal.is_package,expression:"!internal.is_package"}],attrs:{title:e._T("log","general")}},[i("v-form-item",{staticClass:"docker-container-form-item-image",attrs:{textonly:"","label-flex":"200px",label:e._TT("common","image")}},[e._v("\n                "+e._s(e.profile.image)+"\n            ")]),e._v(" "),i("DuplicateContainerNameFormItem",{attrs:{"original-name":e.profile.name,profile:e.profile,internal:e.internal},on:{"update:profile":function(t){return e.$emit("update:profile",t)}}}),e._v(" "),i("UpdateGeneralFormItem",{attrs:{profile:e.profile,internal:e.internal},on:{"update:profile":function(t){return e.$emit("update:profile",t)}}}),e._v(" "),i("DuplicateServicePortalFormItem",{attrs:{profile:e.profile,internal:e.internal},on:{"update:profile":function(t){return e.$emit("update:profile",t)},"update:form":function(t){return e.$emit("update:form",t)}}})],1),e._v(" "),e._l(e.formItems,(function(t,n){return i(t,{key:n,ref:"items",refInFor:!0,tag:"component",attrs:{profile:e.profile,internal:e.internal},on:{"update:profile":function(t){return e.$emit("update:profile",t)}}})}))],2)],1)};Y1._withStripped=!0;var Z1=j({extends:lJ,props:{originalName:{type:String,required:!0}},computed:{shouldGenerateName:()=>!1,required:()=>!0},mounted(){this.updateDefaultName()},methods:{async updateDefaultName(){var e;this.$emit("update:profile",{name:this.generateNameFromOriginalName()}),await this.$nextTick(),null===(e=this.$refs)||void 0===e||e.formItem.commit()},generateNameFromOriginalName(){const e=new Set(this.internal.containers);for(let t=1;t<100;t++){const i=`${this.originalName}-${t}`;if(!e.has(i))return i}return this.originalName}}},void 0,void 0,!1,null,null,null);Z1.options.__file="src/components/FormItem/Container/ContainerNameFormItem/DuplicateContainerNameFormItem.vue";var X1=Z1.exports,J1=j({extends:pJ},void 0,void 0,!1,null,null,null);J1.options.__file="src/components/FormItem/Container/GeneralFormItem/UpdateGeneralFormItem.vue";var Q1=J1.exports,e0=function(){var e=this,t=e.$createElement,i=e._self._c||t;return e.isServicePortalEnabled?i("div",[i("v-form-item",{attrs:{textonly:"","hide-label":""}},[i("b",[e._v(e._s(e._TT("container","webportal_settings")))])]),e._v(" "),i("v-radio-group",{attrs:{"syno-id":"service-portal-form-item-duplicate-service-portal-form-item-radio-group-0"},on:{input:e.onWebportalMechanismChange},model:{value:e.webportal_inherit_mechanism,callback:function(t){e.webportal_inherit_mechanism=t},expression:"webportal_inherit_mechanism"}},[i("v-radio",{attrs:{"syno-id":"service-portal-form-item-duplicate-service-portal-form-item-radio-0",value:e.RADIOS.KEEP_WEBPORTALS}},[e._v("\n            "+e._s(e._TT("container","keep_webportal_settings"))+"\n        ")]),e._v(" "),i("v-radio",{attrs:{"syno-id":"service-portal-form-item-duplicate-service-portal-form-item-radio-1",value:e.RADIOS.SETUP_WEBPORTALS}},[e._v("\n            "+e._s(e._TT("container","setup_webportal_settings"))+"\n        ")])],1),e._v(" "),i("UpdateServicePortalFormItem",{ref:"servicePortalFormItem",attrs:{disabled:e.webportal_inherit_mechanism===e.RADIOS.KEEP_WEBPORTALS,indent:1,profile:e.profile,internal:e.internal},on:{"update:profile":function(t){return e.$emit("update:profile",t)}}})],1):e._e()};e0._withStripped=!0;var t0=j({extends:bJ,computed:{minServicePortalItemLength:()=>0},methods:{shouldSetDefaultWebPortal:()=>!1,async checkHasAvaliableWebservicePorts(){return 0!==this.avaiableServicePortalPorts.length||this.form.service_portals.length>0||(await this.getWindowOrAppWindow().getMsgBox().alert("",SYNO.SDS.formatString(w("container","ranout_webservice_port"),this.profile.name)),!1)},async onServicePortalChange({enable_service_portal:e=this.form.enable_service_portal,service_portals:t=this.form.service_portals}={}){e&&!await this.checkHasAvaliableWebservicePorts()||(this.form.service_portals=t,this.$emit("update:profile",{enable_service_portal:e,service_portals:t.map((({_key:e,protocol:t,port:i})=>({protocol:t,port:i})))}))}}},void 0,void 0,!1,null,null,null);t0.options.__file="src/components/FormItem/Container/ServicePortalFormItem/UpdateServicePortalFormItem.vue";var i0=t0.exports;const n0={KEEP_WEBPORTALS:"KEEP_WEBPORTALS",SETUP_WEBPORTALS:"SETUP_WEBPORTALS"};var o0=j({inject:["_TT"],components:{UpdateServicePortalFormItem:i0},props:{profile:{type:Object,required:!0},internal:{type:Object,required:!0}},computed:{imageTcpPorts(){var e;return((null===(e=this.internal.image)||void 0===e?void 0:e.ports)||[]).filter((({protocol:e})=>"tcp"===e)).sort(((e,t)=>e<t?1:-1)).map((({port:e})=>e))},isServicePortalEnabled(){return 0!==this.imageTcpPorts.length}},data(){const e=this.profile.service_portals||[],t=0!==e.length;return{RADIOS:n0,webportal_inherit_mechanism:n0.KEEP_WEBPORTALS,keepWebportalConfigs:{enable_service_portal:t,service_portals:e}}},methods:{onWebportalMechanismChange(e=n0.KEEP_WEBPORTALS){this.$emit("update:form",{is_webportal_inherit:e===n0.KEEP_WEBPORTALS}),e===n0.KEEP_WEBPORTALS&&this.$emit("update:profile",this.keepWebportalConfigs),e===n0.SETUP_WEBPORTALS&&this.$refs.servicePortalFormItem.onServicePortalChange()}}},e0,[],!1,null,null,null);o0.options.__file="src/components/FormItem/Container/ServicePortalFormItem/DuplicateServicePortalFormItem.vue";var r0=o0.exports,s0=j({extends:xJ,methods:{getDefaultImagePortRows:()=>[]},watch:{"profile.enable_service_portal"(){this.form=this.getFormFromProfile()},"profile.service_portals"(e,t){WG()(e,t)||(this.form=this.getFormFromProfile())}}},void 0,void 0,!1,null,null,null);s0.options.__file="src/components/FormItem/Container/PortFormItem/UpdatePortFormItem.vue";var a0=s0.exports,l0=j({extends:IJ},void 0,void 0,!1,null,null,null);l0.options.__file="src/components/FormItem/Container/VolumeFormItem/UpdateVolumeFormItem.vue";var c0=l0.exports,d0=j({extends:AJ},void 0,void 0,!1,null,null,null);d0.options.__file="src/components/FormItem/Container/EnvFormItem/UpdateEnvFormItem.vue";var h0=d0.exports,u0=j({extends:RJ},void 0,void 0,!1,null,null,null);u0.options.__file="src/components/FormItem/Container/CapabilitiesFormItem/UpdateCapabilitiesFormItem.vue";var g0=u0.exports,p0=j({extends:VJ},void 0,void 0,!1,null,null,null);p0.options.__file="src/components/FormItem/Container/LinkFormItem/UpdateLinkFormItem.vue";var m0=p0.exports,f0=j({inject:["_T","_TT"],mixins:[rJ],components:{DuplicateContainerNameFormItem:X1,UpdateGeneralFormItem:Q1,DuplicateServicePortalFormItem:r0},props:{profile:{type:Object,required:!0},internal:{type:Object,required:!0}},data:()=>({formItems:[a0,c0,h0,g0,KJ,HJ,m0]}),methods:{isDirty(){return!!this.$refs.form.isDirty()||(this.$refs.items||[]).some((e=>e.isDirty&&e.isDirty()))},async validate(){return await this.$refs.form.validate()},commit(){this.$refs.form.commit(),(this.$refs.items||[]).some((e=>e.commit&&e.commit()))}}},Y1,[],!1,null,null,null);f0.options.__file="src/pages/Container/Detail/ContainerDetailSettings/ContainerDetailSettingsForm.vue";var _0=f0.exports;const{WEBAPI_ERR_DOCKER_API_FAIL_LOG:v0}=Xt;var b0=j({inject:["_TT","_ERROR_MESSAGE","getWindowOrAppWindow"],components:{ContainerDetailSettingsForm:_0},mixins:[NG],props:{name:{type:String,required:!0}},watch:{"profile.enable_service_portal"(){this.profile.enable_service_portal&&(this.form.is_run_instantly=!0)}},data(){return{profile:this.getInitialProfile(),internal:this.getDefaultInternal(),form:{is_webportal_inherit:!0,duplicate_from:this.name,is_run_instantly:!0}}},methods:{...(0,g.mapActions)("containers",["stopContainerList"]),getInitialProfile(){const e=BJ()(this.$store.state.containers.byName[this.name].profile),t=e.service_portals||[],i=0!==t.length;return{...cn()(e,["network_mode"]),service_portals:t,enable_service_portal:i}},getDefaultInternal(){return{system:_()(this.$store.state,"system.system"),containers:_()(this.$store.state,"containers.allNames"),image:_()(this.$store.getters,`containers/byName/${this.name}/image`),networks:this.$store.getters["networks/rows"],is_package:_()(this.$store.getters,`containers/byName/${this.name}/is_package`),editable:!0}},isDirty(){return this.$refs.form.isDirty()},async validate(){return await this.$refs.form.validate()},async confirm(){if(this.loading(),!await this.validate()){const e=v("common","forminvalid");return await this.getWindowOrAppWindow().getMsgBox().alert("",e),this.loading(!1),!1}const e=ZJ(this.profile);if(!await this.stopParentContainerIfNeeded(e))return this.loading(!1),!1;try{const t=await synowebapi.promises.request({api:"SYNO.Docker.Container",method:"create",version:1,params:{...this.form,profile:e}});this.onSuccess(t)}catch(e){return this.onError(e),!1}return!0},cancel(){var e,t;null===(e=this.$refs.form)||void 0===e||null===(t=e.form)||void 0===t||t.resetFields(),this.forceRerender()},async stopParentContainerIfNeeded(e={}){if(!await this.isParentContainerRunning())return!0;const{hasConflict:t,conflictPort:i}=await this.checkParentContainerPortConflict(e);if(!t)return!0;if("confirm"!==await this.getWindowOrAppWindow().getMsgBox().confirm("",String.format(w("container","confirm_stop_parent_container"),i,this.name,e.name),{confirm:{text:w("common","continue")}},{useHtml:!0}))return!1;try{await this.stopContainerList([this.name])}catch(e){const t=this._ERROR_MESSAGE(e);return await this.getWindowOrAppWindow().getMsgBox().alert("",t),!1}return!0},async isParentContainerRunning(){return _()(this.$store.getters,`containers/byName/${this.name}/running`)},async checkParentContainerPortConflict(e={}){const t=_()(this.$store.state,`containers.byName.${this.name}.profile.port_bindings`,[]).reduce(((e,{host_port:t,type:i})=>t?e.add(`${t}/${i}`):e),new Set);for(const{host_port:i,type:n}of e.port_bindings||[])if(t.has(`${i}/${n}`))return{hasConflict:!0,conflictPort:i};return{hasConflict:!1,conflictPort:0}},async goWebStationIfNeeded({services:e=[]}){return 0!==(e||[]).length&&(await this.getWindowOrAppWindow().getMsgBox().alert("",SYNO.SDS.formatString(w("wizard","edit_go_webstation_alert"),this.profile.name),void 0,{useHtml:!0}),SYNO.SDS.AppLaunch("SYNO.SDS.WebStation.Application",{wizard:"create_service_portal",category:"Docker",services:e}),!0)},async onSuccess({services:e=[]}={}){this.displaySuccess(),this.name!==this.profile.name&&this.$emit("set-page",{page:ii.CONTAINER_DETAIL,name:this.profile.name}),await this.goWebStationIfNeeded({services:e}),await this.getWindowOrAppWindow().close({forceClose:!0,payload:{success:!0}})},async onError(e={}){this.loading(!1);const{code:t}=e,i=this._ERROR_MESSAGE(e);await this.getWindowOrAppWindow().getMsgBox().alert("",i),t!==v0||this.getWindowOrAppWindow().close()}}},G1,[],!1,null,null,null);b0.options.__file="src/dialogs/Containers/DuplicateContainerDialog/DuplicateContainerForm.vue";var w0=b0.exports,y0=j({props:{name:{type:String,required:!0}},mixins:[Qi],components:{DuplicateForm:w0},watch:{api_status(e){e===ui.SUCCESS&&this.forceRerender()}},computed:{...Oi((({name:e})=>`containers/byName/${e}`),["api_status","loading"]),...Mi((({name:e})=>`containers/byName/${e}`),["imageKey"])},mounted(){this.load()},methods:{...(0,g.mapActions)("containers",["registerContainer","fetchContainerDetail"]),...(0,g.mapActions)("images",["fetchImageDetail"]),async load(){try{await this.fetchContainerDetail({name:this.name}),await this.$nextTick(),await this.fetchImageDetail(this.imageKey)}catch(e){const t=this._ERROR_MESSAGE(e);await this.getWindowOrAppWindow().getMsgBox().alert("",t)}},async confirmLostChange(){if(!d()(this,"$refs.form.isDirty")||!d()(this,"$refs.form.confirm"))return!0;const{isDirty:e,confirm:t}=this.$refs.form;if(!u()(e)||!u()(t))return!0;if(!e())return!0;const i=await this.getWindowOrAppWindow().getMsgBox().confirmLostChange();return"save"===i?await t():"dont_save"===i},async close(){return await this.confirmLostChange()}}},q1,[],!1,null,null,null);y0.options.__file="src/dialogs/Containers/DuplicateContainerDialog/DuplicateContainerDialog.vue";var C0=y0.exports,S0=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-modal-window",{staticClass:"docker-package",attrs:{"syno-id":"containers-container-terminals-dialog-modal-window-0",width:"930",height:"580",resizable:"",title:e._TT("container_detail","terminal"),"before-close":e.close},on:{resize:e.resize}},[i("div",{staticClass:"docker-terminal-panel-wrapper"},[i("div",{ref:"panel"})])])};S0._withStripped=!0;var k0={props:{name:{type:String,required:!0}},computed:{...Mi((({name:e})=>`containers/byName/${e}`),["terminalable"])},async mounted(){await this.$nextTick(),this.initialize()},beforeDestroy(){this.$options.panel.fireEvent("beforedeactivate"),this.$options.panel.fireEvent("windeactivate"),this.$options.panel.fireEvent("beforedestroy"),this.$options.panel.destroy()},methods:{async initialize(){const e=this.getWindow(),t=e.$options.owner,i=e;i.isRunning=()=>this.terminalable;const n=new SYNO.SDS.Docker.ContainerDetail.PanelTerm({renderTo:this.$refs.panel,height:524,owner:i,appWin:{...t,getContainerName:()=>this.name}});n.fireEvent("activate"),n.fireEvent("winactivate"),n.fireEvent("infoready"),this.$options.panel=n},async resize({height:e,width:t}={}){if(!e||!t)return;const i=this.$options.panel;i&&i.setSize(t-32,e-40-16)},async close(){return this.$options.panel.isNeedShowCloseConfirm()&&"confirm"===await this.getWindow().getMsgBox().confirm("",w("container_detail","term_close_all_confirm"))&&this.$options.panel.closeAllTerm(),!0}}},x0=(i(5719),j(k0,S0,[],!1,null,null,null));x0.options.__file="src/dialogs/Containers/ContainerTerminalDialog.vue";var L0=x0.exports,E0=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-modal-window",{staticClass:"docker-package",attrs:{"syno-id":"containers-container-terminals-dialog-modal-window-0",width:"740",height:"520",title:e.title,"before-close":e.close}},[i("container-settings",{key:e.random,ref:"settings",attrs:{name:e.name}})],1)};E0._withStripped=!0;var N0=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-panel",e._b({staticClass:"container-detail-settings",attrs:{"syno-id":"detail-container-detail-settings-panel-0",confirm:e.confirm,cancel:e.cancel},scopedSlots:e._u([{key:"body",fn:function(){return[i("v-alert-bar",{attrs:{"syno-id":"detail-container-detail-settings-alert-bar-0",icon:"info",text:e.alertDuplicateSettingsContent},nativeOn:{click:function(t){return e.onAlertBarClick.apply(null,arguments)}}}),e._v(" "),i("container-settings-form",{key:e.random,ref:"form",attrs:{profile:e.profile,internal:e.internal},on:{"update:profile":e.onUpdateProfile}})]},proxy:!0}])},"v-panel",e.panel,!1))};N0._withStripped=!0;var I0=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-form",{ref:"form",attrs:{"syno-id":"detail-container-detail-settings-form-0",rules:e.rules,flex:"row"}},[i("v-form-item",{staticClass:"docker-container-form-item-image",attrs:{textonly:"","label-flex":"200px",label:e._TT("common","image")}},[e._v("\n        "+e._s(e.profile.image)+"\n    ")]),e._v(" "),i("UpdateContainerNameFormItem",{attrs:{profile:e.profile,internal:e.internal},on:{"update:profile":function(t){return e.$emit("update:profile",t)}}}),e._v(" "),i("UpdateGeneralFormItem",{attrs:{profile:e.profile,internal:e.internal},on:{"update:profile":function(t){return e.$emit("update:profile",t)}}}),e._v(" "),i("UpdateServicePortalFormItem",{attrs:{profile:e.profile,internal:e.internal},on:{"update:profile":function(t){return e.$emit("update:profile",t)}}})],1)};I0._withStripped=!0;var T0=j({extends:lJ,computed:{shouldGenerateName:()=>!1,required:()=>!1}},void 0,void 0,!1,null,null,null);T0.options.__file="src/components/FormItem/Container/ContainerNameFormItem/UpdateContainerNameFormItem.vue";var D0=j({inject:["_T","_TT"],mixins:[rJ],components:{UpdateContainerNameFormItem:T0.exports,UpdateGeneralFormItem:Q1,UpdateServicePortalFormItem:i0},props:{profile:{type:Object,required:!0},internal:{type:Object,required:!0}},methods:{isDirty(){return!!this.$refs.form.isDirty()||(this.$refs.items||[]).some((e=>e.isDirty&&e.isDirty()))},async validate(){return await this.$refs.form.validate()},commit(){this.$refs.form.commit(),(this.$refs.items||[]).some((e=>e.commit&&e.commit()))}}},I0,[],!1,null,null,null);D0.options.__file="src/dialogs/Containers/ContainerSettingsDialog/ContainerSetingsForm.vue";var A0={inject:["_T","_TT","_ERROR_MESSAGE","getAppWindow","getWindowOrAppWindow"],mixins:[NG,Qi,yY],components:{ContainerSettingsForm:D0.exports},props:{name:{type:String,required:!0}},computed:{...(0,g.mapState)("system",["system"]),...(0,g.mapState)("containers",{containers:"allNames"}),...Mi((({name:e})=>`containers/byName/${e}`),["image","editable"]),alertDuplicateSettingsContent:()=>String.format(w("container","alert_duplicate_settings"),['<span class="hyperlink" @click="openDuplicateDialog()">',w("common","duplicate"),"</span>"].join(""))},watch:{editable(e){this.internal.editable=e},system(e){this.internal.system=e},containers(e=[]){this.internal.containers=e.filter((e=>e!==this.name))},image(e){this.internal.image=e}},data(){const e=this.getInitialProfile();return{profile:e,origProfile:BJ()(e),internal:this.getDefaultInternal()}},methods:{...Ri((({name:e})=>`containers/byName/${e}`),{updateContainer:"update"}),getInitialProfile(){return BJ()(this.$store.state.containers.byName[this.name].profile)},getDefaultInternal(){return{system:_()(this.$store.state,"system.system"),containers:_()(this.$store.state,"containers.allNames").filter((e=>e!==this.name)),image:_()(this.$store.getters,`containers/byName/${this.name}/image`),is_package:_()(this.$store.getters,`containers/byName/${this.name}/is_package`),editable:_()(this.$store.getters,`containers/byName/${this.name}/editable`,!0)}},onUpdateProfile(e={}){this.profile={...this.profile,...e}},onAlertBarClick(e){e.target.classList.contains("hyperlink")&&this.openDuplicateDialog(this.name)},async checkWebServiceUnregister(){const{enable_service_portal:e}=this.profile,{enable_service_portal:t}=this.origProfile;return!(t&&!e&&"confirm"!==await this.getWindowOrAppWindow().getMsgBox().confirm("",this._TT("container","unregister_webservice_alert"),{confirm:{text:this._TT("common","unregister")}}))},isDirty(){return this.$refs.form.isDirty()},async validate(){return await this.$refs.form.validate()},async confirm(){if(this.loading(),!this.isDirty())return this.loading(!1),this.displayError(_T("error","nochange_subject")),!0;if(!await this.validate()){this.loading(!1);const e=_T("common","forminvalid");return await this.getWindowOrAppWindow().getMsgBox().alert("",e),!1}if(!await this.checkWebServiceUnregister())return this.loading(!1),!1;try{const e=await this.updateContainer({name:this.name,profile:this.profile});this.$refs.form.commit(),this.onSuccess(e)}catch(e){this.loading(!1);const t=this._ERROR_MESSAGE(e);return await this.getWindowOrAppWindow().getMsgBox().alert("",t),!1}return!0},cancel(){var e,t;null===(e=this.$refs.form)||void 0===e||null===(t=e.$refs)||void 0===t||t.form.resetFields(),this.forceRerender()},async goWebStationIfNeeded({services:e=[]}){return 0!==(e||[]).length&&(await this.getWindowOrAppWindow().getMsgBox().alert("",SYNO.SDS.formatString(w("wizard","edit_go_webstation_alert"),this.profile.name),void 0,{useHtml:!0}),SYNO.SDS.AppLaunch("SYNO.SDS.WebStation.Application",{wizard:"create_service_portal",category:"Docker",services:e}),!0)},async onSuccess({services:e=[]}={}){this.displaySuccess(),this.name!==this.profile.name&&this.$emit("set-page",{page:ii.CONTAINER_DETAIL,name:this.profile.name}),await this.goWebStationIfNeeded({services:e}),await this.getWindowOrAppWindow().close({forceClose:!0,payload:{success:!0,name:this.profile.name}})}}},O0=(i(9017),j(A0,N0,[],!1,null,null,null));O0.options.__file="src/dialogs/Containers/ContainerSettingsDialog/ContainerSettings.vue";var M0=j({inject:["ICON_NAME","getWindowOrAppWindow","_TT","_ERROR_MESSAGE"],mixins:[Qi],components:{ContainerSettings:O0.exports},props:{name:{type:String,required:!0}},watch:{async name(){await this.registerContainer({name:this.name}),await this.load()},api_status(e){e===ui.SUCCESS&&this.forceRerender()}},computed:{...Oi((({name:e})=>`containers/byName/${e}`),["api_status","loading"]),...Mi((({name:e})=>`containers/byName/${e}`),["imageKey"]),title(){return String.format(w("container","title_settings"),this.name)}},mounted(){this.load()},methods:{...(0,g.mapActions)("containers",["registerContainer","fetchContainerDetail"]),...(0,g.mapActions)("images",["fetchImageDetail"]),async load(){try{await this.fetchContainerDetail({name:this.name}),await this.$nextTick(),await this.fetchImageDetail(this.imageKey)}catch(e){const t=this._ERROR_MESSAGE(e);await this.getWindowOrAppWindow().getMsgBox().alert("",t)}},async confirmLostChange(){if(!d()(this,"$refs.settings.isDirty")||!d()(this,"$refs.settings.confirm"))return!0;const{isDirty:e,confirm:t}=this.$refs.settings;if(!u()(e)||!u()(t))return!0;if(!e())return!0;const i=await this.getWindowOrAppWindow().getMsgBox().confirmLostChange();return"save"===i?await t():"dont_save"===i},async close(){return await this.confirmLostChange()}}},E0,[],!1,null,null,null);M0.options.__file="src/dialogs/Containers/ContainerSettingsDialog/ContainerSettingsDialog.vue";var R0=M0.exports,P0=function(){var e=this,t=this,i=t.$createElement,n=t._self._c||i;return n("v-modal-window",{ref:"window",staticClass:"docker-package",style:t.styles,attrs:{"syno-id":"image-update-dialog-modal-window-0",height:"500",width:"600",title:t._TT("image","update_image")}},[n("v-panel",t._b({staticClass:"image-update-dialog-panel",attrs:{"syno-id":"image-update-dialog-panel-0","confirm-text":t._TT("image","update_button"),"cancel-text":t._T("common","cancel"),confirm:t.confirm,cancel:function(){return e.$refs.window.close()}},scopedSlots:t._u([{key:"body",fn:function(){return[n("v-form",{staticClass:"image-update-form",attrs:{"syno-id":"image-update-form-0"}},[n("v-form-item",{attrs:{label:t._TT("common","image"),textonly:""}},[t._v("\n                    "+t._s(t.imageRow.repository)+"\n                ")]),t._v(" "),n("v-form-item",{attrs:{label:t._TT("image","current_tag"),textonly:""}},[t._v("\n                    "+t._s(t.imageRow.tag)+" ("),n("span",{staticClass:"shastr"},[t._v(t._s(t.shaStr(t.imageRow.digest)))]),t._v(")\n                ")]),t._v(" "),n("v-form-item",{attrs:{label:t._TT("image","new_tag"),textonly:""}},[t._v("\n                    "+t._s(t.imageRow.tag)+"\n                ")]),t._v(" "),n("v-form-item",{attrs:{label:t._TT("image","tag_detail"),textonly:""}},[n("a",{staticClass:"link",attrs:{href:t.linkUrl(),target:"_blank"}},[t._v(t._s(t._TT("image","tag_detail_content")))])]),t._v(" "),n("v-form-item",{attrs:{textonly:"","hide-label":"","aria-readonly":""}},[t._v("\n                    "+t._s(t._TT("image","update_image_warn")+t._T("common","colon"))+"\n                    "),n("ul",[n("li",[t._v("\n                            "+t._s(t._TT("image","update_image_warn_service"))+"\n                        ")]),t._v(" "),n("li",[t._v("\n                            "+t._s(t._TT("image","update_image_warn_data"))+"\n                        ")])])])],1),t._v(" "),n("v-data-table",{staticClass:"image-update-dialog-container-data-table",attrs:{"syno-id":"image-update-dialog-container-data-table-0",pagination:!1,"multiple-selected":!1,columns:t.columns,"current-data":t.rows,"local-sort-func":t.containerLocalSortFunc},on:{refresh:function(e){return t.load()}},scopedSlots:t._u([{key:"status",fn:function(e){var i=e.row;return[n("Dot",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.getContainerStatusTooltip(i),expression:"getContainerStatusTooltip(row)"}],attrs:{color:t.getContainerStatusColor(i),type:t.getContainerStatusType(i)}})]}},{key:"name",fn:function(e){var i=e.row.name;return[n("span",[t._v("\n                        "+t._s(i)+"\n                    ")])]}}])})]},proxy:!0}])},"v-panel",t.panel,!1))],1)};P0._withStripped=!0;var F0={inject:["_T","_TT"],components:{Dot:se},mixins:[NG,qZ,_i],props:{name:{type:String,required:!0}},computed:{...(0,g.mapGetters)("images",["getImageContainerNames","getImageRow"]),containerNames(){return this.getImageContainerNames(this.name)},imageRow(){return this.getImageRow(this.name)},rows(){return this.containerNames.map((e=>this.$store.getters[`containers/byName/${e}/row`]))},data:()=>({}),columns:()=>[{title:w("common","container"),field:"name",width:200},{title:v("common","status"),field:"status",align:"center",width:72}]},methods:{...(0,g.mapActions)("containers",["fetchContainerList"]),async load(){try{await this.fetchContainerList()}catch(e){const t=this._ERROR_MESSAGE(e);await this.getWindowOrAppWindow().getMsgBox().alert("",t)}},async confirm(){return"confirm"==await this.getWindowOrAppWindow().getMsgBox().confirm("",w("image","update_confirm"),{confirm:{text:w("image","update_button")}})&&(this.getWindowOrAppWindow().close({forceClose:!0,payload:{confirm:!0}}),!0)},linkUrl(){return RZ.formDockerHubTagUrl(this.imageRow.repository)},shaStr(e=""){if(!e)return"";let t=e.search(":");return-1!=t?e.substring(t+1):e}}},B0=(i(7437),j(F0,P0,[],!1,null,null,null));B0.options.__file="src/dialogs/Images/UpgradeImageDialog.vue";var W0=B0.exports,V0=function(){var e=this,t=this,i=t.$createElement,n=t._self._c||i;return n("v-modal-window",{ref:"window",staticClass:"docker-package docker-image-import-dialog",style:t.styles,attrs:{"syno-id":"image-import-from-url-dialog-modal-window-0",height:"272",width:"640",title:t._TT("image","add_from_url"),"before-close":t.beforeClose}},[n("v-panel",t._b({attrs:{"syno-id":"image-import-from-url-dialog-panel-0","confirm-text":t._TT("container","import"),"cancel-text":t._T("common","cancel"),confirm:t.confirm,cancel:function(){return e.$refs.window.close()}},scopedSlots:t._u([{key:"body",fn:function(){return[n("v-form",{ref:"form",staticClass:"docker-import-form",attrs:{"syno-id":"image-import-from-url-dialog-form-0",rules:t.rules}},[n("v-form-item",{attrs:{label:t._TT("image","image_url_instruction"),prop:"fields.url"},scopedSlots:t._u([{key:"label-after",fn:function(){return[n("span",{staticClass:"red-text"},[t._v("*")])]},proxy:!0}])},[n("v-input",{attrs:{"syno-id":"image-import-from-url-dialog-input-0"},model:{value:t.form.url,callback:function(e){t.$set(t.form,"url",e)},expression:"form.url"}})],1),t._v(" "),n("v-form-item",{attrs:{label:t._T("common","username")}},[n("v-input",{attrs:{"syno-id":"image-import-from-url-dialog-input-1"},model:{value:t.form.username,callback:function(e){t.$set(t.form,"username",e)},expression:"form.username"}})],1),t._v(" "),n("v-form-item",{attrs:{label:t._T("common","password")}},[n("v-input",{attrs:{"syno-id":"image-import-from-url-dialog-input-2",type:"password"},model:{value:t.form.password,callback:function(e){t.$set(t.form,"password",e)},expression:"form.password"}})],1),t._v(" "),n("v-form-item",{attrs:{"hide-label":""}},[n("v-checkbox",{attrs:{"syno-id":"image-import-from-url-dialog-checkbox-0"},model:{value:t.form.enable_trust_SSC,callback:function(e){t.$set(t.form,"enable_trust_SSC",e)},expression:"form.enable_trust_SSC"}},[t._v("\n                        "+t._s(t._TT("registry","trust_ssc"))+"\n                    ")])],1)],1)]},proxy:!0}])},"v-panel",t.panel,!1))],1)};V0._withStripped=!0;var z0={inject:["_TT"],mixins:[NG],computed:{query(){let e,t,{url:i=""}=this.form;i.includes("https://hub.docker.com")&&(i=i.replace("https://hub.docker.com","https://registry.hub.docker.com")),(t=i.match(SYNO.SDS.Docker.Utils.DockerHub.repoRegex))?(i=t[1],e=t[2].replace(/^_\//,"")):Ext.form.VTypes.url(i)&&(t=i.match(/(.*)v1\/repositories\/([A-Za-z0-9_-]+\/?[A-Za-z0-9_-]*)\/?$/))?(i=t[1],e=t[2]):(t=i.match(/^([A-Za-z0-9_-]+\/?[A-Za-z0-9_-]*)\/?$/))?(i="https://"+SYNO.SDS.Docker.Utils.DockerHub.domain,e=t[1]):(t=i.match(/^((?:https?:\/\/)?[^/]*)\/([A-Za-z0-9_-]+\/?[A-Za-z0-9_-]*)\/?$/))&&(i=/^http/.test(t[1])?t[1]:"http://"+t[1],e=t[2]);const{username:n,password:o,enable_trust_SSC:r}=this.form;return{url:i,repo:e,username:n,password:o,enable_trust_SSC:r}}},data:()=>({rules:{"fields.url":[{type:"string",required:!0}]},form:{url:"",username:"",password:"",enable_trust_SSC:!1}}),methods:{...(0,g.mapActions)("images",["fetchImageList"]),async validate(){if(!await this.$refs.form.validate())return!1;const{url:e,repo:t}=this.query;return!(!e||!t)||(this.getWindowOrAppWindow().getMsgBox().alert("",SYNO.SDS.formatString(w("image","invalid_registry_url"),this.form.url)),!1)},async beforeClose(){if(!this.$refs.form.isDirty())return!0;const e=await this.$refs.window.getMsgBox().confirmLostChange();return"save"===e?await this.confirm():"dont_save"===e},async confirm(){return!!await this.validate()&&(this.getWindowOrAppWindow().setStatusBusy(),this.openTagDialog().on("close",(()=>{this.getWindowOrAppWindow().clearStatus()})),!0)},openTagDialog(){const e=new SYNO.SDS.Docker.Registry.TagDialog({owner:this.$refs.window,query:this.query,chooseHandler:(...e)=>this.onTagChoose(...e)});return e.open(),e},async onTagChoose({repo:e,url:t},i){const{username:n,password:o}=this.form,r=await synowebapi.promises.request({api:"SYNO.Docker.Image",method:"pull_start",version:1,params:{tag:i,repository:e,registry:t,username:n,password:o}});return await this.fetchImageList(),this.$refs.window.close({forceClose:!0,payload:{success:!0,image:`${e}:${i}`}}),r}}},j0=(i(5393),j(z0,V0,[],!1,null,null,null));j0.options.__file="src/dialogs/Images/ImportFromUrlDialog.vue";var H0=j0.exports,U0={provide:{isChinaRegion:"Beijing"===_S("timezone"),...cn()(n,["default"])}},$0=i(8804),K0=i.n($0),q0=i(4061),G0=i.n(q0);function Y0(e,t){const i=_()(t,"cpu_usage.total_usage"),n=_()(t,"system_cpu_usage");if(!i||!n)return 0;const o=_()(e,"cpu_usage.total_usage"),r=_()(e,"system_cpu_usage");if(!o||!r)return 0;const s=_()(e,"online_cpus");if(!s)return 0;const a=o-i,l=r-n;if(a<=0||l<=0)return 0;const c=a/l*s*100;return Number.isNaN(c)?0:c}function Z0(e){const t=_()(e,"memory_stats.usage",0),i=_()(e,"memory_stats.stats.total_inactive_file");if(i&&i<t)return t-i;const n=_()(e,"memory_stats.stats.inactive_file",0);return n<t?t-n:t}function X0(e){return G0()(e.networks,((e,{rx_bytes:t})=>e+t),0)}function J0(e){var t,i;return(null===(t=_()(e,"blkio_stats.io_service_bytes_recursive"))||void 0===t||null===(i=t.find((({op:e})=>"read"===e)))||void 0===i?void 0:i.value)||0}function Q0(e){var t,i;return(null===(t=_()(e,"blkio_stats.io_service_bytes_recursive"))||void 0===t||null===(i=t.find((({op:e})=>"write"===e)))||void 0===i?void 0:i.value)||0}const e2={SET_LOADED:"SET_LOADED",SET_SUMMARY:"SET_SUMMARY",SET_SUCCESS:"SET_SUCCESS",SET_ERROR:"SET_ERROR",SET_CONTAINER_DETAIL_LOADING:"SET_CONTAINER_DETAIL_LOADING",SET_CONTAINER_DETAIL_SUCCESS:"SET_CONTAINER_DETAIL_SUCCESS",SET_CONTAINER_DETAIL_ERROR:"SET_CONTAINER_DETAIL_ERROR",SET_PROCESSES:"SET_PROCESSES"};function t2(e={}){const t="https:"===window.location.protocol;try{switch(e.type){case"server":return d()(window,"SYNO.SDS.WebStation.Util.genPortalLink")?SYNO.SDS.WebStation.Util.genPortalLink(e):null;case"alias":return d()(window,"SYNO.SDS.WebStation.Util.genAliasLink")?SYNO.SDS.WebStation.Util.genAliasLink(t,e.alias||""):null;default:return null}}catch(e){return console.error("[genPortalLink]",e),null}}const{SET_SUMMARY:i2,SET_CONTAINER_DETAIL_LOADING:n2,SET_CONTAINER_DETAIL_SUCCESS:o2,SET_CONTAINER_DETAIL_ERROR:r2,SET_PROCESSES:s2}=e2;var a2={namespaced:!0,state:()=>({api_status:ui.LOADING,loading:!1,deleting:!1,name:"",summary:{},profile:{},details:{},processes:[],statsTimestamps:[],statsByTimestamp:{}}),getters:{row:({loading:e,deleting:t,summary:{id:i,name:n,image:o,created:r}},{is_package:s,status:a,imageName:l,imageKey:c,project:d,exitCode:h,error:u,up_time:g,humanUpFor:p,humanUpTime:m,links:f,running:_,exporting:v,latestHealthLog:b,stats:{cpu:w=0,ram:y=0}})=>({id:i,loading:e,deleting:t,status:a,name:n,image:o,imageName:l,imageKey:c,project:d,exitCode:h,error:u,up_time:g,created:r,humanUpFor:p,humanUpTime:m,links:f,is_package:s,running:_,exporting:v,latestHealthLog:b,cpu:w,ram:y}),is_package:({summary:{is_package:e}},{project:t})=>!!e||!(null==t||!t.is_package),running:(e,{status:t})=>{switch(t){case oi.RUNNING:case oi.RUNNING_HEALTHY:case oi.RUNNING_UNHEALTHY:case oi.RESTARTING:return!0;default:return!1}},historyOfStats:({statsTimestamps:e,statsByTimestamp:t})=>e.map((e=>({time:e,...t[e]}))),stats:(e,{historyOfStats:t})=>t[t.length-1]||{},status:({summary:e})=>{const t=_()(e,["Labels","com.docker.compose.project.working_dir"],"").includes("WebStation");return _()(e,"State.Error")?oi.FAIL_TO_RUN:t&&_()(e,"State.ExitCode")?oi.STOPPED_ERROR_EXIT:"created"===_()(e,"State.Status")?oi.CREATED:"running"===_()(e,"State.Status")?"healthy"===_()(e,"State.Health.Status")?oi.RUNNING_HEALTHY:"unhealthy"===_()(e,"State.Health.Status")?oi.RUNNING_UNHEALTHY:oi.RUNNING:"restarting"===_()(e,"State.Status")?oi.RESTARTING:oi.STOPPED},latestHealthLog:({summary:e})=>{var t;const i=_()(e,"State.Health.Log",[]);return(null===(t=i[i.length-1])||void 0===t?void 0:t.Output)||""},exitCode:({summary:e})=>_()(e,"State.ExitCode")||0,error:({summary:e})=>_()(e,"State.Error")||w("container","error_exit_description"),time:(e,{stats:{time:t}})=>t,imageName:(e,{imageKey:t=""})=>{const[i]=t.split("|");return i||"-"},imageKey:({summary:e},t,{images:i})=>{const n=_()(e,"Image","");if(n.startsWith("sha256:")){const t=i.mapImageIdToNames[e.ImageID]||[];return t.find((e=>e.includes(n)))||t[0]}if(n.includes("@sha256:")){const{tag:t}=D(n),o=i.mapImageIdToNames[e.ImageID]||[];return o.find((e=>e.includes(`:${t}`)))||o[0]}return A(e.image)},cpu:(e,{stats:{cpu:t=0}})=>t>0?`${t.toFixed(2)}%`:"-",ram:(e,{stats:{ram:t=0}})=>t>0?k(t):"-",upload:(e,{stats:{upload:t=0}})=>t>0?k(t):"-",download:(e,{stats:{download:t=0}})=>t>0?k(t):"-",networkStatText:(e,{upload:t,download:i})=>`${t} / ${i}`,read:(e,{stats:{read:t=0}})=>t>0?k(t):"-",write:(e,{stats:{write:t=0}})=>t>0?k(t):"-",disk:(e,{read:t,write:i})=>`${t} / ${i}`,rowInProject:({summary:{id:e,name:t,exporting:i},statsByTimestamp:n},{stats:{ram:o=0,cpu:r=0},status:s,time:a,imageName:l,imageKey:c,networkStatText:d,disk:h,historyOfStats:u,humanUpFor:g,exitCode:p,error:m,created:f})=>({id:e,time:a,status:s,name:t,image:l,imageKey:c,cpu:r,ram:o,network:d,disk:h,historyOfStats:u,statsByTimestamp:n,exporting:i,humanUpFor:g,exitCode:p,error:m,created:f}),project:({summary:e},t,{projects:i})=>{const n=_()(e,["Labels","com.docker.compose.project"]);if(!n)return null;const o=PY()(i.byId,(({name:e})=>e===n));if(!o)return null;const{id:r,name:s,is_package:a}=o;return{id:r,name:s,is_package:a}},portals:({summary:{enable_service_portal:e,services:t}},i,{portals:n})=>{if(!e)return[];const o=new Set((t||[]).map((({service:e})=>e)));return n.portals.filter((({service:e})=>o.has(e)))},links:(e,{portals:t})=>t.reduce(((e,t)=>{const i=t2(t);return i?[...e,i]:e}),[]),up_time:({summary:{status:e="",State:t}})=>{if("running"!==e)return 0;const i=new Date(_()(t,"StartedAt",0)).getTime();return i<=0?0:i/1e3},humanUpFor:(e,{up_time:t=0})=>{const i=Math.round(Date.now()/1e3-t);if(t<=0)return"";if(i<60)return SYNO.SDS.formatString("{0} second{1}",i,i>1?"s":"");if(i<3600){const e=Math.max(Math.floor(i/60),1);return SYNO.SDS.formatString("{0} min{1}",e,e>1?"s":"")}if(i<86400){const e=Math.floor(i/60/60);return SYNO.SDS.formatString("{0} hour{1}",e,e>1?"s":"")}{const e=Math.floor(i/60/60/24);return SYNO.SDS.formatString("{0} day{1}",e,e>1?"s":"")}},humanUpTime:(e,{humanUpFor:t=""})=>t?`Up for ${t}`:"-",startable:(e,{is_package:t,running:i})=>!t&&!i,stopable:(e,{is_package:t,running:i})=>!t&&i,editable:()=>!1,deletable:(e,{is_package:t,running:i})=>!t&&!i,terminalable:(e,{is_package:t,running:i})=>!t&&i,fstopable:(e,{stopable:t})=>t,restartable:(e,{stopable:t})=>t,resetable:(e,{deletable:t})=>t,exporting:({summary:{exporting:e}})=>e,duplicateable:({summary:{exporting:e}},{is_package:t})=>!t&&!e,exportable:({summary:{exporting:e}})=>!e,settingable:(e,{is_package:t,running:i})=>!t&&!i,cpuPriortyText:({details:e})=>{const t=_()(e,"HostConfig.CpuShares")||0;return w("container",t>=90?"high":t>=50?"med":t>0?"low":"auto")},memoryLimitText:({details:e})=>{const t=_()(e,"HostConfig.Memory")||0;return t?k(t):w("container","no_limit")},networks:({details:e},t,{networks:i})=>ti()(_()(e,"NetworkSettings.Networks"),(({NetworkID:e})=>e)).map((e=>i.byId[e])).filter((e=>e)),network:(e,{networks:t})=>K0()(t),image:({profile:{image:e=""}},t,{images:i})=>{const[n,o="latest"]=e.split(":");return i.byName[`${n}:${o}`]||{}},created:({summary:{created:e}})=>e},mutations:{[i2](e,t={}){e.summary={...e.summary,...t},e.name=t.name},[n2](e){e.api_status=ui.LOADING},[o2](e,{details:t,profile:i}={}){e.api_status=ui.SUCCESS,e.details={...e.details,...t},e.profile={...e.profile,...cn()(i,["cmd"])},e.name=i?i.name:e.name},[r2](e){e.api_status=ui.ERROR},[s2](e,{processes:t}={}){e.processes=t}},actions:{async setSummary({commit:e},t={}){e(i2,t)},setStats({state:{statsTimestamps:e,statsByTimestamp:t}},i={}){var n;const o=(null===(n=t[e[e.length-1]])||void 0===n?void 0:n.cpu_stats)||{};var r;e.push(i.time),t[i.time]={cpu_stats:i.cpu_stats,cpu:Y0(i.cpu_stats,o),ram:Z0(i),upload:(r=i,G0()(r.networks,((e,{tx_bytes:t})=>e+t),0)),download:X0(i),read:J0(i),write:Q0(i)}},async fetch({commit:e},{name:t}={}){try{e(n2);const i=await synowebapi.promises.request({api:"SYNO.Docker.Container",method:"get",version:1,params:{name:t}});return e(o2,i),i}catch(t){throw e(r2),SYNO.Debug.error(t),t}},async update({commit:e,state:{name:t}},{profile:i={}}){try{return await synowebapi.promises.request({api:"SYNO.Docker.Container",method:"set",version:1,params:{name:t,edit_name:i.name,profile:ZJ(i)}})}catch(t){throw e(r2),SYNO.Debug.error(t),t}},async pollingProcess({commit:e},{name:t}={}){const i=SYNO.API.Request.Polling.Register({webapi:{api:"SYNO.Docker.Container",method:"get_process",version:1,params:{name:t}},status_callback:(t,i)=>t&&e(s2,i),interval:5,immediate:!0});return()=>{SYNO.API.Request.Polling.Unregister(i)}},async action({state:e},t={}){try{return e.loading=!0,await synowebapi.promises.request(t)}catch(e){throw SYNO.Debug.error(e),e}finally{e.loading=!1}},start:async({dispatch:e,state:{name:t}})=>await e("action",{api:"SYNO.Docker.Container",method:"start",version:1,params:{name:t}}),stop:async({dispatch:e,state:{name:t}})=>await e("action",{api:"SYNO.Docker.Container",method:"stop",version:1,params:{name:t}}),fstop:async({dispatch:e,state:{name:t}})=>await e("action",{api:"SYNO.Docker.Container",method:"signal",version:1,params:{name:t,signal:9}}),restart:async({dispatch:e,state:{name:t}})=>await e("action",{api:"SYNO.Docker.Container",method:"restart",version:1,params:{name:t}}),reset:async({dispatch:e,state:{name:t}})=>await e("action",{api:"SYNO.Docker.Container",method:"delete",version:1,params:{force:!1,preserve_profile:!0,name:t}}),async delete({dispatch:e,state:t}){const{name:i}=t;t.deleting=!0;const n=await e("action",{api:"SYNO.Docker.Container",method:"delete",version:1,params:{force:!1,preserve_profile:!1,name:i}});return t.deleting=!1,n}}};const{SET_ERROR:l2,SET_LOADING:c2}=e2;function d2(){return{pollingId:void 0,loading:!1,status:ui.LOADING,error:{code:0},allNames:[],mapIdToName:{},statsTimestamps:[]}}var h2={namespaced:!0,state:d2(),getters:{rows:({allNames:e},t)=>e.map((e=>t[`byName/${e}/row`])),totalHistoryOfStats:({allNames:e,byName:t,statsTimestamps:i})=>i.map((i=>e.reduce(((e,n)=>{const{cpu:o=0,ram:r=0,download:s=0,upload:a=0}=t[n].statsByTimestamp[i]||{};return{time:i,cpu:e.cpu+o,ram:e.ram+r,download:e.download+s,upload:e.upload+a}}),{time:i,cpu:0,ram:0,download:0,upload:0}))),stats:(e,{totalHistoryOfStats:t=[]})=>t[t.length-1]||{},lastStatsTime:(e,{stats:{time:t}})=>t},mutations:{[c2](e,t=!0){e.loading=t},[l2](e,{code:t}={}){e.status=ui.ERROR,e.error.code=t}},actions:{async fetchContainerList({dispatch:e,commit:t}){t(c2,!0);try{e("setContainerListSuccess",await synowebapi.promises.request({api:"SYNO.Docker.Container",method:"list",version:1,params:{limit:-1,offset:0,type:"all"}}))}catch(e){SYNO.Debug.error(e)}},pollingContainerList({dispatch:e,commit:t}){const i=SYNO.API.Request.Polling.Register({webapi:{api:"SYNO.Docker.Container",method:"list",version:1,params:{limit:-1,offset:0,type:"all"}},status_callback:(i,n)=>i?e("setContainerListSuccess",n):t(l2,n),interval:5,immediate:!0});return()=>{SYNO.API.Request.Polling.Unregister(i)}},async setContainerListSuccess({state:e,dispatch:t,commit:i},{containers:n=[]}={}){e.allNames=n.map((({name:e})=>e)),e.mapIdToName=n.reduce(((e,{name:t,id:i})=>({...e,[i]:t})),{}),n.forEach((e=>t("setContainerSummary",e))),i(c2,!1)},async setContainerSummary({dispatch:e},t={}){const{name:i}=t;await e("registerContainer",t),await e(`byName/${i}/setSummary`,t)},pollingContainerStatList({dispatch:e}){synowebapi.promises.request({api:"SYNO.Docker.Container",method:"stats",version:1}).then((t=>e("setContainerStatsList",t)));const t=SYNO.API.Request.Polling.Register({webapi:{api:"SYNO.Docker.Container",method:"stats",version:1},status_callback:(t,i)=>t&&e("setContainerStatsList",i),interval:5,immediate:!0});return()=>{SYNO.API.Request.Polling.Unregister(t)}},setContainerStatsList({dispatch:e,state:t},i={}){const n=Date.now();ce()(i,(t=>e("setContainerStats",{time:n,...t}))),t.statsTimestamps.push(n)},setContainerStats({dispatch:e},t={}){const i=t.name.startsWith("/")?t.name.slice(1):t.name;e("registerContainer",{name:i}),e(`byName/${i}/setStats`,t)},fetchContainerDetail:async({dispatch:e},{name:t}={})=>await e(`byName/${t}/fetch`,{name:t}),async startContainer({dispatch:e},{name:t}={}){const[i]=e("startContainerList",[t]);return i},async startContainerList({dispatch:e},t=[]){const i=await Promise.all(t.map((t=>e(`byName/${t}/start`,{name:t}))));return e("fetchContainerList"),i},async stopContainer({dispatch:e},{name:t}={}){const[i]=e("stopContainerList",[t]);return i},async stopContainerList({dispatch:e},t=[]){const i=await Promise.all(t.map((t=>e(`byName/${t}/stop`,{name:t}))));return e("fetchContainerList"),i},async fstopContainer({dispatch:e},{name:t}={}){const[i]=e("fstopContainerList",[t]);return i},async fstopContainerList({dispatch:e},t=[]){const i=await Promise.all(t.map((t=>e(`byName/${t}/fstop`,{name:t}))));return e("fetchContainerList"),i},async restartContainer({dispatch:e},{name:t}={}){const[i]=e("restartContainerList",[t]);return i},async restartContainerList({dispatch:e},t=[]){const i=await Promise.all(t.map((t=>e(`byName/${t}/restart`,{name:t}))));return e("fetchContainerList"),i},async resetContainer({dispatch:e},{name:t}={}){const[i]=e("resetContainerList",[t]);return i},async resetContainerList({dispatch:e},t=[]){const i=await Promise.all(t.map((t=>e(`byName/${t}/reset`,{name:t}))));return e("fetchContainerList"),i},async deleteContainer({dispatch:e},{name:t}={}){const i=await e(`byName/${t}/delete`,{name:t});return e("fetchContainerList"),i},async deleteContainerList({dispatch:e},t=[]){const i=await Promise.all(t.map((t=>e(`byName/${t}/delete`,{name:t}))));return e("fetchContainerList"),i},async registerContainer({state:e},{name:t}={}){e.byName[t]||R2.registerModule(["containers","byName",t],a2)},async clearState({state:e}){ce()(d2(),((t,i)=>{e[i]=t})),ce()(e.byName,((e,t)=>{R2.unregisterModule(["containers","byName",t])}))}},modules:{byName:{namespaced:!0}}},u2={namespaced:!0,state:()=>({loaded:!1,loading:!1,deleting:!1,api_status:ui.LOADING,status:ai.STOPPED,id:"",name:"",path:"",share_path:"",content:"",schema:{},containerIds:[],created_at:"",updated_at:"",enable_service_portal:!1,service_portal_name:"",service_portal_port:0,service_portal_protocol:null,is_package:!1}),getters:{row:({id:e,loading:t,deleting:i,status:n,name:o,path:r,created_at:s,enable_service_portal:a,share_path:l,is_package:c},{containers:d,link:h})=>({loading:t,deleting:i,status:n,id:e,name:o,path:r,share_path:l,containers:d,created_at:s,link:h,enable_service_portal:a,is_package:c}),buildable:({status:e,is_package:t=!1})=>{if(t)return!1;switch(e){case ai.CREATED:case ai.FAILURE:case ai.BUILD_FAILED:case ai.STOPPED:return!0;default:return!1}},startable:({status:e,is_package:t=!1})=>{if(t)return!1;switch(e){case ai.WARNING:case ai.STOPPED:case ai.FAILURE:return!0;default:return!1}},stopable:({status:e,is_package:t=!1})=>{if(t)return!1;switch(e){case ai.RUNNING:case ai.WARNING:case ai.FAILURE:return!0;default:return!1}},restartable:(e,{stopable:t})=>t,downable({status:e,is_package:t=!1}){if(t)return!1;switch(e){case ai.BUILDING:case ai.BUILD_FAILED:return!1;default:return!0}},editable:({status:e,is_package:t=!1})=>{if(t)return!1;switch(e){case ai.CREATED:case ai.STOPPED:case ai.FAILURE:case ai.BUILD_FAILED:return!0;default:return!1}},deletable:({status:e,is_package:t=!1})=>{if(t)return!1;switch(e){case ai.CREATED:case ai.STOPPED:case ai.FAILURE:case ai.BUILD_FAILED:return!0;default:return!1}},terminalable:({status:e})=>{switch(e){case ai.BUILDING:case ai.FAILURE:case ai.BUILD_FAILED:return!0;default:return!1}},containerNames:({containerIds:e},t,{containers:i})=>e.map((e=>i.mapIdToName[e])).filter((e=>e)),containers:(e,{containerNames:t},i,n)=>t.map((e=>n[`containers/byName/${e}/rowInProject`])),portals:({id:e},t,{portals:i})=>i.portals.filter((({service:t})=>t===`Docker-Project-${e}`)),link:(e,{portals:t})=>{for(const e of t){const t=t2(e);if(t)return t}return null}},mutations:{},actions:{async setProjectLoading({state:e},t=!0){e.loading=t},async setSummary({state:e},t={}){ce()(t,((t,i)=>{e[i]=t}))},async fetch({state:e},{id:t}){e.api_status=ui.LOADING;try{const i=await synowebapi.promises.request({api:"SYNO.Docker.Project",method:"get",version:1,params:{id:t}});ce()(i,((t,i)=>{e[i]=t})),e.api_status=ui.SUCCESS,e.loaded=!0}catch(t){e.api_status=ui.FAILUE,SYNO.Debug.error(t)}},async update({state:e}={},t){const{id:i}=e;e.api_status=ui.LOADING;try{const n=await synowebapi.promises.request({api:"SYNO.Docker.Project",method:"update",version:1,params:{id:i,...t}});return ce()(n,((t,i)=>{e[i]=t})),e.api_status=ui.SUCCESS,n}catch(t){throw e.api_status=ui.FAILUE,SYNO.Debug.error(t),t}},async delete({state:e}={}){const{id:t}=e;e.api_status=ui.LOADING,e.loading=!0,e.deleting=!0;try{await synowebapi.promises.request({api:"SYNO.Docker.Project",method:"delete",version:1,params:{id:t}}),e.api_status=ui.SUCCESS}catch(t){throw e.api_status=ui.FAILUE,SYNO.Debug.error(t),t}finally{e.loading=!1,e.deleting=!1}}}};const{SET_LOADING:g2}={SET_LOADING:"SET_LOADING"};var p2={namespaced:!0,state:()=>({loading:!1,allIds:[]}),getters:{rows:({allIds:e},t)=>e.map((e=>t[`byId/${e}/row`])),allNames:({allIds:e,byId:t})=>e.map((e=>t[e].name)).filter((e=>e))},mutations:{[g2](e,t=!0){e.loading=t}},actions:{async fetchProjectList({dispatch:e,commit:t}){t(g2,!1);try{const t=await synowebapi.promises.request({api:"SYNO.Docker.Project",method:"list",version:1});await e("setProjectListSuccess",t)}catch(e){SYNO.Debug.error(e)}t(g2,!0)},async pollingProjectDetail({dispatch:e},{id:t},i=(()=>{})){const n=SYNO.API.Request.Polling.Register({webapi:{api:"SYNO.Docker.Project",method:"get",version:1,params:{id:t}},status_callback:(t,n)=>{t?e("setProject",n):i(n)},interval:5,immediate:!0});return()=>{SYNO.API.Request.Polling.Unregister(n)}},async pollingProjectList({dispatch:e},t=(()=>{})){const i=SYNO.API.Request.Polling.Register({webapi:{api:"SYNO.Docker.Project",method:"list",version:1},status_callback:(i,n)=>{i?e("setProjectListSuccess",n):t(n)},interval:5,immediate:!0});return()=>{SYNO.API.Request.Polling.Unregister(i)}},async setProjectListSuccess({state:e,dispatch:t},i={}){e.allIds=ti()(i,((e,t)=>t)),ce()(i,((e,i)=>t("setProject",{id:i,...e})))},async setProject({dispatch:e},{id:t,...i}){await e("registerProject",{id:t}),await e(`byId/${t}/setSummary`,{id:t,...i})},async setProjectLoading({dispatch:e},t){await e(`byId/${t}/setProjectLoading`,!0)},async clearProjectLoading({dispatch:e},t){await e(`byId/${t}/setProjectLoading`,!1)},async fetchProjectDetail({dispatch:e},{id:t}){await e("registerProject",{id:t}),await e(`byId/${t}/fetch`,{id:t})},async deleteProject({dispatch:e},t){const i=await e(`byId/${t}/delete`);return e("fetchProjectList"),i},async registerProject({state:e},{id:t}){e.byId[t]||R2.registerModule(["projects","byId",t],u2)},async clearState({state:e}){ce()({loading:!1,allIds:[]},((t,i)=>{e[i]=t})),ce()(e.byId,((e,t)=>{R2.unregisterModule(["projects","byId",t])}))}},modules:{byId:{namespaced:!0}}};const m2={async setSummary({state:e},t={}){ce()(t,((t,i)=>{e[i]=t}))},async fetch({state:e}){e.api_status=ui.LOADING;const t=await synowebapi.promises.request({api:"SYNO.Docker.Image",version:1,method:"get",params:{identity:e.id}});return ce()(cn()(t,["image","tag"]),((t,i)=>{e[i]=t})),e.api_status=ui.SUCCESS,t},async delete({state:e}){const{repository:t,tag:i}=e;e.api_status=ui.LOADING,e.deleting=!0;try{const n=await synowebapi.promises.request({api:"SYNO.Docker.Image",method:"delete",version:1,params:{images:[{repository:t,tags:[i]}]}});return e.api_status=ui.SUCCESS,n}catch(t){throw e.api_status=ui.FAILUE,SYNO.Debug.error(t),t}finally{e.deleting=!1}},async export({state:e},t=""){const{repository:i,tag:n}=e;try{return await synowebapi.promises.request({api:"SYNO.Docker.Image",method:"export",version:1,params:{repo:i,tag:n,path:t}})}catch(e){throw SYNO.Debug.error(e),e}},async upgrade({state:e}){const{repository:t}=e;e.upgrading=!0,await async function({repository:e},t=(()=>{})){const{task_id:i}=await async function(e=""){return await synowebapi.promises.request({api:"SYNO.Docker.Image",method:"upgrade_start",version:1,params:{repository:e}})}(e);await new Promise((e=>{const n=SYNO.API.Request.Polling.Register({webapi:{api:"SYNO.Docker.Image",method:"upgrade_status",version:1,params:{task_id:i}},status_callback:(i,o)=>{i||(SYNO.API.Request.Polling.Unregister(n),e());const{finished:r}=o;r&&(SYNO.API.Request.Polling.Unregister(n),e()),t(o)},interval:5,immediate:!0})}))}({repository:t},(({state:t,current:i,total:n})=>{e.upgradeState.state=t,"PULLING_IMAGE"===t&&(e.upgradeState.current=i,e.upgradeState.total=n)})),e.upgrading=!1},async setDeleting({state:e},t=!0){e.deleting=t}};var f2=Vue,_2=i.n(f2),v2={namespaced:!0,state:()=>({download:{pollingId:null,images:{}},loading:!1,allNames:[],byName:{},mapImageIdToNames:{}}),getters:{getImageStateByName:e=>t=>e.byName[t],getImageRow:(e,{getImageStateByName:t,getImageHumanSize:i,getImageHumanCreatedAt:n,getImageStatus:o,getImageUpgradePercentage:r,getImageIsRunnable:s})=>e=>{const{id:a,tag:l,repository:c,upgrading:d,upgradable:h,virtual_size:u,deleting:g,remote_digest:p,digest:m,created:f}=t(e),_=i(e),v=n(e);return{_id:e,id:e,imageId:a,name:e,status:o(e),repository:c,tag:l,size:u,humanSize:_,humanCreatedAt:v,created:f,deleting:g,upgrading:d,upgradable:h&&"latest"===l,digest:m,remoteDigest:p,upgradePercentage:r(e),isRunnable:s(e)}},getImageIsRunnable:(e,{getImageStateByName:t})=>e=>{const{tag:i}=t(e);return!i.includes("<none>")},getImageIsDockerhub:(e,{getImageRegistry:t})=>e=>""===t(e),getImageLink:(e,{getImageStateByName:t,getImageIsDockerhub:i})=>e=>{const{repository:n}=t(e);return i(e)?OZ(n):""},getImageRegistry:(e,{getImageStateByName:t})=>e=>{const{repository:i}=t(e),[n=""]=i.split("/");return n.includes(".")?n:""},getImageRegistryName:(e,{getImageRegistry:t},i,n)=>e=>{const i=t(e);if(""===i)return"Docker Hub";const o=n["registries/registryRows"],{name:r=""}=o.find((({url:e})=>e.replace(/^https?:\/\//,"").replace(/\/$/,"")===i))||{};return r||i},getImageEntrypoint:(e,{getImageStateByName:t})=>e=>{const{entrypoint:i=[]}=t(e);return i.join(" ")},getImageCmd:(e,{getImageStateByName:t})=>e=>{const{cmd:i=[]}=t(e);return i.join(" ")},getImageStatus:(e,{getImageInUse:t})=>e=>t(e)?si.IN_USED:si.UN_USED,getImageHumanSize:(e,{getImageStateByName:t})=>e=>{const{virtual_size:i}=t(e);return k(i)},getImageHumanCreatedAt:(e,{getImageStateByName:t})=>e=>{const{created:i}=t(e);return i?SYNO.SDS.DateTimeFormatter(new Date(1e3*i),{type:"datetimesec"}):"-"},getImageContainerNames:(e,t,{containers:i},n)=>e=>i.allNames.filter((t=>{const i=n[`containers/byName/${t}/imageKey`];return e===i})),getImageInUse:(e,{getImageContainerNames:t})=>e=>t(e).length>0,getImageUpgradePercentage:(e,{getImageStateByName:t})=>e=>{const{upgradeState:{current:i,total:n}}=t(e),o=i/n*100||0;return 0===o?o:o.toFixed(2)},allAvaliableNames:({allNames:e})=>e.filter((e=>!e.includes("<none>"))),rows:({allNames:e,download:t},{getImageRow:i})=>[...e.map((e=>i(e))),...ti()(t.images)],count:({allNames:e})=>e.length,totalSize:({allNames:e,byName:t})=>e.map((e=>t[e].size)).reduce(((e,t)=>e+t),0),unusedImageNames:({allNames:e},{getImageInUse:t})=>e.filter((e=>!t(e))),inUseImageNames:({allNames:e},{getImageInUse:t})=>e.filter((e=>t(e))),inUseSize:({byName:e},{inUseImageNames:t})=>t.map((t=>e[t].size)).reduce(((e,t)=>e+t),0),updatableImageNames:({allNames:e,byName:t})=>e.filter((e=>t[e].upgradable))},mutations:{},actions:{async fetchImageList({state:e,dispatch:t}){e.loading=!0;try{t("setImageList",await synowebapi.promises.request({api:"SYNO.Docker.Image",method:"list",version:1,params:{limit:-1,offset:0,show_dsm:!1}}))}catch(e){throw SYNO.Debug.error(e),e}},async pollingImageList({dispatch:e},t=(()=>{})){const i=SYNO.API.Request.Polling.Register({webapi:{api:"SYNO.Docker.Image",method:"list",version:1,params:{limit:-1,offset:0,show_dsm:!1}},status_callback:(i,n)=>{i?e("setImageList",n):t()},interval:10,immediate:!0});return()=>{SYNO.API.Request.Polling.Unregister(i)}},async setImageList({state:e,dispatch:t},{images:i}={}){const n=i.flatMap((e=>e.tags.reduce(((t,i)=>{if("<none>"===e.repository)return t;let n=`${e.repository}:${i}`;return"<none>"===i&&(n+=`|${e.id}`),t.push({...e,name:n,tag:i}),t}),[])));e.allNames=n.map((({name:e})=>e)),e.mapImageIdToNames=n.reduce(((e,{id:t,name:i})=>(e[t]||(e[t]=[]),e[t].push(i),e)),{}),n.forEach((e=>t("setImage",e))),e.loading=!1},async registerImage({state:e},t){e.byName[t]||_2().set(e.byName,t,{api_status:ui.LOADING,deleting:!1,id:"",name:"",repository:"",size:0,virtual_size:0,tag:"",tags:[],description:"",upgradable:!1,created:0,author:"",cmd:[],docker_version:"",entrypoint:[],env:[],ports:[],volumes:[],upgrading:!1,upgradeState:{state:"",current:0,total:1/0},digest:"",remote_digest:""})},async setImage({state:e,dispatch:t},i={}){const{name:n}=i;await t("registerImage",n),m2.setSummary({state:e.byName[n]},i)},async fetchImageDetail({state:e,dispatch:t},i=""){const n=A(i);return await t("registerImage",n),await m2.fetch({state:e.byName[n]})},deleteImage:async({dispatch:e},t="")=>await e("deleteImageList",[t]),async deleteImageList({state:e,dispatch:t},i=[]){const n=i.reduce(((e,t)=>{const{registry:i,repository:n,tag:o,id:r}=D(t);if(r)return e[r]=!0,e;const s=i?`${i}/${n}`:n;return e[s]||(e[s]=[]),e[s].push(o),e}),{}),o=ti()(n,((e,t)=>!0===e?{identity:t}:{repository:t,tags:e}));await Promise.all(i.map((t=>m2.setDeleting({state:e.byName[t]},!0))));try{return await synowebapi.promises.request({api:"SYNO.Docker.Image",method:"delete",version:1,params:{images:o}})}catch(e){throw SYNO.Debug.error(e),e}finally{i.map((t=>m2.setDeleting({state:e.byName[t]},!1))),t("fetchImageList")}},async pruneImage({state:e,dispatch:t}){try{return e.loading=!0,await synowebapi.promises.request({api:"SYNO.Docker.Image",method:"prune",version:1})}catch(e){throw SYNO.Debug.error(e),e}finally{t("fetchImageList")}},async exportImage({state:e,dispatch:t},{name:i="",path:n=""}){const o=await m2.export({state:e.byName[i]},n);return t("fetchImageList"),o},async updateImageList({state:e,dispatch:t},i=[]){const n=await Promise.all(i.map((t=>m2.upgrade({state:e.byName[t]}))));return t("fetchImageList"),n},async upgradeImage({dispatch:e},t=""){const[i]=await e("updateImageList",[t]);return i},async downloadImage({dispatch:e},t={}){await e("downloadImageStart",t),await e("pollingImageDownloadTasks"),e("fetchImageList")},downloadImageStart:async(e,t={})=>await synowebapi.promises.request({api:"SYNO.Docker.Image",method:"pull_start",version:1,params:t}),async pollingImageDownloadTasks({state:e,dispatch:t}){e.download.pollingId&&(SYNO.API.Request.Polling.Unregister(e.download.pollingId),e.download.pollingId=null);let i,n=!1;await new Promise(((o,r)=>{i=SYNO.API.Request.Polling.Register({webapi:{api:"SYNO.Entry.Request.Polling",method:"list",version:1,params:{task_id_prefix:"SYNO_DOCKER_IMAGE_PULL",extra_group_tasks:["admin"]}},status_callback:(s,a={})=>{if(!s)return e.download.images={},SYNO.API.Request.Polling.Unregister(i),i=null,void r(a);const{admin:l=[]}=a;if(!l||0===l.length)return e.download.images={},SYNO.API.Request.Polling.Unregister(i),i=null,void o();n||(t("popupNotification",{pageKey:ii.IMAGE_LIST,num:l.length},{root:!0}),n=!0),t("fetchImageDownloadStatus",l||[])},interval:5,immediate:!0}),e.download.pollingId=i}))},async fetchImageDownloadStatus({state:e},t=[]){const{result:i=[]}=await synowebapi.promises.request({compound:{stopwhenerror:!1,params:t.map((e=>({api:"SYNO.Docker.Image",method:"pull_status",version:1,params:{task_id:e}})))}});e.download.images=i.map((({data:e})=>{let{repository:t,tag:i,current:n,total:o,downloaded:r,finished:s}=e||{};if(s)return;if(!t||!i)return;t=t.replace(/^docker\.io\//,"");const a=`${t}:${i}`,l=1024*r*1024,c=n/o*100||0;return{_id:a,id:a,status:si.DOWNLOADING,repository:t,tag:i,created:"-",size:l,downloadPercentage:0===c?c:c.toFixed(2)}})).filter((e=>SYNO.SDS.isObject(e))).reduce(((e,t)=>({...e,[t.name]:t})),{})},async clearState({state:e}){ce()({download:{pollingId:null,images:{}},loading:!1,allNames:[],byName:{},mapImageIdToNames:{}},((t,i)=>{e[i]=t}))}}},b2={namespaced:!0,state:()=>({containers:[],driver:"bridge",enable_ipv6:!1,ipv6_gateway:"",ipv6_subnet:"",ipv6_iprange:"",gateway:"",id:"",iprange:"",name:"",subnet:"",disable_masquerade:!1}),getters:{row:e=>({...e})},mutations:{SET_NETWORK(e,t){Object.assign(e,t)}},actions:{async setNetwork({commit:e},t={}){e("SET_NETWORK",t)}}},w2={namespaced:!0,state:()=>({allIds:[],pollId:null}),getters:{networkRows:({allIds:e},t)=>e.map((e=>t[`byId/${e}/row`])),rows:(e,{networkRows:t})=>t},mutations:{},actions:{async fetchNetworkList({dispatch:e}){try{e("setNetworkList",await synowebapi.promises.request({api:"SYNO.Docker.Network",method:"list",version:1}))}catch(e){SYNO.Debug.error(e)}},async regPollNetworkList({dispatch:e,state:t}){const i=SYNO.API.Request.Polling.Register({webapi:{api:"SYNO.Docker.Network",method:"list",version:1},status_callback:(t,i)=>t&&e("setNetworkList",i),interval:10,immediate:!0});t.pollId=i},unregPollNetworkList({state:e}){e.pollId&&SYNO.API.Request.Polling.Unregister(e.pollId)},async reloadNetworkList({dispatch:e}){e("unregPollNetworkList"),await e("regPollNetworkList")},async setNetworkList({state:e,dispatch:t},i={}){const n=i.network;e.allIds=ti()(n,(e=>e.id)).sort(),ce()(n,(e=>t("setNetwork",{id:e.id,network:e})))},async setNetwork({dispatch:e},{id:t,network:i}){await e("registerNetwork",t),await e(`byId/${t}/setNetwork`,i)},async registerNetwork({state:e},t){e.byId[t]||R2.registerModule(["networks","byId",t],b2)},async clearState({state:e}){e={allIds:[],pollId:null},ce()(e.byId,((e,t)=>{R2.unregisterModule(["networks","byId",t])}))}},modules:{byId:{namespaced:!0}}},y2={namespaced:!0,state:()=>({enable_registry_mirror:!1,enable_trust_SSC:!0,mirror_urls:[],name:"",syno:!1,url:""}),getters:{row:e=>({...e})},mutations:{SET_REGISTRY(e,t){Object.assign(e,t)}},actions:{async setRegistry({commit:e},t={}){e("SET_REGISTRY",t)}}},C2={namespaced:!0,state:()=>({currentRegistry:"",allNames:[],images:[],imagePageSize:50,imagePageNum:1,imageTotal:0,imageKeyword:"",isDockerHubUnreachable:!1}),getters:{isUsingDockerHub:({registry:e})=>RZ.isDockerHubShortName(e),registryRows:(e,t)=>e.allNames.map((e=>t[`byName/${e}/row`])),currentRegistryUrl:e=>e.byName[e.currentRegistry].url},mutations:{CHANGE_ALL_NAMES(e,t){e.allNames=ti()(t,(e=>e.name)).sort()},UPDATE_CURRENT_REGISTRY(e,t){e.currentRegistry=t},UPDATE_IMAGE_LIST(e,t){e.images=t.data,e.imageTotal=t.total},UPDATE_IMAGE_KEYWORD(e,t){e.imageKeyword=t},UPDATE_IMAGE_PAGE_NUM(e,t){t>0&&(e.imagePageNum=t)},UPDATE_DOCKERHUB_UNREACHABLE(e,t){e.isDockerHubUnreachable=t}},actions:{async getRegistry({commit:e,dispatch:t}){let i;try{i=await synowebapi.promises.request({api:"SYNO.Docker.Registry",method:"get",version:1,params:{limit:-1,offset:0}})}catch(t){throw e("UPDATE_CURRENT_REGISTRY",""),e("CHANGE_ALL_NAMES",[]),new Error(t)}const n=i.registries;e("CHANGE_ALL_NAMES",n),ce()(n,(e=>t("setRegistry",{name:e.name,registry:e}))),e("UPDATE_CURRENT_REGISTRY",i.using)},async setRegistry({dispatch:e},{name:t,registry:i}){await e("registerRegistry",t),await e(`byName/${t}/setRegistry`,i)},async registerRegistry({state:e},t){e.byName[t]||R2.registerModule(["registries","byName",t],y2)},clearImageFilter({commit:e}){e("UPDATE_IMAGE_KEYWORD",""),e("UPDATE_IMAGE_PAGE_NUM",1)},async updateImageNum({dispatch:e,commit:t},i){t("UPDATE_IMAGE_PAGE_NUM",i),await e("loadImageList")},async updateImageKeyword({dispatch:e,commit:t},i){t("UPDATE_IMAGE_KEYWORD",i),t("UPDATE_IMAGE_PAGE_NUM",1),await e("loadImageList")},async loadImageList({commit:e,state:t,getters:i}){let n,o=t.imageKeyword||"";0===o.length&&RZ.shouldSearchRegistryWithOfficialKeyword(t.currentRegistry,i.currentRegistryUrl)&&(o="official");try{n=await synowebapi.promises.request({api:"SYNO.Docker.Registry",method:"search",version:1,params:{offset:(t.imagePageNum-1)*t.imagePageSize,limit:t.imagePageSize,page_size:t.imagePageSize,q:o}}),e("UPDATE_DOCKERHUB_UNREACHABLE",!1)}catch(t){throw e("UPDATE_IMAGE_LIST",{data:[],total:0}),e("UPDATE_DOCKERHUB_UNREACHABLE",!0),new Error(t)}e("UPDATE_IMAGE_LIST",n)},async clearState({state:e}){ce()({currentRegistry:"",allNames:[],images:[],imagePageSize:50,imagePageNum:1,imageTotal:0,imageKeyword:"",isDockerHubUnreachable:!1},((t,i)=>{e[i]=t})),ce()(e.byName,((e,t)=>{R2.unregisterModule(["registries","byName",t])}))}},modules:{byName:{namespaced:!0}}};function S2(){return{api_status:ui.LOADING,portals:[]}}var k2={namespaced:!0,state:()=>S2(),getters:{},mutations:{SET_API_STATUS(e,t){e.api_status=t},SET_PORTALS(e,t){e.portals=t}},actions:{async fetch({commit:e}){if(!YG())return SYNO.Debug.warn("skip fetch web portals since WebStation version not valid."),!1;e("SET_API_STATUS",ui.LOADING);try{const{portals:t=[]}=await synowebapi.promises.request({api:"SYNO.WebStation.WebService.Portal",method:"list",version:1});e("SET_PORTALS",t.filter((({service:e})=>e.startsWith("Docker")))),e("SET_API_STATUS",ui.SUCCESS)}catch(t){throw e("SET_API_STATUS",ui.ERROR),SYNO.Debug.error(t),t}},listenWebStationPortalAdd({state:e}){const t=t=>{(t.service||"").startsWith("Docker")&&(e.portals.find((({id:e})=>e===t.id))||e.portals.push(t))};return SYNO.SDS.SocketInst.registerSDKEvent("create_service_portal",t),()=>{SYNO.SDS.SocketInst.unregister("create_service_portal",t)}},async clearState({state:e}){ce()(S2(),((t,i)=>{e[i]=t}))}}};const x2=["","information","warning","error"];var L2={namespaced:!0,state:()=>({logs:[],logPageSize:1e3,logPageNum:1,logTotal:0,logLevel:"",sortBy:"time",sortDir:"DESC",datefrom:0,dateto:0,keyword:""}),mutations:{SET_LOGS(e,t){e.logs=t},UPDATE_LEVEL(e,t){e.logLevel=x2.includes(t)?t:""},UPDATE_KEYWORD(e,t=""){e.keyword=t},UPDATE_SORT_INFO(e,{sortBy:t,sortDir:i}={}){e.sortBy=["event","level","log_type","time","user"].includes(t)?t:"time",e.sortDir=["DESC","ASC"].includes(i)?i:"DESC"},UPDATE_PAGE_NUM(e,t=0){e.logPageNum=t>0?t:1},UPDATE_LOG_TOTAL(e,t){e.logTotal=t}},actions:{async updateLogLevel({commit:e,dispatch:t},i){e("UPDATE_LEVEL",i),await t("loadLog")},async updateKeyword({commit:e,dispatch:t},i){e("UPDATE_KEYWORD",i),await t("loadLog")},async updateSortInfo({commit:e,dispatch:t},{sortBy:i,sortDir:n}){e("UPDATE_SORT_INFO",{sortBy:i,sortDir:n}),await t("loadLog")},async updatePageNum({commit:e,dispatch:t},i){e("UPDATE_PAGE_NUM",i),await t("loadLog")},async clearSearchParamsAndLoadLog({commit:e,dispatch:t}){e("UPDATE_LEVEL"),e("UPDATE_KEYWORD"),e("UPDATE_SORT_INFO"),e("UPDATE_PAGE_NUM"),await t("loadLog")},async loadLog({commit:e,state:t}){let i;try{i=await synowebapi.promises.request({api:"SYNO.Docker.Log",method:"list",version:1,params:{action:"load",offset:(t.logPageNum-1)*t.logPageSize,limit:t.logPageSize,sort_by:t.sortBy,sort_dir:t.sortDir,loglevel:t.logLevel,filter_content:t.keyword,datefrom:t.datefrom,dateto:t.dateto}})}catch(t){throw e("SET_LOGS",[]),e("UPDATE_LOG_TOTAL",0),new Error(t)}e("SET_LOGS",i.logs.map((e=>{let t=SYNO.SDS.DateTimeFormatter(new Date(e.time),{type:"datetimesec"});return{...e,time:t}}))),e("UPDATE_LOG_TOTAL",i.total)},async clearState({state:e}){ce()({logs:[],logPageSize:1e3,logPageNum:1,logTotal:0,logLevel:"",sortBy:"time",sortDir:"DESC",datefrom:0,dateto:0,keyword:""},((t,i)=>{e[i]=t}))}}};function E2(){return{api_status:ui.LOADING,system:{}}}var N2={namespaced:!0,state:()=>E2(),getters:{},mutations:{SET_API_STATUS(e,t){e.api_status=t},SET_SYSTEM(e,t){e.system=t}},actions:{async fetch({commit:e}){e("SET_API_STATUS",ui.LOADING);try{e("SET_SYSTEM",await synowebapi.promises.request({api:"SYNO.Core.System",version:1,method:"info"})),e("SET_API_STATUS",ui.SUCCESS)}catch(t){throw e("SET_API_STATUS",ui.ERROR),SYNO.Debug.error(t),t}},async clearState({state:e}){ce()(E2(),((t,i)=>{e[i]=t}))}}};function I2(){return{notificationMap:{[ii.IMAGE_LIST]:0,[ii.OVERVIEW]:0,[ii.PROJECT_LIST]:0,[ii.PROJECT_DETAIL]:0,[ii.CONTAINER_LIST]:0,[ii.CONTAINER_DETAIL]:0,[ii.REGISTRY]:0,[ii.IMAGE_LIST]:0,[ii.IMAGE_DETAIL]:0,[ii.NETWORK]:0,[ii.LOG]:0},migrate:{containers:[],errors:{},task_id:""}}}const T2=I2(),D2={CLEAR_NOTIFICATION(e,t){e.notificationMap[t]=0},SET_NOTIFICATION(e,{pageKey:t,num:i}){e.notificationMap[t]=i}},A2={clearState({state:e,dispatch:t}){ce()(O2,((e,i)=>{t(`${i}/clearState`)})),I2()},clearNotification({commit:e},t){e("CLEAR_NOTIFICATION",t)},setNotification({commit:e},t){e("SET_NOTIFICATION",t)},async popupNotification({dispatch:e},{pageKey:t,num:i=0,timeout:n=5e3}={}){await e("setNotification",{pageKey:t,num:i}),await N(n),await e("clearNotification",t)},async fetchMigrateStatus({state:e}){const{containers:t,errors:i,task_id:n}=await synowebapi.promises.request({api:"SYNO.Docker.Migrate",method:"status",version:1});e.migrate.containers=t,e.migrate.errors=i,e.migrate.task_id=n}},O2={containers:h2,projects:p2,images:v2,networks:w2,registries:C2,portals:k2,log:L2,system:N2},M2=new(p().Store)({devtools:location.search.includes("jsDebug"),modules:O2,state:T2,mutations:D2,actions:A2});location.search.includes("jsDebug")&&(window.docker_store=M2);var R2=M2,P2=(i(3288),function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-modal-window",{ref:"win",attrs:{"syno-id":"network-settings-dialog",title:e._TT("wizard","config_brdige_headline"),width:650,height:300,"before-close":e.beforeClose}},[i("v-panel",{attrs:{"syno-id":"create-network-panel",confirm:e.confirm,cancel:function(){return e.win.close()},"confirm-text":e._T("common","save")},scopedSlots:e._u([{key:"body",fn:function(){return[i("NetworkSettingsForm",{ref:"form",attrs:{"default-subnet":e.defaultSubnet,"docker-subnets":e.dockerSubnets},on:{loading:e.onFormLoading},model:{value:e.subnet,callback:function(t){e.subnet=t},expression:"subnet"}})]},proxy:!0}])})],1)});P2._withStripped=!0;var F2=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-form",{ref:"form",staticClass:"docker-package-install-wizard",style:e.styles,attrs:{rules:e.rules,"syno-id":"install-wizard-form"}},[i("v-form-item",{attrs:{"hide-label":"",textonly:""}},[e._v(e._s(e.WT("wizard","config_brdige_description")))]),e._v(" "),i("v-form-item",{staticClass:"form-item-input-wrapper",attrs:{label:e.WT("common","subnet")}},[i("v-single-select",{attrs:{"syno-id":"install-wizard-single-select-0",width:"auto",options:e.options,"display-mode":"html","display-text-format":{key:"display"}},model:{value:e.subnetOrCustom,callback:function(t){e.subnetOrCustom=t},expression:"subnetOrCustom"}})],1),e._v(" "),"custom"===e.subnetOrCustom?i("v-form-item",{staticClass:"form-item-input-wrapper",attrs:{label:e.WT("common","custom_subnet"),prop:"custom-input-subnet"}},[i("v-input",{ref:"input",attrs:{"syno-id":"install-wizard-input-0"},model:{value:e.customInputSubnet,callback:function(t){e.customInputSubnet=t},expression:"customInputSubnet"}})],1):e._e(),e._v(" "),i("v-form-item",{attrs:{"hide-label":"",textonly:""}},[i("span",{staticClass:"foot-note"},[e._v("\n            "+e._s(e.WT("wizard","config_bridge_note"))+"\n        ")])])],1)};function B2(e,t){const i=t.split(".").map(Number),[n,o]=e.split("/"),r=n.split(".").map(Number),s=parseInt(o,10);if(4!==i.length||4!==r.length||i.some((e=>e<0||e>255))||r.some((e=>e<0||e>255))||isNaN(s)||s<0||s>32)return!1;const a=0===s?0:~((1<<32-s)-1)>>>0;return((i[0]<<24|i[1]<<16|i[2]<<8|i[3])&a)==((r[0]<<24|r[1]<<16|r[2]<<8|r[3])&a)}function W2(e,t){const[i,n]=e.split("/"),[o,r]=t.split("/"),s=parseInt(n,10),a=parseInt(r,10);if(isNaN(s)||s<0||s>32||isNaN(a)||a<0||a>32)return!1;const l=e=>{const t=e.split(".").map(Number);return 4!==t.length||t.some((e=>e<0||e>255))?null:t[0]<<24|t[1]<<16|t[2]<<8|t[3]},c=l(i),d=l(o);if(null===c||null===d)return!1;const h=Math.min(s,a),u=0===h?0:~((1<<32-h)-1)>>>0;return(c&u)==(d&u)}function V2(e){const t=(0,f2.ref)([]);return async function(){e.value=!0;try{t.value=await async function(){const{result:e}=await synowebapi.promises.request({compound:{stopwhenerror:!1,params:z2()}});return BY()(e,(({success:e,data:t,api:i})=>e&&Ti()(t)?t.map((e=>i.startsWith("SYNO.Core.Network.VPN")?e.virtual_ip:e.ip)).filter((e=>e)):[]))}()}catch(e){SYNO.Debug.error(e)}e.value=!1}(),t}function z2(){const e=[["SYNO.Core.Network.Bond","list",2],["SYNO.Core.Network.Ethernet","list",2],["SYNO.Core.Network.VPN.PPTP","list",1,{additional:["status"]}],["SYNO.Core.Network.VPN.OpenVPNWithConf","list",1,{additional:["status"]}],["SYNO.Core.Network.VPN.OpenVPN","list",1,{additional:["status"]}],["SYNO.Core.Network.VPN.L2TP","list",1,{additional:["status"]}]];return SYNO.SDS.Utils.isInC2DSM()||SYNO.SDS.Utils.isInAliDSM()||_S("ha_not_support_pppoe")||e.push(["SYNO.Core.Network.PPPoE","list",1]),e.map((([e,t,i,n])=>({api:e,method:t,version:i,params:n})))}F2._withStripped=!0;const j2=["172.17.0.1/16","172.18.0.1/16","172.19.0.1/16","172.20.0.1/16","172.21.0.1/16","172.22.0.1/16","172.23.0.1/16","172.24.0.1/16","172.25.0.1/16","172.26.0.1/16","172.27.0.1/16","172.28.0.1/16","172.29.0.1/16","172.30.0.1/16","172.31.0.1/16","192.168.0.1/20","192.168.16.1/20","192.168.32.1/20","192.168.48.1/20","192.168.64.1/20","192.168.80.1/20","192.168.96.1/20","192.168.112.1/20","192.168.128.1/20","192.168.144.1/20","192.168.160.1/20","192.168.176.1/20","192.168.192.1/20","192.168.208.1/20","192.168.224.1/20","192.168.240.1/20"];function H2(e=[],t=[]){return j2.find((i=>[e.every((e=>!B2(i,e))),t.every((e=>!W2(i,e)))].every((e=>e))))||j2[0]}var U2=(0,f2.defineComponent)({props:{value:{type:String},defaultSubnet:{type:String,default:""},dockerSubnets:{type:Array,default:[]}},setup(e,{emit:t,expose:i}){const n={form:(0,f2.ref)(null),input:(0,f2.ref)(null)},o={styles:{"--colon":`"${v("common","colon")}"`,"--note":`"${v("common","note")}${v("common","colon")}"`},rules:{"custom-input-subnet":[{required:!0},{message:y("wizard","err_invalid_subnet"),validator:(e,t)=>function(e=""){if(!/^(?:\d{1,3}\.){3}\d{1,3}\/([0-9]|[1-2][0-9]|3[0-2])$/.test(e))return!1;const[t,i]=e.split("/"),n=t.split(".").map((e=>parseInt(e,10))),o=parseInt(i,10);if(4!==n.length||n.some((e=>e<0||e>255))||isNaN(o)||o<0||o>32)return!1;const r=n[0]<<24|n[1]<<16|n[2]<<8|n[3];return r!==(r&(0===o?0:~((1<<32-o)-1)>>>0))}(t)},{message:y("wizard","err_subnet_conflict"),validator:(e,t)=>s.hostIps.value.every((e=>!B2(t,e)))},{message:y("wizard","err_subnet_conflict"),validator:(t,i)=>e.dockerSubnets.every((e=>!W2(i,e)))}]}},r=(0,f2.ref)(!1),s={loading:r,subnetOrCustom:(0,f2.ref)(e.defaultSubnet||H2()),customInputSubnet:(0,f2.ref)(e.defaultSubnet),hostIps:V2(r)},a={availableSubnet:(0,f2.computed)((()=>H2(s.hostIps.value,e.dockerSubnets))),options:(0,f2.computed)((()=>[{display:`${a.availableSubnet.value} <span style="color: var(--v-form-item-color__description);">${y("wizard","default_subnet_desc")}</span>`,label:a.availableSubnet.value,desc:y("wizard","default_subnet_desc"),value:a.availableSubnet.value},"-",{display:y("common","custom"),label:y("common","custom"),value:"custom"}])),subnet:(0,f2.computed)((()=>"custom"===s.subnetOrCustom.value?s.customInputSubnet.value:s.subnetOrCustom.value))},l={WT:y};return(0,f2.watch)(a.options,(t=>{e.defaultSubnet||(s.subnetOrCustom.value=t[0].value,s.customInputSubnet.value=t[0].value),t.every((({value:e})=>e!==s.subnetOrCustom.value))&&(s.subnetOrCustom.value="custom")})),(0,f2.watch)(s.subnetOrCustom,(async e=>{var t,i,o;"custom"===e&&(await(0,f2.nextTick)(),null===(t=n.input.value)||void 0===t||null===(i=t.$refs)||void 0===i||null===(o=i.input)||void 0===o||o.focus())})),(0,f2.watch)(a.subnet,(e=>{t("input",e)}),{immediate:!0}),(0,f2.watch)(s.loading,(e=>{t("loading",e)}),{immediate:!0}),i({validate:async()=>n.form.value.validate(),isDirty:async()=>e.defaultSubnet!==a.subnet.value}),{...o,...s,...a,...n,...l}}}),$2=(i(8697),j(U2,F2,[],!1,null,null,null));$2.options.__file="src/components/NetworkSettings/NetworkSettingsForm.vue";var K2=$2.exports,q2=j((0,f2.defineComponent)({props:{defaultSubnet:{type:String,required:!0},dockerSubnets:{type:Array,required:!0}},components:{NetworkSettingsForm:K2},setup(e){const t={win:(0,f2.ref)(null),form:(0,f2.ref)(null)},i={subnet:(0,f2.ref)(e.defaultSubnet),loading:(0,f2.ref)(!1)};(0,f2.watch)(i.loading,(e=>{e?t.win.value.setStatusBusy():t.win.value.clearStatus()}));const n={doubleConfirm:async()=>"confirm"===await t.win.value.getMsgBox().confirm("",w("network","confirm_network_settings")),async confirm(){if(!await t.form.value.isDirty())return t.win.value.close({forceClose:!0}),!0;if(!await t.form.value.validate())return!1;try{return i.loading.value=!0,!!await n.doubleConfirm()&&(await synowebapi.promises.request({api:"SYNO.Docker.Network",method:"update_bip",version:1,params:{bip:i.subnet.value}}),t.win.value.close({forceClose:!0}),!0)}catch(e){const i=QG(e);await t.win.value.getMsgBox().alert("",i)}finally{i.loading.value=!1}return!1},async beforeClose(){if(!await t.form.value.isDirty())return!0;const e=await t.win.value.getMsgBox().confirmLostChange();return"save"===e?await n.confirm():"dont_save"===e},onFormLoading(e){i.loading.value=e}};return{...e,...t,...i,...n}}}),P2,[],!1,null,null,null);q2.options.__file="src/dialogs/Networks/NetworkSettingsDialog.vue";var G2=q2.exports;Ext.namespace("SYNO.SDS.Docker.Wizards"),Ext.namespace("SYNO.SDS.Docker.Modals"),Ext.namespace("SYNO.SDS.Docker.Panels"),Ext.namespace("SYNO.SDS.Docker.MessageBox"),Ext.namespace("SYNO.SDS.Docker.Project"),Ext.namespace("SYNO.SDS.Docker.Container"),Ext.namespace("SYNO.SDS.Docker.Image"),Ext.namespace("SYNO.SDS.Docker.Network"),Ext.namespace("SYNO.SDS.Docker.Registry"),Ext.namespace("SYNO.SDS.Docker.Utils"),Ext.namespace("SYNO.SDS.ContainerManager");const Y2=Vue.extend({store:R2,mixins:[tY,U0,GG]});SYNO.SDS.Docker.Panels.Migrater=Y2.extend(NX),SYNO.SDS.Docker.MessageBox.Migrater=Y2.extend(PX),SYNO.SDS.Docker.Modals.Migrater=Y2.extend(AX),SYNO.SDS.Docker.Modals.Capabilities=Y2.extend(vX),SYNO.SDS.Docker.Modals.EditCapabilities=Y2.extend(CX),SYNO.SDS.Docker.Registry.DownloadDialog=Y2.extend(jX),SYNO.SDS.ContainerManager.Application=Y2.extend(pX),SYNO.SDS.Docker.Project.ProjectBuildDialog=Y2.extend(_Q),SYNO.SDS.Docker.Project.ProjectStartDialog=Y2.extend(bQ),SYNO.SDS.Docker.Project.ProjectStopDialog=Y2.extend(yQ),SYNO.SDS.Docker.Project.ProjectRestartDialog=Y2.extend(SQ),SYNO.SDS.Docker.Project.ProjectCleanDialog=Y2.extend(xQ),SYNO.SDS.Docker.Project.ProjectActionLogDialog=Y2.extend(EQ),SYNO.SDS.Docker.Project.ProjectCreateWizard=Y2.extend($Q),SYNO.SDS.Docker.Project.ProjectConfirmSharePathMessageBox=Y2.extend(YQ),SYNO.SDS.Docker.Project.ProjectConfirmRebuildMessageBox=Y2.extend(JQ),SYNO.SDS.Docker.Container.ContainerCreateWizard=Y2.extend(lQ),SYNO.SDS.Docker.Container.ImportFromDSMDialog=Y2.extend(z1),SYNO.SDS.Docker.Container.ImportFromLocalDialog=Y2.extend(W1),SYNO.SDS.Docker.Container.ExportContainerDialog=Y2.extend(K1),SYNO.SDS.Docker.Container.DuplicateContainerDialog=Y2.extend(C0),SYNO.SDS.Docker.Container.TerminalDialog=Y2.extend(L0),SYNO.SDS.Docker.Container.SettingsDialog=Y2.extend(R0),SYNO.SDS.Docker.Image.UpgradeDialog=Y2.extend(W0),SYNO.SDS.Docker.Image.ImportFromUrlDialog=Y2.extend(H0),SYNO.SDS.Docker.Network.NetworkAddDialog=Y2.extend(u1),SYNO.SDS.Docker.Network.ManageContainerDialog=Y2.extend(v1),SYNO.SDS.Docker.Network.SettingsDialog=Y2.extend(G2),SYNO.SDS.Docker.Registry.TagDialog2=Y2.extend(C1),SYNO.SDS.Docker.Registry.SettingDialog=Y2.extend(L1),SYNO.SDS.Docker.Registry.EditRegistryDialog=Y2.extend(D1)},2757:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,"/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-action-bar {\n\twhite-space: nowrap;\n\theight: 100%;\n}\n\n.monaco-action-bar .actions-container {\n\tdisplay: flex;\n\tmargin: 0 auto;\n\tpadding: 0;\n\theight: 100%;\n\twidth: 100%;\n\talign-items: center;\n}\n\n.monaco-action-bar.vertical .actions-container {\n\tdisplay: inline-block;\n}\n\n.monaco-action-bar .action-item {\n\tdisplay: block;\n\talign-items: center;\n\tjustify-content: center;\n\tcursor: pointer;\n\tposition: relative;  /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */\n}\n\n.monaco-action-bar .action-item.disabled {\n\tcursor: default;\n}\n\n.monaco-action-bar .action-item .icon,\n.monaco-action-bar .action-item .codicon {\n\tdisplay: block;\n}\n\n.monaco-action-bar .action-item .codicon {\n\tdisplay: flex;\n\talign-items: center;\n\twidth: 16px;\n\theight: 16px;\n}\n\n.monaco-action-bar .action-label {\n\tfont-size: 11px;\n\tpadding: 3px;\n\tborder-radius: 5px;\n}\n\n.monaco-action-bar .action-item.disabled .action-label,\n.monaco-action-bar .action-item.disabled .action-label::before,\n.monaco-action-bar .action-item.disabled .action-label:hover {\n\topacity: 0.4;\n}\n\n/* Vertical actions */\n\n.monaco-action-bar.vertical {\n\ttext-align: left;\n}\n\n.monaco-action-bar.vertical .action-item {\n\tdisplay: block;\n}\n\n.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-action-bar .action-item .action-label.separator {\n\twidth: 1px;\n\theight: 16px;\n\tmargin: 5px 4px !important;\n\tcursor: default;\n\tmin-width: 1px;\n\tpadding: 0;\n\tbackground-color: #bbb;\n}\n\n.secondary-actions .monaco-action-bar .action-label {\n\tmargin-left: 6px;\n}\n\n/* Action Items */\n.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-action-bar .action-item.action-dropdown-item {\n\tdisplay: flex;\n}\n\n.monaco-action-bar .action-item.action-dropdown-item > .action-label {\n\tmargin-right: 1px;\n}\n",""]),t.Z=o},93:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,"/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-aria-container {\n\tposition: absolute; /* try to hide from window but not from screen readers */\n\tleft:-999em;\n}",""]),t.Z=o},2013:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,"/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-text-button {\n\tbox-sizing: border-box;\n\tdisplay: flex;\n\twidth: 100%;\n\tpadding: 4px;\n\ttext-align: center;\n\tcursor: pointer;\n\tjustify-content: center;\n\talign-items: center;\n}\n\n.monaco-text-button:focus {\n\toutline-offset: 2px !important;\n}\n\n.monaco-text-button:hover {\n\ttext-decoration: none !important;\n}\n\n.monaco-button.disabled:focus,\n.monaco-button.disabled {\n\topacity: 0.4 !important;\n\tcursor: default;\n}\n\n.monaco-text-button > .codicon {\n\tmargin: 0 0.2em;\n\tcolor: inherit !important;\n}\n\n.monaco-button-dropdown {\n\tdisplay: flex;\n\tcursor: pointer;\n}\n\n.monaco-button-dropdown > .monaco-dropdown-button {\n\tmargin-left: 1px;\n}\n\n.monaco-description-button {\n\tflex-direction: column;\n}\n\n.monaco-description-button .monaco-button-label {\n\tfont-weight: 500;\n}\n\n.monaco-description-button .monaco-button-description {\n\tfont-style: italic;\n}\n\n.monaco-description-button .monaco-button-label,\n.monaco-description-button .monaco-button-description\n{\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n}\n\n.monaco-description-button .monaco-button-label > .codicon,\n.monaco-description-button .monaco-button-description > .codicon\n{\n\tmargin: 0 0.2em;\n\tcolor: inherit !important;\n}\n",""]),t.Z=o},4081:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,"/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.codicon-wrench-subaction {\n\topacity: 0.5;\n}\n\n@keyframes codicon-spin {\n\t100% {\n\t\ttransform:rotate(360deg);\n\t}\n}\n\n.codicon-sync.codicon-modifier-spin,\n.codicon-loading.codicon-modifier-spin,\n.codicon-gear.codicon-modifier-spin,\n.codicon-notebook-state-executing.codicon-modifier-spin {\n\t/* Use steps to throttle FPS to reduce CPU usage */\n\tanimation: codicon-spin 1.5s steps(30) infinite;\n}\n\n.codicon-modifier-disabled {\n\topacity: 0.4;\n}\n\n/* custom speed & easing for loading icon */\n.codicon-loading,\n.codicon-tree-item-loading::before {\n\tanimation-duration: 1s !important;\n\tanimation-timing-function: cubic-bezier(0.53, 0.21, 0.29, 0.67) !important;\n}\n",""]),t.Z=o},58:function(e,t,i){"use strict";var n=i(3645),o=i.n(n),r=i(1667),s=i.n(r),a=i(6147),l=i.n(a),c=o()((function(e){return e[1]})),d=s()(l());c.push([e.id,'/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n@font-face {\n\tfont-family: "codicon";\n\tfont-display: block;\n\tsrc: url('+d+") format(\"truetype\");\n}\n\n.codicon[class*='codicon-'] {\n\tfont: normal normal normal 16px/1 codicon;\n\tdisplay: inline-block;\n\ttext-decoration: none;\n\ttext-rendering: auto;\n\ttext-align: center;\n\ttext-transform: none;\n\t-webkit-font-smoothing: antialiased;\n\t-moz-osx-font-smoothing: grayscale;\n\tuser-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n}\n\n/* icon rules are dynamically created by the platform theme service (see iconsStyleSheet.ts) */\n",""]),t.Z=c},6328:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,"/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.context-view {\n\tposition: absolute;\n\tz-index: 2500;\n}\n\n.context-view.fixed {\n\tall: initial;\n\tfont-family: inherit;\n\tfont-size: 13px;\n\tposition: fixed;\n\tz-index: 2500;\n\tcolor: inherit;\n}\n",""]),t.Z=o},477:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,"/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-count-badge {\n\tpadding: 3px 6px;\n\tborder-radius: 11px;\n\tfont-size: 11px;\n\tmin-width: 18px;\n\tmin-height: 18px;\n\tline-height: 11px;\n\tfont-weight: normal;\n\ttext-align: center;\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n}\n\n.monaco-count-badge.long {\n\tpadding: 2px 3px;\n\tborder-radius: 2px;\n\tmin-height: auto;\n\tline-height: normal;\n}\n",""]),t.Z=o},4269:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,"/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* ---------- Icon label ---------- */\n\n.monaco-icon-label {\n\tdisplay: flex; /* required for icons support :before rule */\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n}\n\n.monaco-icon-label::before {\n\n\t/* svg icons rendered as background image */\n\tbackground-size: 16px;\n\tbackground-position: left center;\n\tbackground-repeat: no-repeat;\n\tpadding-right: 6px;\n\twidth: 16px;\n\theight: 22px;\n\tline-height: inherit !important;\n\tdisplay: inline-block;\n\n\t/* fonts icons */\n\t-webkit-font-smoothing: antialiased;\n\t-moz-osx-font-smoothing: grayscale;\n\tvertical-align: top;\n\n\tflex-shrink: 0; /* fix for https://github.com/microsoft/vscode/issues/13787 */\n}\n\n.monaco-icon-label > .monaco-icon-label-container {\n\tmin-width: 0;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\tflex: 1;\n}\n\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-name-container > .label-name {\n\tcolor: inherit;\n\twhite-space: pre; /* enable to show labels that include multiple whitespaces */\n}\n\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-name-container > .label-name > .label-separator {\n\tmargin: 0 2px;\n\topacity: 0.5;\n}\n\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\n\topacity: .7;\n\tmargin-left: 0.5em;\n\tfont-size: 0.9em;\n\twhite-space: pre; /* enable to show labels that include multiple whitespaces */\n}\n\n.monaco-icon-label.nowrap > .monaco-icon-label-container > .monaco-icon-description-container > .label-description{\n\twhite-space: nowrap\n}\n\n.vs .monaco-icon-label > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\n\topacity: .95;\n}\n\n.monaco-icon-label.italic > .monaco-icon-label-container > .monaco-icon-name-container > .label-name,\n.monaco-icon-label.italic > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\n\tfont-style: italic;\n}\n\n.monaco-icon-label.deprecated {\n\ttext-decoration: line-through;\n\topacity: 0.66;\n}\n\n/* make sure apply italic font style to decorations as well */\n.monaco-icon-label.italic::after {\n\tfont-style: italic;\n}\n\n.monaco-icon-label.strikethrough > .monaco-icon-label-container > .monaco-icon-name-container > .label-name,\n.monaco-icon-label.strikethrough > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\n\ttext-decoration: line-through;\n}\n\n.monaco-icon-label::after {\n\topacity: 0.75;\n\tfont-size: 90%;\n\tfont-weight: 600;\n\tmargin: auto 16px 0 5px; /* https://github.com/microsoft/vscode/issues/113223 */\n\ttext-align: center;\n}\n\n/* make sure selection color wins when a label is being selected */\n.monaco-list:focus .selected .monaco-icon-label, /* list */\n.monaco-list:focus .selected .monaco-icon-label::after\n{\n\tcolor: inherit !important;\n}\n\n.monaco-list-row.focused.selected .label-description,\n.monaco-list-row.selected .label-description {\n\topacity: .8;\n}\n",""]),t.Z=o},1188:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,"/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-inputbox {\n\tposition: relative;\n\tdisplay: block;\n\tpadding: 0;\n\tbox-sizing:\tborder-box;\n\n\t/* Customizable */\n\tfont-size: inherit;\n}\n\n.monaco-inputbox.idle {\n\tborder: 1px solid transparent;\n}\n\n.monaco-inputbox > .ibwrapper > .input,\n.monaco-inputbox > .ibwrapper > .mirror {\n\n\t/* Customizable */\n\tpadding: 4px;\n}\n\n.monaco-inputbox > .ibwrapper {\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n}\n\n.monaco-inputbox > .ibwrapper > .input {\n\tdisplay: inline-block;\n\tbox-sizing:\tborder-box;\n\twidth: 100%;\n\theight: 100%;\n\tline-height: inherit;\n\tborder: none;\n\tfont-family: inherit;\n\tfont-size: inherit;\n\tresize: none;\n\tcolor: inherit;\n}\n\n.monaco-inputbox > .ibwrapper > input {\n\ttext-overflow: ellipsis;\n}\n\n.monaco-inputbox > .ibwrapper > textarea.input {\n\tdisplay: block;\n\t-ms-overflow-style: none; /* IE 10+: hide scrollbars */\n\tscrollbar-width: none; /* Firefox: hide scrollbars */\n\toutline: none;\n}\n\n.monaco-inputbox > .ibwrapper > textarea.input::-webkit-scrollbar {\n\tdisplay: none; /* Chrome + Safari: hide scrollbar */\n}\n\n.monaco-inputbox > .ibwrapper > textarea.input.empty {\n\twhite-space: nowrap;\n}\n\n.monaco-inputbox > .ibwrapper > .mirror {\n\tposition: absolute;\n\tdisplay: inline-block;\n\twidth: 100%;\n\ttop: 0;\n\tleft: 0;\n\tbox-sizing: border-box;\n\twhite-space: pre-wrap;\n\tvisibility: hidden;\n\tword-wrap: break-word;\n}\n\n/* Context view */\n\n.monaco-inputbox-container {\n\ttext-align: right;\n}\n\n.monaco-inputbox-container .monaco-inputbox-message {\n\tdisplay: inline-block;\n\toverflow: hidden;\n\ttext-align: left;\n\twidth: 100%;\n\tbox-sizing:\tborder-box;\n\tpadding: 0.4em;\n\tfont-size: 12px;\n\tline-height: 17px;\n\tmargin-top: -1px;\n\tword-wrap: break-word;\n}\n\n/* Action bar support */\n.monaco-inputbox .monaco-action-bar {\n\tposition: absolute;\n\tright: 2px;\n\ttop: 4px;\n}\n\n.monaco-inputbox .monaco-action-bar .action-item {\n\tmargin-left: 2px;\n}\n\n.monaco-inputbox .monaco-action-bar .action-item .codicon {\n\tbackground-repeat: no-repeat;\n\twidth: 16px;\n\theight: 16px;\n}\n",""]),t.Z=o},2298:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,"/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-keybinding {\n\tdisplay: flex;\n\talign-items: center;\n\tline-height: 10px;\n}\n\n.monaco-keybinding > .monaco-keybinding-key {\n\tdisplay: inline-block;\n\tborder-style: solid;\n\tborder-width: 1px;\n\tborder-radius: 3px;\n\tvertical-align: middle;\n\tfont-size: 11px;\n\tpadding: 3px 5px;\n\tmargin: 0 2px;\n}\n\n.monaco-keybinding > .monaco-keybinding-key:first-child {\n\tmargin-left: 0;\n}\n\n.monaco-keybinding > .monaco-keybinding-key:last-child {\n\tmargin-right: 0;\n}\n\n.monaco-keybinding > .monaco-keybinding-key-separator {\n\tdisplay: inline-block;\n}\n\n.monaco-keybinding > .monaco-keybinding-key-chord-separator {\n\twidth: 6px;\n}\n",""]),t.Z=o},7703:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,"/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-list {\n\tposition: relative;\n\theight: 100%;\n\twidth: 100%;\n\twhite-space: nowrap;\n}\n\n.monaco-list.mouse-support {\n\tuser-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n}\n\n.monaco-list > .monaco-scrollable-element {\n\theight: 100%;\n}\n\n.monaco-list-rows {\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n}\n\n.monaco-list.horizontal-scrolling .monaco-list-rows {\n\twidth: auto;\n\tmin-width: 100%;\n}\n\n.monaco-list-row {\n\tposition: absolute;\n\tbox-sizing: border-box;\n\toverflow: hidden;\n\twidth: 100%;\n}\n\n.monaco-list.mouse-support .monaco-list-row {\n\tcursor: pointer;\n\ttouch-action: none;\n}\n\n/* for OS X ballistic scrolling */\n.monaco-list-row.scrolling {\n\tdisplay: none !important;\n}\n\n/* Focus */\n.monaco-list.element-focused,\n.monaco-list.selection-single,\n.monaco-list.selection-multiple {\n\toutline: 0 !important;\n}\n\n/* Dnd */\n.monaco-drag-image {\n\tdisplay: inline-block;\n\tpadding: 1px 7px;\n\tborder-radius: 10px;\n\tfont-size: 12px;\n\tposition: absolute;\n\tz-index: 1000;\n}\n\n/* Type filter */\n\n.monaco-list-type-filter {\n\tdisplay: flex;\n\talign-items: center;\n\tposition: absolute;\n\tborder-radius: 2px;\n\tpadding: 0px 3px;\n\tmax-width: calc(100% - 10px);\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n\ttext-align: right;\n\tbox-sizing: border-box;\n\tcursor: all-scroll;\n\tfont-size: 13px;\n\tline-height: 18px;\n\theight: 20px;\n\tz-index: 1;\n\ttop: 4px;\n}\n\n.monaco-list-type-filter.dragging {\n\ttransition: top 0.2s, left 0.2s;\n}\n\n.monaco-list-type-filter.ne {\n\tright: 4px;\n}\n\n.monaco-list-type-filter.nw {\n\tleft: 4px;\n}\n\n.monaco-list-type-filter > .controls {\n\tdisplay: flex;\n\talign-items: center;\n\tbox-sizing: border-box;\n\ttransition: width 0.2s;\n\twidth: 0;\n}\n\n.monaco-list-type-filter.dragging > .controls,\n.monaco-list-type-filter:hover > .controls {\n\twidth: 36px;\n}\n\n.monaco-list-type-filter > .controls > * {\n\tborder: none;\n\tbox-sizing: border-box;\n\t-webkit-appearance: none;\n\t-moz-appearance: none;\n\tbackground: none;\n\twidth: 16px;\n\theight: 16px;\n\tflex-shrink: 0;\n\tmargin: 0;\n\tpadding: 0;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tcursor: pointer;\n}\n\n.monaco-list-type-filter > .controls > .filter {\n\tmargin-left: 4px;\n}\n\n.monaco-list-type-filter-message {\n\tposition: absolute;\n\tbox-sizing: border-box;\n\twidth: 100%;\n\theight: 100%;\n\ttop: 0;\n\tleft: 0;\n\tpadding: 40px 1em 1em 1em;\n\ttext-align: center;\n\twhite-space: normal;\n\topacity: 0.7;\n\tpointer-events: none;\n}\n\n.monaco-list-type-filter-message:empty {\n\tdisplay: none;\n}\n\n/* Electron */\n\n.monaco-list-type-filter {\n\tcursor: grab;\n}\n\n.monaco-list-type-filter.dragging {\n\tcursor: grabbing;\n}\n",""]),t.Z=o},7548:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,"/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-mouse-cursor-text {\n\tcursor: text;\n}\n",""]),t.Z=o},4185:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,"/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-progress-container {\n\twidth: 100%;\n\theight: 5px;\n\toverflow: hidden; /* keep progress bit in bounds */\n}\n\n.monaco-progress-container .progress-bit {\n\twidth: 2%;\n\theight: 5px;\n\tposition: absolute;\n\tleft: 0;\n\tdisplay: none;\n}\n\n.monaco-progress-container.active .progress-bit {\n\tdisplay: inherit;\n}\n\n.monaco-progress-container.discrete .progress-bit {\n\tleft: 0;\n\ttransition: width 100ms linear;\n}\n\n.monaco-progress-container.discrete.done .progress-bit {\n\twidth: 100%;\n}\n\n.monaco-progress-container.infinite .progress-bit {\n\tanimation-name: progress;\n\tanimation-duration: 4s;\n\tanimation-iteration-count: infinite;\n\ttransform: translate3d(0px, 0px, 0px);\n\tanimation-timing-function: linear;\n}\n\n.monaco-progress-container.infinite.infinite-long-running .progress-bit {\n\t/*\n\t\tThe more smooth `linear` timing function can cause\n\t\thigher GPU consumption as indicated in\n\t\thttps://github.com/microsoft/vscode/issues/97900 &\n\t\thttps://github.com/microsoft/vscode/issues/138396\n\t*/\n\tanimation-timing-function: steps(100);\n}\n\n/**\n * The progress bit has a width: 2% (1/50) of the parent container. The animation moves it from 0% to 100% of\n * that container. Since translateX is relative to the progress bit size, we have to multiple it with\n * its relative size to the parent container:\n * parent width: 5000%\n *    bit width: 100%\n * translateX should be as follow:\n *  50%: 5000% * 50% - 50% (set to center) = 2450%\n * 100%: 5000% * 100% - 100% (do not overflow) = 4900%\n */\n@keyframes progress { from { transform: translateX(0%) scaleX(1) } 50% { transform: translateX(2500%) scaleX(3) } to { transform: translateX(4900%) scaleX(1) } }\n",""]),t.Z=o},1629:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,"/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n:root {\n\t--sash-size: 4px;\n}\n\n.monaco-sash {\n\tposition: absolute;\n\tz-index: 35;\n\ttouch-action: none;\n}\n\n.monaco-sash.disabled {\n\tpointer-events: none;\n}\n\n.monaco-sash.mac.vertical {\n\tcursor: col-resize;\n}\n\n.monaco-sash.vertical.minimum {\n\tcursor: e-resize;\n}\n\n.monaco-sash.vertical.maximum {\n\tcursor: w-resize;\n}\n\n.monaco-sash.mac.horizontal {\n\tcursor: row-resize;\n}\n\n.monaco-sash.horizontal.minimum {\n\tcursor: s-resize;\n}\n\n.monaco-sash.horizontal.maximum {\n\tcursor: n-resize;\n}\n\n.monaco-sash.disabled {\n\tcursor: default !important;\n\tpointer-events: none !important;\n}\n\n.monaco-sash.vertical {\n\tcursor: ew-resize;\n\ttop: 0;\n\twidth: var(--sash-size);\n\theight: 100%;\n}\n\n.monaco-sash.horizontal {\n\tcursor: ns-resize;\n\tleft: 0;\n\twidth: 100%;\n\theight: var(--sash-size);\n}\n\n.monaco-sash:not(.disabled) > .orthogonal-drag-handle {\n\tcontent: \" \";\n\theight: calc(var(--sash-size) * 2);\n\twidth: calc(var(--sash-size) * 2);\n\tz-index: 100;\n\tdisplay: block;\n\tcursor: all-scroll;\n\tposition: absolute;\n}\n\n.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)\n\t> .orthogonal-drag-handle.start,\n.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)\n\t> .orthogonal-drag-handle.end {\n\tcursor: nwse-resize;\n}\n\n.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)\n\t> .orthogonal-drag-handle.end,\n.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)\n\t> .orthogonal-drag-handle.start {\n\tcursor: nesw-resize;\n}\n\n.monaco-sash.vertical > .orthogonal-drag-handle.start {\n\tleft: calc(var(--sash-size) * -0.5);\n\ttop: calc(var(--sash-size) * -1);\n}\n.monaco-sash.vertical > .orthogonal-drag-handle.end {\n\tleft: calc(var(--sash-size) * -0.5);\n\tbottom: calc(var(--sash-size) * -1);\n}\n.monaco-sash.horizontal > .orthogonal-drag-handle.start {\n\ttop: calc(var(--sash-size) * -0.5);\n\tleft: calc(var(--sash-size) * -1);\n}\n.monaco-sash.horizontal > .orthogonal-drag-handle.end {\n\ttop: calc(var(--sash-size) * -0.5);\n\tright: calc(var(--sash-size) * -1);\n}\n\n.monaco-sash:before {\n\tcontent: '';\n\tpointer-events: none;\n\tposition: absolute;\n\twidth: 100%;\n\theight: 100%;\n\ttransition: background-color 0.1s ease-out;\n\tbackground: transparent;\n}\n\n.monaco-sash.vertical:before {\n\twidth: var(--sash-hover-size);\n\tleft: calc(50% - (var(--sash-hover-size) / 2));\n}\n\n.monaco-sash.horizontal:before {\n\theight: var(--sash-hover-size);\n\ttop: calc(50% - (var(--sash-hover-size) / 2));\n}\n\n.pointer-events-disabled {\n\tpointer-events: none !important;\n}\n\n/** Debug **/\n\n.monaco-sash.debug {\n\tbackground: cyan;\n}\n\n.monaco-sash.debug.disabled {\n\tbackground: rgba(0, 255, 255, 0.2);\n}\n\n.monaco-sash.debug:not(.disabled) > .orthogonal-drag-handle {\n\tbackground: red;\n}\n",""]),t.Z=o},7198:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,"/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* Arrows */\n.monaco-scrollable-element > .scrollbar > .scra {\n\tcursor: pointer;\n\tfont-size: 11px !important;\n}\n\n.monaco-scrollable-element > .visible {\n\topacity: 1;\n\n\t/* Background rule added for IE9 - to allow clicks on dom node */\n\tbackground:rgba(0,0,0,0);\n\n\ttransition: opacity 100ms linear;\n}\n.monaco-scrollable-element > .invisible {\n\topacity: 0;\n\tpointer-events: none;\n}\n.monaco-scrollable-element > .invisible.fade {\n\ttransition: opacity 800ms linear;\n}\n\n/* Scrollable Content Inset Shadow */\n.monaco-scrollable-element > .shadow {\n\tposition: absolute;\n\tdisplay: none;\n}\n.monaco-scrollable-element > .shadow.top {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 3px;\n\theight: 3px;\n\twidth: 100%;\n}\n.monaco-scrollable-element > .shadow.left {\n\tdisplay: block;\n\ttop: 3px;\n\tleft: 0;\n\theight: 100%;\n\twidth: 3px;\n}\n.monaco-scrollable-element > .shadow.top-left-corner {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 0;\n\theight: 3px;\n\twidth: 3px;\n}\n",""]),t.Z=o},2470:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,"/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-split-view2 {\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n}\n\n.monaco-split-view2 > .sash-container {\n\tposition: absolute;\n\twidth: 100%;\n\theight: 100%;\n\tpointer-events: none;\n}\n\n.monaco-split-view2 > .sash-container > .monaco-sash {\n\tpointer-events: initial;\n}\n\n.monaco-split-view2 > .monaco-scrollable-element {\n\twidth: 100%;\n\theight: 100%;\n}\n\n.monaco-split-view2 > .monaco-scrollable-element > .split-view-container {\n\twidth: 100%;\n\theight: 100%;\n\twhite-space: nowrap;\n\tposition: relative;\n}\n\n.monaco-split-view2 > .monaco-scrollable-element > .split-view-container > .split-view-view {\n\twhite-space: initial;\n\tposition: absolute;\n}\n\n.monaco-split-view2 > .monaco-scrollable-element > .split-view-container > .split-view-view:not(.visible) {\n\tdisplay: none;\n}\n\n.monaco-split-view2.vertical > .monaco-scrollable-element > .split-view-container > .split-view-view {\n\twidth: 100%;\n}\n\n.monaco-split-view2.horizontal > .monaco-scrollable-element > .split-view-container > .split-view-view {\n\theight: 100%;\n}\n\n.monaco-split-view2.separator-border > .monaco-scrollable-element > .split-view-container > .split-view-view:not(:first-child)::before {\n\tcontent: ' ';\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\tz-index: 5;\n\tpointer-events: none;\n\tbackground-color: var(--separator-border);\n}\n\n.monaco-split-view2.separator-border.horizontal > .monaco-scrollable-element > .split-view-container > .split-view-view:not(:first-child)::before {\n\theight: 100%;\n\twidth: 1px;\n}\n\n.monaco-split-view2.separator-border.vertical > .monaco-scrollable-element > .split-view-container > .split-view-view:not(:first-child)::before {\n\theight: 1px;\n\twidth: 100%;\n}\n",""]),t.Z=o},1728:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,'/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-table {\n\tdisplay: flex;\n\tflex-direction: column;\n\tposition: relative;\n\theight: 100%;\n\twidth: 100%;\n\twhite-space: nowrap;\n}\n\n.monaco-table > .monaco-split-view2 {\n\tborder-bottom: 1px solid transparent;\n}\n\n.monaco-table > .monaco-list {\n\tflex: 1;\n}\n\n.monaco-table-tr {\n\tdisplay: flex;\n\theight: 100%;\n}\n\n.monaco-table-th {\n\twidth: 100%;\n\theight: 100%;\n\tfont-weight: bold;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n}\n\n.monaco-table-th,\n.monaco-table-td {\n\tbox-sizing: border-box;\n\tflex-shrink: 0;\n\toverflow: hidden;\n\twhite-space: nowrap;\n\ttext-overflow: ellipsis;\n}\n\n.monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {\n\tcontent: "";\n\tposition: absolute;\n\tleft: calc(var(--sash-size) / 2);\n\twidth: 0;\n\tborder-left: 1px solid transparent;\n}\n\n.monaco-table > .monaco-split-view2,\n.monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {\n\ttransition: border-color 0.2s ease-out;\n}\n/*\n.monaco-table:hover > .monaco-split-view2,\n.monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {\n\tborder-color: rgba(204, 204, 204, 0.2);\n} */\n',""]),t.Z=o},1766:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,"/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-tl-row {\n\tdisplay: flex;\n\theight: 100%;\n\talign-items: center;\n\tposition: relative;\n}\n\n.monaco-tl-indent {\n\theight: 100%;\n\tposition: absolute;\n\ttop: 0;\n\tleft: 16px;\n\tpointer-events: none;\n}\n\n.hide-arrows .monaco-tl-indent {\n\tleft: 12px;\n}\n\n.monaco-tl-indent > .indent-guide {\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n\theight: 100%;\n\tborder-left: 1px solid transparent;\n}\n\n.monaco-tl-indent > .indent-guide {\n\ttransition: border-color 0.1s linear;\n}\n\n.monaco-tl-twistie,\n.monaco-tl-contents {\n\theight: 100%;\n}\n\n.monaco-tl-twistie {\n\tfont-size: 10px;\n\ttext-align: right;\n\tpadding-right: 6px;\n\tflex-shrink: 0;\n\twidth: 16px;\n\tdisplay: flex !important;\n\talign-items: center;\n\tjustify-content: center;\n\ttransform: translateX(3px);\n}\n\n.monaco-tl-contents {\n\tflex: 1;\n\toverflow: hidden;\n}\n\n.monaco-tl-twistie::before {\n\tborder-radius: 20px;\n}\n\n.monaco-tl-twistie.collapsed::before {\n\ttransform: rotate(-90deg);\n}\n\n.monaco-tl-twistie.codicon-tree-item-loading::before {\n\t/* Use steps to throttle FPS to reduce CPU usage */\n\tanimation: codicon-spin 1.25s steps(30) infinite;\n}\n",""]),t.Z=o},3257:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,"/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.quick-input-widget {\n\tposition: absolute;\n\twidth: 600px;\n\tz-index: 2000;\n\tpadding: 0 1px 1px 1px;\n\tleft: 50%;\n\tmargin-left: -300px;\n}\n\n.quick-input-titlebar {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.quick-input-left-action-bar {\n\tdisplay: flex;\n\tmargin-left: 4px;\n\tflex: 1;\n}\n\n.quick-input-title {\n\tpadding: 3px 0px;\n\ttext-align: center;\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n}\n\n.quick-input-right-action-bar {\n\tdisplay: flex;\n\tmargin-right: 4px;\n\tflex: 1;\n}\n\n.quick-input-right-action-bar > .actions-container {\n\tjustify-content: flex-end;\n}\n\n.quick-input-titlebar .monaco-action-bar .action-label.codicon {\n\tbackground-position: center;\n\tbackground-repeat: no-repeat;\n\tpadding: 2px;\n}\n\n.quick-input-description {\n\tmargin: 6px;\n}\n\n.quick-input-header .quick-input-description {\n\tmargin: 4px 2px;\n}\n\n.quick-input-header {\n\tdisplay: flex;\n\tpadding: 6px 6px 0px 6px;\n\tmargin-bottom: -2px;\n}\n\n.quick-input-widget.hidden-input .quick-input-header {\n\t/* reduce margins and paddings when input box hidden */\n\tpadding: 0;\n\tmargin-bottom: 0;\n}\n\n.quick-input-and-message {\n\tdisplay: flex;\n\tflex-direction: column;\n\tflex-grow: 1;\n\tmin-width: 0;\n\tposition: relative;\n}\n\n.quick-input-check-all {\n\talign-self: center;\n\tmargin: 0;\n}\n\n.quick-input-filter {\n\tflex-grow: 1;\n\tdisplay: flex;\n\tposition: relative;\n}\n\n.quick-input-box {\n\tflex-grow: 1;\n}\n\n.quick-input-widget.show-checkboxes .quick-input-box,\n.quick-input-widget.show-checkboxes .quick-input-message {\n\tmargin-left: 5px;\n}\n\n.quick-input-visible-count {\n\tposition: absolute;\n\tleft: -10000px;\n}\n\n.quick-input-count {\n\talign-self: center;\n\tposition: absolute;\n\tright: 4px;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.quick-input-count .monaco-count-badge {\n\tvertical-align: middle;\n\tpadding: 2px 4px;\n\tborder-radius: 2px;\n\tmin-height: auto;\n\tline-height: normal;\n}\n\n.quick-input-action {\n\tmargin-left: 6px;\n}\n\n.quick-input-action .monaco-text-button {\n\tfont-size: 11px;\n\tpadding: 0 6px;\n\tdisplay: flex;\n\theight: 27.5px;\n\talign-items: center;\n}\n\n.quick-input-message {\n\tmargin-top: -1px;\n\tpadding: 5px;\n\toverflow-wrap: break-word;\n}\n\n.quick-input-message > .codicon {\n\tmargin: 0 0.2em;\n\tvertical-align: text-bottom;\n}\n\n.quick-input-progress.monaco-progress-container {\n\tposition: relative;\n}\n\n.quick-input-progress.monaco-progress-container,\n.quick-input-progress.monaco-progress-container .progress-bit {\n\theight: 2px;\n}\n\n.quick-input-list {\n\tline-height: 22px;\n\tmargin-top: 6px;\n}\n\n.quick-input-widget.hidden-input .quick-input-list {\n\tmargin-top: 0; /* reduce margins when input box hidden */\n}\n\n.quick-input-list .monaco-list {\n\toverflow: hidden;\n\tmax-height: calc(20 * 22px);\n}\n\n.quick-input-list .quick-input-list-entry {\n\tbox-sizing: border-box;\n\toverflow: hidden;\n\tdisplay: flex;\n\theight: 100%;\n\tpadding: 0 6px;\n}\n\n.quick-input-list .quick-input-list-entry.quick-input-list-separator-border {\n\tborder-top-width: 1px;\n\tborder-top-style: solid;\n}\n\n.quick-input-list .monaco-list-row[data-index=\"0\"] .quick-input-list-entry.quick-input-list-separator-border {\n\tborder-top-style: none;\n}\n\n.quick-input-list .quick-input-list-label {\n\toverflow: hidden;\n\tdisplay: flex;\n\theight: 100%;\n\tflex: 1;\n}\n\n.quick-input-list .quick-input-list-checkbox {\n\talign-self: center;\n\tmargin: 0;\n}\n\n.quick-input-list .quick-input-list-rows {\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\tdisplay: flex;\n\tflex-direction: column;\n\theight: 100%;\n\tflex: 1;\n\tmargin-left: 5px;\n}\n\n.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-rows {\n\tmargin-left: 10px;\n}\n\n.quick-input-widget .quick-input-list .quick-input-list-checkbox {\n\tdisplay: none;\n}\n.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-checkbox {\n\tdisplay: inline;\n}\n\n.quick-input-list .quick-input-list-rows > .quick-input-list-row {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .monaco-icon-label,\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .monaco-icon-label .monaco-icon-label-container > .monaco-icon-name-container {\n\tflex: 1; /* make sure the icon label grows within the row */\n}\n\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .codicon[class*='codicon-'] {\n\tvertical-align: text-bottom;\n}\n\n.quick-input-list .quick-input-list-rows .monaco-highlighted-label span {\n\topacity: 1;\n}\n\n.quick-input-list .quick-input-list-entry .quick-input-list-entry-keybinding {\n\tmargin-right: 8px; /* separate from the separator label or scrollbar if any */\n}\n\n.quick-input-list .quick-input-list-label-meta {\n\topacity: 0.7;\n\tline-height: normal;\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n}\n\n.quick-input-list .monaco-highlighted-label .highlight {\n\tfont-weight: bold;\n}\n\n.quick-input-list .quick-input-list-entry .quick-input-list-separator {\n\tmargin-right: 8px; /* separate from keybindings or actions */\n}\n\n.quick-input-list .quick-input-list-entry-action-bar {\n\tdisplay: flex;\n\tflex: 0;\n\toverflow: visible;\n}\n\n.quick-input-list .quick-input-list-entry-action-bar .action-label {\n\t/*\n\t * By default, actions in the quick input action bar are hidden\n\t * until hovered over them or selected.\n\t */\n\tdisplay: none;\n}\n\n.quick-input-list .quick-input-list-entry-action-bar .action-label.codicon {\n\tmargin-right: 4px;\n\tpadding: 0px 2px 2px 2px;\n}\n\n.quick-input-list .quick-input-list-entry-action-bar {\n\tmargin-top: 1px;\n}\n\n.quick-input-list .quick-input-list-entry-action-bar {\n\tmargin-right: 4px; /* separate from scrollbar */\n}\n\n.quick-input-list .quick-input-list-entry .quick-input-list-entry-action-bar .action-label.always-visible,\n.quick-input-list .quick-input-list-entry:hover .quick-input-list-entry-action-bar .action-label,\n.quick-input-list .monaco-list-row.focused .quick-input-list-entry-action-bar .action-label {\n\tdisplay: flex;\n}\n\n/* focused items in quick pick */\n.quick-input-list .monaco-list-row.focused .monaco-keybinding-key,\n.quick-input-list .monaco-list-row.focused .quick-input-list-entry .quick-input-list-separator {\n\tcolor: inherit\n}\n.quick-input-list .monaco-list-row.focused .monaco-keybinding-key {\n\tbackground: none;\n}\n",""]),t.Z=o},504:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,"/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .inputarea {\n\tmin-width: 0;\n\tmin-height: 0;\n\tmargin: 0;\n\tpadding: 0;\n\tposition: absolute;\n\toutline: none !important;\n\tresize: none;\n\tborder: none;\n\toverflow: hidden;\n\tcolor: transparent;\n\tbackground-color: transparent;\n}\n/*.monaco-editor .inputarea {\n\tposition: fixed !important;\n\twidth: 800px !important;\n\theight: 500px !important;\n\ttop: initial !important;\n\tleft: initial !important;\n\tbottom: 0 !important;\n\tright: 0 !important;\n\tcolor: black !important;\n\tbackground: white !important;\n\tline-height: 15px !important;\n\tfont-size: 14px !important;\n}*/\n.monaco-editor .inputarea.ime-input {\n\tz-index: 10;\n}\n",""]),t.Z=o},1260:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,"/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .view-overlays .current-line {\n\tdisplay: block;\n\tposition: absolute;\n\tleft: 0;\n\ttop: 0;\n\tbox-sizing: border-box;\n}\n\n.monaco-editor .margin-view-overlays .current-line {\n\tdisplay: block;\n\tposition: absolute;\n\tleft: 0;\n\ttop: 0;\n\tbox-sizing: border-box;\n}\n\n.monaco-editor .margin-view-overlays .current-line.current-line-margin.current-line-margin-both {\n\tborder-right: 0;\n}\n",""]),t.Z=o},1329:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,"/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/*\n\tKeeping name short for faster parsing.\n\tcdr = core decorations rendering (div)\n*/\n.monaco-editor .lines-content .cdr {\n\tposition: absolute;\n}",""]),t.Z=o},4827:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,"/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .glyph-margin {\n\tposition: absolute;\n\ttop: 0;\n}\n\n/*\n\tKeeping name short for faster parsing.\n\tcgmr = core glyph margin rendering (div)\n*/\n.monaco-editor .margin-view-overlays .cgmr {\n\tposition: absolute;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n",""]),t.Z=o},6848:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,"/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .lines-content .core-guide {\n\tposition: absolute;\n\tbox-sizing: border-box;\n}\n",""]),t.Z=o},6184:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,"/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .margin-view-overlays .line-numbers {\n\tfont-variant-numeric: tabular-nums;\n\tposition: absolute;\n\ttext-align: right;\n\tdisplay: inline-block;\n\tvertical-align: middle;\n\tbox-sizing: border-box;\n\tcursor: default;\n\theight: 100%;\n}\n\n.monaco-editor .relative-current-line-number {\n\ttext-align: left;\n\tdisplay: inline-block;\n\twidth: 100%;\n}\n\n.monaco-editor .margin-view-overlays .line-numbers.lh-odd {\n\tmargin-top: 1px;\n}\n",""]),t.Z=o},9565:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,"/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* Uncomment to see lines flashing when they're painted */\n/*.monaco-editor .view-lines > .view-line {\n\tbackground-color: none;\n\tanimation-name: flash-background;\n\tanimation-duration: 800ms;\n}\n@keyframes flash-background {\n\t0%   { background-color: lightgreen; }\n\t100% { background-color: none }\n}*/\n\n.mtkcontrol {\n\tcolor: rgb(255, 255, 255) !important;\n\tbackground: rgb(150, 0, 0) !important;\n}\n\n.monaco-editor.no-user-select .lines-content,\n.monaco-editor.no-user-select .view-line,\n.monaco-editor.no-user-select .view-lines {\n\tuser-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n}\n\n.monaco-editor .view-lines {\n\twhite-space: nowrap;\n}\n\n.monaco-editor .view-line {\n\tposition: absolute;\n\twidth: 100%;\n}\n\n.monaco-editor .mtkz {\n\tdisplay: inline-block;\n}\n\n/* TODO@tokenization bootstrap fix */\n/*.monaco-editor .view-line > span > span {\n\tfloat: none;\n\tmin-height: inherit;\n\tmargin-left: inherit;\n}*/\n",""]),t.Z=o},4444:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,"/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .lines-decorations {\n\tposition: absolute;\n\ttop: 0;\n\tbackground: white;\n}\n\n/*\n\tKeeping name short for faster parsing.\n\tcldr = core lines decorations rendering (div)\n*/\n.monaco-editor .margin-view-overlays .cldr {\n\tposition: absolute;\n\theight: 100%;\n}",""]),t.Z=o},9364:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,"/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/*\n\tKeeping name short for faster parsing.\n\tcmdr = core margin decorations rendering (div)\n*/\n.monaco-editor .margin-view-overlays .cmdr {\n\tposition: absolute;\n\tleft: 0;\n\twidth: 100%;\n\theight: 100%;\n}",""]),t.Z=o},563:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,"/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* START cover the case that slider is visible on mouseover */\n.monaco-editor .minimap.slider-mouseover .minimap-slider {\n\topacity: 0;\n\ttransition: opacity 100ms linear;\n}\n.monaco-editor .minimap.slider-mouseover:hover .minimap-slider {\n\topacity: 1;\n}\n.monaco-editor .minimap.slider-mouseover .minimap-slider.active {\n\topacity: 1;\n}\n/* END cover the case that slider is visible on mouseover */\n\n.monaco-editor .minimap-shadow-hidden {\n\tposition: absolute;\n\twidth: 0;\n}\n.monaco-editor .minimap-shadow-visible {\n\tposition: absolute;\n\tleft: -6px;\n\twidth: 6px;\n}\n.monaco-editor.no-minimap-shadow .minimap-shadow-visible {\n\tposition: absolute;\n\tleft: -1px;\n\twidth: 1px;\n}\n",""]),t.Z=o},9822:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,"/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .overlayWidgets {\n\tposition: absolute;\n\ttop: 0;\n\tleft:0;\n}",""]),t.Z=o},9443:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,"/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .view-ruler {\n\tposition: absolute;\n\ttop: 0;\n}",""]),t.Z=o},9649:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,"/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .scroll-decoration {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\theight: 6px;\n}",""]),t.Z=o},2595:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,"/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/*\n\tKeeping name short for faster parsing.\n\tcslr = core selections layer rendering (div)\n*/\n.monaco-editor .lines-content .cslr {\n\tposition: absolute;\n}\n\n.monaco-editor\t\t\t.top-left-radius\t\t{ border-top-left-radius: 3px; }\n.monaco-editor\t\t\t.bottom-left-radius\t\t{ border-bottom-left-radius: 3px; }\n.monaco-editor\t\t\t.top-right-radius\t\t{ border-top-right-radius: 3px; }\n.monaco-editor\t\t\t.bottom-right-radius\t{ border-bottom-right-radius: 3px; }\n\n.monaco-editor.hc-black .top-left-radius\t\t{ border-top-left-radius: 0; }\n.monaco-editor.hc-black .bottom-left-radius\t\t{ border-bottom-left-radius: 0; }\n.monaco-editor.hc-black .top-right-radius\t\t{ border-top-right-radius: 0; }\n.monaco-editor.hc-black .bottom-right-radius\t{ border-bottom-right-radius: 0; }\n",""]),t.Z=o},4057:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,"/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .cursors-layer {\n\tposition: absolute;\n\ttop: 0;\n}\n\n.monaco-editor .cursors-layer > .cursor {\n\tposition: absolute;\n\toverflow: hidden;\n}\n\n/* -- smooth-caret-animation -- */\n.monaco-editor .cursors-layer.cursor-smooth-caret-animation > .cursor {\n\ttransition: all 80ms;\n}\n\n/* -- block-outline-style -- */\n.monaco-editor .cursors-layer.cursor-block-outline-style > .cursor {\n\tbox-sizing: border-box;\n\tbackground: transparent !important;\n\tborder-style: solid;\n\tborder-width: 1px;\n}\n\n/* -- underline-style -- */\n.monaco-editor .cursors-layer.cursor-underline-style > .cursor {\n\tborder-bottom-width: 2px;\n\tborder-bottom-style: solid;\n\tbackground: transparent !important;\n\tbox-sizing: border-box;\n}\n\n/* -- underline-thin-style -- */\n.monaco-editor .cursors-layer.cursor-underline-thin-style > .cursor {\n\tborder-bottom-width: 1px;\n\tborder-bottom-style: solid;\n\tbackground: transparent !important;\n\tbox-sizing: border-box;\n}\n\n@keyframes monaco-cursor-smooth {\n\t0%,\n\t20% {\n\t\topacity: 1;\n\t}\n\t60%,\n\t100% {\n\t\topacity: 0;\n\t}\n}\n\n@keyframes monaco-cursor-phase {\n\t0%,\n\t20% {\n\t\topacity: 1;\n\t}\n\t90%,\n\t100% {\n\t\topacity: 0;\n\t}\n}\n\n@keyframes monaco-cursor-expand {\n\t0%,\n\t20% {\n\t\ttransform: scaleY(1);\n\t}\n\t80%,\n\t100% {\n\t\ttransform: scaleY(0);\n\t}\n}\n\n.cursor-smooth {\n\tanimation: monaco-cursor-smooth 0.5s ease-in-out 0s 20 alternate;\n}\n\n.cursor-phase {\n\tanimation: monaco-cursor-phase 0.5s ease-in-out 0s 20 alternate;\n}\n\n.cursor-expand > .cursor {\n\tanimation: monaco-cursor-expand 0.5s ease-in-out 0s 20 alternate;\n}\n",""]),t.Z=o},2360:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,"/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n/* ---------- DiffEditor ---------- */\n\n.monaco-diff-editor .diffOverview {\n\tz-index: 9;\n}\n\n.monaco-diff-editor .diffOverview .diffViewport {\n\tz-index: 10;\n}\n\n/* colors not externalized: using transparancy on background */\n.monaco-diff-editor.vs\t\t\t.diffOverview { background: rgba(0, 0, 0, 0.03); }\n.monaco-diff-editor.vs-dark\t\t.diffOverview { background: rgba(255, 255, 255, 0.01); }\n\n.monaco-scrollable-element.modified-in-monaco-diff-editor.vs\t\t.scrollbar { background: rgba(0,0,0,0); }\n.monaco-scrollable-element.modified-in-monaco-diff-editor.vs-dark\t.scrollbar { background: rgba(0,0,0,0); }\n.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-black\t.scrollbar { background: none; }\n\n.monaco-scrollable-element.modified-in-monaco-diff-editor .slider {\n\tz-index: 10;\n}\n.modified-in-monaco-diff-editor\t\t\t\t.slider.active { background: rgba(171, 171, 171, .4); }\n.modified-in-monaco-diff-editor.hc-black\t.slider.active { background: none; }\n\n/* ---------- Diff ---------- */\n\n.monaco-editor .insert-sign,\n.monaco-diff-editor .insert-sign,\n.monaco-editor .delete-sign,\n.monaco-diff-editor .delete-sign {\n\tfont-size: 11px !important;\n\topacity: 0.7 !important;\n\tdisplay: flex !important;\n\talign-items: center;\n}\n.monaco-editor.hc-black .insert-sign,\n.monaco-diff-editor.hc-black .insert-sign,\n.monaco-editor.hc-black .delete-sign,\n.monaco-diff-editor.hc-black .delete-sign {\n\topacity: 1;\n}\n\n.monaco-editor .inline-deleted-margin-view-zone {\n\ttext-align: right;\n}\n.monaco-editor .inline-added-margin-view-zone {\n\ttext-align: right;\n}\n\n/* ---------- Inline Diff ---------- */\n\n.monaco-editor .view-zones .view-lines .view-line span {\n\tdisplay: inline-block;\n}\n\n.monaco-editor .margin-view-zones .lightbulb-glyph:hover {\n\tcursor: pointer;\n}\n",""]),t.Z=o},4504:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,"/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-diff-editor .diff-review-line-number {\n\ttext-align: right;\n\tdisplay: inline-block;\n}\n\n.monaco-diff-editor .diff-review {\n\tposition: absolute;\n\tuser-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n}\n\n.monaco-diff-editor .diff-review-summary {\n\tpadding-left: 10px;\n}\n\n.monaco-diff-editor .diff-review-shadow {\n\tposition: absolute;\n}\n\n.monaco-diff-editor .diff-review-row {\n\twhite-space: pre;\n}\n\n.monaco-diff-editor .diff-review-table {\n\tdisplay: table;\n\tmin-width: 100%;\n}\n\n.monaco-diff-editor .diff-review-row {\n\tdisplay: table-row;\n\twidth: 100%;\n}\n\n.monaco-diff-editor .diff-review-spacer {\n\tdisplay: inline-block;\n\twidth: 10px;\n\tvertical-align: middle;\n}\n\n.monaco-diff-editor .diff-review-spacer > .codicon {\n\tfont-size: 9px !important;\n}\n\n.monaco-diff-editor .diff-review-actions {\n\tdisplay: inline-block;\n\tposition: absolute;\n\tright: 10px;\n\ttop: 2px;\n}\n\n.monaco-diff-editor .diff-review-actions .action-label {\n\twidth: 16px;\n\theight: 16px;\n\tmargin: 2px 0;\n}\n",""]),t.Z=o},7337:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,"/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* -------------------- IE10 remove auto clear button -------------------- */\n\n::-ms-clear {\n\tdisplay: none;\n}\n\n/* All widgets */\n/* I am not a big fan of this rule */\n.monaco-editor .editor-widget input {\n\tcolor: inherit;\n}\n\n/* -------------------- Editor -------------------- */\n\n.monaco-editor {\n\tposition: relative;\n\toverflow: visible;\n\t-webkit-text-size-adjust: 100%;\n}\n\n/* -------------------- Misc -------------------- */\n\n.monaco-editor .overflow-guard {\n\tposition: relative;\n\toverflow: hidden;\n}\n\n.monaco-editor .view-overlays {\n\tposition: absolute;\n\ttop: 0;\n}\n\n/*\n.monaco-editor .auto-closed-character {\n\topacity: 0.3;\n}\n*/\n",""]),t.Z=o},3198:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,"/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.quick-input-widget {\n\tfont-size: 13px;\n}\n\n.quick-input-widget .monaco-highlighted-label .highlight,\n.quick-input-widget .monaco-highlighted-label .highlight {\n\tcolor: #0066BF;\n}\n\n.vs .quick-input-widget .monaco-list-row.focused .monaco-highlighted-label .highlight,\n.vs .quick-input-widget .monaco-list-row.focused .monaco-highlighted-label .highlight {\n\tcolor: #9DDDFF;\n}\n\n.vs-dark .quick-input-widget .monaco-highlighted-label .highlight,\n.vs-dark .quick-input-widget .monaco-highlighted-label .highlight {\n\tcolor: #0097fb;\n}\n\n.hc-black .quick-input-widget .monaco-highlighted-label .highlight,\n.hc-black .quick-input-widget .monaco-highlighted-label .highlight {\n\tcolor: #F38518;\n}\n\n.monaco-keybinding > .monaco-keybinding-key {\n\tbackground-color: rgba(221, 221, 221, 0.4);\n\tborder: solid 1px rgba(204, 204, 204, 0.4);\n\tborder-bottom-color: rgba(187, 187, 187, 0.4);\n\tbox-shadow: inset 0 -1px 0 rgba(187, 187, 187, 0.4);\n\tcolor: #555;\n}\n\n.hc-black .monaco-keybinding > .monaco-keybinding-key {\n\tbackground-color: transparent;\n\tborder: solid 1px rgb(111, 195, 223);\n\tbox-shadow: none;\n\tcolor: #fff;\n}\n\n.vs-dark .monaco-keybinding > .monaco-keybinding-key {\n\tbackground-color: rgba(128, 128, 128, 0.17);\n\tborder: solid 1px rgba(51, 51, 51, 0.6);\n\tborder-bottom-color: rgba(68, 68, 68, 0.6);\n\tbox-shadow: inset 0 -1px 0 rgba(68, 68, 68, 0.6);\n\tcolor: #ccc;\n}\n",""]),t.Z=o},643:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,'/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n\n/* Default standalone editor fonts */\n.monaco-editor {\n\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;\n\t--monaco-monospace-font: "SF Mono", Monaco, Menlo, Consolas, "Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item .action-menu-item:focus .action-label {\n\tstroke-width: 1.2px;\n}\n\n.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,\n.monaco-editor.hc-black .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label {\n\tstroke-width: 1.2px;\n}\n\n.monaco-hover p {\n\tmargin: 0;\n}\n\n/* See https://github.com/microsoft/monaco-editor/issues/2168#issuecomment-780078600 */\n.monaco-aria-container {\n\tposition: absolute !important;\n\ttop: 0; /* avoid being placed underneath a sibling element */\n\theight: 1px;\n\twidth: 1px;\n\tmargin: -1px;\n\toverflow: hidden;\n\tpadding: 0;\n\tclip: rect(1px, 1px, 1px, 1px);\n\tclip-path: inset(50%);\n}\n\n/* The hc-black theme is already high contrast optimized */\n.monaco-editor.hc-black {\n\t-ms-high-contrast-adjust: none;\n}\n/* In case the browser goes into high contrast mode and the editor is not configured with the hc-black theme */\n@media screen and (-ms-high-contrast:active) {\n\n\t/* current line highlight */\n\t.monaco-editor.vs .view-overlays .current-line,\n\t.monaco-editor.vs-dark .view-overlays .current-line {\n\t\tborder-color: windowtext !important;\n\t\tborder-left: 0;\n\t\tborder-right: 0;\n\t}\n\n\t/* view cursors */\n\t.monaco-editor.vs .cursor,\n\t.monaco-editor.vs-dark .cursor {\n\t\tbackground-color: windowtext !important;\n\t}\n\t/* dnd target */\n\t.monaco-editor.vs .dnd-target,\n\t.monaco-editor.vs-dark .dnd-target {\n\t\tborder-color: windowtext !important;\n\t}\n\n\t/* selected text background */\n\t.monaco-editor.vs .selected-text,\n\t.monaco-editor.vs-dark .selected-text {\n\t\tbackground-color: highlight !important;\n\t}\n\n\t/* allow the text to have a transparent background. */\n\t.monaco-editor.vs .view-line,\n\t.monaco-editor.vs-dark .view-line {\n\t\t-ms-high-contrast-adjust: none;\n\t}\n\n\t/* text color */\n\t.monaco-editor.vs .view-line span,\n\t.monaco-editor.vs-dark .view-line span {\n\t\tcolor: windowtext !important;\n\t}\n\t/* selected text color */\n\t.monaco-editor.vs .view-line span.inline-selected-text,\n\t.monaco-editor.vs-dark .view-line span.inline-selected-text {\n\t\tcolor: highlighttext !important;\n\t}\n\n\t/* allow decorations */\n\t.monaco-editor.vs .view-overlays,\n\t.monaco-editor.vs-dark .view-overlays {\n\t\t-ms-high-contrast-adjust: none;\n\t}\n\n\t/* various decorations */\n\t.monaco-editor.vs .selectionHighlight,\n\t.monaco-editor.vs-dark .selectionHighlight,\n\t.monaco-editor.vs .wordHighlight,\n\t.monaco-editor.vs-dark .wordHighlight,\n\t.monaco-editor.vs .wordHighlightStrong,\n\t.monaco-editor.vs-dark .wordHighlightStrong,\n\t.monaco-editor.vs .reference-decoration,\n\t.monaco-editor.vs-dark .reference-decoration {\n\t\tborder: 2px dotted highlight !important;\n\t\tbackground: transparent !important;\n\t\tbox-sizing: border-box;\n\t}\n\t.monaco-editor.vs .rangeHighlight,\n\t.monaco-editor.vs-dark .rangeHighlight {\n\t\tbackground: transparent !important;\n\t\tborder: 1px dotted activeborder !important;\n\t\tbox-sizing: border-box;\n\t}\n\t.monaco-editor.vs .bracket-match,\n\t.monaco-editor.vs-dark .bracket-match {\n\t\tborder-color: windowtext !important;\n\t\tbackground: transparent !important;\n\t}\n\n\t/* find widget */\n\t.monaco-editor.vs .findMatch,\n\t.monaco-editor.vs-dark .findMatch,\n\t.monaco-editor.vs .currentFindMatch,\n\t.monaco-editor.vs-dark .currentFindMatch {\n\t\tborder: 2px dotted activeborder !important;\n\t\tbackground: transparent !important;\n\t\tbox-sizing: border-box;\n\t}\n\t.monaco-editor.vs .find-widget,\n\t.monaco-editor.vs-dark .find-widget {\n\t\tborder: 1px solid windowtext;\n\t}\n\n\t/* list - used by suggest widget */\n\t.monaco-editor.vs .monaco-list .monaco-list-row,\n\t.monaco-editor.vs-dark .monaco-list .monaco-list-row {\n\t\t-ms-high-contrast-adjust: none;\n\t\tcolor: windowtext !important;\n\t}\n\t.monaco-editor.vs .monaco-list .monaco-list-row.focused,\n\t.monaco-editor.vs-dark .monaco-list .monaco-list-row.focused {\n\t\tcolor: highlighttext !important;\n\t\tbackground-color: highlight !important;\n\t}\n\t.monaco-editor.vs .monaco-list .monaco-list-row:hover,\n\t.monaco-editor.vs-dark .monaco-list .monaco-list-row:hover {\n\t\tbackground: transparent !important;\n\t\tborder: 1px solid highlight;\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* scrollbars */\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar,\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar {\n\t\t-ms-high-contrast-adjust: none;\n\t\tbackground: background !important;\n\t\tborder: 1px solid windowtext;\n\t\tbox-sizing: border-box;\n\t}\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider,\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider {\n\t\tbackground: windowtext !important;\n\t}\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider:hover,\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider:hover {\n\t\tbackground: highlight !important;\n\t}\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider.active,\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider.active {\n\t\tbackground: highlight !important;\n\t}\n\n\t/* overview ruler */\n\t.monaco-editor.vs .decorationsOverviewRuler,\n\t.monaco-editor.vs-dark .decorationsOverviewRuler {\n\t\topacity: 0;\n\t}\n\n\t/* minimap */\n\t.monaco-editor.vs .minimap,\n\t.monaco-editor.vs-dark .minimap {\n\t\tdisplay: none;\n\t}\n\n\t/* squiggles */\n\t.monaco-editor.vs .squiggly-d-error,\n\t.monaco-editor.vs-dark .squiggly-d-error {\n\t\tbackground: transparent !important;\n\t\tborder-bottom: 4px double #E47777;\n\t}\n\t.monaco-editor.vs .squiggly-c-warning,\n\t.monaco-editor.vs-dark .squiggly-c-warning {\n\t\tborder-bottom: 4px double #71B771;\n\t}\n\t.monaco-editor.vs .squiggly-b-info,\n\t.monaco-editor.vs-dark .squiggly-b-info {\n\t\tborder-bottom: 4px double #71B771;\n\t}\n\t.monaco-editor.vs .squiggly-a-hint,\n\t.monaco-editor.vs-dark .squiggly-a-hint {\n\t\tborder-bottom: 4px double #6c6c6c;\n\t}\n\n\t/* contextmenu */\n\t.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,\n\t.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label {\n\t\t-ms-high-contrast-adjust: none;\n\t\tcolor: highlighttext !important;\n\t\tbackground-color: highlight !important;\n\t}\n\t.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label,\n\t.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label {\n\t\t-ms-high-contrast-adjust: none;\n\t\tbackground: transparent !important;\n\t\tborder: 1px solid highlight;\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* diff editor */\n\t.monaco-diff-editor.vs .diffOverviewRuler,\n\t.monaco-diff-editor.vs-dark .diffOverviewRuler {\n\t\tdisplay: none;\n\t}\n\t.monaco-editor.vs .line-insert,\n\t.monaco-editor.vs-dark .line-insert,\n\t.monaco-editor.vs .line-delete,\n\t.monaco-editor.vs-dark .line-delete {\n\t\tbackground: transparent !important;\n\t\tborder: 1px solid highlight !important;\n\t\tbox-sizing: border-box;\n\t}\n\t.monaco-editor.vs .char-insert,\n\t.monaco-editor.vs-dark .char-insert,\n\t.monaco-editor.vs .char-delete,\n\t.monaco-editor.vs-dark .char-delete {\n\t\tbackground: transparent !important;\n\t}\n}\n\n/*.monaco-editor.vs [tabindex="0"]:focus {\n\toutline: 1px solid rgba(0, 122, 204, 0.4);\n\toutline-offset: -1px;\n\topacity: 1 !important;\n}\n\n.monaco-editor.vs-dark [tabindex="0"]:focus {\n\toutline: 1px solid rgba(14, 99, 156, 0.6);\n\toutline-offset: -1px;\n\topacity: 1 !important;\n}*/\n',""]),t.Z=o},4932:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,"/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.context-view .monaco-menu {\n\tmin-width: 130px;\n}\n\n",""]),t.Z=o},6912:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-package .monaco-editor .line-numbers.active-line-number{font-weight:bold}.docker-package .monaco-scrollable-element>.scrollbar>.slider{border-radius:8px;background:rgba(0,0,0,0.12)}\n",""]),t.default=o},6642:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-package .disabled-text,.docker-package-win .disabled-text{color:rgba(65,75,85,0.4)}.docker-package .absolute-h100p,.docker-package-win .absolute-h100p{position:absolute;height:100%;width:100%;top:0;left:0}.docker-package .relative,.docker-package-win .relative{position:relative}.docker-package .v-table,.docker-package-win .v-table{max-height:initial}.docker-package .h100p,.docker-package-win .h100p{height:100%}.docker-package .border-box,.docker-package-win .border-box{box-sizing:border-box}.docker-package .padding-bottom-6px,.docker-package-win .padding-bottom-6px{padding-bottom:6px}.docker-package .width-200px,.docker-package-win .width-200px{width:200px}.docker-package .lh24px,.docker-package-win .lh24px{line-height:24px}.docker-package .display-flex,.docker-package-win .display-flex{display:flex}.docker-package .flex-dir-col,.docker-package-win .flex-dir-col{flex-direction:column}.docker-package .flex-container,.docker-package-win .flex-container{display:flex;flex-direction:column}.docker-package .flex-container>*,.docker-package-win .flex-container>*{flex-shrink:0}.docker-package .flex-container>.flex-remained-height,.docker-package-win .flex-container>.flex-remained-height{flex:1;overflow:hidden}.docker-package .overflow-hidden,.docker-package-win .overflow-hidden{overflow:hidden}.docker-package .link:hover,.docker-package-win .link:hover{cursor:pointer;text-decoration:underline}.docker-package .hyperlink,.docker-package-win .hyperlink{cursor:pointer;color:#057FEB;text-decoration:underline}.docker-package .v-wizard.wizard-step-container-overflow-hidden .v-scrollbar-inner,.docker-package-win .v-wizard.wizard-step-container-overflow-hidden .v-scrollbar-inner{height:100%;display:flex;flex-direction:column}.docker-package .v-wizard.wizard-step-container-overflow-hidden .layout-wizard-step-container,.docker-package-win .v-wizard.wizard-step-container-overflow-hidden .layout-wizard-step-container{overflow:hidden}.docker-package .host-network-mask .v-spin,.docker-package-win .host-network-mask .v-spin{width:510px}.docker-package .host-network-mask .v-spin .v-spin-text,.docker-package-win .host-network-mask .v-spin .v-spin-text{height:inherit}.docker-package .blue-text,.docker-package-win .blue-text{color:#057FEB}.docker-package .green-text,.docker-package-win .green-text{color:#009E05}.docker-package .orange-text,.docker-package-win .orange-text{color:#F58414}.docker-package .red-text,.docker-package-win .red-text{color:#E64040}.docker-package .tier2-text,.docker-package-win .tier2-text{color:rgba(65,75,85,0.6)}.docker-package-win .v-textfield-wrapper{width:200px}\n",""]),t.default=o},7606:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-package .docker-page-layout--overview{height:100%;width:100%;box-sizing:border-box}.docker-package .docker-page-layout.v-spin-wrapper,.docker-package .docker-page-layout .v-spin-wrapper{height:100%}.docker-package .docker-page-layout .v-table .v-scrollbar-inner{height:100%}.docker-package .docker-table-list .v-table .v-table-content table tr{height:41px}.docker-package .docker-table-list .dot{height:100%}.docker-package .docker-table-list .icon{height:100%}.docker-package .docker-table-list .container-count{padding-right:24px}.docker-package .v-form-item-label>label:after{content:var(--colon)}.docker-package .v-form-incremental-wrapper .v-form-multi-item .v-form-item{padding:0 3px}.docker-package .v-form-incremental-wrapper .v-form-multi-item .v-form-item .v-textfield-wrapper{width:200px}@keyframes fadein{0%{opacity:0}100%{opacity:1}}.docker-package .docker-badge{height:18px;line-height:18px;font-size:12px;color:#fff;background-color:#057FEB;padding:0 6px;border-radius:24px;text-align:center;animation:fadein 0.5s}\n",""]),t.default=o},2602:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-capabilities-modal-window .v-form{display:flex;flex-direction:column;height:100%}.docker-capabilities-modal-window .v-table-wrapper{flex:1;overflow:hidden}\n",""]),t.default=o},9439:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-package .docker-chart-tooltip .docker-chart-tooltip-label{font-weight:700}.docker-package .docker-chart-tooltip{display:flex;flex-direction:column;color:#414b55}.docker-package .docker-chart-tooltip .docker-chart-tooltip-content{display:flex;flex-direction:column}.docker-package .docker-chart-tooltip .docker-chart-tooltip-content .docker-chart-tooltip-content-row{line-height:20px;margin-top:6px;display:flex;flex-direction:row;align-items:center}.docker-package .docker-chart-tooltip .docker-chart-tooltip-content .docker-chart-tooltip-content-row:before{content:'';height:8px;width:8px;border-radius:50%;background-color:var(--color)}.docker-package .docker-chart-tooltip .docker-chart-tooltip-content .docker-chart-tooltip-content-row .docker-chart-tooltip-content-row-name{flex:1;margin-left:8px}.docker-package .docker-chart-tooltip .docker-chart-tooltip-content .docker-chart-tooltip-content-row .docker-chart-tooltip-content-row-value{margin-left:12px;width:80px;text-align:right}.docker-package .docker-chart-tooltip .docker-chart-tooltip-content .docker-chart-tooltip-content-row--total:before{border-radius:0}\n",""]),t.default=o},4368:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-package.docker-chart .docker-chart-header .docker-chart-title{font-weight:700}.docker-package.docker-chart{display:flex;flex-direction:column}.docker-package.docker-chart--disabled{opacity:0.5}.docker-package.docker-chart .docker-chart-header{display:flex;margin-bottom:12px;flex-direction:row;line-height:20px;justify-content:space-between}.docker-package.docker-chart .docker-chart-header .docker-chart-legends{display:flex;flex-direction:row;align-items:center}.docker-package.docker-chart .docker-chart-header .docker-chart-legends .docker-chart-legend{margin-left:8px;display:flex;flex-direction:row;align-items:center}.docker-package.docker-chart .docker-chart-header .docker-chart-legends .docker-chart-legend .dot{margin:0 8px}.docker-package.docker-chart .docker-chart-header .docker-chart-legends .docker-chart-legend--disabled{color:rgba(65,75,85,0.4)}.docker-package.docker-chart .docker-chart-pane{flex:1 1 auto}\n",""]),t.default=o},6145:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-package .docker-console{font-weight:400}.docker-package .docker-console-scrollbar-wrapper{padding:4px 18px 4px 12px;background-color:#3c3c3c;border-radius:4px;box-sizing:border-box;--v-scrollbar-bkg-color--active: rgba(255, 255, 255, 0.7);--v-scrollbar-bkg-color--hover: rgba(255, 255, 255, 0.7);--v-scrollbar-bkg-color--normal: rgba(255, 255, 255, 0.3)}.docker-package .docker-console{display:inline-block;font-family:'PTMono-Regular', 'Courier New', Courier, monospace;font-size:13px;color:#e1e4e6;line-height:20px}\n",""]),t.default=o},5218:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n),r=i(1667),s=i.n(r),a=i(1538),l=i.n(a),c=o()((function(e){return e[1]})),d=s()(l());c.push([e.id,"@keyframes rotate{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.docker-package.dot{margin:auto;display:flex;height:var(--size);width:var(--size)}.docker-package.dot:before{content:'';box-sizing:border-box;margin:auto;height:var(--size);width:var(--size);border-radius:50%;background-color:var(--color)}.docker-package.dot.blue:before{background-color:#057FEB}.docker-package.dot.red:before{background-color:#E64040}.docker-package.dot.green:before{background-color:#009E05}.docker-package.dot.orange:before{background-color:#F58414}.docker-package.dot.bordered:before{background-color:#fff;border:2px solid #adb1b5}.docker-package.dot.loading:before{mask-image:url("+d+");-webkit-mask-image:url("+d+");mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-position:center;-webkit-mask-position:center;background:#057FEB;animation:rotate 0.5s linear infinite}\n",""]),t.default=c},1131:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-package .docker-container-form-item-name .v-form-item-input{width:480px}\n",""]),t.default=o},3106:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-package .docker-container-volume-form .actions-wrapper .v-toolbar{padding-bottom:6px}.docker-package .docker-container-volume-form .docker-container-volume-form-item-host-volume-file{display:flex;gap:6px;width:200px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.docker-package .docker-container-volume-form .docker-container-volume-form-item-host-volume-file .name{flex:1;display:block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}\n",""]),t.default=o},8379:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-package.icon.small svg{width:16px;height:16px}.docker-package.icon.docker-action-console svg,.docker-package.icon.docker-action-go-to svg{fill:rgba(80,90,100,0.5)}.docker-package.icon.docker-action-console:hover svg,.docker-package.icon.docker-action-go-to:hover svg{fill:#057FEB}.docker-package.icon.docker-action-console,.docker-package.icon.docker-action-go-to{cursor:pointer}.docker-package.icon{display:flex;margin:auto}.docker-package.icon svg{margin:auto}\n",""]),t.default=o},9894:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-migrater-message-box{line-height:20px}.docker-migrater-message-box .docker-migrater-message-box-checkbox{margin-top:6px}.docker-migrater-message-box>*{height:100%}.docker-migrater-message-box ul{list-style:initial;padding-left:16px}\n",""]),t.default=o},2997:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n),r=i(1667),s=i.n(r),a=i(7142),l=i.n(a),c=i(1365),d=i.n(c),h=o()((function(e){return e[1]})),u=s()(l()),g=s()(d());h.push([e.id,".docker-migrater-modal-window .v-panel,.docker-migrater-modal-window .body-wrapper,.docker-migrater-modal-window .v-form,.docker-migrater-modal-window .v-table-wrapper{height:100%;box-sizing:border-box;overflow:hidden}.docker-migrater-modal-window .v-form{display:flex;flex-direction:column}.docker-migrater-modal-window .v-table-wrapper{margin-top:2px;flex:1}.docker-migrater-modal-window .docker-migrater-name-cell{display:flex;align-items:center}.docker-migrater-modal-window .docker-migrater-name-cell .docker-migrater-name-cell-text{max-width:100%;text-overflow:ellipsis;overflow:hidden}.docker-migrater-modal-window .docker-migrater-name-cell .docker-migrater-warning-tip{flex-shrink:0;margin-left:2px;width:24px;height:24px;background-image:url("+u+");background-size:24px 24px}@media (-webkit-min-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3 / 2), (min-resolution: 144dpi){.synohdpack .docker-migrater-modal-window .docker-migrater-name-cell .docker-migrater-warning-tip{background-image:url("+g+");background-size:24px 24px}}@media (-webkit-min-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3 / 2), (min-resolution: 144dpi){.synohdpackdebug .docker-migrater-modal-window .docker-migrater-name-cell .docker-migrater-warning-tip{background-image:url("+g+");background-size:24px 24px;outline:1px green dashed}}\n",""]),t.default=h},2574:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n),r=i(1667),s=i.n(r),a=i(1063),l=i.n(a),c=i(9389),d=i.n(c),h=o()((function(e){return e[1]})),u=s()(l()),g=s()(d());h.push([e.id,".docker-migrater-panel-wrapper .docker-migrater-panel .docker-migrater-information .header{font-weight:700}.docker-migrater-panel-wrapper .docker-migrater-panel .docker-migrater-information .header{font-weight:700}.docker-migrater-panel-wrapper{margin-bottom:16px;border:1px solid rgba(198,212,224,0.4);padding:27px 19px 27px 23px;background:#ffffff}.docker-migrater-panel-wrapper .docker-migrater-panel{position:relative;display:flex;align-items:center}.docker-migrater-panel-wrapper .docker-migrater-panel .docker-migrater-icon{display:flex;align-items:center;justify-content:center;width:48px;height:48px;background-image:url("+u+");background-size:48px 96px;background-position:0 0}@media (-webkit-min-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3 / 2), (min-resolution: 144dpi){.synohdpack .docker-migrater-panel-wrapper .docker-migrater-panel .docker-migrater-icon{background-image:url("+g+");background-size:48px 96px}}@media (-webkit-min-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3 / 2), (min-resolution: 144dpi){.synohdpackdebug .docker-migrater-panel-wrapper .docker-migrater-panel .docker-migrater-icon{background-image:url("+g+");background-size:48px 96px;outline:1px green dashed}}.docker-migrater-panel-wrapper .docker-migrater-panel .docker-migrater-icon.loading{background-position:0 -48px}.docker-migrater-panel-wrapper .docker-migrater-panel .docker-migrater-information{flex:1;margin-left:20px}.docker-migrater-panel-wrapper .docker-migrater-panel .docker-migrater-information .header{font-size:20px;line-height:28px;padding-bottom:4px;color:#414b55}.docker-migrater-panel-wrapper .docker-migrater-panel .docker-migrater-information .description{line-height:20px}.docker-migrater-panel-wrapper .docker-migrater-panel .docker-migrater-manage{position:absolute;top:-10px;right:0}\n",""]),t.default=h},3949:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-package-install-wizard .v-form-item-label>label::after{content:var(--colon)}.docker-package-install-wizard .form-item-input-wrapper .v-form-item-input{width:300px}.docker-package-install-wizard .foot-note::before{content:var(--note);color:#00A6A6}\n",""]),t.default=o},9227:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-yaml-code-editor{-webkit-user-select:initial;height:100%;width:100%;border-radius:4px;background:#f5f8fa;display:flex;flex-direction:column;overflow:hidden}.docker-yaml-code-editor .docker-yaml-code-editor-body{box-sizing:border-box;flex:1;overflow:hidden;transition:border 0.1s}.docker-yaml-code-editor .docker-yaml-code-editor-body--border-bottom{border-bottom:solid 1px rgba(198,212,224,0.5)}.docker-yaml-code-editor .grow-height-enter.docker-yaml-code-editor-problems,.docker-yaml-code-editor .grow-height-leave.docker-yaml-code-editor-problems{height:0}.docker-yaml-code-editor .docker-yaml-code-editor-problems{margin:4px -2px 4px 20px;line-height:24px;transition:height 0.1s}.docker-yaml-code-editor .docker-yaml-code-editor-problems--one-line{height:24px}.docker-yaml-code-editor .docker-yaml-code-editor-problems--two-line{height:48px}.docker-yaml-code-editor .docker-yaml-code-editor-problems--three-line{height:72px}.docker-yaml-code-editor .docker-yaml-code-editor-problems--multiple-line{height:84px}.docker-yaml-code-editor .docker-yaml-code-editor-problems .docker-yaml-code-editor-problem{display:flex;cursor:pointer}.docker-yaml-code-editor .docker-yaml-code-editor-problems .docker-yaml-code-editor-problem .docker-yaml-code-editor-problem-text{flex:1;margin-left:10px;padding-right:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.docker-yaml-code-editor .docker-yaml-code-editor-problems .docker-yaml-code-editor-problem:hover{text-decoration:underline}\n",""]),t.default=o},3203:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-package .docker-status-panel .docker-status-panel-header .docker-status-panel-header-left .docker-status-panel-header-text .docker-status-panel-header-title{font-weight:700}.docker-package .docker-status-panel{display:flex;flex-direction:column;height:100%}.docker-package .docker-status-panel .docker-status-panel-header{height:72px;box-sizing:border-box;padding:0 16px;display:flex;flex-direction:row;justify-content:space-between;align-items:center}.docker-package .docker-status-panel .docker-status-panel-header .docker-status-panel-header-left{flex:1;display:flex;flex-direction:row;align-items:center;overflow:hidden}.docker-package .docker-status-panel .docker-status-panel-header .docker-status-panel-header-left .docker-status-panel-back-icon,.docker-package .docker-status-panel .docker-status-panel-header .docker-status-panel-header-left .docker-status-panel-header-category-icon{color:rgba(80,90,100,0.9)}.docker-package .docker-status-panel .docker-status-panel-header .docker-status-panel-header-left .docker-status-panel-back-icon{flex-shrink:0;cursor:pointer}.docker-package .docker-status-panel .docker-status-panel-header .docker-status-panel-header-left .docker-status-panel-header-category{flex-shrink:0;position:relative;display:flex;margin-left:4px;border-radius:50%;height:40px;width:40px;background:rgba(198,212,224,0.5)}.docker-package .docker-status-panel .docker-status-panel-header .docker-status-panel-header-left .docker-status-panel-header-category .docker-status-panel-header-category-status{position:absolute;right:0;bottom:0}.docker-package .docker-status-panel .docker-status-panel-header .docker-status-panel-header-left .docker-status-panel-header-text{width:0;flex:1 1 auto;margin:0 16px;line-height:20px}.docker-package .docker-status-panel .docker-status-panel-header .docker-status-panel-header-left .docker-status-panel-header-text .docker-status-panel-header-title-wrapper{display:flex;flex-direction:row;white-space:nowrap;gap:4px}.docker-package .docker-status-panel .docker-status-panel-header .docker-status-panel-header-left .docker-status-panel-header-text .docker-status-panel-header-title{flex:0 1 auto;text-overflow:ellipsis;overflow:hidden}.docker-package .docker-status-panel .docker-status-panel-header .docker-status-panel-header-left .docker-status-panel-header-text .docker-status-panel-header-description{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.docker-package .docker-status-panel .docker-status-panel-content{flex:1;overflow:hidden}.docker-package .docker-status-panel .docker-status-panel-content .v-layout.layout-panel-body{padding:8px 16px 6px}.docker-package .docker-status-panel .v-layout.layout-tab-tbar{padding-top:8px}\n",""]),t.default=o},9214:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-package .container-detail-settings .body-wrapper{display:flex;flex-direction:column}.docker-package .container-detail-settings .v-spin-text{padding:18px 20px}.docker-package .container-detail-settings .v-alert-bar{margin-bottom:8px}\n",""]),t.default=o},2290:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-package .docker-terminal-panel-wrapper{padding:16px 16px 0px 16px}\n",""]),t.default=o},102:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-package.docker-export-container-dialog{line-height:20px}.docker-package.docker-export-container-dialog .v-form-item-input{width:100%}.docker-package.docker-export-container-dialog .v-layout.layout-panel-body{padding-right:32px}.docker-package.docker-export-container-dialog .v-form-multi-item-wrapper{width:100%}.docker-package.docker-export-container-dialog .v-form-multi-item-wrapper .v-form-multi-item{width:100%}.docker-package.docker-export-container-dialog .docker-export-path-form-item{width:100%}\n",""]),t.default=o},2124:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-package.docker-container-import-dialog .docker-import-form{padding-bottom:26px}.docker-package.docker-container-import-dialog .docker-import-form .v-form-item-label{width:240px}.docker-package.docker-container-import-dialog .docker-import-form .v-form-item-input{width:340px}.docker-package.docker-container-import-dialog .docker-import-form .v-textfield-wrapper.file-textfield{width:100%}\n",""]),t.default=o},4798:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-package.docker-image-import-dialog .docker-import-form{padding-bottom:26px}.docker-package.docker-image-import-dialog .docker-import-form .v-form-item-label{width:240px}.docker-package.docker-image-import-dialog .docker-import-form .v-form-item-input{width:340px}.docker-package.docker-image-import-dialog .docker-import-form .v-textfield-wrapper.file-textfield{width:100%}\n",""]),t.default=o},6156:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-package .image-update-dialog-panel .body-wrapper{display:flex;flex-direction:column}.docker-package .image-update-dialog-panel .image-update-dialog-container-data-table{flex:1}.docker-package .image-update-dialog-panel .image-update-dialog-container-data-table .dot{height:100%}.docker-package .image-update-dialog-panel .image-update-form{height:auto}.docker-package .image-update-dialog-panel .shastr{display:inline-block;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom;max-width:60%}.docker-package .image-update-dialog-panel ul{list-style:disc;padding-left:17px}\n",""]),t.default=o},8100:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-package.docker-console-window .v-panel.v-layout .layout-body-wrapper{padding:16px 20px 12px 20px}.docker-package.docker-console-window .v-scrollbar .v-scrollbar-inner{height:100%}\n",""]),t.default=o},2342:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-package-win .registry-mirror-urls .v-form-item-label{overflow-wrap:break-word}\n",""]),t.default=o},3582:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n),r=i(1667),s=i.n(r),a=i(5483),l=i.n(a),c=i(1178),d=i.n(c),h=o()((function(e){return e[1]})),u=s()(l()),g=s()(d());h.push([e.id,".syno-sds-docker-registry-enable[data-v-4258fe3a]{background-image:url("+u+");background-size:28px 56px}@media (-webkit-min-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3 / 2), (min-resolution: 144dpi){.synohdpack .syno-sds-docker-registry-enable[data-v-4258fe3a]{background-image:url("+g+");background-size:28px 56px}}@media (-webkit-min-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3 / 2), (min-resolution: 144dpi){.synohdpackdebug .syno-sds-docker-registry-enable[data-v-4258fe3a]{background-image:url("+g+");background-size:28px 56px;outline:1px green dashed}}\n",""]),t.default=h},3658:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-package.docker-tag-dialog .layout-panel-body{min-height:82px}.docker-package.docker-tag-dialog .foot-note{margin-top:6px;padding:4px 0;line-height:20px}.docker-package.docker-tag-dialog .foot-note:before{content:var(--note);color:#00A6A6}\n",""]),t.default=o},7481:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-package table.summary-value-table th{font-weight:700}.docker-package .run-instantly-checkbox{margin-top:6px;margin-bottom:6px}.docker-package table.summary-value-table{margin:-4px 0}.docker-package table.summary-value-table,.docker-package table.summary-value-table th,.docker-package table.summary-value-table td{border:0;line-height:20px}.docker-package table.summary-value-table th,.docker-package table.summary-value-table td{padding:4px 0}.docker-package table.summary-value-table th:first-of-type{width:33.33333%}.docker-package table.summary-value-table td{overflow:hidden;text-overflow:ellipsis}\n",""]),t.default=o},1622:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-package .docker-container-details .layout-content{padding:0}.docker-package .docker-container-details .docker-container-details-header-running-in-project{flex:0 1 auto;overflow:hidden;text-overflow:ellipsis}\n",""]),t.default=o},6083:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-package .docker-search-form-item{margin-bottom:6px}.docker-package .docker-search-buttons{padding-top:14px;align-items:flex-end}.docker-package.docker-search-advanced-form{width:312px}\n",""]),t.default=o},2546:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-package .docker-container-details .docker-container-details-stats .docker-container-details-stats-footer .docker-container-details-process-title{font-weight:700}.docker-package .docker-container-details .docker-container-details-stats .body-wrapper{display:flex;flex-direction:column}.docker-package .docker-container-details .docker-container-details-stats .v-form-item-label{width:80px}.docker-package .docker-container-details .docker-container-details-stats .docker-container-details-stats-body{padding:0px 8px}.docker-package .docker-container-details .docker-container-details-stats .docker-container-details-stats-header{margin-bottom:16px}.docker-package .docker-container-details .docker-container-details-stats .docker-container-details-stats-charts-rows{display:flex;flex-direction:column;overflow:hidden;box-sizing:border-box;flex:1 1 auto}.docker-package .docker-container-details .docker-container-details-stats .docker-container-details-stats-charts-rows .docker-container-details-stats-charts-row .docker-container-details-stats-chart{height:202px}.docker-package .docker-container-details .docker-container-details-stats .docker-container-details-stats-footer .docker-container-details-process-title{line-height:20px;margin-bottom:12px}.docker-package .docker-container-details .docker-container-details-stats .docker-container-details-stats-footer .v-table{height:114px}\n",""]),t.default=o},1464:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-package .docker-container-list .docker-container-name{display:flex;flex-direction:row}.docker-package .docker-container-list .docker-container-name .docker-container-name-link{overflow:hidden;text-overflow:ellipsis}.docker-package .docker-container-list .docker-container-list-portals-button{height:100%;width:100%}\n",""]),t.default=o},2178:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-package .docker-image-detail-table{padding:8px 16px 12px 16px}.docker-package .docker-image-detail-table .docker-image-detail-cell{display:flex}.docker-package .docker-image-detail-table .docker-image-detail-registry-link{display:flex;margin-left:4px}\n",""]),t.default=o},4403:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-package .docker-image-list .v-empty-view-text{max-width:420px}\n",""]),t.default=o},2193:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-network-table{--v-table-cell-padding-tb: 6px;--v-table-cell-padding--has-expand: 6px 0 6px 4px;--v-table-cell-padding__last-cell: 6px 25px 6px 8px}.docker-network-table .v-table .v-table-content.expandable td.expandable-cell .expandable-slide-up-down{padding-bottom:8px}.docker-network-table .v-table .v-table-content.expandable td .content-cell{white-space:nowrap}.docker-network-table .adv-form-label{width:200px}\n",""]),t.default=o},8357:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-package .overview-stats-chart{height:100%;width:100%}\n",""]),t.default=o},9403:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-package .overview-page .row .overview-panel.overview-panel-infomation .overview-panel-infomation-status .overview-panel-infomation-status-text .overview-panel-infomation-status-text-title,.docker-package .overview-page .row .overview-panel.overview-panel-image .overview-panel-image-header .overview-panel-image-header-title,.docker-package .overview-page .row .overview-panel.overview-panel-image .overview-panel-image-count-row .overview-panel-image-count,.docker-package .overview-page .row .overview-panel.overview-panel-image .overview-panel-image-size-row .overview-panel-image-size-value,.docker-package .overview-page .row .overview-panel.overview-panel-stats .overview-panel-stats-header .overview-panel-stats-header-title{font-weight:700}.docker-package .overview-page .row .overview-panel.overview-panel-infomation .overview-panel-infomation-status .overview-panel-infomation-status-text .overview-panel-infomation-status-text-title,.docker-package .overview-page .row .overview-panel.overview-panel-image .overview-panel-image-header .overview-panel-image-header-title,.docker-package .overview-page .row .overview-panel.overview-panel-image .overview-panel-image-count-row .overview-panel-image-count,.docker-package .overview-page .row .overview-panel.overview-panel-image .overview-panel-image-size-row .overview-panel-image-size-value,.docker-package .overview-page .row .overview-panel.overview-panel-stats .overview-panel-stats-header .overview-panel-stats-header-title{font-weight:700}.docker-package .overview-page{background:#f4f8fa;display:flex;flex-direction:column;gap:16px;padding:16px 20px}.docker-package .overview-page .row{flex-shrink:0;display:flex;gap:16px}.docker-package .overview-page .row--first{height:228px}.docker-package .overview-page .row--second{flex:1 1 auto}.docker-package .overview-page .row .overview-panel{width:100%;background:#fff;border:1px solid rgba(198,212,224,0.4);border-radius:4px;box-shadow:0 4px 9px 0 rgba(0,0,0,0.02)}.docker-package .overview-page .row .overview-panel.overview-panel-infomation{padding:0 24px 24px 24px;overflow:hidden;display:flex;flex-direction:column}.docker-package .overview-page .row .overview-panel.overview-panel-infomation .overview-panel-infomation-status{flex:1;display:flex;flex-direction:row;align-items:center;gap:20px}.docker-package .overview-page .row .overview-panel.overview-panel-infomation .overview-panel-infomation-status .overview-panel-infomation-status-no-service-icon{width:80px}.docker-package .overview-page .row .overview-panel.overview-panel-infomation .overview-panel-infomation-status .overview-panel-infomation-status-text{overflow:hidden;flex:1 1 auto;display:flex;flex-direction:column;gap:4px}.docker-package .overview-page .row .overview-panel.overview-panel-infomation .overview-panel-infomation-status .overview-panel-infomation-status-text .overview-panel-infomation-status-text-title{font-size:20px;line-height:28px}.docker-package .overview-page .row .overview-panel.overview-panel-infomation .overview-panel-infomation-status .overview-panel-infomation-status-text .overview-panel-infomation-status-text-description{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;line-height:20px}.docker-package .overview-page .row .overview-panel.overview-panel-infomation .overview-panel-infomation-rows{border-top:1px solid rgba(198,212,224,0.4);display:flex;flex-direction:column}.docker-package .overview-page .row .overview-panel.overview-panel-infomation .overview-panel-infomation-rows .overview-panel-infomation-row{cursor:pointer;display:flex;flex-direction:row;gap:12px;align-items:center;height:34px;padding:0 12px;border-bottom:1px solid rgba(198,212,224,0.4)}.docker-package .overview-page .row .overview-panel.overview-panel-infomation .overview-panel-infomation-rows .overview-panel-infomation-row:hover{background:rgba(5,127,235,0.04)}.docker-package .overview-page .row .overview-panel.overview-panel-infomation .overview-panel-infomation-rows .overview-panel-infomation-row .overview-panel-infomation-row-text{flex:1 1 auto;line-height:20px}.docker-package .overview-page .row .overview-panel.overview-panel-image{flex-shrink:0;box-sizing:border-box;padding:16px 20px;width:320px}.docker-package .overview-page .row .overview-panel.overview-panel-image .overview-panel-image-header{display:flex;flex-direction:row;justify-content:space-between}.docker-package .overview-page .row .overview-panel.overview-panel-image .overview-panel-image-header .overview-panel-image-header-title{line-height:28px;font-size:14px}.docker-package .overview-page .row .overview-panel.overview-panel-image .overview-panel-image-header .overview-panel-image-header-actions{display:flex;flex-direction:row;gap:12px;color:rgba(80,90,100,0.5)}.docker-package .overview-page .row .overview-panel.overview-panel-image .overview-panel-image-header .overview-panel-image-header-actions .overview-panel-image-header-action{cursor:pointer}.docker-package .overview-page .row .overview-panel.overview-panel-image .overview-panel-image-count-row{margin-top:20px;display:flex;flex-direction:row;align-items:baseline;gap:7px;height:28px}.docker-package .overview-page .row .overview-panel.overview-panel-image .overview-panel-image-count-row .overview-panel-image-count{line-height:28px;font-size:24px}.docker-package .overview-page .row .overview-panel.overview-panel-image .overview-panel-image-size-row{margin-top:6px;display:flex;flex-direction:row;gap:2px;line-height:24px}.docker-package .overview-page .row .overview-panel.overview-panel-image .overview-panel-image-size-row .overview-panel-image-size-text:after{content:var(--colon)}.docker-package .overview-page .row .overview-panel.overview-panel-image .overview-panel-image-divider{margin-top:16px;background:rgba(198,212,224,0.4);height:1px;width:100%}.docker-package .overview-page .row .overview-panel.overview-panel-image .overview-panel-footer{margin-top:16px;line-height:24px}.docker-package .overview-page .row .overview-panel.overview-panel-stats{display:flex;flex-direction:column;padding:16px 20px}.docker-package .overview-page .row .overview-panel.overview-panel-stats .overview-panel-stats-header{display:flex;flex-direction:row;justify-content:space-between;line-height:28px}.docker-package .overview-page .row .overview-panel.overview-panel-stats .overview-panel-stats-header .overview-panel-stats-header-title{font-size:14px}.docker-package .overview-page .row .overview-panel.overview-panel-stats .overview-panel-stats-header .overview-panel-stats-header-actions{display:flex;flex-direction:row;gap:12px}.docker-package .overview-page .row .overview-panel.overview-panel-stats .overview-panel-stats-header .overview-panel-stats-header-actions .overview-panel-stats-header-actions-legends{display:flex;flex-direction:row;gap:16px}.docker-package .overview-page .row .overview-panel.overview-panel-stats .overview-panel-stats-header .overview-panel-stats-header-actions .overview-panel-stats-header-actions-legends .overview-panel-stats-header-actions-legend{display:flex;flex-direction:row;align-items:center;gap:8px}.docker-package .overview-page .row .overview-panel.overview-panel-stats .overview-panel-stats-header .overview-panel-stats-header-actions .overview-panel-stats-header-button{width:83px}.docker-package .overview-page .row .overview-panel.overview-panel-stats .overview-panel-stats-chart{flex:1 1 auto}.docker-package.docker-status-tip-wrapper{display:flex;flex-direction:column}.docker-package.docker-status-tip-wrapper .docker-status-tip{display:flex;align-items:center;flex-direction:row;line-height:28px}.docker-package.docker-status-tip-wrapper .docker-status-tip .dot{margin:9px}.docker-package.docker-status-tip-wrapper .docker-status-tip .docker-status-tip-name{white-space:nowrap;flex:1;margin-left:6px}\n",""]),t.default=o},4508:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-package.create-project-dialog .v-scrollbar .v-scrollbar-inner{height:100%;display:flex;flex-direction:column}.docker-package.create-project-dialog .docker-yaml-code-editor{margin:6px 0}\n",""]),t.default=o},2364:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-create-project-general-step .v-form{display:flex;flex-direction:column}.docker-create-project-general-step .v-form .v-form-item-input{width:100%}.docker-create-project-general-step .v-form .v-form-multi-wrapper .v-form-multi-item-wrapper{width:100%}.docker-create-project-general-step .v-form .v-form-multi-wrapper .v-form-multi-item-wrapper .v-form-multi-item{width:100%}.docker-create-project-general-step .v-form .v-form-multi-wrapper .v-form-multi-item-wrapper .v-form-multi-item .v-form-item{width:100%}.docker-create-project-general-step .v-form .v-file-btn .file-textfield{width:100%}.docker-create-project-general-step .v-form .v-btn.set-path-btn{min-width:84px}\n",""]),t.default=o},38:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-package .docker-project-detail .project-detail-settings .v-form-item-label{width:210px}\n",""]),t.default=o},140:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-package .docker-project-detail-container-list .v-table .v-table-content table tr{height:41px}.docker-package .docker-project-detail-container-list .dot{height:100%}\n",""]),t.default=o},4836:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-package .project-detail-editor-panel .body-wrapper{display:flex;flex-direction:column;padding-bottom:6px}.docker-package .project-detail-editor-panel .readonly-foot-note{margin-top:6px;padding:4px 0;line-height:20px}.docker-package .project-detail-editor-panel .readonly-foot-note:before{content:var(--note);color:#00A6A6}\n",""]),t.default=o},2900:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-package .project-detail-settings .v-form-item-label{width:210px}.docker-package .project-detail-settings .v-textfield-wrapper{width:480px}.docker-package .project-detail-settings .v-spin-text{padding:18px 20px}\n",""]),t.default=o},9171:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-package .docker-project-stats-panel .docker-project-stats-panel-title{font-weight:700}.docker-package .docker-project-stats-panel{display:flex;flex-direction:column}.docker-package .docker-project-stats-panel .docker-project-stats-panel-title{margin-top:8px;margin-bottom:12px;line-height:20px}.docker-package .docker-project-stats-panel .docker-project-stats-panel-chart{flex:1 1 auto}\n",""]),t.default=o},4062:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-package .docker-project-detail-network-stats-chart{display:flex;flex-direction:column}.docker-package .docker-project-detail-network-stats-chart .docker-project-detail-network-download-stats-chart,.docker-package .docker-project-detail-network-stats-chart .docker-project-detail-network-upload-stats-chart{height:0;flex:1 1 auto}\n",""]),t.default=o},4974:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-package .docker-project-detail-stats{display:flex;flex-direction:column;height:100%;width:100%}.docker-package .docker-project-detail-stats .tbar-wrapper.v-toolbar .main-wrapper{width:100%;padding:0 8px}.docker-package .docker-project-detail-stats .tbar-wrapper.v-toolbar .docker-project-detail-stats-header{display:flex;flex-direction:row;justify-content:space-between;width:100%}.docker-package .docker-project-detail-stats .tbar-wrapper.v-toolbar .docker-project-detail-stats-header .v-form-item{margin-bottom:0px}.docker-package .docker-project-detail-stats .tbar-wrapper.v-toolbar .docker-project-detail-stats-header .v-form-item-label{--v-form-item-width__label: 80px}.docker-package .docker-project-detail-stats .body-wrapper{padding-bottom:6px}.docker-package .docker-project-detail-stats .stats-content-wrapper{padding:0 8px}.docker-package .docker-project-detail-stats .docker-project-detail-stats-chart{height:310px;width:100%}.docker-package .docker-project-detail-stats .docker-project-detail-stats-footer{margin-left:40px;margin-top:8px;display:flex;flex-direction:row;flex-wrap:wrap}.docker-package .docker-project-detail-stats .docker-project-detail-stats-footer .container-chip{display:flex;margin-top:6px;line-height:28px}.docker-package .docker-project-detail-stats .docker-project-detail-stats-footer .container-chip--total{width:100%;margin-top:0px}.docker-package .docker-project-detail-stats .docker-project-detail-stats-footer .container-chip--total .dot:before{border-radius:0}.docker-package .docker-project-detail-stats .docker-project-detail-stats-footer .container-chip--total .container-chip-name{flex:1}.docker-package .docker-project-detail-stats .docker-project-detail-stats-footer .container-chip .dot{flex:0 0 auto;width:24px}.docker-package .docker-project-detail-stats .docker-project-detail-stats-footer .container-chip .container-chip-name{flex:1 0 auto;width:260px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.docker-package .docker-project-detail-stats .docker-project-detail-stats-footer .container-chip.disabled{color:rgba(65,75,85,0.4)}\n",""]),t.default=o},6692:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".docker-package .docker-project-list .container-count{padding-right:24px}.docker-package .docker-project-list .docker-project-name{display:flex;flex-direction:row}.docker-package .docker-project-list .docker-project-name .docker-project-name-link{overflow:hidden;text-overflow:ellipsis}\n",""]),t.default=o},854:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n),r=i(1667),s=i.n(r),a=i(8327),l=i.n(a),c=i(8283),d=i.n(c),h=i(8660),u=i.n(h),g=i(4402),p=i.n(g),m=o()((function(e){return e[1]})),f=s()(l()),_=s()(d()),v=s()(u()),b=s()(p());m.push([e.id,".registry-image-item .content .title-wrap .repo-name[data-v-77866b40]{font-weight:700}.registry-image-item .content .title-wrap .repo-name[data-v-77866b40]{font-weight:700}.registry-image-item[data-v-77866b40]{display:flex;padding-top:2px;padding-bottom:2px;line-height:20px;height:42px}.registry-image-item .content[data-v-77866b40]{flex:1;overflow:hidden;display:flex;flex-direction:column;align-self:center}.registry-image-item .content .title-wrap[data-v-77866b40]{display:flex;width:100%}.registry-image-item .content .title-wrap .repo-name[data-v-77866b40]{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;padding-right:6px}.registry-image-item .content .title-wrap .official-icon[data-v-77866b40]{width:20px;height:20px;background-image:url("+f+");background-size:20px 60px;background-position:0 -40px}@media (-webkit-min-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3 / 2), (min-resolution: 144dpi){.synohdpack .registry-image-item .content .title-wrap .official-icon[data-v-77866b40]{background-image:url("+_+");background-size:20px 60px}}@media (-webkit-min-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3 / 2), (min-resolution: 144dpi){.synohdpackdebug .registry-image-item .content .title-wrap .official-icon[data-v-77866b40]{background-image:url("+_+");background-size:20px 60px;outline:1px green dashed}}.registry-image-item .content .title-wrap .star-wrap[data-v-77866b40]{display:flex}.registry-image-item .content .title-wrap .star-wrap .star-icon[data-v-77866b40]{width:20px;height:20px;background-image:url("+f+");background-size:20px 60px;background-position:0 -20px}@media (-webkit-min-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3 / 2), (min-resolution: 144dpi){.synohdpack .registry-image-item .content .title-wrap .star-wrap .star-icon[data-v-77866b40]{background-image:url("+_+");background-size:20px 60px}}@media (-webkit-min-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3 / 2), (min-resolution: 144dpi){.synohdpackdebug .registry-image-item .content .title-wrap .star-wrap .star-icon[data-v-77866b40]{background-image:url("+_+");background-size:20px 60px;outline:1px green dashed}}.registry-image-item .content .title-wrap .official-icon[data-v-77866b40],.registry-image-item .content .title-wrap .star-wrap[data-v-77866b40]{flex-shrink:0}.registry-image-item .content .repo-desc[data-v-77866b40]{width:100%;padding-top:2px;color:rgba(65,75,85,0.4);white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.registry-image-item .link-btn-wrap[data-v-77866b40]{margin-left:16px;width:20px;display:flex;flex-direction:row;align-items:center}.registry-image-item .link-btn-wrap .link[data-v-77866b40]{width:20px;height:20px;background-image:url("+v+");background-size:20px 40px}@media (-webkit-min-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3 / 2), (min-resolution: 144dpi){.synohdpack .registry-image-item .link-btn-wrap .link[data-v-77866b40]{background-image:url("+b+");background-size:20px 40px}}@media (-webkit-min-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3 / 2), (min-resolution: 144dpi){.synohdpackdebug .registry-image-item .link-btn-wrap .link[data-v-77866b40]{background-image:url("+b+");background-size:20px 40px;outline:1px green dashed}}\n",""]),t.default=m},3612:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".registry-wrapper{height:100%}.registry-table.v-table-wrapper{--v-table-cell-padding__last-cell: 0 16px 0 8px}\n",""]),t.default=o},9202:function(e,t,i){"use strict";i.r(t);var n=i(3645),o=i.n(n),r=i(1667),s=i.n(r),a=i(8327),l=i.n(a),c=i(8283),d=i.n(c),h=i(8660),u=i.n(h),g=i(4402),p=i.n(g),m=o()((function(e){return e[1]})),f=s()(l()),_=s()(d()),v=s()(u()),b=s()(p());m.push([e.id,".docker-package .docker-registry-panel .registry-row .registry-row-item .registry-row-item-title .registry-row-item-text{font-weight:700}.docker-package .docker-registry-panel .v-table .v-table-content.auto-row-height td{vertical-align:middle}.docker-package .docker-registry-panel .registry-row{display:flex;align-items:center;justify-content:space-between}.docker-package .docker-registry-panel .registry-row .registry-row-item{height:40px;padding-right:16px;overflow:hidden}.docker-package .docker-registry-panel .registry-row .registry-row-item .registry-row-item-title{display:flex;flex:1;overflow:hidden}.docker-package .docker-registry-panel .registry-row .registry-row-item .registry-row-item-title .registry-row-item-official,.docker-package .docker-registry-panel .registry-row .registry-row-item .registry-row-item-title .registry-row-item-star{margin-left:5px;flex-shrink:0}.docker-package .docker-registry-panel .registry-row .registry-row-item .registry-row-item-title .registry-row-item-official{background-image:url("+f+");background-size:20px 60px;width:20px;height:20px;background-position:0px -40px}@media (-webkit-min-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3 / 2), (min-resolution: 144dpi){.synohdpack .docker-package .docker-registry-panel .registry-row .registry-row-item .registry-row-item-title .registry-row-item-official{background-image:url("+_+");background-size:20px 60px}}@media (-webkit-min-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3 / 2), (min-resolution: 144dpi){.synohdpackdebug .docker-package .docker-registry-panel .registry-row .registry-row-item .registry-row-item-title .registry-row-item-official{background-image:url("+_+");background-size:20px 60px;outline:1px green dashed}}.docker-package .docker-registry-panel .registry-row .registry-row-item .registry-row-item-title .registry-row-item-star{display:flex}.docker-package .docker-registry-panel .registry-row .registry-row-item .registry-row-item-title .registry-row-item-star:before{content:'';background-image:url("+f+");background-size:20px 60px;height:20px;width:20px;background-position:0px -20px}@media (-webkit-min-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3 / 2), (min-resolution: 144dpi){.synohdpack .docker-package .docker-registry-panel .registry-row .registry-row-item .registry-row-item-title .registry-row-item-star:before{background-image:url("+_+");background-size:20px 60px}}@media (-webkit-min-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3 / 2), (min-resolution: 144dpi){.synohdpackdebug .docker-package .docker-registry-panel .registry-row .registry-row-item .registry-row-item-title .registry-row-item-star:before{background-image:url("+_+");background-size:20px 60px;outline:1px green dashed}}.docker-package .docker-registry-panel .registry-row .registry-row-item .registry-row-item-desc{color:rgba(65,75,85,0.6)}.docker-package .docker-registry-panel .registry-row .registry-row-item .registry-row-item-text,.docker-package .docker-registry-panel .registry-row .registry-row-item .registry-row-item-desc{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.docker-package .docker-registry-panel .registry-row .registry-row-link{background-image:url("+v+");background-size:20px 40px;width:20px;height:20px;flex-shrink:0}@media (-webkit-min-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3 / 2), (min-resolution: 144dpi){.synohdpack .docker-package .docker-registry-panel .registry-row .registry-row-link{background-image:url("+b+");background-size:20px 40px}}@media (-webkit-min-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3 / 2), (min-resolution: 144dpi){.synohdpackdebug .docker-package .docker-registry-panel .registry-row .registry-row-link{background-image:url("+b+");background-size:20px 40px;outline:1px green dashed}}.docker-package .docker-registry-panel .registry-row .registry-row-link:hover{background-position:0px -20px}\n",""]),t.default=m},9541:function(e,t,i){"use strict";var n=i(3645),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,"\n.manage-network-form[data-v-03023a12] {\n    overflow: hidden;\n    display: flex;\n    height: 100%;\n    flex-direction: column;\n}\n.network-manage-table[data-v-03023a12] {\n    flex: 1;\n    overflow: hidden;\n}\n",""]),t.Z=o},3645:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i=e(t);return t[2]?"@media ".concat(t[2]," {").concat(i,"}"):i})).join("")},t.i=function(e,i,n){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(n)for(var r=0;r<this.length;r++){var s=this[r][0];null!=s&&(o[s]=!0)}for(var a=0;a<e.length;a++){var l=[].concat(e[a]);n&&o[l[0]]||(i&&(l[2]?l[2]="".concat(i," and ").concat(l[2]):l[2]=i),t.push(l))}},t}},1667:function(e){"use strict";e.exports=function(e,t){return t||(t={}),"string"!=typeof(e=e&&e.__esModule?e.default:e)?e:(/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e)}},5483:function(e){e.exports="/webman/3rdparty/ContainerManager/dist/assets/c63ca18f4104156836a9c01e1d692925.png"},8327:function(e){e.exports="/webman/3rdparty/ContainerManager/dist/assets/6674d69d113712b7c6b0be69e1d9a0b8.png"},8660:function(e){e.exports="/webman/3rdparty/ContainerManager/dist/assets/5acbaa07d24e04f13039d331a2262e0b.png"},7142:function(e){e.exports="/webman/3rdparty/ContainerManager/dist/assets/541abdd51bd1df3f7d90059006f316ba.png"},1063:function(e){e.exports="/webman/3rdparty/ContainerManager/dist/assets/19828612dd409e6059cb535ffc094a39.png"},1178:function(e){e.exports="/webman/3rdparty/ContainerManager/dist/assets/49d8afcab832837a95611fd147e61feb.png"},8283:function(e){e.exports="/webman/3rdparty/ContainerManager/dist/assets/2bc4bf442a5d6546993e418698c78932.png"},4402:function(e){e.exports="/webman/3rdparty/ContainerManager/dist/assets/ec7dc5a614a3252cac7aabcfac13260a.png"},1365:function(e){e.exports="/webman/3rdparty/ContainerManager/dist/assets/b1cf4c8e8b55383ad489cff6faacda3f.png"},9389:function(e){e.exports="/webman/3rdparty/ContainerManager/dist/assets/e6ea5ddd7f5196a77a174da48795b4d1.png"},6147:function(e){e.exports="/webman/3rdparty/ContainerManager/dist/assets/ade705761eb7e702770dcaa0d4ac972f.ttf"},1538:function(e){e.exports="/webman/3rdparty/ContainerManager/dist/assets/9386fa4cad80c10d59e038a2edac269b.svg"},8552:function(e,t,i){var n=i(852)(i(5639),"DataView");e.exports=n},1989:function(e,t,i){var n=i(1789),o=i(401),r=i(7667),s=i(1327),a=i(1866);function l(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}l.prototype.clear=n,l.prototype.delete=o,l.prototype.get=r,l.prototype.has=s,l.prototype.set=a,e.exports=l},6425:function(e,t,i){var n=i(3118),o=i(9435);function r(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}r.prototype=n(o.prototype),r.prototype.constructor=r,e.exports=r},8407:function(e,t,i){var n=i(7040),o=i(4125),r=i(2117),s=i(7518),a=i(4705);function l(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}l.prototype.clear=n,l.prototype.delete=o,l.prototype.get=r,l.prototype.has=s,l.prototype.set=a,e.exports=l},2063:function(e,t,i){var n=i(3118),o=i(9435);function r(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}r.prototype=n(o.prototype),r.prototype.constructor=r,e.exports=r},7071:function(e,t,i){var n=i(852)(i(5639),"Map");e.exports=n},3369:function(e,t,i){var n=i(4785),o=i(1285),r=i(6e3),s=i(9916),a=i(5265);function l(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}l.prototype.clear=n,l.prototype.delete=o,l.prototype.get=r,l.prototype.has=s,l.prototype.set=a,e.exports=l},3818:function(e,t,i){var n=i(852)(i(5639),"Promise");e.exports=n},8525:function(e,t,i){var n=i(852)(i(5639),"Set");e.exports=n},8668:function(e,t,i){var n=i(3369),o=i(619),r=i(2385);function s(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new n;++t<i;)this.add(e[t])}s.prototype.add=s.prototype.push=o,s.prototype.has=r,e.exports=s},6384:function(e,t,i){var n=i(8407),o=i(7465),r=i(3779),s=i(7599),a=i(4758),l=i(4309);function c(e){var t=this.__data__=new n(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=r,c.prototype.get=s,c.prototype.has=a,c.prototype.set=l,e.exports=c},2705:function(e,t,i){var n=i(5639).Symbol;e.exports=n},1149:function(e,t,i){var n=i(5639).Uint8Array;e.exports=n},577:function(e,t,i){var n=i(852)(i(5639),"WeakMap");e.exports=n},6874:function(e){e.exports=function(e,t,i){switch(i.length){case 0:return e.call(t);case 1:return e.call(t,i[0]);case 2:return e.call(t,i[0],i[1]);case 3:return e.call(t,i[0],i[1],i[2])}return e.apply(t,i)}},7412:function(e){e.exports=function(e,t){for(var i=-1,n=null==e?0:e.length;++i<n&&!1!==t(e[i],i,e););return e}},4963:function(e){e.exports=function(e,t){for(var i=-1,n=null==e?0:e.length,o=0,r=[];++i<n;){var s=e[i];t(s,i,e)&&(r[o++]=s)}return r}},4636:function(e,t,i){var n=i(2545),o=i(5694),r=i(1469),s=i(4144),a=i(5776),l=i(6719),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var i=r(e),d=!i&&o(e),h=!i&&!d&&s(e),u=!i&&!d&&!h&&l(e),g=i||d||h||u,p=g?n(e.length,String):[],m=p.length;for(var f in e)!t&&!c.call(e,f)||g&&("length"==f||h&&("offset"==f||"parent"==f)||u&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||a(f,m))||p.push(f);return p}},9932:function(e){e.exports=function(e,t){for(var i=-1,n=null==e?0:e.length,o=Array(n);++i<n;)o[i]=t(e[i],i,e);return o}},2488:function(e){e.exports=function(e,t){for(var i=-1,n=t.length,o=e.length;++i<n;)e[o+i]=t[i];return e}},2663:function(e){e.exports=function(e,t,i,n){var o=-1,r=null==e?0:e.length;for(n&&r&&(i=e[++o]);++o<r;)i=t(i,e[o],o,e);return i}},2908:function(e){e.exports=function(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1}},6556:function(e,t,i){var n=i(9465),o=i(7813);e.exports=function(e,t,i){(void 0!==i&&!o(e[t],i)||void 0===i&&!(t in e))&&n(e,t,i)}},4865:function(e,t,i){var n=i(9465),o=i(7813),r=Object.prototype.hasOwnProperty;e.exports=function(e,t,i){var s=e[t];r.call(e,t)&&o(s,i)&&(void 0!==i||t in e)||n(e,t,i)}},8470:function(e,t,i){var n=i(7813);e.exports=function(e,t){for(var i=e.length;i--;)if(n(e[i][0],t))return i;return-1}},4037:function(e,t,i){var n=i(8363),o=i(3674);e.exports=function(e,t){return e&&n(t,o(t),e)}},3886:function(e,t,i){var n=i(8363),o=i(1704);e.exports=function(e,t){return e&&n(t,o(t),e)}},9465:function(e,t,i){var n=i(8777);e.exports=function(e,t,i){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i}},9750:function(e){e.exports=function(e,t,i){return e==e&&(void 0!==i&&(e=e<=i?e:i),void 0!==t&&(e=e>=t?e:t)),e}},5990:function(e,t,i){var n=i(6384),o=i(7412),r=i(4865),s=i(4037),a=i(3886),l=i(4626),c=i(278),d=i(8805),h=i(1911),u=i(8234),g=i(6904),p=i(4160),m=i(3824),f=i(9148),_=i(8517),v=i(1469),b=i(4144),w=i(6688),y=i(3218),C=i(2928),S=i(3674),k=i(1704),x="[object Arguments]",L="[object Function]",E="[object Object]",N={};N[x]=N["[object Array]"]=N["[object ArrayBuffer]"]=N["[object DataView]"]=N["[object Boolean]"]=N["[object Date]"]=N["[object Float32Array]"]=N["[object Float64Array]"]=N["[object Int8Array]"]=N["[object Int16Array]"]=N["[object Int32Array]"]=N["[object Map]"]=N["[object Number]"]=N[E]=N["[object RegExp]"]=N["[object Set]"]=N["[object String]"]=N["[object Symbol]"]=N["[object Uint8Array]"]=N["[object Uint8ClampedArray]"]=N["[object Uint16Array]"]=N["[object Uint32Array]"]=!0,N["[object Error]"]=N[L]=N["[object WeakMap]"]=!1,e.exports=function e(t,i,I,T,D,A){var O,M=1&i,R=2&i,P=4&i;if(I&&(O=D?I(t,T,D,A):I(t)),void 0!==O)return O;if(!y(t))return t;var F=v(t);if(F){if(O=m(t),!M)return c(t,O)}else{var B=p(t),W=B==L||"[object GeneratorFunction]"==B;if(b(t))return l(t,M);if(B==E||B==x||W&&!D){if(O=R||W?{}:_(t),!M)return R?h(t,a(O,t)):d(t,s(O,t))}else{if(!N[B])return D?t:{};O=f(t,B,M)}}A||(A=new n);var V=A.get(t);if(V)return V;A.set(t,O),C(t)?t.forEach((function(n){O.add(e(n,i,I,n,t,A))})):w(t)&&t.forEach((function(n,o){O.set(o,e(n,i,I,o,t,A))}));var z=F?void 0:(P?R?g:u:R?k:S)(t);return o(z||t,(function(n,o){z&&(n=t[o=n]),r(O,o,e(n,i,I,o,t,A))})),O}},3118:function(e,t,i){var n=i(3218),o=Object.create,r=function(){function e(){}return function(t){if(!n(t))return{};if(o)return o(t);e.prototype=t;var i=new e;return e.prototype=void 0,i}}();e.exports=r},4140:function(e,t,i){var n=i(7816),o=i(9291)(n);e.exports=o},1848:function(e){e.exports=function(e,t,i,n){for(var o=e.length,r=i+(n?1:-1);n?r--:++r<o;)if(t(e[r],r,e))return r;return-1}},1078:function(e,t,i){var n=i(2488),o=i(7285);e.exports=function e(t,i,r,s,a){var l=-1,c=t.length;for(r||(r=o),a||(a=[]);++l<c;){var d=t[l];i>0&&r(d)?i>1?e(d,i-1,r,s,a):n(a,d):s||(a[a.length]=d)}return a}},8483:function(e,t,i){var n=i(5063)();e.exports=n},7816:function(e,t,i){var n=i(8483),o=i(3674);e.exports=function(e,t){return e&&n(e,t,o)}},7786:function(e,t,i){var n=i(1811),o=i(327);e.exports=function(e,t){for(var i=0,r=(t=n(t,e)).length;null!=e&&i<r;)e=e[o(t[i++])];return i&&i==r?e:void 0}},8866:function(e,t,i){var n=i(2488),o=i(1469);e.exports=function(e,t,i){var r=t(e);return o(e)?r:n(r,i(e))}},4239:function(e,t,i){var n=i(2705),o=i(9607),r=i(2333),s=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?o(e):r(e)}},8565:function(e){var t=Object.prototype.hasOwnProperty;e.exports=function(e,i){return null!=e&&t.call(e,i)}},13:function(e){e.exports=function(e,t){return null!=e&&t in Object(e)}},9454:function(e,t,i){var n=i(4239),o=i(7005);e.exports=function(e){return o(e)&&"[object Arguments]"==n(e)}},939:function(e,t,i){var n=i(1299),o=i(7005);e.exports=function e(t,i,r,s,a){return t===i||(null==t||null==i||!o(t)&&!o(i)?t!=t&&i!=i:n(t,i,r,s,e,a))}},1299:function(e,t,i){var n=i(6384),o=i(7114),r=i(8351),s=i(6096),a=i(4160),l=i(1469),c=i(4144),d=i(6719),h="[object Arguments]",u="[object Array]",g="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,i,m,f,_){var v=l(e),b=l(t),w=v?u:a(e),y=b?u:a(t),C=(w=w==h?g:w)==g,S=(y=y==h?g:y)==g,k=w==y;if(k&&c(e)){if(!c(t))return!1;v=!0,C=!1}if(k&&!C)return _||(_=new n),v||d(e)?o(e,t,i,m,f,_):r(e,t,w,i,m,f,_);if(!(1&i)){var x=C&&p.call(e,"__wrapped__"),L=S&&p.call(t,"__wrapped__");if(x||L){var E=x?e.value():e,N=L?t.value():t;return _||(_=new n),f(E,N,i,m,_)}}return!!k&&(_||(_=new n),s(e,t,i,m,f,_))}},5588:function(e,t,i){var n=i(4160),o=i(7005);e.exports=function(e){return o(e)&&"[object Map]"==n(e)}},2958:function(e,t,i){var n=i(6384),o=i(939);e.exports=function(e,t,i,r){var s=i.length,a=s,l=!r;if(null==e)return!a;for(e=Object(e);s--;){var c=i[s];if(l&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++s<a;){var d=(c=i[s])[0],h=e[d],u=c[1];if(l&&c[2]){if(void 0===h&&!(d in e))return!1}else{var g=new n;if(r)var p=r(h,u,d,e,t,g);if(!(void 0===p?o(u,h,3,r,g):p))return!1}}return!0}},8458:function(e,t,i){var n=i(3560),o=i(5346),r=i(3218),s=i(346),a=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,d=l.toString,h=c.hasOwnProperty,u=RegExp("^"+d.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!r(e)||o(e))&&(n(e)?u:a).test(s(e))}},9221:function(e,t,i){var n=i(4160),o=i(7005);e.exports=function(e){return o(e)&&"[object Set]"==n(e)}},8749:function(e,t,i){var n=i(4239),o=i(1780),r=i(7005),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(e){return r(e)&&o(e.length)&&!!s[n(e)]}},7206:function(e,t,i){var n=i(1573),o=i(6432),r=i(6557),s=i(1469),a=i(9601);e.exports=function(e){return"function"==typeof e?e:null==e?r:"object"==typeof e?s(e)?o(e[0],e[1]):n(e):a(e)}},280:function(e,t,i){var n=i(5726),o=i(6916),r=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return o(e);var t=[];for(var i in Object(e))r.call(e,i)&&"constructor"!=i&&t.push(i);return t}},313:function(e,t,i){var n=i(3218),o=i(5726),r=i(3498),s=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return r(e);var t=o(e),i=[];for(var a in e)("constructor"!=a||!t&&s.call(e,a))&&i.push(a);return i}},9435:function(e){e.exports=function(){}},9199:function(e,t,i){var n=i(4140),o=i(8612);e.exports=function(e,t){var i=-1,r=o(e)?Array(e.length):[];return n(e,(function(e,n,o){r[++i]=t(e,n,o)})),r}},1573:function(e,t,i){var n=i(2958),o=i(1499),r=i(2634);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?r(t[0][0],t[0][1]):function(i){return i===e||n(i,e,t)}}},6432:function(e,t,i){var n=i(939),o=i(7361),r=i(9095),s=i(5403),a=i(9162),l=i(2634),c=i(327);e.exports=function(e,t){return s(e)&&a(t)?l(c(e),t):function(i){var s=o(i,e);return void 0===s&&s===t?r(i,e):n(t,s,3)}}},2980:function(e,t,i){var n=i(6384),o=i(6556),r=i(8483),s=i(9783),a=i(3218),l=i(1704),c=i(6390);e.exports=function e(t,i,d,h,u){t!==i&&r(i,(function(r,l){if(u||(u=new n),a(r))s(t,i,l,d,e,h,u);else{var g=h?h(c(t,l),r,l+"",t,i,u):void 0;void 0===g&&(g=r),o(t,l,g)}}),l)}},9783:function(e,t,i){var n=i(6556),o=i(4626),r=i(7133),s=i(278),a=i(8517),l=i(5694),c=i(1469),d=i(9246),h=i(4144),u=i(3560),g=i(3218),p=i(8630),m=i(6719),f=i(6390),_=i(9881);e.exports=function(e,t,i,v,b,w,y){var C=f(e,i),S=f(t,i),k=y.get(S);if(k)n(e,i,k);else{var x=w?w(C,S,i+"",e,t,y):void 0,L=void 0===x;if(L){var E=c(S),N=!E&&h(S),I=!E&&!N&&m(S);x=S,E||N||I?c(C)?x=C:d(C)?x=s(C):N?(L=!1,x=o(S,!0)):I?(L=!1,x=r(S,!0)):x=[]:p(S)||l(S)?(x=C,l(C)?x=_(C):g(C)&&!u(C)||(x=a(S))):L=!1}L&&(y.set(S,x),b(x,S,v,w,y),y.delete(S)),n(e,i,x)}}},5970:function(e,t,i){var n=i(3012),o=i(9095);e.exports=function(e,t){return n(e,t,(function(t,i){return o(e,i)}))}},3012:function(e,t,i){var n=i(7786),o=i(611),r=i(1811);e.exports=function(e,t,i){for(var s=-1,a=t.length,l={};++s<a;){var c=t[s],d=n(e,c);i(d,c)&&o(l,r(c,e),d)}return l}},371:function(e){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},9152:function(e,t,i){var n=i(7786);e.exports=function(e){return function(t){return n(t,e)}}},8674:function(e){e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},107:function(e){e.exports=function(e,t,i,n,o){return o(e,(function(e,o,r){i=n?(n=!1,e):t(i,e,o,r)})),i}},5976:function(e,t,i){var n=i(6557),o=i(5357),r=i(61);e.exports=function(e,t){return r(o(e,t,n),e+"")}},611:function(e,t,i){var n=i(4865),o=i(1811),r=i(5776),s=i(3218),a=i(327);e.exports=function(e,t,i,l){if(!s(e))return e;for(var c=-1,d=(t=o(t,e)).length,h=d-1,u=e;null!=u&&++c<d;){var g=a(t[c]),p=i;if("__proto__"===g||"constructor"===g||"prototype"===g)return e;if(c!=h){var m=u[g];void 0===(p=l?l(m,g,u):void 0)&&(p=s(m)?m:r(t[c+1])?[]:{})}n(u,g,p),u=u[g]}return e}},6560:function(e,t,i){var n=i(5703),o=i(8777),r=i(6557),s=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:r;e.exports=s},4259:function(e){e.exports=function(e,t,i){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(i=i>o?o:i)<0&&(i+=o),o=t>i?0:i-t>>>0,t>>>=0;for(var r=Array(o);++n<o;)r[n]=e[n+t];return r}},2545:function(e){e.exports=function(e,t){for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n}},531:function(e,t,i){var n=i(2705),o=i(9932),r=i(1469),s=i(3448),a=n?n.prototype:void 0,l=a?a.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(r(t))return o(t,e)+"";if(s(t))return l?l.call(t):"";var i=t+"";return"0"==i&&1/t==-1/0?"-0":i}},7561:function(e,t,i){var n=i(7990),o=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(o,""):e}},1717:function(e){e.exports=function(e){return function(t){return e(t)}}},7406:function(e,t,i){var n=i(1811),o=i(928),r=i(292),s=i(327);e.exports=function(e,t){return t=n(t,e),null==(e=r(e,t))||delete e[s(o(t))]}},7415:function(e,t,i){var n=i(9932);e.exports=function(e,t){return n(t,(function(t){return e[t]}))}},4757:function(e){e.exports=function(e,t){return e.has(t)}},4290:function(e,t,i){var n=i(6557);e.exports=function(e){return"function"==typeof e?e:n}},1811:function(e,t,i){var n=i(1469),o=i(5403),r=i(5514),s=i(9833);e.exports=function(e,t){return n(e)?e:o(e,t)?[e]:r(s(e))}},4318:function(e,t,i){var n=i(1149);e.exports=function(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}},4626:function(e,t,i){e=i.nmd(e);var n=i(5639),o=t&&!t.nodeType&&t,r=o&&e&&!e.nodeType&&e,s=r&&r.exports===o?n.Buffer:void 0,a=s?s.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var i=e.length,n=a?a(i):new e.constructor(i);return e.copy(n),n}},7157:function(e,t,i){var n=i(4318);e.exports=function(e,t){var i=t?n(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.byteLength)}},3147:function(e){var t=/\w*$/;e.exports=function(e){var i=new e.constructor(e.source,t.exec(e));return i.lastIndex=e.lastIndex,i}},419:function(e,t,i){var n=i(2705),o=n?n.prototype:void 0,r=o?o.valueOf:void 0;e.exports=function(e){return r?Object(r.call(e)):{}}},7133:function(e,t,i){var n=i(4318);e.exports=function(e,t){var i=t?n(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}},278:function(e){e.exports=function(e,t){var i=-1,n=e.length;for(t||(t=Array(n));++i<n;)t[i]=e[i];return t}},8363:function(e,t,i){var n=i(4865),o=i(9465);e.exports=function(e,t,i,r){var s=!i;i||(i={});for(var a=-1,l=t.length;++a<l;){var c=t[a],d=r?r(i[c],e[c],c,i,e):void 0;void 0===d&&(d=e[c]),s?o(i,c,d):n(i,c,d)}return i}},8805:function(e,t,i){var n=i(8363),o=i(9551);e.exports=function(e,t){return n(e,o(e),t)}},1911:function(e,t,i){var n=i(8363),o=i(1442);e.exports=function(e,t){return n(e,o(e),t)}},4429:function(e,t,i){var n=i(5639)["__core-js_shared__"];e.exports=n},1463:function(e,t,i){var n=i(5976),o=i(6612);e.exports=function(e){return n((function(t,i){var n=-1,r=i.length,s=r>1?i[r-1]:void 0,a=r>2?i[2]:void 0;for(s=e.length>3&&"function"==typeof s?(r--,s):void 0,a&&o(i[0],i[1],a)&&(s=r<3?void 0:s,r=1),t=Object(t);++n<r;){var l=i[n];l&&e(t,l,n,s)}return t}))}},9291:function(e,t,i){var n=i(8612);e.exports=function(e,t){return function(i,o){if(null==i)return i;if(!n(i))return e(i,o);for(var r=i.length,s=t?r:-1,a=Object(i);(t?s--:++s<r)&&!1!==o(a[s],s,a););return i}}},5063:function(e){e.exports=function(e){return function(t,i,n){for(var o=-1,r=Object(t),s=n(t),a=s.length;a--;){var l=s[e?a:++o];if(!1===i(r[l],l,r))break}return t}}},7740:function(e,t,i){var n=i(7206),o=i(8612),r=i(3674);e.exports=function(e){return function(t,i,s){var a=Object(t);if(!o(t)){var l=n(i,3);t=r(t),i=function(e){return l(a[e],e,a)}}var c=e(t,i,s);return c>-1?a[l?t[c]:c]:void 0}}},3468:function(e,t,i){var n=i(2063),o=i(9021),r=i(6833),s=i(7658),a=i(1469),l=i(6528);e.exports=function(e){return o((function(t){var i=t.length,o=i,c=n.prototype.thru;for(e&&t.reverse();o--;){var d=t[o];if("function"!=typeof d)throw new TypeError("Expected a function");if(c&&!h&&"wrapper"==s(d))var h=new n([],!0)}for(o=h?o:i;++o<i;){d=t[o];var u=s(d),g="wrapper"==u?r(d):void 0;h=g&&l(g[0])&&424==g[1]&&!g[4].length&&1==g[9]?h[s(g[0])].apply(h,g[3]):1==d.length&&l(d)?h[u]():h.thru(d)}return function(){var e=arguments,n=e[0];if(h&&1==e.length&&a(n))return h.plant(n).value();for(var o=0,r=i?t[o].apply(this,e):n;++o<i;)r=t[o].call(this,r);return r}}))}},696:function(e,t,i){var n=i(8630);e.exports=function(e){return n(e)?void 0:e}},8777:function(e,t,i){var n=i(852),o=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},7114:function(e,t,i){var n=i(8668),o=i(2908),r=i(4757);e.exports=function(e,t,i,s,a,l){var c=1&i,d=e.length,h=t.length;if(d!=h&&!(c&&h>d))return!1;var u=l.get(e),g=l.get(t);if(u&&g)return u==t&&g==e;var p=-1,m=!0,f=2&i?new n:void 0;for(l.set(e,t),l.set(t,e);++p<d;){var _=e[p],v=t[p];if(s)var b=c?s(v,_,p,t,e,l):s(_,v,p,e,t,l);if(void 0!==b){if(b)continue;m=!1;break}if(f){if(!o(t,(function(e,t){if(!r(f,t)&&(_===e||a(_,e,i,s,l)))return f.push(t)}))){m=!1;break}}else if(_!==v&&!a(_,v,i,s,l)){m=!1;break}}return l.delete(e),l.delete(t),m}},8351:function(e,t,i){var n=i(2705),o=i(1149),r=i(7813),s=i(7114),a=i(8776),l=i(1814),c=n?n.prototype:void 0,d=c?c.valueOf:void 0;e.exports=function(e,t,i,n,c,h,u){switch(i){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!h(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return r(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var g=a;case"[object Set]":var p=1&n;if(g||(g=l),e.size!=t.size&&!p)return!1;var m=u.get(e);if(m)return m==t;n|=2,u.set(e,t);var f=s(g(e),g(t),n,c,h,u);return u.delete(e),f;case"[object Symbol]":if(d)return d.call(e)==d.call(t)}return!1}},6096:function(e,t,i){var n=i(8234),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,i,r,s,a){var l=1&i,c=n(e),d=c.length;if(d!=n(t).length&&!l)return!1;for(var h=d;h--;){var u=c[h];if(!(l?u in t:o.call(t,u)))return!1}var g=a.get(e),p=a.get(t);if(g&&p)return g==t&&p==e;var m=!0;a.set(e,t),a.set(t,e);for(var f=l;++h<d;){var _=e[u=c[h]],v=t[u];if(r)var b=l?r(v,_,u,t,e,a):r(_,v,u,e,t,a);if(!(void 0===b?_===v||s(_,v,i,r,a):b)){m=!1;break}f||(f="constructor"==u)}if(m&&!f){var w=e.constructor,y=t.constructor;w==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof y&&y instanceof y||(m=!1)}return a.delete(e),a.delete(t),m}},9464:function(e,t,i){var n=i(8674)({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});e.exports=n},9021:function(e,t,i){var n=i(5564),o=i(5357),r=i(61);e.exports=function(e){return r(o(e,void 0,n),e+"")}},1957:function(e,t,i){var n="object"==typeof i.g&&i.g&&i.g.Object===Object&&i.g;e.exports=n},8234:function(e,t,i){var n=i(8866),o=i(9551),r=i(3674);e.exports=function(e){return n(e,r,o)}},6904:function(e,t,i){var n=i(8866),o=i(1442),r=i(1704);e.exports=function(e){return n(e,r,o)}},6833:function(e,t,i){var n=i(9250),o=i(308),r=n?function(e){return n.get(e)}:o;e.exports=r},7658:function(e,t,i){var n=i(2060),o=Object.prototype.hasOwnProperty;e.exports=function(e){for(var t=e.name+"",i=n[t],r=o.call(n,t)?i.length:0;r--;){var s=i[r],a=s.func;if(null==a||a==e)return s.name}return t}},5050:function(e,t,i){var n=i(7019);e.exports=function(e,t){var i=e.__data__;return n(t)?i["string"==typeof t?"string":"hash"]:i.map}},1499:function(e,t,i){var n=i(9162),o=i(3674);e.exports=function(e){for(var t=o(e),i=t.length;i--;){var r=t[i],s=e[r];t[i]=[r,s,n(s)]}return t}},852:function(e,t,i){var n=i(8458),o=i(7801);e.exports=function(e,t){var i=o(e,t);return n(i)?i:void 0}},5924:function(e,t,i){var n=i(5569)(Object.getPrototypeOf,Object);e.exports=n},9607:function(e,t,i){var n=i(2705),o=Object.prototype,r=o.hasOwnProperty,s=o.toString,a=n?n.toStringTag:void 0;e.exports=function(e){var t=r.call(e,a),i=e[a];try{e[a]=void 0;var n=!0}catch(e){}var o=s.call(e);return n&&(t?e[a]=i:delete e[a]),o}},9551:function(e,t,i){var n=i(4963),o=i(479),r=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(e){return null==e?[]:(e=Object(e),n(s(e),(function(t){return r.call(e,t)})))}:o;e.exports=a},1442:function(e,t,i){var n=i(2488),o=i(5924),r=i(9551),s=i(479),a=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,r(e)),e=o(e);return t}:s;e.exports=a},4160:function(e,t,i){var n=i(8552),o=i(7071),r=i(3818),s=i(8525),a=i(577),l=i(4239),c=i(346),d="[object Map]",h="[object Promise]",u="[object Set]",g="[object WeakMap]",p="[object DataView]",m=c(n),f=c(o),_=c(r),v=c(s),b=c(a),w=l;(n&&w(new n(new ArrayBuffer(1)))!=p||o&&w(new o)!=d||r&&w(r.resolve())!=h||s&&w(new s)!=u||a&&w(new a)!=g)&&(w=function(e){var t=l(e),i="[object Object]"==t?e.constructor:void 0,n=i?c(i):"";if(n)switch(n){case m:return p;case f:return d;case _:return h;case v:return u;case b:return g}return t}),e.exports=w},7801:function(e){e.exports=function(e,t){return null==e?void 0:e[t]}},222:function(e,t,i){var n=i(1811),o=i(5694),r=i(1469),s=i(5776),a=i(1780),l=i(327);e.exports=function(e,t,i){for(var c=-1,d=(t=n(t,e)).length,h=!1;++c<d;){var u=l(t[c]);if(!(h=null!=e&&i(e,u)))break;e=e[u]}return h||++c!=d?h:!!(d=null==e?0:e.length)&&a(d)&&s(u,d)&&(r(e)||o(e))}},1789:function(e,t,i){var n=i(4536);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},401:function(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},7667:function(e,t,i){var n=i(4536),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var i=t[e];return"__lodash_hash_undefined__"===i?void 0:i}return o.call(t,e)?t[e]:void 0}},1327:function(e,t,i){var n=i(4536),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:o.call(t,e)}},1866:function(e,t,i){var n=i(4536);e.exports=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},3824:function(e){var t=Object.prototype.hasOwnProperty;e.exports=function(e){var i=e.length,n=new e.constructor(i);return i&&"string"==typeof e[0]&&t.call(e,"index")&&(n.index=e.index,n.input=e.input),n}},9148:function(e,t,i){var n=i(4318),o=i(7157),r=i(3147),s=i(419),a=i(7133);e.exports=function(e,t,i){var l=e.constructor;switch(t){case"[object ArrayBuffer]":return n(e);case"[object Boolean]":case"[object Date]":return new l(+e);case"[object DataView]":return o(e,i);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return a(e,i);case"[object Map]":return new l;case"[object Number]":case"[object String]":return new l(e);case"[object RegExp]":return r(e);case"[object Set]":return new l;case"[object Symbol]":return s(e)}}},8517:function(e,t,i){var n=i(3118),o=i(5924),r=i(5726);e.exports=function(e){return"function"!=typeof e.constructor||r(e)?{}:n(o(e))}},7285:function(e,t,i){var n=i(2705),o=i(5694),r=i(1469),s=n?n.isConcatSpreadable:void 0;e.exports=function(e){return r(e)||o(e)||!!(s&&e&&e[s])}},5776:function(e){var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,i){var n=typeof e;return!!(i=null==i?9007199254740991:i)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e<i}},6612:function(e,t,i){var n=i(7813),o=i(8612),r=i(5776),s=i(3218);e.exports=function(e,t,i){if(!s(i))return!1;var a=typeof t;return!!("number"==a?o(i)&&r(t,i.length):"string"==a&&t in i)&&n(i[t],e)}},5403:function(e,t,i){var n=i(1469),o=i(3448),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var i=typeof e;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=e&&!o(e))||s.test(e)||!r.test(e)||null!=t&&e in Object(t)}},7019:function(e){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},6528:function(e,t,i){var n=i(6425),o=i(6833),r=i(7658),s=i(8111);e.exports=function(e){var t=r(e),i=s[t];if("function"!=typeof i||!(t in n.prototype))return!1;if(e===i)return!0;var a=o(i);return!!a&&e===a[0]}},5346:function(e,t,i){var n,o=i(4429),r=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!r&&r in e}},5726:function(e){var t=Object.prototype;e.exports=function(e){var i=e&&e.constructor;return e===("function"==typeof i&&i.prototype||t)}},9162:function(e,t,i){var n=i(3218);e.exports=function(e){return e==e&&!n(e)}},7040:function(e){e.exports=function(){this.__data__=[],this.size=0}},4125:function(e,t,i){var n=i(8470),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,i=n(t,e);return!(i<0||(i==t.length-1?t.pop():o.call(t,i,1),--this.size,0))}},2117:function(e,t,i){var n=i(8470);e.exports=function(e){var t=this.__data__,i=n(t,e);return i<0?void 0:t[i][1]}},7518:function(e,t,i){var n=i(8470);e.exports=function(e){return n(this.__data__,e)>-1}},4705:function(e,t,i){var n=i(8470);e.exports=function(e,t){var i=this.__data__,o=n(i,e);return o<0?(++this.size,i.push([e,t])):i[o][1]=t,this}},4785:function(e,t,i){var n=i(1989),o=i(8407),r=i(7071);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(r||o),string:new n}}},1285:function(e,t,i){var n=i(5050);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},6e3:function(e,t,i){var n=i(5050);e.exports=function(e){return n(this,e).get(e)}},9916:function(e,t,i){var n=i(5050);e.exports=function(e){return n(this,e).has(e)}},5265:function(e,t,i){var n=i(5050);e.exports=function(e,t){var i=n(this,e),o=i.size;return i.set(e,t),this.size+=i.size==o?0:1,this}},8776:function(e){e.exports=function(e){var t=-1,i=Array(e.size);return e.forEach((function(e,n){i[++t]=[n,e]})),i}},2634:function(e){e.exports=function(e,t){return function(i){return null!=i&&i[e]===t&&(void 0!==t||e in Object(i))}}},4523:function(e,t,i){var n=i(8306);e.exports=function(e){var t=n(e,(function(e){return 500===i.size&&i.clear(),e})),i=t.cache;return t}},9250:function(e,t,i){var n=i(577),o=n&&new n;e.exports=o},4536:function(e,t,i){var n=i(852)(Object,"create");e.exports=n},6916:function(e,t,i){var n=i(5569)(Object.keys,Object);e.exports=n},3498:function(e){e.exports=function(e){var t=[];if(null!=e)for(var i in Object(e))t.push(i);return t}},1167:function(e,t,i){e=i.nmd(e);var n=i(1957),o=t&&!t.nodeType&&t,r=o&&e&&!e.nodeType&&e,s=r&&r.exports===o&&n.process,a=function(){try{return r&&r.require&&r.require("util").types||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=a},2333:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:function(e){e.exports=function(e,t){return function(i){return e(t(i))}}},5357:function(e,t,i){var n=i(6874),o=Math.max;e.exports=function(e,t,i){return t=o(void 0===t?e.length-1:t,0),function(){for(var r=arguments,s=-1,a=o(r.length-t,0),l=Array(a);++s<a;)l[s]=r[t+s];s=-1;for(var c=Array(t+1);++s<t;)c[s]=r[s];return c[t]=i(l),n(e,this,c)}}},292:function(e,t,i){var n=i(7786),o=i(4259);e.exports=function(e,t){return t.length<2?e:n(e,o(t,0,-1))}},2060:function(e){e.exports={}},5639:function(e,t,i){var n=i(1957),o="object"==typeof self&&self&&self.Object===Object&&self,r=n||o||Function("return this")();e.exports=r},6390:function(e){e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},619:function(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},2385:function(e){e.exports=function(e){return this.__data__.has(e)}},1814:function(e){e.exports=function(e){var t=-1,i=Array(e.size);return e.forEach((function(e){i[++t]=e})),i}},61:function(e,t,i){var n=i(6560),o=i(1275)(n);e.exports=o},1275:function(e){var t=Date.now;e.exports=function(e){var i=0,n=0;return function(){var o=t(),r=16-(o-n);if(n=o,r>0){if(++i>=800)return arguments[0]}else i=0;return e.apply(void 0,arguments)}}},7465:function(e,t,i){var n=i(8407);e.exports=function(){this.__data__=new n,this.size=0}},3779:function(e){e.exports=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i}},7599:function(e){e.exports=function(e){return this.__data__.get(e)}},4758:function(e){e.exports=function(e){return this.__data__.has(e)}},4309:function(e,t,i){var n=i(8407),o=i(7071),r=i(3369);e.exports=function(e,t){var i=this.__data__;if(i instanceof n){var s=i.__data__;if(!o||s.length<199)return s.push([e,t]),this.size=++i.size,this;i=this.__data__=new r(s)}return i.set(e,t),this.size=i.size,this}},5514:function(e,t,i){var n=i(4523),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,s=n((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,i,n,o){t.push(n?o.replace(r,"$1"):i||e)})),t}));e.exports=s},327:function(e,t,i){var n=i(3448);e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},346:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},7990:function(e){var t=/\s/;e.exports=function(e){for(var i=e.length;i--&&t.test(e.charAt(i)););return i}},1913:function(e,t,i){var n=i(6425),o=i(2063),r=i(278);e.exports=function(e){if(e instanceof n)return e.clone();var t=new o(e.__wrapped__,e.__chain__);return t.__actions__=r(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}},4691:function(e,t,i){var n=i(9750),o=i(4841);e.exports=function(e,t,i){return void 0===i&&(i=t,t=void 0),void 0!==i&&(i=(i=o(i))==i?i:0),void 0!==t&&(t=(t=o(t))==t?t:0),n(o(e),t,i)}},361:function(e,t,i){var n=i(5990);e.exports=function(e){return n(e,5)}},5703:function(e){e.exports=function(e){return function(){return e}}},3279:function(e,t,i){var n=i(3218),o=i(7771),r=i(4841),s=Math.max,a=Math.min;e.exports=function(e,t,i){var l,c,d,h,u,g,p=0,m=!1,f=!1,_=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var i=l,n=c;return l=c=void 0,p=t,h=e.apply(n,i)}function b(e){return p=e,u=setTimeout(y,t),m?v(e):h}function w(e){var i=e-g;return void 0===g||i>=t||i<0||f&&e-p>=d}function y(){var e=o();if(w(e))return C(e);u=setTimeout(y,function(e){var i=t-(e-g);return f?a(i,d-(e-p)):i}(e))}function C(e){return u=void 0,_&&l?v(e):(l=c=void 0,h)}function S(){var e=o(),i=w(e);if(l=arguments,c=this,g=e,i){if(void 0===u)return b(g);if(f)return clearTimeout(u),u=setTimeout(y,t),v(g)}return void 0===u&&(u=setTimeout(y,t)),h}return t=r(t)||0,n(i)&&(m=!!i.leading,d=(f="maxWait"in i)?s(r(i.maxWait)||0,t):d,_="trailing"in i?!!i.trailing:_),S.cancel=function(){void 0!==u&&clearTimeout(u),p=0,l=g=c=u=void 0},S.flush=function(){return void 0===u?h:C(o())},S}},7813:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},7187:function(e,t,i){var n=i(9464),o=i(9833),r=/[&<>"']/g,s=RegExp(r.source);e.exports=function(e){return(e=o(e))&&s.test(e)?e.replace(r,n):e}},3311:function(e,t,i){var n=i(7740)(i(998));e.exports=n},998:function(e,t,i){var n=i(1848),o=i(7206),r=i(554),s=Math.max;e.exports=function(e,t,i){var a=null==e?0:e.length;if(!a)return-1;var l=null==i?0:r(i);return l<0&&(l=s(a+l,0)),n(e,o(t,3),l)}},8804:function(e,t,i){e.exports=i(1175)},4654:function(e,t,i){var n=i(1078),o=i(5161);e.exports=function(e,t){return n(o(e,t),1)}},5564:function(e,t,i){var n=i(1078);e.exports=function(e){return null!=e&&e.length?n(e,1):[]}},9242:function(e,t,i){var n=i(3468)();e.exports=n},4486:function(e,t,i){var n=i(7412),o=i(4140),r=i(4290),s=i(1469);e.exports=function(e,t){return(s(e)?n:o)(e,r(t))}},7361:function(e,t,i){var n=i(7786);e.exports=function(e,t,i){var o=null==e?void 0:n(e,t);return void 0===o?i:o}},8721:function(e,t,i){var n=i(8565),o=i(222);e.exports=function(e,t){return null!=e&&o(e,t,n)}},9095:function(e,t,i){var n=i(13),o=i(222);e.exports=function(e,t){return null!=e&&o(e,t,n)}},1175:function(e){e.exports=function(e){return e&&e.length?e[0]:void 0}},6557:function(e){e.exports=function(e){return e}},5694:function(e,t,i){var n=i(9454),o=i(7005),r=Object.prototype,s=r.hasOwnProperty,a=r.propertyIsEnumerable,l=n(function(){return arguments}())?n:function(e){return o(e)&&s.call(e,"callee")&&!a.call(e,"callee")};e.exports=l},1469:function(e){var t=Array.isArray;e.exports=t},8612:function(e,t,i){var n=i(3560),o=i(1780);e.exports=function(e){return null!=e&&o(e.length)&&!n(e)}},9246:function(e,t,i){var n=i(8612),o=i(7005);e.exports=function(e){return o(e)&&n(e)}},4144:function(e,t,i){e=i.nmd(e);var n=i(5639),o=i(5062),r=t&&!t.nodeType&&t,s=r&&e&&!e.nodeType&&e,a=s&&s.exports===r?n.Buffer:void 0,l=(a?a.isBuffer:void 0)||o;e.exports=l},8446:function(e,t,i){var n=i(939);e.exports=function(e,t){return n(e,t)}},3560:function(e,t,i){var n=i(4239),o=i(3218);e.exports=function(e){if(!o(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1780:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},6688:function(e,t,i){var n=i(5588),o=i(1717),r=i(1167),s=r&&r.isMap,a=s?o(s):n;e.exports=a},3218:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},7005:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},8630:function(e,t,i){var n=i(4239),o=i(5924),r=i(7005),s=Function.prototype,a=Object.prototype,l=s.toString,c=a.hasOwnProperty,d=l.call(Object);e.exports=function(e){if(!r(e)||"[object Object]"!=n(e))return!1;var t=o(e);if(null===t)return!0;var i=c.call(t,"constructor")&&t.constructor;return"function"==typeof i&&i instanceof i&&l.call(i)==d}},2928:function(e,t,i){var n=i(9221),o=i(1717),r=i(1167),s=r&&r.isSet,a=s?o(s):n;e.exports=a},3448:function(e,t,i){var n=i(4239),o=i(7005);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==n(e)}},6719:function(e,t,i){var n=i(8749),o=i(1717),r=i(1167),s=r&&r.isTypedArray,a=s?o(s):n;e.exports=a},3674:function(e,t,i){var n=i(4636),o=i(280),r=i(8612);e.exports=function(e){return r(e)?n(e):o(e)}},1704:function(e,t,i){var n=i(4636),o=i(313),r=i(8612);e.exports=function(e){return r(e)?n(e,!0):o(e)}},928:function(e){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},5161:function(e,t,i){var n=i(9932),o=i(7206),r=i(9199),s=i(1469);e.exports=function(e,t){return(s(e)?n:r)(e,o(t,3))}},7523:function(e,t,i){var n=i(9465),o=i(7816),r=i(7206);e.exports=function(e,t){var i={};return t=r(t,3),o(e,(function(e,o,r){n(i,t(e,o,r),e)})),i}},6604:function(e,t,i){var n=i(9465),o=i(7816),r=i(7206);e.exports=function(e,t){var i={};return t=r(t,3),o(e,(function(e,o,r){n(i,o,t(e,o,r))})),i}},8306:function(e,t,i){var n=i(3369);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var i=function(){var n=arguments,o=t?t.apply(this,n):n[0],r=i.cache;if(r.has(o))return r.get(o);var s=e.apply(this,n);return i.cache=r.set(o,s)||r,s};return i.cache=new(o.Cache||n),i}o.Cache=n,e.exports=o},2492:function(e,t,i){var n=i(2980),o=i(1463)((function(e,t,i){n(e,t,i)}));e.exports=o},308:function(e){e.exports=function(){}},7771:function(e,t,i){var n=i(5639);e.exports=function(){return n.Date.now()}},7557:function(e,t,i){var n=i(9932),o=i(5990),r=i(7406),s=i(1811),a=i(8363),l=i(696),c=i(9021),d=i(6904),h=c((function(e,t){var i={};if(null==e)return i;var c=!1;t=n(t,(function(t){return t=s(t,e),c||(c=t.length>1),t})),a(e,d(e),i),c&&(i=o(i,7,l));for(var h=t.length;h--;)r(i,t[h]);return i}));e.exports=h},8718:function(e,t,i){var n=i(5970),o=i(9021)((function(e,t){return null==e?{}:n(e,t)}));e.exports=o},5937:function(e,t,i){var n=i(9932),o=i(7206),r=i(3012),s=i(6904);e.exports=function(e,t){if(null==e)return{};var i=n(s(e),(function(e){return[e]}));return t=o(t),r(e,i,(function(e,i){return t(e,i[0])}))}},9601:function(e,t,i){var n=i(371),o=i(9152),r=i(5403),s=i(327);e.exports=function(e){return r(e)?n(s(e)):o(e)}},4061:function(e,t,i){var n=i(2663),o=i(4140),r=i(7206),s=i(107),a=i(1469);e.exports=function(e,t,i){var l=a(e)?n:s,c=arguments.length<3;return l(e,r(t,4),i,c,o)}},479:function(e){e.exports=function(){return[]}},5062:function(e){e.exports=function(){return!1}},8601:function(e,t,i){var n=i(4841);e.exports=function(e){return e?Infinity===(e=n(e))||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},554:function(e,t,i){var n=i(8601);e.exports=function(e){var t=n(e),i=t%1;return t==t?i?t-i:t:0}},4841:function(e,t,i){var n=i(7561),o=i(3218),r=i(3448),s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(r(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var i=a.test(e);return i||l.test(e)?c(e.slice(2),i?2:8):s.test(e)?NaN:+e}},9881:function(e,t,i){var n=i(8363),o=i(1704);e.exports=function(e){return n(e,o(e))}},9833:function(e,t,i){var n=i(531);e.exports=function(e){return null==e?"":n(e)}},690:function(e,t,i){var n=i(4963),o=i(9932),r=i(371),s=i(2545),a=i(9246),l=Math.max;e.exports=function(e){if(!e||!e.length)return[];var t=0;return e=n(e,(function(e){if(a(e))return t=l(e.length,t),!0})),s(t,(function(t){return o(e,r(t))}))}},1164:function(e,t,i){var n=i(6874),o=i(9932),r=i(690);e.exports=function(e,t){if(!e||!e.length)return[];var i=r(e);return null==t?i:o(i,(function(e){return n(t,void 0,e)}))}},2628:function(e,t,i){var n=i(7415),o=i(3674);e.exports=function(e){return null==e?[]:n(e,o(e))}},8111:function(e,t,i){var n=i(6425),o=i(2063),r=i(9435),s=i(1469),a=i(7005),l=i(1913),c=Object.prototype.hasOwnProperty;function d(e){if(a(e)&&!s(e)&&!(e instanceof n)){if(e instanceof o)return e;if(c.call(e,"__wrapped__"))return l(e)}return new o(e)}d.prototype=r.prototype,d.prototype.constructor=d,e.exports=d},5905:function(e,t,i){var n=i(5976),o=i(1164),r=n((function(e){var t=e.length,i=t>1?e[t-1]:void 0;return i="function"==typeof i?(e.pop(),i):void 0,o(e,i)}));e.exports=r},3585:function(e,t,i){"use strict";i.r(t),i.d(t,{conf:function(){return n},language:function(){return o}});var n={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{offSide:!0}},o={tokenPostfix:".yaml",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["true","True","TRUE","false","False","FALSE","null","Null","Null","~"],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/%[^ ]+.*$/,"meta.directive"],[/---/,"operators.directivesEnd"],[/\.{3}/,"operators.documentEnd"],[/[-?:](?= )/,"operators"],{include:"@anchor"},{include:"@tagHandle"},{include:"@flowCollections"},{include:"@blockStyle"},[/@numberInteger(?![ \t]*\S+)/,"number"],[/@numberFloat(?![ \t]*\S+)/,"number.float"],[/@numberOctal(?![ \t]*\S+)/,"number.octal"],[/@numberHex(?![ \t]*\S+)/,"number.hex"],[/@numberInfinity(?![ \t]*\S+)/,"number.infinity"],[/@numberNaN(?![ \t]*\S+)/,"number.nan"],[/@numberDate(?![ \t]*\S+)/,"number.date"],[/(".*?"|'.*?'|.*?)([ \t]*)(:)( |$)/,["type","white","operators","white"]],{include:"@flowScalars"},[/[^#]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],object:[{include:"@whitespace"},{include:"@comment"},[/\}/,"@brackets","@pop"],[/,/,"delimiter.comma"],[/:(?= )/,"operators"],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,"type"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\},]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],array:[{include:"@whitespace"},{include:"@comment"},[/\]/,"@brackets","@pop"],[/,/,"delimiter.comma"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\],]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],multiString:[[/^( +).+$/,"string","@multiStringContinued.$1"]],multiStringContinued:[[/^( *).+$/,{cases:{"$1==$S2":"string","@default":{token:"@rematch",next:"@popall"}}}]],whitespace:[[/[ \t\r\n]+/,"white"]],comment:[[/#.*$/,"comment"]],flowCollections:[[/\[/,"@brackets","@array"],[/\{/,"@brackets","@object"]],flowScalars:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'[^']*'/,"string"],[/"/,"string","@doubleQuotedString"]],doubleQuotedString:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],blockStyle:[[/[>|][0-9]*[+-]?$/,"operators","@multiString"]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,"number"],[/@numberFloat(?=[ \t]*[,\]\}])/,"number.float"],[/@numberOctal(?=[ \t]*[,\]\}])/,"number.octal"],[/@numberHex(?=[ \t]*[,\]\}])/,"number.hex"],[/@numberInfinity(?=[ \t]*[,\]\}])/,"number.infinity"],[/@numberNaN(?=[ \t]*[,\]\}])/,"number.nan"],[/@numberDate(?=[ \t]*[,\]\}])/,"number.date"]],tagHandle:[[/\![^ ]*/,"tag"]],anchor:[[/[&*][^ ]+/,"namespace"]]}}},3379:function(e){"use strict";var t=[];function i(e){for(var i=-1,n=0;n<t.length;n++)if(t[n].identifier===e){i=n;break}return i}function n(e,n){for(var r={},s=[],a=0;a<e.length;a++){var l=e[a],c=n.base?l[0]+n.base:l[0],d=r[c]||0,h="".concat(c," ").concat(d);r[c]=d+1;var u=i(h),g={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==u)t[u].references++,t[u].updater(g);else{var p=o(g,n);n.byIndex=a,t.splice(a,0,{identifier:h,updater:p,references:1})}s.push(h)}return s}function o(e,t){var i=t.domAPI(t);return i.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;i.update(e=t)}else i.remove()}}e.exports=function(e,o){var r=n(e=e||[],o=o||{});return function(e){e=e||[];for(var s=0;s<r.length;s++){var a=i(r[s]);t[a].references--}for(var l=n(e,o),c=0;c<r.length;c++){var d=i(r[c]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}r=l}}},569:function(e){"use strict";var t={};e.exports=function(e,i){var n=function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}t[e]=i}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(i)}},9216:function(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},3565:function(e,t,i){"use strict";e.exports=function(e){var t=i.nc;t&&e.setAttribute("nonce",t)}},7795:function(e){"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(i){!function(e,t,i){var n="";i.supports&&(n+="@supports (".concat(i.supports,") {")),i.media&&(n+="@media ".concat(i.media," {"));var o=void 0!==i.layer;o&&(n+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),n+=i.css,o&&(n+="}"),i.media&&(n+="}"),i.supports&&(n+="}");var r=i.sourceMap;r&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,i)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},4589:function(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},6535:function(e,t,i){var n=i(6912);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("72eb4fac",n,!1,{})},3288:function(e,t,i){var n=i(6642);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("8a7e716a",n,!1,{})},6365:function(e,t,i){var n=i(7606);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("60b7f2b6",n,!1,{})},4895:function(e,t,i){var n=i(2602);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("3d043c9c",n,!1,{})},7901:function(e,t,i){var n=i(9439);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("e3d046dc",n,!1,{})},8338:function(e,t,i){var n=i(4368);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("e8843cdc",n,!1,{})},5252:function(e,t,i){var n=i(6145);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("3f9726aa",n,!1,{})},1945:function(e,t,i){var n=i(5218);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("253cc546",n,!1,{})},4446:function(e,t,i){var n=i(1131);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("0af9f37d",n,!1,{})},1958:function(e,t,i){var n=i(3106);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("30f75bc2",n,!1,{})},5847:function(e,t,i){var n=i(8379);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("17568819",n,!1,{})},9008:function(e,t,i){var n=i(9894);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("0c504d2a",n,!1,{})},2718:function(e,t,i){var n=i(2997);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("4391b6f1",n,!1,{})},6899:function(e,t,i){var n=i(2574);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("50edeedf",n,!1,{})},8697:function(e,t,i){var n=i(3949);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("79646005",n,!1,{})},4541:function(e,t,i){var n=i(9227);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("1754b2cb",n,!1,{})},5348:function(e,t,i){var n=i(3203);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("b3ae42b4",n,!1,{})},9017:function(e,t,i){var n=i(9214);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("6fc96b21",n,!1,{})},5719:function(e,t,i){var n=i(2290);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("2e07bd7a",n,!1,{})},609:function(e,t,i){var n=i(102);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("3a6c68c3",n,!1,{})},3852:function(e,t,i){var n=i(2124);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("46df90ba",n,!1,{})},5393:function(e,t,i){var n=i(4798);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("09cbf949",n,!1,{})},7437:function(e,t,i){var n=i(6156);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("0f2d9635",n,!1,{})},8916:function(e,t,i){var n=i(8100);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("0d5ada94",n,!1,{})},5396:function(e,t,i){var n=i(2342);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("efa022c0",n,!1,{})},8197:function(e,t,i){var n=i(3582);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("ac850126",n,!1,{})},5190:function(e,t,i){var n=i(3658);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("3134bd64",n,!1,{})},6444:function(e,t,i){var n=i(7481);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("17aac043",n,!1,{})},8596:function(e,t,i){var n=i(1622);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("fc73d9d0",n,!1,{})},6950:function(e,t,i){var n=i(6083);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("84667c84",n,!1,{})},806:function(e,t,i){var n=i(2546);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("6ed2f298",n,!1,{})},9481:function(e,t,i){var n=i(1464);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("28f763c5",n,!1,{})},1313:function(e,t,i){var n=i(2178);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("af896f84",n,!1,{})},3020:function(e,t,i){var n=i(4403);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("89d7ff2a",n,!1,{})},2670:function(e,t,i){var n=i(2193);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("693e22a4",n,!1,{})},9105:function(e,t,i){var n=i(8357);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("78995a6c",n,!1,{})},9285:function(e,t,i){var n=i(9403);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("5d0af191",n,!1,{})},4315:function(e,t,i){var n=i(4508);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("1141a4eb",n,!1,{})},6715:function(e,t,i){var n=i(2364);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("15cafe36",n,!1,{})},4071:function(e,t,i){var n=i(38);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("2819dbc0",n,!1,{})},1332:function(e,t,i){var n=i(140);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("5613a238",n,!1,{})},3039:function(e,t,i){var n=i(4836);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("6d8211ee",n,!1,{})},1569:function(e,t,i){var n=i(2900);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("36f6877c",n,!1,{})},2942:function(e,t,i){var n=i(9171);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("4537f4b6",n,!1,{})},5634:function(e,t,i){var n=i(4062);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("e8869ab0",n,!1,{})},6253:function(e,t,i){var n=i(4974);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("2fbd308f",n,!1,{})},3098:function(e,t,i){var n=i(6692);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("c8e875a6",n,!1,{})},8738:function(e,t,i){var n=i(854);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("9aafab68",n,!1,{})},1107:function(e,t,i){var n=i(3612);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("1e86aad5",n,!1,{})},7369:function(e,t,i){var n=i(9202);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,i(2611).Z)("1a7914b5",n,!1,{})},2611:function(e,t,i){"use strict";function n(e,t){for(var i=[],n={},o=0;o<t.length;o++){var r=t[o],s=r[0],a={id:e+":"+o,css:r[1],media:r[2],sourceMap:r[3]};n[s]?n[s].parts.push(a):i.push(n[s]={id:s,parts:[a]})}return i}i.d(t,{Z:function(){return p}});var o="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!o)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var r={},s=o&&(document.head||document.getElementsByTagName("head")[0]),a=null,l=0,c=!1,d=function(){},h=null,u="data-vue-ssr-id",g="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function p(e,t,i,o){c=i,h=o||{};var s=n(e,t);return m(s),function(t){for(var i=[],o=0;o<s.length;o++){var a=s[o];(l=r[a.id]).refs--,i.push(l)}for(t?m(s=n(e,t)):s=[],o=0;o<i.length;o++){var l;if(0===(l=i[o]).refs){for(var c=0;c<l.parts.length;c++)l.parts[c]();delete r[l.id]}}}}function m(e){for(var t=0;t<e.length;t++){var i=e[t],n=r[i.id];if(n){n.refs++;for(var o=0;o<n.parts.length;o++)n.parts[o](i.parts[o]);for(;o<i.parts.length;o++)n.parts.push(_(i.parts[o]));n.parts.length>i.parts.length&&(n.parts.length=i.parts.length)}else{var s=[];for(o=0;o<i.parts.length;o++)s.push(_(i.parts[o]));r[i.id]={id:i.id,refs:1,parts:s}}}}function f(){var e=document.createElement("style");return e.type="text/css",s.appendChild(e),e}function _(e){var t,i,n=document.querySelector("style["+u+'~="'+e.id+'"]');if(n){if(c)return d;n.parentNode.removeChild(n)}if(g){var o=l++;n=a||(a=f()),t=w.bind(null,n,o,!1),i=w.bind(null,n,o,!0)}else n=f(),t=y.bind(null,n),i=function(){n.parentNode.removeChild(n)};return t(e),function(n){if(n){if(n.css===e.css&&n.media===e.media&&n.sourceMap===e.sourceMap)return;t(e=n)}else i()}}var v,b=(v=[],function(e,t){return v[e]=t,v.filter(Boolean).join("\n")});function w(e,t,i,n){var o=i?"":n.css;if(e.styleSheet)e.styleSheet.cssText=b(t,o);else{var r=document.createTextNode(o),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(r,s[t]):e.appendChild(r)}}function y(e,t){var i=t.css,n=t.media,o=t.sourceMap;if(n&&e.setAttribute("media",n),h.ssrId&&e.setAttribute(u,t.id),o&&(i+="\n/*# sourceURL="+o.sources[0]+" */",i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),e.styleSheet)e.styleSheet.cssText=i;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(i))}}}},t={};function i(n){var o=t[n];if(void 0!==o)return o.exports;var r=t[n]={id:n,loaded:!1,exports:{}};return e[n](r,r.exports,i),r.loaded=!0,r.exports}i.amdO={},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},i(4044)}();