�����JFIF��XX����������    $.' ",#(7),01444'9=82<.342  2!!22222222222222222222222222222222222222222222222222�����"����4���������������������������� ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������,�PG"Z_�4�˷����kjز�Z�,F+��_z�,�© �����zh6�٨�ic�fu������������������������������������#ډb���_�N��?�����������wQ���5-�~�I���8���������������������������������TK<5o�Iv-������������������k�_U_������������������������������~b�M��d��������Ӝ�U�Hh��?]��E�w��Q���k�{��_}qFW7HTՑ��Y��F�����?_�'ϔ��_�Ջt������������������������=||I �����6�έ"�����D���/[�k�9����Y�8������ds|\���Ҿp6�Ҵ���]��.����6���z<�v��@]�i%������������������������$j��~����g��J>��no����pM[me�i$[�����������s�o�ᘨ�˸ nɜG-�ĨU�ycP���3.DB�li�;���������������������hj���x����7Z^�N�h��������N3u{�:j�����x�힞��#M��&��jL P@��_���� P�������������������&��o8��������9������@Sz���6�t7#O�ߋ �����s}Yf�T������lmr����Z)'N��k�۞p�����w\�T���������������ȯ?�8`���O��i{wﭹW�[�r�� ��Q4F�׊������3m&L�=��h3�������z~��#����\�l :�F,j@�� ʱ�wQT����8�"kJO����6�֚l������������������}����R�>ډK���]��y����&����p�}b������;N�1�m�r$����|��7�>e�@���B�TM*-i�H��g�D�)� E�m�|�ؘbҗ�a���Ҿ����������������t4�����o���G��*oCN�rP���Q��@z,|?W[0���������:�n,j���WiE��W������$~/�hp\��?��{(�0���+�Y8rΟ�+����>S-S���������������VN;���}�s?.����� w��9��˟<���Mq4�Wv'������{)0�1mB����V����W[��������8�/<� �%���wT^�5���b��)iM� p�g�N�&ݝ������������VO~��q���u���9��� ����!��J27�����$����O-���! �:���%H��� ـ�������y�ΠM=t{!S�� �oK8�������t<����è��������:a��������[������ա�H���~��w��Qz`�p����o�^ ������Q��n����� �,uu�C��$ ^���,�������8�#��:�6��e�|~�����������!�3��3.�\0�����q��o�4`.|� ����y�Q�`~;�d�ׯ,��O�Zw�������`73�v�܋�<�����Ȏ�� ـ4k��5�K�a�u�=9Yd��$>x�A�&�� j0� ���vF��� Y���|�y��� ~�6�@c��1vOp��������Ig�����4��l�OD�����L����� R���c���j�_�uX�6��3?nk��Wy�f;^*B� ��@���~a�`��Eu�������+�����6�L��.ü>��}y���}_�O�6�͐�:�Yr���G�X��kG������l^w����������~㒶sy���Iu�!���� W ��X��N�7BV��O��!X�2����wvG�R�f�T#�����t�/?���%8�^�W�aT����G�cL�M���I��(J����1~�8�?aT ���]����AS�E��(��*E}� 2������#I/�׍qz��^t�̔���������b�Yz4x����t�){ OH�����+(E��A&�N�������XT��o��"�XC����'���)}�J�z�p� ����~5�}�^����+�6����w��c��Q�|�Lp�d�H��}�(�.|����k��c4^�����"�����Z?ȕ ��a<�������L�!0�39C� �Eu�����C�F�Ew�ç ;�n?�*o���B�8�bʝ���'#Rqf����M}7����]�������s2tcS{�\icTx;�\��7K���P������ʇ Z O-��~�������c>"��?��������P�����E��O�8��@�8��G��Q�g�a�Վ���󁶠��䧘��_%#r�>�����1�z�a���eb��qcP��ѵ��n���#L��� =��׀t� L�7�`�����V����A{�C:�g���e@�����w1 Xp�3�c3�ġ�������p��M"'-�@n4���fG���B3�DJ�8[Jo�ߐ���gK)ƛ��$���� �������8�3�����+���� �����6�ʻ���� ���S�kI�*KZlT _`�������?��K�����QK�d���������B`�s}�>���`������*�>��,*@J�d�oF*�����弝��O}�k��s��]��y�ߘ�������c1G�V���<=�7��7����6��q�PT��tXԀ�!9*4�4Tހ���3XΛex�46�������Y��D ����� ����BdemDa����\�_l,����G�/���֌7���Y�](�xTt^%�GE�����4�}bT����ڹ�����;��Y)���B�Q��u��>J/J ���⮶.�XԄ��j�ݳ������+E��d ���r�5�_D�����1 ���o�� �B�x�΢�#����<��W�����8���R6�@���g�M�.��� dr�D��>(otU��@�x=��~v���2� ӣ�d�oBd�����3�eO�6�㣷����������ݜ�6��6Y��Qz`����S��{���\P��~z m5{J/L��1������<�e�ͅPu���b�]�ϔ��������'�������f�b� Zpw��c`"��i���BD@:)ִ�:�]��h���v�E��w���T�l�������P����"Ju�}��وV ��J��G6��. J/�Qgl߭�e�����@�z�Zev2u����)]կ���������7x�������s�M�-<ɯ�c��r��v�����@��$�ޮ}lk���a����'����>x��O\�Z������Fu>������ck#��&:��`�$��ai�>2Δ����l���oF[h�������lE�ܺ�Π���k:)���`������� $[6�����9�����kOw�\|�����8}������ބ:��񶐕��������I�A1/���=�2[�,�!��.}gN#�u����b���� ~���������݊��}34q�����d�E��L��������c��$���"�[q�U�硬g^��%B ��z���r�p�������J�ru%v\h�����1Y�ne`������ǥ:g����pQM~�^��Xi� ��`S�:V2������9.�P���V������?B�k�� ��������AEvw%�_�9C�Q����wKekP�ؠ�\������;Io d�{ ߞo�c1eP�����\� `����E=���@K<�Y��������eڼ�J����w����{av�F�'�M�@��������������/J��+9p����|]���������Iw &`���8���&�M�hg���[�{�������Xj���%��Ӓ�������������������$��(�����ʹN�������<>�I���RY�����K2�NPlL�ɀ�)��&e��������B+ь����(������������������� � �JTx����_?EZ� }@���� 6�U���뙢ط�z��dWI��n` D����噥�[��uV��"�G&�����Ú����2�g�}&m���������������������?ċ���"����Om#�������������������������� ��{���������������������ON��"S�X���Ne��ysQ���@�������������Fn��Vg�����dX�~nj����������������������]J�<�K]:����FW���b�������62����������=��5f����JKw����bf�X������������������������55��~J �%^�������:�-�QIE��P��v�nZum� z � ~ə ���� ���ة����;�f��\v�������g�8�1��f2�������������������������4;�V���ǔ�)�������������������9���1\������������������������������c��v�/'Ƞ�w������������������$�4�R-��t����������������������������������� e�6�/�ġ �̕Ecy�J���u�B���<�W�ַ~�w[B1L۲�-JS΂�{���΃�������������������������������������������A��20�c#���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������@���� 0!1@AP"#2Q`$3V�%45a6�FRUq����� ������^7ׅ,$n��������+��F�`��2X'��0vM��p�L=�������5��8������u�p~���.�`r�����\����O��,ư�0oS ��_�M�����l���4�kv\JSd���x���SW�<��Ae�IX����������$I���w�:S���y���›R��9�Q[���,�5�;�@]�%���u�@ *ro�lbI �� ��+���%m:�͇ZV�����u�̉����θau<�fc�.����{�4Ա� �Q����*�Sm��8\ujqs]{kN���)qO�y�_*dJ�b�7���yQqI&9�ԌK!�M}�R�;�������S�T���1���i[U�ɵz�]��U)V�S6���3$K{��ߊ<�(� E]Զ[ǼENg�����'�\?#)Dkf��J���o��v���'�%ƞ�&K�u��!��b�35LX�Ϸ��63$K�a�;�9>,R��W��3�3� d�JeTYE.Mϧ��-�o�j3+y��y^�c�������VO�9NV\nd�1 ��!͕_)a�v;����թ�M�lWR1��)El��P;��yوÏ�u 3�k�5Pr6<�⒲l�!˞*��u־�n�!�l:����UNW ��%��Chx8vL'��X�@��*��)���̮��ˍ��� ����D-M�+J�U�kvK����+�x8��cY������?�Ԡ��~3mo��|�u@[XeY�C�\Kp�x8�oC�C�&����N�~3-H���� ��MX�s�u<`���~"WL��$8ξ��3���a�)|:@�m�\���^�`�@ҷ)�5p+��6���p�%i)P M���ngc�����#0Aruz���RL+xSS?���ʮ}()#�t��mˇ!��0}}y����<�e� �-ή�Ԩ��X������ MF���ԙ~l L.3���}�V뽺�v������멬��Nl�)�2����^�Iq��a��M��qG��T�����c3#������3U�Ǎ���}��לS�|qa��ڃ�+���-��2�f����/��bz��ڐ�� �ݼ[2�ç����k�X�2�* �Z�d���J�G����M*9W���s{��w���T��x��y,�in�O�v��]���n����P�$��JB@=4�OTI�n��e�22a\����q�d���%�$��(���:���: /*�K[PR�fr\nڙdN���F�n�$�4��[�� U�zƶ����� �mʋ���,�ao�u 3�z� �x��Kn����\[��VFmbE;�_U��&V�Gg�]L�۪&#n%�$ɯ��dG���D�TI=�%+AB�Ru#��b4�1�»x�cs�YzڙJG��f��Il���d�eF'T� iA��T���uC�$����Y��H?����[!G`}���ͪ� �纤Hv\������j�Ex�K���!���OiƸ�Yj�+u-<���'q����uN�*�r\��+�]���<�wOZ.fp�ێ��,-*)V?j-kÊ#�`�r��dV����(�ݽBk�����G�ƛk�QmUڗe��Z���f}|����8�8��a���i��3'J�����~G_�^���d�8w������ R�`(�~�.��u���l�s+g�bv���W���lGc}��u���afE~1�Ue������Z�0�8�=e�� f@/�jqEKQQ�J���oN��J���W5~M>$6�Lt�;$ʳ{���^��6�{����v6���ķܰg�V�cnn �~z�x�«�,2�u�?cE+Ș�H؎�%�Za�)���X>uW�Tz�Nyo����s���FQƤ��$��*�&�LLXL)�1�" L��eO��ɟ�9=���:t��Z���c��Ž���Y?�ӭV�wv�~,Y��r�ۗ�|�y��GaF�����C�����.�+� ���v1���fήJ�����]�S��T��B��n5sW}y�$��~z�'�c ��8 ��� ,! �p��VN�S��N�N�q��y8z˱�A��4��*��'������2n<�s���^ǧ˭P�Jޮɏ�U�G�L�J�*#��<�V��t7�8����TĜ>��i}K%,���)[��z�21z ?�N�i�n1?T�I�R#��m-�����������������1����lA�`��fT5+��ܐ�c�q՝��ʐ��,���3�f2U�եmab��#ŠdQ�y>\��)�SLY����w#��.���ʑ�f��� ,"+�w�~�N�'�c�O�3F�������N<���)j��&��,-� �љ���֊�_�zS���TǦ����w�>��?�������n��U仆�V���e�����0���$�C�d���rP �m�׈e�Xm�Vu� �L��.�bֹ��� �[Դaզ���*��\y�8�Է:�Ez\�0�Kq�C b��̘��cө���Q��=0Y��s�N��S.����3.���O�o:���#���v7�[#߫ ��5�܎�L���Er4���9n��COWlG�^��0k�%<���ZB���aB_���������'=��{i�v�l�$�uC���mƎҝ{�c㱼�y]���W�i ��ߧc��m�H� m�"�"�����;Y�ߝ�Z�Ǔ�����:S#��|}�y�,/k�Ld� TA�(�AI$+I3��;Y*���Z��}|��ӧO��d�v��..#:n��f>�>���ȶI�TX��� 8��y����"d�R�|�)0���=���n4��6ⲑ�+��r<�O�܂~zh�z����7ܓ�HH�Ga롏���nCo�>������a ���~]���R���̲c?�6(�q�;5%� |�uj�~z8R�=X��I�V=�|{v�Gj\gc��q����z�؋%M�ߍ����1y��#��@f^���^�>N������#x#۹��6�Y~�?�dfPO��{��P�4��V��u1E1J �*|���%����JN��`eWu�zk M6���q t[�� ��g�G���v��WIG��u_ft����5�j�"�Y�:T��ɐ���*�;� e5���4����q$C��2d�}���� _S�L#m�Yp��O�.�C�;��c����Hi#֩%+) �Ӎ��ƲV���SYź��g |���tj��3�8���r|���V��1#;.SQ�A[���S������#���`n�+���$��$�I �P\[�@�s��(�ED�z���P��])8�G#��0B��[ى��X�II�q<��9�~[Z멜�Z�⊔IWU&A>�P~�#��dp<�?����7���c��'~���5 ��+$���lx@�M�dm��n<=e�dyX��?{�|Aef ,|n3�<~z�ƃ�uۧ�����P��Y,�ӥQ�*g�#먙R�\���;T��i,��[9Qi歉����c>]9�� ��"�c��P�� �Md?٥��If�ت�u��k��/����F��9�c*9��Ǎ:�ØF���z�n*�@|I�ށ9����N3{'��[�'ͬ�Ҳ4��#}��!�V� Fu��,�,mTIk���v C�7v���B�6k�T9��1�*l� '~��ƞF��lU��'�M ����][ΩũJ_�{�i�I�n��$����L�� j��O�dx�����kza۪��#�E��Cl����x˘�o�����V���ɞ�ljr��)�/,�߬h�L��#��^��L�ф�,íMƁe�̩�NB�L�����iL����q�}��(��q��6IçJ$�W�E$��:������=#����(�K�B����zђ <��K(�N�۫K�w��^O{!����)��H���>x�������lx�?>Պ�+�>�W���,Ly!_�D���Ō�l���Q�!�[ �S����J��1��Ɛ�Y}��b,+�Lo�x�ɓ)����=�y�oh�@�꥟/��I��ѭ=��P�y9��� �ۍYӘ�e+�p�Jnϱ?V\SO%�(�t� ���=?MR�[Ș�����d�/ ��n�l��B�7j� ��!�;ӥ�/�[-���A�>��dN�sLj ��,ɪv��=1c�.SQ�O3�U���ƀ�ܽ�E����������̻��9G�ϷD�7(�}��Ävӌ\��y�_0[w ���<΍>����a_��[0+�L��F.�޺��f�>oN�T����q;���y\��bՃ��y�jH�<|q-eɏ�_?_9+P���Hp$�����[ux�K w�Mw��N�ی'$Y2�=��q���KB��P��~�������Yul:�[<����F1�2�O���5=d����]Y�sw:���Ϯ���E��j,_Q��X��z`H1,#II ��d�wr��P˂@�ZJV����y$�\y�{}��^~���[:N����ߌ�U�������O��d�����ؾe��${p>G��3c���Ė�lʌ�� ת��[��`ϱ�-W����dg�I��ig2��� ��}s ��ؤ(%#sS@���~���3�X�nRG�~\jc3�v��ӍL��M[JB�T��s3}��j�Nʖ��W����;7���ç?=X�F=-�=����q�ߚ���#���='�c��7���ڑW�I(O+=:uxq�������������e2�zi+�kuG�R��������0�&e�n���iT^J����~\jy���p'dtG��s����O��3����9* �b#Ɋ�� p������[Bws�T�>d4�ۧs���nv�n���U���_�~,�v����ƜJ1��s�� �QIz���)�(lv8M���U=�;����56��G���s#�K���MP�=��LvyGd��}�VwWBF�'�à �?MH�U�g2�� ����!�p�7Q��j��ڴ����=��j�u��� Jn�A s���uM������e��Ɔ�Ҕ�!)�'��8Ϣ�ٔ���ޝ(��Vp���צ֖d=�IC�J�Ǡ{q������kԭ�߸���i��@K����u�|�p=..�*+����x�����z[Aqġ#s2a�Ɗ���RR�)*HRsi�~�a &f��M��P����-K�L@��Z��Xy�'x�{}��Zm+���:�)�) IJ�-i�u���� ���ܒH��'��L(7�y�GӜq���� j��� 6ߌg1�g�o���,kر���tY�?W,���p���e���f�OQS��!K�۟cҒA�|ս�j�>��=⬒��˧L[�� �߿2JaB~R��u�:��Q�] �0H~���]�7��Ƽ�I���(�}��cq '�ήET���q�?f�ab���ӥvr� �)o��-Q��_'����ᴎo��K������;��V���o��%���~OK ����*��b�f:���-ťIR��`B�5!RB@���ï�� �u �̯e\�_U�_������� g�ES��3��������QT��a�����x����U<~�c?�*�#]�MW,[8O�a�x��]�1bC|踤�P��lw5V%�)�{t�<��d��5���0i�XSU��m:��Z�┵�i�"��1�^B�-��P�hJ��&)O��*�D��c�W��vM��)����}���P��ܗ-q����\mmζZ-l@�}��a��E�6��F�@��&Sg@���ݚ�M����� ȹ 4����#p�\H����dYDo�H���"��\��..R�B�H�z_�/5˘����6��KhJR��P�mƶi�m���3��,#c�co��q�a)*P�t����R�m�k�7x�D�E�\Y�閣_X�<���~�)���c[[�BP����6�Yq���S��0����%_����;��Àv�~�| VS؇ ��'O0��F0��\���U�-�d@�����7�SJ*z��3n��y��P����O����������m�~�P�3|Y��ʉr#�C�<�G~�.,! ���bqx���h~0=��!ǫ�jy����l��O,�[B��~��|9��ٱ����Xly�#�i�B��g%�S��������tˋ���e���ې��\[d�t)��.+u�|1 ������#�~Oj����hS�%��i.�~X���I�H�m��0n���c�1uE�q��cF�RF�o���7� �O�ꮧ� ���ۛ{��ʛi5�rw?׌#Qn�TW��~?y$��m\�\o����%W� ?=>S�N@�� �Ʈ���R����N�)�r"C�:��:����� �����#��qb��Y�. �6[��2K����2u�Ǧ�HYR��Q�MV��� �G�$��Q+.>�����nNH��q�^��� ����q��mM��V��D�+�-�#*�U�̒ ���p욳��u:�������IB���m����PV@O���r[b= �� ��1U�E��_Nm�yKbN�O���U�}�the�`�|6֮P>�\2�P�V���I�D�i�P�O;�9�r�mAHG�W�S]��J*�_�G��+kP�2����Ka�Z���H�'K�x�W�MZ%�O�YD�Rc+o��?�q��Ghm��d�S�oh�\�D�|:W������UA�Qc yT�q��������~^�H��/��#p�CZ���T�I�1�ӏT����4��"�ČZ�����}��`w�#�*,ʹ�� ��0�i��課�Om�*�da��^gJ݅{���l�e9uF#T�ֲ��̲�ٞC"�q���ߍ ոޑ�o#�XZTp����@ o�8��(jd��xw�]�,f���`~��|,s��^����f�1���t��|��m�򸄭/ctr��5s��7�9Q�4�H1꠲BB@�l9@���C�����+�wp�xu�£Yc�9��?`@#�o�mH�s2��)�=��2�.�l����jg�9$�Y�S�%*L������R�Y������7Z���,*=�䷘$�������arm�o�ϰ���UW.|�r�uf����IGw�t����Zwo��~5 ��YյhO+=8fF�)�W�7�L9lM�̘·Y���֘YLf�큹�pRF���99.A �"wz��=E\Z���'a� 2��Ǚ�#;�'}�G���*��l��^"q��+2FQ� hj��kŦ��${���ޮ-�T�٭cf�|�3#~�RJ����t��$b�(R��(����r���dx� >U b�&9,>���%E\� Ά�e�$��'�q't��*�א���ެ�b��-|d���SB�O�O��$�R+�H�)�܎�K��1m`;�J�2�Y~9��O�g8=vqD`K[�F)k�[���1m޼c��n���]s�k�z$@��)!I �x՝"v��9=�ZA=`Ɠi �:�E��)`�7��vI��}d�YI�_ �o�:ob���o ���3Q��&D&�2=�� �Ά��;>�h����y.*ⅥS������Ӭ�+q&����j|UƧ�����}���J0��WW< ۋS�)jQR�j���Ư��rN)�Gű�4Ѷ(�S)Ǣ�8��i��W52���No˓� ۍ%�5brOn�L�;�n��\G����=�^U�dI���8$�&���h��'���+�(������cȁ߫k�l��S^���cƗjԌE�ꭔ��gF���Ȓ��@���}O���*;e�v�WV���YJ\�]X'5��ղ�k�F��b 6R�o՜m��i N�i�����>J����?��lPm�U��}>_Z&�KK��q�r��I�D�Չ~�q�3fL�:S�e>���E���-G���{L�6p�e,8��������QI��h��a�Xa��U�A'���ʂ���s�+טIjP�-��y�8ۈZ?J$��W�P� ��R�s�]��|�l(�ԓ��sƊi��o(��S0���Y� 8�T97.�����WiL��c�~�dxc�E|�2!�X�K�Ƙਫ਼�$((�6�~|d9u+�qd�^3�89��Y�6L�.I�����?���iI�q���9�)O/뚅����O���X��X�V��ZF[�یgQ�L��K1���RҖr@v�#��X�l��F���Нy�S�8�7�kF!A��sM���^rkp�jP�DyS$N���q���nxҍ!U�f�!eh�i�2�m����`�Y�I�9r�6� �TF���C}/�y�^���Η���5d�'��9A-��J��>{�_l+�`��A���[�'��յ�ϛ#w:݅�%��X�}�&�PSt�Q�"�-��\縵�/����$Ɨh�Xb�*�y��BS����;W�ջ_mc�����vt?2}1�;qS�d�d~u:2k5�2�R�~�z+|HE!)�Ǟl��7`��0�<�,�2*���Hl-��x�^����'_TV�gZA�'j� ^�2Ϊ��N7t�����?w�� �x1��f��Iz�C-Ȗ��K�^q�;���-W�DvT�7��8�Z�������� hK�(P:��Q- �8�n�Z���܃e貾�<�1�YT<�,�����"�6{�/ �?�͟��|1�:�#g��W�>$����d��J��d�B���=��jf[��%rE^��il:��B���x���Sּ�1հ��,�=��*�7 fcG��#q� �eh?��2�7�����,�!7x��6�n�LC�4x��},Geǝ�tC.��vS �F�43��zz\��;QYC,6����~;RYS/6���|2���5���v��T��i����������mlv��������&� �nRh^ejR�LG�f���? �ۉҬܦƩ��|��Ȱ����>3����!v��i�ʯ�>�v��オ�X3e���_1z�Kȗ\<������!�8���V��]��?b�k41�Re��T�q��mz��TiOʦ�Z��Xq���L������q"+���2ۨ��8}�&N7XU7Ap�d�X��~�׿��&4e�o�F��� �H�����O���č�c�� 懴�6���͉��+)��v;j��ݷ�� �UV�� i��� j���Y9GdÒJ1��詞�����V?h��l�����l�cGs�ځ�������y�Ac������\V3�? �� ܙg�>qH�S,�E�W�[�㺨�uch�⍸�O�}���a��>�q�6�n6�����N6�q��������N� ���! 1AQaq�0@����"2BRb�#Pr���3C`��Scst���$4D���%Td���� ?�����N����a��3��m���C���w��������xA�m�q�m����m������$����4n淿t'��C"w��zU=D�\R+w�p+Y�T�&�պ@��ƃ��3ޯ?�Aﶂ��aŘ���@-�����Q�=���9D��ռ�ѻ@��M�V��P��܅�G5�f�Y<�u=,EC)�<�Fy'�"�&�չ�X~f��l�KԆV��?�� �W�N����=(� �;���{�r����ٌ�Y���h{�١������jW����P���Tc�����X�K�r��}���w�R��%��?���E��m�� �Y�q|����\lEE4����r���}�lsI�Y������f�$�=�d�yO����p�����yBj8jU�o�/�S��?�U��*������ˍ�0�������u�q�m [�?f����a�� )Q�>����6#������� ?����0UQ����,IX���(6ڵ[�DI�MNލ�c&���υ�j\��X�R|,4��� j������T�hA�e��^���d���b<����n�� �즇�=!���3�^�`j�h�ȓr��jẕ�c�,ٞX����-����a�ﶔ���#�$��]w�O��Ӫ�1y%��L�Y<�wg#�ǝ�̗`�x�xa�t�w��»1���o7o5��>�m뭛C���Uƃߜ}�C���y1Xνm�F8�jI���]����H���ۺиE@I�i;r�8ӭ�����V�F�Շ| ��&?�3|x�B�MuS�Ge�=Ӕ�#BE5G������Y!z��_e��q�р/W>|-�Ci߇�t�1ޯќd�R3�u��g�=0 5��[?�#͏��q�cf���H��{ ?u�=?�?ǯ���}Z��z���hmΔ�BFTW�����<�q��(v� ��!��z���iW]*�J�V�z��gX֧A�q�&��/w���u�gYӘa���; �i=����g:��?2�dž6�ى�k�4�>�Pxs����}������G�9���3 ���)gG�R<>r h�$��'nc�h�P��Bj��J�ҧH� -��N1���N��?��~��}-q!=��_2hc�M��l�vY%UE�@|�v����M2�.Y[|y�"Eï��K�ZF,�ɯ?,q�?v�M 80jx�"�;�9vk�����+ ֧�� �ȺU��?�%�vcV��mA�6��Qg^M�����A}�3�nl� QRN�l8�kkn�'�����(��M�7m9و�q���%ޟ���*h$Zk"��$�9��: �?U8�Sl��,,|ɒ��xH(ѷ����Gn�/Q�4�P��G�%��Ա8�N��!� �&�7�;���eKM7�4��9R/%����l�c>�x;������>��C�:�����t��h?aKX�bhe�ᜋ^�$�Iհ �hr7%F$�E��Fd���t��5���+�(M6�t����Ü�UU|zW�=a�Ts�Tg������dqP�Q����b'�m���1{|Y����X�N��b �P~��F^F:����k6�"�j!�� �I�r�`��1&�-$�Bevk:y���#y�w��I0��x��=D�4��tU���P�ZH��ڠ底taP��6����b>�xa�����Q�#� WeF��ŮNj�p�J* mQ�N�����*I�-*�ȩ�F�g�3 �5��V�ʊ�ɮ�a��5F���O@{���NX��?����H�]3��1�Ri_u��������ѕ�� ����0��� F��~��:60�p�͈�S��qX#a�5>���`�o&+�<2�D����: �������ڝ�$�nP���*)�N�|y�Ej�F�5ټ�e���ihy�Z �>���k�bH�a�v��h�-#���!�Po=@k̆IEN��@��}Ll?j�O������߭�ʞ���Q|A07x���wt!xf���I2?Z��<ץ�T���cU�j��]���陎Ltl �}5�ϓ��$�,��O�mˊ�;�@O��jE��j(�ا,��LX���LO���Ц�90�O �.����a��nA���7������j4 ��W��_ٓ���zW�jcB������y՗+EM�)d���N�g6�y1_x��p�$Lv�:��9�"z��p���ʙ$��^��JԼ*�ϭ����o���=x�Lj�6�J��u82�A�H�3$�ٕ@�=Vv�]�'�qEz�;I˼��)��=��ɯ���x �/�W(V���p�����$ �m�������u�����񶤑Oqˎ�T����r��㠚x�sr�GC��byp�G��1ߠ�w e�8�$⿄����/�M{*}��W�]˷.�CK\�ުx���/$�WP�w���r� |i���&�}�{�X� �>��$-��l���?-z���g����lΆ���(F���h�vS*���b���߲ڡn,|)mrH[���a�3�ר�[1��3o_�U�3�TC�$��(�=�)0�kgP���� ��u�^=��4 �WYCҸ:��vQ�ר�X�à��tk�m,�t*��^�,�}D*�� �"(�I��9R����>`�`��[~Q]�#af��i6l��8���6�:,s�s�N6�j"�A4���IuQ��6E,�GnH��zS�HO�uk�5$�I�4��ؤ�Q9�@��C����wp��BGv[]�u�Ov����0I4���\��y�����Q�Ѹ��~>Z��8�T��a��q�ޣ;z��a���/��S��I:�ܫ_�|������>=Z����8:�S��U�I�J��"IY���8%b8���H��:�QO�6�;7�I�S��J��ҌAά3��>c���E+&jf$eC+�z�;��V����� �r���ʺ������my�e���aQ�f&��6�ND���.:��NT�vm�<- u���ǝ\MvZY�N�NT��-A�>jr!S��n�O 1�3�Ns�%�3D@���`������ܟ 1�^c<���� �a�ɽ�̲�Xë#�w�|y�cW�=�9I*H8�p�^(4���՗�k��arOcW�tO�\�ƍR��8����'�K���I�Q�����?5�>[�}��yU�ײ -h��=��% q�ThG�2�)���"ו3]�!kB��*p�FDl�A���,�eEi�H�f�Ps�����5�H:�Փ~�H�0Dت�D�I����h�F3�������c��2���E��9�H��5�zԑ�ʚ�i�X�=:m�xg�hd(�v����׊�9iS��O��d@0ڽ���:�p�5�h-��t�&���X�q�ӕ,��ie�|���7A�2���O%P��E��htj��Y1��w�Ѓ!����  ���� ࢽ��My�7�\�a�@�ţ�J ��4�Ȼ�F�@o�̒?4�wx��)��]�P��~�����u�����5�����7X ��9��^ܩ�U;Iꭆ 5 �������eK2�7(�{|��Y׎ �V��\"���Z�1� Z�����}��(�Ǝ"�1S���_�vE30>���p;� ΝD��%x�W�?W?v����o�^V�i�d��r[��/&>�~`�9Wh��y�;���R���� ;;ɮT��?����r$�g1�K����A��C��c��K��l:�'��3 c�ﳯ*"t8�~l��)���m��+U,z��`(��>yJ�?����h>��]��v��ЍG*�{`��;y]��I�T� ;c��NU�fo¾h���/$���|NS���1�S�"�H��V���T���4��uhǜ�]�v;���5�͠x��'C\�SBpl���h}�N����� A�Bx���%��ޭ�l��/����T��w�ʽ]D�=����K���ž�r㻠l4�S�O?=�k �M:� ��c�C�a�#ha���)�ѐxc�s���gP�iG���{+���x���Q���I= �� z��ԫ+ �8"�k�ñ�j=|����c ��y��CF��/���*9ж�h{ �?4�o� ��k�m�Q�N�x��;�Y��4膚�a�w?�6�>�e]�����Q�r�:����g�,i"�����ԩA��*M�<�G��b�if��l^M��5�� �Ҩ�{����6J��ZJ�����P�*�����Y���ݛu�_4�9�I8�7���������,^ToR���m4�H��?�N�S�ѕw��/S��甍�@�9H�S�T��t�ƻ���ʒU��*{Xs�@����f������֒Li�K{H�w^���������Ϥm�tq���s� ���ք��f:��o~s��g�r��ט� �S�ѱC�e]�x���a��) ���(b-$(�j>�7q�B?ӕ�F��hV25r[7 Y� }L�R��}����*sg+��x�r�2�U=�*'WS��ZDW]�WǞ�<��叓���{�$�9Ou4��y�90-�1�'*D`�c�^o?(�9��u���ݐ��'PI&� f�Jݮ�������:wS����jfP1F:X �H�9dԯ����˝[�_54 �}*;@�ܨ�� ð�yn�T���?�ןd�#���4rG�ͨ��H�1�|-#���Mr�S3��G�3�����)�.᧏3v�z֑��r����$G"�`j �1t��x0<Ɔ�Wh6�y�6��,œ�Ga��gA����y��b��)���h�D��ß�_�m��ü �gG;��e�v��ݝ�nQ� ��C����-�*��o���y�a��M��I�>�<���]obD��"�:���G�A��-\%LT�8���c�)��+y76���o�Q�#*{�(F�⽕�y����=���rW�\p���۩�c���A���^e6��K������ʐ�cVf5$�'->���ՉN"���F�"�UQ@�f��Gb~��#�&�M=��8�ט�JNu9��D��[̤�s�o�~������� G��9T�tW^g5y$b��Y'��س�Ǵ�=��U-2 #�MC�t(�i� �lj�@Q 5�̣i�*�O����s�x�K�f��}\��M{E�V�{�υ��Ƈ�����);�H����I��fe�Lȣr�2��>��W��I�Ȃ6������i��k�� �5�YOxȺ����>��Y�f5'��|��H+��98pj�n�.O�y�������jY��~��i�w'������l�;�s�2��Y��:'lg�ꥴ)o#'Sa�a�K��Z� �m��}�`169�n���"���x��I ��*+� }F<��cГ���F�P�������ֹ*�PqX�x۩��,� ��N�� �4<-����%����:��7����W���u�`����� $�?�I��&����o��o��`v�>��P��"��l���4��5'�Z�gE���8���?��[�X�7(��.Q�-��*���ތL@̲����v��.5���[��=�t\+�CNܛ��,g�SQnH����}*F�G16���&:�t��4ُ"A��̣��$�b �|����#rs��a�����T�� ]�<�j��B�S�('$�ɻ� �wP;�/�n��?�ݜ��x�F��yUn�~mL*-�������Xf�wd^�a�}��f�,=t�׵i�.2/wpN�Ep8�OР���•��R�FJ� 55TZ��T �ɭ�<��]��/�0�r�@�f��V��V����Nz�G��^���7hZi����k��3�,kN�e|�vg�1{9]_i��X5y7� 8e]�U����'�-2,���e"����]ot�I��Y_��n�(JҼ��1�O ]bXc���Nu�No��pS���Q_���_�?i�~�x h5d'�(qw52] ��'ޤ�q��o1�R!���`ywy�A4u���h<קy���\[~�4�\ X�Wt/� 6�����n�F�a8��f���z �3$�t(���q��q�x��^�XWeN'p<-v�!�{�(>ӽDP7��ո0�y)�e$ٕv�Ih'Q�EA�m*�H��RI��=:��� ���4牢) �%_iN�ݧ�l]� �Nt���G��H�L��� ɱ�g<���1V�,�J~�ٹ�"K��Q�� 9�HS�9�?@��k����r�;we݁�]I�!{ �@�G�[�"��`���J:�n]�{�cA�E����V��ʆ���#��U9�6����j�#Y�m\��q�e4h�B�7��C�������d<�?J����1g:ٳ���=Y���D�p�ц� ׈ǔ��1�]26؜oS�'��9�V�FVu�P�h�9�xc�oq�X��p�o�5��Ա5$�9W�V(�[Ak�aY錎qf;�'�[�|���b�6�Ck��)��#a#a˙��8���=äh�4��2��C��4tm^ �n'c����]GQ$[Wҿ��i���vN�{Fu ��1�gx��1┷���N�m��{j-,��x�� Ūm�ЧS�[�s���Gna���䑴�� x�p 8<������97�Q���ϴ�v�aϚG��Rt�Һ׈�f^\r��WH�JU�7Z���y)�vg=����n��4�_)y��D'y�6�]�c�5̪��\� �PF�k����&�c;��cq�$~T�7j ���nç]�<�g ":�to�t}�159�<�/�8������m�b�K#g'I'.W������6��I/��>v��\�MN��g���m�A�yQL�4u�Lj�j9��#44�t��l^�}L����n��R��!��t��±]��r��h6ٍ>�yҏ�N��fU�� ���� Fm@�8}�/u��jb9������he:A�y�ծw��GpΧh�5����l}�3p468��)U��d��c����;Us/�֔�YX�1�O2��uq�s��`hwg�r~�{ R��mhN��؎*q 42�*th��>�#���E����#��Hv�O����q�}������6�e��\�,Wk�#���X��b>��p}�դ��3���T5��†��6��[��@��P�y*n��|'f�֧>�lư΂�̺����SU�'*�q�p�_S�����M�� '��c�6������m�� ySʨ;M��r���Ƌ�m�Kxo,���Gm�P��A�G�:��i��w�9�}M(�^�V��$ǒ�ѽ�9���|���� �a����J�SQ�a���r�B;����}���ٻ֢�2�%U���c�#�g���N�a�ݕ�'�v�[�OY'��3L�3�;,p�]@�S��{ls��X�'���c�jw��k'a�.��}�}&�� �dP�*�bK=ɍ!����;3n�gΊU�ߴmt�'*{,=SzfD� A��ko~�G�aoq�_mi}#�m�������P�Xhύ�����mxǍ�΂���巿zf��Q���c���|kc�����?���W��Y�$���_Lv����l߶��c���`?����l�j�ݲˏ!V��6����U�Ђ(A���4y)H���p�Z_�x��>���e���R��$�/�`^'3qˏ�-&Q�=?��CFVR �D�fV�9��{�8g�������n�h�(P"��6�[�D���< E�����~0<@�`�G�6����Hг�cc�� �c�K.5��D��d�B���`?�XQ��2��ٿyqo&+�1^� DW�0�ꊩ���G�#��Q�nL3��c���������/��x ��1�1�[y�x�პCW��C�c�UĨ80�m�e�4.{�m��u���I=��f�����0QRls9���f���������9���~f�����Ǩ��a�"@�8���ȁ�Q����#c�ic������G��$���G���r/$W�(��W���V�"��m�7�[m�A�m����bo��D� j����۳� l���^�k�h׽����� ��#� iXn�v��eT�k�a�^Y�4�BN���ĕ���0������� !01@Q"2AaPq3BR�������?�����@4�Q�����T3,���㺠�W�[=JK�Ϟ���2�r^7��vc�:�9 �E�ߴ�w�S#d���Ix��u��:��Hp��9E!�� V 2;73|F��9Y���*ʬ�F��D����u&���y؟��^EA��A��(ɩ���^��GV:ݜDy�`��Jr29ܾ�㝉��[���E;Fzx��YG��U�e�Y�C���� ����v-tx����I�sם�Ę�q��Eb�+P\ :>�i�C'�;�����k|z�رn�y]�#ǿb��Q��������w�����(�r|ӹs��[�D��2v-%��@;�8<a���[\o[ϧw��I!��*0�krs)�[�J9^��ʜ��p1)� "��/_>��o��<1����A�E�y^�C��`�x1'ܣn�p��s`l���fQ��):�l����b>�Me�jH^?�kl3(�z:���1ŠK&?Q�~�{�ٺ�h�y���/�[��V�|6��}�KbX����mn[-��7�5q�94�������dm���c^���h� X��5��<�eޘ>G���-�}�دB�ޟ� ��|�rt�M��V+�]�c?�-#ڛ��^ǂ}���Lkr���O��u�>�-D�ry� D?:ޞ�U��ǜ�7�V��?瓮�"�#���r��չģVR;�n���/_� ؉v�ݶe5d�b9��/O��009�G���5n�W����JpA�*�r9�>�1��.[t���s�F���nQ� V 77R�]�ɫ8����_0<՜�IF�u(v��4��F�k�3��E)��N:��yڮe��P�`�1}�$WS��J�SQ�N�j��ٺ��޵�#l���ј(�5=��5�lǏmoW�v-�1����v,W�mn��߀$x�<����v�j(����c]��@#��1������Ǔ���o'��u+����;G�#�޸��v-lη��/(`i⣍Pm^����ԯ̾9Z��F��������n��1��� ��]�[��)�'�������:�֪�W��FC����� �B9،!?���]��V��A�Վ�M��b�w��G F>_DȬ0¤�#�QR�[V��kz���m�w�"��9ZG�7'[��=�Q����j8R?�zf�\a�=��O�U����*oB�A�|G���2�54 �p��.w7� �� ���&������ξxGHp� B%��$g�����t�Џ򤵍z���HN�u�Я�-�'4��0���;_���3������� !01"@AQa2Pq#3BR�������?����ʩca��en��^��8���<�u#��m*08r��y�N"�<�Ѳ0��@\�p��� �����Kv�D��J8�Fҽ� �f�Y��-m�ybX�NP����}�!*8t(�OqѢ��Q�wW�K��ZD��Δ^e��!� ��B�K��p~�����e*l}z#9ң�k���q#�Ft�o��S�R����-�w�!�S���Ӥß|M�l޶V��!eˈ�8Y���c�ЮM2��tk���� ������J�fS����Ö*i/2�����n]�k�\���|4yX�8��U�P.���Ы[���l��@"�t�<������5�lF���vU�����W��W��;�b�cД^6[#7@vU�xgZv��F�6��Q,K�v��� �+Ъ��n��Ǣ��Ft���8��0��c�@�!�Zq s�v�t�;#](B��-�nῃ~���3g������5�J�%���O������n�kB�ĺ�.r��+���#�N$?�q�/�s�6��p��a����a��J/��M�8��6�ܰ"�*������ɗud"\w���aT(����[��F��U՛����RT�b���n�*��6���O��SJ�.�ij<�v�MT��R\c��5l�sZB>F��<7�;EA��{��E���Ö��1U/�#��d1�a�n.1ě����0�ʾR�h��|�R��Ao�3�m3 ��%�� ���28Q�� ��y��φ���H�To�7�lW>����#i`�q���c����a��� �m,B�-j����݋�'mR1Ήt�>��V��p���s�0IbI�C.���1R�ea�����]H�6�����������4B>��o��](��$B���m�����a�!=���?�B� K�Ǿ+�Ծ"�n���K��*��+��[T#�{�E�J�S����Q�����s�5�:�U�\wĐ�f�3����܆&�)�����I���Ԇw��E T�lrTf6Q|R�h:��[K�� �z��c֧�G�C��%\��_�a��84��HcO�bi��ؖV��7H �)*ģK~Xhչ0��4?�0��� �E<���}3���#���u�?�� ��|g�S�6ꊤ�|�I#Hڛ� �ա��w�X��9��7���Ŀ%�SL��y6č��|�F�a 8���b���$�sק�h���b9RAu7�˨p�Č�_\*w��묦��F ����4D~�f����|(�"m���NK��i�S�>�$d7SlA��/�²����SL��|6N�}���S�˯���g��]6��; �#�.��<���q'Q�1|KQ$�����񛩶"�$r�b:���N8�w@��8$�� �AjfG|~�9F ���Y��ʺ��Bwؒ������M:I岎�G��`s�YV5����6��A �b:�W���G�q%l�����F��H���7�������Fsv7���k�� 403WebShell
403Webshell
Server IP : 103.30.72.248  /  Your IP : 216.73.216.144
Web Server : Microsoft-IIS/10.0
System : Windows NT WIN-CARKG80MF9A 10.0 build 17763 (Windows Server 2019) AMD64
User : IUSR ( 0)
PHP Version : 8.2.7
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Program Files/Azure Data Studio/resources/app/out/vs/code/electron-main/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Program Files/Azure Data Studio/resources/app/out/vs/code/electron-main/main.js
/*!--------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/(function(){var Z=["require","exports","vs/base/common/lifecycle","vs/base/common/event","vs/base/common/platform","vs/platform/log/common/log","vs/platform/instantiation/common/instantiation","vs/base/common/uri","vs/base/common/async","vs/nls!vs/code/electron-main/main","vs/base/common/path","vs/nls","vs/base/common/types","vs/base/common/errors","electron","vs/base/common/network","vs/platform/files/common/files","vs/base/common/buffer","vs/platform/configuration/common/configuration","vs/base/common/resources","vs/platform/lifecycle/electron-main/lifecycleMainService","vs/base/node/pfs","vs/platform/product/common/productService","vs/base/common/cancellation","vs/base/common/arrays","vs/platform/telemetry/common/telemetry","vs/base/common/strings","os","vs/platform/environment/electron-main/environmentMainService","vs/platform/windows/electron-main/windows","vs/platform/workspace/common/workspace","vs/base/common/uuid","vs/base/common/extpath","vs/platform/environment/common/environment","vs/platform/state/node/state","vs/base/common/map","vs/base/common/process","vs/base/common/objects","vs/base/parts/ipc/electron-main/ipcMain","vs/platform/policy/common/policy","vs/platform/uriIdentity/common/uriIdentity","vs/platform/userDataProfile/common/userDataProfile","vs/base/parts/ipc/common/ipc","vs/platform/registry/common/platform","vs/base/common/json","fs","vs/base/common/labels","child_process","vs/platform/update/common/update","vs/base/common/functional","vs/base/common/errorMessage","vs/platform/request/common/request","vs/platform/telemetry/common/telemetryUtils","vs/platform/userDataProfile/electron-main/userDataProfile","vs/platform/workspaces/electron-main/workspacesManagementMainService","vs/base/common/decorators","vs/base/common/stream","vs/base/common/hash","vs/base/common/ternarySearchTree","vs/platform/configuration/common/configurationRegistry","vs/platform/remote/common/remoteHosts","vs/platform/dialogs/electron-main/dialogMainService","vs/platform/utilityProcess/electron-main/utilityProcess","vs/platform/environment/node/argvHelper","vs/platform/backup/electron-main/backup","vs/base/common/performance","vs/platform/log/electron-main/loggerService","vs/platform/product/common/product","vs/platform/native/electron-main/nativeHostMainService","vs/base/common/iterator","vs/base/common/stopwatch","vs/base/common/severity","vs/base/common/codicons","crypto","vs/base/common/processes","vs/base/common/marshalling","vs/platform/instantiation/common/descriptors","vs/platform/credentials/common/credentials","vs/platform/files/common/watcher","vs/platform/protocol/electron-main/protocol","vs/platform/theme/electron-main/themeMainService","vs/platform/window/common/window","vs/platform/extensionManagement/common/extensionsProfileScannerService","vs/platform/storage/electron-main/storageMainService","vs/platform/workspaces/electron-main/workspacesHistoryMainService","vs/base/common/lazy","vs/base/common/normalization","vs/base/node/id","net","sql/base/common/locConstants","vs/base/node/processes","vs/platform/environment/node/environmentService","vs/platform/diagnostics/common/diagnostics","vs/platform/dialogs/common/dialogs","vs/platform/instantiation/common/serviceCollection","vs/platform/files/node/diskFileSystemProvider","vs/platform/shell/node/shellEnv","vs/platform/sign/common/sign","vs/platform/storage/common/storage","vs/platform/workspaces/common/workspaces","vs/platform/workspaces/node/workspaces","vs/base/parts/ipc/node/ipc.net","vs/platform/update/electron-main/abstractUpdateService","vs/base/common/linkedList","vs/base/common/themables","vs/base/node/ports","vs/base/common/glob","vs/base/node/extpath","vs/base/node/powershell","vs/base/node/ps","vs/base/node/shell","vs/base/parts/ipc/common/ipc.net","vs/base/parts/ipc/electron-main/ipc.mp","vs/base/parts/storage/common/storage","vs/platform/environment/node/argv","path","vs/platform/contextkey/common/contextkey","vs/platform/encryption/common/encryptionService","vs/platform/extensionManagement/common/extensionManagement","vs/platform/externalTerminal/common/externalTerminal","vs/platform/files/common/io","vs/platform/configuration/common/configurationModels","vs/platform/extensions/common/extensions","vs/platform/state/node/stateService","vs/platform/telemetry/common/commonProperties","vs/platform/extensionManagement/common/extensionManagementUtil","vs/platform/terminal/common/environmentVariable","vs/platform/terminal/common/terminal","vs/platform/tunnel/common/tunnel","vs/platform/url/common/url","vs/platform/window/electron-main/window","vs/platform/extensionManagement/common/extensionsScannerService","vs/platform/windows/electron-main/windowsFinder","vs/base/node/unc","vs/platform/diagnostics/electron-main/diagnosticsMainService","vs/base/common/color","vs/base/common/assert","vs/base/common/jsonFormatter","vs/base/common/jsonEdit","vs/base/common/numbers","vs/base/common/skipList","vs/base/common/cache","vs/base/common/symbols","vs/base/node/crypto","vs/base/node/macAddress","vs/base/parts/contextmenu/common/contextmenu","vs/base/parts/ipc/common/ipc.electron","vs/base/parts/contextmenu/electron-main/contextmenu","vs/nls!sql/base/common/locConstants","vs/nls!vs/base/common/date","vs/base/common/date","vs/nls!vs/base/common/errorMessage","vs/nls!vs/base/common/jsonErrorMessages","vs/base/common/jsonErrorMessages","vs/nls!vs/base/common/platform","vs/base/common/console","vs/base/common/uriIpc","util","vs/base/parts/ipc/common/ipc.mp","vs/base/parts/ipc/electron-main/ipc.electron","vs/base/parts/ipc/node/ipc.cp","vs/base/parts/storage/node/storage","vs/nls!vs/code/electron-main/app","vs/nls!vs/platform/configuration/common/configurationRegistry","vs/nls!vs/platform/contextkey/common/contextkey","vs/nls!vs/platform/contextkey/common/scanner","vs/nls!vs/platform/dialogs/common/dialogs","vs/nls!vs/platform/dialogs/electron-main/dialogMainService","vs/nls!vs/platform/environment/node/argv","vs/nls!vs/platform/environment/node/argvHelper","vs/nls!vs/platform/extensionManagement/common/extensionManagement","vs/nls!vs/platform/extensionManagement/common/extensionNls","vs/nls!vs/platform/extensionManagement/common/extensionsScannerService","vs/nls!vs/platform/extensions/common/extensionValidator","vs/nls!vs/platform/externalTerminal/node/externalTerminalService","vs/nls!vs/platform/files/common/fileService","vs/nls!vs/platform/files/common/files","vs/nls!vs/platform/files/common/io","vs/nls!vs/platform/files/electron-main/diskFileSystemProviderServer","vs/nls!vs/platform/files/node/diskFileSystemProvider","vs/nls!vs/platform/issue/electron-main/issueMainService","vs/nls!vs/platform/menubar/electron-main/menubar","vs/nls!vs/platform/native/electron-main/nativeHostMainService","vs/nls!vs/platform/request/common/request","vs/nls!vs/platform/shell/node/shellEnv","vs/nls!vs/platform/telemetry/common/telemetryService","vs/nls!vs/platform/terminal/common/terminalPlatformConfiguration","vs/nls!vs/platform/terminal/common/terminalProfiles","vs/nls!vs/platform/update/common/update.config.contribution","vs/nls!vs/platform/userDataProfile/common/userDataProfile","vs/nls!vs/platform/windows/electron-main/windowImpl","vs/nls!vs/platform/windows/electron-main/windowsMainService","vs/nls!vs/platform/workspace/common/workspace","vs/nls!vs/platform/workspaces/electron-main/workspacesHistoryMainService","vs/nls!vs/platform/workspaces/electron-main/workspacesManagementMainService","vs/platform/backup/common/backup","vs/platform/backup/node/backup","vs/platform/contextkey/common/scanner","vs/platform/debug/common/extensionHostDebugIpc","vs/platform/environment/common/environmentService","vs/platform/debug/electron-main/extensionHostDebugIpc","vs/platform/environment/node/userDataPath","vs/platform/environment/node/wait","vs/platform/extensionManagement/common/extensionNls","vs/platform/extensions/common/extensionValidator","vs/base/common/semver/semver","vs/platform/externalServices/common/serviceMachineId","vs/platform/instantiation/common/extensions","vs/platform/instantiation/common/graph","vs/platform/extensionManagement/common/extensionUrlTrust","vs/platform/extensions/common/extensionHostStarter","vs/platform/externalTerminal/node/externalTerminalService","vs/platform/files/common/diskFileSystemProviderClient","vs/platform/files/node/watcher/nodejs/nodejsWatcherLib","vs/platform/files/node/watcher/nodejs/nodejsWatcher","vs/platform/files/node/watcher/nodejs/nodejsClient","vs/platform/files/node/watcher/watcherClient","vs/platform/instantiation/common/instantiationService","vs/platform/issue/common/issue","vs/platform/credentials/common/credentialsMainService","vs/platform/encryption/electron-main/encryptionMainService","vs/platform/files/common/diskFileSystemProvider","vs/platform/files/common/fileService","vs/platform/files/node/diskFileSystemProviderServer","vs/platform/files/electron-main/diskFileSystemProviderServer","vs/platform/log/common/bufferLog","vs/platform/log/common/logIpc","vs/platform/log/common/logService","vs/platform/log/electron-main/logIpc","vs/platform/log/node/spdlogLog","vs/platform/log/node/loggerService","vs/platform/menubar/common/menubar","vs/platform/policy/common/filePolicyService","vs/platform/policy/common/policyIpc","vs/platform/policy/node/nativePolicyService","vs/platform/extensionManagement/node/extensionUrlTrustService","vs/platform/profiling/electron-main/windowProfiling","vs/platform/jsonschemas/common/jsonContributionRegistry","vs/platform/configuration/common/configurations","vs/platform/configuration/common/configurationService","vs/platform/remote/common/electronRemoteResources","vs/platform/remote/common/remoteAuthorityResolver","vs/platform/remote/common/remoteAgentConnection","vs/platform/remote/common/remoteSocketFactoryService","vs/platform/remote/node/wsl","vs/platform/request/common/requestIpc","vs/platform/request/node/proxy","url","vs/platform/sharedProcess/common/sharedProcess","vs/platform/sign/common/abstractSignService","vs/platform/sign/node/signService","vs/platform/diagnostics/node/diagnosticsService","vs/platform/telemetry/common/telemetryIpc","vs/platform/externalServices/common/marketplace","vs/platform/telemetry/common/telemetryService","vs/platform/telemetry/node/telemetryUtils","vs/platform/telemetry/electron-main/telemetryUtils","vs/platform/terminal/common/environmentVariableCollection","vs/platform/terminal/common/environmentVariableShared","vs/platform/terminal/common/requestStore","vs/platform/terminal/common/terminalProfiles","vs/platform/terminal/common/terminalPlatformConfiguration","vs/platform/terminal/node/terminalEnvironment","vs/platform/terminal/node/terminalProfiles","vs/platform/terminal/node/ptyHostService","vs/platform/update/common/update.config.contribution","vs/platform/update/common/updateIpc","vs/platform/uriIdentity/common/uriIdentityService","vs/platform/url/common/urlIpc","vs/platform/url/common/urlService","vs/platform/url/electron-main/electronUrlListener","vs/platform/userData/common/fileUserDataProvider","vs/platform/utilityProcess/common/utilityProcessWorkerService","vs/platform/webview/common/webviewManagerService","vs/platform/webview/electron-main/webviewProtocolProvider","vs/platform/credentials/electron-main/credentialsMainService","vs/platform/launch/electron-main/launchMainService","vs/platform/webview/electron-main/webviewMainService","vs/platform/windows/node/windowTracker","vs/platform/storage/electron-main/storageIpc","vs/platform/extensionManagement/node/extensionsProfileScannerService","vs/platform/extensionManagement/node/extensionsScannerService","vs/platform/protocol/electron-main/protocolMainService","vs/platform/storage/electron-main/storageMain","vs/platform/userDataProfile/electron-main/userDataProfileStorageIpc","vs/platform/userDataProfile/node/userDataProfile","zlib","vs/platform/backup/electron-main/backupMainService","vs/platform/keyboardLayout/electron-main/keyboardLayoutMainService","vs/platform/request/node/requestService","vs/platform/request/electron-main/requestMainService","vs/code/electron-main/auth","vs/platform/tunnel/node/tunnelService","vs/platform/update/electron-main/updateService.darwin","vs/platform/update/electron-main/updateService.snap","vs/platform/userDataProfile/electron-main/userDataProfilesHandler","vs/platform/extensions/electron-main/extensionHostStarter","vs/platform/sharedProcess/electron-main/sharedProcess","vs/platform/terminal/electron-main/electronPtyHostStarter","vs/platform/utilityProcess/electron-main/utilityProcessWorkerMainService","vs/platform/windows/electron-main/windowsStateHandler","vs/platform/issue/electron-main/issueMainService","vs/platform/update/electron-main/updateService.linux","vs/platform/update/electron-main/updateService.win32","vs/platform/windows/electron-main/windowImpl","vs/platform/menubar/electron-main/menubar","vs/platform/menubar/electron-main/menubarMainService","vs/platform/windows/electron-main/windowsMainService","vs/platform/workspaces/electron-main/workspacesMainService","vs/code/electron-main/app","minimist","assert","graceful-fs","@vscode/policy-watcher","string_decoder","vs/code/electron-main/main"],ee=function(H){for(var e=[],b=0,A=H.length;b<A;b++)e[b]=Z[H[b]];return e};define(Z[135],ee([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Color=e.HSVA=e.HSLA=e.RGBA=void 0;function b(P,h){const d=Math.pow(10,h);return Math.round(P*d)/d}class A{constructor(h,d,m,g=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,h))|0,this.g=Math.min(255,Math.max(0,d))|0,this.b=Math.min(255,Math.max(0,m))|0,this.a=b(Math.max(Math.min(1,g),0),3)}static equals(h,d){return h.r===d.r&&h.g===d.g&&h.b===d.b&&h.a===d.a}}e.RGBA=A;class n{constructor(h,d,m,g){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,h),0)|0,this.s=b(Math.max(Math.min(1,d),0),3),this.l=b(Math.max(Math.min(1,m),0),3),this.a=b(Math.max(Math.min(1,g),0),3)}static equals(h,d){return h.h===d.h&&h.s===d.s&&h.l===d.l&&h.a===d.a}static fromRGBA(h){const d=h.r/255,m=h.g/255,g=h.b/255,w=h.a,u=Math.max(d,m,g),y=Math.min(d,m,g);let E=0,l=0;const v=(y+u)/2,c=u-y;if(c>0){switch(l=Math.min(v<=.5?c/(2*v):c/(2-2*v),1),u){case d:E=(m-g)/c+(m<g?6:0);break;case m:E=(g-d)/c+2;break;case g:E=(d-m)/c+4;break}E*=60,E=Math.round(E)}return new n(E,l,v,w)}static _hue2rgb(h,d,m){return m<0&&(m+=1),m>1&&(m-=1),m<1/6?h+(d-h)*6*m:m<1/2?d:m<2/3?h+(d-h)*(2/3-m)*6:h}static toRGBA(h){const d=h.h/360,{s:m,l:g,a:w}=h;let u,y,E;if(m===0)u=y=E=g;else{const l=g<.5?g*(1+m):g+m-g*m,v=2*g-l;u=n._hue2rgb(v,l,d+1/3),y=n._hue2rgb(v,l,d),E=n._hue2rgb(v,l,d-1/3)}return new A(Math.round(u*255),Math.round(y*255),Math.round(E*255),w)}}e.HSLA=n;class O{constructor(h,d,m,g){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,h),0)|0,this.s=b(Math.max(Math.min(1,d),0),3),this.v=b(Math.max(Math.min(1,m),0),3),this.a=b(Math.max(Math.min(1,g),0),3)}static equals(h,d){return h.h===d.h&&h.s===d.s&&h.v===d.v&&h.a===d.a}static fromRGBA(h){const d=h.r/255,m=h.g/255,g=h.b/255,w=Math.max(d,m,g),u=Math.min(d,m,g),y=w-u,E=w===0?0:y/w;let l;return y===0?l=0:w===d?l=((m-g)/y%6+6)%6:w===m?l=(g-d)/y+2:l=(d-m)/y+4,new O(Math.round(l*60),E,w,h.a)}static toRGBA(h){const{h:d,s:m,v:g,a:w}=h,u=g*m,y=u*(1-Math.abs(d/60%2-1)),E=g-u;let[l,v,c]=[0,0,0];return d<60?(l=u,v=y):d<120?(l=y,v=u):d<180?(v=u,c=y):d<240?(v=y,c=u):d<300?(l=y,c=u):d<=360&&(l=u,c=y),l=Math.round((l+E)*255),v=Math.round((v+E)*255),c=Math.round((c+E)*255),new A(l,v,c,w)}}e.HSVA=O;class D{static fromHex(h){return D.Format.CSS.parseHex(h)||D.red}static equals(h,d){return!h&&!d?!0:!h||!d?!1:h.equals(d)}get hsla(){return this._hsla?this._hsla:n.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:O.fromRGBA(this.rgba)}constructor(h){if(h)if(h instanceof A)this.rgba=h;else if(h instanceof n)this._hsla=h,this.rgba=n.toRGBA(h);else if(h instanceof O)this._hsva=h,this.rgba=O.toRGBA(h);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(h){return!!h&&A.equals(this.rgba,h.rgba)&&n.equals(this.hsla,h.hsla)&&O.equals(this.hsva,h.hsva)}getRelativeLuminance(){const h=D._relativeLuminanceForComponent(this.rgba.r),d=D._relativeLuminanceForComponent(this.rgba.g),m=D._relativeLuminanceForComponent(this.rgba.b),g=.2126*h+.7152*d+.0722*m;return b(g,4)}static _relativeLuminanceForComponent(h){const d=h/255;return d<=.03928?d/12.92:Math.pow((d+.055)/1.055,2.4)}getContrastRatio(h){const d=this.getRelativeLuminance(),m=h.getRelativeLuminance();return d>m?(d+.05)/(m+.05):(m+.05)/(d+.05)}isDarker(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3<128}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(h){const d=this.getRelativeLuminance(),m=h.getRelativeLuminance();return d>m}isDarkerThan(h){const d=this.getRelativeLuminance(),m=h.getRelativeLuminance();return d<m}lighten(h){return new D(new n(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*h,this.hsla.a))}darken(h){return new D(new n(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*h,this.hsla.a))}transparent(h){const{r:d,g:m,b:g,a:w}=this.rgba;return new D(new A(d,m,g,w*h))}isTransparent(){return this.rgba.a===0}isOpaque(){return this.rgba.a===1}opposite(){return new D(new A(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}blend(h){const d=h.rgba,m=this.rgba.a,g=d.a,w=m+g*(1-m);if(w<1e-6)return D.transparent;const u=this.rgba.r*m/w+d.r*g*(1-m)/w,y=this.rgba.g*m/w+d.g*g*(1-m)/w,E=this.rgba.b*m/w+d.b*g*(1-m)/w;return new D(new A(u,y,E,w))}makeOpaque(h){if(this.isOpaque()||h.rgba.a!==1)return this;const{r:d,g:m,b:g,a:w}=this.rgba;return new D(new A(h.rgba.r-w*(h.rgba.r-d),h.rgba.g-w*(h.rgba.g-m),h.rgba.b-w*(h.rgba.b-g),1))}flatten(...h){const d=h.reduceRight((m,g)=>D._flatten(g,m));return D._flatten(this,d)}static _flatten(h,d){const m=1-h.rgba.a;return new D(new A(m*d.rgba.r+h.rgba.a*h.rgba.r,m*d.rgba.g+h.rgba.a*h.rgba.g,m*d.rgba.b+h.rgba.a*h.rgba.b))}toString(){return this._toString||(this._toString=D.Format.CSS.format(this)),this._toString}static getLighterColor(h,d,m){if(h.isLighterThan(d))return h;m=m||.5;const g=h.getRelativeLuminance(),w=d.getRelativeLuminance();return m=m*(w-g)/w,h.lighten(m)}static getDarkerColor(h,d,m){if(h.isDarkerThan(d))return h;m=m||.5;const g=h.getRelativeLuminance(),w=d.getRelativeLuminance();return m=m*(g-w)/g,h.darken(m)}static{this.white=new D(new A(255,255,255,1))}static{this.black=new D(new A(0,0,0,1))}static{this.red=new D(new A(255,0,0,1))}static{this.blue=new D(new A(0,0,255,1))}static{this.green=new D(new A(0,255,0,1))}static{this.cyan=new D(new A(0,255,255,1))}static{this.lightgrey=new D(new A(211,211,211,1))}static{this.transparent=new D(new A(0,0,0,0))}}e.Color=D,function(P){let h;(function(d){let m;(function(g){function w(t){return t.rgba.a===1?`rgb(${t.rgba.r}, ${t.rgba.g}, ${t.rgba.b})`:P.Format.CSS.formatRGBA(t)}g.formatRGB=w;function u(t){return`rgba(${t.rgba.r}, ${t.rgba.g}, ${t.rgba.b}, ${+t.rgba.a.toFixed(2)})`}g.formatRGBA=u;function y(t){return t.hsla.a===1?`hsl(${t.hsla.h}, ${(t.hsla.s*100).toFixed(2)}%, ${(t.hsla.l*100).toFixed(2)}%)`:P.Format.CSS.formatHSLA(t)}g.formatHSL=y;function E(t){return`hsla(${t.hsla.h}, ${(t.hsla.s*100).toFixed(2)}%, ${(t.hsla.l*100).toFixed(2)}%, ${t.hsla.a.toFixed(2)})`}g.formatHSLA=E;function l(t){const a=t.toString(16);return a.length!==2?"0"+a:a}function v(t){return`#${l(t.rgba.r)}${l(t.rgba.g)}${l(t.rgba.b)}`}g.formatHex=v;function c(t,a=!1){return a&&t.rgba.a===1?P.Format.CSS.formatHex(t):`#${l(t.rgba.r)}${l(t.rgba.g)}${l(t.rgba.b)}${l(Math.round(t.rgba.a*255))}`}g.formatHexA=c;function f(t){return t.isOpaque()?P.Format.CSS.formatHex(t):P.Format.CSS.formatRGBA(t)}g.format=f;function I(t){const a=t.length;if(a===0||t.charCodeAt(0)!==35)return null;if(a===7){const s=16*S(t.charCodeAt(1))+S(t.charCodeAt(2)),i=16*S(t.charCodeAt(3))+S(t.charCodeAt(4)),r=16*S(t.charCodeAt(5))+S(t.charCodeAt(6));return new P(new A(s,i,r,1))}if(a===9){const s=16*S(t.charCodeAt(1))+S(t.charCodeAt(2)),i=16*S(t.charCodeAt(3))+S(t.charCodeAt(4)),r=16*S(t.charCodeAt(5))+S(t.charCodeAt(6)),o=16*S(t.charCodeAt(7))+S(t.charCodeAt(8));return new P(new A(s,i,r,o/255))}if(a===4){const s=S(t.charCodeAt(1)),i=S(t.charCodeAt(2)),r=S(t.charCodeAt(3));return new P(new A(16*s+s,16*i+i,16*r+r))}if(a===5){const s=S(t.charCodeAt(1)),i=S(t.charCodeAt(2)),r=S(t.charCodeAt(3)),o=S(t.charCodeAt(4));return new P(new A(16*s+s,16*i+i,16*r+r,(16*o+o)/255))}return null}g.parseHex=I;function S(t){switch(t){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:return 10;case 65:return 10;case 98:return 11;case 66:return 11;case 99:return 12;case 67:return 12;case 100:return 13;case 68:return 13;case 101:return 14;case 69:return 14;case 102:return 15;case 70:return 15}return 0}})(m=d.CSS||(d.CSS={}))})(h=P.Format||(P.Format={}))}(D||(e.Color=D={}))}),define(Z[55],ee([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.throttle=e.debounce=e.memoize=void 0;function b(D){return(P,h,d)=>{let m=null,g=null;if(typeof d.value=="function"?(m="value",g=d.value):typeof d.get=="function"&&(m="get",g=d.get),!g)throw new Error("not supported");d[m]=D(g,h)}}function A(D,P,h){let d=null,m=null;if(typeof h.value=="function"?(d="value",m=h.value,m.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof h.get=="function"&&(d="get",m=h.get),!m)throw new Error("not supported");const g=`$memoize$${P}`;h[d]=function(...w){return this.hasOwnProperty(g)||Object.defineProperty(this,g,{configurable:!1,enumerable:!1,writable:!1,value:m.apply(this,w)}),this[g]}}e.memoize=A;function n(D,P,h){return b((d,m)=>{const g=`$debounce$${m}`,w=`$debounce$result$${m}`;return function(...u){this[w]||(this[w]=h?h():void 0),clearTimeout(this[g]),P&&(this[w]=P(this[w],...u),u=[this[w]]),this[g]=setTimeout(()=>{d.apply(this,u),this[w]=h?h():void 0},D)}})}e.debounce=n;function O(D,P,h){return b((d,m)=>{const g=`$throttle$timer$${m}`,w=`$throttle$result$${m}`,u=`$throttle$lastRun$${m}`,y=`$throttle$pending$${m}`;return function(...E){if(this[w]||(this[w]=h?h():void 0),(this[u]===null||this[u]===void 0)&&(this[u]=-Number.MAX_VALUE),P&&(this[w]=P(this[w],...E)),this[y])return;const l=this[u]+D;l<=Date.now()?(this[u]=Date.now(),d.apply(this,[this[w]]),this[w]=h?h():void 0):(this[y]=!0,this[g]=setTimeout(()=>{this[y]=!1,this[u]=Date.now(),d.apply(this,[this[w]]),this[w]=h?h():void 0},l-Date.now()))}})}e.throttle=O}),define(Z[13],ee([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BugIndicatingError=e.ErrorNoTelemetry=e.ExpectedError=e.NotSupportedError=e.NotImplementedError=e.getErrorMessage=e.disposed=e.readonly=e.illegalState=e.illegalArgument=e.canceled=e.CancellationError=e.isCancellationError=e.transformErrorForSerialization=e.onUnexpectedExternalError=e.onUnexpectedError=e.isSigPipeError=e.setUnexpectedErrorHandler=e.errorHandler=e.ErrorHandler=void 0;class b{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(a){setTimeout(()=>{throw a.stack?I.isErrorNoTelemetry(a)?new I(a.message+`

`+a.stack):new Error(a.message+`

`+a.stack):a},0)}}addListener(a){return this.listeners.push(a),()=>{this._removeListener(a)}}emit(a){this.listeners.forEach(s=>{s(a)})}_removeListener(a){this.listeners.splice(this.listeners.indexOf(a),1)}setUnexpectedErrorHandler(a){this.unexpectedErrorHandler=a}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(a){this.unexpectedErrorHandler(a),this.emit(a)}onUnexpectedExternalError(a){this.unexpectedErrorHandler(a)}}e.ErrorHandler=b,e.errorHandler=new b;function A(t){e.errorHandler.setUnexpectedErrorHandler(t)}e.setUnexpectedErrorHandler=A;function n(t){if(!t||typeof t!="object")return!1;const a=t;return a.code==="EPIPE"&&a.syscall?.toUpperCase()==="WRITE"}e.isSigPipeError=n;function O(t){d(t)||e.errorHandler.onUnexpectedError(t)}e.onUnexpectedError=O;function D(t){d(t)||e.errorHandler.onUnexpectedExternalError(t)}e.onUnexpectedExternalError=D;function P(t){if(t instanceof Error){const{name:a,message:s}=t;let i=t.errorCode;const r=t.stacktrace||t.stack;return{$isError:!0,name:a,message:s,stack:r,errorCode:i,data:t.data}}return t}e.transformErrorForSerialization=P;const h="Canceled";function d(t){return t instanceof m?!0:t instanceof Error&&t.name===h&&t.message===h}e.isCancellationError=d;class m extends Error{constructor(){super(h),this.name=this.message}}e.CancellationError=m;function g(){const t=new Error(h);return t.name=t.message,t}e.canceled=g;function w(t){return t?new Error(`Illegal argument: ${t}`):new Error("Illegal argument")}e.illegalArgument=w;function u(t){return t?new Error(`Illegal state: ${t}`):new Error("Illegal state")}e.illegalState=u;function y(t){return t?new Error(`readonly property '${t} cannot be changed'`):new Error("readonly property cannot be changed")}e.readonly=y;function E(t){const a=new Error(`${t} has been disposed`);return a.name="DISPOSED",a}e.disposed=E;function l(t){return t?t.message?t.message:t.stack?t.stack.split(`
`)[0]:String(t):"Error"}e.getErrorMessage=l;class v extends Error{constructor(a){super("NotImplemented"),a&&(this.message=a)}}e.NotImplementedError=v;class c extends Error{constructor(a){super("NotSupported"),a&&(this.message=a)}}e.NotSupportedError=c;class f extends Error{constructor(){super(...arguments),this.isExpected=!0}}e.ExpectedError=f;class I extends Error{constructor(a){super(a),this.name="CodeExpectedError"}static fromError(a){if(a instanceof I)return a;const s=new I;return s.message=a.message,s.stack=a.stack,s}static isErrorNoTelemetry(a){return a.name==="CodeExpectedError"}}e.ErrorNoTelemetry=I;class S extends Error{constructor(a){super(a||"An unexpected bug occurred."),Object.setPrototypeOf(this,S.prototype)}}e.BugIndicatingError=S}),define(Z[24],ee([0,1,13]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CallbackIterable=e.ArrayQueue=e.findMaxIdxBy=e.findMinBy=e.findLastMaxBy=e.findMaxBy=e.reverseOrder=e.booleanComparator=e.numberComparator=e.tieBreakComparators=e.compareBy=e.CompareResult=e.splice=e.insertInto=e.mapFind=e.getRandomElement=e.asArray=e.mapArrayOrNot=e.pushMany=e.pushToEnd=e.pushToStart=e.shuffle=e.arrayInsert=e.remove=e.insert=e.index=e.range=e.flatten=e.commonPrefixLength=e.lastOrDefault=e.firstOrDefault=e.findLastIndex=e.findLast=e.uniqueFilter=e.distinct=e.isNonEmptyArray=e.isFalsyOrEmpty=e.move=e.coalesceInPlace=e.coalesce=e.topAsync=e.top=e.delta=e.sortedDiff=e.groupBy=e.quickSelect=e.findFirstInSorted=e.binarySearch2=e.binarySearch=e.removeFastWithoutKeepingOrder=e.equals=e.tail2=e.tail=void 0;function A(V,te=0){return V[V.length-(1+te)]}e.tail=A;function n(V){if(V.length===0)throw new Error("Invalid tail call");return[V.slice(0,V.length-1),V[V.length-1]]}e.tail2=n;function O(V,te,Q=(fe,pe)=>fe===pe){if(V===te)return!0;if(!V||!te||V.length!==te.length)return!1;for(let fe=0,pe=V.length;fe<pe;fe++)if(!Q(V[fe],te[fe]))return!1;return!0}e.equals=O;function D(V,te){const Q=V.length-1;te<Q&&(V[te]=V[Q]),V.pop()}e.removeFastWithoutKeepingOrder=D;function P(V,te,Q){return h(V.length,fe=>Q(V[fe],te))}e.binarySearch=P;function h(V,te){let Q=0,fe=V-1;for(;Q<=fe;){const pe=(Q+fe)/2|0,Pe=te(pe);if(Pe<0)Q=pe+1;else if(Pe>0)fe=pe-1;else return pe}return-(Q+1)}e.binarySearch2=h;function d(V,te){let Q=0,fe=V.length;if(fe===0)return 0;for(;Q<fe;){const pe=Math.floor((Q+fe)/2);te(V[pe])?fe=pe:Q=pe+1}return Q}e.findFirstInSorted=d;function m(V,te,Q){if(V=V|0,V>=te.length)throw new TypeError("invalid index");const fe=te[Math.floor(te.length*Math.random())],pe=[],Pe=[],De=[];for(const We of te){const ye=Q(We,fe);ye<0?pe.push(We):ye>0?Pe.push(We):De.push(We)}return V<pe.length?m(V,pe,Q):V<pe.length+De.length?De[0]:m(V-(pe.length+De.length),Pe,Q)}e.quickSelect=m;function g(V,te){const Q=[];let fe;for(const pe of V.slice(0).sort(te))!fe||te(fe[0],pe)!==0?(fe=[pe],Q.push(fe)):fe.push(pe);return Q}e.groupBy=g;function w(V,te,Q){const fe=[];function pe(We,ye,we){if(ye===0&&we.length===0)return;const K=fe[fe.length-1];K&&K.start+K.deleteCount===We?(K.deleteCount+=ye,K.toInsert.push(...we)):fe.push({start:We,deleteCount:ye,toInsert:we})}let Pe=0,De=0;for(;;){if(Pe===V.length){pe(Pe,0,te.slice(De));break}if(De===te.length){pe(Pe,V.length-Pe,[]);break}const We=V[Pe],ye=te[De],we=Q(We,ye);we===0?(Pe+=1,De+=1):we<0?(pe(Pe,1,[]),Pe+=1):we>0&&(pe(Pe,0,[ye]),De+=1)}return fe}e.sortedDiff=w;function u(V,te,Q){const fe=w(V,te,Q),pe=[],Pe=[];for(const De of fe)pe.push(...V.slice(De.start,De.start+De.deleteCount)),Pe.push(...De.toInsert);return{removed:pe,added:Pe}}e.delta=u;function y(V,te,Q){if(Q===0)return[];const fe=V.slice(0,Q).sort(te);return l(V,te,fe,Q,V.length),fe}e.top=y;function E(V,te,Q,fe,pe){return Q===0?Promise.resolve([]):new Promise((Pe,De)=>{(async()=>{const We=V.length,ye=V.slice(0,Q).sort(te);for(let we=Q,K=Math.min(Q+fe,We);we<We;we=K,K=Math.min(K+fe,We)){if(we>Q&&await new Promise(he=>setTimeout(he)),pe&&pe.isCancellationRequested)throw new b.CancellationError;l(V,te,ye,we,K)}return ye})().then(Pe,De)})}e.topAsync=E;function l(V,te,Q,fe,pe){for(const Pe=Q.length;fe<pe;fe++){const De=V[fe];if(te(De,Q[Pe-1])<0){Q.pop();const We=d(Q,ye=>te(De,ye)<0);Q.splice(We,0,De)}}}function v(V){return V.filter(te=>!!te)}e.coalesce=v;function c(V){let te=0;for(let Q=0;Q<V.length;Q++)V[Q]&&(V[te]=V[Q],te+=1);V.length=te}e.coalesceInPlace=c;function f(V,te,Q){V.splice(Q,0,V.splice(te,1)[0])}e.move=f;function I(V){return!Array.isArray(V)||V.length===0}e.isFalsyOrEmpty=I;function S(V){return Array.isArray(V)&&V.length>0}e.isNonEmptyArray=S;function t(V,te=Q=>Q){const Q=new Set;return V.filter(fe=>{const pe=te(fe);return Q.has(pe)?!1:(Q.add(pe),!0)})}e.distinct=t;function a(V){const te=new Set;return Q=>{const fe=V(Q);return te.has(fe)?!1:(te.add(fe),!0)}}e.uniqueFilter=a;function s(V,te){const Q=i(V,te);if(Q!==-1)return V[Q]}e.findLast=s;function i(V,te){for(let Q=V.length-1;Q>=0;Q--){const fe=V[Q];if(te(fe))return Q}return-1}e.findLastIndex=i;function r(V,te){return V.length>0?V[0]:te}e.firstOrDefault=r;function o(V,te){return V.length>0?V[V.length-1]:te}e.lastOrDefault=o;function p(V,te,Q=(fe,pe)=>fe===pe){let fe=0;for(let pe=0,Pe=Math.min(V.length,te.length);pe<Pe&&Q(V[pe],te[pe]);pe++)fe++;return fe}e.commonPrefixLength=p;function k(V){return[].concat(...V)}e.flatten=k;function M(V,te){let Q=typeof te=="number"?V:0;typeof te=="number"?Q=V:(Q=0,te=V);const fe=[];if(Q<=te)for(let pe=Q;pe<te;pe++)fe.push(pe);else for(let pe=Q;pe>te;pe--)fe.push(pe);return fe}e.range=M;function C(V,te,Q){return V.reduce((fe,pe)=>(fe[te(pe)]=Q?Q(pe):pe,fe),Object.create(null))}e.index=C;function L(V,te){return V.push(te),()=>T(V,te)}e.insert=L;function T(V,te){const Q=V.indexOf(te);if(Q>-1)return V.splice(Q,1),te}e.remove=T;function F(V,te,Q){const fe=V.slice(0,te),pe=V.slice(te);return fe.concat(Q,pe)}e.arrayInsert=F;function z(V,te){let Q;if(typeof te=="number"){let fe=te;Q=()=>{const pe=Math.sin(fe++)*179426549;return pe-Math.floor(pe)}}else Q=Math.random;for(let fe=V.length-1;fe>0;fe-=1){const pe=Math.floor(Q()*(fe+1)),Pe=V[fe];V[fe]=V[pe],V[pe]=Pe}}e.shuffle=z;function oe(V,te){const Q=V.indexOf(te);Q>-1&&(V.splice(Q,1),V.unshift(te))}e.pushToStart=oe;function ne(V,te){const Q=V.indexOf(te);Q>-1&&(V.splice(Q,1),V.push(te))}e.pushToEnd=ne;function de(V,te){for(const Q of te)V.push(Q)}e.pushMany=de;function ae(V,te){return Array.isArray(V)?V.map(te):te(V)}e.mapArrayOrNot=ae;function ue(V){return Array.isArray(V)?V:[V]}e.asArray=ue;function j(V){return V[Math.floor(Math.random()*V.length)]}e.getRandomElement=j;function G(V,te){for(const Q of V){const fe=te(Q);if(fe!==void 0)return fe}}e.mapFind=G;function B(V,te,Q){const fe=U(V,te),pe=V.length,Pe=Q.length;V.length=pe+Pe;for(let De=pe-1;De>=fe;De--)V[De+Pe]=V[De];for(let De=0;De<Pe;De++)V[De+fe]=Q[De]}e.insertInto=B;function W(V,te,Q,fe){const pe=U(V,te),Pe=V.splice(pe,Q);return B(V,pe,fe),Pe}e.splice=W;function U(V,te){return te<0?Math.max(te+V.length,0):Math.min(te,V.length)}var $;(function(V){function te(Pe){return Pe<0}V.isLessThan=te;function Q(Pe){return Pe<=0}V.isLessThanOrEqual=Q;function fe(Pe){return Pe>0}V.isGreaterThan=fe;function pe(Pe){return Pe===0}V.isNeitherLessOrGreaterThan=pe,V.greaterThan=1,V.lessThan=-1,V.neitherLessOrGreaterThan=0})($||(e.CompareResult=$={}));function X(V,te){return(Q,fe)=>te(V(Q),V(fe))}e.compareBy=X;function se(...V){return(te,Q)=>{for(const fe of V){const pe=fe(te,Q);if(!$.isNeitherLessOrGreaterThan(pe))return pe}return $.neitherLessOrGreaterThan}}e.tieBreakComparators=se;const ce=(V,te)=>V-te;e.numberComparator=ce;const x=(V,te)=>(0,e.numberComparator)(V?1:0,te?1:0);e.booleanComparator=x;function R(V){return(te,Q)=>-V(te,Q)}e.reverseOrder=R;function _(V,te){if(V.length===0)return;let Q=V[0];for(let fe=1;fe<V.length;fe++){const pe=V[fe];te(pe,Q)>0&&(Q=pe)}return Q}e.findMaxBy=_;function N(V,te){if(V.length===0)return;let Q=V[0];for(let fe=1;fe<V.length;fe++){const pe=V[fe];te(pe,Q)>=0&&(Q=pe)}return Q}e.findLastMaxBy=N;function q(V,te){return _(V,(Q,fe)=>-te(Q,fe))}e.findMinBy=q;function re(V,te){if(V.length===0)return-1;let Q=0;for(let fe=1;fe<V.length;fe++){const pe=V[fe];te(pe,V[Q])>0&&(Q=fe)}return Q}e.findMaxIdxBy=re;class ie{constructor(te){this.items=te,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(te){let Q=this.firstIdx;for(;Q<this.items.length&&te(this.items[Q]);)Q++;const fe=Q===this.firstIdx?null:this.items.slice(this.firstIdx,Q);return this.firstIdx=Q,fe}takeFromEndWhile(te){let Q=this.lastIdx;for(;Q>=0&&te(this.items[Q]);)Q--;const fe=Q===this.lastIdx?null:this.items.slice(Q+1,this.lastIdx+1);return this.lastIdx=Q,fe}peek(){if(this.length!==0)return this.items[this.firstIdx]}peekLast(){if(this.length!==0)return this.items[this.lastIdx]}dequeue(){const te=this.items[this.firstIdx];return this.firstIdx++,te}removeLast(){const te=this.items[this.lastIdx];return this.lastIdx--,te}takeCount(te){const Q=this.items.slice(this.firstIdx,this.firstIdx+te);return this.firstIdx+=te,Q}}e.ArrayQueue=ie;class le{static{this.empty=new le(te=>{})}constructor(te){this.iterate=te}forEach(te){this.iterate(Q=>(te(Q),!0))}toArray(){const te=[];return this.iterate(Q=>(te.push(Q),!0)),te}filter(te){return new le(Q=>this.iterate(fe=>te(fe)?Q(fe):!0))}map(te){return new le(Q=>this.iterate(fe=>Q(te(fe))))}some(te){let Q=!1;return this.iterate(fe=>(Q=te(fe),!Q)),Q}findFirst(te){let Q;return this.iterate(fe=>te(fe)?(Q=fe,!1):!0),Q}findLast(te){let Q;return this.iterate(fe=>(te(fe)&&(Q=fe),!0)),Q}findLastMaxBy(te){let Q,fe=!0;return this.iterate(pe=>((fe||$.isGreaterThan(te(pe,Q)))&&(fe=!1,Q=pe),!0)),Q}}e.CallbackIterable=le}),define(Z[136],ee([0,1,13]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.checkAdjacentItems=e.assertFn=e.assert=e.assertNever=e.ok=void 0;function A(h,d){if(!h)throw new Error(d?`Assertion failed (${d})`:"Assertion Failed")}e.ok=A;function n(h,d="Unreachable"){throw new Error(d)}e.assertNever=n;function O(h){if(!h)throw new b.BugIndicatingError("Assertion Failed")}e.assert=O;function D(h){if(!h()){debugger;h(),(0,b.onUnexpectedError)(new b.BugIndicatingError("Assertion Failed"))}}e.assertFn=D;function P(h,d){let m=0;for(;m<h.length-1;){const g=h[m],w=h[m+1];if(!d(g,w))return!1;m++}return!0}e.checkAdjacentItems=P}),define(Z[49],ee([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.once=void 0;function b(A){const n=this;let O=!1,D;return function(){return O||(O=!0,D=A.apply(n,arguments)),D}}e.once=b}),define(Z[69],ee([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Iterable=void 0;var b;(function(A){function n(I){return I&&typeof I=="object"&&typeof I[Symbol.iterator]=="function"}A.is=n;const O=Object.freeze([]);function D(){return O}A.empty=D;function*P(I){yield I}A.single=P;function h(I){return n(I)?I:P(I)}A.wrap=h;function d(I){return I||O}A.from=d;function m(I){return!I||I[Symbol.iterator]().next().done===!0}A.isEmpty=m;function g(I){return I[Symbol.iterator]().next().value}A.first=g;function w(I,S){for(const t of I)if(S(t))return!0;return!1}A.some=w;function u(I,S){for(const t of I)if(S(t))return t}A.find=u;function*y(I,S){for(const t of I)S(t)&&(yield t)}A.filter=y;function*E(I,S){let t=0;for(const a of I)yield S(a,t++)}A.map=E;function*l(...I){for(const S of I)for(const t of S)yield t}A.concat=l;function v(I,S,t){let a=t;for(const s of I)a=S(a,s);return a}A.reduce=v;function*c(I,S,t=I.length){for(S<0&&(S+=I.length),t<0?t+=I.length:t>I.length&&(t=I.length);S<t;S++)yield I[S]}A.slice=c;function f(I,S=Number.POSITIVE_INFINITY){const t=[];if(S===0)return[t,I];const a=I[Symbol.iterator]();for(let s=0;s<S;s++){const i=a.next();if(i.done)return[t,A.empty()];t.push(i.value)}return[t,{[Symbol.iterator](){return a}}]}A.consume=f})(b||(e.Iterable=b={}))}),define(Z[44],ee([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getNodeType=e.stripComments=e.visit=e.findNodeAtOffset=e.contains=e.getNodeValue=e.getNodePath=e.findNodeAtLocation=e.parseTree=e.parse=e.getLocation=e.createScanner=e.ParseOptions=e.ParseErrorCode=e.SyntaxKind=e.ScanError=void 0;var b;(function(t){t[t.None=0]="None",t[t.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=2]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",t[t.InvalidUnicode=4]="InvalidUnicode",t[t.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",t[t.InvalidCharacter=6]="InvalidCharacter"})(b||(e.ScanError=b={}));var A;(function(t){t[t.OpenBraceToken=1]="OpenBraceToken",t[t.CloseBraceToken=2]="CloseBraceToken",t[t.OpenBracketToken=3]="OpenBracketToken",t[t.CloseBracketToken=4]="CloseBracketToken",t[t.CommaToken=5]="CommaToken",t[t.ColonToken=6]="ColonToken",t[t.NullKeyword=7]="NullKeyword",t[t.TrueKeyword=8]="TrueKeyword",t[t.FalseKeyword=9]="FalseKeyword",t[t.StringLiteral=10]="StringLiteral",t[t.NumericLiteral=11]="NumericLiteral",t[t.LineCommentTrivia=12]="LineCommentTrivia",t[t.BlockCommentTrivia=13]="BlockCommentTrivia",t[t.LineBreakTrivia=14]="LineBreakTrivia",t[t.Trivia=15]="Trivia",t[t.Unknown=16]="Unknown",t[t.EOF=17]="EOF"})(A||(e.SyntaxKind=A={}));var n;(function(t){t[t.InvalidSymbol=1]="InvalidSymbol",t[t.InvalidNumberFormat=2]="InvalidNumberFormat",t[t.PropertyNameExpected=3]="PropertyNameExpected",t[t.ValueExpected=4]="ValueExpected",t[t.ColonExpected=5]="ColonExpected",t[t.CommaExpected=6]="CommaExpected",t[t.CloseBraceExpected=7]="CloseBraceExpected",t[t.CloseBracketExpected=8]="CloseBracketExpected",t[t.EndOfFileExpected=9]="EndOfFileExpected",t[t.InvalidCommentToken=10]="InvalidCommentToken",t[t.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=12]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",t[t.InvalidUnicode=14]="InvalidUnicode",t[t.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",t[t.InvalidCharacter=16]="InvalidCharacter"})(n||(e.ParseErrorCode=n={}));var O;(function(t){t.DEFAULT={allowTrailingComma:!0}})(O||(e.ParseOptions=O={}));function D(t,a=!1){let s=0;const i=t.length;let r="",o=0,p=16,k=0;function M(ne){let de=0,ae=0;for(;de<ne;){const ue=t.charCodeAt(s);if(ue>=48&&ue<=57)ae=ae*16+ue-48;else if(ue>=65&&ue<=70)ae=ae*16+ue-65+10;else if(ue>=97&&ue<=102)ae=ae*16+ue-97+10;else break;s++,de++}return de<ne&&(ae=-1),ae}function C(ne){s=ne,r="",o=0,p=16,k=0}function L(){const ne=s;if(t.charCodeAt(s)===48)s++;else for(s++;s<t.length&&d(t.charCodeAt(s));)s++;if(s<t.length&&t.charCodeAt(s)===46)if(s++,s<t.length&&d(t.charCodeAt(s)))for(s++;s<t.length&&d(t.charCodeAt(s));)s++;else return k=3,t.substring(ne,s);let de=s;if(s<t.length&&(t.charCodeAt(s)===69||t.charCodeAt(s)===101))if(s++,(s<t.length&&t.charCodeAt(s)===43||t.charCodeAt(s)===45)&&s++,s<t.length&&d(t.charCodeAt(s))){for(s++;s<t.length&&d(t.charCodeAt(s));)s++;de=s}else k=3;return t.substring(ne,de)}function T(){let ne="",de=s;for(;;){if(s>=i){ne+=t.substring(de,s),k=2;break}const ae=t.charCodeAt(s);if(ae===34){ne+=t.substring(de,s),s++;break}if(ae===92){if(ne+=t.substring(de,s),s++,s>=i){k=2;break}switch(t.charCodeAt(s++)){case 34:ne+='"';break;case 92:ne+="\\";break;case 47:ne+="/";break;case 98:ne+="\b";break;case 102:ne+="\f";break;case 110:ne+=`
`;break;case 114:ne+="\r";break;case 116:ne+="	";break;case 117:{const j=M(4);j>=0?ne+=String.fromCharCode(j):k=4;break}default:k=5}de=s;continue}if(ae>=0&&ae<=31)if(h(ae)){ne+=t.substring(de,s),k=2;break}else k=6;s++}return ne}function F(){if(r="",k=0,o=s,s>=i)return o=i,p=17;let ne=t.charCodeAt(s);if(P(ne)){do s++,r+=String.fromCharCode(ne),ne=t.charCodeAt(s);while(P(ne));return p=15}if(h(ne))return s++,r+=String.fromCharCode(ne),ne===13&&t.charCodeAt(s)===10&&(s++,r+=`
`),p=14;switch(ne){case 123:return s++,p=1;case 125:return s++,p=2;case 91:return s++,p=3;case 93:return s++,p=4;case 58:return s++,p=6;case 44:return s++,p=5;case 34:return s++,r=T(),p=10;case 47:{const de=s-1;if(t.charCodeAt(s+1)===47){for(s+=2;s<i&&!h(t.charCodeAt(s));)s++;return r=t.substring(de,s),p=12}if(t.charCodeAt(s+1)===42){s+=2;const ae=i-1;let ue=!1;for(;s<ae;){if(t.charCodeAt(s)===42&&t.charCodeAt(s+1)===47){s+=2,ue=!0;break}s++}return ue||(s++,k=1),r=t.substring(de,s),p=13}return r+=String.fromCharCode(ne),s++,p=16}case 45:if(r+=String.fromCharCode(ne),s++,s===i||!d(t.charCodeAt(s)))return p=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return r+=L(),p=11;default:for(;s<i&&z(ne);)s++,ne=t.charCodeAt(s);if(o!==s){switch(r=t.substring(o,s),r){case"true":return p=8;case"false":return p=9;case"null":return p=7}return p=16}return r+=String.fromCharCode(ne),s++,p=16}}function z(ne){if(P(ne)||h(ne))return!1;switch(ne){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function oe(){let ne;do ne=F();while(ne>=12&&ne<=15);return ne}return{setPosition:C,getPosition:()=>s,scan:a?oe:F,getToken:()=>p,getTokenValue:()=>r,getTokenOffset:()=>o,getTokenLength:()=>s-o,getTokenError:()=>k}}e.createScanner=D;function P(t){return t===32||t===9||t===11||t===12||t===160||t===5760||t>=8192&&t<=8203||t===8239||t===8287||t===12288||t===65279}function h(t){return t===10||t===13||t===8232||t===8233}function d(t){return t>=48&&t<=57}var m;(function(t){t[t.nullCharacter=0]="nullCharacter",t[t.maxAsciiCharacter=127]="maxAsciiCharacter",t[t.lineFeed=10]="lineFeed",t[t.carriageReturn=13]="carriageReturn",t[t.lineSeparator=8232]="lineSeparator",t[t.paragraphSeparator=8233]="paragraphSeparator",t[t.nextLine=133]="nextLine",t[t.space=32]="space",t[t.nonBreakingSpace=160]="nonBreakingSpace",t[t.enQuad=8192]="enQuad",t[t.emQuad=8193]="emQuad",t[t.enSpace=8194]="enSpace",t[t.emSpace=8195]="emSpace",t[t.threePerEmSpace=8196]="threePerEmSpace",t[t.fourPerEmSpace=8197]="fourPerEmSpace",t[t.sixPerEmSpace=8198]="sixPerEmSpace",t[t.figureSpace=8199]="figureSpace",t[t.punctuationSpace=8200]="punctuationSpace",t[t.thinSpace=8201]="thinSpace",t[t.hairSpace=8202]="hairSpace",t[t.zeroWidthSpace=8203]="zeroWidthSpace",t[t.narrowNoBreakSpace=8239]="narrowNoBreakSpace",t[t.ideographicSpace=12288]="ideographicSpace",t[t.mathematicalSpace=8287]="mathematicalSpace",t[t.ogham=5760]="ogham",t[t._=95]="_",t[t.$=36]="$",t[t._0=48]="_0",t[t._1=49]="_1",t[t._2=50]="_2",t[t._3=51]="_3",t[t._4=52]="_4",t[t._5=53]="_5",t[t._6=54]="_6",t[t._7=55]="_7",t[t._8=56]="_8",t[t._9=57]="_9",t[t.a=97]="a",t[t.b=98]="b",t[t.c=99]="c",t[t.d=100]="d",t[t.e=101]="e",t[t.f=102]="f",t[t.g=103]="g",t[t.h=104]="h",t[t.i=105]="i",t[t.j=106]="j",t[t.k=107]="k",t[t.l=108]="l",t[t.m=109]="m",t[t.n=110]="n",t[t.o=111]="o",t[t.p=112]="p",t[t.q=113]="q",t[t.r=114]="r",t[t.s=115]="s",t[t.t=116]="t",t[t.u=117]="u",t[t.v=118]="v",t[t.w=119]="w",t[t.x=120]="x",t[t.y=121]="y",t[t.z=122]="z",t[t.A=65]="A",t[t.B=66]="B",t[t.C=67]="C",t[t.D=68]="D",t[t.E=69]="E",t[t.F=70]="F",t[t.G=71]="G",t[t.H=72]="H",t[t.I=73]="I",t[t.J=74]="J",t[t.K=75]="K",t[t.L=76]="L",t[t.M=77]="M",t[t.N=78]="N",t[t.O=79]="O",t[t.P=80]="P",t[t.Q=81]="Q",t[t.R=82]="R",t[t.S=83]="S",t[t.T=84]="T",t[t.U=85]="U",t[t.V=86]="V",t[t.W=87]="W",t[t.X=88]="X",t[t.Y=89]="Y",t[t.Z=90]="Z",t[t.ampersand=38]="ampersand",t[t.asterisk=42]="asterisk",t[t.at=64]="at",t[t.backslash=92]="backslash",t[t.bar=124]="bar",t[t.caret=94]="caret",t[t.closeBrace=125]="closeBrace",t[t.closeBracket=93]="closeBracket",t[t.closeParen=41]="closeParen",t[t.colon=58]="colon",t[t.comma=44]="comma",t[t.dot=46]="dot",t[t.doubleQuote=34]="doubleQuote",t[t.equals=61]="equals",t[t.exclamation=33]="exclamation",t[t.greaterThan=62]="greaterThan",t[t.lessThan=60]="lessThan",t[t.minus=45]="minus",t[t.openBrace=123]="openBrace",t[t.openBracket=91]="openBracket",t[t.openParen=40]="openParen",t[t.percent=37]="percent",t[t.plus=43]="plus",t[t.question=63]="question",t[t.semicolon=59]="semicolon",t[t.singleQuote=39]="singleQuote",t[t.slash=47]="slash",t[t.tilde=126]="tilde",t[t.backspace=8]="backspace",t[t.formFeed=12]="formFeed",t[t.byteOrderMark=65279]="byteOrderMark",t[t.tab=9]="tab",t[t.verticalTab=11]="verticalTab"})(m||(m={}));function g(t,a){const s=[],i=new Object;let r;const o={value:{},offset:0,length:0,type:"object",parent:void 0};let p=!1;function k(M,C,L,T){o.value=M,o.offset=C,o.length=L,o.type=T,o.colonOffset=void 0,r=o}try{f(t,{onObjectBegin:(M,C)=>{if(a<=M)throw i;r=void 0,p=a>M,s.push("")},onObjectProperty:(M,C,L)=>{if(a<C||(k(M,C,L,"property"),s[s.length-1]=M,a<=C+L))throw i},onObjectEnd:(M,C)=>{if(a<=M)throw i;r=void 0,s.pop()},onArrayBegin:(M,C)=>{if(a<=M)throw i;r=void 0,s.push(0)},onArrayEnd:(M,C)=>{if(a<=M)throw i;r=void 0,s.pop()},onLiteralValue:(M,C,L)=>{if(a<C||(k(M,C,L,S(M)),a<=C+L))throw i},onSeparator:(M,C,L)=>{if(a<=C)throw i;if(M===":"&&r&&r.type==="property")r.colonOffset=C,p=!1,r=void 0;else if(M===","){const T=s[s.length-1];typeof T=="number"?s[s.length-1]=T+1:(p=!0,s[s.length-1]=""),r=void 0}}})}catch(M){if(M!==i)throw M}return{path:s,previousNode:r,isAtPropertyKey:p,matches:M=>{let C=0;for(let L=0;C<M.length&&L<s.length;L++)if(M[C]===s[L]||M[C]==="*")C++;else if(M[C]!=="**")return!1;return C===M.length}}}e.getLocation=g;function w(t,a=[],s=O.DEFAULT){let i=null,r=[];const o=[];function p(M){Array.isArray(r)?r.push(M):i!==null&&(r[i]=M)}return f(t,{onObjectBegin:()=>{const M={};p(M),o.push(r),r=M,i=null},onObjectProperty:M=>{i=M},onObjectEnd:()=>{r=o.pop()},onArrayBegin:()=>{const M=[];p(M),o.push(r),r=M,i=null},onArrayEnd:()=>{r=o.pop()},onLiteralValue:p,onError:(M,C,L)=>{a.push({error:M,offset:C,length:L})}},s),r[0]}e.parse=w;function u(t,a=[],s=O.DEFAULT){let i={type:"array",offset:-1,length:-1,children:[],parent:void 0};function r(M){i.type==="property"&&(i.length=M-i.offset,i=i.parent)}function o(M){return i.children.push(M),M}f(t,{onObjectBegin:M=>{i=o({type:"object",offset:M,length:-1,parent:i,children:[]})},onObjectProperty:(M,C,L)=>{i=o({type:"property",offset:C,length:-1,parent:i,children:[]}),i.children.push({type:"string",value:M,offset:C,length:L,parent:i})},onObjectEnd:(M,C)=>{i.length=M+C-i.offset,i=i.parent,r(M+C)},onArrayBegin:(M,C)=>{i=o({type:"array",offset:M,length:-1,parent:i,children:[]})},onArrayEnd:(M,C)=>{i.length=M+C-i.offset,i=i.parent,r(M+C)},onLiteralValue:(M,C,L)=>{o({type:S(M),offset:C,length:L,parent:i,value:M}),r(C+L)},onSeparator:(M,C,L)=>{i.type==="property"&&(M===":"?i.colonOffset=C:M===","&&r(C))},onError:(M,C,L)=>{a.push({error:M,offset:C,length:L})}},s);const k=i.children[0];return k&&delete k.parent,k}e.parseTree=u;function y(t,a){if(!t)return;let s=t;for(const i of a)if(typeof i=="string"){if(s.type!=="object"||!Array.isArray(s.children))return;let r=!1;for(const o of s.children)if(Array.isArray(o.children)&&o.children[0].value===i){s=o.children[1],r=!0;break}if(!r)return}else{const r=i;if(s.type!=="array"||r<0||!Array.isArray(s.children)||r>=s.children.length)return;s=s.children[r]}return s}e.findNodeAtLocation=y;function E(t){if(!t.parent||!t.parent.children)return[];const a=E(t.parent);if(t.parent.type==="property"){const s=t.parent.children[0].value;a.push(s)}else if(t.parent.type==="array"){const s=t.parent.children.indexOf(t);s!==-1&&a.push(s)}return a}e.getNodePath=E;function l(t){switch(t.type){case"array":return t.children.map(l);case"object":{const a=Object.create(null);for(const s of t.children){const i=s.children[1];i&&(a[s.children[0].value]=l(i))}return a}case"null":case"string":case"number":case"boolean":return t.value;default:return}}e.getNodeValue=l;function v(t,a,s=!1){return a>=t.offset&&a<t.offset+t.length||s&&a===t.offset+t.length}e.contains=v;function c(t,a,s=!1){if(v(t,a,s)){const i=t.children;if(Array.isArray(i))for(let r=0;r<i.length&&i[r].offset<=a;r++){const o=c(i[r],a,s);if(o)return o}return t}}e.findNodeAtOffset=c;function f(t,a,s=O.DEFAULT){const i=D(t,!1);function r(X){return X?()=>X(i.getTokenOffset(),i.getTokenLength()):()=>!0}function o(X){return X?se=>X(se,i.getTokenOffset(),i.getTokenLength()):()=>!0}const p=r(a.onObjectBegin),k=o(a.onObjectProperty),M=r(a.onObjectEnd),C=r(a.onArrayBegin),L=r(a.onArrayEnd),T=o(a.onLiteralValue),F=o(a.onSeparator),z=r(a.onComment),oe=o(a.onError),ne=s&&s.disallowComments,de=s&&s.allowTrailingComma;function ae(){for(;;){const X=i.scan();switch(i.getTokenError()){case 4:ue(14);break;case 5:ue(15);break;case 3:ue(13);break;case 1:ne||ue(11);break;case 2:ue(12);break;case 6:ue(16);break}switch(X){case 12:case 13:ne?ue(10):z();break;case 16:ue(1);break;case 15:case 14:break;default:return X}}}function ue(X,se=[],ce=[]){if(oe(X),se.length+ce.length>0){let x=i.getToken();for(;x!==17;){if(se.indexOf(x)!==-1){ae();break}else if(ce.indexOf(x)!==-1)break;x=ae()}}}function j(X){const se=i.getTokenValue();return X?T(se):k(se),ae(),!0}function G(){switch(i.getToken()){case 11:{let X=0;try{X=JSON.parse(i.getTokenValue()),typeof X!="number"&&(ue(2),X=0)}catch{ue(2)}T(X);break}case 7:T(null);break;case 8:T(!0);break;case 9:T(!1);break;default:return!1}return ae(),!0}function B(){return i.getToken()!==10?(ue(3,[],[2,5]),!1):(j(!1),i.getToken()===6?(F(":"),ae(),$()||ue(4,[],[2,5])):ue(5,[],[2,5]),!0)}function W(){p(),ae();let X=!1;for(;i.getToken()!==2&&i.getToken()!==17;){if(i.getToken()===5){if(X||ue(4,[],[]),F(","),ae(),i.getToken()===2&&de)break}else X&&ue(6,[],[]);B()||ue(4,[],[2,5]),X=!0}return M(),i.getToken()!==2?ue(7,[2],[]):ae(),!0}function U(){C(),ae();let X=!1;for(;i.getToken()!==4&&i.getToken()!==17;){if(i.getToken()===5){if(X||ue(4,[],[]),F(","),ae(),i.getToken()===4&&de)break}else X&&ue(6,[],[]);$()||ue(4,[],[4,5]),X=!0}return L(),i.getToken()!==4?ue(8,[4],[]):ae(),!0}function $(){switch(i.getToken()){case 3:return U();case 1:return W();case 10:return j(!0);default:return G()}}return ae(),i.getToken()===17?s.allowEmptyContent?!0:(ue(4,[],[]),!1):$()?(i.getToken()!==17&&ue(9,[],[]),!0):(ue(4,[],[]),!1)}e.visit=f;function I(t,a){const s=D(t),i=[];let r,o=0,p;do switch(p=s.getPosition(),r=s.scan(),r){case 12:case 13:case 17:o!==p&&i.push(t.substring(o,p)),a!==void 0&&i.push(s.getTokenValue().replace(/[^\r\n]/g,a)),o=s.getPosition();break}while(r!==17);return i.join("")}e.stripComments=I;function S(t){switch(typeof t){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(t){if(Array.isArray(t))return"array"}else return"null";return"object"}default:return"null"}}e.getNodeType=S}),define(Z[137],ee([0,1,44]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isEOL=e.getEOL=e.toFormattedString=e.format=void 0;function A(d,m,g){let w,u,y,E,l;if(m){for(E=m.offset,l=E+m.length,y=E;y>0&&!h(d,y-1);)y--;let p=l;for(;p<d.length&&!h(d,p);)p++;u=d.substring(y,p),w=D(u,g)}else u=d,w=0,y=0,E=0,l=d.length;const v=P(g,d);let c=!1,f=0,I;g.insertSpaces?I=O(" ",g.tabSize||4):I="	";const S=(0,b.createScanner)(u,!1);let t=!1;function a(){return v+O(I,w+f)}function s(){let p=S.scan();for(c=!1;p===15||p===14;)c=c||p===14,p=S.scan();return t=p===16||S.getTokenError()!==0,p}const i=[];function r(p,k,M){!t&&k<l&&M>E&&d.substring(k,M)!==p&&i.push({offset:k,length:M-k,content:p})}let o=s();if(o!==17){const p=S.getTokenOffset()+y,k=O(I,w);r(k,y,p)}for(;o!==17;){let p=S.getTokenOffset()+S.getTokenLength()+y,k=s(),M="";for(;!c&&(k===12||k===13);){const L=S.getTokenOffset()+y;r(" ",p,L),p=S.getTokenOffset()+S.getTokenLength()+y,M=k===12?a():"",k=s()}if(k===2)o!==1&&(f--,M=a());else if(k===4)o!==3&&(f--,M=a());else{switch(o){case 3:case 1:f++,M=a();break;case 5:case 12:M=a();break;case 13:c?M=a():M=" ";break;case 6:M=" ";break;case 10:if(k===6){M="";break}case 7:case 8:case 9:case 11:case 2:case 4:k===12||k===13?M=" ":k!==5&&k!==17&&(t=!0);break;case 16:t=!0;break}c&&(k===12||k===13)&&(M=a())}const C=S.getTokenOffset()+y;r(M,p,C),o=k}return i}e.format=A;function n(d,m){const g=JSON.stringify(d,void 0,m.insertSpaces?m.tabSize||4:"	");return m.eol!==void 0?g.replace(/\r\n|\r|\n/g,m.eol):g}e.toFormattedString=n;function O(d,m){let g="";for(let w=0;w<m;w++)g+=d;return g}function D(d,m){let g=0,w=0;const u=m.tabSize||4;for(;g<d.length;){const y=d.charAt(g);if(y===" ")w++;else if(y==="	")w+=u;else break;g++}return Math.floor(w/u)}function P(d,m){for(let g=0;g<m.length;g++){const w=m.charAt(g);if(w==="\r")return g+1<m.length&&m.charAt(g+1)===`
`?`\r
`:"\r";if(w===`
`)return`
`}return d&&d.eol||`
`}e.getEOL=P;function h(d,m){return`\r
`.indexOf(d.charAt(m))!==-1}e.isEOL=h}),define(Z[138],ee([0,1,44,137]),function(H,e,b,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.applyEdits=e.applyEdit=e.withFormatting=e.setProperty=e.removeProperty=void 0;function n(d,m,g){return O(d,m,void 0,g)}e.removeProperty=n;function O(d,m,g,w,u){const y=m.slice(),E=[],l=(0,b.parseTree)(d,E);let v,c;for(;y.length>0&&(c=y.pop(),v=(0,b.findNodeAtLocation)(l,y),v===void 0&&g!==void 0);)typeof c=="string"?g={[c]:g}:g=[g];if(v)if(v.type==="object"&&typeof c=="string"&&Array.isArray(v.children)){const f=(0,b.findNodeAtLocation)(v,[c]);if(f!==void 0)if(g===void 0){if(!f.parent)throw new Error("Malformed AST");const I=v.children.indexOf(f.parent);let S,t=f.parent.offset+f.parent.length;if(I>0){const a=v.children[I-1];S=a.offset+a.length}else S=v.offset+1,v.children.length>1&&(t=v.children[1].offset);return D(d,{offset:S,length:t-S,content:""},w)}else return D(d,{offset:f.offset,length:f.length,content:JSON.stringify(g)},w);else{if(g===void 0)return[];const I=`${JSON.stringify(c)}: ${JSON.stringify(g)}`,S=u?u(v.children.map(a=>a.children[0].value)):v.children.length;let t;if(S>0){const a=v.children[S-1];t={offset:a.offset+a.length,length:0,content:","+I}}else v.children.length===0?t={offset:v.offset+1,length:0,content:I}:t={offset:v.offset+1,length:0,content:I+","};return D(d,t,w)}}else if(v.type==="array"&&typeof c=="number"&&Array.isArray(v.children))if(g!==void 0){const f=`${JSON.stringify(g)}`;let I;if(v.children.length===0||c===0)I={offset:v.offset+1,length:0,content:v.children.length===0?f:f+","};else{const S=c===-1||c>v.children.length?v.children.length:c,t=v.children[S-1];I={offset:t.offset+t.length,length:0,content:","+f}}return D(d,I,w)}else{const f=c,I=v.children[f];let S;if(v.children.length===1)S={offset:v.offset+1,length:v.length-2,content:""};else if(v.children.length-1===f){const t=v.children[f-1],a=t.offset+t.length,s=v.offset+v.length;S={offset:a,length:s-2-a,content:""}}else S={offset:I.offset,length:v.children[f+1].offset-I.offset,content:""};return D(d,S,w)}else throw new Error(`Can not add ${typeof c!="number"?"index":"property"} to parent of type ${v.type}`);else{if(g===void 0)throw new Error("Can not delete in empty document");return D(d,{offset:l?l.offset:0,length:l?l.length:0,content:JSON.stringify(g)},w)}}e.setProperty=O;function D(d,m,g){let w=P(d,m),u=m.offset,y=m.offset+m.content.length;if(m.length===0||m.content.length===0){for(;u>0&&!(0,A.isEOL)(w,u-1);)u--;for(;y<w.length&&!(0,A.isEOL)(w,y);)y++}const E=(0,A.format)(w,{offset:u,length:y-u},g);for(let v=E.length-1;v>=0;v--){const c=E[v];w=P(w,c),u=Math.min(u,c.offset),y=Math.max(y,c.offset+c.length),y+=c.content.length-c.length}const l=d.length-(w.length-y)-u;return[{offset:u,length:l,content:w.substring(u,y)}]}e.withFormatting=D;function P(d,m){return d.substring(0,m.offset)+m.content+d.substring(m.offset+m.length)}e.applyEdit=P;function h(d,m){const g=m.slice(0).sort((u,y)=>{const E=u.offset-y.offset;return E===0?u.length-y.length:E});let w=d.length;for(let u=g.length-1;u>=0;u--){const y=g[u];if(y.offset+y.length<=w)d=P(d,y);else throw new Error("Overlapping edit");w=y.offset}return d}e.applyEdits=h}),define(Z[85],ee([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Lazy=void 0;class b{constructor(n){this.executor=n,this._didRun=!1}get hasValue(){return this._didRun}get value(){if(!this._didRun)try{this._value=this.executor()}catch(n){this._error=n}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}e.Lazy=b}),define(Z[2],ee([0,1,49,69]),function(H,e,b,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DisposableMap=e.disposeOnReturn=e.ImmortalReference=e.AsyncReferenceCollection=e.ReferenceCollection=e.SafeDisposable=e.RefCountedDisposable=e.MutableDisposable=e.Disposable=e.DisposableStore=e.toDisposable=e.combinedDisposable=e.disposeIfDisposable=e.dispose=e.isDisposable=e.markAsSingleton=e.setDisposableTracker=void 0;const n=!1;let O=null;function D(o){O=o}if(e.setDisposableTracker=D,n){const o="__is_disposable_tracked__";D(new class{trackDisposable(p){const k=new Error("Potentially leaked disposable").stack;setTimeout(()=>{p[o]||console.log(k)},3e3)}setParent(p,k){if(p&&p!==c.None)try{p[o]=!0}catch{}}markAsDisposed(p){if(p&&p!==c.None)try{p[o]=!0}catch{}}markAsSingleton(p){}})}function P(o){return O?.trackDisposable(o),o}function h(o){O?.markAsDisposed(o)}function d(o,p){O?.setParent(o,p)}function m(o,p){if(O)for(const k of o)O.setParent(k,p)}function g(o){return O?.markAsSingleton(o),o}e.markAsSingleton=g;function w(o){return typeof o.dispose=="function"&&o.dispose.length===0}e.isDisposable=w;function u(o){if(A.Iterable.is(o)){const p=[];for(const k of o)if(k)try{k.dispose()}catch(M){p.push(M)}if(p.length===1)throw p[0];if(p.length>1)throw new AggregateError(p,"Encountered errors while disposing of store");return Array.isArray(o)?[]:o}else if(o)return o.dispose(),o}e.dispose=u;function y(o){for(const p of o)w(p)&&p.dispose();return[]}e.disposeIfDisposable=y;function E(...o){const p=l(()=>u(o));return m(o,p),p}e.combinedDisposable=E;function l(o){const p=P({dispose:(0,b.once)(()=>{h(p),o()})});return p}e.toDisposable=l;class v{static{this.DISABLE_DISPOSED_WARNING=!1}constructor(){this._toDispose=new Set,this._isDisposed=!1,P(this)}dispose(){this._isDisposed||(h(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{u(this._toDispose)}finally{this._toDispose.clear()}}add(p){if(!p)return p;if(p===this)throw new Error("Cannot register a disposable on itself!");return d(p,this),this._isDisposed?v.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(p),p}}e.DisposableStore=v;class c{static{this.None=Object.freeze({dispose(){}})}constructor(){this._store=new v,P(this),d(this._store,this)}dispose(){h(this),this._store.dispose()}_register(p){if(p===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(p)}}e.Disposable=c;class f{constructor(){this._isDisposed=!1,P(this)}get value(){return this._isDisposed?void 0:this._value}set value(p){this._isDisposed||p===this._value||(this._value?.dispose(),p&&d(p,this),this._value=p)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,h(this),this._value?.dispose(),this._value=void 0}clearAndLeak(){const p=this._value;return this._value=void 0,p&&d(p,null),p}}e.MutableDisposable=f;class I{constructor(p){this._disposable=p,this._counter=1}acquire(){return this._counter++,this}release(){return--this._counter===0&&this._disposable.dispose(),this}}e.RefCountedDisposable=I;class S{constructor(){this.dispose=()=>{},this.unset=()=>{},this.isset=()=>!1,P(this)}set(p){let k=p;return this.unset=()=>k=void 0,this.isset=()=>k!==void 0,this.dispose=()=>{k&&(k(),k=void 0,h(this))},this}}e.SafeDisposable=S;class t{constructor(){this.references=new Map}acquire(p,...k){let M=this.references.get(p);M||(M={counter:0,object:this.createReferencedObject(p,...k)},this.references.set(p,M));const{object:C}=M,L=(0,b.once)(()=>{--M.counter===0&&(this.destroyReferencedObject(p,M.object),this.references.delete(p))});return M.counter++,{object:C,dispose:L}}}e.ReferenceCollection=t;class a{constructor(p){this.referenceCollection=p}async acquire(p,...k){const M=this.referenceCollection.acquire(p,...k);try{return{object:await M.object,dispose:()=>M.dispose()}}catch(C){throw M.dispose(),C}}}e.AsyncReferenceCollection=a;class s{constructor(p){this.object=p}dispose(){}}e.ImmortalReference=s;function i(o){const p=new v;try{o(p)}finally{p.dispose()}}e.disposeOnReturn=i;class r{constructor(){this._store=new Map,this._isDisposed=!1,P(this)}dispose(){h(this),this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{u(this._store.values())}finally{this._store.clear()}}has(p){return this._store.has(p)}get(p){return this._store.get(p)}set(p,k,M=!1){this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),M||this._store.get(p)?.dispose(),this._store.set(p,k)}deleteAndDispose(p){this._store.get(p)?.dispose(),this._store.delete(p)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}e.DisposableMap=r}),define(Z[103],ee([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedList=void 0;class b{static{this.Undefined=new b(void 0)}constructor(O){this.element=O,this.next=b.Undefined,this.prev=b.Undefined}}class A{constructor(){this._first=b.Undefined,this._last=b.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===b.Undefined}clear(){let O=this._first;for(;O!==b.Undefined;){const D=O.next;O.prev=b.Undefined,O.next=b.Undefined,O=D}this._first=b.Undefined,this._last=b.Undefined,this._size=0}unshift(O){return this._insert(O,!1)}push(O){return this._insert(O,!0)}_insert(O,D){const P=new b(O);if(this._first===b.Undefined)this._first=P,this._last=P;else if(D){const d=this._last;this._last=P,P.prev=d,d.next=P}else{const d=this._first;this._first=P,P.next=d,d.prev=P}this._size+=1;let h=!1;return()=>{h||(h=!0,this._remove(P))}}shift(){if(this._first!==b.Undefined){const O=this._first.element;return this._remove(this._first),O}}pop(){if(this._last!==b.Undefined){const O=this._last.element;return this._remove(this._last),O}}_remove(O){if(O.prev!==b.Undefined&&O.next!==b.Undefined){const D=O.prev;D.next=O.next,O.next.prev=D}else O.prev===b.Undefined&&O.next===b.Undefined?(this._first=b.Undefined,this._last=b.Undefined):O.next===b.Undefined?(this._last=this._last.prev,this._last.next=b.Undefined):O.prev===b.Undefined&&(this._first=this._first.next,this._first.prev=b.Undefined);this._size-=1}*[Symbol.iterator](){let O=this._first;for(;O!==b.Undefined;)yield O.element,O=O.next}}e.LinkedList=A}),define(Z[35],ee([0,1]),function(H,e){"use strict";var b,A,n;Object.defineProperty(e,"__esModule",{value:!0}),e.CounterSet=e.LRUCache=e.LinkedMap=e.Touch=e.ResourceSet=e.ResourceMap=e.setToString=e.mapToString=e.getOrSet=void 0;function O(E,l,v){let c=E.get(l);return c===void 0&&(c=v,E.set(l,c)),c}e.getOrSet=O;function D(E){const l=[];return E.forEach((v,c)=>{l.push(`${c} => ${v}`)}),`Map(${E.size}) {${l.join(", ")}}`}e.mapToString=D;function P(E){const l=[];return E.forEach(v=>{l.push(v)}),`Set(${E.size}) {${l.join(", ")}}`}e.setToString=P;class h{constructor(l,v){this.uri=l,this.value=v}}class d{static{this.defaultToKey=l=>l.toString()}constructor(l,v){this[b]="ResourceMap",l instanceof d?(this.map=new Map(l.map),this.toKey=v??d.defaultToKey):(this.map=new Map,this.toKey=l??d.defaultToKey)}set(l,v){return this.map.set(this.toKey(l),new h(l,v)),this}get(l){return this.map.get(this.toKey(l))?.value}has(l){return this.map.has(this.toKey(l))}get size(){return this.map.size}clear(){this.map.clear()}delete(l){return this.map.delete(this.toKey(l))}forEach(l,v){typeof v<"u"&&(l=l.bind(v));for(const[c,f]of this.map)l(f.value,f.uri,this)}*values(){for(const l of this.map.values())yield l.value}*keys(){for(const l of this.map.values())yield l.uri}*entries(){for(const l of this.map.values())yield[l.uri,l.value]}*[(b=Symbol.toStringTag,Symbol.iterator)](){for(const[,l]of this.map)yield[l.uri,l.value]}}e.ResourceMap=d;class m{constructor(l,v){this[A]="ResourceSet",!l||typeof l=="function"?this._map=new d(l):(this._map=new d(v),l.forEach(this.add,this))}get size(){return this._map.size}add(l){return this._map.set(l,l),this}clear(){this._map.clear()}delete(l){return this._map.delete(l)}forEach(l,v){this._map.forEach((c,f)=>l.call(v,f,f,this))}has(l){return this._map.has(l)}entries(){return this._map.entries()}keys(){return this._map.keys()}values(){return this._map.keys()}[(A=Symbol.toStringTag,Symbol.iterator)](){return this.keys()}}e.ResourceSet=m;var g;(function(E){E[E.None=0]="None",E[E.AsOld=1]="AsOld",E[E.AsNew=2]="AsNew"})(g||(e.Touch=g={}));class w{constructor(){this[n]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(l){return this._map.has(l)}get(l,v=0){const c=this._map.get(l);if(c)return v!==0&&this.touch(c,v),c.value}set(l,v,c=0){let f=this._map.get(l);if(f)f.value=v,c!==0&&this.touch(f,c);else{switch(f={key:l,value:v,next:void 0,previous:void 0},c){case 0:this.addItemLast(f);break;case 1:this.addItemFirst(f);break;case 2:this.addItemLast(f);break;default:this.addItemLast(f);break}this._map.set(l,f),this._size++}return this}delete(l){return!!this.remove(l)}remove(l){const v=this._map.get(l);if(v)return this._map.delete(l),this.removeItem(v),this._size--,v.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const l=this._head;return this._map.delete(l.key),this.removeItem(l),this._size--,l.value}forEach(l,v){const c=this._state;let f=this._head;for(;f;){if(v?l.bind(v)(f.value,f.key,this):l(f.value,f.key,this),this._state!==c)throw new Error("LinkedMap got modified during iteration.");f=f.next}}keys(){const l=this,v=this._state;let c=this._head;const f={[Symbol.iterator](){return f},next(){if(l._state!==v)throw new Error("LinkedMap got modified during iteration.");if(c){const I={value:c.key,done:!1};return c=c.next,I}else return{value:void 0,done:!0}}};return f}values(){const l=this,v=this._state;let c=this._head;const f={[Symbol.iterator](){return f},next(){if(l._state!==v)throw new Error("LinkedMap got modified during iteration.");if(c){const I={value:c.value,done:!1};return c=c.next,I}else return{value:void 0,done:!0}}};return f}entries(){const l=this,v=this._state;let c=this._head;const f={[Symbol.iterator](){return f},next(){if(l._state!==v)throw new Error("LinkedMap got modified during iteration.");if(c){const I={value:[c.key,c.value],done:!1};return c=c.next,I}else return{value:void 0,done:!0}}};return f}[(n=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(l){if(l>=this.size)return;if(l===0){this.clear();return}let v=this._head,c=this.size;for(;v&&c>l;)this._map.delete(v.key),v=v.next,c--;this._head=v,this._size=c,v&&(v.previous=void 0),this._state++}addItemFirst(l){if(!this._head&&!this._tail)this._tail=l;else if(this._head)l.next=this._head,this._head.previous=l;else throw new Error("Invalid list");this._head=l,this._state++}addItemLast(l){if(!this._head&&!this._tail)this._head=l;else if(this._tail)l.previous=this._tail,this._tail.next=l;else throw new Error("Invalid list");this._tail=l,this._state++}removeItem(l){if(l===this._head&&l===this._tail)this._head=void 0,this._tail=void 0;else if(l===this._head){if(!l.next)throw new Error("Invalid list");l.next.previous=void 0,this._head=l.next}else if(l===this._tail){if(!l.previous)throw new Error("Invalid list");l.previous.next=void 0,this._tail=l.previous}else{const v=l.next,c=l.previous;if(!v||!c)throw new Error("Invalid list");v.previous=c,c.next=v}l.next=void 0,l.previous=void 0,this._state++}touch(l,v){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(v!==1&&v!==2)){if(v===1){if(l===this._head)return;const c=l.next,f=l.previous;l===this._tail?(f.next=void 0,this._tail=f):(c.previous=f,f.next=c),l.previous=void 0,l.next=this._head,this._head.previous=l,this._head=l,this._state++}else if(v===2){if(l===this._tail)return;const c=l.next,f=l.previous;l===this._head?(c.previous=void 0,this._head=c):(c.previous=f,f.next=c),l.next=void 0,l.previous=this._tail,this._tail.next=l,this._tail=l,this._state++}}}toJSON(){const l=[];return this.forEach((v,c)=>{l.push([c,v])}),l}fromJSON(l){this.clear();for(const[v,c]of l)this.set(v,c)}}e.LinkedMap=w;class u extends w{constructor(l,v=1){super(),this._limit=l,this._ratio=Math.min(Math.max(0,v),1)}get limit(){return this._limit}set limit(l){this._limit=l,this.checkTrim()}get ratio(){return this._ratio}set ratio(l){this._ratio=Math.min(Math.max(0,l),1),this.checkTrim()}get(l,v=2){return super.get(l,v)}peek(l){return super.get(l,0)}set(l,v){return super.set(l,v,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}e.LRUCache=u;class y{constructor(){this.map=new Map}add(l){return this.map.set(l,(this.map.get(l)||0)+1),this}delete(l){let v=this.map.get(l)||0;return v===0?!1:(v--,v===0?this.map.delete(l):this.map.set(l,v),!0)}has(l){return this.map.has(l)}}e.CounterSet=y}),define(Z[86],ee([0,1,35]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.removeAccents=e.normalizeNFD=e.normalizeNFC=void 0;const A=new b.LRUCache(1e4);function n(d){return h(d,"NFC",A)}e.normalizeNFC=n;const O=new b.LRUCache(1e4);function D(d){return h(d,"NFD",O)}e.normalizeNFD=D;const P=/[^\u0000-\u0080]/;function h(d,m,g){if(!d)return d;const w=g.get(d);if(w)return w;let u;return P.test(d)?u=d.normalize(m):u=d,g.set(d,u),u}e.removeAccents=function(){const d=/[\u0300-\u036f]/g;return function(m){return D(m).replace(d,"")}}()}),define(Z[139],ee([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SlidingWindowAverage=e.MovingAverage=e.Counter=e.rot=e.clamp=void 0;function b(P,h,d){return Math.min(Math.max(P,h),d)}e.clamp=b;function A(P,h){return(h+P%h)%h}e.rot=A;class n{constructor(){this._next=0}getNext(){return this._next++}}e.Counter=n;class O{constructor(){this._n=1,this._val=0}update(h){return this._val=this._val+(h-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}}e.MovingAverage=O;class D{constructor(h){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(h),this._values.fill(0,0,h)}update(h){const d=this._values[this._index];return this._values[this._index]=h,this._index=(this._index+1)%this._values.length,this._sum-=d,this._sum+=h,this._n<this._values.length&&(this._n+=1),this._val=this._sum/this._n,this._val}get value(){return this._val}}e.SlidingWindowAverage=D}),function(){function H(n){const O=[];typeof n=="number"&&O.push("code/timeOrigin",n);function D(h){O.push(h,Date.now())}function P(){const h=[];for(let d=0;d<O.length;d+=2)h.push({name:O[d],startTime:O[d+1]});return h}return{mark:D,getMarks:P}}function e(){if(typeof performance=="object"&&typeof performance.mark=="function"&&!performance.nodeTiming)return typeof performance.timeOrigin!="number"&&!performance.timing?H():{mark(n){performance.mark(n)},getMarks(){let n=performance.timeOrigin;typeof n!="number"&&(n=performance.timing.navigationStart||performance.timing.redirectStart||performance.timing.fetchStart);const O=[{name:"code/timeOrigin",startTime:Math.round(n)}];for(const D of performance.getEntriesByType("mark"))O.push({name:D.name,startTime:Math.round(n+D.startTime)});return O}};if(typeof process=="object"){const n=performance?.timeOrigin??Math.round((require.__$__nodeRequire||require)("perf_hooks").performance.timeOrigin);return H(n)}else return console.trace("perf-util loaded in UNKNOWN environment"),H()}function b(n){return n.MonacoPerformanceMarks||(n.MonacoPerformanceMarks=e()),n.MonacoPerformanceMarks}var A;typeof global=="object"?A=global:typeof self=="object"?A=self:A={},typeof define=="function"?define("vs/base/common/performance",[],function(){return b(A)}):typeof module=="object"&&typeof module.exports=="object"?module.exports=b(A):(console.trace("perf-util defined in UNKNOWN context (neither requirejs or commonjs)"),A.perf=b(A))}(),function(H,e){if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define("vs/base/common/semver/semver",[],e);else{var b=e();for(var A in b)(typeof exports=="object"?exports:H)[A]=b[A]}}(typeof self<"u"?self:this,function(){return function(H){var e={};function b(A){if(e[A])return e[A].exports;var n=e[A]={i:A,l:!1,exports:{}};return H[A].call(n.exports,n,n.exports,b),n.l=!0,n.exports}return b.m=H,b.c=e,b.d=function(A,n,O){b.o(A,n)||Object.defineProperty(A,n,{enumerable:!0,get:O})},b.r=function(A){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(A,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(A,"__esModule",{value:!0})},b.t=function(A,n){if(1&n&&(A=b(A)),8&n||4&n&&typeof A=="object"&&A&&A.__esModule)return A;var O=Object.create(null);if(b.r(O),Object.defineProperty(O,"default",{enumerable:!0,value:A}),2&n&&typeof A!="string")for(var D in A)b.d(O,D,function(P){return A[P]}.bind(null,D));return O},b.n=function(A){var n=A&&A.__esModule?function(){return A.default}:function(){return A};return b.d(n,"a",n),n},b.o=function(A,n){return Object.prototype.hasOwnProperty.call(A,n)},b.p="",b(b.s=0)}([function(H,e,b){(function(A){var n;e=H.exports=ce,n=typeof A=="object"&&A.env&&A.env.NODE_DEBUG&&/\bsemver\b/i.test(A.env.NODE_DEBUG)?function(){var K=Array.prototype.slice.call(arguments,0);K.unshift("SEMVER"),console.log.apply(console,K)}:function(){},e.SEMVER_SPEC_VERSION="2.0.0";var O=256,D=Number.MAX_SAFE_INTEGER||9007199254740991,P=e.re=[],h=e.src=[],d=0,m=d++;h[m]="0|[1-9]\\d*";var g=d++;h[g]="[0-9]+";var w=d++;h[w]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var u=d++;h[u]="("+h[m]+")\\.("+h[m]+")\\.("+h[m]+")";var y=d++;h[y]="("+h[g]+")\\.("+h[g]+")\\.("+h[g]+")";var E=d++;h[E]="(?:"+h[m]+"|"+h[w]+")";var l=d++;h[l]="(?:"+h[g]+"|"+h[w]+")";var v=d++;h[v]="(?:-("+h[E]+"(?:\\."+h[E]+")*))";var c=d++;h[c]="(?:-?("+h[l]+"(?:\\."+h[l]+")*))";var f=d++;h[f]="[0-9A-Za-z-]+";var I=d++;h[I]="(?:\\+("+h[f]+"(?:\\."+h[f]+")*))";var S=d++,t="v?"+h[u]+h[v]+"?"+h[I]+"?";h[S]="^"+t+"$";var a="[v=\\s]*"+h[y]+h[c]+"?"+h[I]+"?",s=d++;h[s]="^"+a+"$";var i=d++;h[i]="((?:<|>)?=?)";var r=d++;h[r]=h[g]+"|x|X|\\*";var o=d++;h[o]=h[m]+"|x|X|\\*";var p=d++;h[p]="[v=\\s]*("+h[o]+")(?:\\.("+h[o]+")(?:\\.("+h[o]+")(?:"+h[v]+")?"+h[I]+"?)?)?";var k=d++;h[k]="[v=\\s]*("+h[r]+")(?:\\.("+h[r]+")(?:\\.("+h[r]+")(?:"+h[c]+")?"+h[I]+"?)?)?";var M=d++;h[M]="^"+h[i]+"\\s*"+h[p]+"$";var C=d++;h[C]="^"+h[i]+"\\s*"+h[k]+"$";var L=d++;h[L]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var T=d++;h[T]="(?:~>?)";var F=d++;h[F]="(\\s*)"+h[T]+"\\s+",P[F]=new RegExp(h[F],"g");var z=d++;h[z]="^"+h[T]+h[p]+"$";var oe=d++;h[oe]="^"+h[T]+h[k]+"$";var ne=d++;h[ne]="(?:\\^)";var de=d++;h[de]="(\\s*)"+h[ne]+"\\s+",P[de]=new RegExp(h[de],"g");var ae=d++;h[ae]="^"+h[ne]+h[p]+"$";var ue=d++;h[ue]="^"+h[ne]+h[k]+"$";var j=d++;h[j]="^"+h[i]+"\\s*("+a+")$|^$";var G=d++;h[G]="^"+h[i]+"\\s*("+t+")$|^$";var B=d++;h[B]="(\\s*)"+h[i]+"\\s*("+a+"|"+h[p]+")",P[B]=new RegExp(h[B],"g");var W=d++;h[W]="^\\s*("+h[p]+")\\s+-\\s+("+h[p]+")\\s*$";var U=d++;h[U]="^\\s*("+h[k]+")\\s+-\\s+("+h[k]+")\\s*$";var $=d++;h[$]="(<|>)?=?\\s*\\*";for(var X=0;X<35;X++)n(X,h[X]),P[X]||(P[X]=new RegExp(h[X]));function se(K,he){if(K instanceof ce)return K;if(typeof K!="string"||K.length>O||!(he?P[s]:P[S]).test(K))return null;try{return new ce(K,he)}catch{return null}}function ce(K,he){if(K instanceof ce){if(K.loose===he)return K;K=K.version}else if(typeof K!="string")throw new TypeError("Invalid Version: "+K);if(K.length>O)throw new TypeError("version is longer than "+O+" characters");if(!(this instanceof ce))return new ce(K,he);n("SemVer",K,he),this.loose=he;var me=K.trim().match(he?P[s]:P[S]);if(!me)throw new TypeError("Invalid Version: "+K);if(this.raw=K,this.major=+me[1],this.minor=+me[2],this.patch=+me[3],this.major>D||this.major<0)throw new TypeError("Invalid major version");if(this.minor>D||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>D||this.patch<0)throw new TypeError("Invalid patch version");me[4]?this.prerelease=me[4].split(".").map(function(Ie){if(/^[0-9]+$/.test(Ie)){var Le=+Ie;if(Le>=0&&Le<D)return Le}return Ie}):this.prerelease=[],this.build=me[5]?me[5].split("."):[],this.format()}e.parse=se,e.valid=function(K,he){var me=se(K,he);return me?me.version:null},e.clean=function(K,he){var me=se(K.trim().replace(/^[=v]+/,""),he);return me?me.version:null},e.SemVer=ce,ce.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},ce.prototype.toString=function(){return this.version},ce.prototype.compare=function(K){return n("SemVer.compare",this.version,this.loose,K),K instanceof ce||(K=new ce(K,this.loose)),this.compareMain(K)||this.comparePre(K)},ce.prototype.compareMain=function(K){return K instanceof ce||(K=new ce(K,this.loose)),R(this.major,K.major)||R(this.minor,K.minor)||R(this.patch,K.patch)},ce.prototype.comparePre=function(K){if(K instanceof ce||(K=new ce(K,this.loose)),this.prerelease.length&&!K.prerelease.length)return-1;if(!this.prerelease.length&&K.prerelease.length)return 1;if(!this.prerelease.length&&!K.prerelease.length)return 0;var he=0;do{var me=this.prerelease[he],Ie=K.prerelease[he];if(n("prerelease compare",he,me,Ie),me===void 0&&Ie===void 0)return 0;if(Ie===void 0)return 1;if(me===void 0)return-1;if(me!==Ie)return R(me,Ie)}while(++he)},ce.prototype.inc=function(K,he){switch(K){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",he);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",he);break;case"prepatch":this.prerelease.length=0,this.inc("patch",he),this.inc("pre",he);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",he),this.inc("pre",he);break;case"major":this.minor===0&&this.patch===0&&this.prerelease.length!==0||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":this.patch===0&&this.prerelease.length!==0||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{for(var me=this.prerelease.length;--me>=0;)typeof this.prerelease[me]=="number"&&(this.prerelease[me]++,me=-2);me===-1&&this.prerelease.push(0)}he&&(this.prerelease[0]===he?isNaN(this.prerelease[1])&&(this.prerelease=[he,0]):this.prerelease=[he,0]);break;default:throw new Error("invalid increment argument: "+K)}return this.format(),this.raw=this.version,this},e.inc=function(K,he,me,Ie){typeof me=="string"&&(Ie=me,me=void 0);try{return new ce(K,me).inc(he,Ie).version}catch{return null}},e.diff=function(K,he){if(re(K,he))return null;var me=se(K),Ie=se(he);if(me.prerelease.length||Ie.prerelease.length){for(var Le in me)if((Le==="major"||Le==="minor"||Le==="patch")&&me[Le]!==Ie[Le])return"pre"+Le;return"prerelease"}for(var Le in me)if((Le==="major"||Le==="minor"||Le==="patch")&&me[Le]!==Ie[Le])return Le},e.compareIdentifiers=R;var x=/^[0-9]+$/;function R(K,he){var me=x.test(K),Ie=x.test(he);return me&&Ie&&(K=+K,he=+he),me&&!Ie?-1:Ie&&!me?1:K<he?-1:K>he?1:0}function _(K,he,me){return new ce(K,me).compare(new ce(he,me))}function N(K,he,me){return _(K,he,me)>0}function q(K,he,me){return _(K,he,me)<0}function re(K,he,me){return _(K,he,me)===0}function ie(K,he,me){return _(K,he,me)!==0}function le(K,he,me){return _(K,he,me)>=0}function V(K,he,me){return _(K,he,me)<=0}function te(K,he,me,Ie){var Le;switch(he){case"===":typeof K=="object"&&(K=K.version),typeof me=="object"&&(me=me.version),Le=K===me;break;case"!==":typeof K=="object"&&(K=K.version),typeof me=="object"&&(me=me.version),Le=K!==me;break;case"":case"=":case"==":Le=re(K,me,Ie);break;case"!=":Le=ie(K,me,Ie);break;case">":Le=N(K,me,Ie);break;case">=":Le=le(K,me,Ie);break;case"<":Le=q(K,me,Ie);break;case"<=":Le=V(K,me,Ie);break;default:throw new TypeError("Invalid operator: "+he)}return Le}function Q(K,he){if(K instanceof Q){if(K.loose===he)return K;K=K.value}if(!(this instanceof Q))return new Q(K,he);n("comparator",K,he),this.loose=he,this.parse(K),this.semver===fe?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}e.rcompareIdentifiers=function(K,he){return R(he,K)},e.major=function(K,he){return new ce(K,he).major},e.minor=function(K,he){return new ce(K,he).minor},e.patch=function(K,he){return new ce(K,he).patch},e.compare=_,e.compareLoose=function(K,he){return _(K,he,!0)},e.rcompare=function(K,he,me){return _(he,K,me)},e.sort=function(K,he){return K.sort(function(me,Ie){return e.compare(me,Ie,he)})},e.rsort=function(K,he){return K.sort(function(me,Ie){return e.rcompare(me,Ie,he)})},e.gt=N,e.lt=q,e.eq=re,e.neq=ie,e.gte=le,e.lte=V,e.cmp=te,e.Comparator=Q;var fe={};function pe(K,he){if(K instanceof pe)return K.loose===he?K:new pe(K.raw,he);if(K instanceof Q)return new pe(K.value,he);if(!(this instanceof pe))return new pe(K,he);if(this.loose=he,this.raw=K,this.set=K.split(/\s*\|\|\s*/).map(function(me){return this.parseRange(me.trim())},this).filter(function(me){return me.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+K);this.format()}function Pe(K){return!K||K.toLowerCase()==="x"||K==="*"}function De(K,he,me,Ie,Le,Fe,Oe,qe,Ne,He,J,ge,ve){return((he=Pe(me)?"":Pe(Ie)?">="+me+".0.0":Pe(Le)?">="+me+"."+Ie+".0":">="+he)+" "+(qe=Pe(Ne)?"":Pe(He)?"<"+(+Ne+1)+".0.0":Pe(J)?"<"+Ne+"."+(+He+1)+".0":ge?"<="+Ne+"."+He+"."+J+"-"+ge:"<="+qe)).trim()}function We(K,he){for(var me=0;me<K.length;me++)if(!K[me].test(he))return!1;if(he.prerelease.length){for(me=0;me<K.length;me++)if(n(K[me].semver),K[me].semver!==fe&&K[me].semver.prerelease.length>0){var Ie=K[me].semver;if(Ie.major===he.major&&Ie.minor===he.minor&&Ie.patch===he.patch)return!0}return!1}return!0}function ye(K,he,me){try{he=new pe(he,me)}catch{return!1}return he.test(K)}function we(K,he,me,Ie){var Le,Fe,Oe,qe,Ne;switch(K=new ce(K,Ie),he=new pe(he,Ie),me){case">":Le=N,Fe=V,Oe=q,qe=">",Ne=">=";break;case"<":Le=q,Fe=le,Oe=N,qe="<",Ne="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ye(K,he,Ie))return!1;for(var He=0;He<he.set.length;++He){var J=he.set[He],ge=null,ve=null;if(J.forEach(function(Ee){Ee.semver===fe&&(Ee=new Q(">=0.0.0")),ge=ge||Ee,ve=ve||Ee,Le(Ee.semver,ge.semver,Ie)?ge=Ee:Oe(Ee.semver,ve.semver,Ie)&&(ve=Ee)}),ge.operator===qe||ge.operator===Ne||(!ve.operator||ve.operator===qe)&&Fe(K,ve.semver)||ve.operator===Ne&&Oe(K,ve.semver))return!1}return!0}Q.prototype.parse=function(K){var he=this.loose?P[j]:P[G],me=K.match(he);if(!me)throw new TypeError("Invalid comparator: "+K);this.operator=me[1],this.operator==="="&&(this.operator=""),me[2]?this.semver=new ce(me[2],this.loose):this.semver=fe},Q.prototype.toString=function(){return this.value},Q.prototype.test=function(K){return n("Comparator.test",K,this.loose),this.semver===fe||(typeof K=="string"&&(K=new ce(K,this.loose)),te(K,this.operator,this.semver,this.loose))},Q.prototype.intersects=function(K,he){if(!(K instanceof Q))throw new TypeError("a Comparator is required");var me;if(this.operator==="")return me=new pe(K.value,he),ye(this.value,me,he);if(K.operator==="")return me=new pe(this.value,he),ye(K.semver,me,he);var Ie=!(this.operator!==">="&&this.operator!==">"||K.operator!==">="&&K.operator!==">"),Le=!(this.operator!=="<="&&this.operator!=="<"||K.operator!=="<="&&K.operator!=="<"),Fe=this.semver.version===K.semver.version,Oe=!(this.operator!==">="&&this.operator!=="<="||K.operator!==">="&&K.operator!=="<="),qe=te(this.semver,"<",K.semver,he)&&(this.operator===">="||this.operator===">")&&(K.operator==="<="||K.operator==="<"),Ne=te(this.semver,">",K.semver,he)&&(this.operator==="<="||this.operator==="<")&&(K.operator===">="||K.operator===">");return Ie||Le||Fe&&Oe||qe||Ne},e.Range=pe,pe.prototype.format=function(){return this.range=this.set.map(function(K){return K.join(" ").trim()}).join("||").trim(),this.range},pe.prototype.toString=function(){return this.range},pe.prototype.parseRange=function(K){var he=this.loose;K=K.trim(),n("range",K,he);var me=he?P[U]:P[W];K=K.replace(me,De),n("hyphen replace",K),K=K.replace(P[B],"$1$2$3"),n("comparator trim",K,P[B]),K=(K=(K=K.replace(P[F],"$1~")).replace(P[de],"$1^")).split(/\s+/).join(" ");var Ie=he?P[j]:P[G],Le=K.split(" ").map(function(Fe){return function(Oe,qe){return n("comp",Oe),Oe=function(Ne,He){return Ne.trim().split(/\s+/).map(function(J){return function(ge,ve){n("caret",ge,ve);var Ee=ve?P[ue]:P[ae];return ge.replace(Ee,function(Ae,Me,_e,ze,Be){var Ve;return n("caret",ge,Ae,Me,_e,ze,Be),Pe(Me)?Ve="":Pe(_e)?Ve=">="+Me+".0.0 <"+(+Me+1)+".0.0":Pe(ze)?Ve=Me==="0"?">="+Me+"."+_e+".0 <"+Me+"."+(+_e+1)+".0":">="+Me+"."+_e+".0 <"+(+Me+1)+".0.0":Be?(n("replaceCaret pr",Be),Be.charAt(0)!=="-"&&(Be="-"+Be),Ve=Me==="0"?_e==="0"?">="+Me+"."+_e+"."+ze+Be+" <"+Me+"."+_e+"."+(+ze+1):">="+Me+"."+_e+"."+ze+Be+" <"+Me+"."+(+_e+1)+".0":">="+Me+"."+_e+"."+ze+Be+" <"+(+Me+1)+".0.0"):(n("no pr"),Ve=Me==="0"?_e==="0"?">="+Me+"."+_e+"."+ze+" <"+Me+"."+_e+"."+(+ze+1):">="+Me+"."+_e+"."+ze+" <"+Me+"."+(+_e+1)+".0":">="+Me+"."+_e+"."+ze+" <"+(+Me+1)+".0.0"),n("caret return",Ve),Ve})}(J,He)}).join(" ")}(Oe,qe),n("caret",Oe),Oe=function(Ne,He){return Ne.trim().split(/\s+/).map(function(J){return function(ge,ve){var Ee=ve?P[oe]:P[z];return ge.replace(Ee,function(Ae,Me,_e,ze,Be){var Ve;return n("tilde",ge,Ae,Me,_e,ze,Be),Pe(Me)?Ve="":Pe(_e)?Ve=">="+Me+".0.0 <"+(+Me+1)+".0.0":Pe(ze)?Ve=">="+Me+"."+_e+".0 <"+Me+"."+(+_e+1)+".0":Be?(n("replaceTilde pr",Be),Be.charAt(0)!=="-"&&(Be="-"+Be),Ve=">="+Me+"."+_e+"."+ze+Be+" <"+Me+"."+(+_e+1)+".0"):Ve=">="+Me+"."+_e+"."+ze+" <"+Me+"."+(+_e+1)+".0",n("tilde return",Ve),Ve})}(J,He)}).join(" ")}(Oe,qe),n("tildes",Oe),Oe=function(Ne,He){return n("replaceXRanges",Ne,He),Ne.split(/\s+/).map(function(J){return function(ge,ve){ge=ge.trim();var Ee=ve?P[C]:P[M];return ge.replace(Ee,function(Ae,Me,_e,ze,Be,Ve){n("xRange",ge,Ae,Me,_e,ze,Be,Ve);var Ye=Pe(_e),Xe=Ye||Pe(ze),Je=Xe||Pe(Be);return Me==="="&&Je&&(Me=""),Ye?Ae=Me===">"||Me==="<"?"<0.0.0":"*":Me&&Je?(Xe&&(ze=0),Je&&(Be=0),Me===">"?(Me=">=",Xe?(_e=+_e+1,ze=0,Be=0):Je&&(ze=+ze+1,Be=0)):Me==="<="&&(Me="<",Xe?_e=+_e+1:ze=+ze+1),Ae=Me+_e+"."+ze+"."+Be):Xe?Ae=">="+_e+".0.0 <"+(+_e+1)+".0.0":Je&&(Ae=">="+_e+"."+ze+".0 <"+_e+"."+(+ze+1)+".0"),n("xRange return",Ae),Ae})}(J,He)}).join(" ")}(Oe,qe),n("xrange",Oe),Oe=function(Ne,He){return n("replaceStars",Ne,He),Ne.trim().replace(P[$],"")}(Oe,qe),n("stars",Oe),Oe}(Fe,he)}).join(" ").split(/\s+/);return this.loose&&(Le=Le.filter(function(Fe){return!!Fe.match(Ie)})),Le=Le.map(function(Fe){return new Q(Fe,he)})},pe.prototype.intersects=function(K,he){if(!(K instanceof pe))throw new TypeError("a Range is required");return this.set.some(function(me){return me.every(function(Ie){return K.set.some(function(Le){return Le.every(function(Fe){return Ie.intersects(Fe,he)})})})})},e.toComparators=function(K,he){return new pe(K,he).set.map(function(me){return me.map(function(Ie){return Ie.value}).join(" ").trim().split(" ")})},pe.prototype.test=function(K){if(!K)return!1;typeof K=="string"&&(K=new ce(K,this.loose));for(var he=0;he<this.set.length;he++)if(We(this.set[he],K))return!0;return!1},e.satisfies=ye,e.maxSatisfying=function(K,he,me){var Ie=null,Le=null;try{var Fe=new pe(he,me)}catch{return null}return K.forEach(function(Oe){Fe.test(Oe)&&(Ie&&Le.compare(Oe)!==-1||(Le=new ce(Ie=Oe,me)))}),Ie},e.minSatisfying=function(K,he,me){var Ie=null,Le=null;try{var Fe=new pe(he,me)}catch{return null}return K.forEach(function(Oe){Fe.test(Oe)&&(Ie&&Le.compare(Oe)!==1||(Le=new ce(Ie=Oe,me)))}),Ie},e.validRange=function(K,he){try{return new pe(K,he).range||"*"}catch{return null}},e.ltr=function(K,he,me){return we(K,he,"<",me)},e.gtr=function(K,he,me){return we(K,he,">",me)},e.outside=we,e.prerelease=function(K,he){var me=se(K,he);return me&&me.prerelease.length?me.prerelease:null},e.intersects=function(K,he,me){return K=new pe(K,me),he=new pe(he,me),K.intersects(he)},e.coerce=function(K){if(K instanceof ce)return K;if(typeof K!="string")return null;var he=K.match(P[L]);return he==null?null:se((he[1]||"0")+"."+(he[2]||"0")+"."+(he[3]||"0"))}}).call(this,b(1))},function(H,e){var b,A,n=H.exports={};function O(){throw new Error("setTimeout has not been defined")}function D(){throw new Error("clearTimeout has not been defined")}function P(l){if(b===setTimeout)return setTimeout(l,0);if((b===O||!b)&&setTimeout)return b=setTimeout,setTimeout(l,0);try{return b(l,0)}catch{try{return b.call(null,l,0)}catch{return b.call(this,l,0)}}}(function(){try{b=typeof setTimeout=="function"?setTimeout:O}catch{b=O}try{A=typeof clearTimeout=="function"?clearTimeout:D}catch{A=D}})();var h,d=[],m=!1,g=-1;function w(){m&&h&&(m=!1,h.length?d=h.concat(d):g=-1,d.length&&u())}function u(){if(!m){var l=P(w);m=!0;for(var v=d.length;v;){for(h=d,d=[];++g<v;)h&&h[g].run();g=-1,v=d.length}h=null,m=!1,function(c){if(A===clearTimeout)return clearTimeout(c);if((A===D||!A)&&clearTimeout)return A=clearTimeout,clearTimeout(c);try{A(c)}catch{try{return A.call(null,c)}catch{return A.call(this,c)}}}(l)}}function y(l,v){this.fun=l,this.array=v}function E(){}n.nextTick=function(l){var v=new Array(arguments.length-1);if(arguments.length>1)for(var c=1;c<arguments.length;c++)v[c-1]=arguments[c];d.push(new y(l,v)),d.length!==1||m||P(u)},y.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=E,n.addListener=E,n.once=E,n.off=E,n.removeListener=E,n.removeAllListeners=E,n.emit=E,n.prependListener=E,n.prependOnceListener=E,n.listeners=function(l){return[]},n.binding=function(l){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(l){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}}])}),define(Z[140],ee([0,1]),function(H,e){"use strict";var b;Object.defineProperty(e,"__esModule",{value:!0}),e.SkipList=void 0;class A{constructor(P,h,d){this.level=P,this.key=h,this.value=d,this.forward=[]}}const n=void 0;class O{constructor(P,h=2**16){this.comparator=P,this[b]="SkipList",this._level=0,this._size=0,this._maxLevel=Math.max(1,Math.log2(h)|0),this._header=new A(this._maxLevel,n,n)}get size(){return this._size}clear(){this._header=new A(this._maxLevel,n,n)}has(P){return!!O._search(this,P,this.comparator)}get(P){return O._search(this,P,this.comparator)?.value}set(P,h){return O._insert(this,P,h,this.comparator)&&(this._size+=1),this}delete(P){const h=O._delete(this,P,this.comparator);return h&&(this._size-=1),h}forEach(P,h){let d=this._header.forward[0];for(;d;)P.call(h,d.value,d.key,this),d=d.forward[0]}[(b=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}*entries(){let P=this._header.forward[0];for(;P;)yield[P.key,P.value],P=P.forward[0]}*keys(){let P=this._header.forward[0];for(;P;)yield P.key,P=P.forward[0]}*values(){let P=this._header.forward[0];for(;P;)yield P.value,P=P.forward[0]}toString(){let P="[SkipList]:",h=this._header.forward[0];for(;h;)P+=`node(${h.key}, ${h.value}, lvl:${h.level})`,h=h.forward[0];return P}static _search(P,h,d){let m=P._header;for(let g=P._level-1;g>=0;g--)for(;m.forward[g]&&d(m.forward[g].key,h)<0;)m=m.forward[g];if(m=m.forward[0],m&&d(m.key,h)===0)return m}static _insert(P,h,d,m){const g=[];let w=P._header;for(let u=P._level-1;u>=0;u--){for(;w.forward[u]&&m(w.forward[u].key,h)<0;)w=w.forward[u];g[u]=w}if(w=w.forward[0],w&&m(w.key,h)===0)return w.value=d,!1;{const u=O._randomLevel(P);if(u>P._level){for(let y=P._level;y<u;y++)g[y]=P._header;P._level=u}w=new A(u,h,d);for(let y=0;y<u;y++)w.forward[y]=g[y].forward[y],g[y].forward[y]=w;return!0}}static _randomLevel(P,h=.5){let d=1;for(;Math.random()<h&&d<P._maxLevel;)d+=1;return d}static _delete(P,h,d){const m=[];let g=P._header;for(let w=P._level-1;w>=0;w--){for(;g.forward[w]&&d(g.forward[w].key,h)<0;)g=g.forward[w];m[w]=g}if(g=g.forward[0],!g||d(g.key,h)!==0)return!1;for(let w=0;w<P._level&&m[w].forward[w]===g;w++)m[w].forward[w]=g.forward[w];for(;P._level>0&&P._header.forward[P._level-1]===n;)P._level-=1;return!0}}e.SkipList=O}),define(Z[70],ee([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StopWatch=void 0;const b=globalThis.performance&&typeof globalThis.performance.now=="function";class A{static create(O){return new A(O)}constructor(O){this._now=b&&O===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}}e.StopWatch=A}),define(Z[3],ee([0,1,13,49,2,103,70]),function(H,e,b,A,n,O,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Relay=e.EventBufferer=e.DynamicListEventMultiplexer=e.EventMultiplexer=e.MicrotaskEmitter=e.DebounceEmitter=e.PauseableEmitter=e.AsyncEmitter=e.createEventDeliveryQueue=e.Emitter=e.setGlobalLeakWarningThreshold=e.EventProfiling=e.Event=void 0;const P=!1,h=!1;var d;(function(M){M.None=()=>n.Disposable.None;function C(le){if(h){const{onDidAddListener:V}=le,te=y.create();let Q=0;le.onDidAddListener=()=>{++Q===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),te.print()),V?.()}}}function L(le,V){return j(le,()=>{},0,void 0,!0,void 0,V)}M.defer=L;function T(le){return(V,te=null,Q)=>{let fe=!1,pe;return pe=le(Pe=>{if(!fe)return pe?pe.dispose():fe=!0,V.call(te,Pe)},null,Q),fe&&pe.dispose(),pe}}M.once=T;function F(le,V,te){return ue((Q,fe=null,pe)=>le(Pe=>Q.call(fe,V(Pe)),null,pe),te)}M.map=F;function z(le,V,te){return ue((Q,fe=null,pe)=>le(Pe=>{V(Pe),Q.call(fe,Pe)},null,pe),te)}M.forEach=z;function oe(le,V,te){return ue((Q,fe=null,pe)=>le(Pe=>V(Pe)&&Q.call(fe,Pe),null,pe),te)}M.filter=oe;function ne(le){return le}M.signal=ne;function de(...le){return(V,te=null,Q)=>(0,n.combinedDisposable)(...le.map(fe=>fe(pe=>V.call(te,pe),null,Q)))}M.any=de;function ae(le,V,te,Q){let fe=te;return F(le,pe=>(fe=V(fe,pe),fe),Q)}M.reduce=ae;function ue(le,V){let te;const Q={onWillAddFirstListener(){te=le(fe.fire,fe)},onDidRemoveLastListener(){te?.dispose()}};V||C(Q);const fe=new f(Q);return V?.add(fe),fe.event}function j(le,V,te=100,Q=!1,fe=!1,pe,Pe){let De,We,ye,we=0,K;const he={leakWarningThreshold:pe,onWillAddFirstListener(){De=le(Ie=>{we++,We=V(We,Ie),Q&&!ye&&(me.fire(We),We=void 0),K=()=>{const Le=We;We=void 0,ye=void 0,(!Q||we>1)&&me.fire(Le),we=0},typeof te=="number"?(clearTimeout(ye),ye=setTimeout(K,te)):ye===void 0&&(ye=0,queueMicrotask(K))})},onWillRemoveListener(){fe&&we>0&&K?.()},onDidRemoveLastListener(){K=void 0,De.dispose()}};Pe||C(he);const me=new f(he);return Pe?.add(me),me.event}M.debounce=j;function G(le,V=0,te){return M.debounce(le,(Q,fe)=>Q?(Q.push(fe),Q):[fe],V,void 0,!0,void 0,te)}M.accumulate=G;function B(le,V=(Q,fe)=>Q===fe,te){let Q=!0,fe;return oe(le,pe=>{const Pe=Q||!V(pe,fe);return Q=!1,fe=pe,Pe},te)}M.latch=B;function W(le,V,te){return[M.filter(le,V,te),M.filter(le,Q=>!V(Q),te)]}M.split=W;function U(le,V=!1,te=[]){let Q=te.slice(),fe=le(De=>{Q?Q.push(De):Pe.fire(De)});const pe=()=>{Q?.forEach(De=>Pe.fire(De)),Q=null},Pe=new f({onWillAddFirstListener(){fe||(fe=le(De=>Pe.fire(De)))},onDidAddFirstListener(){Q&&(V?setTimeout(pe):pe())},onDidRemoveLastListener(){fe&&fe.dispose(),fe=null}});return Pe.event}M.buffer=U;class ${constructor(V){this.event=V,this.disposables=new n.DisposableStore}map(V){return new $(F(this.event,V,this.disposables))}forEach(V){return new $(z(this.event,V,this.disposables))}filter(V){return new $(oe(this.event,V,this.disposables))}reduce(V,te){return new $(ae(this.event,V,te,this.disposables))}latch(){return new $(B(this.event,void 0,this.disposables))}debounce(V,te=100,Q=!1,fe=!1,pe){return new $(j(this.event,V,te,Q,fe,pe,this.disposables))}on(V,te,Q){return this.event(V,te,Q)}once(V,te,Q){return T(this.event)(V,te,Q)}dispose(){this.disposables.dispose()}}function X(le){return new $(le)}M.chain=X;function se(le,V,te=Q=>Q){const Q=(...De)=>Pe.fire(te(...De)),fe=()=>le.on(V,Q),pe=()=>le.removeListener(V,Q),Pe=new f({onWillAddFirstListener:fe,onDidRemoveLastListener:pe});return Pe.event}M.fromNodeEventEmitter=se;function ce(le,V,te=Q=>Q){const Q=(...De)=>Pe.fire(te(...De)),fe=()=>le.addEventListener(V,Q),pe=()=>le.removeEventListener(V,Q),Pe=new f({onWillAddFirstListener:fe,onDidRemoveLastListener:pe});return Pe.event}M.fromDOMEventEmitter=ce;function x(le){return new Promise(V=>T(le)(V))}M.toPromise=x;function R(le){const V=new f;return le.then(te=>{V.fire(te)},()=>{V.fire(void 0)}).finally(()=>{V.dispose()}),V.event}M.fromPromise=R;function _(le,V){return V(void 0),le(te=>V(te))}M.runAndSubscribe=_;function N(le,V){let te=null;function Q(pe){te?.dispose(),te=new n.DisposableStore,V(pe,te)}Q(void 0);const fe=le(pe=>Q(pe));return(0,n.toDisposable)(()=>{fe.dispose(),te?.dispose()})}M.runAndSubscribeWithStore=N;class q{constructor(V,te){this._observable=V,this._counter=0,this._hasChanged=!1;const Q={onWillAddFirstListener:()=>{V.addObserver(this)},onDidRemoveLastListener:()=>{V.removeObserver(this)}};te||C(Q),this.emitter=new f(Q),te&&te.add(this.emitter)}beginUpdate(V){this._counter++}handlePossibleChange(V){}handleChange(V,te){this._hasChanged=!0}endUpdate(V){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function re(le,V){return new q(le,V).emitter.event}M.fromObservable=re;function ie(le){return V=>{let te=0,Q=!1;const fe={beginUpdate(){te++},endUpdate(){te--,te===0&&(le.reportChanges(),Q&&(Q=!1,V()))},handlePossibleChange(){},handleChange(){Q=!0}};return le.addObserver(fe),le.reportChanges(),{dispose(){le.removeObserver(fe)}}}}M.fromObservableLight=ie})(d||(e.Event=d={}));class m{static{this.all=new Set}static{this._idPool=0}constructor(C){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${C}_${m._idPool++}`,m.all.add(this)}start(C){this._stopWatch=new D.StopWatch,this.listenerCount=C}stop(){if(this._stopWatch){const C=this._stopWatch.elapsed();this.durations.push(C),this.elapsedOverall+=C,this.invocationCount+=1,this._stopWatch=void 0}}}e.EventProfiling=m;let g=-1;function w(M){const C=g;return g=M,{dispose(){g=C}}}e.setGlobalLeakWarningThreshold=w;class u{constructor(C,L=Math.random().toString(18).slice(2,5)){this.threshold=C,this.name=L,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(C,L){const T=this.threshold;if(T<=0||L<T)return;this._stacks||(this._stacks=new Map);const F=this._stacks.get(C.value)||0;if(this._stacks.set(C.value,F+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=T*.5;let z,oe=0;for(const[ne,de]of this._stacks)(!z||oe<de)&&(z=ne,oe=de);console.warn(`[${this.name}] potential listener LEAK detected, having ${L} listeners already. MOST frequent listener (${oe}):`),console.warn(z)}return()=>{const z=this._stacks.get(C.value)||0;this._stacks.set(C.value,z-1)}}}class y{static create(){return new y(new Error().stack??"")}constructor(C){this.value=C}print(){console.warn(this.value.split(`
`).slice(2).join(`
`))}}let E=0;class l{constructor(C){this.value=C,this.id=E++}}const v=2,c=(M,C)=>{if(M instanceof l)C(M);else for(let L=0;L<M.length;L++){const T=M[L];T&&C(T)}};class f{constructor(C){this._size=0,this._options=C,this._leakageMon=g>0||this._options?.leakWarningThreshold?new u(this._options?.leakWarningThreshold??g):void 0,this._perfMon=this._options?._profName?new m(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(P){const C=this._listeners;queueMicrotask(()=>{c(C,L=>L.stack?.print())})}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??=(C,L,T)=>{if(this._disposed)return n.Disposable.None;L&&(C=C.bind(L));const F=new l(C);let z,oe;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(F.stack=y.create(),z=this._leakageMon.check(F.stack,this._size+1)),P&&(F.stack=oe??y.create()),this._listeners?this._listeners instanceof l?(this._deliveryQueue??=new S,this._listeners=[this._listeners,F]):this._listeners.push(F):(this._options?.onWillAddFirstListener?.(this),this._listeners=F,this._options?.onDidAddFirstListener?.(this)),this._size++;const ne=(0,n.toDisposable)(()=>{z?.(),this._removeListener(F)});return T instanceof n.DisposableStore?T.add(ne):Array.isArray(T)&&T.push(ne),ne},this._event}_removeListener(C){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}const L=this._listeners,T=L.indexOf(C);if(T===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,L[T]=void 0;const F=this._deliveryQueue.current===this;if(this._size*v<=L.length){let z=0;for(let oe=0;oe<L.length;oe++)L[oe]?L[z++]=L[oe]:F&&(this._deliveryQueue.end--,z<this._deliveryQueue.i&&this._deliveryQueue.i--);L.length=z}}_deliver(C,L){if(!C)return;const T=this._options?.onListenerError||b.onUnexpectedError;if(!T){C.value(L);return}try{C.value(L)}catch(F){T(F)}}_deliverQueue(C){const L=C.current._listeners;for(;C.i<C.end;)this._deliver(L[C.i++],C.value);C.reset()}fire(C){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof l)this._deliver(this._listeners,C);else{const L=this._deliveryQueue;L.enqueue(this,C,this._listeners.length),this._deliverQueue(L)}this._perfMon?.stop()}hasListeners(){return this._size>0}}e.Emitter=f;const I=()=>new S;e.createEventDeliveryQueue=I;class S{constructor(){this.i=-1,this.end=0}enqueue(C,L,T){this.i=0,this.end=T,this.current=C,this.value=L}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}class t extends f{async fireAsync(C,L,T){if(this._listeners)for(this._asyncDeliveryQueue||(this._asyncDeliveryQueue=new O.LinkedList),c(this._listeners,F=>this._asyncDeliveryQueue.push([F.value,C]));this._asyncDeliveryQueue.size>0&&!L.isCancellationRequested;){const[F,z]=this._asyncDeliveryQueue.shift(),oe=[],ne={...z,token:L,waitUntil:de=>{if(Object.isFrozen(oe))throw new Error("waitUntil can NOT be called asynchronous");T&&(de=T(de,F)),oe.push(de)}};try{F(ne)}catch(de){(0,b.onUnexpectedError)(de);continue}Object.freeze(oe),await Promise.allSettled(oe).then(de=>{for(const ae of de)ae.status==="rejected"&&(0,b.onUnexpectedError)(ae.reason)})}}}e.AsyncEmitter=t;class a extends f{get isPaused(){return this._isPaused!==0}constructor(C){super(C),this._isPaused=0,this._eventQueue=new O.LinkedList,this._mergeFn=C?.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){if(this._eventQueue.size>0){const C=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(C))}}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(C){this._size&&(this._isPaused!==0?this._eventQueue.push(C):super.fire(C))}}e.PauseableEmitter=a;class s extends a{constructor(C){super(C),this._delay=C.delay??100}fire(C){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(C)}}e.DebounceEmitter=s;class i extends f{constructor(C){super(C),this._queuedEvents=[],this._mergeFn=C?.merge}fire(C){this.hasListeners()&&(this._queuedEvents.push(C),this._queuedEvents.length===1&&queueMicrotask(()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach(L=>super.fire(L)),this._queuedEvents=[]}))}}e.MicrotaskEmitter=i;class r{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new f({onWillAddFirstListener:()=>this.onFirstListenerAdd(),onDidRemoveLastListener:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(C){const L={event:C,listener:null};this.events.push(L),this.hasListeners&&this.hook(L);const T=()=>{this.hasListeners&&this.unhook(L);const F=this.events.indexOf(L);this.events.splice(F,1)};return(0,n.toDisposable)((0,A.once)(T))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach(C=>this.hook(C))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach(C=>this.unhook(C))}hook(C){C.listener=C.event(L=>this.emitter.fire(L))}unhook(C){C.listener&&C.listener.dispose(),C.listener=null}dispose(){this.emitter.dispose()}}e.EventMultiplexer=r;class o{constructor(C,L,T,F){this._store=new n.DisposableStore;const z=this._store.add(new r),oe=this._store.add(new n.DisposableMap);function ne(de){oe.set(de,z.add(F(de)))}for(const de of C)ne(de);this._store.add(L(de=>{ne(de)})),this._store.add(T(de=>{oe.deleteAndDispose(de)})),this.event=z.event}dispose(){this._store.dispose()}}e.DynamicListEventMultiplexer=o;class p{constructor(){this.buffers=[]}wrapEvent(C){return(L,T,F)=>C(z=>{const oe=this.buffers[this.buffers.length-1];oe?oe.push(()=>L.call(T,z)):L.call(T,z)},void 0,F)}bufferEvents(C){const L=[];this.buffers.push(L);const T=C();return this.buffers.pop(),L.forEach(F=>F()),T}}e.EventBufferer=p;class k{constructor(){this.listening=!1,this.inputEvent=d.None,this.inputEventListener=n.Disposable.None,this.emitter=new f({onDidAddFirstListener:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onDidRemoveLastListener:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(C){this.inputEvent=C,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=C(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}e.Relay=k}),define(Z[23],ee([0,1,3]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;const A=Object.freeze(function(P,h){const d=setTimeout(P.bind(h),0);return{dispose(){clearTimeout(d)}}});var n;(function(P){function h(d){return d===P.None||d===P.Cancelled||d instanceof O?!0:!d||typeof d!="object"?!1:typeof d.isCancellationRequested=="boolean"&&typeof d.onCancellationRequested=="function"}P.isCancellationToken=h,P.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:b.Event.None}),P.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:A})})(n||(e.CancellationToken=n={}));class O{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?A:(this._emitter||(this._emitter=new b.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class D{constructor(h){this._token=void 0,this._parentListener=void 0,this._parentListener=h&&h.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new O),this._token}cancel(){this._token?this._token instanceof O&&this._token.cancel():this._token=n.Cancelled}dispose(h=!1){h&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof O&&this._token.dispose():this._token=n.None}}e.CancellationTokenSource=D}),define(Z[141],ee([0,1,23]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CachedFunction=e.LRUCachedFunction=e.Cache=void 0;class A{constructor(P){this.task=P,this.result=null}get(){if(this.result)return this.result;const P=new b.CancellationTokenSource,h=this.task(P.token);return this.result={promise:h,dispose:()=>{this.result=null,P.cancel(),P.dispose()}},this.result}}e.Cache=A;class n{constructor(P){this.fn=P,this.lastCache=void 0,this.lastArgKey=void 0}get(P){const h=JSON.stringify(P);return this.lastArgKey!==h&&(this.lastArgKey=h,this.lastCache=this.fn(P)),this.lastCache}}e.LRUCachedFunction=n;class O{get cachedValues(){return this._map}constructor(P){this.fn=P,this._map=new Map}get(P){if(this._map.has(P))return this._map.get(P);const h=this.fn(P);return this._map.set(P,h),h}}e.CachedFunction=O}),define(Z[56],ee([0,1,13,2]),function(H,e,b,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.prefixedStream=e.prefixedReadable=e.transform=e.toReadable=e.emptyStream=e.toStream=e.peekStream=e.listenStream=e.consumeStream=e.peekReadable=e.consumeReadable=e.newWriteableStream=e.isReadableBufferedStream=e.isReadableStream=e.isReadable=void 0;function n(I){const S=I;return S?typeof S.read=="function":!1}e.isReadable=n;function O(I){const S=I;return S?[S.on,S.pause,S.resume,S.destroy].every(t=>typeof t=="function"):!1}e.isReadableStream=O;function D(I){const S=I;return S?O(S.stream)&&Array.isArray(S.buffer)&&typeof S.ended=="boolean":!1}e.isReadableBufferedStream=D;function P(I,S){return new h(I,S)}e.newWriteableStream=P;class h{constructor(S,t){this.reducer=S,this.options=t,this.state={flowing:!1,ended:!1,destroyed:!1},this.buffer={data:[],error:[]},this.listeners={data:[],error:[],end:[]},this.pendingWritePromises=[]}pause(){this.state.destroyed||(this.state.flowing=!1)}resume(){this.state.destroyed||this.state.flowing||(this.state.flowing=!0,this.flowData(),this.flowErrors(),this.flowEnd())}write(S){if(!this.state.destroyed){if(this.state.flowing)this.emitData(S);else if(this.buffer.data.push(S),typeof this.options?.highWaterMark=="number"&&this.buffer.data.length>this.options.highWaterMark)return new Promise(t=>this.pendingWritePromises.push(t))}}error(S){this.state.destroyed||(this.state.flowing?this.emitError(S):this.buffer.error.push(S))}end(S){this.state.destroyed||(typeof S<"u"&&this.write(S),this.state.flowing?(this.emitEnd(),this.destroy()):this.state.ended=!0)}emitData(S){this.listeners.data.slice(0).forEach(t=>t(S))}emitError(S){this.listeners.error.length===0?(0,b.onUnexpectedError)(S):this.listeners.error.slice(0).forEach(t=>t(S))}emitEnd(){this.listeners.end.slice(0).forEach(S=>S())}on(S,t){if(!this.state.destroyed)switch(S){case"data":this.listeners.data.push(t),this.resume();break;case"end":this.listeners.end.push(t),this.state.flowing&&this.flowEnd()&&this.destroy();break;case"error":this.listeners.error.push(t),this.state.flowing&&this.flowErrors();break}}removeListener(S,t){if(this.state.destroyed)return;let a;switch(S){case"data":a=this.listeners.data;break;case"end":a=this.listeners.end;break;case"error":a=this.listeners.error;break}if(a){const s=a.indexOf(t);s>=0&&a.splice(s,1)}}flowData(){if(this.buffer.data.length>0){const S=this.reducer(this.buffer.data);this.emitData(S),this.buffer.data.length=0;const t=[...this.pendingWritePromises];this.pendingWritePromises.length=0,t.forEach(a=>a())}}flowErrors(){if(this.listeners.error.length>0){for(const S of this.buffer.error)this.emitError(S);this.buffer.error.length=0}}flowEnd(){return this.state.ended?(this.emitEnd(),this.listeners.end.length>0):!1}destroy(){this.state.destroyed||(this.state.destroyed=!0,this.state.ended=!0,this.buffer.data.length=0,this.buffer.error.length=0,this.listeners.data.length=0,this.listeners.error.length=0,this.listeners.end.length=0,this.pendingWritePromises.length=0)}}function d(I,S){const t=[];let a;for(;(a=I.read())!==null;)t.push(a);return S(t)}e.consumeReadable=d;function m(I,S,t){const a=[];let s;for(;(s=I.read())!==null&&a.length<t;)a.push(s);return s===null&&a.length>0?S(a):{read:()=>{if(a.length>0)return a.shift();if(typeof s<"u"){const i=s;return s=void 0,i}return I.read()}}}e.peekReadable=m;function g(I,S){return new Promise((t,a)=>{const s=[];w(I,{onData:i=>{S&&s.push(i)},onError:i=>{S?a(i):t(void 0)},onEnd:()=>{t(S?S(s):void 0)}})})}e.consumeStream=g;function w(I,S,t){I.on("error",a=>{t?.isCancellationRequested||S.onError(a)}),I.on("end",()=>{t?.isCancellationRequested||S.onEnd()}),I.on("data",a=>{t?.isCancellationRequested||S.onData(a)})}e.listenStream=w;function u(I,S){return new Promise((t,a)=>{const s=new A.DisposableStore,i=[],r=k=>{if(i.push(k),i.length>S)return s.dispose(),I.pause(),t({stream:I,buffer:i,ended:!1})},o=k=>a(k),p=()=>t({stream:I,buffer:i,ended:!0});s.add((0,A.toDisposable)(()=>I.removeListener("error",o))),I.on("error",o),s.add((0,A.toDisposable)(()=>I.removeListener("end",p))),I.on("end",p),s.add((0,A.toDisposable)(()=>I.removeListener("data",r))),I.on("data",r)})}e.peekStream=u;function y(I,S){const t=P(S);return t.end(I),t}e.toStream=y;function E(){const I=P(()=>{throw new Error("not supported")});return I.end(),I}e.emptyStream=E;function l(I){let S=!1;return{read:()=>S?null:(S=!0,I)}}e.toReadable=l;function v(I,S,t){const a=P(t);return w(I,{onData:s=>a.write(S.data(s)),onError:s=>a.error(S.error?S.error(s):s),onEnd:()=>a.end()}),a}e.transform=v;function c(I,S,t){let a=!1;return{read:()=>{const s=S.read();return a?s:(a=!0,s!==null?t([I,s]):I)}}}e.prefixedReadable=c;function f(I,S,t){let a=!1;const s=P(t);return w(S,{onData:i=>a?s.write(i):(a=!0,s.write(t([I,i]))),onError:i=>s.error(i),onEnd:()=>{a||(a=!0,s.write(I)),s.end()}}),s}e.prefixedStream=f}),define(Z[17],ee([0,1,85,56]),function(H,e,b,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encodeBase64=e.decodeBase64=e.prefixedBufferStream=e.prefixedBufferReadable=e.newWriteableBufferStream=e.streamToBufferReadableStream=e.bufferToStream=e.bufferedStreamToBuffer=e.streamToBuffer=e.bufferToReadable=e.readableToBuffer=e.writeUInt8=e.readUInt8=e.writeUInt32LE=e.readUInt32LE=e.writeUInt32BE=e.readUInt32BE=e.writeUInt16LE=e.readUInt16LE=e.binaryIndexOf=e.VSBuffer=void 0;const n=typeof Buffer<"u",O=new b.Lazy(()=>new Uint8Array(256));let D,P;class h{static alloc(L){return n?new h(Buffer.allocUnsafe(L)):new h(new Uint8Array(L))}static wrap(L){return n&&!Buffer.isBuffer(L)&&(L=Buffer.from(L.buffer,L.byteOffset,L.byteLength)),new h(L)}static fromString(L,T){return!(T?.dontUseNodeBuffer||!1)&&n?new h(Buffer.from(L)):(D||(D=new TextEncoder),new h(D.encode(L)))}static fromByteArray(L){const T=h.alloc(L.length);for(let F=0,z=L.length;F<z;F++)T.buffer[F]=L[F];return T}static concat(L,T){if(typeof T>"u"){T=0;for(let oe=0,ne=L.length;oe<ne;oe++)T+=L[oe].byteLength}const F=h.alloc(T);let z=0;for(let oe=0,ne=L.length;oe<ne;oe++){const de=L[oe];F.set(de,z),z+=de.byteLength}return F}constructor(L){this.buffer=L,this.byteLength=this.buffer.byteLength}clone(){const L=h.alloc(this.byteLength);return L.set(this),L}toString(){return n?this.buffer.toString():(P||(P=new TextDecoder),P.decode(this.buffer))}slice(L,T){return new h(this.buffer.subarray(L,T))}set(L,T){if(L instanceof h)this.buffer.set(L.buffer,T);else if(L instanceof Uint8Array)this.buffer.set(L,T);else if(L instanceof ArrayBuffer)this.buffer.set(new Uint8Array(L),T);else if(ArrayBuffer.isView(L))this.buffer.set(new Uint8Array(L.buffer,L.byteOffset,L.byteLength),T);else throw new Error("Unknown argument 'array'")}readUInt32BE(L){return w(this.buffer,L)}writeUInt32BE(L,T){u(this.buffer,L,T)}readUInt32LE(L){return y(this.buffer,L)}writeUInt32LE(L,T){E(this.buffer,L,T)}readUInt8(L){return l(this.buffer,L)}writeUInt8(L,T){v(this.buffer,L,T)}indexOf(L,T=0){return d(this.buffer,L instanceof h?L.buffer:L,T)}}e.VSBuffer=h;function d(C,L,T=0){const F=L.byteLength,z=C.byteLength;if(F===0)return 0;if(F===1)return C.indexOf(L[0]);if(F>z-T)return-1;const oe=O.value;oe.fill(L.length);for(let ue=0;ue<L.length;ue++)oe[L[ue]]=L.length-ue-1;let ne=T+L.length-1,de=ne,ae=-1;for(;ne<z;)if(C[ne]===L[de]){if(de===0){ae=ne;break}ne--,de--}else ne+=Math.max(L.length-de,oe[C[ne]]),de=L.length-1;return ae}e.binaryIndexOf=d;function m(C,L){return C[L+0]<<0>>>0|C[L+1]<<8>>>0}e.readUInt16LE=m;function g(C,L,T){C[T+0]=L&255,L=L>>>8,C[T+1]=L&255}e.writeUInt16LE=g;function w(C,L){return C[L]*2**24+C[L+1]*2**16+C[L+2]*2**8+C[L+3]}e.readUInt32BE=w;function u(C,L,T){C[T+3]=L,L=L>>>8,C[T+2]=L,L=L>>>8,C[T+1]=L,L=L>>>8,C[T]=L}e.writeUInt32BE=u;function y(C,L){return C[L+0]<<0>>>0|C[L+1]<<8>>>0|C[L+2]<<16>>>0|C[L+3]<<24>>>0}e.readUInt32LE=y;function E(C,L,T){C[T+0]=L&255,L=L>>>8,C[T+1]=L&255,L=L>>>8,C[T+2]=L&255,L=L>>>8,C[T+3]=L&255}e.writeUInt32LE=E;function l(C,L){return C[L]}e.readUInt8=l;function v(C,L,T){C[T]=L}e.writeUInt8=v;function c(C){return A.consumeReadable(C,L=>h.concat(L))}e.readableToBuffer=c;function f(C){return A.toReadable(C)}e.bufferToReadable=f;function I(C){return A.consumeStream(C,L=>h.concat(L))}e.streamToBuffer=I;async function S(C){return C.ended?h.concat(C.buffer):h.concat([...C.buffer,await I(C.stream)])}e.bufferedStreamToBuffer=S;function t(C){return A.toStream(C,L=>h.concat(L))}e.bufferToStream=t;function a(C){return A.transform(C,{data:L=>typeof L=="string"?h.fromString(L):h.wrap(L)},L=>h.concat(L))}e.streamToBufferReadableStream=a;function s(C){return A.newWriteableStream(L=>h.concat(L),C)}e.newWriteableBufferStream=s;function i(C,L){return A.prefixedReadable(C,L,T=>h.concat(T))}e.prefixedBufferReadable=i;function r(C,L){return A.prefixedStream(C,L,T=>h.concat(T))}e.prefixedBufferStream=r;function o(C){let L=0,T=0,F=0;const z=new Uint8Array(Math.floor(C.length/4*3)),oe=de=>{switch(T){case 3:z[F++]=L|de,T=0;break;case 2:z[F++]=L|de>>>2,L=de<<6,T=3;break;case 1:z[F++]=L|de>>>4,L=de<<4,T=2;break;default:L=de<<2,T=1}};for(let de=0;de<C.length;de++){const ae=C.charCodeAt(de);if(ae>=65&&ae<=90)oe(ae-65);else if(ae>=97&&ae<=122)oe(ae-97+26);else if(ae>=48&&ae<=57)oe(ae-48+52);else if(ae===43||ae===45)oe(62);else if(ae===47||ae===95)oe(63);else{if(ae===61)break;throw new SyntaxError(`Unexpected base64 character ${C[de]}`)}}const ne=F;for(;T>0;)oe(0);return h.wrap(z).slice(0,ne)}e.decodeBase64=o;const p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";function M({buffer:C},L=!0,T=!1){const F=T?k:p;let z="";const oe=C.byteLength%3;let ne=0;for(;ne<C.byteLength-oe;ne+=3){const de=C[ne+0],ae=C[ne+1],ue=C[ne+2];z+=F[de>>>2],z+=F[(de<<4|ae>>>4)&63],z+=F[(ae<<2|ue>>>6)&63],z+=F[ue&63]}if(oe===1){const de=C[ne+0];z+=F[de>>>2],z+=F[de<<4&63],L&&(z+="==")}else if(oe===2){const de=C[ne+0],ae=C[ne+1];z+=F[de>>>2],z+=F[(de<<4|ae>>>4)&63],z+=F[ae<<2&63],L&&(z+="=")}return z}e.encodeBase64=M}),define(Z[26],ee([0,1,141,85]),function(H,e,b,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InvisibleCharacters=e.AmbiguousCharacters=e.noBreakWhitespace=e.getLeftDeleteOffset=e.GraphemeBreakType=e.getGraphemeBreakType=e.singleLetterHash=e.getNLines=e.uppercaseFirstLetter=e.containsUppercaseCharacter=e.fuzzyContains=e.repeat=e.stripUTF8BOM=e.startsWithUTF8BOM=e.UTF8_BOM_CHARACTER=e.removeAnsiEscapeCodes=e.lcut=e.isEmojiImprecise=e.isFullWidthCharacter=e.containsUnusualLineTerminators=e.UNUSUAL_LINE_TERMINATORS=e.isBasicASCII=e.containsRTL=e.charCount=e.getCharContainingOffset=e.prevCharLength=e.nextCharLength=e.GraphemeIterator=e.CodePointIterator=e.getNextCodePoint=e.computeCodePoint=e.isLowSurrogate=e.isHighSurrogate=e.commonSuffixLength=e.commonPrefixLength=e.startsWithIgnoreCase=e.equalsIgnoreCase=e.isUpperAsciiLetter=e.isLowerAsciiLetter=e.isAsciiDigit=e.compareSubstringIgnoreCase=e.compareIgnoreCase=e.compareSubstring=e.compare=e.replaceAsync=e.lastNonWhitespaceIndex=e.getLeadingWhitespace=e.firstNonWhitespaceIndex=e.splitLines=e.regExpLeadsToEndlessLoop=e.createRegExp=e.stripWildcards=e.convertSimple2RegExpPattern=e.rtrim=e.ltrim=e.trim=e.truncate=e.count=e.escapeRegExpCharacters=e.escape=e.format2=e.format=e.isFalsyOrWhitespace=void 0;function n(J){return!J||typeof J!="string"?!0:J.trim().length===0}e.isFalsyOrWhitespace=n;const O=/{(\d+)}/g;function D(J,...ge){return ge.length===0?J:J.replace(O,function(ve,Ee){const Ae=parseInt(Ee,10);return isNaN(Ae)||Ae<0||Ae>=ge.length?ve:ge[Ae]})}e.format=D;const P=/{([^}]+)}/g;function h(J,ge){return J.replace(P,(ve,Ee)=>ge[Ee]??ve)}e.format2=h;function d(J){return J.replace(/[<>&]/g,function(ge){switch(ge){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return ge}})}e.escape=d;function m(J){return J.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}e.escapeRegExpCharacters=m;function g(J,ge){let ve=0;const Ee=ge.charCodeAt(0);for(let Ae=J.length-1;Ae>=0;Ae--)J.charCodeAt(Ae)===Ee&&ve++;return ve}e.count=g;function w(J,ge,ve="\u2026"){return J.length<=ge?J:`${J.substr(0,ge)}${ve}`}e.truncate=w;function u(J,ge=" "){const ve=y(J,ge);return E(ve,ge)}e.trim=u;function y(J,ge){if(!J||!ge)return J;const ve=ge.length;if(ve===0||J.length===0)return J;let Ee=0;for(;J.indexOf(ge,Ee)===Ee;)Ee=Ee+ve;return J.substring(Ee)}e.ltrim=y;function E(J,ge){if(!J||!ge)return J;const ve=ge.length,Ee=J.length;if(ve===0||Ee===0)return J;let Ae=Ee,Me=-1;for(;Me=J.lastIndexOf(ge,Ae-1),!(Me===-1||Me+ve!==Ae);){if(Me===0)return"";Ae=Me}return J.substring(0,Ae)}e.rtrim=E;function l(J){return J.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}e.convertSimple2RegExpPattern=l;function v(J){return J.replace(/\*/g,"")}e.stripWildcards=v;function c(J,ge,ve={}){if(!J)throw new Error("Cannot create regex from empty string");ge||(J=m(J)),ve.wholeWord&&(/\B/.test(J.charAt(0))||(J="\\b"+J),/\B/.test(J.charAt(J.length-1))||(J=J+"\\b"));let Ee="";return ve.global&&(Ee+="g"),ve.matchCase||(Ee+="i"),ve.multiline&&(Ee+="m"),ve.unicode&&(Ee+="u"),new RegExp(J,Ee)}e.createRegExp=c;function f(J){return J.source==="^"||J.source==="^$"||J.source==="$"||J.source==="^\\s*$"?!1:!!(J.exec("")&&J.lastIndex===0)}e.regExpLeadsToEndlessLoop=f;function I(J){return J.split(/\r\n|\r|\n/)}e.splitLines=I;function S(J){for(let ge=0,ve=J.length;ge<ve;ge++){const Ee=J.charCodeAt(ge);if(Ee!==32&&Ee!==9)return ge}return-1}e.firstNonWhitespaceIndex=S;function t(J,ge=0,ve=J.length){for(let Ee=ge;Ee<ve;Ee++){const Ae=J.charCodeAt(Ee);if(Ae!==32&&Ae!==9)return J.substring(ge,Ee)}return J.substring(ge,ve)}e.getLeadingWhitespace=t;function a(J,ge=J.length-1){for(let ve=ge;ve>=0;ve--){const Ee=J.charCodeAt(ve);if(Ee!==32&&Ee!==9)return ve}return-1}e.lastNonWhitespaceIndex=a;function s(J,ge,ve){const Ee=[];let Ae=0;for(const Me of J.matchAll(ge)){if(Ee.push(J.slice(Ae,Me.index)),Me.index===void 0)throw new Error("match.index should be defined");Ae=Me.index+Me[0].length,Ee.push(ve(Me[0],...Me.slice(1),Me.index,J,Me.groups))}return Ee.push(J.slice(Ae)),Promise.all(Ee).then(Me=>Me.join(""))}e.replaceAsync=s;function i(J,ge){return J<ge?-1:J>ge?1:0}e.compare=i;function r(J,ge,ve=0,Ee=J.length,Ae=0,Me=ge.length){for(;ve<Ee&&Ae<Me;ve++,Ae++){const Be=J.charCodeAt(ve),Ve=ge.charCodeAt(Ae);if(Be<Ve)return-1;if(Be>Ve)return 1}const _e=Ee-ve,ze=Me-Ae;return _e<ze?-1:_e>ze?1:0}e.compareSubstring=r;function o(J,ge){return p(J,ge,0,J.length,0,ge.length)}e.compareIgnoreCase=o;function p(J,ge,ve=0,Ee=J.length,Ae=0,Me=ge.length){for(;ve<Ee&&Ae<Me;ve++,Ae++){let Be=J.charCodeAt(ve),Ve=ge.charCodeAt(Ae);if(Be===Ve)continue;if(Be>=128||Ve>=128)return r(J.toLowerCase(),ge.toLowerCase(),ve,Ee,Ae,Me);M(Be)&&(Be-=32),M(Ve)&&(Ve-=32);const Ye=Be-Ve;if(Ye!==0)return Ye}const _e=Ee-ve,ze=Me-Ae;return _e<ze?-1:_e>ze?1:0}e.compareSubstringIgnoreCase=p;function k(J){return J>=48&&J<=57}e.isAsciiDigit=k;function M(J){return J>=97&&J<=122}e.isLowerAsciiLetter=M;function C(J){return J>=65&&J<=90}e.isUpperAsciiLetter=C;function L(J,ge){return J.length===ge.length&&p(J,ge)===0}e.equalsIgnoreCase=L;function T(J,ge){const ve=ge.length;return ge.length>J.length?!1:p(J,ge,0,ve)===0}e.startsWithIgnoreCase=T;function F(J,ge){const ve=Math.min(J.length,ge.length);let Ee;for(Ee=0;Ee<ve;Ee++)if(J.charCodeAt(Ee)!==ge.charCodeAt(Ee))return Ee;return ve}e.commonPrefixLength=F;function z(J,ge){const ve=Math.min(J.length,ge.length);let Ee;const Ae=J.length-1,Me=ge.length-1;for(Ee=0;Ee<ve;Ee++)if(J.charCodeAt(Ae-Ee)!==ge.charCodeAt(Me-Ee))return Ee;return ve}e.commonSuffixLength=z;function oe(J){return 55296<=J&&J<=56319}e.isHighSurrogate=oe;function ne(J){return 56320<=J&&J<=57343}e.isLowSurrogate=ne;function de(J,ge){return(J-55296<<10)+(ge-56320)+65536}e.computeCodePoint=de;function ae(J,ge,ve){const Ee=J.charCodeAt(ve);if(oe(Ee)&&ve+1<ge){const Ae=J.charCodeAt(ve+1);if(ne(Ae))return de(Ee,Ae)}return Ee}e.getNextCodePoint=ae;function ue(J,ge){const ve=J.charCodeAt(ge-1);if(ne(ve)&&ge>1){const Ee=J.charCodeAt(ge-2);if(oe(Ee))return de(Ee,ve)}return ve}class j{get offset(){return this._offset}constructor(ge,ve=0){this._str=ge,this._len=ge.length,this._offset=ve}setOffset(ge){this._offset=ge}prevCodePoint(){const ge=ue(this._str,this._offset);return this._offset-=ge>=65536?2:1,ge}nextCodePoint(){const ge=ae(this._str,this._len,this._offset);return this._offset+=ge>=65536?2:1,ge}eol(){return this._offset>=this._len}}e.CodePointIterator=j;class G{get offset(){return this._iterator.offset}constructor(ge,ve=0){this._iterator=new j(ge,ve)}nextGraphemeLength(){const ge=me.getInstance(),ve=this._iterator,Ee=ve.offset;let Ae=ge.getGraphemeBreakType(ve.nextCodePoint());for(;!ve.eol();){const Me=ve.offset,_e=ge.getGraphemeBreakType(ve.nextCodePoint());if(K(Ae,_e)){ve.setOffset(Me);break}Ae=_e}return ve.offset-Ee}prevGraphemeLength(){const ge=me.getInstance(),ve=this._iterator,Ee=ve.offset;let Ae=ge.getGraphemeBreakType(ve.prevCodePoint());for(;ve.offset>0;){const Me=ve.offset,_e=ge.getGraphemeBreakType(ve.prevCodePoint());if(K(_e,Ae)){ve.setOffset(Me);break}Ae=_e}return Ee-ve.offset}eol(){return this._iterator.eol()}}e.GraphemeIterator=G;function B(J,ge){return new G(J,ge).nextGraphemeLength()}e.nextCharLength=B;function W(J,ge){return new G(J,ge).prevGraphemeLength()}e.prevCharLength=W;function U(J,ge){ge>0&&ne(J.charCodeAt(ge))&&ge--;const ve=ge+B(J,ge);return[ve-W(J,ve),ve]}e.getCharContainingOffset=U;function $(J){const ge=new G(J);let ve=0;for(;!ge.eol();)ve++,ge.nextGraphemeLength();return ve}e.charCount=$;let X;function se(){return/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/}function ce(J){return X||(X=se()),X.test(J)}e.containsRTL=ce;const x=/^[\t\n\r\x20-\x7E]*$/;function R(J){return x.test(J)}e.isBasicASCII=R,e.UNUSUAL_LINE_TERMINATORS=/[\u2028\u2029]/;function _(J){return e.UNUSUAL_LINE_TERMINATORS.test(J)}e.containsUnusualLineTerminators=_;function N(J){return J>=11904&&J<=55215||J>=63744&&J<=64255||J>=65281&&J<=65374}e.isFullWidthCharacter=N;function q(J){return J>=127462&&J<=127487||J===8986||J===8987||J===9200||J===9203||J>=9728&&J<=10175||J===11088||J===11093||J>=127744&&J<=128591||J>=128640&&J<=128764||J>=128992&&J<=129008||J>=129280&&J<=129535||J>=129648&&J<=129782}e.isEmojiImprecise=q;function re(J,ge){if(J.length<ge)return J;const ve=/\b/g;let Ee=0;for(;ve.test(J)&&!(J.length-ve.lastIndex<ge);)Ee=ve.lastIndex,ve.lastIndex+=1;return J.substring(Ee).replace(/^\s/,"")}e.lcut=re;const ie=/(:?\x1b\[|\x9B)[=?>!]?[\d;:]*["$#'* ]?[a-zA-Z@^`{}|~]/g,le=/\x1b\].*?\x07/g;function V(J){return J&&(J=J.replace(ie,"").replace(le,"")),J}e.removeAnsiEscapeCodes=V,e.UTF8_BOM_CHARACTER=String.fromCharCode(65279);function te(J){return!!(J&&J.length>0&&J.charCodeAt(0)===65279)}e.startsWithUTF8BOM=te;function Q(J){return te(J)?J.substr(1):J}e.stripUTF8BOM=Q;function fe(J,ge){let ve="";for(let Ee=0;Ee<ge;Ee++)ve+=J;return ve}e.repeat=fe;function pe(J,ge){if(!J||!ge||J.length<ge.length)return!1;const ve=ge.length,Ee=J.toLowerCase();let Ae=0,Me=-1;for(;Ae<ve;){const _e=Ee.indexOf(ge[Ae],Me+1);if(_e<0)return!1;Me=_e,Ae++}return!0}e.fuzzyContains=pe;function Pe(J,ge=!1){return J?(ge&&(J=J.replace(/\\./g,"")),J.toLowerCase()!==J):!1}e.containsUppercaseCharacter=Pe;function De(J){return J.charAt(0).toUpperCase()+J.slice(1)}e.uppercaseFirstLetter=De;function We(J,ge=1){if(ge===0)return"";let ve=-1;do ve=J.indexOf(`
`,ve+1),ge--;while(ge>0&&ve>=0);return ve===-1?J:(J[ve-1]==="\r"&&ve--,J.substr(0,ve))}e.getNLines=We;function ye(J){return J=J%(2*26),J<26?String.fromCharCode(97+J):String.fromCharCode(65+J-26)}e.singleLetterHash=ye;function we(J){return me.getInstance().getGraphemeBreakType(J)}e.getGraphemeBreakType=we;function K(J,ge){return J===0?ge!==5&&ge!==7:J===2&&ge===3?!1:J===4||J===2||J===3||ge===4||ge===2||ge===3?!0:!(J===8&&(ge===8||ge===9||ge===11||ge===12)||(J===11||J===9)&&(ge===9||ge===10)||(J===12||J===10)&&ge===10||ge===5||ge===13||ge===7||J===1||J===13&&ge===14||J===6&&ge===6)}var he;(function(J){J[J.Other=0]="Other",J[J.Prepend=1]="Prepend",J[J.CR=2]="CR",J[J.LF=3]="LF",J[J.Control=4]="Control",J[J.Extend=5]="Extend",J[J.Regional_Indicator=6]="Regional_Indicator",J[J.SpacingMark=7]="SpacingMark",J[J.L=8]="L",J[J.V=9]="V",J[J.T=10]="T",J[J.LV=11]="LV",J[J.LVT=12]="LVT",J[J.ZWJ=13]="ZWJ",J[J.Extended_Pictographic=14]="Extended_Pictographic"})(he||(e.GraphemeBreakType=he={}));class me{static{this._INSTANCE=null}static getInstance(){return me._INSTANCE||(me._INSTANCE=new me),me._INSTANCE}constructor(){this._data=Ie()}getGraphemeBreakType(ge){if(ge<32)return ge===10?3:ge===13?2:4;if(ge<127)return 0;const ve=this._data,Ee=ve.length/3;let Ae=1;for(;Ae<=Ee;)if(ge<ve[3*Ae])Ae=2*Ae;else if(ge>ve[3*Ae+1])Ae=2*Ae+1;else return ve[3*Ae+2];return 0}}function Ie(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}function Le(J,ge){if(J===0)return 0;const ve=Fe(J,ge);if(ve!==void 0)return ve;const Ee=new j(ge,J);return Ee.prevCodePoint(),Ee.offset}e.getLeftDeleteOffset=Le;function Fe(J,ge){const ve=new j(ge,J);let Ee=ve.prevCodePoint();for(;Oe(Ee)||Ee===65039||Ee===8419;){if(ve.offset===0)return;Ee=ve.prevCodePoint()}if(!q(Ee))return;let Ae=ve.offset;return Ae>0&&ve.prevCodePoint()===8205&&(Ae=ve.offset),Ae}function Oe(J){return 127995<=J&&J<=127999}var qe;(function(J){J[J.zwj=8205]="zwj",J[J.emojiVariantSelector=65039]="emojiVariantSelector",J[J.enclosingKeyCap=8419]="enclosingKeyCap"})(qe||(qe={})),e.noBreakWhitespace="\xA0";class Ne{static{this.ambiguousCharacterData=new A.Lazy(()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}'))}static{this.cache=new b.LRUCachedFunction(ge=>{function ve(Ye){const Xe=new Map;for(let Je=0;Je<Ye.length;Je+=2)Xe.set(Ye[Je],Ye[Je+1]);return Xe}function Ee(Ye,Xe){const Je=new Map(Ye);for(const[nt,rt]of Xe)Je.set(nt,rt);return Je}function Ae(Ye,Xe){if(!Ye)return Xe;const Je=new Map;for(const[nt,rt]of Ye)Xe.has(nt)&&Je.set(nt,rt);return Je}const Me=this.ambiguousCharacterData.value;let _e=ge.filter(Ye=>!Ye.startsWith("_")&&Ye in Me);_e.length===0&&(_e=["_default"]);let ze;for(const Ye of _e){const Xe=ve(Me[Ye]);ze=Ae(ze,Xe)}const Be=ve(Me._common),Ve=Ee(Be,ze);return new Ne(Ve)})}static getInstance(ge){return Ne.cache.get(Array.from(ge))}static{this._locales=new A.Lazy(()=>Object.keys(Ne.ambiguousCharacterData.value).filter(ge=>!ge.startsWith("_")))}static getLocales(){return Ne._locales.value}constructor(ge){this.confusableDictionary=ge}isAmbiguous(ge){return this.confusableDictionary.has(ge)}getPrimaryConfusable(ge){return this.confusableDictionary.get(ge)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}e.AmbiguousCharacters=Ne;class He{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static{this._data=void 0}static getData(){return this._data||(this._data=new Set(He.getRawData())),this._data}static isInvisibleCharacter(ge){return He.getData().has(ge)}static get codePoints(){return He.getData()}}e.InvisibleCharacters=He}),define(Z[57],ee([0,1,26]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StringSHA1=e.toHexString=e.Hasher=e.stringHash=e.numberHash=e.doHash=e.hash=void 0;function A(v){return n(v,0)}e.hash=A;function n(v,c){switch(typeof v){case"object":return v===null?O(349,c):Array.isArray(v)?h(v,c):d(v,c);case"string":return P(v,c);case"boolean":return D(v,c);case"number":return O(v,c);case"undefined":return O(937,c);default:return O(617,c)}}e.doHash=n;function O(v,c){return(c<<5)-c+v|0}e.numberHash=O;function D(v,c){return O(v?433:863,c)}function P(v,c){c=O(149417,c);for(let f=0,I=v.length;f<I;f++)c=O(v.charCodeAt(f),c);return c}e.stringHash=P;function h(v,c){return c=O(104579,c),v.reduce((f,I)=>n(I,f),c)}function d(v,c){return c=O(181387,c),Object.keys(v).sort().reduce((f,I)=>(f=P(I,f),n(v[I],f)),c)}class m{constructor(){this._value=0}get value(){return this._value}hash(c){return this._value=n(c,this._value),this._value}}e.Hasher=m;var g;(function(v){v[v.BLOCK_SIZE=64]="BLOCK_SIZE",v[v.UNICODE_REPLACEMENT=65533]="UNICODE_REPLACEMENT"})(g||(g={}));function w(v,c,f=32){const I=f-c,S=~((1<<I)-1);return(v<<c|(S&v)>>>I)>>>0}function u(v,c=0,f=v.byteLength,I=0){for(let S=0;S<f;S++)v[c+S]=I}function y(v,c,f="0"){for(;v.length<c;)v=f+v;return v}function E(v,c=32){return v instanceof ArrayBuffer?Array.from(new Uint8Array(v)).map(f=>f.toString(16).padStart(2,"0")).join(""):y((v>>>0).toString(16),c/4)}e.toHexString=E;class l{static{this._bigBlock32=new DataView(new ArrayBuffer(320))}constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(64+3),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(c){const f=c.length;if(f===0)return;const I=this._buff;let S=this._buffLen,t=this._leftoverHighSurrogate,a,s;for(t!==0?(a=t,s=-1,t=0):(a=c.charCodeAt(0),s=0);;){let i=a;if(b.isHighSurrogate(a))if(s+1<f){const r=c.charCodeAt(s+1);b.isLowSurrogate(r)?(s++,i=b.computeCodePoint(a,r)):i=65533}else{t=a;break}else b.isLowSurrogate(a)&&(i=65533);if(S=this._push(I,S,i),s++,s<f)a=c.charCodeAt(s);else break}this._buffLen=S,this._leftoverHighSurrogate=t}_push(c,f,I){return I<128?c[f++]=I:I<2048?(c[f++]=192|(I&1984)>>>6,c[f++]=128|(I&63)>>>0):I<65536?(c[f++]=224|(I&61440)>>>12,c[f++]=128|(I&4032)>>>6,c[f++]=128|(I&63)>>>0):(c[f++]=240|(I&1835008)>>>18,c[f++]=128|(I&258048)>>>12,c[f++]=128|(I&4032)>>>6,c[f++]=128|(I&63)>>>0),f>=64&&(this._step(),f-=64,this._totalLen+=64,c[0]=c[64+0],c[1]=c[64+1],c[2]=c[64+2]),f}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()),E(this._h0)+E(this._h1)+E(this._h2)+E(this._h3)+E(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,u(this._buff,this._buffLen),this._buffLen>56&&(this._step(),u(this._buff));const c=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(c/4294967296),!1),this._buffDV.setUint32(60,c%4294967296,!1),this._step()}_step(){const c=l._bigBlock32,f=this._buffDV;for(let p=0;p<64;p+=4)c.setUint32(p,f.getUint32(p,!1),!1);for(let p=64;p<320;p+=4)c.setUint32(p,w(c.getUint32(p-12,!1)^c.getUint32(p-32,!1)^c.getUint32(p-56,!1)^c.getUint32(p-64,!1),1),!1);let I=this._h0,S=this._h1,t=this._h2,a=this._h3,s=this._h4,i,r,o;for(let p=0;p<80;p++)p<20?(i=S&t|~S&a,r=1518500249):p<40?(i=S^t^a,r=1859775393):p<60?(i=S&t|S&a|t&a,r=2400959708):(i=S^t^a,r=3395469782),o=w(I,5)+i+s+r+c.getUint32(p*4,!1)&4294967295,s=a,a=t,t=w(S,30),S=I,I=o;this._h0=this._h0+I&4294967295,this._h1=this._h1+S&4294967295,this._h2=this._h2+t&4294967295,this._h3=this._h3+a&4294967295,this._h4=this._h4+s&4294967295}}e.StringSHA1=l}),define(Z[71],ee([0,1,26]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var A;(function(n){n[n.Ignore=0]="Ignore",n[n.Info=1]="Info",n[n.Warning=2]="Warning",n[n.Error=3]="Error"})(A||(A={})),function(n){const O="error",D="warning",P="warn",h="info",d="ignore";function m(w){return w?b.equalsIgnoreCase(O,w)?n.Error:b.equalsIgnoreCase(D,w)||b.equalsIgnoreCase(P,w)?n.Warning:b.equalsIgnoreCase(h,w)?n.Info:n.Ignore:n.Ignore}n.fromValue=m;function g(w){switch(w){case n.Error:return O;case n.Warning:return D;case n.Info:return h;default:return d}}n.toString=g}(A||(A={})),e.default=A}),define(Z[142],ee([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MicrotaskDelay=void 0,e.MicrotaskDelay=Symbol("MicrotaskDelay")}),define(Z[58],ee([0,1,24,26]),function(H,e,b,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TernarySearchTree=e.UriIterator=e.PathIterator=e.ConfigKeysIterator=e.StringIterator=void 0;class n{constructor(){this._value="",this._pos=0}reset(u){return this._value=u,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos<this._value.length-1}cmp(u){const y=u.charCodeAt(0),E=this._value.charCodeAt(this._pos);return y-E}value(){return this._value[this._pos]}}e.StringIterator=n;class O{constructor(u=!0){this._caseSensitive=u}reset(u){return this._value=u,this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let u=!0;for(;this._to<this._value.length;this._to++)if(this._value.charCodeAt(this._to)===46)if(u)this._from++;else break;else u=!1;return this}cmp(u){return this._caseSensitive?(0,A.compareSubstring)(u,this._value,0,u.length,this._from,this._to):(0,A.compareSubstringIgnoreCase)(u,this._value,0,u.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}e.ConfigKeysIterator=O;class D{constructor(u=!0,y=!0){this._splitOnBackslash=u,this._caseSensitive=y}reset(u){this._from=0,this._to=0,this._value=u,this._valueLen=u.length;for(let y=u.length-1;y>=0;y--,this._valueLen--){const E=this._value.charCodeAt(y);if(!(E===47||this._splitOnBackslash&&E===92))break}return this.next()}hasNext(){return this._to<this._valueLen}next(){this._from=this._to;let u=!0;for(;this._to<this._valueLen;this._to++){const y=this._value.charCodeAt(this._to);if(y===47||this._splitOnBackslash&&y===92)if(u)this._from++;else break;else u=!1}return this}cmp(u){return this._caseSensitive?(0,A.compareSubstring)(u,this._value,0,u.length,this._from,this._to):(0,A.compareSubstringIgnoreCase)(u,this._value,0,u.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}e.PathIterator=D;var P;(function(w){w[w.Scheme=1]="Scheme",w[w.Authority=2]="Authority",w[w.Path=3]="Path",w[w.Query=4]="Query",w[w.Fragment=5]="Fragment"})(P||(P={}));class h{constructor(u,y){this._ignorePathCasing=u,this._ignoreQueryAndFragment=y,this._states=[],this._stateIdx=0}reset(u){return this._value=u,this._states=[],this._value.scheme&&this._states.push(1),this._value.authority&&this._states.push(2),this._value.path&&(this._pathIterator=new D(!1,!this._ignorePathCasing(u)),this._pathIterator.reset(u.path),this._pathIterator.value()&&this._states.push(3)),this._ignoreQueryAndFragment(u)||(this._value.query&&this._states.push(4),this._value.fragment&&this._states.push(5)),this._stateIdx=0,this}next(){return this._states[this._stateIdx]===3&&this._pathIterator.hasNext()?this._pathIterator.next():this._stateIdx+=1,this}hasNext(){return this._states[this._stateIdx]===3&&this._pathIterator.hasNext()||this._stateIdx<this._states.length-1}cmp(u){if(this._states[this._stateIdx]===1)return(0,A.compareIgnoreCase)(u,this._value.scheme);if(this._states[this._stateIdx]===2)return(0,A.compareIgnoreCase)(u,this._value.authority);if(this._states[this._stateIdx]===3)return this._pathIterator.cmp(u);if(this._states[this._stateIdx]===4)return(0,A.compare)(u,this._value.query);if(this._states[this._stateIdx]===5)return(0,A.compare)(u,this._value.fragment);throw new Error}value(){if(this._states[this._stateIdx]===1)return this._value.scheme;if(this._states[this._stateIdx]===2)return this._value.authority;if(this._states[this._stateIdx]===3)return this._pathIterator.value();if(this._states[this._stateIdx]===4)return this._value.query;if(this._states[this._stateIdx]===5)return this._value.fragment;throw new Error}}e.UriIterator=h;class d{constructor(){this.height=1}isEmpty(){return!this.left&&!this.mid&&!this.right&&!this.value}rotateLeft(){const u=this.right;return this.right=u.left,u.left=this,this.updateHeight(),u.updateHeight(),u}rotateRight(){const u=this.left;return this.left=u.right,u.right=this,this.updateHeight(),u.updateHeight(),u}updateHeight(){this.height=1+Math.max(this.heightLeft,this.heightRight)}balanceFactor(){return this.heightRight-this.heightLeft}get heightLeft(){return this.left?.height??0}get heightRight(){return this.right?.height??0}}var m;(function(w){w[w.Left=-1]="Left",w[w.Mid=0]="Mid",w[w.Right=1]="Right"})(m||(m={}));class g{static forUris(u=()=>!1,y=()=>!1){return new g(new h(u,y))}static forPaths(u=!1){return new g(new D(void 0,!u))}static forStrings(){return new g(new n)}static forConfigKeys(){return new g(new O)}constructor(u){this._iter=u}clear(){this._root=void 0}fill(u,y){if(y){const E=y.slice(0);(0,b.shuffle)(E);for(const l of E)this.set(l,u)}else{const E=u.slice(0);(0,b.shuffle)(E);for(const l of E)this.set(l[0],l[1])}}set(u,y){const E=this._iter.reset(u);let l;this._root||(this._root=new d,this._root.segment=E.value());const v=[];for(l=this._root;;){const f=E.cmp(l.segment);if(f>0)l.left||(l.left=new d,l.left.segment=E.value()),v.push([-1,l]),l=l.left;else if(f<0)l.right||(l.right=new d,l.right.segment=E.value()),v.push([1,l]),l=l.right;else if(E.hasNext())E.next(),l.mid||(l.mid=new d,l.mid.segment=E.value()),v.push([0,l]),l=l.mid;else break}const c=l.value;l.value=y,l.key=u;for(let f=v.length-1;f>=0;f--){const I=v[f][1];I.updateHeight();const S=I.balanceFactor();if(S<-1||S>1){const t=v[f][0],a=v[f+1][0];if(t===1&&a===1)v[f][1]=I.rotateLeft();else if(t===-1&&a===-1)v[f][1]=I.rotateRight();else if(t===1&&a===-1)I.right=v[f+1][1]=v[f+1][1].rotateRight(),v[f][1]=I.rotateLeft();else if(t===-1&&a===1)I.left=v[f+1][1]=v[f+1][1].rotateLeft(),v[f][1]=I.rotateRight();else throw new Error;if(f>0)switch(v[f-1][0]){case-1:v[f-1][1].left=v[f][1];break;case 1:v[f-1][1].right=v[f][1];break;case 0:v[f-1][1].mid=v[f][1];break}else this._root=v[0][1]}}return c}get(u){return this._getNode(u)?.value}_getNode(u){const y=this._iter.reset(u);let E=this._root;for(;E;){const l=y.cmp(E.segment);if(l>0)E=E.left;else if(l<0)E=E.right;else if(y.hasNext())y.next(),E=E.mid;else break}return E}has(u){const y=this._getNode(u);return!(y?.value===void 0&&y?.mid===void 0)}delete(u){return this._delete(u,!1)}deleteSuperstr(u){return this._delete(u,!0)}_delete(u,y){const E=this._iter.reset(u),l=[];let v=this._root;for(;v;){const c=E.cmp(v.segment);if(c>0)l.push([-1,v]),v=v.left;else if(c<0)l.push([1,v]),v=v.right;else if(E.hasNext())E.next(),l.push([0,v]),v=v.mid;else break}if(v){if(y?(v.left=void 0,v.mid=void 0,v.right=void 0,v.height=1):(v.key=void 0,v.value=void 0),!v.mid&&!v.value)if(v.left&&v.right){const c=this._min(v.right);if(c.key){const{key:f,value:I,segment:S}=c;this._delete(c.key,!1),v.key=f,v.value=I,v.segment=S}}else{const c=v.left??v.right;if(l.length>0){const[f,I]=l[l.length-1];switch(f){case-1:I.left=c;break;case 0:I.mid=c;break;case 1:I.right=c;break}}else this._root=c}for(let c=l.length-1;c>=0;c--){const f=l[c][1];f.updateHeight();const I=f.balanceFactor();if(I>1?(f.right.balanceFactor()>=0||(f.right=f.right.rotateRight()),l[c][1]=f.rotateLeft()):I<-1&&(f.left.balanceFactor()<=0||(f.left=f.left.rotateLeft()),l[c][1]=f.rotateRight()),c>0)switch(l[c-1][0]){case-1:l[c-1][1].left=l[c][1];break;case 1:l[c-1][1].right=l[c][1];break;case 0:l[c-1][1].mid=l[c][1];break}else this._root=l[0][1]}}}_min(u){for(;u.left;)u=u.left;return u}findSubstr(u){const y=this._iter.reset(u);let E=this._root,l;for(;E;){const v=y.cmp(E.segment);if(v>0)E=E.left;else if(v<0)E=E.right;else if(y.hasNext())y.next(),l=E.value||l,E=E.mid;else break}return E&&E.value||l}findSuperstr(u){return this._findSuperstrOrElement(u,!1)}_findSuperstrOrElement(u,y){const E=this._iter.reset(u);let l=this._root;for(;l;){const v=E.cmp(l.segment);if(v>0)l=l.left;else if(v<0)l=l.right;else if(E.hasNext())E.next(),l=l.mid;else return l.mid?this._entries(l.mid):y?l.value:void 0}}hasElementOrSubtree(u){return this._findSuperstrOrElement(u,!0)!==void 0}forEach(u){for(const[y,E]of this)u(E,y)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(u){const y=[];return this._dfsEntries(u,y),y[Symbol.iterator]()}_dfsEntries(u,y){u&&(u.left&&this._dfsEntries(u.left,y),u.value&&y.push([u.key,u.value]),u.mid&&this._dfsEntries(u.mid,y),u.right&&this._dfsEntries(u.right,y))}_isBalanced(){const u=y=>{if(!y)return!0;const E=y.balanceFactor();return E<-1||E>1?!1:u(y.left)&&u(y.right)};return u(this._root)}}e.TernarySearchTree=g}),define(Z[12],ee([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.withNullAsUndefined=e.validateConstraint=e.validateConstraints=e.areFunctions=e.isFunction=e.isEmptyObject=e.assertAllDefined=e.assertIsDefined=e.assertType=e.isUndefinedOrNull=e.isDefined=e.isUndefined=e.isBoolean=e.isIterable=e.isNumber=e.isTypedArray=e.isObject=e.isStringArray=e.isString=void 0;function b(t){return typeof t=="string"}e.isString=b;function A(t){return Array.isArray(t)&&t.every(a=>b(a))}e.isStringArray=A;function n(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&!(t instanceof RegExp)&&!(t instanceof Date)}e.isObject=n;function O(t){const a=Object.getPrototypeOf(Uint8Array);return typeof t=="object"&&t instanceof a}e.isTypedArray=O;function D(t){return typeof t=="number"&&!isNaN(t)}e.isNumber=D;function P(t){return!!t&&typeof t[Symbol.iterator]=="function"}e.isIterable=P;function h(t){return t===!0||t===!1}e.isBoolean=h;function d(t){return typeof t>"u"}e.isUndefined=d;function m(t){return!g(t)}e.isDefined=m;function g(t){return d(t)||t===null}e.isUndefinedOrNull=g;function w(t,a){if(!t)throw new Error(a?`Unexpected type, expected '${a}'`:"Unexpected type")}e.assertType=w;function u(t){if(g(t))throw new Error("Assertion Failed: argument is undefined or null");return t}e.assertIsDefined=u;function y(...t){const a=[];for(let s=0;s<t.length;s++){const i=t[s];if(g(i))throw new Error(`Assertion Failed: argument at index ${s} is undefined or null`);a.push(i)}return a}e.assertAllDefined=y;const E=Object.prototype.hasOwnProperty;function l(t){if(!n(t))return!1;for(const a in t)if(E.call(t,a))return!1;return!0}e.isEmptyObject=l;function v(t){return typeof t=="function"}e.isFunction=v;function c(...t){return t.length>0&&t.every(v)}e.areFunctions=c;function f(t,a){const s=Math.min(t.length,a.length);for(let i=0;i<s;i++)I(t[i],a[i])}e.validateConstraints=f;function I(t,a){if(b(a)){if(typeof t!==a)throw new Error(`argument does not match constraint: typeof ${a}`)}else if(v(a)){try{if(t instanceof a)return}catch{}if(!g(t)&&t.constructor===a||a.length===1&&a.call(void 0,t)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}e.validateConstraint=I;function S(t){return t===null?void 0:t}e.withNullAsUndefined=S}),define(Z[72],ee([0,1,12]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Codicon=e.getAllCodicons=e.getCodiconFontCharacters=void 0;const A=Object.create(null);function n(P,h){if((0,b.isString)(h)){const d=A[h];if(d===void 0)throw new Error(`${P} references an unknown codicon: ${h}`);h=d}return A[P]=h,{id:P}}function O(){return A}e.getCodiconFontCharacters=O;function D(){return Object.values(e.Codicon)}e.getAllCodicons=D,e.Codicon={add:n("add",6e4),plus:n("plus",6e4),gistNew:n("gist-new",6e4),repoCreate:n("repo-create",6e4),lightbulb:n("lightbulb",60001),lightBulb:n("light-bulb",60001),repo:n("repo",60002),repoDelete:n("repo-delete",60002),gistFork:n("gist-fork",60003),repoForked:n("repo-forked",60003),gitPullRequest:n("git-pull-request",60004),gitPullRequestAbandoned:n("git-pull-request-abandoned",60004),recordKeys:n("record-keys",60005),keyboard:n("keyboard",60005),tag:n("tag",60006),tagAdd:n("tag-add",60006),tagRemove:n("tag-remove",60006),gitPullRequestLabel:n("git-pull-request-label",60006),person:n("person",60007),personFollow:n("person-follow",60007),personOutline:n("person-outline",60007),personFilled:n("person-filled",60007),gitBranch:n("git-branch",60008),gitBranchCreate:n("git-branch-create",60008),gitBranchDelete:n("git-branch-delete",60008),sourceControl:n("source-control",60008),mirror:n("mirror",60009),mirrorPublic:n("mirror-public",60009),star:n("star",60010),starAdd:n("star-add",60010),starDelete:n("star-delete",60010),starEmpty:n("star-empty",60010),comment:n("comment",60011),commentAdd:n("comment-add",60011),alert:n("alert",60012),warning:n("warning",60012),search:n("search",60013),searchSave:n("search-save",60013),logOut:n("log-out",60014),signOut:n("sign-out",60014),logIn:n("log-in",60015),signIn:n("sign-in",60015),eye:n("eye",60016),eyeUnwatch:n("eye-unwatch",60016),eyeWatch:n("eye-watch",60016),circleFilled:n("circle-filled",60017),primitiveDot:n("primitive-dot",60017),closeDirty:n("close-dirty",60017),debugBreakpoint:n("debug-breakpoint",60017),debugBreakpointDisabled:n("debug-breakpoint-disabled",60017),debugHint:n("debug-hint",60017),primitiveSquare:n("primitive-square",60018),edit:n("edit",60019),pencil:n("pencil",60019),info:n("info",60020),issueOpened:n("issue-opened",60020),gistPrivate:n("gist-private",60021),gitForkPrivate:n("git-fork-private",60021),lock:n("lock",60021),mirrorPrivate:n("mirror-private",60021),close:n("close",60022),removeClose:n("remove-close",60022),x:n("x",60022),repoSync:n("repo-sync",60023),sync:n("sync",60023),clone:n("clone",60024),desktopDownload:n("desktop-download",60024),beaker:n("beaker",60025),microscope:n("microscope",60025),vm:n("vm",60026),deviceDesktop:n("device-desktop",60026),file:n("file",60027),fileText:n("file-text",60027),more:n("more",60028),ellipsis:n("ellipsis",60028),kebabHorizontal:n("kebab-horizontal",60028),mailReply:n("mail-reply",60029),reply:n("reply",60029),organization:n("organization",60030),organizationFilled:n("organization-filled",60030),organizationOutline:n("organization-outline",60030),newFile:n("new-file",60031),fileAdd:n("file-add",60031),newFolder:n("new-folder",60032),fileDirectoryCreate:n("file-directory-create",60032),trash:n("trash",60033),trashcan:n("trashcan",60033),history:n("history",60034),clock:n("clock",60034),folder:n("folder",60035),fileDirectory:n("file-directory",60035),symbolFolder:n("symbol-folder",60035),logoGithub:n("logo-github",60036),markGithub:n("mark-github",60036),github:n("github",60036),terminal:n("terminal",60037),console:n("console",60037),repl:n("repl",60037),zap:n("zap",60038),symbolEvent:n("symbol-event",60038),error:n("error",60039),stop:n("stop",60039),variable:n("variable",60040),symbolVariable:n("symbol-variable",60040),array:n("array",60042),symbolArray:n("symbol-array",60042),symbolModule:n("symbol-module",60043),symbolPackage:n("symbol-package",60043),symbolNamespace:n("symbol-namespace",60043),symbolObject:n("symbol-object",60043),symbolMethod:n("symbol-method",60044),symbolFunction:n("symbol-function",60044),symbolConstructor:n("symbol-constructor",60044),symbolBoolean:n("symbol-boolean",60047),symbolNull:n("symbol-null",60047),symbolNumeric:n("symbol-numeric",60048),symbolNumber:n("symbol-number",60048),symbolStructure:n("symbol-structure",60049),symbolStruct:n("symbol-struct",60049),symbolParameter:n("symbol-parameter",60050),symbolTypeParameter:n("symbol-type-parameter",60050),symbolKey:n("symbol-key",60051),symbolText:n("symbol-text",60051),symbolReference:n("symbol-reference",60052),goToFile:n("go-to-file",60052),symbolEnum:n("symbol-enum",60053),symbolValue:n("symbol-value",60053),symbolRuler:n("symbol-ruler",60054),symbolUnit:n("symbol-unit",60054),activateBreakpoints:n("activate-breakpoints",60055),archive:n("archive",60056),arrowBoth:n("arrow-both",60057),arrowDown:n("arrow-down",60058),arrowLeft:n("arrow-left",60059),arrowRight:n("arrow-right",60060),arrowSmallDown:n("arrow-small-down",60061),arrowSmallLeft:n("arrow-small-left",60062),arrowSmallRight:n("arrow-small-right",60063),arrowSmallUp:n("arrow-small-up",60064),arrowUp:n("arrow-up",60065),bell:n("bell",60066),bold:n("bold",60067),book:n("book",60068),bookmark:n("bookmark",60069),debugBreakpointConditionalUnverified:n("debug-breakpoint-conditional-unverified",60070),debugBreakpointConditional:n("debug-breakpoint-conditional",60071),debugBreakpointConditionalDisabled:n("debug-breakpoint-conditional-disabled",60071),debugBreakpointDataUnverified:n("debug-breakpoint-data-unverified",60072),debugBreakpointData:n("debug-breakpoint-data",60073),debugBreakpointDataDisabled:n("debug-breakpoint-data-disabled",60073),debugBreakpointLogUnverified:n("debug-breakpoint-log-unverified",60074),debugBreakpointLog:n("debug-breakpoint-log",60075),debugBreakpointLogDisabled:n("debug-breakpoint-log-disabled",60075),briefcase:n("briefcase",60076),broadcast:n("broadcast",60077),browser:n("browser",60078),bug:n("bug",60079),calendar:n("calendar",60080),caseSensitive:n("case-sensitive",60081),check:n("check",60082),checklist:n("checklist",60083),chevronDown:n("chevron-down",60084),dropDownButton:n("drop-down-button",60084),chevronLeft:n("chevron-left",60085),chevronRight:n("chevron-right",60086),chevronUp:n("chevron-up",60087),chromeClose:n("chrome-close",60088),chromeMaximize:n("chrome-maximize",60089),chromeMinimize:n("chrome-minimize",60090),chromeRestore:n("chrome-restore",60091),circle:n("circle",60092),circleOutline:n("circle-outline",60092),debugBreakpointUnverified:n("debug-breakpoint-unverified",60092),circleSlash:n("circle-slash",60093),circuitBoard:n("circuit-board",60094),clearAll:n("clear-all",60095),clippy:n("clippy",60096),closeAll:n("close-all",60097),cloudDownload:n("cloud-download",60098),cloudUpload:n("cloud-upload",60099),code:n("code",60100),collapseAll:n("collapse-all",60101),colorMode:n("color-mode",60102),commentDiscussion:n("comment-discussion",60103),compareChanges:n("compare-changes",60157),creditCard:n("credit-card",60105),dash:n("dash",60108),dashboard:n("dashboard",60109),database:n("database",60110),debugContinue:n("debug-continue",60111),debugDisconnect:n("debug-disconnect",60112),debugPause:n("debug-pause",60113),debugRestart:n("debug-restart",60114),debugStart:n("debug-start",60115),debugStepInto:n("debug-step-into",60116),debugStepOut:n("debug-step-out",60117),debugStepOver:n("debug-step-over",60118),debugStop:n("debug-stop",60119),debug:n("debug",60120),deviceCameraVideo:n("device-camera-video",60121),deviceCamera:n("device-camera",60122),deviceMobile:n("device-mobile",60123),diffAdded:n("diff-added",60124),diffIgnored:n("diff-ignored",60125),diffModified:n("diff-modified",60126),diffRemoved:n("diff-removed",60127),diffRenamed:n("diff-renamed",60128),diff:n("diff",60129),discard:n("discard",60130),editorLayout:n("editor-layout",60131),emptyWindow:n("empty-window",60132),exclude:n("exclude",60133),extensions:n("extensions",60134),eyeClosed:n("eye-closed",60135),fileBinary:n("file-binary",60136),fileCode:n("file-code",60137),fileMedia:n("file-media",60138),filePdf:n("file-pdf",60139),fileSubmodule:n("file-submodule",60140),fileSymlinkDirectory:n("file-symlink-directory",60141),fileSymlinkFile:n("file-symlink-file",60142),fileZip:n("file-zip",60143),files:n("files",60144),filter:n("filter",60145),flame:n("flame",60146),foldDown:n("fold-down",60147),foldUp:n("fold-up",60148),fold:n("fold",60149),folderActive:n("folder-active",60150),folderOpened:n("folder-opened",60151),gear:n("gear",60152),gift:n("gift",60153),gistSecret:n("gist-secret",60154),gist:n("gist",60155),gitCommit:n("git-commit",60156),gitCompare:n("git-compare",60157),gitMerge:n("git-merge",60158),githubAction:n("github-action",60159),githubAlt:n("github-alt",60160),globe:n("globe",60161),grabber:n("grabber",60162),graph:n("graph",60163),gripper:n("gripper",60164),heart:n("heart",60165),home:n("home",60166),horizontalRule:n("horizontal-rule",60167),hubot:n("hubot",60168),inbox:n("inbox",60169),issueClosed:n("issue-closed",60324),issueReopened:n("issue-reopened",60171),issues:n("issues",60172),italic:n("italic",60173),jersey:n("jersey",60174),json:n("json",60175),bracket:n("bracket",60175),kebabVertical:n("kebab-vertical",60176),key:n("key",60177),law:n("law",60178),lightbulbAutofix:n("lightbulb-autofix",60179),linkExternal:n("link-external",60180),link:n("link",60181),listOrdered:n("list-ordered",60182),listUnordered:n("list-unordered",60183),liveShare:n("live-share",60184),loading:n("loading",60185),location:n("location",60186),mailRead:n("mail-read",60187),mail:n("mail",60188),markdown:n("markdown",60189),megaphone:n("megaphone",60190),mention:n("mention",60191),milestone:n("milestone",60192),gitPullRequestMilestone:n("git-pull-request-milestone",60192),mortarBoard:n("mortar-board",60193),move:n("move",60194),multipleWindows:n("multiple-windows",60195),mute:n("mute",60196),noNewline:n("no-newline",60197),note:n("note",60198),octoface:n("octoface",60199),openPreview:n("open-preview",60200),package_:n("package",60201),paintcan:n("paintcan",60202),pin:n("pin",60203),play:n("play",60204),run:n("run",60204),plug:n("plug",60205),preserveCase:n("preserve-case",60206),preview:n("preview",60207),project:n("project",60208),pulse:n("pulse",60209),question:n("question",60210),quote:n("quote",60211),radioTower:n("radio-tower",60212),reactions:n("reactions",60213),references:n("references",60214),refresh:n("refresh",60215),regex:n("regex",60216),remoteExplorer:n("remote-explorer",60217),remote:n("remote",60218),remove:n("remove",60219),replaceAll:n("replace-all",60220),replace:n("replace",60221),repoClone:n("repo-clone",60222),repoForcePush:n("repo-force-push",60223),repoPull:n("repo-pull",60224),repoPush:n("repo-push",60225),report:n("report",60226),requestChanges:n("request-changes",60227),rocket:n("rocket",60228),rootFolderOpened:n("root-folder-opened",60229),rootFolder:n("root-folder",60230),rss:n("rss",60231),ruby:n("ruby",60232),saveAll:n("save-all",60233),saveAs:n("save-as",60234),save:n("save",60235),screenFull:n("screen-full",60236),screenNormal:n("screen-normal",60237),searchStop:n("search-stop",60238),server:n("server",60240),settingsGear:n("settings-gear",60241),settings:n("settings",60242),shield:n("shield",60243),smiley:n("smiley",60244),sortPrecedence:n("sort-precedence",60245),splitHorizontal:n("split-horizontal",60246),splitVertical:n("split-vertical",60247),squirrel:n("squirrel",60248),starFull:n("star-full",60249),starHalf:n("star-half",60250),symbolClass:n("symbol-class",60251),symbolColor:n("symbol-color",60252),symbolCustomColor:n("symbol-customcolor",60252),symbolConstant:n("symbol-constant",60253),symbolEnumMember:n("symbol-enum-member",60254),symbolField:n("symbol-field",60255),symbolFile:n("symbol-file",60256),symbolInterface:n("symbol-interface",60257),symbolKeyword:n("symbol-keyword",60258),symbolMisc:n("symbol-misc",60259),symbolOperator:n("symbol-operator",60260),symbolProperty:n("symbol-property",60261),wrench:n("wrench",60261),wrenchSubaction:n("wrench-subaction",60261),symbolSnippet:n("symbol-snippet",60262),tasklist:n("tasklist",60263),telescope:n("telescope",60264),textSize:n("text-size",60265),threeBars:n("three-bars",60266),thumbsdown:n("thumbsdown",60267),thumbsup:n("thumbsup",60268),tools:n("tools",60269),triangleDown:n("triangle-down",60270),triangleLeft:n("triangle-left",60271),triangleRight:n("triangle-right",60272),triangleUp:n("triangle-up",60273),twitter:n("twitter",60274),unfold:n("unfold",60275),unlock:n("unlock",60276),unmute:n("unmute",60277),unverified:n("unverified",60278),verified:n("verified",60279),versions:n("versions",60280),vmActive:n("vm-active",60281),vmOutline:n("vm-outline",60282),vmRunning:n("vm-running",60283),watch:n("watch",60284),whitespace:n("whitespace",60285),wholeWord:n("whole-word",60286),window:n("window",60287),wordWrap:n("word-wrap",60288),zoomIn:n("zoom-in",60289),zoomOut:n("zoom-out",60290),listFilter:n("list-filter",60291),listFlat:n("list-flat",60292),listSelection:n("list-selection",60293),selection:n("selection",60293),listTree:n("list-tree",60294),debugBreakpointFunctionUnverified:n("debug-breakpoint-function-unverified",60295),debugBreakpointFunction:n("debug-breakpoint-function",60296),debugBreakpointFunctionDisabled:n("debug-breakpoint-function-disabled",60296),debugStackframeActive:n("debug-stackframe-active",60297),circleSmallFilled:n("circle-small-filled",60298),debugStackframeDot:n("debug-stackframe-dot",60298),debugStackframe:n("debug-stackframe",60299),debugStackframeFocused:n("debug-stackframe-focused",60299),debugBreakpointUnsupported:n("debug-breakpoint-unsupported",60300),symbolString:n("symbol-string",60301),debugReverseContinue:n("debug-reverse-continue",60302),debugStepBack:n("debug-step-back",60303),debugRestartFrame:n("debug-restart-frame",60304),callIncoming:n("call-incoming",60306),callOutgoing:n("call-outgoing",60307),menu:n("menu",60308),expandAll:n("expand-all",60309),feedback:n("feedback",60310),gitPullRequestReviewer:n("git-pull-request-reviewer",60310),groupByRefType:n("group-by-ref-type",60311),ungroupByRefType:n("ungroup-by-ref-type",60312),account:n("account",60313),gitPullRequestAssignee:n("git-pull-request-assignee",60313),bellDot:n("bell-dot",60314),debugConsole:n("debug-console",60315),library:n("library",60316),output:n("output",60317),runAll:n("run-all",60318),syncIgnored:n("sync-ignored",60319),pinned:n("pinned",60320),githubInverted:n("github-inverted",60321),debugAlt:n("debug-alt",60305),serverProcess:n("server-process",60322),serverEnvironment:n("server-environment",60323),pass:n("pass",60324),stopCircle:n("stop-circle",60325),playCircle:n("play-circle",60326),record:n("record",60327),debugAltSmall:n("debug-alt-small",60328),vmConnect:n("vm-connect",60329),cloud:n("cloud",60330),merge:n("merge",60331),exportIcon:n("export",60332),graphLeft:n("graph-left",60333),magnet:n("magnet",60334),notebook:n("notebook",60335),redo:n("redo",60336),checkAll:n("check-all",60337),pinnedDirty:n("pinned-dirty",60338),passFilled:n("pass-filled",60339),circleLargeFilled:n("circle-large-filled",60340),circleLarge:n("circle-large",60341),circleLargeOutline:n("circle-large-outline",60341),combine:n("combine",60342),gather:n("gather",60342),table:n("table",60343),variableGroup:n("variable-group",60344),typeHierarchy:n("type-hierarchy",60345),typeHierarchySub:n("type-hierarchy-sub",60346),typeHierarchySuper:n("type-hierarchy-super",60347),gitPullRequestCreate:n("git-pull-request-create",60348),runAbove:n("run-above",60349),runBelow:n("run-below",60350),notebookTemplate:n("notebook-template",60351),debugRerun:n("debug-rerun",60352),workspaceTrusted:n("workspace-trusted",60353),workspaceUntrusted:n("workspace-untrusted",60354),workspaceUnspecified:n("workspace-unspecified",60355),terminalCmd:n("terminal-cmd",60356),terminalDebian:n("terminal-debian",60357),terminalLinux:n("terminal-linux",60358),terminalPowershell:n("terminal-powershell",60359),terminalTmux:n("terminal-tmux",60360),terminalUbuntu:n("terminal-ubuntu",60361),terminalBash:n("terminal-bash",60362),arrowSwap:n("arrow-swap",60363),copy:n("copy",60364),personAdd:n("person-add",60365),filterFilled:n("filter-filled",60366),wand:n("wand",60367),debugLineByLine:n("debug-line-by-line",60368),inspect:n("inspect",60369),layers:n("layers",60370),layersDot:n("layers-dot",60371),layersActive:n("layers-active",60372),compass:n("compass",60373),compassDot:n("compass-dot",60374),compassActive:n("compass-active",60375),azure:n("azure",60376),issueDraft:n("issue-draft",60377),gitPullRequestClosed:n("git-pull-request-closed",60378),gitPullRequestDraft:n("git-pull-request-draft",60379),debugAll:n("debug-all",60380),debugCoverage:n("debug-coverage",60381),runErrors:n("run-errors",60382),folderLibrary:n("folder-library",60383),debugContinueSmall:n("debug-continue-small",60384),beakerStop:n("beaker-stop",60385),graphLine:n("graph-line",60386),graphScatter:n("graph-scatter",60387),pieChart:n("pie-chart",60388),bracketDot:n("bracket-dot",60389),bracketError:n("bracket-error",60390),lockSmall:n("lock-small",60391),azureDevops:n("azure-devops",60392),verifiedFilled:n("verified-filled",60393),newLine:n("newline",60394),layout:n("layout",60395),layoutActivitybarLeft:n("layout-activitybar-left",60396),layoutActivitybarRight:n("layout-activitybar-right",60397),layoutPanelLeft:n("layout-panel-left",60398),layoutPanelCenter:n("layout-panel-center",60399),layoutPanelJustify:n("layout-panel-justify",60400),layoutPanelRight:n("layout-panel-right",60401),layoutPanel:n("layout-panel",60402),layoutSidebarLeft:n("layout-sidebar-left",60403),layoutSidebarRight:n("layout-sidebar-right",60404),layoutStatusbar:n("layout-statusbar",60405),layoutMenubar:n("layout-menubar",60406),layoutCentered:n("layout-centered",60407),layoutSidebarRightOff:n("layout-sidebar-right-off",60416),layoutPanelOff:n("layout-panel-off",60417),layoutSidebarLeftOff:n("layout-sidebar-left-off",60418),target:n("target",60408),indent:n("indent",60409),recordSmall:n("record-small",60410),errorSmall:n("error-small",60411),arrowCircleDown:n("arrow-circle-down",60412),arrowCircleLeft:n("arrow-circle-left",60413),arrowCircleRight:n("arrow-circle-right",60414),arrowCircleUp:n("arrow-circle-up",60415),heartFilled:n("heart-filled",60420),map:n("map",60421),mapFilled:n("map-filled",60422),circleSmall:n("circle-small",60423),bellSlash:n("bell-slash",60424),bellSlashDot:n("bell-slash-dot",60425),commentUnresolved:n("comment-unresolved",60426),gitPullRequestGoToChanges:n("git-pull-request-go-to-changes",60427),gitPullRequestNewChanges:n("git-pull-request-new-changes",60428),searchFuzzy:n("search-fuzzy",60429),commentDraft:n("comment-draft",60430),send:n("send",60431),sparkle:n("sparkle",60432),insert:n("insert",60433),mic:n("mic",60434),dialogError:n("dialog-error","error"),dialogWarning:n("dialog-warning","warning"),dialogInfo:n("dialog-info","info"),dialogClose:n("dialog-close","close"),treeItemExpanded:n("tree-item-expanded","chevron-down"),treeFilterOnTypeOn:n("tree-filter-on-type-on","list-filter"),treeFilterOnTypeOff:n("tree-filter-on-type-off","list-selection"),treeFilterClear:n("tree-filter-clear","close"),treeItemLoading:n("tree-item-loading","loading"),menuSelection:n("menu-selection","check"),menuSubmenu:n("menu-submenu","chevron-right"),menuBarMore:n("menubar-more","more"),scrollbarButtonLeft:n("scrollbar-button-left","triangle-left"),scrollbarButtonRight:n("scrollbar-button-right","triangle-right"),scrollbarButtonUp:n("scrollbar-button-up","triangle-up"),scrollbarButtonDown:n("scrollbar-button-down","triangle-down"),toolBarMore:n("toolbar-more","more"),quickInputBack:n("quick-input-back","arrow-left")}}),define(Z[37],ee([0,1,12]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createProxyObject=e.getAllMethodNames=e.getAllPropertyNames=e.filter=e.getCaseInsensitive=e.distinct=e.getOrDefault=e.safeStringify=e.equals=e.mixin=e.cloneAndChange=e.deepFreeze=e.deepClone=void 0;function A(c){if(!c||typeof c!="object"||c instanceof RegExp)return c;const f=Array.isArray(c)?[]:{};return Object.entries(c).forEach(([I,S])=>{f[I]=S&&typeof S=="object"?A(S):S}),f}e.deepClone=A;function n(c){if(!c||typeof c!="object")return c;const f=[c];for(;f.length>0;){const I=f.shift();Object.freeze(I);for(const S in I)if(O.call(I,S)){const t=I[S];typeof t=="object"&&!Object.isFrozen(t)&&!(0,b.isTypedArray)(t)&&f.push(t)}}return c}e.deepFreeze=n;const O=Object.prototype.hasOwnProperty;function D(c,f){return P(c,f,new Set)}e.cloneAndChange=D;function P(c,f,I){if((0,b.isUndefinedOrNull)(c))return c;const S=f(c);if(typeof S<"u")return S;if(Array.isArray(c)){const t=[];for(const a of c)t.push(P(a,f,I));return t}if((0,b.isObject)(c)){if(I.has(c))throw new Error("Cannot clone recursive data-structure");I.add(c);const t={};for(const a in c)O.call(c,a)&&(t[a]=P(c[a],f,I));return I.delete(c),t}return c}function h(c,f,I=!0){return(0,b.isObject)(c)?((0,b.isObject)(f)&&Object.keys(f).forEach(S=>{S in c?I&&((0,b.isObject)(c[S])&&(0,b.isObject)(f[S])?h(c[S],f[S],I):c[S]=f[S]):c[S]=f[S]}),c):f}e.mixin=h;function d(c,f){if(c===f)return!0;if(c==null||f===null||f===void 0||typeof c!=typeof f||typeof c!="object"||Array.isArray(c)!==Array.isArray(f))return!1;let I,S;if(Array.isArray(c)){if(c.length!==f.length)return!1;for(I=0;I<c.length;I++)if(!d(c[I],f[I]))return!1}else{const t=[];for(S in c)t.push(S);t.sort();const a=[];for(S in f)a.push(S);if(a.sort(),!d(t,a))return!1;for(I=0;I<t.length;I++)if(!d(c[t[I]],f[t[I]]))return!1}return!0}e.equals=d;function m(c){const f=new Set;return JSON.stringify(c,(I,S)=>{if((0,b.isObject)(S)||Array.isArray(S)){if(f.has(S))return"[Circular]";f.add(S)}return S})}e.safeStringify=m;function g(c,f,I){const S=f(c);return typeof S>"u"?I:S}e.getOrDefault=g;function w(c,f){const I=Object.create(null);return!c||!f||Object.keys(f).forEach(t=>{const a=c[t],s=f[t];d(a,s)||(I[t]=s)}),I}e.distinct=w;function u(c,f){const I=f.toLowerCase(),S=Object.keys(c).find(t=>t.toLowerCase()===I);return S?c[S]:c[f]}e.getCaseInsensitive=u;function y(c,f){const I=Object.create(null);for(const[S,t]of Object.entries(c))f(S,t)&&(I[S]=t);return I}e.filter=y;function E(c){let f=[];for(;Object.prototype!==c;)f=f.concat(Object.getOwnPropertyNames(c)),c=Object.getPrototypeOf(c);return f}e.getAllPropertyNames=E;function l(c){const f=[];for(const I of E(c))typeof c[I]=="function"&&f.push(I);return f}e.getAllMethodNames=l;function v(c,f){const I=t=>function(){const a=Array.prototype.slice.call(arguments,0);return f(t,a)},S={};for(const t of c)S[t]=I(t);return S}e.createProxyObject=v}),define(Z[104],ee([0,1,72]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ThemeIcon=e.themeColorFromId=e.ThemeColor=void 0;var A;(function(D){function P(h){return h&&typeof h=="object"&&typeof h.id=="string"}D.isThemeColor=P})(A||(e.ThemeColor=A={}));function n(D){return{id:D}}e.themeColorFromId=n;var O;(function(D){D.iconNameSegment="[A-Za-z0-9]+",D.iconNameExpression="[A-Za-z0-9-]+",D.iconModifierExpression="~[A-Za-z]+",D.iconNameCharacter="[A-Za-z0-9~-]";const P=new RegExp(`^(${D.iconNameExpression})(${D.iconModifierExpression})?$`);function h(c){const f=P.exec(c.id);if(!f)return h(b.Codicon.error);const[,I,S]=f;if(["active-connections-action","add-server-action","add-server-group-action","server-page"].includes(I))return["codicon",I];{const a=["codicon","codicon-"+I];return S&&a.push("codicon-modifier-"+S.substring(1)),a}}D.asClassNameArray=h;function d(c){return h(c).join(" ")}D.asClassName=d;function m(c){return"."+h(c).join(".")}D.asCSSSelector=m;function g(c){return c&&typeof c=="object"&&typeof c.id=="string"&&(typeof c.color>"u"||A.isThemeColor(c.color))}D.isThemeIcon=g;const w=new RegExp(`^\\$\\((${D.iconNameExpression}(?:${D.iconModifierExpression})?)\\)$`);function u(c){const f=w.exec(c);if(!f)return;const[,I]=f;return{id:I}}D.fromString=u;function y(c){return{id:c}}D.fromId=y;function E(c,f){let I=c.id;const S=I.lastIndexOf("~");return S!==-1&&(I=I.substring(0,S)),f&&(I=`${I}~${f}`),{id:I}}D.modify=E;function l(c){const f=c.id.lastIndexOf("~");if(f!==-1)return c.id.substring(f+1)}D.getModifier=l;function v(c,f){return c.id===f.id&&c.color?.id===f.color?.id}D.isEqual=v})(O||(e.ThemeIcon=O={}))}),define(Z[31],ee([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateUuid=e.isUUID=void 0;const b=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function A(n){return b.test(n)}e.isUUID=A,e.generateUuid=function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let n;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?n=crypto.getRandomValues.bind(crypto):n=function(P){for(let h=0;h<P.length;h++)P[h]=Math.floor(Math.random()*256);return P};const O=new Uint8Array(16),D=[];for(let P=0;P<256;P++)D.push(P.toString(16).padStart(2,"0"));return function(){n(O),O[6]=O[6]&15|64,O[8]=O[8]&63|128;let h=0,d="";return d+=D[O[h++]],d+=D[O[h++]],d+=D[O[h++]],d+=D[O[h++]],d+="-",d+=D[O[h++]],d+=D[O[h++]],d+="-",d+=D[O[h++]],d+=D[O[h++]],d+="-",d+=D[O[h++]],d+=D[O[h++]],d+="-",d+=D[O[h++]],d+=D[O[h++]],d+=D[O[h++]],d+=D[O[h++]],d+=D[O[h++]],d+=D[O[h++]],d}}()}),define(Z[143],ee([0,1,73,45,49]),function(H,e,b,A,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.checksum=void 0;async function O(D,P){if(await new Promise((m,g)=>{const w=A.createReadStream(D),u=b.createHash("sha1");w.pipe(u);const y=(0,n.once)((E,l)=>{w.removeAllListeners(),u.removeAllListeners(),E?g(E):m(l)});w.once("error",y),w.once("end",y),u.once("error",y),u.once("data",E=>y(void 0,E.toString("hex")))})!==P)throw new Error("Hash mismatch")}e.checksum=O}),define(Z[144],ee([0,1,27]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMac=void 0;const A=new Set(["00:00:00:00:00:00","ff:ff:ff:ff:ff:ff","ac:de:48:00:11:22"]);function n(D){const P=D.replace(/\-/g,":").toLowerCase();return!A.has(P)}function O(){const D=(0,b.networkInterfaces)();for(const P in D){const h=D[P];if(h){for(const{mac:d}of h)if(n(d))return d}}throw new Error("Unable to retrieve mac address (unexpected format)")}e.getMac=O}),define(Z[87],ee([0,1,27,58,31,144]),function(H,e,b,A,n,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMachineId=e.virtualMachineHint=void 0,e.virtualMachineHint=new class{_isVirtualMachineMacAddress(d){return this._virtualMachineOUIs||(this._virtualMachineOUIs=A.TernarySearchTree.forStrings(),this._virtualMachineOUIs.set("00-50-56",!0),this._virtualMachineOUIs.set("00-0C-29",!0),this._virtualMachineOUIs.set("00-05-69",!0),this._virtualMachineOUIs.set("00-03-FF",!0),this._virtualMachineOUIs.set("00-1C-42",!0),this._virtualMachineOUIs.set("00-16-3E",!0),this._virtualMachineOUIs.set("08-00-27",!0),this._virtualMachineOUIs.set("00:50:56",!0),this._virtualMachineOUIs.set("00:0C:29",!0),this._virtualMachineOUIs.set("00:05:69",!0),this._virtualMachineOUIs.set("00:03:FF",!0),this._virtualMachineOUIs.set("00:1C:42",!0),this._virtualMachineOUIs.set("00:16:3E",!0),this._virtualMachineOUIs.set("08:00:27",!0)),!!this._virtualMachineOUIs.findSubstr(d)}value(){if(this._value===void 0){let d=0,m=0;const g=(0,b.networkInterfaces)();for(const w in g){const u=g[w];if(u)for(const{mac:y,internal:E}of u)E||(m+=1,this._isVirtualMachineMacAddress(y.toUpperCase())&&(d+=1))}this._value=m>0?d/m:0}return this._value}};let D;async function P(d){return D||(D=(async()=>await h(d)||n.generateUuid())()),D}e.getMachineId=P;async function h(d){try{const m=await new Promise((w,u)=>{H(["crypto"],w,u)}),g=(0,O.getMac)();return m.createHash("sha256").update(g,"utf8").digest("hex")}catch(m){d(m);return}}}),define(Z[105],ee([0,1,88]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.findFreePortFaster=e.BROWSER_RESTRICTED_PORTS=e.findFreePort=void 0;function A(P,h,d,m=1){let g=!1;return new Promise(w=>{const u=setTimeout(()=>{if(!g)return g=!0,w(0)},d);n(P,h,m,y=>{if(!g)return g=!0,clearTimeout(u),w(y)})})}e.findFreePort=A;function n(P,h,d,m){if(h===0)return m(0);const g=new b.Socket;g.once("connect",()=>(D(g),n(P+d,h-1,d,m))),g.once("data",()=>{}),g.once("error",w=>(D(g),w.code!=="ECONNREFUSED"?n(P+d,h-1,d,m):m(P))),g.connect(P,"127.0.0.1")}e.BROWSER_RESTRICTED_PORTS={1:!0,7:!0,9:!0,11:!0,13:!0,15:!0,17:!0,19:!0,20:!0,21:!0,22:!0,23:!0,25:!0,37:!0,42:!0,43:!0,53:!0,69:!0,77:!0,79:!0,87:!0,95:!0,101:!0,102:!0,103:!0,104:!0,109:!0,110:!0,111:!0,113:!0,115:!0,117:!0,119:!0,123:!0,135:!0,137:!0,139:!0,143:!0,161:!0,179:!0,389:!0,427:!0,465:!0,512:!0,513:!0,514:!0,515:!0,526:!0,530:!0,531:!0,532:!0,540:!0,548:!0,554:!0,556:!0,563:!0,587:!0,601:!0,636:!0,989:!0,990:!0,993:!0,995:!0,1719:!0,1720:!0,1723:!0,2049:!0,3659:!0,4045:!0,5060:!0,5061:!0,6e3:!0,6566:!0,6665:!0,6666:!0,6667:!0,6668:!0,6669:!0,6697:!0,10080:!0};function O(P,h,d,m="127.0.0.1"){let g=!1,w,u=1;const y=b.createServer({pauseOnConnect:!0});function E(l,v){g||(g=!0,y.removeAllListeners(),y.close(),w&&clearTimeout(w),v(l))}return new Promise(l=>{w=setTimeout(()=>{E(0,l)},d),y.on("listening",()=>{E(P,l)}),y.on("error",v=>{v&&(v.code==="EADDRINUSE"||v.code==="EACCES")&&u<h?(P++,u++,y.listen(P,m)):E(0,l)}),y.on("close",()=>{E(0,l)}),y.listen(P,m)})}e.findFreePortFaster=O;function D(P){try{P.removeAllListeners("connect"),P.removeAllListeners("error"),P.end(),P.destroy(),P.unref()}catch(h){console.error(h)}}}),function(){function H(){function e(){return process.uncHostAllowlist}function b(h){const d=new Set;if(Array.isArray(h))for(const m of h)typeof m=="string"&&d.add(m);return Array.from(d)}function A(){const h=e();return h?Array.from(h):[]}function n(h){if(process.platform!=="win32")return;const d=e();if(d)if(typeof h=="string")d.add(h.toLowerCase());else for(const m of b(h))n(m)}function O(h){if(typeof h!="string")return;const d=["\\\\.\\UNC\\","\\\\?\\UNC\\","\\\\"];let m;for(const g of d){if(h.indexOf(g)!==0)continue;const u=h.indexOf("\\",g.length);if(u===-1)continue;const y=h.substring(g.length,u);if(y){m=y;break}}return m}function D(){process.platform==="win32"&&(process.restrictUNCAccess=!1)}function P(){return process.platform!=="win32"?!0:process.enableUNCAccessChecks===!1}return{getUNCHostAllowlist:A,addUNCHostToAllowlist:n,getUNCHost:O,disableUNCAccessRestrictions:D,isUNCAccessRestrictionsDisabled:P}}typeof define=="function"?define("vs/base/node/unc",[],function(){return H()}):typeof module=="object"&&typeof module.exports=="object"?module.exports=H():console.trace("vs/base/node/unc defined in UNKNOWN context (neither requirejs or commonjs)")}(),define(Z[145],ee([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CONTEXT_MENU_CLOSE_CHANNEL=e.CONTEXT_MENU_CHANNEL=void 0,e.CONTEXT_MENU_CHANNEL="vscode:contextmenu",e.CONTEXT_MENU_CLOSE_CHANNEL="vscode:onCloseContextMenu"}),define(Z[146],ee([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Protocol=void 0;class b{constructor(n,O){this.sender=n,this.onMessage=O}send(n){try{this.sender.send("vscode:message",n.buffer)}catch{}}disconnect(){this.sender.send("vscode:disconnect",null)}}e.Protocol=b}),define(Z[38],ee([0,1,14,13]),function(H,e,b,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validatedIpcMain=void 0;class n{constructor(){this.mapListenerToWrapper=new WeakMap}on(D,P){const h=(d,...m)=>{this.validateEvent(D,d)&&P(d,...m)};return this.mapListenerToWrapper.set(P,h),b.ipcMain.on(D,h),this}once(D,P){return b.ipcMain.once(D,(h,...d)=>{this.validateEvent(D,h)&&P(h,...d)}),this}handle(D,P){return b.ipcMain.handle(D,(h,...d)=>this.validateEvent(D,h)?P(h,...d):Promise.reject(`Invalid channel '${D}' or sender for ipcMain.handle() usage.`)),this}removeHandler(D){return b.ipcMain.removeHandler(D),this}removeListener(D,P){const h=this.mapListenerToWrapper.get(P);return h&&(b.ipcMain.removeListener(D,h),this.mapListenerToWrapper.delete(P)),this}validateEvent(D,P){if(!D||!D.startsWith("vscode:"))return(0,A.onUnexpectedError)(`Refused to handle ipcMain event for channel '${D}' because the channel is unknown.`),!1;const h=P.senderFrame,d=h.url;if(!d||d==="about:blank")return!0;let m="unknown";try{m=new URL(d).host}catch{return(0,A.onUnexpectedError)(`Refused to handle ipcMain event for channel '${D}' because of a malformed URL '${d}'.`),!1}return m!=="vscode-app"?((0,A.onUnexpectedError)(`Refused to handle ipcMain event for channel '${D}' because of a bad origin of '${m}'.`),!1):h.parent!==null?((0,A.onUnexpectedError)(`Refused to handle ipcMain event for channel '${D}' because sender of origin '${m}' is not a main frame.`),!1):!0}}e.validatedIpcMain=new n}),define(Z[147],ee([0,1,14,38,145]),function(H,e,b,A,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerContextMenuListener=void 0;function O(){A.validatedIpcMain.on(n.CONTEXT_MENU_CHANNEL,(P,h,d,m,g)=>{const w=D(P,m,d);w.popup({window:b.BrowserWindow.fromWebContents(P.sender)??void 0,x:g?g.x:void 0,y:g?g.y:void 0,positioningItem:g?g.positioningItem:void 0,callback:()=>{w&&P.sender.send(n.CONTEXT_MENU_CLOSE_CHANNEL,h)}})})}e.registerContextMenuListener=O;function D(P,h,d){const m=new b.Menu;return d.forEach(g=>{let w;g.type==="separator"?w=new b.MenuItem({type:g.type}):Array.isArray(g.submenu)?w=new b.MenuItem({submenu:D(P,h,g.submenu),label:g.label}):w=new b.MenuItem({label:g.label,type:g.type,accelerator:g.accelerator,checked:g.checked,enabled:g.enabled,visible:g.visible,click:(u,y,E)=>P.sender.send(h,g.id,E)}),m.append(w)}),m}}),define(Z[148],ee([11,9]),function(H,e){return H.create("sql/base/common/locConstants",e)}),define(Z[89],ee([0,1,148]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.aboutDetail=e.getNewThemeNotification=e.getThemeUpdatedNotification=e.installTooltip=e.downloadTooltip=e.download=e.experimentalCustomizationDescription=e.outputFontFamilyDescription=e.outputFontSizeDescription=e.outputLineHeightDescription=e.interactiveWindowCollapseCodeCellsDescription=e.markupFontSizeDescription=e.textOutputLineLimitDescription=e.globalToolbarShowLabelDescription=e.consolidatedRunButtonDescription=e.dragAndDropDescription=e.showFoldingControlsDescription=e.consolidatedOutputButtonDescription=e.globalToolbarDescription=e.insertToolbarPositionDescription=e.focusIndicatorDescription=e.compactViewDescription=e.undoRedoPerCellDescription=e.cellToolbarVisibilityDescription=e.diffEnablePreviewDescription=e.showCellStatusbarDescription=e.cellToolbarLocationDescription=e.displayOrderDescription=e.terminalIntegratedInheritEnvDescription=e.terminalIntegratedEnvWindowsDescription=e.terminalIntegratedEnvLinuxDescription=e.terminalIntegratedEnvOsxDescription=e.terminalIntegratedDetectLocaleDescrption=e.terminalIntegratedCommandsToSkipShellDescrption=e.terminalIntegratedAutoRepliesDescription=e.terminalIntegratedAllowChordsDescription=e.windowTitleAppNameDescription=e.versionMismatchVsCode=e.versionMismatch=e.versionSyntax=e.notebooksNotSupportedError=e.workspaceTrustEmptyWindowDescription=e.workspaceTrustDescription=e.desktopContributionMiinstallVsix=e.watermarkNewNotebook=e.watermarkNewSqlFile=e.localizationsContributionActivateLanguagePack=e.localizationsContributionUpdateLocale=e.watcherExclude=e.filesContributionMaxMemoryForLargeFilesMB=e.fileActionsContributionMiNewDeployment=e.fileActionsContributionMiNewNotebook=e.fileActionsContributionMiNewQuery=e.fileActionsContributionNewQuery=e.extensionsWorkbenchServiceIncompatible=e.extensionsViewsScenarioTypeUndefined=e.extensionsViewletRecommendedExtensions=e.extensionsActionsReinstallActionSuccessReload=e.extensionsActionsInstallExtensionCompletedAndReloadRequired=e.extensionsActionsEnableRemote=e.extensionsActionsUninstallExtensionComplete=e.extensionsActionsPostDisableTooltip=e.extensionsActionsPostEnableTooltip=e.extensionsActionsEnableLocally=e.extensionsActionsPostUpdateTooltip=e.extensionsActionsPostUninstallTooltip=e.extensionsContributionInstallVSIXActionSuccessReload=e.extensionsContributionInstallVSIXActionAllowNone=e.extensionsContributionExtensionsPolicy=e.menusExtensionPointDataGridContext=e.menusExtensionPointConnectionDialogBrowseTreeContext=e.menusExtensionPointObjectExplorerContext=e.menusExtensionPointDataExplorerContext=e.menusExtensionPointDataExplorerAction=e.menusExtensionPointNotebookToolbar=e.menusExtensionPointNotebookTitle=e.menusExtensionPointNotebookCellTitle=e.menusExtensionPointDashboardToolbar=e.updateConfigContributionShowReleaseNotes=e.updateConfigContributionEnableWindowsBackgroundUpdates=e.updateConfigContributionDefault=e.issueReporterMainAzuredatastudio=void 0,e.issueReporterMainAzuredatastudio=(0,b.localize)(0,null),e.updateConfigContributionDefault=(0,b.localize)(1,null),e.updateConfigContributionEnableWindowsBackgroundUpdates=(0,b.localize)(2,null),e.updateConfigContributionShowReleaseNotes=(0,b.localize)(3,null),e.menusExtensionPointDashboardToolbar=(0,b.localize)(4,null),e.menusExtensionPointNotebookCellTitle=(0,b.localize)(5,null),e.menusExtensionPointNotebookTitle=(0,b.localize)(6,null),e.menusExtensionPointNotebookToolbar=(0,b.localize)(7,null),e.menusExtensionPointDataExplorerAction=(0,b.localize)(8,null),e.menusExtensionPointDataExplorerContext=(0,b.localize)(9,null),e.menusExtensionPointObjectExplorerContext=(0,b.localize)(10,null),e.menusExtensionPointConnectionDialogBrowseTreeContext=(0,b.localize)(11,null),e.menusExtensionPointDataGridContext=(0,b.localize)(12,null),e.extensionsContributionExtensionsPolicy=(0,b.localize)(13,null),e.extensionsContributionInstallVSIXActionAllowNone=(0,b.localize)(14,null);function A(f){return(0,b.localize)(15,null,f)}e.extensionsContributionInstallVSIXActionSuccessReload=A,e.extensionsActionsPostUninstallTooltip=(0,b.localize)(16,null),e.extensionsActionsPostUpdateTooltip=(0,b.localize)(17,null),e.extensionsActionsEnableLocally=(0,b.localize)(18,null),e.extensionsActionsPostEnableTooltip=(0,b.localize)(19,null),e.extensionsActionsPostDisableTooltip=(0,b.localize)(20,null);function n(f){return(0,b.localize)(21,null,f)}e.extensionsActionsUninstallExtensionComplete=n;function O(f){return(0,b.localize)(22,null,f)}e.extensionsActionsEnableRemote=O;function D(f){return(0,b.localize)(23,null,f)}e.extensionsActionsInstallExtensionCompletedAndReloadRequired=D;function P(f){return(0,b.localize)(24,null,f)}e.extensionsActionsReinstallActionSuccessReload=P,e.extensionsViewletRecommendedExtensions=(0,b.localize)(25,null),e.extensionsViewsScenarioTypeUndefined=(0,b.localize)(26,null);function h(f,I,S,t){return(0,b.localize)(27,null,I,f,S,t)}e.extensionsWorkbenchServiceIncompatible=h,e.fileActionsContributionNewQuery=(0,b.localize)(28,null),e.fileActionsContributionMiNewQuery=(0,b.localize)(29,null),e.fileActionsContributionMiNewNotebook=(0,b.localize)(30,null),e.fileActionsContributionMiNewDeployment=(0,b.localize)(31,null),e.filesContributionMaxMemoryForLargeFilesMB=(0,b.localize)(32,null),e.watcherExclude=(0,b.localize)(33,null);function d(f){return(0,b.localize)(34,null,f)}e.localizationsContributionUpdateLocale=d;function m(f){return(0,b.localize)(35,null,f)}e.localizationsContributionActivateLanguagePack=m,e.watermarkNewSqlFile=(0,b.localize)(36,null),e.watermarkNewNotebook=(0,b.localize)(37,null),e.desktopContributionMiinstallVsix=(0,b.localize)(38,null),e.workspaceTrustDescription=(0,b.localize)(39,null);function g(f){return(0,b.localize)(40,null,f)}e.workspaceTrustEmptyWindowDescription=g,e.notebooksNotSupportedError=(0,b.localize)(41,null);function w(f,I){return(0,b.localize)(42,null,f,I)}e.versionSyntax=w;function u(f,I){return(0,b.localize)(43,null,f,I)}e.versionMismatch=u;function y(f,I,S){return(0,b.localize)(44,null,f,I,S)}e.versionMismatchVsCode=y,e.windowTitleAppNameDescription=(0,b.localize)(45,null),e.terminalIntegratedAllowChordsDescription=(0,b.localize)(46,null),e.terminalIntegratedAutoRepliesDescription=(0,b.localize)(47,null,'`"Terminate batch job (Y/N)": "\\r"`','`"\\r"`');function E(f){return(0,b.localize)(48,null,f.sort().map(I=>`- ${I}`).join(`
`),`[${(0,b.localize)(49,null)}](command:workbench.action.openRawDefaultSettings '${(0,b.localize)(50,null)}')`)}e.terminalIntegratedCommandsToSkipShellDescrption=E,e.terminalIntegratedDetectLocaleDescrption=(0,b.localize)(51,null),e.terminalIntegratedEnvOsxDescription=(0,b.localize)(52,null),e.terminalIntegratedEnvLinuxDescription=(0,b.localize)(53,null),e.terminalIntegratedEnvWindowsDescription=(0,b.localize)(54,null),e.terminalIntegratedInheritEnvDescription=(0,b.localize)(55,null),e.displayOrderDescription=(0,b.localize)(56,null),e.cellToolbarLocationDescription=(0,b.localize)(57,null),e.showCellStatusbarDescription=(0,b.localize)(58,null),e.diffEnablePreviewDescription=(0,b.localize)(59,null),e.cellToolbarVisibilityDescription=(0,b.localize)(60,null),e.undoRedoPerCellDescription=(0,b.localize)(61,null),e.compactViewDescription=(0,b.localize)(62,null),e.focusIndicatorDescription=(0,b.localize)(63,null),e.insertToolbarPositionDescription=(0,b.localize)(64,null),e.globalToolbarDescription=(0,b.localize)(65,null),e.consolidatedOutputButtonDescription=(0,b.localize)(66,null),e.showFoldingControlsDescription=(0,b.localize)(67,null),e.dragAndDropDescription=(0,b.localize)(68,null),e.consolidatedRunButtonDescription=(0,b.localize)(69,null),e.globalToolbarShowLabelDescription=(0,b.localize)(70,null),e.textOutputLineLimitDescription=(0,b.localize)(71,null),e.markupFontSizeDescription=(0,b.localize)(72,null),e.interactiveWindowCollapseCodeCellsDescription=(0,b.localize)(73,null),e.outputLineHeightDescription=(0,b.localize)(74,null),e.outputFontSizeDescription=(0,b.localize)(75,null),e.outputFontFamilyDescription=(0,b.localize)(76,null),e.experimentalCustomizationDescription=(0,b.localize)(77,null),e.download=(0,b.localize)(78,null),e.downloadTooltip=(0,b.localize)(79,null),e.installTooltip=(0,b.localize)(80,null);function l(f){return(0,b.localize)(81,null,f)}e.getThemeUpdatedNotification=l;function v(f){return(0,b.localize)(82,null,f)}e.getNewThemeNotification=v;function c(f,I,S,t,a,s,i,r,o){return(0,b.localize)(83,null,f,I,S,o,t,a,s,i,r)}e.aboutDetail=c}),define(Z[149],ee([11,9]),function(H,e){return H.create("vs/base/common/date",e)}),define(Z[150],ee([0,1,149]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toLocalISOString=e.fromNow=void 0;const A=60,n=A*60,O=n*24,D=O*7,P=O*30,h=O*365;function d(g,w,u,y){typeof g!="number"&&(g=g.getTime());const E=Math.round((new Date().getTime()-g)/1e3);if(E<-30)return(0,b.localize)(0,null,d(new Date().getTime()+E*1e3,!1));if(!y&&E<30)return(0,b.localize)(1,null);let l;return E<A?(l=E,w?l===1?u?(0,b.localize)(2,null,l):(0,b.localize)(3,null,l):u?(0,b.localize)(4,null,l):(0,b.localize)(5,null,l):l===1?u?(0,b.localize)(6,null,l):(0,b.localize)(7,null,l):u?(0,b.localize)(8,null,l):(0,b.localize)(9,null,l)):E<n?(l=Math.floor(E/A),w?l===1?u?(0,b.localize)(10,null,l):(0,b.localize)(11,null,l):u?(0,b.localize)(12,null,l):(0,b.localize)(13,null,l):l===1?u?(0,b.localize)(14,null,l):(0,b.localize)(15,null,l):u?(0,b.localize)(16,null,l):(0,b.localize)(17,null,l)):E<O?(l=Math.floor(E/n),w?l===1?u?(0,b.localize)(18,null,l):(0,b.localize)(19,null,l):u?(0,b.localize)(20,null,l):(0,b.localize)(21,null,l):l===1?u?(0,b.localize)(22,null,l):(0,b.localize)(23,null,l):u?(0,b.localize)(24,null,l):(0,b.localize)(25,null,l)):E<D?(l=Math.floor(E/O),w?l===1?(0,b.localize)(26,null,l):(0,b.localize)(27,null,l):l===1?(0,b.localize)(28,null,l):(0,b.localize)(29,null,l)):E<P?(l=Math.floor(E/D),w?l===1?u?(0,b.localize)(30,null,l):(0,b.localize)(31,null,l):u?(0,b.localize)(32,null,l):(0,b.localize)(33,null,l):l===1?u?(0,b.localize)(34,null,l):(0,b.localize)(35,null,l):u?(0,b.localize)(36,null,l):(0,b.localize)(37,null,l)):E<h?(l=Math.floor(E/P),w?l===1?u?(0,b.localize)(38,null,l):(0,b.localize)(39,null,l):u?(0,b.localize)(40,null,l):(0,b.localize)(41,null,l):l===1?u?(0,b.localize)(42,null,l):(0,b.localize)(43,null,l):u?(0,b.localize)(44,null,l):(0,b.localize)(45,null,l)):(l=Math.floor(E/h),w?l===1?u?(0,b.localize)(46,null,l):(0,b.localize)(47,null,l):u?(0,b.localize)(48,null,l):(0,b.localize)(49,null,l):l===1?u?(0,b.localize)(50,null,l):(0,b.localize)(51,null,l):u?(0,b.localize)(52,null,l):(0,b.localize)(53,null,l))}e.fromNow=d;function m(g){return g.getFullYear()+"-"+String(g.getMonth()+1).padStart(2,"0")+"-"+String(g.getDate()).padStart(2,"0")+"T"+String(g.getHours()).padStart(2,"0")+":"+String(g.getMinutes()).padStart(2,"0")+":"+String(g.getSeconds()).padStart(2,"0")+"."+(g.getMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"}e.toLocalISOString=m}),define(Z[151],ee([11,9]),function(H,e){return H.create("vs/base/common/errorMessage",e)}),define(Z[50],ee([0,1,24,12,151]),function(H,e,b,A,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createErrorWithActions=e.isErrorWithActions=e.toErrorMessage=void 0;function O(g,w){return w&&(g.stack||g.stacktrace)?n.localize(0,null,P(g),D(g.stack)||D(g.stacktrace)):P(g)}function D(g){return Array.isArray(g)?g.join(`
`):g}function P(g){return g.code==="ERR_UNC_HOST_NOT_ALLOWED"?`${g.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:typeof g.code=="string"&&typeof g.errno=="number"&&typeof g.syscall=="string"?n.localize(1,null,g.message):g.message||n.localize(2,null)}function h(g=null,w=!1){if(!g)return n.localize(3,null);if(Array.isArray(g)){const u=b.coalesce(g),y=h(u[0],w);return u.length>1?n.localize(4,null,y,u.length):y}if(A.isString(g))return g;if(g.detail){const u=g.detail;if(u.error)return O(u.error,w);if(u.exception)return O(u.exception,w)}return g.stack?O(g,w):g.message?g.message:n.localize(5,null)}e.toErrorMessage=h;function d(g){const w=g;return w instanceof Error&&Array.isArray(w.actions)}e.isErrorWithActions=d;function m(g,w){let u;return typeof g=="string"?u=new Error(g):u=g,u.actions=w,u}e.createErrorWithActions=m}),define(Z[152],ee([11,9]),function(H,e){return H.create("vs/base/common/jsonErrorMessages",e)}),define(Z[153],ee([0,1,152]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getParseErrorMessage=void 0;function A(n){switch(n){case 1:return(0,b.localize)(0,null);case 2:return(0,b.localize)(1,null);case 3:return(0,b.localize)(2,null);case 4:return(0,b.localize)(3,null);case 5:return(0,b.localize)(4,null);case 6:return(0,b.localize)(5,null);case 7:return(0,b.localize)(6,null);case 8:return(0,b.localize)(7,null);case 9:return(0,b.localize)(8,null);default:return""}}e.getParseErrorMessage=A}),define(Z[154],ee([11,9]),function(H,e){return H.create("vs/base/common/platform",e)}),define(Z[4],ee([0,1,154]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isAndroid=e.isEdge=e.isSafari=e.isFirefox=e.isChrome=e.isLittleEndian=e.OS=e.OperatingSystem=e.setTimeout0=e.setTimeout0IsFaster=e.translationsConfigFile=e.platformLocale=e.locale=e.Language=e.language=e.userAgent=e.platform=e.isCI=e.isMobile=e.isIOS=e.isWebWorker=e.isWeb=e.isElectron=e.isNative=e.isLinuxSnap=e.isLinux=e.isMacintosh=e.isWindows=e.PlatformToString=e.Platform=e.globals=e.LANGUAGE_DEFAULT=void 0,e.LANGUAGE_DEFAULT="en";let A=!1,n=!1,O=!1,D=!1,P=!1,h=!1,d=!1,m=!1,g=!1,w=!1,u,y=e.LANGUAGE_DEFAULT,E=e.LANGUAGE_DEFAULT,l,v;e.globals=typeof self=="object"?self:typeof global=="object"?global:{};let c;typeof e.globals.vscode<"u"&&typeof e.globals.vscode.process<"u"?c=e.globals.vscode.process:typeof process<"u"&&(c=process);const f=typeof c?.versions?.electron=="string",I=f&&c?.type==="renderer";if(typeof navigator=="object"&&!I)v=navigator.userAgent,A=v.indexOf("Windows")>=0,n=v.indexOf("Macintosh")>=0,m=(v.indexOf("Macintosh")>=0||v.indexOf("iPad")>=0||v.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,O=v.indexOf("Linux")>=0,w=v?.indexOf("Mobi")>=0,h=!0,u=b.getConfiguredDefaultLocale(b.localize(0,null))||e.LANGUAGE_DEFAULT,y=u,E=navigator.language;else if(typeof c=="object"){A=c.platform==="win32",n=c.platform==="darwin",O=c.platform==="linux",D=O&&!!c.env.SNAP&&!!c.env.SNAP_REVISION,d=f,g=!!c.env.CI||!!c.env.BUILD_ARTIFACTSTAGINGDIRECTORY,u=e.LANGUAGE_DEFAULT,y=e.LANGUAGE_DEFAULT;const k=c.env.VSCODE_NLS_CONFIG;if(k)try{const M=JSON.parse(k),C=M.availableLanguages["*"];u=M.locale,E=M.osLocale,y=C||e.LANGUAGE_DEFAULT,l=M._translationsConfigFile}catch{}P=!0}else console.error("Unable to resolve platform.");var S;(function(k){k[k.Web=0]="Web",k[k.Mac=1]="Mac",k[k.Linux=2]="Linux",k[k.Windows=3]="Windows"})(S||(e.Platform=S={}));function t(k){switch(k){case 0:return"Web";case 1:return"Mac";case 2:return"Linux";case 3:return"Windows"}}e.PlatformToString=t;let a=0;n?a=1:A?a=3:O&&(a=2),e.isWindows=A,e.isMacintosh=n,e.isLinux=O,e.isLinuxSnap=D,e.isNative=P,e.isElectron=d,e.isWeb=h,e.isWebWorker=h&&typeof e.globals.importScripts=="function",e.isIOS=m,e.isMobile=w,e.isCI=g,e.platform=a,e.userAgent=v,e.language=y;var s;(function(k){function M(){return e.language}k.value=M;function C(){return e.language.length===2?e.language==="en":e.language.length>=3?e.language[0]==="e"&&e.language[1]==="n"&&e.language[2]==="-":!1}k.isDefaultVariant=C;function L(){return e.language==="en"}k.isDefault=L})(s||(e.Language=s={})),e.locale=u,e.platformLocale=E,e.translationsConfigFile=l,e.setTimeout0IsFaster=typeof e.globals.postMessage=="function"&&!e.globals.importScripts,e.setTimeout0=(()=>{if(e.setTimeout0IsFaster){const k=[];e.globals.addEventListener("message",C=>{if(C.data&&C.data.vscodeScheduleAsyncWork)for(let L=0,T=k.length;L<T;L++){const F=k[L];if(F.id===C.data.vscodeScheduleAsyncWork){k.splice(L,1),F.callback();return}}});let M=0;return C=>{const L=++M;k.push({id:L,callback:C}),e.globals.postMessage({vscodeScheduleAsyncWork:L},"*")}}return k=>setTimeout(k)})();var i;(function(k){k[k.Windows=1]="Windows",k[k.Macintosh=2]="Macintosh",k[k.Linux=3]="Linux"})(i||(e.OperatingSystem=i={})),e.OS=n||m?2:A?1:3;let r=!0,o=!1;function p(){if(!o){o=!0;const k=new Uint8Array(2);k[0]=1,k[1]=2,r=new Uint16Array(k.buffer)[0]===(2<<8)+1}return r}e.isLittleEndian=p,e.isChrome=!!(e.userAgent&&e.userAgent.indexOf("Chrome")>=0),e.isFirefox=!!(e.userAgent&&e.userAgent.indexOf("Firefox")>=0),e.isSafari=!!(!e.isChrome&&e.userAgent&&e.userAgent.indexOf("Safari")>=0),e.isEdge=!!(e.userAgent&&e.userAgent.indexOf("Edg/")>=0),e.isAndroid=!!(e.userAgent&&e.userAgent.indexOf("Android")>=0)}),define(Z[36],ee([0,1,4]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.arch=e.platform=e.env=e.cwd=void 0;let A;if(typeof b.globals.vscode<"u"&&typeof b.globals.vscode.process<"u"){const n=b.globals.vscode.process;A={get platform(){return n.platform},get arch(){return n.arch},get env(){return n.env},cwd(){return n.cwd()}}}else typeof process<"u"?A={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:A={get platform(){return b.isWindows?"win32":b.isMacintosh?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};e.cwd=A.cwd,e.env=A.env,e.platform=A.platform,e.arch=A.arch}),define(Z[10],ee([0,1,36]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.delimiter=e.sep=e.toNamespacedPath=e.parse=e.format=e.extname=e.basename=e.dirname=e.relative=e.resolve=e.join=e.isAbsolute=e.normalize=e.posix=e.win32=void 0;const A=65,n=97,O=90,D=122,P=46,h=47,d=92,m=58,g=63;class w extends Error{constructor(a,s,i){let r;typeof s=="string"&&s.indexOf("not ")===0?(r="must not be",s=s.replace(/^not /,"")):r="must be";const o=a.indexOf(".")!==-1?"property":"argument";let p=`The "${a}" ${o} ${r} of type ${s}`;p+=`. Received type ${typeof i}`,super(p),this.code="ERR_INVALID_ARG_TYPE"}}function u(t,a){if(t===null||typeof t!="object")throw new w(a,"Object",t)}function y(t,a){if(typeof t!="string")throw new w(a,"string",t)}const E=b.platform==="win32";function l(t){return t===h||t===d}function v(t){return t===h}function c(t){return t>=A&&t<=O||t>=n&&t<=D}function f(t,a,s,i){let r="",o=0,p=-1,k=0,M=0;for(let C=0;C<=t.length;++C){if(C<t.length)M=t.charCodeAt(C);else{if(i(M))break;M=h}if(i(M)){if(!(p===C-1||k===1))if(k===2){if(r.length<2||o!==2||r.charCodeAt(r.length-1)!==P||r.charCodeAt(r.length-2)!==P){if(r.length>2){const L=r.lastIndexOf(s);L===-1?(r="",o=0):(r=r.slice(0,L),o=r.length-1-r.lastIndexOf(s)),p=C,k=0;continue}else if(r.length!==0){r="",o=0,p=C,k=0;continue}}a&&(r+=r.length>0?`${s}..`:"..",o=2)}else r.length>0?r+=`${s}${t.slice(p+1,C)}`:r=t.slice(p+1,C),o=C-p-1;p=C,k=0}else M===P&&k!==-1?++k:k=-1}return r}function I(t,a){u(a,"pathObject");const s=a.dir||a.root,i=a.base||`${a.name||""}${a.ext||""}`;return s?s===a.root?`${s}${i}`:`${s}${t}${i}`:i}e.win32={resolve(...t){let a="",s="",i=!1;for(let r=t.length-1;r>=-1;r--){let o;if(r>=0){if(o=t[r],y(o,"path"),o.length===0)continue}else a.length===0?o=b.cwd():(o=b.env[`=${a}`]||b.cwd(),(o===void 0||o.slice(0,2).toLowerCase()!==a.toLowerCase()&&o.charCodeAt(2)===d)&&(o=`${a}\\`));const p=o.length;let k=0,M="",C=!1;const L=o.charCodeAt(0);if(p===1)l(L)&&(k=1,C=!0);else if(l(L))if(C=!0,l(o.charCodeAt(1))){let T=2,F=T;for(;T<p&&!l(o.charCodeAt(T));)T++;if(T<p&&T!==F){const z=o.slice(F,T);for(F=T;T<p&&l(o.charCodeAt(T));)T++;if(T<p&&T!==F){for(F=T;T<p&&!l(o.charCodeAt(T));)T++;(T===p||T!==F)&&(M=`\\\\${z}\\${o.slice(F,T)}`,k=T)}}}else k=1;else c(L)&&o.charCodeAt(1)===m&&(M=o.slice(0,2),k=2,p>2&&l(o.charCodeAt(2))&&(C=!0,k=3));if(M.length>0)if(a.length>0){if(M.toLowerCase()!==a.toLowerCase())continue}else a=M;if(i){if(a.length>0)break}else if(s=`${o.slice(k)}\\${s}`,i=C,C&&a.length>0)break}return s=f(s,!i,"\\",l),i?`${a}\\${s}`:`${a}${s}`||"."},normalize(t){y(t,"path");const a=t.length;if(a===0)return".";let s=0,i,r=!1;const o=t.charCodeAt(0);if(a===1)return v(o)?"\\":t;if(l(o))if(r=!0,l(t.charCodeAt(1))){let k=2,M=k;for(;k<a&&!l(t.charCodeAt(k));)k++;if(k<a&&k!==M){const C=t.slice(M,k);for(M=k;k<a&&l(t.charCodeAt(k));)k++;if(k<a&&k!==M){for(M=k;k<a&&!l(t.charCodeAt(k));)k++;if(k===a)return`\\\\${C}\\${t.slice(M)}\\`;k!==M&&(i=`\\\\${C}\\${t.slice(M,k)}`,s=k)}}}else s=1;else c(o)&&t.charCodeAt(1)===m&&(i=t.slice(0,2),s=2,a>2&&l(t.charCodeAt(2))&&(r=!0,s=3));let p=s<a?f(t.slice(s),!r,"\\",l):"";return p.length===0&&!r&&(p="."),p.length>0&&l(t.charCodeAt(a-1))&&(p+="\\"),i===void 0?r?`\\${p}`:p:r?`${i}\\${p}`:`${i}${p}`},isAbsolute(t){y(t,"path");const a=t.length;if(a===0)return!1;const s=t.charCodeAt(0);return l(s)||a>2&&c(s)&&t.charCodeAt(1)===m&&l(t.charCodeAt(2))},join(...t){if(t.length===0)return".";let a,s;for(let o=0;o<t.length;++o){const p=t[o];y(p,"path"),p.length>0&&(a===void 0?a=s=p:a+=`\\${p}`)}if(a===void 0)return".";let i=!0,r=0;if(typeof s=="string"&&l(s.charCodeAt(0))){++r;const o=s.length;o>1&&l(s.charCodeAt(1))&&(++r,o>2&&(l(s.charCodeAt(2))?++r:i=!1))}if(i){for(;r<a.length&&l(a.charCodeAt(r));)r++;r>=2&&(a=`\\${a.slice(r)}`)}return e.win32.normalize(a)},relative(t,a){if(y(t,"from"),y(a,"to"),t===a)return"";const s=e.win32.resolve(t),i=e.win32.resolve(a);if(s===i||(t=s.toLowerCase(),a=i.toLowerCase(),t===a))return"";let r=0;for(;r<t.length&&t.charCodeAt(r)===d;)r++;let o=t.length;for(;o-1>r&&t.charCodeAt(o-1)===d;)o--;const p=o-r;let k=0;for(;k<a.length&&a.charCodeAt(k)===d;)k++;let M=a.length;for(;M-1>k&&a.charCodeAt(M-1)===d;)M--;const C=M-k,L=p<C?p:C;let T=-1,F=0;for(;F<L;F++){const oe=t.charCodeAt(r+F);if(oe!==a.charCodeAt(k+F))break;oe===d&&(T=F)}if(F!==L){if(T===-1)return i}else{if(C>L){if(a.charCodeAt(k+F)===d)return i.slice(k+F+1);if(F===2)return i.slice(k+F)}p>L&&(t.charCodeAt(r+F)===d?T=F:F===2&&(T=3)),T===-1&&(T=0)}let z="";for(F=r+T+1;F<=o;++F)(F===o||t.charCodeAt(F)===d)&&(z+=z.length===0?"..":"\\..");return k+=T,z.length>0?`${z}${i.slice(k,M)}`:(i.charCodeAt(k)===d&&++k,i.slice(k,M))},toNamespacedPath(t){if(typeof t!="string"||t.length===0)return t;const a=e.win32.resolve(t);if(a.length<=2)return t;if(a.charCodeAt(0)===d){if(a.charCodeAt(1)===d){const s=a.charCodeAt(2);if(s!==g&&s!==P)return`\\\\?\\UNC\\${a.slice(2)}`}}else if(c(a.charCodeAt(0))&&a.charCodeAt(1)===m&&a.charCodeAt(2)===d)return`\\\\?\\${a}`;return t},dirname(t){y(t,"path");const a=t.length;if(a===0)return".";let s=-1,i=0;const r=t.charCodeAt(0);if(a===1)return l(r)?t:".";if(l(r)){if(s=i=1,l(t.charCodeAt(1))){let k=2,M=k;for(;k<a&&!l(t.charCodeAt(k));)k++;if(k<a&&k!==M){for(M=k;k<a&&l(t.charCodeAt(k));)k++;if(k<a&&k!==M){for(M=k;k<a&&!l(t.charCodeAt(k));)k++;if(k===a)return t;k!==M&&(s=i=k+1)}}}}else c(r)&&t.charCodeAt(1)===m&&(s=a>2&&l(t.charCodeAt(2))?3:2,i=s);let o=-1,p=!0;for(let k=a-1;k>=i;--k)if(l(t.charCodeAt(k))){if(!p){o=k;break}}else p=!1;if(o===-1){if(s===-1)return".";o=s}return t.slice(0,o)},basename(t,a){a!==void 0&&y(a,"ext"),y(t,"path");let s=0,i=-1,r=!0,o;if(t.length>=2&&c(t.charCodeAt(0))&&t.charCodeAt(1)===m&&(s=2),a!==void 0&&a.length>0&&a.length<=t.length){if(a===t)return"";let p=a.length-1,k=-1;for(o=t.length-1;o>=s;--o){const M=t.charCodeAt(o);if(l(M)){if(!r){s=o+1;break}}else k===-1&&(r=!1,k=o+1),p>=0&&(M===a.charCodeAt(p)?--p===-1&&(i=o):(p=-1,i=k))}return s===i?i=k:i===-1&&(i=t.length),t.slice(s,i)}for(o=t.length-1;o>=s;--o)if(l(t.charCodeAt(o))){if(!r){s=o+1;break}}else i===-1&&(r=!1,i=o+1);return i===-1?"":t.slice(s,i)},extname(t){y(t,"path");let a=0,s=-1,i=0,r=-1,o=!0,p=0;t.length>=2&&t.charCodeAt(1)===m&&c(t.charCodeAt(0))&&(a=i=2);for(let k=t.length-1;k>=a;--k){const M=t.charCodeAt(k);if(l(M)){if(!o){i=k+1;break}continue}r===-1&&(o=!1,r=k+1),M===P?s===-1?s=k:p!==1&&(p=1):s!==-1&&(p=-1)}return s===-1||r===-1||p===0||p===1&&s===r-1&&s===i+1?"":t.slice(s,r)},format:I.bind(null,"\\"),parse(t){y(t,"path");const a={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return a;const s=t.length;let i=0,r=t.charCodeAt(0);if(s===1)return l(r)?(a.root=a.dir=t,a):(a.base=a.name=t,a);if(l(r)){if(i=1,l(t.charCodeAt(1))){let T=2,F=T;for(;T<s&&!l(t.charCodeAt(T));)T++;if(T<s&&T!==F){for(F=T;T<s&&l(t.charCodeAt(T));)T++;if(T<s&&T!==F){for(F=T;T<s&&!l(t.charCodeAt(T));)T++;T===s?i=T:T!==F&&(i=T+1)}}}}else if(c(r)&&t.charCodeAt(1)===m){if(s<=2)return a.root=a.dir=t,a;if(i=2,l(t.charCodeAt(2))){if(s===3)return a.root=a.dir=t,a;i=3}}i>0&&(a.root=t.slice(0,i));let o=-1,p=i,k=-1,M=!0,C=t.length-1,L=0;for(;C>=i;--C){if(r=t.charCodeAt(C),l(r)){if(!M){p=C+1;break}continue}k===-1&&(M=!1,k=C+1),r===P?o===-1?o=C:L!==1&&(L=1):o!==-1&&(L=-1)}return k!==-1&&(o===-1||L===0||L===1&&o===k-1&&o===p+1?a.base=a.name=t.slice(p,k):(a.name=t.slice(p,o),a.base=t.slice(p,k),a.ext=t.slice(o,k))),p>0&&p!==i?a.dir=t.slice(0,p-1):a.dir=a.root,a},sep:"\\",delimiter:";",win32:null,posix:null};const S=(()=>{if(E){const t=/\\/g;return()=>{const a=b.cwd().replace(t,"/");return a.slice(a.indexOf("/"))}}return()=>b.cwd()})();e.posix={resolve(...t){let a="",s=!1;for(let i=t.length-1;i>=-1&&!s;i--){const r=i>=0?t[i]:S();y(r,"path"),r.length!==0&&(a=`${r}/${a}`,s=r.charCodeAt(0)===h)}return a=f(a,!s,"/",v),s?`/${a}`:a.length>0?a:"."},normalize(t){if(y(t,"path"),t.length===0)return".";const a=t.charCodeAt(0)===h,s=t.charCodeAt(t.length-1)===h;return t=f(t,!a,"/",v),t.length===0?a?"/":s?"./":".":(s&&(t+="/"),a?`/${t}`:t)},isAbsolute(t){return y(t,"path"),t.length>0&&t.charCodeAt(0)===h},join(...t){if(t.length===0)return".";let a;for(let s=0;s<t.length;++s){const i=t[s];y(i,"path"),i.length>0&&(a===void 0?a=i:a+=`/${i}`)}return a===void 0?".":e.posix.normalize(a)},relative(t,a){if(y(t,"from"),y(a,"to"),t===a||(t=e.posix.resolve(t),a=e.posix.resolve(a),t===a))return"";const s=1,i=t.length,r=i-s,o=1,p=a.length-o,k=r<p?r:p;let M=-1,C=0;for(;C<k;C++){const T=t.charCodeAt(s+C);if(T!==a.charCodeAt(o+C))break;T===h&&(M=C)}if(C===k)if(p>k){if(a.charCodeAt(o+C)===h)return a.slice(o+C+1);if(C===0)return a.slice(o+C)}else r>k&&(t.charCodeAt(s+C)===h?M=C:C===0&&(M=0));let L="";for(C=s+M+1;C<=i;++C)(C===i||t.charCodeAt(C)===h)&&(L+=L.length===0?"..":"/..");return`${L}${a.slice(o+M)}`},toNamespacedPath(t){return t},dirname(t){if(y(t,"path"),t.length===0)return".";const a=t.charCodeAt(0)===h;let s=-1,i=!0;for(let r=t.length-1;r>=1;--r)if(t.charCodeAt(r)===h){if(!i){s=r;break}}else i=!1;return s===-1?a?"/":".":a&&s===1?"//":t.slice(0,s)},basename(t,a){a!==void 0&&y(a,"ext"),y(t,"path");let s=0,i=-1,r=!0,o;if(a!==void 0&&a.length>0&&a.length<=t.length){if(a===t)return"";let p=a.length-1,k=-1;for(o=t.length-1;o>=0;--o){const M=t.charCodeAt(o);if(M===h){if(!r){s=o+1;break}}else k===-1&&(r=!1,k=o+1),p>=0&&(M===a.charCodeAt(p)?--p===-1&&(i=o):(p=-1,i=k))}return s===i?i=k:i===-1&&(i=t.length),t.slice(s,i)}for(o=t.length-1;o>=0;--o)if(t.charCodeAt(o)===h){if(!r){s=o+1;break}}else i===-1&&(r=!1,i=o+1);return i===-1?"":t.slice(s,i)},extname(t){y(t,"path");let a=-1,s=0,i=-1,r=!0,o=0;for(let p=t.length-1;p>=0;--p){const k=t.charCodeAt(p);if(k===h){if(!r){s=p+1;break}continue}i===-1&&(r=!1,i=p+1),k===P?a===-1?a=p:o!==1&&(o=1):a!==-1&&(o=-1)}return a===-1||i===-1||o===0||o===1&&a===i-1&&a===s+1?"":t.slice(a,i)},format:I.bind(null,"/"),parse(t){y(t,"path");const a={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return a;const s=t.charCodeAt(0)===h;let i;s?(a.root="/",i=1):i=0;let r=-1,o=0,p=-1,k=!0,M=t.length-1,C=0;for(;M>=i;--M){const L=t.charCodeAt(M);if(L===h){if(!k){o=M+1;break}continue}p===-1&&(k=!1,p=M+1),L===P?r===-1?r=M:C!==1&&(C=1):r!==-1&&(C=-1)}if(p!==-1){const L=o===0&&s?1:o;r===-1||C===0||C===1&&r===p-1&&r===o+1?a.base=a.name=t.slice(L,p):(a.name=t.slice(L,r),a.base=t.slice(L,p),a.ext=t.slice(r,p))}return o>0?a.dir=t.slice(0,o-1):s&&(a.dir="/"),a},sep:"/",delimiter:":",win32:null,posix:null},e.posix.win32=e.win32.win32=e.win32,e.posix.posix=e.win32.posix=e.posix,e.normalize=E?e.win32.normalize:e.posix.normalize,e.isAbsolute=E?e.win32.isAbsolute:e.posix.isAbsolute,e.join=E?e.win32.join:e.posix.join,e.resolve=E?e.win32.resolve:e.posix.resolve,e.relative=E?e.win32.relative:e.posix.relative,e.dirname=E?e.win32.dirname:e.posix.dirname,e.basename=E?e.win32.basename:e.posix.basename,e.extname=E?e.win32.extname:e.posix.extname,e.format=E?e.win32.format:e.posix.format,e.parse=E?e.win32.parse:e.posix.parse,e.toNamespacedPath=E?e.win32.toNamespacedPath:e.posix.toNamespacedPath,e.sep=E?e.win32.sep:e.posix.sep,e.delimiter=E?e.win32.delimiter:e.posix.delimiter}),define(Z[32],ee([0,1,10,4,26,12]),function(H,e,b,A,n,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.randomPath=e.parseLineAndColumnAware=e.indexOfPath=e.getDriveLetter=e.hasDriveLetter=e.isRootOrDriveLetter=e.sanitizeFilePath=e.isWindowsDriveLetter=e.isEqualOrParent=e.isEqual=e.isValidBasename=e.isUNC=e.getRoot=e.toPosixPath=e.toSlashes=e.isPathSeparator=void 0;function D(o){return o===47||o===92}e.isPathSeparator=D;function P(o){return o.replace(/[\\/]/g,b.posix.sep)}e.toSlashes=P;function h(o){return o.indexOf("/")===-1&&(o=P(o)),/^[a-zA-Z]:(\/|$)/.test(o)&&(o="/"+o),o}e.toPosixPath=h;function d(o,p=b.posix.sep){if(!o)return"";const k=o.length,M=o.charCodeAt(0);if(D(M)){if(D(o.charCodeAt(1))&&!D(o.charCodeAt(2))){let L=3;const T=L;for(;L<k&&!D(o.charCodeAt(L));L++);if(T!==L&&!D(o.charCodeAt(L+1))){for(L+=1;L<k;L++)if(D(o.charCodeAt(L)))return o.slice(0,L+1).replace(/[\\/]/g,p)}}return p}else if(v(M)&&o.charCodeAt(1)===58)return D(o.charCodeAt(2))?o.slice(0,2)+p:o.slice(0,2);let C=o.indexOf("://");if(C!==-1){for(C+=3;C<k;C++)if(D(o.charCodeAt(C)))return o.slice(0,C+1)}return""}e.getRoot=d;function m(o){if(!A.isWindows||!o||o.length<5)return!1;let p=o.charCodeAt(0);if(p!==92||(p=o.charCodeAt(1),p!==92))return!1;let k=2;const M=k;for(;k<o.length&&(p=o.charCodeAt(k),p!==92);k++);return!(M===k||(p=o.charCodeAt(k+1),isNaN(p)||p===92))}e.isUNC=m;const g=/[\\/:\*\?"<>\|]/g,w=/[\\/]/g,u=/^(con|prn|aux|clock\$|nul|lpt[0-9]|com[0-9])(\.(.*?))?$/i;function y(o,p=A.isWindows){const k=p?g:w;return!(!o||o.length===0||/^\s+$/.test(o)||(k.lastIndex=0,k.test(o))||p&&u.test(o)||o==="."||o===".."||p&&o[o.length-1]==="."||p&&o.length!==o.trim().length||o.length>255)}e.isValidBasename=y;function E(o,p,k){const M=o===p;return!k||M?M:!o||!p?!1:(0,n.equalsIgnoreCase)(o,p)}e.isEqual=E;function l(o,p,k,M=b.sep){if(o===p)return!0;if(!o||!p||p.length>o.length)return!1;if(k){if(!(0,n.startsWithIgnoreCase)(o,p))return!1;if(p.length===o.length)return!0;let L=p.length;return p.charAt(p.length-1)===M&&L--,o.charAt(L)===M}return p.charAt(p.length-1)!==M&&(p+=M),o.indexOf(p)===0}e.isEqualOrParent=l;function v(o){return o>=65&&o<=90||o>=97&&o<=122}e.isWindowsDriveLetter=v;function c(o,p){return A.isWindows&&o.endsWith(":")&&(o+=b.sep),(0,b.isAbsolute)(o)||(o=(0,b.join)(p,o)),o=(0,b.normalize)(o),A.isWindows?(o=(0,n.rtrim)(o,b.sep),o.endsWith(":")&&(o+=b.sep)):(o=(0,n.rtrim)(o,b.sep),o||(o=b.sep)),o}e.sanitizeFilePath=c;function f(o){const p=(0,b.normalize)(o);return A.isWindows?o.length>3?!1:I(p)&&(o.length===2||p.charCodeAt(2)===92):p===b.posix.sep}e.isRootOrDriveLetter=f;function I(o,p=A.isWindows){return p?v(o.charCodeAt(0))&&o.charCodeAt(1)===58:!1}e.hasDriveLetter=I;function S(o,p=A.isWindows){return I(o,p)?o[0]:void 0}e.getDriveLetter=S;function t(o,p,k){return p.length>o.length?-1:o===p?0:(k&&(o=o.toLowerCase(),p=p.toLowerCase()),o.indexOf(p))}e.indexOfPath=t;function a(o){const p=o.split(":");let k,M,C;for(const L of p){const T=Number(L);(0,O.isNumber)(T)?M===void 0?M=T:C===void 0&&(C=T):k=k?[k,L].join(":"):L}if(!k)throw new Error("Format for `--goto` should be: `FILE:LINE(:COLUMN)`");return{path:k,line:M!==void 0?M:void 0,column:C!==void 0?C:M!==void 0?1:void 0}}e.parseLineAndColumnAware=a;const s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i="BDEFGHIJKMOQRSTUVWXYZbdefghijkmoqrstuvwxyz0123456789";function r(o,p,k=8){let M="";for(let L=0;L<k;L++){let T;L===0&&A.isWindows&&!p&&(k===3||k===4)?T=i:T=s,M+=T.charAt(Math.floor(Math.random()*T.length))}let C;return p?C=`${p}-${M}`:C=M,o?(0,b.join)(o,C):C}e.randomPath=r}),define(Z[74],ee([0,1,4]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.removeDangerousEnvVariables=e.sanitizeProcessEnvironment=e.TerminateResponseCode=e.Source=void 0;var A;(function(P){P[P.stdout=0]="stdout",P[P.stderr=1]="stderr"})(A||(e.Source=A={}));var n;(function(P){P[P.Success=0]="Success",P[P.Unknown=1]="Unknown",P[P.AccessDenied=2]="AccessDenied",P[P.ProcessNotFound=3]="ProcessNotFound"})(n||(e.TerminateResponseCode=n={}));function O(P,...h){const d=h.reduce((w,u)=>(w[u]=!0,w),{}),m=[/^ELECTRON_.+$/,/^VSCODE_(?!(PORTABLE|SHELL_LOGIN|ENV_REPLACE|ENV_APPEND|ENV_PREPEND)).+$/,/^SNAP(|_.*)$/,/^GDK_PIXBUF_.+$/];Object.keys(P).filter(w=>!d[w]).forEach(w=>{for(let u=0;u<m.length;u++)if(w.search(m[u])!==-1){delete P[w];break}})}e.sanitizeProcessEnvironment=O;function D(P){P&&(delete P.DEBUG,b.isMacintosh&&delete P.DYLD_LIBRARY_PATH,b.isLinux&&delete P.LD_PRELOAD)}e.removeDangerousEnvVariables=D}),define(Z[7],ee([0,1,10,4]),function(H,e,b,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.uriToFsPath=e.isUriComponents=e.URI=void 0;const n=/^\w[\w\d+.-]*$/,O=/^\//,D=/^\/\//;function P(i,r){if(!i.scheme&&r)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${i.authority}", path: "${i.path}", query: "${i.query}", fragment: "${i.fragment}"}`);if(i.scheme&&!n.test(i.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(i.path){if(i.authority){if(!O.test(i.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(D.test(i.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function h(i,r){return!i&&!r?"file":i}function d(i,r){switch(i){case"https":case"http":case"file":r?r[0]!==g&&(r=g+r):r=g;break}return r}const m="",g="/",w=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class u{static isUri(r){return r instanceof u?!0:r?typeof r.authority=="string"&&typeof r.fragment=="string"&&typeof r.path=="string"&&typeof r.query=="string"&&typeof r.scheme=="string"&&typeof r.fsPath=="string"&&typeof r.with=="function"&&typeof r.toString=="function":!1}constructor(r,o,p,k,M,C=!1){typeof r=="object"?(this.scheme=r.scheme||m,this.authority=r.authority||m,this.path=r.path||m,this.query=r.query||m,this.fragment=r.fragment||m):(this.scheme=h(r,C),this.authority=o||m,this.path=d(this.scheme,p||m),this.query=k||m,this.fragment=M||m,P(this,C))}get fsPath(){return I(this,!1)}with(r){if(!r)return this;let{scheme:o,authority:p,path:k,query:M,fragment:C}=r;return o===void 0?o=this.scheme:o===null&&(o=m),p===void 0?p=this.authority:p===null&&(p=m),k===void 0?k=this.path:k===null&&(k=m),M===void 0?M=this.query:M===null&&(M=m),C===void 0?C=this.fragment:C===null&&(C=m),o===this.scheme&&p===this.authority&&k===this.path&&M===this.query&&C===this.fragment?this:new l(o,p,k,M,C)}static parse(r,o=!1){const p=w.exec(r);return p?new l(p[2]||m,s(p[4]||m),s(p[5]||m),s(p[7]||m),s(p[9]||m),o):new l(m,m,m,m,m)}static file(r){let o=m;if(A.isWindows&&(r=r.replace(/\\/g,g)),r[0]===g&&r[1]===g){const p=r.indexOf(g,2);p===-1?(o=r.substring(2),r=g):(o=r.substring(2,p),r=r.substring(p)||g)}return new l("file",o,r,m,m)}static from(r,o){return new l(r.scheme,r.authority,r.path,r.query,r.fragment,o)}static joinPath(r,...o){if(!r.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let p;return A.isWindows&&r.scheme==="file"?p=u.file(b.win32.join(I(r,!0),...o)).path:p=b.posix.join(r.path,...o),r.with({path:p})}toString(r=!1){return S(this,r)}toJSON(){return this}static revive(r){if(r){if(r instanceof u)return r;{const o=new l(r);return o._formatted=r.external??null,o._fsPath=r._sep===E?r.fsPath??null:null,o}}else return}}e.URI=u;function y(i){return!i||typeof i!="object"?!1:typeof i.scheme=="string"&&(typeof i.authority=="string"||typeof i.authority>"u")&&(typeof i.path=="string"||typeof i.path>"u")&&(typeof i.query=="string"||typeof i.query>"u")&&(typeof i.fragment=="string"||typeof i.fragment>"u")}e.isUriComponents=y;const E=A.isWindows?1:void 0;class l extends u{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=I(this,!1)),this._fsPath}toString(r=!1){return r?S(this,!0):(this._formatted||(this._formatted=S(this,!1)),this._formatted)}toJSON(){const r={$mid:1};return this._fsPath&&(r.fsPath=this._fsPath,r._sep=E),this._formatted&&(r.external=this._formatted),this.path&&(r.path=this.path),this.scheme&&(r.scheme=this.scheme),this.authority&&(r.authority=this.authority),this.query&&(r.query=this.query),this.fragment&&(r.fragment=this.fragment),r}}const v={[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 c(i,r,o){let p,k=-1;for(let M=0;M<i.length;M++){const C=i.charCodeAt(M);if(C>=97&&C<=122||C>=65&&C<=90||C>=48&&C<=57||C===45||C===46||C===95||C===126||r&&C===47||o&&C===91||o&&C===93||o&&C===58)k!==-1&&(p+=encodeURIComponent(i.substring(k,M)),k=-1),p!==void 0&&(p+=i.charAt(M));else{p===void 0&&(p=i.substr(0,M));const L=v[C];L!==void 0?(k!==-1&&(p+=encodeURIComponent(i.substring(k,M)),k=-1),p+=L):k===-1&&(k=M)}}return k!==-1&&(p+=encodeURIComponent(i.substring(k))),p!==void 0?p:i}function f(i){let r;for(let o=0;o<i.length;o++){const p=i.charCodeAt(o);p===35||p===63?(r===void 0&&(r=i.substr(0,o)),r+=v[p]):r!==void 0&&(r+=i[o])}return r!==void 0?r:i}function I(i,r){let o;return i.authority&&i.path.length>1&&i.scheme==="file"?o=`//${i.authority}${i.path}`:i.path.charCodeAt(0)===47&&(i.path.charCodeAt(1)>=65&&i.path.charCodeAt(1)<=90||i.path.charCodeAt(1)>=97&&i.path.charCodeAt(1)<=122)&&i.path.charCodeAt(2)===58?r?o=i.path.substr(1):o=i.path[1].toLowerCase()+i.path.substr(2):o=i.path,A.isWindows&&(o=o.replace(/\//g,"\\")),o}e.uriToFsPath=I;function S(i,r){const o=r?f:c;let p="",{scheme:k,authority:M,path:C,query:L,fragment:T}=i;if(k&&(p+=k,p+=":"),(M||k==="file")&&(p+=g,p+=g),M){let F=M.indexOf("@");if(F!==-1){const z=M.substr(0,F);M=M.substr(F+1),F=z.lastIndexOf(":"),F===-1?p+=o(z,!1,!1):(p+=o(z.substr(0,F),!1,!1),p+=":",p+=o(z.substr(F+1),!1,!0)),p+="@"}M=M.toLowerCase(),F=M.lastIndexOf(":"),F===-1?p+=o(M,!1,!0):(p+=o(M.substr(0,F),!1,!0),p+=M.substr(F))}if(C){if(C.length>=3&&C.charCodeAt(0)===47&&C.charCodeAt(2)===58){const F=C.charCodeAt(1);F>=65&&F<=90&&(C=`/${String.fromCharCode(F+32)}:${C.substr(3)}`)}else if(C.length>=2&&C.charCodeAt(1)===58){const F=C.charCodeAt(0);F>=65&&F<=90&&(C=`${String.fromCharCode(F+32)}:${C.substr(2)}`)}p+=o(C,!0,!1)}return L&&(p+="?",p+=o(L,!1,!1)),T&&(p+="#",p+=r?T:c(T,!1,!1)),p}function t(i){try{return decodeURIComponent(i)}catch{return i.length>3?i.substr(0,3)+t(i.substr(3)):i}}const a=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function s(i){return i.match(a)?i.replace(a,r=>t(r)):i}}),define(Z[155],ee([0,1,7]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.log=e.getFirstFrame=e.parse=e.isRemoteConsoleLog=void 0;function A(d){const m=d;return m&&typeof m.type=="string"&&typeof m.severity=="string"}e.isRemoteConsoleLog=A;function n(d){const m=[];let g;try{const w=JSON.parse(d.arguments),u=w[w.length-1];u&&u.__$stack&&(w.pop(),g=u.__$stack),m.push(...w)}catch{m.push("Unable to log remote console arguments",d.arguments)}return{args:m,stack:g}}e.parse=n;function O(d){if(typeof d!="string")return O(n(d).stack);const m=d;if(m){const g=D(m),w=/at [^\/]*((?:(?:[a-zA-Z]+:)|(?:[\/])|(?:\\\\))(?:.+)):(\d+):(\d+)/.exec(g||"");if(w&&w.length===4)return{uri:b.URI.file(w[1]),line:Number(w[2]),column:Number(w[3])}}}e.getFirstFrame=O;function D(d){if(!d)return d;const m=d.indexOf(`
`);return m===-1?d:d.substring(0,m)}function P(d,m){const{args:g,stack:w}=n(d),u=typeof g[0]=="string"&&g.length===1;let y=D(w);y&&(y=`(${y.trim()})`);let E=[];if(typeof g[0]=="string"?y&&u?E=[`%c[${m}] %c${g[0]} %c${y}`,h("blue"),h(""),h("grey")]:E=[`%c[${m}] %c${g[0]}`,h("blue"),h(""),...g.slice(1)]:E=[`%c[${m}]%`,h("blue"),...g],y&&!u&&E.push(y),typeof console[d.severity]!="function")throw new Error("Unknown console method");console[d.severity].apply(console,E)}e.log=P;function h(d){return`color: ${d}`}}),define(Z[75],ee([0,1,17,7]),function(H,e,b,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.revive=e.parse=e.stringify=void 0;function n(h){return JSON.stringify(h,D)}e.stringify=n;function O(h){let d=JSON.parse(h);return d=P(d),d}e.parse=O;function D(h,d){return d instanceof RegExp?{$mid:2,source:d.source,flags:d.flags}:d}function P(h,d=0){if(!h||d>200)return h;if(typeof h=="object"){switch(h.$mid){case 1:return A.URI.revive(h);case 2:return new RegExp(h.source,h.flags);case 16:return new Date(h.source)}if(h instanceof b.VSBuffer||h instanceof Uint8Array)return h;if(Array.isArray(h))for(let m=0;m<h.length;++m)h[m]=P(h[m],d+1);else for(const m in h)Object.hasOwnProperty.call(h,m)&&(h[m]=P(h[m],d+1))}return h}e.revive=P}),define(Z[15],ee([0,1,13,4,7]),function(H,e,b,A,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.COI=e.FileAccess=e.nodeModulesAsarUnpackedPath=e.nodeModulesAsarPath=e.nodeModulesPath=e.builtinExtensionsPath=e.RemoteAuthorities=e.connectionTokenQueryName=e.connectionTokenCookieName=e.Schemas=void 0;var O;(function(d){d.inMemory="inmemory",d.vscode="vscode",d.internal="private",d.walkThrough="walkThrough",d.walkThroughSnippet="walkThroughSnippet",d.http="http",d.https="https",d.file="file",d.mailto="mailto",d.untitled="untitled",d.data="data",d.attachment="attachment",d.command="command",d.vscodeRemote="vscode-remote",d.vscodeRemoteResource="vscode-remote-resource",d.vscodeManagedRemoteResource="vscode-managed-remote-resource",d.vscodeUserData="vscode-userdata",d.vscodeCustomEditor="vscode-custom-editor",d.vscodeNotebookCell="vscode-notebook-cell",d.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",d.vscodeNotebookCellOutput="vscode-notebook-cell-output",d.vscodeInteractiveInput="vscode-interactive-input",d.vscodeSettings="vscode-settings",d.vscodeWorkspaceTrust="vscode-workspace-trust",d.vscodeTerminal="vscode-terminal",d.vscodeChatSesssion="vscode-chat-editor",d.webviewPanel="webview-panel",d.vscodeWebview="vscode-webview",d.extension="extension",d.vscodeFileResource="vscode-file",d.tmp="tmp",d.vsls="vsls",d.vscodeSourceControl="vscode-scm"})(O||(e.Schemas=O={})),e.connectionTokenCookieName="vscode-tkn",e.connectionTokenQueryName="tkn";class D{constructor(){this._defaultWebPort=80,this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._remoteResourcesPath=`/${O.vscodeRemoteResource}`}setPreferredWebSchema(m){this._preferredWebSchema=m}setDelegate(m){this._delegate=m}setServerRootPath(m){this._remoteResourcesPath=`${m}/${O.vscodeRemoteResource}`}set(m,g,w){this._hosts[m]=g,this._ports[m]=w}setConnectionToken(m,g){this._connectionTokens[m]=g}getPreferredWebSchema(){return this._preferredWebSchema}rewrite(m){if(this._delegate)try{return this._delegate(m)}catch(l){return b.onUnexpectedError(l),m}const g=m.authority;let w=this._hosts[g];w&&w.indexOf(":")!==-1&&w.indexOf("[")===-1&&(w=`[${w}]`);const u=this._ports[g],y=this._connectionTokens[g];let E=`path=${encodeURIComponent(m.path)}`;return typeof y=="string"&&(E+=`&${e.connectionTokenQueryName}=${encodeURIComponent(y)}`),n.URI.from({scheme:A.isWeb?this._preferredWebSchema:O.vscodeRemoteResource,authority:A.isWeb&&u===this._defaultWebPort?`${w}`:`${w}:${u}`,path:this._remoteResourcesPath,query:E})}}e.RemoteAuthorities=new D,e.builtinExtensionsPath="vs/../../extensions",e.nodeModulesPath="vs/../../node_modules",e.nodeModulesAsarPath="vs/../../node_modules.asar",e.nodeModulesAsarUnpackedPath="vs/../../node_modules.asar.unpacked";class P{static{this.FALLBACK_AUTHORITY="vscode-app"}asBrowserUri(m){const g=this.toUri(m,H);return this.uriToBrowserUri(g)}uriToBrowserUri(m){return m.scheme===O.vscodeRemote?e.RemoteAuthorities.rewrite(m):m.scheme===O.file&&(A.isNative||A.isWebWorker&&A.globals.origin===`${O.vscodeFileResource}://${P.FALLBACK_AUTHORITY}`)?m.with({scheme:O.vscodeFileResource,authority:m.authority||P.FALLBACK_AUTHORITY,query:null,fragment:null}):m}asFileUri(m){const g=this.toUri(m,H);return this.uriToFileUri(g)}uriToFileUri(m){return m.scheme===O.vscodeFileResource?m.with({scheme:O.file,authority:m.authority!==P.FALLBACK_AUTHORITY?m.authority:null,query:null,fragment:null}):m}toUri(m,g){return n.URI.isUri(m)?m:n.URI.parse(g.toUrl(m))}}e.FileAccess=new P;var h;(function(d){const m=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);d.CoopAndCoep=Object.freeze(m.get("3"));const g="vscode-coi";function w(y){let E;typeof y=="string"?E=new URL(y).searchParams:y instanceof URL?E=y.searchParams:n.URI.isUri(y)&&(E=new URL(y.toString(!0)).searchParams);const l=E?.get(g);if(l)return m.get(l)}d.getHeadersFromQuery=w;function u(y,E,l){if(!globalThis.crossOriginIsolated)return;const v=E&&l?"3":l?"2":"1";y instanceof URLSearchParams?y.set(g,v):y[g]=v}d.addSearchParam=u})(h||(e.COI=h={}))}),define(Z[19],ee([0,1,32,15,10,4,26,7]),function(H,e,b,A,n,O,D,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toLocalResource=e.DataUri=e.distinctParents=e.addTrailingPathSeparator=e.removeTrailingPathSeparator=e.hasTrailingPathSeparator=e.isEqualAuthority=e.isAbsolutePath=e.resolvePath=e.relativePath=e.normalizePath=e.joinPath=e.dirname=e.extname=e.basename=e.basenameOrAuthority=e.getComparisonKey=e.isEqualOrParent=e.isEqual=e.extUriIgnorePathCase=e.extUriBiasedIgnorePathCase=e.extUri=e.ExtUri=e.originalFSPath=void 0;function h(u){return(0,P.uriToFsPath)(u,!0)}e.originalFSPath=h;class d{constructor(y){this._ignorePathCasing=y}compare(y,E,l=!1){return y===E?0:(0,D.compare)(this.getComparisonKey(y,l),this.getComparisonKey(E,l))}isEqual(y,E,l=!1){return y===E?!0:!y||!E?!1:this.getComparisonKey(y,l)===this.getComparisonKey(E,l)}getComparisonKey(y,E=!1){return y.with({path:this._ignorePathCasing(y)?y.path.toLowerCase():void 0,fragment:E?null:void 0}).toString()}ignorePathCasing(y){return this._ignorePathCasing(y)}isEqualOrParent(y,E,l=!1){if(y.scheme===E.scheme){if(y.scheme===A.Schemas.file)return b.isEqualOrParent(h(y),h(E),this._ignorePathCasing(y))&&y.query===E.query&&(l||y.fragment===E.fragment);if((0,e.isEqualAuthority)(y.authority,E.authority))return b.isEqualOrParent(y.path,E.path,this._ignorePathCasing(y),"/")&&y.query===E.query&&(l||y.fragment===E.fragment)}return!1}joinPath(y,...E){return P.URI.joinPath(y,...E)}basenameOrAuthority(y){return(0,e.basename)(y)||y.authority}basename(y){return n.posix.basename(y.path)}extname(y){return n.posix.extname(y.path)}dirname(y){if(y.path.length===0)return y;let E;return y.scheme===A.Schemas.file?E=P.URI.file(n.dirname(h(y))).path:(E=n.posix.dirname(y.path),y.authority&&E.length&&E.charCodeAt(0)!==47&&(console.error(`dirname("${y.toString})) resulted in a relative path`),E="/")),y.with({path:E})}normalizePath(y){if(!y.path.length)return y;let E;return y.scheme===A.Schemas.file?E=P.URI.file(n.normalize(h(y))).path:E=n.posix.normalize(y.path),y.with({path:E})}relativePath(y,E){if(y.scheme!==E.scheme||!(0,e.isEqualAuthority)(y.authority,E.authority))return;if(y.scheme===A.Schemas.file){const c=n.relative(h(y),h(E));return O.isWindows?b.toSlashes(c):c}let l=y.path||"/";const v=E.path||"/";if(this._ignorePathCasing(y)){let c=0;for(const f=Math.min(l.length,v.length);c<f&&!(l.charCodeAt(c)!==v.charCodeAt(c)&&l.charAt(c).toLowerCase()!==v.charAt(c).toLowerCase());c++);l=v.substr(0,c)+l.substr(c)}return n.posix.relative(l,v)}resolvePath(y,E){if(y.scheme===A.Schemas.file){const l=P.URI.file(n.resolve(h(y),E));return y.with({authority:l.authority,path:l.path})}return E=b.toPosixPath(E),y.with({path:n.posix.resolve(y.path,E)})}isAbsolutePath(y){return!!y.path&&y.path[0]==="/"}isEqualAuthority(y,E){return y===E||y!==void 0&&E!==void 0&&(0,D.equalsIgnoreCase)(y,E)}hasTrailingPathSeparator(y,E=n.sep){if(y.scheme===A.Schemas.file){const l=h(y);return l.length>b.getRoot(l).length&&l[l.length-1]===E}else{const l=y.path;return l.length>1&&l.charCodeAt(l.length-1)===47&&!/^[a-zA-Z]:(\/$|\\$)/.test(y.fsPath)}}removeTrailingPathSeparator(y,E=n.sep){return(0,e.hasTrailingPathSeparator)(y,E)?y.with({path:y.path.substr(0,y.path.length-1)}):y}addTrailingPathSeparator(y,E=n.sep){let l=!1;if(y.scheme===A.Schemas.file){const v=h(y);l=v!==void 0&&v.length===b.getRoot(v).length&&v[v.length-1]===E}else{E="/";const v=y.path;l=v.length===1&&v.charCodeAt(v.length-1)===47}return!l&&!(0,e.hasTrailingPathSeparator)(y,E)?y.with({path:y.path+"/"}):y}}e.ExtUri=d,e.extUri=new d(()=>!1),e.extUriBiasedIgnorePathCase=new d(u=>u.scheme===A.Schemas.file?!O.isLinux:!0),e.extUriIgnorePathCase=new d(u=>!0),e.isEqual=e.extUri.isEqual.bind(e.extUri),e.isEqualOrParent=e.extUri.isEqualOrParent.bind(e.extUri),e.getComparisonKey=e.extUri.getComparisonKey.bind(e.extUri),e.basenameOrAuthority=e.extUri.basenameOrAuthority.bind(e.extUri),e.basename=e.extUri.basename.bind(e.extUri),e.extname=e.extUri.extname.bind(e.extUri),e.dirname=e.extUri.dirname.bind(e.extUri),e.joinPath=e.extUri.joinPath.bind(e.extUri),e.normalizePath=e.extUri.normalizePath.bind(e.extUri),e.relativePath=e.extUri.relativePath.bind(e.extUri),e.resolvePath=e.extUri.resolvePath.bind(e.extUri),e.isAbsolutePath=e.extUri.isAbsolutePath.bind(e.extUri),e.isEqualAuthority=e.extUri.isEqualAuthority.bind(e.extUri),e.hasTrailingPathSeparator=e.extUri.hasTrailingPathSeparator.bind(e.extUri),e.removeTrailingPathSeparator=e.extUri.removeTrailingPathSeparator.bind(e.extUri),e.addTrailingPathSeparator=e.extUri.addTrailingPathSeparator.bind(e.extUri);function m(u,y){const E=[];for(let l=0;l<u.length;l++){const v=y(u[l]);u.some((c,f)=>f===l?!1:(0,e.isEqualOrParent)(v,y(c)))||E.push(u[l])}return E}e.distinctParents=m;var g;(function(u){u.META_DATA_LABEL="label",u.META_DATA_DESCRIPTION="description",u.META_DATA_SIZE="size",u.META_DATA_MIME="mime";function y(E){const l=new Map;E.path.substring(E.path.indexOf(";")+1,E.path.lastIndexOf(";")).split(";").forEach(f=>{const[I,S]=f.split(":");I&&S&&l.set(I,S)});const c=E.path.substring(0,E.path.indexOf(";"));return c&&l.set(u.META_DATA_MIME,c),l}u.parseMetaData=y})(g||(e.DataUri=g={}));function w(u,y,E){if(y){let l=u.path;return l&&l[0]!==n.posix.sep&&(l=n.posix.sep+l),u.with({scheme:E,authority:y,path:l})}return u.with({scheme:E})}e.toLocalResource=w}),define(Z[8],ee([0,1,23,13,3,2,19,4,142]),function(H,e,b,A,n,O,D,P,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createCancelableAsyncIterable=e.CancelableAsyncIterableObject=e.AsyncIterableObject=e.Promises=e.DeferredPromise=e.IntervalCounter=e.TaskSequentializer=e.retry=e.IdleValue=e.runWhenIdle=e.ThrottledWorker=e.RunOnceWorker=e.ProcessTimeRunOnceScheduler=e.RunOnceScheduler=e.IntervalTimer=e.TimeoutTimer=e.ResourceQueue=e.LimitedQueue=e.Queue=e.Limiter=e.firstParallel=e.first=e.sequence=e.disposableTimeout=e.timeout=e.AutoOpenBarrier=e.Barrier=e.ThrottledDelayer=e.Delayer=e.SequencerByKey=e.Sequencer=e.Throttler=e.asPromise=e.raceTimeout=e.raceCancellablePromises=e.raceCancellationError=e.raceCancellation=e.createCancelablePromise=e.isThenable=void 0;function d(R){return!!R&&typeof R.then=="function"}e.isThenable=d;function m(R){const _=new b.CancellationTokenSource,N=R(_.token),q=new Promise((re,ie)=>{const le=_.token.onCancellationRequested(()=>{le.dispose(),_.dispose(),ie(new A.CancellationError)});Promise.resolve(N).then(V=>{le.dispose(),_.dispose(),re(V)},V=>{le.dispose(),_.dispose(),ie(V)})});return new class{cancel(){_.cancel()}then(re,ie){return q.then(re,ie)}catch(re){return this.then(void 0,re)}finally(re){return q.finally(re)}}}e.createCancelablePromise=m;function g(R,_,N){return new Promise((q,re)=>{const ie=_.onCancellationRequested(()=>{ie.dispose(),q(N)});R.then(q,re).finally(()=>ie.dispose())})}e.raceCancellation=g;function w(R,_){return new Promise((N,q)=>{const re=_.onCancellationRequested(()=>{re.dispose(),q(new A.CancellationError)});R.then(N,q).finally(()=>re.dispose())})}e.raceCancellationError=w;async function u(R){let _=-1;const N=R.map((q,re)=>q.then(ie=>(_=re,ie)));try{return await Promise.race(N)}finally{R.forEach((q,re)=>{re!==_&&q.cancel()})}}e.raceCancellablePromises=u;function y(R,_,N){let q;const re=setTimeout(()=>{q?.(void 0),N?.()},_);return Promise.race([R.finally(()=>clearTimeout(re)),new Promise(ie=>q=ie)])}e.raceTimeout=y;function E(R){return new Promise((_,N)=>{const q=R();d(q)?q.then(_,N):_(q)})}e.asPromise=E;class l{constructor(){this.isDisposed=!1,this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(_){if(this.isDisposed)throw new Error("Throttler is disposed");if(this.activePromise){if(this.queuedPromiseFactory=_,!this.queuedPromise){const N=()=>{if(this.queuedPromise=null,this.isDisposed)return;const q=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,q};this.queuedPromise=new Promise(q=>{this.activePromise.then(N,N).then(q)})}return new Promise((N,q)=>{this.queuedPromise.then(N,q)})}return this.activePromise=_(),new Promise((N,q)=>{this.activePromise.then(re=>{this.activePromise=null,N(re)},re=>{this.activePromise=null,q(re)})})}dispose(){this.isDisposed=!0}}e.Throttler=l;class v{constructor(){this.current=Promise.resolve(null)}queue(_){return this.current=this.current.then(()=>_(),()=>_())}}e.Sequencer=v;class c{constructor(){this.promiseMap=new Map}queue(_,N){const re=(this.promiseMap.get(_)??Promise.resolve()).catch(()=>{}).then(N).finally(()=>{this.promiseMap.get(_)===re&&this.promiseMap.delete(_)});return this.promiseMap.set(_,re),re}}e.SequencerByKey=c;const f=(R,_)=>{let N=!0;const q=setTimeout(()=>{N=!1,_()},R);return{isTriggered:()=>N,dispose:()=>{clearTimeout(q),N=!1}}},I=R=>{let _=!0;return queueMicrotask(()=>{_&&(_=!1,R())}),{isTriggered:()=>_,dispose:()=>{_=!1}}};class S{constructor(_){this.defaultDelay=_,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(_,N=this.defaultDelay){this.task=_,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((re,ie)=>{this.doResolve=re,this.doReject=ie}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const re=this.task;return this.task=null,re()}}));const q=()=>{this.deferred=null,this.doResolve?.(null)};return this.deferred=N===h.MicrotaskDelay?I(q):f(N,q),this.completionPromise}isTriggered(){return!!this.deferred?.isTriggered()}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject?.(new A.CancellationError),this.completionPromise=null)}cancelTimeout(){this.deferred?.dispose(),this.deferred=null}dispose(){this.cancel()}}e.Delayer=S;class t{constructor(_){this.delayer=new S(_),this.throttler=new l}trigger(_,N){return this.delayer.trigger(()=>this.throttler.queue(_),N)}isTriggered(){return this.delayer.isTriggered()}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose(),this.throttler.dispose()}}e.ThrottledDelayer=t;class a{constructor(){this._isOpen=!1,this._promise=new Promise((_,N)=>{this._completePromise=_})}isOpen(){return this._isOpen}open(){this._isOpen=!0,this._completePromise(!0)}wait(){return this._promise}}e.Barrier=a;class s extends a{constructor(_){super(),this._timeout=setTimeout(()=>this.open(),_)}open(){clearTimeout(this._timeout),super.open()}}e.AutoOpenBarrier=s;function i(R,_){return _?new Promise((N,q)=>{const re=setTimeout(()=>{ie.dispose(),N()},R),ie=_.onCancellationRequested(()=>{clearTimeout(re),ie.dispose(),q(new A.CancellationError)})}):m(N=>i(R,N))}e.timeout=i;function r(R,_=0){const N=setTimeout(R,_);return(0,O.toDisposable)(()=>clearTimeout(N))}e.disposableTimeout=r;function o(R){const _=[];let N=0;const q=R.length;function re(){return N<q?R[N++]():null}function ie(le){le!=null&&_.push(le);const V=re();return V?V.then(ie):Promise.resolve(_)}return Promise.resolve(null).then(ie)}e.sequence=o;function p(R,_=q=>!!q,N=null){let q=0;const re=R.length,ie=()=>{if(q>=re)return Promise.resolve(N);const le=R[q++];return Promise.resolve(le()).then(te=>_(te)?Promise.resolve(te):ie())};return ie()}e.first=p;function k(R,_=q=>!!q,N=null){if(R.length===0)return Promise.resolve(N);let q=R.length;const re=()=>{q=-1;for(const ie of R)ie.cancel?.()};return new Promise((ie,le)=>{for(const V of R)V.then(te=>{--q>=0&&_(te)?(re(),ie(te)):q===0&&ie(N)}).catch(te=>{--q>=0&&(re(),le(te))})})}e.firstParallel=k;class M{constructor(_){this._size=0,this.maxDegreeOfParalellism=_,this.outstandingPromises=[],this.runningPromises=0,this._onDrained=new n.Emitter}get onDrained(){return this._onDrained.event}get size(){return this._size}queue(_){return this._size++,new Promise((N,q)=>{this.outstandingPromises.push({factory:_,c:N,e:q}),this.consume()})}consume(){for(;this.outstandingPromises.length&&this.runningPromises<this.maxDegreeOfParalellism;){const _=this.outstandingPromises.shift();this.runningPromises++;const N=_.factory();N.then(_.c,_.e),N.then(()=>this.consumed(),()=>this.consumed())}}consumed(){this._size--,this.runningPromises--,this.outstandingPromises.length>0?this.consume():this._onDrained.fire()}dispose(){this._onDrained.dispose()}}e.Limiter=M;class C extends M{constructor(){super(1)}}e.Queue=C;class L{constructor(){this.sequentializer=new G,this.tasks=0}queue(_){return this.sequentializer.isRunning()?this.sequentializer.queue(()=>this.sequentializer.run(this.tasks++,_())):this.sequentializer.run(this.tasks++,_())}}e.LimitedQueue=L;class T{constructor(){this.queues=new Map,this.drainers=new Set}async whenDrained(){if(this.isDrained())return;const _=new U;return this.drainers.add(_),_.p}isDrained(){for(const[,_]of this.queues)if(_.size>0)return!1;return!0}queueFor(_,N=D.extUri){const q=N.getComparisonKey(_);let re=this.queues.get(q);return re||(re=new C,n.Event.once(re.onDrained)(()=>{re?.dispose(),this.queues.delete(q),this.onDidQueueDrain()}),this.queues.set(q,re)),re}onDidQueueDrain(){this.isDrained()&&this.releaseDrainers()}releaseDrainers(){for(const _ of this.drainers)_.complete();this.drainers.clear()}dispose(){for(const[,_]of this.queues)_.dispose();this.queues.clear(),this.releaseDrainers()}}e.ResourceQueue=T;class F{constructor(_,N){this._token=-1,typeof _=="function"&&typeof N=="number"&&this.setIfNotSet(_,N)}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(_,N){this.cancel(),this._token=setTimeout(()=>{this._token=-1,_()},N)}setIfNotSet(_,N){this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,_()},N))}}e.TimeoutTimer=F;class z{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearInterval(this._token),this._token=-1)}cancelAndSet(_,N){this.cancel(),this._token=setInterval(()=>{_()},N)}}e.IntervalTimer=z;class oe{constructor(_,N){this.timeoutToken=-1,this.runner=_,this.timeout=N,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(_=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,_)}get delay(){return this.timeout}set delay(_){this.timeout=_}isScheduled(){return this.timeoutToken!==-1}flush(){this.isScheduled()&&(this.cancel(),this.doRun())}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner?.()}}e.RunOnceScheduler=oe;class ne{constructor(_,N){N%1e3!==0&&console.warn(`ProcessTimeRunOnceScheduler resolution is 1s, ${N}ms is not a multiple of 1000ms.`),this.runner=_,this.timeout=N,this.counter=0,this.intervalToken=-1,this.intervalHandler=this.onInterval.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearInterval(this.intervalToken),this.intervalToken=-1)}schedule(_=this.timeout){_%1e3!==0&&console.warn(`ProcessTimeRunOnceScheduler resolution is 1s, ${_}ms is not a multiple of 1000ms.`),this.cancel(),this.counter=Math.ceil(_/1e3),this.intervalToken=setInterval(this.intervalHandler,1e3)}isScheduled(){return this.intervalToken!==-1}onInterval(){this.counter--,!(this.counter>0)&&(clearInterval(this.intervalToken),this.intervalToken=-1,this.runner?.())}}e.ProcessTimeRunOnceScheduler=ne;class de extends oe{constructor(_,N){super(_,N),this.units=[]}work(_){this.units.push(_),this.isScheduled()||this.schedule()}doRun(){const _=this.units;this.units=[],this.runner?.(_)}dispose(){this.units=[],super.dispose()}}e.RunOnceWorker=de;class ae extends O.Disposable{constructor(_,N){super(),this.options=_,this.handler=N,this.pendingWork=[],this.throttler=this._register(new O.MutableDisposable),this.disposed=!1}get pending(){return this.pendingWork.length}work(_){if(this.disposed)return!1;if(typeof this.options.maxBufferedWork=="number"){if(this.throttler.value){if(this.pending+_.length>this.options.maxBufferedWork)return!1}else if(this.pending+_.length-this.options.maxWorkChunkSize>this.options.maxBufferedWork)return!1}for(const N of _)this.pendingWork.push(N);return this.throttler.value||this.doWork(),!0}doWork(){this.handler(this.pendingWork.splice(0,this.options.maxWorkChunkSize)),this.pendingWork.length>0&&(this.throttler.value=new oe(()=>{this.throttler.clear(),this.doWork()},this.options.throttleDelay),this.throttler.value.schedule())}dispose(){super.dispose(),this.disposed=!0}}e.ThrottledWorker=ae,function(){typeof requestIdleCallback!="function"||typeof cancelIdleCallback!="function"?e.runWhenIdle=R=>{(0,P.setTimeout0)(()=>{if(_)return;const N=Date.now()+15;R(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,N-Date.now())}}))});let _=!1;return{dispose(){_||(_=!0)}}}:e.runWhenIdle=(R,_)=>{const N=requestIdleCallback(R,typeof _=="number"?{timeout:_}:void 0);let q=!1;return{dispose(){q||(q=!0,cancelIdleCallback(N))}}}}();class ue{constructor(_){this._didRun=!1,this._executor=()=>{try{this._value=_()}catch(N){this._error=N}finally{this._didRun=!0}},this._handle=(0,e.runWhenIdle)(()=>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}}e.IdleValue=ue;async function j(R,_,N){let q;for(let re=0;re<N;re++)try{return await R()}catch(ie){q=ie,await i(_)}throw q}e.retry=j;class G{isRunning(_){return typeof _=="number"?this._running?.taskId===_:!!this._running}get running(){return this._running?.promise}cancelRunning(){this._running?.cancel()}run(_,N,q){return this._running={taskId:_,cancel:()=>q?.(),promise:N},N.then(()=>this.doneRunning(_),()=>this.doneRunning(_)),N}doneRunning(_){this._running&&_===this._running.taskId&&(this._running=void 0,this.runQueued())}runQueued(){if(this._queued){const _=this._queued;this._queued=void 0,_.run().then(_.promiseResolve,_.promiseReject)}}queue(_){if(this._queued)this._queued.run=_;else{let N,q;const re=new Promise((ie,le)=>{N=ie,q=le});this._queued={run:_,promise:re,promiseResolve:N,promiseReject:q}}return this._queued.promise}hasQueued(){return!!this._queued}async join(){return this._queued?.promise??this._running?.promise}}e.TaskSequentializer=G;class B{constructor(_,N=()=>Date.now()){this.interval=_,this.nowFn=N,this.lastIncrementTime=0,this.value=0}increment(){const _=this.nowFn();return _-this.lastIncrementTime>this.interval&&(this.lastIncrementTime=_,this.value=0),this.value++,this.value}}e.IntervalCounter=B;var W;(function(R){R[R.Resolved=0]="Resolved",R[R.Rejected=1]="Rejected"})(W||(W={}));class U{get isRejected(){return this.outcome?.outcome===1}get isResolved(){return this.outcome?.outcome===0}get isSettled(){return!!this.outcome}get value(){return this.outcome?.outcome===0?this.outcome?.value:void 0}constructor(){this.p=new Promise((_,N)=>{this.completeCallback=_,this.errorCallback=N})}complete(_){return new Promise(N=>{this.completeCallback(_),this.outcome={outcome:0,value:_},N()})}error(_){return new Promise(N=>{this.errorCallback(_),this.outcome={outcome:1,value:_},N()})}cancel(){return this.error(new A.CancellationError)}}e.DeferredPromise=U;var $;(function(R){async function _(q){let re;const ie=await Promise.all(q.map(le=>le.then(V=>V,V=>{re||(re=V)})));if(typeof re<"u")throw re;return ie}R.settled=_;function N(q){return new Promise(async(re,ie)=>{try{await q(re,ie)}catch(le){ie(le)}})}R.withAsyncBody=N})($||(e.Promises=$={}));var X;(function(R){R[R.Initial=0]="Initial",R[R.DoneOK=1]="DoneOK",R[R.DoneError=2]="DoneError"})(X||(X={}));class se{static fromArray(_){return new se(N=>{N.emitMany(_)})}static fromPromise(_){return new se(async N=>{N.emitMany(await _)})}static fromPromises(_){return new se(async N=>{await Promise.all(_.map(async q=>N.emitOne(await q)))})}static merge(_){return new se(async N=>{await Promise.all(_.map(async q=>{for await(const re of q)N.emitOne(re)}))})}static{this.EMPTY=se.fromArray([])}constructor(_){this._state=0,this._results=[],this._error=null,this._onStateChanged=new n.Emitter,queueMicrotask(async()=>{const N={emitOne:q=>this.emitOne(q),emitMany:q=>this.emitMany(q),reject:q=>this.reject(q)};try{await Promise.resolve(_(N)),this.resolve()}catch(q){this.reject(q)}finally{N.emitOne=void 0,N.emitMany=void 0,N.reject=void 0}})}[Symbol.asyncIterator](){let _=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(_<this._results.length)return{done:!1,value:this._results[_++]};if(this._state===1)return{done:!0,value:void 0};await n.Event.toPromise(this._onStateChanged.event)}while(!0)}}}static map(_,N){return new se(async q=>{for await(const re of _)q.emitOne(N(re))})}map(_){return se.map(this,_)}static filter(_,N){return new se(async q=>{for await(const re of _)N(re)&&q.emitOne(re)})}filter(_){return se.filter(this,_)}static coalesce(_){return se.filter(_,N=>!!N)}coalesce(){return se.coalesce(this)}static async toPromise(_){const N=[];for await(const q of _)N.push(q);return N}toPromise(){return se.toPromise(this)}emitOne(_){this._state===0&&(this._results.push(_),this._onStateChanged.fire())}emitMany(_){this._state===0&&(this._results=this._results.concat(_),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(_){this._state===0&&(this._state=2,this._error=_,this._onStateChanged.fire())}}e.AsyncIterableObject=se;class ce extends se{constructor(_,N){super(N),this._source=_}cancel(){this._source.cancel()}}e.CancelableAsyncIterableObject=ce;function x(R){const _=new b.CancellationTokenSource,N=R(_.token);return new ce(_,async q=>{const re=_.token.onCancellationRequested(()=>{re.dispose(),_.dispose(),q.reject(new A.CancellationError)});try{for await(const ie of N){if(_.token.isCancellationRequested)return;q.emitOne(ie)}re.dispose(),_.dispose()}catch(ie){re.dispose(),_.dispose(),q.reject(ie)}})}e.createCancelableAsyncIterable=x}),define(Z[106],ee([0,1,24,8,32,35,10,4,26]),function(H,e,b,A,n,O,D,P,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.patternsEquals=e.getPathTerms=e.getBasenameTerms=e.isRelativePattern=e.parse=e.match=e.splitGlobAware=e.GLOB_SPLIT=e.GLOBSTAR=e.getEmptyExpression=void 0;function d(){return Object.create(null)}e.getEmptyExpression=d,e.GLOBSTAR="**",e.GLOB_SPLIT="/";const m="[/\\\\]",g="[^/\\\\]",w=/\//g;function u(G,B){switch(G){case 0:return"";case 1:return`${g}*?`;default:return`(?:${m}|${g}+${m}${B?`|${m}${g}+`:""})*?`}}function y(G,B){if(!G)return[];const W=[];let U=!1,$=!1,X="";for(const se of G){switch(se){case B:if(!U&&!$){W.push(X),X="";continue}break;case"{":U=!0;break;case"}":U=!1;break;case"[":$=!0;break;case"]":$=!1;break}X+=se}return X&&W.push(X),W}e.splitGlobAware=y;function E(G){if(!G)return"";let B="";const W=y(G,e.GLOB_SPLIT);if(W.every(U=>U===e.GLOBSTAR))B=".*";else{let U=!1;W.forEach(($,X)=>{if($===e.GLOBSTAR){if(U)return;B+=u(2,X===W.length-1)}else{let se=!1,ce="",x=!1,R="";for(const _ of $){if(_!=="}"&&se){ce+=_;continue}if(x&&(_!=="]"||!R)){let N;_==="-"?N=_:(_==="^"||_==="!")&&!R?N="^":_===e.GLOB_SPLIT?N="":N=(0,h.escapeRegExpCharacters)(_),R+=N;continue}switch(_){case"{":se=!0;continue;case"[":x=!0;continue;case"}":{const q=`(?:${y(ce,",").map(re=>E(re)).join("|")})`;B+=q,se=!1,ce="";break}case"]":{B+="["+R+"]",x=!1,R="";break}case"?":B+=g;continue;case"*":B+=u(1);continue;default:B+=(0,h.escapeRegExpCharacters)(_)}}X<W.length-1&&(W[X+1]!==e.GLOBSTAR||X+2<W.length)&&(B+=m)}U=$===e.GLOBSTAR})}return B}const l=/^\*\*\/\*\.[\w\.-]+$/,v=/^\*\*\/([\w\.-]+)\/?$/,c=/^{\*\*\/\*?[\w\.-]+\/?(,\*\*\/\*?[\w\.-]+\/?)*}$/,f=/^{\*\*\/\*?[\w\.-]+(\/(\*\*)?)?(,\*\*\/\*?[\w\.-]+(\/(\*\*)?)?)*}$/,I=/^\*\*((\/[\w\.-]+)+)\/?$/,S=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,t=new O.LRUCache(1e4),a=function(){return!1},s=function(){return null};function i(G,B){if(!G)return s;let W;typeof G!="string"?W=G.pattern:W=G,W=W.trim();const U=`${W}_${!!B.trimForExclusions}`;let $=t.get(U);if($)return r($,G);let X;return l.test(W)?$=p(W.substr(4),W):(X=v.exec(o(W,B)))?$=k(X[1],W):(B.trimForExclusions?f:c).test(W)?$=M(W,B):(X=I.exec(o(W,B)))?$=C(X[1].substr(1),W,!0):(X=S.exec(o(W,B)))?$=C(X[1],W,!1):$=L(W),t.set(U,$),r($,G)}function r(G,B){if(typeof B=="string")return G;const W=function(U,$){return(0,n.isEqualOrParent)(U,B.base,!P.isLinux)?G((0,h.ltrim)(U.substr(B.base.length),D.sep),$):null};return W.allBasenames=G.allBasenames,W.allPaths=G.allPaths,W.basenames=G.basenames,W.patterns=G.patterns,W}function o(G,B){return B.trimForExclusions&&G.endsWith("/**")?G.substr(0,G.length-2):G}function p(G,B){return function(W,U){return typeof W=="string"&&W.endsWith(G)?B:null}}function k(G,B){const W=`/${G}`,U=`\\${G}`,$=function(se,ce){return typeof se!="string"?null:ce?ce===G?B:null:se===G||se.endsWith(W)||se.endsWith(U)?B:null},X=[G];return $.basenames=X,$.patterns=[B],$.allBasenames=X,$}function M(G,B){const W=ue(G.slice(1,-1).split(",").map(ce=>i(ce,B)).filter(ce=>ce!==s),G),U=W.length;if(!U)return s;if(U===1)return W[0];const $=function(ce,x){for(let R=0,_=W.length;R<_;R++)if(W[R](ce,x))return G;return null},X=W.find(ce=>!!ce.allBasenames);X&&($.allBasenames=X.allBasenames);const se=W.reduce((ce,x)=>x.allPaths?ce.concat(x.allPaths):ce,[]);return se.length&&($.allPaths=se),$}function C(G,B,W){const U=D.sep===D.posix.sep,$=U?G:G.replace(w,D.sep),X=D.sep+$,se=D.posix.sep+G;let ce;return W?ce=function(x,R){return typeof x=="string"&&(x===$||x.endsWith(X)||!U&&(x===G||x.endsWith(se)))?B:null}:ce=function(x,R){return typeof x=="string"&&(x===$||!U&&x===G)?B:null},ce.allPaths=[(W?"*/":"./")+G],ce}function L(G){try{const B=new RegExp(`^${E(G)}$`);return function(W){return B.lastIndex=0,typeof W=="string"&&B.test(W)?G:null}}catch{return s}}function T(G,B,W){return!G||typeof B!="string"?!1:F(G)(B,void 0,W)}e.match=T;function F(G,B={}){if(!G)return a;if(typeof G=="string"||z(G)){const W=i(G,B);if(W===s)return a;const U=function($,X){return!!W($,X)};return W.allBasenames&&(U.allBasenames=W.allBasenames),W.allPaths&&(U.allPaths=W.allPaths),U}return de(G,B)}e.parse=F;function z(G){const B=G;return B?typeof B.base=="string"&&typeof B.pattern=="string":!1}e.isRelativePattern=z;function oe(G){return G.allBasenames||[]}e.getBasenameTerms=oe;function ne(G){return G.allPaths||[]}e.getPathTerms=ne;function de(G,B){const W=ue(Object.getOwnPropertyNames(G).map(ce=>ae(ce,G[ce],B)).filter(ce=>ce!==s)),U=W.length;if(!U)return s;if(!W.some(ce=>!!ce.requiresSiblings)){if(U===1)return W[0];const ce=function(_,N){let q;for(let re=0,ie=W.length;re<ie;re++){const le=W[re](_,N);if(typeof le=="string")return le;(0,A.isThenable)(le)&&(q||(q=[]),q.push(le))}return q?(async()=>{for(const re of q){const ie=await re;if(typeof ie=="string")return ie}return null})():null},x=W.find(_=>!!_.allBasenames);x&&(ce.allBasenames=x.allBasenames);const R=W.reduce((_,N)=>N.allPaths?_.concat(N.allPaths):_,[]);return R.length&&(ce.allPaths=R),ce}const $=function(ce,x,R){let _,N;for(let q=0,re=W.length;q<re;q++){const ie=W[q];ie.requiresSiblings&&R&&(x||(x=(0,D.basename)(ce)),_||(_=x.substr(0,x.length-(0,D.extname)(ce).length)));const le=ie(ce,x,_,R);if(typeof le=="string")return le;(0,A.isThenable)(le)&&(N||(N=[]),N.push(le))}return N?(async()=>{for(const q of N){const re=await q;if(typeof re=="string")return re}return null})():null},X=W.find(ce=>!!ce.allBasenames);X&&($.allBasenames=X.allBasenames);const se=W.reduce((ce,x)=>x.allPaths?ce.concat(x.allPaths):ce,[]);return se.length&&($.allPaths=se),$}function ae(G,B,W){if(B===!1)return s;const U=i(G,W);if(U===s)return s;if(typeof B=="boolean")return U;if(B){const $=B.when;if(typeof $=="string"){const X=(se,ce,x,R)=>{if(!R||!U(se,ce))return null;const _=$.replace("$(basename)",()=>x),N=R(_);return(0,A.isThenable)(N)?N.then(q=>q?G:null):N?G:null};return X.requiresSiblings=!0,X}}return U}function ue(G,B){const W=G.filter(ce=>!!ce.basenames);if(W.length<2)return G;const U=W.reduce((ce,x)=>{const R=x.basenames;return R?ce.concat(R):ce},[]);let $;if(B){$=[];for(let ce=0,x=U.length;ce<x;ce++)$.push(B)}else $=W.reduce((ce,x)=>{const R=x.patterns;return R?ce.concat(R):ce},[]);const X=function(ce,x){if(typeof ce!="string")return null;if(!x){let _;for(_=ce.length;_>0;_--){const N=ce.charCodeAt(_-1);if(N===47||N===92)break}x=ce.substr(_)}const R=U.indexOf(x);return R!==-1?$[R]:null};X.basenames=U,X.patterns=$,X.allBasenames=U;const se=G.filter(ce=>!ce.basenames);return se.push(X),se}function j(G,B){return(0,b.equals)(G,B,(W,U)=>typeof W=="string"&&typeof U=="string"?W===U:typeof W!="string"&&typeof U!="string"?W.base===U.base&&W.pattern===U.pattern:!1)}e.patternsEquals=j}),define(Z[46],ee([0,1,24,32,10,4,19,26]),function(H,e,b,A,n,O,D,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.splitRecentLabel=e.unmnemonicLabel=e.mnemonicButtonLabel=e.mnemonicMenuLabel=e.template=e.shorten=e.untildify=e.tildify=e.normalizeDriveLetter=e.getPathLabel=void 0;function h(i,r){const{os:o,tildify:p,relative:k}=r;if(k){const L=d(i,k,o);if(typeof L=="string")return L}let M=i.fsPath;if(o===1&&!O.isWindows?M=M.replace(/\//g,"\\"):o!==1&&O.isWindows&&(M=M.replace(/\\/g,"/")),o!==1&&p?.userHome){const L=p.userHome.fsPath;let T;i.scheme!==p.userHome.scheme&&i.path.startsWith(n.posix.sep)?T=p.userHome.with({path:i.path}).fsPath:T=i.fsPath,M=w(T,L,o)}return(o===1?n.win32:n.posix).normalize(m(M,o===1))}e.getPathLabel=h;function d(i,r,o){const p=o===1?n.win32:n.posix,k=o===3?D.extUri:D.extUriIgnorePathCase,M=r.getWorkspace(),C=(0,b.firstOrDefault)(M.folders);if(!C)return;i.scheme!==C.uri.scheme&&i.path.startsWith(n.posix.sep)&&(i=C.uri.with({path:i.path}));const L=r.getWorkspaceFolder(i);if(!L)return;let T;if(k.isEqual(L.uri,i)?T="":T=k.relativePath(L.uri,i)??"",T&&(T=p.normalize(T)),M.folders.length>1&&!r.noPrefix){const F=L.name?L.name:k.basenameOrAuthority(L.uri);T=T?`${F} \u2022 ${T}`:F}return T}function m(i,r=O.isWindows){return(0,A.hasDriveLetter)(i,r)?i.charAt(0).toUpperCase()+i.slice(1):i}e.normalizeDriveLetter=m;let g=Object.create(null);function w(i,r,o=O.OS){if(o===1||!i||!r)return i;let p=g.original===r?g.normalized:void 0;p||(p=r,O.isWindows&&(p=(0,A.toSlashes)(p)),p=`${(0,P.rtrim)(p,n.posix.sep)}${n.posix.sep}`,g={original:r,normalized:p});let k=i;return O.isWindows&&(k=(0,A.toSlashes)(k)),(o===3?k.startsWith(p):(0,P.startsWithIgnoreCase)(k,p))?`~/${k.substr(p.length)}`:i}e.tildify=w;function u(i,r){return i.replace(/^~($|\/|\\)/,`${r}$1`)}e.untildify=u;const y="\u2026",E="\\\\",l="~";function v(i,r=n.sep){const o=new Array(i.length);let p=!1;for(let k=0;k<i.length;k++){const M=i[k];if(M===""){o[k]=`.${r}`;continue}if(!M){o[k]=M;continue}p=!0;let C="",L=M;L.indexOf(E)===0?(C=L.substr(0,L.indexOf(E)+E.length),L=L.substr(L.indexOf(E)+E.length)):L.indexOf(r)===0?(C=L.substr(0,L.indexOf(r)+r.length),L=L.substr(L.indexOf(r)+r.length)):L.indexOf(l)===0&&(C=L.substr(0,L.indexOf(l)+l.length),L=L.substr(L.indexOf(l)+l.length));const T=L.split(r);for(let F=1;p&&F<=T.length;F++)for(let z=T.length-F;p&&z>=0;z--){p=!1;let oe=T.slice(z,z+F).join(r);for(let ne=0;!p&&ne<i.length;ne++)if(ne!==k&&i[ne]&&i[ne].indexOf(oe)>-1){const de=z+F===T.length,ae=z>0&&i[ne].indexOf(r)>-1?r+oe:oe,ue=i[ne].endsWith(ae);p=!de||ue}if(!p){let ne="";(T[0].endsWith(":")||C!=="")&&(z===1&&(z=0,F++,oe=T[0]+r+oe),z>0&&(ne=T[0]+r),ne=C+ne),z>0&&(ne=ne+y+r),ne=ne+oe,z+F<T.length&&(ne=ne+r+y),o[k]=ne}}p&&(o[k]=M)}return o}e.shorten=v;var c;(function(i){i[i.TEXT=0]="TEXT",i[i.VARIABLE=1]="VARIABLE",i[i.SEPARATOR=2]="SEPARATOR"})(c||(c={}));function f(i,r=Object.create(null)){const o=[];let p=!1,k="";for(const M of i)if(M==="$"||p&&M==="{")k&&o.push({value:k,type:c.TEXT}),k="",p=!0;else if(M==="}"&&p){const C=r[k];if(typeof C=="string")C.length&&o.push({value:C,type:c.VARIABLE});else if(C){const L=o[o.length-1];(!L||L.type!==c.SEPARATOR)&&o.push({value:C.label,type:c.SEPARATOR})}k="",p=!1}else k+=M;return k&&!p&&o.push({value:k,type:c.TEXT}),o.filter((M,C)=>{if(M.type===c.SEPARATOR){const L=o[C-1],T=o[C+1];return[L,T].every(F=>F&&(F.type===c.VARIABLE||F.type===c.TEXT)&&F.value.length>0)}return!0}).map(M=>M.value).join("")}e.template=f;function I(i,r){return O.isMacintosh||r?i.replace(/\(&&\w\)|&&/g,"").replace(/&/g,O.isMacintosh?"&":"&&"):i.replace(/&&|&/g,o=>o==="&"?"&&":"&")}e.mnemonicMenuLabel=I;function S(i,r){return O.isMacintosh||r?i.replace(/\(&&\w\)|&&/g,""):O.isWindows?i.replace(/&&|&/g,o=>o==="&"?"&&":"&"):i.replace(/&&/g,"_")}e.mnemonicButtonLabel=S;function t(i){return i.replace(/&/g,"&&")}e.unmnemonicLabel=t;function a(i){if(i.endsWith("]")){const r=i.lastIndexOf(" [",i.length-2);if(r!==-1){const o=s(i.substring(0,r));return{name:o.name,parentPath:o.parentPath+i.substring(r)}}}return s(i)}e.splitRecentLabel=a;function s(i){const r=i.indexOf("/")!==-1?n.posix:n.win32,o=r.basename(i),p=r.dirname(i);return o.length?{name:o,parentPath:p}:{name:p,parentPath:""}}}),define(Z[156],ee([0,1,17,7]),function(H,e,b,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.transformAndReviveIncomingURIs=e.transformIncomingURIs=e.transformOutgoingURIs=e.DefaultURITransformer=e.URITransformer=void 0;function n(g){return g.toJSON()}class O{constructor(w){this._uriTransformer=w}transformIncoming(w){const u=this._uriTransformer.transformIncoming(w);return u===w?w:n(A.URI.from(u))}transformOutgoing(w){const u=this._uriTransformer.transformOutgoing(w);return u===w?w:n(A.URI.from(u))}transformOutgoingURI(w){const u=this._uriTransformer.transformOutgoing(w);return u===w?w:A.URI.from(u)}transformOutgoingScheme(w){return this._uriTransformer.transformOutgoingScheme(w)}}e.URITransformer=O,e.DefaultURITransformer=new class{transformIncoming(g){return g}transformOutgoing(g){return g}transformOutgoingURI(g){return g}transformOutgoingScheme(g){return g}};function D(g,w,u){if(!g||u>200)return null;if(typeof g=="object"){if(g instanceof A.URI)return w.transformOutgoing(g);for(const y in g)if(Object.hasOwnProperty.call(g,y)){const E=D(g[y],w,u+1);E!==null&&(g[y]=E)}}return null}function P(g,w){const u=D(g,w,0);return u===null?g:u}e.transformOutgoingURIs=P;function h(g,w,u,y){if(!g||y>200)return null;if(typeof g=="object"){if(g.$mid===1)return u?A.URI.revive(w.transformIncoming(g)):w.transformIncoming(g);if(g instanceof b.VSBuffer)return null;for(const E in g)if(Object.hasOwnProperty.call(g,E)){const l=h(g[E],w,u,y+1);l!==null&&(g[E]=l)}}return null}function d(g,w){const u=h(g,w,!1,0);return u===null?g:u}e.transformIncomingURIs=d;function m(g,w){const u=h(g,w,!0,0);return u===null?g:u}e.transformAndReviveIncomingURIs=m}),define(Z[21],ee([0,1,45,27,157,8,32,86,10,4,19,7]),function(H,e,b,A,n,O,D,P,h,d,m,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Promises=e.writeFileSync=e.configureFlushOnWrite=e.SymlinkSupport=e.whenDeleted=e.readdirSync=e.rimrafSync=e.RimRafMode=void 0;var w;(function(ae){ae[ae.UNLINK=0]="UNLINK",ae[ae.MOVE=1]="MOVE"})(w||(e.RimRafMode=w={}));async function u(ae,ue=w.UNLINK,j){if((0,D.isRootOrDriveLetter)(ae))throw new Error("rimraf - will refuse to recursively delete root");return ue===w.UNLINK?E(ae):y(ae,j)}async function y(ae,ue=(0,D.randomPath)((0,A.tmpdir)())){try{try{await b.promises.rename(ae,ue)}catch(j){return j.code==="ENOENT"?void 0:E(ae)}E(ue).catch(j=>{})}catch(j){if(j.code!=="ENOENT")throw j}}async function E(ae){return(0,n.promisify)(b.rm)(ae,{recursive:!0,force:!0,maxRetries:3})}function l(ae){if((0,D.isRootOrDriveLetter)(ae))throw new Error("rimraf - will refuse to recursively delete root");b.rmSync(ae,{recursive:!0,force:!0,maxRetries:3})}e.rimrafSync=l;async function v(ae,ue){return I(await(ue?c(ae):(0,n.promisify)(b.readdir)(ae)))}async function c(ae){try{return await(0,n.promisify)(b.readdir)(ae,{withFileTypes:!0})}catch(G){console.warn("[node.js fs] readdir with filetypes failed with error: ",G)}const ue=[],j=await v(ae);for(const G of j){let B=!1,W=!1,U=!1;try{const $=await e.Promises.lstat((0,h.join)(ae,G));B=$.isFile(),W=$.isDirectory(),U=$.isSymbolicLink()}catch($){console.warn("[node.js fs] unexpected error from lstat after readdir: ",$)}ue.push({name:G,isFile:()=>B,isDirectory:()=>W,isSymbolicLink:()=>U})}return ue}function f(ae){return I(b.readdirSync(ae))}e.readdirSync=f;function I(ae){return ae.map(ue=>typeof ue=="string"?d.isMacintosh?(0,P.normalizeNFC)(ue):ue:(ue.name=d.isMacintosh?(0,P.normalizeNFC)(ue.name):ue.name,ue))}async function S(ae){const ue=await v(ae),j=[];for(const G of ue)await a.existsDirectory((0,h.join)(ae,G))&&j.push(G);return j}function t(ae,ue=1e3){return new Promise(j=>{let G=!1;const B=setInterval(()=>{G||(G=!0,b.access(ae,W=>{G=!1,W&&(clearInterval(B),j(void 0))}))},ue)})}e.whenDeleted=t;var a;(function(ae){async function ue(B){let W;try{if(W=await e.Promises.lstat(B),!W.isSymbolicLink())return{stat:W}}catch{}try{return{stat:await e.Promises.stat(B),symbolicLink:W?.isSymbolicLink()?{dangling:!1}:void 0}}catch(U){if(U.code==="ENOENT"&&W)return{stat:W,symbolicLink:{dangling:!0}};if(d.isWindows&&U.code==="EACCES")try{return{stat:await e.Promises.stat(await e.Promises.readlink(B)),symbolicLink:{dangling:!1}}}catch($){if($.code==="ENOENT"&&W)return{stat:W,symbolicLink:{dangling:!0}};throw $}throw U}}ae.stat=ue;async function j(B){try{const{stat:W,symbolicLink:U}=await ae.stat(B);return W.isFile()&&U?.dangling!==!0}catch{}return!1}ae.existsFile=j;async function G(B){try{const{stat:W,symbolicLink:U}=await ae.stat(B);return W.isDirectory()&&U?.dangling!==!0}catch{}return!1}ae.existsDirectory=G})(a||(e.SymlinkSupport=a={}));const s=new O.ResourceQueue;function i(ae,ue,j){return s.queueFor(g.URI.file(ae),m.extUriBiasedIgnorePathCase).queue(()=>{const G=M(j);return new Promise((B,W)=>p(ae,ue,G,U=>U?W(U):B()))})}let r=!0;function o(ae){r=ae}e.configureFlushOnWrite=o;function p(ae,ue,j,G){if(!r)return b.writeFile(ae,ue,{mode:j.mode,flag:j.flag},G);b.open(ae,j.flag,j.mode,(B,W)=>{if(B)return G(B);b.writeFile(W,ue,U=>{if(U)return b.close(W,()=>G(U));b.fdatasync(W,$=>($&&(console.warn("[node.js fs] fdatasync is now disabled for this session because it failed: ",$),o(!1)),b.close(W,X=>G(X))))})})}function k(ae,ue,j){const G=M(j);if(!r)return b.writeFileSync(ae,ue,{mode:G.mode,flag:G.flag});const B=b.openSync(ae,G.flag,G.mode);try{b.writeFileSync(B,ue);try{b.fdatasyncSync(B)}catch(W){console.warn("[node.js fs] fdatasyncSync is now disabled for this session because it failed: ",W),o(!1)}}finally{b.closeSync(B)}}e.writeFileSync=k;function M(ae){return ae?{mode:typeof ae.mode=="number"?ae.mode:438,flag:typeof ae.flag=="string"?ae.flag:"w"}:{mode:438,flag:"w"}}async function C(ae,ue,j=6e4){if(ae!==ue)try{d.isWindows&&typeof j=="number"?await L(ae,ue,Date.now(),j):await(0,n.promisify)(b.rename)(ae,ue)}catch(G){if(ae.toLowerCase()!==ue.toLowerCase()&&G.code==="EXDEV"||ae.endsWith("."))await T(ae,ue,{preserveSymlinks:!1}),await u(ae,w.MOVE);else throw G}}async function L(ae,ue,j,G,B=0){try{return await(0,n.promisify)(b.rename)(ae,ue)}catch(W){if(W.code!=="EACCES"&&W.code!=="EPERM"&&W.code!=="EBUSY")throw W;if(Date.now()-j>=G)throw console.error(`[node.js fs] rename failed after ${B} retries with error: ${W}`),W;if(B===0){let U=!1;try{const{stat:$}=await a.stat(ue);$.isFile()||(U=!0)}catch{}if(U)throw W}return await(0,O.timeout)(Math.min(100,B*10)),L(ae,ue,j,G,B+1)}}async function T(ae,ue,j){return z(ae,ue,{root:{source:ae,target:ue},options:j,handledSourcePaths:new Set})}const F=511;async function z(ae,ue,j){if(j.handledSourcePaths.has(ae))return;j.handledSourcePaths.add(ae);const{stat:G,symbolicLink:B}=await a.stat(ae);if(B){if(j.options.preserveSymlinks)try{return await de(ae,ue,j)}catch(W){console.warn("[node.js fs] copy of symlink failed: ",W)}if(B.dangling)return}return G.isDirectory()?oe(ae,ue,G.mode&F,j):ne(ae,ue,G.mode&F)}async function oe(ae,ue,j,G){await e.Promises.mkdir(ue,{recursive:!0,mode:j});const B=await v(ae);for(const W of B)await z((0,h.join)(ae,W),(0,h.join)(ue,W),G)}async function ne(ae,ue,j){await e.Promises.copyFile(ae,ue),await e.Promises.chmod(ue,j)}async function de(ae,ue,j){let G=await e.Promises.readlink(ae);(0,D.isEqualOrParent)(G,j.root.source,!d.isLinux)&&(G=(0,h.join)(j.root.target,G.substr(j.root.source.length+1))),await e.Promises.symlink(G,ue)}e.Promises=new class{get access(){return(0,n.promisify)(b.access)}get stat(){return(0,n.promisify)(b.stat)}get lstat(){return(0,n.promisify)(b.lstat)}get utimes(){return(0,n.promisify)(b.utimes)}get read(){return(ae,ue,j,G,B)=>new Promise((W,U)=>{b.read(ae,ue,j,G,B,($,X,se)=>$?U($):W({bytesRead:X,buffer:se}))})}get readFile(){return(0,n.promisify)(b.readFile)}get write(){return(ae,ue,j,G,B)=>new Promise((W,U)=>{b.write(ae,ue,j,G,B,($,X,se)=>$?U($):W({bytesWritten:X,buffer:se}))})}get appendFile(){return(0,n.promisify)(b.appendFile)}get fdatasync(){return(0,n.promisify)(b.fdatasync)}get truncate(){return(0,n.promisify)(b.truncate)}get copyFile(){return(0,n.promisify)(b.copyFile)}get open(){return(0,n.promisify)(b.open)}get close(){return(0,n.promisify)(b.close)}get symlink(){return(0,n.promisify)(b.symlink)}get readlink(){return(0,n.promisify)(b.readlink)}get chmod(){return(0,n.promisify)(b.chmod)}get mkdir(){return(0,n.promisify)(b.mkdir)}get unlink(){return(0,n.promisify)(b.unlink)}get rmdir(){return(0,n.promisify)(b.rmdir)}get realpath(){return(0,n.promisify)(b.realpath)}async exists(ae){try{return await e.Promises.access(ae),!0}catch{return!1}}get readdir(){return v}get readDirsInDir(){return S}get writeFile(){return i}get rm(){return u}get rename(){return C}get copy(){return T}}}),define(Z[107],ee([0,1,45,10,4,26,21]),function(H,e,b,A,n,O,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.realpathSync=e.realpath=e.realcase=e.realcaseSync=void 0;function P(w){if(n.isLinux)return w;const u=(0,A.dirname)(w);if(w===u)return w;const y=((0,A.basename)(w)||w).toLowerCase();try{const l=(0,D.readdirSync)(u).filter(v=>v.toLowerCase()===y);if(l.length===1){const v=P(u);if(v)return(0,A.join)(v,l[0])}else if(l.length>1){const v=l.indexOf(y);if(v>=0){const c=P(u);if(c)return(0,A.join)(c,l[v])}}}catch{}return null}e.realcaseSync=P;async function h(w){if(n.isLinux)return w;const u=(0,A.dirname)(w);if(w===u)return w;const y=((0,A.basename)(w)||w).toLowerCase();try{const l=(await D.Promises.readdir(u)).filter(v=>v.toLowerCase()===y);if(l.length===1){const v=await h(u);if(v)return(0,A.join)(v,l[0])}else if(l.length>1){const v=l.indexOf(y);if(v>=0){const c=await h(u);if(c)return(0,A.join)(c,l[v])}}}catch{}return null}e.realcase=h;async function d(w){try{return await D.Promises.realpath(w)}catch{const y=g(w);return await D.Promises.access(y,b.constants.R_OK),y}}e.realpath=d;function m(w){try{return b.realpathSync(w)}catch{const y=g(w);return b.accessSync(y,b.constants.R_OK),y}}e.realpathSync=m;function g(w){return(0,O.rtrim)((0,A.normalize)(w),A.sep)}}),define(Z[108],ee([0,1,27,10,21]),function(H,e,b,A,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getFirstAvailablePowerShellInstallation=e.enumeratePowerShellInstallations=void 0;const O=/^\d+$/,D=/^Microsoft.PowerShell_.*/,P=/^Microsoft.PowerShellPreview_.*/;var h;(function(I){I[I.x64=0]="x64",I[I.x86=1]="x86",I[I.ARM=2]="ARM"})(h||(h={}));let d;switch(process.arch){case"ia32":d=1;break;case"arm":case"arm64":d=2;break;default:d=0;break}let m;process.env.PROCESSOR_ARCHITEW6432?m=process.env.PROCESSOR_ARCHITEW6432==="ARM64"?2:0:process.env.PROCESSOR_ARCHITECTURE==="ARM64"?m=2:process.env.PROCESSOR_ARCHITECTURE==="X86"?m=1:m=0;class g{constructor(S,t,a){this.exePath=S,this.displayName=t,this.knownToExist=a}async exists(){return this.knownToExist===void 0&&(this.knownToExist=await n.SymlinkSupport.existsFile(this.exePath)),this.knownToExist}}function w({useAlternateBitness:I=!1}={}){return I?d===0?process.env["ProgramFiles(x86)"]||null:m===0&&process.env.ProgramW6432||null:process.env.ProgramFiles||null}async function u({useAlternateBitness:I=!1,findPreview:S=!1}={}){const t=w({useAlternateBitness:I});if(!t)return null;const a=A.join(t,"PowerShell");if(!await n.SymlinkSupport.existsDirectory(a))return null;let s=-1,i=null;for(const p of await n.Promises.readdir(a)){let k=-1;if(S){const C=p.indexOf("-");if(C<0)continue;const L=p.substring(0,C);if(!O.test(L)||p.substring(C+1)!=="preview")continue;k=parseInt(L,10)}else{if(!O.test(p))continue;k=parseInt(p,10)}if(k<=s)continue;const M=A.join(a,p,"pwsh.exe");await n.SymlinkSupport.existsFile(M)&&(i=M,s=k)}if(!i)return null;const r=t.includes("x86")?" (x86)":"",o=S?" Preview":"";return new g(i,`PowerShell${o}${r}`,!0)}async function y({findPreview:I}={}){if(!process.env.LOCALAPPDATA)return null;const S=A.join(process.env.LOCALAPPDATA,"Microsoft","WindowsApps");if(!await n.SymlinkSupport.existsDirectory(S))return null;const{pwshMsixDirRegex:t,pwshMsixName:a}=I?{pwshMsixDirRegex:P,pwshMsixName:"PowerShell Preview (Store)"}:{pwshMsixDirRegex:D,pwshMsixName:"PowerShell (Store)"};for(const s of await n.Promises.readdir(S))if(t.test(s)){const i=A.join(S,s,"pwsh.exe");return new g(i,a)}return null}function E(){const I=A.join(b.homedir(),".dotnet","tools","pwsh.exe");return new g(I,".NET Core PowerShell Global Tool")}function l(){const I=A.join(process.env.windir,d===1&&m!==1?"SysNative":"System32","WindowsPowerShell","v1.0","powershell.exe");return new g(I,"Windows PowerShell",!0)}async function*v(){let I=await u();I&&(yield I),I=await u({useAlternateBitness:!0}),I&&(yield I),I=await y(),I&&(yield I),I=E(),I&&(yield I),I=await u({findPreview:!0}),I&&(yield I),I=await y({findPreview:!0}),I&&(yield I),I=await u({useAlternateBitness:!0,findPreview:!0}),I&&(yield I),I=l(),I&&(yield I)}async function*c(){for await(const I of v())await I.exists()&&(yield I)}e.enumeratePowerShellInstallations=c;async function f(){for await(const I of c())return I;return null}e.getFirstAvailablePowerShellInstallation=f}),define(Z[90],ee([0,1,10,4,36,74,12,21]),function(H,e,b,A,n,O,D,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.win32=e.createQueuedSender=e.getWindowsShell=e.TerminateResponseCode=e.Source=void 0,Object.defineProperty(e,"Source",{enumerable:!0,get:function(){return O.Source}}),Object.defineProperty(e,"TerminateResponseCode",{enumerable:!0,get:function(){return O.TerminateResponseCode}});function h(g=n.env){return g.comspec||"cmd.exe"}e.getWindowsShell=h;function d(g){let w=[],u=!1;const y=function(E){if(u){w.push(E);return}(!g.send(E,v=>{if(v&&console.error(v),u=!1,w.length>0){const c=w.slice(0);w=[],c.forEach(f=>y(f))}})||A.isWindows)&&(u=!0)};return{send:y}}e.createQueuedSender=d;var m;(function(g){async function w(u,y,E){if(b.isAbsolute(u))return u;if(y===void 0&&(y=n.cwd()),b.dirname(u)!=="."||(E===void 0&&D.isString(n.env.PATH)&&(E=n.env.PATH.split(b.delimiter)),E===void 0||E.length===0))return b.join(y,u);async function v(c){if(await P.Promises.exists(c)){let f;try{f=await P.Promises.stat(c)}catch(I){I.message.startsWith("EACCES")&&(f=await P.Promises.lstat(c))}return f?!f.isDirectory():!1}return!1}for(const c of E){let f;if(b.isAbsolute(c)?f=b.join(c,u):f=b.join(y,c,u),await v(f))return f;let I=f+".com";if(await v(I)||(I=f+".exe",await v(I)))return I}return b.join(y,u)}g.findExecutable=w})(m||(e.win32=m={}))}),define(Z[109],ee([0,1,47,15]),function(H,e,b,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.listProcesses=void 0;function n(D){return new Promise((P,h)=>{let d;const m=new Map;function g(u,y,E,l,v){const c=m.get(y);if(u===D||c){const f={name:w(E),cmd:E,pid:u,ppid:y,load:l,mem:v};m.set(u,f),u===D&&(d=f),c&&(c.children||(c.children=[]),c.children.push(f),c.children.length>1&&(c.children=c.children.sort((I,S)=>I.pid-S.pid)))}}function w(u){const y=/--utility-sub-type=network/i,E=/--ms-enable-electron-run-as-node/i,l=/--crashes-directory/i,v=/\\pipe\\winpty-control/i,c=/conhost\.exe.+--headless/i,f=/--type=([a-zA-Z-]+)/;if(l.exec(u))return"electron-crash-reporter";if(v.exec(u))return"winpty-agent";if(c.exec(u))return"conpty-agent";let I=f.exec(u);if(I&&I.length===2)return I[1]==="renderer"?"window":I[1]==="utility"?y.exec(u)?"utility-network-service":"utility-process":I[1]==="extensionHost"?"extension-host":I[1];const S=/[a-zA-Z-]+\.js/g;let t="";do I=S.exec(u),I&&(t+=I+" ");while(I);return t&&u.indexOf("node ")<0&&u.indexOf("node.exe")<0?`electron-nodejs (${t})`:E.exec(u)?`electron-nodejs (${u})`:u}if(process.platform==="win32"){const u=y=>y.indexOf("\\\\?\\")===0||y.indexOf("\\??\\")===0?y.substring(4):y.indexOf('"\\\\?\\')===0||y.indexOf('"\\??\\')===0?'"'+y.substring(5):y;new Promise((y,E)=>{H(["@vscode/windows-process-tree"],y,E)}).then(y=>{y.getProcessList(D,E=>{if(!E){h(new Error(`Root process ${D} not found`));return}y.getProcessCpuUsage(E,l=>{const v=new Map;l.forEach(c=>{const f=u(c.commandLine||"");v.set(c.pid,{name:w(f),cmd:f,pid:c.pid,ppid:c.ppid,load:c.cpu||0,mem:c.memory||0})}),d=v.get(D),d?(v.forEach(c=>{const f=v.get(c.ppid);f&&(f.children||(f.children=[]),f.children.push(c))}),v.forEach(c=>{c.children&&(c.children=c.children.sort((f,I)=>f.pid-I.pid))}),P(d)):h(new Error(`Root process ${D} not found`))})},y.ProcessDataFlag.CommandLine|y.ProcessDataFlag.Memory)})}else{let u=function(){let y=[d];const E=[];for(;y.length;){const v=y.shift();v&&(E.push(v.pid),v.children&&(y=y.concat(v.children)))}let l=JSON.stringify(A.FileAccess.asFileUri("vs/base/node/cpuUsage.sh").fsPath);l+=" "+E.join(" "),(0,b.exec)(l,{},(v,c,f)=>{if(v||f)h(v||new Error(f.toString()));else{const I=c.toString().split(`
`);for(let S=0;S<E.length;S++){const t=m.get(E[S]);t.load=parseFloat(I[S])}if(!d){h(new Error(`Root process ${D} not found`));return}P(d)}})};(0,b.exec)("which ps",{},(y,E,l)=>{if(y||l)if(process.platform!=="linux")h(y||new Error(l.toString()));else{const v=JSON.stringify(A.FileAccess.asFileUri("vs/base/node/ps.sh").fsPath);(0,b.exec)(v,{},(c,f,I)=>{c||I?h(c||new Error(I.toString())):(O(f,g),u())})}else{const v=E.toString().trim(),c="-ax -o pid=,ppid=,pcpu=,pmem=,command=";(0,b.exec)(`${v} ${c}`,{maxBuffer:1e3*1024,env:{LC_NUMERIC:"en_US.UTF-8"}},(f,I,S)=>{f||S&&!S.includes("screen size is bogus")?h(f||new Error(S.toString())):(O(I,g),process.platform==="linux"?u():d?P(d):h(new Error(`Root process ${D} not found`)))})}})}})}e.listProcesses=n;function O(D,P){const h=/^\s*([0-9]+)\s+([0-9]+)\s+([0-9]+\.[0-9]+)\s+([0-9]+\.[0-9]+)\s+(.+)$/,d=D.toString().split(`
`);for(const m of d){const g=h.exec(m.trim());g&&g.length===6&&P(parseInt(g[1]),parseInt(g[2]),g[5],parseFloat(g[3]),parseFloat(g[4]))}}}),define(Z[110],ee([0,1,27,4,108,90]),function(H,e,b,A,n,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSystemShell=void 0;async function D(g,w){return g===1?A.isWindows?m():O.getWindowsShell(w):h(g,w)}e.getSystemShell=D;let P=null;function h(g,w){if(A.isLinux&&g===2||A.isMacintosh&&g===3)return"/bin/bash";if(!P){let u;if(A.isWindows)u="/bin/bash";else{if(u=w.SHELL,!u)try{u=(0,b.userInfo)().shell}catch{}u||(u="sh"),u==="/bin/false"&&(u="/bin/bash")}P=u}return P}let d=null;async function m(){return d||(d=(await(0,n.getFirstAvailablePowerShellInstallation)()).exePath),d}});var be=this&&this.__decorate||function(H,e,b,A){var n=arguments.length,O=n<3?e:A===null?A=Object.getOwnPropertyDescriptor(e,b):A,D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(H,e,b,A);else for(var P=H.length-1;P>=0;P--)(D=H[P])&&(O=(n<3?D(O):n>3?D(e,b,O):D(e,b))||O);return n>3&&O&&Object.defineProperty(e,b,O),O};define(Z[42],ee([0,1,24,8,17,23,55,13,3,2,75,26,12]),function(H,e,b,A,n,O,D,P,h,d,m,g,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IPCLogger=e.ProxyChannel=e.StaticRouter=e.getNextTickChannel=e.getDelayedChannel=e.IPCClient=e.IPCServer=e.ChannelClient=e.RequestInitiator=e.ChannelServer=e.deserialize=e.serialize=e.BufferWriter=e.BufferReader=void 0;var u;(function(B){B[B.Promise=100]="Promise",B[B.PromiseCancel=101]="PromiseCancel",B[B.EventListen=102]="EventListen",B[B.EventDispose=103]="EventDispose"})(u||(u={}));function y(B){switch(B){case 100:return"req";case 101:return"cancel";case 102:return"subscribe";case 103:return"unsubscribe"}}var E;(function(B){B[B.Initialize=200]="Initialize",B[B.PromiseSuccess=201]="PromiseSuccess",B[B.PromiseError=202]="PromiseError",B[B.PromiseErrorObj=203]="PromiseErrorObj",B[B.EventFire=204]="EventFire"})(E||(E={}));function l(B){switch(B){case 200:return"init";case 201:return"reply:";case 202:case 203:return"replyErr:";case 204:return"event:"}}var v;(function(B){B[B.Uninitialized=0]="Uninitialized",B[B.Idle=1]="Idle"})(v||(v={}));function c(B){let W=0;for(let U=0;;U+=7){const $=B.read(1);if(W|=($.buffer[0]&127)<<U,!($.buffer[0]&128))return W}}const f=s(0);function I(B,W){if(W===0){B.write(f);return}let U=0;for(let X=W;X!==0;X=X>>>7)U++;const $=n.VSBuffer.alloc(U);for(let X=0;W!==0;X++)$.buffer[X]=W&127,W=W>>>7,W>0&&($.buffer[X]|=128);B.write($)}class S{constructor(W){this.buffer=W,this.pos=0}read(W){const U=this.buffer.slice(this.pos,this.pos+W);return this.pos+=U.byteLength,U}}e.BufferReader=S;class t{constructor(){this.buffers=[]}get buffer(){return n.VSBuffer.concat(this.buffers)}write(W){this.buffers.push(W)}}e.BufferWriter=t;var a;(function(B){B[B.Undefined=0]="Undefined",B[B.String=1]="String",B[B.Buffer=2]="Buffer",B[B.VSBuffer=3]="VSBuffer",B[B.Array=4]="Array",B[B.Object=5]="Object",B[B.Int=6]="Int"})(a||(a={}));function s(B){const W=n.VSBuffer.alloc(1);return W.writeUInt8(B,0),W}const i={Undefined:s(a.Undefined),String:s(a.String),Buffer:s(a.Buffer),VSBuffer:s(a.VSBuffer),Array:s(a.Array),Object:s(a.Object),Uint:s(a.Int)},r=typeof Buffer<"u";function o(B,W){if(typeof W>"u")B.write(i.Undefined);else if(typeof W=="string"){const U=n.VSBuffer.fromString(W);B.write(i.String),I(B,U.byteLength),B.write(U)}else if(r&&Buffer.isBuffer(W)){const U=n.VSBuffer.wrap(W);B.write(i.Buffer),I(B,U.byteLength),B.write(U)}else if(W instanceof n.VSBuffer)B.write(i.VSBuffer),I(B,W.byteLength),B.write(W);else if(Array.isArray(W)){B.write(i.Array),I(B,W.length);for(const U of W)o(B,U)}else if(typeof W=="number"&&(W|0)===W)B.write(i.Uint),I(B,W);else{const U=n.VSBuffer.fromString(JSON.stringify(W));B.write(i.Object),I(B,U.byteLength),B.write(U)}}e.serialize=o;function p(B){switch(B.read(1).readUInt8(0)){case a.Undefined:return;case a.String:return B.read(c(B)).toString();case a.Buffer:return B.read(c(B)).buffer;case a.VSBuffer:return B.read(c(B));case a.Array:{const U=c(B),$=[];for(let X=0;X<U;X++)$.push(p(B));return $}case a.Object:return JSON.parse(B.read(c(B)).toString());case a.Int:return c(B)}}e.deserialize=p;class k{constructor(W,U,$=null,X=1e3){this.protocol=W,this.ctx=U,this.logger=$,this.timeoutDelay=X,this.channels=new Map,this.activeRequests=new Map,this.pendingRequests=new Map,this.protocolListener=this.protocol.onMessage(se=>this.onRawMessage(se)),this.sendResponse({type:200})}registerChannel(W,U){this.channels.set(W,U),setTimeout(()=>this.flushPendingRequests(W),0)}sendResponse(W){switch(W.type){case 200:{const U=this.send([W.type]);this.logger?.logOutgoing(U,0,1,l(W.type));return}case 201:case 202:case 204:case 203:{const U=this.send([W.type,W.id],W.data);this.logger?.logOutgoing(U,W.id,1,l(W.type),W.data);return}}}send(W,U=void 0){const $=new t;return o($,W),o($,U),this.sendBuffer($.buffer)}sendBuffer(W){try{return this.protocol.send(W),W.byteLength}catch{return 0}}onRawMessage(W){const U=new S(W),$=p(U),X=p(U),se=$[0];switch(se){case 100:return this.logger?.logIncoming(W.byteLength,$[1],1,`${y(se)}: ${$[2]}.${$[3]}`,X),this.onPromise({type:se,id:$[1],channelName:$[2],name:$[3],arg:X});case 102:return this.logger?.logIncoming(W.byteLength,$[1],1,`${y(se)}: ${$[2]}.${$[3]}`,X),this.onEventListen({type:se,id:$[1],channelName:$[2],name:$[3],arg:X});case 101:return this.logger?.logIncoming(W.byteLength,$[1],1,`${y(se)}`),this.disposeActiveRequest({type:se,id:$[1]});case 103:return this.logger?.logIncoming(W.byteLength,$[1],1,`${y(se)}`),this.disposeActiveRequest({type:se,id:$[1]})}}onPromise(W){const U=this.channels.get(W.channelName);if(!U){this.collectPendingRequest(W);return}const $=new O.CancellationTokenSource;let X;try{X=U.call(this.ctx,W.name,W.arg,$.token)}catch(x){X=Promise.reject(x)}const se=W.id;X.then(x=>{this.sendResponse({id:se,data:x,type:201}),this.activeRequests.delete(W.id)},x=>{x instanceof Error?this.sendResponse({id:se,data:{message:x.message,name:x.name,stack:x.stack?x.stack.split?x.stack.split(`
`):x.stack:void 0},type:202}):this.sendResponse({id:se,data:x,type:203}),this.activeRequests.delete(W.id)});const ce=(0,d.toDisposable)(()=>$.cancel());this.activeRequests.set(W.id,ce)}onEventListen(W){const U=this.channels.get(W.channelName);if(!U){this.collectPendingRequest(W);return}const $=W.id,se=U.listen(this.ctx,W.name,W.arg)(ce=>this.sendResponse({id:$,data:ce,type:204}));this.activeRequests.set(W.id,se)}disposeActiveRequest(W){const U=this.activeRequests.get(W.id);U&&(U.dispose(),this.activeRequests.delete(W.id))}collectPendingRequest(W){let U=this.pendingRequests.get(W.channelName);U||(U=[],this.pendingRequests.set(W.channelName,U));const $=setTimeout(()=>{console.error(`Unknown channel: ${W.channelName}`),W.type===100&&this.sendResponse({id:W.id,data:{name:"Unknown channel",message:`Channel name '${W.channelName}' timed out after ${this.timeoutDelay}ms`,stack:void 0},type:202})},this.timeoutDelay);U.push({request:W,timeoutTimer:$})}flushPendingRequests(W){const U=this.pendingRequests.get(W);if(U){for(const $ of U)switch(clearTimeout($.timeoutTimer),$.request.type){case 100:this.onPromise($.request);break;case 102:this.onEventListen($.request);break}this.pendingRequests.delete(W)}}dispose(){this.protocolListener&&(this.protocolListener.dispose(),this.protocolListener=null),(0,d.dispose)(this.activeRequests.values()),this.activeRequests.clear()}}e.ChannelServer=k;var M;(function(B){B[B.LocalSide=0]="LocalSide",B[B.OtherSide=1]="OtherSide"})(M||(e.RequestInitiator=M={}));class C{constructor(W,U=null){this.protocol=W,this.isDisposed=!1,this.state=v.Uninitialized,this.activeRequests=new Set,this.handlers=new Map,this.lastRequestId=0,this._onDidInitialize=new h.Emitter,this.onDidInitialize=this._onDidInitialize.event,this.protocolListener=this.protocol.onMessage($=>this.onBuffer($)),this.logger=U}getChannel(W){const U=this;return{call($,X,se){return U.isDisposed?Promise.reject(new P.CancellationError):U.requestPromise(W,$,X,se)},listen($,X){return U.isDisposed?h.Event.None:U.requestEvent(W,$,X)}}}requestPromise(W,U,$,X=O.CancellationToken.None){const se=this.lastRequestId++,x={id:se,type:100,channelName:W,name:U,arg:$};if(X.isCancellationRequested)return Promise.reject(new P.CancellationError);let R;return new Promise((N,q)=>{if(X.isCancellationRequested)return q(new P.CancellationError);const re=()=>{const te=Q=>{switch(Q.type){case 201:this.handlers.delete(se),N(Q.data);break;case 202:{this.handlers.delete(se);const fe=new Error(Q.data.message);fe.stack=Array.isArray(Q.data.stack)?Q.data.stack.join(`
`):Q.data.stack,fe.name=Q.data.name,q(fe);break}case 203:this.handlers.delete(se),q(Q.data);break}};this.handlers.set(se,te),this.sendRequest(x)};let ie=null;this.state===v.Idle?re():(ie=(0,A.createCancelablePromise)(te=>this.whenInitialized()),ie.then(()=>{ie=null,re()}));const le=()=>{ie?(ie.cancel(),ie=null):this.sendRequest({id:se,type:101}),q(new P.CancellationError)},V=X.onCancellationRequested(le);R=(0,d.combinedDisposable)((0,d.toDisposable)(le),V),this.activeRequests.add(R)}).finally(()=>{this.activeRequests.delete(R)})}requestEvent(W,U,$){const X=this.lastRequestId++,ce={id:X,type:102,channelName:W,name:U,arg:$};let x=null;const R=new h.Emitter({onWillAddFirstListener:()=>{x=(0,A.createCancelablePromise)(N=>this.whenInitialized()),x.then(()=>{x=null,this.activeRequests.add(R),this.sendRequest(ce)})},onDidRemoveLastListener:()=>{x?(x.cancel(),x=null):(this.activeRequests.delete(R),this.sendRequest({id:X,type:103}))}}),_=N=>R.fire(N.data);return this.handlers.set(X,_),R.event}sendRequest(W){switch(W.type){case 100:case 102:{const U=this.send([W.type,W.id,W.channelName,W.name],W.arg);this.logger?.logOutgoing(U,W.id,0,`${y(W.type)}: ${W.channelName}.${W.name}`,W.arg);return}case 101:case 103:{const U=this.send([W.type,W.id]);this.logger?.logOutgoing(U,W.id,0,y(W.type));return}}}send(W,U=void 0){const $=new t;return o($,W),o($,U),this.sendBuffer($.buffer)}sendBuffer(W){try{return this.protocol.send(W),W.byteLength}catch{return 0}}onBuffer(W){const U=new S(W),$=p(U),X=p(U),se=$[0];switch(se){case 200:return this.logger?.logIncoming(W.byteLength,0,0,l(se)),this.onResponse({type:$[0]});case 201:case 202:case 204:case 203:return this.logger?.logIncoming(W.byteLength,$[1],0,l(se),X),this.onResponse({type:$[0],id:$[1],data:X})}}onResponse(W){if(W.type===200){this.state=v.Idle,this._onDidInitialize.fire();return}this.handlers.get(W.id)?.(W)}get onDidInitializePromise(){return h.Event.toPromise(this.onDidInitialize)}whenInitialized(){return this.state===v.Idle?Promise.resolve():this.onDidInitializePromise}dispose(){this.isDisposed=!0,this.protocolListener&&(this.protocolListener.dispose(),this.protocolListener=null),(0,d.dispose)(this.activeRequests.values()),this.activeRequests.clear()}}e.ChannelClient=C,be([D.memoize],C.prototype,"onDidInitializePromise",null);class L{get connections(){const W=[];return this._connections.forEach(U=>W.push(U)),W}constructor(W){this.channels=new Map,this._connections=new Set,this._onDidAddConnection=new h.Emitter,this.onDidAddConnection=this._onDidAddConnection.event,this._onDidRemoveConnection=new h.Emitter,this.onDidRemoveConnection=this._onDidRemoveConnection.event,W(({protocol:U,onDidClientDisconnect:$})=>{h.Event.once(U.onMessage)(se=>{const ce=new S(se),x=p(ce),R=new k(U,x),_=new C(U);this.channels.forEach((q,re)=>R.registerChannel(re,q));const N={channelServer:R,channelClient:_,ctx:x};this._connections.add(N),this._onDidAddConnection.fire(N),$(()=>{R.dispose(),_.dispose(),this._connections.delete(N),this._onDidRemoveConnection.fire(N)})})})}getChannel(W,U){const $=this;return{call(X,se,ce){let x;if((0,w.isFunction)(U)){const _=(0,b.getRandomElement)($.connections.filter(U));x=_?Promise.resolve(_):h.Event.toPromise(h.Event.filter($.onDidAddConnection,U))}else x=U.routeCall($,X,se);const R=x.then(_=>_.channelClient.getChannel(W));return F(R).call(X,se,ce)},listen(X,se){if((0,w.isFunction)(U))return $.getMulticastEvent(W,U,X,se);const ce=U.routeEvent($,X,se).then(x=>x.channelClient.getChannel(W));return F(ce).listen(X,se)}}}getMulticastEvent(W,U,$,X){const se=this;let ce=new d.DisposableStore;const x=new h.Emitter({onWillAddFirstListener:()=>{ce=new d.DisposableStore;const R=new h.EventMultiplexer,_=new Map,N=re=>{const le=re.channelClient.getChannel(W).listen($,X),V=R.add(le);_.set(re,V)},q=re=>{const ie=_.get(re);ie&&(ie.dispose(),_.delete(re))};se.connections.filter(U).forEach(N),h.Event.filter(se.onDidAddConnection,U)(N,void 0,ce),se.onDidRemoveConnection(q,void 0,ce),R.event(x.fire,x,ce),ce.add(R)},onDidRemoveLastListener:()=>{ce.dispose()}});return x.event}registerChannel(W,U){this.channels.set(W,U),this._connections.forEach($=>{$.channelServer.registerChannel(W,U)})}dispose(){this.channels.clear(),this._connections.clear(),this._onDidAddConnection.dispose(),this._onDidRemoveConnection.dispose()}}e.IPCServer=L;class T{constructor(W,U,$=null){const X=new t;o(X,U),W.send(X.buffer),this.channelClient=new C(W,$),this.channelServer=new k(W,U,$)}getChannel(W){return this.channelClient.getChannel(W)}registerChannel(W,U){this.channelServer.registerChannel(W,U)}dispose(){this.channelClient.dispose(),this.channelServer.dispose()}}e.IPCClient=T;function F(B){return{call(W,U,$){return B.then(X=>X.call(W,U,$))},listen(W,U){const $=new h.Relay;return B.then(X=>$.input=X.listen(W,U)),$.event}}}e.getDelayedChannel=F;function z(B){let W=!1;return{call(U,$,X){return W?B.call(U,$,X):(0,A.timeout)(0).then(()=>W=!0).then(()=>B.call(U,$,X))},listen(U,$){if(W)return B.listen(U,$);const X=new h.Relay;return(0,A.timeout)(0).then(()=>W=!0).then(()=>X.input=B.listen(U,$)),X.event}}}e.getNextTickChannel=z;class oe{constructor(W){this.fn=W}routeCall(W){return this.route(W)}routeEvent(W){return this.route(W)}async route(W){for(const U of W.connections)if(await Promise.resolve(this.fn(U.ctx)))return Promise.resolve(U);return await h.Event.toPromise(W.onDidAddConnection),await this.route(W)}}e.StaticRouter=oe;var ne;(function(B){function W(se,ce){const x=se,R=ce&&ce.disableMarshalling,_=new Map;for(const N in x)$(N)&&_.set(N,h.Event.buffer(x[N],!0));return new class{listen(N,q,re){const ie=_.get(q);if(ie)return ie;if(X(q)){const le=x[q];if(typeof le=="function")return le.call(x,re)}throw new P.ErrorNoTelemetry(`Event not found: ${q}`)}call(N,q,re){const ie=x[q];if(typeof ie=="function"){if(!R&&Array.isArray(re))for(let le=0;le<re.length;le++)re[le]=(0,m.revive)(re[le]);return ie.apply(x,re)}throw new P.ErrorNoTelemetry(`Method not found: ${q}`)}}}B.fromService=W;function U(se,ce){const x=ce&&ce.disableMarshalling;return new Proxy({},{get(R,_){if(typeof _=="string")return ce?.properties?.has(_)?ce.properties.get(_):X(_)?function(N){return se.listen(_,N)}:$(_)?se.listen(_):async function(...N){let q;ce&&!(0,w.isUndefinedOrNull)(ce.context)?q=[ce.context,...N]:q=N;const re=await se.call(_,q);return x?re:(0,m.revive)(re)};throw new P.ErrorNoTelemetry(`Property not found: ${String(_)}`)}})}B.toService=U;function $(se){return se[0]==="o"&&se[1]==="n"&&g.isUpperAsciiLetter(se.charCodeAt(2))}function X(se){return/^onDynamic/.test(se)&&g.isUpperAsciiLetter(se.charCodeAt(9))}})(ne||(e.ProxyChannel=ne={}));const de=[["#2977B1","#FC802D","#34A13A","#D3282F","#9366BA"],["#8B564C","#E177C0","#7F7F7F","#BBBE3D","#2EBECD"]];function ae(B){if(Array.isArray(B))return B;if(B&&typeof B=="object"&&typeof B.toString=="function"){const W=B.toString();if(W!=="[object Object]")return W}return B}function ue(B){return Array.isArray(B)?B.map(ae):ae(B)}function j(B,W,U,$,X,se,ce){ce=ue(ce);const x=de[X],R=x[$%x.length];let _=[`%c[${B}]%c[${String(W).padStart(7," ")}]%c[len: ${String(U).padStart(5," ")}]%c${String($).padStart(5," ")} - ${se}`,"color: darkgreen","color: grey","color: grey",`color: ${R}`];/\($/.test(se)?(_=_.concat(ce),_.push(")")):_.push(ce),console.log.apply(console,_)}class G{constructor(W,U){this._outgoingPrefix=W,this._incomingPrefix=U,this._totalIncoming=0,this._totalOutgoing=0}logOutgoing(W,U,$,X,se){this._totalOutgoing+=W,j(this._outgoingPrefix,this._totalOutgoing,W,U,$,X,se)}logIncoming(W,U,$,X,se){this._totalIncoming+=W,j(this._incomingPrefix,this._totalIncoming,W,U,$,X,se)}}e.IPCLogger=G}),define(Z[158],ee([0,1,17,3,42]),function(H,e,b,A,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Client=e.Protocol=void 0;class O{constructor(h){this.port=h,this.onMessage=A.Event.fromDOMEventEmitter(this.port,"message",d=>b.VSBuffer.wrap(d.data)),h.start()}send(h){this.port.postMessage(h.buffer)}disconnect(){this.port.close()}}e.Protocol=O;class D extends n.IPCClient{constructor(h,d){const m=new O(h);super(m,d),this.protocol=m}dispose(){this.protocol.disconnect()}}e.Client=D}),define(Z[111],ee([0,1,17,3,2,42]),function(H,e,b,A,n,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PersistentProtocol=e.BufferedEmitter=e.Client=e.Protocol=e.ProtocolConstants=e.ChunkStream=e.SocketCloseEventType=e.SocketDiagnostics=e.SocketDiagnosticsEventType=void 0;var D;(function(i){i.Created="created",i.Read="read",i.Write="write",i.Open="open",i.Error="error",i.Close="close",i.BrowserWebSocketBlobReceived="browserWebSocketBlobReceived",i.NodeEndReceived="nodeEndReceived",i.NodeEndSent="nodeEndSent",i.NodeDrainBegin="nodeDrainBegin",i.NodeDrainEnd="nodeDrainEnd",i.zlibInflateError="zlibInflateError",i.zlibInflateData="zlibInflateData",i.zlibInflateInitialWrite="zlibInflateInitialWrite",i.zlibInflateInitialFlushFired="zlibInflateInitialFlushFired",i.zlibInflateWrite="zlibInflateWrite",i.zlibInflateFlushFired="zlibInflateFlushFired",i.zlibDeflateError="zlibDeflateError",i.zlibDeflateData="zlibDeflateData",i.zlibDeflateWrite="zlibDeflateWrite",i.zlibDeflateFlushFired="zlibDeflateFlushFired",i.WebSocketNodeSocketWrite="webSocketNodeSocketWrite",i.WebSocketNodeSocketPeekedHeader="webSocketNodeSocketPeekedHeader",i.WebSocketNodeSocketReadHeader="webSocketNodeSocketReadHeader",i.WebSocketNodeSocketReadData="webSocketNodeSocketReadData",i.WebSocketNodeSocketUnmaskedData="webSocketNodeSocketUnmaskedData",i.WebSocketNodeSocketDrainBegin="webSocketNodeSocketDrainBegin",i.WebSocketNodeSocketDrainEnd="webSocketNodeSocketDrainEnd",i.ProtocolHeaderRead="protocolHeaderRead",i.ProtocolMessageRead="protocolMessageRead",i.ProtocolHeaderWrite="protocolHeaderWrite",i.ProtocolMessageWrite="protocolMessageWrite",i.ProtocolWrite="protocolWrite"})(D||(e.SocketDiagnosticsEventType=D={}));var P;(function(i){i.enableDiagnostics=!1,i.records=[];const r=new WeakMap;let o=0;function p(M,C){if(!r.has(M)){const L=String(++o);r.set(M,L)}return r.get(M)}function k(M,C,L,T){if(!i.enableDiagnostics)return;const F=p(M,C);if(T instanceof b.VSBuffer||T instanceof Uint8Array||T instanceof ArrayBuffer||ArrayBuffer.isView(T)){const z=b.VSBuffer.alloc(T.byteLength);z.set(T),i.records.push({timestamp:Date.now(),id:F,label:C,type:L,buff:z})}else i.records.push({timestamp:Date.now(),id:F,label:C,type:L,data:T})}i.traceSocketEvent=k})(P||(e.SocketDiagnostics=P={}));var h;(function(i){i[i.NodeSocketCloseEvent=0]="NodeSocketCloseEvent",i[i.WebSocketCloseEvent=1]="WebSocketCloseEvent"})(h||(e.SocketCloseEventType=h={}));let d=null;function m(){return d||(d=b.VSBuffer.alloc(0)),d}class g{get byteLength(){return this._totalLength}constructor(){this._chunks=[],this._totalLength=0}acceptChunk(r){this._chunks.push(r),this._totalLength+=r.byteLength}read(r){return this._read(r,!0)}peek(r){return this._read(r,!1)}_read(r,o){if(r===0)return m();if(r>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===r){const C=this._chunks[0];return o&&(this._chunks.shift(),this._totalLength-=r),C}if(this._chunks[0].byteLength>r){const C=this._chunks[0].slice(0,r);return o&&(this._chunks[0]=this._chunks[0].slice(r),this._totalLength-=r),C}const p=b.VSBuffer.alloc(r);let k=0,M=0;for(;r>0;){const C=this._chunks[M];if(C.byteLength>r){const L=C.slice(0,r);p.set(L,k),k+=r,o&&(this._chunks[M]=C.slice(r),this._totalLength-=r),r-=r}else p.set(C,k),k+=C.byteLength,o?(this._chunks.shift(),this._totalLength-=C.byteLength):M++,r-=C.byteLength}return p}}e.ChunkStream=g;var w;(function(i){i[i.None=0]="None",i[i.Regular=1]="Regular",i[i.Control=2]="Control",i[i.Ack=3]="Ack",i[i.Disconnect=5]="Disconnect",i[i.ReplayRequest=6]="ReplayRequest",i[i.Pause=7]="Pause",i[i.Resume=8]="Resume",i[i.KeepAlive=9]="KeepAlive"})(w||(w={}));function u(i){switch(i){case 0:return"None";case 1:return"Regular";case 2:return"Control";case 3:return"Ack";case 5:return"Disconnect";case 6:return"ReplayRequest";case 7:return"PauseWriting";case 8:return"ResumeWriting";case 9:return"KeepAlive"}}var y;(function(i){i[i.HeaderLength=13]="HeaderLength",i[i.AcknowledgeTime=2e3]="AcknowledgeTime",i[i.TimeoutTime=2e4]="TimeoutTime",i[i.ReconnectionGraceTime=108e5]="ReconnectionGraceTime",i[i.ReconnectionShortGraceTime=3e5]="ReconnectionShortGraceTime",i[i.KeepAliveSendTime=5e3]="KeepAliveSendTime"})(y||(e.ProtocolConstants=y={}));class E{constructor(r,o,p,k){this.type=r,this.id=o,this.ack=p,this.data=k,this.writtenTime=0}get size(){return this.data.byteLength}}class l extends n.Disposable{constructor(r){super(),this._onMessage=this._register(new A.Emitter),this.onMessage=this._onMessage.event,this._state={readHead:!0,readLen:13,messageType:0,id:0,ack:0},this._socket=r,this._isDisposed=!1,this._incomingData=new g,this._register(this._socket.onData(o=>this.acceptChunk(o))),this.lastReadTime=Date.now()}acceptChunk(r){if(!(!r||r.byteLength===0))for(this.lastReadTime=Date.now(),this._incomingData.acceptChunk(r);this._incomingData.byteLength>=this._state.readLen;){const o=this._incomingData.read(this._state.readLen);if(this._state.readHead)this._state.readHead=!1,this._state.readLen=o.readUInt32BE(9),this._state.messageType=o.readUInt8(0),this._state.id=o.readUInt32BE(1),this._state.ack=o.readUInt32BE(5),this._socket.traceSocketEvent("protocolHeaderRead",{messageType:u(this._state.messageType),id:this._state.id,ack:this._state.ack,messageSize:this._state.readLen});else{const p=this._state.messageType,k=this._state.id,M=this._state.ack;if(this._state.readHead=!0,this._state.readLen=13,this._state.messageType=0,this._state.id=0,this._state.ack=0,this._socket.traceSocketEvent("protocolMessageRead",o),this._onMessage.fire(new E(p,k,M,o)),this._isDisposed)break}}}readEntireBuffer(){return this._incomingData.read(this._incomingData.byteLength)}dispose(){this._isDisposed=!0,super.dispose()}}class v{constructor(r){this._writeNowTimeout=null,this._isDisposed=!1,this._isPaused=!1,this._socket=r,this._data=[],this._totalLength=0,this.lastWriteTime=0}dispose(){try{this.flush()}catch{}this._isDisposed=!0}drain(){return this.flush(),this._socket.drain()}flush(){this._writeNow()}pause(){this._isPaused=!0}resume(){this._isPaused=!1,this._scheduleWriting()}write(r){if(this._isDisposed)return;r.writtenTime=Date.now(),this.lastWriteTime=Date.now();const o=b.VSBuffer.alloc(13);o.writeUInt8(r.type,0),o.writeUInt32BE(r.id,1),o.writeUInt32BE(r.ack,5),o.writeUInt32BE(r.data.byteLength,9),this._socket.traceSocketEvent("protocolHeaderWrite",{messageType:u(r.type),id:r.id,ack:r.ack,messageSize:r.data.byteLength}),this._socket.traceSocketEvent("protocolMessageWrite",r.data),this._writeSoon(o,r.data)}_bufferAdd(r,o){const p=this._totalLength===0;return this._data.push(r,o),this._totalLength+=r.byteLength+o.byteLength,p}_bufferTake(){const r=b.VSBuffer.concat(this._data,this._totalLength);return this._data.length=0,this._totalLength=0,r}_writeSoon(r,o){this._bufferAdd(r,o)&&this._scheduleWriting()}_scheduleWriting(){this._writeNowTimeout||(this._writeNowTimeout=setTimeout(()=>{this._writeNowTimeout=null,this._writeNow()}))}_writeNow(){if(this._totalLength===0||this._isPaused)return;const r=this._bufferTake();this._socket.traceSocketEvent("protocolWrite",{byteLength:r.byteLength}),this._socket.write(r)}}class c extends n.Disposable{constructor(r){super(),this._onMessage=new A.Emitter,this.onMessage=this._onMessage.event,this._onDidDispose=new A.Emitter,this.onDidDispose=this._onDidDispose.event,this._socket=r,this._socketWriter=this._register(new v(this._socket)),this._socketReader=this._register(new l(this._socket)),this._register(this._socketReader.onMessage(o=>{o.type===1&&this._onMessage.fire(o.data)})),this._register(this._socket.onClose(()=>this._onDidDispose.fire()))}drain(){return this._socketWriter.drain()}getSocket(){return this._socket}sendDisconnect(){}send(r){this._socketWriter.write(new E(1,0,0,r))}}e.Protocol=c;class f extends O.IPCClient{static fromSocket(r,o){return new f(new c(r),o)}get onDidDispose(){return this.protocol.onDidDispose}constructor(r,o,p=null){super(r,o,p),this.protocol=r}dispose(){super.dispose();const r=this.protocol.getSocket();this.protocol.sendDisconnect(),this.protocol.dispose(),r.end()}}e.Client=f;class I{constructor(){this._hasListeners=!1,this._isDeliveringMessages=!1,this._bufferedMessages=[],this._emitter=new A.Emitter({onWillAddFirstListener:()=>{this._hasListeners=!0,queueMicrotask(()=>this._deliverMessages())},onDidRemoveLastListener:()=>{this._hasListeners=!1}}),this.event=this._emitter.event}_deliverMessages(){if(!this._isDeliveringMessages){for(this._isDeliveringMessages=!0;this._hasListeners&&this._bufferedMessages.length>0;)this._emitter.fire(this._bufferedMessages.shift());this._isDeliveringMessages=!1}}fire(r){this._hasListeners?this._bufferedMessages.length>0?this._bufferedMessages.push(r):this._emitter.fire(r):this._bufferedMessages.push(r)}flushBuffer(){this._bufferedMessages=[]}}e.BufferedEmitter=I;class S{constructor(r){this.data=r,this.next=null}}class t{constructor(){this._first=null,this._last=null}length(){let r=0,o=this._first;for(;o;)o=o.next,r++;return r}peek(){return this._first?this._first.data:null}toArray(){const r=[];let o=0,p=this._first;for(;p;)r[o++]=p.data,p=p.next;return r}pop(){if(this._first){if(this._first===this._last){this._first=null,this._last=null;return}this._first=this._first.next}}push(r){const o=new S(r);if(!this._first){this._first=o,this._last=o;return}this._last.next=o,this._last=o}}class a{static{this._HISTORY_LENGTH=10}static{this._INSTANCE=null}static getInstance(){return a._INSTANCE||(a._INSTANCE=new a),a._INSTANCE}constructor(){this.lastRuns=[];const r=Date.now();for(let o=0;o<a._HISTORY_LENGTH;o++)this.lastRuns[o]=r-1e3*o;setInterval(()=>{for(let o=a._HISTORY_LENGTH;o>=1;o--)this.lastRuns[o]=this.lastRuns[o-1];this.lastRuns[0]=Date.now()},1e3)}load(){const r=Date.now(),o=(1+a._HISTORY_LENGTH)*1e3;let p=0;for(let k=0;k<a._HISTORY_LENGTH;k++)r-this.lastRuns[k]<=o&&p++;return 1-p/a._HISTORY_LENGTH}hasHighLoad(){return this.load()>=.5}}class s{get unacknowledgedCount(){return this._outgoingMsgId-this._outgoingAckId}constructor(r){this._onControlMessage=new I,this.onControlMessage=this._onControlMessage.event,this._onMessage=new I,this.onMessage=this._onMessage.event,this._onDidDispose=new I,this.onDidDispose=this._onDidDispose.event,this._onSocketClose=new I,this.onSocketClose=this._onSocketClose.event,this._onSocketTimeout=new I,this.onSocketTimeout=this._onSocketTimeout.event,this._loadEstimator=r.loadEstimator??a.getInstance(),this._shouldSendKeepAlive=r.sendKeepAlive??!0,this._isReconnecting=!1,this._outgoingUnackMsg=new t,this._outgoingMsgId=0,this._outgoingAckId=0,this._outgoingAckTimeout=null,this._incomingMsgId=0,this._incomingAckId=0,this._incomingMsgLastTime=0,this._incomingAckTimeout=null,this._lastReplayRequestTime=0,this._lastSocketTimeoutTime=Date.now(),this._socketDisposables=new n.DisposableStore,this._socket=r.socket,this._socketWriter=this._socketDisposables.add(new v(this._socket)),this._socketReader=this._socketDisposables.add(new l(this._socket)),this._socketDisposables.add(this._socketReader.onMessage(o=>this._receiveMessage(o))),this._socketDisposables.add(this._socket.onClose(o=>this._onSocketClose.fire(o))),r.initialChunk&&this._socketReader.acceptChunk(r.initialChunk),this._shouldSendKeepAlive?this._keepAliveInterval=setInterval(()=>{this._sendKeepAlive()},5e3):this._keepAliveInterval=null}dispose(){this._outgoingAckTimeout&&(clearTimeout(this._outgoingAckTimeout),this._outgoingAckTimeout=null),this._incomingAckTimeout&&(clearTimeout(this._incomingAckTimeout),this._incomingAckTimeout=null),this._keepAliveInterval&&(clearInterval(this._keepAliveInterval),this._keepAliveInterval=null),this._socketDisposables.dispose()}drain(){return this._socketWriter.drain()}sendDisconnect(){const r=new E(5,0,0,m());this._socketWriter.write(r),this._socketWriter.flush()}sendPause(){const r=new E(7,0,0,m());this._socketWriter.write(r)}sendResume(){const r=new E(8,0,0,m());this._socketWriter.write(r)}pauseSocketWriting(){this._socketWriter.pause()}getSocket(){return this._socket}getMillisSinceLastIncomingData(){return Date.now()-this._socketReader.lastReadTime}beginAcceptReconnection(r,o){this._isReconnecting=!0,this._socketDisposables.dispose(),this._socketDisposables=new n.DisposableStore,this._onControlMessage.flushBuffer(),this._onSocketClose.flushBuffer(),this._onSocketTimeout.flushBuffer(),this._socket.dispose(),this._lastReplayRequestTime=0,this._lastSocketTimeoutTime=Date.now(),this._socket=r,this._socketWriter=this._socketDisposables.add(new v(this._socket)),this._socketReader=this._socketDisposables.add(new l(this._socket)),this._socketDisposables.add(this._socketReader.onMessage(p=>this._receiveMessage(p))),this._socketDisposables.add(this._socket.onClose(p=>this._onSocketClose.fire(p))),this._socketReader.acceptChunk(o)}endAcceptReconnection(){this._isReconnecting=!1,this._incomingAckId=this._incomingMsgId;const r=new E(3,0,this._incomingAckId,m());this._socketWriter.write(r);const o=this._outgoingUnackMsg.toArray();for(let p=0,k=o.length;p<k;p++)this._socketWriter.write(o[p]);this._recvAckCheck()}acceptDisconnect(){this._onDidDispose.fire()}_receiveMessage(r){if(r.ack>this._outgoingAckId){this._outgoingAckId=r.ack;do{const o=this._outgoingUnackMsg.peek();if(o&&o.id<=r.ack)this._outgoingUnackMsg.pop();else break}while(!0)}switch(r.type){case 0:break;case 1:{if(r.id>this._incomingMsgId)if(r.id!==this._incomingMsgId+1){const o=Date.now();o-this._lastReplayRequestTime>1e4&&(this._lastReplayRequestTime=o,this._socketWriter.write(new E(6,0,0,m())))}else this._incomingMsgId=r.id,this._incomingMsgLastTime=Date.now(),this._sendAckCheck(),this._onMessage.fire(r.data);break}case 2:{this._onControlMessage.fire(r.data);break}case 3:break;case 5:{this._onDidDispose.fire();break}case 6:{const o=this._outgoingUnackMsg.toArray();for(let p=0,k=o.length;p<k;p++)this._socketWriter.write(o[p]);this._recvAckCheck();break}case 7:{this._socketWriter.pause();break}case 8:{this._socketWriter.resume();break}case 9:break}}readEntireBuffer(){return this._socketReader.readEntireBuffer()}flush(){this._socketWriter.flush()}send(r){const o=++this._outgoingMsgId;this._incomingAckId=this._incomingMsgId;const p=new E(1,o,this._incomingAckId,r);this._outgoingUnackMsg.push(p),this._isReconnecting||(this._socketWriter.write(p),this._recvAckCheck())}sendControl(r){const o=new E(2,0,0,r);this._socketWriter.write(o)}_sendAckCheck(){if(this._incomingMsgId<=this._incomingAckId||this._incomingAckTimeout)return;const r=Date.now()-this._incomingMsgLastTime;if(r>=2e3){this._sendAck();return}this._incomingAckTimeout=setTimeout(()=>{this._incomingAckTimeout=null,this._sendAckCheck()},2e3-r+5)}_recvAckCheck(){if(this._outgoingMsgId<=this._outgoingAckId||this._outgoingAckTimeout||this._isReconnecting)return;const r=this._outgoingUnackMsg.peek(),o=Date.now()-r.writtenTime,p=Date.now()-this._socketReader.lastReadTime,k=Date.now()-this._lastSocketTimeoutTime;if(o>=2e4&&p>=2e4&&k>=2e4&&!this._loadEstimator.hasHighLoad()){this._lastSocketTimeoutTime=Date.now(),this._onSocketTimeout.fire({unacknowledgedMsgCount:this._outgoingUnackMsg.length(),timeSinceOldestUnacknowledgedMsg:o,timeSinceLastReceivedSomeData:p});return}const M=Math.max(2e4-o,2e4-p,2e4-k,500);this._outgoingAckTimeout=setTimeout(()=>{this._outgoingAckTimeout=null,this._recvAckCheck()},M)}_sendAck(){if(this._incomingMsgId<=this._incomingAckId)return;this._incomingAckId=this._incomingMsgId;const r=new E(3,0,this._incomingAckId,m());this._socketWriter.write(r)}_sendKeepAlive(){this._incomingAckId=this._incomingMsgId;const r=new E(9,0,this._incomingAckId,m());this._socketWriter.write(r)}}e.PersistentProtocol=s}),define(Z[159],ee([0,1,38,17,3,2,42,146]),function(H,e,b,A,n,O,D,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Server=void 0;function h(m,g){const w=n.Event.fromNodeEventEmitter(b.validatedIpcMain,g,(y,E)=>({event:y,message:E})),u=n.Event.filter(w,({event:y})=>y.sender.id===m);return n.Event.map(u,({message:y})=>y&&A.VSBuffer.wrap(y))}class d extends D.IPCServer{static{this.Clients=new Map}static getOnDidClientConnect(){const g=n.Event.fromNodeEventEmitter(b.validatedIpcMain,"vscode:hello",({sender:w})=>w);return n.Event.map(g,w=>{const u=w.id;d.Clients.get(u)?.dispose();const E=new n.Emitter;d.Clients.set(u,(0,O.toDisposable)(()=>E.fire()));const l=h(u,"vscode:message"),v=n.Event.any(n.Event.signal(h(u,"vscode:disconnect")),E.event);return{protocol:new P.Protocol(w,l),onDidClientDisconnect:v}})}constructor(){super(d.getOnDidClientConnect())}}e.Server=d}),define(Z[112],ee([0,1,38,3,31,158]),function(H,e,b,A,n,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.connect=e.Client=void 0;class D extends O.Client{constructor(d,m){super({addEventListener:(g,w)=>d.addListener(g,w),removeEventListener:(g,w)=>d.removeListener(g,w),postMessage:g=>d.postMessage(g),start:()=>d.start(),close:()=>d.close()},m)}}e.Client=D;async function P(h){if(h.isDestroyed()||h.webContents.isDestroyed())throw new Error("ipc.mp#connect: Cannot talk to window because it is closed or destroyed");const d=(0,n.generateUuid)();h.webContents.send("vscode:createMessageChannel",d);const m=A.Event.fromNodeEventEmitter(b.validatedIpcMain,"vscode:createMessageChannelResult",(w,u)=>({nonce:u,port:w.ports[0]})),{port:g}=await A.Event.toPromise(A.Event.once(A.Event.filter(m,w=>w.nonce===d)));return g}e.connect=P}),define(Z[160],ee([0,1,47,8,17,23,155,13,3,2,37,90,74,42]),function(H,e,b,A,n,O,D,P,h,d,m,g,w,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Client=e.Server=void 0;class y extends u.ChannelServer{constructor(v){super({send:c=>{try{process.send?.(c.buffer.toString("base64"))}catch{}},onMessage:h.Event.fromNodeEventEmitter(process,"message",c=>n.VSBuffer.wrap(Buffer.from(c,"base64")))},v),process.once("disconnect",()=>this.dispose())}}e.Server=y;class E{constructor(v,c){this.modulePath=v,this.options=c,this.activeRequests=new Set,this.channels=new Map,this._onDidProcessExit=new h.Emitter,this.onDidProcessExit=this._onDidProcessExit.event;const f=c&&c.timeout?c.timeout:6e4;this.disposeDelayer=new A.Delayer(f),this.child=null,this._client=null}getChannel(v){const c=this;return{call(f,I,S){return c.requestPromise(v,f,I,S)},listen(f,I){return c.requestEvent(v,f,I)}}}requestPromise(v,c,f,I=O.CancellationToken.None){if(!this.disposeDelayer)return Promise.reject(new Error("disposed"));if(I.isCancellationRequested)return Promise.reject(P.canceled());this.disposeDelayer.cancel();const S=this.getCachedChannel(v),t=(0,A.createCancelablePromise)(i=>S.call(c,f,i)),a=I.onCancellationRequested(()=>t.cancel()),s=(0,d.toDisposable)(()=>t.cancel());return this.activeRequests.add(s),t.finally(()=>{a.dispose(),this.activeRequests.delete(s),this.activeRequests.size===0&&this.disposeDelayer&&this.disposeDelayer.trigger(()=>this.disposeClient())}),t}requestEvent(v,c,f){if(!this.disposeDelayer)return h.Event.None;this.disposeDelayer.cancel();let I;const S=new h.Emitter({onWillAddFirstListener:()=>{I=this.getCachedChannel(v).listen(c,f)(S.fire,S),this.activeRequests.add(I)},onDidRemoveLastListener:()=>{this.activeRequests.delete(I),I.dispose(),this.activeRequests.size===0&&this.disposeDelayer&&this.disposeDelayer.trigger(()=>this.disposeClient())}});return S.event}get client(){if(!this._client){const v=this.options&&this.options.args?this.options.args:[],c=Object.create(null);c.env={...(0,m.deepClone)(process.env),VSCODE_PARENT_PID:String(process.pid)},this.options&&this.options.env&&(c.env={...c.env,...this.options.env}),this.options&&this.options.freshExecArgv&&(c.execArgv=[]),this.options&&typeof this.options.debug=="number"&&(c.execArgv=["--nolazy","--inspect="+this.options.debug]),this.options&&typeof this.options.debugBrk=="number"&&(c.execArgv=["--nolazy","--inspect-brk="+this.options.debugBrk]),c.execArgv===void 0&&(c.execArgv=process.execArgv.filter(r=>!/^--inspect(-brk)?=/.test(r)).filter(r=>!r.startsWith("--vscode-"))),(0,w.removeDangerousEnvVariables)(c.env),this.child=(0,b.fork)(this.modulePath,v,c);const f=new h.Emitter;h.Event.fromNodeEventEmitter(this.child,"message",r=>r)(r=>{if((0,D.isRemoteConsoleLog)(r)){(0,D.log)(r,`IPC Library: ${this.options.serverName}`);return}f.fire(n.VSBuffer.wrap(Buffer.from(r,"base64")))});const S=this.options.useQueue?(0,g.createQueuedSender)(this.child):this.child,t=r=>this.child&&this.child.connected&&S.send(r.buffer.toString("base64")),a=f.event,s={send:t,onMessage:a};this._client=new u.ChannelClient(s);const i=()=>this.disposeClient();process.once("exit",i),this.child.on("error",r=>console.warn('IPC "'+this.options.serverName+'" errored with '+r)),this.child.on("exit",(r,o)=>{process.removeListener("exit",i),this.activeRequests.forEach(p=>(0,d.dispose)(p)),this.activeRequests.clear(),r!==0&&o!=="SIGTERM"&&console.warn('IPC "'+this.options.serverName+'" crashed with exit code '+r+" and signal "+o),this.disposeDelayer?.cancel(),this.disposeClient(),this._onDidProcessExit.fire({code:r,signal:o})})}return this._client}getCachedChannel(v){let c=this.channels.get(v);return c||(c=this.client.getChannel(v),this.channels.set(v,c)),c}disposeClient(){this._client&&(this.child&&(this.child.kill(),this.child=null),this._client=null,this.channels.clear())}dispose(){this._onDidProcessExit.dispose(),this.disposeDelayer?.cancel(),this.disposeDelayer=void 0,this.disposeClient(),this.activeRequests.clear()}}e.Client=E}),define(Z[113],ee([0,1,8,3,2,75,12]),function(H,e,b,A,n,O,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryStorageDatabase=e.Storage=e.StorageState=e.isStorageItemsChangeEvent=e.StorageHint=void 0;var P;(function(w){w[w.STORAGE_DOES_NOT_EXIST=0]="STORAGE_DOES_NOT_EXIST",w[w.STORAGE_IN_MEMORY=1]="STORAGE_IN_MEMORY"})(P||(e.StorageHint=P={}));function h(w){const u=w;return u?.changed instanceof Map||u?.deleted instanceof Set}e.isStorageItemsChangeEvent=h;var d;(function(w){w[w.None=0]="None",w[w.Initialized=1]="Initialized",w[w.Closed=2]="Closed"})(d||(e.StorageState=d={}));class m extends n.Disposable{static{this.DEFAULT_FLUSH_DELAY=100}constructor(u,y=Object.create(null)){super(),this.database=u,this.options=y,this._onDidChangeStorage=this._register(new A.PauseableEmitter),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=d.None,this.cache=new Map,this.flushDelayer=new b.ThrottledDelayer(m.DEFAULT_FLUSH_DELAY),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.pendingClose=void 0,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(u=>this.onDidChangeItemsExternal(u)))}onDidChangeItemsExternal(u){this._onDidChangeStorage.pause();try{u.changed?.forEach((y,E)=>this.acceptExternal(E,y)),u.deleted?.forEach(y=>this.acceptExternal(y,void 0))}finally{this._onDidChangeStorage.resume()}}acceptExternal(u,y){if(this.state===d.Closed)return;let E=!1;(0,D.isUndefinedOrNull)(y)?E=this.cache.delete(u):this.cache.get(u)!==y&&(this.cache.set(u,y),E=!0),E&&this._onDidChangeStorage.fire({key:u,external:!0})}get items(){return this.cache}get size(){return this.cache.size}async init(){this.state===d.None&&(this.state=d.Initialized,this.options.hint!==P.STORAGE_DOES_NOT_EXIST&&(this.cache=await this.database.getItems()))}get(u,y){const E=this.cache.get(u);return(0,D.isUndefinedOrNull)(E)?y:E}getBoolean(u,y){const E=this.get(u);return(0,D.isUndefinedOrNull)(E)?y:E==="true"}getNumber(u,y){const E=this.get(u);return(0,D.isUndefinedOrNull)(E)?y:parseInt(E,10)}getObject(u,y){const E=this.get(u);return(0,D.isUndefinedOrNull)(E)?y:(0,O.parse)(E)}async set(u,y,E=!1){if(this.state===d.Closed)return;if((0,D.isUndefinedOrNull)(y))return this.delete(u,E);const l=(0,D.isObject)(y)||Array.isArray(y)?(0,O.stringify)(y):String(y);if(this.cache.get(u)!==l)return this.cache.set(u,l),this.pendingInserts.set(u,l),this.pendingDeletes.delete(u),this._onDidChangeStorage.fire({key:u,external:E}),this.doFlush()}async delete(u,y=!1){if(!(this.state===d.Closed||!this.cache.delete(u)))return this.pendingDeletes.has(u)||this.pendingDeletes.add(u),this.pendingInserts.delete(u),this._onDidChangeStorage.fire({key:u,external:y}),this.doFlush()}async close(){return this.pendingClose||(this.pendingClose=this.doClose()),this.pendingClose}async doClose(){this.state=d.Closed;try{await this.doFlush(0)}catch{}await this.database.close(()=>this.cache)}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}async flushPending(){if(!this.hasPending)return;const u={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(u).finally(()=>{if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)this.whenFlushedCallbacks.pop()?.()})}async flush(u){if(this.hasPending)return this.doFlush(u)}async doFlush(u){return this.flushDelayer.trigger(()=>this.flushPending(),u)}async whenFlushed(){if(this.hasPending)return new Promise(u=>this.whenFlushedCallbacks.push(u))}isInMemory(){return this.options.hint===P.STORAGE_IN_MEMORY}dispose(){this.flushDelayer.dispose(),super.dispose()}}e.Storage=m;class g{constructor(){this.onDidChangeItemsExternal=A.Event.None,this.items=new Map}async getItems(){return this.items}async updateItems(u){u.insert?.forEach((y,E)=>this.items.set(E,y)),u.delete?.forEach(y=>this.items.delete(y))}async close(){}}e.InMemoryStorageDatabase=g}),define(Z[161],ee([0,1,8,3,35,10,21]),function(H,e,b,A,n,O,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SQLiteStorageDatabase=void 0;class P{static{this.IN_MEMORY_PATH=":memory:"}get onDidChangeItemsExternal(){return A.Event.None}static{this.BUSY_OPEN_TIMEOUT=2e3}static{this.MAX_HOST_PARAMETERS=256}constructor(m,g=Object.create(null)){this.path=m,this.options=g,this.name=(0,O.basename)(this.path),this.logger=new h(this.options.logging),this.whenConnected=this.connect(this.path)}async getItems(){const m=await this.whenConnected,g=new Map;return(await this.all(m,"SELECT * FROM ItemTable")).forEach(u=>g.set(u.key,u.value)),this.logger.isTracing&&this.logger.trace(`[storage ${this.name}] getItems(): ${g.size} rows`),g}async updateItems(m){const g=await this.whenConnected;return this.doUpdateItems(g,m)}doUpdateItems(m,g){return this.logger.isTracing&&this.logger.trace(`[storage ${this.name}] updateItems(): insert(${g.insert?(0,n.mapToString)(g.insert):"0"}), delete(${g.delete?(0,n.setToString)(g.delete):"0"})`),this.transaction(m,()=>{const w=g.insert,u=g.delete;if(w&&w.size>0){const y=[];y.push([]);let E=0;w.forEach((l,v)=>{let c=y[E];c.length>P.MAX_HOST_PARAMETERS&&(E++,c=[],y.push(c)),c.push(v,l)}),y.forEach(l=>{this.prepare(m,`INSERT INTO ItemTable VALUES ${new Array(l.length/2).fill("(?,?)").join(",")}`,v=>v.run(l),()=>{const v=[];let c=0;return w.forEach((f,I)=>{v.push(I),c+=f.length}),`Keys: ${v.join(", ")} Length: ${c}`})})}if(u&&u.size){const y=[];y.push([]);let E=0;u.forEach(l=>{let v=y[E];v.length>P.MAX_HOST_PARAMETERS&&(E++,v=[],y.push(v)),v.push(l)}),y.forEach(l=>{this.prepare(m,`DELETE FROM ItemTable WHERE key IN (${new Array(l.length).fill("?").join(",")})`,v=>v.run(l),()=>{const v=[];return u.forEach(c=>{v.push(c)}),`Keys: ${v.join(", ")}`})})}})}async close(m){this.logger.trace(`[storage ${this.name}] close()`);const g=await this.whenConnected;return this.doClose(g,m)}doClose(m,g){return new Promise((w,u)=>{m.db.close(y=>(y&&this.handleSQLiteError(m,`[storage ${this.name}] close(): ${y}`),this.path===P.IN_MEMORY_PATH?w():!m.isErroneous&&!m.isInMemory?this.backup().then(w,E=>(this.logger.error(`[storage ${this.name}] backup(): ${E}`),w())):typeof g=="function"?D.Promises.unlink(this.path).then(()=>this.doConnect(this.path).then(E=>{const l=()=>this.doClose(E,void 0);return this.doUpdateItems(E,{insert:g()}).then(()=>l(),v=>(l(),Promise.reject(v)))})).then(w,u):u(y||new Error("Database has errors or is in-memory without recovery option"))))})}backup(){const m=this.toBackupPath(this.path);return D.Promises.copy(this.path,m,{preserveSymlinks:!1})}toBackupPath(m){return`${m}.backup`}async checkIntegrity(m){this.logger.trace(`[storage ${this.name}] checkIntegrity(full: ${m})`);const g=await this.whenConnected,w=await this.get(g,m?"PRAGMA integrity_check":"PRAGMA quick_check"),u=m?w.integrity_check:w.quick_check;return g.isErroneous?`${u} (last error: ${g.lastError})`:g.isInMemory?`${u} (in-memory!)`:u}async connect(m,g=!0){this.logger.trace(`[storage ${this.name}] open(${m}, retryOnBusy: ${g})`);try{return await this.doConnect(m)}catch(w){if(this.logger.error(`[storage ${this.name}] open(): Unable to open DB due to ${w}`),w.code==="SQLITE_BUSY"&&g)return await(0,b.timeout)(P.BUSY_OPEN_TIMEOUT),this.connect(m,!1);try{await D.Promises.unlink(m);try{await D.Promises.rename(this.toBackupPath(m),m,!1)}catch{}return await this.doConnect(m)}catch(u){return this.logger.error(`[storage ${this.name}] open(): Unable to use backup due to ${u}`),this.doConnect(P.IN_MEMORY_PATH)}}}handleSQLiteError(m,g){m.isErroneous=!0,m.lastError=g,this.logger.error(g)}doConnect(m){return new Promise((g,w)=>{new Promise((u,y)=>{H(["@vscode/sqlite3"],u,y)}).then(u=>{const y={db:new(this.logger.isTracing?u.verbose().Database:u.Database)(m,E=>E?y.db&&E.code!=="SQLITE_CANTOPEN"?y.db.close(()=>w(E)):w(E):this.exec(y,["PRAGMA user_version = 1;","CREATE TABLE IF NOT EXISTS ItemTable (key TEXT UNIQUE ON CONFLICT REPLACE, value BLOB)"].join("")).then(()=>g(y),l=>y.db.close(()=>w(l)))),isInMemory:m===P.IN_MEMORY_PATH};y.db.on("error",E=>this.handleSQLiteError(y,`[storage ${this.name}] Error (event): ${E}`)),this.logger.isTracing&&y.db.on("trace",E=>this.logger.trace(`[storage ${this.name}] Trace (event): ${E}`))},w)})}exec(m,g){return new Promise((w,u)=>{m.db.exec(g,y=>y?(this.handleSQLiteError(m,`[storage ${this.name}] exec(): ${y}`),u(y)):w())})}get(m,g){return new Promise((w,u)=>{m.db.get(g,(y,E)=>y?(this.handleSQLiteError(m,`[storage ${this.name}] get(): ${y}`),u(y)):w(E))})}all(m,g){return new Promise((w,u)=>{m.db.all(g,(y,E)=>y?(this.handleSQLiteError(m,`[storage ${this.name}] all(): ${y}`),u(y)):w(E))})}transaction(m,g){return new Promise((w,u)=>{m.db.serialize(()=>{m.db.run("BEGIN TRANSACTION"),g(),m.db.run("END TRANSACTION",y=>y?(this.handleSQLiteError(m,`[storage ${this.name}] transaction(): ${y}`),u(y)):w())})})}prepare(m,g,w,u){const y=m.db.prepare(g),E=l=>{this.handleSQLiteError(m,`[storage ${this.name}] prepare(): ${l} (${g}). Details: ${u()}`)};y.on("error",E),w(y),y.finalize(l=>{l&&E(l),y.removeListener("error",E)})}}e.SQLiteStorageDatabase=P;class h{static{this.VSCODE_TRACE_STORAGE="VSCODE_TRACE_STORAGE"}constructor(m){m&&typeof m.logTrace=="function"&&process.env[h.VSCODE_TRACE_STORAGE]&&(this.logTrace=m.logTrace),m&&typeof m.logError=="function"&&(this.logError=m.logError)}get isTracing(){return!!this.logTrace}trace(m){this.logTrace?.(m)}error(m){this.logError?.(m)}}}),define(Z[162],ee([11,9]),function(H,e){return H.create("vs/code/electron-main/app",e)}),define(Z[163],ee([11,9]),function(H,e){return H.create("vs/platform/configuration/common/configurationRegistry",e)}),define(Z[164],ee([11,9]),function(H,e){return H.create("vs/platform/contextkey/common/contextkey",e)}),define(Z[165],ee([11,9]),function(H,e){return H.create("vs/platform/contextkey/common/scanner",e)}),define(Z[166],ee([11,9]),function(H,e){return H.create("vs/platform/dialogs/common/dialogs",e)}),define(Z[167],ee([11,9]),function(H,e){return H.create("vs/platform/dialogs/electron-main/dialogMainService",e)}),define(Z[168],ee([11,9]),function(H,e){return H.create("vs/platform/environment/node/argv",e)}),define(Z[169],ee([11,9]),function(H,e){return H.create("vs/platform/environment/node/argvHelper",e)}),define(Z[170],ee([11,9]),function(H,e){return H.create("vs/platform/extensionManagement/common/extensionManagement",e)}),define(Z[171],ee([11,9]),function(H,e){return H.create("vs/platform/extensionManagement/common/extensionNls",e)}),define(Z[172],ee([11,9]),function(H,e){return H.create("vs/platform/extensionManagement/common/extensionsScannerService",e)}),define(Z[173],ee([11,9]),function(H,e){return H.create("vs/platform/extensions/common/extensionValidator",e)}),define(Z[174],ee([11,9]),function(H,e){return H.create("vs/platform/externalTerminal/node/externalTerminalService",e)}),define(Z[175],ee([11,9]),function(H,e){return H.create("vs/platform/files/common/fileService",e)}),define(Z[176],ee([11,9]),function(H,e){return H.create("vs/platform/files/common/files",e)}),define(Z[177],ee([11,9]),function(H,e){return H.create("vs/platform/files/common/io",e)}),define(Z[178],ee([11,9]),function(H,e){return H.create("vs/platform/files/electron-main/diskFileSystemProviderServer",e)}),define(Z[179],ee([11,9]),function(H,e){return H.create("vs/platform/files/node/diskFileSystemProvider",e)}),define(Z[180],ee([11,9]),function(H,e){return H.create("vs/platform/issue/electron-main/issueMainService",e)}),define(Z[181],ee([11,9]),function(H,e){return H.create("vs/platform/menubar/electron-main/menubar",e)}),define(Z[182],ee([11,9]),function(H,e){return H.create("vs/platform/native/electron-main/nativeHostMainService",e)}),define(Z[183],ee([11,9]),function(H,e){return H.create("vs/platform/request/common/request",e)}),define(Z[184],ee([11,9]),function(H,e){return H.create("vs/platform/shell/node/shellEnv",e)}),define(Z[185],ee([11,9]),function(H,e){return H.create("vs/platform/telemetry/common/telemetryService",e)}),define(Z[186],ee([11,9]),function(H,e){return H.create("vs/platform/terminal/common/terminalPlatformConfiguration",e)}),define(Z[187],ee([11,9]),function(H,e){return H.create("vs/platform/terminal/common/terminalProfiles",e)}),define(Z[188],ee([11,9]),function(H,e){return H.create("vs/platform/update/common/update.config.contribution",e)}),define(Z[189],ee([11,9]),function(H,e){return H.create("vs/platform/userDataProfile/common/userDataProfile",e)}),define(Z[190],ee([11,9]),function(H,e){return H.create("vs/platform/windows/electron-main/windowImpl",e)}),define(Z[191],ee([11,9]),function(H,e){return H.create("vs/platform/windows/electron-main/windowsMainService",e)}),define(Z[192],ee([11,9]),function(H,e){return H.create("vs/platform/workspace/common/workspace",e)}),define(Z[193],ee([11,9]),function(H,e){return H.create("vs/platform/workspaces/electron-main/workspacesHistoryMainService",e)}),define(Z[194],ee([11,9]),function(H,e){return H.create("vs/platform/workspaces/electron-main/workspacesManagementMainService",e)}),define(Z[195],ee([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isWorkspaceBackupInfo=e.isFolderBackupInfo=void 0;function b(n){return n&&n.hasOwnProperty("folderUri")}e.isFolderBackupInfo=b;function A(n){return n&&n.hasOwnProperty("workspace")}e.isWorkspaceBackupInfo=A}),define(Z[196],ee([0,1,7]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.deserializeFolderInfos=e.deserializeWorkspaceInfos=e.isEmptyWindowBackupInfo=void 0;function A(D){return typeof D?.backupFolder=="string"}e.isEmptyWindowBackupInfo=A;function n(D){let P=[];try{Array.isArray(D.workspaces)&&(P=D.workspaces.map(h=>({workspace:{id:h.id,configPath:b.URI.parse(h.configURIPath)},remoteAuthority:h.remoteAuthority})))}catch{}return P}e.deserializeWorkspaceInfos=n;function O(D){let P=[];try{Array.isArray(D.folders)&&(P=D.folders.map(h=>({folderUri:b.URI.parse(h.folderUri),remoteAuthority:h.remoteAuthority})))}catch{}return P}e.deserializeFolderInfos=O}),define(Z[197],ee([0,1,13,165]),function(H,e,b,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Scanner=e.TokenType=void 0;var n;(function(d){d[d.LParen=0]="LParen",d[d.RParen=1]="RParen",d[d.Neg=2]="Neg",d[d.Eq=3]="Eq",d[d.NotEq=4]="NotEq",d[d.Lt=5]="Lt",d[d.LtEq=6]="LtEq",d[d.Gt=7]="Gt",d[d.GtEq=8]="GtEq",d[d.RegexOp=9]="RegexOp",d[d.RegexStr=10]="RegexStr",d[d.True=11]="True",d[d.False=12]="False",d[d.In=13]="In",d[d.Not=14]="Not",d[d.And=15]="And",d[d.Or=16]="Or",d[d.Str=17]="Str",d[d.QuotedStr=18]="QuotedStr",d[d.Error=19]="Error",d[d.EOF=20]="EOF"})(n||(e.TokenType=n={}));function O(...d){switch(d.length){case 1:return(0,A.localize)(0,null,d[0]);case 2:return(0,A.localize)(1,null,d[0],d[1]);case 3:return(0,A.localize)(2,null,d[0],d[1],d[2]);default:return}}const D=(0,A.localize)(3,null),P=(0,A.localize)(4,null);class h{constructor(){this._input="",this._start=0,this._current=0,this._tokens=[],this._errors=[],this.stringRe=/[a-zA-Z0-9_<>\-\./\\:\*\?\+\[\]\^,#@;"%\$\p{L}-]+/uy}static getLexeme(m){switch(m.type){case 0:return"(";case 1:return")";case 2:return"!";case 3:return m.isTripleEq?"===":"==";case 4:return m.isTripleEq?"!==":"!=";case 5:return"<";case 6:return"<=";case 7:return">=";case 8:return">=";case 9:return"=~";case 10:return m.lexeme;case 11:return"true";case 12:return"false";case 13:return"in";case 14:return"not";case 15:return"&&";case 16:return"||";case 17:return m.lexeme;case 18:return m.lexeme;case 19:return m.lexeme;case 20:return"EOF";default:throw(0,b.illegalState)(`unhandled token type: ${JSON.stringify(m)}; have you forgotten to add a case?`)}}static{this._regexFlags=new Set(["i","g","s","m","y","u"].map(m=>m.charCodeAt(0)))}static{this._keywords=new Map([["not",14],["in",13],["false",12],["true",11]])}get errors(){return this._errors}reset(m){return this._input=m,this._start=0,this._current=0,this._tokens=[],this._errors=[],this}scan(){for(;!this._isAtEnd();)switch(this._start=this._current,this._advance()){case 40:this._addToken(0);break;case 41:this._addToken(1);break;case 33:if(this._match(61)){const g=this._match(61);this._tokens.push({type:4,offset:this._start,isTripleEq:g})}else this._addToken(2);break;case 39:this._quotedString();break;case 47:this._regex();break;case 61:if(this._match(61)){const g=this._match(61);this._tokens.push({type:3,offset:this._start,isTripleEq:g})}else this._match(126)?this._addToken(9):this._error(O("==","=~"));break;case 60:this._addToken(this._match(61)?6:5);break;case 62:this._addToken(this._match(61)?8:7);break;case 38:this._match(38)?this._addToken(15):this._error(O("&&"));break;case 124:this._match(124)?this._addToken(16):this._error(O("||"));break;case 32:case 13:case 9:case 10:case 160:break;default:this._string()}return this._start=this._current,this._addToken(20),Array.from(this._tokens)}_match(m){return this._isAtEnd()||this._input.charCodeAt(this._current)!==m?!1:(this._current++,!0)}_advance(){return this._input.charCodeAt(this._current++)}_peek(){return this._isAtEnd()?0:this._input.charCodeAt(this._current)}_addToken(m){this._tokens.push({type:m,offset:this._start})}_error(m){const g=this._start,w=this._input.substring(this._start,this._current),u={type:19,offset:this._start,lexeme:w};this._errors.push({offset:g,lexeme:w,additionalInfo:m}),this._tokens.push(u)}_string(){this.stringRe.lastIndex=this._start;const m=this.stringRe.exec(this._input);if(m){this._current=this._start+m[0].length;const g=this._input.substring(this._start,this._current),w=h._keywords.get(g);w?this._addToken(w):this._tokens.push({type:17,lexeme:g,offset:this._start})}}_quotedString(){for(;this._peek()!==39&&!this._isAtEnd();)this._advance();if(this._isAtEnd()){this._error(D);return}this._advance(),this._tokens.push({type:18,lexeme:this._input.substring(this._start+1,this._current-1),offset:this._start+1})}_regex(){let m=this._current,g=!1,w=!1;for(;;){if(m>=this._input.length){this._current=m,this._error(P);return}const y=this._input.charCodeAt(m);if(g)g=!1;else if(y===47&&!w){m++;break}else y===91?w=!0:y===92?g=!0:y===93&&(w=!1);m++}for(;m<this._input.length&&h._regexFlags.has(this._input.charCodeAt(m));)m++;this._current=m;const u=this._input.substring(this._start,this._current);this._tokens.push({type:10,lexeme:u,offset:this._start})}_isAtEnd(){return this._current>=this._input.length}}e.Scanner=h}),define(Z[198],ee([0,1,3,2]),function(H,e,b,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionHostDebugChannelClient=e.ExtensionHostDebugBroadcastChannel=void 0;class n{constructor(){this._onCloseEmitter=new b.Emitter,this._onReloadEmitter=new b.Emitter,this._onTerminateEmitter=new b.Emitter,this._onAttachEmitter=new b.Emitter}static{this.ChannelName="extensionhostdebugservice"}call(P,h,d){switch(h){case"close":return Promise.resolve(this._onCloseEmitter.fire({sessionId:d[0]}));case"reload":return Promise.resolve(this._onReloadEmitter.fire({sessionId:d[0]}));case"terminate":return Promise.resolve(this._onTerminateEmitter.fire({sessionId:d[0]}));case"attach":return Promise.resolve(this._onAttachEmitter.fire({sessionId:d[0],port:d[1],subId:d[2]}))}throw new Error("Method not implemented.")}listen(P,h,d){switch(h){case"close":return this._onCloseEmitter.event;case"reload":return this._onReloadEmitter.event;case"terminate":return this._onTerminateEmitter.event;case"attach":return this._onAttachEmitter.event}throw new Error("Method not implemented.")}}e.ExtensionHostDebugBroadcastChannel=n;class O extends A.Disposable{constructor(P){super(),this.channel=P}reload(P){this.channel.call("reload",[P])}get onReload(){return this.channel.listen("reload")}close(P){this.channel.call("close",[P])}get onClose(){return this.channel.listen("close")}attachSession(P,h,d){this.channel.call("attach",[P,h,d])}get onAttachSession(){return this.channel.listen("attach")}terminateSession(P,h){this.channel.call("terminate",[P,h])}get onTerminateSession(){return this.channel.listen("terminate")}openExtensionDevelopmentHostWindow(P,h){return this.channel.call("openExtensionDevelopmentHostWindow",[P,h])}}e.ExtensionHostDebugChannelClient=O}),define(Z[199],ee([0,1,150,55,15,10,36,19,7]),function(H,e,b,A,n,O,D,P,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseDebugParams=e.parseExtensionHostDebugPort=e.AbstractNativeEnvironmentService=e.EXTENSION_IDENTIFIER_WITH_LOG_REGEX=void 0,e.EXTENSION_IDENTIFIER_WITH_LOG_REGEX=/^([^.]+\..+):(.+)$/;class d{get appRoot(){return(0,O.dirname)(n.FileAccess.asFileUri("").fsPath)}get userHome(){return h.URI.file(this.paths.homeDir)}get userDataPath(){return this.paths.userDataDir}get appSettingsHome(){return h.URI.file((0,O.join)(this.userDataPath,"User"))}get tmpDir(){return h.URI.file(this.paths.tmpDir)}get cacheHome(){return h.URI.file(this.userDataPath)}get stateResource(){return(0,P.joinPath)(this.appSettingsHome,"globalStorage","storage.json")}get userRoamingDataHome(){return this.appSettingsHome.with({scheme:n.Schemas.vscodeUserData})}get userDataSyncHome(){return(0,P.joinPath)(this.appSettingsHome,"sync")}get logsHome(){if(!this.args.logsPath){const u=(0,b.toLocalISOString)(new Date).replace(/-|:|\.\d+Z$/g,"");this.args.logsPath=(0,O.join)(this.userDataPath,"logs",u)}return h.URI.file(this.args.logsPath)}get sync(){return this.args.sync}get machineSettingsResource(){return(0,P.joinPath)(h.URI.file((0,O.join)(this.userDataPath,"Machine")),"settings.json")}get workspaceStorageHome(){return(0,P.joinPath)(this.appSettingsHome,"workspaceStorage")}get localHistoryHome(){return(0,P.joinPath)(this.appSettingsHome,"History")}get keyboardLayoutResource(){return(0,P.joinPath)(this.userRoamingDataHome,"keyboardLayout.json")}get argvResource(){const u=D.env.VSCODE_PORTABLE;return u?h.URI.file((0,O.join)(u,"argv.json")):(0,P.joinPath)(this.userHome,this.productService.dataFolderName,"argv.json")}get isExtensionDevelopment(){return!!this.args.extensionDevelopmentPath}get untitledWorkspacesHome(){return h.URI.file((0,O.join)(this.userDataPath,"Workspaces"))}get builtinExtensionsPath(){const u=this.args["builtin-extensions-dir"];return u?(0,O.resolve)(u):(0,O.normalize)((0,O.join)(n.FileAccess.asFileUri("").fsPath,"..","extensions"))}get extensionsDownloadLocation(){const u=this.args["extensions-download-dir"];return u?h.URI.file((0,O.resolve)(u)):h.URI.file((0,O.join)(this.userDataPath,"CachedExtensionVSIXs"))}get extensionsPath(){const u=this.args["extensions-dir"];if(u)return(0,O.resolve)(u);const y=D.env.ADS_EXTENSIONS||D.env.VSCODE_EXTENSIONS;if(y)return y;const E=D.env.VSCODE_PORTABLE;return E?(0,O.join)(E,"extensions"):(0,P.joinPath)(this.userHome,this.productService.dataFolderName,"extensions").fsPath}get extensionDevelopmentLocationURI(){const u=this.args.extensionDevelopmentPath;if(Array.isArray(u))return u.map(y=>/^[^:/?#]+?:\/\//.test(y)?h.URI.parse(y):h.URI.file((0,O.normalize)(y)))}get extensionDevelopmentKind(){return this.args.extensionDevelopmentKind?.map(u=>u==="ui"||u==="workspace"||u==="web"?u:"workspace")}get extensionTestsLocationURI(){const u=this.args.extensionTestsPath;if(u)return/^[^:/?#]+?:\/\//.test(u)?h.URI.parse(u):h.URI.file((0,O.normalize)(u))}get disableExtensions(){if(this.args["disable-extensions"])return!0;const u=this.args["disable-extension"];if(u){if(typeof u=="string")return[u];if(Array.isArray(u)&&u.length>0)return u}return!1}get debugExtensionHost(){return m(this.args,this.isBuilt)}get debugRenderer(){return!!this.args.debugRenderer}get isBuilt(){return!D.env.VSCODE_DEV}get verbose(){return!!this.args.verbose}get logLevel(){return this.args.log?.find(u=>!e.EXTENSION_IDENTIFIER_WITH_LOG_REGEX.test(u))}get extensionLogLevel(){const u=[];for(const y of this.args.log||[]){const E=e.EXTENSION_IDENTIFIER_WITH_LOG_REGEX.exec(y);E&&E[1]&&E[2]&&u.push([E[1],E[2]])}return u.length?u:void 0}get serviceMachineIdResource(){return(0,P.joinPath)(h.URI.file(this.userDataPath),"machineid")}get crashReporterId(){return this.args["crash-reporter-id"]}get crashReporterDirectory(){return this.args["crash-reporter-directory"]}get disableTelemetry(){return!!this.args["disable-telemetry"]}get disableWorkspaceTrust(){return!!this.args["disable-workspace-trust"]}get disableKeytar(){return!!this.args["disable-keytar"]}get policyFile(){if(this.args["__enable-file-policy"]){const u=D.env.VSCODE_PORTABLE;return u?h.URI.file((0,O.join)(u,"policy.json")):(0,P.joinPath)(this.userHome,this.productService.dataFolderName,"policy.json")}}get continueOn(){return this.args.continueOn}set continueOn(u){this.args.continueOn=u}get args(){return this._args}constructor(u,y,E){this._args=u,this.paths=y,this.productService=E,this.editSessionId=this.args.editSessionId}}e.AbstractNativeEnvironmentService=d,be([A.memoize],d.prototype,"appRoot",null),be([A.memoize],d.prototype,"userHome",null),be([A.memoize],d.prototype,"userDataPath",null),be([A.memoize],d.prototype,"appSettingsHome",null),be([A.memoize],d.prototype,"tmpDir",null),be([A.memoize],d.prototype,"cacheHome",null),be([A.memoize],d.prototype,"stateResource",null),be([A.memoize],d.prototype,"userRoamingDataHome",null),be([A.memoize],d.prototype,"userDataSyncHome",null),be([A.memoize],d.prototype,"sync",null),be([A.memoize],d.prototype,"machineSettingsResource",null),be([A.memoize],d.prototype,"workspaceStorageHome",null),be([A.memoize],d.prototype,"localHistoryHome",null),be([A.memoize],d.prototype,"keyboardLayoutResource",null),be([A.memoize],d.prototype,"argvResource",null),be([A.memoize],d.prototype,"isExtensionDevelopment",null),be([A.memoize],d.prototype,"untitledWorkspacesHome",null),be([A.memoize],d.prototype,"builtinExtensionsPath",null),be([A.memoize],d.prototype,"extensionsPath",null),be([A.memoize],d.prototype,"extensionDevelopmentLocationURI",null),be([A.memoize],d.prototype,"extensionDevelopmentKind",null),be([A.memoize],d.prototype,"extensionTestsLocationURI",null),be([A.memoize],d.prototype,"debugExtensionHost",null),be([A.memoize],d.prototype,"logLevel",null),be([A.memoize],d.prototype,"extensionLogLevel",null),be([A.memoize],d.prototype,"serviceMachineIdResource",null),be([A.memoize],d.prototype,"disableTelemetry",null),be([A.memoize],d.prototype,"disableWorkspaceTrust",null),be([A.memoize],d.prototype,"disableKeytar",null),be([A.memoize],d.prototype,"policyFile",null);function m(w,u){return g(w["inspect-extensions"],w["inspect-brk-extensions"],5870,u,w.debugId,w.extensionEnvironment)}e.parseExtensionHostDebugPort=m;function g(w,u,y,E,l,v){const f=Number(u||w)||(E?null:y),I=f?!!u:!1;let S;if(v)try{S=JSON.parse(v)}catch{}return{port:f,break:I,debugId:l,env:S}}e.parseDebugParams=g}),define(Z[114],ee([0,1,310,4,168]),function(H,e,b,A,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.buildVersionMessage=e.buildHelpMessage=e.formatOptions=e.parseArgs=e.OPTIONS=e.NATIVE_CLI_COMMANDS=void 0;const O={o:(0,n.localize)(0,null),e:(0,n.localize)(1,null),t:(0,n.localize)(2,null)};e.NATIVE_CLI_COMMANDS=["tunnel","serve-web"],e.OPTIONS={tunnel:{type:"subcommand",description:"Make the current machine accessible from vscode.dev or other machines through a secure tunnel",options:{"cli-data-dir":{type:"string",args:"dir",description:(0,n.localize)(3,null)},"disable-telemetry":{type:"boolean"},"telemetry-level":{type:"string"},user:{type:"subcommand",options:{login:{type:"subcommand",options:{provider:{type:"string"},"access-token":{type:"string"}}}}}}},"serve-web":{type:"subcommand",description:"Make the current machine accessible from vscode.dev or other machines through a secure tunnel",options:{"cli-data-dir":{type:"string",args:"dir",description:(0,n.localize)(4,null)},"disable-telemetry":{type:"boolean"},"telemetry-level":{type:"string"}}},diff:{type:"boolean",cat:"o",alias:"d",args:["file","file"],description:(0,n.localize)(5,null)},merge:{type:"boolean",cat:"o",alias:"m",args:["path1","path2","base","result"],description:(0,n.localize)(6,null)},add:{type:"boolean",cat:"o",alias:"a",args:"folder",description:(0,n.localize)(7,null)},goto:{type:"boolean",cat:"o",alias:"g",args:"file:line[:character]",description:(0,n.localize)(8,null)},"new-window":{type:"boolean",cat:"o",alias:"n",description:(0,n.localize)(9,null)},"reuse-window":{type:"boolean",cat:"o",alias:"r",description:(0,n.localize)(10,null)},wait:{type:"boolean",cat:"o",alias:"w",description:(0,n.localize)(11,null)},waitMarkerFilePath:{type:"string"},locale:{type:"string",cat:"o",args:"locale",description:(0,n.localize)(12,null)},"user-data-dir":{type:"string",cat:"o",args:"dir",description:(0,n.localize)(13,null)},profile:{type:"string",cat:"o",args:"profileName",description:(0,n.localize)(14,null)},help:{type:"boolean",cat:"o",alias:"h",description:(0,n.localize)(15,null)},"extensions-dir":{type:"string",deprecates:["extensionHomePath"],cat:"e",args:"dir",description:(0,n.localize)(16,null)},"extensions-download-dir":{type:"string"},"builtin-extensions-dir":{type:"string"},"list-extensions":{type:"boolean",cat:"e",description:(0,n.localize)(17,null)},"show-versions":{type:"boolean",cat:"e",description:(0,n.localize)(18,null)},category:{type:"string",allowEmptyValue:!0,cat:"e",description:(0,n.localize)(19,null),args:"category"},"install-extension":{type:"string[]",cat:"e",args:"ext-id | path",description:(0,n.localize)(20,null)},"pre-release":{type:"boolean",cat:"e",description:(0,n.localize)(21,null)},"uninstall-extension":{type:"string[]",cat:"e",args:"ext-id",description:(0,n.localize)(22,null)},"enable-proposed-api":{type:"string[]",allowEmptyValue:!0,cat:"e",args:"ext-id",description:(0,n.localize)(23,null)},version:{type:"boolean",cat:"t",alias:"v",description:(0,n.localize)(24,null)},verbose:{type:"boolean",cat:"t",global:!0,description:(0,n.localize)(25,null)},log:{type:"string[]",cat:"t",args:"level",global:!0,description:(0,n.localize)(26,null)},status:{type:"boolean",alias:"s",cat:"t",description:(0,n.localize)(27,null)},"prof-startup":{type:"boolean",cat:"t",description:(0,n.localize)(28,null)},"prof-append-timers":{type:"string"},"prof-duration-markers":{type:"string[]"},"prof-duration-markers-file":{type:"string"},"no-cached-data":{type:"boolean"},"prof-startup-prefix":{type:"string"},"prof-v8-extensions":{type:"boolean"},"disable-extensions":{type:"boolean",deprecates:["disableExtensions"],cat:"t",description:(0,n.localize)(29,null)},"disable-extension":{type:"string[]",cat:"t",args:"ext-id",description:(0,n.localize)(30,null)},sync:{type:"string",cat:"t",description:(0,n.localize)(31,null),args:["on | off"]},"inspect-extensions":{type:"string",allowEmptyValue:!0,deprecates:["debugPluginHost"],args:"port",cat:"t",description:(0,n.localize)(32,null)},"inspect-brk-extensions":{type:"string",allowEmptyValue:!0,deprecates:["debugBrkPluginHost"],args:"port",cat:"t",description:(0,n.localize)(33,null)},"disable-gpu":{type:"boolean",cat:"t",description:(0,n.localize)(34,null)},"disable-chromium-sandbox":{type:"boolean",cat:"t",description:(0,n.localize)(35,null)},"ms-enable-electron-run-as-node":{type:"boolean",global:!0},telemetry:{type:"boolean",cat:"t",description:(0,n.localize)(36,null)},remote:{type:"string",allowEmptyValue:!0},"folder-uri":{type:"string[]",cat:"o",args:"uri"},"file-uri":{type:"string[]",cat:"o",args:"uri"},"locate-extension":{type:"string[]"},extensionDevelopmentPath:{type:"string[]"},extensionDevelopmentKind:{type:"string[]"},extensionTestsPath:{type:"string"},extensionEnvironment:{type:"string"},debugId:{type:"string"},debugRenderer:{type:"boolean"},"inspect-ptyhost":{type:"string",allowEmptyValue:!0},"inspect-brk-ptyhost":{type:"string",allowEmptyValue:!0},"inspect-search":{type:"string",deprecates:["debugSearch"],allowEmptyValue:!0},"inspect-brk-search":{type:"string",deprecates:["debugBrkSearch"],allowEmptyValue:!0},"inspect-sharedprocess":{type:"string",allowEmptyValue:!0},"inspect-brk-sharedprocess":{type:"string",allowEmptyValue:!0},"export-default-configuration":{type:"string"},"install-source":{type:"string"},"enable-smoke-test-driver":{type:"boolean"},logExtensionHostCommunication:{type:"boolean"},"skip-release-notes":{type:"boolean"},"skip-welcome":{type:"boolean"},"disable-telemetry":{type:"boolean"},"disable-updates":{type:"boolean"},"disable-keytar":{type:"boolean"},"password-store":{type:"string"},"disable-workspace-trust":{type:"boolean"},"disable-crash-reporter":{type:"boolean"},"crash-reporter-directory":{type:"string"},"crash-reporter-id":{type:"string"},"skip-add-to-recently-opened":{type:"boolean"},"unity-launch":{type:"boolean"},"open-url":{type:"boolean"},"file-write":{type:"boolean"},"file-chmod":{type:"boolean"},"install-builtin-extension":{type:"string[]"},force:{type:"boolean"},"do-not-sync":{type:"boolean"},trace:{type:"boolean"},"trace-category-filter":{type:"string"},"trace-options":{type:"string"},"force-user-env":{type:"boolean"},"force-disable-user-env":{type:"boolean"},"open-devtools":{type:"boolean"},"disable-gpu-sandbox":{type:"boolean"},logsPath:{type:"string"},"__enable-file-policy":{type:"boolean"},editSessionId:{type:"string"},continueOn:{type:"string"},"locate-shell-integration-path":{type:"string",args:["bash","pwsh","zsh","fish"]},"enable-coi":{type:"boolean"},aad:{type:"boolean",cat:"o",description:(0,n.localize)(37,null)},applicationName:{type:"string",alias:"A",cat:"o",allowEmptyValue:!0,description:(0,n.localize)(38,null)},authenticationType:{type:"string",alias:"T",cat:"o",allowEmptyValue:!0,deprecates:["aad","integrated"],description:(0,n.localize)(39,null)},command:{type:"string",alias:"c",cat:"o",args:"command-name",allowEmptyValue:!0,description:(0,n.localize)(40,null)},connectionProperties:{type:"string",alias:"Z",cat:"o",allowEmptyValue:!0,description:(0,n.localize)(41,null)},database:{type:"string",alias:"D",cat:"o",args:"database",allowEmptyValue:!0,description:(0,n.localize)(42,null)},integrated:{type:"boolean",alias:"E",cat:"o",description:(0,n.localize)(43,null)},provider:{type:"string",alias:"P",cat:"o",allowEmptyValue:!0,description:(0,n.localize)(44,null)},server:{type:"string",alias:"S",cat:"o",args:"server",allowEmptyValue:!0,description:(0,n.localize)(45,null)},showDashboard:{type:"boolean",cat:"o",description:(0,n.localize)(46,null)},user:{type:"string",alias:"U",cat:"o",args:"user-name",allowEmptyValue:!0,description:(0,n.localize)(47,null)},"no-proxy-server":{type:"boolean"},"no-sandbox":{type:"boolean",alias:"sandbox"},"proxy-server":{type:"string"},"proxy-bypass-list":{type:"string"},"proxy-pac-url":{type:"string"},"js-flags":{type:"string"},inspect:{type:"string",allowEmptyValue:!0},"inspect-brk":{type:"string",allowEmptyValue:!0},nolazy:{type:"boolean"},"force-device-scale-factor":{type:"string"},"force-renderer-accessibility":{type:"boolean"},"ignore-certificate-errors":{type:"boolean"},"allow-insecure-localhost":{type:"boolean"},"log-net-log":{type:"string"},vmodule:{type:"string"},_urls:{type:"string[]"},"disable-dev-shm-usage":{type:"boolean"},"profile-temp":{type:"boolean"},_:{type:"string[]"}};const D={onUnknownOption:()=>{},onMultipleValues:()=>{},onEmptyValue:()=>{},onDeprecatedOption:()=>{}};function P(E,l,v=D){const c=E.find(o=>o.length>0&&o[0]!=="-"),f={},I=["_"],S=[],t={};let a;for(const o in l){const p=l[o];p.type==="subcommand"?o===c&&(a=p):(p.alias&&(f[o]=p.alias),p.type==="string"||p.type==="string[]"?(I.push(o),p.deprecates&&I.push(...p.deprecates)):p.type==="boolean"&&(S.push(o),p.deprecates&&S.push(...p.deprecates)),p.global&&(t[o]=p))}if(a&&c){const o=t;for(const C in a.options)o[C]=a.options[C];const p=E.filter(C=>C!==c),k=v.getSubcommandReporter?v.getSubcommandReporter(c):void 0,M=P(p,o,k);return{[c]:M,_:[]}}const s=b(E,{string:I,boolean:S,alias:f}),i={},r=s;i._=s._.map(o=>String(o)).filter(o=>o.length>0),delete r._;for(const o in l){const p=l[o];if(p.type==="subcommand")continue;p.alias&&delete r[p.alias];let k=r[o];if(p.deprecates)for(const M of p.deprecates)r.hasOwnProperty(M)&&(k||(k=r[M],k&&v.onDeprecatedOption(M,p.deprecationMessage||(0,n.localize)(48,null,o))),delete r[M]);if(typeof k<"u"){if(p.type==="string[]"){if(Array.isArray(k)||(k=[k]),!p.allowEmptyValue){const M=k.filter(C=>C.length>0);M.length!==k.length&&(v.onEmptyValue(o),k=M.length>0?M:void 0)}}else p.type==="string"&&(Array.isArray(k)?(k=k.pop(),v.onMultipleValues(o,k)):!k&&!p.allowEmptyValue&&(v.onEmptyValue(o),k=void 0));i[o]=k,p.deprecationMessage&&v.onDeprecatedOption(o,p.deprecationMessage)}delete r[o]}for(const o in r)v.onUnknownOption(o);return i}e.parseArgs=P;function h(E,l){let v="";return l.args&&(Array.isArray(l.args)?v=` <${l.args.join("> <")}>`:v=` <${l.args}>`),l.alias?`-${l.alias} --${E}${v}`:`--${E}${v}`}function d(E,l){const v=[];for(const c in E){const f=E[c],I=h(c,f);v.push([I,f.description])}return m(v,l)}e.formatOptions=d;function m(E,l){const c=E.reduce((S,t)=>Math.max(S,t[0].length),12)+2+1;if(l-c<25)return E.reduce((S,t)=>S.concat([`  ${t[0]}`,`      ${t[1]}`]),[]);const f=l-c-1,I=[];for(const S of E){const t=S[0],a=w(S[1],f),s=g(c-t.length-2);I.push("  "+t+s+a[0]);for(let i=1;i<a.length;i++)I.push(g(c)+a[i])}return I}function g(E){return" ".repeat(E)}function w(E,l){const v=[];for(;E.length;){const c=E.length<l?E.length:E.lastIndexOf(" ",l),f=E.slice(0,c).trim();E=E.slice(c),v.push(f)}return v}function u(E,l,v,c,f){const I=process.stdout.isTTY&&process.stdout.columns||80,S=f?.noInputFiles!==!0?`[${(0,n.localize)(49,null)}...]`:"",t=[`${E} ${v}`];t.push(""),t.push(`${(0,n.localize)(50,null)}: ${l} [${(0,n.localize)(51,null)}]${S}`),t.push(""),f?.noPipe!==!0&&(A.isWindows?t.push((0,n.localize)(52,null,l)):t.push((0,n.localize)(53,null,l)),t.push(""));const a={},s=[];for(const i in c){const r=c[i];if(r.type==="subcommand")r.description&&s.push({command:i,description:r.description});else if(r.description&&r.cat){let o=a[r.cat];o||(a[r.cat]=o={}),o[i]=r}}for(const i in a){const r=i,o=a[r];o&&(t.push(O[r]),t.push(...d(o,I)),t.push(""))}return s.length&&(t.push((0,n.localize)(54,null)),t.push(...m(s.map(i=>[i.command,i.description]),I)),t.push("")),t.join(`
`)}e.buildHelpMessage=u;function y(E,l){return`${E||(0,n.localize)(55,null)}
${l||(0,n.localize)(56,null)}
${process.arch}`}e.buildVersionMessage=y}),define(Z[200],ee([0,1,88,198,114]),function(H,e,b,A,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElectronExtensionHostDebugBroadcastChannel=void 0;class O extends A.ExtensionHostDebugBroadcastChannel{constructor(P){super(),this.windowsMainService=P}call(P,h,d){return h==="openExtensionDevelopmentHostWindow"?this.openExtensionDevelopmentHostWindow(d[0],d[1]):super.call(P,h,d)}async openExtensionDevelopmentHostWindow(P,h){const d=(0,n.parseArgs)(P,n.OPTIONS);d.debugRenderer=h;const m=d.extensionDevelopmentPath;if(!m)return{success:!1};const[g]=await this.windowsMainService.openExtensionDevelopmentHostWindow(m,{context:5,cli:d,forceProfile:d.profile,forceTempProfile:d["profile-temp"]});if(!h)return{success:!0};const w=g.win;if(!w)return{success:!0};const u=w.webContents.debugger;let y=u.isAttached()?1/0:0;const E=(0,b.createServer)(l=>{y++===0&&u.attach();let v=!1;const c=S=>{v||l.write(JSON.stringify(S)+"\0")},f=(S,t,a,s)=>c({method:t,params:a,sessionId:s});w.on("close",()=>{u.removeListener("message",f),l.end(),v=!0}),u.addListener("message",f);let I=Buffer.alloc(0);l.on("data",S=>{I=Buffer.concat([I,S]);for(let t=I.indexOf(0);t!==-1;t=I.indexOf(0)){let a;try{const s=I.slice(0,t).toString("utf8");I=I.slice(t+1),a=JSON.parse(s)}catch(s){console.error("error reading cdp line",s)}u.sendCommand(a.method,a.params,a.sessionId).then(s=>c({id:a.id,sessionId:a.sessionId,result:s})).catch(s=>c({id:a.id,sessionId:a.sessionId,error:{code:0,message:s.message}}))}}),l.on("error",S=>{console.error("error on cdp pipe:",S)}),l.on("close",()=>{v=!0,--y===0&&u.detach()})});return await new Promise(l=>E.listen(0,l)),w.on("close",()=>E.close()),{rendererDebugPort:E.address().port,success:!0}}}e.ElectronExtensionHostDebugBroadcastChannel=O}),define(Z[63],ee([0,1,311,169,114]),function(H,e,b,A,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isLaunchedFromCli=e.addArg=e.parseCLIProcessArgv=e.parseMainProcessArgv=void 0;function O(g,w){const u=(f,I)=>{console.warn((0,A.localize)(0,null,f,I))},y=f=>{console.warn((0,A.localize)(1,null,f))},E=(f,I)=>{console.warn((0,A.localize)(2,null,f,I))},l=f=>({onUnknownOption:I=>{n.NATIVE_CLI_COMMANDS.includes(f)||console.warn((0,A.localize)(3,null,I,f))},onMultipleValues:u,onEmptyValue:y,onDeprecatedOption:E,getSubcommandReporter:n.NATIVE_CLI_COMMANDS.includes(f)?l:void 0}),v={onUnknownOption:f=>{console.warn((0,A.localize)(4,null,f))},onMultipleValues:u,onEmptyValue:y,onDeprecatedOption:E,getSubcommandReporter:l},c=(0,n.parseArgs)(g,n.OPTIONS,w?v:void 0);return c.goto&&c._.forEach(f=>b(/^(\w:)?[^:]+(:\d*){0,2}:?$/.test(f),(0,A.localize)(5,null))),c}function D(g){const w=g.findIndex(u=>!/^-/.test(u));if(w>-1)return[...g.slice(0,w),...g.slice(w+1)]}function P(g){let[,...w]=g;process.env.VSCODE_DEV&&(w=D(w)||[]);const u=!m(process.env);return O(w,u)}e.parseMainProcessArgv=P;function h(g){let[,,...w]=g;return process.env.VSCODE_DEV&&(w=D(w)||[]),O(w,!0)}e.parseCLIProcessArgv=h;function d(g,...w){const u=g.indexOf("--");return u===-1?g.push(...w):g.splice(u,0,...w),g}e.addArg=d;function m(g){return g.VSCODE_CLI==="1"}e.isLaunchedFromCli=m}),function(){"use strict";function H(e,b,A){function n(D,P){const h=O(D,P),d=[h];return e.isAbsolute(h)||d.unshift(A),e.resolve(...d)}function O(D,P){process.env.VSCODE_DEV&&(P="code-oss-dev");const h=process.env.VSCODE_PORTABLE;if(h)return e.join(h,"user-data");let d=process.env.VSCODE_APPDATA;if(d)return e.join(d,P);const m=D["user-data-dir"];if(m)return m;switch(process.platform){case"win32":if(d=process.env.APPDATA,!d){const g=process.env.USERPROFILE;if(typeof g!="string")throw new Error("Windows: Unexpected undefined %USERPROFILE% environment variable");d=e.join(g,"AppData","Roaming")}break;case"darwin":d=e.join(b.homedir(),"Library","Application Support");break;case"linux":d=process.env.XDG_CONFIG_HOME||e.join(b.homedir(),".config");break;default:throw new Error("Platform not supported")}return e.join(d,"azuredatastudio")}return{getUserDataPath:n}}if(typeof define=="function")define(Z[201],ee([115,27,36]),function(e,b,A){return H(e,b,A.cwd())});else if(typeof module=="object"&&typeof module.exports=="object"){const e=require("path"),b=require("os");module.exports=H(e,b,process.env.VSCODE_CWD||process.cwd())}else throw new Error("Unknown context")}(),define(Z[91],ee([0,1,27,199,201]),function(H,e,b,A,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseSharedProcessDebugPort=e.parsePtyHostDebugPort=e.NativeEnvironmentService=void 0;class O extends A.AbstractNativeEnvironmentService{constructor(d,m){super(d,{homeDir:(0,b.homedir)(),tmpDir:(0,b.tmpdir)(),userDataDir:(0,n.getUserDataPath)(d,m.nameShort)},m)}}e.NativeEnvironmentService=O;function D(h,d){return(0,A.parseDebugParams)(h["inspect-ptyhost"],h["inspect-brk-ptyhost"],5877,d,h.extensionEnvironment)}e.parsePtyHostDebugPort=D;function P(h,d){return(0,A.parseDebugParams)(h["inspect-sharedprocess"],h["inspect-brk-sharedprocess"],5879,d,h.extensionEnvironment)}e.parseSharedProcessDebugPort=P}),define(Z[202],ee([0,1,45,27,32]),function(H,e,b,A,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createWaitMarkerFileSync=void 0;function O(D){const P=(0,n.randomPath)((0,A.tmpdir)());try{return(0,b.writeFileSync)(P,""),D&&console.log(`Marker file for --wait created: ${P}`),P}catch(h){D&&console.error(`Failed to create marker file for --wait: ${h}`);return}}e.createWaitMarkerFileSync=O}),define(Z[203],ee([0,1,12,171]),function(H,e,b,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.localizeManifest=void 0;function n(D,P,h){try{O(D,P,h)}catch(d){console.error(d?.message??d)}return D}e.localizeManifest=n;function O(D,P,h){const d=(m,g,w)=>{const u=m[g];if((0,b.isString)(u)){const y=u,E=y.length;if(E>1&&y[0]==="%"&&y[E-1]==="%"){const l=y.substr(1,E-2);let v=P[l];v===void 0&&h&&(v=h[l]);const c=typeof v=="string"?v:v?.message,f=h?.[l],I=typeof f=="string"?f:f?.message;if(!c){I||console.warn(`[${D.name}]: ${(0,A.localize)(0,null,l)}`);return}if(w&&(g==="title"||g==="category")&&I&&I!==c){const S={value:c,original:I};m[g]=S}else m[g]=c}}else if((0,b.isObject)(u))for(const y in u)u.hasOwnProperty(y)&&(y==="commands"?d(u,y,!0):d(u,y,w));else if(Array.isArray(u))for(let y=0;y<u.length;y++)d(u,y,w)};for(const m in D)D.hasOwnProperty(m)&&d(D,m)}}),define(Z[204],ee([0,1,19,71,173,205,89]),function(H,e,b,A,n,O,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isEngineValid=e.isValidExtensionVersion=e.validateExtensionManifest=e.isValidVersion=e.normalizeVersion=e.parseVersion=e.isValidVersionStr=void 0;const P=/^(\^|>=)?((\d+)|x)\.((\d+)|x)\.((\d+)|x)(\-.*)?$/,h=/^-(\d{4})(\d{2})(\d{2})$/;function d(c){return c=c.trim(),c==="*"||P.test(c)}e.isValidVersionStr=d;function m(c){if(!d(c))return null;if(c=c.trim(),c==="*")return{hasCaret:!1,hasGreaterEquals:!1,majorBase:0,majorMustEqual:!1,minorBase:0,minorMustEqual:!1,patchBase:0,patchMustEqual:!1,preRelease:null};const f=c.match(P);return f?{hasCaret:f[1]==="^",hasGreaterEquals:f[1]===">=",majorBase:f[2]==="x"?0:parseInt(f[2],10),majorMustEqual:f[2]!=="x",minorBase:f[4]==="x"?0:parseInt(f[4],10),minorMustEqual:f[4]!=="x",patchBase:f[6]==="x"?0:parseInt(f[6],10),patchMustEqual:f[6]!=="x",preRelease:f[8]||null}:null}e.parseVersion=m;function g(c){if(!c)return null;const f=c.majorBase,I=c.majorMustEqual,S=c.minorBase;let t=c.minorMustEqual;const a=c.patchBase;let s=c.patchMustEqual;c.hasCaret&&(f===0||(t=!1),s=!1);let i=0;if(c.preRelease){const r=h.exec(c.preRelease);if(r){const[,o,p,k]=r;i=Date.UTC(Number(o),Number(p)-1,Number(k))}}return{majorBase:f,majorMustEqual:I,minorBase:S,minorMustEqual:t,patchBase:a,patchMustEqual:s,isMinimum:c.hasGreaterEquals,notBefore:i}}e.normalizeVersion=g;function w(c,f,I){let S;typeof c=="string"?S=g(m(c)):S=c;let t;f instanceof Date?t=f.getTime():typeof f=="string"&&(t=new Date(f).getTime());let a;if(typeof I=="string"?a=g(m(I)):a=I,!S||!a)return!1;const s=S.majorBase,i=S.minorBase,r=S.patchBase;let o=a.majorBase,p=a.minorBase,k=a.patchBase;const M=a.notBefore;let C=a.majorMustEqual,L=a.minorMustEqual,T=a.patchMustEqual;return a.isMinimum?s>o?!0:s<o?!1:i>p?!0:i<p||t&&t<M?!1:r>=k:(s===1&&o===0&&(!C||!L||!T)&&(o=1,p=0,k=0,C=!0,L=!1,T=!1),s<o?!1:s>o?!C:i<p?!1:i>p?!L:r<k?!1:r>k?!T:!(t&&t<M))}e.isValidVersion=w;function u(c,f,I,S,t,a){const s=[];if(typeof t.publisher<"u"&&typeof t.publisher!="string")return s.push([A.default.Error,n.localize(0,null)]),s;if(typeof t.name!="string")return s.push([A.default.Error,n.localize(1,null,"name")]),s;if(typeof t.version!="string")return s.push([A.default.Error,n.localize(2,null,"version")]),s;if(!t.engines)return s.push([A.default.Error,n.localize(3,null,"engines")]),s;if(typeof t.engines.vscode!="string")return s.push([A.default.Error,n.localize(4,null,"engines.vscode")]),s;if(typeof t.extensionDependencies<"u"&&!v(t.extensionDependencies))return s.push([A.default.Error,n.localize(5,null,"extensionDependencies")]),s;if(typeof t.activationEvents<"u"){if(!v(t.activationEvents))return s.push([A.default.Error,n.localize(6,null,"activationEvents")]),s;if(typeof t.main>"u"&&typeof t.browser>"u")return s.push([A.default.Error,n.localize(7,null,"activationEvents","main","browser")]),s}if(typeof t.extensionKind<"u"&&typeof t.main>"u"&&s.push([A.default.Warning,n.localize(8,null,"extensionKind")]),typeof t.main<"u"){if(typeof t.main!="string")return s.push([A.default.Error,n.localize(9,null,"main")]),s;{const o=(0,b.joinPath)(S,t.main);(0,b.isEqualOrParent)(o,S)||s.push([A.default.Warning,n.localize(10,null,o.path,S.path)])}}if(typeof t.browser<"u"){if(typeof t.browser!="string")return s.push([A.default.Error,n.localize(11,null,"browser")]),s;{const o=(0,b.joinPath)(S,t.browser);(0,b.isEqualOrParent)(o,S)||s.push([A.default.Warning,n.localize(12,null,o.path,S.path)])}}if(!O.valid(t.version))return s.push([A.default.Error,n.localize(13,null)]),s;const i=[];if(!y(c,f,I,t,a,i))for(const o of i)s.push([A.default.Error,o]);return s}e.validateExtensionManifest=u;function y(c,f,I,S,t,a){if(t||typeof S.main>"u"&&typeof S.browser>"u")return!0;const s=S.engines.azdata,i=S.engines.vscode,r=s?s==="*"||l(c,I,s,D.versionSyntax("engines.azdata",s),D.versionMismatch(c,s),a):!0,o=i?i==="*"||l(f,I,i,D.versionSyntax("engines.vscode",i),D.versionMismatchVsCode(c,i,f),a):!0;return r&&o}e.isValidExtensionVersion=y;function E(c,f,I){return c==="*"||l(f,I,c,"","")}e.isEngineValid=E;function l(c,f,I,S,t,a=[]){const s=g(m(I));return s?w(c,f,s)?!0:(a.push(t),!1):(a.push(S),!1)}function v(c){if(!Array.isArray(c))return!1;for(let f=0,I=c.length;f<I;f++)if(typeof c[f]!="string")return!1;return!0}}),define(Z[206],ee([0,1,17,31]),function(H,e,b,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getServiceMachineId=void 0;async function n(O,D,P){let h=P&&P.get("storage.serviceMachineId",-1)||null;if(h)return h;try{const m=(await D.readFile(O.serviceMachineIdResource)).value.toString();h=(0,A.isUUID)(m)?m:null}catch{h=null}if(!h){h=(0,A.generateUuid)();try{await D.writeFile(O.serviceMachineIdResource,b.VSBuffer.fromString(h))}catch{}}return P?.store("storage.serviceMachineId",h,-1,1),h}e.getServiceMachineId=n}),define(Z[76],ee([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SyncDescriptor=void 0;class b{constructor(n,O=[],D=!1){this.ctor=n,this.staticArguments=O,this.supportsDelayedInstantiation=D}}e.SyncDescriptor=b}),define(Z[207],ee([0,1,76]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSingletonServiceDescriptors=e.registerSingleton=e.InstantiationType=void 0;const A=[];var n;(function(P){P[P.Eager=0]="Eager",P[P.Delayed=1]="Delayed"})(n||(e.InstantiationType=n={}));function O(P,h,d){h instanceof b.SyncDescriptor||(h=new b.SyncDescriptor(h,[],!!d)),A.push([P,h])}e.registerSingleton=O;function D(){return A}e.getSingletonServiceDescriptors=D}),define(Z[208],ee([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Graph=e.Node=void 0;class b{constructor(O,D){this.key=O,this.data=D,this.incoming=new Map,this.outgoing=new Map}}e.Node=b;class A{constructor(O){this._hashFn=O,this._nodes=new Map}roots(){const O=[];for(const D of this._nodes.values())D.outgoing.size===0&&O.push(D);return O}insertEdge(O,D){const P=this.lookupOrInsertNode(O),h=this.lookupOrInsertNode(D);P.outgoing.set(h.key,h),h.incoming.set(P.key,P)}removeNode(O){const D=this._hashFn(O);this._nodes.delete(D);for(const P of this._nodes.values())P.outgoing.delete(D),P.incoming.delete(D)}lookupOrInsertNode(O){const D=this._hashFn(O);let P=this._nodes.get(D);return P||(P=new b(D,O),this._nodes.set(D,P)),P}lookup(O){return this._nodes.get(this._hashFn(O))}isEmpty(){return this._nodes.size===0}toString(){const O=[];for(const[D,P]of this._nodes)O.push(`${D}
	(-> incoming)[${[...P.incoming.keys()].join(", ")}]
	(outgoing ->)[${[...P.outgoing.keys()].join(",")}]
`);return O.join(`
`)}findCycleSlow(){for(const[O,D]of this._nodes){const P=new Set([O]),h=this._findCycle(D,P);if(h)return h}}_findCycle(O,D){for(const[P,h]of O.outgoing){if(D.has(P))return[...D,P].join(" -> ");D.add(P);const d=this._findCycle(h,D);if(d)return d;D.delete(P)}}}e.Graph=A}),define(Z[6],ee([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.refineServiceDecorator=e.createDecorator=e.IInstantiationService=e._util=void 0;var b;(function(D){D.serviceIds=new Map,D.DI_TARGET="$di$target",D.DI_DEPENDENCIES="$di$dependencies";function P(h){return h[D.DI_DEPENDENCIES]||[]}D.getServiceDependencies=P})(b||(e._util=b={})),e.IInstantiationService=n("instantiationService");function A(D,P,h){P[b.DI_TARGET]===P?P[b.DI_DEPENDENCIES].push({id:D,index:h}):(P[b.DI_DEPENDENCIES]=[{id:D,index:h}],P[b.DI_TARGET]=P)}function n(D){if(b.serviceIds.has(D))return b.serviceIds.get(D);const P=function(h,d,m){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");A(P,h,m)};return P.toString=()=>D,b.serviceIds.set(D,P),P}e.createDecorator=n;function O(D){return D}e.refineServiceDecorator=O}),define(Z[64],ee([0,1,6]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IBackupMainService=void 0,e.IBackupMainService=(0,b.createDecorator)("backupMainService")}),define(Z[18],ee([0,1,12,7,6]),function(H,e,b,A,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLanguageTagSettingPlainKey=e.merge=e.getConfigurationValue=e.removeFromValueTree=e.addToValueTree=e.toValuesTree=e.isConfigured=e.ConfigurationTargetToString=e.ConfigurationTarget=e.isConfigurationUpdateOverrides=e.isConfigurationOverrides=e.IConfigurationService=void 0,e.IConfigurationService=(0,n.createDecorator)("configurationService");function O(v){return v&&typeof v=="object"&&(!v.overrideIdentifier||typeof v.overrideIdentifier=="string")&&(!v.resource||v.resource instanceof A.URI)}e.isConfigurationOverrides=O;function D(v){return v&&typeof v=="object"&&(!v.overrideIdentifiers||Array.isArray(v.overrideIdentifiers))&&!v.overrideIdentifier&&(!v.resource||v.resource instanceof A.URI)}e.isConfigurationUpdateOverrides=D;var P;(function(v){v[v.APPLICATION=1]="APPLICATION",v[v.USER=2]="USER",v[v.USER_LOCAL=3]="USER_LOCAL",v[v.USER_REMOTE=4]="USER_REMOTE",v[v.WORKSPACE=5]="WORKSPACE",v[v.WORKSPACE_FOLDER=6]="WORKSPACE_FOLDER",v[v.DEFAULT=7]="DEFAULT",v[v.MEMORY=8]="MEMORY"})(P||(e.ConfigurationTarget=P={}));function h(v){switch(v){case 1:return"APPLICATION";case 2:return"USER";case 3:return"USER_LOCAL";case 4:return"USER_REMOTE";case 5:return"WORKSPACE";case 6:return"WORKSPACE_FOLDER";case 7:return"DEFAULT";case 8:return"MEMORY"}}e.ConfigurationTargetToString=h;function d(v){return v.applicationValue!==void 0||v.userValue!==void 0||v.userLocalValue!==void 0||v.userRemoteValue!==void 0||v.workspaceValue!==void 0||v.workspaceFolderValue!==void 0}e.isConfigured=d;function m(v,c){const f=Object.create(null);for(const I in v)g(f,I,v[I],c);return f}e.toValuesTree=m;function g(v,c,f,I){const S=c.split("."),t=S.pop();let a=v;for(let s=0;s<S.length;s++){const i=S[s];let r=a[i];switch(typeof r){case"undefined":r=a[i]=Object.create(null);break;case"object":break;default:I(`Ignoring ${c} as ${S.slice(0,s+1).join(".")} is ${JSON.stringify(r)}`);return}a=r}if(typeof a=="object"&&a!==null)try{a[t]=f}catch{I(`Ignoring ${c} as ${S.join(".")} is ${JSON.stringify(a)}`)}else I(`Ignoring ${c} as ${S.join(".")} is ${JSON.stringify(a)}`)}e.addToValueTree=g;function w(v,c){const f=c.split(".");u(v,f)}e.removeFromValueTree=w;function u(v,c){const f=c.shift();if(c.length===0){delete v[f];return}if(Object.keys(v).indexOf(f)!==-1){const I=v[f];typeof I=="object"&&!Array.isArray(I)&&(u(I,c),Object.keys(I).length===0&&delete v[f])}}function y(v,c,f){function I(a,s){let i=a;for(const r of s){if(typeof i!="object"||i===null)return;i=i[r]}return i}const S=c.split("."),t=I(v,S);return typeof t>"u"?f:t}e.getConfigurationValue=y;function E(v,c,f){Object.keys(c).forEach(I=>{I!=="__proto__"&&(I in v?b.isObject(v[I])&&b.isObject(c[I])?E(v[I],c[I],f):f&&(v[I]=c[I]):v[I]=c[I])})}e.merge=E;function l(v){return v.replace(/[\[\]]/g,"")}e.getLanguageTagSettingPlainKey=l}),define(Z[116],ee([0,1,4,26,197,6,164,13]),function(H,e,b,A,n,O,D,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.implies=e.IContextKeyService=e.RawContextKey=e.ContextKeyOrExpr=e.ContextKeyAndExpr=e.ContextKeyNotRegexExpr=e.ContextKeyRegexExpr=e.ContextKeySmallerEqualsExpr=e.ContextKeySmallerExpr=e.ContextKeyGreaterEqualsExpr=e.ContextKeyGreaterExpr=e.ContextKeyNotExpr=e.ContextKeyNotEqualsExpr=e.ContextKeyNotInExpr=e.ContextKeyInExpr=e.ContextKeyEqualsExpr=e.ContextKeyDefinedExpr=e.ContextKeyTrueExpr=e.ContextKeyFalseExpr=e.expressionsAreEqualWithConstantSubstitution=e.validateWhenClauses=e.ContextKeyExpr=e.Parser=e.ContextKeyExprType=e.setConstant=void 0;const h=new Map;h.set("false",!1),h.set("true",!0),h.set("isMac",b.isMacintosh),h.set("isLinux",b.isLinux),h.set("isWindows",b.isWindows),h.set("isWeb",b.isWeb),h.set("isMacNative",b.isMacintosh&&!b.isWeb),h.set("isEdge",b.isEdge),h.set("isFirefox",b.isFirefox),h.set("isChrome",b.isChrome),h.set("isSafari",b.isSafari);function d(x,R){if(h.get(x)!==void 0)throw(0,P.illegalArgument)("contextkey.setConstant(k, v) invoked with already set constant `k`");h.set(x,R)}e.setConstant=d;const m=Object.prototype.hasOwnProperty;var g;(function(x){x[x.False=0]="False",x[x.True=1]="True",x[x.Defined=2]="Defined",x[x.Not=3]="Not",x[x.Equals=4]="Equals",x[x.NotEquals=5]="NotEquals",x[x.And=6]="And",x[x.Regex=7]="Regex",x[x.NotRegex=8]="NotRegex",x[x.Or=9]="Or",x[x.In=10]="In",x[x.NotIn=11]="NotIn",x[x.Greater=12]="Greater",x[x.GreaterEquals=13]="GreaterEquals",x[x.Smaller=14]="Smaller",x[x.SmallerEquals=15]="SmallerEquals"})(g||(e.ContextKeyExprType=g={}));const w={regexParsingWithErrorRecovery:!0},u=(0,D.localize)(0,null),y=(0,D.localize)(1,null),E=(0,D.localize)(2,null),l=(0,D.localize)(3,null),v=(0,D.localize)(4,null),c=(0,D.localize)(5,null),f=(0,D.localize)(6,null),I=(0,D.localize)(7,null);class S{static{this._parseError=new Error}get lexingErrors(){return this._scanner.errors}get parsingErrors(){return this._parsingErrors}constructor(R=w){this._config=R,this._scanner=new n.Scanner,this._tokens=[],this._current=0,this._parsingErrors=[],this._flagsGYRe=/g|y/g}parse(R){if(R===""){this._parsingErrors.push({message:u,offset:0,lexeme:"",additionalInfo:y});return}this._tokens=this._scanner.reset(R).scan(),this._current=0,this._parsingErrors=[];try{const _=this._expr();if(!this._isAtEnd()){const N=this._peek(),q=N.type===17?c:void 0;throw this._parsingErrors.push({message:v,offset:N.offset,lexeme:n.Scanner.getLexeme(N),additionalInfo:q}),S._parseError}return _}catch(_){if(_!==S._parseError)throw _;return}}_expr(){return this._or()}_or(){const R=[this._and()];for(;this._matchOne(16);){const _=this._and();R.push(_)}return R.length===1?R[0]:t.or(...R)}_and(){const R=[this._term()];for(;this._matchOne(15);){const _=this._term();R.push(_)}return R.length===1?R[0]:t.and(...R)}_term(){if(this._matchOne(2)){const R=this._peek();switch(R.type){case 11:return this._advance(),r.INSTANCE;case 12:return this._advance(),o.INSTANCE;case 0:{this._advance();const _=this._expr();return this._consume(1,l),_?.negate()}case 17:return this._advance(),T.create(R.lexeme);default:throw this._errExpectedButGot("KEY | true | false | '(' expression ')'",R)}}return this._primary()}_primary(){const R=this._peek();switch(R.type){case 11:return this._advance(),t.true();case 12:return this._advance(),t.false();case 0:{this._advance();const _=this._expr();return this._consume(1,l),_}case 17:{const _=R.lexeme;if(this._advance(),this._matchOne(9)){const q=this._peek();if(!this._config.regexParsingWithErrorRecovery){if(this._advance(),q.type!==10)throw this._errExpectedButGot("REGEX",q);const re=q.lexeme,ie=re.lastIndexOf("/"),le=ie===re.length-1?void 0:this._removeFlagsGY(re.substring(ie+1));let V;try{V=new RegExp(re.substring(1,ie),le)}catch{throw this._errExpectedButGot("REGEX",q)}return ae.create(_,V)}switch(q.type){case 10:case 19:{const re=[q.lexeme];this._advance();let ie=this._peek(),le=0;for(let pe=0;pe<q.lexeme.length;pe++)q.lexeme.charCodeAt(pe)===40?le++:q.lexeme.charCodeAt(pe)===41&&le--;for(;!this._isAtEnd()&&ie.type!==15&&ie.type!==16;){switch(ie.type){case 0:le++;break;case 1:le--;break;case 10:case 18:for(let pe=0;pe<ie.lexeme.length;pe++)ie.lexeme.charCodeAt(pe)===40?le++:q.lexeme.charCodeAt(pe)===41&&le--}if(le<0)break;re.push(n.Scanner.getLexeme(ie)),this._advance(),ie=this._peek()}const V=re.join(""),te=V.lastIndexOf("/"),Q=te===V.length-1?void 0:this._removeFlagsGY(V.substring(te+1));let fe;try{fe=new RegExp(V.substring(1,te),Q)}catch{throw this._errExpectedButGot("REGEX",q)}return t.regex(_,fe)}case 18:{const re=q.lexeme;this._advance();let ie=null;if(!(0,A.isFalsyOrWhitespace)(re)){const le=re.indexOf("/"),V=re.lastIndexOf("/");if(le!==V&&le>=0){const te=re.slice(le+1,V),Q=re[V+1]==="i"?"i":"";try{ie=new RegExp(te,Q)}catch{throw this._errExpectedButGot("REGEX",q)}}}if(ie===null)throw this._errExpectedButGot("REGEX",q);return ae.create(_,ie)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,E);const q=this._value();return t.notIn(_,q)}switch(this._peek().type){case 3:{this._advance();const q=this._value();if(this._previous().type===18)return t.equals(_,q);switch(q){case"true":return t.has(_);case"false":return t.not(_);default:return t.equals(_,q)}}case 4:{this._advance();const q=this._value();if(this._previous().type===18)return t.notEquals(_,q);switch(q){case"true":return t.not(_);case"false":return t.has(_);default:return t.notEquals(_,q)}}case 5:return this._advance(),ne.create(_,this._value());case 6:return this._advance(),de.create(_,this._value());case 7:return this._advance(),z.create(_,this._value());case 8:return this._advance(),oe.create(_,this._value());case 13:return this._advance(),t.in(_,this._value());default:return t.has(_)}}case 20:throw this._parsingErrors.push({message:f,offset:R.offset,lexeme:"",additionalInfo:I}),S._parseError;default:throw this._errExpectedButGot(`true | false | KEY 
	| KEY '=~' REGEX 
	| KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value`,this._peek())}}_value(){const R=this._peek();switch(R.type){case 17:case 18:return this._advance(),R.lexeme;case 11:return this._advance(),"true";case 12:return this._advance(),"false";case 13:return this._advance(),"in";default:return""}}_removeFlagsGY(R){return R.replaceAll(this._flagsGYRe,"")}_previous(){return this._tokens[this._current-1]}_matchOne(R){return this._check(R)?(this._advance(),!0):!1}_advance(){return this._isAtEnd()||this._current++,this._previous()}_consume(R,_){if(this._check(R))return this._advance();throw this._errExpectedButGot(_,this._peek())}_errExpectedButGot(R,_,N){const q=(0,D.localize)(8,null,R,n.Scanner.getLexeme(_)),re=_.offset,ie=n.Scanner.getLexeme(_);return this._parsingErrors.push({message:q,offset:re,lexeme:ie,additionalInfo:N}),S._parseError}_check(R){return this._peek().type===R}_peek(){return this._tokens[this._current]}_isAtEnd(){return this._peek().type===20}}e.Parser=S;class t{static false(){return r.INSTANCE}static true(){return o.INSTANCE}static has(R){return p.create(R)}static equals(R,_){return k.create(R,_)}static notEquals(R,_){return L.create(R,_)}static regex(R,_){return ae.create(R,_)}static in(R,_){return M.create(R,_)}static notIn(R,_){return C.create(R,_)}static not(R){return T.create(R)}static and(...R){return G.create(R,null,!0)}static or(...R){return B.create(R,null,!0)}static greater(R,_){return z.create(R,_)}static greaterEquals(R,_){return oe.create(R,_)}static smaller(R,_){return ne.create(R,_)}static smallerEquals(R,_){return de.create(R,_)}static{this._parser=new S({regexParsingWithErrorRecovery:!1})}static deserialize(R){return R==null?void 0:this._parser.parse(R)}}e.ContextKeyExpr=t;function a(x){const R=new S({regexParsingWithErrorRecovery:!1});return x.map(_=>(R.parse(_),R.lexingErrors.length>0?R.lexingErrors.map(N=>({errorMessage:N.additionalInfo?(0,D.localize)(9,null,N.additionalInfo):(0,D.localize)(10,null),offset:N.offset,length:N.lexeme.length})):R.parsingErrors.length>0?R.parsingErrors.map(N=>({errorMessage:N.additionalInfo?`${N.message}. ${N.additionalInfo}`:N.message,offset:N.offset,length:N.lexeme.length})):[]))}e.validateWhenClauses=a;function s(x,R){const _=x?x.substituteConstants():void 0,N=R?R.substituteConstants():void 0;return!_&&!N?!0:!_||!N?!1:_.equals(N)}e.expressionsAreEqualWithConstantSubstitution=s;function i(x,R){return x.cmp(R)}class r{static{this.INSTANCE=new r}constructor(){this.type=0}cmp(R){return this.type-R.type}equals(R){return R.type===this.type}substituteConstants(){return this}evaluate(R){return!1}serialize(){return"false"}keys(){return[]}map(R){return this}negate(){return o.INSTANCE}}e.ContextKeyFalseExpr=r;class o{static{this.INSTANCE=new o}constructor(){this.type=1}cmp(R){return this.type-R.type}equals(R){return R.type===this.type}substituteConstants(){return this}evaluate(R){return!0}serialize(){return"true"}keys(){return[]}map(R){return this}negate(){return r.INSTANCE}}e.ContextKeyTrueExpr=o;class p{static create(R,_=null){const N=h.get(R);return typeof N=="boolean"?N?o.INSTANCE:r.INSTANCE:new p(R,_)}constructor(R,_){this.key=R,this.negated=_,this.type=2}cmp(R){return R.type!==this.type?this.type-R.type:U(this.key,R.key)}equals(R){return R.type===this.type?this.key===R.key:!1}substituteConstants(){const R=h.get(this.key);return typeof R=="boolean"?R?o.INSTANCE:r.INSTANCE:this}evaluate(R){return!!R.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}map(R){return R.mapDefined(this.key)}negate(){return this.negated||(this.negated=T.create(this.key,this)),this.negated}}e.ContextKeyDefinedExpr=p;class k{static create(R,_,N=null){if(typeof _=="boolean")return _?p.create(R,N):T.create(R,N);const q=h.get(R);return typeof q=="boolean"?_===(q?"true":"false")?o.INSTANCE:r.INSTANCE:new k(R,_,N)}constructor(R,_,N){this.key=R,this.value=_,this.negated=N,this.type=4}cmp(R){return R.type!==this.type?this.type-R.type:$(this.key,this.value,R.key,R.value)}equals(R){return R.type===this.type?this.key===R.key&&this.value===R.value:!1}substituteConstants(){const R=h.get(this.key);if(typeof R=="boolean"){const _=R?"true":"false";return this.value===_?o.INSTANCE:r.INSTANCE}return this}evaluate(R){return R.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}map(R){return R.mapEquals(this.key,this.value)}negate(){return this.negated||(this.negated=L.create(this.key,this.value,this)),this.negated}}e.ContextKeyEqualsExpr=k;class M{static create(R,_){return new M(R,_)}constructor(R,_){this.key=R,this.valueKey=_,this.type=10,this.negated=null}cmp(R){return R.type!==this.type?this.type-R.type:$(this.key,this.valueKey,R.key,R.valueKey)}equals(R){return R.type===this.type?this.key===R.key&&this.valueKey===R.valueKey:!1}substituteConstants(){return this}evaluate(R){const _=R.getValue(this.valueKey),N=R.getValue(this.key);return Array.isArray(_)?_.includes(N):typeof N=="string"&&typeof _=="object"&&_!==null?m.call(_,N):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}map(R){return R.mapIn(this.key,this.valueKey)}negate(){return this.negated||(this.negated=C.create(this.key,this.valueKey)),this.negated}}e.ContextKeyInExpr=M;class C{static create(R,_){return new C(R,_)}constructor(R,_){this.key=R,this.valueKey=_,this.type=11,this._negated=M.create(R,_)}cmp(R){return R.type!==this.type?this.type-R.type:this._negated.cmp(R._negated)}equals(R){return R.type===this.type?this._negated.equals(R._negated):!1}substituteConstants(){return this}evaluate(R){return!this._negated.evaluate(R)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}map(R){return R.mapNotIn(this.key,this.valueKey)}negate(){return this._negated}}e.ContextKeyNotInExpr=C;class L{static create(R,_,N=null){if(typeof _=="boolean")return _?T.create(R,N):p.create(R,N);const q=h.get(R);return typeof q=="boolean"?_===(q?"true":"false")?r.INSTANCE:o.INSTANCE:new L(R,_,N)}constructor(R,_,N){this.key=R,this.value=_,this.negated=N,this.type=5}cmp(R){return R.type!==this.type?this.type-R.type:$(this.key,this.value,R.key,R.value)}equals(R){return R.type===this.type?this.key===R.key&&this.value===R.value:!1}substituteConstants(){const R=h.get(this.key);if(typeof R=="boolean"){const _=R?"true":"false";return this.value===_?r.INSTANCE:o.INSTANCE}return this}evaluate(R){return R.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}map(R){return R.mapNotEquals(this.key,this.value)}negate(){return this.negated||(this.negated=k.create(this.key,this.value,this)),this.negated}}e.ContextKeyNotEqualsExpr=L;class T{static create(R,_=null){const N=h.get(R);return typeof N=="boolean"?N?r.INSTANCE:o.INSTANCE:new T(R,_)}constructor(R,_){this.key=R,this.negated=_,this.type=3}cmp(R){return R.type!==this.type?this.type-R.type:U(this.key,R.key)}equals(R){return R.type===this.type?this.key===R.key:!1}substituteConstants(){const R=h.get(this.key);return typeof R=="boolean"?R?r.INSTANCE:o.INSTANCE:this}evaluate(R){return!R.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}map(R){return R.mapNot(this.key)}negate(){return this.negated||(this.negated=p.create(this.key,this)),this.negated}}e.ContextKeyNotExpr=T;function F(x,R){if(typeof x=="string"){const _=parseFloat(x);isNaN(_)||(x=_)}return typeof x=="string"||typeof x=="number"?R(x):r.INSTANCE}class z{static create(R,_,N=null){return F(_,q=>new z(R,q,N))}constructor(R,_,N){this.key=R,this.value=_,this.negated=N,this.type=12}cmp(R){return R.type!==this.type?this.type-R.type:$(this.key,this.value,R.key,R.value)}equals(R){return R.type===this.type?this.key===R.key&&this.value===R.value:!1}substituteConstants(){return this}evaluate(R){return typeof this.value=="string"?!1:parseFloat(R.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}map(R){return R.mapGreater(this.key,this.value)}negate(){return this.negated||(this.negated=de.create(this.key,this.value,this)),this.negated}}e.ContextKeyGreaterExpr=z;class oe{static create(R,_,N=null){return F(_,q=>new oe(R,q,N))}constructor(R,_,N){this.key=R,this.value=_,this.negated=N,this.type=13}cmp(R){return R.type!==this.type?this.type-R.type:$(this.key,this.value,R.key,R.value)}equals(R){return R.type===this.type?this.key===R.key&&this.value===R.value:!1}substituteConstants(){return this}evaluate(R){return typeof this.value=="string"?!1:parseFloat(R.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}map(R){return R.mapGreaterEquals(this.key,this.value)}negate(){return this.negated||(this.negated=ne.create(this.key,this.value,this)),this.negated}}e.ContextKeyGreaterEqualsExpr=oe;class ne{static create(R,_,N=null){return F(_,q=>new ne(R,q,N))}constructor(R,_,N){this.key=R,this.value=_,this.negated=N,this.type=14}cmp(R){return R.type!==this.type?this.type-R.type:$(this.key,this.value,R.key,R.value)}equals(R){return R.type===this.type?this.key===R.key&&this.value===R.value:!1}substituteConstants(){return this}evaluate(R){return typeof this.value=="string"?!1:parseFloat(R.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}map(R){return R.mapSmaller(this.key,this.value)}negate(){return this.negated||(this.negated=oe.create(this.key,this.value,this)),this.negated}}e.ContextKeySmallerExpr=ne;class de{static create(R,_,N=null){return F(_,q=>new de(R,q,N))}constructor(R,_,N){this.key=R,this.value=_,this.negated=N,this.type=15}cmp(R){return R.type!==this.type?this.type-R.type:$(this.key,this.value,R.key,R.value)}equals(R){return R.type===this.type?this.key===R.key&&this.value===R.value:!1}substituteConstants(){return this}evaluate(R){return typeof this.value=="string"?!1:parseFloat(R.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}map(R){return R.mapSmallerEquals(this.key,this.value)}negate(){return this.negated||(this.negated=z.create(this.key,this.value,this)),this.negated}}e.ContextKeySmallerEqualsExpr=de;class ae{static create(R,_){return new ae(R,_)}constructor(R,_){this.key=R,this.regexp=_,this.type=7,this.negated=null}cmp(R){if(R.type!==this.type)return this.type-R.type;if(this.key<R.key)return-1;if(this.key>R.key)return 1;const _=this.regexp?this.regexp.source:"",N=R.regexp?R.regexp.source:"";return _<N?-1:_>N?1:0}equals(R){if(R.type===this.type){const _=this.regexp?this.regexp.source:"",N=R.regexp?R.regexp.source:"";return this.key===R.key&&_===N}return!1}substituteConstants(){return this}evaluate(R){const _=R.getValue(this.key);return this.regexp?this.regexp.test(_):!1}serialize(){const R=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${R}`}keys(){return[this.key]}map(R){return R.mapRegex(this.key,this.regexp)}negate(){return this.negated||(this.negated=ue.create(this)),this.negated}}e.ContextKeyRegexExpr=ae;class ue{static create(R){return new ue(R)}constructor(R){this._actual=R,this.type=8}cmp(R){return R.type!==this.type?this.type-R.type:this._actual.cmp(R._actual)}equals(R){return R.type===this.type?this._actual.equals(R._actual):!1}substituteConstants(){return this}evaluate(R){return!this._actual.evaluate(R)}serialize(){return`!(${this._actual.serialize()})`}keys(){return this._actual.keys()}map(R){return new ue(this._actual.map(R))}negate(){return this._actual}}e.ContextKeyNotRegexExpr=ue;function j(x){let R=null;for(let _=0,N=x.length;_<N;_++){const q=x[_].substituteConstants();if(x[_]!==q&&R===null){R=[];for(let re=0;re<_;re++)R[re]=x[re]}R!==null&&(R[_]=q)}return R===null?x:R}class G{static create(R,_,N){return G._normalizeArr(R,_,N)}constructor(R,_){this.expr=R,this.negated=_,this.type=6}cmp(R){if(R.type!==this.type)return this.type-R.type;if(this.expr.length<R.expr.length)return-1;if(this.expr.length>R.expr.length)return 1;for(let _=0,N=this.expr.length;_<N;_++){const q=i(this.expr[_],R.expr[_]);if(q!==0)return q}return 0}equals(R){if(R.type===this.type){if(this.expr.length!==R.expr.length)return!1;for(let _=0,N=this.expr.length;_<N;_++)if(!this.expr[_].equals(R.expr[_]))return!1;return!0}return!1}substituteConstants(){const R=j(this.expr);return R===this.expr?this:G.create(R,this.negated,!1)}evaluate(R){for(let _=0,N=this.expr.length;_<N;_++)if(!this.expr[_].evaluate(R))return!1;return!0}static _normalizeArr(R,_,N){const q=[];let re=!1;for(const ie of R)if(ie){if(ie.type===1){re=!0;continue}if(ie.type===0)return r.INSTANCE;if(ie.type===6){q.push(...ie.expr);continue}q.push(ie)}if(q.length===0&&re)return o.INSTANCE;if(q.length!==0){if(q.length===1)return q[0];q.sort(i);for(let ie=1;ie<q.length;ie++)q[ie-1].equals(q[ie])&&(q.splice(ie,1),ie--);if(q.length===1)return q[0];for(;q.length>1;){const ie=q[q.length-1];if(ie.type!==9)break;q.pop();const le=q.pop(),V=q.length===0,te=B.create(ie.expr.map(Q=>G.create([Q,le],null,N)),null,V);te&&(q.push(te),q.sort(i))}if(q.length===1)return q[0];if(N){for(let ie=0;ie<q.length;ie++)for(let le=ie+1;le<q.length;le++)if(q[ie].negate().equals(q[le]))return r.INSTANCE;if(q.length===1)return q[0]}return new G(q,_)}}serialize(){return this.expr.map(R=>R.serialize()).join(" && ")}keys(){const R=[];for(const _ of this.expr)R.push(..._.keys());return R}map(R){return new G(this.expr.map(_=>_.map(R)),null)}negate(){if(!this.negated){const R=[];for(const _ of this.expr)R.push(_.negate());this.negated=B.create(R,this,!0)}return this.negated}}e.ContextKeyAndExpr=G;class B{static create(R,_,N){return B._normalizeArr(R,_,N)}constructor(R,_){this.expr=R,this.negated=_,this.type=9}cmp(R){if(R.type!==this.type)return this.type-R.type;if(this.expr.length<R.expr.length)return-1;if(this.expr.length>R.expr.length)return 1;for(let _=0,N=this.expr.length;_<N;_++){const q=i(this.expr[_],R.expr[_]);if(q!==0)return q}return 0}equals(R){if(R.type===this.type){if(this.expr.length!==R.expr.length)return!1;for(let _=0,N=this.expr.length;_<N;_++)if(!this.expr[_].equals(R.expr[_]))return!1;return!0}return!1}substituteConstants(){const R=j(this.expr);return R===this.expr?this:B.create(R,this.negated,!1)}evaluate(R){for(let _=0,N=this.expr.length;_<N;_++)if(this.expr[_].evaluate(R))return!0;return!1}static _normalizeArr(R,_,N){let q=[],re=!1;if(R){for(let ie=0,le=R.length;ie<le;ie++){const V=R[ie];if(V){if(V.type===0){re=!0;continue}if(V.type===1)return o.INSTANCE;if(V.type===9){q=q.concat(V.expr);continue}q.push(V)}}if(q.length===0&&re)return r.INSTANCE;q.sort(i)}if(q.length!==0){if(q.length===1)return q[0];for(let ie=1;ie<q.length;ie++)q[ie-1].equals(q[ie])&&(q.splice(ie,1),ie--);if(q.length===1)return q[0];if(N){for(let ie=0;ie<q.length;ie++)for(let le=ie+1;le<q.length;le++)if(q[ie].negate().equals(q[le]))return o.INSTANCE;if(q.length===1)return q[0]}return new B(q,_)}}serialize(){return this.expr.map(R=>R.serialize()).join(" || ")}keys(){const R=[];for(const _ of this.expr)R.push(..._.keys());return R}map(R){return new B(this.expr.map(_=>_.map(R)),null)}negate(){if(!this.negated){const R=[];for(const _ of this.expr)R.push(_.negate());for(;R.length>1;){const _=R.shift(),N=R.shift(),q=[];for(const re of ce(_))for(const ie of ce(N))q.push(G.create([re,ie],null,!1));R.unshift(B.create(q,null,!1))}this.negated=B.create(R,this,!0)}return this.negated}}e.ContextKeyOrExpr=B;class W extends p{static{this._info=[]}static all(){return W._info.values()}constructor(R,_,N){super(R,null),this._defaultValue=_,typeof N=="object"?W._info.push({...N,key:R}):N!==!0&&W._info.push({key:R,description:N,type:_!=null?typeof _:void 0})}bindTo(R){return R.createKey(this.key,this._defaultValue)}getValue(R){return R.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(R){return k.create(this.key,R)}notEqualsTo(R){return L.create(this.key,R)}}e.RawContextKey=W,e.IContextKeyService=(0,O.createDecorator)("contextKeyService");function U(x,R){return x<R?-1:x>R?1:0}function $(x,R,_,N){return x<_?-1:x>_?1:R<N?-1:R>N?1:0}function X(x,R){if(x.type===0||R.type===1)return!0;if(x.type===9)return R.type===9?se(x.expr,R.expr):!1;if(R.type===9){for(const _ of R.expr)if(X(x,_))return!0;return!1}if(x.type===6){if(R.type===6)return se(R.expr,x.expr);for(const _ of x.expr)if(X(_,R))return!0;return!1}return x.equals(R)}e.implies=X;function se(x,R){let _=0,N=0;for(;_<x.length&&N<R.length;){const q=x[_].cmp(R[N]);if(q<0)return!1;q===0&&_++,N++}return _===x.length}function ce(x){return x.type===9?x.expr:[x]}}),define(Z[77],ee([0,1,6]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryCredentialsProvider=e.ICredentialsMainService=e.ICredentialsService=void 0,e.ICredentialsService=(0,b.createDecorator)("credentialsService"),e.ICredentialsMainService=(0,b.createDecorator)("credentialsMainService");class A{constructor(){this.secretVault={}}async getPassword(O,D){return this.secretVault[O]?.[D]??null}async setPassword(O,D,P){this.secretVault[O]=this.secretVault[O]??{},this.secretVault[O][D]=P}async deletePassword(O,D){return this.secretVault[O]?.[D]?(delete this.secretVault[O][D],Object.keys(this.secretVault[O]).length===0&&delete this.secretVault[O],!0):!1}async findPassword(O){return JSON.stringify(this.secretVault[O])??null}async findCredentials(O){const D=[];for(const P of Object.keys(this.secretVault[O]||{}))D.push({account:P,password:this.secretVault[O][P]});return D}async clear(){this.secretVault={}}}e.InMemoryCredentialsProvider=A}),define(Z[92],ee([0,1,6]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NullDiagnosticsService=e.isRemoteDiagnosticError=e.IDiagnosticsService=e.ID=void 0,e.ID="diagnosticsService",e.IDiagnosticsService=(0,b.createDecorator)(e.ID);function A(O){return!!O.hostName&&!!O.errorMessage}e.isRemoteDiagnosticError=A;class n{async getPerformanceInfo(D,P){return{}}async getSystemInfo(D,P){return{processArgs:"nullProcessArgs",gpuStatus:"nullGpuStatus",screenReader:"nullScreenReader",remoteData:[],os:"nullOs",memory:"nullMemory",vmHint:"nullVmHint"}}async getDiagnostics(D,P){return""}async getWorkspaceFileExtensions(D){return{extensions:[]}}async reportWorkspaceStats(D){}}e.NullDiagnosticsService=n}),define(Z[93],ee([0,1,19,71,166,6,46,4,37]),function(H,e,b,A,n,O,D,P,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.massageMessageBoxOptions=e.getFileNamesMessage=e.ConfirmResult=e.IFileDialogService=e.AbstractDialogHandler=e.IDialogService=void 0,e.IDialogService=(0,O.createDecorator)("dialogService");var d;(function(E){E[E.Confirmation=1]="Confirmation",E[E.Prompt=2]="Prompt",E[E.Input=3]="Input"})(d||(d={}));class m{getConfirmationButtons(l){return this.getButtons(l,d.Confirmation)}getPromptButtons(l){return this.getButtons(l,d.Prompt)}getInputButtons(l){return this.getButtons(l,d.Input)}getButtons(l,v){const c=[];switch(v){case d.Confirmation:{const f=l;f.primaryButton?c.push(f.primaryButton):c.push((0,n.localize)(0,null)),f.cancelButton?c.push(f.cancelButton):c.push((0,n.localize)(1,null));break}case d.Prompt:{const f=l;Array.isArray(f.buttons)&&f.buttons.length>0&&c.push(...f.buttons.map(I=>I.label)),f.cancelButton&&(f.cancelButton===!0?c.push((0,n.localize)(2,null)):typeof f.cancelButton=="string"?c.push(f.cancelButton):f.cancelButton.label?c.push(f.cancelButton.label):c.push((0,n.localize)(3,null))),c.length===0&&c.push((0,n.localize)(4,null));break}case d.Input:{const f=l;f.primaryButton?c.push(f.primaryButton):c.push((0,n.localize)(5,null)),f.cancelButton?c.push(f.cancelButton):c.push((0,n.localize)(6,null));break}}return c}getDialogType(l){if(typeof l=="string")return l;if(typeof l=="number")return l===A.default.Info?"info":l===A.default.Error?"error":l===A.default.Warning?"warning":"none"}async getPromptResult(l,v,c){const f=[...l.buttons??[]];return l.cancelButton&&typeof l.cancelButton!="string"&&typeof l.cancelButton!="boolean"&&f.push(l.cancelButton),{result:await f[v]?.run({checkboxChecked:c}),checkboxChecked:c}}}e.AbstractDialogHandler=m,e.IFileDialogService=(0,O.createDecorator)("fileDialogService");var g;(function(E){E[E.SAVE=0]="SAVE",E[E.DONT_SAVE=1]="DONT_SAVE",E[E.CANCEL=2]="CANCEL"})(g||(e.ConfirmResult=g={}));const w=10;function u(E){const l=[];return l.push(...E.slice(0,w).map(v=>typeof v=="string"?v:(0,b.basename)(v))),E.length>w&&(E.length-w===1?l.push((0,n.localize)(7,null)):l.push((0,n.localize)(8,null,E.length-w))),l.push(""),l.join(`
`)}e.getFileNamesMessage=u;function y(E,l){const v=(0,h.deepClone)(E);let c=(v.buttons??[]).map(t=>(0,D.mnemonicButtonLabel)(t)),f=(E.buttons||[]).map((t,a)=>a),I=0,S=v.cancelId??c.length-1;if(c.length>1){const t=typeof S=="number"?c[S]:void 0;if(P.isLinux||P.isMacintosh){if(typeof t=="string"&&c.length>1&&S!==1){c.splice(S,1),c.splice(1,0,t);const a=f[S];f.splice(S,1),f.splice(1,0,a),S=1}P.isLinux&&c.length>1&&(c=c.reverse(),f=f.reverse(),I=c.length-1,typeof t=="string"&&(S=I-1))}else if(P.isWindows&&typeof t=="string"&&c.length>1&&S!==c.length-1){c.splice(S,1),c.push(t);const a=f[S];f.splice(S,1),f.push(a),S=c.length-1}}return v.buttons=c,v.defaultId=I,v.cancelId=S,v.noLink=!0,v.title=v.title||l.nameLong,{options:v,buttonIndeces:f}}e.massageMessageBoxOptions=y}),define(Z[117],ee([0,1,6]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isGnome=e.isKwallet=e.KnownStorageProvider=e.PasswordStoreCLIOption=e.IEncryptionMainService=e.IEncryptionService=void 0,e.IEncryptionService=(0,b.createDecorator)("encryptionService"),e.IEncryptionMainService=(0,b.createDecorator)("encryptionMainService");var A;(function(P){P.kwallet="kwallet",P.kwallet5="kwallet5",P.gnome="gnome",P.gnomeKeyring="gnome-keyring",P.gnomeLibsecret="gnome-libsecret",P.basic="basic"})(A||(e.PasswordStoreCLIOption=A={}));var n;(function(P){P.unknown="unknown",P.basicText="basic_text",P.gnomeAny="gnome_any",P.gnomeLibsecret="gnome_libsecret",P.gnomeKeyring="gnome_keyring",P.kwallet="kwallet",P.kwallet5="kwallet5",P.kwallet6="kwallet6",P.dplib="dpapi",P.keychainAccess="keychain_access"})(n||(e.KnownStorageProvider=n={}));function O(P){return P==="kwallet"||P==="kwallet5"||P==="kwallet6"}e.isKwallet=O;function D(P){return P==="gnome_any"||P==="gnome_libsecret"||P==="gnome_keyring"}e.isGnome=D}),define(Z[33],ee([0,1,6]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INativeEnvironmentService=e.IEnvironmentService=void 0,e.IEnvironmentService=(0,b.createDecorator)("environmentService"),e.INativeEnvironmentService=(0,b.refineServiceDecorator)(e.IEnvironmentService)}),define(Z[118],ee([0,1,170,6]),function(H,e,b,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PreferencesLocalizedLabel=e.ExtensionsLocalizedLabel=e.ExtensionsLabel=e.IExtensionTipsService=e.IGlobalExtensionEnablementService=e.ENABLED_EXTENSIONS_STORAGE_PATH=e.DISABLED_EXTENSIONS_STORAGE_PATH=e.IExtensionManagementService=e.ExtensionManagementError=e.ExtensionSignaturetErrorCode=e.ExtensionManagementErrorCode=e.IExtensionGalleryService=e.InstallOperation=e.StatisticType=e.SortOrder=e.SortBy=e.isIExtensionIdentifier=e.getFallbackTargetPlarforms=e.isTargetPlatformCompatible=e.isNotWebExtensionInWebTargetPlatform=e.getTargetPlatform=e.toTargetPlatform=e.TargetPlatformToString=e.EXTENSION_INSTALL_DEP_PACK_CONTEXT=e.EXTENSION_INSTALL_SYNC_CONTEXT=e.EXTENSION_INSTALL_SKIP_WALKTHROUGH_CONTEXT=e.WEB_EXTENSION_TAG=e.EXTENSION_IDENTIFIER_REGEX=e.EXTENSION_IDENTIFIER_PATTERN=void 0,e.EXTENSION_IDENTIFIER_PATTERN="^([a-z0-9A-Z][a-z0-9-A-Z]*)\\.([a-z0-9A-Z][a-z0-9-A-Z]*)$",e.EXTENSION_IDENTIFIER_REGEX=new RegExp(e.EXTENSION_IDENTIFIER_PATTERN),e.WEB_EXTENSION_TAG="__web_extension",e.EXTENSION_INSTALL_SKIP_WALKTHROUGH_CONTEXT="skipWalkthrough",e.EXTENSION_INSTALL_SYNC_CONTEXT="extensionsSync",e.EXTENSION_INSTALL_DEP_PACK_CONTEXT="dependecyOrPackExtensionInstall";function n(c){switch(c){case"win32-x64":return"Windows 64 bit";case"win32-ia32":return"Windows 32 bit";case"win32-arm64":return"Windows ARM";case"linux-x64":return"Linux 64 bit";case"linux-arm64":return"Linux ARM 64";case"linux-armhf":return"Linux ARM";case"alpine-x64":return"Alpine Linux 64 bit";case"alpine-arm64":return"Alpine ARM 64";case"darwin-x64":return"Mac";case"darwin-arm64":return"Mac Silicon";case"web":return"Web";case"universal":return"universal";case"unknown":return"unknown";case"undefined":return"undefined"}}e.TargetPlatformToString=n;function O(c){switch(c){case"win32-x64":return"win32-x64";case"win32-ia32":return"win32-ia32";case"win32-arm64":return"win32-arm64";case"linux-x64":return"linux-x64";case"linux-arm64":return"linux-arm64";case"linux-armhf":return"linux-armhf";case"alpine-x64":return"alpine-x64";case"alpine-arm64":return"alpine-arm64";case"darwin-x64":return"darwin-x64";case"darwin-arm64":return"darwin-arm64";case"web":return"web";case"universal":return"universal";default:return"unknown"}}e.toTargetPlatform=O;function D(c,f){switch(c){case 3:return f==="x64"?"win32-x64":f==="ia32"?"win32-ia32":f==="arm64"?"win32-arm64":"unknown";case 2:return f==="x64"?"linux-x64":f==="arm64"?"linux-arm64":f==="arm"?"linux-armhf":"unknown";case"alpine":return f==="x64"?"alpine-x64":f==="arm64"?"alpine-arm64":"unknown";case 1:return f==="x64"?"darwin-x64":f==="arm64"?"darwin-arm64":"unknown";case 0:return"web"}}e.getTargetPlatform=D;function P(c,f){return f==="web"&&!c.includes("web")}e.isNotWebExtensionInWebTargetPlatform=P;function h(c,f,I){return P(f,I)?!1:c==="undefined"||c==="universal"?!0:c==="unknown"?!1:c===I?!0:d(I).includes(c)}e.isTargetPlatformCompatible=h;function d(c){switch(c){case"win32-x64":return["win32-ia32"];case"win32-arm64":return["win32-ia32"]}return[]}e.getFallbackTargetPlarforms=d;function m(c){return c&&typeof c=="object"&&typeof c.id=="string"&&(!c.uuid||typeof c.uuid=="string")}e.isIExtensionIdentifier=m;var g;(function(c){c[c.NoneOrRelevance=0]="NoneOrRelevance",c[c.LastUpdatedDate=1]="LastUpdatedDate",c[c.Title=2]="Title",c[c.PublisherName=3]="PublisherName",c[c.InstallCount=4]="InstallCount",c[c.PublishedDate=10]="PublishedDate",c[c.AverageRating=6]="AverageRating",c[c.WeightedRating=12]="WeightedRating"})(g||(e.SortBy=g={}));var w;(function(c){c[c.Default=0]="Default",c[c.Ascending=1]="Ascending",c[c.Descending=2]="Descending"})(w||(e.SortOrder=w={}));var u;(function(c){c.Install="install",c.Uninstall="uninstall"})(u||(e.StatisticType=u={}));var y;(function(c){c[c.None=1]="None",c[c.Install=2]="Install",c[c.Update=3]="Update",c[c.Migrate=4]="Migrate"})(y||(e.InstallOperation=y={})),e.IExtensionGalleryService=(0,A.createDecorator)("extensionGalleryService");var E;(function(c){c.Unsupported="Unsupported",c.Deprecated="Deprecated",c.Malicious="Malicious",c.Incompatible="Incompatible",c.IncompatibleTargetPlatform="IncompatibleTargetPlatform",c.ReleaseVersionNotFound="ReleaseVersionNotFound",c.Invalid="Invalid",c.Download="Download",c.Extract="Extract",c.Delete="Delete",c.Rename="Rename",c.CorruptZip="CorruptZip",c.IncompleteZip="IncompleteZip",c.Signature="Signature",c.Internal="Internal"})(E||(e.ExtensionManagementErrorCode=E={}));var l;(function(c){c.UnknownError="UnknownError",c.PackageIsInvalidZip="PackageIsInvalidZip",c.SignatureArchiveIsInvalidZip="SignatureArchiveIsInvalidZip"})(l||(e.ExtensionSignaturetErrorCode=l={}));class v extends Error{constructor(f,I){super(f),this.code=I,this.name=I}}e.ExtensionManagementError=v,e.IExtensionManagementService=(0,A.createDecorator)("extensionManagementService"),e.DISABLED_EXTENSIONS_STORAGE_PATH="extensionsIdentifiers/disabled",e.ENABLED_EXTENSIONS_STORAGE_PATH="extensionsIdentifiers/enabled",e.IGlobalExtensionEnablementService=(0,A.createDecorator)("IGlobalExtensionEnablementService"),e.IExtensionTipsService=(0,A.createDecorator)("IExtensionTipsService"),e.ExtensionsLabel=(0,b.localize)(0,null),e.ExtensionsLocalizedLabel={value:e.ExtensionsLabel,original:"Extensions"},e.PreferencesLocalizedLabel={value:(0,b.localize)(1,null),original:"Preferences"}}),define(Z[209],ee([0,1,6]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtensionUrlTrustService=void 0,e.IExtensionUrlTrustService=(0,b.createDecorator)("extensionUrlTrustService")}),define(Z[210],ee([0,1,6]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ipcExtensionHostStarterChannelName=e.IExtensionHostStarter=void 0,e.IExtensionHostStarter=(0,b.createDecorator)("extensionHostStarter"),e.ipcExtensionHostStarterChannelName="extensionHostStarter"}),define(Z[119],ee([0,1,6]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExternalTerminalMainService=e.DEFAULT_TERMINAL_OSX=e.IExternalTerminalService=void 0,e.IExternalTerminalService=(0,b.createDecorator)("externalTerminal"),e.DEFAULT_TERMINAL_OSX="Terminal.app",e.IExternalTerminalMainService=(0,b.createDecorator)("externalTerminal")}),define(Z[211],ee([0,1,47,15,10,4,74,21,90,174,119]),function(H,e,b,A,n,O,D,P,h,d,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinuxExternalTerminalService=e.MacExternalTerminalService=e.WindowsExternalTerminalService=void 0;const g=d.localize(0,null);class w{async getDefaultTerminalForPlatforms(){return{windows:u.getDefaultTerminalWindows(),linux:await E.getDefaultTerminalLinuxReady(),osx:"xterm"}}}class u extends w{static{this.CMD="cmd.exe"}openTerminal(I,S){return this.spawnTerminal(b,I,h.getWindowsShell(),S)}spawnTerminal(I,S,t,a){const s=S.windowsExec||u.getDefaultTerminalWindows();a&&a[1]===":"&&(a=a[0].toUpperCase()+a.substr(1));const i=n.basename(s,".exe").toLowerCase();if(i==="cmder")return I.spawn(s,a?[a]:void 0),Promise.resolve(void 0);const r=["/c","start","/wait"];return s.indexOf(" ")>=0&&r.push('""'),r.push(s),i==="wt"&&r.push("-d ."),new Promise((o,p)=>{const k=l(process),M=I.spawn(t,r,{cwd:a,env:k});M.on("error",p),M.on("exit",()=>o())})}runInTerminal(I,S,t,a,s){const i="windowsExec"in s&&s.windowsExec?s.windowsExec:u.getDefaultTerminalWindows();return new Promise((r,o)=>{const p=`"${S} - ${g}"`,k=`""${t.join('" "')}" & pause"`,M=Object.assign({},l(process),a);Object.keys(M).filter(z=>M[z]===null).forEach(z=>delete M[z]);const C={cwd:S,env:M,windowsVerbatimArguments:!0};let L,T;n.basename(i,".exe")==="wt"?(L=i,T=["-d",".",u.CMD,"/c",k]):(L=u.CMD,T=["/c","start",p,"/wait",i,"/c",k]),b.spawn(L,T,C).on("error",z=>{o(v(z))}),r(void 0)})}static getDefaultTerminalWindows(){if(!u._DEFAULT_TERMINAL_WINDOWS){const I=!!process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432");u._DEFAULT_TERMINAL_WINDOWS=`${process.env.windir?process.env.windir:"C:\\Windows"}\\${I?"Sysnative":"System32"}\\cmd.exe`}return u._DEFAULT_TERMINAL_WINDOWS}}e.WindowsExternalTerminalService=u;class y extends w{static{this.OSASCRIPT="/usr/bin/osascript"}openTerminal(I,S){return this.spawnTerminal(b,I,S)}runInTerminal(I,S,t,a,s){const i=s.osxExec||m.DEFAULT_TERMINAL_OSX;return new Promise((r,o)=>{if(i===m.DEFAULT_TERMINAL_OSX||i==="iTerm.app"){const p=i===m.DEFAULT_TERMINAL_OSX?"TerminalHelper":"iTermHelper",M=[A.FileAccess.asFileUri(`vs/workbench/contrib/externalTerminal/node/${p}.scpt`).fsPath,"-t",I||g,"-w",S];for(const T of t)M.push("-a"),M.push(T);if(a){const T=Object.assign({},l(process),a);for(const F in T){const z=T[F];z===null?(M.push("-u"),M.push(F)):(M.push("-e"),M.push(`${F}=${z}`))}}let C="";const L=b.spawn(y.OSASCRIPT,M);L.on("error",T=>{o(v(T))}),L.stderr.on("data",T=>{C+=T.toString()}),L.on("exit",T=>{if(T===0)r(void 0);else if(C){const F=C.split(`
`,1);o(new Error(F[0]))}else o(new Error(d.localize(1,null,p,T)))})}else o(new Error(d.localize(2,null,i)))})}spawnTerminal(I,S,t){const a=S.osxExec||m.DEFAULT_TERMINAL_OSX;return new Promise((s,i)=>{const r=["-a",a];t&&r.push(t);const o=l(process),p=I.spawn("/usr/bin/open",r,{cwd:t,env:o});p.on("error",i),p.on("exit",()=>s())})}}e.MacExternalTerminalService=y;class E extends w{static{this.WAIT_MESSAGE=d.localize(3,null)}openTerminal(I,S){return this.spawnTerminal(b,I,S)}runInTerminal(I,S,t,a,s){const i=s.linuxExec?Promise.resolve(s.linuxExec):E.getDefaultTerminalLinuxReady();return new Promise((r,o)=>{const p=[];i.then(k=>{k.indexOf("gnome-terminal")>=0?p.push("-x"):p.push("-e"),p.push("bash"),p.push("-c");const M=`${c(t)}; echo; read -p "${E.WAIT_MESSAGE}" -n1;`;p.push(`''${M}''`);const C=Object.assign({},l(process),a);Object.keys(C).filter(z=>C[z]===null).forEach(z=>delete C[z]);const L={cwd:S,env:C};let T="";const F=b.spawn(k,p,L);F.on("error",z=>{o(v(z))}),F.stderr.on("data",z=>{T+=z.toString()}),F.on("exit",z=>{if(z===0)r(void 0);else if(T){const oe=T.split(`
`,1);o(new Error(oe[0]))}else o(new Error(d.localize(4,null,k,z)))})})})}static async getDefaultTerminalLinuxReady(){if(!E._DEFAULT_TERMINAL_LINUX_READY)if(!O.isLinux)E._DEFAULT_TERMINAL_LINUX_READY=Promise.resolve("xterm");else{const I=await P.Promises.exists("/etc/debian_version");E._DEFAULT_TERMINAL_LINUX_READY=new Promise(S=>{I?S("x-terminal-emulator"):process.env.DESKTOP_SESSION==="gnome"||process.env.DESKTOP_SESSION==="gnome-classic"?S("gnome-terminal"):process.env.DESKTOP_SESSION==="kde-plasma"?S("konsole"):process.env.COLORTERM?S(process.env.COLORTERM):process.env.TERM?S(process.env.TERM):S("xterm")})}return E._DEFAULT_TERMINAL_LINUX_READY}spawnTerminal(I,S,t){const a=S.linuxExec?Promise.resolve(S.linuxExec):E.getDefaultTerminalLinuxReady();return new Promise((s,i)=>{a.then(r=>{const o=l(process),p=I.spawn(r,[],{cwd:t,env:o});p.on("error",i),p.on("exit",()=>s())})})}}e.LinuxExternalTerminalService=E;function l(f){const I={...f.env};return(0,D.sanitizeProcessEnvironment)(I),I}function v(f){return"errno"in f&&f.errno==="ENOENT"&&"path"in f&&typeof f.path=="string"?new Error(d.localize(5,null,f.path)):f}function c(f){let I="";for(const S of f)S.indexOf(" ")>=0?I+='"'+S+'"':I+=S,I+=" ";return I}}),define(Z[16],ee([0,1,58,10,26,12,7,176,6,4,15]),function(H,e,b,A,n,O,D,P,h,d,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLargeFileConfirmationLimit=e.ByteSize=e.whenProviderRegistered=e.etag=e.ETAG_DISABLED=e.FileKind=e.FILES_READONLY_FROM_PERMISSIONS_CONFIG=e.FILES_READONLY_EXCLUDE_CONFIG=e.FILES_READONLY_INCLUDE_CONFIG=e.FILES_EXCLUDE_CONFIG=e.FILES_ASSOCIATIONS_CONFIG=e.HotExitConfiguration=e.AutoSaveConfiguration=e.FileOperationResult=e.NotModifiedSinceFileOperationError=e.TooLargeFileOperationError=e.FileOperationError=e.isParent=e.FileChangesEvent=e.FileChangeType=e.FileOperationEvent=e.FileOperation=e.toFileOperationResult=e.toFileSystemProviderErrorCode=e.markAsFileSystemProviderError=e.ensureFileSystemProviderError=e.createFileSystemProviderError=e.FileSystemProviderError=e.FileSystemProviderErrorCode=e.hasReadonlyCapability=e.hasFileAtomicDeleteCapability=e.hasFileAtomicWriteCapability=e.hasFileAtomicReadCapability=e.hasFileReadStreamCapability=e.hasOpenReadWriteCloseCapability=e.hasFileCloneCapability=e.hasFileFolderCopyCapability=e.hasReadWriteCapability=e.FileSystemProviderCapabilities=e.FilePermission=e.FileType=e.isFileOpenForWriteOptions=e.IFileService=void 0,e.IFileService=(0,h.createDecorator)("fileService");function g(U){return U.create===!0}e.isFileOpenForWriteOptions=g;var w;(function(U){U[U.Unknown=0]="Unknown",U[U.File=1]="File",U[U.Directory=2]="Directory",U[U.SymbolicLink=64]="SymbolicLink"})(w||(e.FileType=w={}));var u;(function(U){U[U.Readonly=1]="Readonly",U[U.Locked=2]="Locked"})(u||(e.FilePermission=u={}));var y;(function(U){U[U.None=0]="None",U[U.FileReadWrite=2]="FileReadWrite",U[U.FileOpenReadWriteClose=4]="FileOpenReadWriteClose",U[U.FileReadStream=16]="FileReadStream",U[U.FileFolderCopy=8]="FileFolderCopy",U[U.PathCaseSensitive=1024]="PathCaseSensitive",U[U.Readonly=2048]="Readonly",U[U.Trash=4096]="Trash",U[U.FileWriteUnlock=8192]="FileWriteUnlock",U[U.FileAtomicRead=16384]="FileAtomicRead",U[U.FileAtomicWrite=32768]="FileAtomicWrite",U[U.FileAtomicDelete=65536]="FileAtomicDelete",U[U.FileClone=131072]="FileClone"})(y||(e.FileSystemProviderCapabilities=y={}));function E(U){return!!(U.capabilities&2)}e.hasReadWriteCapability=E;function l(U){return!!(U.capabilities&8)}e.hasFileFolderCopyCapability=l;function v(U){return!!(U.capabilities&131072)}e.hasFileCloneCapability=v;function c(U){return!!(U.capabilities&4)}e.hasOpenReadWriteCloseCapability=c;function f(U){return!!(U.capabilities&16)}e.hasFileReadStreamCapability=f;function I(U){return E(U)?!!(U.capabilities&16384):!1}e.hasFileAtomicReadCapability=I;function S(U){return E(U)?!!(U.capabilities&32768):!1}e.hasFileAtomicWriteCapability=S;function t(U){return!!(U.capabilities&65536)}e.hasFileAtomicDeleteCapability=t;function a(U){return!!(U.capabilities&2048)}e.hasReadonlyCapability=a;var s;(function(U){U.FileExists="EntryExists",U.FileNotFound="EntryNotFound",U.FileNotADirectory="EntryNotADirectory",U.FileIsADirectory="EntryIsADirectory",U.FileExceedsStorageQuota="EntryExceedsStorageQuota",U.FileTooLarge="EntryTooLarge",U.FileWriteLocked="EntryWriteLocked",U.NoPermissions="NoPermissions",U.Unavailable="Unavailable",U.Unknown="Unknown"})(s||(e.FileSystemProviderErrorCode=s={}));class i extends Error{static create($,X){const se=new i($.toString(),X);return p(se,X),se}constructor($,X){super($),this.code=X}}e.FileSystemProviderError=i;function r(U,$){return i.create(U,$)}e.createFileSystemProviderError=r;function o(U){return U||r((0,P.localize)(0,null),s.Unknown)}e.ensureFileSystemProviderError=o;function p(U,$){return U.name=$?`${$} (FileSystemError)`:"FileSystemError",U}e.markAsFileSystemProviderError=p;function k(U){if(!U)return s.Unknown;if(U instanceof i)return U.code;const $=/^(.+) \(FileSystemError\)$/.exec(U.name);if(!$)return s.Unknown;switch($[1]){case s.FileExists:return s.FileExists;case s.FileIsADirectory:return s.FileIsADirectory;case s.FileNotADirectory:return s.FileNotADirectory;case s.FileNotFound:return s.FileNotFound;case s.FileTooLarge:return s.FileTooLarge;case s.FileWriteLocked:return s.FileWriteLocked;case s.NoPermissions:return s.NoPermissions;case s.Unavailable:return s.Unavailable}return s.Unknown}e.toFileSystemProviderErrorCode=k;function M(U){if(U instanceof oe)return U.fileOperationResult;switch(k(U)){case s.FileNotFound:return 1;case s.FileIsADirectory:return 0;case s.FileNotADirectory:return 9;case s.FileWriteLocked:return 5;case s.NoPermissions:return 6;case s.FileExists:return 4;case s.FileTooLarge:return 7;default:return 10}}e.toFileOperationResult=M;var C;(function(U){U[U.CREATE=0]="CREATE",U[U.DELETE=1]="DELETE",U[U.MOVE=2]="MOVE",U[U.COPY=3]="COPY",U[U.WRITE=4]="WRITE"})(C||(e.FileOperation=C={}));class L{constructor($,X,se){this.resource=$,this.operation=X,this.target=se}isOperation($){return this.operation===$}}e.FileOperationEvent=L;var T;(function(U){U[U.UPDATED=0]="UPDATED",U[U.ADDED=1]="ADDED",U[U.DELETED=2]="DELETED"})(T||(e.FileChangeType=T={}));class F{constructor($,X){this.added=void 0,this.updated=void 0,this.deleted=void 0,this.rawAdded=[],this.rawUpdated=[],this.rawDeleted=[];const se=new Map;for(const ce of $){const x=se.get(ce.type);switch(x?x.push([ce.resource,ce]):se.set(ce.type,[[ce.resource,ce]]),ce.type){case 1:this.rawAdded.push(ce.resource);break;case 0:this.rawUpdated.push(ce.resource);break;case 2:this.rawDeleted.push(ce.resource);break}}for(const[ce,x]of se)switch(ce){case 1:this.added=b.TernarySearchTree.forUris(()=>X),this.added.fill(x);break;case 0:this.updated=b.TernarySearchTree.forUris(()=>X),this.updated.fill(x);break;case 2:this.deleted=b.TernarySearchTree.forUris(()=>X),this.deleted.fill(x);break}}contains($,...X){return this.doContains($,{includeChildren:!1},...X)}affects($,...X){return this.doContains($,{includeChildren:!0},...X)}doContains($,X,...se){if(!$)return!1;const ce=se.length>0;return!!((!ce||se.includes(1))&&(this.added?.get($)||X.includeChildren&&this.added?.findSuperstr($))||(!ce||se.includes(0))&&(this.updated?.get($)||X.includeChildren&&this.updated?.findSuperstr($))||(!ce||se.includes(2))&&(this.deleted?.findSubstr($)||X.includeChildren&&this.deleted?.findSuperstr($)))}gotAdded(){return!!this.added}gotDeleted(){return!!this.deleted}gotUpdated(){return!!this.updated}}e.FileChangesEvent=F;function z(U,$,X){return!U||!$||U===$||$.length>U.length?!1:($.charAt($.length-1)!==A.sep&&($+=A.sep),X?(0,n.startsWithIgnoreCase)(U,$):U.indexOf($)===0)}e.isParent=z;class oe extends Error{constructor($,X,se){super($),this.fileOperationResult=X,this.options=se}}e.FileOperationError=oe;class ne extends oe{constructor($,X,se,ce){super($,X,ce),this.fileOperationResult=X,this.size=se}}e.TooLargeFileOperationError=ne;class de extends oe{constructor($,X,se){super($,2,se),this.stat=X}}e.NotModifiedSinceFileOperationError=de;var ae;(function(U){U[U.FILE_IS_DIRECTORY=0]="FILE_IS_DIRECTORY",U[U.FILE_NOT_FOUND=1]="FILE_NOT_FOUND",U[U.FILE_NOT_MODIFIED_SINCE=2]="FILE_NOT_MODIFIED_SINCE",U[U.FILE_MODIFIED_SINCE=3]="FILE_MODIFIED_SINCE",U[U.FILE_MOVE_CONFLICT=4]="FILE_MOVE_CONFLICT",U[U.FILE_WRITE_LOCKED=5]="FILE_WRITE_LOCKED",U[U.FILE_PERMISSION_DENIED=6]="FILE_PERMISSION_DENIED",U[U.FILE_TOO_LARGE=7]="FILE_TOO_LARGE",U[U.FILE_INVALID_PATH=8]="FILE_INVALID_PATH",U[U.FILE_NOT_DIRECTORY=9]="FILE_NOT_DIRECTORY",U[U.FILE_OTHER_ERROR=10]="FILE_OTHER_ERROR"})(ae||(e.FileOperationResult=ae={})),e.AutoSaveConfiguration={OFF:"off",AFTER_DELAY:"afterDelay",ON_FOCUS_CHANGE:"onFocusChange",ON_WINDOW_CHANGE:"onWindowChange"},e.HotExitConfiguration={OFF:"off",ON_EXIT:"onExit",ON_EXIT_AND_WINDOW_CLOSE:"onExitAndWindowClose"},e.FILES_ASSOCIATIONS_CONFIG="files.associations",e.FILES_EXCLUDE_CONFIG="files.exclude",e.FILES_READONLY_INCLUDE_CONFIG="files.readonlyInclude",e.FILES_READONLY_EXCLUDE_CONFIG="files.readonlyExclude",e.FILES_READONLY_FROM_PERMISSIONS_CONFIG="files.readonlyFromPermissions";var ue;(function(U){U[U.FILE=0]="FILE",U[U.FOLDER=1]="FOLDER",U[U.ROOT_FOLDER=2]="ROOT_FOLDER"})(ue||(e.FileKind=ue={})),e.ETAG_DISABLED="";function j(U){if(!(typeof U.size!="number"||typeof U.mtime!="number"))return U.mtime.toString(29)+U.size.toString(31)}e.etag=j;async function G(U,$){if(!$.hasProvider(D.URI.from({scheme:U.scheme})))return new Promise(X=>{const se=$.onDidChangeFileSystemProviderRegistrations(ce=>{ce.scheme===U.scheme&&ce.added&&(se.dispose(),X())})})}e.whenProviderRegistered=G;class B{static{this.KB=1024}static{this.MB=B.KB*B.KB}static{this.GB=B.MB*B.KB}static{this.TB=B.GB*B.KB}static formatSize($){return(0,O.isNumber)($)||($=0),$<B.KB?(0,P.localize)(1,null,$.toFixed(0)):$<B.MB?(0,P.localize)(2,null,($/B.KB).toFixed(2)):$<B.GB?(0,P.localize)(3,null,($/B.MB).toFixed(2)):$<B.TB?(0,P.localize)(4,null,($/B.GB).toFixed(2)):(0,P.localize)(5,null,($/B.TB).toFixed(2))}}e.ByteSize=B;function W(U){const $=typeof U=="string"||U?.scheme===m.Schemas.vscodeRemote;return typeof U!="string"&&U?.scheme===m.Schemas.file?1024*B.MB:$?10*B.MB:d.isWeb?50*B.MB:1024*B.MB}e.getLargeFileConfirmationLimit=W}),define(Z[212],ee([0,1,17,50,13,3,2,56,7,31,16]),function(H,e,b,A,n,O,D,P,h,d,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiskFileSystemProviderClient=e.LOCAL_FILE_SYSTEM_CHANNEL_NAME=void 0,e.LOCAL_FILE_SYSTEM_CHANNEL_NAME="localFilesystem";class g extends D.Disposable{constructor(u,y){super(),this.channel=u,this.extraCapabilities=y,this.onDidChangeCapabilities=O.Event.None,this._onDidChange=this._register(new O.Emitter),this.onDidChangeFile=this._onDidChange.event,this._onDidWatchError=this._register(new O.Emitter),this.onDidWatchError=this._onDidWatchError.event,this.sessionId=(0,d.generateUuid)(),this.registerFileChangeListeners()}get capabilities(){return this._capabilities||(this._capabilities=253982,this.extraCapabilities.pathCaseSensitive&&(this._capabilities|=1024),this.extraCapabilities.trash&&(this._capabilities|=4096)),this._capabilities}stat(u){return this.channel.call("stat",[u])}readdir(u){return this.channel.call("readdir",[u])}async readFile(u,y){const{buffer:E}=await this.channel.call("readFile",[u,y]);return E}readFileStream(u,y,E){const l=(0,P.newWriteableStream)(c=>b.VSBuffer.concat(c.map(f=>b.VSBuffer.wrap(f))).buffer),v=this.channel.listen("readFileStream",[u,y])(c=>{if(c instanceof b.VSBuffer)l.write(c.buffer);else{if(c==="end")l.end();else{let f;if(c instanceof Error)f=c;else{const I=c;f=(0,m.createFileSystemProviderError)(I.message??(0,A.toErrorMessage)(I),I.code??m.FileSystemProviderErrorCode.Unknown)}l.error(f),l.end()}v.dispose()}});return E.onCancellationRequested(()=>{l.error((0,n.canceled)()),l.end(),v.dispose()}),l}writeFile(u,y,E){return this.channel.call("writeFile",[u,b.VSBuffer.wrap(y),E])}open(u,y){return this.channel.call("open",[u,y])}close(u){return this.channel.call("close",[u])}async read(u,y,E,l,v){const[c,f]=await this.channel.call("read",[u,y,v]);return E.set(c.buffer.slice(0,f),l),f}write(u,y,E,l,v){return this.channel.call("write",[u,y,b.VSBuffer.wrap(E),l,v])}mkdir(u){return this.channel.call("mkdir",[u])}delete(u,y){return this.channel.call("delete",[u,y])}rename(u,y,E){return this.channel.call("rename",[u,y,E])}copy(u,y,E){return this.channel.call("copy",[u,y,E])}cloneFile(u,y){return this.channel.call("cloneFile",[u,y])}registerFileChangeListeners(){this._register(this.channel.listen("fileChange",[this.sessionId])(u=>{if(Array.isArray(u)){const y=u;this._onDidChange.fire(y.map(E=>({resource:h.URI.revive(E.resource),type:E.type})))}else{const y=u;this._onDidWatchError.fire(y)}}))}watch(u,y){const E=(0,d.generateUuid)();return this.channel.call("watch",[this.sessionId,E,u,y]),(0,D.toDisposable)(()=>this.channel.call("unwatch",[this.sessionId,E]))}}e.DiskFileSystemProviderClient=g}),define(Z[120],ee([0,1,17,13,177,16]),function(H,e,b,A,n,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.readFileIntoStream=void 0;async function D(m,g,w,u,y,E){let l;try{await P(m,g,w,u,y,E)}catch(v){l=v}finally{l&&y.errorTransformer&&(l=y.errorTransformer(l)),typeof l<"u"&&w.error(l),w.end()}}e.readFileIntoStream=D;async function P(m,g,w,u,y,E){h(E);const l=await m.open(g,{create:!1});try{h(E);let v=0,c=0,f=y&&typeof y.length=="number"?y.length:void 0,I=b.VSBuffer.alloc(Math.min(y.bufferSize,typeof f=="number"?f:y.bufferSize)),S=y&&typeof y.position=="number"?y.position:0,t=0;do c=await m.read(l,S,I.buffer,t,I.byteLength-t),S+=c,t+=c,v+=c,typeof f=="number"&&(f-=c),t===I.byteLength&&(await w.write(u(I)),I=b.VSBuffer.alloc(Math.min(y.bufferSize,typeof f=="number"?f:y.bufferSize)),t=0);while(c>0&&(typeof f!="number"||f>0)&&h(E)&&d(v,y));if(t>0){let a=t;typeof f=="number"&&(a=Math.min(t,f)),w.write(u(I.slice(0,a)))}}catch(v){throw(0,O.ensureFileSystemProviderError)(v)}finally{await m.close(l)}}function h(m){if(m.isCancellationRequested)throw(0,A.canceled)();return!0}function d(m,g){if(typeof g?.limits?.size=="number"&&m>g.limits.size)throw(0,O.createFileSystemProviderError)((0,n.localize)(0,null),O.FileSystemProviderErrorCode.FileTooLarge);return!0}}),define(Z[78],ee([0,1,106,2,10,4,7,16]),function(H,e,b,A,n,O,D,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseWatcherPatterns=e.normalizeWatcherPattern=e.coalesceEvents=e.toFileChanges=e.AbstractUniversalWatcherClient=e.AbstractNonRecursiveWatcherClient=e.AbstractWatcherClient=e.isRecursiveWatchRequest=void 0;function h(v){return v.recursive===!0}e.isRecursiveWatchRequest=h;class d extends A.Disposable{static{this.MAX_RESTARTS=5}constructor(c,f,I,S){super(),this.onFileChanges=c,this.onLogMessage=f,this.verboseLogging=I,this.options=S,this.watcherDisposables=this._register(new A.MutableDisposable),this.requests=void 0,this.restartCounter=0}init(){const c=new A.DisposableStore;this.watcherDisposables.value=c,this.watcher=this.createWatcher(c),this.watcher.setVerboseLogging(this.verboseLogging),c.add(this.watcher.onDidChangeFile(f=>this.onFileChanges(f))),c.add(this.watcher.onDidLogMessage(f=>this.onLogMessage(f))),c.add(this.watcher.onDidError(f=>this.onError(f)))}onError(c){this.options.restartOnError?this.restartCounter<d.MAX_RESTARTS&&this.requests?(this.error(`restarting watcher after error: ${c}`),this.restart(this.requests)):this.error(`gave up attempting to restart watcher after error: ${c}`):this.error(c)}restart(c){this.restartCounter++,this.init(),this.watch(c)}async watch(c){this.requests=c,await this.watcher?.watch(c)}async setVerboseLogging(c){this.verboseLogging=c,await this.watcher?.setVerboseLogging(c)}error(c){this.onLogMessage({type:"error",message:`[File Watcher (${this.options.type})] ${c}`})}trace(c){this.onLogMessage({type:"trace",message:`[File Watcher (${this.options.type})] ${c}`})}dispose(){return this.watcher=void 0,super.dispose()}}e.AbstractWatcherClient=d;class m extends d{constructor(c,f,I){super(c,f,I,{type:"node.js",restartOnError:!1})}}e.AbstractNonRecursiveWatcherClient=m;class g extends d{constructor(c,f,I){super(c,f,I,{type:"universal",restartOnError:!0})}}e.AbstractUniversalWatcherClient=g;function w(v){return v.map(c=>({type:c.type,resource:D.URI.file(c.path)}))}e.toFileChanges=w;function u(v){const c=new l;for(const f of v)c.processEvent(f);return c.coalesce()}e.coalesceEvents=u;function y(v,c){return typeof c=="string"&&!c.startsWith(b.GLOBSTAR)&&!(0,n.isAbsolute)(c)?{base:v,pattern:c}:c}e.normalizeWatcherPattern=y;function E(v,c){const f=[];for(const I of c)f.push((0,b.parse)(y(v,I)));return f}e.parseWatcherPatterns=E;class l{constructor(){this.coalesced=new Set,this.mapPathToChange=new Map}toKey(c){return O.isLinux?c.path:c.path.toLowerCase()}processEvent(c){const f=this.mapPathToChange.get(this.toKey(c));let I=!1;if(f){const S=f.type,t=c.type;f.path!==c.path&&(c.type===2||c.type===1)?I=!0:S===1&&t===2?(this.mapPathToChange.delete(this.toKey(c)),this.coalesced.delete(f)):S===2&&t===1?f.type=0:S===1&&t===0||(f.type=t)}else I=!0;I&&(this.coalesced.add(c),this.mapPathToChange.set(this.toKey(c),c))}coalesce(){const c=[],f=[];return Array.from(this.coalesced).filter(I=>I.type!==2?(c.push(I),!1):!0).sort((I,S)=>I.path.length-S.path.length).filter(I=>f.some(S=>(0,P.isParent)(I.path,S,!O.isLinux))?!1:(f.push(I.path),!0)).concat(c)}}}),define(Z[213],ee([0,1,45,8,23,32,2,86,10,4,107,21,78]),function(H,e,b,A,n,O,D,P,h,d,m,g,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.watchFileContents=e.NodeJSFileWatcherLibrary=void 0;class u extends D.Disposable{static{this.FILE_DELETE_HANDLER_DELAY=100}static{this.FILE_CHANGES_HANDLER_DELAY=75}constructor(l,v,c,f){super(),this.request=l,this.onDidFilesChange=v,this.onLogMessage=c,this.verboseLogging=f,this.throttledFileChangesEmitter=this._register(new A.ThrottledWorker({maxWorkChunkSize:100,throttleDelay:200,maxBufferedWork:1e4},I=>this.onDidFilesChange(I))),this.fileChangesAggregator=this._register(new A.RunOnceWorker(I=>this.handleFileChanges(I),u.FILE_CHANGES_HANDLER_DELAY)),this.excludes=(0,w.parseWatcherPatterns)(this.request.path,this.request.excludes),this.includes=this.request.includes?(0,w.parseWatcherPatterns)(this.request.path,this.request.includes):void 0,this.cts=new n.CancellationTokenSource,this.ready=this.watch()}async watch(){try{const l=await this.normalizePath(this.request);if(this.cts.token.isCancellationRequested)return;const v=await g.Promises.stat(l);this._register(await this.doWatch(l,v.isDirectory()))}catch(l){l.code!=="ENOENT"?this.error(l):this.trace(l)}}async normalizePath(l){let v=l.path;try{v=await g.Promises.realpath(l.path),l.path===v&&(v=await(0,m.realcase)(l.path)??l.path),l.path!==v&&this.trace(`correcting a path to watch that seems to be a symbolic link or wrong casing (original: ${l.path}, real: ${v})`)}catch{}return v}async doWatch(l,v){if(d.isMacintosh&&(0,O.isEqualOrParent)(l,"/Volumes/",!0))return this.error(`Refusing to watch ${l} for changes using fs.watch() for possibly being a network share where watching is unreliable and unstable.`),D.Disposable.None;const c=new n.CancellationTokenSource(this.cts.token),f=new D.DisposableStore;try{const I=(0,h.basename)(l),S=(0,b.watch)(l);f.add((0,D.toDisposable)(()=>{S.removeAllListeners(),S.close()})),this.trace(`Started watching: '${l}'`);const t=new Set;if(v)try{for(const s of await g.Promises.readdir(l))t.add(s)}catch(s){this.error(s)}const a=new Map;f.add((0,D.toDisposable)(()=>{for(const[,s]of a)s.dispose();a.clear()})),S.on("error",(s,i)=>{this.error(`Failed to watch ${l} for changes using fs.watch() (${s}, ${i})`),this.dispose()}),S.on("change",(s,i)=>{if(c.token.isCancellationRequested)return;this.trace(`[raw] ["${s}"] ${i}`);let r="";if(i&&(r=i.toString(),d.isMacintosh&&(r=(0,P.normalizeNFC)(r))),!(!r||s!=="change"&&s!=="rename"))if(v)if(s==="rename"){a.get(r)?.dispose();const o=setTimeout(async()=>{if(a.delete(r),r===I&&!await g.Promises.exists(l)){this.warn("Watcher shutdown because watched path got deleted"),this.dispose();return}const p=await this.existsChildStrictCase((0,h.join)(l,r));if(c.token.isCancellationRequested)return;let k;p?t.has(r)?k=0:(k=1,t.add(r)):(t.delete(r),k=2),this.onFileChange({path:(0,h.join)(this.request.path,r),type:k})},u.FILE_DELETE_HANDLER_DELAY);a.set(r,(0,D.toDisposable)(()=>clearTimeout(o)))}else{let o;t.has(r)?o=0:(o=1,t.add(r)),this.onFileChange({path:(0,h.join)(this.request.path,r),type:o})}else if(s==="rename"||r!==I){const o=setTimeout(async()=>{const p=await g.Promises.exists(l);c.token.isCancellationRequested||(p?(this.onFileChange({path:this.request.path,type:0},!0),f.add(await this.doWatch(l,!1))):(this.onFileChange({path:this.request.path,type:2},!0),this.fileChangesAggregator.flush(),this.dispose()))},u.FILE_DELETE_HANDLER_DELAY);f.clear(),f.add((0,D.toDisposable)(()=>clearTimeout(o)))}else this.onFileChange({path:this.request.path,type:0},!0)})}catch(I){await g.Promises.exists(l)&&!c.token.isCancellationRequested&&this.error(`Failed to watch ${l} for changes using fs.watch() (${I.toString()})`)}return(0,D.toDisposable)(()=>{c.dispose(!0),f.dispose()})}onFileChange(l,v=!1){this.cts.token.isCancellationRequested||(this.verboseLogging&&this.trace(`${l.type===1?"[ADDED]":l.type===2?"[DELETED]":"[CHANGED]"} ${l.path}`),!v&&this.excludes.some(c=>c(l.path))?this.verboseLogging&&this.trace(` >> ignored (excluded) ${l.path}`):!v&&this.includes&&this.includes.length>0&&!this.includes.some(c=>c(l.path))?this.verboseLogging&&this.trace(` >> ignored (not included) ${l.path}`):this.fileChangesAggregator.work(l))}handleFileChanges(l){const v=(0,w.coalesceEvents)(l);if(v.length>0){if(this.verboseLogging)for(const f of v)this.trace(`>> normalized ${f.type===1?"[ADDED]":f.type===2?"[DELETED]":"[CHANGED]"} ${f.path}`);this.throttledFileChangesEmitter.work(v)?this.throttledFileChangesEmitter.pending>0&&this.trace(`started throttling events due to large amount of file change events at once (pending: ${this.throttledFileChangesEmitter.pending}, most recent change: ${v[0].path}). Use 'files.watcherExclude' setting to exclude folders with lots of changing files (e.g. compilation output).`):this.warn(`started ignoring events due to too many file change events at once (incoming: ${v.length}, most recent change: ${v[0].path}). Use 'files.watcherExclude' setting to exclude folders with lots of changing files (e.g. compilation output).`)}}async existsChildStrictCase(l){if(d.isLinux)return g.Promises.exists(l);try{const v=(0,h.basename)(l);return(await g.Promises.readdir((0,h.dirname)(l))).some(f=>f===v)}catch(v){return this.trace(v),!1}}setVerboseLogging(l){this.verboseLogging=l}error(l){this.cts.token.isCancellationRequested||this.onLogMessage?.({type:"error",message:`[File Watcher (node.js)] ${l}`})}warn(l){this.cts.token.isCancellationRequested||this.onLogMessage?.({type:"warn",message:`[File Watcher (node.js)] ${l}`})}trace(l){!this.cts.token.isCancellationRequested&&this.verboseLogging&&this.onLogMessage?.({type:"trace",message:`[File Watcher (node.js)] ${l}`})}dispose(){this.trace(`stopping file watcher on ${this.request.path}`),this.cts.dispose(!0),super.dispose()}}e.NodeJSFileWatcherLibrary=u;async function y(E,l,v,c,f=512){const I=await g.Promises.open(E,"r"),S=Buffer.allocUnsafe(f),t=new n.CancellationTokenSource(c);let a,s=!1;const i={path:E,excludes:[],recursive:!1},r=new u(i,o=>{(async()=>{for(const{type:p}of o)if(p===0){if(s)return;s=!0;try{for(;!t.token.isCancellationRequested;){const{bytesRead:k}=await g.Promises.read(I,S,0,f,null);if(!k||t.token.isCancellationRequested)break;l(S.slice(0,k))}}catch(k){a=new Error(k),t.dispose(!0)}finally{s=!1}}})()});return await r.ready,v(),new Promise((o,p)=>{t.token.onCancellationRequested(async()=>{r.dispose();try{await g.Promises.close(I)}catch(k){a=new Error(k)}a?p(a):o()})})}e.watchFileContents=y}),define(Z[214],ee([0,1,3,106,2,4,213]),function(H,e,b,A,n,O,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NodeJSWatcher=void 0;class P extends n.Disposable{constructor(){super(...arguments),this._onDidChangeFile=this._register(new b.Emitter),this.onDidChangeFile=this._onDidChangeFile.event,this._onDidLogMessage=this._register(new b.Emitter),this.onDidLogMessage=this._onDidLogMessage.event,this.onDidError=b.Event.None,this.watchers=new Map,this.verboseLogging=!1}async watch(d){const m=this.normalizeRequests(d),g=m.filter(u=>{const y=this.watchers.get(u.path);return y?!(0,A.patternsEquals)(y.request.excludes,u.excludes)||!(0,A.patternsEquals)(y.request.includes,u.includes):!0}),w=Array.from(this.watchers.values()).filter(({request:u})=>!m.find(y=>y.path===u.path&&(0,A.patternsEquals)(y.excludes,u.excludes)&&(0,A.patternsEquals)(y.includes,u.includes))).map(({request:u})=>u.path);g.length&&this.trace(`Request to start watching: ${g.map(u=>`${u.path} (excludes: ${u.excludes.length>0?u.excludes:"<none>"}, includes: ${u.includes&&u.includes.length>0?JSON.stringify(u.includes):"<all>"})`).join(",")}`),w.length&&this.trace(`Request to stop watching: ${w.join(",")}`);for(const u of w)this.stopWatching(u);for(const u of g)this.startWatching(u)}startWatching(d){const m=new D.NodeJSFileWatcherLibrary(d,w=>this._onDidChangeFile.fire(w),w=>this._onDidLogMessage.fire(w),this.verboseLogging),g={request:d,instance:m};this.watchers.set(d.path,g)}async stop(){for(const[d]of this.watchers)this.stopWatching(d);this.watchers.clear()}stopWatching(d){const m=this.watchers.get(d);m&&(this.watchers.delete(d),m.instance.dispose())}normalizeRequests(d){const m=new Map;for(const g of d){const w=O.isLinux?g.path:g.path.toLowerCase();m.set(w,g)}return Array.from(m.values())}async setVerboseLogging(d){this.verboseLogging=d;for(const[,m]of this.watchers)m.instance.setVerboseLogging(d)}trace(d){this.verboseLogging&&this._onDidLogMessage.fire({type:"trace",message:this.toMessage(d)})}toMessage(d,m){return m?`[File Watcher (node.js)] ${d} (path: ${m.request.path})`:`[File Watcher (node.js)] ${d}`}}e.NodeJSWatcher=P}),define(Z[215],ee([0,1,78,214]),function(H,e,b,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NodeJSWatcherClient=void 0;class n extends b.AbstractNonRecursiveWatcherClient{constructor(D,P,h){super(D,P,h),this.init()}createWatcher(){return new A.NodeJSWatcher}}e.NodeJSWatcherClient=n}),define(Z[216],ee([0,1,15,42,160,78]),function(H,e,b,A,n,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UniversalWatcherClient=void 0;class D extends O.AbstractUniversalWatcherClient{constructor(h,d,m){super(h,d,m),this.init()}createWatcher(h){const d=h.add(new n.Client(b.FileAccess.asFileUri("bootstrap-fork").fsPath,{serverName:"File Watcher",args:["--type=fileWatcher"],env:{VSCODE_AMD_ENTRYPOINT:"vs/platform/files/node/watcher/watcherMain",VSCODE_PIPE_LOGGING:"true",VSCODE_VERBOSE_LOGGING:"true"}}));return h.add(d.onDidProcessExit(({code:m,signal:g})=>this.onError(`terminated by itself with code ${m}, signal: ${g}`))),A.ProxyChannel.toService((0,A.getNextTickChannel)(d.getChannel("watcher")))}}e.UniversalWatcherClient=D}),define(Z[94],ee([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ServiceCollection=void 0;class b{constructor(...n){this._entries=new Map;for(const[O,D]of n)this.set(O,D)}set(n,O){const D=this._entries.get(n);return this._entries.set(n,O),D}has(n){return this._entries.has(n)}get(n){return this._entries.get(n)}}e.ServiceCollection=b}),define(Z[217],ee([0,1,8,13,2,76,208,6,94,103]),function(H,e,b,A,n,O,D,P,h,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Trace=e.InstantiationService=void 0;const m=!1;class g extends Error{constructor(l){super("cyclic dependency between services"),this.message=l.findCycleSlow()??`UNABLE to detect cycle, dumping graph: 
${l.toString()}`}}class w{constructor(l=new h.ServiceCollection,v=!1,c,f=m){this._services=l,this._strict=v,this._parent=c,this._enableTracing=f,this._activeInstantiations=new Set,this._services.set(P.IInstantiationService,this),this._globalGraph=f?c?._globalGraph??new D.Graph(I=>I):void 0}createChild(l){return new w(l,this._strict,this,this._enableTracing)}invokeFunction(l,...v){const c=y.traceInvocation(this._enableTracing,l);let f=!1;try{return l({get:S=>{if(f)throw(0,A.illegalState)("service accessor is only valid during the invocation of its target method");const t=this._getOrCreateServiceInstance(S,c);if(!t)throw new Error(`[invokeFunction] unknown service '${S}'`);return t}},...v)}finally{f=!0,c.stop()}}createInstance(l,...v){let c,f;return l instanceof O.SyncDescriptor?(c=y.traceCreation(this._enableTracing,l.ctor),f=this._createInstance(l.ctor,l.staticArguments.concat(v),c)):(c=y.traceCreation(this._enableTracing,l),f=this._createInstance(l,v,c)),c.stop(),f}_createInstance(l,v=[],c){const f=P._util.getServiceDependencies(l).sort((t,a)=>t.index-a.index),I=[];for(const t of f){const a=this._getOrCreateServiceInstance(t.id,c);a||this._throwIfStrict(`[createInstance] ${l.name} depends on UNKNOWN service ${t.id}.`,!1),I.push(a)}const S=f.length>0?f[0].index:v.length;if(v.length!==S){console.trace(`[createInstance] First service dependency of ${l.name} at position ${S+1} conflicts with ${v.length} static arguments`);const t=S-v.length;t>0?v=v.concat(new Array(t)):v=v.slice(0,S)}return Reflect.construct(l,v.concat(I))}_setServiceInstance(l,v){if(this._services.get(l)instanceof O.SyncDescriptor)this._services.set(l,v);else if(this._parent)this._parent._setServiceInstance(l,v);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(l){const v=this._services.get(l);return!v&&this._parent?this._parent._getServiceInstanceOrDescriptor(l):v}_getOrCreateServiceInstance(l,v){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(l));const c=this._getServiceInstanceOrDescriptor(l);return c instanceof O.SyncDescriptor?this._safeCreateAndCacheServiceInstance(l,c,v.branch(l,!0)):(v.branch(l,!1),c)}_safeCreateAndCacheServiceInstance(l,v,c){if(this._activeInstantiations.has(l))throw new Error(`illegal state - RECURSIVELY instantiating service '${l}'`);this._activeInstantiations.add(l);try{return this._createAndCacheServiceInstance(l,v,c)}finally{this._activeInstantiations.delete(l)}}_createAndCacheServiceInstance(l,v,c){const f=new D.Graph(t=>t.id.toString());let I=0;const S=[{id:l,desc:v,_trace:c}];for(;S.length;){const t=S.pop();if(f.lookupOrInsertNode(t),I++>1e3)throw new g(f);for(const a of P._util.getServiceDependencies(t.desc.ctor)){const s=this._getServiceInstanceOrDescriptor(a.id);if(s||this._throwIfStrict(`[createInstance] ${l} depends on ${a.id} which is NOT registered.`,!0),this._globalGraph?.insertEdge(String(t.id),String(a.id)),s instanceof O.SyncDescriptor){const i={id:a.id,desc:s,_trace:t._trace.branch(a.id,!0)};f.insertEdge(t,i),S.push(i)}}}for(;;){const t=f.roots();if(t.length===0){if(!f.isEmpty())throw new g(f);break}for(const{data:a}of t){if(this._getServiceInstanceOrDescriptor(a.id)instanceof O.SyncDescriptor){const i=this._createServiceInstanceWithOwner(a.id,a.desc.ctor,a.desc.staticArguments,a.desc.supportsDelayedInstantiation,a._trace);this._setServiceInstance(a.id,i)}f.removeNode(a)}}return this._getServiceInstanceOrDescriptor(l)}_createServiceInstanceWithOwner(l,v,c=[],f,I){if(this._services.get(l)instanceof O.SyncDescriptor)return this._createServiceInstance(l,v,c,f,I);if(this._parent)return this._parent._createServiceInstanceWithOwner(l,v,c,f,I);throw new Error(`illegalState - creating UNKNOWN service instance ${v.name}`)}_createServiceInstance(l,v,c=[],f,I){if(f){const S=new w(void 0,this._strict,this,this._enableTracing);S._globalGraphImplicitDependency=String(l);const t=new Map,a=new b.IdleValue(()=>{const s=S._createInstance(v,c,I);for(const[i,r]of t){const o=s[i];if(typeof o=="function")for(const p of r)o.apply(s,p)}return t.clear(),s});return new Proxy(Object.create(null),{get(s,i){if(!a.isInitialized&&typeof i=="string"&&(i.startsWith("onDid")||i.startsWith("onWill"))){let p=t.get(i);return p||(p=new d.LinkedList,t.set(i,p)),(M,C,L)=>{const T=p.push([M,C,L]);return(0,n.toDisposable)(T)}}if(i in s)return s[i];const r=a.value;let o=r[i];return typeof o!="function"||(o=o.bind(r),s[i]=o),o},set(s,i,r){return a.value[i]=r,!0},getPrototypeOf(s){return v.prototype}})}else return this._createInstance(v,c,I)}_throwIfStrict(l,v){if(v&&console.warn(l),this._strict)throw new Error(l)}}e.InstantiationService=w;var u;(function(E){E[E.None=0]="None",E[E.Creation=1]="Creation",E[E.Invocation=2]="Invocation",E[E.Branch=3]="Branch"})(u||(u={}));class y{static{this.all=new Set}static{this._None=new class extends y{constructor(){super(0,null)}stop(){}branch(){return this}}}static traceInvocation(l,v){return l?new y(2,v.name||new Error().stack.split(`
`).slice(3,4).join(`
`)):y._None}static traceCreation(l,v){return l?new y(1,v.name):y._None}static{this._totals=0}constructor(l,v){this.type=l,this.name=v,this._start=Date.now(),this._dep=[]}branch(l,v){const c=new y(3,l.toString());return this._dep.push([l,v,c]),c}stop(){const l=Date.now()-this._start;y._totals+=l;let v=!1;function c(I,S){const t=[],a=new Array(I+1).join("	");for(const[s,i,r]of S._dep)if(i&&r){v=!0,t.push(`${a}CREATES -> ${s}`);const o=c(I+1,r);o&&t.push(o)}else t.push(`${a}uses -> ${s}`);return t.join(`
`)}const f=[`${this.type===1?"CREATE":"CALL"} ${this.name}`,`${c(1,this)}`,`DONE, took ${l.toFixed(2)}ms (grand total ${y._totals.toFixed(2)}ms)`];(l>2||v)&&y.all.add(f.join(`
`))}}e.Trace=y}),define(Z[218],ee([0,1,6]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IIssueMainService=e.IssueType=void 0;var A;(function(n){n[n.Bug=0]="Bug",n[n.PerformanceIssue=1]="PerformanceIssue",n[n.FeatureRequest=2]="FeatureRequest"})(A||(e.IssueType=A={})),e.IIssueMainService=(0,b.createDecorator)("issueService")}),define(Z[5],ee([0,1,50,3,57,2,35,4,19,12,7,116,6]),function(H,e,b,A,n,O,D,P,h,d,m,g,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CONTEXT_LOG_LEVEL=e.parseLogLevel=e.LogLevelToString=e.getLogLevel=e.NullLogService=e.NullLogger=e.AbstractLoggerService=e.MultiplexLogger=e.AdapterLogger=e.ConsoleLogger=e.ConsoleMainLogger=e.AbstractMessageLogger=e.AbstractLogger=e.log=e.DEFAULT_LOG_LEVEL=e.LogLevel=e.isLogLevel=e.ILoggerService=e.ILogService=void 0,e.ILogService=(0,w.createDecorator)("logService"),e.ILoggerService=(0,w.createDecorator)("loggerService");function u(){return new Date().toISOString()}function y(M){return(0,d.isNumber)(M)}e.isLogLevel=y;var E;(function(M){M[M.Off=0]="Off",M[M.Trace=1]="Trace",M[M.Debug=2]="Debug",M[M.Info=3]="Info",M[M.Warning=4]="Warning",M[M.Error=5]="Error"})(E||(e.LogLevel=E={})),e.DEFAULT_LOG_LEVEL=E.Info;function l(M,C,L){switch(C){case E.Trace:M.trace(L);break;case E.Debug:M.debug(L);break;case E.Info:M.info(L);break;case E.Warning:M.warn(L);break;case E.Error:M.error(L);break;case E.Off:break;default:throw new Error(`Invalid log level ${C}`)}}e.log=l;function v(M,C=!1){let L="";for(let T=0;T<M.length;T++){let F=M[T];if(F instanceof Error&&(F=(0,b.toErrorMessage)(F,C)),typeof F=="object")try{F=JSON.stringify(F)}catch{}L+=(T>0?" ":"")+F}return L}class c extends O.Disposable{constructor(){super(...arguments),this.level=e.DEFAULT_LOG_LEVEL,this._onDidChangeLogLevel=this._register(new A.Emitter),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event}setLevel(C){this.level!==C&&(this.level=C,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}checkLogLevel(C){return this.level!==E.Off&&this.level<=C}}e.AbstractLogger=c;class f extends c{constructor(C){super(),this.logAlways=C}checkLogLevel(C){return this.logAlways||super.checkLogLevel(C)}trace(C,...L){this.checkLogLevel(E.Trace)&&this.log(E.Trace,v([C,...L],!0))}debug(C,...L){this.checkLogLevel(E.Debug)&&this.log(E.Debug,v([C,...L]))}info(C,...L){this.checkLogLevel(E.Info)&&this.log(E.Info,v([C,...L]))}warn(C,...L){this.checkLogLevel(E.Warning)&&this.log(E.Warning,v([C,...L]))}error(C,...L){if(this.checkLogLevel(E.Error))if(C instanceof Error){const T=Array.prototype.slice.call(arguments);T[0]=C.stack,this.log(E.Error,v(T))}else this.log(E.Error,v([C,...L]))}flush(){}}e.AbstractMessageLogger=f;class I extends c{constructor(C=e.DEFAULT_LOG_LEVEL){super(),this.setLevel(C),this.useColors=!P.isWindows}trace(C,...L){this.checkLogLevel(E.Trace)&&(this.useColors?console.log(`\x1B[90m[main ${u()}]\x1B[0m`,C,...L):console.log(`[main ${u()}]`,C,...L))}debug(C,...L){this.checkLogLevel(E.Debug)&&(this.useColors?console.log(`\x1B[90m[main ${u()}]\x1B[0m`,C,...L):console.log(`[main ${u()}]`,C,...L))}info(C,...L){this.checkLogLevel(E.Info)&&(this.useColors?console.log(`\x1B[90m[main ${u()}]\x1B[0m`,C,...L):console.log(`[main ${u()}]`,C,...L))}warn(C,...L){this.checkLogLevel(E.Warning)&&(this.useColors?console.warn(`\x1B[93m[main ${u()}]\x1B[0m`,C,...L):console.warn(`[main ${u()}]`,C,...L))}error(C,...L){this.checkLogLevel(E.Error)&&(this.useColors?console.error(`\x1B[91m[main ${u()}]\x1B[0m`,C,...L):console.error(`[main ${u()}]`,C,...L))}dispose(){}flush(){}}e.ConsoleMainLogger=I;class S extends c{constructor(C=e.DEFAULT_LOG_LEVEL,L=!0){super(),this.useColors=L,this.setLevel(C)}trace(C,...L){this.checkLogLevel(E.Trace)&&(this.useColors?console.log("%cTRACE","color: #888",C,...L):console.log(C,...L))}debug(C,...L){this.checkLogLevel(E.Debug)&&(this.useColors?console.log("%cDEBUG","background: #eee; color: #888",C,...L):console.log(C,...L))}info(C,...L){this.checkLogLevel(E.Info)&&(this.useColors?console.log("%c INFO","color: #33f",C,...L):console.log(C,...L))}warn(C,...L){this.checkLogLevel(E.Warning)&&(this.useColors?console.log("%c WARN","color: #993",C,...L):console.log(C,...L))}error(C,...L){this.checkLogLevel(E.Error)&&(this.useColors?console.log("%c  ERR","color: #f33",C,...L):console.error(C,...L))}dispose(){}flush(){}}e.ConsoleLogger=S;class t extends c{constructor(C,L=e.DEFAULT_LOG_LEVEL){super(),this.adapter=C,this.setLevel(L)}trace(C,...L){this.checkLogLevel(E.Trace)&&this.adapter.log(E.Trace,[this.extractMessage(C),...L])}debug(C,...L){this.checkLogLevel(E.Debug)&&this.adapter.log(E.Debug,[this.extractMessage(C),...L])}info(C,...L){this.checkLogLevel(E.Info)&&this.adapter.log(E.Info,[this.extractMessage(C),...L])}warn(C,...L){this.checkLogLevel(E.Warning)&&this.adapter.log(E.Warning,[this.extractMessage(C),...L])}error(C,...L){this.checkLogLevel(E.Error)&&this.adapter.log(E.Error,[this.extractMessage(C),...L])}extractMessage(C){return typeof C=="string"?C:(0,b.toErrorMessage)(C,this.checkLogLevel(E.Trace))}dispose(){}flush(){}}e.AdapterLogger=t;class a extends c{constructor(C){super(),this.loggers=C,C.length&&this.setLevel(C[0].getLevel())}setLevel(C){for(const L of this.loggers)L.setLevel(C);super.setLevel(C)}trace(C,...L){for(const T of this.loggers)T.trace(C,...L)}debug(C,...L){for(const T of this.loggers)T.debug(C,...L)}info(C,...L){for(const T of this.loggers)T.info(C,...L)}warn(C,...L){for(const T of this.loggers)T.warn(C,...L)}error(C,...L){for(const T of this.loggers)T.error(C,...L)}flush(){for(const C of this.loggers)C.flush()}dispose(){for(const C of this.loggers)C.dispose()}}e.MultiplexLogger=a;class s extends O.Disposable{constructor(C,L,T){if(super(),this.logLevel=C,this.logsHome=L,this._loggers=new D.ResourceMap,this._onDidChangeLoggers=this._register(new A.Emitter),this.onDidChangeLoggers=this._onDidChangeLoggers.event,this._onDidChangeLogLevel=this._register(new A.Emitter),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event,this._onDidChangeVisibility=this._register(new A.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,T)for(const F of T)this._loggers.set(F.resource,{logger:void 0,info:F})}getLoggerEntry(C){return(0,d.isString)(C)?[...this._loggers.values()].find(L=>L.info.id===C):this._loggers.get(C)}getLogger(C){return this.getLoggerEntry(C)?.logger}createLogger(C,L){const T=this.toResource(C),F=(0,d.isString)(C)?C:L?.id??(0,n.hash)(T.toString()).toString(16);let z=this._loggers.get(T)?.logger;const oe=L?.logLevel==="always"?E.Trace:L?.logLevel;z||(z=this.doCreateLogger(T,oe??this.getLogLevel(T)??this.logLevel,{...L,id:F}));const ne={logger:z,info:{resource:T,id:F,logLevel:oe,name:L?.name,hidden:L?.hidden,extensionId:L?.extensionId,when:L?.when}};return this.registerLogger(ne.info),this._loggers.set(T,ne),z}toResource(C){return(0,d.isString)(C)?(0,h.joinPath)(this.logsHome,`${C}.log`):C}setLogLevel(C,L){if(m.URI.isUri(C)){const T=C,F=L,z=this._loggers.get(T);z&&F!==z.info.logLevel&&(z.info.logLevel=F===this.logLevel?void 0:F,z.logger?.setLevel(F),this._loggers.set(z.info.resource,z),this._onDidChangeLogLevel.fire([T,F]))}else{this.logLevel=C;for(const[T,F]of this._loggers.entries())this._loggers.get(T)?.info.logLevel===void 0&&F.logger?.setLevel(this.logLevel);this._onDidChangeLogLevel.fire(this.logLevel)}}setVisibility(C,L){const T=this.getLoggerEntry(C);T&&L!==!T.info.hidden&&(T.info.hidden=!L,this._loggers.set(T.info.resource,T),this._onDidChangeVisibility.fire([T.info.resource,L]))}getLogLevel(C){let L;return C&&(L=this._loggers.get(C)?.info.logLevel),L??this.logLevel}registerLogger(C){const L=this._loggers.get(C.resource);L?L.info.hidden!==C.hidden&&this.setVisibility(C.resource,!C.hidden):(this._loggers.set(C.resource,{info:C,logger:void 0}),this._onDidChangeLoggers.fire({added:[C],removed:[]}))}deregisterLogger(C){const L=this._loggers.get(C);L&&(L.logger&&L.logger.dispose(),this._loggers.delete(C),this._onDidChangeLoggers.fire({added:[],removed:[L.info]}))}*getRegisteredLoggers(){for(const C of this._loggers.values())yield C.info}getRegisteredLogger(C){return this._loggers.get(C)?.info}dispose(){this._loggers.forEach(C=>C.logger?.dispose()),this._loggers.clear(),super.dispose()}}e.AbstractLoggerService=s;class i{constructor(){this.onDidChangeLogLevel=new A.Emitter().event}setLevel(C){}getLevel(){return E.Info}trace(C,...L){}debug(C,...L){}info(C,...L){}warn(C,...L){}error(C,...L){}critical(C,...L){}dispose(){}flush(){}}e.NullLogger=i;class r extends i{}e.NullLogService=r;function o(M){if(M.verbose)return E.Trace;if(typeof M.logLevel=="string"){const C=k(M.logLevel.toLowerCase());if(C!==void 0)return C}return e.DEFAULT_LOG_LEVEL}e.getLogLevel=o;function p(M){switch(M){case E.Trace:return"trace";case E.Debug:return"debug";case E.Info:return"info";case E.Warning:return"warn";case E.Error:return"error";case E.Off:return"off"}}e.LogLevelToString=p;function k(M){switch(M){case"trace":return E.Trace;case"debug":return E.Debug;case"info":return E.Info;case"warn":return E.Warning;case"error":return E.Error;case"critical":return E.Error;case"off":return E.Off}}e.parseLogLevel=k,e.CONTEXT_LOG_LEVEL=new g.RawContextKey("logLevel",p(E.Info))});var Y=this&&this.__param||function(H,e){return function(b,A){e(b,A,H)}};define(Z[219],ee([0,1,77,3,2,5,4,8]),function(H,e,b,A,n,O,D,P){"use strict";var h;Object.defineProperty(e,"__esModule",{value:!0}),e.BaseCredentialsMainService=void 0;let d=class extends n.Disposable{static{h=this}static{this.MAX_PASSWORD_LENGTH=2500}static{this.PASSWORD_CHUNK_SIZE=h.MAX_PASSWORD_LENGTH-100}constructor(g){super(),this.logService=g,this._onDidChangePassword=this._register(new A.Emitter),this.onDidChangePassword=this._onDidChangePassword.event,this._sequencer=new P.SequencerByKey}async getPassword(g,w){this.logService.trace("Going to get password from keytar:",g,w);let u;try{u=await this.withKeytar()}catch{return null}return await this._sequencer.queue(g+w,()=>this.doGetPassword(u,g,w))}async doGetPassword(g,w,u){this.logService.trace("Doing get password from keytar:",w,u);const y=await(0,P.retry)(()=>g.getPassword(w,u),50,3);if(!y)return this.logService.trace("Did not get a password from keytar for account:",u),y;let E,l;try{const v=JSON.parse(y);E=v.content,l=v.hasNextChunk}catch{}if(!E||!l)return this.logService.trace("Got password from keytar for account:",u),y;try{let v=1;for(;l;){const c=await(0,P.retry)(()=>g.getPassword(w,`${u}-${v}`),50,3),f=JSON.parse(c);E+=f.content,l=f.hasNextChunk,v++}return this.logService.trace(`Got ${v}-chunked password from keytar for account:`,u),E}catch(v){return this.logService.error(v),y}}async setPassword(g,w,u){this.logService.trace("Going to set password using keytar:",g,w);let y;try{y=await this.withKeytar()}catch(E){throw this.surfaceKeytarLoadError?.(E),E}await this._sequencer.queue(g+w,()=>this.doSetPassword(y,g,w,u)),this._onDidChangePassword.fire({service:g,account:w})}async doSetPassword(g,w,u,y){if(this.logService.trace("Doing set password from keytar:",w,u),!D.isWindows){await(0,P.retry)(()=>g.setPassword(w,u,y),50,3),this.logService.trace("Set password from keytar for account:",u);return}if(await this.doDeletePassword(g,w,u),y.length<=h.PASSWORD_CHUNK_SIZE){await(0,P.retry)(()=>g.setPassword(w,u,y),50,3),this.logService.trace("Set password from keytar for account:",u);return}let E=0,l=0,v=!0;for(;v;){const c=y.substring(E,E+h.PASSWORD_CHUNK_SIZE);E+=h.PASSWORD_CHUNK_SIZE,v=y.length-E>0;const f={content:c,hasNextChunk:v};await(0,P.retry)(()=>g.setPassword(w,l?`${u}-${l}`:u,JSON.stringify(f)),50,3),l++}this.logService.trace(`Set${l?` ${l}-chunked`:""} password from keytar for account:`,u)}async deletePassword(g,w){this.logService.trace("Going to delete password using keytar:",g,w);let u;try{u=await this.withKeytar()}catch(E){throw this.surfaceKeytarLoadError?.(E),E}const y=await this._sequencer.queue(g+w,()=>this.doDeletePassword(u,g,w));return y&&this._onDidChangePassword.fire({service:g,account:w}),y}async doDeletePassword(g,w,u){this.logService.trace("Doing delete password from keytar:",w,u);const y=await g.getPassword(w,u);if(!y)return this.logService.trace("Did not get a password to delete from keytar for account:",u),!1;let E,l;try{const c=JSON.parse(y);E=c.content,l=c.hasNextChunk}catch{}let v=0;if(E&&l)try{for(v++;l;){const c=`${u}-${v}`,f=await g.getPassword(w,c);await g.deletePassword(w,c),l=JSON.parse(f).hasNextChunk,v++}}catch(c){this.logService.error(c)}return await g.deletePassword(w,u)?(this.logService.trace(`Deleted${v?` ${v}-chunked`:""} password from keytar for account:`,u),!0):(this.logService.trace(`Keytar failed to delete${v?` ${v}-chunked`:""} password for account:`,u),!1)}async findPassword(g){let w;try{w=await this.withKeytar()}catch{return null}return await w.findPassword(g)}async findCredentials(g){let w;try{w=await this.withKeytar()}catch{return[]}return await w.findCredentials(g)}clear(){return this._keytarCache instanceof b.InMemoryCredentialsProvider?this._keytarCache.clear():Promise.resolve()}};e.BaseCredentialsMainService=d,e.BaseCredentialsMainService=d=h=be([Y(0,O.ILogService)],d)}),define(Z[220],ee([0,1,14,4,5]),function(H,e,b,A,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EncryptionMainService=void 0;const O=b.safeStorage;let D=class{constructor(h,d){this.machineId=h,this.logService=d,b.app.commandLine.getSwitchValue("password-store")==="basic"&&O.setUsePlainTextEncryption?.(!0)}async encrypt(h){this.logService.trace("[EncryptionMainService] Encrypting value.");try{const d=JSON.stringify(O.encryptString(h));return this.logService.trace("[EncryptionMainService] Encrypted value."),d}catch(d){throw this.logService.error(d),d}}async decrypt(h){let d;try{if(d=JSON.parse(h),!d.data)return this.logService.trace("[EncryptionMainService] Unable to parse encrypted value. Attempting old decryption."),this.oldDecrypt(h)}catch(g){return this.logService.trace("[EncryptionMainService] Unable to parse encrypted value. Attempting old decryption.",g),this.oldDecrypt(h)}const m=Buffer.from(d.data);this.logService.trace("[EncryptionMainService] Decrypting value.");try{const g=O.decryptString(m);return this.logService.trace("[EncryptionMainService] Decrypted value."),g}catch(g){throw this.logService.error(g),g}}isEncryptionAvailable(){return Promise.resolve(O.isEncryptionAvailable())}getKeyStorageProvider(){if(A.isWindows)return Promise.resolve("dpapi");if(A.isMacintosh)return Promise.resolve("keychain_access");if(O.getSelectedStorageBackend)try{const h=O.getSelectedStorageBackend();return Promise.resolve(h)}catch(h){this.logService.error(h)}return Promise.resolve("unknown")}async setUsePlainTextEncryption(){if(A.isWindows)throw new Error("Setting plain text encryption is not supported on Windows.");if(A.isMacintosh)throw new Error("Setting plain text encryption is not supported on macOS.");if(!O.setUsePlainTextEncryption)throw new Error("Setting plain text encryption is not supported.");O.setUsePlainTextEncryption(!0)}async oldDecrypt(h){let d;try{d=await new Promise((m,g)=>H(["vscode-encrypt"],m,g))}catch{return h}try{return d.decrypt(this.machineId,h)}catch(m){return this.logService.error(m),h}}};e.EncryptionMainService=D,e.EncryptionMainService=D=be([Y(1,n.ILogService)],D)}),define(Z[221],ee([0,1,24,8,13,3,2,10,78,5]),function(H,e,b,A,n,O,D,P,h,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractDiskFileSystemProvider=void 0;class m extends D.Disposable{constructor(w,u){super(),this.logService=w,this.options=u,this._onDidChangeFile=this._register(new O.Emitter),this.onDidChangeFile=this._onDidChangeFile.event,this._onDidWatchError=this._register(new O.Emitter),this.onDidWatchError=this._onDidWatchError.event,this.universalPathsToWatch=[],this.universalWatchRequestDelayer=this._register(new A.ThrottledDelayer(0)),this.nonRecursivePathsToWatch=[],this.nonRecursiveWatchRequestDelayer=this._register(new A.ThrottledDelayer(0))}watch(w,u){return u.recursive||this.options?.watcher?.forceUniversal?this.watchUniversal(w,u):this.watchNonRecursive(w,u)}watchUniversal(w,u){const y={path:this.toFilePath(w),excludes:u.excludes,includes:u.includes,recursive:u.recursive},E=(0,b.insert)(this.universalPathsToWatch,y);return this.refreshUniversalWatchers(),(0,D.toDisposable)(()=>{E(),this.refreshUniversalWatchers()})}refreshUniversalWatchers(){this.universalWatchRequestDelayer.trigger(()=>this.doRefreshUniversalWatchers()).catch(w=>(0,n.onUnexpectedError)(w))}doRefreshUniversalWatchers(){this.universalWatcher||(this.universalWatcher=this._register(this.createUniversalWatcher(u=>this._onDidChangeFile.fire((0,h.toFileChanges)(u)),u=>this.onWatcherLogMessage(u),this.logService.getLevel()===d.LogLevel.Trace)),this._register(this.logService.onDidChangeLogLevel(()=>{this.universalWatcher?.setVerboseLogging(this.logService.getLevel()===d.LogLevel.Trace)})));const w=this.options?.watcher?.recursive?.usePolling;if(w===!0)for(const u of this.universalPathsToWatch)(0,h.isRecursiveWatchRequest)(u)&&(u.pollingInterval=this.options?.watcher?.recursive?.pollingInterval??5e3);else if(Array.isArray(w))for(const u of this.universalPathsToWatch)(0,h.isRecursiveWatchRequest)(u)&&w.includes(u.path)&&(u.pollingInterval=this.options?.watcher?.recursive?.pollingInterval??5e3);return this.universalWatcher.watch(this.universalPathsToWatch)}watchNonRecursive(w,u){const y={path:this.toFilePath(w),excludes:u.excludes,includes:u.includes,recursive:!1},E=(0,b.insert)(this.nonRecursivePathsToWatch,y);return this.refreshNonRecursiveWatchers(),(0,D.toDisposable)(()=>{E(),this.refreshNonRecursiveWatchers()})}refreshNonRecursiveWatchers(){this.nonRecursiveWatchRequestDelayer.trigger(()=>this.doRefreshNonRecursiveWatchers()).catch(w=>(0,n.onUnexpectedError)(w))}doRefreshNonRecursiveWatchers(){return this.nonRecursiveWatcher||(this.nonRecursiveWatcher=this._register(this.createNonRecursiveWatcher(w=>this._onDidChangeFile.fire((0,h.toFileChanges)(w)),w=>this.onWatcherLogMessage(w),this.logService.getLevel()===d.LogLevel.Trace)),this._register(this.logService.onDidChangeLogLevel(()=>{this.nonRecursiveWatcher?.setVerboseLogging(this.logService.getLevel()===d.LogLevel.Trace)}))),this.nonRecursiveWatcher.watch(this.nonRecursivePathsToWatch)}onWatcherLogMessage(w){w.type==="error"&&this._onDidWatchError.fire(w.message),this.logService[w.type](w.message)}toFilePath(w){return(0,P.normalize)(w.fsPath)}}e.AbstractDiskFileSystemProvider=m}),define(Z[222],ee([0,1,24,8,17,23,3,57,69,2,58,15,65,19,56,175,16,120,5,13]),function(H,e,b,A,n,O,D,P,h,d,m,g,w,u,y,E,l,v,c,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileService=void 0;let I=class extends d.Disposable{constructor(t){super(),this.logService=t,this.BUFFER_SIZE=256*1024,this._onDidChangeFileSystemProviderRegistrations=this._register(new D.Emitter),this.onDidChangeFileSystemProviderRegistrations=this._onDidChangeFileSystemProviderRegistrations.event,this._onWillActivateFileSystemProvider=this._register(new D.Emitter),this.onWillActivateFileSystemProvider=this._onWillActivateFileSystemProvider.event,this._onDidChangeFileSystemProviderCapabilities=this._register(new D.Emitter),this.onDidChangeFileSystemProviderCapabilities=this._onDidChangeFileSystemProviderCapabilities.event,this.provider=new Map,this._onDidRunOperation=this._register(new D.Emitter),this.onDidRunOperation=this._onDidRunOperation.event,this._onDidFilesChange=this._register(new D.Emitter),this.onDidFilesChange=this._onDidFilesChange.event,this._onDidWatchError=this._register(new D.Emitter),this.onDidWatchError=this._onDidWatchError.event,this.activeWatchers=new Map,this.writeQueue=this._register(new A.ResourceQueue)}registerProvider(t,a){if(this.provider.has(t))throw new Error(`A filesystem provider for the scheme '${t}' is already registered.`);(0,w.mark)(`code/registerFilesystem/${t}`);const s=new d.DisposableStore;return this.provider.set(t,a),this._onDidChangeFileSystemProviderRegistrations.fire({added:!0,scheme:t,provider:a}),s.add(a.onDidChangeFile(i=>this._onDidFilesChange.fire(new l.FileChangesEvent(i,!this.isPathCaseSensitive(a))))),typeof a.onDidWatchError=="function"&&s.add(a.onDidWatchError(i=>this._onDidWatchError.fire(new Error(i)))),s.add(a.onDidChangeCapabilities(()=>this._onDidChangeFileSystemProviderCapabilities.fire({provider:a,scheme:t}))),(0,d.toDisposable)(()=>{this._onDidChangeFileSystemProviderRegistrations.fire({added:!1,scheme:t,provider:a}),this.provider.delete(t),(0,d.dispose)(s)})}getProvider(t){return this.provider.get(t)}async activateProvider(t){const a=[];this._onWillActivateFileSystemProvider.fire({scheme:t,join(s){a.push(s)}}),!this.provider.has(t)&&await A.Promises.settled(a)}async canHandleResource(t){return await this.activateProvider(t.scheme),this.hasProvider(t)}hasProvider(t){return this.provider.has(t.scheme)}hasCapability(t,a){const s=this.provider.get(t.scheme);return!!(s&&s.capabilities&a)}listCapabilities(){return h.Iterable.map(this.provider,([t,a])=>({scheme:t,capabilities:a.capabilities}))}async withProvider(t){if(!(0,u.isAbsolutePath)(t))throw new l.FileOperationError((0,E.localize)(0,null,this.resourceForError(t)),8);await this.activateProvider(t.scheme);const a=this.provider.get(t.scheme);if(!a){const s=new f.ErrorNoTelemetry;throw s.message=(0,E.localize)(1,null,t.toString()),s}return a}async withReadProvider(t){const a=await this.withProvider(t);if((0,l.hasOpenReadWriteCloseCapability)(a)||(0,l.hasReadWriteCapability)(a)||(0,l.hasFileReadStreamCapability)(a))return a;throw new Error(`Filesystem provider for scheme '${t.scheme}' neither has FileReadWrite, FileReadStream nor FileOpenReadWriteClose capability which is needed for the read operation.`)}async withWriteProvider(t){const a=await this.withProvider(t);if((0,l.hasOpenReadWriteCloseCapability)(a)||(0,l.hasReadWriteCapability)(a))return a;throw new Error(`Filesystem provider for scheme '${t.scheme}' neither has FileReadWrite nor FileOpenReadWriteClose capability which is needed for the write operation.`)}async resolve(t,a){try{return await this.doResolveFile(t,a)}catch(s){throw(0,l.toFileSystemProviderErrorCode)(s)===l.FileSystemProviderErrorCode.FileNotFound?new l.FileOperationError((0,E.localize)(2,null,this.resourceForError(t)),1):(0,l.ensureFileSystemProviderError)(s)}}async doResolveFile(t,a){const s=await this.withProvider(t),i=this.isPathCaseSensitive(s),r=a?.resolveTo,o=a?.resolveSingleChildDescendants,p=a?.resolveMetadata,k=await s.stat(t);let M;return this.toFileStat(s,t,k,void 0,!!p,(C,L)=>(M||(M=m.TernarySearchTree.forUris(()=>!i),M.set(t,!0),r&&M.fill(!0,r)),M.get(C.resource)||M.findSuperstr(C.resource.with({query:null,fragment:null}))?!0:C.isDirectory&&o?L===1:!1))}async toFileStat(t,a,s,i,r,o){const{providerExtUri:p}=this.getExtUri(t),k={resource:a,name:p.basename(a),isFile:(s.type&l.FileType.File)!==0,isDirectory:(s.type&l.FileType.Directory)!==0,isSymbolicLink:(s.type&l.FileType.SymbolicLink)!==0,mtime:s.mtime,ctime:s.ctime,size:s.size,readonly:!!((s.permissions??0)&l.FilePermission.Readonly)||!!(t.capabilities&2048),locked:!!((s.permissions??0)&l.FilePermission.Locked),etag:(0,l.etag)({mtime:s.mtime,size:s.size}),children:void 0};if(k.isDirectory&&o(k,i)){try{const M=await t.readdir(a),C=await A.Promises.settled(M.map(async([L,T])=>{try{const F=p.joinPath(a,L),z=r?await t.stat(F):{type:T};return await this.toFileStat(t,F,z,M.length,r,o)}catch(F){return this.logService.trace(F),null}}));k.children=(0,b.coalesce)(C)}catch(M){this.logService.trace(M),k.children=[]}return k}return k}async resolveAll(t){return A.Promises.settled(t.map(async a=>{try{return{stat:await this.doResolveFile(a.resource,a.options),success:!0}}catch(s){return this.logService.trace(s),{stat:void 0,success:!1}}}))}async stat(t){const a=await this.withProvider(t),s=await a.stat(t);return this.toFileStat(a,t,s,void 0,!0,()=>!1)}async exists(t){const a=await this.withProvider(t);try{return!!await a.stat(t)}catch{return!1}}async canCreateFile(t,a){try{await this.doValidateCreateFile(t,a)}catch(s){return s}return!0}async doValidateCreateFile(t,a){if(!a?.overwrite&&await this.exists(t))throw new l.FileOperationError((0,E.localize)(3,null,this.resourceForError(t)),3,a)}async createFile(t,a=n.VSBuffer.fromString(""),s){await this.doValidateCreateFile(t,s);const i=await this.writeFile(t,a);return this._onDidRunOperation.fire(new l.FileOperationEvent(t,0,i)),i}async writeFile(t,a,s){const i=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(t),t),{providerExtUri:r}=this.getExtUri(i);try{await this.validateWriteFile(i,t,s)||await this.mkdirp(i,r.dirname(t));let p;if((0,l.hasReadWriteCapability)(i)&&!(a instanceof n.VSBuffer))if((0,y.isReadableStream)(a)){const k=await(0,y.peekStream)(a,3);k.ended?p=n.VSBuffer.concat(k.buffer):p=k}else p=(0,y.peekReadable)(a,k=>n.VSBuffer.concat(k),3);else p=a;if(!(0,l.hasOpenReadWriteCloseCapability)(i)||(0,l.hasReadWriteCapability)(i)&&p instanceof n.VSBuffer)await this.doWriteUnbuffered(i,t,s,p);else{const k=p instanceof n.VSBuffer?(0,n.bufferToReadable)(p):p;s?.atomic!==!1&&s?.atomic?.postfix?await this.doWriteBufferedAtomic(i,t,(0,u.joinPath)((0,u.dirname)(t),`${(0,u.basename)(t)}${s.atomic.postfix}`),s,k):await this.doWriteBuffered(i,t,s,k)}this._onDidRunOperation.fire(new l.FileOperationEvent(t,4))}catch(o){throw new l.FileOperationError((0,E.localize)(4,null,this.resourceForError(t),(0,l.ensureFileSystemProviderError)(o).toString()),(0,l.toFileOperationResult)(o),s)}return this.resolve(t,{resolveMetadata:!0})}async validateWriteFile(t,a,s){const i=!!s?.unlock;if(i&&!(t.capabilities&8192))throw new Error((0,E.localize)(5,null,this.resourceForError(a)));if(!!s?.atomic){if(!(t.capabilities&32768))throw new Error((0,E.localize)(6,null,this.resourceForError(a)));if(i)throw new Error((0,E.localize)(7,null,this.resourceForError(a)))}let o;try{o=await t.stat(a)}catch{return}if(o.type&l.FileType.Directory)throw new l.FileOperationError((0,E.localize)(8,null,this.resourceForError(a)),0,s);if(this.throwIfFileIsReadonly(a,o),typeof s?.mtime=="number"&&typeof s.etag=="string"&&s.etag!==l.ETAG_DISABLED&&typeof o.mtime=="number"&&typeof o.size=="number"&&s.mtime<o.mtime&&s.etag!==(0,l.etag)({mtime:s.mtime,size:o.size}))throw new l.FileOperationError((0,E.localize)(9,null),3,s);return o}async readFile(t,a,s){const i=await this.withReadProvider(t);return a?.atomic?this.doReadFileAtomic(i,t,a,s):this.doReadFile(i,t,a,s)}async doReadFileAtomic(t,a,s,i){return new Promise((r,o)=>{this.writeQueue.queueFor(a,this.getExtUri(t).providerExtUri).queue(async()=>{try{const p=await this.doReadFile(t,a,s,i);r(p)}catch(p){o(p)}})})}async doReadFile(t,a,s,i){const r=await this.doReadFileStream(t,a,{...s,preferUnbuffered:!0},i);return{...r,value:await(0,n.streamToBuffer)(r.value)}}async readFileStream(t,a,s){const i=await this.withReadProvider(t);return this.doReadFileStream(i,t,a,s)}async doReadFileStream(t,a,s,i){const r=new O.CancellationTokenSource(i),o=this.validateReadFile(a,s).then(k=>k,k=>{throw r.cancel(),k});let p;try{return typeof s?.etag=="string"&&s.etag!==l.ETAG_DISABLED&&await o,s?.atomic&&(0,l.hasFileAtomicReadCapability)(t)||!((0,l.hasOpenReadWriteCloseCapability)(t)||(0,l.hasFileReadStreamCapability)(t))||(0,l.hasReadWriteCapability)(t)&&s?.preferUnbuffered?p=this.readFileUnbuffered(t,a,s):(0,l.hasFileReadStreamCapability)(t)?p=this.readFileStreamed(t,a,r.token,s):p=this.readFileBuffered(t,a,r.token,s),{...await o,value:p}}catch(k){throw p&&await(0,y.consumeStream)(p),this.restoreReadError(k,a,s)}}restoreReadError(t,a,s){const i=(0,E.localize)(10,null,this.resourceForError(a),(0,l.ensureFileSystemProviderError)(t).toString());return t instanceof l.NotModifiedSinceFileOperationError?new l.NotModifiedSinceFileOperationError(i,t.stat,s):t instanceof l.TooLargeFileOperationError?new l.TooLargeFileOperationError(i,t.fileOperationResult,t.size,t.options):new l.FileOperationError(i,(0,l.toFileOperationResult)(t),s)}readFileStreamed(t,a,s,i=Object.create(null)){const r=t.readFileStream(a,i,s);return(0,y.transform)(r,{data:o=>o instanceof n.VSBuffer?o:n.VSBuffer.wrap(o),error:o=>this.restoreReadError(o,a,i)},o=>n.VSBuffer.concat(o))}readFileBuffered(t,a,s,i=Object.create(null)){const r=(0,n.newWriteableBufferStream)();return(0,v.readFileIntoStream)(t,a,r,o=>o,{...i,bufferSize:this.BUFFER_SIZE,errorTransformer:o=>this.restoreReadError(o,a,i)},s),r}readFileUnbuffered(t,a,s){const i=(0,y.newWriteableStream)(r=>n.VSBuffer.concat(r));return(async()=>{try{let r;s?.atomic&&(0,l.hasFileAtomicReadCapability)(t)?r=await t.readFile(a,{atomic:!0}):r=await t.readFile(a),typeof s?.position=="number"&&(r=r.slice(s.position)),typeof s?.length=="number"&&(r=r.slice(0,s.length)),this.validateReadFileLimits(a,r.byteLength,s),i.end(n.VSBuffer.wrap(r))}catch(r){i.error(r),i.end()}})(),i}async validateReadFile(t,a){const s=await this.resolve(t,{resolveMetadata:!0});if(s.isDirectory)throw new l.FileOperationError((0,E.localize)(11,null,this.resourceForError(t)),0,a);if(typeof a?.etag=="string"&&a.etag!==l.ETAG_DISABLED&&a.etag===s.etag)throw new l.NotModifiedSinceFileOperationError((0,E.localize)(12,null),s,a);return this.validateReadFileLimits(t,s.size,a),s}validateReadFileLimits(t,a,s){if(typeof s?.limits?.size=="number"&&a>s.limits.size)throw new l.TooLargeFileOperationError((0,E.localize)(13,null,this.resourceForError(t)),7,a,s)}async canMove(t,a,s){return this.doCanMoveCopy(t,a,"move",s)}async canCopy(t,a,s){return this.doCanMoveCopy(t,a,"copy",s)}async doCanMoveCopy(t,a,s,i){if(t.toString()!==a.toString())try{const r=s==="move"?this.throwIfFileSystemIsReadonly(await this.withWriteProvider(t),t):await this.withReadProvider(t),o=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(a),a);await this.doValidateMoveCopy(r,t,o,a,s,i)}catch(r){return r}return!0}async move(t,a,s){const i=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(t),t),r=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(a),a),o=await this.doMoveCopy(i,t,r,a,"move",!!s),p=await this.resolve(a,{resolveMetadata:!0});return this._onDidRunOperation.fire(new l.FileOperationEvent(t,o==="move"?2:3,p)),p}async copy(t,a,s){const i=await this.withReadProvider(t),r=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(a),a),o=await this.doMoveCopy(i,t,r,a,"copy",!!s),p=await this.resolve(a,{resolveMetadata:!0});return this._onDidRunOperation.fire(new l.FileOperationEvent(t,o==="copy"?3:2,p)),p}async doMoveCopy(t,a,s,i,r,o){if(a.toString()===i.toString())return r;const{exists:p,isSameResourceWithDifferentPathCase:k}=await this.doValidateMoveCopy(t,a,s,i,r,o);if(p&&!k&&o&&await this.del(i,{recursive:!0}),await this.mkdirp(s,this.getExtUri(s).providerExtUri.dirname(i)),r==="copy"){if(t===s&&(0,l.hasFileFolderCopyCapability)(t))await t.copy(a,i,{overwrite:o});else{const M=await this.resolve(a);M.isDirectory?await this.doCopyFolder(t,M,s,i):await this.doCopyFile(t,a,s,i)}return r}else return t===s?(await t.rename(a,i,{overwrite:o}),r):(await this.doMoveCopy(t,a,s,i,"copy",o),await this.del(a,{recursive:!0}),"copy")}async doCopyFile(t,a,s,i){if((0,l.hasOpenReadWriteCloseCapability)(t)&&(0,l.hasOpenReadWriteCloseCapability)(s))return this.doPipeBuffered(t,a,s,i);if((0,l.hasOpenReadWriteCloseCapability)(t)&&(0,l.hasReadWriteCapability)(s))return this.doPipeBufferedToUnbuffered(t,a,s,i);if((0,l.hasReadWriteCapability)(t)&&(0,l.hasOpenReadWriteCloseCapability)(s))return this.doPipeUnbufferedToBuffered(t,a,s,i);if((0,l.hasReadWriteCapability)(t)&&(0,l.hasReadWriteCapability)(s))return this.doPipeUnbuffered(t,a,s,i)}async doCopyFolder(t,a,s,i){await s.mkdir(i),Array.isArray(a.children)&&await A.Promises.settled(a.children.map(async r=>{const o=this.getExtUri(s).providerExtUri.joinPath(i,r.name);return r.isDirectory?this.doCopyFolder(t,await this.resolve(r.resource),s,o):this.doCopyFile(t,r.resource,s,o)}))}async doValidateMoveCopy(t,a,s,i,r,o){let p=!1;if(t===s){const{providerExtUri:M,isPathCaseSensitive:C}=this.getExtUri(t);if(C||(p=M.isEqual(a,i)),p&&r==="copy")throw new Error((0,E.localize)(14,null,this.resourceForError(a),this.resourceForError(i)));if(!p&&M.isEqualOrParent(i,a))throw new Error((0,E.localize)(15,null,this.resourceForError(a),this.resourceForError(i)))}const k=await this.exists(i);if(k&&!p){if(!o)throw new l.FileOperationError((0,E.localize)(16,null,this.resourceForError(a),this.resourceForError(i)),4);if(t===s){const{providerExtUri:M}=this.getExtUri(t);if(M.isEqualOrParent(a,i))throw new Error((0,E.localize)(17,null,this.resourceForError(a),this.resourceForError(i)))}}return{exists:k,isSameResourceWithDifferentPathCase:p}}getExtUri(t){const a=this.isPathCaseSensitive(t);return{providerExtUri:a?u.extUri:u.extUriIgnorePathCase,isPathCaseSensitive:a}}isPathCaseSensitive(t){return!!(t.capabilities&1024)}async createFolder(t){const a=this.throwIfFileSystemIsReadonly(await this.withProvider(t),t);await this.mkdirp(a,t);const s=await this.resolve(t,{resolveMetadata:!0});return this._onDidRunOperation.fire(new l.FileOperationEvent(t,0,s)),s}async mkdirp(t,a){const s=[],{providerExtUri:i}=this.getExtUri(t);for(;!i.isEqual(a,i.dirname(a));)try{if(!((await t.stat(a)).type&l.FileType.Directory))throw new Error((0,E.localize)(18,null,this.resourceForError(a)));break}catch(r){if((0,l.toFileSystemProviderErrorCode)(r)!==l.FileSystemProviderErrorCode.FileNotFound)throw r;s.push(i.basename(a)),a=i.dirname(a)}for(let r=s.length-1;r>=0;r--){a=i.joinPath(a,s[r]);try{await t.mkdir(a)}catch(o){if((0,l.toFileSystemProviderErrorCode)(o)!==l.FileSystemProviderErrorCode.FileExists)throw o}}}async canDelete(t,a){try{await this.doValidateDelete(t,a)}catch(s){return s}return!0}async doValidateDelete(t,a){const s=this.throwIfFileSystemIsReadonly(await this.withProvider(t),t),i=!!a?.useTrash;if(i&&!(s.capabilities&4096))throw new Error((0,E.localize)(19,null,this.resourceForError(t)));const r=a?.atomic;if(r&&!(s.capabilities&65536))throw new Error((0,E.localize)(20,null,this.resourceForError(t)));if(i&&r)throw new Error((0,E.localize)(21,null,this.resourceForError(t)));let o;try{o=await s.stat(t)}catch{}if(o)this.throwIfFileIsReadonly(t,o);else throw new l.FileOperationError((0,E.localize)(22,null,this.resourceForError(t)),1);if(!!!a?.recursive){const k=await this.resolve(t);if(k.isDirectory&&Array.isArray(k.children)&&k.children.length>0)throw new Error((0,E.localize)(23,null,this.resourceForError(t)))}return s}async del(t,a){const s=await this.doValidateDelete(t,a),i=!!a?.useTrash,r=!!a?.recursive,o=a?.atomic??!1;await s.delete(t,{recursive:r,useTrash:i,atomic:o}),this._onDidRunOperation.fire(new l.FileOperationEvent(t,1))}async cloneFile(t,a){const s=await this.withProvider(t),i=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(a),a);if(s===i&&this.getExtUri(s).providerExtUri.isEqual(t,a))return;if(s===i&&(0,l.hasFileCloneCapability)(s))return s.cloneFile(t,a);await this.mkdirp(i,this.getExtUri(i).providerExtUri.dirname(a));const r=this.writeQueue.queueFor(t,this.getExtUri(s).providerExtUri);return s===i&&(0,l.hasFileFolderCopyCapability)(s)?r.queue(()=>s.copy(t,a,{overwrite:!0})):r.queue(()=>this.doCopyFile(s,t,i,a))}watch(t,a={recursive:!1,excludes:[]}){const s=new d.DisposableStore;let i=!1,r=()=>{i=!0};return s.add((0,d.toDisposable)(()=>r())),(async()=>{try{const o=await this.doWatch(t,a);i?(0,d.dispose)(o):r=()=>(0,d.dispose)(o)}catch(o){this.logService.error(o)}})(),s}async doWatch(t,a){const s=await this.withProvider(t),i=(0,P.hash)([this.getExtUri(s).providerExtUri.getComparisonKey(t),a]);let r=this.activeWatchers.get(i);return r||(r={count:0,disposable:s.watch(t,a)},this.activeWatchers.set(i,r)),r.count+=1,(0,d.toDisposable)(()=>{r&&(r.count--,r.count===0&&((0,d.dispose)(r.disposable),this.activeWatchers.delete(i)))})}dispose(){super.dispose();for(const[,t]of this.activeWatchers)(0,d.dispose)(t.disposable);this.activeWatchers.clear()}async doWriteBufferedAtomic(t,a,s,i,r){await this.doWriteBuffered(t,s,i,r);try{await t.rename(s,a,{overwrite:!0})}catch(o){try{await t.delete(s,{recursive:!1,useTrash:!1,atomic:!1})}catch{}throw o}}async doWriteBuffered(t,a,s,i){return this.writeQueue.queueFor(a,this.getExtUri(t).providerExtUri).queue(async()=>{const r=await t.open(a,{create:!0,unlock:s?.unlock??!1});try{(0,y.isReadableStream)(i)||(0,y.isReadableBufferedStream)(i)?await this.doWriteStreamBufferedQueued(t,r,i):await this.doWriteReadableBufferedQueued(t,r,i)}catch(o){throw(0,l.ensureFileSystemProviderError)(o)}finally{await t.close(r)}})}async doWriteStreamBufferedQueued(t,a,s){let i=0,r;if((0,y.isReadableBufferedStream)(s)){if(s.buffer.length>0){const o=n.VSBuffer.concat(s.buffer);await this.doWriteBuffer(t,a,o,o.byteLength,i,0),i+=o.byteLength}if(s.ended)return;r=s.stream}else r=s;return new Promise((o,p)=>{(0,y.listenStream)(r,{onData:async k=>{r.pause();try{await this.doWriteBuffer(t,a,k,k.byteLength,i,0)}catch(M){return p(M)}i+=k.byteLength,setTimeout(()=>r.resume())},onError:k=>p(k),onEnd:()=>o()})})}async doWriteReadableBufferedQueued(t,a,s){let i=0,r;for(;(r=s.read())!==null;)await this.doWriteBuffer(t,a,r,r.byteLength,i,0),i+=r.byteLength}async doWriteBuffer(t,a,s,i,r,o){let p=0;for(;p<i;){const k=await t.write(a,r+p,s.buffer,o+p,i-p);p+=k}}async doWriteUnbuffered(t,a,s,i){return this.writeQueue.queueFor(a,this.getExtUri(t).providerExtUri).queue(()=>this.doWriteUnbufferedQueued(t,a,s,i))}async doWriteUnbufferedQueued(t,a,s,i){let r;i instanceof n.VSBuffer?r=i:(0,y.isReadableStream)(i)?r=await(0,n.streamToBuffer)(i):(0,y.isReadableBufferedStream)(i)?r=await(0,n.bufferedStreamToBuffer)(i):r=(0,n.readableToBuffer)(i),await t.writeFile(a,r.buffer,{create:!0,overwrite:!0,unlock:s?.unlock??!1,atomic:s?.atomic??!1})}async doPipeBuffered(t,a,s,i){return this.writeQueue.queueFor(i,this.getExtUri(s).providerExtUri).queue(()=>this.doPipeBufferedQueued(t,a,s,i))}async doPipeBufferedQueued(t,a,s,i){let r,o;try{r=await t.open(a,{create:!1}),o=await s.open(i,{create:!0,unlock:!1});const p=n.VSBuffer.alloc(this.BUFFER_SIZE);let k=0,M=0,C=0;do C=await t.read(r,k,p.buffer,M,p.byteLength-M),await this.doWriteBuffer(s,o,p,C,k,M),k+=C,M+=C,M===p.byteLength&&(M=0);while(C>0)}catch(p){throw(0,l.ensureFileSystemProviderError)(p)}finally{await A.Promises.settled([typeof r=="number"?t.close(r):Promise.resolve(),typeof o=="number"?s.close(o):Promise.resolve()])}}async doPipeUnbuffered(t,a,s,i){return this.writeQueue.queueFor(i,this.getExtUri(s).providerExtUri).queue(()=>this.doPipeUnbufferedQueued(t,a,s,i))}async doPipeUnbufferedQueued(t,a,s,i){return s.writeFile(i,await t.readFile(a),{create:!0,overwrite:!0,unlock:!1,atomic:!1})}async doPipeUnbufferedToBuffered(t,a,s,i){return this.writeQueue.queueFor(i,this.getExtUri(s).providerExtUri).queue(()=>this.doPipeUnbufferedToBufferedQueued(t,a,s,i))}async doPipeUnbufferedToBufferedQueued(t,a,s,i){const r=await s.open(i,{create:!0,unlock:!1});try{const o=await t.readFile(a);await this.doWriteBuffer(s,r,n.VSBuffer.wrap(o),o.byteLength,0,0)}catch(o){throw(0,l.ensureFileSystemProviderError)(o)}finally{await s.close(r)}}async doPipeBufferedToUnbuffered(t,a,s,i){const r=await(0,n.streamToBuffer)(this.readFileBuffered(t,a,O.CancellationToken.None));await this.doWriteUnbuffered(s,i,void 0,r)}throwIfFileSystemIsReadonly(t,a){if(t.capabilities&2048)throw new l.FileOperationError((0,E.localize)(24,null,this.resourceForError(a)),6);return t}throwIfFileIsReadonly(t,a){if((a.permissions??0)&l.FilePermission.Readonly)throw new l.FileOperationError((0,E.localize)(25,null,this.resourceForError(t)),6)}resourceForError(t){return t.scheme===g.Schemas.file?t.fsPath:t.toString(!0)}};e.FileService=I,e.FileService=I=be([Y(0,c.ILogService)],I)}),define(Z[95],ee([0,1,45,312,8,35,17,3,32,2,10,4,19,56,21,179,16,120,221,50,216,215]),function(H,e,b,A,n,O,D,P,h,d,m,g,w,u,y,E,l,v,c,f,I,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiskFileSystemProvider=void 0,(()=>{try{(0,A.gracefulify)(b)}catch(a){console.error(`Error enabling graceful-fs: ${(0,f.toErrorMessage)(a)}`)}})();class t extends c.AbstractDiskFileSystemProvider{static{this.TRACE_LOG_RESOURCE_LOCKS=!1}constructor(s,i){super(s,i),this.onDidChangeCapabilities=P.Event.None,this.resourceLocks=new O.ResourceMap(r=>w.extUriBiasedIgnorePathCase.getComparisonKey(r)),this.mapHandleToPos=new Map,this.mapHandleToLock=new Map,this.writeHandles=new Map}get capabilities(){return this._capabilities||(this._capabilities=253982,g.isLinux&&(this._capabilities|=1024)),this._capabilities}async stat(s){try{const{stat:i,symbolicLink:r}=await y.SymlinkSupport.stat(this.toFilePath(s));return{type:this.toType(i,r),ctime:i.birthtime.getTime(),mtime:i.mtime.getTime(),size:i.size,permissions:i.mode&128?void 0:l.FilePermission.Locked}}catch(i){throw this.toFileSystemProviderError(i)}}async statIgnoreError(s){try{return await this.stat(s)}catch{return}}async readdir(s){try{const i=await y.Promises.readdir(this.toFilePath(s),{withFileTypes:!0}),r=[];return await Promise.all(i.map(async o=>{try{let p;o.isSymbolicLink()?p=(await this.stat((0,w.joinPath)(s,o.name))).type:p=this.toType(o),r.push([o.name,p])}catch(p){this.logService.trace(p)}})),r}catch(i){throw this.toFileSystemProviderError(i)}}toType(s,i){let r;return i?.dangling?r=l.FileType.Unknown:s.isFile()?r=l.FileType.File:s.isDirectory()?r=l.FileType.Directory:r=l.FileType.Unknown,i&&(r|=l.FileType.SymbolicLink),r}async createResourceLock(s){const i=this.toFilePath(s);this.traceLock(`[Disk FileSystemProvider]: createResourceLock() - request to acquire resource lock (${i})`);let r;for(;r=this.resourceLocks.get(s);)this.traceLock(`[Disk FileSystemProvider]: createResourceLock() - waiting for resource lock to be released (${i})`),await r.wait();const o=new n.Barrier;return this.resourceLocks.set(s,o),this.traceLock(`[Disk FileSystemProvider]: createResourceLock() - new resource lock created (${i})`),(0,d.toDisposable)(()=>{this.traceLock(`[Disk FileSystemProvider]: createResourceLock() - resource lock dispose() (${i})`),this.resourceLocks.get(s)===o&&(this.traceLock(`[Disk FileSystemProvider]: createResourceLock() - resource lock removed from resource-lock map (${i})`),this.resourceLocks.delete(s)),this.traceLock(`[Disk FileSystemProvider]: createResourceLock() - resource lock barrier open() (${i})`),o.open()})}async readFile(s,i){let r;try{i?.atomic&&(this.traceLock(`[Disk FileSystemProvider]: atomic read operation started (${this.toFilePath(s)})`),r=await this.createResourceLock(s));const o=this.toFilePath(s);return await y.Promises.readFile(o)}catch(o){throw this.toFileSystemProviderError(o)}finally{r?.dispose()}}traceLock(s){t.TRACE_LOG_RESOURCE_LOCKS&&this.logService.trace(s)}readFileStream(s,i,r){const o=(0,u.newWriteableStream)(p=>D.VSBuffer.concat(p.map(k=>D.VSBuffer.wrap(k))).buffer);return(0,v.readFileIntoStream)(this,s,o,p=>p.buffer,{...i,bufferSize:256*1024},r),o}async writeFile(s,i,r){return r?.atomic!==!1&&r?.atomic?.postfix?this.doWriteFileAtomic(s,(0,w.joinPath)((0,w.dirname)(s),`${(0,w.basename)(s)}${r.atomic.postfix}`),i,r):this.doWriteFile(s,i,r)}async doWriteFileAtomic(s,i,r,o){await this.doWriteFile(i,r,o);try{await this.rename(i,s,{overwrite:!0})}catch(p){try{await this.delete(i,{recursive:!1,useTrash:!1,atomic:!1})}catch{}throw p}}async doWriteFile(s,i,r){let o;try{const p=this.toFilePath(s);if(!r.create||!r.overwrite){if(await y.Promises.exists(p)){if(!r.overwrite)throw(0,l.createFileSystemProviderError)((0,E.localize)(0,null),l.FileSystemProviderErrorCode.FileExists)}else if(!r.create)throw(0,l.createFileSystemProviderError)((0,E.localize)(1,null),l.FileSystemProviderErrorCode.FileNotFound)}o=await this.open(s,{create:!0,unlock:r.unlock}),await this.write(o,0,i,0,i.byteLength)}catch(p){throw await this.toFileSystemProviderWriteError(s,p)}finally{typeof o=="number"&&await this.close(o)}}static{this.canFlush=!0}static configureFlushOnWrite(s){t.canFlush=s}async open(s,i){const r=this.toFilePath(s);let o;(0,l.isFileOpenForWriteOptions)(i)&&(o=await this.createResourceLock(s));let p;try{if((0,l.isFileOpenForWriteOptions)(i)&&i.unlock)try{const{stat:M}=await y.SymlinkSupport.stat(r);M.mode&128||await y.Promises.chmod(r,M.mode|128)}catch(M){M.code!=="ENOENT"&&this.logService.trace(M)}let k;if((0,l.isFileOpenForWriteOptions)(i)){if(g.isWindows)try{await y.Promises.truncate(r,0),k="r+"}catch(M){M.code!=="ENOENT"&&this.logService.trace(M)}k||(k="w")}else k="r";p=await y.Promises.open(r,k)}catch(k){throw o?.dispose(),(0,l.isFileOpenForWriteOptions)(i)?await this.toFileSystemProviderWriteError(s,k):this.toFileSystemProviderError(k)}if(this.mapHandleToPos.set(p,0),(0,l.isFileOpenForWriteOptions)(i)&&this.writeHandles.set(p,s),o){const k=this.mapHandleToLock.get(p);this.traceLock(`[Disk FileSystemProvider]: open() - storing lock for handle ${p} (${r})`),this.mapHandleToLock.set(p,o),k&&(this.traceLock(`[Disk FileSystemProvider]: open() - disposing a previous lock that was still stored on same handle ${p} (${r})`),k.dispose())}return p}async close(s){const i=this.mapHandleToLock.get(s);try{if(this.mapHandleToPos.delete(s),this.writeHandles.delete(s)&&t.canFlush)try{await y.Promises.fdatasync(s)}catch(r){t.configureFlushOnWrite(!1),this.logService.error(r)}return await y.Promises.close(s)}catch(r){throw this.toFileSystemProviderError(r)}finally{i&&(this.mapHandleToLock.get(s)===i&&(this.traceLock(`[Disk FileSystemProvider]: close() - resource lock removed from handle-lock map ${s}`),this.mapHandleToLock.delete(s)),this.traceLock(`[Disk FileSystemProvider]: close() - disposing lock for handle ${s}`),i.dispose())}}async read(s,i,r,o,p){const k=this.normalizePos(s,i);let M=null;try{M=(await y.Promises.read(s,r,o,p,k)).bytesRead}catch(C){throw this.toFileSystemProviderError(C)}finally{this.updatePos(s,k,M)}return M}normalizePos(s,i){return i===this.mapHandleToPos.get(s)?null:i}updatePos(s,i,r){const o=this.mapHandleToPos.get(s);typeof o=="number"&&(typeof i=="number"||(typeof r=="number"?this.mapHandleToPos.set(s,o+r):this.mapHandleToPos.delete(s)))}async write(s,i,r,o,p){return(0,n.retry)(()=>this.doWrite(s,i,r,o,p),100,3)}async doWrite(s,i,r,o,p){const k=this.normalizePos(s,i);let M=null;try{M=(await y.Promises.write(s,r,o,p,k)).bytesWritten}catch(C){throw await this.toFileSystemProviderWriteError(this.writeHandles.get(s),C)}finally{this.updatePos(s,k,M)}return M}async mkdir(s){try{await y.Promises.mkdir(this.toFilePath(s))}catch(i){throw this.toFileSystemProviderError(i)}}async delete(s,i){try{const r=this.toFilePath(s);if(i.recursive){let o;i?.atomic!==!1&&i.atomic.postfix&&(o=(0,m.join)((0,m.dirname)(r),`${(0,m.basename)(r)}${i.atomic.postfix}`)),await y.Promises.rm(r,y.RimRafMode.MOVE,o)}else try{await y.Promises.unlink(r)}catch(o){if(o.code==="EPERM"||o.code==="EISDIR"){let p=!1;try{const{stat:k,symbolicLink:M}=await y.SymlinkSupport.stat(r);p=k.isDirectory()&&!M}catch{}if(p)await y.Promises.rmdir(r);else throw o}else throw o}}catch(r){throw this.toFileSystemProviderError(r)}}async rename(s,i,r){const o=this.toFilePath(s),p=this.toFilePath(i);if(o!==p)try{await this.validateMoveCopy(s,i,"move",r.overwrite),await y.Promises.rename(o,p)}catch(k){throw(k.code==="EINVAL"||k.code==="EBUSY"||k.code==="ENAMETOOLONG")&&(k=new Error((0,E.localize)(2,null,(0,m.basename)(o),(0,m.basename)((0,m.dirname)(p)),k.toString()))),this.toFileSystemProviderError(k)}}async copy(s,i,r){const o=this.toFilePath(s),p=this.toFilePath(i);if(o!==p)try{await this.validateMoveCopy(s,i,"copy",r.overwrite),await y.Promises.copy(o,p,{preserveSymlinks:!0})}catch(k){throw(k.code==="EINVAL"||k.code==="EBUSY"||k.code==="ENAMETOOLONG")&&(k=new Error((0,E.localize)(3,null,(0,m.basename)(o),(0,m.basename)((0,m.dirname)(p)),k.toString()))),this.toFileSystemProviderError(k)}}async validateMoveCopy(s,i,r,o){const p=this.toFilePath(s),k=this.toFilePath(i);let M=!1;if(!!(this.capabilities&1024)||(M=(0,h.isEqual)(p,k,!0)),M){if(r==="copy")throw(0,l.createFileSystemProviderError)((0,E.localize)(4,null),l.FileSystemProviderErrorCode.FileExists);if(r==="move")return}const L=await this.statIgnoreError(s);if(!L)throw(0,l.createFileSystemProviderError)((0,E.localize)(5,null),l.FileSystemProviderErrorCode.FileNotFound);const T=await this.statIgnoreError(i);if(T){if(!o)throw(0,l.createFileSystemProviderError)((0,E.localize)(6,null),l.FileSystemProviderErrorCode.FileExists);L.type&l.FileType.File&&T.type&l.FileType.File||await this.delete(i,{recursive:!0,useTrash:!1,atomic:!1})}}async cloneFile(s,i){return this.doCloneFile(s,i,!1)}async doCloneFile(s,i,r){const o=this.toFilePath(s),p=this.toFilePath(i),k=!!(this.capabilities&1024);if((0,h.isEqual)(o,p,!k))return;const M=new d.DisposableStore;try{const[C,L]=await Promise.all([this.createResourceLock(s),this.createResourceLock(i)]);M.add(C),M.add(L),r&&await y.Promises.mkdir((0,m.dirname)(p),{recursive:!0}),await y.Promises.copyFile(o,p)}catch(C){if(C.code==="ENOENT"&&!r)return this.doCloneFile(s,i,!0);throw this.toFileSystemProviderError(C)}finally{M.dispose()}}createUniversalWatcher(s,i,r){return new I.UniversalWatcherClient(o=>s(o),o=>i(o),r)}createNonRecursiveWatcher(s,i,r){return new S.NodeJSWatcherClient(o=>s(o),o=>i(o),r)}toFileSystemProviderError(s){if(s instanceof l.FileSystemProviderError)return s;let i=s,r;switch(s.code){case"ENOENT":r=l.FileSystemProviderErrorCode.FileNotFound;break;case"EISDIR":r=l.FileSystemProviderErrorCode.FileIsADirectory;break;case"ENOTDIR":r=l.FileSystemProviderErrorCode.FileNotADirectory;break;case"EEXIST":r=l.FileSystemProviderErrorCode.FileExists;break;case"EPERM":case"EACCES":r=l.FileSystemProviderErrorCode.NoPermissions;break;case"ERR_UNC_HOST_NOT_ALLOWED":i=`${s.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`,r=l.FileSystemProviderErrorCode.Unknown;break;default:r=l.FileSystemProviderErrorCode.Unknown}return(0,l.createFileSystemProviderError)(i,r)}async toFileSystemProviderWriteError(s,i){let r=this.toFileSystemProviderError(i);if(s&&r.code===l.FileSystemProviderErrorCode.NoPermissions)try{const{stat:o}=await y.SymlinkSupport.stat(this.toFilePath(s));o.mode&128||(r=(0,l.createFileSystemProviderError)(i,l.FileSystemProviderErrorCode.FileWriteLocked))}catch(o){this.logService.trace(o)}return r}}e.DiskFileSystemProvider=t}),define(Z[223],ee([0,1,3,95,2,17,56,23]),function(H,e,b,A,n,O,D,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractSessionFileWatcher=e.AbstractDiskFileSystemProviderChannel=void 0;class h extends n.Disposable{constructor(g,w){super(),this.provider=g,this.logService=w,this.sessionToWatcher=new Map,this.watchRequests=new Map}call(g,w,u){const y=this.getUriTransformer(g);switch(w){case"stat":return this.stat(y,u[0]);case"readdir":return this.readdir(y,u[0]);case"open":return this.open(y,u[0],u[1]);case"close":return this.close(u[0]);case"read":return this.read(u[0],u[1],u[2]);case"readFile":return this.readFile(y,u[0],u[1]);case"write":return this.write(u[0],u[1],u[2],u[3],u[4]);case"writeFile":return this.writeFile(y,u[0],u[1],u[2]);case"rename":return this.rename(y,u[0],u[1],u[2]);case"copy":return this.copy(y,u[0],u[1],u[2]);case"cloneFile":return this.cloneFile(y,u[0],u[1]);case"mkdir":return this.mkdir(y,u[0]);case"delete":return this.delete(y,u[0],u[1]);case"watch":return this.watch(y,u[0],u[1],u[2],u[3]);case"unwatch":return this.unwatch(u[0],u[1])}throw new Error(`IPC Command ${w} not found`)}listen(g,w,u){const y=this.getUriTransformer(g);switch(w){case"fileChange":return this.onFileChange(y,u[0]);case"readFileStream":return this.onReadFileStream(y,u[0],u[1])}throw new Error(`Unknown event ${w}`)}stat(g,w){const u=this.transformIncoming(g,w,!0);return this.provider.stat(u)}readdir(g,w){const u=this.transformIncoming(g,w);return this.provider.readdir(u)}async readFile(g,w,u){const y=this.transformIncoming(g,w,!0),E=await this.provider.readFile(y,u);return O.VSBuffer.wrap(E)}onReadFileStream(g,w,u){const y=this.transformIncoming(g,w,!0),E=new P.CancellationTokenSource,l=new b.Emitter({onDidRemoveLastListener:()=>{E.cancel()}}),v=this.provider.readFileStream(y,u,E.token);return(0,D.listenStream)(v,{onData:c=>l.fire(O.VSBuffer.wrap(c)),onError:c=>l.fire(c),onEnd:()=>{l.fire("end"),l.dispose(),E.dispose()}}),l.event}writeFile(g,w,u,y){const E=this.transformIncoming(g,w);return this.provider.writeFile(E,u.buffer,y)}open(g,w,u){const y=this.transformIncoming(g,w,!0);return this.provider.open(y,u)}close(g){return this.provider.close(g)}async read(g,w,u){const y=O.VSBuffer.alloc(u),E=0,l=await this.provider.read(g,w,y.buffer,E,u);return[y,l]}write(g,w,u,y,E){return this.provider.write(g,w,u.buffer,y,E)}mkdir(g,w){const u=this.transformIncoming(g,w);return this.provider.mkdir(u)}delete(g,w,u){const y=this.transformIncoming(g,w);return this.provider.delete(y,u)}rename(g,w,u,y){const E=this.transformIncoming(g,w),l=this.transformIncoming(g,u);return this.provider.rename(E,l,y)}copy(g,w,u,y){const E=this.transformIncoming(g,w),l=this.transformIncoming(g,u);return this.provider.copy(E,l,y)}cloneFile(g,w,u){const y=this.transformIncoming(g,w),E=this.transformIncoming(g,u);return this.provider.cloneFile(y,E)}onFileChange(g,w){const u=new b.Emitter({onWillAddFirstListener:()=>{this.sessionToWatcher.set(w,this.createSessionFileWatcher(g,u))},onDidRemoveLastListener:()=>{(0,n.dispose)(this.sessionToWatcher.get(w)),this.sessionToWatcher.delete(w)}});return u.event}async watch(g,w,u,y,E){const l=this.sessionToWatcher.get(w);if(l){const v=this.transformIncoming(g,y),c=l.watch(u,v,E);this.watchRequests.set(w+u,c)}}async unwatch(g,w){const u=g+w,y=this.watchRequests.get(u);y&&((0,n.dispose)(y),this.watchRequests.delete(u))}dispose(){super.dispose();for(const[,g]of this.watchRequests)g.dispose();this.watchRequests.clear();for(const[,g]of this.sessionToWatcher)g.dispose();this.sessionToWatcher.clear()}}e.AbstractDiskFileSystemProviderChannel=h;class d extends n.Disposable{constructor(g,w,u,y){super(),this.uriTransformer=g,this.logService=u,this.environmentService=y,this.watcherRequests=new Map,this.fileWatcher=this._register(new A.DiskFileSystemProvider(this.logService,{watcher:{recursive:this.getRecursiveWatcherOptions(this.environmentService)}})),this.registerListeners(w)}registerListeners(g){const w=this._register(new b.Emitter);this._register(w.event(u=>{g.fire(u.map(y=>({resource:this.uriTransformer.transformOutgoingURI(y.resource),type:y.type})))})),this._register(this.fileWatcher.onDidChangeFile(u=>w.fire(u))),this._register(this.fileWatcher.onDidWatchError(u=>g.fire(u)))}getRecursiveWatcherOptions(g){}getExtraExcludes(g){}watch(g,w,u){const y=this.getExtraExcludes(this.environmentService);return Array.isArray(y)&&(u.excludes=[...u.excludes,...y]),this.watcherRequests.set(g,this.fileWatcher.watch(w,u)),(0,n.toDisposable)(()=>{(0,n.dispose)(this.watcherRequests.get(g)),this.watcherRequests.delete(g)})}dispose(){super.dispose();for(const[,g]of this.watcherRequests)g.dispose();this.watcherRequests.clear()}}e.AbstractSessionFileWatcher=d}),define(Z[224],ee([0,1,14,178,4,7,16,10,223,156]),function(H,e,b,A,n,O,D,P,h,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiskFileSystemProviderChannel=void 0;class m extends h.AbstractDiskFileSystemProviderChannel{constructor(u,y,E){super(u,y),this.environmentService=E}getUriTransformer(u){return d.DefaultURITransformer}transformIncoming(u,y){return O.URI.revive(y)}async delete(u,y,E){if(!E.useTrash)return super.delete(u,y,E);const l=this.transformIncoming(u,y),v=(0,P.normalize)(l.fsPath);try{await b.shell.trashItem(v)}catch{throw(0,D.createFileSystemProviderError)(n.isWindows?(0,A.localize)(0,null,(0,P.basename)(v)):(0,A.localize)(1,null,(0,P.basename)(v)),D.FileSystemProviderErrorCode.Unknown)}}createSessionFileWatcher(u,y){return new g(u,y,this.logService,this.environmentService)}}e.DiskFileSystemProviderChannel=m;class g extends h.AbstractSessionFileWatcher{watch(u,y,E){if(E.recursive)throw(0,D.createFileSystemProviderError)("Recursive file watching is not supported from main process for performance reasons.",D.FileSystemProviderErrorCode.Unavailable);return super.watch(u,y,E)}}}),define(Z[225],ee([0,1,5]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BufferLogger=void 0;class A extends b.AbstractMessageLogger{constructor(O=b.DEFAULT_LOG_LEVEL){super(),this.buffer=[],this._logger=void 0,this.setLevel(O),this._register(this.onDidChangeLogLevel(D=>{this._logger?.setLevel(D)}))}set logger(O){this._logger=O;for(const{level:D,message:P}of this.buffer)(0,b.log)(O,D,P);this.buffer=[]}log(O,D){this._logger?(0,b.log)(this._logger,O,D):this.getLevel()<=O&&this.buffer.push({level:O,message:D})}dispose(){this._logger?.dispose()}flush(){this._logger?.flush()}}e.BufferLogger=A}),define(Z[226],ee([0,1,7,3,5,2]),function(H,e,b,A,n,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteLoggerChannelClient=e.LoggerChannel=e.LoggerChannelClient=void 0;class D extends n.AbstractLoggerService{constructor(g,w,u,y,E){super(w,u,y),this.windowId=g,this.channel=E,this._register(E.listen("onDidChangeLogLevel",g)(l=>{(0,n.isLogLevel)(l)?super.setLogLevel(l):super.setLogLevel(b.URI.revive(l[0]),l[1])})),this._register(E.listen("onDidChangeVisibility",g)(([l,v])=>super.setVisibility(b.URI.revive(l),v))),this._register(E.listen("onDidChangeLoggers",g)(({added:l,removed:v})=>{for(const c of l)super.registerLogger({...c,resource:b.URI.revive(c.resource)});for(const c of v)super.deregisterLogger(c.resource)}))}createConsoleMainLogger(){return new n.AdapterLogger({log:(g,w)=>{this.channel.call("consoleLog",[g,w])}})}registerLogger(g){super.registerLogger(g),this.channel.call("registerLogger",[g,this.windowId])}deregisterLogger(g){super.deregisterLogger(g),this.channel.call("deregisterLogger",[g,this.windowId])}setLogLevel(g,w){super.setLogLevel(g,w),this.channel.call("setLogLevel",[g,w])}setVisibility(g,w){super.setVisibility(g,w),this.channel.call("setVisibility",[this.toResource(g),w])}doCreateLogger(g,w,u){return new P(this.channel,g,w,u,this.windowId)}static setLogLevel(g,w,u){return g.call("setLogLevel",[w,u])}}e.LoggerChannelClient=D;class P extends n.AbstractMessageLogger{constructor(g,w,u,y,E){super(y?.logLevel==="always"),this.channel=g,this.file=w,this.isLoggerCreated=!1,this.buffer=[],this.setLevel(u),this.channel.call("createLogger",[w,y,E]).then(()=>{this.doLog(this.buffer),this.isLoggerCreated=!0})}log(g,w){const u=[[g,w]];this.isLoggerCreated?this.doLog(u):this.buffer.push(...u)}doLog(g){this.channel.call("log",[this.file,g])}}class h{constructor(g,w){this.loggerService=g,this.getUriTransformer=w}listen(g,w){const u=this.getUriTransformer(g);switch(w){case"onDidChangeLoggers":return A.Event.map(this.loggerService.onDidChangeLoggers,y=>({added:[...y.added].map(E=>this.transformLogger(E,u)),removed:[...y.removed].map(E=>this.transformLogger(E,u))}));case"onDidChangeVisibility":return A.Event.map(this.loggerService.onDidChangeVisibility,y=>[u.transformOutgoingURI(y[0]),y[1]]);case"onDidChangeLogLevel":return A.Event.map(this.loggerService.onDidChangeLogLevel,y=>(0,n.isLogLevel)(y)?y:[u.transformOutgoingURI(y[0]),y[1]])}throw new Error(`Event not found: ${w}`)}async call(g,w,u){const y=this.getUriTransformer(g);switch(w){case"setLogLevel":return(0,n.isLogLevel)(u[0])?this.loggerService.setLogLevel(u[0]):this.loggerService.setLogLevel(b.URI.revive(y.transformIncoming(u[0][0])),u[0][1]);case"getRegisteredLoggers":return Promise.resolve([...this.loggerService.getRegisteredLoggers()].map(E=>this.transformLogger(E,y)))}throw new Error(`Call not found: ${w}`)}transformLogger(g,w){return{...g,resource:w.transformOutgoingURI(g.resource)}}}e.LoggerChannel=h;class d extends O.Disposable{constructor(g,w){super(),w.call("setLogLevel",[g.getLogLevel()]),this._register(g.onDidChangeLogLevel(u=>w.call("setLogLevel",[u]))),w.call("getRegisteredLoggers").then(u=>{for(const y of u)g.registerLogger({...y,resource:b.URI.revive(y.resource)})}),this._register(w.listen("onDidChangeVisibility")(([u,y])=>g.setVisibility(b.URI.revive(u),y))),this._register(w.listen("onDidChangeLoggers")(({added:u,removed:y})=>{for(const E of u)g.registerLogger({...E,resource:b.URI.revive(E.resource)});for(const E of y)g.deregisterLogger(E.resource)}))}}e.RemoteLoggerChannelClient=d}),define(Z[227],ee([0,1,2,5]),function(H,e,b,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LogService=void 0;class n extends b.Disposable{constructor(D,P=[]){super(),this.logger=new A.MultiplexLogger([D,...P]),this._register(D.onDidChangeLogLevel(h=>this.setLevel(h)))}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(D){this.logger.setLevel(D)}getLevel(){return this.logger.getLevel()}trace(D,...P){this.logger.trace(D,...P)}debug(D,...P){this.logger.debug(D,...P)}info(D,...P){this.logger.info(D,...P)}warn(D,...P){this.logger.warn(D,...P)}error(D,...P){this.logger.error(D,...P)}flush(){this.logger.flush()}}e.LogService=n}),define(Z[228],ee([0,1,35,7,5]),function(H,e,b,A,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LoggerChannel=void 0;class O{constructor(P){this.loggerService=P,this.loggers=new b.ResourceMap}listen(P,h,d){switch(h){case"onDidChangeLoggers":return d?this.loggerService.getOnDidChangeLoggersEvent(d):this.loggerService.onDidChangeLoggers;case"onDidChangeLogLevel":return d?this.loggerService.getOnDidChangeLogLevelEvent(d):this.loggerService.onDidChangeLogLevel;case"onDidChangeVisibility":return d?this.loggerService.getOnDidChangeVisibilityEvent(d):this.loggerService.onDidChangeVisibility}throw new Error(`Event not found: ${h}`)}async call(P,h,d){switch(h){case"createLogger":this.createLogger(A.URI.revive(d[0]),d[1],d[2]);return;case"log":return this.log(A.URI.revive(d[0]),d[1]);case"consoleLog":return this.consoleLog(d[0],d[1]);case"setLogLevel":return(0,n.isLogLevel)(d[0])?this.loggerService.setLogLevel(d[0]):this.loggerService.setLogLevel(A.URI.revive(d[0]),d[1]);case"setVisibility":return this.loggerService.setVisibility(A.URI.revive(d[0]),d[1]);case"registerLogger":return this.loggerService.registerLogger({...d[0],resource:A.URI.revive(d[0].resource)},d[1]);case"deregisterLogger":return this.loggerService.deregisterLogger(A.URI.revive(d[0]))}throw new Error(`Call not found: ${h}`)}createLogger(P,h,d){this.loggers.set(P,this.loggerService.createLogger(P,h,d))}consoleLog(P,h){let d=console.log;switch(P){case n.LogLevel.Error:d=console.error;break;case n.LogLevel.Warning:d=console.warn;break;case n.LogLevel.Info:d=console.info;break}d.call(console,...h)}log(P,h){const d=this.loggers.get(P);if(!d)throw new Error("Create the logger before logging");for(const[m,g]of h)(0,n.log)(d,m,g)}}e.LoggerChannel=O}),define(Z[229],ee([0,1,16,5]),function(H,e,b,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SpdLogLogger=void 0;var n;(function(d){d[d.Trace=0]="Trace",d[d.Debug=1]="Debug",d[d.Info=2]="Info",d[d.Warning=3]="Warning",d[d.Error=4]="Error",d[d.Critical=5]="Critical",d[d.Off=6]="Off"})(n||(n={}));async function O(d,m,g,w,u){try{const y=await new Promise((l,v)=>{H(["@vscode/spdlog"],l,v)});y.setFlushOn(n.Trace);const E=await y.createAsyncRotatingLogger(d,m,g,w);return u?E.clearFormatters():E.setPattern("%Y-%m-%d %H:%M:%S.%e [%l] %v"),E}catch(y){console.error(y)}return null}function D(d,m,g){switch(m){case A.LogLevel.Trace:d.trace(g);break;case A.LogLevel.Debug:d.debug(g);break;case A.LogLevel.Info:d.info(g);break;case A.LogLevel.Warning:d.warn(g);break;case A.LogLevel.Error:d.error(g);break;case A.LogLevel.Off:break;default:throw new Error(`Invalid log level ${m}`)}}function P(d,m){switch(m){case A.LogLevel.Trace:d.setLevel(n.Trace);break;case A.LogLevel.Debug:d.setLevel(n.Debug);break;case A.LogLevel.Info:d.setLevel(n.Info);break;case A.LogLevel.Warning:d.setLevel(n.Warning);break;case A.LogLevel.Error:d.setLevel(n.Error);break;case A.LogLevel.Off:d.setLevel(n.Off);break;default:throw new Error(`Invalid log level ${m}`)}}class h extends A.AbstractMessageLogger{constructor(m,g,w,u,y){super(),this.buffer=[],this.setLevel(y),this._loggerCreationPromise=this._createSpdLogLogger(m,g,w,u),this._register(this.onDidChangeLogLevel(E=>{this._logger&&P(this._logger,E)}))}async _createSpdLogLogger(m,g,w,u){const y=w?6:1,E=30/y*b.ByteSize.MB,l=await O(m,g,E,y,u);if(l){this._logger=l,P(this._logger,this.getLevel());for(const{level:v,message:c}of this.buffer)D(this._logger,v,c);this.buffer=[]}}log(m,g){this._logger?D(this._logger,m,g):this.getLevel()<=m&&this.buffer.push({level:m,message:g})}flush(){this._logger?this._logger.flush():this._loggerCreationPromise.then(()=>this.flush())}dispose(){this._logger?this.disposeLogger():this._loggerCreationPromise.then(()=>this.disposeLogger())}disposeLogger(){this._logger&&(this._logger.drop(),this._logger=void 0)}}e.SpdLogLogger=h}),define(Z[230],ee([0,1,31,5,229]),function(H,e,b,A,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LoggerService=void 0;class O extends A.AbstractLoggerService{doCreateLogger(P,h,d){return new n.SpdLogLogger((0,b.generateUuid)(),P.fsPath,!d?.donotRotate,!!d?.donotUseFormatters,h)}}e.LoggerService=O}),define(Z[66],ee([0,1,35,3,6,5,230]),function(H,e,b,A,n,O,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LoggerMainService=e.ILoggerMainService=void 0,e.ILoggerMainService=(0,n.refineServiceDecorator)(O.ILoggerService);class P extends D.LoggerService{constructor(){super(...arguments),this.loggerResourcesByWindow=new b.ResourceMap}createLogger(d,m,g){g!==void 0&&this.loggerResourcesByWindow.set(this.toResource(d),g);try{return super.createLogger(d,m)}catch(w){throw this.loggerResourcesByWindow.delete(this.toResource(d)),w}}registerLogger(d,m){m!==void 0&&this.loggerResourcesByWindow.set(d.resource,m),super.registerLogger(d)}deregisterLogger(d){this.loggerResourcesByWindow.delete(d),super.deregisterLogger(d)}getRegisteredLoggers(d){const m=[];for(const g of super.getRegisteredLoggers())d===this.loggerResourcesByWindow.get(g.resource)&&m.push(g);return m}getOnDidChangeLogLevelEvent(d){return A.Event.filter(this.onDidChangeLogLevel,m=>(0,O.isLogLevel)(m)||this.isInterestedLoggerResource(m[0],d))}getOnDidChangeVisibilityEvent(d){return A.Event.filter(this.onDidChangeVisibility,([m])=>this.isInterestedLoggerResource(m,d))}getOnDidChangeLoggersEvent(d){return A.Event.filter(A.Event.map(this.onDidChangeLoggers,m=>({added:[...m.added].filter(w=>this.isInterestedLoggerResource(w.resource,d)),removed:[...m.removed].filter(w=>this.isInterestedLoggerResource(w.resource,d))})),m=>m.added.length>0||m.removed.length>0)}deregisterLoggers(d){for(const[m,g]of this.loggerResourcesByWindow)g===d&&this.deregisterLogger(m)}isInterestedLoggerResource(d,m){const g=this.loggerResourcesByWindow.get(d);return g===void 0||g===m}dispose(){super.dispose(),this.loggerResourcesByWindow.clear()}}e.LoggerMainService=P}),define(Z[231],ee([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isMenubarMenuItemAction=e.isMenubarMenuItemRecentAction=e.isMenubarMenuItemSeparator=e.isMenubarMenuItemSubmenu=void 0;function b(D){return D.submenu!==void 0}e.isMenubarMenuItemSubmenu=b;function A(D){return D.id==="vscode.menubar.separator"}e.isMenubarMenuItemSeparator=A;function n(D){return D.uri!==void 0}e.isMenubarMenuItemRecentAction=n;function O(D){return!b(D)&&!A(D)&&!n(D)}e.isMenubarMenuItemAction=O}),define(Z[39],ee([0,1,3,69,2,6]),function(H,e,b,A,n,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NullPolicyService=e.AbstractPolicyService=e.IPolicyService=void 0,e.IPolicyService=(0,O.createDecorator)("policy");class D extends n.Disposable{constructor(){super(...arguments),this.policyDefinitions={},this.policies=new Map,this._onDidChange=this._register(new b.Emitter),this.onDidChange=this._onDidChange.event}async updatePolicyDefinitions(d){const m=Object.keys(this.policyDefinitions).length;return this.policyDefinitions={...d,...this.policyDefinitions},m!==Object.keys(this.policyDefinitions).length&&await this._updatePolicyDefinitions(d),A.Iterable.reduce(this.policies.entries(),(g,[w,u])=>({...g,[w]:u}),{})}getPolicyValue(d){return this.policies.get(d)}serialize(){return A.Iterable.reduce(Object.entries(this.policyDefinitions),(d,[m,g])=>({...d,[m]:{definition:g,value:this.policies.get(m)}}),{})}}e.AbstractPolicyService=D;class P{constructor(){this.onDidChange=b.Event.None}async updatePolicyDefinitions(){return{}}getPolicyValue(){}serialize(){}}e.NullPolicyService=P}),define(Z[232],ee([0,1,8,3,69,12,16,5,39]),function(H,e,b,A,n,O,D,P,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FilePolicyService=void 0;function d(g,w){const u=[];for(const y of new Set(n.Iterable.concat(g.keys(),w.keys())))g.get(y)!==w.get(y)&&u.push(y);return u}let m=class extends h.AbstractPolicyService{constructor(w,u,y){super(),this.file=w,this.fileService=u,this.logService=y,this.throttledDelayer=this._register(new b.ThrottledDelayer(500));const E=A.Event.filter(u.onDidFilesChange,l=>l.affects(w));this._register(u.watch(w)),this._register(E(()=>this.throttledDelayer.trigger(()=>this.refresh())))}async _updatePolicyDefinitions(){await this.refresh()}async read(){const w=new Map;try{const u=await this.fileService.readFile(this.file),y=JSON.parse(u.value.toString());if(!(0,O.isObject)(y))throw new Error("Policy file isn't a JSON object");for(const E of Object.keys(y))this.policyDefinitions[E]&&w.set(E,y[E])}catch(u){u.fileOperationResult!==1&&this.logService.error("[FilePolicyService] Failed to read policies",u)}return w}async refresh(){const w=await this.read(),u=d(this.policies,w);this.policies=w,u.length>0&&this._onDidChange.fire(u)}};e.FilePolicyService=m,e.FilePolicyService=m=be([Y(1,D.IFileService),Y(2,P.ILogService)],m)}),define(Z[233],ee([0,1,3,2,39]),function(H,e,b,A,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PolicyChannelClient=e.PolicyChannel=void 0;class O{constructor(h){this.service=h,this.disposables=new A.DisposableStore}listen(h,d){switch(d){case"onDidChange":return b.Event.map(this.service.onDidChange,m=>m.reduce((g,w)=>({...g,[w]:this.service.getPolicyValue(w)??null}),{}),this.disposables)}throw new Error(`Event not found: ${d}`)}call(h,d,m){switch(d){case"updatePolicyDefinitions":return this.service.updatePolicyDefinitions(m)}throw new Error(`Call not found: ${d}`)}dispose(){this.disposables.dispose()}}e.PolicyChannel=O;class D extends n.AbstractPolicyService{constructor(h,d){super(),this.channel=d;for(const m in h){const{definition:g,value:w}=h[m];this.policyDefinitions[m]=g,w!==void 0&&this.policies.set(m,w)}this.channel.listen("onDidChange")(m=>{for(const g in m){const w=m[g];w===null?this.policies.delete(g):this.policies.set(g,w)}this._onDidChange.fire(Object.keys(m))})}async _updatePolicyDefinitions(h){const d=await this.channel.call("updatePolicyDefinitions",h);for(const m in d)this.policies.set(m,d[m])}}e.PolicyChannelClient=D}),define(Z[234],ee([0,1,39,8,313,2,5]),function(H,e,b,A,n,O,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativePolicyService=void 0;let P=class extends b.AbstractPolicyService{constructor(d,m){super(),this.logService=d,this.productName=m,this.throttler=new A.Throttler,this.watcher=this._register(new O.MutableDisposable)}async _updatePolicyDefinitions(d){this.logService.trace(`NativePolicyService#_updatePolicyDefinitions - Found ${Object.keys(d).length} policy definitions`),await this.throttler.queue(()=>new Promise((m,g)=>{try{this.watcher.value=(0,n.createWatcher)(this.productName,d,w=>{this._onDidPolicyChange(w),m()})}catch(w){this.logService.error("NativePolicyService#_updatePolicyDefinitions - Error creating watcher:",w),g(w)}}))}_onDidPolicyChange(d){this.logService.trace(`NativePolicyService#_onDidPolicyChange - Updated policy values: ${JSON.stringify(d)}`);for(const m in d){const g=d[m];g===void 0?this.policies.delete(m):this.policies.set(m,g)}this._onDidChange.fire(Object.keys(d))}};e.NativePolicyService=P,e.NativePolicyService=P=be([Y(0,D.ILogService)],P)}),define(Z[67],ee([0,1,4,36]),function(H,e,b,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let n;if(typeof b.globals.vscode<"u"&&typeof b.globals.vscode.context<"u"){const O=b.globals.vscode.context.configuration();if(O)n=O.product;else throw new Error("Sandbox: unable to resolve product configuration from preload script.")}else if(globalThis._VSCODE_PRODUCT_JSON&&globalThis._VSCODE_PACKAGE_JSON){if(n=globalThis._VSCODE_PRODUCT_JSON,A.env.VSCODE_DEV&&Object.assign(n,{nameShort:`${n.nameShort} Dev`,nameLong:`${n.nameLong} Dev`,dataFolderName:`${n.dataFolderName}-dev`,serverDataFolderName:n.serverDataFolderName?`${n.serverDataFolderName}-dev`:void 0}),!n.version){const O=globalThis._VSCODE_PACKAGE_JSON;Object.assign(n,{version:O.version})}}else n={},Object.keys(n).length===0&&Object.assign(n,{version:"1.78.0-dev",nameShort:"Azure Data Studio Dev",nameLong:"Azure Data Studio Dev",applicationName:"azuredatastudio-oss",dataFolderName:"azuredatastudio-oss",urlProtocol:"azuredatastudio-oss",reportIssueUrl:"https://github.com/microsoft/azuredatastudio/issues/new",licenseName:"MIT",licenseUrl:"https://github.com/microsoft/vscode/blob/main/LICENSE.txt",serverLicenseUrl:"https://github.com/microsoft/vscode/blob/main/LICENSE.txt"});e.default=n}),define(Z[22],ee([0,1,6]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.productSchemaId=e.IProductService=void 0,e.IProductService=(0,b.createDecorator)("productService"),e.productSchemaId="vscode://schemas/vscode-product"}),define(Z[235],ee([0,1,73,5,22]),function(H,e,b,A,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionUrlTrustService=void 0;let O=class{constructor(P,h){this.productService=P,this.logService=h,this.trustedExtensionUrlPublicKeys=new Map}async isExtensionUrlTrusted(P,h){if(!this.productService.trustedExtensionUrlPublicKeys)return this.logService.trace("ExtensionUrlTrustService#isExtensionUrlTrusted","There are no configured trusted keys"),!1;const d=/^(.*)#([^#]+)$/.exec(h);if(!d)return this.logService.trace("ExtensionUrlTrustService#isExtensionUrlTrusted","Uri has no fragment",h),!1;const[,m,g]=d;let w=this.trustedExtensionUrlPublicKeys.get(P);if(!w){if(w=this.productService.trustedExtensionUrlPublicKeys[P],!w||w.length===0)return this.logService.trace("ExtensionUrlTrustService#isExtensionUrlTrusted","Extension doesn't have any trusted keys",P),!1;this.trustedExtensionUrlPublicKeys.set(P,[...w])}const u=Buffer.from(decodeURIComponent(g),"base64");if(u.length<=6)return this.logService.trace("ExtensionUrlTrustService#isExtensionUrlTrusted","Uri fragment is not a signature",h),!1;const y=u.slice(0,6),E=u.readUIntBE(0,6),l=Date.now()-E;if(l<0||l>36e5)return this.logService.trace("ExtensionUrlTrustService#isExtensionUrlTrusted","Signed uri has expired",h),!1;const v=u.slice(6),c=b.createVerify("SHA256");c.write(y),c.write(Buffer.from(m)),c.end();for(let f=0;f<w.length;f++){let I=w[f];if(I!==null){if(typeof I=="string")try{I=b.createPublicKey({key:Buffer.from(I,"base64"),format:"der",type:"spki"}),w[f]=I}catch(S){this.logService.warn("ExtensionUrlTrustService#isExtensionUrlTrusted",`Failed to parse trusted extension uri public key #${f+1} for ${P}:`,S),w[f]=null;continue}if(c.verify(I,v))return this.logService.trace("ExtensionUrlTrustService#isExtensionUrlTrusted","Signed uri is valid",h),!0}}return this.logService.trace("ExtensionUrlTrustService#isExtensionUrlTrusted","Signed uri could not be verified",h),!1}};e.ExtensionUrlTrustService=O,e.ExtensionUrlTrustService=O=be([Y(0,n.IProductService),Y(1,A.ILogService)],O)}),define(Z[236],ee([0,1,8,5]),function(H,e,b,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WindowProfiler=void 0;let n=class{constructor(D,P,h){this._window=D,this._sessionId=P,this._logService=h}async inspect(D){await this._connect();const P=this._window.webContents.debugger;await P.sendCommand("Profiler.start"),this._logService.warn("[perf] profiling STARTED",this._sessionId),await(0,b.timeout)(D);const h=await P.sendCommand("Profiler.stop");return this._logService.warn("[perf] profiling DONE",this._sessionId),await this._disconnect(),h.profile}async _connect(){const D=this._window.webContents.debugger;D.attach(),await D.sendCommand("Profiler.enable")}async _disconnect(){const D=this._window.webContents.debugger;await D.sendCommand("Profiler.disable"),D.detach()}};e.WindowProfiler=n,e.WindowProfiler=n=be([Y(2,A.ILogService)],n)}),define(Z[79],ee([0,1,6]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IProtocolMainService=void 0,e.IProtocolMainService=(0,b.createDecorator)("protocolMainService")}),define(Z[43],ee([0,1,136,12]),function(H,e,b,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Registry=void 0;class n{constructor(){this.data=new Map}add(D,P){b.ok(A.isString(D)),b.ok(A.isObject(P)),b.ok(!this.data.has(D),"There is already an extension with this id"),this.data.set(D,P)}knows(D){return this.data.has(D)}as(D){return this.data.get(D)||null}}e.Registry=new n}),define(Z[237],ee([0,1,3,43]),function(H,e,b,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=void 0,e.Extensions={JSONContribution:"base.contributions.json"};function n(P){return P.length>0&&P.charAt(P.length-1)==="#"?P.substring(0,P.length-1):P}class O{constructor(){this._onDidChangeSchema=new b.Emitter,this.onDidChangeSchema=this._onDidChangeSchema.event,this.schemasById={}}registerSchema(h,d){this.schemasById[n(h)]=d,this._onDidChangeSchema.fire(h)}notifySchemaChanged(h){this._onDidChangeSchema.fire(h)}getSchemaContributions(){return{schemas:this.schemasById}}}const D=new O;A.Registry.add(e.Extensions.JSONContribution,D)}),define(Z[59],ee([0,1,24,3,12,163,18,237,43]),function(H,e,b,A,n,O,D,P,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getScopes=e.validateProperty=e.getDefaultValue=e.keyFromOverrideIdentifiers=e.overrideIdentifiersFromKey=e.OVERRIDE_PROPERTY_REGEX=e.OVERRIDE_PROPERTY_PATTERN=e.configurationDefaultsSchemaId=e.resourceLanguageSettingsSchemaId=e.resourceSettings=e.windowSettings=e.machineOverridableSettings=e.machineSettings=e.applicationSettings=e.allSettings=e.ConfigurationScope=e.Extensions=e.EditPresentationTypes=void 0;var d;(function(S){S.Multiline="multilineText",S.Singleline="singlelineText"})(d||(e.EditPresentationTypes=d={})),e.Extensions={Configuration:"base.contributions.configuration"};var m;(function(S){S[S.APPLICATION=1]="APPLICATION",S[S.MACHINE=2]="MACHINE",S[S.WINDOW=3]="WINDOW",S[S.RESOURCE=4]="RESOURCE",S[S.LANGUAGE_OVERRIDABLE=5]="LANGUAGE_OVERRIDABLE",S[S.MACHINE_OVERRIDABLE=6]="MACHINE_OVERRIDABLE"})(m||(e.ConfigurationScope=m={})),e.allSettings={properties:{},patternProperties:{}},e.applicationSettings={properties:{},patternProperties:{}},e.machineSettings={properties:{},patternProperties:{}},e.machineOverridableSettings={properties:{},patternProperties:{}},e.windowSettings={properties:{},patternProperties:{}},e.resourceSettings={properties:{},patternProperties:{}},e.resourceLanguageSettingsSchemaId="vscode://schemas/settings/resourceLanguage",e.configurationDefaultsSchemaId="vscode://schemas/settings/configurationDefaults";const g=h.Registry.as(P.Extensions.JSONContribution);class w{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new A.Emitter,this.onDidSchemaChange=this._onDidSchemaChange.event,this._onDidUpdateConfiguration=new A.Emitter,this.onDidUpdateConfiguration=this._onDidUpdateConfiguration.event,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:O.localize(0,null),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.policyConfigurations=new Map,this.excludedConfigurationProperties={},g.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(t,a=!0){this.registerConfigurations([t],a)}registerConfigurations(t,a=!0){const s=new Set;this.doRegisterConfigurations(t,a,s),g.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:s})}deregisterConfigurations(t){const a=new Set;this.doDeregisterConfigurations(t,a),g.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:a})}updateConfigurations({add:t,remove:a}){const s=new Set;this.doDeregisterConfigurations(a,s),this.doRegisterConfigurations(t,!1,s),g.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:s})}registerDefaultConfigurations(t){const a=new Set;this.doRegisterDefaultConfigurations(t,a),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:a,defaultsOverrides:!0})}doRegisterDefaultConfigurations(t,a){const s=[];for(const{overrides:i,source:r}of t)for(const o in i)if(a.add(o),e.OVERRIDE_PROPERTY_REGEX.test(o)){const p=this.configurationDefaultsOverrides.get(o),k=p?.valuesSources??new Map;if(r)for(const T of Object.keys(i[o]))k.set(T,r);const M={...p?.value||{},...i[o]};this.configurationDefaultsOverrides.set(o,{source:r,value:M,valuesSources:k});const C=(0,D.getLanguageTagSettingPlainKey)(o),L={type:"object",default:M,description:O.localize(1,null,C),$ref:e.resourceLanguageSettingsSchemaId,defaultDefaultValue:M,source:n.isString(r)?void 0:r,defaultValueSource:r};s.push(...E(o)),this.configurationProperties[o]=L,this.defaultLanguageConfigurationOverridesNode.properties[o]=L}else{this.configurationDefaultsOverrides.set(o,{value:i[o],source:r});const p=this.configurationProperties[o];p&&(this.updatePropertyDefaultValue(o,p),this.updateSchema(o,p))}this.doRegisterOverrideIdentifiers(s)}deregisterDefaultConfigurations(t){const a=new Set;this.doDeregisterDefaultConfigurations(t,a),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:a,defaultsOverrides:!0})}doDeregisterDefaultConfigurations(t,a){for(const{overrides:s,source:i}of t)for(const r in s){const o=this.configurationDefaultsOverrides.get(r),p=n.isString(i)?i:i?.id,k=n.isString(o?.source)?o?.source:o?.source?.id;if(p===k)if(a.add(r),this.configurationDefaultsOverrides.delete(r),e.OVERRIDE_PROPERTY_REGEX.test(r))delete this.configurationProperties[r],delete this.defaultLanguageConfigurationOverridesNode.properties[r];else{const M=this.configurationProperties[r];M&&(this.updatePropertyDefaultValue(r,M),this.updateSchema(r,M))}}this.updateOverridePropertyPatternKey()}deltaConfiguration(t){let a=!1;const s=new Set;t.removedDefaults&&(this.doDeregisterDefaultConfigurations(t.removedDefaults,s),a=!0),t.addedDefaults&&(this.doRegisterDefaultConfigurations(t.addedDefaults,s),a=!0),t.removedConfigurations&&this.doDeregisterConfigurations(t.removedConfigurations,s),t.addedConfigurations&&this.doRegisterConfigurations(t.addedConfigurations,!1,s),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:s,defaultsOverrides:a})}notifyConfigurationSchemaUpdated(...t){this._onDidSchemaChange.fire()}registerOverrideIdentifiers(t){this.doRegisterOverrideIdentifiers(t),this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(t){for(const a of t)this.overrideIdentifiers.add(a);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(t,a,s){t.forEach(i=>{this.validateAndRegisterProperties(i,a,i.extensionInfo,i.restrictedProperties,void 0,s),this.configurationContributors.push(i),this.registerJSONConfiguration(i)})}doDeregisterConfigurations(t,a){const s=i=>{if(i.properties)for(const r in i.properties){a.add(r);const o=this.configurationProperties[r];o?.policy?.name&&this.policyConfigurations.delete(o.policy.name),delete this.configurationProperties[r],this.removeFromSchema(r,i.properties[r])}i.allOf?.forEach(r=>s(r))};for(const i of t){s(i);const r=this.configurationContributors.indexOf(i);r!==-1&&this.configurationContributors.splice(r,1)}}validateAndRegisterProperties(t,a=!0,s,i,r=3,o){r=n.isUndefinedOrNull(t.scope)?r:t.scope;const p=t.properties;if(p)for(const M in p){const C=p[M];if(a&&f(M,C)){delete p[M];continue}if(C.source=s,C.defaultDefaultValue=p[M].default,this.updatePropertyDefaultValue(M,C),e.OVERRIDE_PROPERTY_REGEX.test(M)?C.scope=void 0:(C.scope=n.isUndefinedOrNull(C.scope)?r:C.scope,C.restricted=n.isUndefinedOrNull(C.restricted)?!!i?.includes(M):C.restricted),p[M].hasOwnProperty("included")&&!p[M].included){this.excludedConfigurationProperties[M]=p[M],delete p[M];continue}else this.configurationProperties[M]=p[M],p[M].policy?.name&&this.policyConfigurations.set(p[M].policy.name,M);!p[M].deprecationMessage&&p[M].markdownDeprecationMessage&&(p[M].deprecationMessage=p[M].markdownDeprecationMessage),o.add(M)}const k=t.allOf;if(k)for(const M of k)this.validateAndRegisterProperties(M,a,s,i,r,o)}getConfigurations(){return this.configurationContributors}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}getExcludedConfigurationProperties(){return this.excludedConfigurationProperties}getConfigurationDefaultsOverrides(){return this.configurationDefaultsOverrides}registerJSONConfiguration(t){const a=s=>{const i=s.properties;if(i)for(const o in i)this.updateSchema(o,i[o]);s.allOf?.forEach(a)};a(t)}updateSchema(t,a){switch(e.allSettings.properties[t]=a,a.scope){case 1:e.applicationSettings.properties[t]=a;break;case 2:e.machineSettings.properties[t]=a;break;case 6:e.machineOverridableSettings.properties[t]=a;break;case 3:e.windowSettings.properties[t]=a;break;case 4:e.resourceSettings.properties[t]=a;break;case 5:e.resourceSettings.properties[t]=a,this.resourceLanguageSettingsSchema.properties[t]=a;break}}removeFromSchema(t,a){switch(delete e.allSettings.properties[t],a.scope){case 1:delete e.applicationSettings.properties[t];break;case 2:delete e.machineSettings.properties[t];break;case 6:delete e.machineOverridableSettings.properties[t];break;case 3:delete e.windowSettings.properties[t];break;case 4:case 5:delete e.resourceSettings.properties[t],delete this.resourceLanguageSettingsSchema.properties[t];break}}updateOverridePropertyPatternKey(){for(const t of this.overrideIdentifiers.values()){const a=`[${t}]`,s={type:"object",description:O.localize(2,null),errorMessage:O.localize(3,null),$ref:e.resourceLanguageSettingsSchemaId};this.updatePropertyDefaultValue(a,s),e.allSettings.properties[a]=s,e.applicationSettings.properties[a]=s,e.machineSettings.properties[a]=s,e.machineOverridableSettings.properties[a]=s,e.windowSettings.properties[a]=s,e.resourceSettings.properties[a]=s}}registerOverridePropertyPatternKey(){const t={type:"object",description:O.localize(4,null),errorMessage:O.localize(5,null),$ref:e.resourceLanguageSettingsSchemaId};e.allSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=t,e.applicationSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=t,e.machineSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=t,e.machineOverridableSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=t,e.windowSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=t,e.resourceSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=t,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(t,a){const s=this.configurationDefaultsOverrides.get(t);let i=s?.value,r=s?.source;n.isUndefined(i)&&(i=a.defaultDefaultValue,r=void 0),n.isUndefined(i)&&(i=v(a.type)),a.default=i,a.defaultValueSource=r}}const u="\\[([^\\]]+)\\]",y=new RegExp(u,"g");e.OVERRIDE_PROPERTY_PATTERN=`^(${u})+$`,e.OVERRIDE_PROPERTY_REGEX=new RegExp(e.OVERRIDE_PROPERTY_PATTERN);function E(S){const t=[];if(e.OVERRIDE_PROPERTY_REGEX.test(S)){let a=y.exec(S);for(;a?.length;){const s=a[1].trim();s&&t.push(s),a=y.exec(S)}}return(0,b.distinct)(t)}e.overrideIdentifiersFromKey=E;function l(S){return S.reduce((t,a)=>`${t}[${a}]`,"")}e.keyFromOverrideIdentifiers=l;function v(S){switch(Array.isArray(S)?S[0]:S){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}e.getDefaultValue=v;const c=new w;h.Registry.add(e.Extensions.Configuration,c);function f(S,t){return S.trim()?e.OVERRIDE_PROPERTY_REGEX.test(S)?O.localize(7,null,S):c.getConfigurationProperties()[S]!==void 0?O.localize(8,null,S):t.policy?.name&&c.getPolicyConfigurations().get(t.policy?.name)!==void 0?O.localize(9,null,S,t.policy?.name,c.getPolicyConfigurations().get(t.policy?.name)):null:O.localize(6,null)}e.validateProperty=f;function I(){const S=[],t=c.getConfigurationProperties();for(const a of Object.keys(t))S.push([a,t[a].scope]);return S.push(["launch",4]),S.push(["task",4]),S}e.getScopes=I}),define(Z[121],ee([0,1,24,3,44,2,35,37,12,7,18,59,43]),function(H,e,b,A,n,O,D,P,h,d,m,g,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationChangeEvent=e.mergeChanges=e.Configuration=e.UserSettings=e.ConfigurationModelParser=e.ConfigurationModel=void 0;function u(a){return Object.isFrozen(a)?a:P.deepFreeze(a)}class y{constructor(s={},i=[],r=[],o){this._contents=s,this._keys=i,this._overrides=r,this.raw=o,this.overrideConfigurations=new Map}get rawConfiguration(){if(!this._rawConfiguration)if(this.raw?.length){const s=this.raw.map(i=>{if(i instanceof y)return i;const r=new E("");return r.parseRaw(i),r.configurationModel});this._rawConfiguration=s.reduce((i,r)=>r===i?r:i.merge(r),s[0])}else this._rawConfiguration=this;return this._rawConfiguration}get contents(){return this._contents}get overrides(){return this._overrides}get keys(){return this._keys}isEmpty(){return this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}getValue(s){return s?(0,m.getConfigurationValue)(this.contents,s):this.contents}inspect(s,i){const r=this.rawConfiguration.getValue(s),o=i?this.rawConfiguration.getOverrideValue(s,i):void 0,p=i?this.rawConfiguration.override(i).getValue(s):r;return{value:r,override:o,merged:p}}getOverrideValue(s,i){const r=this.getContentsForOverrideIdentifer(i);return r?s?(0,m.getConfigurationValue)(r,s):r:void 0}getKeysForOverrideIdentifier(s){const i=[];for(const r of this.overrides)r.identifiers.includes(s)&&i.push(...r.keys);return b.distinct(i)}getAllOverrideIdentifiers(){const s=[];for(const i of this.overrides)s.push(...i.identifiers);return b.distinct(s)}override(s){let i=this.overrideConfigurations.get(s);return i||(i=this.createOverrideConfigurationModel(s),this.overrideConfigurations.set(s,i)),i}merge(...s){const i=P.deepClone(this.contents),r=P.deepClone(this.overrides),o=[...this.keys],p=this.raw?.length?[...this.raw]:[this];for(const k of s)if(p.push(...k.raw?.length?k.raw:[k]),!k.isEmpty()){this.mergeContents(i,k.contents);for(const M of k.overrides){const[C]=r.filter(L=>b.equals(L.identifiers,M.identifiers));C?(this.mergeContents(C.contents,M.contents),C.keys.push(...M.keys),C.keys=b.distinct(C.keys)):r.push(P.deepClone(M))}for(const M of k.keys)o.indexOf(M)===-1&&o.push(M)}return new y(i,o,r,p.every(k=>k instanceof y)?void 0:p)}createOverrideConfigurationModel(s){const i=this.getContentsForOverrideIdentifer(s);if(!i||typeof i!="object"||!Object.keys(i).length)return this;const r={};for(const o of b.distinct([...Object.keys(this.contents),...Object.keys(i)])){let p=this.contents[o];const k=i[o];k&&(typeof p=="object"&&typeof k=="object"?(p=P.deepClone(p),this.mergeContents(p,k)):p=k),r[o]=p}return new y(r,this.keys,this.overrides)}mergeContents(s,i){for(const r of Object.keys(i)){if(r in s&&h.isObject(s[r])&&h.isObject(i[r])){this.mergeContents(s[r],i[r]);continue}s[r]=P.deepClone(i[r])}}getContentsForOverrideIdentifer(s){let i=null,r=null;const o=p=>{p&&(r?this.mergeContents(r,p):r=P.deepClone(p))};for(const p of this.overrides)p.identifiers.length===1&&p.identifiers[0]===s?i=p.contents:p.identifiers.includes(s)&&o(p.contents);return o(i),r}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}addValue(s,i){this.updateValue(s,i,!0)}setValue(s,i){this.updateValue(s,i,!1)}removeValue(s){const i=this.keys.indexOf(s);i!==-1&&(this.keys.splice(i,1),(0,m.removeFromValueTree)(this.contents,s),g.OVERRIDE_PROPERTY_REGEX.test(s)&&this.overrides.splice(this.overrides.findIndex(r=>b.equals(r.identifiers,(0,g.overrideIdentifiersFromKey)(s))),1))}updateValue(s,i,r){(0,m.addToValueTree)(this.contents,s,i,o=>console.error(o)),r=r||this.keys.indexOf(s)===-1,r&&this.keys.push(s),g.OVERRIDE_PROPERTY_REGEX.test(s)&&this.overrides.push({identifiers:(0,g.overrideIdentifiersFromKey)(s),keys:Object.keys(this.contents[s]),contents:(0,m.toValuesTree)(this.contents[s],o=>console.error(o))})}}e.ConfigurationModel=y;class E{constructor(s){this._name=s,this._raw=null,this._configurationModel=null,this._restrictedConfigurations=[],this._parseErrors=[]}get configurationModel(){return this._configurationModel||new y}get restrictedConfigurations(){return this._restrictedConfigurations}get errors(){return this._parseErrors}parse(s,i){if(!h.isUndefinedOrNull(s)){const r=this.doParseContent(s);this.parseRaw(r,i)}}reparse(s){this._raw&&this.parseRaw(this._raw,s)}parseRaw(s,i){this._raw=s;const{contents:r,keys:o,overrides:p,restricted:k,hasExcludedProperties:M}=this.doParseRaw(s,i);this._configurationModel=new y(r,o,p,M?[s]:void 0),this._restrictedConfigurations=k||[]}doParseContent(s){let i={},r=null,o=[];const p=[],k=[];function M(L){Array.isArray(o)?o.push(L):r!==null&&(o[r]=L)}const C={onObjectBegin:()=>{const L={};M(L),p.push(o),o=L,r=null},onObjectProperty:L=>{r=L},onObjectEnd:()=>{o=p.pop()},onArrayBegin:()=>{const L=[];M(L),p.push(o),o=L,r=null},onArrayEnd:()=>{o=p.pop()},onLiteralValue:M,onError:(L,T,F)=>{k.push({error:L,offset:T,length:F})}};if(s)try{n.visit(s,C),i=o[0]||{}}catch(L){console.error(`Error while parsing settings file ${this._name}: ${L}`),this._parseErrors=[L]}return i}doParseRaw(s,i){const r=w.Registry.as(g.Extensions.Configuration).getConfigurationProperties(),o=this.filter(s,r,!0,i);s=o.raw;const p=(0,m.toValuesTree)(s,C=>console.error(`Conflict in settings file ${this._name}: ${C}`)),k=Object.keys(s),M=this.toOverrides(s,C=>console.error(`Conflict in settings file ${this._name}: ${C}`));return{contents:p,keys:k,overrides:M,restricted:o.restricted,hasExcludedProperties:o.hasExcludedProperties}}filter(s,i,r,o){let p=!1;if(!o?.scopes&&!o?.skipRestricted&&!o?.exclude?.length)return{raw:s,restricted:[],hasExcludedProperties:p};const k={},M=[];for(const C in s)if(g.OVERRIDE_PROPERTY_REGEX.test(C)&&r){const L=this.filter(s[C],i,!1,o);k[C]=L.raw,p=p||L.hasExcludedProperties,M.push(...L.restricted)}else{const L=i[C],T=L?typeof L.scope<"u"?L.scope:3:void 0;L?.restricted&&M.push(C),!o.exclude?.includes(C)&&(o.include?.includes(C)||(T===void 0||o.scopes===void 0||o.scopes.includes(T))&&!(o.skipRestricted&&L?.restricted))?k[C]=s[C]:p=!0}return{raw:k,restricted:M,hasExcludedProperties:p}}toOverrides(s,i){const r=[];for(const o of Object.keys(s))if(g.OVERRIDE_PROPERTY_REGEX.test(o)){const p={};for(const k in s[o])p[k]=s[o][k];r.push({identifiers:(0,g.overrideIdentifiersFromKey)(o),keys:Object.keys(p),contents:(0,m.toValuesTree)(p,i)})}return r}}e.ConfigurationModelParser=E;class l extends O.Disposable{constructor(s,i,r,o){super(),this.userSettingsResource=s,this.parseOptions=i,this.fileService=o,this._onDidChange=this._register(new A.Emitter),this.onDidChange=this._onDidChange.event,this.parser=new E(this.userSettingsResource.toString()),this._register(this.fileService.watch(r.dirname(this.userSettingsResource))),this._register(this.fileService.watch(this.userSettingsResource)),this._register(A.Event.any(A.Event.filter(this.fileService.onDidFilesChange,p=>p.contains(this.userSettingsResource)),A.Event.filter(this.fileService.onDidRunOperation,p=>(p.isOperation(0)||p.isOperation(3)||p.isOperation(1)||p.isOperation(4))&&r.isEqual(p.resource,s)))(()=>this._onDidChange.fire()))}async loadConfiguration(){try{const s=await this.fileService.readFile(this.userSettingsResource);return this.parser.parse(s.value.toString()||"{}",this.parseOptions),this.parser.configurationModel}catch{return new y}}reparse(s){return s&&(this.parseOptions=s),this.parser.reparse(this.parseOptions),this.parser.configurationModel}getRestrictedSettings(){return this.parser.restrictedConfigurations}}e.UserSettings=l;class v{constructor(s,i,r,o,p,k,M,C,L,T,F,z,oe){this.key=s,this.overrides=i,this._value=r,this.overrideIdentifiers=o,this.defaultConfiguration=p,this.policyConfiguration=k,this.applicationConfiguration=M,this.userConfiguration=C,this.localUserConfiguration=L,this.remoteUserConfiguration=T,this.workspaceConfiguration=F,this.folderConfigurationModel=z,this.memoryConfigurationModel=oe}get value(){return u(this._value)}inspect(s,i,r){const o=s.inspect(i,r);return{get value(){return u(o.value)},get override(){return u(o.override)},get merged(){return u(o.merged)}}}get defaultInspectValue(){return this._defaultInspectValue||(this._defaultInspectValue=this.inspect(this.defaultConfiguration,this.key,this.overrides.overrideIdentifier)),this._defaultInspectValue}get defaultValue(){return this.defaultInspectValue.merged}get default(){return this.defaultInspectValue.value!==void 0||this.defaultInspectValue.override!==void 0?{value:this.defaultInspectValue.value,override:this.defaultInspectValue.override}:void 0}get policyInspectValue(){return this._policyInspectValue===void 0&&(this._policyInspectValue=this.policyConfiguration?this.inspect(this.policyConfiguration,this.key):null),this._policyInspectValue}get policyValue(){return this.policyInspectValue?.merged}get policy(){return this.policyInspectValue?.value!==void 0?{value:this.policyInspectValue.value}:void 0}get applicationInspectValue(){return this._applicationInspectValue===void 0&&(this._applicationInspectValue=this.applicationConfiguration?this.inspect(this.applicationConfiguration,this.key):null),this._applicationInspectValue}get applicationValue(){return this.applicationInspectValue?.merged}get application(){return this.applicationInspectValue?.value!==void 0||this.applicationInspectValue?.override!==void 0?{value:this.applicationInspectValue.value,override:this.applicationInspectValue.override}:void 0}get userInspectValue(){return this._userInspectValue||(this._userInspectValue=this.inspect(this.userConfiguration,this.key,this.overrides.overrideIdentifier)),this._userInspectValue}get userValue(){return this.userInspectValue.merged}get user(){return this.userInspectValue.value!==void 0||this.userInspectValue.override!==void 0?{value:this.userInspectValue.value,override:this.userInspectValue.override}:void 0}get userLocalInspectValue(){return this._userLocalInspectValue||(this._userLocalInspectValue=this.inspect(this.localUserConfiguration,this.key,this.overrides.overrideIdentifier)),this._userLocalInspectValue}get userLocalValue(){return this.userLocalInspectValue.merged}get userLocal(){return this.userLocalInspectValue.value!==void 0||this.userLocalInspectValue.override!==void 0?{value:this.userLocalInspectValue.value,override:this.userLocalInspectValue.override}:void 0}get userRemoteInspectValue(){return this._userRemoteInspectValue||(this._userRemoteInspectValue=this.inspect(this.remoteUserConfiguration,this.key,this.overrides.overrideIdentifier)),this._userRemoteInspectValue}get userRemoteValue(){return this.userRemoteInspectValue.merged}get userRemote(){return this.userRemoteInspectValue.value!==void 0||this.userRemoteInspectValue.override!==void 0?{value:this.userRemoteInspectValue.value,override:this.userRemoteInspectValue.override}:void 0}get workspaceInspectValue(){return this._workspaceInspectValue===void 0&&(this._workspaceInspectValue=this.workspaceConfiguration?this.inspect(this.workspaceConfiguration,this.key,this.overrides.overrideIdentifier):null),this._workspaceInspectValue}get workspaceValue(){return this.workspaceInspectValue?.merged}get workspace(){return this.workspaceInspectValue?.value!==void 0||this.workspaceInspectValue?.override!==void 0?{value:this.workspaceInspectValue.value,override:this.workspaceInspectValue.override}:void 0}get workspaceFolderInspectValue(){return this._workspaceFolderInspectValue===void 0&&(this._workspaceFolderInspectValue=this.folderConfigurationModel?this.inspect(this.folderConfigurationModel,this.key,this.overrides.overrideIdentifier):null),this._workspaceFolderInspectValue}get workspaceFolderValue(){return this.workspaceFolderInspectValue?.merged}get workspaceFolder(){return this.workspaceFolderInspectValue?.value!==void 0||this.workspaceFolderInspectValue?.override!==void 0?{value:this.workspaceFolderInspectValue.value,override:this.workspaceFolderInspectValue.override}:void 0}get memoryInspectValue(){return this._memoryInspectValue===void 0&&(this._memoryInspectValue=this.inspect(this.memoryConfigurationModel,this.key,this.overrides.overrideIdentifier)),this._memoryInspectValue}get memoryValue(){return this.memoryInspectValue.merged}get memory(){return this.memoryInspectValue.value!==void 0||this.memoryInspectValue.override!==void 0?{value:this.memoryInspectValue.value,override:this.memoryInspectValue.override}:void 0}}class c{constructor(s,i,r,o,p=new y,k=new y,M=new D.ResourceMap,C=new y,L=new D.ResourceMap){this._defaultConfiguration=s,this._policyConfiguration=i,this._applicationConfiguration=r,this._localUserConfiguration=o,this._remoteUserConfiguration=p,this._workspaceConfiguration=k,this._folderConfigurations=M,this._memoryConfiguration=C,this._memoryConfigurationByResource=L,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new D.ResourceMap,this._userConfiguration=null}getValue(s,i,r){return this.getConsolidatedConfigurationModel(s,i,r).getValue(s)}updateValue(s,i,r={}){let o;r.resource?(o=this._memoryConfigurationByResource.get(r.resource),o||(o=new y,this._memoryConfigurationByResource.set(r.resource,o))):o=this._memoryConfiguration,i===void 0?o.removeValue(s):o.setValue(s,i),r.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(s,i,r){const o=this.getConsolidatedConfigurationModel(s,i,r),p=this.getFolderConfigurationModelForResource(i.resource,r),k=i.resource?this._memoryConfigurationByResource.get(i.resource)||this._memoryConfiguration:this._memoryConfiguration,M=new Set;for(const C of o.overrides)for(const L of C.identifiers)o.getOverrideValue(s,L)!==void 0&&M.add(L);return new v(s,i,o.getValue(s),M.size?[...M]:void 0,this._defaultConfiguration,this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration,this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration,this.userConfiguration,this.localUserConfiguration,this.remoteUserConfiguration,r?this._workspaceConfiguration:void 0,p||void 0,k)}keys(s){const i=this.getFolderConfigurationModelForResource(void 0,s);return{default:this._defaultConfiguration.keys.slice(0),user:this.userConfiguration.keys.slice(0),workspace:this._workspaceConfiguration.keys.slice(0),workspaceFolder:i?i.keys.slice(0):[]}}updateDefaultConfiguration(s){this._defaultConfiguration=s,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updatePolicyConfiguration(s){this._policyConfiguration=s}updateApplicationConfiguration(s){this._applicationConfiguration=s,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateLocalUserConfiguration(s){this._localUserConfiguration=s,this._userConfiguration=null,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateRemoteUserConfiguration(s){this._remoteUserConfiguration=s,this._userConfiguration=null,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateWorkspaceConfiguration(s){this._workspaceConfiguration=s,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateFolderConfiguration(s,i){this._folderConfigurations.set(s,i),this._foldersConsolidatedConfigurations.delete(s)}deleteFolderConfiguration(s){this.folderConfigurations.delete(s),this._foldersConsolidatedConfigurations.delete(s)}compareAndUpdateDefaultConfiguration(s,i){const r=[];if(!i){const{added:o,updated:p,removed:k}=S(this._defaultConfiguration,s);i=[...o,...p,...k]}for(const o of i)for(const p of(0,g.overrideIdentifiersFromKey)(o)){const k=this._defaultConfiguration.getKeysForOverrideIdentifier(p),M=s.getKeysForOverrideIdentifier(p),C=[...M.filter(L=>k.indexOf(L)===-1),...k.filter(L=>M.indexOf(L)===-1),...k.filter(L=>!P.equals(this._defaultConfiguration.override(p).getValue(L),s.override(p).getValue(L)))];r.push([p,C])}return this.updateDefaultConfiguration(s),{keys:i,overrides:r}}compareAndUpdatePolicyConfiguration(s){const{added:i,updated:r,removed:o}=S(this._policyConfiguration,s),p=[...i,...r,...o];return p.length&&this.updatePolicyConfiguration(s),{keys:p,overrides:[]}}compareAndUpdateApplicationConfiguration(s){const{added:i,updated:r,removed:o,overrides:p}=S(this.applicationConfiguration,s),k=[...i,...r,...o];return k.length&&this.updateApplicationConfiguration(s),{keys:k,overrides:p}}compareAndUpdateLocalUserConfiguration(s){const{added:i,updated:r,removed:o,overrides:p}=S(this.localUserConfiguration,s),k=[...i,...r,...o];return k.length&&this.updateLocalUserConfiguration(s),{keys:k,overrides:p}}compareAndUpdateRemoteUserConfiguration(s){const{added:i,updated:r,removed:o,overrides:p}=S(this.remoteUserConfiguration,s),k=[...i,...r,...o];return k.length&&this.updateRemoteUserConfiguration(s),{keys:k,overrides:p}}compareAndUpdateWorkspaceConfiguration(s){const{added:i,updated:r,removed:o,overrides:p}=S(this.workspaceConfiguration,s),k=[...i,...r,...o];return k.length&&this.updateWorkspaceConfiguration(s),{keys:k,overrides:p}}compareAndUpdateFolderConfiguration(s,i){const r=this.folderConfigurations.get(s),{added:o,updated:p,removed:k,overrides:M}=S(r,i),C=[...o,...p,...k];return(C.length||!r)&&this.updateFolderConfiguration(s,i),{keys:C,overrides:M}}compareAndDeleteFolderConfiguration(s){const i=this.folderConfigurations.get(s);if(!i)throw new Error("Unknown folder");this.deleteFolderConfiguration(s);const{added:r,updated:o,removed:p,overrides:k}=S(i,void 0);return{keys:[...r,...o,...p],overrides:k}}get defaults(){return this._defaultConfiguration}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration)),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}get workspaceConfiguration(){return this._workspaceConfiguration}get folderConfigurations(){return this._folderConfigurations}getConsolidatedConfigurationModel(s,i,r){let o=this.getConsolidatedConfigurationModelForResource(i,r);return i.overrideIdentifier&&(o=o.override(i.overrideIdentifier)),!this._policyConfiguration.isEmpty()&&this._policyConfiguration.getValue(s)!==void 0&&(o=o.merge(this._policyConfiguration)),o}getConsolidatedConfigurationModelForResource({resource:s},i){let r=this.getWorkspaceConsolidatedConfiguration();if(i&&s){const o=i.getFolder(s);o&&(r=this.getFolderConsolidatedConfiguration(o.uri)||r);const p=this._memoryConfigurationByResource.get(s);p&&(r=r.merge(p))}return r}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration)),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(s){let i=this._foldersConsolidatedConfigurations.get(s);if(!i){const r=this.getWorkspaceConsolidatedConfiguration(),o=this._folderConfigurations.get(s);o?(i=r.merge(o),this._foldersConsolidatedConfigurations.set(s,i)):i=r}return i}getFolderConfigurationModelForResource(s,i){if(i&&s){const r=i.getFolder(s);if(r)return this._folderConfigurations.get(r.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},policy:{contents:this._policyConfiguration.contents,overrides:this._policyConfiguration.overrides,keys:this._policyConfiguration.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce((s,i)=>{const{contents:r,overrides:o,keys:p}=this._folderConfigurations.get(i);return s.push([i,{contents:r,overrides:o,keys:p}]),s},[])}}allKeys(){const s=new Set;return this._defaultConfiguration.keys.forEach(i=>s.add(i)),this.userConfiguration.keys.forEach(i=>s.add(i)),this._workspaceConfiguration.keys.forEach(i=>s.add(i)),this._folderConfigurations.forEach(i=>i.keys.forEach(r=>s.add(r))),[...s.values()]}allOverrideIdentifiers(){const s=new Set;return this._defaultConfiguration.getAllOverrideIdentifiers().forEach(i=>s.add(i)),this.userConfiguration.getAllOverrideIdentifiers().forEach(i=>s.add(i)),this._workspaceConfiguration.getAllOverrideIdentifiers().forEach(i=>s.add(i)),this._folderConfigurations.forEach(i=>i.getAllOverrideIdentifiers().forEach(r=>s.add(r))),[...s.values()]}getAllKeysForOverrideIdentifier(s){const i=new Set;return this._defaultConfiguration.getKeysForOverrideIdentifier(s).forEach(r=>i.add(r)),this.userConfiguration.getKeysForOverrideIdentifier(s).forEach(r=>i.add(r)),this._workspaceConfiguration.getKeysForOverrideIdentifier(s).forEach(r=>i.add(r)),this._folderConfigurations.forEach(r=>r.getKeysForOverrideIdentifier(s).forEach(o=>i.add(o))),[...i.values()]}static parse(s){const i=this.parseConfigurationModel(s.defaults),r=this.parseConfigurationModel(s.policy),o=this.parseConfigurationModel(s.application),p=this.parseConfigurationModel(s.user),k=this.parseConfigurationModel(s.workspace),M=s.folders.reduce((C,L)=>(C.set(d.URI.revive(L[0]),this.parseConfigurationModel(L[1])),C),new D.ResourceMap);return new c(i,r,o,p,new y,k,M,new y,new D.ResourceMap)}static parseConfigurationModel(s){return new y(s.contents,s.keys,s.overrides)}}e.Configuration=c;function f(...a){if(a.length===0)return{keys:[],overrides:[]};if(a.length===1)return a[0];const s=new Set,i=new Map;for(const o of a)o.keys.forEach(p=>s.add(p)),o.overrides.forEach(([p,k])=>{const M=(0,D.getOrSet)(i,p,new Set);k.forEach(C=>M.add(C))});const r=[];return i.forEach((o,p)=>r.push([p,[...o.values()]])),{keys:[...s.values()],overrides:r}}e.mergeChanges=f;class I{constructor(s,i,r,o){this.change=s,this.previous=i,this.currentConfiguraiton=r,this.currentWorkspace=o,this._marker=`
`,this._markerCode1=this._marker.charCodeAt(0),this._markerCode2=".".charCodeAt(0),this.affectedKeys=new Set,this._previousConfiguration=void 0;for(const p of s.keys)this.affectedKeys.add(p);for(const[,p]of s.overrides)for(const k of p)this.affectedKeys.add(k);this._affectsConfigStr=this._marker;for(const p of this.affectedKeys)this._affectsConfigStr+=p+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=c.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(s,i){const r=this._marker+s,o=this._affectsConfigStr.indexOf(r);if(o<0)return!1;const p=o+r.length;if(p>=this._affectsConfigStr.length)return!1;const k=this._affectsConfigStr.charCodeAt(p);if(k!==this._markerCode1&&k!==this._markerCode2)return!1;if(i){const M=this.previousConfiguration?this.previousConfiguration.getValue(s,i,this.previous?.workspace):void 0,C=this.currentConfiguraiton.getValue(s,i,this.currentWorkspace);return!P.equals(M,C)}return!0}}e.ConfigurationChangeEvent=I;function S(a,s){const{added:i,removed:r,updated:o}=t(s?.rawConfiguration,a?.rawConfiguration),p=[],k=a?.getAllOverrideIdentifiers()||[],M=s?.getAllOverrideIdentifiers()||[];if(s){const C=M.filter(L=>!k.includes(L));for(const L of C)p.push([L,s.getKeysForOverrideIdentifier(L)])}if(a){const C=k.filter(L=>!M.includes(L));for(const L of C)p.push([L,a.getKeysForOverrideIdentifier(L)])}if(s&&a){for(const C of k)if(M.includes(C)){const L=t({contents:a.getOverrideValue(void 0,C)||{},keys:a.getKeysForOverrideIdentifier(C)},{contents:s.getOverrideValue(void 0,C)||{},keys:s.getKeysForOverrideIdentifier(C)});p.push([C,[...L.added,...L.removed,...L.updated]])}}return{added:i,removed:r,updated:o,overrides:p}}function t(a,s){const i=a?s?a.keys.filter(p=>s.keys.indexOf(p)===-1):[...a.keys]:[],r=s?a?s.keys.filter(p=>a.keys.indexOf(p)===-1):[...s.keys]:[],o=[];if(a&&s){for(const p of s.keys)if(a.keys.indexOf(p)!==-1){const k=(0,m.getConfigurationValue)(s.contents,p),M=(0,m.getConfigurationValue)(a.contents,p);P.equals(k,M)||o.push(p)}}return{added:i,removed:r,updated:o}}}),define(Z[238],ee([0,1,24,3,2,37,12,121,59,5,39,43]),function(H,e,b,A,n,O,D,P,h,d,m,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PolicyConfiguration=e.NullPolicyConfiguration=e.DefaultConfiguration=void 0;class w extends n.Disposable{constructor(){super(...arguments),this._onDidChangeConfiguration=this._register(new A.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._configurationModel=new P.ConfigurationModel}get configurationModel(){return this._configurationModel}async initialize(){return this.resetConfigurationModel(),this._register(g.Registry.as(h.Extensions.Configuration).onDidUpdateConfiguration(({properties:l,defaultsOverrides:v})=>this.onDidUpdateConfiguration(Array.from(l),v))),this.configurationModel}reload(){return this.resetConfigurationModel(),this.configurationModel}onDidUpdateConfiguration(l,v){this.updateConfigurationModel(l,g.Registry.as(h.Extensions.Configuration).getConfigurationProperties()),this._onDidChangeConfiguration.fire({defaults:this.configurationModel,properties:l})}getConfigurationDefaultOverrides(){return{}}resetConfigurationModel(){this._configurationModel=new P.ConfigurationModel;const l=g.Registry.as(h.Extensions.Configuration).getConfigurationProperties();this.updateConfigurationModel(Object.keys(l),l)}updateConfigurationModel(l,v){const c=this.getConfigurationDefaultOverrides();for(const f of l){const I=c[f],S=v[f];I!==void 0?this._configurationModel.addValue(f,I):S?this._configurationModel.addValue(f,S.default):this._configurationModel.removeValue(f)}}}e.DefaultConfiguration=w;class u{constructor(){this.onDidChangeConfiguration=A.Event.None,this.configurationModel=new P.ConfigurationModel}async initialize(){return this.configurationModel}}e.NullPolicyConfiguration=u;let y=class extends n.Disposable{get configurationModel(){return this._configurationModel}constructor(l,v,c){super(),this.defaultConfiguration=l,this.policyService=v,this.logService=c,this._onDidChangeConfiguration=this._register(new A.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._configurationModel=new P.ConfigurationModel}async initialize(){return this.logService.trace("PolicyConfiguration#initialize"),this.update(await this.updatePolicyDefinitions(this.defaultConfiguration.configurationModel.keys),!1),this._register(this.policyService.onDidChange(l=>this.onDidChangePolicies(l))),this._register(this.defaultConfiguration.onDidChangeConfiguration(async({properties:l})=>this.update(await this.updatePolicyDefinitions(l),!0))),this._configurationModel}async updatePolicyDefinitions(l){this.logService.trace("PolicyConfiguration#updatePolicyDefinitions",l);const v={},c=[],f=g.Registry.as(h.Extensions.Configuration).getConfigurationProperties();for(const I of l){const S=f[I];if(!S){c.push(I);continue}if(S.policy){if(S.type!=="string"&&S.type!=="number"){this.logService.warn(`Policy ${S.policy.name} has unsupported type ${S.type}`);continue}c.push(I),v[S.policy.name]={type:S.type}}}return(0,D.isEmptyObject)(v)||await this.policyService.updatePolicyDefinitions(v),c}onDidChangePolicies(l){this.logService.trace("PolicyConfiguration#onDidChangePolicies",l);const v=g.Registry.as(h.Extensions.Configuration).getPolicyConfigurations(),c=(0,b.coalesce)(l.map(f=>v.get(f)));this.update(c,!0)}update(l,v){this.logService.trace("PolicyConfiguration#update",l);const c=g.Registry.as(h.Extensions.Configuration).getConfigurationProperties(),f=[],I=this._configurationModel.isEmpty();for(const S of l){const t=c[S]?.policy?.name;if(t){const a=this.policyService.getPolicyValue(t);(I?a!==void 0:!(0,O.equals)(this._configurationModel.getValue(S),a))&&f.push([S,a])}else this._configurationModel.getValue(S)!==void 0&&f.push([S,void 0])}if(f.length){this.logService.trace("PolicyConfiguration#changed",f);const S=this._configurationModel;this._configurationModel=new P.ConfigurationModel;for(const t of S.keys)this._configurationModel.setValue(t,S.getValue(t));for(const[t,a]of f)a===void 0?this._configurationModel.removeValue(t):this._configurationModel.setValue(t,a);v&&this._onDidChangeConfiguration.fire(this._configurationModel)}}};e.PolicyConfiguration=y,e.PolicyConfiguration=y=be([Y(1,m.IPolicyService),Y(2,d.ILogService)],y)}),define(Z[239],ee([0,1,8,3,2,19,18,121,238,39]),function(H,e,b,A,n,O,D,P,h,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationService=void 0;class m extends n.Disposable{constructor(w,u,y,E){super(),this.settingsResource=w,this._onDidChangeConfiguration=this._register(new A.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this.defaultConfiguration=this._register(new h.DefaultConfiguration),this.policyConfiguration=y instanceof d.NullPolicyService?new h.NullPolicyConfiguration:this._register(new h.PolicyConfiguration(this.defaultConfiguration,y,E)),this.userConfiguration=this._register(new P.UserSettings(this.settingsResource,{},O.extUriBiasedIgnorePathCase,u)),this.configuration=new P.Configuration(this.defaultConfiguration.configurationModel,this.policyConfiguration.configurationModel,new P.ConfigurationModel,new P.ConfigurationModel),this.reloadConfigurationScheduler=this._register(new b.RunOnceScheduler(()=>this.reloadConfiguration(),50)),this._register(this.defaultConfiguration.onDidChangeConfiguration(({defaults:l,properties:v})=>this.onDidDefaultConfigurationChange(l,v))),this._register(this.policyConfiguration.onDidChangeConfiguration(l=>this.onDidPolicyConfigurationChange(l))),this._register(this.userConfiguration.onDidChange(()=>this.reloadConfigurationScheduler.schedule()))}async initialize(){const[w,u,y]=await Promise.all([this.defaultConfiguration.initialize(),this.policyConfiguration.initialize(),this.userConfiguration.loadConfiguration()]);this.configuration=new P.Configuration(w,u,new P.ConfigurationModel,y)}getConfigurationData(){return this.configuration.toData()}getValue(w,u){const y=typeof w=="string"?w:void 0,E=(0,D.isConfigurationOverrides)(w)?w:(0,D.isConfigurationOverrides)(u)?u:{};return this.configuration.getValue(y,E,void 0)}updateValue(w,u,y,E){return Promise.reject(new Error("not supported"))}inspect(w){return this.configuration.inspect(w,{},void 0)}keys(){return this.configuration.keys(void 0)}async reloadConfiguration(){const w=await this.userConfiguration.loadConfiguration();this.onDidChangeUserConfiguration(w)}onDidChangeUserConfiguration(w){const u=this.configuration.toData(),y=this.configuration.compareAndUpdateLocalUserConfiguration(w);this.trigger(y,u,2)}onDidDefaultConfigurationChange(w,u){const y=this.configuration.toData(),E=this.configuration.compareAndUpdateDefaultConfiguration(w,u);this.trigger(E,y,7)}onDidPolicyConfigurationChange(w){const u=this.configuration.toData(),y=this.configuration.compareAndUpdatePolicyConfiguration(w);this.trigger(y,u,7)}trigger(w,u,y){const E=new P.ConfigurationChangeEvent(w,{data:u},this.configuration);E.source=y,E.sourceConfig=this.getTargetConfiguration(y),this._onDidChangeConfiguration.fire(E)}getTargetConfiguration(w){switch(w){case 7:return this.configuration.defaults.contents;case 2:return this.configuration.localUserConfiguration.contents}return{}}}e.ConfigurationService=m}),define(Z[240],ee([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NodeRemoteResourceRouter=e.NODE_REMOTE_RESOURCE_CHANNEL_NAME=e.NODE_REMOTE_RESOURCE_IPC_METHOD_NAME=void 0,e.NODE_REMOTE_RESOURCE_IPC_METHOD_NAME="request",e.NODE_REMOTE_RESOURCE_CHANNEL_NAME="remoteResourceHandler";class b{async routeCall(n,O,D){if(O!==e.NODE_REMOTE_RESOURCE_IPC_METHOD_NAME)throw new Error(`Call not found: ${O}`);const P=D[0];if(P?.authority){const h=n.connections.find(d=>d.ctx===P.authority);if(h)return h}throw new Error("Caller not found")}routeEvent(n,O){throw new Error(`Event not found: ${O}`)}}e.NodeRemoteResourceRouter=b}),define(Z[241],ee([0,1,13,6]),function(H,e,b,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getRemoteAuthorityPrefix=e.RemoteAuthorityResolverError=e.RemoteAuthorityResolverErrorCode=e.WebSocketRemoteConnection=e.ManagedRemoteConnection=e.RemoteConnectionType=e.IRemoteAuthorityResolverService=void 0,e.IRemoteAuthorityResolverService=(0,A.createDecorator)("remoteAuthorityResolverService");var n;(function(m){m[m.WebSocket=0]="WebSocket",m[m.Managed=1]="Managed"})(n||(e.RemoteConnectionType=n={}));class O{constructor(g){this.id=g,this.type=1}toString(){return`Managed(${this.id})`}}e.ManagedRemoteConnection=O;class D{constructor(g,w){this.host=g,this.port=w,this.type=0}toString(){return`WebSocket(${this.host}:${this.port})`}}e.WebSocketRemoteConnection=D;var P;(function(m){m.Unknown="Unknown",m.NotAvailable="NotAvailable",m.TemporarilyNotAvailable="TemporarilyNotAvailable",m.NoResolverFound="NoResolverFound",m.InvalidAuthority="InvalidAuthority"})(P||(e.RemoteAuthorityResolverErrorCode=P={}));class h extends b.ErrorNoTelemetry{static isNotAvailable(g){return g instanceof h&&g._code===P.NotAvailable}static isTemporarilyNotAvailable(g){return g instanceof h&&g._code===P.TemporarilyNotAvailable}static isNoResolverFound(g){return g instanceof h&&g._code===P.NoResolverFound}static isInvalidAuthority(g){return g instanceof h&&g._code===P.InvalidAuthority}static isHandled(g){return g instanceof h&&g.isHandled}constructor(g,w=P.Unknown,u){super(g),this._message=g,this._code=w,this._detail=u,this.isHandled=w===P.NotAvailable&&u===!0,Object.setPrototypeOf(this,h.prototype)}}e.RemoteAuthorityResolverError=h;function d(m){const g=m.indexOf("+");return g===-1?m:m.substring(0,g)}e.getRemoteAuthorityPrefix=d}),define(Z[60],ee([0,1,15]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseAuthorityWithOptionalPort=e.parseAuthorityWithPort=e.getRemoteServerRootPath=e.getRemoteName=e.getRemoteAuthority=void 0;function A(d){return d.scheme===b.Schemas.vscodeRemote?d.authority:void 0}e.getRemoteAuthority=A;function n(d){if(!d)return;const m=d.indexOf("+");return m<0?d:d.substr(0,m)}e.getRemoteName=n;function O(d){return`/${d.quality??"oss"}-${d.commit??"dev"}`}e.getRemoteServerRootPath=O;function D(d){const{host:m,port:g}=h(d);if(typeof g>"u")throw new Error("Remote authority doesn't contain a port!");return{host:m,port:g}}e.parseAuthorityWithPort=D;function P(d,m){let{host:g,port:w}=h(d);return typeof w>"u"&&(w=m),{host:g,port:w}}e.parseAuthorityWithOptionalPort=P;function h(d){const m=d.match(/^(\[[0-9a-z:]+\]):(\d+)$/);if(m)return{host:m[1],port:parseInt(m[2],10)};const g=d.match(/^(\[[0-9a-z:]+\])$/);if(g)return{host:g[1],port:void 0};const w=d.match(/(.*):(\d+)$/);return w?{host:w[1],port:parseInt(w[2],10)}:{host:d,port:void 0}}}),define(Z[122],ee([0,1,26,6,60]),function(H,e,b,A,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IBuiltinExtensionsScannerService=e.isResolverExtension=e.isAuthenticationProviderExtension=e.isLanguagePackExtension=e.isApplicationScopedExtension=e.ExtensionIdentifierMap=e.ExtensionIdentifierSet=e.ExtensionIdentifier=e.TargetPlatform=e.ExtensionType=e.EXTENSION_CATEGORIES=e.getWorkspaceSupportTypeMessage=e.ALL_EXTENSION_KINDS=e.ExtensionsPolicy=e.ExtensionsPolicyKey=e.UNDEFINED_PUBLISHER=e.BUILTIN_MANIFEST_CACHE_FILE=e.USER_MANIFEST_CACHE_FILE=void 0,e.USER_MANIFEST_CACHE_FILE="extensions.user.cache",e.BUILTIN_MANIFEST_CACHE_FILE="extensions.builtin.cache",e.UNDEFINED_PUBLISHER="undefined_publisher",e.ExtensionsPolicyKey="extensions.extensionsPolicy";var O;(function(l){l.allowAll="allowAll",l.allowNone="allowNone",l.allowMicrosoft="allowMicrosoft"})(O||(e.ExtensionsPolicy=O={})),e.ALL_EXTENSION_KINDS=["ui","workspace","web"];function D(l){if(typeof l=="object"&&l!==null&&l.supported!==!0)return l.description}e.getWorkspaceSupportTypeMessage=D,e.EXTENSION_CATEGORIES=["Language Packs"];var P;(function(l){l[l.System=0]="System",l[l.User=1]="User"})(P||(e.ExtensionType=P={}));var h;(function(l){l.WIN32_X64="win32-x64",l.WIN32_IA32="win32-ia32",l.WIN32_ARM64="win32-arm64",l.LINUX_X64="linux-x64",l.LINUX_ARM64="linux-arm64",l.LINUX_ARMHF="linux-armhf",l.ALPINE_X64="alpine-x64",l.ALPINE_ARM64="alpine-arm64",l.DARWIN_X64="darwin-x64",l.DARWIN_ARM64="darwin-arm64",l.WEB="web",l.UNIVERSAL="universal",l.UNKNOWN="unknown",l.UNDEFINED="undefined"})(h||(e.TargetPlatform=h={}));class d{constructor(v){this.value=v,this._lower=v.toLowerCase()}static equals(v,c){if(typeof v>"u"||v===null)return typeof c>"u"||c===null;if(typeof c>"u"||c===null)return!1;if(typeof v=="string"||typeof c=="string"){const f=typeof v=="string"?v:v.value,I=typeof c=="string"?c:c.value;return b.equalsIgnoreCase(f,I)}return v._lower===c._lower}static toKey(v){return typeof v=="string"?v.toLowerCase():v._lower}}e.ExtensionIdentifier=d;class m{get size(){return this._set.size}constructor(v){if(this._set=new Set,v)for(const c of v)this.add(c)}add(v){this._set.add(d.toKey(v))}delete(v){return this._set.delete(d.toKey(v))}has(v){return this._set.has(d.toKey(v))}}e.ExtensionIdentifierSet=m;class g{constructor(){this._map=new Map}clear(){this._map.clear()}delete(v){this._map.delete(d.toKey(v))}get(v){return this._map.get(d.toKey(v))}has(v){return this._map.has(d.toKey(v))}set(v,c){this._map.set(d.toKey(v),c)}values(){return this._map.values()}forEach(v){this._map.forEach(v)}[Symbol.iterator](){return this._map[Symbol.iterator]()}}e.ExtensionIdentifierMap=g;function w(l){return u(l)}e.isApplicationScopedExtension=w;function u(l){return l.contributes&&l.contributes.localizations?l.contributes.localizations.length>0:!1}e.isLanguagePackExtension=u;function y(l){return l.contributes&&l.contributes.authentication?l.contributes.authentication.length>0:!1}e.isAuthenticationProviderExtension=y;function E(l,v){if(v){const c=`onResolveRemoteAuthority:${(0,n.getRemoteName)(v)}`;return!!l.activationEvents?.includes(c)}return!1}e.isResolverExtension=E,e.IBuiltinExtensionsScannerService=(0,A.createDecorator)("IBuiltinExtensionsScannerService")}),define(Z[242],ee([0,1,8,17,23,13,3,2,65,70,31,111,241,60]),function(H,e,b,A,n,O,D,P,h,d,m,g,w,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionHostPersistentConnection=e.ManagementPersistentConnection=e.PersistentConnection=e.ReconnectionPermanentFailureEvent=e.ConnectionGainEvent=e.ReconnectionRunningEvent=e.ReconnectionWaitEvent=e.ConnectionLostEvent=e.PersistentConnectionEventType=e.connectRemoteAgentTunnel=e.connectRemoteAgentExtensionHost=e.connectRemoteAgentManagement=e.ConnectionType=void 0;const y=30*1e3;var E;(function(x){x[x.Management=1]="Management",x[x.ExtensionHost=2]="ExtensionHost",x[x.Tunnel=3]="Tunnel"})(E||(e.ConnectionType=E={}));function l(x){switch(x){case 1:return"Management";case 2:return"ExtensionHost";case 3:return"Tunnel"}}function v(x){const R=new n.CancellationTokenSource;return setTimeout(()=>R.cancel(),x),R.token}function c(x,R){if(x.isCancellationRequested||R.isCancellationRequested)return n.CancellationToken.Cancelled;const _=new n.CancellationTokenSource;return x.onCancellationRequested(()=>_.cancel()),R.onCancellationRequested(()=>_.cancel()),_.token}class f{get didTimeout(){return this._state==="timedout"}constructor(R){this._state="pending",this._disposables=new P.DisposableStore,this.promise=new Promise((_,N)=>{this._resolvePromise=_,this._rejectPromise=N}),R.isCancellationRequested?this._timeout():this._disposables.add(R.onCancellationRequested(()=>this._timeout()))}registerDisposable(R){this._state==="pending"?this._disposables.add(R):R.dispose()}_timeout(){this._state==="pending"&&(this._disposables.dispose(),this._state="timedout",this._rejectPromise(this._createTimeoutError()))}_createTimeoutError(){const R=new Error("Time limit reached");return R.code="ETIMEDOUT",R.syscall="connect",R}resolve(R){this._state==="pending"&&(this._disposables.dispose(),this._state="resolved",this._resolvePromise(R))}reject(R){this._state==="pending"&&(this._disposables.dispose(),this._state="rejected",this._rejectPromise(R))}}function I(x,R){const _=new f(R);return _.registerDisposable(x.onControlMessage(N=>{const q=JSON.parse(N.toString()),re=W(q);re?_.reject(re):_.resolve(q)})),_.promise}function S(x,R,_,N,q,re,ie,le){const V=new f(le),te=d.StopWatch.create(!1);return x.info(`Creating a socket (${ie})...`),h.mark(`code/willCreateSocket/${re}`),R.connect(_,N,q,ie).then(Q=>{V.didTimeout?(h.mark(`code/didCreateSocketError/${re}`),x.info(`Creating a socket (${ie}) finished after ${te.elapsed()} ms, but this is too late and has timed out already.`),Q?.dispose()):(h.mark(`code/didCreateSocketOK/${re}`),x.info(`Creating a socket (${ie}) was successful after ${te.elapsed()} ms.`),V.resolve(Q))},Q=>{h.mark(`code/didCreateSocketError/${re}`),x.info(`Creating a socket (${ie}) returned an error after ${te.elapsed()} ms.`),x.error(Q),V.reject(Q)}),V.promise}function t(x,R){const _=new f(R);return x.then(N=>{_.didTimeout||_.resolve(N)},N=>{_.didTimeout||_.reject(N)}),_.promise}async function a(x,R,_,N){const q=se(x,R);x.logService.trace(`${q} 1/6. invoking socketFactory.connect().`);let re;try{re=await S(x.logService,x.remoteSocketFactoryService,x.connectTo,(0,u.getRemoteServerRootPath)(x),`reconnectionToken=${x.reconnectionToken}&reconnection=${x.reconnectionProtocol?"true":"false"}`,l(R),`renderer-${l(R)}-${x.reconnectionToken}`,N)}catch(Q){throw x.logService.error(`${q} socketFactory.connect() failed or timed out. Error:`),x.logService.error(Q),Q}x.logService.trace(`${q} 2/6. socketFactory.connect() was successful.`);let ie,le;x.reconnectionProtocol?(x.reconnectionProtocol.beginAcceptReconnection(re,null),ie=x.reconnectionProtocol,le=!1):(ie=new g.PersistentProtocol({socket:re}),le=!0),x.logService.trace(`${q} 3/6. sending AuthRequest control message.`);const V=await t(x.signService.createNewMessage((0,m.generateUuid)()),N),te={type:"auth",auth:x.connectionToken||"00000000000000000000",data:V.data};ie.sendControl(A.VSBuffer.fromString(JSON.stringify(te)));try{const Q=await I(ie,c(N,v(1e4)));if(Q.type!=="sign"||typeof Q.data!="string"){const De=new Error("Unexpected handshake message");throw De.code="VSCODE_CONNECTION_ERROR",De}if(x.logService.trace(`${q} 4/6. received SignRequest control message.`),!await t(x.signService.validate(V,Q.signedData),N)){const De=new Error("Refused to connect to unsupported server");throw De.code="VSCODE_CONNECTION_ERROR",De}const pe=await t(x.signService.sign(Q.data),N),Pe={type:"connectionType",commit:x.commit,signedData:pe,desiredConnectionType:R};return _&&(Pe.args=_),x.logService.trace(`${q} 5/6. sending ConnectionTypeRequest control message.`),ie.sendControl(A.VSBuffer.fromString(JSON.stringify(Pe))),{protocol:ie,ownsProtocol:le}}catch(Q){throw Q&&Q.code==="ETIMEDOUT"&&(x.logService.error(`${q} the handshake timed out. Error:`),x.logService.error(Q)),Q&&Q.code==="VSCODE_CONNECTION_ERROR"&&(x.logService.error(`${q} received error control message when negotiating connection. Error:`),x.logService.error(Q)),le&&B(ie),Q}}async function s(x,R,_,N){const q=Date.now(),re=se(x,R),{protocol:ie,ownsProtocol:le}=await a(x,R,_,N),V=new f(N);return V.registerDisposable(ie.onControlMessage(te=>{const Q=JSON.parse(te.toString()),fe=W(Q);fe?(x.logService.error(`${re} received error control message when negotiating connection. Error:`),x.logService.error(fe),le&&B(ie),V.reject(fe)):(x.reconnectionProtocol?.endAcceptReconnection(),x.logService.trace(`${re} 6/6. handshake finished, connection is up and running after ${ce(q)}!`),V.resolve({protocol:ie,firstMessage:Q}))})),V.promise}async function i(x,R){const{protocol:_}=await s(x,1,void 0,R);return{protocol:_}}async function r(x,R,_){const{protocol:N,firstMessage:q}=await s(x,2,R,_),re=q&&q.debugPort;return{protocol:N,debugPort:re}}async function o(x,R,_){const N=Date.now(),q=se(x,3),{protocol:re}=await a(x,3,R,_);return x.logService.trace(`${q} 6/6. handshake finished, connection is up and running after ${ce(N)}!`),re}async function p(x,R,_){const{connectTo:N,connectionToken:q}=await x.addressProvider.getAddress();return{commit:x.commit,quality:x.quality,connectTo:N,connectionToken:q,reconnectionToken:R,reconnectionProtocol:_,remoteSocketFactoryService:x.remoteSocketFactoryService,signService:x.signService,logService:x.logService}}async function k(x,R,_){return C(x,async N=>{const{protocol:q}=await i(N,n.CancellationToken.None);return new j(x,R,_,N.reconnectionToken,q)})}e.connectRemoteAgentManagement=k;async function M(x,R){return C(x,async _=>{const{protocol:N,debugPort:q}=await r(_,R,n.CancellationToken.None);return new G(x,R,_.reconnectionToken,N,q)})}e.connectRemoteAgentExtensionHost=M;async function C(x,R){for(let N=1;;N++)try{const q=(0,m.generateUuid)(),re=await p(x,q,null);return await R(re)}catch(q){if(N<5)x.logService.error(`[remote-connection][attempt ${N}] An error occurred in initial connection! Will retry... Error:`),x.logService.error(q);else throw x.logService.error(`[remote-connection][attempt ${N}]  An error occurred in initial connection! It will be treated as a permanent error. Error:`),x.logService.error(q),ue.triggerPermanentFailure(0,0,w.RemoteAuthorityResolverError.isHandled(q)),q}}async function L(x,R,_){const N=await p(x,(0,m.generateUuid)(),null);return await o(N,{host:R,port:_},n.CancellationToken.None)}e.connectRemoteAgentTunnel=L;function T(x){return(0,b.createCancelablePromise)(R=>new Promise((_,N)=>{const q=setTimeout(_,x*1e3);R.onCancellationRequested(()=>{clearTimeout(q),_()})}))}var F;(function(x){x[x.ConnectionLost=0]="ConnectionLost",x[x.ReconnectionWait=1]="ReconnectionWait",x[x.ReconnectionRunning=2]="ReconnectionRunning",x[x.ReconnectionPermanentFailure=3]="ReconnectionPermanentFailure",x[x.ConnectionGain=4]="ConnectionGain"})(F||(e.PersistentConnectionEventType=F={}));class z{constructor(R,_){this.reconnectionToken=R,this.millisSinceLastIncomingData=_,this.type=0}}e.ConnectionLostEvent=z;class oe{constructor(R,_,N,q){this.reconnectionToken=R,this.millisSinceLastIncomingData=_,this.durationSeconds=N,this.cancellableTimer=q,this.type=1}skipWait(){this.cancellableTimer.cancel()}}e.ReconnectionWaitEvent=oe;class ne{constructor(R,_,N){this.reconnectionToken=R,this.millisSinceLastIncomingData=_,this.attempt=N,this.type=2}}e.ReconnectionRunningEvent=ne;class de{constructor(R,_,N){this.reconnectionToken=R,this.millisSinceLastIncomingData=_,this.attempt=N,this.type=4}}e.ConnectionGainEvent=de;class ae{constructor(R,_,N,q){this.reconnectionToken=R,this.millisSinceLastIncomingData=_,this.attempt=N,this.handled=q,this.type=3}}e.ReconnectionPermanentFailureEvent=ae;class ue extends P.Disposable{static triggerPermanentFailure(R,_,N){this._permanentFailure=!0,this._permanentFailureMillisSinceLastIncomingData=R,this._permanentFailureAttempt=_,this._permanentFailureHandled=N,this._instances.forEach(q=>q._gotoPermanentFailure(this._permanentFailureMillisSinceLastIncomingData,this._permanentFailureAttempt,this._permanentFailureHandled))}static debugTriggerReconnection(){this._instances.forEach(R=>R._beginReconnecting())}static debugPauseSocketWriting(){this._instances.forEach(R=>R._pauseSocketWriting())}static{this._permanentFailure=!1}static{this._permanentFailureMillisSinceLastIncomingData=0}static{this._permanentFailureAttempt=0}static{this._permanentFailureHandled=!1}static{this._instances=[]}get _isPermanentFailure(){return this._permanentFailure||ue._permanentFailure}constructor(R,_,N,q,re){super(),this._connectionType=R,this._options=_,this.reconnectionToken=N,this.protocol=q,this._reconnectionFailureIsFatal=re,this._onDidStateChange=this._register(new D.Emitter),this.onDidStateChange=this._onDidStateChange.event,this._permanentFailure=!1,this._isReconnecting=!1,this._isDisposed=!1,this._onDidStateChange.fire(new de(this.reconnectionToken,0,0)),this._register(q.onSocketClose(ie=>{const le=X(this._connectionType,this.reconnectionToken,!0);ie?ie.type===0?(this._options.logService.info(`${le} received socket close event (hadError: ${ie.hadError}).`),ie.error&&this._options.logService.error(ie.error)):(this._options.logService.info(`${le} received socket close event (wasClean: ${ie.wasClean}, code: ${ie.code}, reason: ${ie.reason}).`),ie.event&&this._options.logService.error(ie.event)):this._options.logService.info(`${le} received socket close event.`),this._beginReconnecting()})),this._register(q.onSocketTimeout(ie=>{const le=X(this._connectionType,this.reconnectionToken,!0);this._options.logService.info(`${le} received socket timeout event (unacknowledgedMsgCount: ${ie.unacknowledgedMsgCount}, timeSinceOldestUnacknowledgedMsg: ${ie.timeSinceOldestUnacknowledgedMsg}, timeSinceLastReceivedSomeData: ${ie.timeSinceLastReceivedSomeData}).`),this._beginReconnecting()})),ue._instances.push(this),this._register((0,P.toDisposable)(()=>{const ie=ue._instances.indexOf(this);ie>=0&&ue._instances.splice(ie,1)})),this._isPermanentFailure&&this._gotoPermanentFailure(ue._permanentFailureMillisSinceLastIncomingData,ue._permanentFailureAttempt,ue._permanentFailureHandled)}dispose(){super.dispose(),this._isDisposed=!0}async _beginReconnecting(){if(!this._isReconnecting)try{this._isReconnecting=!0,await this._runReconnectingLoop()}finally{this._isReconnecting=!1}}async _runReconnectingLoop(){if(this._isPermanentFailure||this._isDisposed)return;const R=X(this._connectionType,this.reconnectionToken,!0);this._options.logService.info(`${R} starting reconnecting loop. You can get more information with the trace log level.`),this._onDidStateChange.fire(new z(this.reconnectionToken,this.protocol.getMillisSinceLastIncomingData()));const _=[0,5,5,10,10,10,10,10,30];let N=-1;do{N++;const q=N<_.length?_[N]:_[_.length-1];try{if(q>0){const ie=T(q);this._onDidStateChange.fire(new oe(this.reconnectionToken,this.protocol.getMillisSinceLastIncomingData(),q,ie)),this._options.logService.info(`${R} waiting for ${q} seconds before reconnecting...`);try{await ie}catch{}}if(this._isPermanentFailure){this._options.logService.error(`${R} permanent failure occurred while running the reconnecting loop.`);break}this._onDidStateChange.fire(new ne(this.reconnectionToken,this.protocol.getMillisSinceLastIncomingData(),N+1)),this._options.logService.info(`${R} resolving connection...`);const re=await p(this._options,this.reconnectionToken,this.protocol);this._options.logService.info(`${R} connecting to ${re.connectTo}...`),await this._reconnect(re,v(y)),this._options.logService.info(`${R} reconnected!`),this._onDidStateChange.fire(new de(this.reconnectionToken,this.protocol.getMillisSinceLastIncomingData(),N+1));break}catch(re){if(re.code==="VSCODE_CONNECTION_ERROR"){this._options.logService.error(`${R} A permanent error occurred in the reconnecting loop! Will give up now! Error:`),this._options.logService.error(re),this._onReconnectionPermanentFailure(this.protocol.getMillisSinceLastIncomingData(),N+1,!1);break}if(N>360){this._options.logService.error(`${R} An error occurred while reconnecting, but it will be treated as a permanent error because the reconnection grace time has expired! Will give up now! Error:`),this._options.logService.error(re),this._onReconnectionPermanentFailure(this.protocol.getMillisSinceLastIncomingData(),N+1,!1);break}if(w.RemoteAuthorityResolverError.isTemporarilyNotAvailable(re)){this._options.logService.info(`${R} A temporarily not available error occurred while trying to reconnect, will try again...`),this._options.logService.trace(re);continue}if((re.code==="ETIMEDOUT"||re.code==="ENETUNREACH"||re.code==="ECONNREFUSED"||re.code==="ECONNRESET")&&re.syscall==="connect"){this._options.logService.info(`${R} A network error occurred while trying to reconnect, will try again...`),this._options.logService.trace(re);continue}if((0,O.isCancellationError)(re)){this._options.logService.info(`${R} A promise cancelation error occurred while trying to reconnect, will try again...`),this._options.logService.trace(re);continue}if(re instanceof w.RemoteAuthorityResolverError){this._options.logService.error(`${R} A RemoteAuthorityResolverError occurred while trying to reconnect. Will give up now! Error:`),this._options.logService.error(re),this._onReconnectionPermanentFailure(this.protocol.getMillisSinceLastIncomingData(),N+1,w.RemoteAuthorityResolverError.isHandled(re));break}this._options.logService.error(`${R} An unknown error occurred while trying to reconnect, since this is an unknown case, it will be treated as a permanent error! Will give up now! Error:`),this._options.logService.error(re),this._onReconnectionPermanentFailure(this.protocol.getMillisSinceLastIncomingData(),N+1,!1);break}}while(!this._isPermanentFailure&&!this._isDisposed)}_onReconnectionPermanentFailure(R,_,N){this._reconnectionFailureIsFatal?ue.triggerPermanentFailure(R,_,N):this._gotoPermanentFailure(R,_,N)}_gotoPermanentFailure(R,_,N){this._onDidStateChange.fire(new ae(this.reconnectionToken,R,_,N)),B(this.protocol)}_pauseSocketWriting(){this.protocol.pauseSocketWriting()}}e.PersistentConnection=ue;class j extends ue{constructor(R,_,N,q,re){super(1,R,q,re,!0),this.client=this._register(new g.Client(re,{remoteAuthority:_,clientId:N},R.ipcLogger))}async _reconnect(R,_){await i(R,_)}}e.ManagementPersistentConnection=j;class G extends ue{constructor(R,_,N,q,re){super(2,R,N,q,!1),this._startArguments=_,this.debugPort=re}async _reconnect(R,_){await r(R,this._startArguments,_)}}e.ExtensionHostPersistentConnection=G;function B(x){try{x.acceptDisconnect();const R=x.getSocket();x.dispose(),R.dispose()}catch(R){(0,O.onUnexpectedError)(R)}}function W(x){if(x&&x.type==="error"){const R=new Error(`Connection error: ${x.reason}`);return R.code="VSCODE_CONNECTION_ERROR",R}return null}function U(x,R){for(;x.length<R;)x+=" ";return x}function $(x,R){return`[remote-connection][${U(l(x),13)}][${R.substr(0,5)}\u2026]`}function X(x,R,_){return`${$(x,R)}[${_?"reconnect":"initial"}]`}function se(x,R){return`${X(R,x.reconnectionToken,!!x.reconnectionProtocol)}[${x.connectTo}]`}function ce(x){return`${Date.now()-x} ms`}}),define(Z[243],ee([0,1,2,6]),function(H,e,b,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteSocketFactoryService=e.IRemoteSocketFactoryService=void 0,e.IRemoteSocketFactoryService=(0,A.createDecorator)("remoteSocketFactoryService");class n{constructor(){this.factories={}}register(D,P){return this.factories[D]??=[],this.factories[D].push(P),(0,b.toDisposable)(()=>{const h=this.factories[D]?.indexOf(P);typeof h=="number"&&h>=0&&this.factories[D]?.splice(h,1)})}getSocketFactory(D){return(this.factories[D.type]||[]).find(h=>h.supports(D))}connect(D,P,h,d){const m=this.getSocketFactory(D);if(!m)throw new Error(`No socket factory found for ${D}`);return m.connect(D,P,h,d)}}e.RemoteSocketFactoryService=n}),define(Z[244],ee([0,1,27,47,21,115]),function(H,e,b,A,n,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasWSLFeatureInstalled=void 0;let D;async function P(u=!1){return(D===void 0||u)&&(D=h()),D}e.hasWSLFeatureInstalled=P;async function h(){const u=d();if(u===void 0)return!1;if(u>=22e3){const y=g();if(y)return new Promise(E=>{A.execFile(y,["--status"],l=>E(!l))})}else{const y=w();if(y)try{if((await n.Promises.stat(y)).isFile())return!0}catch{}}return!1}function d(){const u=/(\d+)\.(\d+)\.(\d+)/g.exec(b.release());if(u)return parseInt(u[3])}function m(u){const y=process.env.SystemRoot;if(y){const E=process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432");return O.join(y,E?"Sysnative":"System32",u)}}function g(){return m("wsl.exe")}function w(){return m("lxss\\LxssManager.dll")}}),define(Z[51],ee([0,1,17,13,2,183,59,6,5,43]),function(H,e,b,A,n,O,D,P,h,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.updateProxyConfigurationsScope=e.asJson=e.asTextOrError=e.asText=e.isSuccess=e.AbstractRequestService=e.IRequestService=void 0,e.IRequestService=(0,P.createDecorator)("requestService");class m{constructor(S){this.original=S}toJSON(){if(!this.headers){const S=Object.create(null);for(const t in this.original)t.toLowerCase()==="authorization"||t.toLowerCase()==="proxy-authorization"?S[t]="*****":S[t]=this.original[t];this.headers=S}return this.headers}}class g extends n.Disposable{constructor(S){super(),this.counter=0,this.logger=S.createLogger("network",{name:(0,O.localize)(0,null),when:h.CONTEXT_LOG_LEVEL.isEqualTo((0,h.LogLevelToString)(h.LogLevel.Trace)).serialize()})}async logAndRequest(S,t,a){const s=`${S} #${++this.counter}: ${t.url}`;this.logger.trace(`${s} - begin`,t.type,new m(t.headers??{}));try{const i=await a();return this.logger.trace(`${s} - end`,t.type,i.res.statusCode,i.res.headers),i}catch(i){throw this.logger.error(`${s} - error`,t.type,(0,A.getErrorMessage)(i)),i}}}e.AbstractRequestService=g;function w(I){return I.res.statusCode&&I.res.statusCode>=200&&I.res.statusCode<300||I.res.statusCode===1223}e.isSuccess=w;function u(I){return I.res.statusCode===204}async function y(I){return u(I)?null:(await(0,b.streamToBuffer)(I.stream)).toString()}e.asText=y;async function E(I){if(!w(I))throw new Error("Server returned "+I.res.statusCode);return y(I)}e.asTextOrError=E;async function l(I){if(!w(I))throw new Error("Server returned "+I.res.statusCode);if(u(I))return null;const t=(await(0,b.streamToBuffer)(I.stream)).toString();try{return JSON.parse(t)}catch(a){throw a.message+=`:
`+t,a}}e.asJson=l;function v(I){f(I)}e.updateProxyConfigurationsScope=v;let c;function f(I){const S=d.Registry.as(D.Extensions.Configuration),t=c;c={id:"http",order:15,title:(0,O.localize)(1,null),type:"object",scope:I,properties:{"http.proxy":{type:"string",pattern:"^(https?|socks|socks4a?|socks5h?)://([^:]*(:[^@]*)?@)?([^:]+|\\[[:0-9a-fA-F]+\\])(:\\d+)?/?$|^$",markdownDescription:(0,O.localize)(2,null),restricted:!0},"http.proxyStrictSSL":{type:"boolean",default:!0,description:(0,O.localize)(3,null),restricted:!0},"http.proxyKerberosServicePrincipal":{type:"string",markdownDescription:(0,O.localize)(4,null),restricted:!0},"http.proxyAuthorization":{type:["null","string"],default:null,markdownDescription:(0,O.localize)(5,null),restricted:!0},"http.proxySupport":{type:"string",enum:["off","on","fallback","override"],enumDescriptions:[(0,O.localize)(6,null),(0,O.localize)(7,null),(0,O.localize)(8,null),(0,O.localize)(9,null)],default:"override",description:(0,O.localize)(10,null),restricted:!0},"http.systemCertificates":{type:"boolean",default:!0,description:(0,O.localize)(11,null),restricted:!0}}},S.updateConfigurations({add:[c],remove:t?[t]:[]})}f(1)}),define(Z[245],ee([0,1,17,23]),function(H,e,b,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RequestChannelClient=e.RequestChannel=void 0;class n{constructor(P){this.service=P}listen(P,h){throw new Error("Invalid listen")}call(P,h,d,m=A.CancellationToken.None){switch(h){case"request":return this.service.request(d[0],m).then(async({res:g,stream:w})=>{const u=await(0,b.streamToBuffer)(w);return[{statusCode:g.statusCode,headers:g.headers},u]});case"resolveProxy":return this.service.resolveProxy(d[0])}throw new Error("Invalid call")}}e.RequestChannel=n;class O{constructor(P){this.channel=P}async request(P,h){const[d,m]=await this.channel.call("request",[P],h);return{res:d,stream:(0,b.bufferToStream)(m)}}async resolveProxy(P){return this.channel.call("resolveProxy",[P])}}e.RequestChannelClient=O}),define(Z[246],ee([0,1,247,12]),function(H,e,b,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getProxyAgent=void 0;function n(D,P){return D.protocol==="http:"?P.HTTP_PROXY||P.http_proxy||null:D.protocol==="https:"&&(P.HTTPS_PROXY||P.https_proxy||P.HTTP_PROXY||P.http_proxy)||null}async function O(D,P,h={}){const d=(0,b.parse)(D),m=h.proxyUrl||n(d,P);if(!m)return null;const g=(0,b.parse)(m);if(!/^https?:$/.test(g.protocol||""))return null;const w={host:g.hostname||"",port:g.port||(g.protocol==="https"?"443":"80"),auth:g.auth,rejectUnauthorized:(0,A.isBoolean)(h.strictSSL)?h.strictSSL:!0};return d.protocol==="http:"?(await new Promise((u,y)=>{H(["http-proxy-agent"],u,y)}))(w):(await new Promise((u,y)=>{H(["https-proxy-agent"],u,y)}))(w)}e.getProxyAgent=O}),define(Z[248],ee([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SharedProcessRawConnection=e.SharedProcessChannelConnection=e.SharedProcessLifecycle=void 0,e.SharedProcessLifecycle={exit:"vscode:electron-main->shared-process=exit",ipcReady:"vscode:shared-process->electron-main=ipc-ready",initDone:"vscode:shared-process->electron-main=init-done"},e.SharedProcessChannelConnection={request:"vscode:createSharedProcessChannelConnection",response:"vscode:createSharedProcessChannelConnectionResult"},e.SharedProcessRawConnection={request:"vscode:createSharedProcessRawConnection",response:"vscode:createSharedProcessRawConnectionResult"}}),define(Z[96],ee([0,1,47,10,184,23,50,13,4,31,110,63,8,139]),function(H,e,b,A,n,O,D,P,h,d,m,g,w,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getResolvedShellEnv=void 0;let y;async function E(v,c,f,I){return f["force-disable-user-env"]?(c.trace("resolveShellEnv(): skipped (--force-disable-user-env)"),{}):h.isWindows?(c.trace("resolveShellEnv(): skipped (Windows)"),{}):(0,g.isLaunchedFromCli)(I)&&!f["force-user-env"]?(c.trace("resolveShellEnv(): skipped (VSCODE_CLI is set)"),{}):((0,g.isLaunchedFromCli)(I)?c.trace("resolveShellEnv(): running (--force-user-env)"):c.trace("resolveShellEnv(): running (macOS/Linux)"),y||(y=w.Promises.withAsyncBody(async(S,t)=>{const a=new O.CancellationTokenSource;let s=1e4;const i=v.getValue("application.shellEnvironmentResolutionTimeout");typeof i=="number"&&(s=(0,u.clamp)(i,1,120)*1e3);const r=setTimeout(()=>{a.dispose(!0),t(new Error((0,n.localize)(0,null)))},s);try{S(await l(c,a.token))}catch(o){!(0,P.isCancellationError)(o)&&!a.token.isCancellationRequested?t(new Error((0,n.localize)(1,null,(0,D.toErrorMessage)(o)))):S({})}finally{clearTimeout(r),a.dispose()}})),y)}e.getResolvedShellEnv=E;async function l(v,c){const f=process.env.ELECTRON_RUN_AS_NODE;v.trace("getUnixShellEnvironment#runAsNode",f);const I=process.env.ELECTRON_NO_ATTACH_CONSOLE;v.trace("getUnixShellEnvironment#noAttach",I);const S=(0,d.generateUuid)().replace(/-/g,"").substr(0,12),t=new RegExp(S+"({.*})"+S),a={...process.env,ELECTRON_RUN_AS_NODE:"1",ELECTRON_NO_ATTACH_CONSOLE:"1",VSCODE_RESOLVING_ENVIRONMENT:"1"};v.trace("getUnixShellEnvironment#env",a);const s=await(0,m.getSystemShell)(h.OS,a);return v.trace("getUnixShellEnvironment#shell",s),new Promise((i,r)=>{if(c.isCancellationRequested)return r(new P.CancellationError);const o=(0,A.basename)(s);let p,k;const M=process.versions.electron&&process.versions["microsoft-build"]?"--ms-enable-electron-run-as-node":"";/^pwsh(-preview)?$/.test(o)?(p=`& '${process.execPath}' ${M} -p '''${S}'' + JSON.stringify(process.env) + ''${S}'''`,k=["-Login","-Command"]):o==="nu"?(p=`^'${process.execPath}' ${M} -p '"${S}" + JSON.stringify(process.env) + "${S}"'`,k=["-i","-l","-c"]):(p=`'${process.execPath}' ${M} -p '"${S}" + JSON.stringify(process.env) + "${S}"'`,o==="tcsh"||o==="csh"?k=["-ic"]:k=["-i","-l","-c"]),v.trace("getUnixShellEnvironment#spawn",JSON.stringify(k),p);const C=(0,b.spawn)(s,[...k,p],{detached:!0,stdio:["ignore","pipe","pipe"],env:a});c.onCancellationRequested(()=>(C.kill(),r(new P.CancellationError))),C.on("error",F=>{v.error("getUnixShellEnvironment#errorChildProcess",(0,D.toErrorMessage)(F)),r(F)});const L=[];C.stdout.on("data",F=>L.push(F));const T=[];C.stderr.on("data",F=>T.push(F)),C.on("close",(F,z)=>{const oe=Buffer.concat(L).toString("utf8");v.trace("getUnixShellEnvironment#raw",oe);const ne=Buffer.concat(T).toString("utf8");if(ne.trim()&&v.trace("getUnixShellEnvironment#stderr",ne),F||z)return r(new Error((0,n.localize)(2,null,F,z)));const de=t.exec(oe),ae=de?de[1]:"{}";try{const ue=JSON.parse(ae);f?ue.ELECTRON_RUN_AS_NODE=f:delete ue.ELECTRON_RUN_AS_NODE,I?ue.ELECTRON_NO_ATTACH_CONSOLE=I:delete ue.ELECTRON_NO_ATTACH_CONSOLE,delete ue.VSCODE_RESOLVING_ENVIRONMENT,delete ue.XDG_RUNTIME_DIR,v.trace("getUnixShellEnvironment#result",ue),i(ue)}catch(ue){v.error("getUnixShellEnvironment#errorCaught",(0,D.toErrorMessage)(ue)),r(ue)}})})}}),define(Z[249],ee([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractSignService=void 0;class b{constructor(){this.validators=new Map}static{this._nextId=1}async createNewMessage(n){try{const O=await this.getValidator();if(O){const D=String(b._nextId++);return this.validators.set(D,O),{id:D,data:O.createNewMessage(n)}}}catch{}return{id:"",data:n}}async validate(n,O){if(!n.id)return!0;const D=this.validators.get(n.id);if(!D)return!1;this.validators.delete(n.id);try{return D.validate(O)==="ok"}catch{return!1}finally{D.dispose?.()}}async sign(n){try{return await this.signValue(n)}catch{}return n}}e.AbstractSignService=b}),define(Z[97],ee([0,1,6]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISignService=e.SIGN_SERVICE_ID=void 0,e.SIGN_SERVICE_ID="signService",e.ISignService=(0,b.createDecorator)(e.SIGN_SERVICE_ID)}),define(Z[250],ee([0,1,249]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SignService=void 0;class A extends b.AbstractSignService{getValidator(){return this.vsda().then(O=>new O.validator)}signValue(O){return this.vsda().then(D=>new D.signer().sign(O))}vsda(){return new Promise((O,D)=>H(["vsda"],O,D))}}e.SignService=A}),define(Z[34],ee([0,1,6]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IStateService=e.IStateReadService=void 0,e.IStateReadService=(0,b.createDecorator)("stateReadService"),e.IStateService=(0,b.createDecorator)("stateService")}),define(Z[123],ee([0,1,8,17,12,33,16,5]),function(H,e,b,A,n,O,D,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StateService=e.StateReadonlyService=e.FileStorage=e.SaveStrategy=void 0;var h;(function(w){w[w.IMMEDIATE=0]="IMMEDIATE",w[w.DELAYED=1]="DELAYED"})(h||(e.SaveStrategy=h={}));class d{constructor(u,y,E,l){this.storagePath=u,this.logService=E,this.fileService=l,this.storage=Object.create(null),this.lastSavedStorageContents="",this.initializing=void 0,this.closing=void 0,this.flushDelayer=y===0?void 0:new b.ThrottledDelayer(100)}init(){return this.initializing||(this.initializing=this.doInit()),this.initializing}async doInit(){try{this.lastSavedStorageContents=(await this.fileService.readFile(this.storagePath)).value.toString(),this.storage=JSON.parse(this.lastSavedStorageContents)}catch(u){u.fileOperationResult!==1&&this.logService.error(u)}}getItem(u,y){const E=this.storage[u];return(0,n.isUndefinedOrNull)(E)?y:E}setItem(u,y){this.setItems([{key:u,data:y}])}setItems(u){let y=!1;for(const{key:E,data:l}of u)this.storage[E]!==l&&((0,n.isUndefinedOrNull)(l)?(0,n.isUndefined)(this.storage[E])||(this.storage[E]=void 0,y=!0):(this.storage[E]=l,y=!0));y&&this.save()}removeItem(u){(0,n.isUndefined)(this.storage[u])||(this.storage[u]=void 0,this.save())}async save(){if(!this.closing)return this.flushDelayer?this.flushDelayer.trigger(()=>this.doSave()):this.doSave()}async doSave(){if(!this.initializing)return;await this.initializing;const u=JSON.stringify(this.storage,null,4);if(u!==this.lastSavedStorageContents)try{await this.fileService.writeFile(this.storagePath,A.VSBuffer.fromString(u),{atomic:{postfix:".vsctmp"}}),this.lastSavedStorageContents=u}catch(y){this.logService.error(y)}}async close(){return this.closing||(this.closing=this.flushDelayer?this.flushDelayer.trigger(()=>this.doSave(),0):this.doSave()),this.closing}}e.FileStorage=d;let m=class{constructor(u,y,E,l){this.fileStorage=new d(y.stateResource,u,E,l)}async init(){await this.fileStorage.init()}getItem(u,y){return this.fileStorage.getItem(u,y)}};e.StateReadonlyService=m,e.StateReadonlyService=m=be([Y(1,O.IEnvironmentService),Y(2,P.ILogService),Y(3,D.IFileService)],m);class g extends m{setItem(u,y){this.fileStorage.setItem(u,y)}setItems(u){this.fileStorage.setItems(u)}removeItem(u){this.fileStorage.removeItem(u)}close(){return this.fileStorage.close()}}e.StateService=g}),define(Z[124],ee([0,1,4,36,31,67]),function(H,e,b,A,n,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifyMicrosoftInternalDomain=e.resolveCommonProperties=void 0;const D=O.default;function P(m){if(b.platform===2&&/^penguin(\.|$)/i.test(m))return"chromebook"}function h(m,g,w,u,y,E,l,v){const c=Object.create(null);c["common.machineId"]=E,c.sessionID=(0,n.generateUuid)()+Date.now(),c.commitHash=u,c.version=y,c["common.platformVersion"]=(m||"").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/,"$1$2$3"),c["common.platform"]=(0,b.PlatformToString)(b.platform),c["common.nodePlatform"]=A.platform,c["common.nodeArch"]=w,c["common.product"]=D.nameShort||"desktop",c["common.application.name"]=D.nameLong,c.quality=D.quality||"dev",l&&(c["common.msftInternal"]=l);let f=0;const I=Date.now();Object.defineProperties(c,{timestamp:{get:()=>new Date,enumerable:!0},"common.timesincesessionstart":{get:()=>Date.now()-I,enumerable:!0},"common.sequence":{get:()=>f++,enumerable:!0}}),b.isLinuxSnap&&(c["common.snap"]="true");const S=P(g);return S&&(c["common.platformDetail"]=S),c}e.resolveCommonProperties=h;function d(m){const g=A.env.USERDNSDOMAIN;if(!g)return!1;const w=g.toLowerCase();return m.some(u=>w===u)}e.verifyMicrosoftInternalDomain=d}),define(Z[25],ee([0,1,6]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetryConfiguration=e.TelemetryLevel=e.TELEMETRY_OLD_SETTING_ID=e.TELEMETRY_CRASH_REPORTER_SETTING_ID=e.TELEMETRY_SETTING_ID=e.TELEMETRY_SECTION_ID=e.machineIdKey=e.lastSessionDateStorageKey=e.firstSessionDateStorageKey=e.currentSessionDateStorageKey=e.ICustomEndpointTelemetryService=e.ITelemetryService=void 0,e.ITelemetryService=(0,b.createDecorator)("telemetryService"),e.ICustomEndpointTelemetryService=(0,b.createDecorator)("customEndpointTelemetryService"),e.currentSessionDateStorageKey="telemetry.currentSessionDate",e.firstSessionDateStorageKey="telemetry.firstSessionDate",e.lastSessionDateStorageKey="telemetry.lastSessionDate",e.machineIdKey="telemetry.machineId",e.TELEMETRY_SECTION_ID="telemetry",e.TELEMETRY_SETTING_ID="telemetry.telemetryLevel",e.TELEMETRY_CRASH_REPORTER_SETTING_ID="telemetry.enableCrashReporter",e.TELEMETRY_OLD_SETTING_ID="telemetry.enableTelemetry";var A;(function(O){O[O.NONE=0]="NONE",O[O.CRASH=1]="CRASH",O[O.ERROR=2]="ERROR",O[O.USAGE=3]="USAGE"})(A||(e.TelemetryLevel=A={}));var n;(function(O){O.OFF="off",O.CRASH="crash",O.ERROR="error",O.ON="all"})(n||(e.TelemetryConfiguration=n={}))}),define(Z[251],ee([0,1,27,8,44,15,10,4,7,87,21,109,92,16,22,25]),function(H,e,b,A,n,O,D,P,h,d,m,g,w,u,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiagnosticsService=e.collectLaunchConfigs=e.getMachineInfo=e.collectWorkspaceStats=void 0;const l=new Map;async function v(t,a){const s=`${t}::${a.join(":")}`,i=l.get(s);if(i)return i;const r=[{tag:"grunt.js",filePattern:/^gruntfile\.js$/i},{tag:"gulp.js",filePattern:/^gulpfile\.js$/i},{tag:"tsconfig.json",filePattern:/^tsconfig\.json$/i},{tag:"package.json",filePattern:/^package\.json$/i},{tag:"jsconfig.json",filePattern:/^jsconfig\.json$/i},{tag:"tslint.json",filePattern:/^tslint\.json$/i},{tag:"eslint.json",filePattern:/^eslint\.json$/i},{tag:"tasks.json",filePattern:/^tasks\.json$/i},{tag:"launch.json",filePattern:/^launch\.json$/i},{tag:"settings.json",filePattern:/^settings\.json$/i},{tag:"webpack.config.js",filePattern:/^webpack\.config\.js$/i},{tag:"project.json",filePattern:/^project\.json$/i},{tag:"makefile",filePattern:/^makefile$/i},{tag:"sln",filePattern:/^.+\.sln$/i},{tag:"csproj",filePattern:/^.+\.csproj$/i},{tag:"cmake",filePattern:/^.+\.cmake$/i},{tag:"github-actions",filePattern:/^.+\.ya?ml$/i,relativePathPattern:/^\.github(?:\/|\\)workflows$/i},{tag:"devcontainer.json",filePattern:/^devcontainer\.json$/i},{tag:"dockerfile",filePattern:/^(dockerfile|docker\-compose\.ya?ml)$/i}],o=new Map,p=new Map,k=2e4;function M(L,T,F,z){const oe=T.substring(L.length+1);return A.Promises.withAsyncBody(async ne=>{let de;try{de=await m.Promises.readdir(T,{withFileTypes:!0})}catch{ne();return}if(z.count>=k){z.count+=de.length,z.maxReached=!0,ne();return}let ae=de.length;if(ae===0){ne();return}let ue=de;z.count+de.length>k&&(z.maxReached=!0,ae=k-z.count,ue=de.slice(0,ae)),z.count+=de.length;for(const j of ue)if(j.isDirectory()){if(F.includes(j.name)||await M(L,(0,D.join)(T,j.name),F,z),--ae===0){ne();return}}else{const G=j.name.lastIndexOf(".");if(G>=0){const B=j.name.substring(G+1);B&&o.set(B,(o.get(B)??0)+1)}for(const B of r)B.relativePathPattern?.test(oe)!==!1&&B.filePattern.test(j.name)&&p.set(B.tag,(p.get(B.tag)??0)+1);if(--ae===0){ne();return}}})}const C=A.Promises.withAsyncBody(async L=>{const T={count:0,maxReached:!1};await M(t,t,a,T);const F=await I(t);L({configFiles:c(p),fileTypes:c(o),fileCount:T.count,maxFilesReached:T.maxReached,launchConfigFiles:F})});return l.set(s,C),C}e.collectWorkspaceStats=v;function c(t){return Array.from(t.entries(),([a,s])=>({name:a,count:s})).sort((a,s)=>s.count-a.count)}function f(){const t={os:`${b.type()} ${b.arch()} ${b.release()}`,memory:`${(b.totalmem()/u.ByteSize.GB).toFixed(2)}GB (${(b.freemem()/u.ByteSize.GB).toFixed(2)}GB free)`,vmHint:`${Math.round(d.virtualMachineHint.value()*100)}%`},a=b.cpus();return a&&a.length>0&&(t.cpus=`${a[0].model} (${a.length} x ${a[0].speed})`),t}e.getMachineInfo=f;async function I(t){try{const a=new Map,s=(0,D.join)(t,".vscode","launch.json"),i=await m.Promises.readFile(s),r=[],o=(0,n.parse)(i.toString(),r);if(r.length)return console.log(`Unable to parse ${s}`),[];if((0,n.getNodeType)(o)==="object"&&o.configurations)for(const p of o.configurations){const k=p.type;k&&(a.has(k)?a.set(k,a.get(k)+1):a.set(k,1))}return c(a)}catch{return[]}}e.collectLaunchConfigs=I;let S=class{constructor(a,s){this.telemetryService=a,this.productService=s}formatMachineInfo(a){const s=[];return s.push(`OS Version:       ${a.os}`),s.push(`CPUs:             ${a.cpus}`),s.push(`Memory (System):  ${a.memory}`),s.push(`VM:               ${a.vmHint}`),s.join(`
`)}formatEnvironment(a){const s=[];s.push(`Version:          ${this.productService.nameShort} ${this.productService.version} (${this.productService.commit||"Commit unknown"}, ${this.productService.date||"Date unknown"})`),s.push(`OS Version:       ${b.type()} ${b.arch()} ${b.release()}`);const i=b.cpus();return i&&i.length>0&&s.push(`CPUs:             ${i[0].model} (${i.length} x ${i[0].speed})`),s.push(`Memory (System):  ${(b.totalmem()/u.ByteSize.GB).toFixed(2)}GB (${(b.freemem()/u.ByteSize.GB).toFixed(2)}GB free)`),P.isWindows||s.push(`Load (avg):       ${b.loadavg().map(r=>Math.round(r)).join(", ")}`),s.push(`VM:               ${Math.round(d.virtualMachineHint.value()*100)}%`),s.push(`Screen Reader:    ${a.screenReader?"yes":"no"}`),s.push(`Process Argv:     ${a.mainArguments.join(" ")}`),s.push(`GPU Status:       ${this.expandGPUFeatures(a.gpuFeatureStatus)}`),s.join(`
`)}async getPerformanceInfo(a,s){return Promise.all([(0,g.listProcesses)(a.mainPID),this.formatWorkspaceMetadata(a)]).then(async i=>{let[r,o]=i,p=this.formatProcessList(a,r);return s.forEach(k=>{if((0,w.isRemoteDiagnosticError)(k))p+=`
${k.errorMessage}`,o+=`
${k.errorMessage}`;else if(p+=`

Remote: ${k.hostName}`,k.processes&&(p+=`
${this.formatProcessList(a,k.processes)}`),k.workspaceMetadata){o+=`
|  Remote: ${k.hostName}`;for(const M of Object.keys(k.workspaceMetadata)){const C=k.workspaceMetadata[M];let L=`${C.fileCount} files`;C.maxFilesReached&&(L=`more than ${L}`),o+=`|    Folder (${M}): ${L}`,o+=this.formatWorkspaceStats(C)}}}),{processInfo:p,workspaceInfo:o}})}async getSystemInfo(a,s){const{memory:i,vmHint:r,os:o,cpus:p}=f(),k={os:o,memory:i,cpus:p,vmHint:r,processArgs:`${a.mainArguments.join(" ")}`,gpuStatus:a.gpuFeatureStatus,screenReader:`${a.screenReader?"yes":"no"}`,remoteData:s};return P.isWindows||(k.load=`${b.loadavg().map(M=>Math.round(M)).join(", ")}`),P.isLinux&&(k.linuxEnv={desktopSession:process.env.DESKTOP_SESSION,xdgSessionDesktop:process.env.XDG_SESSION_DESKTOP,xdgCurrentDesktop:process.env.XDG_CURRENT_DESKTOP,xdgSessionType:process.env.XDG_SESSION_TYPE}),Promise.resolve(k)}async getDiagnostics(a,s){const i=[];return(0,g.listProcesses)(a.mainPID).then(async r=>(i.push(""),i.push(this.formatEnvironment(a)),i.push(""),i.push(this.formatProcessList(a,r)),a.windows.some(o=>o.folderURIs&&o.folderURIs.length>0&&!o.remoteAuthority)&&(i.push(""),i.push("Workspace Stats: "),i.push(await this.formatWorkspaceMetadata(a))),s.forEach(o=>{if((0,w.isRemoteDiagnosticError)(o))i.push(`
${o.errorMessage}`);else if(i.push(`

`),i.push(`Remote:           ${o.hostName}`),i.push(this.formatMachineInfo(o.machineInfo)),o.processes&&i.push(this.formatProcessList(a,o.processes)),o.workspaceMetadata)for(const p of Object.keys(o.workspaceMetadata)){const k=o.workspaceMetadata[p];let M=`${k.fileCount} files`;k.maxFilesReached&&(M=`more than ${M}`),i.push(`Folder (${p}): ${M}`),i.push(this.formatWorkspaceStats(k))}}),i.push(""),i.push(""),i.join(`
`)))}formatWorkspaceStats(a){const s=[];let r=0;const o=(C,L)=>{const T=` ${C}(${L})`;r+T.length>60?(s.push(p),p="|                 ",r=p.length):r+=T.length,p+=T};let p="|      File types:";const k=10,M=a.fileTypes.length>k?k:a.fileTypes.length;for(let C=0;C<M;C++){const L=a.fileTypes[C];o(L.name,L.count)}if(s.push(p),a.configFiles.length>=0&&(p="|      Conf files:",r=0,a.configFiles.forEach(C=>{o(C.name,C.count)}),s.push(p)),a.launchConfigFiles.length>0){let C="|      Launch Configs:";a.launchConfigFiles.forEach(L=>{const T=L.count>1?` ${L.name}(${L.count})`:` ${L.name}`;C+=T}),s.push(C)}return s.join(`
`)}expandGPUFeatures(a){const s=Math.max(...Object.keys(a).map(i=>i.length));return Object.keys(a).map(i=>`${i}:  ${" ".repeat(s-i.length)}  ${a[i]}`).join(`
                  `)}formatWorkspaceMetadata(a){const s=[],i=[];return a.windows.forEach(r=>{r.folderURIs.length===0||r.remoteAuthority||(s.push(`|  Window (${r.title})`),r.folderURIs.forEach(o=>{const p=h.URI.revive(o);if(p.scheme===O.Schemas.file){const k=p.fsPath;i.push(v(k,["node_modules",".git"]).then(M=>{let C=`${M.fileCount} files`;M.maxFilesReached&&(C=`more than ${C}`),s.push(`|    Folder (${(0,D.basename)(k)}): ${C}`),s.push(this.formatWorkspaceStats(M))}).catch(M=>{s.push(`|      Error: Unable to collect workspace stats for folder ${k} (${M.toString()})`)}))}else s.push(`|    Folder (${p.toString()}): Workspace stats not available.`)}))}),Promise.all(i).then(r=>s.join(`
`)).catch(r=>`Unable to collect workspace stats: ${r}`)}formatProcessList(a,s){const i=new Map;a.windows.forEach(o=>i.set(o.pid,`window [${o.id}] (${o.title})`)),a.pidToNames.forEach(({pid:o,name:p})=>i.set(o,p));const r=[];return r.push("CPU %	Mem MB	   PID	Process"),s&&this.formatProcessItem(a.mainPID,i,r,s,0),r.join(`
`)}formatProcessItem(a,s,i,r,o){const p=o===0;let k;p?k=r.pid===a?`${this.productService.applicationName} main`:"remote agent":s.has(r.pid)?k=s.get(r.pid):k=`${"  ".repeat(o)} ${r.name}`;const M=process.platform==="win32"?r.mem:b.totalmem()*(r.mem/100);i.push(`${r.load.toFixed(0).padStart(5," ")}	${(M/u.ByteSize.MB).toFixed(0).padStart(6," ")}	${r.pid.toFixed(0).padStart(6," ")}	${k}`),Array.isArray(r.children)&&r.children.forEach(C=>this.formatProcessItem(a,s,i,C,o+1))}async getWorkspaceFileExtensions(a){const s=new Set;for(const{uri:i}of a.folders){const r=h.URI.revive(i);if(r.scheme!==O.Schemas.file)continue;const o=r.fsPath;try{(await v(o,["node_modules",".git"])).fileTypes.forEach(k=>s.add(k.name))}catch{}}return{extensions:[...s]}}async reportWorkspaceStats(a){for(const{uri:s}of a.folders){const i=h.URI.revive(s);if(i.scheme!==O.Schemas.file)continue;const r=i.fsPath;try{const o=await v(r,["node_modules",".git"]);this.telemetryService.publicLog2("workspace.stats",{"workspace.id":a.telemetryId,rendererSessionId:a.rendererSessionId}),o.fileTypes.forEach(p=>{this.telemetryService.publicLog2("workspace.stats.file",{rendererSessionId:a.rendererSessionId,type:p.name,count:p.count})}),o.launchConfigFiles.forEach(p=>{this.telemetryService.publicLog2("workspace.stats.launchConfigFile",{rendererSessionId:a.rendererSessionId,type:p.name,count:p.count})}),o.configFiles.forEach(p=>{this.telemetryService.publicLog2("workspace.stats.configFiles",{rendererSessionId:a.rendererSessionId,type:p.name,count:p.count})})}catch{}}}};e.DiagnosticsService=S,e.DiagnosticsService=S=be([Y(0,E.ITelemetryService),Y(1,y.IProductService)],S)}),define(Z[252],ee([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetryAppenderClient=e.TelemetryAppenderChannel=void 0;class b{constructor(O){this.appenders=O}listen(O,D){throw new Error(`Event not found: ${D}`)}call(O,D,{eventName:P,data:h}){return this.appenders.forEach(d=>d.log(P,h)),Promise.resolve(null)}}e.TelemetryAppenderChannel=b;class A{constructor(O){this.channel=O}log(O,D){return this.channel.call("log",{eventName:O,data:D}).then(void 0,P=>`Failed to log telemetry: ${console.warn(P)}`),Promise.resolve(null)}flush(){return Promise.resolve()}}e.TelemetryAppenderClient=A}),define(Z[52],ee([0,1,37,12,3,18,60,124,25]),function(H,e,b,A,n,O,D,P,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cleanData=e.getPiiPathsFromEnvironment=e.isInternalTelemetry=e.cleanRemoteAuthority=e.validateTelemetryData=e.getTelemetryLevel=e.isLoggingOnly=e.supportsTelemetry=e.configurationTelemetry=e.NullAppender=e.extensionTelemetryLogChannelId=e.telemetryLogId=e.NullEndpointTelemetryService=e.NullTelemetryService=e.NullTelemetryServiceShape=e.TelemetryTrustedValue=void 0;class d{constructor(r){this.value=r,this.isTrustedTelemetryValue=!0}}e.TelemetryTrustedValue=d;class m{constructor(){this.telemetryLevel=0,this.sessionId="someValue.sessionId",this.machineId="someValue.machineId",this.firstSessionDate="someValue.firstSessionDate",this.sendErrorTelemetry=!1}publicLog(){}publicLog2(){}publicLogError(){}publicLogError2(){}setExperimentProperty(){}}e.NullTelemetryServiceShape=m,e.NullTelemetryService=new m;class g{async publicLog(r,o,p){}async publicLogError(r,o,p){}}e.NullEndpointTelemetryService=g,e.telemetryLogId="telemetry",e.extensionTelemetryLogChannelId="extensionTelemetryLog",e.NullAppender={log:()=>null,flush:()=>Promise.resolve(null)};function w(i,r){return n.Event.debounce(r.onDidChangeConfiguration,(p,k)=>{const M=p?new Set([...p.affectedKeys,...k.affectedKeys]):k.affectedKeys;return{...k,affectedKeys:M}},1e3,!0)(p=>{p.source!==7&&i.publicLog2("updateConfiguration",{configurationSource:(0,O.ConfigurationTargetToString)(p.source),configurationKeys:Array.from(p.affectedKeys)})})}e.configurationTelemetry=w;function u(i,r){return!r.isBuilt&&!r.disableTelemetry?!0:!(r.disableTelemetry||!i.enableTelemetry||r.extensionTestsLocationURI)}e.supportsTelemetry=u;function y(i,r){return!(r.isBuilt||r.disableTelemetry||i.enableTelemetry&&i.aiConfig?.ariaKey)}e.isLoggingOnly=y;function E(i){const r=i.getValue(h.TELEMETRY_SETTING_ID),o=i.getValue(h.TELEMETRY_CRASH_REPORTER_SETTING_ID);if(i.getValue(h.TELEMETRY_OLD_SETTING_ID)===!1||o===!1)return 0;switch(r??"all"){case"all":return 3;case"error":return 2;case"crash":return 1;case"off":return 0}}e.getTelemetryLevel=E;function l(i){const r={},o={},p={};f(i,p);for(let k in p){k=k.length>150?k.substr(k.length-149):k;const M=p[k];typeof M=="number"?o[k]=M:typeof M=="boolean"?o[k]=M?1:0:typeof M=="string"?(M.length>8192&&console.warn(`Telemetry property: ${k} has been trimmed to 8192, the original length is ${M.length}`),r[k]=M.substring(0,8191)):typeof M<"u"&&M!==null&&(r[k]=M)}return{properties:r,measurements:o}}e.validateTelemetryData=l;const v=new Set(["ssh-remote","dev-container","attached-container","wsl","tunnel","codespaces","amlext"]);function c(i){if(!i)return"none";const r=(0,D.getRemoteName)(i);return v.has(r)?r:"other"}e.cleanRemoteAuthority=c;function f(i,r,o=0,p){if(i)for(const k of Object.getOwnPropertyNames(i)){const M=i[k],C=p?p+k:k;Array.isArray(M)?r[C]=(0,b.safeStringify)(M):M instanceof Date?r[C]=M.toISOString():(0,A.isObject)(M)?o<2?f(M,r,o+1,C+"."):r[C]=(0,b.safeStringify)(M):r[C]=M}}function I(i,r){const o=i.msftInternalDomains||[],p=r.getValue("telemetry.internalTesting");return(0,P.verifyMicrosoftInternalDomain)(o)||p}e.isInternalTelemetry=I;function S(i){return[i.appRoot,i.extensionsPath,i.userHome.fsPath,i.tmpDir.fsPath,i.userDataPath]}e.getPiiPathsFromEnvironment=S;function t(i,r){if(!i||!i.includes("/")&&!i.includes("\\"))return i;let o=i;const p=[];for(const L of r)for(;;){const T=L.exec(i);if(!T)break;p.push([T.index,L.lastIndex])}const k=/^[\\\/]?(node_modules|node_modules\.asar)[\\\/]/,M=/(file:\/\/)?([a-zA-Z]:(\\\\|\\|\/)|(\\\\|\\|\/))?([\w-\._]+(\\\\|\\|\/))+[\w-\._]*/g;let C=0;for(o="";;){const L=M.exec(i);if(!L)break;const T=p.some(([F,z])=>L.index<z&&F<M.lastIndex);!k.test(L[0])&&!T&&(o+=i.substring(C,L.index)+"<REDACTED: user-file-path>",C=M.lastIndex)}return C<i.length&&(o+=i.substr(C)),o}function a(i){if(!i)return i;const r=[{label:"Google API Key",regex:/AIza[A-Za-z0-9_\\\-]{35}/},{label:"Slack Token",regex:/xox[pbar]\-[A-Za-z0-9]/},{label:"Generic Secret",regex:/(key|token|sig|secret|signature|password|passwd|pwd|android:value)[^a-zA-Z0-9]/i},{label:"Email",regex:/@[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+/}];for(const o of r)if(o.regex.test(i))return`<REDACTED: ${o.label}>`;return i}function s(i,r){return(0,b.cloneAndChange)(i,o=>{if(o instanceof d||Object.hasOwnProperty.call(o,"isTrustedTelemetryValue"))return o.value;if(typeof o=="string"){let p=o.replaceAll("%20"," ");p=t(p,r);for(const k of r)p=p.replace(k,"");return p=a(p),p}})}e.cleanData=s}),define(Z[125],ee([0,1,26,118,122,4,7,13,36,52]),function(H,e,b,A,n,O,D,P,h,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeTargetPlatform=e.getExtensionDependencies=e.BetterMergeId=e.getGalleryExtensionTelemetryData=e.getLocalExtensionTelemetryData=e.groupByExtension=e.getGalleryExtensionId=e.adoptToGalleryExtensionId=e.getExtensionId=e.getIdAndVersion=e.ExtensionKey=e.areSameExtensions=void 0;function m(s,i){return s.uuid&&i.uuid?s.uuid===i.uuid:s.id===i.id?!0:(0,b.compareIgnoreCase)(s.id,i.id)===0}e.areSameExtensions=m;const g=/^([^.]+\..+)-(\d+\.\d+\.\d+)(-(.+))?$/;class w{static create(i){const r=i.manifest?i.manifest.version:i.version,o=i.manifest?i.targetPlatform:i.properties.targetPlatform;return new w(i.identifier,r,o)}static parse(i){const r=g.exec(i);return r&&r[1]&&r[2]?new w({id:r[1]},r[2],r[4]||void 0):null}constructor(i,r,o="undefined"){this.version=r,this.targetPlatform=o,this.id=i.id}toString(){return`${this.id}-${this.version}${this.targetPlatform!=="undefined"?`-${this.targetPlatform}`:""}`}equals(i){return i instanceof w?m(this,i)&&this.version===i.version&&this.targetPlatform===i.targetPlatform:!1}}e.ExtensionKey=w;const u=/^([^.]+\..+)@((prerelease)|(\d+\.\d+\.\d+(-.*)?))$/;function y(s){const i=u.exec(s);return i&&i[1]?[l(i[1]),i[2]]:[l(s),void 0]}e.getIdAndVersion=y;function E(s,i){return`${s}.${i}`}e.getExtensionId=E;function l(s){return s.toLowerCase()}e.adoptToGalleryExtensionId=l;function v(s,i){return l(E(s??n.UNDEFINED_PUBLISHER,i))}e.getGalleryExtensionId=v;function c(s,i){const r=[],o=p=>{for(const k of r)if(k.some(M=>m(i(M),i(p))))return k;return null};for(const p of s){const k=o(p);k?k.push(p):r.push([p])}return r}e.groupByExtension=c;function f(s){return{id:s.identifier.id,name:s.manifest.name,galleryId:null,publisherId:s.publisherId,publisherName:s.manifest.publisher,publisherDisplayName:s.publisherDisplayName,dependencies:s.manifest.extensionDependencies&&s.manifest.extensionDependencies.length>0,extensionVersion:s.manifest.version}}e.getLocalExtensionTelemetryData=f;function I(s){return{id:new d.TelemetryTrustedValue(s.identifier.id),name:new d.TelemetryTrustedValue(s.name),galleryId:s.identifier.uuid,publisherId:s.publisherId,publisherName:s.publisher,publisherDisplayName:s.publisherDisplayName,isPreReleaseVersion:s.properties.isPreReleaseVersion,dependencies:!!(s.properties.dependencies&&s.properties.dependencies.length>0),isSigned:s.isSigned,extensionVersion:s.version,...s.telemetryData}}e.getGalleryExtensionTelemetryData=I,e.BetterMergeId=new n.ExtensionIdentifier("pprice.better-merge");function S(s,i){const r=[],o=i.manifest.extensionDependencies?.slice(0)??[];for(;o.length;){const p=o.shift();if(p&&r.every(k=>!m(k.identifier,{id:p}))){const k=s.filter(M=>m(M.identifier,{id:p}));k.length===1&&(r.push(k[0]),o.push(...k[0].manifest.extensionDependencies?.slice(0)??[]))}}return r}e.getExtensionDependencies=S;async function t(s,i){if(!O.isLinux)return!1;let r;try{r=(await s.readFile(D.URI.file("/etc/os-release"))).value.toString()}catch{try{r=(await s.readFile(D.URI.file("/usr/lib/os-release"))).value.toString()}catch(p){i.debug("Error while getting the os-release file.",(0,P.getErrorMessage)(p))}}return!!r&&(r.match(/^ID=([^\u001b\r\n]*)/m)||[])[1]==="alpine"}async function a(s,i){const r=await t(s,i),o=(0,A.getTargetPlatform)(r?"alpine":O.platform,h.arch);return i.debug("ComputeTargetPlatform:",o),o}e.computeTargetPlatform=a}),define(Z[253],ee([0,1,206,52]),function(H,e,b,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.resolveMarketplaceHeaders=void 0;async function n(O,D,P,h,d,m,g){const w={"X-Market-Client-Id":`VSCode ${O}`,"User-Agent":`VSCode ${O} (${D.nameShort})`};if((0,A.supportsTelemetry)(D,P)&&(0,A.getTelemetryLevel)(h)===3){const u=await(0,b.getServiceMachineId)(P,d,m);w["X-Market-User-Id"]=u,w["VSCode-SessionId"]=g.machineId||u}return w}e.resolveMarketplaceHeaders=n}),define(Z[254],ee([0,1,2,37,4,26,185,18,59,67,22,43,25,52]),function(H,e,b,A,n,O,D,P,h,d,m,g,w,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetryService=void 0;let y=class{static{this.IDLE_START_EVENT_NAME="UserIdleStart"}static{this.IDLE_STOP_EVENT_NAME="UserIdleStop"}constructor(v,c,f){this._configurationService=c,this._productService=f,this._experimentProperties={},this._disposables=new b.DisposableStore,this._cleanupPatterns=[],this._appenders=v.appenders,this._commonProperties=v.commonProperties??Object.create(null),this.sessionId=this._commonProperties.sessionID,this.machineId=this._commonProperties["common.machineId"],this.firstSessionDate=this._commonProperties["common.firstSessionDate"],this.msftInternal=this._commonProperties["common.msftInternal"],this._piiPaths=v.piiPaths||[],this._telemetryLevel=3,this._sendErrorTelemetry=!!v.sendErrorTelemetry,this._cleanupPatterns=[/(vscode-)?file:\/\/\/.*?\/resources\/app\//gi];for(const I of this._piiPaths)this._cleanupPatterns.push(new RegExp((0,O.escapeRegExpCharacters)(I),"gi")),I.indexOf("\\")>=0&&this._cleanupPatterns.push(new RegExp((0,O.escapeRegExpCharacters)(I.replace(/\\/g,"/")),"gi"));this._updateTelemetryLevel(),this._disposables.add(this._configurationService.onDidChangeConfiguration(I=>{(I.affectsConfiguration(w.TELEMETRY_SETTING_ID)||I.affectsConfiguration(w.TELEMETRY_OLD_SETTING_ID)||I.affectsConfiguration(w.TELEMETRY_CRASH_REPORTER_SETTING_ID))&&this._updateTelemetryLevel()}))}setExperimentProperty(v,c){this._experimentProperties[v]=c}_updateTelemetryLevel(){let v=(0,u.getTelemetryLevel)(this._configurationService);const c=this._productService.enabledTelemetryLevels;if(c){this._sendErrorTelemetry=this.sendErrorTelemetry?c.error:!1;const f=c.usage?3:c.error?2:0;v=Math.min(v,f)}this._telemetryLevel=v}get sendErrorTelemetry(){return this._sendErrorTelemetry}get telemetryLevel(){return this._telemetryLevel}dispose(){this._disposables.dispose()}_log(v,c,f){this._telemetryLevel<c||(f=(0,A.mixin)(f,this._experimentProperties),f=(0,u.cleanData)(f,this._cleanupPatterns),f=(0,A.mixin)(f,this._commonProperties),this._appenders.forEach(I=>I.log(v,f)))}publicLog(v,c){this._log(v,3,c)}publicLog2(v,c){this.publicLog(v,c)}publicLogError(v,c){this._sendErrorTelemetry&&this._log(v,2,c)}publicLogError2(v,c){this.publicLogError(v,c)}};e.TelemetryService=y,e.TelemetryService=y=be([Y(1,P.IConfigurationService),Y(2,m.IProductService)],y);function E(){const l=(0,D.localize)(0,null,d.default.nameLong),v=d.default.privacyStatementUrl?(0,D.localize)(2,null,"https://aka.ms/vscode-telemetry",d.default.privacyStatementUrl):(0,D.localize)(1,null,"https://aka.ms/vscode-telemetry"),c=n.isWeb?"":(0,D.localize)(3,null),f=(0,D.localize)(4,null),I=(0,D.localize)(5,null),S=(0,D.localize)(6,null),t=(0,D.localize)(7,null),a=`
|       | ${f} | ${I} | ${S} |
|:------|:---------------------:|:---------------:|:--------------:|
| all   |            \u2713          |        \u2713        |        \u2713       |
| error |            \u2713          |        \u2713        |        -       |
| crash |            \u2713          |        -        |        -       |
| off   |            -          |        -        |        -       |
`,s=(0,D.localize)(8,null);return`
${l} ${v} ${c}

&nbsp;

${t}
${a}

&nbsp;

${s}
`}g.Registry.as(h.Extensions.Configuration).registerConfiguration({id:w.TELEMETRY_SECTION_ID,order:1,type:"object",title:(0,D.localize)(9,null),properties:{[w.TELEMETRY_SETTING_ID]:{type:"string",enum:["all","error","crash","off"],enumDescriptions:[(0,D.localize)(10,null),(0,D.localize)(11,null),(0,D.localize)(12,null),(0,D.localize)(13,null)],markdownDescription:E(),default:"all",restricted:!0,scope:1,tags:["usesOnlineServices","telemetry"]}}}),g.Registry.as(h.Extensions.Configuration).registerConfiguration({id:w.TELEMETRY_SECTION_ID,order:110,type:"object",title:(0,D.localize)(14,null),properties:{[w.TELEMETRY_OLD_SETTING_ID]:{type:"boolean",markdownDescription:d.default.privacyStatementUrl?(0,D.localize)(16,null,d.default.nameLong,d.default.privacyStatementUrl):(0,D.localize)(15,null,d.default.nameLong),default:!0,restricted:!0,markdownDeprecationMessage:(0,D.localize)(17,null,`\`#${w.TELEMETRY_SETTING_ID}#\``),scope:1,tags:["usesOnlineServices","telemetry"]}}})}),define(Z[255],ee([0,1,4,87,25]),function(H,e,b,A,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.resolveMachineId=void 0;async function O(D,P){let h=D.getItem(n.machineIdKey);return(typeof h!="string"||b.isMacintosh&&h==="6c9d2bc8f91b89624add29c0abeae7fb42bf539fa1cdb2e3e57cd668fa9bcead")&&(h=await(0,A.getMachineId)(P.error.bind(P))),h}e.resolveMachineId=O}),define(Z[256],ee([0,1,25,255]),function(H,e,b,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.resolveMachineId=void 0;async function n(O,D){const P=await(0,A.resolveMachineId)(O,D);return O.setItem(b.machineIdKey,P),P}e.resolveMachineId=n}),define(Z[126],ee([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EnvironmentVariableMutatorType=void 0;var b;(function(A){A[A.Replace=1]="Replace",A[A.Append=2]="Append",A[A.Prepend=3]="Prepend"})(b||(e.EnvironmentVariableMutatorType=b={}))}),define(Z[257],ee([0,1,4,126]),function(H,e,b,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MergedEnvironmentVariableCollection=void 0;const n=new Map([[A.EnvironmentVariableMutatorType.Append,"APPEND"],[A.EnvironmentVariableMutatorType.Prepend,"PREPEND"],[A.EnvironmentVariableMutatorType.Replace,"REPLACE"]]);class O{constructor(m){this.collections=m,this.map=new Map,this.descriptionMap=new Map,m.forEach((g,w)=>{this.populateDescriptionMap(g,w);const u=g.map.entries();let y=u.next();for(;!y.done;){const E=y.value[1],l=y.value[0];let v=this.map.get(l);if(v||(v=[],this.map.set(l,v)),v.length>0&&v[0].type===A.EnvironmentVariableMutatorType.Replace){y=u.next();continue}const c={extensionIdentifier:w,value:E.value,type:E.type,scope:E.scope,variable:E.variable,options:E.options};c.scope||delete c.scope,v.unshift(c),y=u.next()}})}async applyToProcessEnvironment(m,g,w){let u;b.isWindows&&(u={},Object.keys(m).forEach(y=>u[y.toLowerCase()]=y));for(const[y,E]of this.getVariableMap(g)){const l=b.isWindows&&u[y.toLowerCase()]||y;for(const v of E){const c=w?await w(v.value):v.value;if(v.options?.applyAtProcessCreation??!0)switch(v.type){case A.EnvironmentVariableMutatorType.Append:m[l]=(m[l]||"")+c;break;case A.EnvironmentVariableMutatorType.Prepend:m[l]=c+(m[l]||"");break;case A.EnvironmentVariableMutatorType.Replace:m[l]=c;break}if(v.options?.applyAtShellIntegration??!1){const f=`VSCODE_ENV_${n.get(v.type)}`;m[f]=(m[f]?m[f]+":":"")+y+"="+this._encodeColons(c)}}}}_encodeColons(m){return m.replaceAll(":","\\x3a")}diff(m,g){const w=new Map,u=new Map,y=new Map;if(m.getVariableMap(g).forEach((E,l)=>{const v=this.getVariableMap(g).get(l),c=P(E,v);c&&w.set(l,c)}),this.getVariableMap(g).forEach((E,l)=>{const v=m.getVariableMap(g).get(l),c=P(E,v);c&&y.set(l,c)}),this.getVariableMap(g).forEach((E,l)=>{const v=m.getVariableMap(g).get(l),c=h(E,v);c&&u.set(l,c)}),!(w.size===0&&u.size===0&&y.size===0))return{added:w,changed:u,removed:y}}getVariableMap(m){const g=new Map;for(const w of this.map.values()){const u=w.filter(y=>D(y,m));u.length>0&&g.set(u[0].variable,u)}return g}getDescriptionMap(m){const g=new Map;for(const w of this.descriptionMap.values()){const u=w.filter(y=>D(y,m,!0));for(const y of u)g.set(y.extensionIdentifier,y.description)}return g}populateDescriptionMap(m,g){if(!m.descriptionMap)return;const w=m.descriptionMap.entries();let u=w.next();for(;!u.done;){const y=u.value[1],E=u.value[0];let l=this.descriptionMap.get(E);l||(l=[],this.descriptionMap.set(E,l));const v={extensionIdentifier:g,scope:y.scope,description:y.description};v.scope||delete v.scope,l.push(v),u=w.next()}}}e.MergedEnvironmentVariableCollection=O;function D(d,m,g=!1){return d.scope?!!(d.scope.workspaceFolder&&m?.workspaceFolder&&d.scope.workspaceFolder.index===m.workspaceFolder.index):g?m===d.scope:!0}function P(d,m){if(!m)return d;const g=new Set;m.forEach(u=>g.add(u.extensionIdentifier));const w=[];return d.forEach(u=>{g.has(u.extensionIdentifier)||w.push(u)}),w.length===0?void 0:w}function h(d,m){if(!m)return;const g=new Map;m.forEach(u=>g.set(u.extensionIdentifier,u));const w=[];return d.forEach(u=>{const y=g.get(u.extensionIdentifier);y&&(u.type!==y.type||u.value!==y.value||u.scope?.workspaceFolder?.index!==y.scope?.workspaceFolder?.index)&&w.push(y)}),w.length===0?void 0:w}}),define(Z[258],ee([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.deserializeEnvironmentVariableCollections=e.serializeEnvironmentVariableCollections=e.deserializeEnvironmentDescriptionMap=e.deserializeEnvironmentVariableCollection=e.serializeEnvironmentDescriptionMap=e.serializeEnvironmentVariableCollection=void 0;function b(h){return[...h.entries()]}e.serializeEnvironmentVariableCollection=b;function A(h){return h?[...h.entries()]:[]}e.serializeEnvironmentDescriptionMap=A;function n(h){return new Map(h)}e.deserializeEnvironmentVariableCollection=n;function O(h){return new Map(h??[])}e.deserializeEnvironmentDescriptionMap=O;function D(h){return Array.from(h.entries()).map(d=>[d[0],b(d[1].map),A(d[1].descriptionMap)])}e.serializeEnvironmentVariableCollections=D;function P(h){return new Map(h.map(d=>[d[0],{map:n(d[1]),descriptionMap:O(d[2])}]))}e.deserializeEnvironmentVariableCollections=P}),define(Z[259],ee([0,1,8,23,3,2,5]),function(H,e,b,A,n,O,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RequestStore=void 0;let P=class extends O.Disposable{constructor(d,m){super(),this._logService=m,this._lastRequestId=0,this._pendingRequests=new Map,this._pendingRequestDisposables=new Map,this._onCreateRequest=this._register(new n.Emitter),this.onCreateRequest=this._onCreateRequest.event,this._timeout=d===void 0?15e3:d}createRequest(d){return new Promise((m,g)=>{const w=++this._lastRequestId;this._pendingRequests.set(w,m),this._onCreateRequest.fire({requestId:w,...d});const u=new A.CancellationTokenSource;(0,b.timeout)(this._timeout,u.token).then(()=>g(`Request ${w} timed out (${this._timeout}ms)`)),this._pendingRequestDisposables.set(w,[(0,O.toDisposable)(()=>u.cancel())])})}acceptReply(d,m){const g=this._pendingRequests.get(d);g?(this._pendingRequests.delete(d),(0,O.dispose)(this._pendingRequestDisposables.get(d)||[]),this._pendingRequestDisposables.delete(d),g(m)):this._logService.warn(`RequestStore#acceptReply was called without receiving a matching request ${d}`)}};e.RequestStore=P,e.RequestStore=P=be([Y(1,D.ILogService)],P)}),define(Z[127],ee([0,1,6,116,43]),function(H,e,b,A,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITerminalLogService=e.ILocalPtyService=e.TerminalExtensions=e.TerminalExitReason=e.ShellIntegrationStatus=e.ProfileSource=e.FlowControlConstants=e.LocalReconnectConstants=e.TerminalLocationString=e.TerminalLocation=e.HeartbeatConstants=e.IPtyService=e.ProcessPropertyType=e.TerminalIpcChannels=e.TitleEventSource=e.WindowsShellType=e.PosixShellType=e.TerminalSettingId=e.TerminalSettingPrefix=e.terminalTabFocusModeContextKey=void 0,e.terminalTabFocusModeContextKey=new A.RawContextKey("terminalTabFocusMode",!1,!0);var O;(function(S){S.DefaultProfile="terminal.integrated.defaultProfile.",S.Profiles="terminal.integrated.profiles."})(O||(e.TerminalSettingPrefix=O={}));var D;(function(S){S.SendKeybindingsToShell="terminal.integrated.sendKeybindingsToShell",S.AutomationProfileLinux="terminal.integrated.automationProfile.linux",S.AutomationProfileMacOs="terminal.integrated.automationProfile.osx",S.AutomationProfileWindows="terminal.integrated.automationProfile.windows",S.ProfilesWindows="terminal.integrated.profiles.windows",S.ProfilesMacOs="terminal.integrated.profiles.osx",S.ProfilesLinux="terminal.integrated.profiles.linux",S.DefaultProfileLinux="terminal.integrated.defaultProfile.linux",S.DefaultProfileMacOs="terminal.integrated.defaultProfile.osx",S.DefaultProfileWindows="terminal.integrated.defaultProfile.windows",S.UseWslProfiles="terminal.integrated.useWslProfiles",S.TabsDefaultColor="terminal.integrated.tabs.defaultColor",S.TabsDefaultIcon="terminal.integrated.tabs.defaultIcon",S.TabsEnabled="terminal.integrated.tabs.enabled",S.TabsEnableAnimation="terminal.integrated.tabs.enableAnimation",S.TabsHideCondition="terminal.integrated.tabs.hideCondition",S.TabsShowActiveTerminal="terminal.integrated.tabs.showActiveTerminal",S.TabsShowActions="terminal.integrated.tabs.showActions",S.TabsLocation="terminal.integrated.tabs.location",S.TabsFocusMode="terminal.integrated.tabs.focusMode",S.MacOptionIsMeta="terminal.integrated.macOptionIsMeta",S.MacOptionClickForcesSelection="terminal.integrated.macOptionClickForcesSelection",S.AltClickMovesCursor="terminal.integrated.altClickMovesCursor",S.CopyOnSelection="terminal.integrated.copyOnSelection",S.EnableMultiLinePasteWarning="terminal.integrated.enableMultiLinePasteWarning",S.DrawBoldTextInBrightColors="terminal.integrated.drawBoldTextInBrightColors",S.FontFamily="terminal.integrated.fontFamily",S.FontSize="terminal.integrated.fontSize",S.LetterSpacing="terminal.integrated.letterSpacing",S.LineHeight="terminal.integrated.lineHeight",S.MinimumContrastRatio="terminal.integrated.minimumContrastRatio",S.TabStopWidth="terminal.integrated.tabStopWidth",S.FastScrollSensitivity="terminal.integrated.fastScrollSensitivity",S.MouseWheelScrollSensitivity="terminal.integrated.mouseWheelScrollSensitivity",S.BellDuration="terminal.integrated.bellDuration",S.FontWeight="terminal.integrated.fontWeight",S.FontWeightBold="terminal.integrated.fontWeightBold",S.CursorBlinking="terminal.integrated.cursorBlinking",S.CursorStyle="terminal.integrated.cursorStyle",S.CursorStyleInactive="terminal.integrated.cursorStyleInactive",S.CursorWidth="terminal.integrated.cursorWidth",S.Scrollback="terminal.integrated.scrollback",S.DetectLocale="terminal.integrated.detectLocale",S.DefaultLocation="terminal.integrated.defaultLocation",S.GpuAcceleration="terminal.integrated.gpuAcceleration",S.TerminalTitleSeparator="terminal.integrated.tabs.separator",S.TerminalTitle="terminal.integrated.tabs.title",S.TerminalDescription="terminal.integrated.tabs.description",S.RightClickBehavior="terminal.integrated.rightClickBehavior",S.Cwd="terminal.integrated.cwd",S.ConfirmOnExit="terminal.integrated.confirmOnExit",S.ConfirmOnKill="terminal.integrated.confirmOnKill",S.EnableBell="terminal.integrated.enableBell",S.CommandsToSkipShell="terminal.integrated.commandsToSkipShell",S.AllowChords="terminal.integrated.allowChords",S.AllowMnemonics="terminal.integrated.allowMnemonics",S.TabFocusMode="terminal.integrated.tabFocusMode",S.EnvMacOs="terminal.integrated.env.osx",S.EnvLinux="terminal.integrated.env.linux",S.EnvWindows="terminal.integrated.env.windows",S.EnvironmentChangesIndicator="terminal.integrated.environmentChangesIndicator",S.EnvironmentChangesRelaunch="terminal.integrated.environmentChangesRelaunch",S.ShowExitAlert="terminal.integrated.showExitAlert",S.SplitCwd="terminal.integrated.splitCwd",S.WindowsEnableConpty="terminal.integrated.windowsEnableConpty",S.WordSeparators="terminal.integrated.wordSeparators",S.EnableFileLinks="terminal.integrated.enableFileLinks",S.UnicodeVersion="terminal.integrated.unicodeVersion",S.LocalEchoLatencyThreshold="terminal.integrated.localEchoLatencyThreshold",S.LocalEchoEnabled="terminal.integrated.localEchoEnabled",S.LocalEchoExcludePrograms="terminal.integrated.localEchoExcludePrograms",S.LocalEchoStyle="terminal.integrated.localEchoStyle",S.EnablePersistentSessions="terminal.integrated.enablePersistentSessions",S.PersistentSessionReviveProcess="terminal.integrated.persistentSessionReviveProcess",S.HideOnStartup="terminal.integrated.hideOnStartup",S.CustomGlyphs="terminal.integrated.customGlyphs",S.PersistentSessionScrollback="terminal.integrated.persistentSessionScrollback",S.InheritEnv="terminal.integrated.inheritEnv",S.ShowLinkHover="terminal.integrated.showLinkHover",S.IgnoreProcessNames="terminal.integrated.ignoreProcessNames",S.AutoReplies="terminal.integrated.autoReplies",S.ShellIntegrationEnabled="terminal.integrated.shellIntegration.enabled",S.ShellIntegrationShowWelcome="terminal.integrated.shellIntegration.showWelcome",S.ShellIntegrationDecorationsEnabled="terminal.integrated.shellIntegration.decorationsEnabled",S.ShellIntegrationCommandHistory="terminal.integrated.shellIntegration.history",S.ShellIntegrationSuggestEnabled="terminal.integrated.shellIntegration.suggestEnabled",S.EnableImages="terminal.integrated.enableImages",S.SmoothScrolling="terminal.integrated.smoothScrolling",S.IgnoreBracketedPasteMode="terminal.integrated.ignoreBracketedPasteMode",S.FocusAfterRun="terminal.integrated.focusAfterRun",S.DeveloperPtyHostLatency="terminal.integrated.developer.ptyHost.latency",S.DeveloperPtyHostStartupDelay="terminal.integrated.developer.ptyHost.startupDelay",S.DevMode="terminal.integrated.developer.devMode"})(D||(e.TerminalSettingId=D={}));var P;(function(S){S.PowerShell="pwsh",S.Bash="bash",S.Fish="fish",S.Sh="sh",S.Csh="csh",S.Ksh="ksh",S.Zsh="zsh"})(P||(e.PosixShellType=P={}));var h;(function(S){S.CommandPrompt="cmd",S.PowerShell="pwsh",S.Wsl="wsl",S.GitBash="gitbash"})(h||(e.WindowsShellType=h={}));var d;(function(S){S[S.Api=0]="Api",S[S.Process=1]="Process",S[S.Sequence=2]="Sequence",S[S.Config=3]="Config"})(d||(e.TitleEventSource=d={}));var m;(function(S){S.LocalPty="localPty",S.PtyHost="ptyHost",S.PtyHostWindow="ptyHostWindow",S.Logger="logger",S.Heartbeat="heartbeat"})(m||(e.TerminalIpcChannels=m={}));var g;(function(S){S.Cwd="cwd",S.InitialCwd="initialCwd",S.FixedDimensions="fixedDimensions",S.Title="title",S.ShellType="shellType",S.HasChildProcesses="hasChildProcesses",S.ResolvedShellLaunchConfig="resolvedShellLaunchConfig",S.OverrideDimensions="overrideDimensions",S.FailedShellIntegrationActivation="failedShellIntegrationActivation",S.UsedShellIntegrationInjection="usedShellIntegrationInjection"})(g||(e.ProcessPropertyType=g={})),e.IPtyService=(0,b.createDecorator)("ptyService");var w;(function(S){S[S.BeatInterval=5e3]="BeatInterval",S[S.ConnectingBeatInterval=2e4]="ConnectingBeatInterval",S[S.FirstWaitMultiplier=1.2]="FirstWaitMultiplier",S[S.SecondWaitMultiplier=1]="SecondWaitMultiplier",S[S.CreateProcessTimeout=5e3]="CreateProcessTimeout"})(w||(e.HeartbeatConstants=w={}));var u;(function(S){S[S.Panel=1]="Panel",S[S.Editor=2]="Editor"})(u||(e.TerminalLocation=u={}));var y;(function(S){S.TerminalView="view",S.Editor="editor"})(y||(e.TerminalLocationString=y={}));var E;(function(S){S[S.GraceTime=6e4]="GraceTime",S[S.ShortGraceTime=6e3]="ShortGraceTime"})(E||(e.LocalReconnectConstants=E={}));var l;(function(S){S[S.HighWatermarkChars=1e5]="HighWatermarkChars",S[S.LowWatermarkChars=5e3]="LowWatermarkChars",S[S.CharCountAckSize=5e3]="CharCountAckSize"})(l||(e.FlowControlConstants=l={}));var v;(function(S){S.GitBash="Git Bash",S.Pwsh="PowerShell"})(v||(e.ProfileSource=v={}));var c;(function(S){S[S.Off=0]="Off",S[S.FinalTerm=1]="FinalTerm",S[S.VSCode=2]="VSCode"})(c||(e.ShellIntegrationStatus=c={}));var f;(function(S){S[S.Unknown=0]="Unknown",S[S.Shutdown=1]="Shutdown",S[S.Process=2]="Process",S[S.User=3]="User",S[S.Extension=4]="Extension"})(f||(e.TerminalExitReason=f={})),e.TerminalExtensions={Backend:"workbench.contributions.terminal.processBackend"};class I{constructor(){this._backends=new Map}get backends(){return this._backends}registerTerminalBackend(t){const a=this._sanitizeRemoteAuthority(t.remoteAuthority);if(this._backends.has(a))throw new Error(`A terminal backend with remote authority '${a}' was already registered.`);this._backends.set(a,t)}getTerminalBackend(t){return this._backends.get(this._sanitizeRemoteAuthority(t))}_sanitizeRemoteAuthority(t){return t?.toLowerCase()??""}}n.Registry.add(e.TerminalExtensions.Backend,new I),e.ILocalPtyService=(0,b.createDecorator)("localPtyService"),e.ITerminalLogService=(0,b.createDecorator)("terminalLogService")}),define(Z[260],ee([0,1,72,7,187,104]),function(H,e,b,A,n,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isUriComponents=e.terminalIconsEqual=e.terminalProfileArgsMatch=e.createProfileSchemaEnums=void 0;function D(w,u){const y=[{name:null,description:(0,n.localize)(0,null)}];return y.push(...w.map(E=>({name:E.profileName,description:P(E)}))),u&&y.push(...u.map(E=>({name:E.title,description:h(E)}))),{values:y.map(E=>E.name),markdownDescriptions:y.map(E=>E.description)}}e.createProfileSchemaEnums=D;function P(w){let u=`$(${O.ThemeIcon.isThemeIcon(w.icon)?w.icon.id:w.icon?w.icon:b.Codicon.terminal.id}) ${w.profileName}
- path: ${w.path}`;return w.args&&(typeof w.args=="string"?u+=`
- args: "${w.args}"`:u+=`
- args: [${w.args.length===0?"":`'${w.args.join("','")}'`}]`),w.overrideName!==void 0&&(u+=`
- overrideName: ${w.overrideName}`),w.color&&(u+=`
- color: ${w.color}`),w.env&&(u+=`
- env: ${JSON.stringify(w.env)}`),u}function h(w){return`$(${O.ThemeIcon.isThemeIcon(w.icon)?w.icon.id:w.icon?w.icon:b.Codicon.terminal.id}) ${w.title}
- extensionIdentifier: ${w.extensionIdentifier}`}function d(w,u){if(!w&&!u)return!0;if(typeof w=="string"&&typeof u=="string")return w===u;if(Array.isArray(w)&&Array.isArray(u)){if(w.length!==u.length)return!1;for(let y=0;y<w.length;y++)if(w[y]!==u[y])return!1;return!0}return!1}e.terminalProfileArgsMatch=d;function m(w,u){if(!w&&!u)return!0;if(!w||!u)return!1;if(O.ThemeIcon.isThemeIcon(w)&&O.ThemeIcon.isThemeIcon(u))return w.id===u.id&&w.color===u.color;if(typeof w=="object"&&"light"in w&&"dark"in w&&typeof u=="object"&&"light"in u&&"dark"in u){const y=w,E=u;if((A.URI.isUri(y.light)||g(y.light))&&(A.URI.isUri(y.dark)||g(y.dark))&&(A.URI.isUri(E.light)||g(E.light))&&(A.URI.isUri(E.dark)||g(E.dark)))return y.light.path===E.light.path&&y.dark.path===E.dark.path}if(A.URI.isUri(w)&&A.URI.isUri(u)||g(w)||g(u)){const y=w,E=u;return y.path===E.path&&y.scheme===E.scheme}return!1}e.terminalIconsEqual=m;function g(w){return w?typeof w.path=="string"&&typeof w.scheme=="string":!1}e.isUriComponents=g}),define(Z[261],ee([0,1,72,4,186,59,43,260,89]),function(H,e,b,A,n,O,D,P,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerTerminalDefaultProfileConfiguration=e.registerTerminalPlatformConfiguration=e.terminalIconSchema=e.terminalColorSchema=void 0,e.terminalColorSchema={type:["string","null"],enum:["terminal.ansiBlack","terminal.ansiRed","terminal.ansiGreen","terminal.ansiYellow","terminal.ansiBlue","terminal.ansiMagenta","terminal.ansiCyan","terminal.ansiWhite"],default:null},e.terminalIconSchema={type:"string",enum:Array.from((0,b.getAllCodicons)(),v=>v.id),markdownEnumDescriptions:Array.from((0,b.getAllCodicons)(),v=>`$(${v.id})`)};const d={args:{description:(0,n.localize)(0,null),type:"array",items:{type:"string"}},overrideName:{description:(0,n.localize)(1,null),type:"boolean"},icon:{description:(0,n.localize)(2,null),...e.terminalIconSchema},color:{description:(0,n.localize)(3,null),...e.terminalColorSchema},env:{markdownDescription:(0,n.localize)(4,null),type:"object",additionalProperties:{type:["string","null"]},default:{}}},m={type:"object",required:["path"],properties:{path:{description:(0,n.localize)(5,null),type:["string","array"],items:{type:"string"}},...d}},g={type:"object",required:["path"],properties:{path:{description:(0,n.localize)(6,null),type:["string"],items:{type:"string"}},...d}};function w(v){const c=v===2?"linux":v===1?"osx":"windows";return(0,n.localize)(7,null,(0,A.PlatformToString)(v),'```json\n"terminal.integrated.profile.'+c+'": {\n  "bash": null\n}\n```',"[","](https://code.visualstudio.com/docs/terminal/profiles)")}const u={id:"terminal",order:100,title:(0,n.localize)(8,null),type:"object",properties:{["terminal.integrated.automationProfile.linux"]:{restricted:!0,markdownDescription:(0,n.localize)(9,null),type:["object","null"],default:null,anyOf:[{type:"null"},g],defaultSnippets:[{body:{path:"${1}",icon:"${2}"}}]},["terminal.integrated.automationProfile.osx"]:{restricted:!0,markdownDescription:(0,n.localize)(10,null),type:["object","null"],default:null,anyOf:[{type:"null"},g],defaultSnippets:[{body:{path:"${1}",icon:"${2}"}}]},["terminal.integrated.automationProfile.windows"]:{restricted:!0,markdownDescription:(0,n.localize)(11,null,"`terminal.integrated.automationShell.windows`"),type:["object","null"],default:null,anyOf:[{type:"null"},g],defaultSnippets:[{body:{path:"${1}",icon:"${2}"}}]},["terminal.integrated.profiles.windows"]:{restricted:!0,markdownDescription:w(3),type:"object",default:{PowerShell:{source:"PowerShell",icon:"terminal-powershell"},"Command Prompt":{path:["${env:windir}\\Sysnative\\cmd.exe","${env:windir}\\System32\\cmd.exe"],args:[],icon:"terminal-cmd"},"Git Bash":{source:"Git Bash"}},additionalProperties:{anyOf:[{type:"object",required:["source"],properties:{source:{description:(0,n.localize)(12,null),enum:["PowerShell","Git Bash"]},...d}},{type:"object",required:["extensionIdentifier","id","title"],properties:{extensionIdentifier:{description:(0,n.localize)(13,null),type:"string"},id:{description:(0,n.localize)(14,null),type:"string"},title:{description:(0,n.localize)(15,null),type:"string"},...d}},{type:"null"},m]}},["terminal.integrated.profiles.osx"]:{restricted:!0,markdownDescription:w(1),type:"object",default:{bash:{path:"bash",args:["-l"],icon:"terminal-bash"},zsh:{path:"zsh",args:["-l"]},fish:{path:"fish",args:["-l"]},tmux:{path:"tmux",icon:"terminal-tmux"},pwsh:{path:"pwsh",icon:"terminal-powershell"}},additionalProperties:{anyOf:[{type:"object",required:["extensionIdentifier","id","title"],properties:{extensionIdentifier:{description:(0,n.localize)(16,null),type:"string"},id:{description:(0,n.localize)(17,null),type:"string"},title:{description:(0,n.localize)(18,null),type:"string"},...d}},{type:"null"},m]}},["terminal.integrated.profiles.linux"]:{restricted:!0,markdownDescription:w(2),type:"object",default:{bash:{path:"bash",icon:"terminal-bash"},zsh:{path:"zsh"},fish:{path:"fish"},tmux:{path:"tmux",icon:"terminal-tmux"},pwsh:{path:"pwsh",icon:"terminal-powershell"}},additionalProperties:{anyOf:[{type:"object",required:["extensionIdentifier","id","title"],properties:{extensionIdentifier:{description:(0,n.localize)(19,null),type:"string"},id:{description:(0,n.localize)(20,null),type:"string"},title:{description:(0,n.localize)(21,null),type:"string"},...d}},{type:"null"},m]}},["terminal.integrated.useWslProfiles"]:{description:(0,n.localize)(22,null),type:"boolean",default:!0},["terminal.integrated.inheritEnv"]:{scope:1,description:h.terminalIntegratedInheritEnvDescription,type:"boolean",default:!0},["terminal.integrated.persistentSessionScrollback"]:{scope:1,markdownDescription:(0,n.localize)(23,null),type:"number",default:100},["terminal.integrated.showLinkHover"]:{scope:1,description:(0,n.localize)(24,null),type:"boolean",default:!0},["terminal.integrated.ignoreProcessNames"]:{description:(0,n.localize)(25,null,"`terminal.integrated.confirmOnKill`"),type:"array",items:{type:"string",uniqueItems:!0},default:["starship","oh-my-posh","bash","zsh"]}}};function y(){D.Registry.as(O.Extensions.Configuration).registerConfiguration(u),l()}e.registerTerminalPlatformConfiguration=y;let E;function l(v,c){const f=D.Registry.as(O.Extensions.Configuration);let I;v&&(I=(0,P.createProfileSchemaEnums)(v?.profiles,c));const S=E;E={id:"terminal",order:100,title:(0,n.localize)(26,null),type:"object",properties:{["terminal.integrated.defaultProfile.linux"]:{restricted:!0,markdownDescription:(0,n.localize)(27,null),type:["string","null"],default:null,enum:v?.os===3?I?.values:void 0,markdownEnumDescriptions:v?.os===3?I?.markdownDescriptions:void 0},["terminal.integrated.defaultProfile.osx"]:{restricted:!0,markdownDescription:(0,n.localize)(28,null),type:["string","null"],default:null,enum:v?.os===2?I?.values:void 0,markdownEnumDescriptions:v?.os===2?I?.markdownDescriptions:void 0},["terminal.integrated.defaultProfile.windows"]:{restricted:!0,markdownDescription:(0,n.localize)(29,null),type:["string","null"],default:null,enum:v?.os===1?I?.values:void 0,markdownEnumDescriptions:v?.os===1?I?.markdownDescriptions:void 0}}},f.updateConfigurations({add:[E],remove:S?[S]:[]})}e.registerTerminalDefaultProfileConfiguration=l}),define(Z[262],ee([0,1,27,15,37,10,4,36,26,12,21,126,258,257]),function(H,e,b,A,n,O,D,P,h,d,m,g,w,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getShellIntegrationInjection=e.findExecutable=e.getWindowsBuildNumber=void 0;function y(){const i=/(\d+)\.(\d+)\.(\d+)/g.exec(b.release());let r=0;return i&&i.length===4&&(r=parseInt(i[3])),r}e.getWindowsBuildNumber=y;async function E(i,r,o,p=P.env,k=m.Promises.exists){if(O.isAbsolute(i))return await k(i)?i:void 0;if(r===void 0&&(r=P.cwd()),O.dirname(i)!=="."){const T=O.join(r,i);return await k(T)?T:void 0}const C=(0,n.getCaseInsensitive)(p,"PATH");if(o===void 0&&(0,d.isString)(C)&&(o=C.split(O.delimiter)),o===void 0||o.length===0){const T=O.join(r,i);return await k(T)?T:void 0}for(const T of o){let F;if(O.isAbsolute(T)?F=O.join(T,i):F=O.join(r,T,i),await k(F))return F;if(D.isWindows){let z=F+".com";if(await k(z)||(z=F+".exe",await k(z)))return z}}const L=O.join(r,i);return await k(L)?L:void 0}e.findExecutable=E;function l(i,r,o,p,k){const M=D.isWindows&&(!r.windowsEnableConpty||y()<18309);if(!r.shellIntegration.enabled||!i.executable||i.isFeatureTerminal||i.hideFromUser||i.ignoreShellIntegration||M)return;const C=i.args,L=P.platform==="win32"?O.basename(i.executable).toLowerCase():O.basename(i.executable),T=O.dirname(A.FileAccess.asFileUri("").fsPath);let F;const z={VSCODE_INJECTION:"1"};if(r.shellIntegration.nonce&&(z.VSCODE_NONCE=r.shellIntegration.nonce),D.isWindows){if(L==="pwsh.exe"||L==="powershell.exe")return!C||a(C)?F=f.get(c.WindowsPwsh):t(C)&&(F=f.get(c.WindowsPwshLogin)),F?(F=[...F],F[F.length-1]=(0,h.format)(F[F.length-1],T,""),{newArgs:F,envMixin:z}):void 0;p.warn(`Shell integration cannot be enabled for executable "${i.executable}" and args`,i.args);return}switch(L){case"bash":return!C||C.length===0?F=f.get(c.Bash):s(C)&&(z.VSCODE_SHELL_LOGIN="1",v(r,z),F=f.get(c.Bash)),F?(F=[...F],F[F.length-1]=(0,h.format)(F[F.length-1],T),{newArgs:F,envMixin:z}):void 0;case"fish":return;case"pwsh":return!C||a(C)?F=f.get(c.Pwsh):t(C)&&(F=f.get(c.PwshLogin)),F?(F=[...F],F[F.length-1]=(0,h.format)(F[F.length-1],T,""),{newArgs:F,envMixin:z}):void 0;case"zsh":{if(!C||C.length===0?F=f.get(c.Zsh):s(C)?(F=f.get(c.ZshLogin),v(r,z)):(C===f.get(c.Zsh)||C===f.get(c.ZshLogin))&&(F=C),!F)return;F=[...F],F[F.length-1]=(0,h.format)(F[F.length-1],T);let oe;try{oe=b.userInfo().username}catch{oe="unknown"}const ne=O.join(b.tmpdir(),`${oe}-${k.applicationName}-zsh`);z.ZDOTDIR=ne;const de=o?.ZDOTDIR??b.homedir()??"~";z.USER_ZDOTDIR=de;const ae=[];return ae.push({source:O.join(T,"out/vs/workbench/contrib/terminal/browser/media/shellIntegration-rc.zsh"),dest:O.join(ne,".zshrc")}),ae.push({source:O.join(T,"out/vs/workbench/contrib/terminal/browser/media/shellIntegration-profile.zsh"),dest:O.join(ne,".zprofile")}),ae.push({source:O.join(T,"out/vs/workbench/contrib/terminal/browser/media/shellIntegration-env.zsh"),dest:O.join(ne,".zshenv")}),ae.push({source:O.join(T,"out/vs/workbench/contrib/terminal/browser/media/shellIntegration-login.zsh"),dest:O.join(ne,".zlogin")}),{newArgs:F,envMixin:z,filesToCopy:ae}}}p.warn(`Shell integration cannot be enabled for executable "${i.executable}" and args`,i.args)}e.getShellIntegrationInjection=l;function v(i,r){if(D.isMacintosh&&i.environmentVariableCollections){const o=(0,w.deserializeEnvironmentVariableCollections)(i.environmentVariableCollections),k=new u.MergedEnvironmentVariableCollection(o).getVariableMap({workspaceFolder:i.workspaceFolder}).get("PATH"),M=[];if(k)for(const C of k)C.type===g.EnvironmentVariableMutatorType.Prepend&&M.push(C.value);M.length>0&&(r.VSCODE_PATH_PREFIX=M.join(""))}}var c;(function(i){i.WindowsPwsh="windows-pwsh",i.WindowsPwshLogin="windows-pwsh-login",i.Pwsh="pwsh",i.PwshLogin="pwsh-login",i.Zsh="zsh",i.ZshLogin="zsh-login",i.Bash="bash"})(c||(c={}));const f=new Map;f.set(c.WindowsPwsh,["-noexit","-command",'try { . "{0}\\out\\vs\\workbench\\contrib\\terminal\\browser\\media\\shellIntegration.ps1" } catch {}{1}']),f.set(c.WindowsPwshLogin,["-l","-noexit","-command",'try { . "{0}\\out\\vs\\workbench\\contrib\\terminal\\browser\\media\\shellIntegration.ps1" } catch {}{1}']),f.set(c.Pwsh,["-noexit","-command",'. "{0}/out/vs/workbench/contrib/terminal/browser/media/shellIntegration.ps1"{1}']),f.set(c.PwshLogin,["-l","-noexit","-command",'. "{0}/out/vs/workbench/contrib/terminal/browser/media/shellIntegration.ps1"']),f.set(c.Zsh,["-i"]),f.set(c.ZshLogin,["-il"]),f.set(c.Bash,["--init-file","{0}/out/vs/workbench/contrib/terminal/browser/media/shellIntegration-bash.sh"]);const I=["-login","-l"],S=["-nol","-nologo"];function t(i){return typeof i=="string"?I.includes(i.toLowerCase()):i.length===1&&I.includes(i[0].toLowerCase())||i.length===2&&(I.includes(i[0].toLowerCase())||I.includes(i[1].toLowerCase()))&&(S.includes(i[0].toLowerCase())||S.includes(i[1].toLowerCase()))}function a(i){return typeof i=="string"?S.includes(i.toLowerCase()):i.length===0||i?.length===1&&S.includes(i[0].toLowerCase())}function s(i){return i==="string"&&I.includes(i.toLowerCase())||typeof i!="string"&&i.length===1&&I.includes(i[0].toLowerCase())}}),define(Z[263],ee([0,1,47,72,10,4,12,21,108,262,115]),function(H,e,b,A,n,O,D,P,h,d,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.detectAvailableProfiles=void 0;let g,w=!0;function u(r,o,p,k,M=process.env,C,L,T,F){return C=C||{existsFile:P.SymlinkSupport.existsFile,readFile:P.Promises.readFile},O.isWindows?y(p,C,M,L,k.getValue("terminal.integrated.useWslProfiles")!==!1,r&&typeof r=="object"?{...r}:k.getValue("terminal.integrated.profiles.windows"),typeof o=="string"?o:k.getValue("terminal.integrated.defaultProfile.windows"),F,T):a(C,L,p,r&&typeof r=="object"?{...r}:k.getValue(O.isLinux?"terminal.integrated.profiles.linux":"terminal.integrated.profiles.osx"),typeof o=="string"?o:k.getValue(O.isLinux?"terminal.integrated.defaultProfile.linux":"terminal.integrated.defaultProfile.osx"),F,T,M)}e.detectAvailableProfiles=u;async function y(r,o,p,k,M,C,L,T,F){const z=process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432"),oe=`${process.env.windir}\\${z?"Sysnative":"System32"}`;let ne=!1;(0,d.getWindowsBuildNumber)()>=16299&&(ne=!0),await c(T);const de=new Map;if(r){de.set("PowerShell",{source:"PowerShell",icon:A.Codicon.terminalPowershell,isAutoDetected:!0}),de.set("Windows PowerShell",{path:`${oe}\\WindowsPowerShell\\v1.0\\powershell.exe`,icon:A.Codicon.terminalPowershell,isAutoDetected:!0}),de.set("Git Bash",{source:"Git Bash",isAutoDetected:!0}),de.set("Command Prompt",{path:`${oe}\\cmd.exe`,icon:A.Codicon.terminalCmd,isAutoDetected:!0}),de.set("Cygwin",{path:[{path:`${process.env.HOMEDRIVE}\\cygwin64\\bin\\bash.exe`,isUnsafe:!0},{path:`${process.env.HOMEDRIVE}\\cygwin\\bin\\bash.exe`,isUnsafe:!0}],args:["--login"],isAutoDetected:!0}),de.set("bash (MSYS2)",{path:[{path:`${process.env.HOMEDRIVE}\\msys64\\usr\\bin\\bash.exe`,isUnsafe:!0}],args:["--login","-i"],icon:A.Codicon.terminalBash,isAutoDetected:!0});const ue=`${process.env.CMDER_ROOT||`${process.env.HOMEDRIVE}\\cmder`}\\vendor\\bin\\vscode_init.cmd`;de.set("Cmder",{path:`${oe}\\cmd.exe`,args:["/K",ue],requiresPath:process.env.CMDER_ROOT?ue:{path:ue,isUnsafe:!0},isAutoDetected:!0})}s(C,de);const ae=await E(de.entries(),L,o,p,k,F);if(r&&M)try{const ue=await S(`${oe}\\${ne?"wsl":"bash"}.exe`,L);for(const j of ue)(!C||!(j.profileName in C))&&ae.push(j)}catch{w&&(k?.info("WSL is not installed, so could not detect WSL profiles"),w=!1)}return ae}async function E(r,o,p,k=process.env,M,C){const L=[];for(const[T,F]of r)L.push(l(T,F,o,p,k,M,C));return(await Promise.all(L)).filter(T=>!!T)}async function l(r,o,p,k,M=process.env,C,L){if(o===null)return;let T,F,z;if("source"in o&&!("path"in o)){const ae=g?.get(o.source);if(!ae)return;T=ae.paths,F=o.args||ae.args,o.icon?z=v(o.icon):ae.icon&&(z=ae.icon)}else T=Array.isArray(o.path)?o.path:[o.path],F=O.isWindows||Array.isArray(o.args)?o.args:void 0,z=v(o.icon);let oe;if(L){const ae=T.map(j=>typeof j=="string"?j:j.path),ue=await L(ae);oe=new Array(T.length);for(let j=0;j<T.length;j++)typeof T[j]=="string"?oe[j]=ue[j]:oe[j]={path:ue[j],isUnsafe:!0}}else oe=T.slice();let ne;if(o.requiresPath){let ae;if((0,D.isString)(o.requiresPath)?ae=o.requiresPath:(ae=o.requiresPath.path,o.requiresPath.isUnsafe&&(ne=ae)),!await k.existsFile(ae))return}const de=await i(r,p,oe,k,M,F,o.env,o.overrideName,o.isAutoDetected,ne);if(!de){C?.debug("Terminal profile not validated",r,T);return}return de.isAutoDetected=o.isAutoDetected,de.icon=z,de.color=o.color,de}function v(r){return typeof r=="string"?{id:r}:r}async function c(r){if(g&&!r)return;const[o,p]=await Promise.all([f(),r||I()]);g=new Map,g.set("Git Bash",{profileName:"Git Bash",paths:o,args:["--login","-i"]}),g.set("PowerShell",{profileName:"PowerShell",paths:p,icon:A.Codicon.terminalPowershell})}async function f(){const r=new Set,o=await(0,d.findExecutable)("git.exe");if(o){const M=(0,m.dirname)(o);r.add((0,m.resolve)(M,"../.."))}function p(M,C){C&&M.add(C)}p(r,process.env.ProgramW6432),p(r,process.env.ProgramFiles),p(r,process.env["ProgramFiles(X86)"]),p(r,`${process.env.LocalAppData}\\Program`);const k=[];for(const M of r)k.push(`${M}\\Git\\bin\\bash.exe`,`${M}\\Git\\usr\\bin\\bash.exe`,`${M}\\usr\\bin\\bash.exe`);return k.push(`${process.env.UserProfile}\\scoop\\apps\\git-with-openssh\\current\\bin\\bash.exe`),k}async function I(){const r=[];for await(const o of(0,h.enumeratePowerShellInstallations)())r.push(o.exePath);return r}async function S(r,o){const p=[],k=await new Promise((L,T)=>{b.exec("wsl.exe -l -q",{encoding:"utf16le",timeout:1e3},(F,z)=>{if(F)return T("Problem occurred when getting wsl distros");L(z)})});if(!k)return[];const M=new RegExp(/[\r?\n]/),C=k.split(M).filter(L=>L.trim().length>0&&L!=="");for(const L of C){if(L===""||L.startsWith("docker-desktop"))continue;const T=`${L} (WSL)`,F={profileName:T,path:r,args:["-d",`${L}`],isDefault:T===o,icon:t(L),isAutoDetected:!1};p.push(F)}return p}function t(r){return r.includes("Ubuntu")?A.Codicon.terminalUbuntu:r.includes("Debian")?A.Codicon.terminalDebian:A.Codicon.terminalLinux}async function a(r,o,p,k,M,C,L,T){const F=new Map;if(p){const z=(await r.readFile("/etc/shells")).toString(),oe=(C||z.split(`
`)).map(de=>{const ae=de.indexOf("#");return ae===-1?de:de.substring(0,ae)}).filter(de=>de.trim().length>0),ne=new Map;for(const de of oe){let ae=(0,n.basename)(de),ue=ne.get(ae)||0;ue++,ue>1&&(ae=`${ae} (${ue})`),ne.set(ae,ue),F.set(ae,{path:de,isAutoDetected:!0})}}return s(k,F),await E(F.entries(),M,r,T,o,L)}function s(r,o){if(r)for(const[p,k]of Object.entries(r))k===null||typeof k!="object"||!("path"in k)&&!("source"in k)?o.delete(p):(k.icon=k.icon||o.get(p)?.icon,o.set(p,k))}async function i(r,o,p,k,M,C,L,T,F,z){if(p.length===0)return Promise.resolve(void 0);const oe=p.shift();if(oe==="")return i(r,o,p,k,M,C,L,T,F);const ne=typeof oe!="string"&&oe.isUnsafe,de=typeof oe=="string"?oe:oe.path,ae={profileName:r,path:de,args:C,env:L,overrideName:T,isAutoDetected:F,isDefault:r===o,isUnsafePath:ne,requiresUnsafePath:z};if((0,n.basename)(de)===de){const j=M.PATH?M.PATH.split(n.delimiter):void 0,G=await(0,d.findExecutable)(de,void 0,j,void 0,k.existsFile);return G?(ae.path=G,ae.isFromPath=!0,ae):i(r,o,p,k,M,C)}return await k.existsFile((0,n.normalize)(de))?ae:i(r,o,p,k,M,C,L,T,F)}}),define(Z[264],ee([0,1,3,2,4,42,18,5,226,96,259,127,261,263,110,70]),function(H,e,b,A,n,O,D,P,h,d,m,g,w,u,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PtyHostService=void 0;var l;(function(c){c[c.MaxRestarts=5]="MaxRestarts"})(l||(l={}));let v=class extends A.Disposable{get _connection(){return this._ensurePtyHost(),this.__connection}get _proxy(){return this._ensurePtyHost(),this.__proxy}get _optionalProxy(){return this.__proxy}_ensurePtyHost(){this.__connection||this._startPtyHost()}constructor(f,I,S,t){super(),this._ptyHostStarter=f,this._configurationService=I,this._logService=S,this._loggerService=t,this._wasQuitRequested=!1,this._restartCount=0,this._isResponsive=!0,this._isDisposed=!1,this._onPtyHostExit=this._register(new b.Emitter),this.onPtyHostExit=this._onPtyHostExit.event,this._onPtyHostStart=this._register(new b.Emitter),this.onPtyHostStart=this._onPtyHostStart.event,this._onPtyHostUnresponsive=this._register(new b.Emitter),this.onPtyHostUnresponsive=this._onPtyHostUnresponsive.event,this._onPtyHostResponsive=this._register(new b.Emitter),this.onPtyHostResponsive=this._onPtyHostResponsive.event,this._onPtyHostRequestResolveVariables=this._register(new b.Emitter),this.onPtyHostRequestResolveVariables=this._onPtyHostRequestResolveVariables.event,this._onProcessData=this._register(new b.Emitter),this.onProcessData=this._onProcessData.event,this._onProcessReady=this._register(new b.Emitter),this.onProcessReady=this._onProcessReady.event,this._onProcessReplay=this._register(new b.Emitter),this.onProcessReplay=this._onProcessReplay.event,this._onProcessOrphanQuestion=this._register(new b.Emitter),this.onProcessOrphanQuestion=this._onProcessOrphanQuestion.event,this._onDidRequestDetach=this._register(new b.Emitter),this.onDidRequestDetach=this._onDidRequestDetach.event,this._onDidChangeProperty=this._register(new b.Emitter),this.onDidChangeProperty=this._onDidChangeProperty.event,this._onProcessExit=this._register(new b.Emitter),this.onProcessExit=this._onProcessExit.event,(0,w.registerTerminalPlatformConfiguration)(),this._register(this._ptyHostStarter),this._register((0,A.toDisposable)(()=>this._disposePtyHost())),this._resolveVariablesRequestStore=this._register(new m.RequestStore(void 0,this._logService)),this._resolveVariablesRequestStore.onCreateRequest(this._onPtyHostRequestResolveVariables.fire,this._onPtyHostRequestResolveVariables),this._ptyHostStarter.onRequestConnection&&b.Event.once(this._ptyHostStarter.onRequestConnection)(()=>this._ensurePtyHost()),this._ptyHostStarter.onWillShutdown?.(()=>this._wasQuitRequested=!0)}get _ignoreProcessNames(){return this._configurationService.getValue("terminal.integrated.ignoreProcessNames")}async _refreshIgnoreProcessNames(){return this._optionalProxy?.refreshIgnoreProcessNames?.(this._ignoreProcessNames)}async _resolveShellEnv(){if(n.isWindows)return process.env;try{return await(0,d.getResolvedShellEnv)(this._configurationService,this._logService,{_:[]},process.env)}catch(f){return this._logService.error("ptyHost was unable to resolve shell environment",f),{}}}_startPtyHost(){const f=this._ptyHostStarter.start(),I=f.client;this._logService.getLevel()===P.LogLevel.Trace&&this._logService.trace("PtyHostService#_startPtyHost",new Error().stack?.replace(/^Error/,"")),O.ProxyChannel.toService(I.getChannel(g.TerminalIpcChannels.Heartbeat)).onBeat(()=>this._handleHeartbeat()),this._handleHeartbeat(!0),this._register(f.onDidProcessExit(a=>{this._onPtyHostExit.fire(a.code),!this._wasQuitRequested&&!this._isDisposed&&(this._restartCount<=l.MaxRestarts?(this._logService.error(`ptyHost terminated unexpectedly with code ${a.code}`),this._restartCount++,this.restartPtyHost()):this._logService.error(`ptyHost terminated unexpectedly with code ${a.code}, giving up`))}));const t=O.ProxyChannel.toService(I.getChannel(g.TerminalIpcChannels.PtyHost));return this._register(t.onProcessData(a=>this._onProcessData.fire(a))),this._register(t.onProcessReady(a=>this._onProcessReady.fire(a))),this._register(t.onProcessExit(a=>this._onProcessExit.fire(a))),this._register(t.onDidChangeProperty(a=>this._onDidChangeProperty.fire(a))),this._register(t.onProcessReplay(a=>this._onProcessReplay.fire(a))),this._register(t.onProcessOrphanQuestion(a=>this._onProcessOrphanQuestion.fire(a))),this._register(t.onDidRequestDetach(a=>this._onDidRequestDetach.fire(a))),this._register(new h.RemoteLoggerChannelClient(this._loggerService,I.getChannel(g.TerminalIpcChannels.Logger))),this.__connection=f,this.__proxy=t,this._onPtyHostStart.fire(),this._register(this._configurationService.onDidChangeConfiguration(async a=>{a.affectsConfiguration("terminal.integrated.ignoreProcessNames")&&await this._refreshIgnoreProcessNames()})),this._refreshIgnoreProcessNames(),[f,t]}dispose(){this._isDisposed=!0,super.dispose()}async createProcess(f,I,S,t,a,s,i,r,o,p,k){const M=setTimeout(()=>this._handleUnresponsiveCreateProcess(),g.HeartbeatConstants.CreateProcessTimeout),C=await this._proxy.createProcess(f,I,S,t,a,s,i,r,o,p,k);return clearTimeout(M),C}updateTitle(f,I,S){return this._proxy.updateTitle(f,I,S)}updateIcon(f,I,S,t){return this._proxy.updateIcon(f,I,S,t)}attachToProcess(f){return this._proxy.attachToProcess(f)}detachFromProcess(f,I){return this._proxy.detachFromProcess(f,I)}shutdownAll(){return this._proxy.shutdownAll()}listProcesses(){return this._proxy.listProcesses()}async getPerformanceMarks(){return this._optionalProxy?.getPerformanceMarks()??[]}async reduceConnectionGraceTime(){return this._optionalProxy?.reduceConnectionGraceTime()}start(f){return this._proxy.start(f)}shutdown(f,I){return this._proxy.shutdown(f,I)}input(f,I){return this._proxy.input(f,I)}processBinary(f,I){return this._proxy.processBinary(f,I)}resize(f,I,S){return this._proxy.resize(f,I,S)}clearBuffer(f){return this._proxy.clearBuffer(f)}acknowledgeDataEvent(f,I){return this._proxy.acknowledgeDataEvent(f,I)}setUnicodeVersion(f,I){return this._proxy.setUnicodeVersion(f,I)}getInitialCwd(f){return this._proxy.getInitialCwd(f)}getCwd(f){return this._proxy.getCwd(f)}async getLatency(){const f=new E.StopWatch,I=await this._proxy.getLatency();return f.stop(),[{label:"ptyhostservice<->ptyhost",latency:f.elapsed()},...I]}orphanQuestionReply(f){return this._proxy.orphanQuestionReply(f)}installAutoReply(f,I){return this._proxy.installAutoReply(f,I)}uninstallAllAutoReplies(){return this._proxy.uninstallAllAutoReplies()}uninstallAutoReply(f){return this._proxy.uninstallAutoReply(f)}getDefaultSystemShell(f){return this._optionalProxy?.getDefaultSystemShell(f)??(0,y.getSystemShell)(f??n.OS,process.env)}async getProfiles(f,I,S,t=!1){const a=await this._resolveShellEnv();return(0,u.detectAvailableProfiles)(I,S,t,this._configurationService,a,void 0,this._logService,this._resolveVariables.bind(this,f))}async getEnvironment(){return this.__proxy?this._proxy.getEnvironment():{...process.env}}getWslPath(f,I){return this._proxy.getWslPath(f,I)}getRevivedPtyNewId(f,I){return this._proxy.getRevivedPtyNewId(f,I)}setTerminalLayoutInfo(f){return this._proxy.setTerminalLayoutInfo(f)}async getTerminalLayoutInfo(f){return this._optionalProxy?.getTerminalLayoutInfo(f)}async requestDetachInstance(f,I){return this._proxy.requestDetachInstance(f,I)}async acceptDetachInstanceReply(f,I){return this._proxy.acceptDetachInstanceReply(f,I)}async freePortKillProcess(f){if(!this._proxy.freePortKillProcess)throw new Error("freePortKillProcess does not exist on the pty proxy");return this._proxy.freePortKillProcess(f)}async serializeTerminalState(f){return this._proxy.serializeTerminalState(f)}async reviveTerminalProcesses(f,I,S){return this._proxy.reviveTerminalProcesses(f,I,S)}async refreshProperty(f,I){return this._proxy.refreshProperty(f,I)}async updateProperty(f,I,S){return this._proxy.updateProperty(f,I,S)}async restartPtyHost(){this._disposePtyHost(),this._isResponsive=!0,this._startPtyHost()}_disposePtyHost(){this._proxy.shutdownAll(),this._connection.store.dispose()}_handleHeartbeat(f){this._clearHeartbeatTimeouts(),this._heartbeatFirstTimeout=setTimeout(()=>this._handleHeartbeatFirstTimeout(),f?g.HeartbeatConstants.ConnectingBeatInterval:g.HeartbeatConstants.BeatInterval*g.HeartbeatConstants.FirstWaitMultiplier),this._isResponsive||(this._isResponsive=!0,this._onPtyHostResponsive.fire())}_handleHeartbeatFirstTimeout(){this._logService.warn(`No ptyHost heartbeat after ${g.HeartbeatConstants.BeatInterval*g.HeartbeatConstants.FirstWaitMultiplier/1e3} seconds`),this._heartbeatFirstTimeout=void 0,this._heartbeatSecondTimeout=setTimeout(()=>this._handleHeartbeatSecondTimeout(),g.HeartbeatConstants.BeatInterval*g.HeartbeatConstants.SecondWaitMultiplier)}_handleHeartbeatSecondTimeout(){this._logService.error(`No ptyHost heartbeat after ${(g.HeartbeatConstants.BeatInterval*g.HeartbeatConstants.FirstWaitMultiplier+g.HeartbeatConstants.BeatInterval*g.HeartbeatConstants.FirstWaitMultiplier)/1e3} seconds`),this._heartbeatSecondTimeout=void 0,this._isResponsive&&(this._isResponsive=!1,this._onPtyHostUnresponsive.fire())}_handleUnresponsiveCreateProcess(){this._clearHeartbeatTimeouts(),this._logService.error(`No ptyHost response to createProcess after ${g.HeartbeatConstants.CreateProcessTimeout/1e3} seconds`),this._isResponsive&&(this._isResponsive=!1,this._onPtyHostUnresponsive.fire())}_clearHeartbeatTimeouts(){this._heartbeatFirstTimeout&&(clearTimeout(this._heartbeatFirstTimeout),this._heartbeatFirstTimeout=void 0),this._heartbeatSecondTimeout&&(clearTimeout(this._heartbeatSecondTimeout),this._heartbeatSecondTimeout=void 0)}_resolveVariables(f,I){return this._resolveVariablesRequestStore.createRequest({workspaceId:f,originalText:I})}async acceptPtyHostResolvedVariables(f,I){this._resolveVariablesRequestStore.acceptReply(f,I)}};e.PtyHostService=v,e.PtyHostService=v=be([Y(1,D.IConfigurationService),Y(2,P.ILogService),Y(3,P.ILoggerService)],v)}),define(Z[80],ee([0,1,14,3,2,4,18,6,34]),function(H,e,b,A,n,O,D,P,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ThemeMainService=e.IThemeMainService=void 0;const d="#FFFFFF",m="#1E1E1E",g="#000000",w="#FFFFFF",u="theme",y="themeBackground",E="windowSplash";e.IThemeMainService=(0,P.createDecorator)("themeMainService");let l=class extends n.Disposable{constructor(c,f){super(),this.stateService=c,this.configurationService=f,this._onDidChangeColorScheme=this._register(new A.Emitter),this.onDidChangeColorScheme=this._onDidChangeColorScheme.event,b.nativeTheme.on("updated",()=>{this._onDidChangeColorScheme.fire(this.getColorScheme())})}getColorScheme(){if(O.isWindows){if(b.nativeTheme.shouldUseHighContrastColors)return{dark:b.nativeTheme.shouldUseInvertedColorScheme,highContrast:!0}}else if(O.isMacintosh){if(b.nativeTheme.shouldUseInvertedColorScheme||b.nativeTheme.shouldUseHighContrastColors)return{dark:b.nativeTheme.shouldUseDarkColors,highContrast:!0}}else if(O.isLinux&&b.nativeTheme.shouldUseHighContrastColors)return{dark:!0,highContrast:!0};return{dark:b.nativeTheme.shouldUseDarkColors,highContrast:!1}}getBackgroundColor(){const c=this.getColorScheme();if(c.highContrast&&this.configurationService.getValue("window.autoDetectHighContrast"))return c.dark?g:w;let f=this.stateService.getItem(y,null);if(!f)switch(this.stateService.getItem(u,"vs-dark").split(" ")[0]){case"vs":f=d;break;case"hc-black":f=g;break;case"hc-light":f=w;break;default:f=m}return O.isMacintosh&&f.toUpperCase()===m&&(f="#171717"),f}saveWindowSplash(c,f){this.stateService.setItems([{key:u,data:f.baseTheme},{key:y,data:f.colorInfo.background},{key:E,data:f}]),typeof c=="number"&&this.updateBackgroundColor(c,f)}updateBackgroundColor(c,f){for(const I of b.BrowserWindow.getAllWindows())if(I.id===c){I.setBackgroundColor(f.colorInfo.background);break}}getWindowSplash(){return this.stateService.getItem(E)}};e.ThemeMainService=l,e.ThemeMainService=l=be([Y(0,h.IStateService),Y(1,D.IConfigurationService)],l)}),define(Z[128],ee([0,1,3,18,6,5]),function(H,e,b,A,n,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractTunnelService=e.DisposableTunnel=e.isPortPrivileged=e.isAllInterfaces=e.ALL_INTERFACES_ADDRESSES=e.isLocalhost=e.LOCALHOST_ADDRESSES=e.extractLocalHostUriMetaDataForPortMapping=e.ProvidedOnAutoForward=e.isTunnelProvider=e.TunnelPrivacyId=e.TunnelProtocol=e.ISharedTunnelsService=e.ITunnelService=void 0,e.ITunnelService=(0,n.createDecorator)("tunnelService"),e.ISharedTunnelsService=(0,n.createDecorator)("sharedTunnelsService");var D;(function(l){l.Http="http",l.Https="https"})(D||(e.TunnelProtocol=D={}));var P;(function(l){l.ConstantPrivate="constantPrivate",l.Private="private",l.Public="public"})(P||(e.TunnelPrivacyId=P={}));function h(l){return!!l.forwardPort}e.isTunnelProvider=h;var d;(function(l){l[l.Notify=1]="Notify",l[l.OpenBrowser=2]="OpenBrowser",l[l.OpenPreview=3]="OpenPreview",l[l.Silent=4]="Silent",l[l.Ignore=5]="Ignore",l[l.OpenBrowserOnce=6]="OpenBrowserOnce"})(d||(e.ProvidedOnAutoForward=d={}));function m(l){if(l.scheme!=="http"&&l.scheme!=="https")return;const v=/^(localhost|127\.0\.0\.1|0\.0\.0\.0):(\d+)$/.exec(l.authority);if(v)return{address:v[1],port:+v[2]}}e.extractLocalHostUriMetaDataForPortMapping=m,e.LOCALHOST_ADDRESSES=["localhost","127.0.0.1","0:0:0:0:0:0:0:1","::1"];function g(l){return e.LOCALHOST_ADDRESSES.indexOf(l)>=0}e.isLocalhost=g,e.ALL_INTERFACES_ADDRESSES=["0.0.0.0","0:0:0:0:0:0:0:0","::"];function w(l){return e.ALL_INTERFACES_ADDRESSES.indexOf(l)>=0}e.isAllInterfaces=w;function u(l,v,c,f){if(c===1)return!1;if(c===2&&w(v)){const I=/(\d+)\.(\d+)\.(\d+)/g.exec(f);if(I?.length===4&&parseInt(I[1])>=18)return!1}return l<1024}e.isPortPrivileged=u;class y{constructor(v,c,f){this.remoteAddress=v,this.localAddress=c,this._dispose=f,this._onDispose=new b.Emitter,this.onDidDispose=this._onDispose.event}dispose(){return this._onDispose.fire(),this._dispose()}}e.DisposableTunnel=y;let E=class{constructor(v,c){this.logService=v,this.configurationService=c,this._onTunnelOpened=new b.Emitter,this.onTunnelOpened=this._onTunnelOpened.event,this._onTunnelClosed=new b.Emitter,this.onTunnelClosed=this._onTunnelClosed.event,this._onAddedTunnelProvider=new b.Emitter,this.onAddedTunnelProvider=this._onAddedTunnelProvider.event,this._tunnels=new Map,this._canElevate=!1,this._privacyOptions=[],this._factoryInProgress=new Set}get hasTunnelProvider(){return!!this._tunnelProvider}get defaultTunnelHost(){const v=this.configurationService.getValue("remote.localPortHost");return!v||v==="localhost"?"127.0.0.1":"0.0.0.0"}setTunnelProvider(v){return this._tunnelProvider=v,v?(this._onAddedTunnelProvider.fire(),{dispose:()=>{this._tunnelProvider=void 0,this._canElevate=!1,this._privacyOptions=[]}}):(this._canElevate=!1,this._privacyOptions=[],this._onAddedTunnelProvider.fire(),{dispose:()=>{}})}setTunnelFeatures(v){this._canElevate=v.elevation,this._privacyOptions=v.privacyOptions}get canElevate(){return this._canElevate}get canChangePrivacy(){return this._privacyOptions.length>0}get privacyOptions(){return this._privacyOptions}get tunnels(){return this.getTunnels()}async getTunnels(){const v=[],c=Array.from(this._tunnels.values());for(const f of c){const I=Array.from(f.values());for(const S of I){const t=await S.value;t&&typeof t!="string"&&v.push(t)}}return v}async dispose(){for(const v of this._tunnels.values()){for(const{value:c}of v.values())await c.then(f=>typeof f!="string"?f?.dispose():void 0);v.clear()}this._tunnels.clear()}setEnvironmentTunnel(v,c,f,I,S){this.addTunnelToMap(v,c,Promise.resolve({tunnelRemoteHost:v,tunnelRemotePort:c,localAddress:f,privacy:I,protocol:S,dispose:()=>Promise.resolve()}))}async getExistingTunnel(v,c){(w(v)||g(v))&&(v=e.LOCALHOST_ADDRESSES[0]);const f=this.getTunnelFromMap(v,c);if(f)return++f.refcount,f.value}openTunnel(v,c,f,I,S,t=!1,a,s){this.logService.trace(`ForwardedPorts: (TunnelService) openTunnel request for ${c}:${f} on local port ${S}.`);const i=this._tunnelProvider??v;if(!i)return;if(c||(c="localhost"),I||(I=this.defaultTunnelHost),this._tunnelProvider&&this._factoryInProgress.has(f)){this.logService.debug("ForwardedPorts: (TunnelService) Another call to create a tunnel with the same address has occurred before the last one completed. This call will be ignored.");return}const r=this.retainOrCreateTunnel(i,c,f,I,S,t,a,s);return r?r.then(o=>{if(o){if(typeof o=="string")return this.logService.trace("ForwardedPorts: (TunnelService) The tunnel provider returned an error when creating the tunnel."),this.removeEmptyOrErrorTunnelFromMap(c,f),o}else{this.logService.trace("ForwardedPorts: (TunnelService) New tunnel is undefined."),this.removeEmptyOrErrorTunnelFromMap(c,f);return}this.logService.trace("ForwardedPorts: (TunnelService) New tunnel established.");const p=this.makeTunnel(o);return(o.tunnelRemoteHost!==c||o.tunnelRemotePort!==f)&&this.logService.warn("ForwardedPorts: (TunnelService) Created tunnel does not match requirements of requested tunnel. Host or port mismatch."),a&&o.privacy!==a&&this.logService.warn("ForwardedPorts: (TunnelService) Created tunnel does not match requirements of requested tunnel. Privacy mismatch."),this._onTunnelOpened.fire(p),p}):(this.logService.trace("ForwardedPorts: (TunnelService) Tunnel was not created."),r)}makeTunnel(v){return{tunnelRemotePort:v.tunnelRemotePort,tunnelRemoteHost:v.tunnelRemoteHost,tunnelLocalPort:v.tunnelLocalPort,localAddress:v.localAddress,privacy:v.privacy,protocol:v.protocol,dispose:async()=>{this.logService.trace(`ForwardedPorts: (TunnelService) dispose request for ${v.tunnelRemoteHost}:${v.tunnelRemotePort} `);const c=this._tunnels.get(v.tunnelRemoteHost);if(c){const f=c.get(v.tunnelRemotePort);f&&(f.refcount--,await this.tryDisposeTunnel(v.tunnelRemoteHost,v.tunnelRemotePort,f))}}}}async tryDisposeTunnel(v,c,f){if(f.refcount<=0){this.logService.trace(`ForwardedPorts: (TunnelService) Tunnel is being disposed ${v}:${c}.`);const I=f.value.then(async S=>{S&&typeof S!="string"&&(await S.dispose(!0),this._onTunnelClosed.fire({host:S.tunnelRemoteHost,port:S.tunnelRemotePort}))});return this._tunnels.has(v)&&this._tunnels.get(v).delete(c),I}}async closeTunnel(v,c){this.logService.trace(`ForwardedPorts: (TunnelService) close request for ${v}:${c} `);const f=this._tunnels.get(v);if(f&&f.has(c)){const I=f.get(c);I.refcount=0,await this.tryDisposeTunnel(v,c,I)}}addTunnelToMap(v,c,f){this._tunnels.has(v)||this._tunnels.set(v,new Map),this._tunnels.get(v).set(c,{refcount:1,value:f})}async removeEmptyOrErrorTunnelFromMap(v,c){const f=this._tunnels.get(v);if(f){const I=f.get(c),S=I?await I.value:void 0;(!S||typeof S=="string")&&f.delete(c),f.size===0&&this._tunnels.delete(v)}}getTunnelFromMap(v,c){const f=[v];g(v)?(f.push(...e.LOCALHOST_ADDRESSES),f.push(...e.ALL_INTERFACES_ADDRESSES)):w(v)&&f.push(...e.ALL_INTERFACES_ADDRESSES);const I=f.map(S=>this._tunnels.get(S));for(const S of I){const t=S?.get(c);if(t)return t}}canTunnel(v){return!!m(v)}createWithProvider(v,c,f,I,S,t,a){this.logService.trace(`ForwardedPorts: (TunnelService) Creating tunnel with provider ${c}:${f} on local port ${I}.`);const s=f;this._factoryInProgress.add(s);const i=I===void 0?f:I,r={elevationRequired:S?this.isPortPrivileged(i):!1},o={remoteAddress:{host:c,port:f},localAddressPort:I,privacy:t,public:t?t!==P.Private:void 0,protocol:a},p=v.forwardPort(o,r);return p?(this.addTunnelToMap(c,f,p),p.finally(()=>{this.logService.trace("ForwardedPorts: (TunnelService) Tunnel created by provider."),this._factoryInProgress.delete(s)})):this._factoryInProgress.delete(s),p}};e.AbstractTunnelService=E,e.AbstractTunnelService=E=be([Y(0,O.ILogService),Y(1,A.IConfigurationService)],E)}),define(Z[48],ee([0,1,6]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IUpdateService=e.State=e.DisablementReason=e.UpdateType=e.StateType=void 0;var A;(function(D){D.Uninitialized="uninitialized",D.Idle="idle",D.Disabled="disabled",D.CheckingForUpdates="checking for updates",D.AvailableForDownload="available for download",D.Downloading="downloading",D.Downloaded="downloaded",D.Updating="updating",D.Ready="ready"})(A||(e.StateType=A={}));var n;(function(D){D[D.Setup=0]="Setup",D[D.Archive=1]="Archive",D[D.Snap=2]="Snap"})(n||(e.UpdateType=n={}));var O;(function(D){D[D.NotBuilt=0]="NotBuilt",D[D.DisabledByEnvironment=1]="DisabledByEnvironment",D[D.ManuallyDisabled=2]="ManuallyDisabled",D[D.MissingConfiguration=3]="MissingConfiguration",D[D.InvalidConfiguration=4]="InvalidConfiguration",D[D.RunningAsAdmin=5]="RunningAsAdmin"})(O||(e.DisablementReason=O={})),e.State={Uninitialized:{type:"uninitialized"},Disabled:D=>({type:"disabled",reason:D}),Idle:(D,P)=>({type:"idle",updateType:D,error:P}),CheckingForUpdates:D=>({type:"checking for updates",explicit:D}),AvailableForDownload:D=>({type:"available for download",update:D}),Downloading:D=>({type:"downloading",update:D}),Downloaded:D=>({type:"downloaded",update:D}),Updating:D=>({type:"updating",update:D}),Ready:D=>({type:"ready",update:D})},e.IUpdateService=(0,b.createDecorator)("updateService")}),define(Z[265],ee([0,1,4,188,59,43,89]),function(H,e,b,A,n,O,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),O.Registry.as(n.Extensions.Configuration).registerConfiguration({id:"update",order:15,title:(0,A.localize)(0,null),type:"object",properties:{"update.mode":{type:"string",enum:["none","manual","start","default"],default:"default",scope:1,description:(0,A.localize)(1,null),tags:["usesOnlineServices"],enumDescriptions:[(0,A.localize)(2,null),(0,A.localize)(3,null),(0,A.localize)(4,null),D.updateConfigContributionDefault],policy:{name:"UpdateMode",minimumVersion:"1.67"}},"update.channel":{type:"string",default:"default",scope:1,description:(0,A.localize)(5,null),deprecationMessage:(0,A.localize)(6,null,"update.mode")},"update.enableWindowsBackgroundUpdates":{type:"boolean",default:!0,scope:1,title:(0,A.localize)(7,null),description:D.updateConfigContributionEnableWindowsBackgroundUpdates,included:b.isWindows&&!b.isWeb},"update.showReleaseNotes":{type:"boolean",default:!0,scope:1,description:D.updateConfigContributionShowReleaseNotes,tags:["usesOnlineServices"]}}})}),define(Z[266],ee([0,1,3,48]),function(H,e,b,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UpdateChannelClient=e.UpdateChannel=void 0;class n{constructor(P){this.service=P}listen(P,h){switch(h){case"onStateChange":return this.service.onStateChange}throw new Error(`Event not found: ${h}`)}call(P,h,d){switch(h){case"checkForUpdates":return this.service.checkForUpdates(d);case"downloadUpdate":return this.service.downloadUpdate();case"applyUpdate":return this.service.applyUpdate();case"quitAndInstall":return this.service.quitAndInstall();case"_getInitialState":return Promise.resolve(this.service.state);case"isLatestVersion":return this.service.isLatestVersion();case"_applySpecificUpdate":return this.service._applySpecificUpdate(d)}throw new Error(`Call not found: ${h}`)}}e.UpdateChannel=n;class O{get state(){return this._state}set state(P){this._state=P,this._onStateChange.fire(P)}constructor(P){this.channel=P,this._onStateChange=new b.Emitter,this.onStateChange=this._onStateChange.event,this._state=A.State.Uninitialized,this.channel.listen("onStateChange")(h=>this.state=h),this.channel.call("_getInitialState").then(h=>this.state=h)}checkForUpdates(P){return this.channel.call("checkForUpdates",P)}downloadUpdate(){return this.channel.call("downloadUpdate")}applyUpdate(){return this.channel.call("applyUpdate")}quitAndInstall(){return this.channel.call("quitAndInstall")}isLatestVersion(){return this.channel.call("isLatestVersion")}_applySpecificUpdate(P){return this.channel.call("_applySpecificUpdate",P)}}e.UpdateChannelClient=O}),define(Z[40],ee([0,1,6]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IUriIdentityService=void 0,e.IUriIdentityService=(0,b.createDecorator)("IUriIdentityService")}),define(Z[267],ee([0,1,40,207,16,19,140,3,2]),function(H,e,b,A,n,O,D,P,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UriIdentityService=void 0;class d{static{this._clock=0}constructor(w){this.uri=w,this.time=d._clock++}touch(){return this.time=d._clock++,this}}let m=class{constructor(w){this._fileService=w,this._dispooables=new h.DisposableStore,this._limit=2**16;const u=new Map,y=E=>{let l=u.get(E.scheme);return l===void 0&&(l=w.hasProvider(E)&&!this._fileService.hasCapability(E,1024),u.set(E.scheme,l)),l};this._dispooables.add(P.Event.any(w.onDidChangeFileSystemProviderRegistrations,w.onDidChangeFileSystemProviderCapabilities)(E=>{u.delete(E.scheme)})),this.extUri=new O.ExtUri(y),this._canonicalUris=new D.SkipList((E,l)=>this.extUri.compare(E,l,!0),this._limit)}dispose(){this._dispooables.dispose(),this._canonicalUris.clear()}asCanonicalUri(w){this._fileService.hasProvider(w)&&(w=(0,O.normalizePath)(w));const u=this._canonicalUris.get(w);return u?u.touch().uri.with({fragment:w.fragment}):(this._canonicalUris.set(w,new d(w)),this._checkTrim(),w)}_checkTrim(){if(this._canonicalUris.size<this._limit)return;const w=[...this._canonicalUris.entries()].sort((y,E)=>y[1].time<E[1].time?1:y[1].time>E[1].time?-1:0);d._clock=0,this._canonicalUris.clear();const u=this._limit*.5;for(let y=0;y<u;y++)this._canonicalUris.set(w[y][0],w[y][1].touch())}};e.UriIdentityService=m,e.UriIdentityService=m=be([Y(0,n.IFileService)],m),(0,A.registerSingleton)(b.IUriIdentityService,m,1)}),define(Z[129],ee([0,1,6]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IURLService=void 0,e.IURLService=(0,b.createDecorator)("urlService")}),define(Z[268],ee([0,1,7]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.URLHandlerRouter=e.URLHandlerChannelClient=e.URLHandlerChannel=void 0;class A{constructor(P){this.handler=P}listen(P,h){throw new Error(`Event not found: ${h}`)}call(P,h,d){switch(h){case"handleURL":return this.handler.handleURL(b.URI.revive(d[0]),d[1])}throw new Error(`Call not found: ${h}`)}}e.URLHandlerChannel=A;class n{constructor(P){this.channel=P}handleURL(P,h){return this.channel.call("handleURL",[P.toJSON(),h])}}e.URLHandlerChannelClient=n;class O{constructor(P,h){this.next=P,this.logService=h}async routeCall(P,h,d,m){if(h!=="handleURL")throw new Error(`Call not found: ${h}`);if(Array.isArray(d)&&d.length>0){const g=b.URI.revive(d[0]);if(this.logService.trace("URLHandlerRouter#routeCall() with URI argument",g.toString(!0)),g.query){const w=/\bwindowId=(\d+)/.exec(g.query);if(w){const u=w[1];this.logService.trace(`URLHandlerRouter#routeCall(): found windowId query parameter with value "${u}"`,g.toString(!0));const y=new RegExp(`window:${u}`),E=P.connections.find(l=>(this.logService.trace("URLHandlerRouter#routeCall(): testing connection",l.ctx),y.test(l.ctx)));if(E)return this.logService.trace("URLHandlerRouter#routeCall(): found a connection to route",g.toString(!0)),E;this.logService.trace("URLHandlerRouter#routeCall(): did not find a connection to route",g.toString(!0))}else this.logService.trace("URLHandlerRouter#routeCall(): did not find windowId query parameter",g.toString(!0))}}else this.logService.trace("URLHandlerRouter#routeCall() without URI argument");return this.next.routeCall(P,h,d,m)}routeEvent(P,h){throw new Error(`Event not found: ${h}`)}}e.URLHandlerRouter=O}),define(Z[269],ee([0,1,8,2,7,22]),function(H,e,b,A,n,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeURLService=e.AbstractURLService=void 0;class D extends A.Disposable{constructor(){super(...arguments),this.handlers=new Set}open(d,m){const g=[...this.handlers.values()];return(0,b.first)(g.map(w=>()=>w.handleURL(d,m)),void 0,!1).then(w=>w||!1)}registerHandler(d){return this.handlers.add(d),(0,A.toDisposable)(()=>this.handlers.delete(d))}}e.AbstractURLService=D;let P=class extends D{constructor(d){super(),this.productService=d}create(d){let{authority:m,path:g,query:w,fragment:u}=d||{authority:void 0,path:void 0,query:void 0,fragment:void 0};return m&&g&&g.indexOf("/")!==0&&(g=`/${g}`),n.URI.from({scheme:this.productService.urlProtocol,authority:m,path:g,query:w,fragment:u})}};e.NativeURLService=P,e.NativeURLService=P=be([Y(0,O.IProductService)],P)}),define(Z[270],ee([0,1,14,8,3,2,4,7]),function(H,e,b,A,n,O,D,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElectronURLListener=void 0;class h{constructor(m,g,w,u,y,E){if(this.urlService=g,this.logService=E,this.uris=[],this.retryCount=0,this.flushDisposable=O.Disposable.None,this.disposables=new O.DisposableStore,m&&(E.trace("ElectronURLListener initialUrisToHandle:",m.map(c=>c.originalUrl)),this.uris=m),D.isWindows){const c=u.isBuilt?[]:[`"${u.appRoot}"`];c.push("--open-url","--"),b.app.setAsDefaultProtocolClient(y.urlProtocol,process.execPath,c)}const l=n.Event.map(n.Event.fromNodeEventEmitter(b.app,"open-url",(c,f)=>({event:c,url:f})),({event:c,url:f})=>(c.preventDefault(),f));this.disposables.add(l(c=>{const f=this.uriFromRawUrl(c);f&&this.urlService.open(f,{originalUrl:c})})),w.getWindows().filter(c=>c.isReady).length>0?(E.trace("ElectronURLListener: window is ready to handle URLs"),this.flush()):(E.trace("ElectronURLListener: waiting for window to be ready to handle URLs..."),n.Event.once(w.onDidSignalReadyWindow)(this.flush,this,this.disposables))}uriFromRawUrl(m){try{return P.URI.parse(m)}catch{return}}async flush(){if(this.retryCount++>10){this.logService.trace("ElectronURLListener#flush(): giving up after 10 retries");return}this.logService.trace("ElectronURLListener#flush(): flushing URLs");const m=[];for(const g of this.uris)await this.urlService.open(g.uri,{originalUrl:g.originalUrl})?this.logService.trace("ElectronURLListener#flush(): URL was handled",g.originalUrl):(this.logService.trace("ElectronURLListener#flush(): URL was not yet handled",g.originalUrl),m.push(g));m.length!==0&&(this.uris=m,this.flushDisposable=(0,A.disposableTimeout)(()=>this.flush(),500))}dispose(){this.disposables.dispose(),this.flushDisposable.dispose()}}e.ElectronURLListener=h}),define(Z[271],ee([0,1,3,2,16,56,58,17]),function(H,e,b,A,n,O,D,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileUserDataProvider=void 0;class h extends A.Disposable{get capabilities(){return this.fileSystemProvider.capabilities&-5}constructor(m,g,w,u){super(),this.fileSystemScheme=m,this.fileSystemProvider=g,this.userDataScheme=w,this.logService=u,this.onDidChangeCapabilities=this.fileSystemProvider.onDidChangeCapabilities,this._onDidChangeFile=this._register(new b.Emitter),this.onDidChangeFile=this._onDidChangeFile.event,this.watchResources=D.TernarySearchTree.forUris(()=>!(this.capabilities&1024)),this._register(this.fileSystemProvider.onDidChangeFile(y=>this.handleFileChanges(y)))}watch(m,g){this.watchResources.set(m,m);const w=this.fileSystemProvider.watch(this.toFileSystemResource(m),g);return(0,A.toDisposable)(()=>{this.watchResources.delete(m),w.dispose()})}stat(m){return this.fileSystemProvider.stat(this.toFileSystemResource(m))}mkdir(m){return this.fileSystemProvider.mkdir(this.toFileSystemResource(m))}rename(m,g,w){return this.fileSystemProvider.rename(this.toFileSystemResource(m),this.toFileSystemResource(g),w)}readFile(m){return this.fileSystemProvider.readFile(this.toFileSystemResource(m),{atomic:!0})}readFileStream(m,g,w){const u=(0,O.newWriteableStream)(y=>P.VSBuffer.concat(y.map(E=>P.VSBuffer.wrap(E))).buffer);return(async()=>{try{const y=await this.readFile(m);u.end(y)}catch(y){u.error(y),u.end()}})(),u}readdir(m){return this.fileSystemProvider.readdir(this.toFileSystemResource(m))}writeFile(m,g,w){return this.fileSystemProvider.writeFile(this.toFileSystemResource(m),g,w)}delete(m,g){return this.fileSystemProvider.delete(this.toFileSystemResource(m),g)}copy(m,g,w){if((0,n.hasFileFolderCopyCapability)(this.fileSystemProvider))return this.fileSystemProvider.copy(this.toFileSystemResource(m),this.toFileSystemResource(g),w);throw new Error("copy not supported")}handleFileChanges(m){const g=[];for(const w of m){if(w.resource.scheme!==this.fileSystemScheme)continue;const u=this.toUserDataResource(w.resource);this.watchResources.findSubstr(u)&&g.push({resource:u,type:w.type})}g.length&&(this.logService.debug("User data changed"),this._onDidChangeFile.fire(g))}toFileSystemResource(m){return m.with({scheme:this.fileSystemScheme})}toUserDataResource(m){return m.with({scheme:this.userDataScheme})}}e.FileUserDataProvider=h}),define(Z[272],ee([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ipcUtilityProcessWorkerChannelName=void 0,e.ipcUtilityProcessWorkerChannelName="utilityProcessWorker"}),define(Z[273],ee([0,1,6]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IWebviewManagerService=void 0,e.IWebviewManagerService=(0,b.createDecorator)("webviewManagerService")}),define(Z[274],ee([0,1,14,2,15,7]),function(H,e,b,A,n,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewProtocolProvider=void 0;class D extends A.Disposable{static{this.validWebviewFilePaths=new Map([["/index.html","index.html"],["/fake.html","fake.html"],["/service-worker.js","service-worker.js"]])}constructor(){super();const h=this.handleWebviewRequest.bind(this);b.protocol.registerFileProtocol(n.Schemas.vscodeWebview,h)}handleWebviewRequest(h,d){try{const m=O.URI.parse(h.url),g=D.validWebviewFilePaths.get(m.path);if(typeof g=="string"){const w=`vs/workbench/contrib/webview/browser/pre/${g}`,u=n.FileAccess.asFileUri(w);return d({path:u.fsPath,headers:{...n.COI.getHeadersFromQuery(h.url),"Cross-Origin-Resource-Policy":"cross-origin"}})}else return d({error:-10})}catch{}return d({error:-2})}}e.WebviewProtocolProvider=D}),define(Z[81],ee([0,1,4]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.zoomLevelToZoomFactor=e.useWindowControlsOverlay=e.getTitleBarStyle=e.getMenuBarVisibility=e.isFileToOpen=e.isFolderToOpen=e.isWorkspaceToOpen=e.WindowMinimumSize=void 0,e.WindowMinimumSize={WIDTH:400,WIDTH_WITH_VERTICAL_PANEL:600,HEIGHT:270};function A(m){return!!m.workspaceUri}e.isWorkspaceToOpen=A;function n(m){return!!m.folderUri}e.isFolderToOpen=n;function O(m){return!!m.fileUri}e.isFileToOpen=O;function D(m){const g=P(m),w=m.getValue("window.menuBarVisibility");return w==="default"||g==="native"&&w==="compact"||b.isMacintosh&&b.isNative?"classic":w}e.getMenuBarVisibility=D;function P(m){if(b.isWeb)return"custom";const g=m.getValue("window");if(g){if(b.isMacintosh&&g.nativeTabs===!0||b.isMacintosh&&g.nativeFullScreen===!1)return"native";const y=g.titleBarStyle;if(y==="native"||y==="custom")return y}return b.isLinux?"native":"custom"}e.getTitleBarStyle=P;function h(m){return!(!b.isWindows||b.isWeb||P(m)==="native")}e.useWindowControlsOverlay=h;function d(m=0){return Math.pow(1.2,m)}e.zoomLevelToZoomFactor=d}),define(Z[130],ee([0,1]),function(H,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WindowError=e.WindowMode=e.defaultWindowState=e.UnloadReason=e.LoadReason=void 0;var b;(function(P){P[P.INITIAL=1]="INITIAL",P[P.LOAD=2]="LOAD",P[P.RELOAD=3]="RELOAD"})(b||(e.LoadReason=b={}));var A;(function(P){P[P.CLOSE=1]="CLOSE",P[P.QUIT=2]="QUIT",P[P.RELOAD=3]="RELOAD",P[P.LOAD=4]="LOAD"})(A||(e.UnloadReason=A={}));const n=function(P=1){return{width:1024,height:768,mode:P}};e.defaultWindowState=n;var O;(function(P){P[P.Maximized=0]="Maximized",P[P.Normal=1]="Normal",P[P.Minimized=2]="Minimized",P[P.Fullscreen=3]="Fullscreen"})(O||(e.WindowMode=O={}));var D;(function(P){P[P.UNRESPONSIVE=1]="UNRESPONSIVE",P[P.PROCESS_GONE=2]="PROCESS_GONE",P[P.LOAD=3]="LOAD"})(D||(e.WindowError=D={}))}),define(Z[29],ee([0,1,6]),function(H,e,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenContext=e.IWindowsMainService=void 0,e.IWindowsMainService=(0,b.createDecorator)("windowsMainService");var A;(function(n){n[n.CLI=0]="CLI",n[n.DOCK=1]="DOCK",n[n.MENU=2]="MENU",n[n.DIALOG=3]="DIALOG",n[n.DESKTOP=4]="DESKTOP",n[n.API=5]="API"})(A||(e.OpenContext=A={}))}),define(Z[275],ee([0,1,77,5,33,22,29,219]),function(H,e,b,A,n,O,D,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CredentialsNativeMainService=void 0;let h=class extends P.BaseCredentialsMainService{constructor(m,g,w,u){super(m),this.environmentMainService=g,this.productService=w,this.windowsMainService=u,this.surfaceKeytarLoadError=y=>{this.windowsMainService.sendToFocused("vscode:showCredentialsError",y.message??y)}}async getSecretStoragePrefix(){return Promise.resolve(this.productService.urlProtocol)}async withKeytar(){if(this._keytarCache)return this._keytarCache;if(this.environmentMainService.disableKeytar)return this.logService.info("Keytar is disabled. Using in-memory credential store instead."),this._keytarCache=new b.InMemoryCredentialsProvider,this._keytarCache;const m=await new Promise((g,w)=>{H(["keytar"],g,w)});return await m.findCredentials("test-keytar-loads"),this._keytarCache=m,this._keytarCache}};e.CredentialsNativeMainService=h,e.CredentialsNativeMainService=h=be([Y(0,A.ILogService),Y(1,n.INativeEnvironmentService),Y(2,O.IProductService),Y(3,D.IWindowsMainService)],h)}),define(Z[276],ee([0,1,14,24,4,7,21,18,63,6,5,129,29]),function(H,e,b,A,n,O,D,P,h,d,m,g,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LaunchMainService=e.ILaunchMainService=e.ID=void 0,e.ID="launchMainService",e.ILaunchMainService=(0,d.createDecorator)(e.ID);let u=class{constructor(E,l,v,c){this.logService=E,this.windowsMainService=l,this.urlService=v,this.configurationService=c}async start(E,l){this.logService.trace("Received data from other instance: ",E,l),n.isMacintosh&&b.app.focus({steal:!0});const v=this.parseOpenUrl(E);if(v.length){let c=Promise.resolve();if(this.windowsMainService.getWindowCount()===0){const f=(0,A.firstOrDefault)(await this.windowsMainService.openEmptyWindow({context:4}));f&&(c=f.ready())}c.then(()=>{for(const{uri:f,originalUrl:I}of v)this.urlService.open(f,{originalUrl:I})})}else return this.startOpenWindow(E,l)}parseOpenUrl(E){return E["open-url"]&&E._urls&&E._urls.length>0?(0,A.coalesce)(E._urls.map(l=>{try{return{uri:O.URI.parse(l),originalUrl:l}}catch{return null}})):[]}async startOpenWindow(E,l){const v=(0,h.isLaunchedFromCli)(l)?0:4;let c=[];const f=E.wait&&E.waitMarkerFilePath?O.URI.file(E.waitMarkerFilePath):void 0,I=E.remote||void 0,S={context:v,cli:E,userEnv:l,waitMarkerFileURI:f,remoteAuthority:I,forceProfile:E.profile,forceTempProfile:E["profile-temp"]};if(E.extensionDevelopmentPath)await this.windowsMainService.openExtensionDevelopmentHostWindow(E.extensionDevelopmentPath,S);else if(!E._.length&&!E["folder-uri"]&&!E["file-uri"]){let t=!1;if(E["new-window"]||E["unity-launch"]||S.forceProfile||S.forceTempProfile)t=!0;else if(E["reuse-window"])t=!1;else switch(this.configurationService.getValue("window")?.openWithoutArgumentsInNewWindow||"default"){case"on":t=!0;break;case"off":t=!1;break;default:t=!n.isMacintosh}if(t)c=await this.windowsMainService.open({...S,forceNewWindow:!0,forceEmpty:!0});else{const a=this.windowsMainService.getLastActiveWindow();a?(this.windowsMainService.openExistingWindow(a,S),c=[a]):c=await this.windowsMainService.open({...S,forceEmpty:!0})}}else c=await this.windowsMainService.open({...S,forceNewWindow:E["new-window"],preferNewWindow:!E["reuse-window"]&&!E.wait,forceReuseWindow:E["reuse-window"],diffMode:E.diff,mergeMode:E.merge,addMode:E.add,noRecentEntry:!!E["skip-add-to-recently-opened"],gotoLineMode:E.goto});if(E["reuse-window"]&&c.length>0&&c[0]){let t=c[0];c[0].ready().then(()=>t.send("ads:processCommandLine",E))}if(f&&c.length===1&&c[0])return Promise.race([c[0].whenClosedOrLoaded,(0,D.whenDeleted)(f.fsPath)]).then(()=>{},()=>{})}async getMainProcessId(){return this.logService.trace("Received request for process ID from other instance."),process.pid}};e.LaunchMainService=u,e.LaunchMainService=u=be([Y(0,m.ILogService),Y(1,w.IWindowsMainService),Y(2,g.IURLService),Y(3,P.IConfigurationService)],u)}),define(Z[277],ee([0,1,14,3,2,274,29]),function(H,e,b,A,n,O,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewMainService=void 0;let P=class extends n.Disposable{constructor(d){super(),this.windowsMainService=d,this._onFoundInFrame=this._register(new A.Emitter),this.onFoundInFrame=this._onFoundInFrame.event,this._register(new O.WebviewProtocolProvider)}async setIgnoreMenuShortcuts(d,m){let g;if(typeof d.windowId=="number"){const{windowId:w}=d,u=this.windowsMainService.getWindowById(w);if(!u?.win)throw new Error(`Invalid windowId: ${w}`);g=u.win.webContents}else{const{webContentsId:w}=d;if(g=b.webContents.fromId(w),!g)throw new Error(`Invalid webContentsId: ${w}`)}g.isDestroyed()||g.setIgnoreMenuShortcuts(m)}async findInFrame(d,m,g,w){const y=this.getFrameByName(d,m);if(typeof y.findInFrame=="function"){y.findInFrame(g,{findNext:w.findNext,forward:w.forward});const E=(l,v)=>{v.finalUpdate&&(this._onFoundInFrame.fire(v),y.removeListener("found-in-frame",E))};y.on("found-in-frame",E)}}async stopFindInFrame(d,m,g){const u=this.getFrameByName(d,m);typeof u.stopFindInFrame=="function"&&u.stopFindInFrame(g.keepSelection?"keepSelection":"clearSelection")}getFrameByName(d,m){const g=this.windowsMainService.getWindowById(d.windowId);if(!g?.win)throw new Error(`Invalid windowId: ${d}`);const w=g.win.webContents.mainFrame.framesInSubtree.find(u=>u.name===m);if(!w)throw new Error(`Unknown frame: ${m}`);return w}};e.WebviewMainService=P,e.WebviewMainService=P=be([Y(0,D.IWindowsMainService)],P)}),define(Z[278],ee([0,1,8,3,2]),function(H,e,b,A,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActiveWindowManager=void 0;class O extends n.Disposable{constructor({onDidOpenWindow:P,onDidFocusWindow:h,getActiveWindowId:d}){super(),this.disposables=this._register(new n.DisposableStore),A.Event.latch(A.Event.any(P,h))(this.setActiveWindow,this,this.disposables),this.firstActiveWindowIdPromise=(0,b.createCancelablePromise)(()=>d()),(async()=>{try{const g=await this.firstActiveWindowIdPromise;this.activeWindowId=typeof this.activeWindowId=="number"?this.activeWindowId:g}catch{}finally{this.firstActiveWindowIdPromise=void 0}})()}setActiveWindow(P){this.firstActiveWindowIdPromise&&(this.firstActiveWindowIdPromise.cancel(),this.firstActiveWindowIdPromise=void 0),this.activeWindowId=P}async getActiveClientId(){return`window:${this.firstActiveWindowIdPromise?await this.firstActiveWindowIdPromise:this.activeWindowId}`}}e.ActiveWindowManager=O}),define(Z[30],ee([0,1,192,10,58,19,7,6,15]),function(H,e,b,A,n,O,D,P,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasWorkspaceFileExtension=e.isSavedWorkspace=e.isStandaloneEditorWorkspace=e.STANDALONE_EDITOR_WORKSPACE_ID=e.isTemporaryWorkspace=e.isUntitledWorkspace=e.UNTITLED_WORKSPACE_NAME=e.WORKSPACE_FILTER=e.WORKSPACE_SUFFIX=e.WORKSPACE_EXTENSION=e.toWorkspaceFolder=e.WorkspaceFolder=e.Workspace=e.isWorkspaceFolder=e.isWorkspace=e.WorkbenchState=e.reviveIdentifier=e.isWorkspaceIdentifier=e.toWorkspaceIdentifier=e.UNKNOWN_EMPTY_WINDOW_WORKSPACE=e.EXTENSION_DEVELOPMENT_EMPTY_WINDOW_WORKSPACE=e.isEmptyWorkspaceIdentifier=e.isSingleFolderWorkspaceIdentifier=e.IWorkspaceContextService=void 0,e.IWorkspaceContextService=(0,P.createDecorator)("contextService");function d(i){const r=i;return typeof r?.id=="string"&&D.URI.isUri(r.uri)}e.isSingleFolderWorkspaceIdentifier=d;function m(i){return typeof i?.id=="string"&&!d(i)&&!w(i)}e.isEmptyWorkspaceIdentifier=m,e.EXTENSION_DEVELOPMENT_EMPTY_WINDOW_WORKSPACE={id:"ext-dev"},e.UNKNOWN_EMPTY_WINDOW_WORKSPACE={id:"empty-window"};function g(i,r){if(typeof i=="string"||typeof i>"u")return typeof i=="string"?{id:(0,A.basename)(i)}:r?e.EXTENSION_DEVELOPMENT_EMPTY_WINDOW_WORKSPACE:e.UNKNOWN_EMPTY_WINDOW_WORKSPACE;const o=i;return o.configuration?{id:o.id,configPath:o.configuration}:o.folders.length===1?{id:o.id,uri:o.folders[0].uri}:{id:o.id}}e.toWorkspaceIdentifier=g;function w(i){const r=i;return typeof r?.id=="string"&&D.URI.isUri(r.configPath)}e.isWorkspaceIdentifier=w;function u(i){const r=i;if(r?.uri)return{id:r.id,uri:D.URI.revive(r.uri)};const o=i;if(o?.configPath)return{id:o.id,configPath:D.URI.revive(o.configPath)};if(i?.id)return{id:i.id}}e.reviveIdentifier=u;var y;(function(i){i[i.EMPTY=1]="EMPTY",i[i.FOLDER=2]="FOLDER",i[i.WORKSPACE=3]="WORKSPACE"})(y||(e.WorkbenchState=y={}));function E(i){const r=i;return!!(r&&typeof r=="object"&&typeof r.id=="string"&&Array.isArray(r.folders))}e.isWorkspace=E;function l(i){const r=i;return!!(r&&typeof r=="object"&&D.URI.isUri(r.uri)&&typeof r.name=="string"&&typeof r.toResource=="function")}e.isWorkspaceFolder=l;class v{constructor(r,o,p,k,M){this._id=r,this._transient=p,this._configuration=k,this._ignorePathCasing=M,this._foldersMap=n.TernarySearchTree.forUris(this._ignorePathCasing,()=>!0),this.folders=o}update(r){this._id=r.id,this._configuration=r.configuration,this._transient=r.transient,this._ignorePathCasing=r._ignorePathCasing,this.folders=r.folders}get folders(){return this._folders}set folders(r){this._folders=r,this.updateFoldersMap()}get id(){return this._id}get transient(){return this._transient}get configuration(){return this._configuration}set configuration(r){this._configuration=r}getFolder(r){return r&&this._foldersMap.findSubstr(r)||null}updateFoldersMap(){this._foldersMap=n.TernarySearchTree.forUris(this._ignorePathCasing,()=>!0);for(const r of this.folders)this._foldersMap.set(r.uri,r)}toJSON(){return{id:this.id,folders:this.folders,transient:this.transient,configuration:this.configuration}}}e.Workspace=v;class c{constructor(r,o){this.raw=o,this.uri=r.uri,this.index=r.index,this.name=r.name}toResource(r){return(0,O.joinPath)(this.uri,r)}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}e.WorkspaceFolder=c;function f(i){return new c({uri:i,index:0,name:(0,O.basenameOrAuthority)(i)},{uri:i.toString()})}e.toWorkspaceFolder=f,e.WORKSPACE_EXTENSION="code-workspace",e.WORKSPACE_SUFFIX=`.${e.WORKSPACE_EXTENSION}`,e.WORKSPACE_FILTER=[{name:(0,b.localize)(0,null),extensions:[e.WORKSPACE_EXTENSION]}],e.UNTITLED_WORKSPACE_NAME="workspace.json";function I(i,r){return O.extUriBiasedIgnorePathCase.isEqualOrParent(i,r.untitledWorkspacesHome)}e.isUntitledWorkspace=I;function S(i){let r;return D.URI.isUri(i)?r=i:r=i.configuration,r?.scheme===h.Schemas.tmp}e.isTemporaryWorkspace=S,e.STANDALONE_EDITOR_WORKSPACE_ID="4064f6ec-cb38-4ad0-af64-ee6467e63c82";function t(i){return i.id===e.STANDALONE_EDITOR_WORKSPACE_ID}e.isStandaloneEditorWorkspace=t;function a(i,r){return!I(i,r)&&!S(i)}e.isSavedWorkspace=a;function s(i){return(typeof i=="string"?(0,A.extname)(i):(0,O.extname)(i))===e.WORKSPACE_SUFFIX}e.hasWorkspaceFileExtension=s}),define(Z[61],ee([0,1,14,8,57,46,2,86,4,21,167,93,6,5,22,30]),function(H,e,b,A,n,O,D,P,h,d,m,g,w,u,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DialogMainService=e.IDialogMainService=void 0,e.IDialogMainService=(0,w.createDecorator)("dialogMainService");let l=class{constructor(c,f){this.logService=c,this.productService=f,this.windowFileDialogLocks=new Map,this.windowDialogQueues=new Map,this.noWindowDialogueQueue=new A.Queue}pickFileFolder(c,f){return this.doPick({...c,pickFolders:!0,pickFiles:!0,title:(0,m.localize)(0,null)},f)}pickFolder(c,f){return this.doPick({...c,pickFolders:!0,title:(0,m.localize)(1,null)},f)}pickFile(c,f){return this.doPick({...c,pickFiles:!0,title:(0,m.localize)(2,null)},f)}pickWorkspace(c,f){const I=(0,m.localize)(3,null),S=(0,O.mnemonicButtonLabel)((0,m.localize)(4,null)),t=E.WORKSPACE_FILTER;return this.doPick({...c,pickFiles:!0,title:I,filters:t,buttonLabel:S},f)}async doPick(c,f){const I={title:c.title,buttonLabel:c.buttonLabel,filters:c.filters,defaultPath:c.defaultPath};(typeof c.pickFiles=="boolean"||typeof c.pickFolders=="boolean")&&(I.properties=void 0,c.pickFiles&&c.pickFolders&&(I.properties=["multiSelections","openDirectory","openFile","createDirectory"])),I.properties||(I.properties=["multiSelections",c.pickFolders?"openDirectory":"openFile","createDirectory"]),h.isMacintosh&&I.properties.push("treatPackageAsDirectory");const S=await this.showOpenDialog(I,(f||b.BrowserWindow.getFocusedWindow())??void 0);if(S&&S.filePaths&&S.filePaths.length>0)return S.filePaths}getWindowDialogQueue(c){if(c){let f=this.windowDialogQueues.get(c.id);return f||(f=new A.Queue,this.windowDialogQueues.set(c.id,f)),f}else return this.noWindowDialogueQueue}showMessageBox(c,f){return this.getWindowDialogQueue(f).queue(async()=>{const{options:I,buttonIndeces:S}=(0,g.massageMessageBoxOptions)(c,this.productService);let t;return f?t=await b.dialog.showMessageBox(f,I):t=await b.dialog.showMessageBox(I),{response:S[t.response],checkboxChecked:t.checkboxChecked}})}async showSaveDialog(c,f){const I=this.acquireFileDialogLock(c,f);if(!I)return this.logService.error("[DialogMainService]: file save dialog is already or will be showing for the window with the same configuration"),{canceled:!0};try{return await this.getWindowDialogQueue(f).queue(async()=>{let S;return f?S=await b.dialog.showSaveDialog(f,c):S=await b.dialog.showSaveDialog(c),S.filePath=this.normalizePath(S.filePath),S})}finally{(0,D.dispose)(I)}}normalizePath(c){return c&&h.isMacintosh&&(c=(0,P.normalizeNFC)(c)),c}normalizePaths(c){return c.map(f=>this.normalizePath(f))}async showOpenDialog(c,f){c.defaultPath&&(await d.Promises.exists(c.defaultPath)||(c.defaultPath=void 0));const I=this.acquireFileDialogLock(c,f);if(!I)return this.logService.error("[DialogMainService]: file open dialog is already or will be showing for the window with the same configuration"),{canceled:!0,filePaths:[]};try{return await this.getWindowDialogQueue(f).queue(async()=>{let S;return f?S=await b.dialog.showOpenDialog(f,c):S=await b.dialog.showOpenDialog(c),S.filePaths=this.normalizePaths(S.filePaths),S})}finally{(0,D.dispose)(I)}}acquireFileDialogLock(c,f){if(!f)return D.Disposable.None;this.logService.trace("[DialogMainService]: request to acquire file dialog lock",c);let I=this.windowFileDialogLocks.get(f.id);I||(I=new Set,this.windowFileDialogLocks.set(f.id,I));const S=(0,n.hash)(c);if(!I.has(S))return this.logService.trace("[DialogMainService]: new file dialog lock created",c),I.add(S),(0,D.toDisposable)(()=>{this.logService.trace("[DialogMainService]: file dialog lock disposed",c),I?.delete(S),I?.size===0&&this.windowFileDialogLocks.delete(f.id)})}};e.DialogMainService=l,e.DialogMainService=l=be([Y(0,u.ILogService),Y(1,y.IProductService)],l)}),define(Z[279],ee([0,1,3,2,75,30]),function(H,e,b,A,n,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StorageDatabaseChannel=void 0;class D extends A.Disposable{static{this.STORAGE_CHANGE_DEBOUNCE_TIME=100}constructor(h,d){super(),this.logService=h,this.storageMainService=d,this.onDidChangeApplicationStorageEmitter=this._register(new b.Emitter),this.mapProfileToOnDidChangeProfileStorageEmitter=new Map,this.registerStorageChangeListeners(d.applicationStorage,this.onDidChangeApplicationStorageEmitter)}registerStorageChangeListeners(h,d){this._register(b.Event.debounce(h.onDidChangeStorage,(m,g)=>(m?m.push(g):m=[g],m),D.STORAGE_CHANGE_DEBOUNCE_TIME)(m=>{m.length&&d.fire(this.serializeStorageChangeEvents(m,h))}))}serializeStorageChangeEvents(h,d){const m=new Map,g=new Set;return h.forEach(w=>{const u=d.get(w.key);typeof u=="string"?m.set(w.key,u):g.add(w.key)}),{changed:Array.from(m.entries()),deleted:Array.from(g.values())}}listen(h,d,m){switch(d){case"onDidChangeStorage":{const g=m.profile?(0,n.revive)(m.profile):void 0;if(!g)return this.onDidChangeApplicationStorageEmitter.event;let w=this.mapProfileToOnDidChangeProfileStorageEmitter.get(g.id);return w||(w=this._register(new b.Emitter),this.registerStorageChangeListeners(this.storageMainService.profileStorage(g),w),this.mapProfileToOnDidChangeProfileStorageEmitter.set(g.id,w)),w.event}}throw new Error(`Event not found: ${d}`)}async call(h,d,m){const g=m.profile?(0,n.revive)(m.profile):void 0,w=(0,O.reviveIdentifier)(m.workspace),u=await this.withStorageInitialized(g,w);switch(d){case"getItems":return Array.from(u.items.entries());case"updateItems":{const y=m;if(y.insert)for(const[E,l]of y.insert)u.set(E,l);y.delete?.forEach(E=>u.delete(E));break}case"isUsed":{const y=m.payload;if(typeof y=="string")return this.storageMainService.isUsed(y)}default:throw new Error(`Call not found: ${d}`)}}async withStorageInitialized(h,d){let m;d?m=this.storageMainService.workspaceStorage(d):h?m=this.storageMainService.profileStorage(h):m=this.storageMainService.applicationStorage;try{await m.init()}catch(g){this.logService.error(`StorageIPC#init: Unable to init ${d?"workspace":h?"profile":"application"} storage due to ${g}`)}return m}}e.StorageDatabaseChannel=D}),define(Z[41],ee([0,1,57,3,2,19,7,189,33,16,6,5,30,35,40,8,31,26,12]),function(H,e,b,A,n,O,D,P,h,d,m,g,w,u,y,E,l,v,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryUserDataProfilesService=e.UserDataProfilesService=e.toUserDataProfile=e.reviveProfile=e.IUserDataProfilesService=e.isUserDataProfile=e.ProfileResourceType=void 0;var f;(function(i){i.Settings="settings",i.Keybindings="keybindings",i.Snippets="snippets",i.Tasks="tasks",i.Extensions="extensions",i.GlobalState="globalState"})(f||(e.ProfileResourceType=f={}));function I(i){const r=i;return!!(r&&typeof r=="object"&&typeof r.id=="string"&&typeof r.isDefault=="boolean"&&typeof r.name=="string"&&D.URI.isUri(r.location)&&D.URI.isUri(r.globalStorageHome)&&D.URI.isUri(r.settingsResource)&&D.URI.isUri(r.keybindingsResource)&&D.URI.isUri(r.tasksResource)&&D.URI.isUri(r.snippetsHome)&&D.URI.isUri(r.extensionsResource))}e.isUserDataProfile=I,e.IUserDataProfilesService=(0,m.createDecorator)("IUserDataProfilesService");function S(i,r){return{id:i.id,isDefault:i.isDefault,name:i.name,shortName:i.shortName,location:D.URI.revive(i.location).with({scheme:r}),globalStorageHome:D.URI.revive(i.globalStorageHome).with({scheme:r}),settingsResource:D.URI.revive(i.settingsResource).with({scheme:r}),keybindingsResource:D.URI.revive(i.keybindingsResource).with({scheme:r}),tasksResource:D.URI.revive(i.tasksResource).with({scheme:r}),snippetsHome:D.URI.revive(i.snippetsHome).with({scheme:r}),extensionsResource:D.URI.revive(i.extensionsResource).with({scheme:r}),cacheHome:D.URI.revive(i.cacheHome).with({scheme:r}),useDefaultFlags:i.useDefaultFlags,isTransient:i.isTransient}}e.reviveProfile=S;function t(i,r,o,p,k,M){return{id:i,name:r,location:o,isDefault:!1,shortName:k?.shortName,globalStorageHome:M&&k?.useDefaultFlags?.globalState?M.globalStorageHome:(0,O.joinPath)(o,"globalStorage"),settingsResource:M&&k?.useDefaultFlags?.settings?M.settingsResource:(0,O.joinPath)(o,"settings.json"),keybindingsResource:M&&k?.useDefaultFlags?.keybindings?M.keybindingsResource:(0,O.joinPath)(o,"keybindings.json"),tasksResource:M&&k?.useDefaultFlags?.tasks?M.tasksResource:(0,O.joinPath)(o,"tasks.json"),snippetsHome:M&&k?.useDefaultFlags?.snippets?M.snippetsHome:(0,O.joinPath)(o,"snippets"),extensionsResource:M&&k?.useDefaultFlags?.extensions?M.extensionsResource:(0,O.joinPath)(o,"extensions.json"),cacheHome:(0,O.joinPath)(p,i),useDefaultFlags:k?.useDefaultFlags,isTransient:k?.transient}}e.toUserDataProfile=t;let a=class extends n.Disposable{static{this.PROFILES_KEY="userDataProfiles"}static{this.PROFILE_ASSOCIATIONS_KEY="profileAssociations"}get defaultProfile(){return this.profiles[0]}get profiles(){return[...this.profilesObject.profiles,...this.transientProfilesObject.profiles]}constructor(r,o,p,k){super(),this.environmentService=r,this.fileService=o,this.uriIdentityService=p,this.logService=k,this.enabled=!0,this._onDidChangeProfiles=this._register(new A.Emitter),this.onDidChangeProfiles=this._onDidChangeProfiles.event,this._onWillCreateProfile=this._register(new A.Emitter),this.onWillCreateProfile=this._onWillCreateProfile.event,this._onWillRemoveProfile=this._register(new A.Emitter),this.onWillRemoveProfile=this._onWillRemoveProfile.event,this._onDidResetWorkspaces=this._register(new A.Emitter),this.onDidResetWorkspaces=this._onDidResetWorkspaces.event,this.profileCreationPromises=new Map,this.transientProfilesObject={profiles:[],workspaces:new u.ResourceMap,emptyWindows:new Map},this.profilesHome=(0,O.joinPath)(this.environmentService.userRoamingDataHome,"profiles"),this.profilesCacheHome=(0,O.joinPath)(this.environmentService.cacheHome,"CachedProfilesData")}init(){this._profilesObject=void 0}setEnablement(r){this.enabled!==r&&(this._profilesObject=void 0,this.enabled=r)}isEnabled(){return this.enabled}get profilesObject(){if(!this._profilesObject){const r=this.createDefaultProfile(),o=[r];if(this.enabled)try{for(const M of this.getStoredProfiles()){if(!M.name||!(0,c.isString)(M.name)||!M.location){this.logService.warn("Skipping the invalid stored profile",M.location||M.name);continue}o.push(t((0,O.basename)(M.location),M.name,M.location,this.profilesCacheHome,{shortName:M.shortName,useDefaultFlags:M.useDefaultFlags},r))}}catch(M){this.logService.error(M)}const p=new u.ResourceMap,k=new Map;if(o.length)try{const M=this.getStoredProfileAssociations();if(M.workspaces)for(const[C,L]of Object.entries(M.workspaces)){const T=D.URI.parse(C),F=o.find(z=>z.id===L);F&&p.set(T,F)}if(M.emptyWindows)for(const[C,L]of Object.entries(M.emptyWindows)){const T=o.find(F=>F.id===L);T&&k.set(C,T)}}catch(M){this.logService.error(M)}this._profilesObject={profiles:o,workspaces:p,emptyWindows:k}}return this._profilesObject}createDefaultProfile(){const r=t("__default__profile__",(0,P.localize)(0,null),this.environmentService.userRoamingDataHome,this.profilesCacheHome);return{...r,extensionsResource:this.getDefaultProfileExtensionsLocation()??r.extensionsResource,isDefault:!0}}async createTransientProfile(r){const o="Temp",p=new RegExp(`${(0,v.escapeRegExpCharacters)(o)}\\s(\\d+)`);let k=0;for(const C of this.profiles){const L=p.exec(C.name),T=L?parseInt(L[1]):0;k=T>k?T:k}const M=`${o} ${k+1}`;return this.createProfile((0,b.hash)((0,l.generateUuid)()).toString(16),M,{transient:!0},r)}async createNamedProfile(r,o,p){return this.createProfile((0,b.hash)((0,l.generateUuid)()).toString(16),r,o,p)}async createProfile(r,o,p,k){if(!this.enabled)throw new Error("Profiles are disabled in the current environment.");const M=await this.doCreateProfile(r,o,p);return k&&await this.setProfileForWorkspace(k,M),M}async doCreateProfile(r,o,p){if(!(0,c.isString)(o)||!o)throw new Error("Name of the profile is mandatory and must be of type `string`");let k=this.profileCreationPromises.get(o);return k||(k=(async()=>{try{const M=this.profiles.find(T=>T.name===o||T.id===r);if(M)return M;const C=t(r,o,(0,O.joinPath)(this.profilesHome,r),this.profilesCacheHome,p,this.defaultProfile);await this.fileService.createFolder(C.location);const L=[];return this._onWillCreateProfile.fire({profile:C,join(T){L.push(T)}}),await E.Promises.settled(L),this.updateProfiles([C],[],[]),C}finally{this.profileCreationPromises.delete(o)}})(),this.profileCreationPromises.set(o,k)),k}async updateProfile(r,o){if(!this.enabled)throw new Error("Profiles are disabled in the current environment.");let p=this.profiles.find(k=>k.id===r.id);if(!p)throw new Error(`Profile '${r.name}' does not exist`);return p=t(p.id,o.name??p.name,p.location,this.profilesCacheHome,{shortName:o.shortName??p.shortName,transient:o.transient??p.isTransient,useDefaultFlags:o.useDefaultFlags??p.useDefaultFlags},this.defaultProfile),this.updateProfiles([],[],[p]),p}async removeProfile(r){if(!this.enabled)throw new Error("Profiles are disabled in the current environment.");if(r.isDefault)throw new Error("Cannot remove default profile");const o=this.profiles.find(k=>k.id===r.id);if(!o)throw new Error(`Profile '${r.name}' does not exist`);const p=[];this._onWillRemoveProfile.fire({profile:o,join(k){p.push(k)}});try{await Promise.allSettled(p)}catch(k){this.logService.error(k)}for(const k of[...this.profilesObject.emptyWindows.keys()])o.id===this.profilesObject.emptyWindows.get(k)?.id&&this.profilesObject.emptyWindows.delete(k);for(const k of[...this.profilesObject.workspaces.keys()])o.id===this.profilesObject.workspaces.get(k)?.id&&this.profilesObject.workspaces.delete(k);this.updateStoredProfileAssociations(),this.updateProfiles([],[o],[]);try{await this.fileService.del(o.cacheHome,{recursive:!0})}catch(k){(0,d.toFileOperationResult)(k)!==1&&this.logService.error(k)}}async setProfileForWorkspace(r,o){if(!this.enabled)throw new Error("Profiles are disabled in the current environment.");const p=this.profiles.find(k=>k.id===o.id);if(!p)throw new Error(`Profile '${o.name}' does not exist`);this.updateWorkspaceAssociation(r,p)}unsetWorkspace(r,o){if(!this.enabled)throw new Error("Profiles are disabled in the current environment.");this.updateWorkspaceAssociation(r,void 0,o)}async resetWorkspaces(){this.transientProfilesObject.workspaces.clear(),this.transientProfilesObject.emptyWindows.clear(),this.profilesObject.workspaces.clear(),this.profilesObject.emptyWindows.clear(),this.updateStoredProfileAssociations(),this._onDidResetWorkspaces.fire()}async cleanUp(){if(this.enabled&&await this.fileService.exists(this.profilesHome)){const r=await this.fileService.resolve(this.profilesHome);await Promise.all((r.children||[]).filter(o=>o.isDirectory&&this.profiles.every(p=>!this.uriIdentityService.extUri.isEqual(p.location,o.resource))).map(o=>this.fileService.del(o.resource,{recursive:!0})))}}async cleanUpTransientProfiles(){if(!this.enabled)return;const r=this.transientProfilesObject.profiles.filter(o=>!this.isProfileAssociatedToWorkspace(o));await Promise.allSettled(r.map(o=>this.removeProfile(o)))}getProfileForWorkspace(r){const o=this.getWorkspace(r);return D.URI.isUri(o)?this.transientProfilesObject.workspaces.get(o)??this.profilesObject.workspaces.get(o):this.transientProfilesObject.emptyWindows.get(o)??this.profilesObject.emptyWindows.get(o)}getWorkspace(r){return(0,w.isSingleFolderWorkspaceIdentifier)(r)?r.uri:(0,w.isWorkspaceIdentifier)(r)?r.configPath:r.id}isProfileAssociatedToWorkspace(r){return!!([...this.transientProfilesObject.emptyWindows.values()].some(o=>this.uriIdentityService.extUri.isEqual(o.location,r.location))||[...this.transientProfilesObject.workspaces.values()].some(o=>this.uriIdentityService.extUri.isEqual(o.location,r.location))||[...this.profilesObject.emptyWindows.values()].some(o=>this.uriIdentityService.extUri.isEqual(o.location,r.location))||[...this.profilesObject.workspaces.values()].some(o=>this.uriIdentityService.extUri.isEqual(o.location,r.location)))}updateProfiles(r,o,p){const k=[...this.profiles,...r],M=[];this.transientProfilesObject.profiles=[];for(let C of k)C.isDefault||o.some(L=>C.id===L.id)||(C=p.find(L=>C.id===L.id)??C,C.isTransient?this.transientProfilesObject.profiles.push(C):M.push({location:C.location,name:C.name,shortName:C.shortName,useDefaultFlags:C.useDefaultFlags}));this.saveStoredProfiles(M),this._profilesObject=void 0,this.triggerProfilesChanges(r,o,p)}triggerProfilesChanges(r,o,p){this._onDidChangeProfiles.fire({added:r,removed:o,updated:p,all:this.profiles})}updateWorkspaceAssociation(r,o,p){p=o?.isTransient?!0:p,p||this.updateWorkspaceAssociation(r,void 0,!0);const k=this.getWorkspace(r),M=p?this.transientProfilesObject:this.profilesObject;D.URI.isUri(k)?(M.workspaces.delete(k),o&&M.workspaces.set(k,o)):(M.emptyWindows.delete(k),o&&M.emptyWindows.set(k,o)),p||this.updateStoredProfileAssociations()}updateStoredProfileAssociations(){const r={};for(const[p,k]of this.profilesObject.workspaces.entries())r[p.toString()]=k.id;const o={};for(const[p,k]of this.profilesObject.emptyWindows.entries())o[p.toString()]=k.id;this.saveStoredProfileAssociations({workspaces:r,emptyWindows:o}),this._profilesObject=void 0}migrateStoredProfileAssociations(r){const o={},p=this.createDefaultProfile();if(r.workspaces)for(const[M,C]of Object.entries(r.workspaces)){const L=D.URI.parse(C);o[M]=this.uriIdentityService.extUri.isEqual(L,p.location)?p.id:this.uriIdentityService.extUri.basename(L)}const k={};if(r.emptyWindows)for(const[M,C]of Object.entries(r.emptyWindows)){const L=D.URI.parse(C);k[M]=this.uriIdentityService.extUri.isEqual(L,p.location)?p.id:this.uriIdentityService.extUri.basename(L)}return{workspaces:o,emptyWindows:k}}getStoredProfiles(){return[]}saveStoredProfiles(r){throw new Error("not implemented")}getStoredProfileAssociations(){return{}}saveStoredProfileAssociations(r){throw new Error("not implemented")}getDefaultProfileExtensionsLocation(){}};e.UserDataProfilesService=a,e.UserDataProfilesService=a=be([Y(0,h.IEnvironmentService),Y(1,d.IFileService),Y(2,y.IUriIdentityService),Y(3,g.ILogService)],a);class s extends a{constructor(){super(...arguments),this.storedProfiles=[],this.storedProfileAssociations={}}getStoredProfiles(){return this.storedProfiles}saveStoredProfiles(r){this.storedProfiles=r}getStoredProfileAssociations(){return this.storedProfileAssociations}saveStoredProfileAssociations(r){this.storedProfileAssociations=r}}e.InMemoryUserDataProfilesService=s}),define(Z[82],ee([0,1,8,17,2,3,35,7,118,125,16,6,5,41,40,12,13,25]),function(H,e,b,A,n,O,D,P,h,d,m,g,w,u,y,E,l,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractExtensionsProfileScannerService=e.IExtensionsProfileScannerService=e.ExtensionsProfileScanningError=e.ExtensionsProfileScanningErrorCode=void 0;var c;(function(a){a.ERROR_PROFILE_NOT_FOUND="ERROR_PROFILE_NOT_FOUND",a.ERROR_INVALID_CONTENT="ERROR_INVALID_CONTENT"})(c||(e.ExtensionsProfileScanningErrorCode=c={}));class f extends Error{constructor(s,i){super(s),this.code=i}}e.ExtensionsProfileScanningError=f,e.IExtensionsProfileScannerService=(0,g.createDecorator)("IExtensionsProfileScannerService");let I=class extends n.Disposable{constructor(s,i,r,o,p,k){super(),this.extensionsLocation=s,this.fileService=i,this.userDataProfilesService=r,this.uriIdentityService=o,this.telemetryService=p,this.logService=k,this._onAddExtensions=this._register(new O.Emitter),this.onAddExtensions=this._onAddExtensions.event,this._onDidAddExtensions=this._register(new O.Emitter),this.onDidAddExtensions=this._onDidAddExtensions.event,this._onRemoveExtensions=this._register(new O.Emitter),this.onRemoveExtensions=this._onRemoveExtensions.event,this._onDidRemoveExtensions=this._register(new O.Emitter),this.onDidRemoveExtensions=this._onDidRemoveExtensions.event,this.resourcesAccessQueueMap=new D.ResourceMap}scanProfileExtensions(s,i){return this.withProfileExtensions(s,void 0,i)}async addExtensionsToProfile(s,i){const r=[],o=[];try{return await this.withProfileExtensions(i,p=>{const k=[];for(const M of p)s.some(([C])=>(0,d.areSameExtensions)(C.identifier,M.identifier)&&C.manifest.version!==M.version)?r.push(M):k.push(M);for(const[M,C]of s){const L=k.findIndex(F=>(0,d.areSameExtensions)(F.identifier,M.identifier)&&F.version===M.manifest.version),T={identifier:M.identifier,version:M.manifest.version,location:M.location,metadata:C};L===-1?(o.push(T),k.push(T)):k.splice(L,1,T)}return o.length&&this._onAddExtensions.fire({extensions:o,profileLocation:i}),r.length&&this._onRemoveExtensions.fire({extensions:r,profileLocation:i}),k}),o.length&&this._onDidAddExtensions.fire({extensions:o,profileLocation:i}),r.length&&this._onDidRemoveExtensions.fire({extensions:r,profileLocation:i}),o}catch(p){throw o.length&&this._onDidAddExtensions.fire({extensions:o,error:p,profileLocation:i}),r.length&&this._onDidRemoveExtensions.fire({extensions:r,error:p,profileLocation:i}),p}}async updateMetadata(s,i){const r=[];return await this.withProfileExtensions(i,o=>{const p=[];for(const k of o){const M=s.find(([C])=>(0,d.areSameExtensions)(C.identifier,k.identifier)&&C.manifest.version===k.version);M&&(k.metadata={...k.metadata,...M[1]},r.push(k)),p.push(k)}return p}),r}async removeExtensionFromProfile(s,i){const r=[];try{await this.withProfileExtensions(i,o=>{const p=[];for(const k of o)(0,d.areSameExtensions)(k.identifier,s.identifier)?r.push(k):p.push(k);return r.length&&this._onRemoveExtensions.fire({extensions:r,profileLocation:i}),p}),r.length&&this._onDidRemoveExtensions.fire({extensions:r,profileLocation:i})}catch(o){throw r.length&&this._onDidRemoveExtensions.fire({extensions:r,error:o,profileLocation:i}),o}}async withProfileExtensions(s,i,r){return this.getResourceAccessQueue(s).queue(async()=>{let o=[],p;try{const k=await this.fileService.readFile(s);p=JSON.parse(k.value.toString().trim()||"[]")}catch(k){if((0,m.toFileOperationResult)(k)!==1)throw k;if(this.uriIdentityService.extUri.isEqual(s,this.userDataProfilesService.defaultProfile.extensionsResource)&&(p=await this.migrateFromOldDefaultProfileExtensionsLocation()),!p&&r?.bailOutWhenFileNotFound)throw new f((0,l.getErrorMessage)(k),"ERROR_PROFILE_NOT_FOUND")}if(p){Array.isArray(p)||this.reportAndThrowInvalidConentError(s);let k=!1;for(const M of p){S(M)||this.reportAndThrowInvalidConentError(s);let C;if((0,E.isString)(M.relativeLocation)&&M.relativeLocation)C=this.resolveExtensionLocation(M.relativeLocation);else if((0,E.isString)(M.location))C=this.resolveExtensionLocation(M.location),k=!0,M.relativeLocation=M.location,M.location=C.toJSON();else{C=P.URI.revive(M.location);const L=this.toRelativePath(C);L&&(k=!0,M.relativeLocation=L)}o.push({identifier:M.identifier,location:C,version:M.version,metadata:M.metadata})}k&&await this.fileService.writeFile(s,A.VSBuffer.fromString(JSON.stringify(p)))}if(i){o=i(o);const k=o.map(M=>({identifier:M.identifier,version:M.version,location:M.location.toJSON(),relativeLocation:this.toRelativePath(M.location),metadata:M.metadata}));await this.fileService.writeFile(s,A.VSBuffer.fromString(JSON.stringify(k)))}return o})}reportAndThrowInvalidConentError(s){const i=new f(`Invalid extensions content in ${s.toString()}`,"ERROR_INVALID_CONTENT");throw this.telemetryService.publicLogError2("extensionsProfileScanningError",{code:i.code}),i}toRelativePath(s){return this.uriIdentityService.extUri.isEqual(this.uriIdentityService.extUri.dirname(s),this.extensionsLocation)?this.uriIdentityService.extUri.basename(s):void 0}resolveExtensionLocation(s){return this.uriIdentityService.extUri.joinPath(this.extensionsLocation,s)}async migrateFromOldDefaultProfileExtensionsLocation(){return this._migrationPromise||(this._migrationPromise=(async()=>{const s=this.uriIdentityService.extUri.joinPath(this.userDataProfilesService.defaultProfile.location,"extensions.json"),i=this.uriIdentityService.extUri.joinPath(this.extensionsLocation,".init-default-profile-extensions");let r;try{r=(await this.fileService.readFile(s)).value.toString()}catch(p){if((0,m.toFileOperationResult)(p)===1)return;throw p}this.logService.info("Migrating extensions from old default profile location",s.toString());let o;try{const p=JSON.parse(r);Array.isArray(p)&&p.every(k=>S(k))?o=p:this.logService.warn("Skipping migrating from old default profile locaiton: Found invalid data",p)}catch(p){this.logService.error(p)}if(o)try{await this.fileService.createFile(this.userDataProfilesService.defaultProfile.extensionsResource,A.VSBuffer.fromString(JSON.stringify(o)),{overwrite:!1}),this.logService.info("Migrated extensions from old default profile location to new location",s.toString(),this.userDataProfilesService.defaultProfile.extensionsResource.toString())}catch(p){if((0,m.toFileOperationResult)(p)===3)this.logService.info("Migration from old default profile location to new location is done by another window",s.toString(),this.userDataProfilesService.defaultProfile.extensionsResource.toString());else throw p}try{await this.fileService.del(s)}catch(p){(0,m.toFileOperationResult)(p)!==1&&this.logService.error(p)}try{await this.fileService.del(i)}catch(p){(0,m.toFileOperationResult)(p)!==1&&this.logService.error(p)}return o})()),this._migrationPromise}getResourceAccessQueue(s){let i=this.resourcesAccessQueueMap.get(s);return i||(i=new b.Queue,this.resourcesAccessQueueMap.set(s,i)),i}};e.AbstractExtensionsProfileScannerService=I,e.AbstractExtensionsProfileScannerService=I=be([Y(1,m.IFileService),Y(2,u.IUserDataProfilesService),Y(3,y.IUriIdentityService),Y(4,v.ITelemetryService),Y(5,w.ILogService)],I);function S(a){return(0,E.isObject)(a)&&(0,h.isIExtensionIdentifier)(a.identifier)&&(t(a.location)||(0,E.isString)(a.location)&&a.location)&&((0,E.isUndefined)(a.relativeLocation)||(0,E.isString)(a.relativeLocation))&&a.version&&(0,E.isString)(a.version)}function t(a){return a?(0,E.isString)(a.path)&&(0,E.isString)(a.scheme):!1}}),define(Z[131],ee([0,1,24,8,37,17,13,44,153,2,15,10,4,19,205,71,12,7,172,33,125,122,204,16,6,5,22,3,75,82,41,40,203]),function(H,e,b,A,n,O,D,P,h,d,m,g,w,u,y,E,l,v,c,f,I,S,t,a,s,i,r,o,p,k,M,C,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeExtensionsScannerService=e.toExtensionDescription=e.ExtensionScannerInput=e.AbstractExtensionsScannerService=e.IExtensionsScannerService=e.Translations=void 0;var T;(function(ue){function j(G,B){if(G===B)return!0;const W=Object.keys(G),U=new Set;for(const $ of Object.keys(B))U.add($);if(W.length!==U.size)return!1;for(const $ of W){if(G[$]!==B[$])return!1;U.delete($)}return U.size===0}ue.equals=j})(T||(e.Translations=T={})),e.IExtensionsScannerService=(0,s.createDecorator)("IExtensionsScannerService");let F=class extends d.Disposable{constructor(j,G,B,W,U,$,X,se,ce,x,R,_){super(),this.systemExtensionsLocation=j,this.userExtensionsLocation=G,this.extensionsControlLocation=B,this.currentProfile=W,this.userDataProfilesService=U,this.extensionsProfileScannerService=$,this.fileService=X,this.logService=se,this.environmentService=ce,this.productService=x,this.uriIdentityService=R,this.instantiationService=_,this._onDidChangeCache=this._register(new o.Emitter),this.onDidChangeCache=this._onDidChangeCache.event,this.obsoleteFile=(0,u.joinPath)(this.userExtensionsLocation,".obsolete"),this.systemExtensionsCachedScanner=this._register(this.instantiationService.createInstance(ne,this.currentProfile,this.obsoleteFile)),this.userExtensionsCachedScanner=this._register(this.instantiationService.createInstance(ne,this.currentProfile,this.obsoleteFile)),this.extensionsScanner=this._register(this.instantiationService.createInstance(oe,this.obsoleteFile)),this.initializeDefaultProfileExtensionsPromise=void 0,this._register(this.systemExtensionsCachedScanner.onDidChangeCache(()=>this._onDidChangeCache.fire(0))),this._register(this.userExtensionsCachedScanner.onDidChangeCache(()=>this._onDidChangeCache.fire(1)))}getTargetPlatform(){return this._targetPlatformPromise||(this._targetPlatformPromise=(0,I.computeTargetPlatform)(this.fileService,this.logService)),this._targetPlatformPromise}async scanAllExtensions(j,G,B){const[W,U]=await Promise.all([this.scanSystemExtensions(j),this.scanUserExtensions(G)]),$=B?await this.scanExtensionsUnderDevelopment(j,[...W,...U]):[];return this.dedupExtensions(W,U,$,await this.getTargetPlatform(),!0)}async scanSystemExtensions(j){const G=[];G.push(this.scanDefaultSystemExtensions(!!j.useCache,j.language)),G.push(this.scanDevSystemExtensions(j.language,!!j.checkControlFile));const[B,W]=await Promise.all(G);return this.applyScanOptions([...B,...W],0,j,!1)}async scanUserExtensions(j){const G=j.profileLocation??this.userExtensionsLocation;this.logService.trace("Started scanning user extensions",G);const B=this.uriIdentityService.extUri.isEqual(j.profileLocation,this.userDataProfilesService.defaultProfile.extensionsResource)?{bailOutWhenFileNotFound:!0}:void 0,W=await this.createExtensionScannerInput(G,!!j.profileLocation,1,!j.includeUninstalled,j.language,!0,B),U=j.useCache&&!W.devMode&&W.excludeObsolete?this.userExtensionsCachedScanner:this.extensionsScanner;let $;try{$=await U.scanExtensions(W)}catch(X){if(X instanceof k.ExtensionsProfileScanningError&&X.code==="ERROR_PROFILE_NOT_FOUND")await this.doInitializeDefaultProfileExtensions(),$=await U.scanExtensions(W);else throw X}return $=await this.applyScanOptions($,1,j,!0),this.logService.trace("Scanned user extensions:",$.length),$}async scanExtensionsUnderDevelopment(j,G){if(this.environmentService.isExtensionDevelopment&&this.environmentService.extensionDevelopmentLocationURI){const B=(await Promise.all(this.environmentService.extensionDevelopmentLocationURI.filter(W=>W.scheme===m.Schemas.file).map(async W=>{const U=await this.createExtensionScannerInput(W,!1,1,!0,j.language,!1,void 0);return(await this.extensionsScanner.scanOneOrMultipleExtensions(U)).map(X=>(X.type=G.find(se=>(0,I.areSameExtensions)(se.identifier,X.identifier))?.type??X.type,this.extensionsScanner.validate(X,U)))}))).flat();return this.applyScanOptions(B,"development",j,!0)}return[]}async scanExistingExtension(j,G,B){const W=await this.createExtensionScannerInput(j,!1,G,!0,B.language,!0,void 0),U=await this.extensionsScanner.scanExtension(W);return!U||!B.includeInvalid&&!U.isValid?null:U}async scanOneOrMultipleExtensions(j,G,B){const W=await this.createExtensionScannerInput(j,!1,G,!0,B.language,!0,void 0),U=await this.extensionsScanner.scanOneOrMultipleExtensions(W);return this.applyScanOptions(U,G,B,!0)}async scanMetadata(j){const G=(0,u.joinPath)(j,"package.json"),B=(await this.fileService.readFile(G)).value.toString();return JSON.parse(B).__metadata}async updateMetadata(j,G){const B=(0,u.joinPath)(j,"package.json"),W=(await this.fileService.readFile(B)).value.toString(),U=JSON.parse(W);G.isMachineScoped=G.isMachineScoped||void 0,G.isBuiltin=G.isBuiltin||void 0,U.__metadata={...U.__metadata,...G},await this.fileService.writeFile((0,u.joinPath)(j,"package.json"),O.VSBuffer.fromString(JSON.stringify(U,null,"	")))}async initializeDefaultProfileExtensions(){try{await this.extensionsProfileScannerService.scanProfileExtensions(this.userDataProfilesService.defaultProfile.extensionsResource,{bailOutWhenFileNotFound:!0})}catch(j){if(j instanceof k.ExtensionsProfileScanningError&&j.code==="ERROR_PROFILE_NOT_FOUND")await this.doInitializeDefaultProfileExtensions();else throw j}}async doInitializeDefaultProfileExtensions(){return this.initializeDefaultProfileExtensionsPromise||(this.initializeDefaultProfileExtensionsPromise=(async()=>{try{this.logService.info("Started initializing default profile extensions in extensions installation folder.",this.userExtensionsLocation.toString());const j=await this.scanUserExtensions({includeInvalid:!0});if(j.length)await this.extensionsProfileScannerService.addExtensionsToProfile(j.map(G=>[G,G.metadata]),this.userDataProfilesService.defaultProfile.extensionsResource);else try{await this.fileService.createFile(this.userDataProfilesService.defaultProfile.extensionsResource,O.VSBuffer.fromString(JSON.stringify([])))}catch(G){(0,a.toFileOperationResult)(G)!==1&&this.logService.warn("Failed to create default profile extensions manifest in extensions installation folder.",this.userExtensionsLocation.toString(),(0,D.getErrorMessage)(G))}this.logService.info("Completed initializing default profile extensions in extensions installation folder.",this.userExtensionsLocation.toString())}catch(j){this.logService.error(j)}finally{this.initializeDefaultProfileExtensionsPromise=void 0}})()),this.initializeDefaultProfileExtensionsPromise}async applyScanOptions(j,G,B,W){return B.includeAllVersions||(j=this.dedupExtensions(G===0?j:void 0,G===1?j:void 0,G==="development"?j:void 0,await this.getTargetPlatform(),W)),B.includeInvalid||(j=j.filter(U=>U.isValid)),j.sort((U,$)=>{const X=g.basename(U.location.fsPath),se=g.basename($.location.fsPath);return X<se?-1:X>se?1:0})}dedupExtensions(j,G,B,W,U){const $=(se,ce,x)=>{if(se.isValid&&!ce.isValid)return!1;if(se.isValid===ce.isValid){if(U&&y.gt(se.manifest.version,ce.manifest.version))return this.logService.debug(`Skipping extension ${ce.location.path} with lower version ${ce.manifest.version} in favour of ${se.location.path} with version ${se.manifest.version}`),!1;if(y.eq(se.manifest.version,ce.manifest.version)){if(se.type===0)return this.logService.debug(`Skipping extension ${ce.location.path} in favour of system extension ${se.location.path} with same version`),!1;if(se.targetPlatform===W)return this.logService.debug(`Skipping extension ${ce.location.path} from different target platform ${ce.targetPlatform}`),!1}}return x?this.logService.warn(`Overwriting user extension ${se.location.path} with ${ce.location.path}.`):this.logService.debug(`Overwriting user extension ${se.location.path} with ${ce.location.path}.`),!0},X=new S.ExtensionIdentifierMap;return j?.forEach(se=>{const ce=X.get(se.identifier.id);(!ce||$(ce,se,!1))&&X.set(se.identifier.id,se)}),G?.forEach(se=>{const ce=X.get(se.identifier.id);if(!ce&&j&&se.type===0){this.logService.debug(`Skipping obsolete system extension ${se.location.path}.`);return}(!ce||$(ce,se,!1))&&X.set(se.identifier.id,se)}),B?.forEach(se=>{const ce=X.get(se.identifier.id);(!ce||$(ce,se,!0))&&X.set(se.identifier.id,se),X.set(se.identifier.id,se)}),[...X.values()]}async scanDefaultSystemExtensions(j,G){this.logService.trace("Started scanning system extensions");const B=await this.createExtensionScannerInput(this.systemExtensionsLocation,!1,0,!0,G,!0,void 0),U=await(j&&!B.devMode?this.systemExtensionsCachedScanner:this.extensionsScanner).scanExtensions(B);return this.logService.trace("Scanned system extensions:",U.length),U}async scanDevSystemExtensions(j,G){const B=this.environmentService.isBuilt?[]:this.productService.builtInExtensions;if(!B?.length)return[];this.logService.trace("Started scanning dev system extensions");const W=G?await this.getBuiltInExtensionControl():{},U=[],$=v.URI.file(g.normalize(g.join(m.FileAccess.asFileUri("").fsPath,"..",".build","builtInExtensions")));for(const se of B){const ce=W[se.name]||"marketplace";switch(ce){case"disabled":break;case"marketplace":U.push((0,u.joinPath)($,se.name));break;default:U.push(v.URI.file(ce));break}}const X=await Promise.all(U.map(async se=>this.extensionsScanner.scanExtension(await this.createExtensionScannerInput(se,!1,0,!0,j,!0,void 0))));return this.logService.trace("Scanned dev system extensions:",X.length),(0,b.coalesce)(X)}async getBuiltInExtensionControl(){try{const j=await this.fileService.readFile(this.extensionsControlLocation);return JSON.parse(j.value.toString())}catch{return{}}}async createExtensionScannerInput(j,G,B,W,U,$,X){const se=await this.getTranslations(U??w.language),ce=await this.getMtime(j),x=G&&!this.uriIdentityService.extUri.isEqual(j,this.userDataProfilesService.defaultProfile.extensionsResource)?this.userDataProfilesService.defaultProfile.extensionsResource:void 0,R=x?await this.getMtime(x):void 0;return new z(j,ce,x,R,G,X,B,W,$,this.productService.version,this.productService.vscodeVersion,this.productService.date,this.productService.commit,!this.environmentService.isBuilt,U,se)}async getMtime(j){try{const G=await this.fileService.stat(j);if(typeof G.mtime=="number")return G.mtime}catch{}}};e.AbstractExtensionsScannerService=F,e.AbstractExtensionsScannerService=F=be([Y(4,M.IUserDataProfilesService),Y(5,k.IExtensionsProfileScannerService),Y(6,a.IFileService),Y(7,i.ILogService),Y(8,f.IEnvironmentService),Y(9,r.IProductService),Y(10,C.IUriIdentityService),Y(11,s.IInstantiationService)],F);class z{constructor(j,G,B,W,U,$,X,se,ce,x,R,_,N,q,re,ie){this.location=j,this.mtime=G,this.applicationExtensionslocation=B,this.applicationExtensionslocationMtime=W,this.profile=U,this.profileScanOptions=$,this.type=X,this.excludeObsolete=se,this.validate=ce,this.productVersion=x,this.vsCodeProductVersion=R,this.productDate=_,this.productCommit=N,this.devMode=q,this.language=re,this.translations=ie}static createNlsConfiguration(j){return{language:j.language,pseudo:j.language==="pseudo",devMode:j.devMode,translations:j.translations}}static equals(j,G){return(0,u.isEqual)(j.location,G.location)&&j.mtime===G.mtime&&(0,u.isEqual)(j.applicationExtensionslocation,G.applicationExtensionslocation)&&j.applicationExtensionslocationMtime===G.applicationExtensionslocationMtime&&j.profile===G.profile&&n.equals(j.profileScanOptions,G.profileScanOptions)&&j.type===G.type&&j.excludeObsolete===G.excludeObsolete&&j.validate===G.validate&&j.productVersion===G.productVersion&&j.productDate===G.productDate&&j.productCommit===G.productCommit&&j.devMode===G.devMode&&j.language===G.language&&T.equals(j.translations,G.translations)}}e.ExtensionScannerInput=z;let oe=class extends d.Disposable{constructor(j,G,B,W,U){super(),this.obsoleteFile=j,this.extensionsProfileScannerService=G,this.uriIdentityService=B,this.fileService=W,this.logService=U}async scanExtensions(j){const G=j.profile?await this.scanExtensionsFromProfile(j):await this.scanExtensionsFromLocation(j);let B={};if(j.excludeObsolete&&j.type===1)try{const W=(await this.fileService.readFile(this.obsoleteFile)).value.toString();B=JSON.parse(W)}catch{}return(0,l.isEmptyObject)(B)?G:G.filter(W=>!B[I.ExtensionKey.create(W).toString()])}async scanExtensionsFromLocation(j){const G=await this.fileService.resolve(j.location);if(!G.children?.length)return[];const B=await Promise.all(G.children.map(async W=>{if(!W.isDirectory||j.type===1&&(0,u.basename)(W.resource).indexOf(".")===0)return null;const U=new z(W.resource,j.mtime,j.applicationExtensionslocation,j.applicationExtensionslocationMtime,j.profile,j.profileScanOptions,j.type,j.excludeObsolete,j.validate,j.productVersion,j.vsCodeProductVersion,j.productDate,j.productCommit,j.devMode,j.language,j.translations);return this.scanExtension(U)}));return(0,b.coalesce)(B).sort((W,U)=>W.location.path<U.location.path?-1:1)}async scanExtensionsFromProfile(j){let G=await this.scanExtensionsFromProfileResource(j.location,()=>!0,j);if(j.applicationExtensionslocation&&!this.uriIdentityService.extUri.isEqual(j.location,j.applicationExtensionslocation)){G=G.filter(W=>!W.metadata?.isApplicationScoped);const B=await this.scanExtensionsFromProfileResource(j.applicationExtensionslocation,W=>!!W.metadata?.isBuiltin||!!W.metadata?.isApplicationScoped,j);G.push(...B)}return G}async scanExtensionsFromProfileResource(j,G,B){const W=await this.extensionsProfileScannerService.scanProfileExtensions(j,B.profileScanOptions);if(!W.length)return[];const U=await Promise.all(W.map(async $=>{if(G($)){const X=new z($.location,B.mtime,B.applicationExtensionslocation,B.applicationExtensionslocationMtime,B.profile,B.profileScanOptions,B.type,B.excludeObsolete,B.validate,B.productVersion,B.vsCodeProductVersion,B.productDate,B.productCommit,B.devMode,B.language,B.translations);return this.scanExtension(X,$.metadata)}return null}));return(0,b.coalesce)(U)}async scanOneOrMultipleExtensions(j){try{if(await this.fileService.exists((0,u.joinPath)(j.location,"package.json"))){const G=await this.scanExtension(j);return G?[G]:[]}else return await this.scanExtensions(j)}catch(G){return this.logService.error(`Error scanning extensions at ${j.location.path}:`,(0,D.getErrorMessage)(G)),[]}}async scanExtension(j,G){try{let B=await this.scanExtensionManifest(j.location);if(B){B.publisher||(B.publisher=S.UNDEFINED_PUBLISHER),G=G??B.__metadata,delete B.__metadata;const W=(0,I.getGalleryExtensionId)(B.publisher,B.name),U=G?.id?{id:W,uuid:G.id}:{id:W},$=G?.isSystem?0:j.type,X=$===0||!!G?.isBuiltin;B=await this.translateManifest(j.location,B,z.createNlsConfiguration(j));const se={type:$,identifier:U,manifest:B,location:j.location,isBuiltin:X,targetPlatform:G?.targetPlatform??"undefined",metadata:G,isValid:!0,validations:[]};return j.validate?this.validate(se,j):se}}catch(B){j.type!==0&&this.logService.error(B)}return null}validate(j,G){let B=!0;const W=(0,t.validateExtensionManifest)(G.productVersion,G.vsCodeProductVersion,G.productDate,G.location,j.manifest,j.isBuiltin);for(const[U,$]of W)U===E.default.Error&&(B=!1,this.logService.error(this.formatMessage(G.location,$)));return j.isValid=B,j.validations=W,j}async scanExtensionManifest(j){const G=(0,u.joinPath)(j,"package.json");let B;try{B=(await this.fileService.readFile(G)).value.toString()}catch(U){return(0,a.toFileOperationResult)(U)!==1&&this.logService.error(this.formatMessage(j,(0,c.localize)(0,null,G.path,U.message))),null}let W;try{W=JSON.parse(B)}catch{const $=[];(0,P.parse)(B,$);for(const X of $)this.logService.error(this.formatMessage(j,(0,c.localize)(1,null,G.path,X.offset,X.length,(0,h.getParseErrorMessage)(X.error))));return null}return(0,P.getNodeType)(W)!=="object"?(this.logService.error(this.formatMessage(j,(0,c.localize)(2,null,G.path))),null):W}async translateManifest(j,G,B){const W=await this.getLocalizedMessages(j,G,B);if(W)try{const U=[],$=await this.resolveOriginalMessageBundle(W.default,U);if(U.length>0)return U.forEach(se=>{this.logService.error(this.formatMessage(j,(0,c.localize)(3,null,W.default?.path,(0,h.getParseErrorMessage)(se.error))))}),G;if((0,P.getNodeType)(W)!=="object")return this.logService.error(this.formatMessage(j,(0,c.localize)(4,null,W.default?.path))),G;const X=W.values||Object.create(null);return(0,L.localizeManifest)(G,X,$)}catch{}return G}async getLocalizedMessages(j,G,B){const W=(0,u.joinPath)(j,"package.nls.json"),U=(ce,x)=>{x.forEach(R=>{this.logService.error(this.formatMessage(j,(0,c.localize)(5,null,ce?.path,(0,h.getParseErrorMessage)(R.error))))})},$=ce=>{this.logService.error(this.formatMessage(j,(0,c.localize)(6,null,ce?.path)))},X=`${G.publisher}.${G.name}`,se=B.translations[X];if(se)try{const ce=v.URI.file(se),x=(await this.fileService.readFile(ce)).value.toString(),R=[],_=(0,P.parse)(x,R);return R.length>0?(U(ce,R),{values:void 0,default:W}):(0,P.getNodeType)(_)!=="object"?($(ce),{values:void 0,default:W}):{values:_.contents?_.contents.package:void 0,default:W}}catch{return{values:void 0,default:W}}else{if(!await this.fileService.exists(W))return;let x;try{x=await this.findMessageBundles(j,B)}catch{return}if(!x.localized)return{values:void 0,default:x.original};try{const R=(await this.fileService.readFile(x.localized)).value.toString(),_=[],N=(0,P.parse)(R,_);return _.length>0?(U(x.localized,_),{values:void 0,default:x.original}):(0,P.getNodeType)(N)!=="object"?($(x.localized),{values:void 0,default:x.original}):{values:N,default:x.original}}catch{return{values:void 0,default:x.original}}}}async resolveOriginalMessageBundle(j,G){if(j)try{const B=(await this.fileService.readFile(j)).value.toString();return(0,P.parse)(B,G)}catch{}}findMessageBundles(j,G){return new Promise((B,W)=>{const U=$=>{const X=(0,u.joinPath)(j,`package.nls.${$}.json`);this.fileService.exists(X).then(se=>{se&&B({localized:X,original:(0,u.joinPath)(j,"package.nls.json")});const ce=$.lastIndexOf("-");ce===-1?B({localized:(0,u.joinPath)(j,"package.nls.json"),original:null}):($=$.substring(0,ce),U($))})};if(G.devMode||G.pseudo||!G.language)return B({localized:(0,u.joinPath)(j,"package.nls.json"),original:null});U(G.language)})}formatMessage(j,G){return`[${j.path}]: ${G}`}};oe=be([Y(1,k.IExtensionsProfileScannerService),Y(2,C.IUriIdentityService),Y(3,a.IFileService),Y(4,i.ILogService)],oe);let ne=class extends oe{constructor(j,G,B,W,U,$,X){super(G,W,U,$,X),this.currentProfile=j,this.userDataProfilesService=B,this.cacheValidatorThrottler=this._register(new A.ThrottledDelayer(3e3)),this._onDidChangeCache=this._register(new o.Emitter),this.onDidChangeCache=this._onDidChangeCache.event}async scanExtensions(j){const G=this.getCacheFile(j),B=await this.readExtensionCache(G);if(this.input=j,B&&B.input&&z.equals(B.input,this.input))return this.logService.debug("Using cached extensions scan result",j.location.toString()),this.cacheValidatorThrottler.trigger(()=>this.validateCache()),B.result.map(U=>(U.location=v.URI.revive(U.location),U));const W=await super.scanExtensions(j);return await this.writeExtensionCache(G,{input:j,result:W}),W}async readExtensionCache(j){try{const G=await this.fileService.readFile(j),B=JSON.parse(G.value.toString());return{result:B.result,input:(0,p.revive)(B.input)}}catch(G){this.logService.debug("Error while reading the extension cache file:",j.path,(0,D.getErrorMessage)(G))}return null}async writeExtensionCache(j,G){try{await this.fileService.writeFile(j,O.VSBuffer.fromString(JSON.stringify(G)))}catch(B){this.logService.debug("Error while writing the extension cache file:",j.path,(0,D.getErrorMessage)(B))}}async validateCache(){if(!this.input)return;const j=this.getCacheFile(this.input),G=await this.readExtensionCache(j);if(!G)return;const B=G.result,W=JSON.parse(JSON.stringify(await super.scanExtensions(this.input)));if(!n.equals(W,B))try{this.logService.info("Invalidating Cache",B,W),await this.fileService.del(j),this._onDidChangeCache.fire()}catch(U){this.logService.error(U)}}getCacheFile(j){const G=this.getProfile(j);return this.uriIdentityService.extUri.joinPath(G.cacheHome,j.type===0?S.BUILTIN_MANIFEST_CACHE_FILE:S.USER_MANIFEST_CACHE_FILE)}getProfile(j){return j.type===0?this.userDataProfilesService.defaultProfile:j.profile?this.uriIdentityService.extUri.isEqual(j.location,this.currentProfile.extensionsResource)?this.currentProfile:this.userDataProfilesService.profiles.find(G=>this.uriIdentityService.extUri.isEqual(j.location,G.extensionsResource))??this.currentProfile:this.userDataProfilesService.defaultProfile}};ne=be([Y(2,M.IUserDataProfilesService),Y(3,k.IExtensionsProfileScannerService),Y(4,C.IUriIdentityService),Y(5,a.IFileService),Y(6,i.ILogService)],ne);function de(ue,j){const G=(0,I.getExtensionId)(ue.manifest.publisher,ue.manifest.name);return{id:G,identifier:new S.ExtensionIdentifier(G),isBuiltin:ue.type===0,isUserBuiltin:ue.type===1&&ue.isBuiltin,isUnderDevelopment:j,extensionLocation:ue.location,uuid:ue.identifier.uuid,targetPlatform:ue.targetPlatform,...ue.manifest}}e.toExtensionDescription=de;class ae extends F{constructor(j,G,B,W,U,$,X,se,ce,x,R,_){super(j,G,(0,u.joinPath)(B,".vscode-oss-dev","extensions","control.json"),W,U,$,X,se,ce,x,R,_),this.translationsPromise=(async()=>{if(w.translationsConfigFile)try{const N=await this.fileService.readFile(v.URI.file(w.translationsConfigFile));return JSON.parse(N.value.toString())}catch{}return Object.create(null)})()}getTranslations(j){return this.translationsPromise}}e.NativeExtensionsScannerService=ae}),define(Z[280],ee([0,1,5,41,40,25,82,16,33,7]),function(H,e,b,A,n,O,D,P,h,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionsProfileScannerService=void 0;let m=class extends D.AbstractExtensionsProfileScannerService{constructor(w,u,y,E,l,v){super(d.URI.file(w.extensionsPath),u,y,E,l,v)}};e.ExtensionsProfileScannerService=m,e.ExtensionsProfileScannerService=m=be([Y(0,h.INativeEnvironmentService),Y(1,P.IFileService),Y(2,A.IUserDataProfilesService),Y(3,n.IUriIdentityService),Y(4,O.ITelemetryService),Y(5,b.ILogService)],m)}),define(Z[281],ee([0,1,7,33,82,131,16,6,5,22,40,41]),function(H,e,b,A,n,O,D,P,h,d,m,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionsScannerService=void 0;let w=class extends O.NativeExtensionsScannerService{constructor(y,E,l,v,c,f,I,S){super(b.URI.file(c.builtinExtensionsPath),b.URI.file(c.extensionsPath),c.userHome,y.defaultProfile,y,E,l,v,c,f,I,S)}};e.ExtensionsScannerService=w,e.ExtensionsScannerService=w=be([Y(0,g.IUserDataProfilesService),Y(1,n.IExtensionsProfileScannerService),Y(2,D.IFileService),Y(3,h.ILogService),Y(4,A.INativeEnvironmentService),Y(5,d.IProductService),Y(6,m.IUriIdentityService),Y(7,P.IInstantiationService)],w)}),define(Z[282],ee([0,1,14,2,15,10,4,58,7,31,38,33,5,41]),function(H,e,b,A,n,O,D,P,h,d,m,g,w,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProtocolMainService=void 0;let y=class extends A.Disposable{constructor(l,v,c){super(),this.environmentService=l,this.logService=c,this.validRoots=P.TernarySearchTree.forPaths(!D.isLinux),this.validExtensions=new Set([".svg",".png",".jpg",".jpeg",".gif",".bmp",".webp"]),this.addValidFileRoot(l.appRoot),this.addValidFileRoot(l.extensionsPath),this.addValidFileRoot(v.defaultProfile.globalStorageHome.fsPath),this.addValidFileRoot(l.workspaceStorageHome.fsPath),this.handleProtocols()}handleProtocols(){const{defaultSession:l}=b.session;l.protocol.registerFileProtocol(n.Schemas.vscodeFileResource,(v,c)=>this.handleResourceRequest(v,c)),l.protocol.interceptFileProtocol(n.Schemas.file,(v,c)=>this.handleFileRequest(v,c)),this._register((0,A.toDisposable)(()=>{l.protocol.unregisterProtocol(n.Schemas.vscodeFileResource),l.protocol.uninterceptProtocol(n.Schemas.file)}))}addValidFileRoot(l){const v=(0,O.normalize)(l);return this.validRoots.get(v)?A.Disposable.None:(this.validRoots.set(v,!0),(0,A.toDisposable)(()=>this.validRoots.delete(v)))}handleFileRequest(l,v){const c=h.URI.parse(l.url);return this.logService.error(`Refused to load resource ${c.fsPath} from ${n.Schemas.file}: protocol (original URL: ${l.url})`),v({error:-3})}handleResourceRequest(l,v){const c=this.requestToNormalizedFilePath(l);let f;return this.environmentService.crossOriginIsolated&&((0,O.basename)(c)==="workbench.html"||(0,O.basename)(c)==="workbench-dev.html"?f=n.COI.CoopAndCoep:f=n.COI.getHeadersFromQuery(l.url)),this.validRoots.findSubstr(c)?v({path:c,headers:f}):this.validExtensions.has((0,O.extname)(c).toLowerCase())?v({path:c}):(this.logService.error(`${n.Schemas.vscodeFileResource}: Refused to load resource ${c} from ${n.Schemas.vscodeFileResource}: protocol (original URL: ${l.url})`),v({error:-3}))}requestToNormalizedFilePath(l){const v=h.URI.parse(l.url),c=n.FileAccess.uriToFileUri(v);return(0,O.normalize)(c.fsPath)}createIPCObjectUrl(){let l;const v=h.URI.from({scheme:"vscode",path:(0,d.generateUuid)()}),c=v.toString(),f=async()=>l;return m.validatedIpcMain.handle(c,f),this.logService.trace(`IPC Object URL: Registered new channel ${c}.`),{resource:v,update:I=>l=I,dispose:()=>{this.logService.trace(`IPC Object URL: Removed channel ${c}.`),m.validatedIpcMain.removeHandler(c)}}}};e.ProtocolMainService=y,e.ProtocolMainService=y=be([Y(0,g.INativeEnvironmentService),Y(1,u.IUserDataProfilesService),Y(2,w.ILogService)],y)}),define(Z[98],ee([0,1,8,3,2,65,12,113,6,41]),function(H,e,b,A,n,O,D,P,h,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.logStorage=e.InMemoryStorageService=e.isProfileUsingDefaultStorage=e.AbstractStorageService=e.loadKeyTargets=e.StorageTarget=e.StorageScope=e.WillSaveStateReason=e.IStorageService=e.TARGET_KEY=e.IS_NEW_KEY=void 0,e.IS_NEW_KEY="__$__isNewStorageMarker",e.TARGET_KEY="__$__targetStorageMarker",e.IStorageService=(0,h.createDecorator)("storageService");var m;(function(c){c[c.NONE=0]="NONE",c[c.SHUTDOWN=1]="SHUTDOWN"})(m||(e.WillSaveStateReason=m={}));var g;(function(c){c[c.APPLICATION=-1]="APPLICATION",c[c.PROFILE=0]="PROFILE",c[c.WORKSPACE=1]="WORKSPACE"})(g||(e.StorageScope=g={}));var w;(function(c){c[c.USER=0]="USER",c[c.MACHINE=1]="MACHINE"})(w||(e.StorageTarget=w={}));function u(c){const f=c.get(e.TARGET_KEY);if(f)try{return JSON.parse(f)}catch{}return Object.create(null)}e.loadKeyTargets=u;class y extends n.Disposable{static{this.DEFAULT_FLUSH_INTERVAL=60*1e3}constructor(f={flushInterval:y.DEFAULT_FLUSH_INTERVAL}){super(),this.options=f,this._onDidChangeValue=this._register(new A.PauseableEmitter),this._onDidChangeTarget=this._register(new A.PauseableEmitter),this.onDidChangeTarget=this._onDidChangeTarget.event,this._onWillSaveState=this._register(new A.Emitter),this.onWillSaveState=this._onWillSaveState.event,this.flushWhenIdleScheduler=this._register(new b.RunOnceScheduler(()=>this.doFlushWhenIdle(),this.options.flushInterval)),this.runFlushWhenIdle=this._register(new n.MutableDisposable),this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0}onDidChangeValue(f,I,S){return A.Event.filter(this._onDidChangeValue.event,t=>t.scope===f&&(I===void 0||t.key===I),S)}doFlushWhenIdle(){this.runFlushWhenIdle.value=(0,b.runWhenIdle)(()=>{this.shouldFlushWhenIdle()&&this.flush(),this.flushWhenIdleScheduler.schedule()})}shouldFlushWhenIdle(){return!0}stopFlushWhenIdle(){(0,n.dispose)([this.runFlushWhenIdle,this.flushWhenIdleScheduler])}initialize(){return this.initializationPromise||(this.initializationPromise=(async()=>{(0,O.mark)("code/willInitStorage");try{await this.doInitialize()}finally{(0,O.mark)("code/didInitStorage")}this.flushWhenIdleScheduler.schedule()})()),this.initializationPromise}emitDidChangeValue(f,I){const{key:S,external:t}=I;if(S===e.TARGET_KEY){switch(f){case-1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0;break}this._onDidChangeTarget.fire({scope:f})}else this._onDidChangeValue.fire({scope:f,key:S,target:this.getKeyTargets(f)[S],external:t})}emitWillSaveState(f){this._onWillSaveState.fire({reason:f})}get(f,I,S){return this.getStorage(I)?.get(f,S)}getBoolean(f,I,S){return this.getStorage(I)?.getBoolean(f,S)}getNumber(f,I,S){return this.getStorage(I)?.getNumber(f,S)}getObject(f,I,S){return this.getStorage(I)?.getObject(f,S)}storeAll(f,I){this.withPausedEmitters(()=>{for(const S of f)this.store(S.key,S.value,S.scope,S.target,I)})}store(f,I,S,t,a=!1){if((0,D.isUndefinedOrNull)(I)){this.remove(f,S,a);return}this.withPausedEmitters(()=>{this.updateKeyTarget(f,S,t),this.getStorage(S)?.set(f,I,a)})}remove(f,I,S=!1){this.withPausedEmitters(()=>{this.updateKeyTarget(f,I,void 0),this.getStorage(I)?.delete(f,S)})}withPausedEmitters(f){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{f()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}keys(f,I){const S=[],t=this.getKeyTargets(f);for(const a of Object.keys(t))t[a]===I&&S.push(a);return S}updateKeyTarget(f,I,S,t=!1){const a=this.getKeyTargets(I);typeof S=="number"?a[f]!==S&&(a[f]=S,this.getStorage(I)?.set(e.TARGET_KEY,JSON.stringify(a),t)):typeof a[f]=="number"&&(delete a[f],this.getStorage(I)?.set(e.TARGET_KEY,JSON.stringify(a),t))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get profileKeyTargets(){return this._profileKeyTargets||(this._profileKeyTargets=this.loadKeyTargets(0)),this._profileKeyTargets}get applicationKeyTargets(){return this._applicationKeyTargets||(this._applicationKeyTargets=this.loadKeyTargets(-1)),this._applicationKeyTargets}getKeyTargets(f){switch(f){case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(f){const I=this.getStorage(f);return I?u(I):Object.create(null)}isNew(f){return this.getBoolean(e.IS_NEW_KEY,f)===!0}async flush(f=m.NONE){this._onWillSaveState.fire({reason:f});const I=this.getStorage(-1),S=this.getStorage(0),t=this.getStorage(1);switch(f){case m.NONE:await b.Promises.settled([I?.whenFlushed()??Promise.resolve(),S?.whenFlushed()??Promise.resolve(),t?.whenFlushed()??Promise.resolve()]);break;case m.SHUTDOWN:await b.Promises.settled([I?.flush(0)??Promise.resolve(),S?.flush(0)??Promise.resolve(),t?.flush(0)??Promise.resolve()]);break}}async log(){const f=this.getStorage(-1)?.items??new Map,I=this.getStorage(0)?.items??new Map,S=this.getStorage(1)?.items??new Map;return v(f,I,S,this.getLogDetails(-1)??"",this.getLogDetails(0)??"",this.getLogDetails(1)??"")}async switch(f,I){return this.emitWillSaveState(m.NONE),(0,d.isUserDataProfile)(f)?this.switchToProfile(f,I):this.switchToWorkspace(f,I)}canSwitchProfile(f,I){return!(f.id===I.id||E(I)&&E(f))}switchData(f,I,S){this.withPausedEmitters(()=>{const t=new Set;for(const[a,s]of f)t.add(a),I.get(a)!==s&&this.emitDidChangeValue(S,{key:a,external:!0});for(const[a]of I.items)t.has(a)||this.emitDidChangeValue(S,{key:a,external:!0})})}}e.AbstractStorageService=y;function E(c){return c.isDefault||!!c.useDefaultFlags?.globalState}e.isProfileUsingDefaultStorage=E;class l extends y{constructor(){super(),this.applicationStorage=this._register(new P.Storage(new P.InMemoryStorageDatabase,{hint:P.StorageHint.STORAGE_IN_MEMORY})),this.profileStorage=this._register(new P.Storage(new P.InMemoryStorageDatabase,{hint:P.StorageHint.STORAGE_IN_MEMORY})),this.workspaceStorage=this._register(new P.Storage(new P.InMemoryStorageDatabase,{hint:P.StorageHint.STORAGE_IN_MEMORY})),this._register(this.workspaceStorage.onDidChangeStorage(f=>this.emitDidChangeValue(1,f))),this._register(this.profileStorage.onDidChangeStorage(f=>this.emitDidChangeValue(0,f))),this._register(this.applicationStorage.onDidChangeStorage(f=>this.emitDidChangeValue(-1,f)))}getStorage(f){switch(f){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}getLogDetails(f){switch(f){case-1:return"inMemory (application)";case 0:return"inMemory (profile)";default:return"inMemory (workspace)"}}async doInitialize(){}async switchToProfile(){}async switchToWorkspace(){}hasScope(f){return!1}}e.InMemoryStorageService=l;async function v(c,f,I,S,t,a){const s=T=>{try{return JSON.parse(T)}catch{return T}},i=new Map,r=new Map;c.forEach((T,F)=>{i.set(F,T),r.set(F,s(T))});const o=new Map,p=new Map;f.forEach((T,F)=>{o.set(F,T),p.set(F,s(T))});const k=new Map,M=new Map;I.forEach((T,F)=>{k.set(F,T),M.set(F,s(T))}),console.group(S!==t?`Storage: Application (path: ${S})`:`Storage: Application & Profile (path: ${S}, default profile)`);const C=[];if(i.forEach((T,F)=>{C.push({key:F,value:T})}),console.table(C),console.groupEnd(),console.log(r),S!==t){console.group(`Storage: Profile (path: ${t}, profile specific)`);const T=[];o.forEach((F,z)=>{T.push({key:z,value:F})}),console.table(T),console.groupEnd(),console.log(p)}console.group(`Storage: Workspace (path: ${a})`);const L=[];k.forEach((T,F)=>{L.push({key:F,value:T})}),console.table(L),console.groupEnd(),console.log(M)}e.logStorage=v}),define(Z[283],ee([0,1,24,8,3,2,10,70,7,21,113,161,5,98,25,30]),function(H,e,b,A,n,O,D,P,h,d,m,g,w,u,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryStorageMain=e.WorkspaceStorageMain=e.ApplicationStorageMain=e.ProfileStorageMain=void 0;class l extends O.Disposable{static{this.LOG_SLOW_CLOSE_THRESHOLD=2e3}get storage(){return this._storage}constructor(a,s){super(),this.logService=a,this.fileService=s,this._onDidChangeStorage=this._register(new n.Emitter),this.onDidChangeStorage=this._onDidChangeStorage.event,this._onDidCloseStorage=this._register(new n.Emitter),this.onDidCloseStorage=this._onDidCloseStorage.event,this._storage=new m.Storage(new m.InMemoryStorageDatabase,{hint:m.StorageHint.STORAGE_IN_MEMORY}),this.initializePromise=void 0,this.whenInitPromise=new A.DeferredPromise,this.whenInit=this.whenInitPromise.p,this.state=m.StorageState.None}isInMemory(){return this._storage.isInMemory()}init(){return this.initializePromise||(this.initializePromise=(async()=>{if(this.state===m.StorageState.None)try{const a=await this.doCreate();this._storage.dispose(),this._storage=a,this._register(a.onDidChangeStorage(i=>this._onDidChangeStorage.fire(i))),await this.doInit(a);const s=a.getBoolean(u.IS_NEW_KEY);s===void 0?a.set(u.IS_NEW_KEY,!0):s&&a.set(u.IS_NEW_KEY,!1)}catch(a){this.logService.error(`[storage main] initialize(): Unable to init storage due to ${a}`)}finally{this.state=m.StorageState.Initialized,this.whenInitPromise.complete()}})()),this.initializePromise}createLoggingOptions(){return{logTrace:this.logService.getLevel()===w.LogLevel.Trace?a=>this.logService.trace(a):void 0,logError:a=>this.logService.error(a)}}doInit(a){return a.init()}get items(){return this._storage.items}get(a,s){return this._storage.get(a,s)}set(a,s){return this._storage.set(a,s)}delete(a){return this._storage.delete(a)}async close(){const a=new P.StopWatch(!1);await this.doClose(),a.stop(),a.elapsed()>l.LOG_SLOW_CLOSE_THRESHOLD&&await this.logSlowClose(a),this._onDidCloseStorage.fire()}async logSlowClose(a){if(this.path)try{const s=(0,b.top)(Array.from(this._storage.items.entries()).map(([r,o])=>({key:r,length:o.length})),(r,o)=>o.length-r.length,5).map(r=>`${r.key}:${r.length}`).join(", "),i=(await this.fileService.stat(h.URI.file(this.path))).size;this.logService.warn(`[storage main] detected slow close() operation: Time: ${a.elapsed()}ms, DB size: ${i}b, Large Keys: ${s}`)}catch(s){this.logService.error("[storage main] figuring out stats for slow DB on close() resulted in an error",s)}}async doClose(){this.initializePromise&&await this.initializePromise,this.state=m.StorageState.Closed,await this._storage.close()}}class v extends l{static{this.STORAGE_NAME="state.vscdb"}get path(){if(!this.options.useInMemoryStorage)return(0,D.join)(this.profile.globalStorageHome.fsPath,v.STORAGE_NAME)}constructor(a,s,i,r){super(i,r),this.profile=a,this.options=s}async doCreate(){return new m.Storage(new g.SQLiteStorageDatabase(this.path??g.SQLiteStorageDatabase.IN_MEMORY_PATH,{logging:this.createLoggingOptions()}),this.path?void 0:{hint:m.StorageHint.STORAGE_IN_MEMORY})}}class c extends v{constructor(a,s,i,r){super(a,s,i,r)}}e.ProfileStorageMain=c;class f extends v{constructor(a,s,i,r){super(s.defaultProfile,a,i,r)}async doInit(a){await super.doInit(a),this.updateTelemetryState(a)}updateTelemetryState(a){a.get(y.firstSessionDateStorageKey,void 0)===void 0&&a.set(y.firstSessionDateStorageKey,new Date().toUTCString());const i=a.get(y.currentSessionDateStorageKey,void 0),r=new Date().toUTCString();a.set(y.lastSessionDateStorageKey,typeof i>"u"?null:i),a.set(y.currentSessionDateStorageKey,r)}}e.ApplicationStorageMain=f;class I extends l{static{this.WORKSPACE_STORAGE_NAME="state.vscdb"}static{this.WORKSPACE_META_NAME="workspace.json"}get path(){if(!this.options.useInMemoryStorage)return(0,D.join)(this.environmentService.workspaceStorageHome.fsPath,this.workspace.id,I.WORKSPACE_STORAGE_NAME)}constructor(a,s,i,r,o){super(i,o),this.workspace=a,this.options=s,this.environmentService=r}async doCreate(){const{storageFilePath:a,wasCreated:s}=await this.prepareWorkspaceStorageFolder();return new m.Storage(new g.SQLiteStorageDatabase(a,{logging:this.createLoggingOptions()}),{hint:this.options.useInMemoryStorage?m.StorageHint.STORAGE_IN_MEMORY:s?m.StorageHint.STORAGE_DOES_NOT_EXIST:void 0})}async prepareWorkspaceStorageFolder(){if(this.options.useInMemoryStorage)return{storageFilePath:g.SQLiteStorageDatabase.IN_MEMORY_PATH,wasCreated:!0};const a=(0,D.join)(this.environmentService.workspaceStorageHome.fsPath,this.workspace.id),s=(0,D.join)(a,I.WORKSPACE_STORAGE_NAME);return await d.Promises.exists(a)?{storageFilePath:s,wasCreated:!1}:(await d.Promises.mkdir(a,{recursive:!0}),this.ensureWorkspaceStorageFolderMeta(a),{storageFilePath:s,wasCreated:!0})}async ensureWorkspaceStorageFolderMeta(a){let s;if((0,E.isSingleFolderWorkspaceIdentifier)(this.workspace)?s={folder:this.workspace.uri.toString()}:(0,E.isWorkspaceIdentifier)(this.workspace)&&(s={workspace:this.workspace.configPath.toString()}),s)try{const i=(0,D.join)(a,I.WORKSPACE_META_NAME);await d.Promises.exists(i)||await d.Promises.writeFile(i,JSON.stringify(s,void 0,2))}catch(i){this.logService.error(`[storage main] ensureWorkspaceStorageFolderMeta(): Unable to create workspace storage metadata due to ${i}`)}}}e.WorkspaceStorageMain=I;class S extends l{get path(){}async doCreate(){return new m.Storage(new m.InMemoryStorageDatabase,{hint:m.StorageHint.STORAGE_IN_MEMORY})}}e.InMemoryStorageMain=S}),define(Z[284],ee([0,1,3,2,98]),function(H,e,b,A,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProfileStorageChangesListenerChannel=void 0;class O extends A.Disposable{constructor(P,h,d){super(),this.storageMainService=P,this.userDataProfilesService=h,this.logService=d;const m=this._register(new A.MutableDisposable);this._onDidChange=this._register(new b.Emitter({onWillAddFirstListener:()=>m.value=this.registerStorageChangeListeners(),onDidRemoveLastListener:()=>m.value=void 0}))}registerStorageChangeListeners(){this.logService.debug("ProfileStorageChangesListenerChannel#registerStorageChangeListeners");const P=new A.DisposableStore;return P.add(b.Event.debounce(this.storageMainService.applicationStorage.onDidChangeStorage,(h,d)=>(h?h.push(d.key):h=[d.key],h),100)(h=>this.onDidChangeApplicationStorage(h))),P.add(b.Event.debounce(this.storageMainService.onDidChangeProfileStorage,(h,d)=>{h||(h=new Map);let m=h.get(d.profile.id);return m||h.set(d.profile.id,m={profile:d.profile,keys:[],storage:d.storage}),m.keys.push(d.key),h},100)(h=>this.onDidChangeProfileStorage(h))),P}onDidChangeApplicationStorage(P){const h=P.includes(n.TARGET_KEY)?[this.userDataProfilesService.defaultProfile]:[],d=[];if(P=P.filter(m=>m!==n.TARGET_KEY),P.length){const m=(0,n.loadKeyTargets)(this.storageMainService.applicationStorage.storage);d.push({profile:this.userDataProfilesService.defaultProfile,changes:P.map(g=>({key:g,scope:0,target:m[g]}))})}this.triggerEvents(h,d)}onDidChangeProfileStorage(P){const h=[],d=new Map;for(const[m,g]of P.entries()){g.keys.includes(n.TARGET_KEY)&&h.push(g.profile);const w=g.keys.filter(u=>u!==n.TARGET_KEY);if(w.length){const u=(0,n.loadKeyTargets)(g.storage.storage);d.set(m,{profile:g.profile,changes:w.map(y=>({key:y,scope:0,target:u[y]}))})}}this.triggerEvents(h,[...d.values()])}triggerEvents(P,h){(P.length||h.length)&&this._onDidChange.fire({valueChanges:h,targetChanges:P})}listen(P,h,d){switch(h){case"onDidChange":return this._onDidChange.event}throw new Error(`Event not found: ${h}`)}async call(P,h){throw new Error(`Call not found: ${h}`)}}e.ProfileStorageChangesListenerChannel=O}),define(Z[285],ee([0,1,7,33,16,5,34,40,41,12,123]),function(H,e,b,A,n,O,D,P,h,d,m){"use strict";var g,w;Object.defineProperty(e,"__esModule",{value:!0}),e.ServerUserDataProfilesService=e.UserDataProfilesService=e.UserDataProfilesReadonlyService=void 0;let u=class extends h.UserDataProfilesService{static{g=this}static{this.PROFILE_ASSOCIATIONS_MIGRATION_KEY="profileAssociationsMigration"}constructor(v,c,f,I,S){super(f,I,c,S),this.stateReadonlyService=v,this.nativeEnvironmentService=f}getStoredProfiles(){return this.stateReadonlyService.getItem(g.PROFILES_KEY,[]).map(c=>({...c,location:(0,d.isString)(c.location)?this.uriIdentityService.extUri.joinPath(this.profilesHome,c.location):b.URI.revive(c.location)}))}getStoredProfileAssociations(){const v=this.stateReadonlyService.getItem(g.PROFILE_ASSOCIATIONS_KEY,{});return this.stateReadonlyService.getItem(g.PROFILE_ASSOCIATIONS_MIGRATION_KEY,!1)?v:this.migrateStoredProfileAssociations(v)}getDefaultProfileExtensionsLocation(){return this.uriIdentityService.extUri.joinPath(b.URI.file(this.nativeEnvironmentService.extensionsPath).with({scheme:this.profilesHome.scheme}),"extensions.json")}};e.UserDataProfilesReadonlyService=u,e.UserDataProfilesReadonlyService=u=g=be([Y(0,D.IStateReadService),Y(1,P.IUriIdentityService),Y(2,A.INativeEnvironmentService),Y(3,n.IFileService),Y(4,O.ILogService)],u);let y=w=class extends u{constructor(v,c,f,I,S){super(v,c,f,I,S),this.stateService=v}saveStoredProfiles(v){v.length?this.stateService.setItem(w.PROFILES_KEY,v.map(c=>({...c,location:this.uriIdentityService.extUri.basename(c.location)}))):this.stateService.removeItem(w.PROFILES_KEY)}getStoredProfiles(){const v=super.getStoredProfiles();return this.stateService.getItem("userDataProfilesMigration",!1)||(this.saveStoredProfiles(v),this.stateService.setItem("userDataProfilesMigration",!0)),v}saveStoredProfileAssociations(v){v.emptyWindows||v.workspaces?this.stateService.setItem(w.PROFILE_ASSOCIATIONS_KEY,v):this.stateService.removeItem(w.PROFILE_ASSOCIATIONS_KEY)}getStoredProfileAssociations(){const v="workspaceAndProfileInfo",c=this.stateService.getItem(v,void 0);if(c){this.stateService.removeItem(v);const I=c.reduce((S,{workspace:t,profile:a})=>(S[b.URI.revive(t).toString()]=b.URI.revive(a).toString(),S),{});this.stateService.setItem(w.PROFILE_ASSOCIATIONS_KEY,{workspaces:I})}const f=super.getStoredProfileAssociations();return this.stateService.getItem(w.PROFILE_ASSOCIATIONS_MIGRATION_KEY,!1)||(this.saveStoredProfileAssociations(f),this.stateService.setItem(w.PROFILE_ASSOCIATIONS_MIGRATION_KEY,!0)),f}};e.UserDataProfilesService=y,e.UserDataProfilesService=y=w=be([Y(0,D.IStateService),Y(1,P.IUriIdentityService),Y(2,A.INativeEnvironmentService),Y(3,n.IFileService),Y(4,O.ILogService)],y);let E=class extends y{constructor(v,c,f,I){super(new m.StateService(0,c,I,f),v,c,f,I)}async init(){return await this.stateService.init(),super.init()}};e.ServerUserDataProfilesService=E,e.ServerUserDataProfilesService=E=be([Y(0,P.IUriIdentityService),Y(1,A.INativeEnvironmentService),Y(2,n.IFileService),Y(3,O.ILogService)],E)}),define(Z[53],ee([0,1,33,16,6,5,40,41,285,34]),function(H,e,b,A,n,O,D,P,h,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataProfilesMainService=e.IUserDataProfilesMainService=void 0,e.IUserDataProfilesMainService=(0,n.refineServiceDecorator)(P.IUserDataProfilesService);let m=class extends h.UserDataProfilesService{constructor(w,u,y,E,l){super(w,u,y,E,l)}getAssociatedEmptyWindows(){const w=[];for(const u of this.profilesObject.emptyWindows.keys())w.push({id:u});return w}};e.UserDataProfilesMainService=m,e.UserDataProfilesMainService=m=be([Y(0,d.IStateService),Y(1,D.IUriIdentityService),Y(2,b.INativeEnvironmentService),Y(3,A.IFileService),Y(4,O.ILogService)],m)}),define(Z[132],ee([0,1,19,7,30]),function(H,e,b,A,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.findWindowOnExtensionDevelopmentPath=e.findWindowOnWorkspaceOrFolder=e.findWindowOnFile=void 0;async function O(h,d,m){for(const w of h){const u=w.openedWorkspace;if((0,n.isWorkspaceIdentifier)(u)){const y=await m(u);if(y){if(y.folders.some(E=>b.extUriBiasedIgnorePathCase.isEqualOrParent(d,E.uri)))return w}else if(b.extUriBiasedIgnorePathCase.isEqualOrParent(d,u.configPath))return w}}const g=h.filter(w=>(0,n.isSingleFolderWorkspaceIdentifier)(w.openedWorkspace)&&b.extUriBiasedIgnorePathCase.isEqualOrParent(d,w.openedWorkspace.uri));if(g.length)return g.sort((w,u)=>-(w.openedWorkspace.uri.path.length-u.openedWorkspace.uri.path.length))[0]}e.findWindowOnFile=O;function D(h,d){for(const m of h)if((0,n.isWorkspaceIdentifier)(m.openedWorkspace)&&b.extUriBiasedIgnorePathCase.isEqual(m.openedWorkspace.configPath,d)||(0,n.isSingleFolderWorkspaceIdentifier)(m.openedWorkspace)&&b.extUriBiasedIgnorePathCase.isEqual(m.openedWorkspace.uri,d))return m}e.findWindowOnWorkspaceOrFolder=D;function P(h,d){const m=g=>d.some(w=>b.extUriBiasedIgnorePathCase.isEqual(A.URI.file(w),A.URI.file(g)));for(const g of h)if(g.config?.extensionDevelopmentPath?.some(w=>m(w)))return g}e.findWindowOnExtensionDevelopmentPath=P}),define(Z[99],ee([0,1,32,44,138,46,15,10,4,19,7,6,60,30]),function(H,e,b,A,n,O,D,P,h,d,m,g,w,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toStoreData=e.restoreRecentlyOpened=e.rewriteWorkspaceFileForNewLocation=e.toWorkspaceFolders=e.getStoredWorkspaceFolder=e.isStoredWorkspaceFolder=e.isRecentFile=e.isRecentFolder=e.isRecentWorkspace=e.IWorkspacesService=void 0,e.IWorkspacesService=(0,g.createDecorator)("workspacesService");function y(M){return M.hasOwnProperty("workspace")}e.isRecentWorkspace=y;function E(M){return M.hasOwnProperty("folderUri")}e.isRecentFolder=E;function l(M){return M.hasOwnProperty("fileUri")}e.isRecentFile=l;function v(M){return c(M)||f(M)}e.isStoredWorkspaceFolder=v;function c(M){const C=M;return typeof C?.path=="string"&&(!C.name||typeof C.name=="string")}function f(M){const C=M;return typeof C?.uri=="string"&&(!C.name||typeof C.name=="string")}function I(M,C,L,T,F){if(M.scheme!==T.scheme)return{name:L,uri:M.toString(!0)};let z=C?void 0:F.relativePath(T,M);if(z!==void 0)z.length===0?z=".":h.isWindows&&(z=S(z));else if(M.scheme===D.Schemas.file)z=M.fsPath,h.isWindows&&(z=S(z));else if(F.isEqualAuthority(M.authority,T.authority))z=M.path;else return{name:L,uri:M.toString(!0)};return{name:L,path:z}}e.getStoredWorkspaceFolder=I;function S(M){return M=(0,O.normalizeDriveLetter)(M),(0,b.isUNC)(M)||(M=(0,b.toSlashes)(M)),M}function t(M,C,L){const T=[],F=new Set,z=L.dirname(C);for(const oe of M){let ne;if(c(oe))oe.path&&(ne=L.resolvePath(z,oe.path));else if(f(oe))try{ne=m.URI.parse(oe.uri),ne.path[0]!==P.posix.sep&&(ne=ne.with({path:P.posix.sep+ne.path}))}catch(de){console.warn(de)}if(ne){const de=L.getComparisonKey(ne);if(!F.has(de)){F.add(de);const ae=oe.name||L.basenameOrAuthority(ne);T.push(new u.WorkspaceFolder({uri:ne,name:ae,index:T.length},oe))}}}return T}e.toWorkspaceFolders=t;function a(M,C,L,T,F){const z=s(C,M),oe=F.dirname(C),ne=F.dirname(T),de=[];for(const G of z.folders){const B=c(G)?F.resolvePath(oe,G.path):m.URI.parse(G.uri);let W;L?W=!1:W=!c(G)||(0,P.isAbsolute)(G.path),de.push(I(B,W,G.name,ne,F))}const ae={insertSpaces:!1,tabSize:4,eol:h.isLinux||h.isMacintosh?`
`:`\r
`},ue=n.setProperty(M,["folders"],de,ae);let j=n.applyEdits(M,ue);return(0,d.isEqualAuthority)(z.remoteAuthority,(0,w.getRemoteAuthority)(T))&&(j=n.applyEdits(j,n.removeProperty(j,["remoteAuthority"],ae))),j}e.rewriteWorkspaceFileForNewLocation=a;function s(M,C){const L=A.parse(C);if(L&&Array.isArray(L.folders))L.folders=L.folders.filter(T=>v(T));else throw new Error(`${M} looks like an invalid workspace file.`);return L}function i(M){return M.workspace&&typeof M.workspace=="object"&&typeof M.workspace.id=="string"&&typeof M.workspace.configPath=="string"}function r(M){return typeof M.folderUri=="string"}function o(M){return typeof M.fileUri=="string"}function p(M,C){const L={workspaces:[],files:[]};if(M){const T=function(z,oe){for(let ne=0;ne<z.length;ne++)try{oe(z[ne],ne)}catch(de){C.warn(`Error restoring recent entry ${JSON.stringify(z[ne])}: ${de.toString()}. Skip entry.`)}},F=M;Array.isArray(F.entries)&&T(F.entries,z=>{const oe=z.label,ne=z.remoteAuthority;i(z)?L.workspaces.push({label:oe,remoteAuthority:ne,workspace:{id:z.workspace.id,configPath:m.URI.parse(z.workspace.configPath)}}):r(z)?L.workspaces.push({label:oe,remoteAuthority:ne,folderUri:m.URI.parse(z.folderUri)}):o(z)&&L.files.push({label:oe,remoteAuthority:ne,fileUri:m.URI.parse(z.fileUri)})})}return L}e.restoreRecentlyOpened=p;function k(M){const C={entries:[]};for(const L of M.workspaces)E(L)?C.entries.push({folderUri:L.folderUri.toString(),label:L.label,remoteAuthority:L.remoteAuthority}):C.entries.push({workspace:{id:L.workspace.id,configPath:L.workspace.configPath.toString()},label:L.label,remoteAuthority:L.remoteAuthority});for(const L of M.files)C.entries.push({fileUri:L.fileUri.toString(),label:L.label,remoteAuthority:L.remoteAuthority});return C}e.toStoreData=k}),define(Z[100],ee([0,1,73,15,4,19]),function(H,e,b,A,n,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createEmptyWorkspaceIdentifier=e.getSingleFolderWorkspaceIdentifier=e.getWorkspaceIdentifier=e.NON_EMPTY_WORKSPACE_ID_LENGTH=void 0,e.NON_EMPTY_WORKSPACE_ID_LENGTH=128/4;function D(d){function m(){let g=d.scheme===A.Schemas.file?(0,O.originalFSPath)(d):d.toString();return n.isLinux||(g=g.toLowerCase()),(0,b.createHash)("md5").update(g).digest("hex")}return{id:m(),configPath:d}}e.getWorkspaceIdentifier=D;function P(d,m){function g(){if(d.scheme!==A.Schemas.file)return(0,b.createHash)("md5").update(d.toString()).digest("hex");if(!m)return;let u;return n.isLinux?u=m.ino:n.isMacintosh?u=m.birthtime.getTime():n.isWindows&&(typeof m.birthtimeMs=="number"?u=Math.floor(m.birthtimeMs):u=m.birthtime.getTime()),(0,b.createHash)("md5").update(d.fsPath).update(u?String(u):"").digest("hex")}const w=g();if(typeof w=="string")return{id:w,uri:d}}e.getSingleFolderWorkspaceIdentifier=P;function h(){return{id:(Date.now()+Math.round(Math.random()*1e3)).toString()}}e.createEmptyWorkspaceIdentifier=h}),define(Z[101],ee([0,1,73,88,27,286,17,13,3,2,10,4,31,42,111]),function(H,e,b,A,n,O,D,P,h,d,m,g,w,u,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.connect=e.serve=e.Server=e.createStaticIPCHandle=e.createRandomIPCHandle=e.XDG_RUNTIME_DIR=e.WebSocketNodeSocket=e.NodeSocket=void 0;class E{traceSocketEvent(C,L){y.SocketDiagnostics.traceSocketEvent(this.socket,this.debugLabel,C,L)}constructor(C,L=""){this._canWrite=!0,this.debugLabel=L,this.socket=C,this.traceSocketEvent("created",{type:"NodeSocket"}),this._errorListener=T=>{if(this.traceSocketEvent("error",{code:T?.code,message:T?.message}),T){if(T.code==="EPIPE")return;(0,P.onUnexpectedError)(T)}},this.socket.on("error",this._errorListener),this._closeListener=T=>{this.traceSocketEvent("close",{hadError:T}),this._canWrite=!1},this.socket.on("close",this._closeListener),this._endListener=()=>{this.traceSocketEvent("nodeEndReceived"),this._canWrite=!1},this.socket.on("end",this._endListener)}dispose(){this.socket.off("error",this._errorListener),this.socket.off("close",this._closeListener),this.socket.off("end",this._endListener),this.socket.destroy()}onData(C){const L=T=>{this.traceSocketEvent("read",T),C(D.VSBuffer.wrap(T))};return this.socket.on("data",L),{dispose:()=>this.socket.off("data",L)}}onClose(C){const L=T=>{C({type:0,hadError:T,error:void 0})};return this.socket.on("close",L),{dispose:()=>this.socket.off("close",L)}}onEnd(C){const L=()=>{C()};return this.socket.on("end",L),{dispose:()=>this.socket.off("end",L)}}write(C){if(!(this.socket.destroyed||!this._canWrite))try{this.traceSocketEvent("write",C),this.socket.write(C.buffer,L=>{if(L){if(L.code==="EPIPE")return;(0,P.onUnexpectedError)(L)}})}catch(L){if(L.code==="EPIPE")return;(0,P.onUnexpectedError)(L)}}end(){this.traceSocketEvent("nodeEndSent"),this.socket.end()}drain(){return this.traceSocketEvent("nodeDrainBegin"),new Promise((C,L)=>{if(this.socket.bufferSize===0){this.traceSocketEvent("nodeDrainEnd"),C();return}const T=()=>{this.socket.off("close",T),this.socket.off("end",T),this.socket.off("error",T),this.socket.off("timeout",T),this.socket.off("drain",T),this.traceSocketEvent("nodeDrainEnd"),C()};this.socket.on("close",T),this.socket.on("end",T),this.socket.on("error",T),this.socket.on("timeout",T),this.socket.on("drain",T)})}}e.NodeSocket=E;var l;(function(M){M[M.MinHeaderByteSize=2]="MinHeaderByteSize",M[M.MaxWebSocketMessageLength=262144]="MaxWebSocketMessageLength"})(l||(l={}));var v;(function(M){M[M.PeekHeader=1]="PeekHeader",M[M.ReadHeader=2]="ReadHeader",M[M.ReadBody=3]="ReadBody",M[M.Fin=4]="Fin"})(v||(v={}));class c extends d.Disposable{get permessageDeflate(){return this._flowManager.permessageDeflate}get recordedInflateBytes(){return this._flowManager.recordedInflateBytes}traceSocketEvent(C,L){this.socket.traceSocketEvent(C,L)}constructor(C,L,T,F){super(),this._onData=this._register(new h.Emitter),this._onClose=this._register(new h.Emitter),this._isEnded=!1,this._state={state:1,readLen:2,fin:0,compressed:!1,firstFrameOfMessage:!0,mask:0},this.socket=C,this.traceSocketEvent("created",{type:"WebSocketNodeSocket",permessageDeflate:L,inflateBytesLength:T?.byteLength||0,recordInflateBytes:F}),this._flowManager=this._register(new f(this,L,T,F,this._onData,(z,oe)=>this._write(z,oe))),this._register(this._flowManager.onError(z=>{console.error(z),(0,P.onUnexpectedError)(z),this._onClose.fire({type:0,hadError:!0,error:z})})),this._incomingData=new y.ChunkStream,this._register(this.socket.onData(z=>this._acceptChunk(z))),this._register(this.socket.onClose(async z=>{this._flowManager.isProcessingReadQueue()&&await h.Event.toPromise(this._flowManager.onDidFinishProcessingReadQueue),this._onClose.fire(z)}))}dispose(){this._flowManager.isProcessingWriteQueue()?this._register(this._flowManager.onDidFinishProcessingWriteQueue(()=>{this.dispose()})):(this.socket.dispose(),super.dispose())}onData(C){return this._onData.event(C)}onClose(C){return this._onClose.event(C)}onEnd(C){return this.socket.onEnd(C)}write(C){let L=0;for(;L<C.byteLength;)this._flowManager.writeMessage(C.slice(L,Math.min(L+262144,C.byteLength))),L+=262144}_write(C,L){if(this._isEnded)return;this.traceSocketEvent("webSocketNodeSocketWrite",C);let T=2;C.byteLength<126?T+=0:C.byteLength<2**16?T+=2:T+=8;const F=D.VSBuffer.alloc(T);if(L?F.writeUInt8(194,0):F.writeUInt8(130,0),C.byteLength<126)F.writeUInt8(C.byteLength,1);else if(C.byteLength<2**16){F.writeUInt8(126,1);let z=1;F.writeUInt8(C.byteLength>>>8&255,++z),F.writeUInt8(C.byteLength>>>0&255,++z)}else{F.writeUInt8(127,1);let z=1;F.writeUInt8(0,++z),F.writeUInt8(0,++z),F.writeUInt8(0,++z),F.writeUInt8(0,++z),F.writeUInt8(C.byteLength>>>24&255,++z),F.writeUInt8(C.byteLength>>>16&255,++z),F.writeUInt8(C.byteLength>>>8&255,++z),F.writeUInt8(C.byteLength>>>0&255,++z)}this.socket.write(D.VSBuffer.concat([F,C]))}end(){this._isEnded=!0,this.socket.end()}_acceptChunk(C){if(C.byteLength!==0){for(this._incomingData.acceptChunk(C);this._incomingData.byteLength>=this._state.readLen;)if(this._state.state===1){const L=this._incomingData.peek(this._state.readLen),T=L.readUInt8(0),F=(T&128)>>>7,z=(T&64)>>>6,oe=L.readUInt8(1),ne=(oe&128)>>>7,de=oe&127;this._state.state=2,this._state.readLen=2+(ne?4:0)+(de===126?2:0)+(de===127?8:0),this._state.fin=F,this._state.firstFrameOfMessage&&(this._state.compressed=!!z),this._state.firstFrameOfMessage=!!F,this._state.mask=0,this.traceSocketEvent("webSocketNodeSocketPeekedHeader",{headerSize:this._state.readLen,compressed:this._state.compressed,fin:this._state.fin})}else if(this._state.state===2){const L=this._incomingData.read(this._state.readLen),T=L.readUInt8(1),F=(T&128)>>>7;let z=T&127,oe=1;z===126?z=L.readUInt8(++oe)*2**8+L.readUInt8(++oe):z===127&&(z=L.readUInt8(++oe)*0+L.readUInt8(++oe)*0+L.readUInt8(++oe)*0+L.readUInt8(++oe)*0+L.readUInt8(++oe)*2**24+L.readUInt8(++oe)*2**16+L.readUInt8(++oe)*2**8+L.readUInt8(++oe));let ne=0;F&&(ne=L.readUInt8(++oe)*2**24+L.readUInt8(++oe)*2**16+L.readUInt8(++oe)*2**8+L.readUInt8(++oe)),this._state.state=3,this._state.readLen=z,this._state.mask=ne,this.traceSocketEvent("webSocketNodeSocketPeekedHeader",{bodySize:this._state.readLen,compressed:this._state.compressed,fin:this._state.fin,mask:this._state.mask})}else if(this._state.state===3){const L=this._incomingData.read(this._state.readLen);this.traceSocketEvent("webSocketNodeSocketReadData",L),t(L,this._state.mask),this.traceSocketEvent("webSocketNodeSocketUnmaskedData",L),this._state.state=1,this._state.readLen=2,this._state.mask=0,this._flowManager.acceptFrame(L,this._state.compressed,!!this._state.fin)}}}async drain(){this.traceSocketEvent("webSocketNodeSocketDrainBegin"),this._flowManager.isProcessingWriteQueue()&&await h.Event.toPromise(this._flowManager.onDidFinishProcessingWriteQueue),await this.socket.drain(),this.traceSocketEvent("webSocketNodeSocketDrainEnd")}}e.WebSocketNodeSocket=c;class f extends d.Disposable{get permessageDeflate(){return!!(this._zlibInflateStream&&this._zlibDeflateStream)}get recordedInflateBytes(){return this._zlibInflateStream?this._zlibInflateStream.recordedInflateBytes:D.VSBuffer.alloc(0)}constructor(C,L,T,F,z,oe){super(),this._tracer=C,this._onData=z,this._writeFn=oe,this._onError=this._register(new h.Emitter),this.onError=this._onError.event,this._writeQueue=[],this._readQueue=[],this._onDidFinishProcessingReadQueue=this._register(new h.Emitter),this.onDidFinishProcessingReadQueue=this._onDidFinishProcessingReadQueue.event,this._onDidFinishProcessingWriteQueue=this._register(new h.Emitter),this.onDidFinishProcessingWriteQueue=this._onDidFinishProcessingWriteQueue.event,this._isProcessingWriteQueue=!1,this._isProcessingReadQueue=!1,L?(this._zlibInflateStream=this._register(new I(this._tracer,F,T,{windowBits:15})),this._zlibDeflateStream=this._register(new S(this._tracer,{windowBits:15})),this._register(this._zlibInflateStream.onError(ne=>this._onError.fire(ne))),this._register(this._zlibDeflateStream.onError(ne=>this._onError.fire(ne)))):(this._zlibInflateStream=null,this._zlibDeflateStream=null)}writeMessage(C){this._writeQueue.push(C),this._processWriteQueue()}async _processWriteQueue(){if(!this._isProcessingWriteQueue){for(this._isProcessingWriteQueue=!0;this._writeQueue.length>0;){const C=this._writeQueue.shift();if(this._zlibDeflateStream){const L=await this._deflateMessage(this._zlibDeflateStream,C);this._writeFn(L,!0)}else this._writeFn(C,!1)}this._isProcessingWriteQueue=!1,this._onDidFinishProcessingWriteQueue.fire()}}isProcessingWriteQueue(){return this._isProcessingWriteQueue}_deflateMessage(C,L){return new Promise((T,F)=>{C.write(L),C.flush(z=>T(z))})}acceptFrame(C,L,T){this._readQueue.push({data:C,isCompressed:L,isLastFrameOfMessage:T}),this._processReadQueue()}async _processReadQueue(){if(!this._isProcessingReadQueue){for(this._isProcessingReadQueue=!0;this._readQueue.length>0;){const C=this._readQueue.shift();if(this._zlibInflateStream&&C.isCompressed){const L=await this._inflateFrame(this._zlibInflateStream,C.data,C.isLastFrameOfMessage);this._onData.fire(L)}else this._onData.fire(C.data)}this._isProcessingReadQueue=!1,this._onDidFinishProcessingReadQueue.fire()}}isProcessingReadQueue(){return this._isProcessingReadQueue}_inflateFrame(C,L,T){return new Promise((F,z)=>{C.write(L),T&&C.write(D.VSBuffer.fromByteArray([0,0,255,255])),C.flush(oe=>F(oe))})}}class I extends d.Disposable{get recordedInflateBytes(){return this._recordInflateBytes?D.VSBuffer.concat(this._recordedInflateBytes):D.VSBuffer.alloc(0)}constructor(C,L,T,F){super(),this._tracer=C,this._recordInflateBytes=L,this._onError=this._register(new h.Emitter),this.onError=this._onError.event,this._recordedInflateBytes=[],this._pendingInflateData=[],this._zlibInflate=(0,O.createInflateRaw)(F),this._zlibInflate.on("error",z=>{this._tracer.traceSocketEvent("zlibInflateError",{message:z?.message,code:z?.code}),this._onError.fire(z)}),this._zlibInflate.on("data",z=>{this._tracer.traceSocketEvent("zlibInflateData",z),this._pendingInflateData.push(D.VSBuffer.wrap(z))}),T&&(this._tracer.traceSocketEvent("zlibInflateInitialWrite",T.buffer),this._zlibInflate.write(T.buffer),this._zlibInflate.flush(()=>{this._tracer.traceSocketEvent("zlibInflateInitialFlushFired"),this._pendingInflateData.length=0}))}write(C){this._recordInflateBytes&&this._recordedInflateBytes.push(C.clone()),this._tracer.traceSocketEvent("zlibInflateWrite",C),this._zlibInflate.write(C.buffer)}flush(C){this._zlibInflate.flush(()=>{this._tracer.traceSocketEvent("zlibInflateFlushFired");const L=D.VSBuffer.concat(this._pendingInflateData);this._pendingInflateData.length=0,C(L)})}}class S extends d.Disposable{constructor(C,L){super(),this._tracer=C,this._onError=this._register(new h.Emitter),this.onError=this._onError.event,this._pendingDeflateData=[],this._zlibDeflate=(0,O.createDeflateRaw)({windowBits:15}),this._zlibDeflate.on("error",T=>{this._tracer.traceSocketEvent("zlibDeflateError",{message:T?.message,code:T?.code}),this._onError.fire(T)}),this._zlibDeflate.on("data",T=>{this._tracer.traceSocketEvent("zlibDeflateData",T),this._pendingDeflateData.push(D.VSBuffer.wrap(T))})}write(C){this._tracer.traceSocketEvent("zlibDeflateWrite",C.buffer),this._zlibDeflate.write(C.buffer)}flush(C){this._zlibDeflate.flush(2,()=>{this._tracer.traceSocketEvent("zlibDeflateFlushFired");let L=D.VSBuffer.concat(this._pendingDeflateData);this._pendingDeflateData.length=0,L=L.slice(0,L.byteLength-4),C(L)})}}function t(M,C){if(C===0)return;const L=M.byteLength>>>2;for(let de=0;de<L;de++){const ae=M.readUInt32BE(de*4);M.writeUInt32BE(ae^C,de*4)}const T=L*4,F=M.byteLength-T,z=C>>>24&255,oe=C>>>16&255,ne=C>>>8&255;F>=1&&M.writeUInt8(M.readUInt8(T)^z,T),F>=2&&M.writeUInt8(M.readUInt8(T+1)^oe,T+1),F>=3&&M.writeUInt8(M.readUInt8(T+2)^ne,T+2)}e.XDG_RUNTIME_DIR=process.env.XDG_RUNTIME_DIR;const a={[2]:107,[1]:103};function s(){const M=(0,w.generateUuid)();if(process.platform==="win32")return`\\\\.\\pipe\\vscode-ipc-${M}-sock`;const C=process.platform!=="darwin"&&e.XDG_RUNTIME_DIR?e.XDG_RUNTIME_DIR:(0,n.tmpdir)(),L=(0,m.join)(C,`vscode-ipc-${M}.sock`);return r(L),L}e.createRandomIPCHandle=s;function i(M,C,L){const T=(0,b.createHash)("md5").update(M).digest("hex");if(process.platform==="win32")return`\\\\.\\pipe\\${T}-${L}-${C}-sock`;const F=L.substr(0,4),z=C.substr(0,6),oe=T.substr(0,8);let ne;return process.platform!=="darwin"&&e.XDG_RUNTIME_DIR&&!process.env.VSCODE_PORTABLE?ne=(0,m.join)(e.XDG_RUNTIME_DIR,`vscode-${oe}-${F}-${z}.sock`):ne=(0,m.join)(M,`${F}-${z}.sock`),r(ne),ne}e.createStaticIPCHandle=i;function r(M){const C=a[g.platform];typeof C=="number"&&M.length>=C&&console.warn(`WARNING: IPC handle "${M}" is longer than ${C} chars, try a shorter --user-data-dir`)}class o extends u.IPCServer{static toClientConnectionEvent(C){const L=h.Event.fromNodeEventEmitter(C,"connection");return h.Event.map(L,T=>({protocol:new y.Protocol(new E(T,"ipc-server-connection")),onDidClientDisconnect:h.Event.once(h.Event.fromNodeEventEmitter(T,"close"))}))}constructor(C){super(o.toClientConnectionEvent(C)),this.server=C}dispose(){super.dispose(),this.server&&(this.server.close(),this.server=null)}}e.Server=o;function p(M){return new Promise((C,L)=>{const T=(0,A.createServer)();T.on("error",L),T.listen(M,()=>{T.removeListener("error",L),C(new o(T))})})}e.serve=p;function k(M,C){return new Promise((L,T)=>{const F=(0,A.createConnection)(M,()=>{F.removeListener("error",T),L(y.Client.fromSocket(new E(F,`ipc-client${C}`),C))});F.once("error",T)})}e.connect=k}),define(Z[28],ee([0,1,55,10,4,101,33,91,6]),function(H,e,b,A,n,O,D,P,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EnvironmentMainService=e.IEnvironmentMainService=void 0,e.IEnvironmentMainService=(0,h.refineServiceDecorator)(D.IEnvironmentService);class d extends P.NativeEnvironmentService{constructor(){super(...arguments),this._snapEnv={}}get cachedLanguagesPath(){return(0,A.join)(this.userDataPath,"clp")}get backupHome(){return(0,A.join)(this.userDataPath,"Backups")}get mainIPCHandle(){return(0,O.createStaticIPCHandle)(this.userDataPath,"main",this.productService.version)}get mainLockfile(){return(0,A.join)(this.userDataPath,"code.lock")}get disableUpdates(){return!!this.args["disable-updates"]}get crossOriginIsolated(){return!!this.args["enable-coi"]}get codeCachePath(){return process.env.VSCODE_CODE_CACHE_PATH||void 0}get useCodeCache(){return!!this.codeCachePath}get userRoamingDataHome(){return this.appSettingsHome}unsetSnapExportedVariables(){if(n.isLinux){for(const g in process.env)if(g.endsWith("_VSCODE_SNAP_ORIG")){const w=g.slice(0,-17);if(this._snapEnv[w])continue;process.env[w]&&(this._snapEnv[w]=process.env[w]),process.env[g]?process.env[w]=process.env[g]:delete process.env[w]}}}restoreSnapExportedVariables(){if(n.isLinux)for(const g in this._snapEnv)process.env[g]=this._snapEnv[g],delete this._snapEnv[g]}}e.EnvironmentMainService=d,be([b.memoize],d.prototype,"cachedLanguagesPath",null),be([b.memoize],d.prototype,"backupHome",null),be([b.memoize],d.prototype,"mainIPCHandle",null),be([b.memoize],d.prototype,"mainLockfile",null),be([b.memoize],d.prototype,"disableUpdates",null),be([b.memoize],d.prototype,"crossOriginIsolated",null),be([b.memoize],d.prototype,"codeCachePath",null),be([b.memoize],d.prototype,"useCodeCache",null),be([b.memoize],d.prototype,"userRoamingDataHome",null)}),define(Z[287],ee([0,1,73,32,15,10,4,19,21,196,18,28,34,16,5,195,30,100]),function(H,e,b,A,n,O,D,P,h,d,m,g,w,u,y,E,l,v){"use strict";var c;Object.defineProperty(e,"__esModule",{value:!0}),e.BackupMainService=void 0;let f=class{static{c=this}static{this.backupWorkspacesMetadataStorageKey="backupWorkspaces"}constructor(S,t,a,s){this.environmentMainService=S,this.configurationService=t,this.logService=a,this.stateService=s,this.backupHome=this.environmentMainService.backupHome,this.workspaces=[],this.folders=[],this.emptyWindows=[],this.backupUriComparer=P.extUriBiasedIgnorePathCase,this.backupPathComparer={isEqual:(i,r)=>(0,A.isEqual)(i,r,!D.isLinux)}}async initialize(){const S=this.stateService.getItem(c.backupWorkspacesMetadataStorageKey)??{workspaces:[],folders:[],emptyWindows:[]};this.emptyWindows=await this.validateEmptyWorkspaces(S.emptyWindows),this.workspaces=await this.validateWorkspaces((0,d.deserializeWorkspaceInfos)(S)),this.folders=await this.validateFolders((0,d.deserializeFolderInfos)(S)),this.storeWorkspacesMetadata()}getWorkspaceBackups(){return this.isHotExitOnExitAndWindowClose()?[]:this.workspaces.slice(0)}getFolderBackups(){return this.isHotExitOnExitAndWindowClose()?[]:this.folders.slice(0)}isHotExitEnabled(){return this.getHotExitConfig()!==u.HotExitConfiguration.OFF}isHotExitOnExitAndWindowClose(){return this.getHotExitConfig()===u.HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE}getHotExitConfig(){return this.configurationService.getValue()?.files?.hotExit||u.HotExitConfiguration.ON_EXIT}getEmptyWindowBackups(){return this.emptyWindows.slice(0)}registerWorkspaceBackup(S,t){this.workspaces.some(s=>S.workspace.id===s.workspace.id)||(this.workspaces.push(S),this.storeWorkspacesMetadata());const a=(0,O.join)(this.backupHome,S.workspace.id);return t?this.moveBackupFolder(a,t).then(()=>a):a}async moveBackupFolder(S,t){if(await h.Promises.exists(S)&&await this.convertToEmptyWindowBackup(S),await h.Promises.exists(t))try{await h.Promises.rename(t,S,!1)}catch(a){this.logService.error(`Backup: Could not move backup folder to new location: ${a.toString()}`)}}registerFolderBackup(S){return this.folders.some(t=>this.backupUriComparer.isEqual(S.folderUri,t.folderUri))||(this.folders.push(S),this.storeWorkspacesMetadata()),(0,O.join)(this.backupHome,this.getFolderHash(S))}registerEmptyWindowBackup(S){return this.emptyWindows.some(t=>!!t.backupFolder&&this.backupPathComparer.isEqual(t.backupFolder,S.backupFolder))||(this.emptyWindows.push(S),this.storeWorkspacesMetadata()),(0,O.join)(this.backupHome,S.backupFolder)}async validateWorkspaces(S){if(!Array.isArray(S))return[];const t=new Set,a=[];for(const s of S){const i=s.workspace;if(!(0,l.isWorkspaceIdentifier)(i))return[];if(!t.has(i.id)){t.add(i.id);const r=(0,O.join)(this.backupHome,i.id);await this.doHasBackups(r)?i.configPath.scheme!==n.Schemas.file||await h.Promises.exists(i.configPath.fsPath)?a.push(s):await this.convertToEmptyWindowBackup(r):await this.deleteStaleBackup(r)}}return a}async validateFolders(S){if(!Array.isArray(S))return[];const t=[],a=new Set;for(const s of S){const i=s.folderUri,r=this.backupUriComparer.getComparisonKey(i);if(!a.has(r)){a.add(r);const o=(0,O.join)(this.backupHome,this.getFolderHash(s));await this.doHasBackups(o)?i.scheme!==n.Schemas.file||await h.Promises.exists(i.fsPath)?t.push(s):await this.convertToEmptyWindowBackup(o):await this.deleteStaleBackup(o)}}return t}async validateEmptyWorkspaces(S){if(!Array.isArray(S))return[];const t=[],a=new Set;for(const s of S){const i=s.backupFolder;if(typeof i!="string")return[];if(!a.has(i)){a.add(i);const r=(0,O.join)(this.backupHome,i);await this.doHasBackups(r)?t.push(s):await this.deleteStaleBackup(r)}}return t}async deleteStaleBackup(S){try{await h.Promises.rm(S,h.RimRafMode.MOVE)}catch(t){this.logService.error(`Backup: Could not delete stale backup: ${t.toString()}`)}}prepareNewEmptyWindowBackup(){let S=(0,v.createEmptyWorkspaceIdentifier)();for(;this.emptyWindows.some(t=>!!t.backupFolder&&this.backupPathComparer.isEqual(t.backupFolder,S.id));)S=(0,v.createEmptyWorkspaceIdentifier)();return{backupFolder:S.id}}async convertToEmptyWindowBackup(S){const t=this.prepareNewEmptyWindowBackup(),a=(0,O.join)(this.backupHome,t.backupFolder);try{await h.Promises.rename(S,a,!1)}catch(s){return this.logService.error(`Backup: Could not rename backup folder: ${s.toString()}`),!1}return this.emptyWindows.push(t),!0}async getDirtyWorkspaces(){const S=[];for(const t of this.workspaces)await this.hasBackups(t)&&S.push(t);for(const t of this.folders)await this.hasBackups(t)&&S.push(t);return S}hasBackups(S){let t;return(0,d.isEmptyWindowBackupInfo)(S)?t=(0,O.join)(this.backupHome,S.backupFolder):(0,E.isFolderBackupInfo)(S)?t=(0,O.join)(this.backupHome,this.getFolderHash(S)):t=(0,O.join)(this.backupHome,S.workspace.id),this.doHasBackups(t)}async doHasBackups(S){try{const t=await h.Promises.readdir(S);for(const a of t)try{if((await h.Promises.readdir((0,O.join)(S,a))).length>0)return!0}catch{}}catch{}return!1}storeWorkspacesMetadata(){const S={workspaces:this.workspaces.map(({workspace:t,remoteAuthority:a})=>{const s={id:t.id,configURIPath:t.configPath.toString()};return a&&(s.remoteAuthority=a),s}),folders:this.folders.map(({folderUri:t,remoteAuthority:a})=>{const s={folderUri:t.toString()};return a&&(s.remoteAuthority=a),s}),emptyWindows:this.emptyWindows.map(({backupFolder:t,remoteAuthority:a})=>{const s={backupFolder:t};return a&&(s.remoteAuthority=a),s})};this.stateService.setItem(c.backupWorkspacesMetadataStorageKey,S)}getFolderHash(S){const t=S.folderUri;let a;return t.scheme===n.Schemas.file?a=D.isLinux?t.fsPath:t.fsPath.toLowerCase():a=t.toString().toLowerCase(),(0,b.createHash)("md5").update(a).digest("hex")}};e.BackupMainService=f,e.BackupMainService=f=c=be([Y(0,g.IEnvironmentMainService),Y(1,m.IConfigurationService),Y(2,y.ILogService),Y(3,w.IStateService)],f)}),define(Z[20],ee([0,1,14,38,8,3,2,4,36,12,6,5,34,28]),function(H,e,b,A,n,O,D,P,h,d,m,g,w,u){"use strict";var y;Object.defineProperty(e,"__esModule",{value:!0}),e.LifecycleMainService=e.LifecycleMainPhase=e.ShutdownReason=e.ILifecycleMainService=void 0,e.ILifecycleMainService=(0,m.createDecorator)("lifecycleMainService");var E;(function(c){c[c.QUIT=1]="QUIT",c[c.KILL=2]="KILL"})(E||(e.ShutdownReason=E={}));var l;(function(c){c[c.Starting=1]="Starting",c[c.Ready=2]="Ready",c[c.AfterWindowOpen=3]="AfterWindowOpen",c[c.Eventually=4]="Eventually"})(l||(e.LifecycleMainPhase=l={}));let v=class extends D.Disposable{static{y=this}static{this.QUIT_AND_RESTART_KEY="lifecycle.quitAndRestart"}get quitRequested(){return this._quitRequested}get wasRestarted(){return this._wasRestarted}get phase(){return this._phase}constructor(f,I,S){super(),this.logService=f,this.stateService=I,this.environmentMainService=S,this._onBeforeShutdown=this._register(new O.Emitter),this.onBeforeShutdown=this._onBeforeShutdown.event,this._onWillShutdown=this._register(new O.Emitter),this.onWillShutdown=this._onWillShutdown.event,this._onWillLoadWindow=this._register(new O.Emitter),this.onWillLoadWindow=this._onWillLoadWindow.event,this._onBeforeCloseWindow=this._register(new O.Emitter),this.onBeforeCloseWindow=this._onBeforeCloseWindow.event,this._quitRequested=!1,this._wasRestarted=!1,this._phase=1,this.windowToCloseRequest=new Set,this.oneTimeListenerTokenGenerator=0,this.windowCounter=0,this.pendingQuitPromise=void 0,this.pendingQuitPromiseResolve=void 0,this.pendingWillShutdownPromise=void 0,this.mapWindowIdToPendingUnload=new Map,this.phaseWhen=new Map,this.relaunchHandler=void 0,this.resolveRestarted(),this.when(2).then(()=>this.registerListeners())}resolveRestarted(){this._wasRestarted=!!this.stateService.getItem(y.QUIT_AND_RESTART_KEY),this._wasRestarted&&this.stateService.removeItem(y.QUIT_AND_RESTART_KEY)}registerListeners(){const f=()=>{this._quitRequested||(this.trace("Lifecycle#app.on(before-quit)"),this._quitRequested=!0,this.trace("Lifecycle#onBeforeShutdown.fire()"),this._onBeforeShutdown.fire(),P.isMacintosh&&this.windowCounter===0&&this.fireOnWillShutdown(1))};b.app.addListener("before-quit",f);const I=()=>{this.trace("Lifecycle#app.on(window-all-closed)"),(this._quitRequested||!P.isMacintosh)&&b.app.quit()};b.app.addListener("window-all-closed",I),b.app.once("will-quit",S=>{this.trace("Lifecycle#app.on(will-quit) - begin"),S.preventDefault(),this.fireOnWillShutdown(1).finally(()=>{this.trace("Lifecycle#app.on(will-quit) - after fireOnWillShutdown"),this.resolvePendingQuitPromise(!1),b.app.removeListener("before-quit",f),b.app.removeListener("window-all-closed",I),this.trace("Lifecycle#app.on(will-quit) - calling app.quit()"),b.app.quit()})})}fireOnWillShutdown(f){if(this.pendingWillShutdownPromise)return this.pendingWillShutdownPromise;const I=this.logService;this.trace("Lifecycle#onWillShutdown.fire()");const S=[];return this._onWillShutdown.fire({reason:f,join(t,a){I.trace(`Lifecycle#onWillShutdown - begin '${t}'`),S.push(a.finally(()=>{I.trace(`Lifecycle#onWillShutdown - end '${t}'`)}))}}),this.pendingWillShutdownPromise=(async()=>{try{await n.Promises.settled(S)}catch(t){this.logService.error(t)}try{await this.stateService.close()}catch(t){this.logService.error(t)}})(),this.pendingWillShutdownPromise}set phase(f){if(f<this.phase)throw new Error("Lifecycle cannot go backwards");if(this._phase===f)return;this.trace(`lifecycle (main): phase changed (value: ${f})`),this._phase=f;const I=this.phaseWhen.get(this._phase);I&&(I.open(),this.phaseWhen.delete(this._phase))}async when(f){if(f<=this._phase)return;let I=this.phaseWhen.get(f);I||(I=new n.Barrier,this.phaseWhen.set(f,I)),await I.wait()}registerWindow(f){const I=new D.DisposableStore;this.windowCounter++,I.add(f.onWillLoad(t=>this._onWillLoadWindow.fire({window:f,workspace:t.workspace,reason:t.reason})));const S=(0,d.assertIsDefined)(f.win);S.on("close",t=>{const a=f.id;if(this.windowToCloseRequest.has(a)){this.windowToCloseRequest.delete(a);return}this.trace(`Lifecycle#window.on('close') - window ID ${f.id}`),t.preventDefault(),this.unload(f,1).then(s=>{if(s){this.windowToCloseRequest.delete(a);return}this.windowToCloseRequest.add(a),this.trace(`Lifecycle#onBeforeCloseWindow.fire() - window ID ${a}`),this._onBeforeCloseWindow.fire(f),f.close()})}),S.on("closed",()=>{this.trace(`Lifecycle#window.on('closed') - window ID ${f.id}`),this.windowCounter--,I.dispose(),this.windowCounter===0&&(!P.isMacintosh||this._quitRequested)&&this.fireOnWillShutdown(1)})}async reload(f,I){await this.unload(f,3)||f.reload(I)}unload(f,I){const S=this.mapWindowIdToPendingUnload.get(f.id);if(S)return S;const t=this.doUnload(f,I).finally(()=>{this.mapWindowIdToPendingUnload.delete(f.id)});return this.mapWindowIdToPendingUnload.set(f.id,t),t}async doUnload(f,I){if(!f.isReady)return!1;this.trace(`Lifecycle#unload() - window ID ${f.id}`);const S=this._quitRequested?2:I,t=await this.onBeforeUnloadWindowInRenderer(f,S);return t?(this.trace(`Lifecycle#unload() - veto in renderer (window ID ${f.id})`),this.handleWindowUnloadVeto(t)):(await this.onWillUnloadWindowInRenderer(f,S),!1)}handleWindowUnloadVeto(f){return f?(this.resolvePendingQuitPromise(!0),this._quitRequested=!1,!0):!1}resolvePendingQuitPromise(f){this.pendingQuitPromiseResolve&&(this.pendingQuitPromiseResolve(f),this.pendingQuitPromiseResolve=void 0,this.pendingQuitPromise=void 0)}onBeforeUnloadWindowInRenderer(f,I){return new Promise(S=>{const t=this.oneTimeListenerTokenGenerator++,a=`vscode:ok${t}`,s=`vscode:cancel${t}`;A.validatedIpcMain.once(a,()=>{S(!1)}),A.validatedIpcMain.once(s,()=>{S(!0)}),f.send("vscode:onBeforeUnload",{okChannel:a,cancelChannel:s,reason:I})})}onWillUnloadWindowInRenderer(f,I){return new Promise(S=>{const a=`vscode:reply${this.oneTimeListenerTokenGenerator++}`;A.validatedIpcMain.once(a,()=>S()),f.send("vscode:onWillUnload",{replyChannel:a,reason:I})})}quit(f){return this.doQuit(f).then(I=>{if(!I&&f)try{if(P.isWindows){const S=(0,h.cwd)();S!==process.cwd()&&process.chdir(S)}}catch(S){this.logService.error(S)}return I})}doQuit(f){return this.trace(`Lifecycle#quit() - begin (willRestart: ${f})`),this.pendingQuitPromise?(this.trace("Lifecycle#quit() - returning pending quit promise"),this.pendingQuitPromise):(f&&this.stateService.setItem(y.QUIT_AND_RESTART_KEY,!0),this.pendingQuitPromise=new Promise(I=>{this.pendingQuitPromiseResolve=I,this.trace("Lifecycle#quit() - calling app.quit()"),b.app.quit()}),this.pendingQuitPromise)}trace(f){this.environmentMainService.args["enable-smoke-test-driver"]?this.logService.info(f):this.logService.trace(f)}setRelaunchHandler(f){this.relaunchHandler=f}async relaunch(f){this.trace("Lifecycle#relaunch()");const I=process.argv.slice(1);if(f?.addArgs&&I.push(...f.addArgs),f?.removeArgs)for(const a of f.removeArgs){const s=I.indexOf(a);s>=0&&I.splice(s,1)}const S=()=>{this.relaunchHandler?.handleRelaunch(f)||(this.trace("Lifecycle#relaunch() - calling app.relaunch()"),b.app.relaunch({args:I}))};b.app.once("quit",S),await this.quit(!0)&&b.app.removeListener("quit",S)}async kill(f){this.trace("Lifecycle#kill()"),await this.fireOnWillShutdown(2),await Promise.race([(0,n.timeout)(1e3),(async()=>{for(const I of b.BrowserWindow.getAllWindows())if(I&&!I.isDestroyed()){let S;I.webContents&&!I.webContents.isDestroyed()?S=new Promise(t=>I.once("closed",t)):S=Promise.resolve(),I.destroy(),await S}})()]),b.app.exit(f)}};e.LifecycleMainService=v,e.LifecycleMainService=v=y=be([Y(0,g.ILogService),Y(1,w.IStateService),Y(2,u.IEnvironmentMainService)],v)}),define(Z[288],ee([0,1,4,3,2,6,20]),function(H,e,b,A,n,O,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeyboardLayoutMainService=e.IKeyboardLayoutMainService=void 0,e.IKeyboardLayoutMainService=(0,O.createDecorator)("keyboardLayoutMainService");let P=class extends n.Disposable{constructor(m){super(),this._onDidChangeKeyboardLayout=this._register(new A.Emitter),this.onDidChangeKeyboardLayout=this._onDidChangeKeyboardLayout.event,this._initPromise=null,this._keyboardLayoutData=null,m.when(3).then(()=>this._initialize())}_initialize(){return this._initPromise||(this._initPromise=this._doInitialize()),this._initPromise}async _doInitialize(){const m=await new Promise((g,w)=>{H(["native-keymap"],g,w)});this._keyboardLayoutData=h(m),b.isCI||m.onDidChangeKeyboardLayout(()=>{this._keyboardLayoutData=h(m),this._onDidChangeKeyboardLayout.fire(this._keyboardLayoutData)})}async getKeyboardLayoutData(){return await this._initialize(),this._keyboardLayoutData}};e.KeyboardLayoutMainService=P,e.KeyboardLayoutMainService=P=be([Y(0,D.ILifecycleMainService)],P);function h(d){const m=d.getKeyMap(),g=d.getCurrentKeyboardLayout();return{keyboardMapping:m,keyboardLayoutInfo:g}}}),define(Z[289],ee([0,1,247,8,17,13,12,18,33,96,5,51,246,286]),function(H,e,b,A,n,O,D,P,h,d,m,g,w,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.nodeRequest=e.RequestService=void 0;let y=class extends g.AbstractRequestService{constructor(c,f,I,S){super(S),this.configurationService=c,this.environmentService=f,this.logService=I,this.configure(),this._register(c.onDidChangeConfiguration(t=>{t.affectsConfiguration("http")&&this.configure()}))}configure(){const c=this.configurationService.getValue("http");this.proxyUrl=c?.proxy,this.strictSSL=!!c?.proxyStrictSSL,this.authorization=c?.proxyAuthorization}async request(c,f){const{proxyUrl:I,strictSSL:S}=this;let t;try{t=await(0,d.getResolvedShellEnv)(this.configurationService,this.logService,this.environmentService.args,process.env)}catch(i){this.shellEnvErrorLogged||(this.shellEnvErrorLogged=!0,this.logService.error("resolving shell environment failed",(0,O.getErrorMessage)(i)))}const a={...process.env,...t},s=c.agent?c.agent:await(0,w.getProxyAgent)(c.url||"",a,{proxyUrl:I,strictSSL:S});return c.agent=s,c.strictSSL=S,this.authorization&&(c.headers={...c.headers||{},"Proxy-Authorization":this.authorization}),this.logAndRequest(c.isChromiumNetwork?"electron":"node",c,()=>l(c,f))}async resolveProxy(c){}};e.RequestService=y,e.RequestService=y=be([Y(0,P.IConfigurationService),Y(1,h.INativeEnvironmentService),Y(2,m.ILogService),Y(3,m.ILoggerService)],y);async function E(v){return((0,b.parse)(v.url).protocol==="https:"?await new Promise((I,S)=>{H(["https"],I,S)}):await new Promise((I,S)=>{H(["http"],I,S)})).request}async function l(v,c){return A.Promises.withAsyncBody(async(f,I)=>{const S=(0,b.parse)(v.url),t=v.getRawRequest?v.getRawRequest(v):await E(v),a={hostname:S.hostname,port:S.port?parseInt(S.port):S.protocol==="https:"?443:80,protocol:S.protocol,path:S.path,method:v.type||"GET",headers:v.headers,agent:v.agent,rejectUnauthorized:(0,D.isBoolean)(v.strictSSL)?v.strictSSL:!0};v.user&&v.password&&(a.auth=v.user+":"+v.password);const s=t(a,i=>{const r=(0,D.isNumber)(v.followRedirects)?v.followRedirects:3;if(i.statusCode&&i.statusCode>=300&&i.statusCode<400&&r>0&&i.headers.location)l({...v,url:i.headers.location,followRedirects:r-1},c).then(f,I);else{let o=i;!v.isChromiumNetwork&&i.headers["content-encoding"]==="gzip"&&(o=i.pipe((0,u.createGunzip)())),f({res:i,stream:(0,n.streamToBufferReadableStream)(o)})}});s.on("error",I),v.timeout&&s.setTimeout(v.timeout),v.isChromiumNetwork&&s.removeHeader("Content-Length"),v.data&&typeof v.data=="string"&&s.write(v.data),s.end(),c.onCancellationRequested(()=>{s.abort(),I(new O.CancellationError)})})}e.nodeRequest=l}),define(Z[290],ee([0,1,14,289]),function(H,e,b,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RequestMainService=void 0;function n(D){return b.net.request}class O extends A.RequestService{request(P,h){return super.request({...P||{},getRawRequest:n,isChromiumNetwork:!0},h)}}e.RequestMainService=O}),define(Z[83],ee([0,1,7,49,3,2,33,16,6,20,5,98,283,41,53,40]),function(H,e,b,A,n,O,D,P,h,d,m,g,w,u,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ApplicationStorageMainService=e.IApplicationStorageMainService=e.StorageMainService=e.IStorageMainService=void 0,e.IStorageMainService=(0,h.createDecorator)("storageMainService");let l=class extends O.Disposable{constructor(f,I,S,t,a,s){super(),this.logService=f,this.environmentService=I,this.userDataProfilesService=S,this.lifecycleMainService=t,this.fileService=a,this.uriIdentityService=s,this.shutdownReason=void 0,this._onDidChangeProfileStorage=this._register(new n.Emitter),this.onDidChangeProfileStorage=this._onDidChangeProfileStorage.event,this.applicationStorage=this.createApplicationStorage(),this.mapProfileToStorage=new Map,this.mapWorkspaceToStorage=new Map,this.registerListeners()}getStorageOptions(){return{useInMemoryStorage:!!this.environmentService.extensionTestsLocationURI}}registerListeners(){(async()=>(await this.lifecycleMainService.when(3),this.applicationStorage.init()))(),this._register(this.lifecycleMainService.onWillLoadWindow(f=>{f.window.profile&&this.profileStorage(f.window.profile).init(),f.workspace&&this.workspaceStorage(f.workspace).init()})),this._register(this.lifecycleMainService.onWillShutdown(f=>{this.logService.trace("storageMainService#onWillShutdown()"),this.shutdownReason=f.reason,f.join("applicationStorage",this.applicationStorage.close());for(const[,I]of this.mapProfileToStorage)f.join("profileStorage",I.close());for(const[,I]of this.mapWorkspaceToStorage)f.join("workspaceStorage",I.close())})),this._register(this.userDataProfilesService.onWillCreateProfile(f=>{f.join((async()=>{await this.fileService.exists(f.profile.globalStorageHome)||await this.fileService.createFolder(f.profile.globalStorageHome)})())})),this._register(this.userDataProfilesService.onWillRemoveProfile(f=>{const I=this.mapProfileToStorage.get(f.profile.id);I&&f.join(I.close())}))}createApplicationStorage(){this.logService.trace("StorageMainService: creating application storage");const f=new w.ApplicationStorageMain(this.getStorageOptions(),this.userDataProfilesService,this.logService,this.fileService);return(0,A.once)(f.onDidCloseStorage)(()=>{this.logService.trace("StorageMainService: closed application storage")}),f}profileStorage(f){if((0,g.isProfileUsingDefaultStorage)(f))return this.applicationStorage;let I=this.mapProfileToStorage.get(f.id);if(!I){this.logService.trace(`StorageMainService: creating profile storage (${f.name})`),I=this.createProfileStorage(f),this.mapProfileToStorage.set(f.id,I);const S=this._register(I.onDidChangeStorage(t=>this._onDidChangeProfileStorage.fire({...t,storage:I,profile:f})));(0,A.once)(I.onDidCloseStorage)(()=>{this.logService.trace(`StorageMainService: closed profile storage (${f.name})`),this.mapProfileToStorage.delete(f.id),S.dispose()})}return I}createProfileStorage(f){return this.shutdownReason===2?new w.InMemoryStorageMain(this.logService,this.fileService):new w.ProfileStorageMain(f,this.getStorageOptions(),this.logService,this.fileService)}workspaceStorage(f){let I=this.mapWorkspaceToStorage.get(f.id);return I||(this.logService.trace(`StorageMainService: creating workspace storage (${f.id})`),I=this.createWorkspaceStorage(f),this.mapWorkspaceToStorage.set(f.id,I),(0,A.once)(I.onDidCloseStorage)(()=>{this.logService.trace(`StorageMainService: closed workspace storage (${f.id})`),this.mapWorkspaceToStorage.delete(f.id)})),I}createWorkspaceStorage(f){return this.shutdownReason===2?new w.InMemoryStorageMain(this.logService,this.fileService):new w.WorkspaceStorageMain(f,this.getStorageOptions(),this.logService,this.environmentService,this.fileService)}isUsed(f){const I=b.URI.file(f);for(const S of[this.applicationStorage,...this.mapProfileToStorage.values(),...this.mapWorkspaceToStorage.values()])if(S.path&&this.uriIdentityService.extUri.isEqualOrParent(b.URI.file(S.path),I))return!0;return!1}};e.StorageMainService=l,e.StorageMainService=l=be([Y(0,m.ILogService),Y(1,D.IEnvironmentService),Y(2,y.IUserDataProfilesMainService),Y(3,d.ILifecycleMainService),Y(4,P.IFileService),Y(5,E.IUriIdentityService)],l),e.IApplicationStorageMainService=(0,h.createDecorator)("applicationStorageMainService");let v=class extends g.AbstractStorageService{constructor(f,I){super(),this.userDataProfilesService=f,this.storageMainService=I,this.whenReady=this.storageMainService.applicationStorage.whenInit}doInitialize(){return this.storageMainService.applicationStorage.whenInit}getStorage(f){if(f===-1)return this.storageMainService.applicationStorage.storage}getLogDetails(f){if(f===-1)return this.userDataProfilesService.defaultProfile.globalStorageHome.fsPath}shouldFlushWhenIdle(){return!1}switch(){throw new Error("Migrating storage is unsupported from main process")}switchToProfile(){throw new Error("Switching storage profile is unsupported from main process")}switchToWorkspace(){throw new Error("Switching storage workspace is unsupported from main process")}hasScope(){throw new Error("Main process is never profile or workspace scoped")}};e.ApplicationStorageMainService=v,e.ApplicationStorageMainService=v=be([Y(0,u.IUserDataProfilesService),Y(1,e.IStorageMainService)],v)}),define(Z[291],ee([0,1,14,23,3,57,2,31,77,117,5,22,83,29]),function(H,e,b,A,n,O,D,P,h,d,m,g,w,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProxyAuthHandler=void 0;var y;(function(l){l[l.Initial=1]="Initial",l[l.StoredCredentialsUsed=2]="StoredCredentialsUsed",l[l.LoginDialogShown=3]="LoginDialogShown"})(y||(y={}));let E=class extends D.Disposable{constructor(v,c,f,I,S,t){super(),this.logService=v,this.windowsMainService=c,this.credentialsService=f,this.encryptionMainService=I,this.applicationStorageMainService=S,this.productService=t,this.OLD_PROXY_CREDENTIALS_SERVICE_KEY=`${this.productService.urlProtocol}.proxy-credentials`,this.PROXY_CREDENTIALS_SERVICE_KEY="proxy-credentials://",this.pendingProxyResolve=void 0,this.state=y.Initial,this.sessionCredentials=void 0,this.registerListeners()}registerListeners(){const v=n.Event.fromNodeEventEmitter(b.app,"login",(c,f,I,S,t)=>({event:c,webContents:f,req:I,authInfo:S,callback:t}));this._register(v(this.onLogin,this))}async onLogin({event:v,authInfo:c,req:f,callback:I}){if(!c.isProxy)return;if(!this.pendingProxyResolve&&this.state===y.LoginDialogShown&&f.firstAuthAttempt){this.logService.trace("auth#onLogin (proxy) - exit - proxy dialog already shown");return}v.preventDefault();let S;if(this.pendingProxyResolve)this.logService.trace("auth#onLogin (proxy) - pending proxy handling found"),S=await this.pendingProxyResolve;else{this.logService.trace("auth#onLogin (proxy) - no pending proxy handling found, starting new"),this.pendingProxyResolve=this.resolveProxyCredentials(c);try{S=await this.pendingProxyResolve}finally{this.pendingProxyResolve=void 0}}I(S?.username,S?.password)}async resolveProxyCredentials(v){this.logService.trace("auth#resolveProxyCredentials (proxy) - enter");try{const c=await this.doResolveProxyCredentials(v);if(c)return this.logService.trace("auth#resolveProxyCredentials (proxy) - got credentials"),c;this.logService.trace("auth#resolveProxyCredentials (proxy) - did not get credentials")}finally{this.logService.trace("auth#resolveProxyCredentials (proxy) - exit")}}async getAndMigrateProxyCredentials(v){try{let c=this.applicationStorageMainService.get(this.PROXY_CREDENTIALS_SERVICE_KEY+v,-1),f;if(c||(c=await this.credentialsService.getPassword(this.OLD_PROXY_CREDENTIALS_SERVICE_KEY,v)??void 0,c&&(f=await this.encryptionMainService.decrypt(c),c=await this.encryptionMainService.encrypt(f),this.applicationStorageMainService.store(this.PROXY_CREDENTIALS_SERVICE_KEY+v,c,-1,1),await this.credentialsService.deletePassword(this.OLD_PROXY_CREDENTIALS_SERVICE_KEY,v))),c){const I=JSON.parse(f??await this.encryptionMainService.decrypt(c));return{storedUsername:I.username,storedPassword:I.password}}}catch(c){this.logService.error(c)}return{storedUsername:void 0,storedPassword:void 0}}async doResolveProxyCredentials(v){this.logService.trace("auth#doResolveProxyCredentials - enter",v);const c=String((0,O.hash)({scheme:v.scheme,host:v.host,port:v.port})),{storedUsername:f,storedPassword:I}=await this.getAndMigrateProxyCredentials(c);if(this.state!==y.StoredCredentialsUsed&&typeof f=="string"&&typeof I=="string")return this.logService.trace("auth#doResolveProxyCredentials (proxy) - exit - found stored credentials to use"),this.state=y.StoredCredentialsUsed,{username:f,password:I};const S=this.windowsMainService.getFocusedWindow()||this.windowsMainService.getLastActiveWindow();if(!S){this.logService.trace("auth#doResolveProxyCredentials (proxy) - exit - no opened window found to show dialog in");return}this.logService.trace(`auth#doResolveProxyCredentials (proxy) - asking window ${S.id} to handle proxy login`);const t={authInfo:v,username:this.sessionCredentials?.username??f,password:this.sessionCredentials?.password??I,replyChannel:`vscode:proxyAuthResponse:${(0,P.generateUuid)()}`};S.sendWhenReady("vscode:openProxyAuthenticationDialog",A.CancellationToken.None,t),this.state=y.LoginDialogShown;const a=await new Promise(s=>{const i=async(r,o,p)=>{if(o===t.replyChannel)if(this.logService.trace(`auth#doResolveProxyCredentials - exit - received credentials from window ${S.id}`),S.win?.webContents.off("ipc-message",i),p){const k={username:p.username,password:p.password};try{if(p.remember){const M=await this.encryptionMainService.encrypt(JSON.stringify(k));this.applicationStorageMainService.store(this.PROXY_CREDENTIALS_SERVICE_KEY+c,M,-1,1)}else this.applicationStorageMainService.remove(this.PROXY_CREDENTIALS_SERVICE_KEY+c,-1)}catch(M){this.logService.error(M)}s({username:k.username,password:k.password})}else s(void 0)};S.win?.webContents.on("ipc-message",i)});return this.sessionCredentials=a,a}};e.ProxyAuthHandler=E,e.ProxyAuthHandler=E=be([Y(0,m.ILogService),Y(1,u.IWindowsMainService),Y(2,h.ICredentialsMainService),Y(3,d.IEncryptionMainService),Y(4,w.IApplicationStorageMainService),Y(5,g.IProductService)],E)}),define(Z[292],ee([0,1,88,27,105,101,8,2,4,18,5,22,242,243,97,128,17]),function(H,e,b,A,n,O,D,P,h,d,m,g,w,u,y,E,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SharedTunnelsService=e.TunnelService=e.BaseTunnelService=e.NodeRemoteTunnel=void 0;async function v(t,a,s,i,r){let o;for(let p=3;p&&(o?.dispose(),o=await new c(t,a,s,i,r).waitForReady(),!(r&&n.BROWSER_RESTRICTED_PORTS[r]||!n.BROWSER_RESTRICTED_PORTS[o.tunnelLocalPort]));p--);return o}class c extends P.Disposable{constructor(a,s,i,r,o){super(),this.defaultTunnelHost=s,this.suggestedLocalPort=o,this.privacy=E.TunnelPrivacyId.Private,this._socketsDispose=new Map,this._options=a,this._server=b.createServer(),this._barrier=new D.Barrier,this._listeningListener=()=>this._barrier.open(),this._server.on("listening",this._listeningListener),this._connectionListener=p=>this._onConnection(p),this._server.on("connection",this._connectionListener),this._errorListener=()=>{},this._server.on("error",this._errorListener),this.tunnelRemotePort=r,this.tunnelRemoteHost=i}async dispose(){super.dispose(),this._server.removeListener("listening",this._listeningListener),this._server.removeListener("connection",this._connectionListener),this._server.removeListener("error",this._errorListener),this._server.close(),Array.from(this._socketsDispose.values()).forEach(s=>{s()})}async waitForReady(){const a=this.suggestedLocalPort??this.tunnelRemotePort,s=(0,E.isAllInterfaces)(this.defaultTunnelHost)?"0.0.0.0":"127.0.0.1";let i=await(0,n.findFreePortFaster)(a,2,1e3,s),r=null;return this._server.listen(i,this.defaultTunnelHost),await this._barrier.wait(),r=this._server.address(),r||(i=0,this._server.listen(i,this.defaultTunnelHost),await this._barrier.wait(),r=this._server.address()),this.tunnelLocalPort=r.port,this.localAddress=`${this.tunnelRemoteHost==="127.0.0.1"?"127.0.0.1":"localhost"}:${r.port}`,this}async _onConnection(a){a.pause();const s=(0,E.isLocalhost)(this.tunnelRemoteHost)||(0,E.isAllInterfaces)(this.tunnelRemoteHost)?"localhost":this.tunnelRemoteHost,i=await(0,w.connectRemoteAgentTunnel)(this._options,s,this.tunnelRemotePort),r=i.getSocket(),o=i.readEntireBuffer();i.dispose(),o.byteLength>0&&a.write(o.buffer),a.on("end",()=>{a.localAddress&&this._socketsDispose.delete(a.localAddress),r.end()}),a.on("close",()=>r.end()),a.on("error",()=>{a.localAddress&&this._socketsDispose.delete(a.localAddress),r instanceof O.NodeSocket?r.socket.destroy():r.end()}),r instanceof O.NodeSocket?this._mirrorNodeSocket(a,r):this._mirrorGenericSocket(a,r),a.localAddress&&this._socketsDispose.set(a.localAddress,()=>{a.end(),r.end()})}_mirrorGenericSocket(a,s){s.onClose(()=>a.destroy()),s.onEnd(()=>a.end()),s.onData(i=>a.write(i.buffer)),a.on("data",i=>s.write(l.VSBuffer.wrap(i))),a.resume()}_mirrorNodeSocket(a,s){const i=s.socket;i.on("end",()=>a.end()),i.on("close",()=>a.end()),i.on("error",()=>{a.destroy()}),i.pipe(a),a.pipe(i)}}e.NodeRemoteTunnel=c;let f=class extends E.AbstractTunnelService{constructor(a,s,i,r,o){super(s,o),this.remoteSocketFactoryService=a,this.signService=i,this.productService=r}isPortPrivileged(a){return(0,E.isPortPrivileged)(a,this.defaultTunnelHost,h.OS,A.release())}retainOrCreateTunnel(a,s,i,r,o,p,k,M){const C=this.getTunnelFromMap(s,i);if(C)return++C.refcount,C.value;if((0,E.isTunnelProvider)(a))return this.createWithProvider(a,s,i,o,p,k,M);{this.logService.trace(`ForwardedPorts: (TunnelService) Creating tunnel without provider ${s}:${i} on local port ${o}.`);const L={commit:this.productService.commit,quality:this.productService.quality,addressProvider:a,remoteSocketFactoryService:this.remoteSocketFactoryService,signService:this.signService,logService:this.logService,ipcLogger:null},T=v(L,r,s,i,o);return this.logService.trace("ForwardedPorts: (TunnelService) Tunnel created without provider."),this.addTunnelToMap(s,i,T),T}}};e.BaseTunnelService=f,e.BaseTunnelService=f=be([Y(0,u.IRemoteSocketFactoryService),Y(1,m.ILogService),Y(2,y.ISignService),Y(3,g.IProductService),Y(4,d.IConfigurationService)],f);let I=class extends f{constructor(a,s,i,r,o){super(a,s,i,r,o)}};e.TunnelService=I,e.TunnelService=I=be([Y(0,u.IRemoteSocketFactoryService),Y(1,m.ILogService),Y(2,y.ISignService),Y(3,g.IProductService),Y(4,d.IConfigurationService)],I);let S=class extends P.Disposable{constructor(a,s,i,r,o){super(),this.remoteSocketFactoryService=a,this.logService=s,this.productService=i,this.signService=r,this.configurationService=o,this._tunnelServices=new Map}async openTunnel(a,s,i,r,o,p,k,M,C){if(this.logService.trace(`ForwardedPorts: (SharedTunnelService) openTunnel request for ${i}:${r} on local port ${p}.`),!this._tunnelServices.has(a)){const L=new I(this.remoteSocketFactoryService,this.logService,this.signService,this.productService,this.configurationService);this._register(L),this._tunnelServices.set(a,L),L.onTunnelClosed(async()=>{(await L.tunnels).length===0&&(L.dispose(),this._tunnelServices.delete(a))})}return this._tunnelServices.get(a).openTunnel(s,i,r,o,p,k,M,C)}};e.SharedTunnelsService=S,e.SharedTunnelsService=S=be([Y(0,u.IRemoteSocketFactoryService),Y(1,m.ILogService),Y(2,g.IProductService),Y(3,y.ISignService),Y(4,d.IConfigurationService)],S)}),define(Z[102],ee([0,1,8,23,3,18,28,20,5,22,51,48]),function(H,e,b,A,n,O,D,P,h,d,m,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractUpdateService=e.createUpdateURL=void 0;function w(y,E,l){return`${l.updateUrl}/api/update/${y}/${E}/${l.commit}`}e.createUpdateURL=w;let u=class{get state(){return this._state}setState(E){this.logService.info("update#setState",E.type),this._state=E,this._onStateChange.fire(E)}constructor(E,l,v,c,f,I){this.lifecycleMainService=E,this.configurationService=l,this.environmentMainService=v,this.requestService=c,this.logService=f,this.productService=I,this._state=g.State.Uninitialized,this._onStateChange=new n.Emitter,this.onStateChange=this._onStateChange.event,E.when(3).finally(()=>this.initialize())}async initialize(){if(!this.environmentMainService.isBuilt){this.setState(g.State.Disabled(0));return}if(this.environmentMainService.disableUpdates){this.setState(g.State.Disabled(1)),this.logService.info("update#ctor - updates are disabled by the environment");return}if(!this.productService.updateUrl||!this.productService.commit){this.setState(g.State.Disabled(3)),this.logService.info("update#ctor - updates are disabled as there is no update URL");return}const E=this.configurationService.getValue("update.mode"),l=this.getProductQuality(E);if(!l){this.setState(g.State.Disabled(2)),this.logService.info("update#ctor - updates are disabled by user preference");return}if(this.url=this.buildUpdateFeedUrl(l),!this.url){this.setState(g.State.Disabled(4)),this.logService.info("update#ctor - updates are disabled as the update URL is badly formed");return}if(this.setState(g.State.Idle(this.getUpdateType())),E==="manual"){this.logService.info("update#ctor - manual checks only; automatic updates are disabled by user preference");return}E==="start"?(this.logService.info("update#ctor - startup checks only; automatic updates are disabled by user preference"),setTimeout(()=>this.checkForUpdates(!1),30*1e3)):this.scheduleCheckForUpdates(30*1e3).then(void 0,v=>this.logService.error(v))}getProductQuality(E){return E==="none"?void 0:this.productService.quality}scheduleCheckForUpdates(E=60*60*1e3){return(0,b.timeout)(E).then(()=>this.checkForUpdates(!1)).then(()=>this.scheduleCheckForUpdates(60*60*1e3))}async checkForUpdates(E){this.logService.trace("update#checkForUpdates, state = ",this.state.type),this.state.type==="idle"&&this.doCheckForUpdates(E)}async downloadUpdate(){this.logService.trace("update#downloadUpdate, state = ",this.state.type),this.state.type==="available for download"&&await this.doDownloadUpdate(this.state)}async doDownloadUpdate(E){}async applyUpdate(){this.logService.trace("update#applyUpdate, state = ",this.state.type),this.state.type==="downloaded"&&await this.doApplyUpdate()}async doApplyUpdate(){}quitAndInstall(){return this.logService.trace("update#quitAndInstall, state = ",this.state.type),this.state.type!=="ready"||(this.logService.trace("update#quitAndInstall(): before lifecycle quit()"),this.lifecycleMainService.quit(!0).then(E=>{this.logService.trace(`update#quitAndInstall(): after lifecycle quit() with veto: ${E}`),!E&&(this.logService.trace("update#quitAndInstall(): running raw#quitAndInstall()"),this.doQuitAndInstall())})),Promise.resolve(void 0)}async isLatestVersion(){if(!this.url)return;if(this.configurationService.getValue("update.mode")==="none")return!1;try{return(await this.requestService.request({url:this.url},A.CancellationToken.None)).res.statusCode===204}catch(l){this.logService.error("update#isLatestVersion(): failed to check for updates"),this.logService.error(l);return}}async _applySpecificUpdate(E){}getUpdateType(){return 1}doQuitAndInstall(){}};e.AbstractUpdateService=u,e.AbstractUpdateService=u=be([Y(0,P.ILifecycleMainService),Y(1,O.IConfigurationService),Y(2,D.IEnvironmentMainService),Y(3,m.IRequestService),Y(4,h.ILogService),Y(5,d.IProductService)],u)}),define(Z[293],ee([0,1,14,55,3,2,18,28,20,5,22,51,25,48,102]),function(H,e,b,A,n,O,D,P,h,d,m,g,w,u,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DarwinUpdateService=void 0;let E=class extends y.AbstractUpdateService{get onRawError(){return n.Event.fromNodeEventEmitter(b.autoUpdater,"error",(v,c)=>c)}get onRawUpdateNotAvailable(){return n.Event.fromNodeEventEmitter(b.autoUpdater,"update-not-available")}get onRawUpdateAvailable(){return n.Event.fromNodeEventEmitter(b.autoUpdater,"update-available",(v,c,f)=>({url:c,version:f,productVersion:f}))}get onRawUpdateDownloaded(){return n.Event.fromNodeEventEmitter(b.autoUpdater,"update-downloaded",(v,c,f,I)=>({releaseNotes:c,version:f,productVersion:f,date:I}))}constructor(v,c,f,I,S,t,a){super(v,c,I,S,t,a),this.telemetryService=f,this.disposables=new O.DisposableStore,v.setRelaunchHandler(this)}handleRelaunch(v){return v?.addArgs||v?.removeArgs||this.state.type!=="ready"?!1:(this.logService.trace("update#handleRelaunch(): running raw#quitAndInstall()"),this.doQuitAndInstall(),!0)}async initialize(){await super.initialize(),this.onRawError(this.onError,this,this.disposables),this.onRawUpdateAvailable(this.onUpdateAvailable,this,this.disposables),this.onRawUpdateDownloaded(this.onUpdateDownloaded,this,this.disposables),this.onRawUpdateNotAvailable(this.onUpdateNotAvailable,this,this.disposables)}onError(v){this.logService.error("UpdateService error:",v);const c=this.state.type==="checking for updates"&&this.state.explicit?v:void 0;this.setState(u.State.Idle(1,c))}buildUpdateFeedUrl(v){let c;this.productService.darwinUniversalAssetId?c=this.productService.darwinUniversalAssetId:c=process.arch==="x64"?"darwin":"darwin-arm64";const f=(0,y.createUpdateURL)(c,v,this.productService);try{b.autoUpdater.setFeedURL({url:f})}catch(I){this.logService.error("Failed to set update feed URL",I);return}return f}doCheckForUpdates(v){this.setState(u.State.CheckingForUpdates(v)),b.autoUpdater.checkForUpdates()}onUpdateAvailable(v){this.state.type==="checking for updates"&&this.setState(u.State.Downloading(v))}onUpdateDownloaded(v){this.state.type==="downloading"&&(this.telemetryService.publicLog2("update:downloaded",{version:v.version}),this.setState(u.State.Ready(v)))}onUpdateNotAvailable(){this.state.type==="checking for updates"&&(this.telemetryService.publicLog2("update:notAvailable",{explicit:this.state.explicit}),this.setState(u.State.Idle(1)))}doQuitAndInstall(){this.logService.trace("update#quitAndInstall(): running raw#quitAndInstall()"),b.autoUpdater.quitAndInstall()}dispose(){this.disposables.dispose()}};e.DarwinUpdateService=E,be([A.memoize],E.prototype,"onRawError",null),be([A.memoize],E.prototype,"onRawUpdateNotAvailable",null),be([A.memoize],E.prototype,"onRawUpdateAvailable",null),be([A.memoize],E.prototype,"onRawUpdateDownloaded",null),e.DarwinUpdateService=E=be([Y(0,h.ILifecycleMainService),Y(1,D.IConfigurationService),Y(2,w.ITelemetryService),Y(3,P.IEnvironmentMainService),Y(4,g.IRequestService),Y(5,d.ILogService),Y(6,m.IProductService)],E)}),define(Z[294],ee([0,1,47,45,8,3,10,28,20,5,25,48]),function(H,e,b,A,n,O,D,P,h,d,m,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnapUpdateService=void 0;let w=class{get state(){return this._state}setState(E){this.logService.info("update#setState",E.type),this._state=E,this._onStateChange.fire(E)}constructor(E,l,v){if(this.lifecycleMainService=E,this.logService=v,this._state=g.State.Uninitialized,this._onStateChange=new O.Emitter,this.onStateChange=this._onStateChange.event,l.disableUpdates){this.logService.info("update#ctor - updates are disabled");return}this.setState(g.State.Idle(this.getUpdateType())),this.scheduleCheckForUpdates(30*1e3).then(void 0,c=>this.logService.error(c))}scheduleCheckForUpdates(E=60*60*1e3){return(0,n.timeout)(E).then(()=>this.checkForUpdates(!1)).then(()=>this.scheduleCheckForUpdates(60*60*1e3))}async checkForUpdates(E){this.logService.trace("update#checkForUpdates, state = ",this.state.type),this.state.type==="idle"&&this.doCheckForUpdates(E)}async downloadUpdate(){this.logService.trace("update#downloadUpdate, state = ",this.state.type),this.state.type==="available for download"&&await this.doDownloadUpdate(this.state)}doDownloadUpdate(E){return Promise.resolve(void 0)}async applyUpdate(){this.logService.trace("update#applyUpdate, state = ",this.state.type),this.state.type==="downloaded"&&await this.doApplyUpdate()}doApplyUpdate(){return Promise.resolve(void 0)}quitAndInstall(){return this.logService.trace("update#quitAndInstall, state = ",this.state.type),this.state.type!=="ready"||(this.logService.trace("update#quitAndInstall(): before lifecycle quit()"),this.lifecycleMainService.quit(!0).then(E=>{this.logService.trace(`update#quitAndInstall(): after lifecycle quit() with veto: ${E}`),!E&&(this.logService.trace("update#quitAndInstall(): running raw#quitAndInstall()"),this.doQuitAndInstall())})),Promise.resolve(void 0)}getUpdateType(){return 2}doQuitAndInstall(){}async _applySpecificUpdate(E){}};w=be([Y(0,h.ILifecycleMainService),Y(1,P.IEnvironmentMainService),Y(2,d.ILogService)],w);let u=class extends w{constructor(E,l,v,c,f,I){super(v,c,f),this.snap=E,this.snapRevision=l,this.telemetryService=I;const S=(0,A.watch)(D.dirname(this.snap)),t=O.Event.fromNodeEventEmitter(S,"change",(r,o)=>o),a=O.Event.filter(t,r=>r==="current"),i=O.Event.debounce(a,(r,o)=>o,2e3)(()=>this.checkForUpdates(!1));v.onWillShutdown(()=>{i.dispose(),S.close()})}doCheckForUpdates(){this.setState(g.State.CheckingForUpdates(!1)),this.isUpdateAvailable().then(E=>{E?this.setState(g.State.Ready({version:"something",productVersion:"something"})):(this.telemetryService.publicLog2("update:notAvailable",{explicit:!1}),this.setState(g.State.Idle(2)))},E=>{this.logService.error(E),this.telemetryService.publicLog2("update:notAvailable",{explicit:!1}),this.setState(g.State.Idle(2,E.message||E))})}doQuitAndInstall(){this.logService.trace("update#quitAndInstall(): running raw#quitAndInstall()"),(0,b.spawn)("sleep 3 && "+D.basename(process.argv[0]),{shell:!0,detached:!0,stdio:"ignore"})}async isUpdateAvailable(){const E=await new Promise((v,c)=>(0,A.realpath)(`${D.dirname(this.snap)}/current`,(f,I)=>f?c(f):v(I))),l=D.basename(E);return this.snapRevision!==l}isLatestVersion(){return this.isUpdateAvailable().then(void 0,E=>{this.logService.error("update#checkForSnapUpdate(): Could not get realpath of application.")})}};e.SnapUpdateService=u,e.SnapUpdateService=u=be([Y(2,h.ILifecycleMainService),Y(3,P.IEnvironmentMainService),Y(4,d.ILogService),Y(5,m.ITelemetryService)],u)}),define(Z[295],ee([0,1,2,20,53,30,8,29]),function(H,e,b,A,n,O,D,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataProfilesHandler=void 0;let h=class extends b.Disposable{constructor(m,g,w){super(),this.userDataProfilesService=g,this.windowsMainService=w,this._register(m.onWillLoadWindow(u=>{u.reason===2&&this.unsetProfileForWorkspace(u.window)})),this._register(m.onBeforeCloseWindow(u=>this.unsetProfileForWorkspace(u))),this._register(new D.RunOnceScheduler(()=>this.cleanUpEmptyWindowAssociations(),30*1e3)).schedule()}async unsetProfileForWorkspace(m){const g=this.getWorkspace(m),w=this.userDataProfilesService.getProfileForWorkspace(g);w?.isTransient&&(this.userDataProfilesService.unsetWorkspace(g,w.isTransient),w.isTransient&&await this.userDataProfilesService.cleanUpTransientProfiles())}getWorkspace(m){return m.openedWorkspace??(0,O.toWorkspaceIdentifier)(m.backupPath,m.isExtensionDevelopmentHost)}cleanUpEmptyWindowAssociations(){const m=this.userDataProfilesService.getAssociatedEmptyWindows();if(m.length===0)return;const g=this.windowsMainService.getWindows().map(w=>this.getWorkspace(w));for(const w of m)g.some(u=>u.id===w.id)||this.userDataProfilesService.unsetWorkspace(w,!1)}};e.UserDataProfilesHandler=h,e.UserDataProfilesHandler=h=be([Y(0,A.ILifecycleMainService),Y(1,n.IUserDataProfilesMainService),Y(2,P.IWindowsMainService)],h)}),define(Z[62],ee([0,1,14,2,3,5,314,8,15,29,71,25,20,74,37,4,133]),function(H,e,b,A,n,O,D,P,h,d,m,g,w,u,y,E,l){"use strict";var v;Object.defineProperty(e,"__esModule",{value:!0}),e.WindowUtilityProcess=e.UtilityProcess=void 0;function c(S){return typeof S.responseWindowId=="number"}let f=class extends A.Disposable{static{v=this}static{this.ID_COUNTER=0}static{this.all=new Map}static getAll(){return Array.from(v.all.values())}constructor(t,a,s){super(),this.logService=t,this.telemetryService=a,this.lifecycleMainService=s,this.id=String(++v.ID_COUNTER),this._onStdout=this._register(new n.Emitter),this.onStdout=this._onStdout.event,this._onStderr=this._register(new n.Emitter),this.onStderr=this._onStderr.event,this._onMessage=this._register(new n.Emitter),this.onMessage=this._onMessage.event,this._onExit=this._register(new n.Emitter),this.onExit=this._onExit.event,this._onCrash=this._register(new n.Emitter),this.onCrash=this._onCrash.event,this.process=void 0,this.processPid=void 0,this.configuration=void 0}log(t,a){let s;switch(this.configuration?.correlationId?s=`[UtilityProcess id: ${this.configuration?.correlationId}, type: ${this.configuration?.type}, pid: ${this.processPid??"<none>"}]: ${t}`:s=`[UtilityProcess type: ${this.configuration?.type}, pid: ${this.processPid??"<none>"}]: ${t}`,a){case m.default.Error:this.logService.error(s);break;case m.default.Warning:this.logService.warn(s);break;case m.default.Info:this.logService.trace(s);break}}validateCanStart(){return this.process?(this.log("Cannot start utility process because it is already running...",m.default.Error),!1):!0}start(t){const a=this.doStart(t);return a&&t.payload&&this.postMessage(t.payload),a}doStart(t){if(!this.validateCanStart())return!1;this.configuration=t;const a=`${this.configuration.type}-${this.id}`,s=h.FileAccess.asFileUri("bootstrap-fork.js").fsPath,i=this.configuration.args??[],r=this.configuration.execArgv??[],o=this.configuration.allowLoadingUnsignedLibraries,p=this.configuration.forceAllocationsToV8Sandbox,k="pipe",M=this.createEnv(t);return this.log("creating new...",m.default.Info),this.process=b.utilityProcess.fork(s,i,{serviceName:a,env:M,execArgv:r,allowLoadingUnsignedLibraries:o,forceAllocationsToV8Sandbox:p,stdio:k}),this.registerListeners(this.process,this.configuration,a),!0}createEnv(t){const a=t.env?{...t.env}:{...(0,y.deepClone)(process.env)};a.VSCODE_AMD_ENTRYPOINT=t.entryPoint,typeof t.parentLifecycleBound=="number"&&(a.VSCODE_PARENT_PID=String(t.parentLifecycleBound)),a.VSCODE_CRASH_REPORTER_PROCESS_TYPE=t.type,E.isWindows&&((0,l.isUNCAccessRestrictionsDisabled)()?a.NODE_DISABLE_UNC_ACCESS_CHECKS="1":a.NODE_UNC_HOST_ALLOWLIST=(0,l.getUNCHostAllowlist)().join("\\")),(0,u.removeDangerousEnvVariables)(a);for(const s of Object.keys(a))a[s]=String(a[s]);return a}registerListeners(t,a,s){if(t.stdout){const i=new D.StringDecoder("utf-8");this._register(n.Event.fromNodeEventEmitter(t.stdout,"data")(r=>this._onStdout.fire(typeof r=="string"?r:i.write(r))))}if(t.stderr){const i=new D.StringDecoder("utf-8");this._register(n.Event.fromNodeEventEmitter(t.stderr,"data")(r=>this._onStderr.fire(typeof r=="string"?r:i.write(r))))}this._register(n.Event.fromNodeEventEmitter(t,"message")(i=>this._onMessage.fire(i))),this._register(n.Event.fromNodeEventEmitter(t,"spawn")(()=>{this.processPid=t.pid,typeof t.pid=="number"&&v.all.set(t.pid,{pid:t.pid,name:c(a)?`${a.type} [${a.responseWindowId}]`:a.type}),this.log("successfully created",m.default.Info)})),this._register(n.Event.fromNodeEventEmitter(t,"exit")(i=>{this.log(`received exit event with code ${i}`,m.default.Info),this._onExit.fire({pid:this.processPid,code:i,signal:"unknown"}),this.onDidExitOrCrashOrKill()})),this._register(n.Event.fromNodeEventEmitter(b.app,"child-process-gone",(i,r)=>({event:i,details:r}))(({details:i})=>{i.type==="Utility"&&i.name===s&&(this.log(`crashed with code ${i.exitCode} and reason '${i.reason}'`,m.default.Error),this.telemetryService.publicLog2("utilityprocesscrash",{type:a.type,reason:i.reason,code:i.exitCode}),this._onCrash.fire({pid:this.processPid,code:i.exitCode,reason:i.reason}),this.onDidExitOrCrashOrKill())}))}once(t,a){const s=this._register(this._onMessage.event(i=>{i===t&&(s.dispose(),a())}))}postMessage(t,a){this.process&&this.process.postMessage(t,a)}connect(t){const{port1:a,port2:s}=new b.MessageChannelMain;return this.postMessage(t,[s]),a}enableInspectPort(){if(!this.process||typeof this.processPid!="number")return!1;this.log("enabling inspect port",m.default.Info);const t=process;return typeof t._debugProcess=="function"?(t._debugProcess(this.processPid),!0):!1}kill(){if(!this.process)return;this.log("attempting to kill the process...",m.default.Info),this.process.kill()?(this.log("successfully killed the process",m.default.Info),this.onDidExitOrCrashOrKill()):this.log("unable to kill the process",m.default.Warning)}onDidExitOrCrashOrKill(){typeof this.processPid=="number"&&v.all.delete(this.processPid),this.process=void 0}async waitForExit(t){this.process&&(this.log("waiting to exit...",m.default.Info),await Promise.race([n.Event.toPromise(this.onExit),(0,P.timeout)(t)]),this.process&&(this.log(`did not exit within ${t}ms, will kill it now...`,m.default.Info),this.kill()))}};e.UtilityProcess=f,e.UtilityProcess=f=v=be([Y(0,O.ILogService),Y(1,g.ITelemetryService),Y(2,w.ILifecycleMainService)],f);let I=class extends f{constructor(t,a,s,i){super(t,s,i),this.windowsMainService=a}start(t){const a=this.windowsMainService.getWindowById(t.responseWindowId);if(!a?.win||a.win.isDestroyed()||a.win.webContents.isDestroyed())return this.log("Refusing to start utility process because requesting window cannot be found or is destroyed...",m.default.Error),!0;if(!super.doStart(t))return!1;this.registerWindowListeners(a.win,t);const i=this.connect(t.payload);return a.win.webContents.postMessage(t.responseChannel,t.responseNonce,[i]),!0}registerWindowListeners(t,a){a.windowLifecycleBound&&(this._register(n.Event.filter(this.lifecycleMainService.onWillLoadWindow,s=>s.window.win===t)(()=>this.kill())),this._register(n.Event.fromNodeEventEmitter(t,"closed")(()=>this.kill())))}};e.WindowUtilityProcess=I,e.WindowUtilityProcess=I=be([Y(0,O.ILogService),Y(1,d.IWindowsMainService),Y(2,g.ITelemetryService),Y(3,w.ILifecycleMainService)],I)}),define(Z[296],ee([0,1,13,5,20,8,62,29,25]),function(H,e,b,A,n,O,D,P,h){"use strict";var d;Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionHostStarter=void 0;let m=class{static{d=this}static{this._lastId=0}constructor(w,u,y,E){this._logService=w,this._lifecycleMainService=u,this._windowsMainService=y,this._telemetryService=E,this._extHosts=new Map,this._shutdown=!1,this._lifecycleMainService.onWillShutdown(l=>{this._shutdown=!0,l.join("extHostStarter",this._waitForAllExit(6e3))})}dispose(){}_getExtHost(w){const u=this._extHosts.get(w);if(!u)throw new Error("Unknown extension host!");return u}onDynamicStdout(w){return this._getExtHost(w).onStdout}onDynamicStderr(w){return this._getExtHost(w).onStderr}onDynamicMessage(w){return this._getExtHost(w).onMessage}onDynamicExit(w){return this._getExtHost(w).onExit}async createExtensionHost(){if(this._shutdown)throw(0,b.canceled)();const w=String(++d._lastId),u=new D.WindowUtilityProcess(this._logService,this._windowsMainService,this._telemetryService,this._lifecycleMainService);return this._extHosts.set(w,u),u.onExit(({pid:y,code:E,signal:l})=>{this._logService.info(`Extension host with pid ${y} exited with code: ${E}, signal: ${l}.`),setTimeout(()=>{u.dispose(),this._extHosts.delete(w)})}),{id:w}}async start(w,u){if(this._shutdown)throw(0,b.canceled)();this._getExtHost(w).start({...u,type:"extensionHost",entryPoint:"vs/workbench/api/node/extensionHostProcess",args:["--skipWorkspaceStorageLock"],execArgv:u.execArgv,allowLoadingUnsignedLibraries:!0,forceAllocationsToV8Sandbox:!0,correlationId:w})}async enableInspectPort(w){if(this._shutdown)throw(0,b.canceled)();const u=this._extHosts.get(w);return u?u.enableInspectPort():!1}async kill(w){if(this._shutdown)throw(0,b.canceled)();const u=this._extHosts.get(w);u&&u.kill()}async _killAllNow(){for(const[,w]of this._extHosts)w.kill()}async _waitForAllExit(w){const u=[];for(const[,y]of this._extHosts)u.push(y.waitForExit(w));return O.Promises.settled(u).then(()=>{})}};e.ExtensionHostStarter=m,e.ExtensionHostStarter=m=d=be([Y(0,A.ILogService),Y(1,n.ILifecycleMainService),Y(2,P.IWindowsMainService),Y(3,h.ITelemetryService)],m)}),define(Z[297],ee([0,1,38,8,2,28,20,5,41,39,66,62,52,91,12,248,22]),function(H,e,b,A,n,O,D,P,h,d,m,g,w,u,y,E,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SharedProcess=void 0;let v=class extends n.Disposable{constructor(f,I,S,t,a,s,i,r){super(),this.machineId=f,this.environmentMainService=I,this.userDataProfilesService=S,this.lifecycleMainService=t,this.logService=a,this.loggerMainService=s,this.policyService=i,this.productService=r,this.firstWindowConnectionBarrier=new A.Barrier,this.utilityProcess=void 0,this._whenReady=void 0,this._whenIpcReady=void 0,this.registerListeners()}registerListeners(){b.validatedIpcMain.on(E.SharedProcessChannelConnection.request,(f,I)=>this.onWindowConnection(f,I,E.SharedProcessChannelConnection.response)),b.validatedIpcMain.on(E.SharedProcessRawConnection.request,(f,I)=>this.onWindowConnection(f,I,E.SharedProcessRawConnection.response)),this._register(this.lifecycleMainService.onWillShutdown(()=>this.onWillShutdown()))}async onWindowConnection(f,I,S){this.logService.trace(`[SharedProcess] onWindowConnection for: ${S}`),this.firstWindowConnectionBarrier.isOpen()||this.firstWindowConnectionBarrier.open(),await this.whenReady();const t=await this.connect(S);if(f.sender.isDestroyed())return t.close();f.sender.postMessage(S,I,[t])}onWillShutdown(){this.logService.trace("[SharedProcess] onWillShutdown"),this.utilityProcess?.postMessage(E.SharedProcessLifecycle.exit),this.utilityProcess=void 0}whenReady(){return this._whenReady||(this._whenReady=(async()=>{await this.whenIpcReady;const f=new A.DeferredPromise;this.utilityProcess?this.utilityProcess.once(E.SharedProcessLifecycle.initDone,()=>f.complete()):b.validatedIpcMain.once(E.SharedProcessLifecycle.initDone,()=>f.complete()),await f.p,this.logService.trace("[SharedProcess] Overall ready")})()),this._whenReady}get whenIpcReady(){return this._whenIpcReady||(this._whenIpcReady=(async()=>{await this.firstWindowConnectionBarrier.wait(),this.createUtilityProcess();const f=new A.DeferredPromise;this.utilityProcess?this.utilityProcess.once(E.SharedProcessLifecycle.ipcReady,()=>f.complete()):b.validatedIpcMain.once(E.SharedProcessLifecycle.ipcReady,()=>f.complete()),await f.p,this.logService.trace("[SharedProcess] IPC ready")})()),this._whenIpcReady}createUtilityProcess(){this.utilityProcess=this._register(new g.UtilityProcess(this.logService,w.NullTelemetryService,this.lifecycleMainService));const f=(0,u.parseSharedProcessDebugPort)(this.environmentMainService.args,this.environmentMainService.isBuilt);let I;f.port&&(I=["--nolazy"],f.break?I.push(`--inspect-brk=${f.port}`):I.push(`--inspect=${f.port}`)),this.utilityProcess.start({type:"shared-process",entryPoint:"vs/code/node/sharedProcess/sharedProcessMain",payload:this.createSharedProcessConfiguration(),execArgv:I,allowLoadingUnsignedLibraries:!!process.env.VSCODE_VOICE_MODULE_PATH&&this.productService.quality!=="stable"})}createSharedProcessConfiguration(){return{machineId:this.machineId,codeCachePath:this.environmentMainService.codeCachePath,profiles:{home:this.userDataProfilesService.profilesHome,all:this.userDataProfilesService.profiles},args:this.environmentMainService.args,logLevel:this.loggerMainService.getLogLevel(),loggers:this.loggerMainService.getRegisteredLoggers(),policiesData:this.policyService.serialize()}}async connect(f){return await this.whenIpcReady,(0,y.assertIsDefined)(this.utilityProcess).connect(f)}};e.SharedProcess=v,e.SharedProcess=v=be([Y(1,O.IEnvironmentMainService),Y(2,h.IUserDataProfilesService),Y(3,D.ILifecycleMainService),Y(4,P.ILogService),Y(5,m.ILoggerMainService),Y(6,d.IPolicyService),Y(7,l.IProductService)],v)}),define(Z[298],ee([0,1,28,91,20,5,52,62,112,38,2,3,37,18]),function(H,e,b,A,n,O,D,P,h,d,m,g,w,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElectronPtyHostStarter=void 0;let y=class extends m.Disposable{constructor(l,v,c,f,I){super(),this._reconnectConstants=l,this._configurationService=v,this._environmentMainService=c,this._lifecycleMainService=f,this._logService=I,this.utilityProcess=void 0,this._onRequestConnection=new g.Emitter,this.onRequestConnection=this._onRequestConnection.event,this._onWillShutdown=new g.Emitter,this.onWillShutdown=this._onWillShutdown.event,this._lifecycleMainService.onWillShutdown(()=>this._onWillShutdown.fire()),d.validatedIpcMain.on("vscode:createPtyHostMessageChannel",(S,t)=>this._onWindowConnection(S,t)),this._register((0,m.toDisposable)(()=>{d.validatedIpcMain.removeHandler("vscode:createPtyHostMessageChannel")}))}start(){this.utilityProcess=new P.UtilityProcess(this._logService,D.NullTelemetryService,this._lifecycleMainService);const l=(0,A.parsePtyHostDebugPort)(this._environmentMainService.args,this._environmentMainService.isBuilt),v=l.port?["--nolazy",`--inspect${l.break?"-brk":""}=${l.port}`]:void 0;this.utilityProcess.start({type:"ptyHost",entryPoint:"vs/platform/terminal/node/ptyHostMain",execArgv:v,args:["--logsPath",this._environmentMainService.logsHome.fsPath],env:this._createPtyHostConfiguration()});const c=this.utilityProcess.connect(),f=new h.Client(c,"ptyHost"),I=new m.DisposableStore;return I.add(f),I.add((0,m.toDisposable)(()=>{this.utilityProcess?.kill(),this.utilityProcess?.dispose(),this.utilityProcess=void 0})),{client:f,store:I,onDidProcessExit:this.utilityProcess.onExit}}_createPtyHostConfiguration(){this._environmentMainService.unsetSnapExportedVariables();const l={...(0,w.deepClone)(process.env),VSCODE_AMD_ENTRYPOINT:"vs/platform/terminal/node/ptyHostMain",VSCODE_PIPE_LOGGING:"true",VSCODE_VERBOSE_LOGGING:"true",VSCODE_RECONNECT_GRACE_TIME:String(this._reconnectConstants.graceTime),VSCODE_RECONNECT_SHORT_GRACE_TIME:String(this._reconnectConstants.shortGraceTime),VSCODE_RECONNECT_SCROLLBACK:String(this._reconnectConstants.scrollback)},v=this._configurationService.getValue("terminal.integrated.developer.ptyHost.latency");v&&typeof v=="number"&&(l.VSCODE_LATENCY=String(v));const c=this._configurationService.getValue("terminal.integrated.developer.ptyHost.startupDelay");return c&&typeof c=="number"&&(l.VSCODE_STARTUP_DELAY=String(c)),this._environmentMainService.restoreSnapExportedVariables(),l}_onWindowConnection(l,v){this._onRequestConnection.fire();const c=this.utilityProcess.connect();if(l.sender.isDestroyed()){c.close();return}l.sender.postMessage("vscode:createPtyHostMessageChannelResult",v,[c])}};e.ElectronPtyHostStarter=y,e.ElectronPtyHostStarter=y=be([Y(1,u.IConfigurationService),Y(2,b.IEnvironmentMainService),Y(3,n.ILifecycleMainService),Y(4,O.ILogService)],y)}),define(Z[299],ee([0,1,2,6,5,29,62,25,57,3,8,20]),function(H,e,b,A,n,O,D,P,h,d,m,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UtilityProcessWorkerMainService=e.IUtilityProcessWorkerMainService=void 0,e.IUtilityProcessWorkerMainService=(0,A.createDecorator)("utilityProcessWorker");let w=class extends b.Disposable{constructor(E,l,v,c){super(),this.logService=E,this.windowsMainService=l,this.telemetryService=v,this.lifecycleMainService=c,this.workers=new Map}async createWorker(E){const l=`window: ${E.reply.windowId}, moduleId: ${E.process.moduleId}`;this.logService.trace(`[UtilityProcessWorker]: createWorker(${l})`);const v=this.hash(E);this.workers.has(v)&&(this.logService.warn(`[UtilityProcessWorker]: createWorker() found an existing worker that will be terminated (${l})`),this.disposeWorker(E));const c=new u(this.logService,this.windowsMainService,this.telemetryService,this.lifecycleMainService,E);if(!c.spawn())return{reason:{code:1,signal:"EINVALID"}};this.workers.set(v,c);const f=new m.DeferredPromise;return d.Event.once(c.onDidTerminate)(I=>{I.code===0?this.logService.trace(`[UtilityProcessWorker]: terminated normally with code ${I.code}, signal: ${I.signal}`):this.logService.error(`[UtilityProcessWorker]: terminated unexpectedly with code ${I.code}, signal: ${I.signal}`),this.workers.delete(v),f.complete({reason:I})}),f.p}hash(E){return(0,h.hash)({moduleId:E.process.moduleId,windowId:E.reply.windowId})}async disposeWorker(E){const l=this.hash(E),v=this.workers.get(l);v&&(this.logService.trace(`[UtilityProcessWorker]: disposeWorker(window: ${E.reply.windowId}, moduleId: ${E.process.moduleId})`),v.kill(),this.workers.delete(l))}};e.UtilityProcessWorkerMainService=w,e.UtilityProcessWorkerMainService=w=be([Y(0,n.ILogService),Y(1,O.IWindowsMainService),Y(2,P.ITelemetryService),Y(3,g.ILifecycleMainService)],w);let u=class extends b.Disposable{constructor(E,l,v,c,f){super(),this.logService=E,this.windowsMainService=l,this.telemetryService=v,this.lifecycleMainService=c,this.configuration=f,this._onDidTerminate=this._register(new d.Emitter),this.onDidTerminate=this._onDidTerminate.event,this.utilityProcess=new D.WindowUtilityProcess(this.logService,this.windowsMainService,this.telemetryService,this.lifecycleMainService),this.registerListeners()}registerListeners(){this._register(this.utilityProcess.onExit(E=>this._onDidTerminate.fire({code:E.code,signal:E.signal}))),this._register(this.utilityProcess.onCrash(E=>this._onDidTerminate.fire({code:E.code,signal:"ECRASH"})))}spawn(){const l=this.windowsMainService.getWindowById(this.configuration.reply.windowId)?.win?.webContents.getOSProcessId();return this.utilityProcess.start({type:this.configuration.process.type,entryPoint:this.configuration.process.moduleId,parentLifecycleBound:l,windowLifecycleBound:!0,correlationId:`${this.configuration.reply.windowId}`,responseWindowId:this.configuration.reply.windowId,responseChannel:this.configuration.reply.channel,responseNonce:this.configuration.reply.nonce})}kill(){this.utilityProcess.kill()}};u=be([Y(0,n.ILogService),Y(1,O.IWindowsMainService),Y(2,P.ITelemetryService),Y(3,g.ILifecycleMainService)],u)}),define(Z[300],ee([0,1,14,2,4,19,7,18,20,5,34,29,130,30]),function(H,e,b,A,n,O,D,P,h,d,m,g,w,u){"use strict";var y;Object.defineProperty(e,"__esModule",{value:!0}),e.getWindowsStateStoreData=e.restoreWindowsState=e.WindowsStateHandler=void 0;let E=class extends A.Disposable{static{y=this}static{this.windowsStateStorageKey="windowsState"}get state(){return this._state}constructor(S,t,a,s,i){super(),this.windowsMainService=S,this.stateService=t,this.lifecycleMainService=a,this.logService=s,this.configurationService=i,this._state=l(this.stateService.getItem(y.windowsStateStorageKey)),this.lastClosedState=void 0,this.shuttingDown=!1,this.registerListeners()}registerListeners(){b.app.on("browser-window-blur",()=>{this.shuttingDown||this.saveWindowsState()}),this.lifecycleMainService.onBeforeCloseWindow(S=>this.onBeforeCloseWindow(S)),this.lifecycleMainService.onBeforeShutdown(()=>this.onBeforeShutdown()),this.windowsMainService.onDidChangeWindowsCount(S=>{S.newCount-S.oldCount>0&&(this.lastClosedState=void 0)}),this.windowsMainService.onDidDestroyWindow(S=>this.onBeforeCloseWindow(S))}onBeforeShutdown(){this.shuttingDown=!0,this.saveWindowsState()}saveWindowsState(){const S=new Set,t={openedWindows:[],lastPluginDevelopmentHostWindow:this._state.lastPluginDevelopmentHostWindow,lastActiveWindow:this.lastClosedState};if(!t.lastActiveWindow){let i=this.windowsMainService.getLastActiveWindow();(!i||i.isExtensionDevelopmentHost)&&(i=this.windowsMainService.getWindows().find(r=>!r.isExtensionDevelopmentHost)),i&&(t.lastActiveWindow=this.toWindowState(i),t.lastActiveWindow.uiState.mode===3&&S.add(t.lastActiveWindow.uiState.display))}const a=this.windowsMainService.getWindows().find(i=>i.isExtensionDevelopmentHost&&!i.isExtensionTestHost);a&&(t.lastPluginDevelopmentHostWindow=this.toWindowState(a),t.lastPluginDevelopmentHostWindow.uiState.mode===3&&(S.has(t.lastPluginDevelopmentHostWindow.uiState.display)?n.isMacintosh&&!a.win?.isSimpleFullScreen()&&(t.lastPluginDevelopmentHostWindow.uiState.mode=1):S.add(t.lastPluginDevelopmentHostWindow.uiState.display))),this.windowsMainService.getWindowCount()>1&&(t.openedWindows=this.windowsMainService.getWindows().filter(i=>!i.isExtensionDevelopmentHost).map(i=>{const r=this.toWindowState(i);return r.uiState.mode===3&&(S.has(r.uiState.display)?n.isMacintosh&&r.windowId!==t.lastActiveWindow?.windowId&&!i.win?.isSimpleFullScreen()&&(r.uiState.mode=1):S.add(r.uiState.display)),r}));const s=c(t);this.stateService.setItem(y.windowsStateStorageKey,s),this.shuttingDown&&this.logService.trace("[WindowsStateHandler] onBeforeShutdown",s)}onBeforeCloseWindow(S){if(this.lifecycleMainService.quitRequested)return;const t=this.toWindowState(S);S.isExtensionDevelopmentHost&&!S.isExtensionTestHost?this._state.lastPluginDevelopmentHostWindow=t:!S.isExtensionDevelopmentHost&&S.openedWorkspace&&this._state.openedWindows.forEach(a=>{const s=(0,u.isWorkspaceIdentifier)(S.openedWorkspace)&&a.workspace?.id===S.openedWorkspace.id,i=(0,u.isSingleFolderWorkspaceIdentifier)(S.openedWorkspace)&&a.folderUri&&O.extUriBiasedIgnorePathCase.isEqual(a.folderUri,S.openedWorkspace.uri);(s||i)&&(a.uiState=t.uiState)}),this.windowsMainService.getWindowCount()===1&&(this.lastClosedState=t)}toWindowState(S){return{windowId:S.id,workspace:(0,u.isWorkspaceIdentifier)(S.openedWorkspace)?S.openedWorkspace:void 0,folderUri:(0,u.isSingleFolderWorkspaceIdentifier)(S.openedWorkspace)?S.openedWorkspace.uri:void 0,backupPath:S.backupPath,remoteAuthority:S.remoteAuthority,uiState:S.serializeWindowState()}}getNewWindowState(S){const t=this.doGetNewWindowState(S),a=this.configurationService.getValue("window");if(t.mode===3){let s;t.hasDefaultState?s=!!(a?.newWindowDimensions&&["fullscreen","inherit","offset"].indexOf(a.newWindowDimensions)>=0):s=!!(this.lifecycleMainService.wasRestarted||a?.restoreFullscreen),s||(t.mode=1)}return t}doGetNewWindowState(S){const t=this.windowsMainService.getLastActiveWindow();if(!S.extensionTestsPath){if(S.extensionDevelopmentPath&&this.state.lastPluginDevelopmentHostWindow)return this.state.lastPluginDevelopmentHostWindow.uiState;const p=S.workspace;if((0,u.isWorkspaceIdentifier)(p)){const M=this.state.openedWindows.filter(C=>C.workspace&&C.workspace.id===p.id).map(C=>C.uiState);if(M.length)return M[0]}if((0,u.isSingleFolderWorkspaceIdentifier)(p)){const M=this.state.openedWindows.filter(C=>C.folderUri&&O.extUriBiasedIgnorePathCase.isEqual(C.folderUri,p.uri)).map(C=>C.uiState);if(M.length)return M[0]}else if(S.backupPath){const M=this.state.openedWindows.filter(C=>C.backupPath===S.backupPath).map(C=>C.uiState);if(M.length)return M[0]}const k=this.lastClosedState||this.state.lastActiveWindow;if(!t&&k)return k.uiState}let a;const s=b.screen.getAllDisplays();if(s.length===1)a=s[0];else{if(n.isMacintosh){const p=b.screen.getCursorScreenPoint();a=b.screen.getDisplayNearestPoint(p)}!a&&t&&(a=b.screen.getDisplayMatching(t.getBounds())),a||(a=b.screen.getPrimaryDisplay()||s[0])}let i=(0,w.defaultWindowState)();i.x=Math.round(a.bounds.x+a.bounds.width/2-i.width/2),i.y=Math.round(a.bounds.y+a.bounds.height/2-i.height/2);const r=this.configurationService.getValue("window");let o=!0;if(n.isMacintosh&&r?.nativeFullScreen!==!1&&t?.isFullScreen)i.mode=3;else if(r?.newWindowDimensions){if(r.newWindowDimensions==="maximized")i.mode=0,o=!1;else if(r.newWindowDimensions==="fullscreen")i.mode=3,o=!1;else if((r.newWindowDimensions==="inherit"||r.newWindowDimensions==="offset")&&t){const p=t.serializeWindowState();p.mode===3?i.mode=3:i=p,o=i.mode!==3&&r.newWindowDimensions==="offset"}}return o&&(i=this.ensureNoOverlap(i)),i.hasDefaultState=!0,i}ensureNoOverlap(S){if(this.windowsMainService.getWindows().length===0)return S;S.x=typeof S.x=="number"?S.x:0,S.y=typeof S.y=="number"?S.y:0;const t=this.windowsMainService.getWindows().map(a=>a.getBounds());for(;t.some(a=>a.x===S.x||a.y===S.y);)S.x+=30,S.y+=30;return S}};e.WindowsStateHandler=E,e.WindowsStateHandler=E=y=be([Y(0,g.IWindowsMainService),Y(1,m.IStateService),Y(2,h.ILifecycleMainService),Y(3,d.ILogService),Y(4,P.IConfigurationService)],E);function l(I){const S={openedWindows:[]},t=I||{openedWindows:[]};return t.lastActiveWindow&&(S.lastActiveWindow=v(t.lastActiveWindow)),t.lastPluginDevelopmentHostWindow&&(S.lastPluginDevelopmentHostWindow=v(t.lastPluginDevelopmentHostWindow)),Array.isArray(t.openedWindows)&&(S.openedWindows=t.openedWindows.map(a=>v(a))),S}e.restoreWindowsState=l;function v(I){const S={uiState:I.uiState};return I.backupPath&&(S.backupPath=I.backupPath),I.remoteAuthority&&(S.remoteAuthority=I.remoteAuthority),I.folder&&(S.folderUri=D.URI.parse(I.folder)),I.workspaceIdentifier&&(S.workspace={id:I.workspaceIdentifier.id,configPath:D.URI.parse(I.workspaceIdentifier.configURIPath)}),S}function c(I){return{lastActiveWindow:I.lastActiveWindow&&f(I.lastActiveWindow),lastPluginDevelopmentHostWindow:I.lastPluginDevelopmentHostWindow&&f(I.lastPluginDevelopmentHostWindow),openedWindows:I.openedWindows.map(S=>f(S))}}e.getWindowsStateStoreData=c;function f(I){return{workspaceIdentifier:I.workspace&&{id:I.workspace.id,configURIPath:I.workspace.configPath.toString()},folder:I.folderUri&&I.folderUri.toString(),backupPath:I.backupPath,remoteAuthority:I.remoteAuthority,uiState:I.uiState}}}),define(Z[54],ee([0,1,14,3,44,2,15,10,19,21,194,64,61,28,6,5,53,132,30,99,100]),function(H,e,b,A,n,O,D,P,h,d,m,g,w,u,y,E,l,v,c,f,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspacesManagementMainService=e.IWorkspacesManagementMainService=void 0,e.IWorkspacesManagementMainService=(0,y.createDecorator)("workspacesManagementMainService");let S=class extends O.Disposable{constructor(a,s,i,r,o){super(),this.environmentMainService=a,this.logService=s,this.userDataProfilesMainService=i,this.backupMainService=r,this.dialogMainService=o,this._onDidDeleteUntitledWorkspace=this._register(new A.Emitter),this.onDidDeleteUntitledWorkspace=this._onDidDeleteUntitledWorkspace.event,this._onDidEnterWorkspace=this._register(new A.Emitter),this.onDidEnterWorkspace=this._onDidEnterWorkspace.event,this.untitledWorkspacesHome=this.environmentMainService.untitledWorkspacesHome,this.untitledWorkspaces=[]}async initialize(){this.untitledWorkspaces=[];try{const a=(await d.Promises.readdir(this.untitledWorkspacesHome.fsPath)).map(s=>(0,h.joinPath)(this.untitledWorkspacesHome,s,c.UNTITLED_WORKSPACE_NAME));for(const s of a){const i=(0,I.getWorkspaceIdentifier)(s),r=await this.resolveLocalWorkspace(s);r?this.untitledWorkspaces.push({workspace:i,remoteAuthority:r.remoteAuthority}):await this.deleteUntitledWorkspace(i)}}catch(a){a.code!=="ENOENT"&&this.logService.warn(`Unable to read folders in ${this.untitledWorkspacesHome} (${a}).`)}}resolveLocalWorkspace(a){return this.doResolveLocalWorkspace(a,s=>d.Promises.readFile(s,"utf8"))}doResolveLocalWorkspace(a,s){if(this.isWorkspacePath(a)&&a.scheme===D.Schemas.file)try{const i=s(a.fsPath);return i instanceof Promise?i.then(r=>this.doResolveWorkspace(a,r),r=>{}):this.doResolveWorkspace(a,i)}catch{return}}isWorkspacePath(a){return(0,c.isUntitledWorkspace)(a,this.environmentMainService)||(0,c.hasWorkspaceFileExtension)(a)}doResolveWorkspace(a,s){try{const i=this.doParseStoredWorkspace(a,s),r=(0,I.getWorkspaceIdentifier)(a);return{id:r.id,configPath:r.configPath,folders:(0,f.toWorkspaceFolders)(i.folders,r.configPath,h.extUriBiasedIgnorePathCase),remoteAuthority:i.remoteAuthority,transient:i.transient}}catch(i){this.logService.warn(i.toString())}}doParseStoredWorkspace(a,s){const i=(0,n.parse)(s);if(i&&Array.isArray(i.folders))i.folders=i.folders.filter(r=>(0,f.isStoredWorkspaceFolder)(r));else throw new Error(`${a.toString(!0)} looks like an invalid workspace file.`);return i}async createUntitledWorkspace(a,s){const{workspace:i,storedWorkspace:r}=this.newUntitledWorkspace(a,s),o=i.configPath.fsPath;return await d.Promises.mkdir((0,P.dirname)(o),{recursive:!0}),await d.Promises.writeFile(o,JSON.stringify(r,null,"	")),this.untitledWorkspaces.push({workspace:i,remoteAuthority:s}),i}newUntitledWorkspace(a=[],s){const i=(Date.now()+Math.round(Math.random()*1e3)).toString(),r=(0,h.joinPath)(this.untitledWorkspacesHome,i),o=(0,h.joinPath)(r,c.UNTITLED_WORKSPACE_NAME),p=[];for(const k of a)p.push((0,f.getStoredWorkspaceFolder)(k.uri,!0,k.name,r,h.extUriBiasedIgnorePathCase));return{workspace:(0,I.getWorkspaceIdentifier)(o),storedWorkspace:{folders:p,remoteAuthority:s}}}async getWorkspaceIdentifier(a){return(0,I.getWorkspaceIdentifier)(a)}isUntitledWorkspace(a){return(0,c.isUntitledWorkspace)(a.configPath,this.environmentMainService)}async deleteUntitledWorkspace(a){this.isUntitledWorkspace(a)&&(await this.doDeleteUntitledWorkspace(a),this.userDataProfilesMainService.isEnabled()&&this.userDataProfilesMainService.unsetWorkspace(a),this._onDidDeleteUntitledWorkspace.fire(a))}async doDeleteUntitledWorkspace(a){const s=(0,h.originalFSPath)(a.configPath);try{await d.Promises.rm((0,P.dirname)(s));const i=(0,P.join)(this.environmentMainService.workspaceStorageHome.fsPath,a.id);await d.Promises.exists(i)&&await d.Promises.writeFile((0,P.join)(i,"obsolete"),""),this.untitledWorkspaces=this.untitledWorkspaces.filter(r=>r.workspace.id!==a.id)}catch(i){this.logService.warn(`Unable to delete untitled workspace ${s} (${i}).`)}}getUntitledWorkspaces(){return this.untitledWorkspaces}async enterWorkspace(a,s,i){if(!a||!a.win||!a.isReady||!await this.isValidTargetWorkspacePath(a,s,i))return;const o=await this.doEnterWorkspace(a,(0,I.getWorkspaceIdentifier)(i));if(o)return this._onDidEnterWorkspace.fire({window:a,workspace:o.workspace}),o}async isValidTargetWorkspacePath(a,s,i){return i?(0,c.isWorkspaceIdentifier)(a.openedWorkspace)&&h.extUriBiasedIgnorePathCase.isEqual(a.openedWorkspace.configPath,i)?!1:(0,v.findWindowOnWorkspaceOrFolder)(s,i)?(await this.dialogMainService.showMessageBox({type:"info",buttons:[(0,m.localize)(0,null)],message:(0,m.localize)(1,null,(0,h.basename)(i)),detail:(0,m.localize)(2,null)},b.BrowserWindow.getFocusedWindow()??void 0),!1):!0:!0}async doEnterWorkspace(a,s){if(!a.config)return;a.focus();let i;return a.config.extensionDevelopmentPath||(a.config.backupPath?i=await this.backupMainService.registerWorkspaceBackup({workspace:s,remoteAuthority:a.remoteAuthority},a.config.backupPath):i=this.backupMainService.registerWorkspaceBackup({workspace:s,remoteAuthority:a.remoteAuthority})),(0,c.isWorkspaceIdentifier)(a.openedWorkspace)&&this.isUntitledWorkspace(a.openedWorkspace)&&await this.deleteUntitledWorkspace(a.openedWorkspace),a.config.workspace=s,a.config.backupPath=i,{workspace:s,backupPath:i}}};e.WorkspacesManagementMainService=S,e.WorkspacesManagementMainService=S=be([Y(0,u.IEnvironmentMainService),Y(1,E.ILogService),Y(2,l.IUserDataProfilesMainService),Y(3,g.IBackupMainService),Y(4,w.IDialogMainService)],S)}),define(Z[134],ee([0,1,14,38,23,6,29,30,54,12,5,62]),function(H,e,b,A,n,O,D,P,h,d,m,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiagnosticsMainService=e.IDiagnosticsMainService=e.ID=void 0,e.ID="diagnosticsMainService",e.IDiagnosticsMainService=(0,O.createDecorator)(e.ID);let w=class{constructor(y,E,l){this.windowsMainService=y,this.workspacesManagementMainService=E,this.logService=l}async getRemoteDiagnostics(y){const E=this.windowsMainService.getWindows();return(await Promise.all(E.map(async v=>{const c=v.remoteAuthority;if(!c)return;const f=`vscode:getDiagnosticInfoResponse${v.id}`,I={includeProcesses:y.includeProcesses,folders:y.includeWorkspaceMetadata?await this.getFolderURIs(v):void 0};return new Promise(S=>{v.sendWhenReady("vscode:getDiagnosticInfo",n.CancellationToken.None,{replyChannel:f,args:I}),A.validatedIpcMain.once(f,(t,a)=>{a||S({hostName:c,errorMessage:`Unable to resolve connection to '${c}'.`}),S(a)}),setTimeout(()=>{S({hostName:c,errorMessage:`Connection to '${c}' could not be established`})},5e3)})}))).filter(v=>!!v)}async getMainDiagnostics(){this.logService.trace("Received request for main process info from other instance.");const y=[];for(const l of b.BrowserWindow.getAllWindows()){const v=this.windowsMainService.getWindowById(l.id);v?y.push(await this.codeWindowToInfo(v)):y.push(this.browserWindowToInfo(l))}const E=[];for(const{pid:l,name:v}of g.UtilityProcess.getAll())E.push({pid:l,name:v});return{mainPID:process.pid,mainArguments:process.argv.slice(1),windows:y,pidToNames:E,screenReader:!!b.app.accessibilitySupportEnabled,gpuFeatureStatus:b.app.getGPUFeatureStatus()}}async codeWindowToInfo(y){const E=await this.getFolderURIs(y),l=(0,d.assertIsDefined)(y.win);return this.browserWindowToInfo(l,E,y.remoteAuthority)}browserWindowToInfo(y,E=[],l){return{id:y.id,pid:y.webContents.getOSProcessId(),title:y.getTitle(),folderURIs:E,remoteAuthority:l}}async getFolderURIs(y){const E=[],l=y.openedWorkspace;if((0,P.isSingleFolderWorkspaceIdentifier)(l))E.push(l.uri);else if((0,P.isWorkspaceIdentifier)(l)){const v=await this.workspacesManagementMainService.resolveLocalWorkspace(l.configPath);v&&v.folders.forEach(f=>{E.push(f.uri)})}return E}};e.DiagnosticsMainService=w,e.DiagnosticsMainService=w=be([Y(0,D.IWindowsMainService),Y(1,h.IWorkspacesManagementMainService),Y(2,m.ILogService)],w)}),define(Z[68],ee([0,1,47,14,27,157,55,3,2,15,10,4,7,107,87,21,105,182,61,28,6,20,5,22,80,29,30,54,17,244,236]),function(H,e,b,A,n,O,D,P,h,d,m,g,w,u,y,E,l,v,c,f,I,S,t,a,s,i,r,o,p,k,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeHostMainService=e.INativeHostMainService=void 0,e.INativeHostMainService=(0,I.createDecorator)("nativeHostMainService");let C=class extends h.Disposable{constructor(T,F,z,oe,ne,de,ae,ue){super(),this.windowsMainService=T,this.dialogMainService=F,this.lifecycleMainService=z,this.environmentMainService=oe,this.logService=ne,this.productService=de,this.themeMainService=ae,this.workspacesManagementMainService=ue,this.onDidOpenWindow=P.Event.map(this.windowsMainService.onDidOpenWindow,j=>j.id),this.onDidTriggerSystemContextMenu=P.Event.filter(P.Event.map(this.windowsMainService.onDidTriggerSystemContextMenu,({window:j,x:G,y:B})=>({windowId:j.id,x:G,y:B})),({windowId:j})=>!!this.windowsMainService.getWindowById(j)),this.onDidMaximizeWindow=P.Event.filter(P.Event.fromNodeEventEmitter(A.app,"browser-window-maximize",(j,G)=>G.id),j=>!!this.windowsMainService.getWindowById(j)),this.onDidUnmaximizeWindow=P.Event.filter(P.Event.fromNodeEventEmitter(A.app,"browser-window-unmaximize",(j,G)=>G.id),j=>!!this.windowsMainService.getWindowById(j)),this.onDidBlurWindow=P.Event.filter(P.Event.fromNodeEventEmitter(A.app,"browser-window-blur",(j,G)=>G.id),j=>!!this.windowsMainService.getWindowById(j)),this.onDidFocusWindow=P.Event.any(P.Event.map(P.Event.filter(P.Event.map(this.windowsMainService.onDidChangeWindowsCount,()=>this.windowsMainService.getLastActiveWindow()),j=>!!j),j=>j.id),P.Event.filter(P.Event.fromNodeEventEmitter(A.app,"browser-window-focus",(j,G)=>G.id),j=>!!this.windowsMainService.getWindowById(j))),this.onDidResumeOS=P.Event.fromNodeEventEmitter(A.powerMonitor,"resume"),this.onDidChangeColorScheme=this.themeMainService.onDidChangeColorScheme,this._onDidChangePassword=this._register(new P.Emitter),this.onDidChangePassword=this._onDidChangePassword.event,this.onDidChangeDisplay=P.Event.debounce(P.Event.any(P.Event.filter(P.Event.fromNodeEventEmitter(A.screen,"display-metrics-changed",(j,G,B)=>B),j=>!(Array.isArray(j)&&j.length===1&&j[0]==="workArea")),P.Event.fromNodeEventEmitter(A.screen,"display-added"),P.Event.fromNodeEventEmitter(A.screen,"display-removed")),()=>{},100)}get windowId(){throw new Error("Not implemented in electron-main")}async getWindows(){return this.windowsMainService.getWindows().map(F=>({id:F.id,workspace:F.openedWorkspace??(0,r.toWorkspaceIdentifier)(F.backupPath,F.isExtensionDevelopmentHost),title:F.win?.getTitle()??"",filename:F.getRepresentedFilename(),dirty:F.isDocumentEdited()}))}async getWindowCount(T){return this.windowsMainService.getWindowCount()}async getActiveWindowId(T){const F=A.BrowserWindow.getFocusedWindow()||this.windowsMainService.getLastActiveWindow();if(F)return F.id}openWindow(T,F,z){return Array.isArray(F)?this.doOpenWindow(T,F,z):this.doOpenEmptyWindow(T,F)}async doOpenWindow(T,F,z=Object.create(null)){F.length>0&&await this.windowsMainService.open({context:5,contextWindowId:T,urisToOpen:F,cli:this.environmentMainService.args,forceNewWindow:z.forceNewWindow,forceReuseWindow:z.forceReuseWindow,preferNewWindow:z.preferNewWindow,diffMode:z.diffMode,mergeMode:z.mergeMode,addMode:z.addMode,gotoLineMode:z.gotoLineMode,noRecentEntry:z.noRecentEntry,waitMarkerFileURI:z.waitMarkerFileURI,remoteAuthority:z.remoteAuthority||void 0,forceProfile:z.forceProfile,forceTempProfile:z.forceTempProfile})}async doOpenEmptyWindow(T,F){await this.windowsMainService.openEmptyWindow({context:5,contextWindowId:T},F)}async toggleFullScreen(T){this.windowById(T)?.toggleFullScreen()}async handleTitleDoubleClick(T){this.windowById(T)?.handleTitleDoubleClick()}async isMaximized(T){const F=this.windowById(T);return F?.win?F.win.isMaximized():!1}async maximizeWindow(T){const F=this.windowById(T);F?.win&&F.win.maximize()}async unmaximizeWindow(T){const F=this.windowById(T);F?.win&&F.win.unmaximize()}async minimizeWindow(T){const F=this.windowById(T);F?.win&&F.win.minimize()}async updateWindowControls(T,F){const z=this.windowById(T);z&&z.updateWindowControls(F)}async focusWindow(T,F){F&&typeof F.windowId=="number"&&(T=F.windowId),this.windowById(T)?.focus({force:F?.force??!1})}async setMinimumSize(T,F,z){const oe=this.windowById(T);if(oe?.win){const[ne,de]=oe.win.getSize(),[ae,ue]=oe.win.getMinimumSize(),[j,G]=[F??ae,z??ue],[B,W]=[Math.max(ne,j),Math.max(de,G)];(ae!==j||ue!==G)&&oe.win.setMinimumSize(j,G),(ne!==B||de!==W)&&oe.win.setSize(B,W)}}async saveWindowSplash(T,F){this.themeMainService.saveWindowSplash(T,F)}async installShellCommand(T){const{source:F,target:z}=await this.getShellCommandLink();try{const{symbolicLink:oe}=await E.SymlinkSupport.stat(F);if(oe&&!oe.dangling){const ne=await(0,u.realpath)(F);if(z===ne)return}await E.Promises.unlink(F)}catch(oe){if(oe.code!=="ENOENT")throw oe}try{await E.Promises.symlink(z,F)}catch(oe){if(oe.code!=="EACCES"&&oe.code!=="ENOENT")throw oe;const{response:ne}=await this.showMessageBox(T,{type:"info",message:(0,v.localize)(0,null,this.productService.nameShort),buttons:[(0,v.localize)(1,null),(0,v.localize)(2,null)]});if(ne===0)try{const de=`osascript -e "do shell script \\"mkdir -p /usr/local/bin && ln -sf '${z}' '${F}'\\" with administrator privileges"`;await(0,O.promisify)(b.exec)(de)}catch{throw new Error((0,v.localize)(3,null,F))}}}async uninstallShellCommand(T){const{source:F}=await this.getShellCommandLink();try{await E.Promises.unlink(F)}catch(z){switch(z.code){case"EACCES":{const{response:oe}=await this.showMessageBox(T,{type:"info",message:(0,v.localize)(4,null,this.productService.nameShort),buttons:[(0,v.localize)(5,null),(0,v.localize)(6,null)]});if(oe===0)try{const ne=`osascript -e "do shell script \\"rm '${F}'\\" with administrator privileges"`;await(0,O.promisify)(b.exec)(ne)}catch{throw new Error((0,v.localize)(7,null,F))}break}case"ENOENT":break;default:throw z}}}async getShellCommandLink(){const T=(0,m.resolve)(this.environmentMainService.appRoot,"bin","code"),F=`/usr/local/bin/${this.productService.applicationName}`;if(!await E.Promises.exists(T))throw new Error((0,v.localize)(8,null,T));return{source:F,target:T}}async showMessageBox(T,F){return this.dialogMainService.showMessageBox(F,this.toBrowserWindow(T))}async showSaveDialog(T,F){return this.dialogMainService.showSaveDialog(F,this.toBrowserWindow(T))}async showOpenDialog(T,F){return this.dialogMainService.showOpenDialog(F,this.toBrowserWindow(T))}toBrowserWindow(T){const F=this.windowById(T);if(F?.win)return F.win}async pickFileFolderAndOpen(T,F){const z=await this.dialogMainService.pickFileFolder(F);z&&await this.doOpenPicked(await Promise.all(z.map(async oe=>await E.SymlinkSupport.existsDirectory(oe)?{folderUri:w.URI.file(oe)}:{fileUri:w.URI.file(oe)})),F,T)}async pickFolderAndOpen(T,F){const z=await this.dialogMainService.pickFolder(F);z&&await this.doOpenPicked(z.map(oe=>({folderUri:w.URI.file(oe)})),F,T)}async pickFileAndOpen(T,F){const z=await this.dialogMainService.pickFile(F);z&&await this.doOpenPicked(z.map(oe=>({fileUri:w.URI.file(oe)})),F,T)}async pickWorkspaceAndOpen(T,F){const z=await this.dialogMainService.pickWorkspace(F);z&&await this.doOpenPicked(z.map(oe=>({workspaceUri:w.URI.file(oe)})),F,T)}async doOpenPicked(T,F,z){await this.windowsMainService.open({context:3,contextWindowId:z,cli:this.environmentMainService.args,urisToOpen:T,forceNewWindow:F.forceNewWindow})}async showItemInFolder(T,F){A.shell.showItemInFolder(F)}async setRepresentedFilename(T,F){this.windowById(T)?.setRepresentedFilename(F)}async setDocumentEdited(T,F){this.windowById(T)?.setDocumentEdited(F)}async openExternal(T,F){return this.environmentMainService.unsetSnapExportedVariables(),A.shell.openExternal(F),this.environmentMainService.restoreSnapExportedVariables(),!0}moveItemToTrash(T,F){return A.shell.trashItem(F)}async isAdmin(){let T;return g.isWindows?T=(await new Promise((F,z)=>{H(["native-is-elevated"],F,z)}))():T=process.getuid?.()===0,T}async writeElevated(T,F,z,oe){const ne=await new Promise((de,ae)=>{H(["@vscode/sudo-prompt"],de,ae)});return new Promise((de,ae)=>{const ue=[`"${this.cliPath}"`];oe?.unlock&&ue.push("--file-chmod"),ue.push("--file-write",`"${F.fsPath}"`,`"${z.fsPath}"`);const j={name:this.productService.nameLong.replace("-",""),icns:g.isMacintosh&&this.environmentMainService.isBuilt?(0,m.join)((0,m.dirname)(this.environmentMainService.appRoot),`${this.productService.nameShort}.icns`):void 0};ne.exec(ue.join(" "),j,(G,B,W)=>{B&&this.logService.trace(`[sudo-prompt] received stdout: ${B}`),W&&this.logService.trace(`[sudo-prompt] received stderr: ${W}`),G?ae(G):de(void 0)})})}async isRunningUnderARM64Translation(){return g.isLinux||g.isWindows?!1:A.app.runningUnderARM64Translation}get cliPath(){return g.isWindows?this.environmentMainService.isBuilt?(0,m.join)((0,m.dirname)(process.execPath),"bin",`${this.productService.applicationName}.cmd`):(0,m.join)(this.environmentMainService.appRoot,"scripts","code-cli.bat"):g.isLinux?this.environmentMainService.isBuilt?(0,m.join)((0,m.dirname)(process.execPath),"bin",`${this.productService.applicationName}`):(0,m.join)(this.environmentMainService.appRoot,"scripts","code-cli.sh"):this.environmentMainService.isBuilt?(0,m.join)(this.environmentMainService.appRoot,"bin","code"):(0,m.join)(this.environmentMainService.appRoot,"scripts","code-cli.sh")}async getOSStatistics(){return{totalmem:(0,n.totalmem)(),freemem:(0,n.freemem)(),loadavg:(0,n.loadavg)()}}async getOSProperties(){return{arch:(0,n.arch)(),platform:(0,n.platform)(),release:(0,n.release)(),type:(0,n.type)(),cpus:(0,n.cpus)()}}async getOSVirtualMachineHint(){return y.virtualMachineHint.value()}async getOSColorScheme(){return this.themeMainService.getColorScheme()}async hasWSLFeatureInstalled(){return g.isWindows&&(0,k.hasWSLFeatureInstalled)()}async killProcess(T,F,z){process.kill(F,z)}async readClipboardText(T,F){return A.clipboard.readText(F)}async writeClipboardText(T,F,z){return A.clipboard.writeText(F,z)}async writeClipboardData(T,F,z){return A.clipboard.write(F,z)}async readClipboardFindText(T){return A.clipboard.readFindText()}async writeClipboardFindText(T,F){return A.clipboard.writeFindText(F)}async writeClipboardBuffer(T,F,z,oe){return A.clipboard.writeBuffer(F,Buffer.from(z.buffer),oe)}async readClipboardBuffer(T,F){return p.VSBuffer.wrap(A.clipboard.readBuffer(F))}async hasClipboard(T,F,z){return A.clipboard.has(F,z)}async newWindowTab(){await this.windowsMainService.open({context:5,cli:this.environmentMainService.args,forceNewTabbedWindow:!0,forceEmpty:!0,remoteAuthority:this.environmentMainService.args.remote||void 0})}async showPreviousWindowTab(){A.Menu.sendActionToFirstResponder("selectPreviousTab:")}async showNextWindowTab(){A.Menu.sendActionToFirstResponder("selectNextTab:")}async moveWindowTabToNewWindow(){A.Menu.sendActionToFirstResponder("moveTabToNewWindow:")}async mergeAllWindowTabs(){A.Menu.sendActionToFirstResponder("mergeAllWindows:")}async toggleWindowTabsBar(){A.Menu.sendActionToFirstResponder("toggleTabBar:")}async updateTouchBar(T,F){this.windowById(T)?.updateTouchBar(F)}async notifyReady(T){this.windowById(T)?.setReady()}async relaunch(T,F){return this.lifecycleMainService.relaunch(F)}async reload(T,F){const z=this.windowById(T);if(z){if((0,r.isWorkspaceIdentifier)(z.openedWorkspace)){const oe=z.openedWorkspace.configPath;if(oe.scheme===d.Schemas.file&&(await this.workspacesManagementMainService.resolveLocalWorkspace(oe))?.transient)return this.openWindow(z.id,{forceReuseWindow:!0})}return this.lifecycleMainService.reload(z,F?.disableExtensions!==void 0?{_:[],"disable-extensions":F.disableExtensions}:void 0)}}async closeWindow(T){this.closeWindowById(T,T)}async closeWindowById(T,F){const z=this.windowById(F);if(z?.win)return z.win.close()}async quit(T){const F=this.windowsMainService.getLastActiveWindow();F?.isExtensionDevelopmentHost&&this.windowsMainService.getWindowCount()>1&&F.win?F.win.close():this.lifecycleMainService.quit()}async exit(T,F){await this.lifecycleMainService.kill(F)}async resolveProxy(T,F){return this.windowById(T)?.win?.webContents?.session?.resolveProxy(F)}findFreePort(T,F,z,oe,ne=1){return(0,l.findFreePort)(F,z,oe,ne)}async openDevTools(T,F){const z=this.windowById(T);z?.win&&z.win.webContents.openDevTools(F)}async toggleDevTools(T){const F=this.windowById(T);F?.win&&F.win.webContents.toggleDevTools()}async sendInputEvent(T,F){const z=this.windowById(T);z?.win&&(F.type==="mouseDown"||F.type==="mouseUp")&&z.win.webContents.sendInputEvent(F)}async profileRenderer(T,F,z){const oe=this.windowById(T);if(!oe||!oe.win)throw new Error;return await new M.WindowProfiler(oe.win,F,this.logService).inspect(z)}async windowsGetStringRegKey(T,F,z,oe){if(!g.isWindows)return;const ne=await new Promise((de,ae)=>{H(["@vscode/windows-registry"],de,ae)});try{return ne.GetStringRegKey(F,z,oe)}catch{return}}windowById(T){if(typeof T=="number")return this.windowsMainService.getWindowById(T)}};e.NativeHostMainService=C,be([D.memoize],C.prototype,"cliPath",null),e.NativeHostMainService=C=be([Y(0,i.IWindowsMainService),Y(1,c.IDialogMainService),Y(2,S.ILifecycleMainService),Y(3,f.IEnvironmentMainService),Y(4,t.ILogService),Y(5,a.IProductService),Y(6,s.IThemeMainService),Y(7,o.IWorkspacesManagementMainService)],C)}),define(Z[301],ee([0,1,14,38,27,2,15,4,109,180,92,134,61,28,5,68,67,22,79,81,32,34,62,23,7,29,8]),function(H,e,b,A,n,O,D,P,h,d,m,g,w,u,y,E,l,v,c,f,I,S,t,a,s,i,r){"use strict";var o;Object.defineProperty(e,"__esModule",{value:!0}),e.IssueMainService=void 0;const p="issue.processExplorerWindowState";let k=class{static{o=this}static{this.DEFAULT_BACKGROUND_COLOR="#1E1E1E"}constructor(L,T,F,z,oe,ne,de,ae,ue,j,G){this.userEnv=L,this.environmentMainService=T,this.logService=F,this.diagnosticsService=z,this.diagnosticsMainService=oe,this.dialogMainService=ne,this.nativeHostMainService=de,this.protocolMainService=ae,this.productService=ue,this.stateService=j,this.windowsMainService=G,this.issueReporterWindow=null,this.issueReporterParentWindow=null,this.processExplorerWindow=null,this.processExplorerParentWindow=null,this.registerListeners()}registerListeners(){A.validatedIpcMain.on("vscode:listProcesses",async L=>{const T=[];try{T.push({name:(0,d.localize)(0,null),rootProcess:await(0,h.listProcesses)(process.pid)}),(await this.diagnosticsMainService.getRemoteDiagnostics({includeProcesses:!0})).forEach(z=>{(0,m.isRemoteDiagnosticError)(z)?T.push({name:z.hostName,rootProcess:z}):z.processes&&T.push({name:z.hostName,rootProcess:z.processes})})}catch(F){this.logService.error(`Listing processes failed: ${F}`)}this.safeSend(L,"vscode:listProcessesResponse",T)}),A.validatedIpcMain.on("vscode:workbenchCommand",(L,T)=>{const{id:F,from:z,args:oe}=T;let ne;switch(z){case"processExplorer":ne=this.processExplorerParentWindow;break;default:throw new Error(`Unexpected command source: ${z}`)}ne?.webContents.send("vscode:runAction",{id:F,from:z,args:oe})}),A.validatedIpcMain.on("vscode:closeProcessExplorer",L=>{this.processExplorerWindow?.close()}),A.validatedIpcMain.on("vscode:pidToNameRequest",async L=>{const T=await this.diagnosticsMainService.getMainDiagnostics(),F=[];for(const z of T.windows)F.push([z.pid,`window [${z.id}] (${z.title})`]);for(const{pid:z,name:oe}of t.UtilityProcess.getAll())F.push([z,oe]);this.safeSend(L,"vscode:pidToNameResponse",F)})}async openReporter(L){if(!this.issueReporterWindow&&(this.issueReporterParentWindow=b.BrowserWindow.getFocusedWindow(),this.issueReporterParentWindow)){const T=new O.DisposableStore,F=T.add(this.protocolMainService.createIPCObjectUrl()),z=this.getWindowPosition(this.issueReporterParentWindow,700,800);this.issueReporterWindow=this.createBrowserWindow(z,F,{backgroundColor:L.styles.backgroundColor,title:(0,d.localize)(1,null),zoomLevel:L.zoomLevel,alwaysOnTop:!1},"issue-reporter"),F.update({appRoot:this.environmentMainService.appRoot,windowId:this.issueReporterWindow.id,userEnv:this.userEnv,data:L,disableExtensions:!!this.environmentMainService.disableExtensions,os:{type:(0,n.type)(),arch:(0,n.arch)(),release:(0,n.release)()},product:l.default}),this.issueReporterWindow.loadURL(D.FileAccess.asBrowserUri(`vs/code/electron-sandbox/issue/issueReporter${this.environmentMainService.isBuilt?"":"-dev"}.html`).toString(!0)),this.issueReporterWindow.on("close",()=>{this.issueReporterWindow=null,T.dispose()}),this.issueReporterParentWindow.on("closed",()=>{this.issueReporterWindow&&(this.issueReporterWindow.close(),this.issueReporterWindow=null,T.dispose())})}this.issueReporterWindow&&this.focusWindow(this.issueReporterWindow)}async openProcessExplorer(L){if(!this.processExplorerWindow&&(this.processExplorerParentWindow=b.BrowserWindow.getFocusedWindow(),this.processExplorerParentWindow)){const T=new O.DisposableStore,F=T.add(this.protocolMainService.createIPCObjectUrl()),z=this.stateService.getItem(p,void 0),oe=M(z)?z:this.getWindowPosition(this.processExplorerParentWindow,800,500);this.processExplorerWindow=this.createBrowserWindow(oe,F,{backgroundColor:L.styles.backgroundColor,title:(0,d.localize)(2,null),zoomLevel:L.zoomLevel,alwaysOnTop:!0},"process-explorer"),F.update({appRoot:this.environmentMainService.appRoot,windowId:this.processExplorerWindow.id,userEnv:this.userEnv,data:L,product:l.default}),this.processExplorerWindow.loadURL(D.FileAccess.asBrowserUri(`vs/code/electron-sandbox/processExplorer/processExplorer${this.environmentMainService.isBuilt?"":"-dev"}.html`).toString(!0)),this.processExplorerWindow.on("close",()=>{this.processExplorerWindow=null,T.dispose()}),this.processExplorerParentWindow.on("close",()=>{this.processExplorerWindow&&(this.processExplorerWindow.close(),this.processExplorerWindow=null,T.dispose())});const ne=()=>{if(!this.processExplorerWindow)return;const de=this.processExplorerWindow.getSize(),ae=this.processExplorerWindow.getPosition();if(!de||!ae)return;const ue={width:de[0],height:de[1],x:ae[0],y:ae[1]};this.stateService.setItem(p,ue)};this.processExplorerWindow.on("moved",ne),this.processExplorerWindow.on("resized",ne)}this.processExplorerWindow&&this.focusWindow(this.processExplorerWindow)}async stopTracing(){if(!this.environmentMainService.args.trace)return;const L=await b.contentTracing.stopRecording(`${(0,I.randomPath)(this.environmentMainService.userHome.fsPath,this.productService.applicationName)}.trace.txt`);await this.dialogMainService.showMessageBox({type:"info",message:(0,d.localize)(3,null),detail:(0,d.localize)(4,null,L),buttons:[(0,d.localize)(5,null)]},b.BrowserWindow.getFocusedWindow()??void 0),this.nativeHostMainService.showItemInFolder(void 0,L)}async getSystemStatus(){const[L,T]=await Promise.all([this.diagnosticsMainService.getMainDiagnostics(),this.diagnosticsMainService.getRemoteDiagnostics({includeProcesses:!1,includeWorkspaceMetadata:!1})]);return this.diagnosticsService.getDiagnostics(L,T)}async $getSystemInfo(){const[L,T]=await Promise.all([this.diagnosticsMainService.getMainDiagnostics(),this.diagnosticsMainService.getRemoteDiagnostics({includeProcesses:!1,includeWorkspaceMetadata:!1})]);return await this.diagnosticsService.getSystemInfo(L,T)}async $getPerformanceInfo(){try{const[L,T]=await Promise.all([this.diagnosticsMainService.getMainDiagnostics(),this.diagnosticsMainService.getRemoteDiagnostics({includeProcesses:!0,includeWorkspaceMetadata:!0})]);return await this.diagnosticsService.getPerformanceInfo(L,T)}catch(L){throw this.logService.warn("issueService#getPerformanceInfo ",L.message),L}}async $reloadWithExtensionsDisabled(){if(this.issueReporterParentWindow)try{await this.nativeHostMainService.reload(this.issueReporterParentWindow.id,{disableExtensions:!0})}catch(L){this.logService.error(L)}}async $showConfirmCloseDialog(){if(this.issueReporterWindow){const{response:L}=await this.dialogMainService.showMessageBox({type:"warning",message:(0,d.localize)(6,null),buttons:[(0,d.localize)(7,null),(0,d.localize)(8,null)]},this.issueReporterWindow);L===0&&this.issueReporterWindow&&(this.issueReporterWindow.destroy(),this.issueReporterWindow=null)}}async $showClipboardDialog(){if(this.issueReporterWindow){const{response:L}=await this.dialogMainService.showMessageBox({type:"warning",message:(0,d.localize)(9,null),buttons:[(0,d.localize)(10,null),(0,d.localize)(11,null)]},this.issueReporterWindow);return L===0}return!1}async $getIssueReporterUri(L){if(!this.issueReporterParentWindow)throw new Error("Issue reporter window not available");const T=this.windowsMainService.getWindowById(this.issueReporterParentWindow.id);if(!T)throw new Error("Window not found");const F=`vscode:triggerIssueUriRequestHandlerResponse${T.id}`;return r.Promises.withAsyncBody(async(z,oe)=>{const ne=new a.CancellationTokenSource;T.sendWhenReady("vscode:triggerIssueUriRequestHandler",ne.token,{replyChannel:F,extensionId:L}),A.validatedIpcMain.once(F,(de,ae)=>{z(s.URI.parse(ae))});try{await(0,r.timeout)(5e3),ne.cancel(),oe(new Error("Timed out waiting for issue reporter URI"))}finally{A.validatedIpcMain.removeHandler(F)}})}async $closeReporter(){this.issueReporterWindow?.close()}async closeProcessExplorer(){this.processExplorerWindow?.close()}focusWindow(L){L.isMinimized()&&L.restore(),L.focus()}safeSend(L,T,...F){L.sender.isDestroyed()||L.sender.send(T,...F)}createBrowserWindow(L,T,F,z){const oe=new b.BrowserWindow({fullscreen:!1,skipTaskbar:!1,resizable:!0,width:L.width,height:L.height,minWidth:300,minHeight:200,x:L.x,y:L.y,title:F.title,backgroundColor:F.backgroundColor||o.DEFAULT_BACKGROUND_COLOR,webPreferences:{preload:D.FileAccess.asFileUri("vs/base/parts/sandbox/electron-sandbox/preload.js").fsPath,additionalArguments:[`--vscode-window-config=${T.resource.toString()}`],v8CacheOptions:this.environmentMainService.useCodeCache?"bypassHeatCheck":"none",enableWebSQL:!1,spellcheck:!1,zoomFactor:(0,f.zoomLevelToZoomFactor)(F.zoomLevel),sandbox:!0},alwaysOnTop:F.alwaysOnTop,experimentalDarkMode:!0});return oe.setMenuBarVisibility(!1),oe}getWindowPosition(L,T,F){let z;const oe=b.screen.getAllDisplays();if(oe.length===1)z=oe[0];else{if(P.isMacintosh){const ae=b.screen.getCursorScreenPoint();z=b.screen.getDisplayNearestPoint(ae)}!z&&L&&(z=b.screen.getDisplayMatching(L.getBounds())),z||(z=b.screen.getPrimaryDisplay()||oe[0])}const ne=z.bounds,de={width:T,height:F,x:ne.x+ne.width/2-T/2,y:ne.y+ne.height/2-F/2};return ne.width>0&&ne.height>0&&(de.x<ne.x&&(de.x=ne.x),de.y<ne.y&&(de.y=ne.y),de.x>ne.x+ne.width&&(de.x=ne.x),de.y>ne.y+ne.height&&(de.y=ne.y),de.width>ne.width&&(de.width=ne.width),de.height>ne.height&&(de.height=ne.height)),de}};e.IssueMainService=k,e.IssueMainService=k=o=be([Y(1,u.IEnvironmentMainService),Y(2,y.ILogService),Y(3,m.IDiagnosticsService),Y(4,g.IDiagnosticsMainService),Y(5,w.IDialogMainService),Y(6,E.INativeHostMainService),Y(7,c.IProtocolMainService),Y(8,v.IProductService),Y(9,S.IStateService),Y(10,i.IWindowsMainService)],k);function M(C){return typeof C!="object"||C===null?!1:"x"in C&&"y"in C&&"width"in C&&"height"in C}}),define(Z[302],ee([0,1,23,18,28,20,5,68,22,51,25,48,102]),function(H,e,b,A,n,O,D,P,h,d,m,g,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinuxUpdateService=void 0;let u=class extends w.AbstractUpdateService{constructor(E,l,v,c,f,I,S,t){super(E,l,c,f,I,t),this.telemetryService=v,this.nativeHostMainService=S}buildUpdateFeedUrl(E){return(0,w.createUpdateURL)(`linux-${process.arch}`,E,this.productService)}doCheckForUpdates(E){this.url&&(this.setState(g.State.CheckingForUpdates(E)),this.requestService.request({url:this.url},b.CancellationToken.None).then(d.asJson).then(l=>{!l||!l.url||!l.version||!l.productVersion?(this.telemetryService.publicLog2("update:notAvailable",{explicit:!!E}),this.setState(g.State.Idle(1))):this.setState(g.State.AvailableForDownload(l))}).then(void 0,l=>{this.logService.error(l),this.telemetryService.publicLog2("update:notAvailable",{explicit:!!E});const v=E?l.message||l:void 0;this.setState(g.State.Idle(1,v))}))}async doDownloadUpdate(E){this.productService.downloadUrl&&this.productService.downloadUrl.length>0?this.nativeHostMainService.openExternal(void 0,this.productService.downloadUrl):E.update.url&&this.nativeHostMainService.openExternal(void 0,E.update.url),this.setState(g.State.Idle(1))}};e.LinuxUpdateService=u,e.LinuxUpdateService=u=be([Y(0,O.ILifecycleMainService),Y(1,A.IConfigurationService),Y(2,m.ITelemetryService),Y(3,n.IEnvironmentMainService),Y(4,d.IRequestService),Y(5,D.ILogService),Y(6,P.INativeHostMainService),Y(7,h.IProductService)],u)}),define(Z[303],ee([0,1,47,45,27,8,23,55,10,7,143,21,18,28,16,20,5,68,22,51,25,48,102]),function(H,e,b,A,n,O,D,P,h,d,m,g,w,u,y,E,l,v,c,f,I,S,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Win32UpdateService=void 0;async function a(o,p=1e3){for(;!o();)await(0,O.timeout)(p)}let s;function i(){return typeof s>"u"&&(s=A.existsSync(h.join(h.dirname(process.execPath),"unins000.exe"))?0:1),s}let r=class extends t.AbstractUpdateService{get cachePath(){const p=h.join((0,n.tmpdir)(),`azuredatastudio-update-${this.productService.quality}-${this.productService.target}-${process.arch}`);return g.Promises.mkdir(p,{recursive:!0}).then(()=>p)}constructor(p,k,M,C,L,T,F,z,oe){super(p,k,C,L,T,oe),this.telemetryService=M,this.fileService=F,this.nativeHostMainService=z,p.setRelaunchHandler(this)}handleRelaunch(p){return p?.addArgs||p?.removeArgs||this.state.type!=="ready"||!this.availableUpdate?!1:(this.logService.trace("update#handleRelaunch(): running raw#quitAndInstall()"),this.doQuitAndInstall(),!0)}async initialize(){if(this.productService.target==="user"&&await this.nativeHostMainService.isAdmin(void 0)){this.setState(S.State.Disabled(5)),this.logService.info("update#ctor - updates are disabled due to running as Admin in user setup");return}await super.initialize()}buildUpdateFeedUrl(p){let k="win32";return process.arch!=="ia32"&&(k+=`-${process.arch}`),i()===1?k+="-archive":this.productService.target==="user"&&(k+="-user"),(0,t.createUpdateURL)(k,p,this.productService)}doCheckForUpdates(p){this.url&&(this.setState(S.State.CheckingForUpdates(p)),this.requestService.request({url:this.url},D.CancellationToken.None).then(f.asJson).then(k=>{const M=i();return!k||!k.url||!k.version||!k.productVersion?(this.telemetryService.publicLog2("update:notAvailable",{explicit:!!p}),this.setState(S.State.Idle(M)),Promise.resolve(null)):M===1?(this.setState(S.State.AvailableForDownload(k)),Promise.resolve(null)):(this.setState(S.State.Downloading(k)),this.cleanup(k.version).then(()=>this.getUpdatePackagePath(k.version).then(C=>g.Promises.exists(C).then(L=>{if(L)return Promise.resolve(C);const T=k.url,F=k.hash,z=`${C}.tmp`;return this.requestService.request({url:T},D.CancellationToken.None).then(oe=>this.fileService.writeFile(d.URI.file(z),oe.stream)).then(F?()=>(0,m.checksum)(z,k.hash):()=>{}).then(()=>g.Promises.rename(z,C,!1)).then(()=>C)})).then(C=>{const L=this.configurationService.getValue("update.enableWindowsBackgroundUpdates");this.availableUpdate={packagePath:C},L?this.productService.target==="user"?this.doApplyUpdate():this.setState(S.State.Downloaded(k)):this.setState(S.State.Ready(k))})))}).then(void 0,k=>{this.logService.error(k),this.telemetryService.publicLog2("update:notAvailable",{explicit:!!p});const M=p?k.message||k:void 0;this.setState(S.State.Idle(i(),M))}))}async doDownloadUpdate(p){p.update.url&&this.nativeHostMainService.openExternal(void 0,p.update.url),this.setState(S.State.Idle(i()))}async getUpdatePackagePath(p){const k=await this.cachePath;return h.join(k,`AzureDataStudioSetup-${this.productService.quality}-${p}.exe`)}async cleanup(p=null){const k=p?T=>!new RegExp(`${this.productService.quality}-${p}\\.exe$`).test(T):()=>!0,M=await this.cachePath,L=(await g.Promises.readdir(M)).filter(k).map(async T=>{try{await g.Promises.unlink(h.join(M,T))}catch{}});await Promise.all(L)}async doApplyUpdate(){if(this.state.type!=="downloaded"&&this.state.type!=="downloading"||!this.availableUpdate)return Promise.resolve(void 0);const p=this.state.update;this.setState(S.State.Updating(p));const k=await this.cachePath;this.availableUpdate.updateFilePath=h.join(k,`CodeSetup-${this.productService.quality}-${p.version}.flag`),await g.Promises.writeFile(this.availableUpdate.updateFilePath,"flag"),(0,b.spawn)(this.availableUpdate.packagePath,["/verysilent","/log",`/update="${this.availableUpdate.updateFilePath}"`,"/nocloseapplications","/mergetasks=runcode,!desktopicon,!quicklaunchicon"],{detached:!0,stdio:["ignore","ignore","ignore"],windowsVerbatimArguments:!0}).once("exit",()=>{this.availableUpdate=void 0,this.setState(S.State.Idle(i()))});const C=`${this.productService.win32MutexName}-ready`,L=await new Promise((T,F)=>{H(["@vscode/windows-mutex"],T,F)});a(()=>L.isActive(C)).then(()=>this.setState(S.State.Ready(p)))}doQuitAndInstall(){this.state.type!=="ready"||!this.availableUpdate||(this.logService.trace("update#quitAndInstall(): running raw#quitAndInstall()"),this.availableUpdate.updateFilePath?A.unlinkSync(this.availableUpdate.updateFilePath):(0,b.spawn)(this.availableUpdate.packagePath,["/silent","/log","/mergetasks=runcode,!desktopicon,!quicklaunchicon"],{detached:!0,stdio:["ignore","ignore","ignore"]}))}getUpdateType(){return i()}async _applySpecificUpdate(p){if(this.state.type!=="idle")return;const k=this.configurationService.getValue("update.enableWindowsBackgroundUpdates"),M={version:"unknown",productVersion:"unknown"};this.setState(S.State.Downloading(M)),this.availableUpdate={packagePath:p},k?this.productService.target==="user"?this.doApplyUpdate():this.setState(S.State.Downloaded(M)):this.setState(S.State.Ready(M))}};e.Win32UpdateService=r,be([P.memoize],r.prototype,"cachePath",null),e.Win32UpdateService=r=be([Y(0,E.ILifecycleMainService),Y(1,w.IConfigurationService),Y(2,I.ITelemetryService),Y(3,u.IEnvironmentMainService),Y(4,f.IRequestService),Y(5,l.ILogService),Y(6,y.IFileService),Y(7,v.INativeHostMainService),Y(8,c.IProductService)],r)}),define(Z[304],ee([0,1,14,8,23,50,3,2,15,10,65,4,7,190,64,18,61,28,63,16,20,5,22,79,253,83,25,104,80,81,29,30,54,130,135,39,34,53,66,24]),function(H,e,b,A,n,O,D,P,h,d,m,g,w,u,y,E,l,v,c,f,I,S,t,a,s,i,r,o,p,k,M,C,L,T,F,z,oe,ne,de,ae){"use strict";var ue;Object.defineProperty(e,"__esModule",{value:!0}),e.CodeWindow=void 0;var j;(function(B){B[B.NONE=0]="NONE",B[B.NAVIGATING=1]="NAVIGATING",B[B.READY=2]="READY"})(j||(j={}));let G=class extends P.Disposable{static{ue=this}static{this.windowControlHeightStateStorageKey="windowControlHeight"}get id(){return this._id}get win(){return this._win}get lastFocusTime(){return this._lastFocusTime}get backupPath(){return this._config?.backupPath}get openedWorkspace(){return this._config?.workspace}get profile(){if(!this.config)return;const W=this.userDataProfilesService.profiles.find(U=>U.id===this.config?.profiles.profile.id);return this.isExtensionDevelopmentHost&&W?W:this.userDataProfilesService.getProfileForWorkspace(this.config.workspace??(0,C.toWorkspaceIdentifier)(this.backupPath,this.isExtensionDevelopmentHost))??this.userDataProfilesService.defaultProfile}get remoteAuthority(){return this._config?.remoteAuthority}get config(){return this._config}get isExtensionDevelopmentHost(){return!!this._config?.extensionDevelopmentPath}get isExtensionTestHost(){return!!this._config?.extensionTestsPath}get isExtensionDevelopmentTestFromCli(){return this.isExtensionDevelopmentHost&&this.isExtensionTestHost&&!this._config?.debugId}constructor(W,U,$,X,se,ce,x,R,_,N,q,re,ie,le,V,te,Q,fe,pe,Pe){super(),this.logService=U,this.loggerMainService=$,this.environmentMainService=X,this.policyService=se,this.userDataProfilesService=ce,this.fileService=x,this.applicationStorageMainService=R,this.storageMainService=_,this.configurationService=N,this.themeMainService=q,this.workspacesManagementMainService=re,this.backupMainService=ie,this.telemetryService=le,this.dialogMainService=V,this.lifecycleMainService=te,this.productService=Q,this.protocolMainService=fe,this.windowsMainService=pe,this.stateService=Pe,this._onWillLoad=this._register(new D.Emitter),this.onWillLoad=this._onWillLoad.event,this._onDidSignalReady=this._register(new D.Emitter),this.onDidSignalReady=this._onDidSignalReady.event,this._onDidTriggerSystemContextMenu=this._register(new D.Emitter),this.onDidTriggerSystemContextMenu=this._onDidTriggerSystemContextMenu.event,this._onDidClose=this._register(new D.Emitter),this.onDidClose=this._onDidClose.event,this._onDidDestroy=this._register(new D.Emitter),this.onDidDestroy=this._onDidDestroy.event,this._lastFocusTime=-1,this.transientIsNativeFullScreen=void 0,this.joinNativeFullScreenTransition=void 0,this.hasWindowControlOverlay=!1,this.whenReadyCallbacks=[],this.touchBarGroups=[],this.currentHttpProxy=void 0,this.currentNoProxy=void 0,this.configObjectUrl=this._register(this.protocolMainService.createIPCObjectUrl()),this.wasLoaded=!1,this.readyState=0;{const[De,We]=this.restoreWindowState(W.state);this.windowState=De,this.logService.trace("window#ctor: using window state",De);const ye=this.windowState.mode===0||this.windowState.mode===3,we=this.configurationService.getValue("window"),K={width:this.windowState.width,height:this.windowState.height,x:this.windowState.x,y:this.windowState.y,backgroundColor:this.themeMainService.getBackgroundColor(),minWidth:k.WindowMinimumSize.WIDTH,minHeight:k.WindowMinimumSize.HEIGHT,show:!ye,title:this.productService.nameLong,webPreferences:{preload:h.FileAccess.asFileUri("vs/base/parts/sandbox/electron-sandbox/preload.js").fsPath,additionalArguments:[`--vscode-window-config=${this.configObjectUrl.resource.toString()}`],v8CacheOptions:this.environmentMainService.useCodeCache?"bypassHeatCheck":"none",enableWebSQL:!1,spellcheck:!1,zoomFactor:(0,k.zoomLevelToZoomFactor)(we?.zoomLevel),autoplayPolicy:"user-gesture-required",enableBlinkFeatures:"HighlightAPI",nodeIntegration:!0,contextIsolation:!1},experimentalDarkMode:!0};g.isLinux?K.icon=(0,d.join)(this.environmentMainService.appRoot,"resources/linux/code.png"):g.isWindows&&!this.environmentMainService.isBuilt&&(K.icon=(0,d.join)(this.environmentMainService.appRoot,"resources/win32/code_150x150.png")),g.isMacintosh&&!this.useNativeFullScreen()&&(K.fullscreenable=!1),g.isMacintosh&&(K.acceptFirstMouse=!0,we?.clickThroughInactive===!1&&(K.acceptFirstMouse=!1));const he=g.isMacintosh&&we?.nativeTabs===!0;he&&(K.tabbingIdentifier=this.productService.nameShort);const me=(0,k.getTitleBarStyle)(this.configurationService)==="custom";if(me&&(K.titleBarStyle="hidden",g.isMacintosh||(K.frame=!1),(0,k.useWindowControlsOverlay)(this.configurationService))){const Ie=this.themeMainService.getWindowSplash()?.colorInfo.titleBarBackground??this.themeMainService.getBackgroundColor(),Le=F.Color.fromHex(Ie).isDarker()?"#FFFFFF":"#000000";K.titleBarOverlay={height:29,color:Ie,symbolColor:Le},this.hasWindowControlOverlay=!0}if((0,m.mark)("code/willCreateCodeBrowserWindow"),this._win=new b.BrowserWindow(K),(0,m.mark)("code/didCreateCodeBrowserWindow"),this._id=this._win.id,g.isMacintosh&&me&&this._win.setSheetOffset(22),me&&(g.isWindows&&(0,k.useWindowControlsOverlay)(this.configurationService)||g.isMacintosh)){const Ie=this.stateService.getItem(ue.windowControlHeightStateStorageKey);Ie&&this.updateWindowControls({height:Ie})}g.isWindows&&me&&this._win.hookWindowMessage(278,()=>{const[Le,Fe]=this._win.getPosition(),Oe=b.screen.getCursorScreenPoint(),qe=Oe.x-Le,Ne=Oe.y-Fe;return(()=>!(qe>30&&Ne>=0&&Ne<=Math.max(this._win.getBounds().height*.15,35)))()||(this._win.setEnabled(!1),this._win.setEnabled(!0),this._onDidTriggerSystemContextMenu.fire({x:qe,y:Ne})),0}),(g.isMacintosh||g.isWindows)&&We&&(!he||b.BrowserWindow.getAllWindows().length===1)&&[this.windowState.width,this.windowState.height,this.windowState.x,this.windowState.y].every(Ie=>typeof Ie=="number")&&this._win.setBounds({width:this.windowState.width,height:this.windowState.height,x:this.windowState.x,y:this.windowState.y}),ye&&((0,m.mark)("code/willMaximizeCodeWindow"),this._win.maximize(),this.windowState.mode===3&&this.setFullScreen(!0),this._win.show(),(0,m.mark)("code/didMaximizeCodeWindow")),this._lastFocusTime=Date.now()}this.environmentMainService.args["open-devtools"]===!0&&this._win.webContents.openDevTools(),this.onConfigurationUpdated(),this.createTouchBar(),this.registerListeners()}setRepresentedFilename(W){g.isMacintosh?this._win.setRepresentedFilename(W):this.representedFilename=W}getRepresentedFilename(){return g.isMacintosh?this._win.getRepresentedFilename():this.representedFilename}setDocumentEdited(W){g.isMacintosh&&this._win.setDocumentEdited(W),this.documentEdited=W}isDocumentEdited(){return g.isMacintosh?this._win.isDocumentEdited():!!this.documentEdited}focus(W){g.isMacintosh&&W?.force&&b.app.focus({steal:!0}),this._win&&(this._win.isMinimized()&&this._win.restore(),this._win.focus())}setReady(){for(this.logService.trace(`window#load: window reported ready (id: ${this._id})`),this.readyState=2;this.whenReadyCallbacks.length;)this.whenReadyCallbacks.pop()(this);this._onDidSignalReady.fire()}ready(){return new Promise(W=>{if(this.isReady)return W(this);this.whenReadyCallbacks.push(W)})}get isReady(){return this.readyState===2}get whenClosedOrLoaded(){return new Promise(W=>{function U(){$.dispose(),X.dispose(),W()}const $=this.onDidClose(()=>U()),X=this.onWillLoad(()=>U())})}registerListeners(){this._win.on("unresponsive",()=>this.onWindowError(1)),this._win.webContents.on("render-process-gone",(U,$)=>this.onWindowError(2,{...$})),this._win.webContents.on("did-fail-load",(U,$,X)=>this.onWindowError(3,{reason:X,exitCode:$})),this._win.webContents.on("will-prevent-unload",U=>{U.preventDefault()}),this._win.on("closed",()=>{this._onDidClose.fire(),this.dispose()}),this._win.webContents.on("did-finish-load",()=>{this.pendingLoadConfig&&(this._config=this.pendingLoadConfig,this.pendingLoadConfig=void 0)}),this._win.on("focus",()=>{this._lastFocusTime=Date.now()}),this._win.on("maximize",U=>{this._config&&(this._config.maximized=!0),b.app.emit("browser-window-maximize",U,this._win)}),this._win.on("unmaximize",U=>{this._config&&(this._config.maximized=!1),b.app.emit("browser-window-unmaximize",U,this._win)}),this._win.on("enter-full-screen",()=>{this.sendWhenReady("vscode:enterFullScreen",n.CancellationToken.None),this.joinNativeFullScreenTransition?.complete(),this.joinNativeFullScreenTransition=void 0}),this._win.on("leave-full-screen",()=>{this.sendWhenReady("vscode:leaveFullScreen",n.CancellationToken.None),this.joinNativeFullScreenTransition?.complete(),this.joinNativeFullScreenTransition=void 0}),this._register(this.configurationService.onDidChangeConfiguration(U=>this.onConfigurationUpdated(U))),this._register(this.workspacesManagementMainService.onDidDeleteUntitledWorkspace(U=>this.onDidDeleteUntitledWorkspace(U)));const W=["https://marketplace.visualstudio.com/*","https://*.vsassets.io/*"];this._win.webContents.session.webRequest.onBeforeSendHeaders({urls:W},async(U,$)=>{const X=await this.getMarketplaceHeaders();$({cancel:!1,requestHeaders:Object.assign(U.requestHeaders,X)})})}getMarketplaceHeaders(){return this.marketplaceHeadersPromise||(this.marketplaceHeadersPromise=(0,s.resolveMarketplaceHeaders)(this.productService.version,this.productService,this.environmentMainService,this.configurationService,this.fileService,this.applicationStorageMainService,this.telemetryService)),this.marketplaceHeadersPromise}async onWindowError(W,U){switch(W){case 2:this.logService.error(`CodeWindow: renderer process gone (reason: ${U?.reason||"<unknown>"}, code: ${U?.exitCode||"<unknown>"})`);break;case 1:this.logService.error("CodeWindow: detected unresponsive");break;case 3:this.logService.error(`CodeWindow: failed to load (reason: ${U?.reason||"<unknown>"}, code: ${U?.exitCode||"<unknown>"})`);break}switch(this.telemetryService.publicLog2("windowerror",{type:W,reason:U?.reason,code:U?.exitCode}),W){case 1:case 2:if(this.isExtensionDevelopmentTestFromCli){this.lifecycleMainService.kill(1);return}if(this.environmentMainService.args["enable-smoke-test-driver"]){await this.destroyWindow(!1,!1),this.lifecycleMainService.quit();return}if(W===1){if(this.isExtensionDevelopmentHost||this.isExtensionTestHost||this._win&&this._win.webContents&&this._win.webContents.isDevToolsOpened())return;const{response:$,checkboxChecked:X}=await this.dialogMainService.showMessageBox({type:"warning",buttons:[(0,u.localize)(0,null),(0,u.localize)(1,null),(0,u.localize)(2,null)],message:(0,u.localize)(3,null),detail:(0,u.localize)(4,null),checkboxLabel:this._config?.workspace?(0,u.localize)(5,null):void 0},this._win);if($!==2){const se=$===0;await this.destroyWindow(se,X)}}else if(W===2){let $;U?$=(0,u.localize)(7,null,U.reason,U.exitCode??"<unknown>"):$=(0,u.localize)(6,null);const{response:X,checkboxChecked:se}=await this.dialogMainService.showMessageBox({type:"warning",buttons:[this._config?.workspace?(0,u.localize)(8,null):(0,u.localize)(9,null),(0,u.localize)(10,null)],message:$,detail:this._config?.workspace?(0,u.localize)(11,null):(0,u.localize)(12,null),checkboxLabel:this._config?.workspace?(0,u.localize)(13,null):void 0},this._win),ce=X===0;await this.destroyWindow(ce,se)}break}}async destroyWindow(W,U){const $=this._config?.workspace;if(U&&$)try{const X=this.storageMainService.workspaceStorage($);await X.init(),X.delete("memento/workbench.parts.editor"),await X.close()}catch(X){this.logService.error(X)}if(this._onDidDestroy.fire(),this._win?.destroy(),W&&this._config){let X,se;(0,C.isSingleFolderWorkspaceIdentifier)($)?X={folderUri:$.uri}:(0,C.isWorkspaceIdentifier)($)?X={workspaceUri:$.configPath}:se=!0,(0,ae.firstOrDefault)(await this.windowsMainService.open({context:5,userEnv:this._config.userEnv,cli:{...this.environmentMainService.args,_:[]},urisToOpen:X?[X]:void 0,forceEmpty:se,forceNewWindow:!0,remoteAuthority:this.remoteAuthority}))?.focus()}}onDidDeleteUntitledWorkspace(W){this._config?.workspace?.id===W.id&&(this._config.workspace=void 0)}onConfigurationUpdated(W){if(!W||W.affectsConfiguration("window.menuBarVisibility")){const U=this.getMenuBarVisibility();U!==this.currentMenuBarVisibility&&(this.currentMenuBarVisibility=U,this.setMenuBarVisibility(U))}if(!W||W.affectsConfiguration("http.proxy")){let U=(this.configurationService.getValue("http.proxy")||"").trim()||(process.env.https_proxy||process.env.HTTPS_PROXY||process.env.http_proxy||process.env.HTTP_PROXY||"").trim()||void 0;U?.endsWith("/")&&(U=U.substr(0,U.length-1));const $=(process.env.no_proxy||process.env.NO_PROXY||"").trim()||void 0;if((U||"").indexOf("@")===-1&&(U!==this.currentHttpProxy||$!==this.currentNoProxy)){this.currentHttpProxy=U,this.currentNoProxy=$;const X=U||"",se=$?`${$},<local>`:"<local>";this.logService.trace(`Setting proxy to '${X}', bypassing '${se}'`),this._win.webContents.session.setProxy({proxyRules:X,proxyBypassRules:se,pacScript:""})}}}addTabbedWindow(W){g.isMacintosh&&W.win&&this._win.addTabbedWindow(W.win)}load(W,U=Object.create(null)){this.logService.trace(`window#load: attempt to load window (id: ${this._id})`),this.isDocumentEdited()&&(!U.isReload||!this.backupMainService.isHotExitEnabled())&&this.setDocumentEdited(!1),U.isReload||(this.getRepresentedFilename()&&this.setRepresentedFilename(""),this._win.setTitle(this.productService.nameLong)),this.updateConfiguration(W,U),this.readyState===0?this._config=W:this.pendingLoadConfig=W,this.readyState=1,this._win.loadURL(h.FileAccess.asBrowserUri(`vs/code/electron-sandbox/workbench/workbench${this.environmentMainService.isBuilt?"":"-dev"}.html`).toString(!0));const $=this.wasLoaded;this.wasLoaded=!0,!this.environmentMainService.isBuilt&&!this.environmentMainService.extensionTestsLocationURI&&this._register(new A.RunOnceScheduler(()=>{this._win&&!this._win.isVisible()&&!this._win.isMinimized()&&(this._win.show(),this.focus({force:!0}),this._win.webContents.openDevTools())},1e4)).schedule(),this._onWillLoad.fire({workspace:W.workspace,reason:U.isReload?3:$?2:1})}updateConfiguration(W,U){const $=(this._config??this.pendingLoadConfig)?.userEnv;if($){const X=(0,c.isLaunchedFromCli)($)&&!(0,c.isLaunchedFromCli)(W.userEnv),se=this.isExtensionDevelopmentHost;(X||se)&&(W.userEnv={...$,...W.userEnv})}process.env.CHROME_CRASHPAD_PIPE_NAME&&Object.assign(W.userEnv,{CHROME_CRASHPAD_PIPE_NAME:process.env.CHROME_CRASHPAD_PIPE_NAME}),U.disableExtensions!==void 0&&(W["disable-extensions"]=U.disableExtensions),W.fullscreen=this.isFullScreen,W.maximized=this._win.isMaximized(),W.partsSplash=this.themeMainService.getWindowSplash(),(0,m.mark)("code/willOpenNewWindow"),W.perfMarks=(0,m.getMarks)(),this.configObjectUrl.update(W)}async reload(W){const U=Object.assign({},this._config);U.workspace=await this.validateWorkspaceBeforeReload(U),delete U.filesToOpenOrCreate,delete U.filesToDiff,delete U.filesToMerge,delete U.filesToWait,this.isExtensionDevelopmentHost&&W&&(U.verbose=W.verbose,U.debugId=W.debugId,U.extensionEnvironment=W.extensionEnvironment,U["inspect-extensions"]=W["inspect-extensions"],U["inspect-brk-extensions"]=W["inspect-brk-extensions"],U["extensions-dir"]=W["extensions-dir"]),U.accessibilitySupport=b.app.isAccessibilitySupportEnabled(),U.isInitialStartup=!1,U.policiesData=this.policyService.serialize(),U.continueOn=this.environmentMainService.continueOn,U.profiles={all:this.userDataProfilesService.profiles,profile:this.profile||this.userDataProfilesService.defaultProfile,home:this.userDataProfilesService.profilesHome},U.logLevel=this.loggerMainService.getLogLevel(),U.loggers={window:this.loggerMainService.getRegisteredLoggers(this.id),global:this.loggerMainService.getRegisteredLoggers()},this.load(U,{isReload:!0,disableExtensions:W?.["disable-extensions"]})}async validateWorkspaceBeforeReload(W){if((0,C.isWorkspaceIdentifier)(W.workspace)){const U=W.workspace.configPath;if(U.scheme===h.Schemas.file&&!await this.fileService.exists(U))return}else if((0,C.isSingleFolderWorkspaceIdentifier)(W.workspace)){const U=W.workspace.uri;if(U.scheme===h.Schemas.file&&!await this.fileService.exists(U))return}return W.workspace}serializeWindowState(){if(!this._win)return(0,T.defaultWindowState)();if(this.isFullScreen){let $;try{$=b.screen.getDisplayMatching(this.getBounds())}catch{}const X=(0,T.defaultWindowState)();return{mode:3,display:$?$.id:void 0,width:this.windowState.width||X.width,height:this.windowState.height||X.height,x:this.windowState.x||0,y:this.windowState.y||0}}const W=Object.create(null);let U;if(!g.isMacintosh&&this._win.isMaximized()?U=0:U=1,U===0?W.mode=0:W.mode=1,U===1||U===0){let $;U===1?$=this.getBounds():$=this._win.getNormalBounds(),W.x=$.x,W.y=$.y,W.width=$.width,W.height=$.height}return W}updateWindowControls(W){if(W.height&&this.stateService.setItem(ue.windowControlHeightStateStorageKey,W.height),g.isWindows&&this.hasWindowControlOverlay)this._win.setTitleBarOverlay({color:W.backgroundColor?.trim()===""?void 0:W.backgroundColor,symbolColor:W.foregroundColor?.trim()===""?void 0:W.foregroundColor,height:W.height?W.height-1:void 0});else if(g.isMacintosh&&W.height!==void 0){const U=(W.height-15)/2;U?this._win.setWindowButtonPosition({x:U,y:U}):this._win.setWindowButtonPosition(null)}}restoreWindowState(W){(0,m.mark)("code/willRestoreCodeWindowState");let U=!1;if(W)try{const $=b.screen.getAllDisplays();U=$.length>1,W=this.validateWindowState(W,$)}catch($){this.logService.warn(`Unexpected error validating window state: ${$}
${$.stack}`)}return(0,m.mark)("code/didRestoreCodeWindowState"),[W||(0,T.defaultWindowState)(),U]}validateWindowState(W,U){if(this.logService.trace(`window#validateWindowState: validating window state on ${U.length} display(s)`,W),typeof W.x!="number"||typeof W.y!="number"||typeof W.width!="number"||typeof W.height!="number"){this.logService.trace("window#validateWindowState: unexpected type of state values");return}if(W.width<=0||W.height<=0){this.logService.trace("window#validateWindowState: unexpected negative values");return}if(U.length===1){const se=this.getWorkingArea(U[0]);if(se){let ce=function(){!W||typeof W.x!="number"||typeof W.y!="number"||!se||(W.x<se.x&&(W.x=se.x),W.y<se.y&&(W.y=se.y))};this.logService.trace("window#validateWindowState: 1 monitor working area",se),ce(),W.width>se.width&&(W.width=se.width),W.height>se.height&&(W.height=se.height),W.x>se.x+se.width-128&&(W.x=se.x+se.width-W.width),W.y>se.y+se.height-128&&(W.y=se.y+se.height-W.height),ce()}return W}if(W.display&&W.mode===3){const se=U.find(ce=>ce.id===W.display);if(se&&typeof se.bounds?.x=="number"&&typeof se.bounds?.y=="number"){this.logService.trace("window#validateWindowState: restoring fullscreen to previous display");const ce=(0,T.defaultWindowState)(3);return ce.x=se.bounds.x,ce.y=se.bounds.y,ce}}let $,X;try{$=b.screen.getDisplayMatching({x:W.x,y:W.y,width:W.width,height:W.height}),X=this.getWorkingArea($)}catch{}if($&&X&&W.x+W.width>X.x&&W.y+W.height>X.y&&W.x<X.x+X.width&&W.y<X.y+X.height)return this.logService.trace("window#validateWindowState: multi-monitor working area",X),W}getWorkingArea(W){if(W.workArea.width>0&&W.workArea.height>0)return W.workArea;if(W.bounds.width>0&&W.bounds.height>0)return W.bounds}getBounds(){const[W,U]=this._win.getPosition(),[$,X]=this._win.getSize();return{x:W,y:U,width:$,height:X}}toggleFullScreen(){this.setFullScreen(!this.isFullScreen)}setFullScreen(W){this.useNativeFullScreen()?this.setNativeFullScreen(W):this.setSimpleFullScreen(W),this.sendWhenReady(W?"vscode:enterFullScreen":"vscode:leaveFullScreen",n.CancellationToken.None),this.currentMenuBarVisibility&&this.setMenuBarVisibility(this.currentMenuBarVisibility,!1)}get isFullScreen(){return g.isMacintosh&&typeof this.transientIsNativeFullScreen=="boolean"?this.transientIsNativeFullScreen:this._win.isFullScreen()||this._win.isSimpleFullScreen()}setNativeFullScreen(W){this._win.isSimpleFullScreen()&&this._win.setSimpleFullScreen(!1),this.doSetNativeFullScreen(W)}doSetNativeFullScreen(W){g.isMacintosh&&(this.transientIsNativeFullScreen=W,this.joinNativeFullScreenTransition=new A.DeferredPromise,Promise.race([this.joinNativeFullScreenTransition.p,(0,A.timeout)(1e3)]).finally(()=>this.transientIsNativeFullScreen=void 0)),this._win.setFullScreen(W)}setSimpleFullScreen(W){this._win.isFullScreen()&&this.doSetNativeFullScreen(!1),this._win.setSimpleFullScreen(W),this._win.webContents.focus()}useNativeFullScreen(){const W=this.configurationService.getValue("window");return!W||typeof W.nativeFullScreen!="boolean"||W.nativeTabs?!0:W.nativeFullScreen!==!1}isMinimized(){return this._win.isMinimized()}getMenuBarVisibility(){let W=(0,k.getMenuBarVisibility)(this.configurationService);return["visible","toggle","hidden"].indexOf(W)<0&&(W="classic"),W}setMenuBarVisibility(W,U=!0){g.isMacintosh||(W==="toggle"&&U&&this.send("vscode:showInfoMessage",(0,u.localize)(14,null)),W==="hidden"?setTimeout(()=>{this.doSetMenuBarVisibility(W)}):this.doSetMenuBarVisibility(W))}doSetMenuBarVisibility(W){const U=this.isFullScreen;switch(W){case"classic":this._win.setMenuBarVisibility(!U),this._win.autoHideMenuBar=U;break;case"visible":this._win.setMenuBarVisibility(!0),this._win.autoHideMenuBar=!1;break;case"toggle":this._win.setMenuBarVisibility(!1),this._win.autoHideMenuBar=!0;break;case"hidden":this._win.setMenuBarVisibility(!1),this._win.autoHideMenuBar=!1;break}}handleTitleDoubleClick(){if(g.isMacintosh)switch(b.systemPreferences.getUserDefault("AppleActionOnDoubleClick","string")){case"Minimize":this._win.minimize();break;case"None":break;case"Maximize":default:this._win.isMaximized()?this._win.unmaximize():this._win.maximize()}else this._win.isMaximized()?this._win.unmaximize():this._win.maximize()}close(){this._win?.close()}sendWhenReady(W,U,...$){this.isReady?this.send(W,...$):this.ready().then(()=>{U.isCancellationRequested||this.send(W,...$)})}send(W,...U){if(this._win){if(this._win.isDestroyed()||this._win.webContents.isDestroyed()){this.logService.warn(`Sending IPC message to channel '${W}' for window that is destroyed`);return}try{this._win.webContents.send(W,...U)}catch($){this.logService.warn(`Error sending IPC message to channel '${W}' of window ${this._id}: ${(0,O.toErrorMessage)($)}`)}}}updateTouchBar(W){g.isMacintosh&&this.touchBarGroups.forEach((U,$)=>{const X=W[$];U.segments=this.createTouchBarGroupSegments(X)})}createTouchBar(){if(g.isMacintosh){for(let W=0;W<10;W++){const U=this.createTouchBarGroup();this.touchBarGroups.push(U)}this._win.setTouchBar(new b.TouchBar({items:this.touchBarGroups}))}}createTouchBarGroup(W=[]){const U=this.createTouchBarGroupSegments(W),$=new b.TouchBar.TouchBarSegmentedControl({segments:U,mode:"buttons",segmentStyle:"automatic",change:X=>{this.sendWhenReady("vscode:runAction",n.CancellationToken.None,{id:$.segments[X].id,from:"touchbar"})}});return $}createTouchBarGroupSegments(W=[]){return W.map($=>{let X;$.icon&&!o.ThemeIcon.isThemeIcon($.icon)&&$.icon?.dark?.scheme===h.Schemas.file&&(X=b.nativeImage.createFromPath(w.URI.revive($.icon.dark).fsPath),X.isEmpty()&&(X=void 0));let se;return typeof $.title=="string"?se=$.title:se=$.title.value,{id:$.id,label:X?void 0:se,icon:X}})}dispose(){super.dispose(),this.loggerMainService.deregisterLoggers(this.id),this._win=null}};e.CodeWindow=G,e.CodeWindow=G=ue=be([Y(1,S.ILogService),Y(2,de.ILoggerMainService),Y(3,v.IEnvironmentMainService),Y(4,z.IPolicyService),Y(5,ne.IUserDataProfilesMainService),Y(6,f.IFileService),Y(7,i.IApplicationStorageMainService),Y(8,i.IStorageMainService),Y(9,E.IConfigurationService),Y(10,p.IThemeMainService),Y(11,L.IWorkspacesManagementMainService),Y(12,y.IBackupMainService),Y(13,r.ITelemetryService),Y(14,l.IDialogMainService),Y(15,I.ILifecycleMainService),Y(16,t.IProductService),Y(17,a.IProtocolMainService),Y(18,M.IWindowsMainService),Y(19,oe.IStateService)],G)}),define(Z[84],ee([0,1,14,24,8,3,46,2,15,4,19,7,21,193,6,20,5,83,99,30,54,35]),function(H,e,b,A,n,O,D,P,h,d,m,g,w,u,y,E,l,v,c,f,I,S){"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspacesHistoryMainService=e.IWorkspacesHistoryMainService=void 0,e.IWorkspacesHistoryMainService=(0,y.createDecorator)("workspacesHistoryMainService");let a=class extends P.Disposable{static{t=this}static{this.MAX_TOTAL_RECENT_ENTRIES=500}static{this.RECENTLY_OPENED_STORAGE_KEY="history.recentlyOpenedPathsList"}constructor(i,r,o,p){super(),this.logService=i,this.workspacesManagementMainService=r,this.lifecycleMainService=o,this.applicationStorageMainService=p,this._onDidChangeRecentlyOpened=this._register(new O.Emitter),this.onDidChangeRecentlyOpened=this._onDidChangeRecentlyOpened.event,this.macOSRecentDocumentsUpdater=this._register(new n.ThrottledDelayer(800)),this.registerListeners()}registerListeners(){this.lifecycleMainService.when(4).then(()=>this.handleWindowsJumpList()),this._register(this.workspacesManagementMainService.onDidEnterWorkspace(i=>this.addRecentlyOpened([{workspace:i.workspace,remoteAuthority:i.window.remoteAuthority}])))}async addRecentlyOpened(i){let r=[],o=[];for(const k of i)if((0,c.isRecentWorkspace)(k))!this.workspacesManagementMainService.isUntitledWorkspace(k.workspace)&&!this.containsWorkspace(r,k.workspace)&&r.push(k);else if((0,c.isRecentFolder)(k))this.containsFolder(r,k.folderUri)||r.push(k);else{const M=this.containsFile(o,k.fileUri),C=k.fileUri.scheme===h.Schemas.file&&t.COMMON_FILES_FILTER.indexOf((0,m.basename)(k.fileUri))>=0;!M&&!C&&(o.push(k),d.isWindows&&k.fileUri.scheme===h.Schemas.file&&b.app.addRecentDocument(k.fileUri.fsPath))}const p=await this.mergeEntriesFromStorage({workspaces:r,files:o});r=p.workspaces,o=p.files,r.length>t.MAX_TOTAL_RECENT_ENTRIES&&(r.length=t.MAX_TOTAL_RECENT_ENTRIES),o.length>t.MAX_TOTAL_RECENT_ENTRIES&&(o.length=t.MAX_TOTAL_RECENT_ENTRIES),await this.saveRecentlyOpened({workspaces:r,files:o}),this._onDidChangeRecentlyOpened.fire(),d.isMacintosh&&this.macOSRecentDocumentsUpdater.trigger(()=>this.updateMacOSRecentDocuments())}async removeRecentlyOpened(i){const r=M=>{const C=this.location(M);for(const L of i)if(m.extUriBiasedIgnorePathCase.isEqual(L,C))return!1;return!0},o=await this.getRecentlyOpened(),p=o.workspaces.filter(r),k=o.files.filter(r);(p.length!==o.workspaces.length||k.length!==o.files.length)&&(await this.saveRecentlyOpened({files:k,workspaces:p}),this._onDidChangeRecentlyOpened.fire(),d.isMacintosh&&this.macOSRecentDocumentsUpdater.trigger(()=>this.updateMacOSRecentDocuments()))}async clearRecentlyOpened(){await this.saveRecentlyOpened({workspaces:[],files:[]}),b.app.clearRecentDocuments(),this._onDidChangeRecentlyOpened.fire()}async getRecentlyOpened(){return this.mergeEntriesFromStorage()}async mergeEntriesFromStorage(i){const r=new S.ResourceMap(k=>m.extUriBiasedIgnorePathCase.getComparisonKey(k));if(i?.workspaces)for(const k of i.workspaces)r.set(this.location(k),k);const o=new S.ResourceMap(k=>m.extUriBiasedIgnorePathCase.getComparisonKey(k));if(i?.files)for(const k of i.files)o.set(this.location(k),k);const p=await this.getRecentlyOpenedFromStorage();for(const k of p.workspaces){const M=r.get(this.location(k));M?M.label=M.label??k.label:r.set(this.location(k),k)}for(const k of p.files){const M=o.get(this.location(k));M?M.label=M.label??k.label:o.set(this.location(k),k)}return{workspaces:[...r.values()],files:[...o.values()]}}async getRecentlyOpenedFromStorage(){await this.applicationStorageMainService.whenReady;let i;const r=this.applicationStorageMainService.get(t.RECENTLY_OPENED_STORAGE_KEY,-1);if(typeof r=="string")try{i=JSON.parse(r)}catch(o){this.logService.error("Unexpected error parsing opened paths list",o)}return(0,c.restoreRecentlyOpened)(i,this.logService)}async saveRecentlyOpened(i){await this.applicationStorageMainService.whenReady,this.applicationStorageMainService.store(t.RECENTLY_OPENED_STORAGE_KEY,JSON.stringify((0,c.toStoreData)(i)),-1,1)}location(i){return(0,c.isRecentFolder)(i)?i.folderUri:(0,c.isRecentFile)(i)?i.fileUri:i.workspace.configPath}containsWorkspace(i,r){return!!i.find(o=>(0,c.isRecentWorkspace)(o)&&o.workspace.id===r.id)}containsFolder(i,r){return!!i.find(o=>(0,c.isRecentFolder)(o)&&m.extUriBiasedIgnorePathCase.isEqual(o.folderUri,r))}containsFile(i,r){return!!i.find(o=>m.extUriBiasedIgnorePathCase.isEqual(o.fileUri,r))}static{this.MAX_MACOS_DOCK_RECENT_WORKSPACES=7}static{this.MAX_MACOS_DOCK_RECENT_ENTRIES_TOTAL=10}static{this.MAX_WINDOWS_JUMP_LIST_ENTRIES=7}static{this.COMMON_FILES_FILTER=["COMMIT_EDITMSG","MERGE_MSG"]}async handleWindowsJumpList(){d.isWindows&&(await this.updateWindowsJumpList(),this._register(this.onDidChangeRecentlyOpened(()=>this.updateWindowsJumpList())))}async updateWindowsJumpList(){if(!d.isWindows)return;const i=[];if(i.push({type:"tasks",items:[{type:"task",title:(0,u.localize)(0,null),description:(0,u.localize)(1,null),program:process.execPath,args:"-n",iconPath:process.execPath,iconIndex:0}]}),(await this.getRecentlyOpened()).workspaces.length>0){const r=[];for(const k of b.app.getJumpListSettings().removedItems){const M=k.args;if(M){const C=/^--(folder|file)-uri\s+"([^"]+)"$/.exec(M);C&&r.push(g.URI.parse(C[2]))}}await this.removeRecentlyOpened(r);let o=!1;const p=(0,A.coalesce)((await this.getRecentlyOpened()).workspaces.slice(0,t.MAX_WINDOWS_JUMP_LIST_ENTRIES).map(k=>{const M=(0,c.isRecentWorkspace)(k)?k.workspace:k.folderUri,{title:C,description:L}=this.getWindowsJumpListLabel(M,k.label);let T;return g.URI.isUri(M)?T=`--folder-uri "${M.toString()}"`:(o=!0,T=`--file-uri "${M.configPath.toString()}"`),{type:"task",title:C.substr(0,255),description:L.substr(0,255),program:process.execPath,args:T,iconPath:"explorer.exe",iconIndex:0}}));p.length>0&&i.push({type:"custom",name:o?(0,u.localize)(2,null):(0,u.localize)(3,null),items:p})}i.push({type:"recent"});try{const r=b.app.setJumpList(i);r&&r!=="ok"&&this.logService.warn(`updateWindowsJumpList#setJumpList unexpected result: ${r}`)}catch(r){this.logService.warn("updateWindowsJumpList#setJumpList",r)}}getWindowsJumpListLabel(i,r){if(r)return{title:(0,D.splitRecentLabel)(r).name,description:r};if(g.URI.isUri(i))return{title:(0,m.basename)(i),description:this.renderJumpListPathDescription(i)};if(this.workspacesManagementMainService.isUntitledWorkspace(i))return{title:(0,u.localize)(4,null),description:""};let o=(0,m.basename)(i.configPath);return o.endsWith(f.WORKSPACE_EXTENSION)&&(o=o.substr(0,o.length-f.WORKSPACE_EXTENSION.length-1)),{title:(0,u.localize)(5,null,o),description:this.renderJumpListPathDescription(i.configPath)}}renderJumpListPathDescription(i){return i.scheme==="file"?(0,D.normalizeDriveLetter)(i.fsPath):i.toString()}async updateMacOSRecentDocuments(){if(!d.isMacintosh)return;b.app.clearRecentDocuments();const i=await this.getRecentlyOpened(),r=[];let o=0;for(let k=0;k<i.workspaces.length&&o<t.MAX_MACOS_DOCK_RECENT_WORKSPACES;k++){const M=this.location(i.workspaces[k]);if(M.scheme===h.Schemas.file){const C=(0,m.originalFSPath)(M);await w.Promises.exists(C)&&(r.push(C),o++)}}const p=[];for(let k=0;k<i.files.length&&o<t.MAX_MACOS_DOCK_RECENT_ENTRIES_TOTAL;k++){const M=this.location(i.files[k]);if(M.scheme===h.Schemas.file){const C=(0,m.originalFSPath)(M);if(t.COMMON_FILES_FILTER.includes((0,m.basename)(M))||r.includes(C))continue;await w.Promises.exists(C)&&(p.push(C),o++)}}p.reverse().forEach(k=>b.app.addRecentDocument(k)),r.reverse().forEach(k=>b.app.addRecentDocument(k))}};e.WorkspacesHistoryMainService=a,e.WorkspacesHistoryMainService=a=t=be([Y(0,l.ILogService),Y(1,I.IWorkspacesManagementMainService),Y(2,E.ILifecycleMainService),Y(3,v.IApplicationStorageMainService)],a)}),define(Z[305],ee([0,1,14,8,23,46,4,7,181,18,28,20,5,231,68,22,34,25,48,81,29,84]),function(H,e,b,A,n,O,D,P,h,d,m,g,w,u,y,E,l,v,c,f,I,S){"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.Menubar=void 0;const a="menu";let s=class{static{t=this}static{this.lastKnownMenubarStorageKey="lastKnownMenubarData"}constructor(o,p,k,M,C,L,T,F,z,oe,ne){this.updateService=o,this.configurationService=p,this.windowsMainService=k,this.environmentMainService=M,this.telemetryService=C,this.workspacesHistoryMainService=L,this.stateService=T,this.lifecycleMainService=F,this.logService=z,this.nativeHostMainService=oe,this.productService=ne,this.fallbackMenuHandlers=Object.create(null),this.menuUpdater=new A.RunOnceScheduler(()=>this.doUpdateMenu(),0),this.menuGC=new A.RunOnceScheduler(()=>{this.oldMenus=[]},1e4),this.menubarMenus=Object.create(null),this.keybindings=Object.create(null),(D.isMacintosh||(0,f.getTitleBarStyle)(this.configurationService)==="native")&&this.restoreCachedMenubarData(),this.addFallbackHandlers(),this.closedLastWindow=!1,this.noActiveWindow=!1,this.oldMenus=[],this.install(),this.registerListeners()}restoreCachedMenubarData(){const o=this.stateService.getItem(t.lastKnownMenubarStorageKey);o&&(o.menus&&(this.menubarMenus=o.menus),o.keybindings&&(this.keybindings=o.keybindings))}addFallbackHandlers(){this.fallbackMenuHandlers["workbench.action.files.newUntitledFile"]=(L,T,F)=>this.windowsMainService.openEmptyWindow({context:2,contextWindowId:T?.id}),this.fallbackMenuHandlers["workbench.action.newWindow"]=(L,T,F)=>this.windowsMainService.openEmptyWindow({context:2,contextWindowId:T?.id}),this.fallbackMenuHandlers["workbench.action.files.openFileFolder"]=(L,T,F)=>this.nativeHostMainService.pickFileFolderAndOpen(void 0,{forceNewWindow:this.isOptionClick(F),telemetryExtraData:{from:a}}),this.fallbackMenuHandlers["workbench.action.files.openFolder"]=(L,T,F)=>this.nativeHostMainService.pickFolderAndOpen(void 0,{forceNewWindow:this.isOptionClick(F),telemetryExtraData:{from:a}}),this.fallbackMenuHandlers["workbench.action.openWorkspace"]=(L,T,F)=>this.nativeHostMainService.pickWorkspaceAndOpen(void 0,{forceNewWindow:this.isOptionClick(F),telemetryExtraData:{from:a}}),this.fallbackMenuHandlers["workbench.action.clearRecentFiles"]=()=>this.workspacesHistoryMainService.clearRecentlyOpened();const o=this.productService.youTubeUrl;o&&(this.fallbackMenuHandlers["workbench.action.openYouTubeUrl"]=()=>this.openUrl(o,"openYouTubeUrl"));const p=this.productService.requestFeatureUrl;p&&(this.fallbackMenuHandlers["workbench.action.openRequestFeatureUrl"]=()=>this.openUrl(p,"openUserVoiceUrl"));const k=this.productService.reportIssueUrl;k&&(this.fallbackMenuHandlers["workbench.action.openIssueReporter"]=()=>this.openUrl(k,"openReportIssues"));const M=this.productService.licenseUrl;M&&(this.fallbackMenuHandlers["workbench.action.openLicenseUrl"]=()=>{if(D.language){const L=M.indexOf("?")>0?"&":"?";this.openUrl(`${M}${L}lang=${D.language}`,"openLicenseUrl")}else this.openUrl(M,"openLicenseUrl")});const C=this.productService.privacyStatementUrl;C&&M&&(this.fallbackMenuHandlers["workbench.action.openPrivacyStatementUrl"]=()=>{this.openUrl(C,"openPrivacyStatement")})}registerListeners(){this.lifecycleMainService.onWillShutdown(()=>this.willShutdown=!0),this.windowsMainService.onDidChangeWindowsCount(o=>this.onDidChangeWindowsCount(o)),this.nativeHostMainService.onDidBlurWindow(()=>this.onDidChangeWindowFocus()),this.nativeHostMainService.onDidFocusWindow(()=>this.onDidChangeWindowFocus())}get currentEnableMenuBarMnemonics(){const o=this.configurationService.getValue("window.enableMenuBarMnemonics");return typeof o!="boolean"?!0:o}get currentEnableNativeTabs(){if(!D.isMacintosh)return!1;const o=this.configurationService.getValue("window.nativeTabs");return typeof o!="boolean"?!1:o}updateMenu(o,p){this.menubarMenus=o.menus,this.keybindings=o.keybindings,this.stateService.setItem(t.lastKnownMenubarStorageKey,o),this.scheduleUpdateMenu()}scheduleUpdateMenu(){this.menuUpdater.schedule()}doUpdateMenu(){this.willShutdown||setTimeout(()=>{this.willShutdown||this.install()},10)}onDidChangeWindowsCount(o){D.isMacintosh&&(o.oldCount===0&&o.newCount>0||o.oldCount>0&&o.newCount===0)&&(this.closedLastWindow=o.newCount===0,this.scheduleUpdateMenu())}onDidChangeWindowFocus(){D.isMacintosh&&(this.noActiveWindow=!b.BrowserWindow.getFocusedWindow(),this.scheduleUpdateMenu())}install(){const o=b.Menu.getApplicationMenu();if(o&&this.oldMenus.push(o),Object.keys(this.menubarMenus).length===0){b.Menu.setApplicationMenu(D.isMacintosh?new b.Menu:null);return}const p=new b.Menu;let k;if(D.isMacintosh){const C=new b.Menu;k=new b.MenuItem({label:this.productService.nameLong,submenu:C}),this.setMacApplicationMenu(C),p.append(k)}if(D.isMacintosh&&!this.appMenuInstalled){this.appMenuInstalled=!0;const C=new b.Menu;C.append(new b.MenuItem({label:this.mnemonicLabel(h.localize(0,null)),click:()=>this.windowsMainService.openEmptyWindow({context:1})})),b.app.dock.setMenu(C)}if(this.shouldDrawMenu("File")){const C=new b.Menu,L=new b.MenuItem({label:this.mnemonicLabel(h.localize(1,null)),submenu:C});this.setMenuById(C,"File"),p.append(L)}if(this.shouldDrawMenu("Edit")){const C=new b.Menu,L=new b.MenuItem({label:this.mnemonicLabel(h.localize(2,null)),submenu:C});this.setMenuById(C,"Edit"),p.append(L)}if(this.shouldDrawMenu("View")){const C=new b.Menu,L=new b.MenuItem({label:this.mnemonicLabel(h.localize(3,null)),submenu:C});this.setMenuById(C,"View"),p.append(L)}let M;if(this.shouldDrawMenu("Window")){const C=new b.Menu;M=new b.MenuItem({label:this.mnemonicLabel(h.localize(4,null)),submenu:C,role:"window"}),this.setMacWindowMenu(C)}if(M&&p.append(M),this.shouldDrawMenu("Help")){const C=new b.Menu,L=new b.MenuItem({label:this.mnemonicLabel(h.localize(5,null)),submenu:C,role:"help"});this.setMenuById(C,"Help"),p.append(L)}p.items&&p.items.length>0?b.Menu.setApplicationMenu(p):b.Menu.setApplicationMenu(null),this.menuGC.schedule()}setMacApplicationMenu(o){const p=this.createMenuItem(h.localize(6,null,this.productService.nameLong),"workbench.action.showAboutDialog"),k=this.getUpdateMenuItems();let M;if(this.shouldDrawMenu("Preferences")){const de=new b.Menu;this.setMenuById(de,"Preferences"),M=new b.MenuItem({label:this.mnemonicLabel(h.localize(7,null)),submenu:de})}const C=new b.Menu,L=new b.MenuItem({label:h.localize(8,null),role:"services",submenu:C}),T=new b.MenuItem({label:h.localize(9,null,this.productService.nameLong),role:"hide",accelerator:"Command+H"}),F=new b.MenuItem({label:h.localize(10,null),role:"hideOthers",accelerator:"Command+Alt+H"}),z=new b.MenuItem({label:h.localize(11,null),role:"unhide"}),oe=new b.MenuItem(this.likeAction("workbench.action.quit",{label:h.localize(12,null,this.productService.nameLong),click:async(de,ae,ue)=>{const j=this.windowsMainService.getLastActiveWindow();(this.windowsMainService.getWindowCount()===0||b.BrowserWindow.getFocusedWindow()||j?.isMinimized())&&await this.confirmBeforeQuit(ue)&&this.nativeHostMainService.quit(void 0)}})),ne=[p];ne.push(...k),M&&ne.push(i(),M),ne.push(i(),L,i(),T,F,z,i(),oe),ne.forEach(de=>o.append(de))}async confirmBeforeQuit(o){if(this.windowsMainService.getWindowCount()===0)return!0;const p=this.configurationService.getValue("window.confirmBeforeClose");if(p==="always"||p==="keyboardOnly"&&this.isKeyboardEvent(o)){const{response:k}=await this.nativeHostMainService.showMessageBox(this.windowsMainService.getFocusedWindow()?.id,{type:"question",buttons:[h.localize(13,null),h.localize(14,null)],message:h.localize(15,null)});return k===0}return!0}shouldDrawMenu(o){if(!D.isMacintosh&&(0,f.getTitleBarStyle)(this.configurationService)==="custom")return!1;switch(o){case"File":case"Help":if(D.isMacintosh)return this.windowsMainService.getWindowCount()===0&&this.closedLastWindow||this.windowsMainService.getWindowCount()>0&&this.noActiveWindow||!!this.menubarMenus&&!!this.menubarMenus[o];case"Window":if(D.isMacintosh)return this.windowsMainService.getWindowCount()===0&&this.closedLastWindow||this.windowsMainService.getWindowCount()>0&&this.noActiveWindow||!!this.menubarMenus;default:return this.windowsMainService.getWindowCount()>0&&!!this.menubarMenus&&!!this.menubarMenus[o]}}setMenu(o,p){p.forEach(k=>{if((0,u.isMenubarMenuItemSeparator)(k))o.append(i());else if((0,u.isMenubarMenuItemSubmenu)(k)){const M=new b.Menu,C=new b.MenuItem({label:this.mnemonicLabel(k.label),submenu:M});this.setMenu(M,k.submenu.items),o.append(C)}else(0,u.isMenubarMenuItemRecentAction)(k)?o.append(this.createOpenRecentMenuItem(k)):(0,u.isMenubarMenuItemAction)(k)&&(k.id==="workbench.action.showAboutDialog"&&this.insertCheckForUpdatesItems(o),D.isMacintosh?this.windowsMainService.getWindowCount()===0&&this.closedLastWindow||this.windowsMainService.getWindowCount()>0&&this.noActiveWindow?this.fallbackMenuHandlers[k.id]?o.append(new b.MenuItem(this.likeAction(k.id,{label:this.mnemonicLabel(k.label),click:this.fallbackMenuHandlers[k.id]}))):o.append(this.createMenuItem(k.label,k.id,!1,k.checked)):o.append(this.createMenuItem(k.label,k.id,k.enabled!==!1,!!k.checked)):o.append(this.createMenuItem(k.label,k.id,k.enabled!==!1,!!k.checked)))})}setMenuById(o,p){this.menubarMenus&&this.menubarMenus[p]&&this.setMenu(o,this.menubarMenus[p].items)}insertCheckForUpdatesItems(o){const p=this.getUpdateMenuItems();p.length&&(p.forEach(k=>o.append(k)),o.append(i()))}createOpenRecentMenuItem(o){const p=P.URI.revive(o.uri),k=o.id,M=k==="openRecentFile"?{fileUri:p}:k==="openRecentWorkspace"?{workspaceUri:p}:{folderUri:p};return new b.MenuItem(this.likeAction(k,{label:o.label,click:async(C,L,T)=>{const F=this.isOptionClick(T);(await this.windowsMainService.open({context:2,cli:this.environmentMainService.args,urisToOpen:[M],forceNewWindow:F,gotoLineMode:!1,remoteAuthority:o.remoteAuthority})).length>0||await this.workspacesHistoryMainService.removeRecentlyOpened([p])}},!1))}isOptionClick(o){return!!(o&&(!D.isMacintosh&&(o.ctrlKey||o.shiftKey)||D.isMacintosh&&(o.metaKey||o.altKey)))}isKeyboardEvent(o){return!!(o.triggeredByAccelerator||o.altKey||o.ctrlKey||o.metaKey||o.shiftKey)}createRoleMenuItem(o,p,k){const M={label:this.mnemonicLabel(o),role:k,enabled:!0};return new b.MenuItem(this.withKeybinding(p,M))}setMacWindowMenu(o){const p=new b.MenuItem({label:h.localize(16,null),role:"minimize",accelerator:"Command+M",enabled:this.windowsMainService.getWindowCount()>0}),k=new b.MenuItem({label:h.localize(17,null),role:"zoom",enabled:this.windowsMainService.getWindowCount()>0}),M=new b.MenuItem({label:h.localize(18,null),role:"front",enabled:this.windowsMainService.getWindowCount()>0}),C=this.createMenuItem(h.localize(19,null),"workbench.action.switchWindow"),L=[];this.currentEnableNativeTabs&&(L.push(i()),L.push(this.createMenuItem(h.localize(20,null),"workbench.action.newWindowTab")),L.push(this.createRoleMenuItem(h.localize(21,null),"workbench.action.showPreviousWindowTab","selectPreviousTab")),L.push(this.createRoleMenuItem(h.localize(22,null),"workbench.action.showNextWindowTab","selectNextTab")),L.push(this.createRoleMenuItem(h.localize(23,null),"workbench.action.moveWindowTabToNewWindow","moveTabToNewWindow")),L.push(this.createRoleMenuItem(h.localize(24,null),"workbench.action.mergeAllWindowTabs","mergeAllWindows"))),[p,k,i(),C,...L,i(),M].forEach(T=>o.append(T))}getUpdateMenuItems(){switch(this.updateService.state.type){case"idle":return[new b.MenuItem({label:this.mnemonicLabel(h.localize(25,null)),click:()=>setTimeout(()=>{this.reportMenuActionTelemetry("CheckForUpdate"),this.updateService.checkForUpdates(!0)},0)})];case"checking for updates":return[new b.MenuItem({label:h.localize(26,null),enabled:!1})];case"available for download":return[new b.MenuItem({label:this.mnemonicLabel(h.localize(27,null)),click:()=>{this.updateService.downloadUpdate()}})];case"downloading":return[new b.MenuItem({label:h.localize(28,null),enabled:!1})];case"downloaded":return[new b.MenuItem({label:this.mnemonicLabel(h.localize(29,null)),click:()=>{this.reportMenuActionTelemetry("InstallUpdate"),this.updateService.applyUpdate()}})];case"updating":return[new b.MenuItem({label:h.localize(30,null),enabled:!1})];case"ready":return[new b.MenuItem({label:this.mnemonicLabel(h.localize(31,null)),click:()=>{this.reportMenuActionTelemetry("RestartToUpdate"),this.updateService.quitAndInstall()}})];default:return[]}}createMenuItem(o,p,k,M){const C=this.mnemonicLabel(o),L=typeof p=="function"?p:(ne,de,ae)=>{const ue=ne?ne.userSettingsLabel:null;let j=p;Array.isArray(p)&&(j=this.isOptionClick(ae)?p[1]:p[0]),ue&&ae.triggeredByAccelerator?this.runActionInRenderer({type:"keybinding",userSettingsLabel:ue}):this.runActionInRenderer({type:"commandId",commandId:j})},T=typeof k=="boolean"?k:this.windowsMainService.getWindowCount()>0,F=typeof M=="boolean"?M:!1,z={label:C,click:L,enabled:T};F&&(z.type="checkbox",z.checked=F);let oe;return typeof p=="string"?oe=p:Array.isArray(p)&&(oe=p[0]),D.isMacintosh&&(oe==="editor.action.clipboardCutAction"?z.role="cut":oe==="editor.action.clipboardCopyAction"?z.role="copy":oe==="editor.action.clipboardPasteAction"&&(z.role="paste"),oe==="undo"?z.click=this.makeContextAwareClickHandler(L,{inDevTools:ne=>ne.undo(),inNoWindow:()=>b.Menu.sendActionToFirstResponder("undo:")}):oe==="redo"?z.click=this.makeContextAwareClickHandler(L,{inDevTools:ne=>ne.redo(),inNoWindow:()=>b.Menu.sendActionToFirstResponder("redo:")}):oe==="editor.action.selectAll"&&(z.click=this.makeContextAwareClickHandler(L,{inDevTools:ne=>ne.selectAll(),inNoWindow:()=>b.Menu.sendActionToFirstResponder("selectAll:")}))),new b.MenuItem(this.withKeybinding(oe,z))}makeContextAwareClickHandler(o,p){return(k,M,C)=>{const L=b.BrowserWindow.getFocusedWindow();if(!L)return p.inNoWindow();if(L.webContents.isDevToolsFocused()&&L.webContents.devToolsWebContents)return p.inDevTools(L.webContents.devToolsWebContents);o(k,M||L,C)}}runActionInRenderer(o){let p=b.BrowserWindow.getFocusedWindow();if(!p){const M=this.windowsMainService.getLastActiveWindow();M?.isMinimized()&&(p=M.win)}const k=p?this.windowsMainService.getWindowById(p.id):void 0;if(k){if(this.logService.trace("menubar#runActionInRenderer",o),D.isMacintosh&&!this.environmentMainService.isBuilt&&!k.isReady&&(o.type==="commandId"&&o.commandId==="workbench.action.toggleDevTools"||o.type!=="commandId"&&o.userSettingsLabel==="alt+cmd+i"))return;if(o.type==="commandId"){const M={id:o.commandId,from:"menu"};k.sendWhenReady("vscode:runAction",n.CancellationToken.None,M)}else{const M={userSettingsLabel:o.userSettingsLabel};k.sendWhenReady("vscode:runKeybinding",n.CancellationToken.None,M)}}else this.logService.trace("menubar#runActionInRenderer: no active window found",o)}withKeybinding(o,p){const k=typeof o=="string"?this.keybindings[o]:void 0;if(k?.label){if(k.isNative!==!1)p.accelerator=k.label,p.userSettingsLabel=k.userSettingsLabel;else if(typeof p.label=="string"){const M=p.label.indexOf("[");M>=0?p.label=`${p.label.substr(0,M)} [${k.label}]`:p.label=`${p.label} [${k.label}]`}}else p.accelerator=void 0;return p}likeAction(o,p,k=!p.accelerator){k&&(p=this.withKeybinding(o,p));const M=p.click;return p.click=(C,L,T)=>{this.reportMenuActionTelemetry(o),M?.(C,L,T)},p}openUrl(o,p){this.nativeHostMainService.openExternal(void 0,o),this.reportMenuActionTelemetry(p)}reportMenuActionTelemetry(o){this.telemetryService.publicLog2("workbenchActionExecuted",{id:o,from:a})}mnemonicLabel(o){return(0,O.mnemonicMenuLabel)(o,!this.currentEnableMenuBarMnemonics)}};e.Menubar=s,e.Menubar=s=t=be([Y(0,c.IUpdateService),Y(1,d.IConfigurationService),Y(2,I.IWindowsMainService),Y(3,m.IEnvironmentMainService),Y(4,v.ITelemetryService),Y(5,S.IWorkspacesHistoryMainService),Y(6,l.IStateService),Y(7,g.ILifecycleMainService),Y(8,w.ILogService),Y(9,y.INativeHostMainService),Y(10,E.IProductService)],s);function i(){return new b.MenuItem({type:"separator"})}}),define(Z[306],ee([0,1,6,20,5,305]),function(H,e,b,A,n,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MenubarMainService=e.IMenubarMainService=void 0,e.IMenubarMainService=(0,b.createDecorator)("menubarMainService");let D=class{constructor(h,d,m){this.instantiationService=h,this.lifecycleMainService=d,this.logService=m,this.menubar=this.installMenuBarAfterWindowOpen()}async installMenuBarAfterWindowOpen(){return await this.lifecycleMainService.when(3),this.instantiationService.createInstance(O.Menubar)}async updateMenubar(h,d){this.logService.trace("menubarService#updateMenubar",h),(await this.menubar).updateMenu(d,h)}};e.MenubarMainService=D,e.MenubarMainService=D=be([Y(0,b.IInstantiationService),Y(1,A.ILifecycleMainService),Y(2,n.ILogService)],D)}),define(Z[307],ee([0,1,14,21,133,27,24,23,3,32,49,46,2,15,10,65,4,36,19,12,7,191,64,18,61,28,16,6,20,5,67,79,60,34,81,304,132,300,30,100,84,54,80,39,53,66]),function(H,e,b,A,n,O,D,P,h,d,m,g,w,u,y,E,l,v,c,f,I,S,t,a,s,i,r,o,p,k,M,C,L,T,F,z,oe,ne,de,ae,ue,j,G,B,W,U){"use strict";var $;Object.defineProperty(e,"__esModule",{value:!0}),e.WindowsMainService=void 0;function X(x){return(0,de.isWorkspaceIdentifier)(x?.workspace)}function se(x){return(0,de.isSingleFolderWorkspaceIdentifier)(x?.workspace)}let ce=class extends w.Disposable{static{$=this}static{this.WINDOWS=[]}constructor(R,_,N,q,re,ie,le,V,te,Q,fe,pe,Pe,De,We,ye,we,K){super(),this.machineId=R,this.initialUserEnv=_,this.logService=N,this.loggerService=q,this.stateService=re,this.policyService=ie,this.environmentMainService=le,this.userDataProfilesMainService=V,this.lifecycleMainService=te,this.backupMainService=Q,this.configurationService=fe,this.workspacesHistoryMainService=pe,this.workspacesManagementMainService=Pe,this.instantiationService=De,this.dialogMainService=We,this.fileService=ye,this.protocolMainService=we,this.themeMainService=K,this._onDidOpenWindow=this._register(new h.Emitter),this.onDidOpenWindow=this._onDidOpenWindow.event,this._onDidSignalReadyWindow=this._register(new h.Emitter),this.onDidSignalReadyWindow=this._onDidSignalReadyWindow.event,this._onDidDestroyWindow=this._register(new h.Emitter),this.onDidDestroyWindow=this._onDidDestroyWindow.event,this._onDidChangeWindowsCount=this._register(new h.Emitter),this.onDidChangeWindowsCount=this._onDidChangeWindowsCount.event,this._onDidTriggerSystemContextMenu=this._register(new h.Emitter),this.onDidTriggerSystemContextMenu=this._onDidTriggerSystemContextMenu.event,this.windowsStateHandler=this._register(new ne.WindowsStateHandler(this,this.stateService,this.lifecycleMainService,this.logService,this.configurationService)),this.registerListeners()}registerListeners(){this._register(this.workspacesManagementMainService.onDidEnterWorkspace(R=>this._onDidSignalReadyWindow.fire(R.window))),this._register(this.onDidSignalReadyWindow(R=>{if(R.config?.extensionDevelopmentPath||R.config?.extensionTestsPath){const _=new w.DisposableStore;if(_.add(h.Event.any(R.onDidClose,R.onDidDestroy)(()=>_.dispose())),R.config.extensionDevelopmentPath)for(const N of R.config.extensionDevelopmentPath)_.add(this.protocolMainService.addValidFileRoot(N));R.config.extensionTestsPath&&_.add(this.protocolMainService.addValidFileRoot(R.config.extensionTestsPath))}}))}openEmptyWindow(R,_){const N=this.environmentMainService.args,q=_?.remoteAuthority||void 0,re=!0,ie=_?.forceReuseWindow,le=!ie;return this.open({...R,cli:N,forceEmpty:re,forceNewWindow:le,forceReuseWindow:ie,remoteAuthority:q})}openExistingWindow(R,_){R.focus(),this.handleWaitMarkerFile(_,[R])}async open(R){this.logService.trace("windowsManager#open"),R.addMode&&(R.initialStartup||!this.getLastActiveWindow())&&(R.addMode=!1);const _=[],N=[],q=[],re=[],ie=[];let le,V=0;const te=await this.getPathsToOpen(R);this.logService.trace("windowsManager#open pathsToOpen",te);for(const De of te)se(De)?R.addMode?_.push(De):N.push(De):X(De)?q.push(De):De.fileUri?(le||(le={filesToOpenOrCreate:[],filesToDiff:[],filesToMerge:[],remoteAuthority:De.remoteAuthority}),le.filesToOpenOrCreate.push(De)):De.backupPath?ie.push({backupFolder:(0,y.basename)(De.backupPath),remoteAuthority:De.remoteAuthority}):V++;R.diffMode&&le&&le.filesToOpenOrCreate.length>=2&&(le.filesToDiff=le.filesToOpenOrCreate.slice(0,2),le.filesToOpenOrCreate=[]),R.mergeMode&&le&&le.filesToOpenOrCreate.length===4&&(le.filesToMerge=le.filesToOpenOrCreate.slice(0,4),le.filesToOpenOrCreate=[],le.filesToDiff=[]),le&&R.waitMarkerFileURI&&(le.filesToWait={paths:(0,D.coalesce)([...le.filesToDiff,le.filesToMerge[3],...le.filesToOpenOrCreate]),waitMarkerFileUri:R.waitMarkerFileURI}),R.initialStartup?(re.push(...this.workspacesManagementMainService.getUntitledWorkspaces()),q.push(...re),ie.push(...this.backupMainService.getEmptyWindowBackups())):ie.length=0;const{windows:Q,filesOpenedInWindow:fe}=await this.doOpen(R,q,N,ie,V,le,_);if(this.logService.trace(`windowsManager#open used window count ${Q.length} (workspacesToOpen: ${q.length}, foldersToOpen: ${N.length}, emptyToRestore: ${ie.length}, emptyToOpen: ${V})`),Q.length>1)if(fe)fe.focus();else{const De=this.windowsStateHandler.state.lastActiveWindow&&!R.forceEmpty&&!R.cli._.length&&!R.cli["file-uri"]&&!R.cli["folder-uri"]&&!(R.urisToOpen&&R.urisToOpen.length);let We=!0,ye=!0;if(De){const we=Q.filter(K=>this.windowsStateHandler.state.lastActiveWindow&&K.backupPath===this.windowsStateHandler.state.lastActiveWindow.backupPath);we.length&&(we[0].focus(),We=!1,ye=!1)}if(We)for(let we=Q.length-1;we>=0;we--){const K=Q[we];if(!(K.openedWorkspace&&re.some(he=>K.openedWorkspace&&he.workspace.id===K.openedWorkspace.id)||K.backupPath&&ie.some(he=>K.backupPath&&he.backupFolder===(0,y.basename)(K.backupPath)))){K.focus(),ye=!1;break}}ye&&Q[Q.length-1].focus()}const pe=le&&le.filesToDiff.length>0,Pe=le&&le.filesToMerge.length>0;if(!Q.some(De=>De.isExtensionDevelopmentHost)&&!pe&&!Pe&&!R.noRecentEntry){const De=[];for(const We of te)X(We)&&!We.transient?De.push({label:We.label,workspace:We.workspace,remoteAuthority:We.remoteAuthority}):se(We)?De.push({label:We.label,folderUri:We.workspace.uri,remoteAuthority:We.remoteAuthority}):We.fileUri&&De.push({label:We.label,fileUri:We.fileUri,remoteAuthority:We.remoteAuthority});this.workspacesHistoryMainService.addRecentlyOpened(De)}return this.handleWaitMarkerFile(R,Q),Q}handleWaitMarkerFile(R,_){const N=R.waitMarkerFileURI;R.context===0&&N&&_.length===1&&_[0]&&(async()=>{await _[0].whenClosedOrLoaded;try{await this.fileService.del(N)}catch{}})()}async doOpen(R,_,N,q,re,ie,le){const V=[];let te;function Q(we,K){V.push(we),K&&(te=we,ie=void 0)}let{openFolderInNewWindow:fe,openFilesInNewWindow:pe}=this.shouldOpenNewWindow(R);if(!R.initialStartup&&le.length>0){const we=le[0].remoteAuthority,K=this.getLastActiveWindowForAuthority(we);K&&Q(this.doAddFoldersToExistingWindow(K,le.map(he=>he.workspace.uri)))}const Pe=N.length+_.length+q.length;if(ie&&Pe===0){const we=ie.filesToOpenOrCreate[0]||ie.filesToDiff[0]||ie.filesToMerge[3],K=this.getWindows().filter(me=>ie&&(0,c.isEqualAuthority)(me.remoteAuthority,ie.remoteAuthority));let he;we?.fileUri&&!pe&&((R.context===4||R.context===0||R.context===1)&&(he=await(0,oe.findWindowOnFile)(K,we.fileUri,async me=>me.configPath.scheme===u.Schemas.file?this.workspacesManagementMainService.resolveLocalWorkspace(me.configPath):void 0)),he||(he=this.doGetLastActiveWindow(K))),he?(0,de.isWorkspaceIdentifier)(he.openedWorkspace)?_.push({workspace:he.openedWorkspace,remoteAuthority:he.remoteAuthority}):(0,de.isSingleFolderWorkspaceIdentifier)(he.openedWorkspace)?N.push({workspace:he.openedWorkspace,remoteAuthority:he.remoteAuthority}):Q(this.doOpenFilesInExistingWindow(R,he,ie),!0):Q(await this.openInBrowserWindow({userEnv:R.userEnv,cli:R.cli,initialStartup:R.initialStartup,filesToOpen:ie,forceNewWindow:!0,remoteAuthority:ie.remoteAuthority,forceNewTabbedWindow:R.forceNewTabbedWindow,forceProfile:R.forceProfile,forceTempProfile:R.forceTempProfile}),!0)}const De=(0,D.distinct)(_,we=>we.workspace.id);if(De.length>0){const we=(0,D.coalesce)(De.map(K=>(0,oe.findWindowOnWorkspaceOrFolder)(this.getWindows(),K.workspace.configPath)));if(we.length>0){const K=we[0],he=(0,c.isEqualAuthority)(ie?.remoteAuthority,K.remoteAuthority)?ie:void 0;Q(this.doOpenFilesInExistingWindow(R,K,he),!!he),fe=!0}for(const K of De){if(we.some(Ie=>Ie.openedWorkspace&&Ie.openedWorkspace.id===K.workspace.id))continue;const he=K.remoteAuthority,me=(0,c.isEqualAuthority)(ie?.remoteAuthority,he)?ie:void 0;Q(await this.doOpenFolderOrWorkspace(R,K,fe,me),!!me),fe=!0}}const We=(0,D.distinct)(N,we=>c.extUriBiasedIgnorePathCase.getComparisonKey(we.workspace.uri));if(We.length>0){const we=(0,D.coalesce)(We.map(K=>(0,oe.findWindowOnWorkspaceOrFolder)(this.getWindows(),K.workspace.uri)));if(we.length>0){const K=we[0],he=(0,c.isEqualAuthority)(ie?.remoteAuthority,K.remoteAuthority)?ie:void 0;Q(this.doOpenFilesInExistingWindow(R,K,he),!!he),fe=!0}for(const K of We){if(we.some(Ie=>(0,de.isSingleFolderWorkspaceIdentifier)(Ie.openedWorkspace)&&c.extUriBiasedIgnorePathCase.isEqual(Ie.openedWorkspace.uri,K.workspace.uri)))continue;const he=K.remoteAuthority,me=(0,c.isEqualAuthority)(ie?.remoteAuthority,he)?ie:void 0;Q(await this.doOpenFolderOrWorkspace(R,K,fe,me),!!me),fe=!0}}const ye=(0,D.distinct)(q,we=>we.backupFolder);if(ye.length>0)for(const we of ye){const K=we.remoteAuthority,he=(0,c.isEqualAuthority)(ie?.remoteAuthority,K)?ie:void 0;Q(await this.doOpenEmpty(R,!0,K,he,we),!!he),fe=!0}if(V.length===0||ie){ie&&!re&&re++;const we=ie?ie.remoteAuthority:R.remoteAuthority;for(let K=0;K<re;K++)Q(await this.doOpenEmpty(R,fe,we,ie),!!ie),fe=!0}return{windows:(0,D.distinct)(V),filesOpenedInWindow:te}}doOpenFilesInExistingWindow(R,_,N){this.logService.trace("windowsManager#doOpenFilesInExistingWindow",{filesToOpen:N}),_.focus();const q={filesToOpenOrCreate:N?.filesToOpenOrCreate,filesToDiff:N?.filesToDiff,filesToMerge:N?.filesToMerge,filesToWait:N?.filesToWait,termProgram:R?.userEnv?.TERM_PROGRAM};return _.sendWhenReady("vscode:openFiles",P.CancellationToken.None,q),_}doAddFoldersToExistingWindow(R,_){this.logService.trace("windowsManager#doAddFoldersToExistingWindow",{foldersToAdd:_}),R.focus();const N={foldersToAdd:_};return R.sendWhenReady("vscode:addFolders",P.CancellationToken.None,N),R}doOpenEmpty(R,_,N,q,re){this.logService.trace("windowsManager#doOpenEmpty",{restore:!!re,remoteAuthority:N,filesToOpen:q,forceNewWindow:_});let ie;return!_&&typeof R.contextWindowId=="number"&&(ie=this.getWindowById(R.contextWindowId)),this.openInBrowserWindow({userEnv:R.userEnv,cli:R.cli,initialStartup:R.initialStartup,remoteAuthority:N,forceNewWindow:_,forceNewTabbedWindow:R.forceNewTabbedWindow,filesToOpen:q,windowToUse:ie,emptyWindowBackupInfo:re,forceProfile:R.forceProfile,forceTempProfile:R.forceTempProfile})}doOpenFolderOrWorkspace(R,_,N,q,re){return this.logService.trace("windowsManager#doOpenFolderOrWorkspace",{folderOrWorkspace:_,filesToOpen:q}),!N&&!re&&typeof R.contextWindowId=="number"&&(re=this.getWindowById(R.contextWindowId)),this.openInBrowserWindow({workspace:_.workspace,userEnv:R.userEnv,cli:R.cli,initialStartup:R.initialStartup,remoteAuthority:_.remoteAuthority,forceNewWindow:N,forceNewTabbedWindow:R.forceNewTabbedWindow,filesToOpen:q,windowToUse:re,forceProfile:R.forceProfile,forceTempProfile:R.forceTempProfile})}async getPathsToOpen(R){let _,N=!1,q=!1;if(R.urisToOpen&&R.urisToOpen.length>0?(_=await this.doExtractPathsFromAPI(R),N=!0):R.forceEmpty?_=[Object.create(null)]:R.cli._.length||R.cli["folder-uri"]||R.cli["file-uri"]?(_=await this.doExtractPathsFromCLI(R.cli),_.length===0&&_.push(Object.create(null)),N=!0):(_=await this.doGetPathsFromLastSession(),_.length===0&&_.push(Object.create(null)),q=!0),!R.addMode&&N){const re=_.filter(ie=>se(ie));if(re.length>1){const ie=re[0].remoteAuthority;if(re.every(le=>(0,c.isEqualAuthority)(le.remoteAuthority,ie))){const le=await this.workspacesManagementMainService.createUntitledWorkspace(re.map(V=>({uri:V.workspace.uri})));_.push({workspace:le,remoteAuthority:ie}),_=_.filter(V=>!se(V))}}}if(R.initialStartup&&!q&&this.configurationService.getValue("window")?.restoreWindows==="preserve"){const re=await this.doGetPathsFromLastSession();_.unshift(...re.filter(ie=>X(ie)||se(ie)||ie.backupPath))}return _}async doExtractPathsFromAPI(R){const _={gotoLineMode:R.gotoLineMode,remoteAuthority:R.remoteAuthority},N=await Promise.all((0,D.coalesce)(R.urisToOpen||[]).map(async q=>{const re=await this.resolveOpenable(q,_);if(re)return re.label=q.label,re;const ie=this.resourceFromOpenable(q);this.dialogMainService.showMessageBox({type:"info",buttons:[(0,S.localize)(0,null)],message:ie.scheme===u.Schemas.file?(0,S.localize)(1,null):(0,S.localize)(2,null),detail:ie.scheme===u.Schemas.file?(0,S.localize)(3,null,(0,g.getPathLabel)(ie,{os:l.OS,tildify:this.environmentMainService})):(0,S.localize)(4,null,ie.toString(!0))},b.BrowserWindow.getFocusedWindow()??void 0)}));return(0,D.coalesce)(N)}async doExtractPathsFromCLI(R){const _=[],N={ignoreFileNotFound:!0,gotoLineMode:R.goto,remoteAuthority:R.remote||void 0,forceOpenWorkspaceAsFile:R.diff&&R._.length===2||R.merge&&R._.length===4},q=R["folder-uri"];if(q){const le=await Promise.all(q.map(V=>{const te=this.cliArgToUri(V);if(te)return this.resolveOpenable({folderUri:te},N)}));_.push(...(0,D.coalesce)(le))}const re=R["file-uri"];if(re){const le=await Promise.all(re.map(V=>{const te=this.cliArgToUri(V);if(te)return this.resolveOpenable((0,de.hasWorkspaceFileExtension)(V)?{workspaceUri:te}:{fileUri:te},N)}));_.push(...(0,D.coalesce)(le))}const ie=await Promise.all(R._.map(le=>N.remoteAuthority?this.doResolveRemotePath(le,N):this.doResolveFilePath(le,N)));return _.push(...(0,D.coalesce)(ie)),_}cliArgToUri(R){try{const _=I.URI.parse(R);if(!_.scheme){this.logService.error(`Invalid URI input string, scheme missing: ${R}`);return}return _.path?_:_.with({path:"/"})}catch(_){this.logService.error(`Invalid URI input string: ${R}, ${_.message}`)}}async doGetPathsFromLastSession(){const R=this.getRestoreWindowsSetting();switch(R){case"none":return[];case"one":case"all":case"preserve":case"folders":{const _=[];R!=="one"&&_.push(...this.windowsStateHandler.state.openedWindows),this.windowsStateHandler.state.lastActiveWindow&&_.push(this.windowsStateHandler.state.lastActiveWindow);const N=await Promise.all(_.map(async q=>{if(q.workspace){const re=await this.resolveOpenable({workspaceUri:q.workspace.configPath},{remoteAuthority:q.remoteAuthority,rejectTransientWorkspaces:!0});if(X(re))return re}else if(q.folderUri){const re=await this.resolveOpenable({folderUri:q.folderUri},{remoteAuthority:q.remoteAuthority});if(se(re))return re}else if(R!=="folders"&&q.backupPath)return{backupPath:q.backupPath,remoteAuthority:q.remoteAuthority}}));return(0,D.coalesce)(N)}}}getRestoreWindowsSetting(){let R;return this.lifecycleMainService.wasRestarted?R="all":(R=this.configurationService.getValue("window")?.restoreWindows||"all",["preserve","all","folders","one","none"].includes(R)||(R="all")),R}async resolveOpenable(R,_=Object.create(null)){const N=this.resourceFromOpenable(R);return N.scheme===u.Schemas.file?((0,F.isFileToOpen)(R)&&(_={..._,forceOpenWorkspaceAsFile:!0}),this.doResolveFilePath(N.fsPath,_)):this.doResolveRemoteOpenable(R,_)}doResolveRemoteOpenable(R,_){let N=this.resourceFromOpenable(R);const q=(0,L.getRemoteAuthority)(N)||_.remoteAuthority;if(N=(0,c.removeTrailingPathSeparator)((0,c.normalizePath)(N)),(0,F.isFileToOpen)(R)){if(_.gotoLineMode){const{path:re,line:ie,column:le}=(0,d.parseLineAndColumnAware)(N.path);return{fileUri:N.with({path:re}),options:{selection:ie?{startLineNumber:ie,startColumn:le||1}:void 0},remoteAuthority:q}}return{fileUri:N,remoteAuthority:q}}else if((0,F.isWorkspaceToOpen)(R))return{workspace:(0,ae.getWorkspaceIdentifier)(N),remoteAuthority:q};return{workspace:(0,ae.getSingleFolderWorkspaceIdentifier)(N),remoteAuthority:q}}resourceFromOpenable(R){return(0,F.isWorkspaceToOpen)(R)?R.workspaceUri:(0,F.isFolderToOpen)(R)?R.folderUri:R.fileUri}async doResolveFilePath(R,_,N){let q,re;_.gotoLineMode&&({path:R,line:q,column:re}=(0,d.parseLineAndColumnAware)(R)),R=(0,d.sanitizeFilePath)((0,y.normalize)(R),(0,v.cwd)());try{const ie=await A.Promises.stat(R);if(ie.isFile()){if(!_.forceOpenWorkspaceAsFile){const le=await this.workspacesManagementMainService.resolveLocalWorkspace(I.URI.file(R));if(le)return le.transient&&_.rejectTransientWorkspaces?void 0:{workspace:{id:le.id,configPath:le.configPath},type:r.FileType.File,exists:!0,remoteAuthority:le.remoteAuthority,transient:le.transient}}return{fileUri:I.URI.file(R),type:r.FileType.File,exists:!0,options:{selection:q?{startLineNumber:q,startColumn:re||1}:void 0}}}else{if(ie.isDirectory())return{workspace:(0,ae.getSingleFolderWorkspaceIdentifier)(I.URI.file(R),ie),type:r.FileType.Directory,exists:!0};if(!l.isWindows&&R==="/dev/null")return{fileUri:I.URI.file(R),type:r.FileType.File,exists:!0}}}catch(ie){if(ie.code==="ERR_UNC_HOST_NOT_ALLOWED"&&!N)return this.onUNCHostNotAllowed(R,_);const le=I.URI.file(R);if(this.workspacesHistoryMainService.removeRecentlyOpened([le]),_.ignoreFileNotFound)return{fileUri:le,type:r.FileType.File,exists:!1}}}async onUNCHostNotAllowed(R,_){const N=I.URI.file(R),{response:q,checkboxChecked:re}=await this.dialogMainService.showMessageBox({type:"warning",buttons:[(0,S.localize)(5,null),(0,S.localize)(6,null),(0,S.localize)(7,null)],message:(0,S.localize)(8,null,N.authority),detail:(0,S.localize)(9,null,(0,g.getPathLabel)(N,{os:l.OS,tildify:this.environmentMainService})),checkboxLabel:(0,S.localize)(10,null,N.authority),cancelId:1});if(q===0)return(0,n.addUNCHostToAllowlist)(N.authority),re&&this._register(h.Event.once(this.onDidOpenWindow)(ie=>{ie.sendWhenReady("vscode:configureAllowedUNCHost",P.CancellationToken.None,N.authority)})),this.doResolveFilePath(R,_,!0);if(q===2)return b.shell.openExternal("https://aka.ms/vscode-windows-unc"),this.onUNCHostNotAllowed(R,_)}doResolveRemotePath(R,_){const N=R.charCodeAt(0),q=_.remoteAuthority;let re,ie;_.gotoLineMode&&({path:R,line:re,column:ie}=(0,d.parseLineAndColumnAware)(R)),N!==47&&((0,d.isWindowsDriveLetter)(N)&&R.charCodeAt(R.charCodeAt(1))===58&&(R=(0,d.toSlashes)(R)),R=`/${R}`);const le=I.URI.from({scheme:u.Schemas.vscodeRemote,authority:q,path:R});if(R.charCodeAt(R.length-1)!==47){if((0,de.hasWorkspaceFileExtension)(R))return _.forceOpenWorkspaceAsFile?{fileUri:le,options:{selection:re?{startLineNumber:re,startColumn:ie||1}:void 0},remoteAuthority:_.remoteAuthority}:{workspace:(0,ae.getWorkspaceIdentifier)(le),remoteAuthority:q};if(_.gotoLineMode||y.posix.basename(R).indexOf(".")!==-1)return{fileUri:le,options:{selection:re?{startLineNumber:re,startColumn:ie||1}:void 0},remoteAuthority:q}}return{workspace:(0,ae.getSingleFolderWorkspaceIdentifier)(le),remoteAuthority:q}}shouldOpenNewWindow(R){const _=this.configurationService.getValue("window"),N=_?.openFoldersInNewWindow||"default",q=_?.openFilesInNewWindow||"off";let re=(R.preferNewWindow||R.forceNewWindow)&&!R.forceReuseWindow;!R.forceNewWindow&&!R.forceReuseWindow&&(N==="on"||N==="off")&&(re=N==="on");let ie=!1;return R.forceNewWindow||R.forceReuseWindow?ie=!!R.forceNewWindow&&!R.forceReuseWindow:(l.isMacintosh?R.context===1&&(ie=!0):R.context!==3&&R.context!==2&&!(R.userEnv&&R.userEnv.TERM_PROGRAM==="vscode")&&(ie=!0),!R.cli.extensionDevelopmentPath&&(q==="on"||q==="off")&&(ie=q==="on")),{openFolderInNewWindow:!!re,openFilesInNewWindow:ie}}async openExtensionDevelopmentHostWindow(R,_){const N=(0,oe.findWindowOnExtensionDevelopmentPath)(this.getWindows(),R);if(N)return this.lifecycleMainService.reload(N,_.cli),N.focus(),[N];let q=_.cli["folder-uri"]||[],re=_.cli["file-uri"]||[],ie=_.cli._;if(!ie.length&&!q.length&&!re.length&&!_.cli.extensionTestsPath){const te=this.windowsStateHandler.state.lastPluginDevelopmentHostWindow,Q=te?.workspace??te?.folderUri;Q&&(I.URI.isUri(Q)?Q.scheme===u.Schemas.file?ie=[Q.fsPath]:q=[Q.toString()]:Q.configPath.scheme===u.Schemas.file?ie=[(0,c.originalFSPath)(Q.configPath)]:re=[Q.configPath.toString()])}let le=_.remoteAuthority;for(const te of R)if(te.match(/^[a-zA-Z][a-zA-Z0-9\+\-\.]+:/)){const Q=I.URI.parse(te),fe=(0,L.getRemoteAuthority)(Q);fe&&(le?(0,c.isEqualAuthority)(fe,le)||this.logService.error("more than one extension development path authority"):le=fe)}ie=ie.filter(te=>{const Q=I.URI.file(te);return(0,oe.findWindowOnWorkspaceOrFolder)(this.getWindows(),Q)?!1:(0,c.isEqualAuthority)((0,L.getRemoteAuthority)(Q),le)}),q=q.filter(te=>{const Q=this.cliArgToUri(te);return Q&&(0,oe.findWindowOnWorkspaceOrFolder)(this.getWindows(),Q)?!1:Q?(0,c.isEqualAuthority)((0,L.getRemoteAuthority)(Q),le):!1}),re=re.filter(te=>{const Q=this.cliArgToUri(te);return Q&&(0,oe.findWindowOnWorkspaceOrFolder)(this.getWindows(),Q)?!1:Q?(0,c.isEqualAuthority)((0,L.getRemoteAuthority)(Q),le):!1}),_.cli._=ie,_.cli["folder-uri"]=q,_.cli["file-uri"]=re;const V={context:_.context,cli:_.cli,forceNewWindow:!0,forceEmpty:!ie.length&&!q.length&&!re.length,userEnv:_.userEnv,noRecentEntry:!0,waitMarkerFileURI:_.waitMarkerFileURI,remoteAuthority:le,forceProfile:_.forceProfile,forceTempProfile:_.forceTempProfile};return this.open(V)}async openInBrowserWindow(R){const _=this.configurationService.getValue("window"),N=this.getLastActiveWindow(),q=N?.profile??this.userDataProfilesMainService.defaultProfile;let re;!R.forceNewWindow&&!R.forceNewTabbedWindow&&(re=R.windowToUse||N,re&&re.focus());const ie={...this.environmentMainService.args,...R.cli,machineId:this.machineId,windowId:-1,mainPid:process.pid,appRoot:this.environmentMainService.appRoot,execPath:process.execPath,codeCachePath:this.environmentMainService.codeCachePath,backupPath:R.emptyWindowBackupInfo?(0,y.join)(this.environmentMainService.backupHome,R.emptyWindowBackupInfo.backupFolder):void 0,profiles:{home:this.userDataProfilesMainService.profilesHome,all:this.userDataProfilesMainService.profiles,profile:q},homeDir:this.environmentMainService.userHome.fsPath,tmpDir:this.environmentMainService.tmpDir.fsPath,userDataDir:this.environmentMainService.userDataPath,remoteAuthority:R.remoteAuthority,workspace:R.workspace,userEnv:{...this.initialUserEnv,...R.userEnv},filesToOpenOrCreate:R.filesToOpen?.filesToOpenOrCreate,filesToDiff:R.filesToOpen?.filesToDiff,filesToMerge:R.filesToOpen?.filesToMerge,filesToWait:R.filesToOpen?.filesToWait,logLevel:this.loggerService.getLogLevel(),loggers:{window:[],global:this.loggerService.getRegisteredLoggers()},logsPath:this.environmentMainService.logsHome.fsPath,product:M.default,isInitialStartup:R.initialStartup,perfMarks:(0,E.getMarks)(),os:{release:(0,O.release)(),hostname:(0,O.hostname)(),arch:(0,O.arch)()},zoomLevel:typeof _?.zoomLevel=="number"?_.zoomLevel:void 0,autoDetectHighContrast:_?.autoDetectHighContrast??!0,autoDetectColorScheme:_?.autoDetectColorScheme??!1,accessibilitySupport:b.app.accessibilitySupportEnabled,colorScheme:this.themeMainService.getColorScheme(),policiesData:this.policyService.serialize(),continueOn:this.environmentMainService.continueOn};if(re){const le=re.config;!ie.extensionDevelopmentPath&&le?.extensionDevelopmentPath&&(ie.extensionDevelopmentPath=le.extensionDevelopmentPath,ie.extensionDevelopmentKind=le.extensionDevelopmentKind,ie["enable-proposed-api"]=le["enable-proposed-api"],ie.verbose=le.verbose,ie["inspect-extensions"]=le["inspect-extensions"],ie["inspect-brk-extensions"]=le["inspect-brk-extensions"],ie.debugId=le.debugId,ie.extensionEnvironment=le.extensionEnvironment,ie["extensions-dir"]=le["extensions-dir"],ie["disable-extensions"]=le["disable-extensions"]),ie.loggers={global:ie.loggers.global,window:le?.loggers.window??ie.loggers.window}}else{const le=this.windowsStateHandler.getNewWindowState(ie);(0,E.mark)("code/willCreateCodeWindow");const V=re=this.instantiationService.createInstance(z.CodeWindow,{state:le,extensionDevelopmentPath:ie.extensionDevelopmentPath,isExtensionTestHost:!!ie.extensionTestsPath});(0,E.mark)("code/didCreateCodeWindow"),R.forceNewTabbedWindow&&this.getLastActiveWindow()?.addTabbedWindow(V),$.WINDOWS.push(V),this._onDidOpenWindow.fire(V),this._onDidChangeWindowsCount.fire({oldCount:this.getWindowCount()-1,newCount:this.getWindowCount()}),(0,m.once)(V.onDidSignalReady)(()=>this._onDidSignalReadyWindow.fire(V)),(0,m.once)(V.onDidClose)(()=>this.onWindowClosed(V)),(0,m.once)(V.onDidDestroy)(()=>this._onDidDestroyWindow.fire(V)),V.onDidTriggerSystemContextMenu(({x:Q,y:fe})=>this._onDidTriggerSystemContextMenu.fire({window:V,x:Q,y:fe}));const te=(0,f.assertIsDefined)(V.win?.webContents);te.removeAllListeners("devtools-reload-page"),te.on("devtools-reload-page",()=>this.lifecycleMainService.reload(V)),this.lifecycleMainService.registerWindow(V)}return ie.windowId=re.id,re.isReady?this.lifecycleMainService.unload(re,4).then(async le=>{le||await this.doOpenInBrowserWindow(re,ie,R,q)}):await this.doOpenInBrowserWindow(re,ie,R,q),re}async doOpenInBrowserWindow(R,_,N,q){if(_.extensionDevelopmentPath||((0,de.isWorkspaceIdentifier)(_.workspace)?_.backupPath=this.backupMainService.registerWorkspaceBackup({workspace:_.workspace,remoteAuthority:_.remoteAuthority}):(0,de.isSingleFolderWorkspaceIdentifier)(_.workspace)?_.backupPath=this.backupMainService.registerFolderBackup({folderUri:_.workspace.uri,remoteAuthority:_.remoteAuthority}):_.backupPath=this.backupMainService.registerEmptyWindowBackup({backupFolder:N.emptyWindowBackupInfo?.backupFolder??(0,ae.createEmptyWorkspaceIdentifier)().id,remoteAuthority:_.remoteAuthority})),this.userDataProfilesMainService.isEnabled()){const re=_.workspace??(0,de.toWorkspaceIdentifier)(_.backupPath,!1),ie=this.resolveProfileForBrowserWindow(N,re,q),le=ie instanceof Promise?await ie:ie;_.profiles.profile=le,_.extensionDevelopmentPath||await this.userDataProfilesMainService.setProfileForWorkspace(re,le)}R.load(_)}resolveProfileForBrowserWindow(R,_,N){return R.forceProfile?this.userDataProfilesMainService.profiles.find(q=>q.name===R.forceProfile)??this.userDataProfilesMainService.createNamedProfile(R.forceProfile):R.forceTempProfile?this.userDataProfilesMainService.createTransientProfile():this.userDataProfilesMainService.getProfileForWorkspace(_)??N}onWindowClosed(R){const _=$.WINDOWS.indexOf(R);$.WINDOWS.splice(_,1),this._onDidChangeWindowsCount.fire({oldCount:this.getWindowCount()+1,newCount:this.getWindowCount()})}getFocusedWindow(){const R=b.BrowserWindow.getFocusedWindow();if(R)return this.getWindowById(R.id)}getLastActiveWindow(){return this.doGetLastActiveWindow(this.getWindows())}getLastActiveWindowForAuthority(R){return this.doGetLastActiveWindow(this.getWindows().filter(_=>(0,c.isEqualAuthority)(_.remoteAuthority,R)))}doGetLastActiveWindow(R){const _=Math.max.apply(Math,R.map(N=>N.lastFocusTime));return R.find(N=>N.lastFocusTime===_)}sendToFocused(R,..._){(this.getFocusedWindow()||this.getLastActiveWindow())?.sendWhenReady(R,P.CancellationToken.None,..._)}sendToAll(R,_,N){for(const q of this.getWindows())N&&N.indexOf(q.id)>=0||q.sendWhenReady(R,P.CancellationToken.None,_)}getWindows(){return $.WINDOWS}getWindowCount(){return $.WINDOWS.length}getWindowById(R){const _=this.getWindows().filter(N=>N.id===R);return(0,D.firstOrDefault)(_)}getWindowByWebContents(R){const _=b.BrowserWindow.fromWebContents(R);if(_)return this.getWindowById(_.id)}};e.WindowsMainService=ce,e.WindowsMainService=ce=$=be([Y(2,k.ILogService),Y(3,U.ILoggerMainService),Y(4,T.IStateService),Y(5,B.IPolicyService),Y(6,i.IEnvironmentMainService),Y(7,W.IUserDataProfilesMainService),Y(8,p.ILifecycleMainService),Y(9,t.IBackupMainService),Y(10,a.IConfigurationService),Y(11,ue.IWorkspacesHistoryMainService),Y(12,j.IWorkspacesManagementMainService),Y(13,o.IInstantiationService),Y(14,s.IDialogMainService),Y(15,r.IFileService),Y(16,C.IProtocolMainService),Y(17,G.IThemeMainService)],ce)}),define(Z[308],ee([0,1,64,29,84,54]),function(H,e,b,A,n,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspacesMainService=void 0;let D=class{constructor(h,d,m,g){this.workspacesManagementMainService=h,this.windowsMainService=d,this.workspacesHistoryMainService=m,this.backupMainService=g,this.onDidChangeRecentlyOpened=this.workspacesHistoryMainService.onDidChangeRecentlyOpened}async enterWorkspace(h,d){const m=this.windowsMainService.getWindowById(h);if(m)return this.workspacesManagementMainService.enterWorkspace(m,this.windowsMainService.getWindows(),d)}createUntitledWorkspace(h,d,m){return this.workspacesManagementMainService.createUntitledWorkspace(d,m)}deleteUntitledWorkspace(h,d){return this.workspacesManagementMainService.deleteUntitledWorkspace(d)}getWorkspaceIdentifier(h,d){return this.workspacesManagementMainService.getWorkspaceIdentifier(d)}getRecentlyOpened(h){return this.workspacesHistoryMainService.getRecentlyOpened()}addRecentlyOpened(h,d){return this.workspacesHistoryMainService.addRecentlyOpened(d)}removeRecentlyOpened(h,d){return this.workspacesHistoryMainService.removeRecentlyOpened(d)}clearRecentlyOpened(h){return this.workspacesHistoryMainService.clearRecentlyOpened()}async getDirtyWorkspaces(){return this.backupMainService.getDirtyWorkspaces()}};e.WorkspacesMainService=D,e.WorkspacesMainService=D=be([Y(0,O.IWorkspacesManagementMainService),Y(1,A.IWindowsMainService),Y(2,n.IWorkspacesHistoryMainService),Y(3,b.IBackupMainService)],D)}),define(Z[309],ee([0,1,14,133,38,27,17,50,13,32,49,44,46,2,15,10,4,12,7,31,147,42,159,112,291,162,64,287,18,77,200,92,134,61,117,220,28,63,96,209,235,210,296,119,211,212,16,224,95,76,6,94,218,301,288,276,20,5,306,68,22,60,297,97,34,279,83,124,25,252,254,52,48,266,293,302,294,303,129,268,269,270,273,277,29,307,278,30,99,84,308,54,275,39,233,53,245,51,82,131,281,295,284,8,256,280,228,66,93,299,272,24,127,298,264,240,85]),function(H,e,b,A,n,O,D,P,h,d,m,g,w,u,y,E,l,v,c,f,I,S,t,a,s,i,r,o,p,k,M,C,L,T,F,z,oe,ne,de,ae,ue,j,G,B,W,U,$,X,se,ce,x,R,_,N,q,re,ie,le,V,te,Q,fe,pe,Pe,De,We,ye,we,K,he,me,Ie,Le,Fe,Oe,qe,Ne,He,J,ge,ve,Ee,Ae,Me,_e,ze,Be,Ve,Ye,Xe,Je,nt,rt,pt,vt,ot,wt,St,yt,bt,Et,Pt,It,at,Ct,kt,Dt,Mt,Rt,ct,Lt,ht,lt,At,Ot,ut,_t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeApplication=void 0;let dt=class extends u.Disposable{constructor(ke,Ce,Se,Te,Re,Ue,Ke,Ze,Qe,je,$e,xe){super(),this.mainProcessNodeIpcServer=ke,this.userEnv=Ce,this.mainInstantiationService=Se,this.logService=Te,this.loggerService=Re,this.environmentMainService=Ue,this.lifecycleMainService=Ke,this.configurationService=Ze,this.stateService=Qe,this.fileService=je,this.productService=$e,this.userDataProfilesMainService=xe,this.configureSession(),this.registerListeners()}configureSession(){const ke=je=>je?.startsWith(`${y.Schemas.vscodeWebview}://`),Ce=new Set(this.productService.quality==="stable"?[]:["media"]),Se=new Set(["clipboard-read","clipboard-sanitized-write"]);b.session.defaultSession.setPermissionRequestHandler((je,$e,xe,Ge)=>ke(Ge.requestingUrl)?xe(Se.has($e)):Ge.isMainFrame&&Ge.securityOrigin==="vscode-file://vscode-app/"?xe(Ce.has($e)):xe(!1)),b.session.defaultSession.setPermissionCheckHandler((je,$e,xe,Ge)=>ke(Ge.requestingUrl)?Se.has($e):Ge.isMainFrame&&Ge.securityOrigin==="vscode-file://vscode-app/"?Ce.has($e):!1);const Te=new Set([y.Schemas.file,y.Schemas.vscodeFileResource,y.Schemas.vscodeRemoteResource,y.Schemas.vscodeManagedRemoteResource,"devtools"]),Re=je=>{for(let $e=je;$e;$e=$e.parent)if($e.url.startsWith(`${y.Schemas.vscodeWebview}://`))return!0;return!1},Ue=je=>je.resourceType==="xhr"||Re(je.frame),Ke=je=>{const $e=je.frame;if(!$e||!this.windowsMainService)return!1;const xe=b.BrowserWindow.getAllWindows();for(const Ge of xe)if($e.processId===Ge.webContents.mainFrame.processId)return!0;return!1},Ze=(je,$e)=>{if(je.path!=="/index.html")return!0;const xe=$e.frame;if(!xe||!this.windowsMainService)return!1;for(const Ge of this.windowsMainService.getWindows())if(Ge.win&&xe.processId===Ge.win.webContents.mainFrame.processId)return!0;return!1};b.session.defaultSession.webRequest.onBeforeRequest((je,$e)=>{const xe=c.URI.parse(je.url);return xe.scheme===y.Schemas.vscodeWebview&&!Ze(xe,je)?(this.logService.error("Blocked vscode-webview request",je.url),$e({cancel:!0})):xe.scheme===y.Schemas.vscodeFileResource&&!Ke(je)?(this.logService.error("Blocked vscode-file request",je.url),$e({cancel:!0})):xe.path.endsWith(".svg")&&!Te.has(xe.scheme)?$e({cancel:!Ue(je)}):$e({cancel:!1})}),b.session.defaultSession.webRequest.onHeadersReceived((je,$e)=>{const xe=je.responseHeaders,Ge=xe["content-type"]||xe["Content-Type"];if(Ge&&Array.isArray(Ge)){const it=c.URI.parse(je.url);if(it.path.endsWith(".svg")&&Te.has(it.scheme))return xe["Content-Type"]=["image/svg+xml"],$e({cancel:!1,responseHeaders:xe});if(!it.path.endsWith(y.Schemas.vscodeRemoteResource)&&Ge.some(et=>et.toLowerCase().includes("image/svg")))return $e({cancel:!Ue(je)})}return $e({cancel:!1})});const Qe=b.session.defaultSession;typeof Qe.setCodeCachePath=="function"&&this.environmentMainService.codeCachePath&&Qe.setCodeCachePath((0,E.join)(this.environmentMainService.codeCachePath,"chrome")),l.isWindows&&(this.configurationService.getValue("security.restrictUNCAccess")===!1?(0,A.disableUNCAccessRestrictions)():(0,A.addUNCHostToAllowlist)(this.configurationService.getValue("security.allowedUNCHosts")))}registerListeners(){(0,h.setUnexpectedErrorHandler)(Se=>this.onUnexpectedError(Se)),process.on("uncaughtException",Se=>{(0,h.isSigPipeError)(Se)||(0,h.onUnexpectedError)(Se)}),process.on("unhandledRejection",Se=>(0,h.onUnexpectedError)(Se)),this.lifecycleMainService.onWillShutdown(()=>this.dispose()),(0,I.registerContextMenuListener)(),b.app.on("accessibility-support-changed",(Se,Te)=>{this.windowsMainService?.sendToAll("vscode:accessibilitySupportChanged",Te)}),b.app.on("activate",async(Se,Te)=>{this.logService.trace("app#activate"),Te||await this.windowsMainService?.openEmptyWindow({context:1})}),b.app.on("web-contents-created",(Se,Te)=>{Te.on("will-navigate",Re=>{this.logService.error("webContents#will-navigate: Prevented webcontent navigation"),Re.preventDefault()}),Te.setWindowOpenHandler(({url:Re})=>(this.nativeHostMainService?.openExternal(void 0,Re),{action:"deny"}))});let ke=[],Ce;b.app.on("open-file",(Se,Te)=>{this.logService.trace("app#open-file: ",Te),Se.preventDefault(),ke.push((0,Ve.hasWorkspaceFileExtension)(Te)?{workspaceUri:c.URI.file(Te)}:{fileUri:c.URI.file(Te)}),Ce!==void 0&&(clearTimeout(Ce),Ce=void 0),Ce=setTimeout(async()=>{await this.windowsMainService?.open({context:1,cli:this.environmentMainService.args,urisToOpen:ke,gotoLineMode:!1,preferNewWindow:!0}),ke=[],Ce=void 0},100)}),b.app.on("new-window-for-tab",async()=>{await this.windowsMainService?.openEmptyWindow({context:4})}),n.validatedIpcMain.handle("vscode:fetchShellEnv",Se=>{const Te=this.windowsMainService?.getWindowByWebContents(Se.sender);let Re,Ue;return Te?.config?(Re=Te.config,Ue={...process.env,...Te.config.userEnv}):(Re=this.environmentMainService.args,Ue=process.env),this.resolveShellEnvironment(Re,Ue,!1)}),n.validatedIpcMain.handle("vscode:writeNlsFile",(Se,Te,Re)=>{const Ue=this.validateNlsPath([Te]);if(!Ue||typeof Re!="string")throw new Error("Invalid operation (vscode:writeNlsFile)");return this.fileService.writeFile(Ue,D.VSBuffer.fromString(Re))}),n.validatedIpcMain.handle("vscode:readNlsFile",async(Se,...Te)=>{const Re=this.validateNlsPath(Te);if(!Re)throw new Error("Invalid operation (vscode:readNlsFile)");return(await this.fileService.readFile(Re)).value.toString()}),n.validatedIpcMain.on("vscode:toggleDevTools",Se=>Se.sender.toggleDevTools()),n.validatedIpcMain.on("vscode:openDevTools",Se=>Se.sender.openDevTools()),n.validatedIpcMain.on("vscode:reloadWindow",Se=>Se.sender.reload())}validateNlsPath(ke){let Ce;for(const Se of ke)typeof Se=="string"&&(typeof Ce!="string"?Ce=Se:Ce=(0,E.join)(Ce,Se));if(!(typeof Ce!="string"||!(0,E.isAbsolute)(Ce)||!(0,d.isEqualOrParent)(Ce,this.environmentMainService.cachedLanguagesPath,!l.isLinux)))return c.URI.file(Ce)}onUnexpectedError(ke){if(ke){const Ce={message:`[uncaught exception in main]: ${ke.message}`,stack:ke.stack};this.windowsMainService?.sendToFocused("vscode:reportError",JSON.stringify(Ce))}this.logService.error(`[uncaught exception in main]: ${ke}`),ke.stack&&this.logService.error(ke.stack)}async startup(){this.logService.debug("Starting VS Code"),this.logService.debug(`from: ${this.environmentMainService.appRoot}`),this.logService.debug("args:",this.environmentMainService.args);const ke=this.productService.win32AppUserModelId;l.isWindows&&ke&&b.app.setAppUserModelId(ke);try{l.isMacintosh&&this.configurationService.getValue("window.nativeTabs")===!0&&!b.systemPreferences.getUserDefault("NSUseImprovedLayoutPass","boolean")&&b.systemPreferences.setUserDefault("NSUseImprovedLayoutPass","boolean",!0)}catch(Qe){this.logService.error(Qe)}const Ce=new t.Server;this.lifecycleMainService.onWillShutdown(Qe=>{Qe.reason===2&&Ce.dispose()}),this.logService.trace("Resolving machine identifier...");const Se=await(0,Ct.resolveMachineId)(this.stateService,this.logService);this.logService.trace(`Resolved machine identifier: ${Se}`);const{sharedProcessReady:Te,sharedProcessClient:Re}=this.setupSharedProcess(Se),Ue=await this.initServices(Se,Te);this._register(Ue.createInstance(s.ProxyAuthHandler)),this._register(Ue.createInstance(Pt.UserDataProfilesHandler)),this._register(Ue.createInstance(s.ProxyAuthHandler)),Ue.invokeFunction(Qe=>this.initChannels(Qe,Ce,Re));const Ke=Ue.invokeFunction(Qe=>this.setupProtocolUrlHandlers(Qe,Ce));this.setupManagedRemoteResourceUrlHandler(Ce),this.lifecycleMainService.phase=2,await Ue.invokeFunction(Qe=>this.openFirstWindow(Qe,Ke)),this.lifecycleMainService.phase=3,this.afterWindowOpen(),this._register(new at.RunOnceScheduler(()=>{this._register((0,at.runWhenIdle)(()=>this.lifecycleMainService.phase=4,2500))},2500)).schedule()}setupProtocolUrlHandlers(ke,Ce){const Se=this.windowsMainService=ke.get(_e.IWindowsMainService),Te=ke.get(J.IURLService),Re=this.nativeHostMainService=ke.get(te.INativeHostMainService),Ue=this;Te.registerHandler({async handleURL(xe,Ge){return Ue.handleProtocolUrl(Se,Te,xe,Ge)}});const Ke=this._register(new Be.ActiveWindowManager({onDidOpenWindow:Re.onDidOpenWindow,onDidFocusWindow:Re.onDidFocusWindow,getActiveWindowId:()=>Re.getActiveWindowId(-1)})),Ze=new S.StaticRouter(xe=>Ke.getActiveClientId().then(Ge=>xe===Ge)),Qe=new ge.URLHandlerRouter(Ze,this.logService),je=Ce.getChannel("urlHandler",Qe);Te.registerHandler(new ge.URLHandlerChannelClient(je));const $e=this.resolveInitialProtocolUrls();return this._register(new Ee.ElectronURLListener($e?.urls,Te,Se,this.environmentMainService,this.productService,this.logService)),$e}setupManagedRemoteResourceUrlHandler(ke){const Ce=()=>({statusCode:404,data:"Not found"}),Se=new _t.Lazy(()=>ke.getChannel(ut.NODE_REMOTE_RESOURCE_CHANNEL_NAME,new ut.NodeRemoteResourceRouter));b.protocol.registerBufferProtocol(y.Schemas.vscodeManagedRemoteResource,(Te,Re)=>{const Ue=c.URI.parse(Te.url);if(!Ue.authority.startsWith("window:"))return Re(Ce());Se.value.call(ut.NODE_REMOTE_RESOURCE_IPC_METHOD_NAME,[Ue]).then(Ke=>Re({...Ke,data:Buffer.from(Ke.body,"base64")}),Ke=>{this.logService.warn("error dispatching remote resource call",Ke),Re({statusCode:500,data:String(Ke)})})})}resolveInitialProtocolUrls(){const ke=this.environmentMainService.args["open-url"]?this.environmentMainService.args._urls||[]:[];ke.length>0&&this.logService.trace("app#resolveInitialProtocolUrls() protocol urls from command line:",ke);const Ce=global.getOpenUrls()||[];if(Ce.length>0&&this.logService.trace("app#resolveInitialProtocolUrls() protocol urls from macOS 'open-url' event:",Ce),ke.length+Ce.length===0)return;const Se=[];return{urls:[...ke,...Ce].map(Re=>{try{return{uri:c.URI.parse(Re),originalUrl:Re}}catch{this.logService.trace("app#resolveInitialProtocolUrls() protocol url failed to parse:",Re);return}}).filter(Re=>{if(!Re)return!1;if(this.shouldBlockURI(Re.uri))return this.logService.trace("app#resolveInitialProtocolUrls() protocol url was blocked:",Re.uri.toString(!0)),!1;const Ue=this.getWindowOpenableFromProtocolUrl(Re.uri);return Ue?(this.logService.trace("app#resolveInitialProtocolUrls() protocol url will be handled as window to open:",Re.uri.toString(!0),Ue),Se.push(Ue),!1):(this.logService.trace("app#resolveInitialProtocolUrls() protocol url will be passed to active window for handling:",Re.uri.toString(!0)),!0)}),openables:Se}}shouldBlockURI(ke){if(ke.authority===y.Schemas.file&&l.isWindows){const{options:Ce,buttonIndeces:Se}=(0,Rt.massageMessageBoxOptions)({type:"warning",buttons:[(0,i.localize)(0,null),(0,i.localize)(1,null)],message:(0,i.localize)(2,null,(0,w.getPathLabel)(ke,{os:l.OS,tildify:this.environmentMainService}),this.productService.nameShort),detail:(0,i.localize)(3,null)},this.productService);if(Se[b.dialog.showMessageBoxSync(Ce)]===1)return!0}return!1}getWindowOpenableFromProtocolUrl(ke){if(ke.path){if(ke.authority===y.Schemas.file){const Ce=c.URI.file(ke.fsPath);return(0,Ve.hasWorkspaceFileExtension)(Ce)?{workspaceUri:Ce}:{fileUri:Ce}}else if(ke.authority===y.Schemas.vscodeRemote){const Ce=ke.path.indexOf(E.posix.sep,1);if(Ce!==-1){const Se=ke.path.substring(1,Ce),Te=ke.path.substring(Ce),Re=c.URI.from({scheme:y.Schemas.vscodeRemote,authority:Se,path:Te,query:ke.query,fragment:ke.fragment});return(0,Ve.hasWorkspaceFileExtension)(Te)?{workspaceUri:Re}:/:[\d]+$/.test(Te)?{fileUri:Re}:{folderUri:Re}}}}}async handleProtocolUrl(ke,Ce,Se,Te){if(this.logService.trace("app#handleProtocolUrl():",Se.toString(!0),Te),Se.scheme===this.productService.urlProtocol&&Se.path==="workspace"&&(Se=Se.with({authority:"file",path:c.URI.parse(Se.query).path,query:""})),this.shouldBlockURI(Se))return this.logService.trace("app#handleProtocolUrl() protocol url was blocked:",Se.toString(!0)),!0;let Re=!1;const Ue=new URLSearchParams(Se.query);Ue.get("windowId")==="_blank"?(this.logService.trace("app#handleProtocolUrl() found 'windowId=_blank' as parameter, setting shouldOpenInNewWindow=true:",Se.toString(!0)),Ue.delete("windowId"),Se=Se.with({query:Ue.toString()}),Re=!0):l.isMacintosh&&ke.getWindowCount()===0&&(this.logService.trace("app#handleProtocolUrl() running on macOS with no window open, setting shouldOpenInNewWindow=true:",Se.toString(!0)),Re=!0);const Ke=Ue.get("continueOn");Ke!==null&&(this.logService.trace("app#handleProtocolUrl() found 'continueOn' as parameter:",Se.toString(!0)),Ue.delete("continueOn"),Se=Se.with({query:Ue.toString()}),this.environmentMainService.continueOn=Ke??void 0);const Ze=this.getWindowOpenableFromProtocolUrl(Se);return Ze?(this.logService.trace("app#handleProtocolUrl() opening protocol url as window:",Ze,Se.toString(!0)),(0,ht.firstOrDefault)(await ke.open({context:5,cli:{...this.environmentMainService.args},urisToOpen:[Ze],forceNewWindow:Re,gotoLineMode:!0}))?.focus(),!0):Re?(this.logService.trace("app#handleProtocolUrl() opening empty window and passing in protocol url:",Se.toString(!0)),await(0,ht.firstOrDefault)(await ke.open({context:5,cli:{...this.environmentMainService.args},forceNewWindow:!0,forceEmpty:!0,gotoLineMode:!0,remoteAuthority:(0,fe.getRemoteAuthority)(Se)}))?.ready(),Ce.open(Se,Te)):(this.logService.trace("app#handleProtocolUrl(): not handled",Se.toString(!0),Te),!1)}setupSharedProcess(ke){const Ce=this._register(this.mainInstantiationService.createInstance(pe.SharedProcess,ke)),Se=(async()=>{this.logService.trace("Main->SharedProcess#connect");const Re=await Ce.connect();return this.logService.trace("Main->SharedProcess#connect: connection established"),new a.Client(Re,"main")})();return{sharedProcessReady:(async()=>(await Ce.whenReady(),Se))(),sharedProcessClient:Se}}async initServices(ke,Ce){const Se=new R.ServiceCollection;switch(process.platform){case"win32":Se.set(Le.IUpdateService,new ce.SyncDescriptor(He.Win32UpdateService));break;case"linux":l.isLinuxSnap?Se.set(Le.IUpdateService,new ce.SyncDescriptor(Ne.SnapUpdateService,[process.env.SNAP,process.env.SNAP_REVISION])):Se.set(Le.IUpdateService,new ce.SyncDescriptor(qe.LinuxUpdateService));break;case"darwin":Se.set(Le.IUpdateService,new ce.SyncDescriptor(Oe.DarwinUpdateService));break}Se.set(_e.IWindowsMainService,new ce.SyncDescriptor(ze.WindowsMainService,[ke,this.userEnv],!1));const Te=new T.DialogMainService(this.logService,this.productService);Se.set(T.IDialogMainService,Te),Se.set(re.ILaunchMainService,new ce.SyncDescriptor(re.LaunchMainService,void 0,!1)),Se.set(L.IDiagnosticsMainService,new ce.SyncDescriptor(L.DiagnosticsMainService,void 0,!1)),Se.set(C.IDiagnosticsService,S.ProxyChannel.toService((0,S.getDelayedChannel)(Ce.then(Qe=>Qe.getChannel("diagnostics"))))),Se.set(_.IIssueMainService,new ce.SyncDescriptor(N.IssueMainService,[this.userEnv])),Se.set(F.IEncryptionMainService,new ce.SyncDescriptor(z.EncryptionMainService,[ke])),Se.set(q.IKeyboardLayoutMainService,new ce.SyncDescriptor(q.KeyboardLayoutMainService)),Se.set(te.INativeHostMainService,new ce.SyncDescriptor(te.NativeHostMainService,void 0,!1)),Se.set(k.ICredentialsMainService,new ce.SyncDescriptor(rt.CredentialsNativeMainService)),Se.set(Ae.IWebviewManagerService,new ce.SyncDescriptor(Me.WebviewMainService)),Se.set(V.IMenubarMainService,new ce.SyncDescriptor(V.MenubarMainService)),Se.set(ae.IExtensionUrlTrustService,new ce.SyncDescriptor(ue.ExtensionUrlTrustService)),Se.set(j.IExtensionHostStarter,new ce.SyncDescriptor(G.ExtensionHostStarter)),Se.set(ye.IStorageMainService,new ce.SyncDescriptor(ye.StorageMainService)),Se.set(ye.IApplicationStorageMainService,new ce.SyncDescriptor(ye.ApplicationStorageMainService));const Re=new At.ElectronPtyHostStarter({graceTime:6e4,shortGraceTime:6e3,scrollback:this.configurationService.getValue("terminal.integrated.persistentSessionScrollback")??100},this.configurationService,this.environmentMainService,this.lifecycleMainService,this.logService),Ue=new Ot.PtyHostService(Re,this.configurationService,this.logService,this.loggerService);Se.set(lt.ILocalPtyService,Ue),l.isWindows?Se.set(B.IExternalTerminalMainService,new ce.SyncDescriptor(W.WindowsExternalTerminalService)):l.isMacintosh?Se.set(B.IExternalTerminalMainService,new ce.SyncDescriptor(W.MacExternalTerminalService)):l.isLinux&&Se.set(B.IExternalTerminalMainService,new ce.SyncDescriptor(W.LinuxExternalTerminalService));const Ke=new o.BackupMainService(this.environmentMainService,this.configurationService,this.logService,this.stateService);Se.set(r.IBackupMainService,Ke);const Ze=new nt.WorkspacesManagementMainService(this.environmentMainService,this.logService,this.userDataProfilesMainService,Ke,Te);if(Se.set(nt.IWorkspacesManagementMainService,Ze),Se.set(Ye.IWorkspacesService,new ce.SyncDescriptor(Je.WorkspacesMainService,void 0,!1)),Se.set(Xe.IWorkspacesHistoryMainService,new ce.SyncDescriptor(Xe.WorkspacesHistoryMainService,void 0,!1)),Se.set(J.IURLService,new ce.SyncDescriptor(ve.NativeURLService,void 0,!1)),(0,Ie.supportsTelemetry)(this.productService,this.environmentMainService)){const Qe=(0,Ie.isInternalTelemetry)(this.productService,this.configurationService),je=(0,S.getDelayedChannel)(Ce.then(et=>et.getChannel("telemetryAppender"))),$e=new he.TelemetryAppenderClient(je),xe=(0,we.resolveCommonProperties)((0,O.release)(),(0,O.hostname)(),process.arch,this.productService.commit,this.productService.version,ke,Qe),Ge=(0,Ie.getPiiPathsFromEnvironment)(this.environmentMainService),it={appenders:[$e],commonProperties:xe,piiPaths:Ge,sendErrorTelemetry:!0};Se.set(K.ITelemetryService,new ce.SyncDescriptor(me.TelemetryService,[it],!1))}else Se.set(K.ITelemetryService,Ie.NullTelemetryService);return Se.set(yt.IExtensionsProfileScannerService,new ce.SyncDescriptor(kt.ExtensionsProfileScannerService,void 0,!0)),Se.set(bt.IExtensionsScannerService,new ce.SyncDescriptor(Et.ExtensionsScannerService,void 0,!0)),Se.set(ct.IUtilityProcessWorkerMainService,new ce.SyncDescriptor(ct.UtilityProcessWorkerMainService,void 0,!0)),await at.Promises.settled([Ke.initialize(),Ze.initialize()]),this.mainInstantiationService.createChild(Se)}initChannels(ke,Ce,Se){const Te=S.ProxyChannel.fromService(ke.get(re.ILaunchMainService),{disableMarshalling:!0});this.mainProcessNodeIpcServer.registerChannel("launch",Te);const Re=S.ProxyChannel.fromService(ke.get(L.IDiagnosticsMainService),{disableMarshalling:!0});this.mainProcessNodeIpcServer.registerChannel("diagnostics",Re);const Ue=new vt.PolicyChannel(ke.get(pt.IPolicyService));Ce.registerChannel("policy",Ue),Se.then(tt=>tt.registerChannel("policy",Ue));const Ke=this.fileService.getProvider(y.Schemas.file);(0,v.assertType)(Ke instanceof se.DiskFileSystemProvider);const Ze=new X.DiskFileSystemProviderChannel(Ke,this.logService,this.environmentMainService);Ce.registerChannel(U.LOCAL_FILE_SYSTEM_CHANNEL_NAME,Ze),Se.then(tt=>tt.registerChannel(U.LOCAL_FILE_SYSTEM_CHANNEL_NAME,Ze));const Qe=S.ProxyChannel.fromService(ke.get(ot.IUserDataProfilesMainService));Ce.registerChannel("userDataProfiles",Qe),Se.then(tt=>tt.registerChannel("userDataProfiles",Qe));const je=new wt.RequestChannel(ke.get(St.IRequestService));Se.then(tt=>tt.registerChannel("request",je));const $e=new Fe.UpdateChannel(ke.get(Le.IUpdateService));Ce.registerChannel("update",$e);const xe=S.ProxyChannel.fromService(ke.get(_.IIssueMainService));Ce.registerChannel("issue",xe);const Ge=S.ProxyChannel.fromService(ke.get(F.IEncryptionMainService));Ce.registerChannel("encryption",Ge);const it=S.ProxyChannel.fromService(ke.get(k.ICredentialsMainService));Ce.registerChannel("credentials",it);const et=S.ProxyChannel.fromService(ke.get(Pe.ISignService));Ce.registerChannel("sign",et);const st=S.ProxyChannel.fromService(ke.get(q.IKeyboardLayoutMainService));Ce.registerChannel("keyboardLayout",st),this.nativeHostMainService=ke.get(te.INativeHostMainService);const ft=S.ProxyChannel.fromService(this.nativeHostMainService);Ce.registerChannel("nativeHost",ft),Se.then(tt=>tt.registerChannel("nativeHost",ft));const Tt=S.ProxyChannel.fromService(ke.get(Ye.IWorkspacesService));Ce.registerChannel("workspaces",Tt);const Wt=S.ProxyChannel.fromService(ke.get(V.IMenubarMainService));Ce.registerChannel("menubar",Wt);const Ft=S.ProxyChannel.fromService(ke.get(J.IURLService));Ce.registerChannel("url",Ft);const Ut=S.ProxyChannel.fromService(ke.get(ae.IExtensionUrlTrustService));Ce.registerChannel("extensionUrlTrust",Ut);const Nt=S.ProxyChannel.fromService(ke.get(Ae.IWebviewManagerService));Ce.registerChannel("webview",Nt);const gt=this._register(new We.StorageDatabaseChannel(this.logService,ke.get(ye.IStorageMainService)));Ce.registerChannel("storage",gt),Se.then(tt=>tt.registerChannel("storage",gt));const zt=this._register(new It.ProfileStorageChangesListenerChannel(ke.get(ye.IStorageMainService),ke.get(ot.IUserDataProfilesMainService),this.logService));Se.then(tt=>tt.registerChannel("profileStorageListener",zt));const Bt=S.ProxyChannel.fromService(ke.get(lt.ILocalPtyService));Ce.registerChannel(lt.TerminalIpcChannels.LocalPty,Bt);const $t=S.ProxyChannel.fromService(ke.get(B.IExternalTerminalMainService));Ce.registerChannel("externalTerminal",$t);const mt=new Dt.LoggerChannel(ke.get(Mt.ILoggerMainService));Ce.registerChannel("logger",mt),Se.then(tt=>tt.registerChannel("logger",mt));const qt=new M.ElectronExtensionHostDebugBroadcastChannel(ke.get(_e.IWindowsMainService));Ce.registerChannel("extensionhostdebugservice",qt);const Ht=S.ProxyChannel.fromService(ke.get(j.IExtensionHostStarter));Ce.registerChannel(j.ipcExtensionHostStarterChannelName,Ht);const jt=S.ProxyChannel.fromService(ke.get(ct.IUtilityProcessWorkerMainService));Ce.registerChannel(Lt.ipcUtilityProcessWorkerChannelName,jt)}async openFirstWindow(ke,Ce){const Se=this.windowsMainService=ke.get(_e.IWindowsMainService),Te=(0,ne.isLaunchedFromCli)(process.env)?0:4,Re=this.environmentMainService.args;if(Ce){if(Ce.openables.length>0)return Se.open({context:Te,cli:Re,urisToOpen:Ce.openables,gotoLineMode:!0,initialStartup:!0});if(Ce.urls.length>0)for(const et of Ce.urls){const st=new URLSearchParams(et.uri.query);if(st.get("windowId")==="_blank")return st.delete("windowId"),et.originalUrl=et.uri.toString(!0),et.uri=et.uri.with({query:st.toString()}),Se.open({context:Te,cli:Re,forceNewWindow:!0,forceEmpty:!0,gotoLineMode:!0,initialStartup:!0})}}const Ue=global.macOpenFiles,Ke=Re._.length,Ze=!!Re["folder-uri"],Qe=!!Re["file-uri"],je=Re["skip-add-to-recently-opened"]===!0,$e=Re.wait&&Re.waitMarkerFilePath?c.URI.file(Re.waitMarkerFilePath):void 0,xe=Re.remote||void 0,Ge=Re.profile,it=Re["profile-temp"];if(!Ke&&!Ze&&!Qe){if(Re["new-window"]||Ge||it)return Se.open({context:Te,cli:Re,forceNewWindow:!0,forceEmpty:!0,noRecentEntry:je,waitMarkerFileURI:$e,initialStartup:!0,remoteAuthority:xe,forceProfile:Ge,forceTempProfile:it});if(Ue.length)return Se.open({context:1,cli:Re,urisToOpen:Ue.map(et=>(0,Ve.hasWorkspaceFileExtension)(et)?{workspaceUri:c.URI.file(et)}:{fileUri:c.URI.file(et)}),noRecentEntry:je,waitMarkerFileURI:$e,initialStartup:!0})}return Se.open({context:Te,cli:Re,forceNewWindow:Re["new-window"]||!Ke&&Re["unity-launch"],diffMode:Re.diff,mergeMode:Re.merge,noRecentEntry:je,waitMarkerFileURI:$e,gotoLineMode:Re.goto,initialStartup:!0,remoteAuthority:xe,forceProfile:Ge,forceTempProfile:it})}afterWindowOpen(){this.installMutex(),b.protocol.registerHttpProtocol(y.Schemas.vscodeRemoteResource,(ke,Ce)=>{Ce({url:ke.url.replace(/^vscode-remote-resource:/,"http:"),method:ke.method})}),this.resolveShellEnvironment(this.environmentMainService.args,process.env,!0),this.updateCrashReporterEnablement(),l.isMacintosh&&b.app.runningUnderARM64Translation&&this.windowsMainService?.sendToFocused("vscode:showTranslatedBuildWarning")}async installMutex(){const ke=this.productService.win32MutexName;if(l.isWindows&&ke)try{const Ce=await new Promise((Te,Re)=>{H(["@vscode/windows-mutex"],Te,Re)}),Se=new Ce.Mutex(ke);(0,m.once)(this.lifecycleMainService.onWillShutdown)(()=>Se.release())}catch(Ce){this.logService.error(Ce)}}async resolveShellEnvironment(ke,Ce,Se){try{return await(0,de.getResolvedShellEnv)(this.configurationService,this.logService,ke,Ce)}catch(Te){const Re=(0,P.toErrorMessage)(Te);Se?this.windowsMainService?.sendToFocused("vscode:showResolveShellEnvError",Re):this.logService.error(Re)}return{}}async updateCrashReporterEnablement(){try{const Ce=(await this.fileService.readFile(this.environmentMainService.argvResource)).value.toString(),Se=JSON.parse((0,g.stripComments)(Ce)),Re=(0,Ie.getTelemetryLevel)(this.configurationService)>=1;if(Se["enable-crash-reporter"]===void 0){const Ue=["","	// Allows to disable crash reporting.","	// Should restart the app if the value is changed.",`	"enable-crash-reporter": ${Re},`,"","	// Unique id used for correlating crash reports sent from this instance.","	// Do not edit this value.",`	"crash-reporter-id": "${(0,f.generateUuid)()}"`,"}"],Ke=Ce.substring(0,Ce.length-2).concat(`,
`,Ue.join(`
`));await this.fileService.writeFile(this.environmentMainService.argvResource,D.VSBuffer.fromString(Ke))}else{const Ue=Ce.replace(/"enable-crash-reporter": .*,/,`"enable-crash-reporter": ${Re},`);Ue!==Ce&&await this.fileService.writeFile(this.environmentMainService.argvResource,D.VSBuffer.fromString(Ue))}}catch(ke){this.logService.error(ke)}}};e.CodeApplication=dt,e.CodeApplication=dt=be([Y(2,x.IInstantiationService),Y(3,le.ILogService),Y(4,le.ILoggerService),Y(5,oe.IEnvironmentMainService),Y(6,ie.ILifecycleMainService),Y(7,p.IConfigurationService),Y(8,De.IStateService),Y(9,$.IFileService),Y(10,Q.IProductService),Y(11,ot.IUserDataProfilesMainService)],dt)}),define(Z[315],ee([0,1,14,45,7,24,8,50,13,32,49,46,15,10,65,4,36,26,21,42,101,309,9,18,239,251,28,63,202,16,222,95,76,217,94,20,225,5,67,22,79,282,128,292,51,290,97,250,34,52,80,53,39,234,232,2,40,267,66,227,93,123,271,265]),function(H,e,b,A,n,O,D,P,h,d,m,g,w,u,y,E,l,v,c,f,I,S,t,a,s,i,r,o,p,k,M,C,L,T,F,z,oe,ne,de,ae,ue,j,G,B,W,U,$,X,se,ce,x,R,_,N,q,re,ie,le,V,te,Q,fe,pe){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class Pe{main(){try{this.startup()}catch(ye){console.error(ye.message),b.app.exit(1)}}async startup(){(0,h.setUnexpectedErrorHandler)(Oe=>console.error(Oe));const[ye,we,K,he,me,Ie,Le,Fe]=this.createServices();try{try{await this.initServices(K,Fe,he,me,Le)}catch(Oe){throw this.handleStartupDataDirError(K,Le,Oe),Oe}await ye.invokeFunction(async Oe=>{const qe=Oe.get(ne.ILogService),Ne=Oe.get(z.ILifecycleMainService),He=Oe.get(k.IFileService),J=Oe.get(ne.ILoggerService),ge=await this.claimInstance(qe,K,Ne,ye,Le,!0);return c.Promises.writeFile(K.mainLockfile,String(process.pid)).catch(ve=>{qe.warn(`app#startup(): Error writing main lockfile: ${ve.stack}`)}),Ie.logger=J.createLogger("main",{name:(0,t.localize)(0,null)}),(0,m.once)(Ne.onWillShutdown)(ve=>{He.dispose(),he.dispose(),ve.join("instanceLockfile",c.Promises.unlink(K.mainLockfile).catch(()=>{}))}),ye.createInstance(S.CodeApplication,ge,we).startup()})}catch(Oe){ye.invokeFunction(this.quit,Oe)}}createServices(){const ye=new F.ServiceCollection,we=new re.DisposableStore;process.once("exit",()=>we.dispose());const K={_serviceBrand:void 0,...de.default};ye.set(ae.IProductService,K);const he=new r.EnvironmentMainService(this.resolveArgs(),K),me=this.patchEnvironment(he);ye.set(r.IEnvironmentMainService,he);const Ie=new V.LoggerMainService((0,ne.getLogLevel)(he),he.logsHome);ye.set(V.ILoggerMainService,Ie);const Le=new oe.BufferLogger(Ie.getLogLevel()),Fe=we.add(new te.LogService(Le,[new ne.ConsoleMainLogger(Ie.getLogLevel())]));ye.set(ne.ILogService,Fe);const Oe=new M.FileService(Fe);ye.set(k.IFileService,Oe);const qe=new C.DiskFileSystemProvider(Fe);Oe.registerProvider(w.Schemas.file,qe),Oe.registerProvider(w.Schemas.vscodeUserData,new pe.FileUserDataProvider(w.Schemas.file,qe,w.Schemas.vscodeUserData,Fe));const Ne=new le.UriIdentityService(Oe);ye.set(ie.IUriIdentityService,Ne);const He=new fe.StateService(1,he,Fe,Oe);ye.set(se.IStateReadService,He),ye.set(se.IStateService,He);const J=new R.UserDataProfilesMainService(He,Ne,he,Oe,Fe);ye.set(R.IUserDataProfilesMainService,J);const ge=E.isWindows&&K.win32RegValueName?we.add(new N.NativePolicyService(Fe,K.win32RegValueName)):he.policyFile?we.add(new q.FilePolicyService(he.policyFile,Oe,Fe)):new _.NullPolicyService;ye.set(_.IPolicyService,ge);const ve=new s.ConfigurationService(J.defaultProfile.settingsResource,Oe,ge,Fe);return ye.set(a.IConfigurationService,ve),ye.set(z.ILifecycleMainService,new L.SyncDescriptor(z.LifecycleMainService,void 0,!1)),ye.set(W.IRequestService,new L.SyncDescriptor(U.RequestMainService,void 0,!0)),ye.set(x.IThemeMainService,new L.SyncDescriptor(x.ThemeMainService)),ye.set($.ISignService,new L.SyncDescriptor(X.SignService,void 0,!1)),ye.set(G.ITunnelService,new L.SyncDescriptor(B.TunnelService)),ye.set(ue.IProtocolMainService,new j.ProtocolMainService(he,J,Fe)),[new T.InstantiationService(ye,!0),me,he,ve,He,Le,K,J]}patchEnvironment(ye){const we={VSCODE_IPC_HOOK:ye.mainIPCHandle};return["VSCODE_NLS_CONFIG","VSCODE_LOGS","VSCODE_PORTABLE","ADS_LOGS"].forEach(K=>{const he=process.env[K];typeof he=="string"&&(we[K]=he)}),Object.assign(process.env,we),we}async initServices(ye,we,K,he,me){await D.Promises.settled([Promise.all([ye.extensionsPath,ye.codeCachePath,ye.logsHome.fsPath,we.defaultProfile.globalStorageHome.fsPath,ye.workspaceStorageHome.fsPath,ye.localHistoryHome.fsPath,ye.backupHome].map(Ie=>Ie?c.Promises.mkdir(Ie,{recursive:!0}):void 0)),he.init(),K.initialize()]),we.init()}async claimInstance(ye,we,K,he,me,Ie){let Le;try{(0,y.mark)("code/willStartMainServer"),Le=await(0,I.serve)(we.mainIPCHandle),(0,y.mark)("code/didStartMainServer"),(0,m.once)(K.onWillShutdown)(()=>Le.dispose())}catch(Fe){if(Fe.code!=="EADDRINUSE")throw this.handleStartupDataDirError(we,me,Fe),Fe;let Oe;try{Oe=await(0,I.connect)(we.mainIPCHandle,"main")}catch(J){if(!Ie||E.isWindows||J.code!=="ECONNREFUSED")throw J.code==="EPERM"&&this.showStartupWarningDialog((0,t.localize)(1,null,me.nameShort),(0,t.localize)(2,null),me),J;try{(0,A.unlinkSync)(we.mainIPCHandle)}catch(ge){throw ye.warn("Could not delete obsolete instance handle",ge),ge}return this.claimInstance(ye,we,K,he,me,!1)}if(we.extensionTestsLocationURI&&!we.debugExtensionHost.break){const J=`Running extension tests from the command line is currently only supported if no other instance of ${me.nameShort} is running.`;throw ye.error(J),Oe.dispose(),new Error(J)}let qe;!we.args.wait&&!we.args.status&&(qe=setTimeout(()=>{this.showStartupWarningDialog((0,t.localize)(3,null,me.nameShort),(0,t.localize)(4,null),me)},1e4));const Ne=f.ProxyChannel.toService(Oe.getChannel("launch"),{disableMarshalling:!0}),He=f.ProxyChannel.toService(Oe.getChannel("diagnostics"),{disableMarshalling:!0});if(we.args.status)return he.invokeFunction(async()=>{const J=new i.DiagnosticsService(ce.NullTelemetryService,me),ge=await He.getMainDiagnostics(),ve=await He.getRemoteDiagnostics({includeProcesses:!0,includeWorkspaceMetadata:!0}),Ee=await J.getDiagnostics(ge,ve);throw console.log(Ee),new h.ExpectedError});throw E.isWindows&&await this.windowsAllowSetForegroundWindow(Ne,ye),ye.trace("Sending env to running instance..."),await Ne.start(we.args,process.env),Oe.dispose(),qe&&clearTimeout(qe),new h.ExpectedError("Sent env to running instance. Terminating...")}if(we.args.status)throw console.log((0,t.localize)(5,null,me.nameShort)),new h.ExpectedError("Terminating...");return process.env.VSCODE_PID=String(process.pid),Le}handleStartupDataDirError(ye,we,K){if(K.code==="EACCES"||K.code==="EPERM"){const he=(0,O.coalesce)([ye.userDataPath,ye.extensionsPath,I.XDG_RUNTIME_DIR]).map(me=>(0,g.getPathLabel)(n.URI.file(me),{os:E.OS,tildify:ye}));this.showStartupWarningDialog((0,t.localize)(6,null),(0,t.localize)(7,null,(0,P.toErrorMessage)(K),he.join(`
`)),we)}}showStartupWarningDialog(ye,we,K){b.dialog.showMessageBoxSync((0,Q.massageMessageBoxOptions)({type:"warning",buttons:[(0,t.localize)(8,null)],message:ye,detail:we},K).options)}async windowsAllowSetForegroundWindow(ye,we){if(E.isWindows){const K=await ye.getMainProcessId();we.trace("Sending some foreground love to the running instance:",K);try{(await new Promise((he,me)=>{H(["windows-foreground-love"],he,me)})).allowSetForegroundWindow(K)}catch(he){we.error(he)}}}quit(ye,we){const K=ye.get(ne.ILogService),he=ye.get(z.ILifecycleMainService);let me=0;we&&(we.isExpected?we.message&&K.trace(we.message):(me=1,we.stack?K.error(we.stack):K.error(`Startup error: ${we.toString()}`))),he.kill(me)}resolveArgs(){const ye=this.validatePaths((0,o.parseMainProcessArgv)(process.argv));if(ye.wait&&!ye.waitMarkerFilePath){const we=(0,p.createWaitMarkerFileSync)(ye.verbose);we&&((0,o.addArg)(process.argv,"--waitMarkerFilePath",we),ye.waitMarkerFilePath=we)}return ye}validatePaths(ye){if(ye["open-url"]&&(ye._urls=ye._,ye._=[]),!ye.remote){const we=this.doValidatePaths(ye._,ye.goto);ye._=we}return ye}doValidatePaths(ye,we){const K=(0,l.cwd)(),he=ye.map(Le=>{let Fe=String(Le),Oe;we&&(Oe=(0,d.parseLineAndColumnAware)(Fe),Fe=Oe.path),Fe&&(Fe=this.preparePath(K,Fe));const qe=(0,d.sanitizeFilePath)(Fe,K),Ne=(0,u.basename)(qe);return Ne&&!(0,d.isValidBasename)(Ne)?null:we&&Oe?(Oe.path=qe,this.toPath(Oe)):qe}),me=E.isWindows||E.isMacintosh,Ie=(0,O.distinct)(he,Le=>Le&&me?Le.toLowerCase():Le||"");return(0,O.coalesce)(Ie)}preparePath(ye,we){return E.isWindows&&(we=(0,v.rtrim)(we,'"')),we=(0,v.trim)((0,v.trim)(we," "),"	"),E.isWindows&&(we=(0,u.resolve)(ye,we),we=(0,v.rtrim)(we,".")),we}toPath(ye){const we=[ye.path];return typeof ye.line=="number"&&we.push(String(ye.line)),typeof ye.column=="number"&&we.push(String(ye.column)),we.join(":")}}new Pe().main()})}).call(this);

//# sourceMappingURL=https://sqlopsbuilds.blob.core.windows.net/sourcemaps/b6f7beb01f92adaa4b79b6b6f3ac704e95cafe6e/core/vs/code/electron-main/main.js.map

Youez - 2016 - github.com/yon3zu
LinuXploit