����JFIFXX�����    $.' ",#(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�8ds|\���Ҿp6�Ҵ���]��.����6�z<�v��@]�i%��$j��~�g��J>��no����pM[me�i$[����s�o�ᘨ�˸ nɜG-�ĨU�ycP�3.DB�li�;��hj���x7Z^�N�h������N3u{�:j�x�힞��#M&��jL P@_���� P��&��o8������9�����@Sz6�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*-iH��g�D�)� E�m�|�ؘbҗ�a��Ҿ����t4���o���G��*oCN�rP���Q��@z,|?W[0�����:�n,jWiE��W��$~/�hp\��?��{(�0���+�Y8rΟ�+����>S-S����VN;�}�s?.����� w�9��˟<���Mq4�Wv'��{)0�1mB��V����W[�����8�/<� �%���wT^�5���b��)iM� pg�N�&ݝ��VO~�q���u���9� ����!��J27����$O-���! �:�%H��� ـ����y�ΠM=t{!S�� oK8������t<����è:a������[�����ա�H���~��w��Qz`�po�^ ����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�_�uX6��3?nk��Wy�f;^*B� ��@�~a�`��Eu������+���6�L��.ü>��}y���}_�O�6�͐�:�YrG�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�!039C� �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 Xp3�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@:)ִ�:�]��hv�E�w���T�l��P���"Ju�}��وV J��G6��. J/�Qgl߭�e�����@�z�Zev2u�)]կ�����7x���s�M�-<ɯ�c��r�v�����@��$�ޮ}lk���a���'����>x��O\�ZFu>�����ck#��&:��`�$�ai�>2Δ����l���oF[h��lE�ܺ�Πk:)���`�� $[6�����9�����kOw�\|���8}������ބ:��񶐕��I�A1/�=�2[�,�!��.}gN#�u����b��� ~��݊��}34q����d�E��Lc��$��"�[q�U�硬g^��%B �z���r�pJ�ru%v\h1Y�ne`ǥ:g���pQM~�^�Xi� ��`S�:V29.�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&Ú����2g�}&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��f24;�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)*Pt����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���#yw��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���/$�WPw���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��BS�('$�ɻ� �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 : 64.57.112.4  /  Your IP : 216.73.216.57
Web Server : Microsoft-IIS/10.0
System : Windows NT WP 10.0 build 17763 (Windows Server 2016) AMD64
User : voguebusinesssuppliers ( 0)
PHP Version : 7.3.3
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Windows/SystemApps/Microsoft.Windows.Cortana_cw5n1h2txyewy/cache/Desktop/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Windows/SystemApps/Microsoft.Windows.Cortana_cw5n1h2txyewy/cache/Desktop/27.txt
var __extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),AutoSuggest;(function(n){function u(i,r,u,f,e,o,s){t(i,r,u,function(t){return f(t.status==200&&t.responseText?n.safeExecute(function(){return JSON.parse(t.responseText)},"JSON.parse"):null)},e,o,s)}function t(n,t,i,r,u,f,e){var o=sj_gx(),s,h;try{o.open(i?"POST":"GET",n,!0)}catch(c){SharedLogHelper.LogError("fetchUrl",n,c);r&&r({responseText:"",contentType:"",status:-1});return}if(t)for(s in t)o.setRequestHeader(s,t[s]);u&&(h=u.register(function(){return o.abort()},!1,"xhr abort"));o.onreadystatechange=function(){o.readyState==4&&(!f||f())&&(o.onreadystatechange=function(){},h&&u.unregister(h),r&&r({responseText:o.responseText,contentType:o.getResponseHeader("content-type")||"",status:o.status}))};typeof e!="undefined"?o.withCredentials=e:o.withCredentials!==undefined&&(o.withCredentials=!0);o.send(i)}function f(n){var t=n.IconContent;return t?t[0]=="S"?{content:t.slice(1),type:1}:{content:t,type:2}:n.Icon?{content:n.Icon,type:0}:null}var i,r;n.fetchUrlJson=u;n.fetchUrl=t;i=function(){function i(t){this._dataSource=t;this._delay=n.config.webDataSourcesWithThrottling[t]||0}return i.prototype.getBaseUrl=function(){throw new Error("Not Implemented");},i.prototype.getPostBody=function(){return undefined},i.prototype.onBeforeFetchUrl=function(){},i.prototype.createUrl=function(t){return decodeURIComponent(this.getBaseUrl())+(t?n.encodeQueryParameter(t.queryToFetch.toLowerCase()):"")},i.prototype.addParamsToUrl=function(n,t){var i=t?Object.keys(t):[];return i.length>0&&(n+=n.includes("?")?"&":"?",n+=i.map(function(n){return n+"="+t[n]}).join("&")),n},i.prototype.fetch=function(t,i,r,u,f,e,o){var h=this,s,c;if(n.isDataSourceEnabled(this._dataSource,t))if(s=this.addParamsToUrl(this.createUrl(t),e),c=this.getPostBody(t)||"",this._timer&&(sb_ct(this._timer),this._timer=null),this._delay>0&&!t.isFormulatedQuery)this._timer=sb_st(function(){return n.safeExecute(function(){h._timer=null;h.onBeforeFetchUrl(r,s);h.fetchUrl(s,o,c,i,u,f)},"fetchDelay")},this._delay);else{this.onBeforeFetchUrl(r,s);this.fetchUrl(s,o,c,i,u,f)}},i.prototype.fetchUrl=function(i,r,u,f,e,o){var s=this;t(i,r,u,function(t){var r=t.responseText,o=t.contentType,u=t.status,e;u==200&&(n.config.th&&r&&(r=r.replace(new RegExp("<!--[^]*?-->","gm"),"")),r&&o.includes("json")&&(e=n.safeExecute(function(){return JSON.parse(r)},"parseWebProviderResponse",null,i)));f(s._dataSource,e,u==200?null:u.toString())},this._delay>0?e:null,o)},i}();n.JsonDataProvider=i;r=function(t){function i(i,r,u){var f=t.call(this,n.WebDataSource)||this;return f._instrumentationHelper=i,f._responseCacheManager=r,f._headRankingSignalsManager=u,f}return __extends(i,t),i.prototype.getName=function(){return"AsSuggestionsDataProvider"},i.prototype.getBaseUrl=function(){return n.config.u},i.prototype.onBeforeFetchUrl=function(n,t){this._instrumentationHelper.instrumentSnRProviderFetchUrl(n,t)},i.prototype.fetch=function(i,r,u,f,e,o,s){var a=this,c,l,h;if(n.isDataSourceEnabled(this._dataSource,i)){if(this._headRankingSignalsManager&&(c=this._headRankingSignalsManager.get(i),c)){l=this.addParamsToUrl(this.createUrl(i),o);this.onBeforeFetchUrl(u,l);r(this._dataSource,c,null,2);return}h=r;h=function(t,u,f,e){u&&n.isEmptyUrlPrefix(i)&&(u.Suggestions=[]);a.processResourceResponse(u);r(t,u,f,e)};this._responseCacheManager?this.fetchWithCache(i,h,u,f,e,o,s):t.prototype.fetch.call(this,i,h,u,f,e,o,s)}},i.prototype.fetchWithCache=function(n,i,r,u,f,e,o){var h=this,c=this._responseCacheManager.get(n),l,a,s;if(c){l=this.addParamsToUrl(this.createUrl(n),e);this.onBeforeFetchUrl(r,l);i(this._dataSource,c,null,1)}else a=function(){return!0},s=i,s=function(t,r,u){f()&&i(t,r,u,0);n.queryToFetch&&h.responseIsValidForCaching(u,r)&&(r.ELToken&&(r=Object.assign({},r),delete r.ELToken),h._responseCacheManager.put(n,r))},t.prototype.fetch.call(this,n,s,r,u,a,e,o)},i.prototype.responseIsValidForCaching=function(n,t){var i="HS";return!n&&t&&t.Suggestions.every(function(n){return!n.InstantAnswer&&n.Attributes.stype!=i})},i.prototype.processResourceResponse=function(n){var t,i;n&&(t=n.Resources,t)&&(this._downloadedStylesResources?this.updateWithDownloadedResources(t):this._downloadedStylesResources=t.Styles,i={Styles:t.Styles,Scripts:null},JsonInject.WriteHeadAndBeforeContentResources(i))},i.prototype.updateWithDownloadedResources=function(n){var t,i;for(t in n.Styles)for(i in n.Styles[t])this._downloadedStylesResources[t][i]?delete n.Styles[t][i]:this._downloadedStylesResources[t][i]=n.Styles[t][i]},i}(i);n.AsSuggestionsDataProvider=r;n.getIconFromOnlineResponse=f})(AutoSuggest||(AutoSuggest={})),function(n){var t;(function(t){function f(n,t,i,r,f){typeof indexedDB!="undefined"&&new u(n,f,t,i,r)}function e(n,t,i,r,f){typeof indexedDB!="undefined"&&new u(n,f,t,i,r)}function o(n,t,i,r,f,e){typeof indexedDB!="undefined"&&new u(n,e,t,i,r,f)}function s(n,t,i,r,f,e){typeof indexedDB!="undefined"&&new u(n,e,t,i,r,f)}function h(n,t,u){i(n,"deleteDatabase requested");try{var f=indexedDB.deleteDatabase(n);f.onsuccess=function(){i(n,"deleteDatabase completed");t&&t()};f.onerror=r("deleteDatabase.onError",function(t){SharedLogHelper.LogError("deleteDB",n,t);u&&u(t)})}catch(e){u&&u(e)}}function r(n,t){return function(i){var r=n;try{r+=" "+i.target.error.name}catch(u){}t(new Error(r))}}var i,u;t.instanceWithNumberKeys=f;t.instanceWithStringKeys=e;t.instanceWithNumberKeysAndSecondaryKey=o;t.instanceWithStringKeysAndSecondaryKey=s;i=n.config.th&&ClientTestHooks.isTesthookParamSet("dbTrace")?function(t,i){return n.log("["+t+"] "+i)}:function(){};t.deleteDatabase=h;t.handleErrorEvent=r;u=function(){function t(n,u,f,e,o,s){var h=this,c;this._databaseName=n;this.onClosed=o;this._secondaryIndex=s;this._closePending=!1;this._storeName=n+"Store";i(this._databaseName,"open requested");try{c=indexedDB.open(n,u||1)}catch(l){e(new Error("IndexedDbClientSideStorage.const: Could not open database"));return}c.onsuccess=function(n){h._database=n.target.result;t._allInstances.push(h);i(h._databaseName,"open completed");f(h)};c.onupgradeneeded=function(n){var t,r;i(h._databaseName,"upgrading");t=n.target.result;t.objectStoreNames.contains(h._storeName)&&t.deleteObjectStore(h._storeName);r=t.createObjectStore(h._storeName);h._secondaryIndex&&r.createIndex(h._secondaryIndex,h._secondaryIndex,{unique:!1})};c.onerror=r("open.onError",e);c.onblocked=r("open.onBlocked",e)}return t.prototype.put=function(n,t,i,r){this.safeDbOperation("put",n.toString(),"readwrite",i,function(i,r,u){var f=i.put(t,n);f.onsuccess=r;f.onerror=u},r)},t.prototype.putMultiple=function(n,t,i){this.safeDbOperation("putMultiple",n.length.toString(),"readwrite",t,function(t,i,r){var u=0,f=function(){if(u<n.length){var e=t.put(n[u].value,n[u].key);u+=1;e.onsuccess=u==n.length?i:f;e.onerror=r}};f()},i)},t.prototype.getValue=function(n,t,i){this.safeDbOperation("getValue",n.toString(),"readonly",function(n){return t(n.target.result)},function(t,i,r){var u=t.get(n);u.onsuccess=i;u.onerror=r},i)},t.prototype.getRange=function(n,t,i,r){var u=this;this.safeDbOperation("getRange","["+n+", "+t+")","readonly",i,function(i,r,f){var e=IDBKeyRange.bound(n,t,!1,!0);u.queryFromCursor(i.openCursor(e),r,f)},r)},t.prototype.getRangeOnSecondaryKey=function(n,t,i,r){var u=this;this._secondaryIndex?this.safeDbOperation("getRangeOnSecondaryKey","["+n+", "+t+")","readonly",i,function(i,r,f){var e=i.index(u._secondaryIndex),o=IDBKeyRange.bound(n,t,!1,!0);u.queryFromCursor(e.openCursor(o),r,f)},r):r(new Error("getRangeOnSecondaryKey: Index name is missing"))},t.prototype.removeRange=function(n,t,i,r){var u=this;this.safeDbOperation("removeRange","["+n+","+t+"]","readwrite",i,function(i,r,f){var e=IDBKeyRange.bound(n,t,!1,!0);u.removeFromCursor(i.openCursor(e),r,f)},r)},t.prototype.removeRangeOnSecondaryKey=function(n,t,i,r){var u=this;this._secondaryIndex?this.safeDbOperation("removeRangeOnSecondaryKey","["+n+","+t+"]","readwrite",i,function(i,r,f){var e=i.index(u._secondaryIndex),o=IDBKeyRange.bound(n,t,!1,!0);u.removeFromCursor(e.openCursor(o),r,f)},r):r(new Error("removeRangeOnSecondaryKey: Index name is missing"))},t.prototype.getAll=function(n,t){var i=this;this.safeDbOperation("getAll",null,"readonly",n,function(n,t,r){return i.queryFromCursor(n.openCursor(),t,r)},t)},t.prototype.close=function(){i(this._databaseName,"close requested");this.innerClose()},t.prototype.innerClose=function(){var f,e,r,u,o;if(t._requestsInProgress>0)i(this._databaseName,"delaying close because of "+t._requestsInProgress+" requests in progress"),this._closePending=!0;else for(f=function(t){t._database&&(n.safeExecute(function(){return t._database.close()},e._databaseName+".close"),i(t._databaseName,"close completed"),t._database=null,t.onClosed())},e=this,r=0,u=t._allInstances;r<u.length;r++)o=u[r],f(o)},t.prototype.queryFromCursor=function(t,i,r){var u=[];t.onsuccess=function(t){var r=t.target.result;r&&u.push({key:r.primaryKey,value:r.value});r&&u.length!=n.config.maxIndexedDBCursorIterations?r["continue"]():i(u)};t.onerror=r},t.prototype.removeFromCursor=function(t,i,r){var u=0;t.onsuccess=function(t){var r=t.target.result;r&&(r["delete"](),u+=1);r&&u!=n.config.maxIndexedDBCursorIterations?r["continue"]():i(null)};t.onerror=r},t.prototype.safeDbOperation=function(n,u,f,e,o,s){var h=this,l,c,a;i(this._databaseName,n+" requested"+(u?" "+u:""));t._requestsInProgress+=1;l=function(r){i(h._databaseName,n+" completed "+(u?u+" ":""));t._requestsInProgress-=1;e(r);h._closePending&&t._requestsInProgress==0&&h.innerClose()};c=function(n){t._requestsInProgress-=1;s(n);h._closePending&&t._requestsInProgress==0&&h.innerClose()};try{this._database?(a=this._database.transaction(this._storeName,f).objectStore(this._storeName),o(a,l,r(n+".onError",c))):c(new Error(n+" Database not initialized"))}catch(v){c(v)}},t._requestsInProgress=0,t._allInstances=[],t}()})(t=n.ClientSideStorage||(n.ClientSideStorage={}))}(AutoSuggest||(AutoSuggest={})),function(n){var t;(function(t){var i=function(){function t(n,t,i,r,u,f){var e=this;this._storageFactory=n;this.createResponse=t;this.dataPopulated=i;this.getDataSourceState=r;this._dataSource=u;this._storageOpenInProgress=!1;this._pendingQueries=[];f&&(f.bindAppVisible(function(){return e.initStorage()}),f.bindDismissed(function(){return e._pendingQueries=[]}),f.bindAppHidden(function(){return e.teardownStorage()}))}return t.prototype.teardownStorage=function(){this._storage&&this._storage.close()},t.prototype.initStorage=function(){var n=this;!this._storageOpenInProgress&&this.dataPopulated()&&(this._storageOpenInProgress=!0,this._storageFactory(function(t){n._storage=t;n._storageOpenInProgress=!1;n._pendingQueries.forEach(function(n){return n()});n._pendingQueries=[]},function(t){n.onError(t,"open storage");n._storageOpenInProgress=!1;n._pendingQueries.forEach(function(n){return n()});n._pendingQueries=[]},function(){return n._storage=null}))},t.prototype.onError=function(n,t){t!="open storage"&&SharedLogHelper.LogError(t,this._dataSource,n);this.teardownStorage()},t.prototype.reloadStorage=function(){this.teardownStorage();this.initStorage()},t.prototype.isReady=function(){return!!this._storage},t.prototype.getKey=function(n){return n.queryToFetch?n.queryToFetch.toLocaleLowerCase():""},t.prototype.fetch=function(t,i,r,u,f){var o=this,e;n.isDataSourceEnabled(this._dataSource,t)&&(e=function(n,r){var u=r=="R";f()&&i(o._dataSource,o.createResponse(t,n,u),o.getDataSourceState(r))},this.innerQueryStorage(1,this.getKey(t),function(n){return e(n,"R")},function(){return e(null,"E")},function(){return e(null,"X")},function(){return e(null,"T")}))},t.prototype.withStorage=function(n){return this._storage?(n(this._storage),!0):!1},t.prototype.getMaxKey=function(n){return n.slice(0,n.length-1)+String.fromCharCode(n.charCodeAt(n.length-1)+1)},t.prototype.queryStorage=function(n,t,i,r,u){this.innerQueryStorage(0,n,t,i,r,u)},t.prototype.innerQueryStorage=function(t,i,r,u,f,e){var h=this,o=null,s=!1,c=!0,a=function(){if(c)if(c=!1,h._storage){var n=function(n){o&&sb_ct(o);h.onError(n,"query");s||(s=!0,u())};t==0?h._storage.getValue(i,function(n){o&&sb_ct(o);s||(s=!0,r(n))},n):i?h._storage.getRange(i,h.getMaxKey(i),function(n){o&&sb_ct(o);s||(s=!0,r(n))},n):h._storage.getAll(function(n){o&&sb_ct(o);s||(s=!0,r(n))},n)}else o&&sb_ct(o),s||(s=!0,u())},l;if(this._storage)a();else if(this.initStorage(),this._storageOpenInProgress)this._pendingQueries.push(a);else{f();return}l=i?n.config.indexedDBTimeout:n.config.latencyTimeoutForZeroInput;l&&(o=sb_st(function(){return n.safeExecute(function(){o=null;c=!1;s||(s=!0,e())},"innerQueryStorage")},l))},t}();t.StorageBasedDataProvider=i})(t=n.ClientSideStorage||(n.ClientSideStorage={}))}(AutoSuggest||(AutoSuggest={})),function(n){var t;(function(t){var i=function(){function i(n,t,i){this._host=n;this._instrumentationHelper=t;this._temporaryMessageHandler=i}return i.prototype.parse=function(i,r,u,f,e,o,s){var l=this,a=[],d,h,c,g;if(t.config.historySettingsPresent){var v=[],y=[],p=[],w=[],b=[],k=[];if(f&&f.Suggestions)for(d=function(u){var f=u.suggestionData,e,o;f.handoffType==2?t.isApp(f.type)?(e=f,v.push(e.id),w.push(u)):t.isSetting(f.type)?(e=f,y.push(e.id),b.push(u)):t.isFileOrFolder(f.type)&&(e=f,p.push(e.id),k.push(u)):n.isBingEnabled()&&(o=n.safeExecute(function(){return l.parseMRUWebSuggestion(i,u,r)},"parseMRUWebSuggestion"),o&&a.push(o))},h=0,c=f.Suggestions;h<c.length;h++)g=c[h],d(g);t.lookupById(i,"MPP",v,w,function(n){return[n.suggestionData.id]},"MST",y,b,function(n){return n.suggestionData.id},e,r,o,s,function(n,t,u,f){return l.parseIdLookupResponse(i,r,n,t,u,f)},"MFF",p,k,function(n){return n.suggestionData.id},this._instrumentationHelper,this._host)}o(n.MRUDataSource,a,f)},i.prototype.parseIdLookupResponse=function(i,r,u,f,e,o){var h=this,s,c;e.length==1&&(s=u.suggestionData,c=function(n){return h.setupRemoveFromHistoryContextMenu(n,u,h._host),s.appContextData&&(n.appContext=s.appContextData.appContext,n.query=s.appContextData.query,n.text=i.queryToFetch?HitHighlightingParser.addMarkers(s.appContextData.textWithoutHH,i.queryToFetch):s.appContextData.textWithoutHH),h.setRankingSignals(n,s),!0},n.safeExecute(function(){return t.parseLocalSuggestion(i,e[0],f,r,h._host,h._temporaryMessageHandler,s.type,h._instrumentationHelper,o,c)},"parseLocalSuggestion "+f))},i.prototype.setRankingSignals=function(n,t){n.hc=t.hc;n.highConfidenceMetaSuggestionScore=t.highConfidenceMetaSuggestionScore;n.prefetchConfidenceScore=t.prefetchConfidenceScore;n.fromHistory=!0;n.hasMruData=!0},i.prototype.parseMRUWebSuggestion=function(i,r,u){var e=r.suggestionData,f=t.createSuggestion(i.queryToFetch?HitHighlightingParser.addMarkers(e.textWithoutHH,i.queryToFetch):e.textWithoutHH,null,e.icon,e.type,e.query,n.InstrumentedItem.createInstrumentedItem(u),e.handoffType,u,!1),o,s,h;this.setRankingSignals(f,e);switch(f.handoffType){case 5:case 4:if(!t.isCortanaEnabledCache||f.type=="CSK"||(o=e,f.primaryMetadata=o.annotation||o.secondaryText,!t.setCat1SuggestionProperties(f,i,u,o.actionUri,o.taskFrame,o.confidence,o.source,this._host)))return null;break;case 10:return null;case 1:s=e;h=r.rankingData;i.queryToFetch.length>3&&(f.autoOpenPreviewPaneWhenOnTopHit=!!h.previewPaneLaunchCount);f.primaryMetadata=s.title||s.secondaryText;t.setUrlSuggestionProperties(f,i,u,s.url,this._host);break;default:return SharedLogHelper.LogError("parseMruWebSuggestion",null,new Error("Unexpected handoff type: "+e.handoffType)),null}return t.isValidSuggestion(f,"parseMruWebSuggestion")?(this.setupRemoveFromHistoryContextMenu(f,r,this._host),f):null},i.prototype.setupRemoveFromHistoryContextMenu=function(n,i,r){var u=this;i.remove&&t.setExtraVerbs(n,function(t){if(t||!i.remove)return[];if(!n.removeIcon&&n.duplicates&&n.duplicates.some(function(n){return!n.fromHistory}))return[];var f={verb:"RemoveFromDeviceHistory",displayName:r.getLocString("RemoveFromDeviceHistory"),executeSync:function(){i.remove(function(){r.refreshCurrentPane();u._temporaryMessageHandler.showTemporaryMessage(r.getLocString("RemovedFromDeviceHistory",HitHighlightingParser.removeMarkers(n.text)),{content:"&#xE946",type:2})});delete i.remove},icon:{content:"&#xE711",type:2}};return[f]},!0)},i}();t.MRUParser=i})(t=n.WSB||(n.WSB={}))}(AutoSuggest||(AutoSuggest={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(t){var i="LastUpdated",r=function(t){function r(r,u,f,e,o,s,h,c){var l=this;r&&r.bindItemLaunch(function(n,t,i){return l.onLaunch(n,t,i)});var a,v=function(t,r,f){return u(s,function(i){t(i);var r=n.getTimeDiffInDays(a);(r===null||r>=1)&&(a=n.getCurrentDate(),l.prune())},r,f,i)},y=function(t,i,r){return n.safeExecute(function(){return l.createMruResponse(t,i,r)},"createMruResponse")},p=function(){return!0},w=function(n){return n=="R"?undefined:n};return f.bindClearMRURequested(function(t){l.teardownStorage();n.ClientSideStorage.deleteDatabase(s,function(){return t(!0)},function(){return t(!1)})}),l=t.call(this,v,y,p,w,n.MRUDataSource,f)||this,l.candidatesEnabled=h,l.loggingEnabled=c,l.getSuggestionKey=e,l.getGroupType=o,l._pendingWrites=[],l}return __extends(r,t),r.prototype.getName=function(){return"MRUDataProvider"},r.prototype.shouldStoreSuggestions=function(){return n.config.historySettingsPresent&&this.candidatesEnabled()},r.prototype.createMruResponse=function(t,i,r){var c=this,f,s,u,o,h;if(i=i||[],f=this.getKey(t),this._lastKey=r?f:null,s=r?i.find(function(n){return n.key==f}):null,this._valueForLastKey=s?s.value:null,u={},n.config.mruSignalsEnabled&&this._valueForLastKey&&(u.SuggestionEngagementData=this._valueForLastKey.SuggestionEngagementData),u.LookupCompletions=i.map(function(n){return{key:n.key,value:n.value.SuggestionEngagementData}}),this.shouldStoreSuggestions()){var e=[],v=this.getOldestDateToKeep(),y=function(n,t){var u,i,r,f;if(t.Suggestions)for(u=function(i){var r=l.getRankingData(t,i);r&&r.lastLaunchTime&&r.lastLaunchTime>=v&&e.push({rankingData:n==l._lastKey?{prefixLaunchCount:r.prefixLaunchCount,lastLaunchTime:r.lastLaunchTime,previewPaneLaunchCount:r.previewPaneLaunchCount,lastPreviewPaneLaunchTime:r.lastPreviewPaneLaunchTime}:r,suggestionData:i,remove:function(t){return c.remove(n,i,t)}})},i=0,r=t.Suggestions;i<r.length;i++)f=r[i],u(f)},l=this;for(o=0,h=i;o<h.length;o++){var a=h[o],p=a.key,w=a.value;y(p,w)}e.length>0&&(u.Suggestions=[],e.sort(function(n,t){return t.rankingData.lastLaunchTime-n.rankingData.lastLaunchTime}),e.forEach(function(n){return c.addToResponseIfNotPresent(u.Suggestions,n)}),f?f.length<=n.config.mruLengthA?u.Suggestions.splice(n.config.maxMruA):f.length<=n.config.mruLengthB&&u.Suggestions.splice(n.config.maxMruB):u.Suggestions.splice(n.config.maxMruZeroInput))}return u},r.removeRankerSignals=function(n,t){return n=="highConfidenceMetaSuggestionScore"||n=="prefetchConfidenceScore"?undefined:t},r.prototype.addToResponseIfNotPresent=function(n,t){var f=JSON.stringify(t.suggestionData,r.removeRankerSignals),i=n.find(function(n){return JSON.stringify(n.suggestionData,r.removeRankerSignals)==f}),u;i?(u=i.remove,i.remove=function(n){return u(function(){return t.remove(n)})},i.rankingData.lastLaunchTime=Math.max(i.rankingData.lastLaunchTime,t.rankingData.lastLaunchTime),i.rankingData.prefixLaunchCount+=t.rankingData.prefixLaunchCount,t.rankingData.previewPaneLaunchCount&&(i.rankingData.previewPaneLaunchCount=(i.rankingData.previewPaneLaunchCount||0)+t.rankingData.previewPaneLaunchCount),t.rankingData.lastPreviewPaneLaunchTime&&(i.rankingData.lastPreviewPaneLaunchTime=i.rankingData.lastPreviewPaneLaunchTime?Math.max(i.rankingData.lastPreviewPaneLaunchTime,t.rankingData.lastPreviewPaneLaunchTime):t.rankingData.lastPreviewPaneLaunchTime)):n.push(t)},r.prototype.addToDataIfNotPresent=function(n,t){var i=JSON.stringify(t,r.removeRankerSignals),u=n.find(function(n){return JSON.stringify(n,r.removeRankerSignals)==i});u||n.push(t)},r.prototype.onAfterWrite=function(){if(this._writing=!1,this._pendingWrites.length>0){var n=this._pendingWrites.shift();n()}else this._tearDownPending&&this.teardownStorage()},r.prototype.teardownStorage=function(){this._writing?this._tearDownPending=!0:(this._tearDownPending=!1,t.prototype.teardownStorage.call(this))},r.prototype.onLaunch=function(n,t,i){var r=this,u;if(this.loggingEnabled()){if(this._writing){this._pendingWrites.push(function(){return r.onLaunch(n,t,i)});return}this._writing=!0;u=this.getKey(t);this._lastKey==u?this.updateAndSaveLaunchData(u,this._valueForLastKey,n,i):this.queryStorage(u,function(t){return r.updateAndSaveLaunchData(u,t,n,i)},function(){return r.onAfterWrite()},function(){return r.onAfterWrite()},function(){return r.onAfterWrite()})}},r.prototype.remove=function(n,t,i){var r=this;if(this._writing){this._pendingWrites.push(function(){return r.remove(n,t,i)});return}this._writing=!0;this._lastKey==n?this.removeAndSaveLaunchData(n,this._valueForLastKey,t,i):this.queryStorage(n,function(u){return r.removeAndSaveLaunchData(n,u,t,i)},function(){return r.onAfterWrite()},function(){return r.onAfterWrite()},function(){return r.onAfterWrite()})},r.getUnixTime=function(n){return n||(n=new Date),Math.round(n.getTime()/1e3)},r.prototype.createOrUpdateDbEntry=function(n,t,i,u){var f,e;return t?(t.LastUpdated=r.getUnixTime(),t.SuggestionEngagementData=t.SuggestionEngagementData||{}):t={LastUpdated:r.getUnixTime(),SuggestionEngagementData:{}},f=this.getSuggestionKey(i),t.SuggestionEngagementData[f]=this.updateMRUEntryClicksAndTime(t.SuggestionEngagementData[f],t.LastUpdated,u),this.getGroupType&&(t.SuggestionEngagementData[f].groupType=this.getGroupType(i)),this.shouldStoreSuggestions()&&(e=i.getMruData(),e&&n&&(t.Suggestions||(t.Suggestions=[]),this.addToDataIfNotPresent(t.Suggestions,e))),t},r.prototype.updateMRUEntryClicksAndTime=function(n,t,i){return n?(n.prefixLaunchCount+=1,n.lastLaunchTime=t):n={prefixLaunchCount:1,lastLaunchTime:t},i&&(n.previewPaneLaunchCount=(n.previewPaneLaunchCount||0)+1,n.lastPreviewPaneLaunchTime=t),n},r.prototype.getOldestDateToKeep=function(){var t=n.getCurrentDate();return t.setDate(t.getDate()-n.config.mruMaxAgeInDays),r.getUnixTime(t)},r.prototype.updateAndSaveLaunchData=function(t,i,r,u){var f=this;if(i=n.safeExecute(function(){return f.createOrUpdateDbEntry(t,i,r,u)},"createOrUpdateDbEntry"),!i){this.onAfterWrite();return}n.safeExecute(function(){return f.removeOldLaunches(i,f.getOldestDateToKeep())},"removeOldLaunches");this._lastKey=t;this._valueForLastKey=i;this.withStorage(function(n){return n.put(t,i,function(){return f.onAfterWrite()},function(n){f.onError(n,"updateAndSaveLaunchData");f.onAfterWrite()})})||this.onAfterWrite()},r.prototype.removeAndSaveLaunchData=function(n,t,i,r){var u=this,e,f;if(!t){SharedLogHelper.LogError("removeAndSaveLaunchData",null,new Error("MRU entry not present"));this.onAfterWrite();return}if(e=JSON.stringify(i),f=(t.Suggestions||[]).findIndex(function(n){return JSON.stringify(n)==e}),f==-1){SharedLogHelper.LogError("removeAndSaveLaunchData",null,new Error("Suggestion not present in MRU"));this.onAfterWrite();return}t.Suggestions.splice(f,1);this._lastKey=n;this._valueForLastKey=t;this.withStorage(function(i){return i.put(n,t,function(){r&&r();u.onAfterWrite()},function(n){u.onError(n,"removeAndSaveLaunchData");u.onAfterWrite()})})||this.onAfterWrite()},r.prototype.getRankingData=function(n,t){return n.SuggestionEngagementData?n.SuggestionEngagementData[t.suggestionKey]:undefined},r.prototype.removeOldLaunches=function(n,t){var i,r,u;if(n.Suggestions)for(i=n.Suggestions.length-1;i>=0;--i)r=this.getRankingData(n,n.Suggestions[i]),u=r?r.lastLaunchTime:null,(!u||u<t)&&n.Suggestions.splice(i,1);this.removeOldEngagementData(n.SuggestionEngagementData,t)},r.prototype.removeOldEngagementData=function(n,t){var i,r,u;if(n)for(i in n)r=n[i],r&&(u=r.lastLaunchTime,(!u||u<t)&&delete n[i])},r.prototype.prune=function(n){var t=this;if(this._writing){this._pendingWrites.push(function(){return t.prune(n)});return}this._writing=!0;this.withStorage(function(i){return i.removeRangeOnSecondaryKey(0,t.getOldestDateToKeep(),function(){n&&n();t.onAfterWrite()},function(n){t.onError(n,"MRUDataProvider prune");t.onAfterWrite()})})||this.onAfterWrite()},r}(n.ClientSideStorage.StorageBasedDataProvider);t.MRUDataProvider=r})(t=n.MRU||(n.MRU={}))}(AutoSuggest||(AutoSuggest={})),function(n){var t;(function(t){var i;(function(i){function a(n,t){var r,i;if(f||g(),r=f[n],!r)throw new Error("Unsupported data source: "+n);if(i=r.filter(function(n){return!n.enabled||n.enabled(t)}),i.length==0)throw new Error("No enabled strategies for data source: "+n);else if(i.length>1)throw new Error("Multiple strategies for data source: "+n);else return i[0]}function or(n){return f||g(),!!f[n]}function sr(n,t,i){if(!f||!f[i]||t.taskFrame)return!1;var r=a(i,t);return r.sfgaoFilter?!r.sfgaoFilter(n.getProperty("System.SFGAOFlags")):!1}function r(n,t){return n=ai.concat(n),t&&(n=n.concat(vi)),n}function g(){var a=0,e=SearchAppWrapper.CortanaApp.queryFormulationView.deviceSearch.getUserSID(),d=ni(a,e,!1),g=d[0],o=d[1],nt=ni(a,e,!0),i=nt[0],n=nt[1];w=g;vt=o;var tt='"System.Kind" != ANY ARRAY['+k.concat("link").map(function(n){return"'"+n+"'"}).join(", ")+"] AND "+g,gt="\"System.Kind\" = SOME ARRAY['program'] AND "+i,it='"System.Kind" != ANY ARRAY['+pt.map(function(n){return"'"+n+"'"}).join(", ")+"] AND "+i,s='"System.Kind" != ANY ARRAY['+yt.concat(k).concat("folder").map(function(n){return"'"+n+"'"}).join(", ")+"] AND "+i,ti="\"System.Kind\" = SOME ARRAY['folder'] AND "+i,wt="\"System.Kind\" = SOME ARRAY['Music'] AND "+i,bt="\"System.Kind\" = SOME ARRAY['Picture'] AND "+i,kt='"System.Kind" = SOME ARRAY['+b.map(function(n){return"'"+n+"'"}).join(", ")+"] AND "+i,dt="SCOPE = 'winrt://{"+e+"}/LS/Microsoft.MicrosoftEdge_8wekyb3d8bbwe/spartan history'";f={};f.IFF=[{selectFields:r(h,!1),filterFieldsSets:[rt],mostRelevantProps:c,kindAndScopeClauses:tt,sortClause:u,searchOptions:3,sfgaoFilter:o,enabled:function(n){return!!n.queryToFetch&&!t.supportsShortcuts("IFF",n)}},{selectFields:r(h,!1),filterFieldsSets:[],mostRelevantProps:c,kindAndScopeClauses:tt,sortClause:u,searchOptions:0,sfgaoFilter:o,enabled:function(n){return!n.queryToFetch&&!t.supportsShortcuts("IFF",n)}},{selectFields:r(ut,!0),filterFieldsSets:[yi],mostRelevantProps:c,kindAndScopeClauses:it,sortClause:u,searchOptions:3,sfgaoFilter:n,enabled:function(n){return!!n.queryToFetch&&t.supportsShortcuts("IFF",n)}},{selectFields:r(ut,!0),filterFieldsSets:[],mostRelevantProps:c,kindAndScopeClauses:it,sortClause:u,searchOptions:0,sfgaoFilter:n,enabled:function(n){return!n.queryToFetch&&t.supportsShortcuts("IFF",n)}},];f.EBH=[{selectFields:ft,filterFieldsSets:[pi],mostRelevantProps:et,kindAndScopeClauses:dt,sortClause:ot,searchOptions:7,sfgaoFilter:null,enabled:function(n){return!!n.queryToFetch}},{selectFields:ft,filterFieldsSets:[wi],mostRelevantProps:et,kindAndScopeClauses:dt,sortClause:ot,searchOptions:0,sfgaoFilter:null,enabled:function(n){return!n.queryToFetch}},];f.MDOC=[{selectFields:r(l,!0),filterFieldsSets:[st.concat(gi)],mostRelevantProps:v,kindAndScopeClauses:s,sortClause:u,searchOptions:3,sfgaoFilter:n,enabled:function(n){return n.queryToFetch&&t.config.minLengthForContentMatch&&n.queryToFetch.length>=t.config.minLengthForContentMatch}},{selectFields:r(l,!0),filterFieldsSets:[st],mostRelevantProps:v,kindAndScopeClauses:s,sortClause:u,searchOptions:3,sfgaoFilter:n,enabled:function(n){return n.queryToFetch&&(!t.config.minLengthForContentMatch||n.queryToFetch.length<t.config.minLengthForContentMatch)}},{selectFields:r(l,!0),filterFieldsSets:[],mostRelevantProps:v,kindAndScopeClauses:s,sortClause:u,searchOptions:0,sfgaoFilter:n,enabled:function(n){return!n.queryToFetch}},];f.MFOL=[{selectFields:r(nr,!0),filterFieldsSets:[ir],mostRelevantProps:tr,kindAndScopeClauses:ti,sortClause:u,searchOptions:3,sfgaoFilter:n}];f.MPHO=[{selectFields:r(y,!0),filterFieldsSets:[rr],mostRelevantProps:ht,kindAndScopeClauses:bt,sortClause:u,searchOptions:3,sfgaoFilter:n,enabled:function(n){return!!n.queryToFetch}},{selectFields:r(y,!0),filterFieldsSets:[],mostRelevantProps:ht,kindAndScopeClauses:bt,sortClause:u,searchOptions:0,sfgaoFilter:n,enabled:function(n){return!n.queryToFetch}},];f.MVID=[{selectFields:r(p,!0),filterFieldsSets:[ur],mostRelevantProps:ct,kindAndScopeClauses:kt,sortClause:u,searchOptions:3,sfgaoFilter:n,enabled:function(n){return!!n.queryToFetch}},{selectFields:r(p,!0),filterFieldsSets:[],mostRelevantProps:ct,kindAndScopeClauses:kt,sortClause:u,searchOptions:0,sfgaoFilter:n,enabled:function(n){return!n.queryToFetch}},];f.MMUS=[{selectFields:r(lt,!0),filterFieldsSets:[fr],mostRelevantProps:at,kindAndScopeClauses:wt,sortClause:u,searchOptions:3,sfgaoFilter:n,enabled:function(n){return!!n.queryToFetch}},{selectFields:r(lt,!0),filterFieldsSets:[],mostRelevantProps:at,kindAndScopeClauses:wt,sortClause:u,searchOptions:0,sfgaoFilter:n,enabled:function(n){return!n.queryToFetch}},];f.IBA=[{selectFields:r(bi,!0),filterFieldsSets:[di],mostRelevantProps:ki,kindAndScopeClauses:gt,sortClause:u,searchOptions:3,sfgaoFilter:n}];f.MFF=[{selectFields:r(h,!1),filterFieldsSets:[er],mostRelevantProps:null,kindAndScopeClauses:null,sortClause:null,searchOptions:0,sfgaoFilter:null}]}function hr(n,t,i){return kr(n.queryToFetch).then(function(r){return lr(n,r,t,i)})}function cr(n,t,i){var r=a(t,n);return"SELECT TOP "+i.length+" "+wt(r.selectFields)+" FROM SystemIndex WHERE "+pr(r,i)}function lr(n,t,i,r){var f=SearchAppWrapper.CortanaApp.queryFormulationView.deviceSearch.getLCIDStringForText(n.queryToFetch),u=n.taskFrame?ru(r,n.taskFrame.parsed,f):a(r,n);return"SELECT TOP "+i+" "+wt(u.selectFields)+" FROM SystemIndex WHERE "+wr(u,n.queryToFetch,t,u.searchOptions,f)+" ORDER BY "+u.sortClause}function ar(n){var t={displayName:n.displayName,id:n.id,kind:n.kind,getProperty:function(t){return n.getProperty(t)},propertyHits:n.propertyHits,rankScore:n.rankScore,url:n.getProperty("System.Link.TargetUrl"),title:n.getProperty("System.Title"),visitCount:n.getProperty("System.History.VisitCount"),dateVisited:n.getProperty("System.Link.DateVisited")};return t.originalDeviceItem=n,t}function vr(n){var f,i,r,t,u;if(n.kind=="link"||n.kind=="program")for(f=n.getProperty("System.Kind"),i=0,r=f;i<r.length;i++){if(t=r[i],t=="program")return yr(n,t);if(t!="link")return u={displayName:n.displayName,id:n.id,kind:t,getProperty:function(t){return n.getProperty(t)},propertyHits:n.propertyHits,rankScore:n.rankScore,getImageAsync:function(t){return n.getImageAsync(t)},imageType:n.imageType,canHaveContextMenu:n.canHaveContextMenu,getVerbsAsync:function(){return n.getVerbsAsync()},extension:n.extension,itemTypeDisplayName:n.itemTypeDisplayName,createdDate:n.createdDate,lastModifiedDate:n.lastModifiedDate},u.originalDeviceItem=n,u}return n}function yr(n,i){var r=n.displayName,u,f;return r.toLocaleLowerCase().endsWith(".lnk")&&(r=r.substr(0,r.length-4)),u=t.indexerFilePathToRegularPath(n.id),f={displayName:r,id:u,kind:i,getProperty:function(t){return n.getProperty(t)},propertyHits:n.propertyHits,rankScore:n.rankScore,getImageAsync:function(t){return n.getImageAsync(t)},imageType:n.imageType,canHaveContextMenu:n.canHaveContextMenu,getVerbsAsync:function(){return n.getVerbsAsync()},extension:n.extension,itemTypeDisplayName:n.itemTypeDisplayName,createdDate:n.createdDate,lastModifiedDate:n.lastModifiedDate,filePath:u,lastAccessed:n.getProperty("System.DateAccessed"),version:null,isImmersive:!1,logoBackgroundColor:null,launchArguments:null,totalLaunches:null,isTrustedApp:!1,packageFamilyName:null,jumpList:null,getJumpListAsync:null,voiceCommandExamples:null,rawIndexResponse:null},f.originalDeviceItem=n,f}function wt(n){return n.map(function(n){return n=="System.ParsingPath"?"path":'"'+n+'"'}).join(",")}function pr(n,t){return"("+dr(n,t)+")"}function wr(n,t,i,r,u){var f="",e;return n.mostRelevantProps.length>0&&(f+="WITH ("+n.mostRelevantProps.join(", ")+") AS #MRProps "),e=gr(n,t,i,r,u),e&&(f+="("+e+") AND "),f+n.kindAndScopeClauses}function br(n,t){return SearchAppWrapper.CortanaApp.queryFormulationView.deviceSearch.tokenize(n,t)}function kr(n){return SearchAppWrapper.CortanaApp.queryFormulationView.getLinguisticDataAsync(n)}function bt(t,i){var r="",u=t.filterFieldsSets.length>1;return t.filterFieldsSets.forEach(function(t){var s,f,h,l,e,o,c,a;for(u&&(r?r+=") AND (":r="("),s=!0,f=0,h=t;f<h.length;f++){for(l=h[f],e=!1,o=0,c=i;o<c.length;o++)a=c[o],s?(r+="(",s=!1):r+=e?" OR ":" OR (",r+=n.formatString(l,[a]),e=!0;e&&(r+=")")}}),u&&(r+=")"),r}function dr(n,t){var i=t.map(function(n){return nt(n)});return bt(n,i)}function gr(n,t,i,r,u){var o=[t],e,f;return i.alternatives&&i.alternatives.forEach(function(n){return o.push(n)}),e=o.map(function(n){return nt(n)}),f=bt(n,e),(r&2)==2&&(f=nu(r,i,e,f,u)),f}function nu(t,i,r,u,f){for(var k,o,s,v,h,e,c,w,d,g=tu(t),l=!1,a=0,b=g;a<b.length;a++){for(k=b[a],o=!1,s=0,v=r;s<v.length;s++){var nt=v[s],y=[],p=br(nt,i.language);if((t&4)==0||p.length<=it)for(h=0;h<Math.min(p.length,it);++h)y.push(p[h]);if(y.length>1){for(e="",c=0,w=y;c<w.length;c++)d=w[c],e&&(e+=" AND "),e+='"'+d+(l?'*"':'"');u?u+=o?" OR ":" OR (":u="(";u+=n.formatString(k,[e,f]);o=!0}}o&&(u+=")");l=!l}return u}function tu(n){var t=[];return t.push("CONTAINS(#MRProps, '{0}', {1}) RANK BY COERCION(ABSOLUTE, 600)"),(n&1)==1&&t.push("CONTAINS(#MRProps, '{0}', {1}) RANK BY COERCION(ABSOLUTE, 550)"),t}function kt(n,t){return n=n.replace(/'/g,"''"),n=n.replace(/"/g," "),t>=2&&(n=n.replace(/%/g,"[%]"),n=n.replace(/_/g,"[_]"),n=n.replace(/\[/g,"[[]"),t==3?(n=n.replace(/\*/g,"%"),n=n.replace(/\?/g,"_")):(n=n.replace(/\*/g," "),n=n.replace(/\?/g," "))),n}function e(n){return kt(n,1)}function nt(n){return kt(n,2)}function iu(n){var t=s[n];if(t)return t;throw new Error("select fields for NL Data source was not found: "+n);}function o(n,t,i){for(var u=[],r=3;r<arguments.length;r++)u[r-3]=arguments[r];typeof i=="string"?(i=nt(i),t.push(u.map(function(t){return"CONTAINS("+t+",'\""+i+"*\"',"+n+") RANK BY COERCION(ABSOLUTE, 1000)"}))):i&&i.Value&&o.apply(void 0,[n,t,i.Value].concat(u))}function ru(n,t,i){var f=[],e='"System.Kind" != ANY ARRAY['+d+"]",s,r;if(t.FileType&&t.FileType.Value){s=t.FileType.Value;switch(s){case"Document":break;case"Picture":e="\"System.Kind\" = SOME ARRAY['Picture']";break;case"Video":e='"System.Kind" = SOME ARRAY['+b.map(function(n){return"'"+n+"'"}).join(", ")+"]";break;case"Powerpoint":case"Word":case"Excel":e="CONTAINS(System.ItemType,'\""+dt[s]+"*\"',"+i+') RANK BY COERCION(ABSOLUTE, 1000) AND "System.Kind" != ANY ARRAY['+d+"]";break;default:e='"System.Kind" != ANY ARRAY['+d+"]";o(i,f,s,"System.ItemType","System.ItemTypeText")}}return o(i,f,t.Title,"System.ItemNameDisplay","System.Title"),o(i,f,t.Body,"System.ItemNameDisplay","System.Title","System.FileDescription","System.Keywords","System.Search.Contents"),t.People&&t.People.forEach(function(n){var t=n.Value;t&&o(i,f,t=="me"?SearchAppWrapper.CortanaApp.queryFormulationView.deviceSearch.userName:t,"System.Author","System.FileOwner","System.Document.LastAuthor","System.Photo.TagViewAggregate")}),o(i,f,t.Place,"System.Photo.TagViewAggregate"),r=uu(t.Time),r&&f.push(["System.DateCreated>='"+r[0]+"' AND System.DateCreated<'"+r[1]+"'","System.DateModified>='"+r[0]+"' AND System.DateModified<'"+r[1]+"'","System.DateAccessed>='"+r[0]+"' AND System.DateAccessed<'"+r[1]+"'","System.DateArchived>='"+r[0]+"' AND System.DateArchived<'"+r[1]+"'","System.DateAcquired>='"+r[0]+"' AND System.DateAcquired<'"+r[1]+"'",]),{selectFields:iu(n),filterFieldsSets:f,kindAndScopeClauses:e?e+" AND "+w:w,mostRelevantProps:[],searchOptions:0,sortClause:u,sfgaoFilter:vt}}function uu(t){var i,f,u,e,r;return t?(i=t.value,!i)?null:(f=i.indexOf("T"),f!=-1&&(i=i.substr(0,f)),u=i.split("-"),u.length<2||u.length>3)?null:(e=new Date(i),!n.isValidDate(e))?null:(r=new Date(i),u.length==3?r.setUTCDate(r.getUTCDate()+1):r.setUTCMonth(r.getUTCMonth()+1),[gt(e),gt(r)]):null}function gt(n){var t=n.toISOString();return t.substr(0,t.indexOf("T"))}function ni(n,i,r){var u,h,c,f,o,s,l,a,v;r||(u="NOT System.Shell.SFGAOFlagsStrings = SOME ARRAY['hidden'] AND NOT System.Shell.SFGAOFlagsStrings = SOME ARRAY['system'] AND NOT System.Shell.SFGAOFlagsStrings = SOME ARRAY['link']");r?h=function(n){return!(n&si)&&!(n&oi)&&(!!(n&&hi)||n&&li&&!!(n&&tt)||n&&ci&&!!(n&&tt))}:(u+=" AND (System.Shell.SFGAOFlagsStrings = SOME ARRAY['stream']",u+=" OR (System.Shell.SFGAOFlagsStrings = SOME ARRAY['fileanc'] AND System.Shell.SFGAOFlagsStrings = SOME ARRAY['folder'])",u+=" OR (System.Shell.SFGAOFlagsStrings = SOME ARRAY['storageanc'] AND System.Shell.SFGAOFlagsStrings = SOME ARRAY['folder'])",u+=")");r?u="System.Shell.OmitFromView != 'true'":u+=" AND System.Shell.OmitFromView != 'true'";c=e(t.getKnownFolderPathLC(t.FOLDERID_Profile));switch(n){case 0:f=e(t.getKnownFolderPathLC(ri));u+=" AND (Scope = 'file://' OR Scope = 'csc://{"+i+"}') AND (Scope <> 'file:"+c+"\\AppData') AND (Scope <> 'file:"+f+"\\Default\\AppData') AND (Scope <> 'file:"+f+"\\Administrator\\AppData')";o=e(t.getKnownFolderPathLC(ti));s=e(t.getKnownFolderPathLC(ii));u+=" AND (Scope <> 'file:"+o+"')";s!=o&&(u+=" AND (Scope <> 'file:"+s+"')");l=e(t.getKnownFolderPathLC(ui));u+=" AND (Scope <> 'file:"+l+"')";a=e(t.getKnownFolderPathLC(fi));u+=" AND (Scope <> 'file:"+a+"')";r&&(v=e(t.getKnownFolderPathLC(ei)),u+=" AND (Scope <> 'file:"+v+"')");break;case 1:u+=" AND (Scope = 'file://' OR Scope = 'csc://{"+i+"}')";break;default:throw new Error("Unknown SearchScope: "+n);}return[u,h]}var ti="{905e63b6-c1bf-494e-b29c-65b732d3d21a}",ii="{7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E}",ri="{0762D272-C50A-4BB0-A382-697DCD729B80}",ui="{A4115719-D62E-491D-AA7C-E74B8BE3B067}",fi="{0482af6c-08f1-4c34-8c90-e17ec98b1e17}",ei="{bfb9d5e0-c6a9-404c-b2b2-ae6db6af4968}",oi=4096,si=524288,hi=4194304,tt=536870912,ci=8388608,li=268435456,it=3,u='"System.Search.Rank" DESC, "System.DateModified" DESC, "System.ItemNameDisplay" ASC',ai=["System.Kind","System.Search.Rank","System.ParsingPath","System.DateCreated","System.DateModified","System.Search.QueryPropertyHits","System.ItemNameDisplay","System.FileExtension","System.ItemType",],vi=["System.Link.TargetParsingPath","System.SFGAOFlags",],h=["System.Title","System.Music.AlbumTitle","System.Music.DisplayArtist"],c=["System.ItemNameDisplay","System.Music.DisplayArtist","System.Music.AlbumTitle",],rt=["System.ItemNameDisplay = '{0}' RANK BY COERCION(ABSOLUTE, 990)","CONTAINS(System.ItemNameDisplay, '\"{0}*\"') RANK BY COERCION(ABSOLUTE, 960)","System.Title = '{0}' RANK BY COERCION(ABSOLUTE, 890)","CONTAINS(System.Title, '\"{0}*\"') RANK BY COERCION(ABSOLUTE, 860)","System.Music.DisplayArtist = '{0}' RANK BY COERCION(ABSOLUTE, 790)","CONTAINS(System.Music.DisplayArtist, '\"{0}*\"') RANK BY COERCION(ABSOLUTE, 760)","System.Music.AlbumTitle = '{0}' RANK BY COERCION(ABSOLUTE, 690)","CONTAINS(System.Music.AlbumTitle, '\"{0}*\"') RANK BY COERCION(ABSOLUTE, 660)",],ut=h.concat("System.DateAccessed"),yi=rt.concat(["CONTAINS(System.Link.TargetParsingPath, '\"{0}*\"') RANK BY COERCION(ABSOLUTE, 920)"]),ft=["System.ItemNameDisplay","System.Search.QueryPropertyHits","System.Kind","System.Search.Rank","System.Link.TargetUrl","System.Title","System.History.VisitCount","System.Link.DateVisited","System.DateCreated","System.DateModified",],et=["System.Link.TargetUrl","System.Title",],pi=["(System.Link.TargetUrl LIKE 'http%' AND CONTAINS(System.Title, '\"{0}*\"') RANK BY COERCION(ABSOLUTE, 1000))","(System.Link.TargetUrl LIKE 'http%' AND CONTAINS(System.Link.TargetUrl, '\"{0}*\"') RANK BY COERCION(ABSOLUTE, 995))",],wi=["(System.Link.TargetUrl LIKE 'http%' RANK BY COERCION(ABSOLUTE, 995))",],ot='"System.History.VisitCount" DESC, "System.Link.DateVisited" DESC, "System.Title" ASC',bi=["System.DateAccessed",],ki=["System.ItemNameDisplay",],di=["System.ItemNameDisplay = '{0}' RANK BY COERCION(ABSOLUTE, 999)","CONTAINS(System.ItemNameDisplay, '\"{0}*\"') RANK BY COERCION(ABSOLUTE, 895)","CONTAINS(System.Link.TargetParsingPath, '\"{0}*\"') RANK BY COERCION(ABSOLUTE, 795)",],l=["System.Search.AutoSummary","System.Keywords","System.Title","System.Author","System.Document.LastAuthor",],v=["System.ItemNameDisplay","System.Keywords","System.Title",],st=["System.ItemNameDisplay = '{0}' RANK BY COERCION(ABSOLUTE, 999)","CONTAINS(System.ItemNameDisplay, '\"{0}*\"') RANK BY COERCION(ABSOLUTE, 895)","System.Title = '{0}' RANK BY COERCION(ABSOLUTE, 980)","CONTAINS(System.Title, '\"{0}*\"') RANK BY COERCION(ABSOLUTE, 875)","System.Keywords = '{0}' RANK BY COERCION(ABSOLUTE, 960)","CONTAINS(System.Keywords, '\"{0}*\"') RANK BY COERCION(ABSOLUTE, 855)",],gi="CONTAINS(System.Search.Contents, '\"{0}*\"') RANK BY COERCION(ABSOLUTE, 545)",nr=[],tr=["System.ItemNameDisplay",],ir=["System.ItemNameDisplay = '{0}' RANK BY COERCION(ABSOLUTE, 999)","CONTAINS(System.ItemNameDisplay, '\"{0}*\"') RANK BY COERCION(ABSOLUTE, 895)",],y=["System.Photo.TagViewAggregate","System.Title",],ht=["System.ItemNameDisplay","System.Photo.TagViewAggregate",],rr=["System.ItemNameDisplay = '{0}' RANK BY COERCION(ABSOLUTE, 999)","CONTAINS(System.ItemNameDisplay, '\"{0}*\"') RANK BY COERCION(ABSOLUTE, 895)","System.Title = '{0}' RANK BY COERCION(ABSOLUTE, 980)","CONTAINS(System.Title, '\"{0}*\"') RANK BY COERCION(ABSOLUTE, 875)","System.Photo.TagViewAggregate = '{0}' RANK BY COERCION(ABSOLUTE, 940)","CONTAINS(System.Photo.TagViewAggregate, '\"{0}*\"') RANK BY COERCION(ABSOLUTE, 835)",],p=["System.Title","System.Keywords","System.Music.DisplayArtist","System.Music.Genre",],ct=["System.ItemNameDisplay","System.Title","System.Keywords",],ur=["System.ItemNameDisplay = '{0}' RANK BY COERCION(ABSOLUTE, 999)","CONTAINS(System.ItemNameDisplay, '\"{0}*\"') RANK BY COERCION(ABSOLUTE, 895)","System.Title = '{0}' RANK BY COERCION(ABSOLUTE, 980)","CONTAINS(System.Title, '\"{0}*\"') RANK BY COERCION(ABSOLUTE, 875)","System.Music.DisplayArtist = '{0}' RANK BY COERCION(ABSOLUTE, 960)","CONTAINS(System.Music.DisplayArtist, '\"{0}*\"') RANK BY COERCION(ABSOLUTE, 855)","System.Music.Genre = '{0}' RANK BY COERCION(ABSOLUTE, 950)","CONTAINS(System.Music.Genre, '\"{0}*\"') RANK BY COERCION(ABSOLUTE, 845)","System.Keywords = '{0}' RANK BY COERCION(ABSOLUTE, 940)","CONTAINS(System.Keywords, '\"{0}*\"') RANK BY COERCION(ABSOLUTE, 835)",],lt=["System.Title","System.Music.DisplayArtist","System.Music.AlbumTitle","System.Music.Genre",],at=["System.ItemNameDisplay","System.Title","System.Music.AlbumTitle",],fr=["System.ItemNameDisplay = '{0}' RANK BY COERCION(ABSOLUTE, 999)","CONTAINS(System.ItemNameDisplay, '\"{0}*\"') RANK BY COERCION(ABSOLUTE, 895)","System.Title = '{0}' RANK BY COERCION(ABSOLUTE, 980)","CONTAINS(System.Title, '\"{0}*\"') RANK BY COERCION(ABSOLUTE, 875)","System.Music.AlbumTitle = '{0}' RANK BY COERCION(ABSOLUTE, 970)","CONTAINS(System.Music.AlbumTitle, '\"{0}*\"') RANK BY COERCION(ABSOLUTE, 865)","System.Music.DisplayArtist = '{0}' RANK BY COERCION(ABSOLUTE, 960)","CONTAINS(System.Music.DisplayArtist, '\"{0}*\"') RANK BY COERCION(ABSOLUTE, 855)","System.Music.Genre = '{0}' RANK BY COERCION(ABSOLUTE, 950)","CONTAINS(System.Music.Genre, '\"{0}*\"') RANK BY COERCION(ABSOLUTE, 845)",],er=["path = '{0}'"],f,s,dt;i.getStrategy=a;i.dataSourceSupported=or;i.suppress=sr;var w,vt,b=["Movie","RecordedTV","Video"],yt=b.concat(["Picture","Music"]),pt=["calendar","game","web history","feed","contact","task","journal","note","instantmessage"],k=pt.concat("program"),d=yt.concat(k).concat(["folder","link"]).map(function(n){return"'"+n+"'"}).join(",");i.initStrategies=g;i.generateIndexerQueryAsync=hr;i.generateIndexerQueryForMRUFilesAndFolders=cr;i.toBrowsingHistoryItem=ar;i.fixKind=vr;s={};s.MPHO=r(y,!1);s.MVID=r(p,!1);s.MDOC=r(l,!1);dt=function(){var n={};return n.Powerpoint="ppt",n.Word="doc",n.Excel="xls",n}()})(i=t.IndexerQueryGenerator||(t.IndexerQueryGenerator={}))})(t=n.WSB||(n.WSB={}))}(AutoSuggest||(AutoSuggest={})),function(n){var t;(function(t){function s(n,i,r,u,f,e,o){var s=u?r+" "+i:r;return t.Promise.safeChainWithGlobalCaching("getIcon",function(i){return n.getImageAsync(t.getImageSizeValue(i))},function(n){return n+"_"+i},function(n){return t.toIcon(n,"getIcon",e,o,s)},e,f?function(){return n.imageType===0}:null,s)}function i(n,i,r,u,f,e){return{deviceItem:n,getIcon:s(n,n.id,r,r&&!t.localDataSourceMayContainPII(r),t.displayedInGridLayout(i),u,f),icon:e?u:null,suggestionType:i}}function e(n,t,i){return{deviceItem:n,icon:i,suggestionType:t}}function r(t,i,r){switch(t){case"program":return"IBA";case"picture":return i&&n.contains(h,i.toLowerCase())?"FL":"LI";case"video":return i&&n.contains(c,i.toLowerCase())?"FL":"LV";case"movie":case"recordedtv":return"LV";case"music":return"MU";case"folder":return"FD";default:return r}}function o(i,r,u,f,e,o,s,h,c,l){var v=l&&s&&c?i.filter(function(t){return n.contains(Object.keys(g),t)}):[],a;v.length>0&&(i=i.filter(function(t){return!n.contains(v,t)}));a=function(n){for(var i,f,t=0,u=v;t<u.length;t++)i=u[t],f=g[i],n[i]={deviceItem:{id:i,displayName:l.getLocString(f.locStringKey),kind:null,getProperty:function(){return null},propertyHits:[],rankScore:1e3},icon:f.icon};r(n)};n.safeExecute(function(){var r,n,c,l,v;if(i.length==0)a({});else{if(r={},n=i.slice(0),h)for(c=i.length-1;c>=0;--c)l=i[c],h.hasOwnProperty(l)&&(r[l]=h[l],n.splice(c,1));n.length==0?a(r):(v=!s||t.localDataSourceMayContainPII(s)?s:s+" "+n,t.Promise.safeChain(u,function(){return f(n)},function(u){var o=t.Map.map(n,u,function(n){return e(n)}),f;if(h&&n.forEach(function(n){return h[n]=o[n]}),n.length!=i.length)for(f in r)r.hasOwnProperty(f)&&(o[f]=r[f]);a(o)},function(){return a({})},o,v))}},"resolveIdsWithCache",null,s,function(){return a({})})}function lt(n,t){if(!t.launchArguments||ct.test(n.query))return!0;var i=t.id.toLowerCase();return nt.some(function(n){return i.includes(n)})?!0:!1}function tt(n,i,r,u,f){if(!f)return!1;var o=n.displayName.toLocaleLowerCase(),e=i.queryToFetch.toLocaleLowerCase(),s=null;if(f.Parses&&f.Parses.length>0&&f.Parses[0].SubParses&&f.Parses[0].SubParses.length>1&&f.Parses[0].SubParses[0].Interpretation&&f.Parses[0].SubParses[0].Interpretation==="regex"&&e.length>=f.Parses[0].SubParses[0].QueryEnd&&f.Query!=null){if(e.length===f.Parses[0].SubParses[0].QueryEnd)return!0;e=e.substr(f.Parses[0].SubParses[0].QueryEnd+1);f.Query=f.Query.substr(f.Parses[0].SubParses[0].QueryEnd+1)}return e.length<t.config.filterCICandidatesPrefixLength&&!it(e,o)&&(s=t.matchesOnPropertyHH(o,e),!s)?!0:pt(o,e,n,r,u,f)?!0:!1}function pt(n,i,r,u,f,e){var o,s;return!i||!e||!e.MatchScore||!e.Parses||e.Parses.length==0||!e.Parses[0].Entities||e.Parses[0].Entities.length==0||!e.Query?!1:n.startsWith(i)&&i.length>=t.config.filterCICandidatesPrefixLength?!1:(o=e.Query,o.startsWith(i))?!1:(s=n.startsWith(o),!s)?!0:f.Counter>=t.config.maxCISpellCorrectionCandidates?!0:(f.Counter++,!1)}function it(n,t){var r,i;if(!!t&&t.length==0||(r=t.split(" "),n.length!=r.length))return!1;for(i=0;i<r.length;i++)if(r[i].length==0||r[i][0]!=n[i])return!1;return!0}function rt(n){var i=n.id.toLowerCase(),t;if(i.startsWith("http:")||i.startsWith("https:")||n.kind=="link"&&i.endsWith(".url"))return 1;if(i.startsWith("file:")||n.kind=="document")return 0;if(t=n.filePath,t&&(t=t.toLowerCase(),t!=i)){if(t.startsWith("http:")||t.startsWith("https:")||n.kind=="link"&&t.endsWith(".url"))return 1;if(t.startsWith("file:"))return 0}return 2}function ut(n,t){if(t.dataSource=="PP"){var i=rt(n);if(i==1)return"LURL";if(i==0)return"LDOC"}return t.getSuggestionType(n)}function ft(t){return t&&t.rawIndexResponse?n.safeExecute(function(){return JSON.parse(t.rawIndexResponse)},"parseConstraintIndexMetaData"):undefined}function et(i,r,u,f,e,o){var g,v,h,b,y,k,d,l,s,p,a,c;if(t.IndexerQueryGenerator&&t.IndexerQueryGenerator.suppress(r,i,f))return!0;if(t.isMobileCache)return!1;if(u=="PP")return(g=r.id,n.contains(at,g))?!0:(v=r,tt(v,i,!0,e,o))?!0:(h=r.kind,h&&(h=h.toLocaleLowerCase(),h!="program"&&h!="unknown"))?!0:f=="LRA"&&rt(v)!=2?!0:(b=v.extension,b&&b.toLowerCase()==".chm")?!0:!1;if(u!="LURL"&&r.kind=="link")return!0;if(t.isSetting(u))return tt(r,i,!1,e,o)?!0:!1;if(u=="EBH")return(y=r,k=y.url,n.olderThan2Weeks(y.dateVisited)||n.isBingSearchUrl(k))?!0:i.queryToFetch?i.isMultiWord?!1:n.getProtocol(i.fixedUrl||i.queryToFetch)==0&&n.contains(y.propertyHits,"System.Title")?!1:(d={},n.computeUrlMatchLengths(d,k,i.queryToFetch),!d.domainMatchLength):!1;if(t.isItemWithFileMetadata(u)){if((l=r,!t.IndexerQueryGenerator&&f=="MDOC"&&l.propertyHits.length==1&&l.propertyHits[0]=="System.Search.Contents"&&(!t.config.minLengthForContentMatch||i.queryToFetch.length<t.config.minLengthForContentMatch))||(s=l.id,s&&(s.includes("\\.")||s.includes("/.")||(s=s.toLowerCase(),i.queryToFetch.toLocaleLowerCase()!=r.displayName.toLocaleLowerCase()&&yt.some(function(n){return s.includes("\\"+n+"\\")||s.includes("/"+n+"/")}))))||(p=l.extension,p&&!i.queryToFetch.toLowerCase().includes(p.toLowerCase())&&n.contains(vt,p.toLowerCase())))return!0;if(u=="CG"){if(a=r,c=a.displayName.split(" ")[0].toLowerCase(),c.includes("\\")||c.indexOf(":")==1)return!1;var w=a.id.toLowerCase(),it=w.lastIndexOf("."),ut=w.lastIndexOf("\\"),ft=a.kind=="folder"||it<0||it<ut;if(ft&&!c.includes("%")||![".exe",".com"].some(function(n){return c.includes(n)})&&(st.some(function(n){return w.includes(n)})||!a.launchArguments&&nt.some(function(n){return w.includes(n)})||n.contains(ht,c)))return!0}return!1}return!1}var h,c,ot,u;t.getIcon=s;h=[".dwg",".ai",".psd"];c=[".ts"];t.getSuggestionTypeFromKindAndExtension=r;var l={getResultsContainer:function(n){return n.apps},dataSource:"PP",getSuggestionType:function(){return"PP"},maxUpTo3chars:4,maxAfter3chars:7,maxAfter8charsOrInL2ZeroInput:15,customCreateLocalResponseSuggestion:function(n,r,u){return i(n,r,u,t.ScopeConfig[t.Scope.Apps].icon,n.isImmersive?n.logoBackgroundColor:undefined)},supportsEmptyQuery:!0},a={getResultsContainer:function(n){return n.settings},dataSource:"ST",getSuggestionType:function(){return"ST"},maxUpTo3chars:4,maxAfter3chars:7,maxAfter8charsOrInL2ZeroInput:15,customCreateLocalResponseSuggestion:function(n,r,u){if(t.isModernSetting(n)){var f=n.glyph,o=f?{content:f,type:1}:t.ScopeConfig[t.Scope.Settings].icon;return e(n,r,o)}return i(n,r,u,t.ScopeConfig[t.Scope.Settings].icon)},supportsEmptyQuery:!1},v=[l,a,{getResultsContainer:function(n){return n.media},dataSource:"LM",getSuggestionType:function(n){return r(n.kind,n.extension,"FL")},maxUpTo3chars:7,maxAfter3chars:10,maxAfter8charsOrInL2ZeroInput:20,supportsEmptyQuery:!0},{getResultsContainer:function(n){return n.files},dataSource:"FL",getSuggestionType:function(n){return r(n.kind,n.extension,"FL")},maxUpTo3chars:7,maxAfter3chars:10,maxAfter8charsOrInL2ZeroInput:20,supportsEmptyQuery:!0},{getResultsContainer:function(n){return n.powerBi},dataSource:"PBI",getSuggestionType:function(){return"PBI"},maxUpTo3chars:4,maxAfter3chars:7,maxAfter8charsOrInL2ZeroInput:15,customCreateLocalResponseSuggestion:function(n,t){return e(n,t,{content:"&#xEA1E",type:2})},supportsEmptyQuery:!1},{getResultsContainer:function(n){return n.browsingHistory},dataSource:"EBH",getSuggestionType:function(){return"EBH"},maxUpTo3chars:4,maxAfter3chars:7,maxAfter8charsOrInL2ZeroInput:15,customCreateLocalResponseSuggestion:function(n,t){return e(n,t,null)},supportsEmptyQuery:!0},{getResultsContainer:function(){throw Error("Only supported via IndexerQuery");},dataSource:"IBA",getSuggestionType:function(){return"IBA"},maxUpTo3chars:4,maxAfter3chars:7,maxAfter8charsOrInL2ZeroInput:15,customCreateLocalResponseSuggestion:function(n,r,u){return i(n,r,u,t.ScopeConfig[t.Scope.Apps].icon)},supportsEmptyQuery:!1},{getResultsContainer:function(){throw Error("Only supported via IndexerQuery");},dataSource:"IFF",getSuggestionType:function(n){return r(n.kind,n.extension,"FL")},maxUpTo3chars:7,maxAfter3chars:15,maxAfter8charsOrInL2ZeroInput:25,supportsEmptyQuery:!0},],y=[{getResultsContainer:function(n){return n.files},dataSource:"MDOC",getSuggestionType:function(n){return r(n.kind,n.extension,"FL")},maxUpTo3chars:4,maxAfter3chars:7,maxAfter8charsOrInL2ZeroInput:15,customCreateLocalResponseSuggestion:function(n,r,u){return i(n,r,u,t.ScopeConfig[t.Scope.Documents].icon,null,!0)},supportsEmptyQuery:!1},{getResultsContainer:function(n){return n.folders},dataSource:"MFOL",getSuggestionType:function(n){return r(n.kind,n.extension,"FD")},maxUpTo3chars:4,maxAfter3chars:7,maxAfter8charsOrInL2ZeroInput:15,customCreateLocalResponseSuggestion:function(n,r,u){return i(n,r,u,t.ScopeConfig[t.Scope.Folders].icon,null,!0)},supportsEmptyQuery:!1},{getResultsContainer:function(n){return n.pictures},dataSource:"MPHO",getSuggestionType:function(n){return r(n.kind,n.extension,"LI")},maxUpTo3chars:4,maxAfter3chars:7,maxAfter8charsOrInL2ZeroInput:15,customCreateLocalResponseSuggestion:function(n,r,u){return i(n,r,u,t.ScopeConfig[t.Scope.Photos].icon,null,!0)},supportsEmptyQuery:!1},{getResultsContainer:function(n){return n.video},dataSource:"MVID",getSuggestionType:function(n){return r(n.kind,n.extension,"LV")},maxUpTo3chars:4,maxAfter3chars:7,maxAfter8charsOrInL2ZeroInput:15,customCreateLocalResponseSuggestion:function(n,r,u){return i(n,r,u,t.ScopeConfig[t.Scope.Videos].icon,null,!0)},supportsEmptyQuery:!1},{getResultsContainer:function(n){return n.music},dataSource:"MMUS",getSuggestionType:function(){return"MU"},maxUpTo3chars:4,maxAfter3chars:7,maxAfter8charsOrInL2ZeroInput:15,customCreateLocalResponseSuggestion:function(n,r,u){return i(n,r,u,t.ScopeConfig[t.Scope.Music].icon,null,!0)},supportsEmptyQuery:!1},],p=[{getResultsContainer:function(n){return SearchAppWrapper.CortanaApp.queryFormulationView.startPathCompletionQuery(n.originalQuery,"")},dataSource:"PT",getSuggestionType:function(){return"PT"},maxUpTo3chars:15,maxAfter3chars:15,maxAfter8charsOrInL2ZeroInput:15,customCancellation:function(){return SearchAppWrapper.CortanaApp.queryFormulationView.cancelLastPathCompletionQuery()},supportsEmptyQuery:!1},{getResultsContainer:function(){return SearchAppWrapper.CortanaApp.queryFormulationView.deviceSearch.getRecentAppsAsync()},getResults:function(n){return n},dataSource:"LRA",getSuggestionType:function(){return"PP"},maxUpTo3chars:undefined,maxAfter3chars:undefined,maxAfter8charsOrInL2ZeroInput:undefined,customCreateLocalResponseSuggestion:function(n,r,u){return i(n,r,u,t.ScopeConfig[t.Scope.Apps].icon,n.isImmersive?n.logoBackgroundColor:undefined)},supportsEmptyQuery:!0}],w=[{getResultsContainer:function(n){return SearchAppWrapper.CortanaApp.queryFormulationView.startCommandLineQuery(n.originalQuery,"")},dataSource:"CG",getSuggestionType:function(){return"CG"},customCancellation:function(){return SearchAppWrapper.CortanaApp.queryFormulationView.cancelLastCommandLineQuery()},supportsEmptyQuery:!1},];t.LocalDataProviderDataSources=v.concat(y).concat(p).concat(w).map(function(n){return n.dataSource});var f={suggestions:[],maxedOut:!1},b={},k={},d={},g={"shell:RecycleBinFolder":{icon:{content:"&#xEF87",type:2},locStringKey:"RecycleBin"}};var st=["\\system32\\user.exe","\\system32\\sidebar.exe","\\system32\\at.exe","\\system32\\change.exe","\\system32\\control.exe","\\system32\\find.exe","\\system32\\net.exe","\\system32\\share.exe","\\system32\\rundll32.exe","\\system32\\append.exe","\\system32\\choice.exe","\\system32\\clip.exe","\\system32\\comp.exe","\\system32\\compact.exe","\\system32\\consent.exe","\\system32\\convert.exe","\\system32\\format.exe","\\system32\\graphics.com","\\system32\\label.exe","\\system32\\mem.exe","\\system32\\mode.com","\\system32\\more.com","\\system32\\recover.exe","\\system32\\replace.exe","\\system32\\reset.exe","\\system32\\shadow.exe","\\system32\\sort.exe","\\system32\\tree.com","\\system32\\webcam.exe","\\system32\\systemsettings.exe","\\system32\\command.com","\\system32\\tabtip.exe","\\system32\\services.exe","\\system32\\help.exe","\\system32\\where.exe","\\system32\\skydrive.exe","\\system32\\calc.exe","\\system32\\fc.exe","\\accessories\\wordpad.exe",],nt=["\\system32\\finger.exe","\\system32\\ping.exe","\\system32\\print.exe","\\system32\\shutdown.exe","\\system32\\expand.exe","\\system32\\tskill.exe","\\system32\\reg.exe","\\system32\\sc.exe",],ht=["uninstall","outlook","excel","skype","nero","onenote","lync","vmware","firefox","itunes","photoshop","print","opera","visio","thunderbird","smartscreen"],ct=/[\/\.\-\\]/;t.isRealCommand=lt;var at=["Microsoft.Cortana_8wekyb3d8bbwe!CortanaUI","Microsoft.Windows.Cortana_cw5n1h2txyewy!CortanaUI",],vt=[".dll",".pdb",".obj",".bin",".etl",".bak",".config",".resx",".manifest",".ini",".searchconnector-ms",".settingcontent-ms",".vstx",".vssx",".ms-one-stub",],yt=["visio content","bin","debug","obj","objd","amd64","x86","microsoftedgebackups",];t.isInitials=it;t.getSuggestionTypeOverride=ut;t.parseConstraintIndexMetaData=ft;t.isSuppressed=et;ot=function(){function e(n,t){this._previousKeystrokeCache=n;t.bindAppHidden(function(){b={};k={};d={}})}return e.prototype.getName=function(){return"LocalDataProvider"},e.prototype.fetch=function(i,r,f,e,o){var it=this,h,c,rt,a,ut,s,b,k,ft,d,st,ht,g,et,nt,ct,lt,tt,ot,l;if(e&&e.register(function(){return t.Promise.clearPendingItemsFromCache()},!1,"clearPendingItemsFromCache"),h=[],c=v.filter(function(t){return n.isDataSourceEnabled(t.dataSource,i)}),t.IndexerQueryGenerator&&(h=h.concat(c.filter(function(n){return t.IndexerQueryGenerator.dataSourceSupported(n.dataSource)})),c=c.filter(function(n){return!t.IndexerQueryGenerator.dataSourceSupported(n.dataSource)})),c.length>0){if(!i.queryToFetch&&!c.every(function(n){return n.supportsEmptyQuery}))throw new Error(u);if(e&&e.register(function(){return SearchAppWrapper.CortanaApp.queryFormulationView.cancelLastDeviceQuery()},!1,"cancelLastDeviceQuery"),rt=n.safeExecute(function(){return SearchAppWrapper.CortanaApp.queryFormulationView.startDeviceQuery(i.queryToFetch)},"startDeviceQuery",null,i.queryToFetch),rt)for(a=0,ut=c;a<ut.length;a++)l=ut[a],this.searchFolderWithMultipleResults(i,l,rt,r,o,e);else this.emptyFetch(c,r)}if(s=y.filter(function(t){return n.isDataSourceEnabled(t.dataSource,i)}),t.IndexerQueryGenerator&&(h=h.concat(s.filter(function(n){return t.IndexerQueryGenerator.dataSourceSupported(n.dataSource)})),s=s.filter(function(n){return!t.IndexerQueryGenerator.dataSourceSupported(n.dataSource)})),s.length>0){if(!i.queryToFetch&&!s.every(function(n){return n.supportsEmptyQuery}))throw new Error(u);b=i.taskFrame?i.taskFrame.raw:"";t.Promise.safeChain("executeSearchAsync",function(){return SearchAppWrapper.CortanaApp.searchResultsView.executeSearchAsync(i.queryToFetch,b)},function(n){var t,u,f;if(o())if(n)for(t=0,u=s;t<u.length;t++)f=u[t],it.searchFolderWithMultipleResults(i,f,n,r,o,e);else it.emptyFetch(s,r)},function(){return it.emptyFetch(s,r)},null,b?i.queryToFetch+"\n"+b:i.queryToFetch)}if(h.length>0){if(!i.queryToFetch&&!h.every(function(n){return n.supportsEmptyQuery}))throw new Error(u);for(k=0,ft=h;k<ft.length;k++)l=ft[k],this.searchFolderWithMultipleResults(i,l,null,r,o,e)}if(d=p.filter(function(t){return n.isDataSourceEnabled(t.dataSource,i)}),d.length>0){if(!i.queryToFetch&&!d.every(function(n){return n.supportsEmptyQuery}))throw new Error(u);for(st=function(n){e&&n.customCancellation&&e.register(function(){return n.customCancellation()},!0,n.dataSource+" cancellation");ht.searchFolderWithMultipleResults(i,n,i,r,o,e)},ht=this,g=0,et=d;g<et.length;g++)l=et[g],st(l)}if(nt=w.filter(function(t){return n.isDataSourceEnabled(t.dataSource,i)}),nt.length>0){if(!i.queryToFetch&&!nt.every(function(n){return n.supportsEmptyQuery}))throw new Error(u);for(ct=function(n){e&&n.customCancellation&&e.register(function(){return n.customCancellation()},!0,n.dataSource+" cancellation");lt.searchFolderWithSingleResult(i,n,i,r,o)},lt=this,tt=0,ot=nt;tt<ot.length;tt++)l=ot[tt],ct(l)}i.taskFrame&&n.safeExecute(function(){return SearchAppWrapper.CortanaApp.searchResultsView.setTaskFrame(i.originalQuery,"")},"reset task frame")},e.prototype.emptyFetch=function(n,t){for(var u,i=0,r=n;i<r.length;i++)u=r[i],this.logProviderFailure(u.dataSource),t(u.dataSource,f,e.getDataSourceState(0))},e.prototype.getMax=function(n,i){return n.scope!=t.Scope.All?n.queryToFetch?i.maxAfter8charsOrInL2ZeroInput*2:i.maxAfter8charsOrInL2ZeroInput:n.queryToFetch.length>8?i.maxAfter8charsOrInL2ZeroInput:n.queryToFetch.length>3?i.maxAfter3chars:i.maxUpTo3chars},e.prototype.toLocalResponse=function(n,r,u,f,e){var l,a,c,v,h;e&&(a=f,a.getGroupDisplayName&&(l=a.getGroupDisplayName(e)));var w={Counter:0},p=[],b=u.length<n;for(c=0,v=u;c<v.length;c++){var o=v[c],s=ut(o,f),y=t.isApp(s)||t.isSetting(s)?ft(o):undefined;et(r,o,s,f.dataSource,w,y)||(h=void 0,h=f.customCreateLocalResponseSuggestion?f.customCreateLocalResponseSuggestion(o,s,f.dataSource):i(o,s,f.dataSource),l&&(h.groupDisplayName=l),y&&(h.ciMetaData=y),p.push(h))}return{suggestions:p,maxedOut:b}},e.prototype.getResults=function(n,t,i,r){if(r.getResults)return r.getResults(i);var u=i,f=u.getItemsAsyncWithSpeller,e=this.enableSpellCorrection(n);return f?u.getItemsAsyncWithSpeller(0,t,e):i.getItemsAsync(0,t)},e.prototype.enableSpellCorrection=function(n){return n.queryToFetch.length>=t.config.enableCISpellerAtPrefixLength&&this._previousKeystrokeCache&&this._previousKeystrokeCache.enableCISpeller(n.queryToFetch)?!0:!1},e.prototype.searchFolderWithMultipleResults=function(i,r,u,o,s,h){var v=this,c=r.dataSource,y=this.getMax(i,r),l=!u,p,a;if(l)p=function(){return t.IndexerQueryGenerator.generateIndexerQueryAsync(i,y,c).then(function(n){return SearchAppWrapper.CortanaApp.queryFormulationView.deviceSearch.queryWindowsSearchIndexerAsync(n)})};else{if(a=n.safeExecute(function(){return r.getResultsContainer(u)},"getResultsContainer "+c),!a){o(c,f,null);return}p=function(){return v.getResults(i,y,a,r)}}t.Promise.safeChain(l?"queryWindowsSearchIndexerAsync":"getItemsAsync",p,function(n){var u,f,h;s()&&(u=n.resultSet,f=void 0,u?f=n.state:u=n,l&&(c=="EBH"?u=u.map(function(n){return t.IndexerQueryGenerator.toBrowsingHistoryItem(n)}):t.supportsShortcuts(c,i)&&(u=u.map(function(n){return t.IndexerQueryGenerator.fixKind(n)}))),h=e.getDataSourceState(f),o(c,v.toLocalResponse(y,i,u,r,a),h))},function(t){n.isCancellation(t)||v.logProviderFailure(c);o(c,f,null)},l?h:null,c+" "+i.queryToFetch)},e.prototype.searchFolderWithSingleResult=function(i,r,u,e,o){var h=this,s=r.dataSource,c=n.safeExecute(function(){return r.getResultsContainer(u)},"getResultsContainer "+s);c?t.Promise.safeChain("tryGetResultAsync "+s,function(){return c.tryGetResultAsync()},function(n){o()&&e(s,h.toLocalResponse(1,i,n?[n]:[],r,null),null)},function(t){n.isCancellation(t)||h.logProviderFailure(s);e(s,f,null)},null,i.queryToFetch):e(s,f,null)},e.prototype.logProviderFailure=function(i){var r=t.providerFailureLogName(i);r&&SearchAppWrapper.CortanaApp.queryFormulationView.logProviderFailure&&n.safeExecute(function(){return SearchAppWrapper.CortanaApp.queryFormulationView.logProviderFailure(r,"ErrorForTopHit")},"logProviderFailure")},e.getDataSourceState=function(n){switch(n){case 0:return"UN";case 1:return"NI";case 2:return"PI"}return undefined},e.getApps=function(n,i,r,u,f){o(n,i,"findAppsAsync",function(n){return SearchAppWrapper.CortanaApp.queryFormulationView.deviceSearch.findAppsAsync(n)},function(n){return l.customCreateLocalResponseSuggestion(n,null,u)},r,u,t.config.cacheAppItems?b:null,!0,f)},e.getSettings=function(n,i,r,u,f){o(n,i,"findSettingsAsync",function(n){return SearchAppWrapper.CortanaApp.queryFormulationView.deviceSearch.findSettingsAsync(n)},function(n){return a.customCreateLocalResponseSuggestion(n,null,u)},r,u,t.config.cacheSettingItems&&!f?k:null)},e.getFiles=function(n,u,f,e,s){o(n,u,"findFilesAsync",function(n){if(t.IndexerQueryGenerator){var i=t.IndexerQueryGenerator.generateIndexerQueryForMRUFilesAndFolders(f,"MFF",n);return SearchAppWrapper.CortanaApp.queryFormulationView.deviceSearch.queryWindowsSearchIndexerAsync(i).then(function(n){for(var i,r={},t=0,u=n.resultSet;t<u.length;t++)i=u[t],r[i.id]=i;return r})}return SearchAppWrapper.CortanaApp.queryFormulationView.deviceSearch.findFilesAsync(n)},function(n){return i(n,r(n.kind,n.extension,"FL"),s)},e,s,d)},e.launchIndexingOptions=function(n,i){var r=this;e.getSettings([t.IndexingOptionsSettingId],function(u){var f=u[t.IndexingOptionsSettingId];f?n.launchDeviceItem(f.deviceItem,"ST"):i||r.launchIndexingOptions(n,!0)},null,null,!0)},e}();t.LocalDataProvider=ot;u="Local provider doesn't support empty query"})(t=n.WSB||(n.WSB={}))}(AutoSuggest||(AutoSuggest={})),function(n){var t;(function(t){function w(n){return typeof n.type=="number"}var f="showScopesL2",u="block",e="none",r,h="UpsellDismissed",o="OptInCardDisplayed",c="DismissCardDisplayed",s="OptErrorCardsDismissed",l="filtersButton",a="moreButton",v="feedbackButton",y="optionsButton",i,p;(function(t){function f(n,t,i){u.push({Name:n,Status:t,Callback:i})}function e(n,t){for(var f=[],i=2;i<arguments.length;i++)f[i-2]=arguments[i];r.setItem(n,t);u.forEach(function(i){i.Name==n&&i.Status==t&&i.Callback.apply(i,f)})}function o(n){var t=r.getItem(n);return t?i[t]:i.Unknown}var i,r,u;(function(n){n.OptedIn="OptedIn";n.OptedOut="OptedOut";n.Unknown="Unknown";n.Unavailable="Unavailable"})(i=t.FeatureStatus||(t.FeatureStatus={}));r=new n.LightweightStorage;u=[];t.onOptInStatus=f;t.setOptInStatus=e;t.getOptInStatus=o})(i=t.OptionalFeatures||(t.OptionalFeatures={}));p=function(){function p(n,f,p,w,b){var k=this,d;if(this._host=n,this._page=f,this._instHelper=p,this._sequenceNumberReader=w,this._storage=b,this._filtersButton={id:l,selected:!1},this._moreButton={id:a,selected:!1},this._feedbackButton={id:v,selected:!1},this._optionsButton={id:y,selected:!1},this._topHitPresent=!1,this._resultsPresent=!1,this._currentScopeTileIndex=-1,this._onL2TransitionEndHandlers=[],this._upsellGotDismissed=b.getItem(h)=="1",r=SearchAppWrapper.CortanaApp,this._optInPromptError=!1,this._firstKSForCardShown=!1,t.config.immersiveSearchOptInSupported){this._optInCardDisplayed=b.getItem(o)=="1";this._optOutCardDisplayed=b.getItem(c)=="1";this._dismissCardDisplayed=b.getItem(s)=="1";i.onOptInStatus("ImmersiveSearch",i.FeatureStatus.OptedIn,function(n){return k.onImmersiveSearchOptIn(n)});i.onOptInStatus("ImmersiveSearch",i.FeatureStatus.OptedOut,function(n){return k.onImmersiveSearchOptOut(n)})}else this._optInCardDisplayed=!0,this._optOutCardDisplayed=!0,this._dismissCardDisplayed=!0;(this._rootElement=_ge("root"),this._topHitHeaderElement=_ge("topHitHeader"),this._searchScopesL2Element=_ge("searchScopesL2"),this._suggestionsList=_ge("suggestionsList"),t.config.scopesOrderBegin.length!=0)&&(n.bindAppHidden(function(){k._scopeTiles=null;k._effectiveScopeOrder=null}),t.config.searchBoxFocusEvents?(n.bindSearchBoxLostFocus(function(){k.isScopesL2Visible()&&k.select(null,!1)}),n.bindSearchBoxGotFocus(function(){k.isScopesL2Visible()&&k.select(k._selectedL2Item?k._selectedL2Item:k.getTopItemForSelection(),!1)})):(d=r.searchBox,d.addEventListener("keydown",function(n){k.isScopesL2Visible()&&n.keyCode==9&&k.getSelectedItem()&&k.select(null,!1)}),sj_be(_w,"keydown",function(n){k.isScopesL2Visible()&&n.keyCode==9&&k.getSelectedItem()&&k.select(null,!1)}),sj_be(_w,"focus",function(){k.isScopesL2Visible()&&!k.getSelectedItem()&&k.select(k._selectedL2Item?k._selectedL2Item:k.getTopItemForSelection(),!1)})),n.bindQueryChangedOrInitialized(function(n){k.isScopesL2Visible()&&(!k._currentQuery||k._currentQuery.originalQuery!=n.originalQuery)&&k.hideL2(!0);k._currentScopeTileIndex=-1}),n.bindDismissed(function(){k._advancedOptionsBottom=null;k._advancedOptionsTop=null;k.hideL2(!1);k._currentScopeTileIndex=-1}),this._rootElement.addEventListener("transitionend",function(n){(k.isScopesL2Visible()&&k._searchScopesL2Element.style.display==e&&(k._searchScopesL2Element.style.display=u),n.target==k._searchScopesL2Element)&&k.finalizeL2Transition()}),n.bindButtonRightOfSearchBoxClick(function(i){i==""||i==""||t.qfMode==2?(n.reformulate(""),k.setFocusInSearchBox("clear search box"),p.logClientInstEvent("Select","ClearSearchBox",null)):i==""&&(k.isScopesL2Visible()?k.closeScopesL2("ButtonRightOfSearchBox"):k.navigateScopesL2("ButtonRightOfSearchBox"))}),this._substrateUpsellDismiss={action:function(){k._upsellGotDismissed=!0;b.setItem(h,"1");k.isScopesL2Visible()?k.navigateScopesL2("DismissUpsell"):n.refreshCurrentPane()},icon:{content:"&#xE711",type:2}},this._optInDismiss={action:function(){k._dismissCardDisplayed=!0;b.setItem(s,"1");k.reloadOptInAdvancedOptions()},icon:{content:"&#xE711",type:2}})}return p.prototype.bindOnL2TransitionEnd=function(n){this._onL2TransitionEndHandlers.push(n)},p.prototype.getTopItemForSelection=function(){return this._advancedOptionsTop&&this._advancedOptionsTop.length?this._advancedOptionsTop[0]:this._scopeTilesL2[0]},p.prototype.finalizeL2Transition=function(){var n=this.isScopesL2Visible(),t;this._searchScopesL2Element.style.display=n?u:e;t=this._searchScopesL2Element.getElementsByClassName("searchByCat")[0];t&&(t.getElementsByTagName("a")[0].tabIndex=n?1:-1);this._topHitHeaderElement.style.display=n?e:u;this._suggestionsList.style.display=n?e:u;n||(this._advancedOptionsTop=[],this._advancedOptionsBottom=[],this.select(null,!1));this._onL2TransitionEndHandlers.forEach(function(n){return n()})},p.prototype.focusNextScopeTile=function(n,t){var r=this.isScopesL2Visible()?this._searchScopesL2Element:this._topHitHeaderElement,i=[].slice.call(r.getElementsByClassName("scopeTile"));this._currentScopeTileIndex=i.indexOf(n);t?this._currentScopeTileIndex!=i.length-1&&++this._currentScopeTileIndex:this._currentScopeTileIndex>0&&--this._currentScopeTileIndex;i.forEach(function(n){return n.tabIndex=-1});i[this._currentScopeTileIndex].tabIndex=1;i[this._currentScopeTileIndex].focus()},p.prototype.handleOptInOutNavigation=function(n,t){if(!this.isScopesL2Visible()){var i;n.id==="optInYesBtn"&&t?i=_ge("optInNoBtn"):n.id!=="optInNoBtn"||t||(i=_ge("optInYesBtn"));i&&i.focus()}},p.prototype.render=function(n,i,r,u,f){if(this._currentQuery=n,n&&(n.fullPartialQuery||t.zeroInputAvailable)){var e=t.getEffectiveScope(n);this.innerRender(n.scope,e,n,i,r,u,f)}else this.cleanUp()},p.prototype.getScopeToolTip=function(n,i){var u=t.ScopeConfig[n],f=t.getScopeDisplayName(u,this._host),r;if(i){if(n==t.Scope.All)return null;r="RemovingScopeNarratorText2"}else r=n==t.Scope.All?"AddingScopeNarratorTextAll2":"AddingScopeNarratorText";return this._host.getLocString(r,f.toLocaleLowerCase())},p.prototype.getScopeDescription=function(n){var t=this.getSources(n);return t?t.join(this._host.getLocString("Comma")+" "):null},p.prototype.getSources=function(i){var r,u,f;switch(i){case t.Scope.All:return r=[this._host.getLocString("MostRelevantOnThisPC")],n.isBingEnabled()&&r.push(t.getScopeDisplayName(t.ScopeConfig[t.Scope.Web],this._host)),u=t.getAccountTypeForCloudContent(),u!=3&&u!=0&&t.isCloudSearchEnabledCache&&t.substrateProvidersEnabled()&&r.push(this._host.getLocString("CloudServices")),r;case t.Scope.Apps:return n.isBingEnabled()?[this._host.getLocString("Installed"),this._host.getLocString("StoreGroup")]:[this._host.getLocString("Installed")];case t.Scope.Emails:case t.Scope.People:return[this._host.getLocString(t.getAccountTypeForCloudContent()==2?"Personal":"WorkOrSchool")];case t.Scope.Settings:return[this._host.getLocString("SystemSettingsAnnotation"),this._host.getLocString("ControlPanelAnnotation")];case t.Scope.Web:return n.isBingEnabled()?(r=[t.getWebSuggestionsGroupHeader(this._host),t.getWebsitesGroupHeader(this._host),this._host.getLocString("Answers")],t.getAccountTypeForCloudContent()==1&&t.isCloudSearchEnabledCache&&t.bingAtWorkProviderEnabled()&&r.push(this._host.getLocString("Bookmarks"))):r=[],t.edgeBrowsingHistoryAvailable()&&r.push(this._host.getLocString("EdgeHistoryGroup")),r;default:return t.isFileOrFolderScope(i)?(r=[t.getGroupSourceDisplayName(1,this._host)],t.isCloudSearchEnabledCache&&(n.isBingEnabled()&&(t.substrateProvidersEnabled()?t.getAccountTypeForCloudContent()==2&&r.push(t.getGroupSourceDisplayName(2,this._host)):(f=t.isCortanaPersonalized?t.cortanaAccountType:t.windowsAccountType,f!=1&&r.push(t.getGroupSourceDisplayName(2,this._host)))),i==t.Scope.Documents&&t.getAccountTypeForCloudContent()==1&&t.substrateProvidersEnabled()&&r.push(t.getGroupSourceDisplayName(3,this._host),t.getGroupSourceDisplayName(4,this._host))),r):null}},p.prototype.selectScope=function(n){var r,i,u,t;for(this._selectedScope&&(this._selectedScope.tabindex=-1,this._selectedScope.narratorText=this.getScopeToolTip(this._selectedScope.type,!1)),r=!1,i=0,u=this._scopeTiles;i<u.length;i++)t=u[i],t.selected=t.type==n,t.selected&&(r=!0,t.tabindex=1,this._selectedScope=t,t.narratorText=this.getScopeToolTip(n,!0));r||(this._selectedScope=null)},p.prototype.innerRender=function(n,i,r,u,f,e,o){var w=this,s,v,b,p;if(this._topHitPresent=u,this._resultsPresent=f,t.scopesAvailable&&(!this._scopeTiles||t.scopeListRequiresUpdate)&&this.init(),this._scopeTiles&&this.selectScope(n),t.qfMode==3)if(f)s=this.getAdvancedOptions(this._sequenceNumberReader.getSequenceNumber(),3)[0],v=s&&s.click,this._page.renderTabShellFooter(2,v);else if(b=r&&!r.queryToFetch&&!e,b){var s=!this._upsellGotDismissed&&this.getAdvancedOptions(this._sequenceNumberReader.getSequenceNumber(),3)[0],v=s&&s.click,d=s&&this._substrateUpsellDismiss.action;this._page.renderTabShellFooter(1,v,d)}else this._page.renderTabShellFooter(0);else{var c=t.ScopeConfig[i],k=r.showProgressBar?o:!e,l=!r||!r.queryToFetch,a=!f&&(k||l)?this.getEmptyQueryMessage(l,i,c):"",y=k||l||f||!this._lastRenderedTopHitHeader||t.uses3lineTemplate(i)?this.getHeaderText(i,c):this._lastRenderedTopHitHeader.headerText,g=i!=t.Scope.All||!l||t.zeroInputAvailable,h=c.showUpsellOnSuggestionsList&&c.showUpsellOnSuggestionsList()?this.getAdvancedOptions(this._sequenceNumberReader.getSequenceNumber(),0):[];if(this.getAdvancedOptionsForImmersive(h),t.alwaysWide&&(h=h.concat(this.getAdvancedOptions(this._sequenceNumberReader.getSequenceNumber(),4))),this._lastRenderedTopHitHeader&&this._lastRenderedTopHitHeader.scope==n&&this._lastRenderedTopHitHeader.message==a&&this._lastRenderedTopHitHeader.headerText==y&&this._lastRenderedTopHitHeader.advancedOptions==h)return;this._lastRenderedTopHitHeader={scope:n,headerText:y,message:a,advancedOptions:h};p=this.getScopeBarElements();this._page.updateTopHitHeaderView(g,y,a,a?c.icon:null,p,this.getHiddenScopeElements(p),function(){return w.navigateScopesL2("ScopesMore")},function(){return w.showFeedback()},h)}},p.prototype.cleanUp=function(){t.qfMode==3?this._page.renderTabShellFooter(0):(this._lastRenderedTopHitHeader=null,this._page.updateTopHitHeaderView(!1,null,null,null,null,null,null,null,null))},p.prototype.setImmersiveSearchOptStatus=function(n,t){var i=this,u={Source:n,ExpId:r.experienceId,OptIn:t.toString()};n==="OC"&&(u.CardDismissed="0");t?r.enableCenterScreenAndRelaunch?(r.enableCenterScreenAndRelaunch(!1),r.addEventListener("experiencelaunched",function(){i._storage.getItem(o)!="1"&&r.experienceId!="CenterScreen"&&(i._optInPromptError=!0)}),this.ForceRerender()):this._optInPromptError=!0:(r.disableCenterScreenAndRelaunch(),this.ForceRerender());this._instHelper.logClientInstEvent("ClientInst","OptInImmersiveSearch",this._sequenceNumberReader.getSequenceNumber(),u)},p.prototype.ForceRerender=function(){var n=this,t;this._dismissCardDisplayed&&this._storage.setItem(s,"1");t=this._currentQuery.queryToFetch;sb_st(function(){n._host.reloadWebView(!1);n._host.updateQueryWithoutRefetching(t)},100)},p.prototype.getAdvancedOptionsForImmersive=function(n){var o=this,u,f,e;t.config.immersiveSearchOptInSupported&&t.qfMode!=2&&(this._optInCardDisplayed||this._optOutCardDisplayed||(this._firstKSForCardShown||(this._firstKSForCardShown=!0,u={CardShown:"1",ExpId:r.experienceId},this._instHelper.logClientInstEvent("ClientInst","OptInImmersiveSearch",this._sequenceNumberReader.getSequenceNumber(),u)),f=function(){i.setOptInStatus("ImmersiveSearch",i.FeatureStatus.OptedIn,"OptInOutCard")},e=function(){o.markOptOutCardDisplayed("OptInOutCard")},n.push({id:"advancedOption05",selected:!1,title:null,heading:this._host.getLocString("OptInText"),text:null,instItem:null,click:null,layout:3,dismiss:null,icon:{type:6,needsAccentColor:!0},description:[this._host.getLocString("LearnMoreLine1"),this._host.getLocString("LearnMoreLine2")].join(" "),yesBtn:{text:this._host.getLocString("YesBtnText"),instItem:null,click:f},noBtn:{text:this._host.getLocString("NoBtnText"),instItem:null,click:e}})),!this._dismissCardDisplayed&&this._optInCardDisplayed&&this._optInPromptError&&(this._dismissCardDisplayed=!0,n.push({id:"advancedOption06",selected:!1,title:null,heading:this._host.getLocString("OptErrorText",this._host.getLocString("OptInButtonText")),text:null,instItem:null,click:null,layout:2,dismiss:this._optInDismiss,icon:{type:6,needsAccentColor:!0}})),!this._dismissCardDisplayed&&this._optOutCardDisplayed&&(this._dismissCardDisplayed=!0,n.push({id:"advancedOption07",selected:!1,title:null,heading:this._host.getLocString("OptOutText",this._host.getLocString("OptInButtonText")),text:null,instItem:null,click:null,layout:2,dismiss:this._optInDismiss,icon:{type:6,needsAccentColor:!0}})))},p.prototype.reloadOptInAdvancedOptions=function(){var n=[];this.getAdvancedOptionsForImmersive(n);this._page.updateOptInAdvancedOptions(n)},p.prototype.onImmersiveSearchOptOut=function(n){this.setImmersiveSearchOptStatus(n,!1)},p.prototype.onImmersiveSearchOptIn=function(n){this._optInCardDisplayed=!0;this.setImmersiveSearchOptStatus(n,!0);this._storage.setItem(o,"1");this.reloadOptInAdvancedOptions()},p.prototype.markOptOutCardDisplayed=function(n){this._optOutCardDisplayed=!0;this._storage.setItem(c,"1");var t={Source:n,CardDismissed:"1",ExpId:r.experienceId};this._instHelper.logClientInstEvent("ClientInst","OptInImmersiveSearch",this._sequenceNumberReader.getSequenceNumber(),t);this.reloadOptInAdvancedOptions()},p.prototype.scopeNamesElements=function(n){var i=this;return n.map(function(n){return i._scopeTiles.find(function(i){return t.Scope[i.type]==n})}).filter(function(n){return!!n})},p.prototype.getEffectiveScopeOrder=function(){var i,r,u,n,f;return this._scopeTiles.length==0?[]:this._effectiveScopeOrder?this._effectiveScopeOrder.slice(0):(t.alwaysWide?(i=t.config.scopesOrderBeginAlwaysWide,r=t.config.scopesOrderLastAlwaysWide,u=t.config.numberOfScopesToRenderAlwaysWide):(i=t.config.scopesOrderBegin,r=t.config.scopesOrderLast,u=t.config.numberOfScopesToRender),n=[],i&&(f=r?this.scopeNamesElements(r):[],n=this.scopeNamesElements(i),n=n.slice(0,u-f.length),n.push.apply(n,f)),this._effectiveScopeOrder=n,n.slice(0))},p.prototype.getHiddenScopeElements=function(n){return this._scopeTilesL2?this._scopeTilesL2.filter(function(t){return n.find(function(n){return n.type==t.type})==undefined}):[]},p.prototype.getScopeBarElements=function(){var r=this,n,t,i;return this._scopeTiles?(n=this.getEffectiveScopeOrder(),t=n.some(function(n){return n.selected}),t||(this._selectedScope?(i=this._scopeTiles.find(function(n){return n.type==r._selectedScope.type}),n.push(i),t=!0):n[0].tabindex=1),t&&!n[0].selected&&(n[0].tabindex=-1),n):[]},p.prototype.navigateScopesL2=function(n){var i,r;t.scopeListRequiresUpdate&&this.init();this._page.ensureWebViewExpanded();i=this._sequenceNumberReader.getSequenceNumber();this._advancedOptionsBottom=this.getAdvancedOptions(i,1);this._advancedOptionsTop=this.getAdvancedOptions(i,2);this.select(this._selectedScope?this._selectedScope:this.getTopItemForSelection(),!1);this.showL2();this._host.setFocusInSearchBox(n);r={Source:n};this._instHelper.logClientInstEvent("Select","ScopesL2Opened",null,r)},p.prototype.showFeedback=function(){if(this._page.ensureWebViewExpanded(),typeof WindowsFeedbackForm!="undefined"){var n=t.qfMode==2?"feedbackContainer":"";WindowsFeedbackForm.Show(n)}},p.prototype.closeScopesL2=function(n){this.hideL2(!0);this._host.setFocusInSearchBox(n);var t={Source:n};this._instHelper.logClientInstEvent("Unselect","ScopesL2Closed",null,t)},p.prototype.showL2=function(){var n=this;this._topHitHeaderElement.style.display=u;this._searchScopesL2Element.style.display=u;sb_st(function(){return n._rootElement.classList.add(f)},0);this._host.updateQueryWithoutRefetching(null)},p.prototype.hideL2=function(n){var t=this;this._topHitHeaderElement.style.display=u;this._searchScopesL2Element.style.display=u;this._suggestionsList.style.display=u;n?sb_st(function(){return t._rootElement.classList.remove(f)},0):(this._rootElement.classList.remove(f),this.finalizeL2Transition())},p.prototype.getHeaderText=function(n,i){if(t.shouldRenderFlatListWithoutGroups(this._currentQuery))return null;if(n!=t.Scope.All||t.zeroInputAvailable){var r=t.getScopeDisplayName(i,this._host);if(r)return this._topHitPresent?n==t.Scope.All?this._host.getLocString("BestMatch"):this._host.getLocString("BestMatchFor",r.toLocaleLowerCase()):this._resultsPresent?null:r}return this._host.getLocString("BestMatch")},p.prototype.getEmptyQueryMessage=function(n,i,r){if(r.showUpsellOnSuggestionsList&&r.showUpsellOnSuggestionsList()&&i!=t.Scope.Documents)return"";if(n){if(i==t.Scope.Web)return this._host.getLocString("EmptyScopeMessageWeb");if(i!=t.Scope.All||t.zeroInputAvailable){var u=t.getScopeDisplayName(r,this._host);if(u)return this._host.getLocString("EmptyScopeMessage",u.toLocaleLowerCase())}return""}return this._host.getLocString("NoResults",this._currentQuery.queryToFetch)},p.prototype.init=function(){var u,f,i,r;t.scopeListRequiresUpdate=!1;this._scopeTiles=[];this._scopeTilesL2=[];u=t.alwaysWide?t.config.scopesOrderBeginAlwaysWide:t.config.scopesOrderBegin;this._allScopeButtonPresent=n.contains(u,"All");for(f in t.ScopeConfig)(i=parseInt(f),r=t.ScopeConfig[i],r.prefixesLocString&&t.isScopeEnabled(i,r))&&((i!=t.Scope.All||this._allScopeButtonPresent)&&this._scopeTiles.push(this.createScopeElement(i,r,!1)),this._scopeTilesL2.push(this.createScopeElement(i,r,!0)));this._scopeTilesL2.sort(function(n,i){return n.type==t.Scope.All?-1:i.type==t.Scope.All?1:n.text.localeCompare(i.text)})},p.prototype.createScopeElement=function(n,i,r){var u=this;return{id:(r?"scope":"l1scope")+n,type:n,text:t.getScopeDisplayName(i,this._host),description:r?this.getScopeDescription(n,i):null,icon:n==t.Scope.All?{content:"&#xE8A9",type:1}:i.icon,click:function(){return u.clickHandler(n,u.isScopesL2Visible()?"scopesL2":"scopeBar")},selected:!1,tabindex:-1,narratorText:this.getScopeToolTip(n,!1)}},p.prototype.clickHandler=function(n,i,r){var h=t.getScopeDisplayName(t.ScopeConfig[n],this._host),e,u=this._currentQuery,f=u.scope,o,s,c;if(this._scopeTiles.some(function(n){return n.type==f})||(f=t.Scope.All),h&&f!=n)e=(n==t.Scope.All?"":h.toLocaleLowerCase()+": ")+u.queryToFetch,this.innerRender(n,n,u,this._topHitPresent,this._resultsPresent,!0,!1),o={query:this._currentQuery,topResults:[],groups:[]},this._page.updateTopResultsView(o),this._page.updateGroupsView(o),this.hideL2(!0);else{if(this.isScopesL2Visible()){this.select(this._selectedScope,!1);this.closeScopesL2(i);return}if(f==t.Scope.All||this._allScopeButtonPresent){this._page.ensureWebViewExpanded();this.setFocusInSearchBox("scope clickHandler noop");return}e=u.queryToFetch;n=t.Scope.All;this.innerRender(n,n,u,this._topHitPresent,this._resultsPresent,!0,!1)}s=t.Scope[n];c={Scope:s,Source:i,GroupSource:r&&r.source?r.source.toString():undefined};this._instHelper.logClientInstEvent("Select","ScopeChanged",null,c);f!=n&&this._host.reformulate(e,undefined,undefined,r);this.setFocusInSearchBox("scope clickHandler "+s)},p.prototype.setFocusInSearchBox=function(t){this._host.setFocusInSearchBox(t);var i=n.getCurrentActiveElement();i&&i.blur()},p.prototype.isScopeElement=function(i){return t.config.allowUpForScopes&&this._scopeTiles&&(this.isScopeButton(i.id)||n.contains(this._scopeTiles,i))},p.prototype.isScopeButton=function(n){return n==this._filtersButton.id||n==this._moreButton.id||n==this._feedbackButton.id||n==this._optionsButton.id},p.prototype.isScopesL2Visible=function(){return this._rootElement.classList.contains(f)},p.prototype.getSelectableItems=function(){var n=[];return this._advancedOptionsTop&&(n=n.concat(this._advancedOptionsTop)),n=n.concat(this.getScopeSelectableItems()),this._advancedOptionsBottom&&(n=n.concat(this._advancedOptionsBottom)),n},p.prototype.getScopeSelectableItems=function(){var t,i,r;if(this.isScopesL2Visible())return this._scopeTilesL2;if(t=this._currentScopeTileIndex,t<0&&this._selectedScope)return[this._selectedScope];if(i=n.getCurrentActiveElement(),i)switch(i.id){case l:return[this._filtersButton];case a:return[this._moreButton];case v:return[this._feedbackButton];case y:return[this._optionsButton]}return r=this.getScopeBarElements(),(t<0||t>=r.length)&&(t=0),r.slice(t,t+1)},p.prototype.getSelectedItem=function(){return this._selectedL2Item&&this._selectedL2Item.selected?this._selectedL2Item:null},p.prototype.select=function(n,t){var l=this,f,s,r,e,c,i,o,h,u;if(t){SharedLogHelper.LogError("selectScope",null,new Error("Can't update search box value when selecting scope"));return}if(this._selectedL2Item&&(this._selectedL2Item.selected=!1,this._selectedL2Item=null),n){if(w(n)){if(this._scopeTilesL2)for(f=0,s=this._scopeTilesL2;f<s.length;f++)r=s[f],e=r.type==n.type,r.selected=e,r.tabindex=e?1:-1,e&&(this._selectedL2Item=r)}else for(c=n,i=[],this._advancedOptionsTop&&(i=i.concat(this._advancedOptionsTop)),this._advancedOptionsBottom&&(i=i.concat(this._advancedOptionsBottom)),o=0,h=i;o<h.length;o++)u=h[o],u==c?(u.selected=!0,this._selectedL2Item=u):u.selected=!1;this._page.updateSearchScopesL2View(this._scopeTilesL2,function(){return l.closeScopesL2("ScopesL2")},this._advancedOptionsTop,this._advancedOptionsBottom);this._selectedL2Item&&this._selectedL2Item.selected&&this.scrollTo(this._selectedL2Item)}},p.prototype.onAfterKeyDown=function(){},p.prototype.scrollTo=function(n){var i=_ge(n.id),t,r;i&&(t=this._searchScopesL2Element.firstChild,r=this._advancedOptionsTop?n==this._advancedOptionsTop[0]:n==this._scopeTilesL2[0],r?t.scrollTop=0:this._page.scrollToElement(i,t,t.offsetHeight))},p.prototype.getSubstrateUpsellClickHandler=function(n){var i=this,r=function(){var n=i.isScopesL2Visible();i._host.refreshCurrentPane();n&&i.navigateScopesL2("SubstrateUpsell");i._host.setFocusInSearchBox("SubstrateUpsell")};return function(){return i._host.promptAutheticateDialog(n,t.getSubstrateResourceOrScope(n),r,r)}},p.prototype.getSubstrateUpsell=function(n,i,r){var o=null,u="VerifyAccountToSearch",s=0,h="CloudSearch",c=["Verify"],f=null,e;return r==0?(h="",e=t.getEffectiveScope(this._currentQuery),e==t.Scope.People?u+="Contacts":e==t.Scope.Emails?u+="Emails":e==t.Scope.Documents&&(u+="Documents",s=1,o={content:"&#xE9BE",type:2,needsAccentColor:!0},f=this._substrateUpsellDismiss)):r==2?f=this._substrateUpsellDismiss:r==4&&(o={content:"&#xE9BE",type:2,needsAccentColor:!0},f=this._substrateUpsellDismiss,s=4,c=["VerifyAccountToSearch"]),this.getAdvancedOption(n==1?"COFA":"COOA",i,h,u,c,this.getSubstrateUpsellClickHandler(n),s,"advancedOption03",f,o)},p.prototype.getOneDriveUpsell=function(n){var i=this;return this.getAdvancedOption("SDSC",n,"SignInToCortanaTitle","SeeResultsFromOneDrive",["SignInToCortana"],function(){t.config.cortanaCapabilitiesAvailable?i._host.launchCortanaSignIn():i._host.launchCortanaHome()},0,"advancedOption02")},p.prototype.getIndexingOption=function(n,i){var r=this;return i==4?this.getAdvancedOption("OMIO",n,"","ChangeWhereWindowsSearches",["OptionsMenuIndexing"],function(){return t.LocalDataProvider.launchIndexingOptions(r._host,!1)},4,"",null,{type:2,content:"&#xED52"}):this.getAdvancedOption("SDIO",n,"ChangeWhereWindowsSearches",null,["SelectLocations"],function(){return t.LocalDataProvider.launchIndexingOptions(r._host,!1)},0,"advancedOption01")},p.prototype.getAdvancedOption=function(i,r,u,f,e,o,s,h,c,l){var y=this,a=n.InstrumentedItem.getNonSuggestionInstrumentedItem(i,t.SyntheticQSCodesMaps.KValues),v;return this._instHelper.instrumentSyntheticInstrumentedItem(r,i,a),v=function(t){y._instHelper.instrumentItemClick(n.getCurrentTime(),a,r,null,n.getInputType(t));o()},{id:h,selected:!1,title:this._host.getLocString(u),heading:f?this._host.getLocString(f):null,text:this._host.getLocString.apply(this._host,e),instItem:a,click:v,layout:s,dismiss:c,icon:l}},p.prototype.getImmersiveOptInOption=function(n){var u,r;return t.qfMode==2?(r=this._host.getLocString("OptOutButtonText"),u=function(){return i.setOptInStatus("ImmersiveSearch",i.FeatureStatus.OptedOut,"FiltersOptButton")}):(r=this._host.getLocString("OptInButtonText"),u=function(){return i.setOptInStatus("ImmersiveSearch",i.FeatureStatus.OptedIn,"FiltersOptButton")}),{id:"advancedOption04",selected:!1,title:r,heading:null,text:r,instItem:null,click:u,layout:n,icon:{type:2,content:"&#xEADA"}}},p.prototype.getMenuDividerOption=function(){return{id:"",selected:!1,title:"",heading:null,text:"",instItem:null,click:null,layout:5}},p.prototype.addCortanaOptions=function(n,i){var r=this,u;t.qfMode==2&&(n.push(this.getAdvancedOption("OMCS",i,"",null,["OptionsMenuSettings"],function(){return r._host.launchWindowsCortanaSettings()},4,"",null,{type:2,content:"&#xE713"})),u=t.cortanaAccountType==2||t.cortanaAccountType==1,u?(n.push(this.getAdvancedOption("OMCN",i,"",null,["OptionsMenuCortanaNotebook"],function(){return r._host.launchCortanaNotebook()},4,"",null,{type:2,content:"&#xEB7F"})),n.push(this.getAdvancedOption("OMCD",i,"",null,["OptionsMenuCortanaDevices"],function(){return r._host.launchCortanaDevices()},4,"",null,{type:2,content:"&#xF191"})),n.push(this.getAdvancedOption("OMAC",i,"",null,["OptionsMenuAddAccount"],function(){return r._host.launchWindowsAccountSettings()},4,"",null,{type:2,content:"&#xE910"}))):(n.push(this.getMenuDividerOption()),n.push(this.getAdvancedOption("OMSC",i,"",null,["OptionsMenuSignIn"],function(){return r._host.launchCortanaSignIn()},4,"",null,{type:3,needsAccentColor:!1}))))},p.prototype.getAdvancedOptions=function(n,i){var r=[];return i==4&&(t.config.immersiveSearchOptInSupported&&(r.push(this.getImmersiveOptInOption(4)),r.push(this.getMenuDividerOption())),r.push(this.getIndexingOption(n,i)),this.addCortanaOptions(r,n,i)),t.config.immersiveSearchOptInSupported&&i==2&&r.push(this.getImmersiveOptInOption(0)),t.isCloudSearchEnabledCache&&(i==4&&r.push(this.getMenuDividerOption()),this.addCloudSearchUpsells(r,n,i)),i==1&&r.push(this.getIndexingOption(n,i)),r},p.prototype.addCloudSearchUpsells=function(i,r,u){var e=t.substrateProvidersEnabled(),o=e&&!this._upsellGotDismissed,f;if((u==0||u==4||u==3||u==(o?2:1))&&(u!=0||!this._selectedScope||this._selectedScope.type==t.Scope.Emails||this._selectedScope.type==t.Scope.People||this._selectedScope.type==t.Scope.Documents)&&(f=t.getAccountTypeForCloudContent(),u!=3||e&&f==1))if(e){if(this._upsellGotDismissed&&this._selectedScope&&this._selectedScope.type==t.Scope.Documents&&u==0)return;(f!=1||t.isSubstrateO365AccountConnected)&&(f!=2||t.isSubstrateOutlookAccountConnected)||i.push(this.getSubstrateUpsell(t.accountTypeToAuthType(f),r,u))}else n.isBingEnabled()&&t.isCortanaEnabledCache&&!t.isCortanaPersonalized&&i.push(this.getOneDriveUpsell(r))},p}();t.HeaderFooterViewModel=p})(t=n.WSB||(n.WSB={}))}(AutoSuggest||(AutoSuggest={})),function(n){var t;(function(t){function i(n,t){var i=HitHighlightingParser.removeMarkers(n.text),r;!i.includes(t.queryToFetch)&&i.toLowerCase().startsWith(t.queryToFetch.toLowerCase())&&(r=t.queryToFetch+i.substr(t.queryToFetch.length),n.text=HitHighlightingParser.addMarkers(r,t.queryToFetch));!n.query.includes(t.queryToFetch)&&n.query.toLowerCase().startsWith(t.queryToFetch.toLowerCase())&&(n.query=t.queryToFetch+n.query.substr(t.queryToFetch.length))}function r(n,r,u,f,e,o,s,h){var l,c;if(n.actionUri=f,n.confidence=o,n.source=s,n.handoffType==4)if(l=n.query.toLowerCase()==r.queryToFetch.toLowerCase(),n.updateFromQuery=function(i){return l?(n.query=i.queryToFetch,n.text=HitHighlightingParser.addMarkers(n.query,i.queryToFetch),n.narratorText=t.getNarratorText(n),!0):!1},c=t.parseTaskFrame(e),c)n.isReformulation=!0,n.click=function(){return h.reformulate(n.query,c)};else return!1;else n.classNames.push("action"),n.click=function(){return h.launchCat1(n.query,f,e)};return n.getIcon||t.isValidIcon(n.icon)||(n.icon={type:3}),i(n,r),n.narratorText=t.getNarratorText(n),n.type!="CSK"&&(n.getMruData=function(){return{type:n.type,handoffType:n.handoffType,hc:n.hc,highConfidenceMetaSuggestionScore:n.highConfidenceMetaSuggestionScore,prefetchConfidenceScore:n.prefetchConfidenceScore,query:n.query,textWithoutHH:HitHighlightingParser.removeMarkers(n.text),annotation:n.primaryMetadata,icon:n.getIcon?null:n.icon,actionUri:f,taskFrame:e,confidence:o,source:s,suggestionKey:t.getSuggestionKey(n)}}),!0}function o(n,r,u,e,o,s,h,c,l,a,v,y){if(n.isAnswer=!0,n.htmlContent=e&&e.Content?e.Content.HTML:null,n.baseSearchUrl=h,n.segments=c,n.htmlContent){var p=JsonInject.GetResourceKeys([e]);p&&(n.executeScript=function(){return JsonInject.WriteAfterContentResources(JsonInject.FilterResources(a,p))})}s&&(n.secondaryIcon={content:s,type:0});n.text.includes(HitHighlightingParser.startMarker)||(n.text=HitHighlightingParser.addMarkers(n.text,r.queryToFetch));n.htmlContent||o&&(n.primaryMetadata=o,n.additionalInfoText=" - "+o);n.handoffType==10?(n.classNames.push("action"),i(n,r),t.isValidIcon(n.icon)||(n.icon={type:3}),n.click=function(){return v.launchCat2or3a(n.query,l)},n.allowedInGroups=!n.htmlContent):(f(n,v),n.click=function(){return v.launchSearch(n.query,y.getSearchUrl(r.fullPartialQuery,n.query,n.type,n.baseSearchUrl),!1)},n.allowedInGroups=n.secondaryIcon?!!n.additionalInfoText:!n.htmlContent);n.narratorText=t.getNarratorText(n)}function u(n,i,r,u,f){n.url=u;n.tooltip=u+"\n\n"+HitHighlightingParser.removeMarkers(n.primaryMetadata);t.isValidIcon(n.icon)||(t.qfMode!=3?n.getIcon=f.getEdgeIcon:n.icon={type:1,content:"&#xE774"});n.click=function(){return f.launchUrl(u)};n.narratorText=t.getNarratorText(n,f.getLocString("DirectNavSuggestion"));n.getMruData=function(){return{type:n.type,handoffType:n.handoffType,hc:n.hc,highConfidenceMetaSuggestionScore:n.highConfidenceMetaSuggestionScore,prefetchConfidenceScore:n.prefetchConfidenceScore,query:n.query,textWithoutHH:HitHighlightingParser.removeMarkers(n.text),title:n.primaryMetadata,icon:n.getIcon?null:n.icon,url:u,suggestionKey:t.getSuggestionKey(n)}}}function f(n,i){t.isValidIcon(n.icon)||(n.icon=n.type=="HS"&&t.qfMode!=3?{content:"&#xE81C",type:2}:n.handoffType===13?{content:"&#xEB9F",type:2}:n.handoffType===14?{content:"&#xE714",type:1}:t.getSearchSuggestionIcon());n.primaryMetadata||n.secondaryIcon||n.htmlContent||n.additionalInfoText||(n.primaryMetadata=n.handoffType===13?i.getLocString("SearchForWebImages"):n.handoffType===14?i.getLocString("SearchForWebVideos"):t.getWebSuggestionAnnotation(i))}var e=function(){function i(n,t,i,r,u){this._host=n;this._instrumentationHelper=t;this._navigationHelper=i;this._temporaryMessageHandler=r;this._previousKeystrokeCache=u}return i.prototype.parse=function(n,t,i,r,u,f,e){this.parseOnlineSuggestions(n,t,r,u,f,e,i)},i.prototype.parseOnlineSuggestions=function(i,r,u,f,e,o,s){var a=this,h,l,k;if(!u){n.isDataSourceEnabled(n.WebDataSource,i)&&e(n.WebDataSource,[],null);n.isDataSourceEnabled("OSTMA",i)&&e("OSTMA",[],null);n.isDataSourceEnabled("QS",i)&&e("QS",[],null);return}u.ELToken&&this._host.shouldRequestEltoken()&&this._host.setElToken(u.ELToken);var v=[],y=[],p=[],c=[],w=[],b=n.isDataSourceEnabled(n.WebDataSource,i);n.safeExecute(function(){for(var e,o=function(t){var o=t.Attributes,h=o.appId,f,e;if(h)return y.push(t),h.split(";").forEach(function(t){n.contains(c,t)||c.push(t)}),"continue";if(f=o.settingId,f)return p.push(t),w.push(f),"continue";b&&(e=n.safeExecute(function(){return a.parseOnlineSuggestion(i,t,r,u.Resources,s)},"parseOnlineSuggestion"),e&&v.push(e))},t=0,f=u.Suggestions;t<f.length;t++)e=f[t],o(e)},"parseOnlineSuggestions");b&&(h=null,l=null,u.RankingSignals&&(h=n.safeExecute(function(){return n.parseWebEngagementSignals(u.RankingSignals)},"parseWebEngagementSignals"),t.isL2(i)||(l=n.safeExecute(function(){return t.parseWebSuppressionSignals(u.RankingSignals,i)},"parseWebSuppressionSignals"))),this._previousKeystrokeCache&&this._previousKeystrokeCache.updateWebSignalsData(i.queryToFetch,h),k={rankingSignals:u.RankingSignals,engagementSignals:h,suppressedGroups:l,webTopResultRoutingType:u.PrefixRoutingType},e(n.WebDataSource,v,k));t.lookupById(i,"OSTMA",c,y,function(n){return n.Attributes.appId.split(";")},"QS",w,p,function(n){return n.Attributes.settingId},f,r,e,o,function(n,t,f,e){return a.parseIdLookupResponse(u,i,r,n,t,f,e)},null,null,null,null,this._instrumentationHelper,this._host)},i.prototype.parseIdLookupResponse=function(i,u,f,e,o,s,h){var c=this,l,a;if(e.Attributes.stype!="CS"||!(s.length>0)){if(s.length!=1){l=n.safeExecute(function(){return c.parseOnlineSuggestion(u,e,f,i.Resources,o)},"parseOnlineSuggestion "+o);l&&h.push(l);return}a=function(n){var i=e.Attributes;return c.compliesWithMinVersion(i.appMinVersion,n.deviceItem.version)?(n.appContext=i.appContext,c.setRankingSignals(n,e),e.Text&&i.query&&(!t.isApp(n.type)||n.appContext)&&(n.text=e.Text,n.query=i.query),e.SecondaryText&&(n.primaryMetadata=e.SecondaryText),n.handoffType==5)?r(n,u,f,i.actionUri,i.taskFrame,parseFloat(i.confidence),parseInt(i.source),c._host):!0:!1};n.safeExecute(function(){return t.parseLocalSuggestion(u,s[0],o,f,c._host,c._temporaryMessageHandler,e.Attributes.stype,c._instrumentationHelper,h,a)},"parseLocalSuggestion "+o)}},i.prototype.parseOnlineSuggestion=function(i,f,e,s,h){var d=this,l=f.Attributes,v=l.stype,y,c,a;if(l.appId&&v!="CS"||l.settingId)return null;if(y=n.InstrumentedItem.createInstrumentedItem(e),c=t.createSuggestion(f.Text,null,n.getIconFromOnlineResponse(f),v,l.query,y,null,e,!1),c.primaryMetadata=f.SecondaryText,this.setRankingSignals(c,f),c.autoOpenPreviewPaneWhenOnTopHit=l.openPP==="1",l.isAnswer==="1"){if(!l.url&&!t.isCortanaEnabledCache)return null;c.handoffType=l.url||l.vertical?n.verticalToHandoffType(l.vertical):10;c.signals=f.Signals;o(c,i,e,f.InstantAnswer,l.additionalInfoText,l.secondaryIconUrl,l.url,l.segments,l.taskFrame,s,this._host,this._navigationHelper);l.noHeightRestriction==="1"&&c.classNames.push("noHeightRestriction")}else if(l.taskFrame){if(!t.isCortanaEnabledCache||(c.handoffType=l.actionUri.startsWith("action://FindMyStuff/")?4:5,!r(c,i,e,l.actionUri,l.taskFrame,parseFloat(l.confidence),parseInt(l.source),this._host)))return null}else if(c.type=="CS")c.handoffType=3,this.setStoreSuggestionProperties(c,i,e,l);else{if(!l.url)return null;if(c.autoOpenPreviewPaneWhenOnTopHit=l.openPP==="1",c.type=="MD"||c.type=="ML")a=n.prettyPrintUrl(l.query,i.queryToFetch,!0),a!=c.query&&(c.query=a,c.text=i.queryToFetch?HitHighlightingParser.addMarkers(a,i.queryToFetch):a),c.primaryMetadata&&!c.primaryMetadata.includes(HitHighlightingParser.startMarker)&&(c.primaryMetadata=HitHighlightingParser.addMarkers(c.primaryMetadata,i.queryToFetch)),c.handoffType=1,u(c,i,e,l.url,this._host);else{if(n.queryLooksLikeUrl(c.query))return null;c.handoffType=n.verticalToHandoffType(l.vertical);this.setWebSearchSuggestionProperties(c,i,e,l.url)}}if(!t.isValidSuggestion(c,"parseOnlineSuggestion"))return null;var p=c.segments,w=p?p.split(","):[],b=w.some(function(i){return n.contains(t.config.relatedWebImageSupportedSegments,i)}),k=w.some(function(i){return n.contains(t.config.relatedWebVideoSupportedSegments,i)});return(f.ChildSuggestions||b||k)&&(c.calculateChildSuggestions=function(){return d.calculateRelatedSuggestions(c,i,f,h,b,k)}),c},i.prototype.setStoreSuggestionProperties=function(n,i,r,u){var e=this,f;n.icon.bgColor=u.bgColor=="transparent"?this._host.getAccentColor():u.bgColor;n.classNames.push("action");f=parseFloat(u.avgRating);n.stars=this.getStarsRating(f);n.catalogScore=parseFloat(u.catalogScore);n.avgRating=f;n.ratingCount=parseInt(u.ratingCount);n.packageFamilyName=u.appId;n.click=function(){return e._host.launchStorePdp(u.productId)};n.narratorText=t.getNarratorText(n)},i.prototype.getStarsRating=function(n){var t=Math.round(n*2)/2;return Math.max(0,Math.min(5,t))},i.prototype.setRankingSignals=function(n,t){var i=t.Attributes;n.hc=i.hc==="1";n.highConfidenceSuggestionScore=+i.hcs;n.highConfidenceMetaSuggestionScore=t.HighConfidenceMetaSuggestionScore;n.prefetchConfidenceScore=t.PrefetchConfidenceScore;n.suggestionLogMeta=i.lm},i.prototype.compliesWithMinVersion=function(n,t){var r,u,i,f,e;if(!n)return!0;if(!t)return!1;for(r=n.split("."),u=t.split(".");r.length>u.length;)u.push("0");for(i=0;i<r.length;++i){if(f=u[i],e=r[i],f<e)return!1;if(f>e)return!0}return!0},i.prototype.setWebSearchSuggestionProperties=function(n,i,r,u){var e=this;f(n,this._host);i.queryToFetch||(n.text=HitHighlightingParser.addMarkers(n.text));n.baseSearchUrl=u;n.click=function(){return e._host.launchSearch(n.query,e._navigationHelper.getSearchUrl(i.fullPartialQuery,n.query,n.type,n.baseSearchUrl,n.handoffType),n.useRaf)};n.narratorText=t.getNarratorText(n);n.type=="HS"&&t.setExtraVerbs(n,function(){var i=[{verb:"ManageSearchHistory",displayName:e._host.getLocString("ManageSearchHistory"),executeSync:function(){return e._host.launchUrl("https://www.bing.com/profile/history?fsi=1&FORM=WNSHIS")},icon:{content:"&#xE81C",type:2}}];return t.config.removeSuggUrl&&i.unshift({verb:"RemoveFromWebHistory",displayName:e._host.getLocString("RemoveFromWebHistory"),executeSync:function(){return e.removeBingHistorySuggestion(n.text)},icon:{content:"&#xE711",type:2}}),i},!0)},i.prototype.removeBingHistorySuggestion=function(i){var r=this,u;i=HitHighlightingParser.removeMarkers(i);u=t.config.removeSuggUrl.replace("%7b0%7d",encodeURIComponent(i)).replace("%7bSID%7d",sj_cook.get("_SS","SID"));n.fetchUrlJson(u,null,null,function(n){n.success&&(r._host.refreshCurrentPane(),sb_st(function(){return r._temporaryMessageHandler.showTemporaryMessage(r._host.getLocString("RemoveFromWebHistoryConfirmation",i),{content:"&#xE946",type:2})},250))})},i.prototype.addRelatedSuggestion=function(i,r,u,f,e,o,s){var h=t.createSuggestion(f,null,e,o,i?i.Query:u.query,n.InstrumentedItem.createInstrumentedItem(u.sequenceNumber),s,u.sequenceNumber,!1);h.groupType=t.GroupType.Related;h.parent=u;h.tooltip=i?i.SecondaryText:null;h.rankingScore=i?i.RankingScore:0;h.category=i?i.Category:null;h.isAnswer=!0;this.setWebSearchSuggestionProperties(h,r,u.sequenceNumber,i?i.Url:null);h.primaryMetadata=null;t.isValidSuggestion(h,"calculateRelatedSuggestions")&&u.childSuggestions.push(h)},i.prototype.calculateRelatedSuggestions=function(t,i,r,u,f,e){var s,h,o;if(t.childSuggestions=[],r.ChildSuggestions)for(s=0,h=r.ChildSuggestions;s<h.length;s++)o=h[s],this.addRelatedSuggestion(o,i,t,o.Text,n.getIconFromOnlineResponse(o),o.Type,0);f&&this.addRelatedSuggestion(null,i,t,this._host.getLocString("Images"),null,"EIM",13);e&&this.addRelatedSuggestion(null,i,t,this._host.getLocString("Videos"),null,"EVI",14);t.childSuggestions.length>0&&this._instrumentationHelper.instrumentDataSource(t.sequenceNumber,u,t.childSuggestions,null)},i}();t.OnlineSuggestionsParser=e;t.adjustCasing=i;t.setCat1SuggestionProperties=r;t.setUrlSuggestionProperties=u})(t=n.WSB||(n.WSB={}))}(AutoSuggest||(AutoSuggest={})),function(n){var t;(function(t){function y(n){return n?[n]:[]}function ft(n){if(n){var t=n.lastIndexOf(".");if(t>=0)return n.substring(t)}return""}function et(t){var i=t?new Date(t):null;return n.isValidDate(i)?i:null}function p(i){if(i){var r=n.getCurrentDate();if(r.getDate()==i.getDate()&&r.getMonth()==i.getMonth()&&r.getFullYear()==i.getFullYear())return i.toLocaleTimeString(t.uiLanguageCache,{hour:"numeric",minute:"numeric"})}return null}function f(n,i,f,o,s){var b,h,tt,it,k,d,c,a,l,g,v,y,rt,w,nt;for(s===void 0&&(s=!1),!s&&f.extensionLC&&r.hideFileExtensions&&(b=f.extensionLC.length,h=f.query,h.toLocaleLowerCase().endsWith(f.extensionLC)&&(tt=HitHighlightingParser.addMarkers(h,n),tt.toLocaleLowerCase().endsWith(f.extensionLC)&&(f.query=h.substring(0,h.length-b),it=HitHighlightingParser.removeMarkers(f.text),h==it&&(k=f.text.toLocaleLowerCase().lastIndexOf(f.extensionLC),f.text=f.text.substring(0,k)+f.text.substr(k+b))))),a=f.lastModifiedDate,a&&(d=a.toLocaleDateString(),c=p(a),c||(c=a.toLocaleString(t.uiLanguageCache,{day:"numeric",month:"numeric",year:"numeric",hour:"numeric",minute:"numeric"}))),l=f.handoffType==2?f.path:decodeURI(f.url||""),f.tooltip=at(f,l,c,o),f.primaryMetadata=f.sourceForGroup&&f.sourceForGroup!=1?t.getGroupSourceDisplayName(f.sourceForGroup,o):f.itemTypeDisplayName,f.classNames=[],f.match?(g=(vt(f.match.matchType)?o.getLocString(t.MatchType[f.match.matchType])+": ":"")+HitHighlightingParser.addMarkers(f.match.matchedText,n),f.additionalInfoText=g,f.secondaryMetadata=g,f.classNames.push("withMatchAnnotation","forceNoWrapOutsideTopResult")):d&&(f.secondaryMetadata=o.getLocString("LastModified")+": "+d),f.narratorText=t.getNarratorText(f),t.displayedInGridLayout(f.type)&&(i?f.classNames.push("bigIcon","biggerIcon"):f.classNames.push("bigIcon")),!s&&f.handoffType==2&&r.copyToClipboard&&u(f,function(){return[{verb:"QF.CopyFullPath",displayName:o.getLocString("CopyFullPath"),executeSync:function(){return r.copyToClipboard(f.path,"")},icon:{type:1,content:"&#xE8C8"}}]},!1),v={},l&&(y=l.lastIndexOf("/"),y<0&&(y=l.lastIndexOf("\\")),rt=l.substring(0,y),v[o.getLocString("Location")]={text:rt,click:f.click}),c&&(v[o.getLocString("LastModified")]={text:c}),w=0,nt=e;w<nt.length;w++){var ut=nt[w],et=ut[0],ot=ut[1],ft=f[ot];ft&&(v[o.getLocString(t.MatchType[et])]={text:ft})}f.previewMetadata=v}function ot(n,i,r,u){var o,s;for(i.match||!r.match||i.parentFolderDisambig||(i.match=r.match,i.needsRefreshAfterDeduping=!0),o=0,s=e;o<s.length;o++){var l=s[o],h=l[1],c=r[h];c&&!i[h]&&(i[h]=c,i.needsRefreshAfterDeduping=!0)}i.needsRefreshAfterDeduping&&f(t.getEffectiveQuery(n),t.isL2(n),i,u,!0)}function st(n,i,u,f,e){return n?t.Promise.safeChainWithGlobalCaching("getImageWithLiveTokenAsync",function(){return r.getImageWithLiveTokenAsync(u)},function(){return e},function(n){return t.toIcon(n,"getImageWithLiveTokenAsync",i)},i,null,null,3):w(i,f)}function w(n,i){return t.Promise.safeChainWithGlobalCaching("getIconForTypeAsync",function(n){return r.queryFormulationView.deviceSearch.getIconForTypeAsync(i,t.getImageSizeValue(n))},function(n){return n+"_"+i},function(i){return t.toIcon(i,"getIconForTypeAsync",n)},n)}function b(n){return n!=null&&(n.type==3||!!n.content||!!n.className)}function o(n,t,i){i===void 0&&(i=!0);var r=n.mayContainPII;return n.text?n.query?!n.handoffType&&n.handoffType!==0?(SharedLogHelper.LogError(t,r?"":n.text,new Error("Missing handoff type")),!1):n.type?i&&!n.getIcon&&!b(n.icon)?(SharedLogHelper.LogError(t,r?"":n.text,new Error("Missing icon")),!1):!0:(SharedLogHelper.LogError(t,r?"":n.text,new Error("Missing suggestion type")),!1):(SharedLogHelper.LogError(t,r?"":n.text,new Error("Missing query")),!1):(SharedLogHelper.LogError(t,r?"":n.deviceItem?n.deviceItem.id:"",new Error("Missing text")),!1)}function u(n,i,r){var u=n.getExtraVerbs;n.getExtraVerbs=function(n){var f=u?u(n):[],e=i(n);return t.joinVerbs(f,e,r)}}function ht(n,i,r){var u=n.getExtraVerbsAsync;n.getExtraVerbsAsync=u?function(n){return ThresholdUtilities.createPromise(function(f){return u(n).then(function(u){return i(n).then(function(n){return f(t.joinVerbs(u,n,r))})})})}:i}function s(n,t){var r=n.propertyHits||[],i=r.indexOf(t);return typeof i=="object"&&i.returnValue!==undefined?i.returnValue:i>=0}function ct(n){var i,t;if(n&&typeof n=="object"&&n.length){for(i="",t=0;t<n.length;t++)i+=n[t],t!=n.length-1&&(i+=", ");return i}return n}function i(t,i,r){return n.safeExecute(function(){return ct(t.getProperty(i))},"get"+i,undefined,r)}function lt(n){for(var r,u,e=[],i=2;i<arguments.length;i++)e[i-2]=arguments[i];for(r=0,u=e;r<u.length;r++){var f=u[r],h=f[0],o=f[1],c=f[2];if(o&&s(n,c))return t.createMatch(h,o)}return null}function at(n,i,r,u){var f=i||"",s,h,o,c;for(n.textContentIfMatched&&(f+=(f?"\n\n":"")+n.textContentIfMatched),s=!!f,h=function(){f&&(f+="\n");s&&(f+="\n",s=!1)},r&&(h(),f+=u.getLocString("LastModified")+": "+r),o=0,c=e;o<c.length;o++){var l=c[o],v=l[0],a=l[1],y=n[a];y&&(h(),f+=u.getLocString(t.MatchType[v])+": "+n[a])}return f}function vt(n){switch(n){case t.MatchType.Author:case t.MatchType.LastModifiedBy:case t.MatchType.Tags:case t.MatchType.Genre:case t.MatchType.Album:case t.MatchType.Artist:return!0;case t.MatchType.Content:case t.MatchType.Location:return!1;default:throw new Error("Unknown match type: "+n);}}function yt(i,r,u,f,e,o,s,h,c,l,a,v,p,w,b,k,d,g,nt,tt){r&&n.isDataSourceEnabled(r,i)&&t.LocalDataProvider.getApps(u,function(t){var u,s,i,o,h;if(l()){for(nt.instrumentResponseReceived(a,r,null,0,!1),u=[],s=function(i){n.safeExecute(function(){return w(i,r,e(i).map(function(n){return t[n]}).filter(function(n){return!!n}),u)},"parseApp "+r)},i=0,o=f;i<o.length;i++)h=o[i],s(h);v(r,u,null)}},p,r,tt);o&&n.isDataSourceEnabled(o,i)&&t.LocalDataProvider.getSettings(s,function(t){var u,e,i,f,s;if(l()){for(nt.instrumentResponseReceived(a,o,null,0,!1),u=[],e=function(i){n.safeExecute(function(){return w(i,o,y(t[c(i)]),u)},"parseSetting "+r)},i=0,f=h;i<f.length;i++)s=f[i],e(s);v(o,u,null)}},p,o);b&&n.isDataSourceEnabled(b,i)&&t.LocalDataProvider.getFiles(k,function(t){var r,f,i,u,e;if(l()){for(nt.instrumentResponseReceived(a,b,null,0,!1),r=[],f=function(i){n.safeExecute(function(){return w(i,b,y(t[g(i)]),r)},"parseFile "+b)},i=0,u=d;i<u.length;i++)e=u[i],f(e);v(b,r,null)}},i,p,b)}function pt(n,i){return t.isMobileCache?null:n.id==t.EdgeAppId?i.getLocString("MicrosoftRecommendedBrowser"):n.isImmersive?n.isTrustedApp?i.getLocString("TrustedMicrosoftStoreAppAnnotation"):i.getLocString("WindowsAppAnnotation"):i.getLocString("DesktopAppAnnotation")}function wt(n,i){return t.isModernSetting(n)?i.getLocString("SystemSettingsAnnotation"):i.getLocString("ControlPanelAnnotation")}function bt(i,r,u,e,o,s){var h=t.getAppItem(e),c,a,p,v,w,tt,b,k,nt;if(h){u&&d(e,h);e.primaryMetadata=pt(h,s);e.narratorText=t.getNarratorText(e);e.type=="IBA"&&(e.tooltip=h.id,e.path=h.id);return}if(t.isSetting(e.type)){e.primaryMetadata=wt(e.deviceItem,s);e.narratorText=t.getNarratorText(e);return}if(e.type=="LURL"&&(h=e.deviceItem,h)){c=h.id;e.narratorText=t.getNarratorText(e,s.getLocString("DirectNavSuggestion"));e.tooltip=e.query+"\n\n"+c;e.url=c;return}if(a=t.getBrowsingHistoryItem(e),a){var c=a.url,y=n.prettyPrintUrl(c,i,!1),it=i?HitHighlightingParser.addMarkers(y,i):y,l=a.title;l&&(e.primaryMetadata=i?HitHighlightingParser.addMarkers(l,i):l);e.text=it;e.query=y;e.narratorText=t.getNarratorText(e,s.getLocString("DirectNavSuggestion"));e.template=1;e.tooltip=(l?l+"\n\n":"")+c;e.classNames.push("forceNoWrapOutsideTopResult");e.url=c;return}if(p=t.getFileItem(e),p){kt(i,r,u,o,e,p,s);return}if(e.type=="PT"||e.type=="CG"){if(v=e,e.type!="PT"&&e.deviceItem.launchArguments||(v.path=e.deviceItem.id),w=e.deviceItem,tt=w.kind,tt=="program"){g(e,s);return}if(b=dt(w),b){v.itemTypeDisplayName=b;f(i,r,v,s);return}e.type=="CG"&&g(e,s);return}if(k=t.getPowerBiItem(e),k){nt=k.modelDisplayName;e.primaryMetadata=nt;e.additionalInfoText=" - "+nt;e.narratorText=t.getNarratorText(e);return}throw new Error("Unexpected type: "+e.type);}function kt(r,u,e,o,h,c,l){var y,k,p,w,v,b,a,g,nt;if(k=h.type=="LDOC"?t.resolveKnownFolderGUIDsInPath(c.id):t.indexerFilePathToRegularPath(c.id),h.path=k,h.itemTypeDisplayName=c.itemTypeDisplayName,e&&d(h,c),p=c.lastModifiedDate,n.isValidDate(p)&&(h.lastModifiedDate=p),w=c.extension,w&&(h.extensionLC=w.toLocaleLowerCase()),o!="MFF"||t.IndexerQueryGenerator){h.type=="MU"&&(h.artist=t.IndexerQueryGenerator?i(c,"System.Music.DisplayArtist",o):i(c,"System.Music.Artist",o),h.album=i(c,"System.Music.AlbumTitle",o));v=void 0;switch(o){case"MDOC":h.author=i(c,"System.Author",o);h.lastModifiedBy=i(c,"System.Document.LastAuthor",o);h.tags=i(c,"System.Keywords",o);s(c,"System.Search.Contents")&&(b=i(c,"System.Search.AutoSummary",o),b&&(y=t.tryGetTextContentMatch(b,r),h.textContentIfMatched=y[0],v=y[1]),c.propertyHits.length==1&&(h.matchedOnlyOnContent=!0));break;case"MPHO":h.tags=i(c,"System.Photo.TagViewAggregate",o);break;case"MVID":t.IndexerQueryGenerator&&(h.artist=i(c,"System.Music.DisplayArtist",o),h.genre=i(c,"System.Music.Genre",o));h.tags=i(c,"System.Keywords",o);break;case"MMUS":h.genre=i(c,"System.Music.Genre",o)}!h.text.includes(HitHighlightingParser.startMarker)&&r&&(a=void 0,g=o!="LM"&&o!="FL",g&&(o=="MFF"?(a=i(c,"System.Title",o),a&&!t.matchesOnPropertyHH(a,r)&&(a=undefined)):s(c,"System.Title")&&(a=i(c,"System.Title",o))),a?h.text=HitHighlightingParser.addMarkers(a,r):v?h.match=v:(nt=t.IndexerQueryGenerator?"System.Music.DisplayArtist":"System.Music.Artist",h.match=lt(c,o,[t.MatchType.Album,h.album,"System.Music.AlbumTitle"],[t.MatchType.Artist,h.artist,nt],[t.MatchType.Genre,h.genre,"System.Music.Genre"],[t.MatchType.Tags,h.tags,"System.Keywords"],[t.MatchType.Tags,h.tags,"System.Photo.TagViewAggregate"],[t.MatchType.Author,h.author,"System.Author"],[t.MatchType.LastModifiedBy,h.lastModifiedBy,"System.Document.LastAuthor"])))}f(r,u,h,l);ni(h,l)}function d(i,r){var u=n.safeExecute(function(){return r.getProperty("System.Link.TargetParsingPath")},"getTargetPath"),f,e,o;u&&(u=u.toLocaleLowerCase(),f=t.getKnownFolderPathLC(t.FOLDERID_Profile),f&&(e=t.getKnownFolderPathLC(t.FOLDERID_SystemX86),e&&u.startsWith(e+"\\config\\systemprofile")?u=f+u.substr(e.length+21):(o=t.getKnownFolderPathLC(t.FOLDERID_System),o&&u.startsWith(o+"\\config\\systemprofile")&&(u=f+u.substr(o.length+21)))),i.targetPathLC=u)}function dt(n){if(n.launchArguments)return null;var t=n.itemTypeDisplayName;return t&&t[0]!="."?t:null}function h(i,r){for(var o,y,h,c,a,u,l,f,v,s=[],e=0;e<i.length-1;++e)if(!t.displayedInGridLayout(i[e].type))for(o=e+1;o<i.length;++o)if(i[e].type==i[o].type&&i[e].text.toLocaleLowerCase()==i[o].text.toLocaleLowerCase()){s[e]=!0;s[o]=!0;break}if(s.length!=0)for(y=i.filter(function(n,t){return s[t]}),h=r.getLocString("InfoTextWithSource"),c=0,a=y;c<a.length;c++)if(u=a[c],u.path){if(l=u.path.lastIndexOf("\\"),l==-1)continue;if(f=u.path.slice(u.path.lastIndexOf("\\",l-1)+1,l),v=u.handoffType==2?null:u.primaryMetadata,v&&f.endsWith(":"))continue;u.type=="IBA"?(u.secondaryMetadata=u.primaryMetadata,u.primaryMetadata=f):u.primaryMetadata=u.primaryMetadata?v?n.formatString(h,[f,u.primaryMetadata]):n.formatString(h,[u.primaryMetadata,f]):f;u.additionalInfoText=n.formatString(h,[" -",f]);u.match&&(u.classNames=u.classNames.filter(function(n){return n!="withMatchAnnotation"&&n!="forceNoWrapOutsideTopResult"}));u.narratorText=t.getNarratorText(u);u.parentFolderDisambig=f}}function g(n,i){n.primaryMetadata=i.getLocString("RunCommandPrompt");n.classNames.push("action");n.narratorText=t.getNarratorText(n)}function gt(n){return n=="EBH"}function nt(i,r,u,f,e,s,h,c,l,a){var it=r.deviceItem.kind,d=t.localDataSourceMayContainPII(u),w,y,g,nt,k,tt;if(!h){SharedLogHelper.LogError("parseLocalSuggestion"+u,d?"":r.deviceItem.displayName||r.deviceItem.id,new Error("Unrecognized kind: "+it));return}if(w=h=="LURL"||h=="EBH"?1:2,n.isSuggestionTypeEnabled(u,h,w,i)){var b=t.getEffectiveQuery(i),p=gt(h)?null:r.deviceItem.displayName,rt=p&&b?HitHighlightingParser.addMarkers(p,b):p,v=t.createSuggestion(rt,r.getIcon,r.icon,h,p,n.InstrumentedItem.createInstrumentedItem(f),w,f,d);v.deviceItem=r.deviceItem;v.ciMetaData=r.ciMetaData;t.isApp(h)&&(v.pinnedToTaskbar=e.isPinnedToTaskbar(r.deviceItem.id));r.groupDisplayName&&(v.groupDisplayName=r.groupDisplayName);y=t.getAppItem(v);y?(v.click=function(){return e.launchAppItem(y,u,v.appContext)},t.config.maxJLcm&&ti(v,y,e,s,f,u,c)):(g=t.getBrowsingHistoryItem(v),g?(nt=v.url,v.click=function(){return e.launchUrl(nt)},t.qfMode!=3?v.getIcon=e.getEdgeIcon:v.icon={type:2,content:"&#xE81C"}):v.click=function(){return e.launchDeviceItem(v.deviceItem,u)});y&&v.type!="IBA"||t.isSetting(v.type)||t.isFileOrFolder(v.type)&&v.type!="LDOC"?v.getMruData=function(){return{type:v.type,handoffType:v.handoffType,hc:v.hc,highConfidenceMetaSuggestionScore:v.highConfidenceMetaSuggestionScore,prefetchConfidenceScore:v.prefetchConfidenceScore,id:r.deviceItem.id,suggestionKey:t.getSuggestionKey(v),appContextData:v.appContext?{appContext:v.appContext,query:v.query,textWithoutHH:HitHighlightingParser.removeMarkers(v.text)}:undefined}}:(k=t.getCommandLineItem(v),k?v.hc=t.isRealCommand(v,k):h=="PBI"&&(v.hc=r.deviceItem.rankScore>900));tt=t.getGroupType(v);t.shouldSetThisPcGroupSource(tt,i)&&(v.sourceForGroup=1);bt(b,t.isL2(i),t.supportsShortcuts(u,i),v,u,e);o(v,"parseLocalSuggestion "+u)&&a(v)&&l.push(v)}}function ni(n,i){u(n,function(){var r,u;return n.duplicates&&(r=n.duplicates.find(function(n){return n.handoffType==7||n.handoffType==8}),r)?(u=[],u.push({verb:"OpenInBrowser",displayName:i.getLocString("OpenInBrowser"),executeSync:function(){return i.launchUrl(r.url+(r.handoffType==8?"?web=1":""))},icon:{type:1,content:"&#xE774"}}),r.locationUrl&&u.push({verb:"OpenFileLocationInBrowser",displayName:i.getLocString("OpenFileLocationIn",t.getGroupSourceDisplayName(r.sourceForGroup,i)),executeSync:function(){return i.launchUrl(r.locationUrl)},icon:{type:2,content:"&#xE838"}}),u):[]},!0)}function ti(n,i,r,f,e,o,s){var h=i.id,y=i.filePath,a=rt[h],w,p;if(!a&&y){w=y.toLowerCase();for(p in v)if(w.includes(p)){a=v[p];break}}a&&a.length==0||(t.alwaysWide||!ut.find(function(n){return n==h}))&&(n.calculateChildSuggestions=function(){return ii(h,y,n,i,a,r,f,e,o,s)},t.config.maxJLcm&&u(n,function(u){var e=[],o,s;return u||(n.calculateChildSuggestions&&n.calculateChildSuggestions(),n.childSuggestions&&(o=!1,n.childSuggestions.filter(function(n){return n.type=="JL"&&!n.displayed&&n.groupType==t.GroupType.JumpListTasks}).slice(0,t.config.maxJLcm).forEach(function(n){o=!0;var t={verb:"JumpListTask_"+h+"_"+n.text,displayName:n.text,executeSync:function(){return l(i,n,r,f)},getIcon:c(n.jumpListItem,n.parent,!1,h)};e.push(t)}),s=!1,n.childSuggestions.filter(function(n){return n.type=="JL"&&!n.displayed&&n.groupType!=t.GroupType.JumpListTasks}).slice(0,t.config.maxJLcm).forEach(function(n,t){var u,a;o&&!s&&(u={},e.push(u));s=!0;a={verb:"JumpList_"+h+"_"+t,displayName:n.text,executeSync:function(){return l(i,n,r,f)},getIcon:c(n.jumpListItem,n.parent,!0,h)};e.push(a)}))),e},!0))}function ii(i,r,u,f,e,s,a,v,y,p){var d,b,ft,w,g,rt,k,nt,ut,st;if(u.calculateChildSuggestions=null,d=f.jumpList,d&&d.length!=0){for(b=r||"",ft=b.indexOf("}"),b=b.substr(ft+1),w=[],g=0,rt=d;g<rt.length;g++)if(k=rt[g],!e||n.contains(e,k.type)){var et=it(k.type),ot=et!=t.GroupType.JumpListTasks,ht=function(r){var e,h;if(tt(r))return"continue";e=t.createSuggestion(r.displayName,c(r,u,ot,i),null,"JL",r.displayName,n.InstrumentedItem.createInstrumentedItem(v),2,u.sequenceNumber,ot);e.click=function(){return l(f,e,s,a)};e.jumpListItem=r;e.groupType=et;e.groupDisplayName=k.name;e.parent=u;e.tooltip=r.description;h=b&&r.path.endsWith(b);h||(e.path=r.path);o(e,"calculateJumpListSuggestions")&&(w.push(e),ri(f,e,s,a))};for(nt=0,ut=k.items;nt<ut.length;nt++)st=ut[nt],ht(st)}w.length>0&&(u.childSuggestions=u.childSuggestions?u.childSuggestions.concat(w):w,h(w,s),p.instrumentDataSource(v,y,w,null))}}function c(n,i,r,u){return function(f,e){return t.getIcon(n,u+"_"+n.path+"_"+n.displayName,"jumpList",!r,!1)(f,function(n){n?e(n):i.getIcon(f,e)})}}function tt(i){return i.displayName?!t.alwaysWide&&n.olderThan2Weeks(i.lastAccessed)?!0:!1:!0}function it(n){switch(n){case 0:return t.GroupType.JumpListTasks;case 1:return t.GroupType.JumpListPinned;case 2:return t.GroupType.JumpListRecent;case 3:return t.GroupType.JumpListFrequent;default:return t.GroupType.JumpListCustom}}function l(n,i,r,u){t.Promise.safeChain("launchJumpList",function(){return i.jumpListItem.launchAsync()},null,function(){i.jumpListItem.deleteAsync&&t.DialogBox?t.DialogBox.show(r.getLocString("JumpListItemUnavailableDeleteConfirmation"),[{id:null,text:r.getLocString("Cancel"),selected:!0,action:function(){return r.setFocusInSearchBox("jumpListItemDialogBoxCancel")}},{id:null,text:r.getLocString("Remove"),selected:!1,action:function(){a(n,i,r,u);r.setFocusInSearchBox("jumpListItemUnavailable")}}]):(u.showTemporaryMessage(r.getLocString("JumpListItemUnavailable"),{content:"&#xE946",type:2}),a(n,i,r,u),r.setFocusInSearchBox("jumpListItemUnavailable"))})}function a(n,i,r,u){var f=function(){return ui(i)},e;i.jumpListItem.deleteAsync?(e=i.parent.childSuggestions.length==1,t.Promise.safeChain("deleteJumpList",function(){return i.jumpListItem.deleteAsync()},function(){n.getJumpListAsync&&t.Promise.safeChain("getJumpListAsync",function(){return n.getJumpListAsync()},function(n){e&&n.some(function(n){return it(n.type)==i.groupType&&n.items.some(function(n){return!tt(n)})})?f():(r.refreshCurrentPane(),u.showTemporaryMessage(r.getLocString("RemovedFromList",i.text),{content:"&#xE946",type:2}))},f)},f)):f()}function ri(n,t,i,r){t.jumpListItem.deleteAsync&&u(t,function(){var u={verb:"RemoveFromThisList",displayName:i.getLocString("RemoveFromThisList"),executeSync:function(){return a(n,t,i,r)},icon:{type:2,content:"&#xE711"}};return[u]},!0)}function ui(n){var i=_ge(n.id);t.setVisibility(i,!1);n.suppressed=!0}var r=SearchAppWrapper.CortanaApp,rt={"Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge":[0],"Microsoft.InternetExplorer.Default":[0],Chrome:[0],"360browser":[0]},v={skype:[],outlook:[0],"360browser":[0],chrome:[0],iexplore:[0],opera:[0],firefox:[0],safari:[0]},e=[[t.MatchType.LastModifiedBy,"lastModifiedBy"],[t.MatchType.Author,"author"],[t.MatchType.Artist,"artist"],[t.MatchType.Album,"album"],[t.MatchType.Genre,"genre"],[t.MatchType.Tags,"tags"],],ut=["Microsoft.Windows.Explorer",],k;t.getFileExtension=ft;t.toDate=et;t.getTodayTimeString=p;t.setFileTemplate=f;t.enrichMetadataFromDuplicate=ot;t.getOneDriveSuggestionIcon=st;t.getIconForTypeAsync=w;t.isValidIcon=b;t.isValidSuggestion=o;t.setExtraVerbs=u;t.setExtraVerbsAsync=ht;k=function(){function i(n,t,i,r){this._host=n;this._instrumentationHelper=t;this._temporaryMessageHandler=i;this._ciDataLoader=r}return i.prototype.parse=function(i,r,u,f,e,o){for(var v,y,p,s=this,c=[],w=function(t){n.safeExecute(function(){return nt(i,t,u,r,s._host,s._temporaryMessageHandler,t.suggestionType,s._instrumentationHelper,c,function(){return!0})},"parseLocalSuggestion "+u)},l=0,a=f.suggestions;l<a.length;l++)v=a[l],w(v);(t.isFileOrFolderLocalDataSource(u)||u=="IBA")&&h(c,this._host);y=u=="PP"||u=="ST";p={rankerExtraInfo:this._ciDataLoader&&y?{ciVersion:this._ciDataLoader.getCurrentCiVersion()}:null,maxedOut:f.maxedOut};o(u,c,p)},i}();t.SuggestionsParser=k;t.lookupById=yt;t.decorateSuggestionsWithParentFolder=h;t.parseLocalSuggestion=nt})(t=n.WSB||(n.WSB={}))}(AutoSuggest||(AutoSuggest={})),function(n){var t;(function(t){var i;(function(i){var r=function(){function i(i,r,u){var f=this;(u.bindShown(function(){var n=f.getContstraintIndexInfo(i.lastUrl);f._ciVersion=String(n.version)}),u.hasFallbackHappened())||u.bindAppHidden(function(){var r,s;if(n.isBingEnabled()&&n.isBrowserOnline()){r=f.getContstraintIndexInfo(i.lastUrl);f._ciVersion=String(r.version);var e=t.getCurrentLanguage(),u=t.config.ciVersion,o=f.parseUrlResult(i.urlResult);u>0&&t.config.supportedCiMarkets[e]&&(e!=r.language||u>r.version||u<r.version&&n.contains(t.config.blacklistedCiVersions,r.version))&&(!o.url||i.lastUrl==o.url||o.errorCode!="00000000")&&(s=f.getUrlForCiCab(u,e),t.Promise.safeChain("constraintIndexDownloader.tryDownloadFromUrlAsync",function(){return i.tryDownloadFromUrlAsync(s)},function(n){if(n){var t=f.getContstraintIndexInfo(i.lastUrl);f._ciVersion=String(t.version)}else SharedLogHelper.LogError("constraintIndexDownloader.tryDownloadFromUrlAsync",s,"Download failed")}))}})}return i.prototype.parseUrlResult=function(n){var r=null,t=null,i;return n&&(i=n.split(":0x"),i.length>1&&(r=i[0],t=i[1],t!="00000000"&&SharedLogHelper.LogError("constraintIndexDownloader.urlResult",t,"Download encountered problems"))),{url:r,errorCode:t}},i.prototype.getContstraintIndexInfo=function(n){var r=-1,u="",t,i;return n&&(t=n.split("/"),t.length>1&&(i=t[t.length-1].split("."),u=i.length==2?i[0]:"",r=+t[t.length-2])),{version:r,language:u}},i.prototype.getUrlForCiCab=function(t,i){return n.getWindowProtocol()+"//"+n.getWindowHost()+"/bcs/ci/"+t+"/"+i+".cab"},i.prototype.getCurrentCiVersion=function(){return this._ciVersion},i}();i.ConstraintIndexDataLoader=r})(i=t.ConstraintIndex||(t.ConstraintIndex={}))})(t=n.WSB||(n.WSB={}))}(AutoSuggest||(AutoSuggest={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(t){function i(n,i,r,u){r||(r={});t.getAuthAccountForCloudContent()=="Windows"&&t.cortanaAccountType!=3&&t.getWindowsAndCortanaAccountIdentityDiff()!=1&&t.substrateProvidersEnabled()?n.getAccount(0,t.getBingResourceOrScope(0),!1,!0,function(n){r["X-Search-RPSToken"]=n&&n.Token?n.Token:"";u(r)},"Windows"):u(r)}var r=function(r){function u(n,t){var i=r.call(this,"MODC")||this;return i._accessTokenManager=n,i._host=t,i}return __extends(u,r),u.prototype.getName=function(){return"MyStuffOneDriveDataProvider"},u.prototype.getBaseUrl=function(){return t.config.myStuffOneDriveRootUrl},u.prototype.getPostBody=function(n){return n.taskFrame?n.taskFrame.raw:""},u.prototype.fetch=function(t,u,f,e,o,s,h){var l=this,c;n.isDataSourceEnabled(this._dataSource,t)&&(c=function(i){var h=Object.assign({},s);delete h[n.Service.QueryParams.ImpressionGuid];delete h[n.Service.QueryParams.RequestElToken];r.prototype.fetch.call(l,t,u,f,e,o,h,i)},i(this._accessTokenManager,this._host,h,c))},u}(n.JsonDataProvider);t.MyStuffOneDriveDataProvider=r;t.updateOneDriveHeaders=i})(t=n.WSB||(n.WSB={}))}(AutoSuggest||(AutoSuggest={})),function(n){var t;(function(t){var i=function(){function i(n){this._host=n}return i.prototype.parse=function(n,i,r,u,f,e){var o=[];u&&(u.Results?(this.addContent(n,o,u.Results.OneDriveDocuments,"FL",t.Scope.Documents,i),this.addContent(n,o,u.Results.OneDriveFolders,"FD",t.Scope.Folders,i),this.addContent(n,o,u.Results.OneDriveImages,"LI",t.Scope.Photos,i),this.addContent(n,o,u.Results.OneDriveVideos,"LV",t.Scope.Videos,i),this.addContent(n,o,u.Results.OneDriveAudio,"MU",t.Scope.Music,i)):SharedLogHelper.LogError("MyStuffOneDriveParser",null,new Error("Missing Results property")));t.decorateSuggestionsWithParentFolder(o,this._host);e("MODC",o,null)},i.prototype.addContent=function(i,r,u,f,e,o){var s=this,c,l,v,a;if(u&&n.isSuggestionTypeEnabled("MODC",f,7,i)){var h=t.Scope[e],y=function(u){var k,c,d,w,g,b;if(!u.Content)return SharedLogHelper.LogError("MyStuffOneDriveParser",h,new Error("Missing Content property")),{value:void 0};if(c=u.Content.OneDriveData,!c)return SharedLogHelper.LogError("MyStuffOneDriveParser",h,new Error("Missing OneDriveData property")),{value:void 0};if(d=c.propertyHits.length==1&&c.propertyHits[0]=="TextContent",d&&(!t.config.minLengthForContentMatch||i.queryToFetch.length<t.config.minLengthForContentMatch))return{value:void 0};if(w=c.SeeMore,!w)return SharedLogHelper.LogError("MyStuffOneDriveParser",h,new Error("Missing SeeMore property")),{value:void 0};var v=t.getEffectiveQuery(i),a=t.decodeHtml(c.Name),y=void 0;if(a.includes(HitHighlightingParser.startMarker)?y=HitHighlightingParser.removeMarkers(a):(y=a,a=HitHighlightingParser.addMarkers(y,v)),f=="FL"&&(g=c.FullPath.lastIndexOf("\\"),g!=-1)){var nt=c.FullPath.substr(g+1),tt=HitHighlightingParser.addMarkers(nt,v),rt=!tt.includes(HitHighlightingParser.startMarker)&&a.includes(HitHighlightingParser.startMarker);rt||(a=tt,y=nt)}var it=t.ScopeConfig[e].icon,ut=t.isMedia(f),ft=t.getOneDriveSuggestionIcon(ut,it,c.Thumbnail.replace(":Thumbnail",":Cropped176x176#h=176&w=176"),c.Extension,c.Id),l=t.createSuggestion(a,ft,it,f,y,n.InstrumentedItem.createInstrumentedItem(o),7,o,!0);l.url=w;l.path=c.FullPath;l.matchedOnlyOnContent=d;l.lastModifiedDate=t.toDate(c.DateModified);c.Extension&&(l.extensionLC=c.Extension.toLocaleLowerCase());b=void 0;f=="FL"&&c.TextContent&&n.contains(c.propertyHits,"TextContent")&&(k=t.tryGetTextContentMatch(c.TextContent,v),l.textContentIfMatched=k[0],b=k[1]);c.Artist&&(l.artist=HitHighlightingParser.removeMarkers(c.Artist));c.Album&&(l.album=HitHighlightingParser.removeMarkers(c.Album));a.includes(HitHighlightingParser.startMarker)||(b?l.match=b:c.Path&&n.contains(c.propertyHits,"Path")&&(l.match=t.tryGetLocationMatch(c.Path,v)));l.sourceForGroup=2;t.setFileTemplate(v,t.isL2(i),l,p._host);l.click=function(){return s._host.launchUrl(w)};c.LocationUrl&&(l.locationUrl=c.LocationUrl,t.setExtraVerbs(l,function(){var n={verb:"OpenFileLocationInBrowser",displayName:s._host.getLocString("OpenFileLocationIn",t.getGroupSourceDisplayName(2,s._host)),executeSync:function(){return s._host.launchUrl(c.LocationUrl)},icon:{type:2,content:"&#xE838"}};return[n]},!0));t.isValidSuggestion(l,"MyStuffOneDriveParser "+h)&&r.push(l)},p=this;for(c=0,l=u;c<l.length;c++)if(v=l[c],a=y(v),typeof a=="object")return a.value}},i}();t.MyStuffOneDriveParser=i})(t=n.WSB||(n.WSB={}))}(AutoSuggest||(AutoSuggest={})),function(n){var t;(function(n){var t;(function(n){var t=function(){function n(n){var t=this;n.bindQueryChangedOrInitialized(function(){t._previousWebSignals=t._currentWebSignals;t._currentWebSignals=null;t._previousSpellerTrigger=t._currentSpellerTrigger;t._currentSpellerTrigger=null});n.bindConversationStart(function(){t._previousWebSignals=null;t._currentWebSignals=null;t._previousSpellerTrigger=null;t._currentSpellerTrigger=null})}return n.prototype.updateWebSignalsData=function(n,t){this._currentWebSignals={query:n,signals:t}},n.prototype.updateSpellerTriggerData=function(n,t){this._currentSpellerTrigger={query:n,triggerSpeller:this.triggerSpellerOnTheNextKeyStroke(t,n)}},n.prototype.getPreviousEventWebSignalsData=function(n){return this._previousWebSignals&&this.isPreviousEventQuery(this._previousWebSignals.query,n)?this._previousWebSignals.signals:null},n.prototype.enableCISpeller=function(n){return this._previousSpellerTrigger&&this.isPreviousEventQuery(this._previousSpellerTrigger.query,n)&&this._previousSpellerTrigger.triggerSpeller},n.prototype.triggerSpellerOnTheNextKeyStroke=function(n,t){return this.enableCISpeller(t)?!0:n.every(function(n){return n.notAResult})?!0:n.length>0&&this.isWebSpellCorrectedSuggestion(n[0])&&n.every(function(n){return n.handoffType==0})?!0:!1},n.prototype.isWebSpellCorrectedSuggestion=function(n){return n.type=="SC"||n.type=="OS"},n.prototype.isPreviousEventQuery=function(n,t){return n&&t&&n.length==t.length-1&&t.startsWith(n)},n}();n.PreviousKeystrokeCache=t})(t=n.Cache||(n.Cache={}))})(t=n.WSB||(n.WSB={}))}(AutoSuggest||(AutoSuggest={})),function(n){var t;(function(t){var i;(function(t){function c(t,f){e=t;var o=_ge("dialogBox");if(!o){n.log("DialogBox wrapper element not found");return}sj_be(o,"click",function(n){var u=n.target.id,t=i.filter(function(n){return n.id==u}).shift();t?(t.action&&t.action(),r()):u=="dialog_overlay"&&r();sj_sp(n)},!0);f.bindKeyDown(function(n){var f,e,t,o,r,i;switch(n){case 39:for(t=u(),e=!1,r=0,i=void 0;i=t[r];r++)if(e){f=i;break}else if(e=i.selected==!0,e&&r+1==t.length){f=t[0];break}break;case 37:for(t=u(),o=void 0,r=0,i=void 0;i=t[r];r++){if(i.selected==!0){f=o?o:t[t.length-1];break}o=i}}f&&h(f)})}function l(n,t){i=[];var r;if(t.length==0)throw new Error("DialogBox: Empty buttons array");i=t.map(function(n,t){var i=n;return i.id="dialog_b"+t,i.narratorText=i.text,i.selected&&(r=i.id),i});e.updateDialogBox(!0,n,i);r&&sb_st(function(){return _ge(r).focus()},0);f=!0}function r(){f&&(e.updateDialogBox(!1),f=!1)}function o(){return f}function u(){return i.forEach(function(n){return n.selected=_ge(n.id)==_d.activeElement}),i}function s(){return u().filter(function(n){return n.selected}).shift()}function h(n){for(var r,t=0,u=i;t<u.length;t++)r=u[t],r.selected=r.id==n.id,r.selected&&_ge(n.id).focus()}function a(){if(o()){var n=s();n&&(n.action&&n.action(),r())}}function v(){}var i=[],e,f=!1;sj_be(sj_b,"keydown",function(n){if(n.keyCode==9&&o()){var t=u();t.length>0&&t[t.length-1].selected&&r();sj_sp(n)}},!0);t.init=c;t.show=l;t.hide=r;t.isVisible=o;t.getSelectableItems=u;t.getSelectedItem=s;t.select=h;t.submit=a;t.onAfterKeyDown=v})(i=t.DialogBox||(t.DialogBox={}))})(t=n.WSB||(n.WSB={}))}(AutoSuggest||(AutoSuggest={})),function(n){var t;(function(n){n.DialogBoxViewModel=n.DialogBox})(t=n.WSB||(n.WSB={}))}(AutoSuggest||(AutoSuggest={})),function(n){var t;(function(t){function c(n){return n.includes("form=vsranf")}function l(t){var i=n.tryParseUrl(t,!0);return!!i&&/[\?\&]q=/i.test(i.parameters)&&!/[\?\&]view=detail/i.test(i.parameters)}function ht(t){var i=n.tryParseUrl(t,!0);return!!i&&st.test(i.parameters)}function ct(n){switch(n){case 1:case 0:return 1;case 13:return 2;case 14:return 3;default:throw Error("Unsupported handoff type: "+n);}}function a(n){switch(n){case 1:return 1;case 2:return 7;case 3:return 8;default:throw Error("Unsupported vertical: "+n);}}function v(t){var i=n.tryGetBingPathLC(t);return i?n.contains(et,i)?2:n.contains(ot,i)?3:n.contains(n.WebSearchPaths,i)?1:null:null}var s=t.PreviewPaneWidth-24,y="miniserp_focus",p="disableOutline",r=2,w=["tab-active","slide"],b=["aria-expanded"],k="videoPreview",d=300,f=30,g="IsSearchAppXYFocusEnabled",nt="WinJS",tt="dFocusExit",i="win-xyfocus-suspended",e="MiniSerpContentLoaded",it=["/account/","/settings.aspx"],u=function(){var n={};return n[37]="left",n[39]="right",n[38]="up",n[40]="down",n}(),rt=1e4,h=800,ut=100,ft=["&form=s00037&"],et=["/images/search","/images"],ot=["/videos/search","/videos"],st=/[\?\&]FORM=HDRSC[1-3]/i,lt=function(){function i(i,r,f,o,s){var h=this;this._host=i;this._navigationHelper=r;this._instrumentationHelper=f;this._sequenceNumberManager=o;this._previewPaneViewModelParent=s;this._deviceScale=1;this._previewRequestId=0;this._previousURLs=[];this.blockedMiniSERPUrls=[_w.location.origin+_w.location.pathname];this._root=_ge("qfPreviewPane");this._seeAllResults=_ge("seeAllResults");this._footer=_ge("footer");this._contentContainer=_ge("previewContainer");this._scrollArea=_ge("qfPreviewScrollArea");sj_be(this._scrollArea,"scroll",function(t){h._iframe&&n.contains([2,3],h._currentVertical)&&h._iframe.contentWindow.dispatchEvent(new Event(t.type,t));h._calculateIFrameHeight&&h._calculateIFrameHeight()});this._footer&&sj_be(this._footer,"keydown",function(i){h._iframe&&n.isUpOrDownKey(i.keyCode)?(i.keyCode==38?h.tryExecuteFocusOnMiniSerp(function(){return h._focusHelper.moveFocusToEdgeFocusableElement(1)}):t.config.allowKeyboardNavCycling&&h.tryExecuteFocusOnMiniSerp(function(){return h._focusHelper.moveFocusToEdgeFocusableElement(0)}),sj_pd(i),sj_sp(i)):i.keyCode==13&&h._footer.click()});sj_be(_w,"message",function(n){var r=n.data?n.data.msWinJSXYFocusControlMessage:null,i,f;r&&r.type==tt&&(i=r.direction,f=r.keyCode,h._focusHelper&&!h._focusHelper.isL2Visible()&&h._focusHelper.getXYFocusRoot()!=h._originalMiniSerpXYFocusRoot?(h._focusHelper.setXYFocusRoot(h._originalMiniSerpXYFocusRoot),h.tryExecuteFocusOnMiniSerp(function(){return h._focusHelper.moveFocus(i,f)})):(i!=u[t.getRtlAdjustedKey(39)]&&n.source.blur(),i==u[40]||i==u[38]&&t.config.allowKeyboardNavCycling?h._footer?h._footer.focus():h._focusHelper.moveFocusToEdgeFocusableElement(i==u[38]?1:0):i!=u[t.getRtlAdjustedKey(37)]||h._host.searchBoxHasFocus()||h._host.setFocusInSearchBox("previewPaneUnfocus")))});_w.addEventListener(e,function(){h._onIFrameLoadedCallback&&(h._onIFrameLoadedCallback(),h._onIFrameLoadedCallback=null)});i.bindShown(function(){ThresholdUtilities.getCortanaHeaders(function(n){n&&n["X-BM-DeviceScale"]&&(h._deviceScale=+n["X-BM-DeviceScale"]/100)});h.setVertical(1)});i.bindAppHidden(function(){h._seeAllResults&&(h._seeAllResults.innerText="");h._currentVertical=null});i.bindSearchBoxGotFocus(function(){h._focusHelper&&h._focusHelper.onSearchBoxFocusChanged()})}return i.prototype.getSelectableItems=function(){return[]},i.prototype.getSelectedItem=function(){return null},i.prototype.select=function(){},i.prototype.onAfterKeyDown=function(){},i.prototype.clear=function(){this._previewedSuggestionType=null;this._previewedSuggestionLayoutKValue=null;this._footer&&(t.setVisibility(this._footer,!1),this._footer.onclick=null);this.clearContent();this._previousURLs=[]},i.prototype.clearContent=function(){for(this._previewRequestId+=1,this._focusHelper=null,this._onIFrameLoadedCallback=null;this._contentContainer.hasChildNodes();)this._contentContainer.removeChild(this._contentContainer.lastChild);this._contentContainer.classList.remove("miniSerpContainer");this._contentContainer.classList.remove("errorMessageContainer");this._iframe&&(this._iframe=null,this._calculateIFrameHeight=null);this._mutationObserver&&(this._mutationObserver.disconnect(),this._mutationObserver=null)},i.prototype.hasFocus=function(){if(this._host.searchBoxHasFocus())return!1;var t=n.getCurrentActiveElement();return t&&t!=this._iframe&&this._root.contains(t)},i.prototype.focus=function(){var t=this,n;this.hasFocus()||(this._iframe?(n=this.tryExecuteFocusOnMiniSerp(function(){return t._focusHelper.moveFocusToLastFocusedElement()}),n?SearchAppWrapper.CortanaApp.focusWebView():this._host.setFocusInSearchBox("MiniSERP VM Focus failed")):this._previewPaneViewModelParent.focusPending=!0)},i.prototype.setVertical=function(n){if(n!=this._currentVertical){if(this._seeAllResults)switch(n){case 1:this._seeAllResults.innerText=this._host.getLocString("SeeAllResults");break;case 2:this._seeAllResults.innerText=this._host.getLocString("SeeAllImageResults");break;case 3:this._seeAllResults.innerText=this._host.getLocString("SeeAllVideoResults");break;default:throw new Error("Unsupported vertical type: "+n);}this._currentVertical=n}},i.prototype.update=function(i,r,u,f){var e=this,o,h,s;if(this._previewPaneId=f,this._previewedSuggestionType=i.type,this._previewedSuggestionLayoutKValue=i.instItem.getLayoutKValue(),o=i.type=="MB"&&i.segments=="Organization"?null:i.baseSearchUrl,this.setVertical(ct(i.handoffType)),this._footer&&(t.setVisibility(this._footer,!0),this._footer.onclick=function(t){e._previewPaneViewModelParent.onBeforeItemLaunch(n.getCurrentTime(),n.getInputType(t),3);e._host.launchSearch(i.query,e._navigationHelper.getSearchUrl(r.fullPartialQuery,i.query,i.type,o,i.handoffType),!1);e._previewPaneViewModelParent.onAfterItemLaunch(3)}),t.config.th&&ClientTestHooks.isTesthookParamSet("noSerp")){this.renderIframe(null,"<html><body><\/body><\/html>",{},undefined,u);h=n.getCurrentTime();this._previewPaneViewModelParent.onResponseReceived(h);return}s=this._navigationHelper.getSearchUrl(r.fullPartialQuery,i.query,i.type,o,i.handoffType,u?"WMSRPA":"WMSRPM",!0,null,u);s+="&qfig="+this._instrumentationHelper.getImpressionGuid(this._sequenceNumberManager.getSequenceNumber());this._previousURLs=[];this.downloadAndDisplayMiniSerp(s,u,i.previewCallback)},i.prototype.downloadAndDisplayMiniSerp=function(i,r,u){var f=this,o=!1,h,c,l,e,a;t.config.th&&(h=ClientTestHooks.getUrlValue("client"),o=h&&h.toLowerCase()=="windows",c=ClientTestHooks.getUrlValue("previewPaneUrlOverride"),i=c?decodeURIComponent(c):ClientTestHooks.CopyTestParameters(_w.location.search,i),o&&(i=ThresholdUtilities.setUrlParameter(i,"client","windowsMiniSerp")),l=ClientTestHooks.getUrlValue("miniSerpBag"),l&&(i=ThresholdUtilities.setUrlParameter(i,"bag",l)));e=this._host.getCustomHeaders();e["X-BM-DeviceDimensionsLogical"]=s+"x"+this._root.clientHeight;e["X-BM-DeviceDimensions"]=String(Math.round(s*this._deviceScale))+"x"+this._root.clientHeight;o||(e["User-Agent"]=navigator.userAgent+" RestrictedAPI");a=++this._previewRequestId;n.fetchUrl(i,e,null,function(t){var l=n.getCurrentTime(),h;f._previewPaneViewModelParent.onResponseReceived(l);if(t.status==200&&t.responseText)f._previousURLs.push(i),f.renderIframe(i,t.responseText,e,o,r),u&&u();else{var a=f._host.getLocString("PreviewPaneErrorMessage"),c=a.split("{0}"),v=n.safeExecute(function(){return(new RegExp("[?|&]q=([^&]+?)(&|#|$)").exec(decodeURIComponent(i).replace(/\+/g," "))||[null,""])[1]},"decodePreviewPaneSearchUrl",""),s=sj_ce("div","previewPaneErrorMessage");s.appendChild(_d.createTextNode(c[0]));h=_d.createElement("span");h.textContent=v;s.appendChild(h);s.appendChild(_d.createTextNode(c[1]));f._contentContainer.appendChild(s);f._contentContainer.classList.add("errorMessageContainer")}},null,function(){return a==f._previewRequestId},!0)},i.prototype.renderIframe=function(t,i,r,u){var f=this;this._iframe=sj_ce("iframe","miniIframeSerp");this._iframe.setAttribute("scrolling","no");this._contentContainer.classList.add("miniSerpContainer");this._contentContainer.appendChild(this._iframe);var s=this._iframe.contentWindow,o=this._iframe.contentDocument,h=!1;this.setIframeHeight(0);this._onIFrameLoadedCallback=function(){var e=o.body,h=0,i;f._calculateIFrameHeight=function(){var n=e.offsetHeight;n!=h&&n>0&&(h=f.setIframeHeight(n))};f._calculateIFrameHeight();f.overrideAjaxCalls(s,r,u);f.captureNavigationsAndSizeEvents(t,e,s,o);f._scrollArea.scrollTop=0;n.contains([2,3],f._currentVertical)&&(i={childList:!0,subtree:!0},f._mutationObserver=new MutationObserver(function(){f._calculateIFrameHeight&&f._calculateIFrameHeight()}),f._currentVertical===2?f._mutationObserver.observe(o.getElementById("images"),i):f._currentVertical===3&&f._mutationObserver.observe(o.getElementById("video"),i));f._instrumentationHelper.logClientInstEvent("Select","PreviewPaneRendered",f._sequenceNumberManager.getSequenceNumber(),{ppId:""+f._previewPaneId,suggestion:f._previewedSuggestionLayoutKValue})};this._iframe.onload=function(){if(h){f.tryLaunchUrl(t,s.location.href,0);return}h=!0;f.overrideAjaxCalls(s,r,u)};o.open();o.write(i);o.write("<base href='"+t+"' target='_parent' />");o.write("<script>var evt; if (typeof Event === 'function') { evt = new Event('"+e+"') } else { evt = document.createEvent('Event'); evt.initEvent('"+e+"', true, true) }; window.parent.dispatchEvent(evt)<\/script>");o.close()},i.prototype.setIframeHeight=function(n){return n<h&&(n=h),this._iframe.style.height=n+"px",n},i.prototype.overrideAjaxCalls=function(n,t,i){var r=this;n.sj_gx=function(){var n=sj_gx(),u=n.open;return n.open=function(f,e,o,s,h){if(r.blockedMiniSERPUrls.some(function(n){return e.startsWith(n)}))throw new Error("MiniSERP blocked URL request: iFrame URL: "+r._iframe.contentDocument.baseURI+" requestUrl: "+e);f=="GET"&&i&&(e=ThresholdUtilities.setUrlParameter(e,"client","windowsMiniSerp"));u(f,e,o,s,h);for(var c in t)n.setRequestHeader(c,t[c])},n}},i.prototype.captureNavigationsAndSizeEvents=function(t,i,r,u){var f=this,h;this._focusHelper=this.createFocusHelper(r,u);this._focusHelper&&(this._originalMiniSerpXYFocusRoot=this._focusHelper.getXYFocusRoot());this._previewPaneViewModelParent.focusPending&&(this._previewPaneViewModelParent.focusPending=!1,this.focus());this._iframe.contentWindow.overlay_onBeforeContentLoad=function(){f.setIframeHeight(rt)};this._iframe.contentWindow.overlay_onBeforeSuccess=function(n){f.setIframeHeight(n.clientHeight+ut)};var e=function(){r.sj_lc=function(n){if(n)f.tryLaunchUrl(t,n,0);else{var i=f._previousURLs[f._previousURLs.length-2];f._previousURLs.splice(f._previousURLs.length-2,2);f.tryLaunchUrl(t,i,0)}};r.MiniSerp=!0;f._calculateIFrameHeight()},s=function(n){f._focusHelper.setXYFocusRoot(n);f._focusHelper.moveFocusToEdgeFocusableElement(0)},o=r.sj_evt;o?(h=["onP1","ajaxReady"],h.forEach(function(n){return o.bind(n,e)}),o.bind("l2_overlay_visible",function(n){e();var t=f._iframe.contentDocument.getElementById(n[1]);t&&(f._focusHelper.setIsL2Visible(!0),s(t))}),o.bind("l2_overlay_hidden",function(){e();f._focusHelper.setIsL2Visible(!1);s(f._iframe.contentDocument.body)})):e();r.open=function(n){return f.tryLaunchUrl(t,n,0),null};i.onclick=function(i){for(var r=i.target;r&&!r.href;)r=r.parentNode;r&&f.tryLaunchUrl(t,r.href,n.getInputType(i))==0&&i.preventDefault()}},i.prototype.navigateInPlace=function(n,t,i,r){var u=this,f=a(r),e;this._previewPaneViewModelParent.onBeforeItemLaunch(t,i,f);this._footer&&(this._footer.onclick=function(){return u._host.launchSearch(null,u.enrichBingSearchUrlParameters(n),!1)});this.clearContent();this._previewPaneViewModelParent.focusPending=!0;this._previewPaneViewModelParent.startLoadingScreen();e=this.enrichBingSearchUrlParameters(n,!0);this.setVertical(r);this._instrumentationHelper.logClientInstEvent("Select","NavigateInPlace",this._sequenceNumberManager.getSequenceNumber(),{destinationVertical:r.toString(),url:n});this.downloadAndDisplayMiniSerp(e,!1);this._previewPaneViewModelParent.onAfterItemLaunch(f)},i.prototype.tryLaunchUrl=function(i,r,u){var s,f,h,e,y,o;if(!r)return 1;if(s=n.getCurrentTime(),r=r.trim(),f=r.toLowerCase(),h=v(r),h!==null&&l(r)&&!c(f)&&(t.config.navigateRequeriesInsideMiniSERP||ht(r))&&h!==this._currentVertical)return this.navigateInPlace(r,s,u,h),0;if(f.startsWith("javascript:location.reload"))return 0;if(r==i+"#"||f.startsWith("javascript:"))return 1;if(f=="/loading")return 0;if(r.startsWith(window.location.href))return SharedLogHelper.LogError("previewPane.tryLaunchUrl",i,new Error("Anchor navigation on PreviewPane")),0;if(r.startsWith("/")&&(r=n.getWindowProtocol()+"//"+n.getWindowHost()+r),e=v(r),e){if(e==this._currentVertical&&l(r)&&(t.config.navigateRequeriesInsideMiniSERP||ft.some(function(n){return f.includes(n)})))return this.navigateInPlace(r,s,u,e),0;r=this.enrichBingSearchUrlParameters(r)}y=e?a(e):2;this._previewPaneViewModelParent.onBeforeItemLaunch(s,u,y);o=n.tryGetBingPathLC(r);o?it.some(function(n){return o.startsWith(n)})||c(f)?this._host.launchUrl(t.config.settingsUri):o.startsWith("/profile/interests")?this._host.launchCat1(null,"ms-cortana://navigate/Notebook",null):o.startsWith("/fd/auth/")?t.isCortanaPersonalized?SharedLogHelper.LogError("previewPane.tryLaunchUrl",i,new Error("Redirecting to sign in page when already signed in")):this._host.launchUrl("ms-cortana://CapabilitiesPrompt/?RequestedCapabilities=Personalization"):this._host.launchUrl(r):this._host.launchUrl(r);this._previewPaneViewModelParent.onAfterItemLaunch(y);return 0},i.prototype.enrichBingSearchUrlParameters=function(n,t){return t===void 0&&(t=!1),n=this._navigationHelper.enrichUrlWithMarketInfo(n),n=this._navigationHelper.enrichUrlWithDeviceInfo(n),n=this._navigationHelper.enrichUrlWithCvid(n),n=this._navigationHelper.enrichUrlWithSuggestionType(n,this._previewedSuggestionType),t||(n=this._navigationHelper.enrichUrlWithMuidInfo(n),n=this._navigationHelper.enrichUrlWithSafeSearchInfo(n)),n},i.prototype.createFocusHelper=function(n,t){var i=this.getSearchAppWinJSXYFocus(n);return!i&&SearchAppWinJS&&SearchAppWinJS.initXYFocus&&(SearchAppWinJS.initXYFocus(n),i=this.getSearchAppWinJSXYFocus(n),n[g]=i?!0:!1),i?new o(t,n,i,this._scrollArea,this._currentVertical):null},i.prototype.getSearchAppWinJSXYFocus=function(n){var i,t=n[nt];return t&&t.UI&&(i=t.UI.XYFocus),i},i.prototype.tryExecuteFocusOnMiniSerp=function(n){var t=!1;return this._focusHelper&&(t=n()),t||this._footer&&(this._footer.focus(),t=!0),t},i}(),o;t.MiniSerpViewModel=lt;o=function(){function n(n,i,r,u,f,e){var o=this;this._targetDocument=n;this._targetWindow=i;this._searchAppXYFocus=r;this._scrollArea=u;this._verticalType=f;this._useStickyFocusOverride=e;this._isL2Visible=!1;this._useStickyFocus=!1;_w.ClientTestHooks&&ClientTestHooks.isTesthookParamSet("stickyFocus")===!0&&(this._useStickyFocus=!0);this._useStickyFocusOverride!=null&&(this._useStickyFocus=this._useStickyFocusOverride);var s="b_hide",h="acc-inactive",c=".b_slidebar";this._focusDiv=sj_ce("div",y,s);n.body.appendChild(this._focusDiv);sj_be(n,"blur",function(n){o._useStickyFocus?(!n.srcElement.offsetParent||n.srcElement.classList.contains("b_hide")||n.relatedTarget)&&t.setVisibility(o._focusDiv,!1):t.setVisibility(o._focusDiv,!1)},!0);sj_be(n,"focus",function(){return o.updateFocusedElementAndOutline(o._targetDocument.activeElement)},!0);sj_be(n,"scroll",function(n){o._lastElementFocused&&(n.srcElement==o._lastElementFocused||o._lastElementFocused.compareDocumentPosition(n.srcElement)&Node.DOCUMENT_POSITION_CONTAINS)&&o.updateFocusedElementAndOutline(o._lastElementFocused)},!0);sj_be(n,"transitionend",function(n){var t=o._targetDocument.activeElement;(n.propertyName=="height"||n.srcElement==t.closest(c))&&(o._focusOutlineTimeout?(o.clearFocusOutlineTimeout(),o.outlineElementAndScrollIntoView(t)):o._focusDiv.classList.contains(s)||o.outlineElementAndScrollIntoView(t),n.srcElement.style.height=="0px"?n.srcElement.classList.add(h):n.srcElement.classList.remove(h))});this._searchAppXYFocus.keyCodeMap.home.push(36);this._searchAppXYFocus.keyCodeMap.end.push(35)}return n.prototype.getXYFocusRoot=function(){return this._searchAppXYFocus.focusRoot},n.prototype.isL2Visible=function(){return this._isL2Visible},n.prototype.setIsL2Visible=function(n){this._isL2Visible=n},n.prototype.setXYFocusRoot=function(n){this._searchAppXYFocus.focusRoot=n},n.prototype.moveFocus=function(n,t){return this._searchAppXYFocus._xyFocus(n,t)},n.prototype.moveFocusToEdgeFocusableElement=function(n,t){var i,h;if(t===void 0&&(t=!1),this._targetWindow.focus(),t&&n==0)i=this.focusFirstSerpElement();else{var f=void 0,e=void 0,r=void 0,o=this._targetWindow.innerWidth,s=this._targetWindow.innerHeight;n==0?(f=-1,e=0,r=40):n==1&&(f=s,e=s+1,r=38);h={top:f,bottom:e,right:o,left:0,height:1,width:o};i=this._searchAppXYFocus._xyFocus(u[r],r,h)}return i&&(this.scrollTo(n),this.updateFocusedElementAndOutline(this._targetDocument.activeElement)),i},n.prototype.onSearchBoxFocusChanged=function(){this._targetDocument.hasFocus()?this.updateFocusedElementAndOutline(this._targetDocument.activeElement):this._useStickyFocus||t.setVisibility(this._focusDiv,!1)},n.prototype.isVisible=function(n){var t=_w.getComputedStyle(n);return!(t.visibility=="hidden"||t.display=="none"||n.offsetWidth===0&&n.offsetHeight===0)},n.prototype.moveFocusToLastFocusedElement=function(){return this._lastElementFocused&&this.isVisible(this._lastElementFocused)?(this._lastElementFocused.focus(),this.updateFocusedElementAndOutline(this._lastElementFocused),!0):this.moveFocusToEdgeFocusableElement(0,!0)},n.prototype.updateFocusedElementAndOutline=function(n){var i=this,r;n&&n!=this._targetDocument.body&&(this.processFocusedElement(n),r=this._lastElementFocused&&n.elementType&&n.elementType==this._lastElementFocused.elementType&&n.parentElement==this._lastElementFocused.parentElement?d:0,r?(t.setVisibility(this._focusDiv,!1),this._focusOutlineTimeout=sb_st(function(){i._targetDocument.activeElement==n&&i.outlineElementAndScrollIntoView(n);i.clearFocusOutlineTimeout()},r)):this.outlineElementAndScrollIntoView(n),this._lastElementFocused=n)},n.prototype.outlineElementAndScrollIntoView=function(n){var u,o,s;if(n!=this._targetDocument.body&&(this._useStickyFocus||this._targetDocument.hasFocus())){var i=n.getBoundingClientRect(),y=this._targetDocument.documentElement.scrollWidth-r*2,p=this._targetDocument.documentElement.scrollHeight-r*2,h=i.top+this._targetWindow.pageYOffset,e=i.left+this._targetWindow.pageXOffset,w=y-e,b=p-h,c=e<0?Math.floor(i.width+e-r):i.width;if(c<=0){t.setVisibility(this._focusDiv,!1);return}if(u=i.height,u<=0&&n.children.length>0)for(o=0;o<n.children.length;o++)s=n.children[o].getBoundingClientRect(),s.height>u&&(u=s.height,h=s.top);this._focusDiv.style.top=Math.max(r,h)+"px";this._focusDiv.style.left=Math.max(this.isL2Visible?r:r*4,e)+"px";this._focusDiv.style.width=Math.min(w,c)+"px";this._focusDiv.style.height=Math.min(b,u)+"px";t.setVisibility(this._focusDiv,!0);var l=n.getBoundingClientRect(),a=this._scrollArea.offsetHeight+this._scrollArea.scrollTop-l.bottom-f,v=l.top-this._scrollArea.scrollTop-f;a<0?this._scrollArea.scrollTop+=f-a:v<0&&(this._scrollArea.scrollTop+=v-f)}},n.prototype.scrollTo=function(n){var t=0;n==1&&(t=this._scrollArea.scrollHeight);this._scrollArea.scrollTop=t},n.prototype.processFocusedElement=function(n){var r=this,u,e,o,c,f,s,h;n.isProcessed||(u=n.tagName.toLocaleLowerCase(),e=n.getAttribute("type"),u=="select"&&(sj_be(n,"keydown",function(t){t.keyCode==32?n.classList.add(i):t.keyCode==13&&n.classList.remove(i)},!0),this.reactivateXYFocusOnBlur(n)),u=="input"&&e=="range"&&(sj_be(n,"keydown",function(t){var r=t.target,f=+r.getAttribute("min"),e=+r.getAttribute("step"),u=t.keyCode==37,o=t.keyCode==39,s=+r.value-e<f&&u;t.keyCode==38||t.keyCode==40||s?n.classList.remove(i):(u||o)&&n.classList.add(i)},!0),this.reactivateXYFocusOnBlur(n)),o=function(t,r){var u;if(!r.readOnly){if(u=r.selectionStart!=r.selectionEnd,u){n.classList.add(i);return}var f=r.selectionEnd==0,e=r.selectionEnd==r.value.length,o=t.keyCode==36&&!f,s=t.keyCode==35&&!e,h=t.keyCode==37&&!f,c=t.keyCode==39&&!e;h||c||o||s?n.classList.add(i):n.classList.remove(i)}},u=="textarea"&&(sj_be(n,"keydown",function(n){return o(n,n.target)},!0),this.reactivateXYFocusOnBlur(n)),u=="input"&&(e=="number"||e=="text")&&(sj_be(n,"keydown",function(n){return o(n,n.target)},!0),this.reactivateXYFocusOnBlur(n)),w.some(function(t){return n.classList.contains(t)})?(n.elementType="slide",c=Array.prototype.slice.call(n.querySelectorAll("a:not([onclick='TestHooks.HideShowTestHooks(this);']):not([disabled])"),0),f=c.filter(function(n){return r.isVisible(n)&&n.offsetHeight>0&&n.offsetWidth>0}),f&&sj_be(n,"keydown",function(t){var i=r.countUniqueHrefs(f),u=t.keyCode;t.srcElement==n&&(i>1&&u==40?(t.preventDefault(),r._searchAppXYFocus.focusRoot=n,f[0].focus()):i==1&&u==13&&f[0].click())})):b.some(function(t){return n.hasAttribute(t)})?(n.elementType="expansion",s=function(){t.setVisibility(r._focusDiv,!1);r.updateFocusedElementAndOutline(r._targetDocument.activeElement)},sj_be(n,"keyup",function(n){n.keyCode==13&&s()},!0),sj_be(n,"click",function(){s()})):n.classList.contains(k)&&(h=function(){var t=r._targetDocument.getElementById("vidPreStopButton"),i,u;t&&t.focus();i=function(){n.focus()};sj_be(t,"click",i);sj_be(t,"keydown",function(n){n=sj_ev(n);n.keyCode===13&&i()});u=r._targetDocument.getElementsByTagName("video")[0];sj_be(u,"ended",i)},sj_be(n,"keydown",function(n){n.keyCode==13&&h()},!0),sj_be(n,"click",function(){h()})),n.classList.add(p),n.isProcessed=!0)},n.prototype.countUniqueHrefs=function(n){var r={},t,i;if(n)for(t=0;t<n.length;t++)i=n[t],i&&(r[i.href]=!0);return Object.keys(r).length},n.prototype.reactivateXYFocusOnBlur=function(n){sj_be(n,"blur",function(){n.classList.remove(i)})},n.prototype.focusFirstSerpElement=function(){var n,i,t,r;switch(this._verticalType){case 1:n=this._targetDocument.getElementById("b_content");break;case 2:n=this._targetDocument.getElementById("images");break;case 3:n=this._targetDocument.getElementById("video");break;default:throw Error("Unknown vertical type "+this._verticalType);}if(n)for(i=n.querySelectorAll('a:not([onclick=\'TestHooks.HideShowTestHooks(this);\']):not([disabled]):not([tabindex="-1"]), button:not([disabled]), input[type=text]:not([disabled]), textarea:not([disabled]), select:not([disabled]):not(#tta_sl), [tabindex]:not([disabled]):not([tabindex="-1"])'),t=0;t<i.length;t++)if(r=i[t],this.isVisible(r))return r.focus(),!0;return!1},n.prototype.clearFocusOutlineTimeout=function(){sb_ct(this._focusOutlineTimeout);this._focusOutlineTimeout=null},n}();t.WSBMiniSerpFocusHelper=o})(t=n.WSB||(n.WSB={}))}(AutoSuggest||(AutoSuggest={})),function(n){var t;(function(t){function i(n){switch(n){case"arrowRight":case"button":return!1;case"autoContent":case"keepOpen":case"alwaysWide":case"arrowUpOrDown":return!0}throw new Error("Unknown open type: "+n);}var r=function(){function r(i,r,u,f,e){var o=this;this._page=i;this._host=r;this._instrumentationHelper=f;this._sequenceNumberManager=e;this._previewPaneId=1;this._beforeItemLaunchEventHandlers=[];this._afterItemLaunchEventHandlers=[];this._scrollArea=_ge("qfPreviewScrollArea");this._loadingScreen=_ge("loadingScreen");var s=function(n,t,i,r){o._clickLoggedForCurrentPreviewPane||o._beforeItemLaunchEventHandlers.forEach(function(u){return u(n,o._previewedSuggestion,t,i,r)})},h=function(n){o._clickLoggedForCurrentPreviewPane||(o._afterItemLaunchEventHandlers.forEach(function(t){return t(o._previewedSuggestion,o._queryForPreviewedSuggestion,n)}),o._clickLoggedForCurrentPreviewPane=!0)},c=function(n){o._previewPaneResponseReceivedTimeStamp=n;o.resetLoadingScreen()};this._previewPaneViewModelParent={focusPending:!1,onBeforeItemLaunch:s,onAfterItemLaunch:h,startLoadingScreen:function(){return o.startLoadingScreen()},onResponseReceived:c};t.WSBLocalPreviewPaneViewModel&&(this._localPreviewPaneViewModel=new t.WSBLocalPreviewPaneViewModel(i,r,f,e,this._previewPaneViewModelParent));this._miniSerpViewModel=new t.MiniSerpViewModel(r,u,f,e,this._previewPaneViewModelParent);r.bindKeyDown(function(t,i){o._previewPaneViewModelParent.focusPending=!1;o.hasFocus()&&(t==27||t==115&&i.altKey)&&n.safeExecute(function(){return SearchAppWrapper.CortanaApp.dismissApp()},"dismissApp")});r.bindSearchBoxGotFocus(function(){return o._previewPaneViewModelParent.focusPending=!1});SearchAppWrapper.CortanaApp.addEventListener("resettingtodefaultsize",function(){return o.dismiss()});r.bindQueryChangedOrInitialized(function(n){return o._currentQuery=n},!0)}return r.prototype.init=function(n){this._selectionHandler=n},r.prototype.getSelectableItems=function(){return this._activePreviewPaneViewModel?this._activePreviewPaneViewModel.getSelectableItems():[]},r.prototype.getSelectedItem=function(){return this._activePreviewPaneViewModel?this._activePreviewPaneViewModel.getSelectedItem():null},r.prototype.select=function(n,t){this._activePreviewPaneViewModel&&this._activePreviewPaneViewModel.select(n,t)},r.prototype.onAfterKeyDown=function(n,t,i){if(this._activePreviewPaneViewModel)this._activePreviewPaneViewModel.onAfterKeyDown(n,t,i)},r.prototype.getPreviewedSuggestionToForceTopHit=function(){return this._forceTopHitForPreviewedSuggestion&&!this._closeTimer?this._previewedSuggestion:null},r.prototype.showPreview=function(n,r,u,f,e){if(u===void 0&&(u="button"),f===void 0&&(f=!1),e===void 0&&(e=0),this._previewPaneOpenedForThisQuery=!0,this.clearOpenTimer(),this.clearCloseTimer(),r!=this._previewedSuggestion||f){t.alwaysWide||this._page.setPreviewPaneVisibility(!0);var o={ppId:""+this._previewPaneId,openType:u,suggestion:r.instItem.getLayoutKValue()};e&&(o.openDelay=""+e);this._instrumentationHelper.logClientInstEvent("Select","PreviewPaneOpened",this._sequenceNumberManager.getSequenceNumber(),o);this.setPreviewPaneContent(n,r,i(u),this._previewPaneId)}u!="button"&&this._selectionHandler.updateSelectionState(r)},r.prototype.dismiss=function(){this.close(!0)},r.prototype.startLoadingScreen=function(){t.setVisibility(this._scrollArea,!1);t.setVisibility(this._loadingScreen,!0)},r.prototype.resetLoadingScreen=function(){t.setVisibility(this._loadingScreen,!1);t.setVisibility(this._scrollArea,!0)},r.prototype.close=function(i){var u=this,r;this.clearOpenTimer();r=i?0:t.config.closePreviewPaneDelay;r?this._closeTimer||(this._closeTimer=sb_st(function(){u._closeTimer=null;n.safeExecute(function(){return u.innerClose(i)},"ppCloseTimer")},r)):(this.clearCloseTimer(),this.innerClose(i))},r.prototype.innerClose=function(i){var r,u;this._previewedSuggestion&&(r=!0,i&&(this._clickLoggedForCurrentPreviewPane?r=!1:this._previewPaneResponseReceivedTimeStamp&&n.getCurrentTime()>this._previewPaneResponseReceivedTimeStamp+1e3&&(r=!1)),r&&(u=i?{fromQFDismiss:"1"}:undefined,this._instrumentationHelper.logClientInstEvent("Unselect","PreviewPaneClosed",this._sequenceNumberManager.getSequenceNumber(),u)),t.alwaysWide||i||this._page.setPreviewPaneVisibility(!1),this.resetLoadingScreen(),this.clear())},r.prototype.clear=function(){this._previewedSuggestion&&(this._previewedSuggestion.hasPreviewPaneOpened=!1,this._selectionHandler.updateSelectionState(this._previewedSuggestion),this._previewedSuggestion=null,this._queryForPreviewedSuggestion=null,this._previewPaneResponseReceivedTimeStamp=null,this._forceTopHitForPreviewedSuggestion=!1,this._clickLoggedForCurrentPreviewPane=!1,this._activePreviewPaneViewModel.clear(),this._activePreviewPaneViewModel=null,this._previewPaneViewModelParent.focusPending=!1)},r.prototype.onQueryChanged=function(n){var i,r;if((this._previewPaneOpenedForThisQuery=!1,i=this._queryForPendingPreviewedSuggestion||this._queryForPreviewedSuggestion,this._queryIsContinuationOfPreviousQuery=i&&n.queryToFetch.toLocaleLowerCase().startsWith(i.queryToFetch.toLocaleLowerCase()),i&&n.queryToFetch.toLocaleLowerCase()!=i.queryToFetch.toLocaleLowerCase())&&(r=this._pendingPreviewedSuggestion&&this._pendingPreviewedSuggestion.updateFromQuery?this._pendingPreviewedSuggestion:this._previewedSuggestion&&!this._closeTimer&&this._previewedSuggestion.updateFromQuery?this._previewedSuggestion:null,r)){if(t.alwaysWide){this.autoOpen(n,r,"alwaysWide",!0);return}this._queryIsContinuationOfPreviousQuery?(this._forceTopHitForPreviewedSuggestion=!1,this.autoOpen(n,r,"keepOpen",!0)):this.close(!1)}},r.prototype.clearOpenTimer=function(){this._openTimer&&(sb_ct(this._openTimer),this._openTimer=null,this._pendingPreviewedSuggestion=null,this._queryForPendingPreviewedSuggestion=null,this.resetLoadingScreen())},r.prototype.clearCloseTimer=function(){this._closeTimer&&(sb_ct(this._closeTimer),this._closeTimer=null)},r.prototype.onTopHitUpdated=function(i,r,u,f){if(u){if(!this._closeTimer){if(this._openTimer&&this._pendingPreviewedSuggestion!=u&&this.clearOpenTimer(),this._pendingPreviewedSuggestion&&t.isEquivalentForPreviewPanePurposes(i,this._pendingPreviewedSuggestion,u)){this._pendingPreviewedSuggestion=u;this._queryForPendingPreviewedSuggestion=i;u.hasPreviewPaneOpened=!0;return}if(this._previewedSuggestion&&t.isEquivalentForPreviewPanePurposes(i,this._previewedSuggestion,u)){n.contains(f,r)||(this._previewedSuggestion=u,this._queryForPreviewedSuggestion=i,u.hasPreviewPaneOpened=!0,this.refreshLocalContent(i,u));return}}if(this._forceTopHitForPreviewedSuggestion=!1,t.supportsPreview(u)!=0){if(t.alwaysWide){this.autoOpen(i,u,"alwaysWide",!1);return}if(u==f[0]&&!this._previewPaneOpenedForThisQuery){if(u.autoOpenPreviewPaneWhenOnTopHit){this.autoOpen(i,u,"autoContent",!1);return}if(this._previewedSuggestion&&this._queryIsContinuationOfPreviousQuery){this.autoOpen(i,u,"keepOpen",!1);return}}}}this._openTimer&&this.clearOpenTimer();this._previewedSuggestion&&this.close(!1)},r.prototype.getDelayForMiniSerp=function(n,i){switch(n){case"keepOpen":case"alwaysWide":return t.alwaysWide?i.isAnswer?0:t.config.autoOpenMiniSerpDelay:t.config.keepMiniSerpOpenDelay;case"arrowUpOrDown":return t.config.openOnKeybNavMiniSerpDelay}return 0},r.prototype.autoOpen=function(i,r,u,f){var e=this,s=t.supportsPreview(r)==1,o=s?this.getDelayForMiniSerp(u,r):0;o?(this.clearOpenTimer(),this.clearCloseTimer(),this._pendingPreviewedSuggestion=r,this._queryForPendingPreviewedSuggestion=i,this._openTimer=sb_st(function(){e._openTimer=null;r=e._pendingPreviewedSuggestion;e._pendingPreviewedSuggestion=null;e._queryForPendingPreviewedSuggestion=null;n.safeExecute(function(){return e.showPreview(i,r,u,f,o)},"ppOpenTimer")},o),s&&this.startLoadingScreen()):this.showPreview(i,r,u,f)},r.prototype.onAfterKeyDownWhenSuggestionSelected=function(n,i,r){t.alwaysWide&&t.config.openOnKeybNavMiniSerp&&(n==40||n==38)&&t.supportsPreview(r)!=0?this._previewedSuggestion!=r&&this.autoOpen(i,r,"arrowUpOrDown",!1):n==t.getRtlAdjustedKey(39)&&this._currentQuery.originalCursorPosition==this._currentQuery.originalQuery.length&&t.supportsPreview(r)!=0&&this._host.searchBoxHasFocus()?((this._previewedSuggestion!=r||this._closeTimer)&&this.showPreview(i,r,"arrowRight"),this._activePreviewPaneViewModel.focus(),this._forceTopHitForPreviewedSuggestion=!0):n==t.getRtlAdjustedKey(37)&&this._activePreviewPaneViewModel&&this._activePreviewPaneViewModel.hasFocus()&&this._host.setFocusInSearchBox("previewPaneUnfocus")},r.prototype.refreshLocalContent=function(n,i){t.supportsPreview(i)==2&&this._localPreviewPaneViewModel.update(i,n,!0,undefined,!0)},r.prototype.setPreviewPaneContent=function(n,i,r){this.clear();this._previewedSuggestion=i;this._previewedSuggestion.hasPreviewPaneOpened=!0;this._previewPaneResponseReceivedTimeStamp=null;this._queryForPreviewedSuggestion=n;t.supportsPreview(i)==2?(this._activePreviewPaneViewModel=this._localPreviewPaneViewModel,this._localPreviewPaneViewModel.update(i,n,r,this._previewPaneId++)):(this.startLoadingScreen(),this._activePreviewPaneViewModel=this._miniSerpViewModel,this._miniSerpViewModel.update(i,n,r,this._previewPaneId++))},r.prototype.bindBeforeItemLaunch=function(n){this._beforeItemLaunchEventHandlers.push(n)},r.prototype.bindAfterItemLaunch=function(n){this._afterItemLaunchEventHandlers.push(n)},r.prototype.hasFocus=function(){return this._activePreviewPaneViewModel?this._activePreviewPaneViewModel.hasFocus():!1},r}();t.PreviewPane=r})(t=n.WSB||(n.WSB={}))}(AutoSuggest||(AutoSuggest={})),function(n){var t;(function(t){var i=SearchAppWrapper.CortanaApp,e=21600,o="/account/permissions/sso?",u="/agents/oauth?",r="Office365",f="Outlook",s="0a0a29f9-0a25-49c7-94bf-c53c3f8fa69d",h="6df4d00742ec458795c9588001737872-fbbe95f5-f25d-4197-9d6f-7c3eb54c745f-6908",c=function(){function c(i){var r=this;this._triggerSSO=!0;t.WebTelemetry&&t.WebTelemetry.init(h);sj_be(_w,"load",function(){r.launchSSO()});t.config.enablePeriodicalSSO&&(c._latestSSOTimestamp||(c._latestSSOTimestamp=n.getCurrentTime()),i.bindAppHidden(function(){r.launchPeriodicalSSO()}))}return c.prototype.launchPeriodicalSSO=function(){var t=(n.getCurrentTime()-c._latestSSOTimestamp)/1e3;t>=e&&(this._triggerSSO=!0,this.launchSSO(),c._latestSSOTimestamp=n.getCurrentTime())},c.prototype.launchSSO=function(){var u=this,e=function(){var e=i.isCortanaEnabled?n.safeExecute(function(){return i.getCortanaCapabilities()},"getCortanaCapabilities","").split(","):[],o=n.contains(e,"Personalization");i.currentState==0&&u._triggerSSO&&o&&(u._triggerSSO=!1,t.config.wamSupported?t.Promise.safeChain("enumerateAccountAuthorityAsync",function(){return i.authenticationManager.enumerateAccountAuthorityAsync()},function(n){var i=n.Windows,e=n.Cortana;t.WebTelemetry&&t.WebTelemetry.logSignInAccountEvent(i,e);i=="organizations"?u.silentSignIn(r):i=="consumers"&&e=="consumers"&&u.silentSignIn(f)}):t.Promise.safeChain("getQueryHeadersAsync",function(){return i.getQueryHeadersAsync()},function(n){n&&(u.silentSignIn(r),n["X-Search-RPSToken"]&&u.silentSignIn(f))}))};n.isBrowserOnline()?e():sj_be(_w,"online",function(){e()})},c.prototype.silentSignIn=function(f){var c=this,e=o+"campaign_source=WSB&provider="+f,h;t.config.th&&(e=ClientTestHooks.CopyTestParameters(_w.location.search,e));h=function(e){var h,o;t.WebTelemetry&&t.WebTelemetry.logShouldSSOEvent(f,e?!0:!1);e&&(h=function(n){var i=n&&!n.IsError;t.WebTelemetry&&t.WebTelemetry.logAuthCompleteEvent(f,f==r&&t.config.wamSupported?"assertion":"code",i)},n.isBrowserOnline()&&i.currentState==0&&(t.config.wamSupported&&f==r?(o=i.authenticationManager.createAuthenticateRequest(),o.accountType="Windows",o.resource=s,t.Promise.safeChain("authenticateAsyncOBO",function(){return i.authenticationManager.authenticateAsync(o)},function(i){var r=i&&i.token,e,o;t.WebTelemetry&&(e=r?0..toString():i&&i.status!=0?i.status.toString():"-1",t.WebTelemetry.logClientAuthEvent(f,"WAM",e));r&&(o=u+"provider="+f+"&campaign_source=WSB&assertion="+i.token,n.fetchUrlJson(o,{},null,h))})):c.refreshOAuthToken(f,e.AuthUrl,e.CallbackUrl,e.Options||1,h)))};n.fetchUrlJson(e,{},null,h)},c.prototype.refreshOAuthToken=function(r,f,e,o,s){t.Promise.safeChain("authenticateAsyncSSO",function(){return i.authenticateAsync(o,f,e)},function(i){if(t.WebTelemetry&&t.WebTelemetry.logClientAuthEvent(r,"WAB",i?0..toString():"-1"),i){var f=i.split("?")[1],e=u+f;n.fetchUrlJson(e,{},null,s)}})},c}();t.ProactiveSSO=c})(t=n.WSB||(n.WSB={}))}(AutoSuggest||(AutoSuggest={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(t){var i=function(i){function r(){return i!==null&&i.apply(this,arguments)||this}return __extends(r,i),r.prototype.fetchUrl=function(i,r,u,f,e,o){var h=this,s;if(n.isBrowserOnline()){var v=u?1:0,c=SearchAppWrapper.CortanaApp,l=c.createStringMap(),a=c.createStringMap();if(r)for(s in r)s.toLowerCase().startsWith("content")?a[s]=r[s]:l[s]=r[s];t.Promise.safeChain("makeHttpRequestAsync",function(){return c.makeHttpRequestAsync(v,i,l,u,a)},function(i){o()&&(i.statusCode===200?t.Promise.safeChain("readResponse",function(){return i.readAsStringAsync()},function(i){if(o()){t.config.th&&i&&(i=i.replace(new RegExp("<!--[^]*?-->","gm"),""));var r=i?n.safeExecute(function(){return JSON.parse(i)},"parseCortanaHttpResponse",null,null):null;r!=null?f(h._dataSource,r,null):f(h._dataSource,null,null)}},function(){return f(h._dataSource,null,null)},e):f(h._dataSource,null,i.statusCode.toString()))},function(){return f(h._dataSource,null,null)},e)}else f(this._dataSource,null,null,null,!0)},r}(n.JsonDataProvider);t.CortanaJsonDataProvider=i})(t=n.WSB||(n.WSB={}))}(AutoSuggest||(AutoSuggest={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(t){var f="NT",r="https://substrate.office.com{0}/api/v1/",p=r+"events",w=r+"init",b=r+"suggestions?query=",k=r+"query",d=r+"recommendations",h="SubstrateSearchService",g="https://outlook.office365.com/autodiscover/autodiscover.json/v1.0/{0}?Protocol={1}",u="AutoDiscoveryKey",c="3sflights",nt="3sdebug",e="gwsflt.",tt="textdecorations",l="scenario",it="setflight",rt="debug",a="entitytypes",ut="1",ft="scopes",et="people.directorysearch",ot="Authorization",o="Content-Type",st="X-AnchorMailbox",ht="X-Client-Language",ct="X-Client-LocalTime",v="Client-Request-Id",lt="User-Agent",at="X-Debug-ExternalExp",vt="X-Client-Flights",s="application/json",yt=6e4,i,y=!1,pt=function(r){function pt(f,o,s,h,l,a){var v=r.call(this,pt.getDataSource(h,l))||this,b,k,d,p;return v._host=f,v._accessTokenManager=o,v._instrumentationHelper=s,v._authType=h,v._providerType=l,v._storage=a,v._autoDiscoveryData={stem:"/search",timestamp:-1},y||(y=!0,k=function(n){return n.split(",").filter(function(n){return n.toLocaleLowerCase().startsWith(e)}).map(function(n){return n.substr(e.length)}).join(",")},t.config.th&&(i=k(ClientTestHooks.getUrlValue(c,""))),ThresholdUtilities.getCortanaHeaders(function(n){var t,r;n&&(t=n["X-BM-ClientFeatures"],t&&(r=k(t),r&&(i=(i?i+",":"")+r)))})),t.config.th&&ClientTestHooks.isTesthookParamSet("clearAutoDCache")&&v._storage.removeItem(u),d=v._storage.getItem(u),d&&(p=n.safeExecute(function(){return JSON.parse(d)},"parseAutoDiscovery",null),p&&!p.errorState?v._autoDiscoveryData=p:v._storage.removeItem(u)),v._host.bindAccessTokenAvailable(function(t){var r,f,i;if(t==v._authType){if(v._providerType==0){if(r=n.getCurrentTime(),b&&(f=r-b,f<yt))return;b=r;v.fetchUrl(w,null,"",function(){},null,function(){return!0})}i=n.getCurrentDate();i.setDate(i.getDate()-1);v._autoDiscoveryData.timestamp<i.getTime()&&v.getStem()(t,function(t){t.timestamp=n.getCurrentTime();v._autoDiscoveryData=t;t.errorState||v._storage.setItem(u,JSON.stringify(t))})}}),v}return __extends(pt,r),pt.prototype.getName=function(){return"SubstrateDataProvider "+this._dataSource},pt.prototype.createUrl=function(i){if(this._providerType==1)return i.queryToFetch?this.getBaseUrl():d;if(i.scope==t.Scope.Documents){var u=t.getEffectiveQuery(i);if(u!=i.queryToFetch)return this.getBaseUrl()+n.encodeQueryParameter(u.toLocaleLowerCase())}return r.prototype.createUrl.call(this,i)},pt.prototype.getBaseUrl=function(){return this._providerType==1?k:b},pt.getDataSource=function(n,t){return t==0?n==1?"SSUE":"SSUC":n==1?"SSEE":"SSEC"},pt.prototype.getPostBody=function(n){var i,u,f,r;if(this._providerType==1){i=void 0;u=t.getEffectiveScope(n);switch(u){case t.Scope.Emails:f=[{Score:{SortDirection:"Desc",Count:t.config.maxNumberOfEmailsInTopResult}},{Time:{SortDirection:"Desc"}}];i=this.buildPostBodyForQueryEndpoint(n,"Message",["Exchange"],f);break;case t.Scope.Documents:if(r=void 0,n.queryToFetch){switch(t.config.queryProvenances){case 0:r=["SharePoint"];break;case 1:r=["OneDriveBusiness"];break;case 2:r=["SharePoint","OneDriveBusiness"];break;default:throw new Error("Unexpected query provenances: "+t.config.queryProvenances);}i=this.buildPostBodyForQueryEndpoint(n,"Documents",r,[{Score:"Desc"}])}else i=this.buildPostBody("Document","OpenFile");break;default:throw new Error("Unsupported scope "+n.scope);}return JSON.stringify(i)}return""},pt.prototype.buildPostBodyForQueryEndpoint=function(n,t,i,r){return this.buildPostBody(t,"WindowsSearchBoxL2",n.queryToFetch,i,r,"ProvenanceOptimized","Forward")},pt.prototype.buildPostBody=function(n,t,i,r,u,f,e){return{EntityRequests:[{Query:i?{QueryString:i}:undefined,EntityType:n,Provenances:r,Sort:u,PropertySet:f}],Cvid:this._host.getConversationId(),TextDecorations:e,Scenario:{Name:t}}},pt.prototype.getStem=function(){var i=this;return t.Promise.safeChainWithGlobalCaching("getStem",function(u){return ThresholdUtilities.createPromise(function(e){i._accessTokenManager.getAccount(u,t.getSubstrateResourceOrScope(u),!1,!0,function(t){var c,u,l;t&&t.UserName?(c=n.formatString(g,[t.UserName,h]),u={},u[o]=s,u[v]=i._host.getConversationId(),l=function(t,i,r){var u,f,o;if(r){e({stem:"",errorState:r});return}if(u=i,!u){e({stem:""});return}if(!u.Url){e({stem:"",errorState:"NAU"});return}if(u.Protocol!=h){e({stem:"",errorState:"NAP"});return}if(f=n.tryParseUrl(u.Url,!0),o=f?f.path:null,!o){e({stem:"",errorState:"NAS"});return}e({stem:o})},r.prototype.fetchUrl.call(i,c,u,"",l,null,function(){return!0})):e({stem:"",errorState:f})},t.getAuthAccountForCloudContent())})},function(){return"autoDiscovery"})},pt.prototype.fetchUrl=function(i,u,e,o,s,h){var c=this,l;if(!this._autoDiscoveryData.stem){o(this._dataSource,null,this._autoDiscoveryData.errorState,null,!0);return}i=n.formatString(i,[this._autoDiscoveryData.stem]);u||(u={});l=function(n){if(n){var l=n.Token;l?(u[ot]="Bearer "+l,c._authType==1&&!t.SubstrateTenantName&&n.TenantName&&(t.SubstrateTenantName=n.TenantName),u[st]=n.RoutingHint,r.prototype.fetchUrl.call(c,i,u,e,o,s,h)):o(c._dataSource,null,f)}else o(c._dataSource,null,f)};this._accessTokenManager.getAccount(this._authType,t.getSubstrateResourceOrScope(this._authType),!1,!0,l,t.getAuthAccountForCloudContent())},pt.prototype.fetch=function(u,f,e,h,c,l){var p=this,y,w,b;if(n.isDataSourceEnabled(this._dataSource,u)){if(y={},y[ht]=t.uiLanguageCache,y[ct]=n.getDateWithTimezone(),y[lt]=navigator.userAgent,typeof _CachedFlights!="undefined"&&_CachedFlights.sort&&(y[at]=_CachedFlights.sort().join(",")),y[v]=this._instrumentationHelper.getImpressionGuid(e),w=this.buildParams(l,u.scope),this._providerType==0){if(!w[a])return}else y[o]=s;i&&(y[vt]=i);b=function(n,i,r){var u=parseInt(r);(u==403||u==401)&&sb_st(function(){return p._accessTokenManager.getAccount(p._authType,t.getSubstrateResourceOrScope(p._authType),!0,!0,function(){},t.getAuthAccountForCloudContent())},0);f(n,i,r)};r.prototype.fetch.call(this,u,b,e,h,c,w,y)}},pt.prototype.buildParams=function(i,r){var u={},f;return this._providerType==0&&(u[n.Service.QueryParams.ConversationId]=i[n.Service.QueryParams.ConversationId],u[tt]=ut,t.config.peopleSearchEntireDirectoryInL2&&r==t.Scope.People&&this._authType==1?u[l]=et:r!=t.Scope.All&&(u[l]=ft),u[a]=this.getEntityTypes(r)),t.config.th&&(f=ClientTestHooks.getUrlValue(c,"").split(",").filter(function(n){return!n.toLocaleLowerCase().startsWith(e)}).join(","),f&&(u[it]=f),ClientTestHooks.isTesthookParamSet(nt)&&(u[rt]="1")),u},pt.prototype.getEntityTypes=function(n){var i,r;switch(n){case t.Scope.Documents:i="Documents";break;case t.Scope.People:i="People";break;case t.Scope.All:r=[];this._authType==1&&r.push("Documents");(this._authType==1||t.qfMode!=3)&&r.push("People");i=r.join(",");break;default:throw new Error("Unsupported scope "+n);}return i},pt.prototype.instrumentClick=function(t,i){if(t&&i){var u=[{Key:t,Value:[{Name:"entityclicked",Attributes:[{Key:"id",Value:i},{Key:"localtime",Value:n.getDateWithTimezone()}]}]}],r={};r[o]=s;this.fetchUrl(p,r,JSON.stringify(u),function(){},null,function(){return!0})}},pt}(t.CortanaJsonDataProvider);t.SubstrateDataProvider=pt})(t=n.WSB||(n.WSB={}))}(AutoSuggest||(AutoSuggest={})),function(n){var t;(function(t){function v(n,i,r){var u=t.OfficeTypeExtensionConfigs[n];u?t.LocalDataProvider.getApps(u.appIds,function(n){var f=!t.Map.isEmpty(n);f?i(u.uri):r()}):r()}function y(n,t,i){v(t,function(t){return i.launchUrl(t+n)},function(){return i.launchUrl(n+"?web=1")})}function p(n,i,r,u,f){t.setExtraVerbs(n,function(){var t=[];return t.push({verb:"OpenInBrowser",displayName:f.getLocString("OpenInBrowser"),executeSync:function(){return f.launchUrl(r)},icon:{type:1,content:"&#xE774"}}),n.locationUrl&&t.push({verb:"OpenFileLocationInBrowser",displayName:f.getLocString("OpenFileLocationIn",u),executeSync:function(){return f.launchUrl(n.locationUrl)},icon:{type:2,content:"&#xE838"}}),n.url&&SearchAppWrapper.CortanaApp.copyToClipboard&&t.push({verb:"CopyFullPath",displayName:f.getLocString("CopyFullPath"),executeSync:function(){return SearchAppWrapper.CortanaApp.copyToClipboard(n.url,"")},icon:{type:1,content:"&#xE8C8"}}),t},!1)}function w(n,t,i,r){var f,e=t.toLocaleLowerCase(),s=decodeURI(i).toLocaleLowerCase().indexOf(e),u,o;s!=-1&&(f=i.substr(0,s-1),e.endsWith(".one")&&(f=f.substr(0,f.lastIndexOf("/"))));u=decodeURI(i).split("/");r?(o="OneDrive for Business:\\",u.length>5&&u[3].toLocaleLowerCase()=="personal"&&u[5].toLocaleLowerCase()=="documents"&&(u=u.slice(6))):(u=u.slice(3),o="SharePoint:\\");e.endsWith(".one")&&u.splice(u.length-2,1);n.path=o+u.join("\\");n.url=i;f&&(n.locationUrl=f)}function c(i,r,u,f,e,o,s,h,c,l,a,v,b,k,d,g,nt,tt){var ut=t.ScopeConfig[t.Scope.Documents].icon,ft=i+"?web=1",it,rt;return u=HitHighlightingParser.removeMarkers(u),f&&(f=f.toLocaleLowerCase()),it=t.createSuggestion(r,t.getIconForTypeAsync(ut,"."+f),ut,"FL",u,n.InstrumentedItem.createInstrumentedItem(v),8,v,!0),it.instrumentPingBack=a,it.click=function(){return y(i,f,d)},it.extensionLC="."+f,it.lastModifiedDate=t.toDate(o),it.lastModifiedBy=s,it.author=h,it.matchedOnlyOnAuthor=c,it.matchedOnlyOnContent=l,it.textContentIfMatched=g,rt=e?3:4,w(it,u,i,e),e||(it.siteTitle=tt),c?it.match=t.createMatch(t.MatchType.Author,h):r.includes(HitHighlightingParser.startMarker)||(it.match=t.tryGetLocationMatch(it.path,b)||nt),it.sourceForGroup=rt,t.setFileTemplate(b,k,it,d),p(it,f,ft,t.getGroupSourceDisplayName(rt,d),d),it}var o=/[0-9a-zA-Z]/,l=/\s+/g,u={Word:{appIds:["Microsoft.Office.WINWORD.EXE.15","Microsoft.Office.WINWORD.EXE.16","{6D809377-6AF0-444B-8957-A3773F02200E}\\Microsoft Office\\Office15\\WINWORD.EXE","{7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E}\\Microsoft Office\\Office15\\WINWORD.EXE","{6D809377-6AF0-444B-8957-A3773F02200E}\\Microsoft Office\\Office16\\WINWORD.EXE","{7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E}\\Microsoft Office\\Office16\\WINWORD.EXE","Microsoft.Office.Word_8wekyb3d8bbwe!microsoft.word"],uri:"ms-word:ofe|u|"},Excel:{appIds:["Microsoft.Office.EXCEL.EXE.15","Microsoft.Office.EXCEL.EXE.16","{6D809377-6AF0-444B-8957-A3773F02200E}\\Microsoft Office\\Office15\\EXCEL.EXE","{7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E}\\Microsoft Office\\Office15\\EXCEL.EXE","{6D809377-6AF0-444B-8957-A3773F02200E}\\Microsoft Office\\Office16\\EXCEL.EXE","{7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E}\\Microsoft Office\\Office16\\EXCEL.EXE","Microsoft.Office.Excel_8wekyb3d8bbwe!microsoft.excel"],uri:"ms-excel:ofe|u|"},PowerPoint:{appIds:["Microsoft.Office.POWERPNT.EXE.15","Microsoft.Office.POWERPNT.EXE.16","{6D809377-6AF0-444B-8957-A3773F02200E}\\Microsoft Office\\Office15\\POWERPNT.EXE","{7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E}\\Microsoft Office\\Office15\\POWERPNT.EXE","{6D809377-6AF0-444B-8957-A3773F02200E}\\Microsoft Office\\Office16\\POWERPNT.EXE","{7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E}\\Microsoft Office\\Office16\\POWERPNT.EXE","Microsoft.Office.PowerPoint_8wekyb3d8bbwe!microsoft.pptim"],uri:"ms-powerpoint:ofe|u|"},Visio:{appIds:["{7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E}\\Microsoft Office\\Office15\\VISIO.EXE","{7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E}\\Microsoft Office\\Office14\\VISIO.EXE","{6D809377-6AF0-444B-8957-A3773F02200E}\\Microsoft Office\\Office16\\VISIO.EXE","{7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E}\\Microsoft Office\\Office16\\VISIO.EXE","Microsoft.Office.VISIO.EXE.15"],uri:"ms-visio:ofe|u|"},OneNote:{appIds:["Microsoft.Office.ONENOTE.EXE.15","Microsoft.Office.ONENOTE.EXE.16","{6D809377-6AF0-444B-8957-A3773F02200E}\\Microsoft Office\\Office15\\ONENOTE.EXE","{7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E}\\Microsoft Office\\Office15\\ONENOTE.EXE","{6D809377-6AF0-444B-8957-A3773F02200E}\\Microsoft Office\\Office16\\ONENOTE.EXE","{7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E}\\Microsoft Office\\Office16\\ONENOTE.EXE","Microsoft.Office.OneNote_8wekyb3d8bbwe!microsoft.onenoteim"],uri:"onenote:"}},a=["Microsoft.Office.lync.exe.15","{6D809377-6AF0-444B-8957-A3773F02200E}Microsoft OfficeOffice15lync.exe","{6D809377-6AF0-444B-8957-A3773F02200E}Microsoft OfficeOffice16lync.exe","{7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E}Microsoft OfficeOffice15lync.exe","{7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E}Microsoft OfficeOffice16lync.exe","{6D809377-6AF0-444B-8957-A3773F02200E}MSOfficeOffice15lync.exe","{6D809377-6AF0-444B-8957-A3773F02200E}MSOfficeOffice16lync.exe","{7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E}MSOfficeOffice15lync.exe","{7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E}MSOfficeOffice16lync.exe",],i=u.Word,r=u.Excel,f=u.PowerPoint,s=u.Visio,e,h;t.OfficeTypeExtensionConfigs={doc:i,dot:i,dotx:i,docx:i,docm:i,docb:i,xls:r,xlm:r,xlsx:r,xlsm:r,xlsb:r,xltx:r,ppt:f,pps:f,pptx:f,pptm:f,vsd:s,vsdx:s,one:u.OneNote};e="sip:";h=function(){function i(n,i,r,u,f,e){var o=this;this._host=n;this._substrateSuggestionsDataProvider=i;this._instrumentationHelper=r;this._accessTokenManager=u;this._sequenceNumberReader=f;this._authType=e;this._mailboxLocations={};n.bindAccessTokenAvailable(function(n){if(o._authType==n){var i=n==1||t.config.msaProfilePictureEnabled;i&&o.getProfilePictureToken(function(){})}})}return i.prototype.parse=function(i,r,u,f,e,o){var h=this,s;if(n.isDataSourceEnabled(u,i)){if(s=[],!f||!f.Groups){o(u,s,null);return}var l=t.qfMode!=3&&(u=="SSUE"||t.config.msaPeopleCardHandoffEnabled),v=t.getEffectiveQuery(i),y=t.isL2(i),p=function(a){for(var p,it,rt,b,nt,ut,ft,d,tt,k,w=0,g=f.Groups;w<g.length;w++)if(p=g[w],p.Suggestions&&p.Suggestions.length)switch(p.Type){case"Documents":for(it=p.Suggestions,rt=function(i){var u=n.safeExecute(function(){return c(i.Url,i.Text,i.FileName,i.FileExtension,i.FileSourceType=="OneDriveForBusiness",i.DateModified,null,i.CreatedBy||HitHighlightingParser.removeMarkers(i.Author),i.PropertyHits&&i.PropertyHits[0]=="Author",!1,function(){return h._substrateSuggestionsDataProvider.instrumentClick(f.Instrumentation.TraceId,i.ReferenceId)},r,v,y,h._host,"",null,i.SourceTitle||"")},"buildSubstrateDocumentSuggestion");u&&t.isValidSuggestion(u,"SubstrateDocumentsSuggestionsParser")&&s.push(u)},b=0,nt=it;b<nt.length;b++)k=nt[b],rt(k);t.decorateSuggestionsWithParentFolder(s,h._host);break;case"People":for(ut=p.Suggestions,ft=function(i){var e=n.safeExecute(function(){return h.buildPersonSuggestion(l,i,r,f.Instrumentation.TraceId,y,u,v,a)},"buildPersonSuggestion");e&&t.isValidSuggestion(e,"SubstratePeopleSuggestionsParser")&&s.push(e)},d=0,tt=ut;d<tt.length;d++)k=tt[d],ft(k);l&&n.safeExecute(function(){return h.prefetchPeopleCards(s.filter(function(n){return n.type=="PPL"}),r,e)},"prefetchPeopleCards");t.isL2(i)||h.decorateContactsWithSameDisplayName(s,i);break;default:SharedLogHelper.LogError("parseSubstrateResponse",p.Type,new Error("Unexpected group type"))}o(u,s,null)};u=="SSUE"?t.LocalDataProvider.getApps(a,function(n){return p(!t.Map.isEmpty(n))}):p(!1)}},i.prototype.prefetchPeopleCards=function(n,i,r){var u=this;n.length&&this.getPeopleCardTokenAndMailboxLocation(function(f){var s,e,o,h;f&&f.token&&f.location&&i==u._sequenceNumberReader.getSequenceNumber()&&r()&&(s=f.location+"api/v1/personacards/preparePersona",e=SearchAppWrapper.CortanaApp.createStringMap(),e.Authorization="Bearer "+f.token,e["X-ClientCorrelationId"]=u._instrumentationHelper.getImpressionGuid(i),e["X-ClientType"]="6",o=SearchAppWrapper.CortanaApp.createStringMap(),o["Content-Type"]="application/json",h=JSON.stringify(n.map(function(n){return{Smtp:n.email,PersonaType:"User"}})),t.Promise.safeChain("prefetchPeopleCards",function(){return SearchAppWrapper.CortanaApp.makeHttpRequestAsync(1,s,e,h,o)},function(n){if(n.statusCode!=204){var t=new Error("Prefetch request failed with status code: "+n.statusCode);SharedLogHelper.LogError("prefetchPeopleCards",null,t)}}))})},i.prototype.buildPersonSuggestion=function(i,r,u,f,o,s,h,c){var p=this,d,a,g,y;if(!r.EmailAddresses||!r.EmailAddresses[0])return null;var nt=this.getPersonIcon(r.DisplayName),tt=r.EmailAddresses[0],v=HitHighlightingParser.removeMarkers(tt),w=s=="SSUE",l=t.createSuggestion(r.Text,w||t.config.msaProfilePictureEnabled?this.getProfilePictureIcon(v,nt):null,nt,"PPL",r.DisplayName,n.InstrumentedItem.createInstrumentedItem(u),w?8:12,u,!0),b=r.Id,k;return w&&(d=r.Id.split("@"),b=d[0],k=d[1]),l.email=v,l.emailHH=tt,l.uniqueName=v,a=r.ImAddress,a&&!a.startsWith(e)&&(a=a.includes(":")?undefined:e+a),a&&(l.imAddress=a,g=a.substr(e.length),g!=v&&(l.alternativeEmail=g)),y=b&&k&&!i,l.tooltip=this.getPersonTooltip(r.DisplayName,r.Department,r.JobTitle,r.OfficeLocation,r.CompanyName,v,l.alternativeEmail),l.instrumentPingBack=function(){return p._substrateSuggestionsDataProvider.instrumentClick(f,r.ReferenceId)},l.click=function(n){return p.onPersonSuggestionClick(i,y,v,l.query,u,n,b,k)},this.setPersonTemplate(l,o,r.JobTitle,h),this.setPersonContextMenuItems(l,i||y,c),!t.alwaysWide&&(i||y)&&(l.calculateChildSuggestions=function(){return p.getPersonChildSuggestions(l,u,s,c)}),l},i.prototype.getPersonChildSuggestions=function(n,t,i,r){var u=[];u.push(this.getChildSuggestion(n,"CortanaAnnotation_Email","&#xE715","mailto:"+n.email,"PPLE",t));n.imAddress&&r&&u.push(this.getChildSuggestion(n,"SendInstantMessage","&#xE8BD",n.imAddress,"PPLM",t));n.childSuggestions=u;n.calculateChildSuggestions=null;this._instrumentationHelper.instrumentDataSource(t,i,n.childSuggestions,null)},i.prototype.getChildSuggestion=function(i,r,u,f,e,o){var c=this,h=this._host.getLocString(r),s=t.createSuggestion(h,null,{type:2,content:u},e,h,n.InstrumentedItem.createInstrumentedItem(o),i.handoffType,o,!1);return s.parent=i,s.groupType=t.GroupType.Contact,s.click=function(){return c._host.launchUrl(f)},s.instrumentPingBack=i.instrumentPingBack,s},i.prototype.getProfilePictureToken=function(n){this._accessTokenManager.getAccount(this._authType,this._authType==1?"https://outlook.office.com/":"https://outlook.office.com/User.ReadWrite",!1,!0,function(t){return n(t?t.Token:null)},t.getAuthAccountForCloudContent())},i.prototype.getPeopleCardTokenAndMailboxLocation=function(i){var r=this;this._accessTokenManager.getAccount(this._authType,this._authType==1?"394866fc-eedb-4f01-8536-3ff84b16be2a":"LiveProfileCard.Access",!1,!0,function(u){var f,o,s,e;if(!u||!u.Token){i(null);return}if(f=u.Token,o=r._mailboxLocations[u.RoutingHint],o){i({token:f,location:o});return}s=SearchAppWrapper.CortanaApp.createStringMap();e=SearchAppWrapper.CortanaApp.createStringMap();e.Authorization="Bearer "+f;e["X-ClientType"]="6";t.Promise.safeChain("lokiConfiguration",function(){return SearchAppWrapper.CortanaApp.makeHttpRequestAsync(0,t.config.peopleCardLokiHost+"api/v1/configuration/cortana",e,"",s)},function(e){if(e.statusCode!==200){i(null);return}t.Promise.safeChain("lokiConfigurationResponse",function(){return e.readAsStringAsync()},function(t){if(!t){i(null);return}var e=n.safeExecute(function(){return JSON.parse(t)},"parseLokiConfiguration");if(!e||!e.LokiUrl){i(null);return}r._mailboxLocations[u.RoutingHint]=e.LokiUrl;i({token:f,location:e.LokiUrl})},function(){return i(null)})},function(){return i(null)})},t.getAuthAccountForCloudContent())},i.prototype.getSharePointHost=function(n){for(var f,i,e,t,s,l,a,v=new DOMParser,u=0,h=n.value;u<h.length;u++)if(f=h[u],f.serviceElements)for(i=0,e=f.serviceElements;i<e.length;i++){var y=e[i],p=v.parseFromString(y,"text/xml"),r=p.getElementsByTagName("ServiceParameter"),o=void 0,c=!1;for(t=0;t<r.length;t++)if(s=r[t].getElementsByTagName("Name"),s[0].childNodes[0].nodeValue=="IsDefaultDataLocation"?(l=r[t].getElementsByTagName("Value"),l[0].childNodes[0].nodeValue=="True"&&(c=!0)):s[0].childNodes[0].nodeValue=="SPO_MySiteHost_AboutMeUrl"&&(a=r[t].getElementsByTagName("Value"),o=a[0].childNodes[0].nodeValue),c&&o)return o}return null},i.prototype.onPersonSuggestionClick=function(i,r,u,f,e,o,s,h){var c=this,l=function(){return c._host.launchUrl("mailto:"+u)},a=function(){var i=function(){return c._host.launchUrl(c._sharePointSiteHostUrl+"?aadObjectId="+s)};c._sharePointSiteHostUrl?i():c._accessTokenManager.getAccount(1,"https://graph.windows.net/",!1,!0,function(r){if(!r||!r.Token){l();return}var f=SearchAppWrapper.CortanaApp.createStringMap(),u=SearchAppWrapper.CortanaApp.createStringMap();u.Authorization="Bearer "+r.Token;t.Promise.safeChain("getSharePointUrl",function(){return SearchAppWrapper.CortanaApp.makeHttpRequestAsync(0,"https://graph.windows.net/"+h+"/tenantDetails/"+h+"/serviceInfo?api-version=1.6-internal",u,"",f)},function(r){if(r.statusCode!==200){l();return}t.Promise.safeChain("readSharePointUrlResponse",function(){return r.readAsStringAsync()},function(t){var r=t?n.safeExecute(function(){return JSON.parse(t)},"parseSharePointUrlResponse"):null;if(!r){l();return}c._sharePointSiteHostUrl=c.getSharePointHost(r);c._sharePointSiteHostUrl?i():l()},l)},l)},t.getAuthAccountForCloudContent())};i?this.getPeopleCardTokenAndMailboxLocation(function(n){if(e==c._sequenceNumberReader.getSequenceNumber())if(n&&n.token&&n.location){var i=n.location+"api/v1/personacard?clientType=Cortana&userSmtp="+u+"&ClientCorrelationId="+c._instrumentationHelper.getImpressionGuid(e)+"&cts="+o+"&CultureInfoName="+t.uiLanguageCache;c._host.launchWebContent(i,f,n.token)}else r?a():l()}):r?a():l()},i.prototype.setPersonContextMenuItems=function(n,i,r){var u=this;t.setExtraVerbs(n,function(){var t=[],f=n.childSuggestions&&n.childSuggestions.some(function(n){return n.displayed});return f||(t.push({verb:"SendEmail",displayName:u._host.getLocString("CortanaAnnotation_Email"),executeSync:function(){return u._host.launchUrl("mailto:"+n.email)},isDefault:!i,icon:{content:"&#xE715",type:2}}),n.imAddress&&r&&t.push({verb:"SendInstantMessage",displayName:u._host.getLocString("SendInstantMessage"),executeSync:function(){return u._host.launchUrl(n.imAddress)},icon:{content:"&#xE8BD",type:2}})),SearchAppWrapper.CortanaApp.copyToClipboard&&t.push({verb:"CopyPersonDetails",displayName:u._host.getLocString("CopyDetails"),executeSync:function(){return SearchAppWrapper.CortanaApp.copyToClipboard(n.tooltip.replace(/\n/g,"\r\n"),"")},icon:{type:1,content:"&#xE8C8"}}),t},!0)},i.prototype.setPersonTemplate=function(n,i,r,u){if(r?n.primaryMetadata=r:n.text!=n.emailHH&&(n.primaryMetadata=n.emailHH),!n.text.includes(HitHighlightingParser.startMarker))if(n.emailHH.includes(HitHighlightingParser.startMarker))n.template=1,n.primaryMetadata=n.emailHH;else if(n.alternativeEmail){var f=HitHighlightingParser.addMarkers(n.alternativeEmail,u);f.includes(HitHighlightingParser.startMarker)&&(n.template=1,n.primaryMetadata=f)}n.narratorText=t.getNarratorText(n);i?(n.template=1,n.classNames.push("topResults")):n.template==1&&n.classNames.push("forceNoWrapOutsideTopResult")},i.prototype.getPersonTooltip=function(n,t,i,r,u,f,e){var h="",c=[n,i,t,r,u],o,l,s;for(n!=f&&c.push(f),e&&n!=e&&c.push(e),o=0,l=c;o<l.length;o++)s=l[o],s&&(h+=h?"\n"+s:s);return h},i.prototype.getPersonIcon=function(n){var t,i=n.trim().replace(l," ").split(" ",2),r,u;return i.length>0&&(r=i[0][0],o.test(r)&&(t=r),i.length==2&&(u=i[1][0],t&&o.test(u)?t+=u:t="")),{type:t?5:2,content:t?t.toUpperCase():"&#xE77B",className:"peopleIcon"}},i.prototype.getProfilePictureIcon=function(n,i){var r=this;return t.Promise.safeChainWithGlobalCaching("getProfilePictureIcon",function(){return ThresholdUtilities.createPromise(function(i){return r.getProfilePictureToken(function(u){var f,e,o;if(!u){i(null);return}f=SearchAppWrapper.CortanaApp.createStringMap();e=SearchAppWrapper.CortanaApp.createStringMap();f.Authorization="Bearer "+u;r._authType==0&&(f["X-AnchorMailbox"]=n);o=r._authType==1?"https://substrate.office.com/api/v2.0/Users('"+n+"')/photo/$value":"https://substrate.office.com/profile/v0/users/"+n+"/image/$value";t.Promise.safeChain("getProfilePictureIcon",function(){return SearchAppWrapper.CortanaApp.makeHttpRequestAsync(0,o,f,"",e)},function(n){if(n.statusCode!==200){i(null);return}t.Promise.safeChain("getProfilePictureIcon",function(){return n.readAsStreamAsync()},i,function(){return i(null)})},function(){return i(null)})})})},function(){return n+"_icon"},function(n){var r=t.toIcon(n,"getProfilePictureIcon",i);return r.className="peopleIcon",r},i)},i.prototype.decorateContactsWithSameDisplayName=function(n,i){for(var r,e,u,f=0;f<n.length-1;++f)if(r=n[f],r.type=="PPL")for(e=f+1;e<n.length;++e)if(u=n[e],u.type=="PPL"&&r.text.toLocaleLowerCase()==u.text.toLocaleLowerCase()){t.isL2(i)||(r.template!=1&&r.classNames.push("forceNoWrapOutsideTopResult"),u.template!=1&&u.classNames.push("forceNoWrapOutsideTopResult"));r.template=u.template=1;r.primaryMetadata=r.emailHH;u.primaryMetadata=u.emailHH;break}},i}();t.SubstrateSuggestionsParser=h;t.buildSubstrateDocumentSuggestion=c})(t=n.WSB||(n.WSB={}))}(AutoSuggest||(AutoSuggest={})),function(n){var t;(function(t){function u(n,t){return function(){return n(t)}}var f=["Microsoft.Office.OUTLOOK.EXE.15","Microsoft.Office.OUTLOOK.EXE.16","{6D809377-6AF0-444B-8957-A3773F02200E}Microsoft OfficeOffice15OUTLOOK.EXE","{7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E}Microsoft OfficeOffice15OUTLOOK.EXE"],i="OutlookLaunchPref",r=[0,1],e=function(){function e(n,t,i){this._host=n;this._substrateSuggestionsDataProvider=t;this._lightweightStorage=i;this._outlookLaunchPreference={}}return e.prototype.parse=function(i,r,u,f,e,o){var w=this,s,l,a,h,v,y,b,k,c,p,d;if(n.isDataSourceEnabled(u,i)){if(s=[],!f||!f.EntitySets){o(u,s,null);return}for(l=t.getEffectiveQuery(i),a=t.getEffectiveScope(i),h=0,v=f.EntitySets;h<v.length;h++)if(y=v[h],y.ResultSets)for(b=function(e){var p,o,v,b,c,y,h;if(e.Results)switch(a){case t.Scope.Emails:for(p=function(i){var e=n.safeExecute(function(){return w.buildMessageSuggestion(i.Source,r,u,f.Instrumentation?f.Instrumentation.TraceId:null,i.ReferenceId,l)},"buildMessageSuggestion");e&&t.isValidSuggestion(e,"parseSubstrateSearchResponse_emails",!1)&&s.push(e)},o=0,v=e.Results;o<v.length;o++)h=v[o],p(h);break;case t.Scope.Documents:for(b=function(u){var o=n.safeExecute(function(){return w.buildDocumentSuggestion(u.Source,r,f.Instrumentation?f.Instrumentation.TraceId:null,u.ReferenceId,(u.Provenance||e.Provenance)=="OneDriveBusiness",l,i)},"buildDocumentSuggestion");o&&t.isValidSuggestion(o,"parseSubstrateSearchResponse_documents")&&s.push(o)},c=0,y=e.Results;c<y.length;c++)h=y[c],b(h);t.decorateSuggestionsWithParentFolder(s,k._host);break;default:SharedLogHelper.LogError("parseSubstrateSearchResponse",a.toString(),new Error("Unexpected scope"))}},k=this,c=0,p=y.ResultSets;c<p.length;c++)d=p[c],b(d);o(u,s,null)}},e.prototype.buildDocumentSuggestion=function(n,i,r,u,f,e,o){var w=this,a=e?HitHighlightingParser.addMarkers(n.FileName,e):n.FileName,s=a.includes(HitHighlightingParser.startMarker);if(e&&!s&&(!t.config.minLengthForContentMatch||o.queryToFetch.length<t.config.minLengthForContentMatch))return null;var v=n.Author==null?null:n.Author.DisplayName,c=t.matchesOnPropertyHH(v,e),b=n.Description?t.decodeHtml(n.Description).replace(/<\/?[^>]+(>|$)/g,""):"",y=t.tryGetTextContentMatch(b,e),k=y[0],p=y[1],l=n.LastModifiedBy==null?null:n.LastModifiedBy.DisplayName,h;return s||c||(t.matchesOnPropertyHH(l,e)&&(h=t.createMatch(t.MatchType.LastModifiedBy,l)),h=h||p),t.buildSubstrateDocumentSuggestion(n.Url,a,n.FileName,n.FileExtension,f,n.LastModifiedDateTime,l,v,!s&&c,!s&&!c&&!!p,function(){return w._substrateSuggestionsDataProvider.instrumentClick(r,u)},i,e,t.isL2(o),this._host,k,h,n.SiteTitle||"")},e.prototype.buildMessageSuggestion=function(i,r,u,f,e,o){var p=this,c,l,v,y;if(i.IsDraft)return null;if(!i.WebLink)return SharedLogHelper.LogError("buildMessageSuggestion",null,new Error("Missing web link")),null;if(c=i.From&&i.From.EmailAddress?i.From.EmailAddress.Name||i.From.EmailAddress.Address:null,l=i.Sender&&i.Sender.EmailAddress?i.Sender.EmailAddress.Name||i.Sender.EmailAddress.Address:null,!c&&!l)return SharedLogHelper.LogError("buildMessageSuggestion",null,new Error("No valid from or sender fields present")),null;var a=c||l,h=i.Subject,w=u=="SSEE",s=t.createSuggestion(HitHighlightingParser.addMarkers(a,o),null,null,"OLE",h||a,n.InstrumentedItem.createInstrumentedItem(r),w?8:12,r,!0),b=w?1:2;return this.setEmailContextMenuItems(s,i.ItemHexId,i.WebLink,b),s.click=function(){return p.launchEmail(i.ItemHexId,i.WebLink,b)},s.template=1,s.classNames.push("email","forceNoWrapOutsideTopResult","topResults"),s.primaryMetadata=HitHighlightingParser.addMarkers(h,o),s.secondaryMetadata=HitHighlightingParser.addMarkers(i.Preview,o),s.tooltip=a+(h?"\n"+h:""),s.hc=i.SortOrderSource=="Relevance",i.HasAttachments&&!t.alwaysWide&&s.classNames.push("emailAttachIcon"),i.IsRead||s.classNames.push("accentColor"),v=t.toDate(i.DateTimeReceived),y=t.getTodayTimeString(v),s.receivedDate=y?y:v.toLocaleDateString(),s.internetMessageId=i.InternetMessageId,s.instrumentPingBack=function(){return p._substrateSuggestionsDataProvider.instrumentClick(f,e)},s.narratorText=t.getNarratorText(s),s},e.prototype.setEmailContextMenuItems=function(n,i,r,u){var e=this;i&&t.setExtraVerbsAsync(n,function(){var n=[];return ThresholdUtilities.createPromise(function(o){t.LocalDataProvider.getApps(f,function(f){var a=!t.Map.isEmpty(f);if(a){var h=e.getOutlookLaunchPreference(u),c="Outlook",l,s=Object.keys(f);s.length==1&&(c=f[s[0]].deviceItem.displayName,l=f[s[0]].getIcon);n.push({verb:"OpenInOutlookWeb",displayName:e._host.getLocString("OpenIn","Outlook Web"),executeSync:function(){return e.launchOutlookWeb(r,u)},isDefault:h==0,icon:{content:"&#xE774",type:1}});n.push({verb:"LaunchOutlookNative",displayName:e._host.getLocString("OpenIn",c),executeSync:function(){return e.launchOutlokNative(i,u)},isDefault:h==1,getIcon:l})}o(n)})})},!0)},e.prototype.launchOutlookWeb=function(n,t,i){var r=this;this._host.launchUrl(n,function(){return r.setOutlookLaunchPreference(0,t)},i)},e.prototype.launchOutlokNative=function(n,t,i){var r=this;this._host.launchOutlook(n,function(){return r.setOutlookLaunchPreference(1,t)},i)},e.prototype.launchEmail=function(t,i,f){for(var c,e,s,l=this,v=this.getOutlookLaunchPreference(f),o=[v],h=0,a=r;h<a.length;h++)c=a[h],n.contains(o,c)||o.push(c);for(s=o.length-1;s>=0;s--)switch(o[s]){case 1:e=u(function(n){return l.launchOutlokNative(t,f,n)},e);break;case 0:e=u(function(n){return l.launchOutlookWeb(i,f,n)},e)}e()},e.prototype.getOutlookLaunchPreference=function(n){if(!this._outlookLaunchPreference[n]){var t=parseInt(this._lightweightStorage.getItem(i+n));this._outlookLaunchPreference[n]=isNaN(t)?r[0]:t}return this._outlookLaunchPreference[n]},e.prototype.setOutlookLaunchPreference=function(n,t){this._outlookLaunchPreference[t]=n;this._lightweightStorage.setItem(i+t,n.toString())},e}();t.SubstrateSearchParser=e})(t=n.WSB||(n.WSB={}))}(AutoSuggest||(AutoSuggest={}))

Youez - 2016 - github.com/yon3zu
LinuXploit