xiaomianao666

邀您一起看:聚直播 ⚙ 聚直播设置 ⚙

Jun 24th, 2024
362
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥聚直播 ⚙ 聚直播设置 ⚙@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImdtdE1vZGlmaWVkXCI6MCxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCJcIixcImxpc3RUb0NsZWFyQXNzb2NpYXRlZEZLXCI6W10sXCJsaXN0VG9DbGVhclNlbGZGS1wiOltdLFwicGFnZUxpc3RcIjpbe1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuWKoOi9veaVsOaNrlwiLFwicGF0aFwiOlwiY29uZmlnXCIsXCJydWxlXCI6XCJmdW5jdGlvbiBnZXRDb25maWcoKSB7XFxuICAgIHRyeSB7XFxuICAgICAgICBsZXQgY29uZmlnID0gZmV0Y2goXFxcImhpa2VyOi8vZmlsZXMvcnVsZXMvbGl2ZS9jb25maWcuanNvblxcXCIpO1xcbiAgICAgICAgaWYgKCFjb25maWcgfHwgY29uZmlnID09IFxcXCJcXFwiKSB7XFxuICAgICAgICAgICAgcmV0dXJuIHtcXG4gICAgICAgICAgICAgICAgZGF0YTogW10sXFxuICAgICAgICAgICAgICAgIHZlcnNpb246IDBcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIHJldHVybiBKU09OLnBhcnNlKGNvbmZpZylcXG4gICAgICAgIH1cXG4gICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgdHJ5IHtcXG4gIC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RjaCgvZ3JvdXAtdGl0bGU9XFxcIiguKj8pXFxcIi8pIHx8IFtudWxsLCBncm91cF0pWzFdO1xcbiAgICAgICAgfSBlbHNlIGlmIChbJyNnZW5yZSMnLCcjIycsJ+WktCMnLCckY19lbmQnXS5pbmNsdWRlcyhpWzNdKSkge1xcbiAgICAgICAgICAgIGdyb3VwID0gaVsyXTtcXG4gICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgIH1cXG4gICAgICAgIGxldCB0aXRsZSA9IGlbMl0sXFxuICAgICAgICAgICAgdXJsID0gaVszXS5pbmNsdWRlcygnIycpID8gaVszXS5zcGxpdCgnIycpIDogW2lbM11dLFxcbiAgICAgICAgICAgIGhlYWRlcnMgPSBbXTtcXG4gICAgICAgIGlmKCF1cmxbdXJsLmxlbmd0aC0xXSkgdXJsLnBvcCgpO1xcbiAgICAgICAgdXJsLmZvckVhY2goKHYsaW5kZXgsYXJyYXkpPT57XFxuICAgICAgICAgICAgaWYoLztcXFxceyguKilcXFxcfS8udGVzdCh2KSl7XFxuICAgICAgICAgICAgICAgIGxldCBvYmogPSB7fSxcXG4gICAgICAgICAgICAgICAgICAgICBjb24gPSB2Lm1hdGNoKC87XFxcXHsoLiopXFxcXH0vKVsxXSxcXG4gICAgICAgICAgICAgICAgICAgICBhcnIgPSBjb24uc3BsaXQoJyYmJyk7XFxuICAgICAgICAgICAgICAgIGFyci5mb3JFYWNoKChpKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IFtrZXksdmFsdWVdID0gaS5zcGxpdCgnQCcpO1xcbiAgICAgICAgICAgICAgICAgICAgb2JqW2tleV0gPSB2YWx1ZS5yZXBsYWNlKC87L2csJ++8m++8mycpO1xcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICBhcnJheVtpbmRleF0gPSB2Lm1hdGNoKC9eKFteO10qKTtcXFxcey8pWzFdXFxuICAgICAgICAgICAgICAgIGhlYWRlcnMucHVzaChvYmopO1xcbiAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICBoZWFkZXJzLnB1c2goeydVc2VyLUFnZW50JyA6IE1PQklMRV9VQS5yZXBsYWNlKC87L2csJ++8m++8mycpfSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGFycmF5W2luZGV4XSA9IGFycmF5W2luZGV4XS5yZXBsYWNlKC87L2csJ++8m++8mycpKycjaXNWaWRlbz10cnVlIyc7XFxuICAgICAgICB9KTtcXG4gICAgICAgIGlmIChpdGVtc1tncm91cF0pIHtcXG4gICAgICAgICAgICBpZiAoaXRlbXNbZ3JvdXBdW3RpdGxlXSkge1xcbiAgICAgICAgICAgICAgICBpdGVtc1tncm91cF1bdGl0bGVdLnVybCA9IGl0ZW1zW2dyb3VwXVt0aXRsZV0udXJsLmNvbmNhdCh1cmwpO1xcbiAgICAgICAgICAgICAgICBpdGVtc1tncm91cF1bdGl0bGVdLmhlYWRlcnMgPSBpdGVtc1tncm91cF1bdGl0bGVdLmhlYWRlcnMuY29uY2F0KGhlYWRlcnMpO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIGl0ZW1zW2dyb3VwXVt0aXRsZV0gPSB7dXJsOnVybCxoZWFkZXJzOmhlYWRlcnN9O1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgaXRlbXNbZ3JvdXBdID0ge307XFxuICAgICAgICAgICAgaXRlbXNbZ3JvdXBdW3RpdGxlXSA9IHt1cmw6dXJsLGhlYWRlcnM6aGVhZGVyc307XFxuICAgICAgICB9O1xcbiAgICB9XFxuICAgIHJldHVybiBpdGVtcztcXG59XFxuXFxuJC5leHBvcnRzID0ge1xcbiAgICByZW5kZXJMaXZlRGF0YTogcmVuZGVyTGl2ZURhdGFcXG59XFxuXCJ9LHtcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXCI6XCLorr7nva7pobVcIixcInBhdGhcIjpcInJlbmR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xcImZpbGVcXFwiKSAhPSAwICYmIGlucHV0LmluZGV4T2YoXFxcImhpa2VyXFxcIikgIT0gMCkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v6ZO+5o6l5qC85byP5pyJ6K+vXFxcIlxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiAkKCcnLFxcXCLor7fovpPlhaXorqLpmIXmoIfpophcXFwiKS5pbnB1dCgodXJsLCBydWxlKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFwiaGlrZXI6Ly9wYWdlL2NvbmZpZz9ydWxlPVxcXCIgKyBydWxlKSkucnVsZSk7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgY29uZmlnID0gZ2V0Q29uZmlnKCk7XFxuICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YS5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lOiBpbnB1dCxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IHVybFxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoXFxcImhpa2VyOi8vZmlsZXMvcnVsZXMvbGl2ZS9jb25maWcuanNvblxcXCIsIEpTT04uc3RyaW5naWZ5KGNvbmZpZykpO1xcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/lt7Lkv53lrZhcXFwiO1xcbiAgICAgICAgICAgICAgICB9LCBpbnB1dCwgcnVsZSlcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9LCBnZXRNeVZhcigndGl0bGUnKSlcXG4gICAgfSk7XFxuXFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogZ2V0Q29sb3JlZFRleHQoXFxcIuWvvOWFpeiuoumYhVx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XCIpKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgY29uZmlnID0gZ2V0Q29uZmlnKCk7XFxuICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhID0gY29uZmlnLmRhdGEuZmlsdGVyKHYgPT4gIXYuaW5WaXNpYmxlKTtcXG4gICAgICAgICAgICAgICAgaWYgKHR5cGUgPT0gXFxcIuS6keWJqui0tOadv1xcXCIpIHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBkYXRhID0gJ+iBmuebtOaSreWIhuS6qyMjXFxcXG4nICsgc2hhcmVQYXN0ZShKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXG4gICAgICAgICAgICAgICAgfWVsc2UgaWYodHlwZSA9PSBcXFwi5LqR5Y+j5LukXFxcIil7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgZGF0YSA9ICfogZrnm7Tmkq3liIbkuqss5aSN5Yi25ZCO5omT5byA6L2v5Lu25Y2z5Y+v5a+85YWlXFxcXG4nICsgc2hhcmVQYXN0ZShKU09OLnN0cmluZ2lmeShjb25maWcpKSArICdAaW1wb3J0PWpzOmV2YWwoSlNPTi5wYXJzZShmZXRjaChcXFwiaGlrZXI6Ly9wYWdlL2Nsb3VkP3J1bGU96IGa55u05pKtXFxcIikpLnJ1bGUpJztcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBkYXRhID0gSlNPTi5zdHJpbmdpZnkoY29uZmlnKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcImNvcHk6Ly9cXFwiICsgZGF0YTtcXG4gICAgICAgICAgICB9LCBpbnB1dClcXG4gICAgICAgIH0pXFxuICAgIH0pO1xcbiAgICBkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6IGdldENvbG9yZWRUZXh0KFxcXCLnvJbovpHlhajpg6hcXFwiKSxcXG4gICAgICAgIGNvbF90eXBlOiBcXFwic2Nyb2xsX2J1dHR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iwgaSkgPT4ge1xcbiAgICAgICAgbGV0IGVsID0ge1xcbiAgICAgICAgICAgIHRpdGxlOiB2Lm5hbWUsXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0XzNcXFwiXFxuICAgICAgICB9XFxuICAgICAgICBzd2l0Y2ggKGVkaXRNb2RlKSB7XFxuICAgICAgICAgICAgY2FzZSAn5ZCv55So56aB55SoJzpcXG4gICAgICAgICAgICAgICAgZWwudGl0bGUgPSAodi5pblZpc2libGUgPyAn8J+UtCAnIDogJ/Cfn6IgJykgKyBlbC50aXRsZVxcbiAgICAgICAgICAgICAgICBlbC51cmwgPSAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChpKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFwiaGlrZXI6Ly9wYWdlL2NvbmZpZ1xcXCIpKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgIGNvbmZpZyA9IGdldENvbmZpZygpO1xcbiAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGFbaV0uaW5WaXNpYmxlID0gIWNvbmZpZy5kYXRhW2ldLmluVmlzaWJsZTtcXG4gICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShcXFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9saXZlL2NvbmZpZy5qc29uXFxcIiwgSlNPTi5zdHJpbmdpZnkoY29uZmlnKSk7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgICAgIH0sIGkpXFxuICAgICAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICAgICAgY2FzZSAn5Yig6Zmk6K6i6ZiFJzpcXG4gICAgICAgICAgICAgICAgZWwudXJsID0gXFxcImNvbmZpcm06Ly/noa7orqTliKDpmaTigJxcXFwiICsgdi5uYW1lICsgXFxcIuKAneiuoumYhe+8ny5qczpcXFwiICsgJC50b1N0cmluZygoaSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXFxcImhpa2VyOi8vcGFnZS9jb25maWdcXFwiKSkucnVsZSk7XFxuICAgICAgICAgICAgICAgICAgICBjb25maWcgPSBnZXRDb25maWcoKTtcXG4gICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhLnNwbGljZShpLDEpO1xcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2xpdmUvY29uZmlnLmpzb25cXFwiLCBKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/lt7LliKDpmaRcXFwiO1xcbiAgICAgICAgICAgICAgICB9LCBpKVxcbiAgICAgICAgICAgICAgICBicmVha1xcbiAgICAgICAgICAgIGNhc2UgJ+mHjeaWsOaOkuW6jyc6XFxuICAgICAgICAgICAgICAgIGxldCBzb3J0RmxhZyA9IHBhcnNlSW50KGdldE15VmFyKCdzb3J0RmxhZycsICctMScpKVxcbiAgICAgICAgICAgICAgICBlbC50aXRsZSA9IChzb3J0RmxhZyA9PSBpID8gJ/CflIMgICcgOiAnJykgKyBlbC50aXRsZVxcbiAgICAgICAgICAgICAgICBpZiAoc29ydEZsYWcgPT0gLTEpXFxuICAgICAgICAgICAgICAgICAgICBlbC51cmwgPSAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChpKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ3NvcnRGbGFnJywgaS50b1N0cmluZygpKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/pgInmi6nopoHnp7vliqjliLDnmoTkvY3nva4nXFxuICAgICAgICAgICAgICAgICAgICB9LCBpKVxcbiAgICAgICAgICAgICAgICBlbHNlXFxuICAgICAgICAgICAgICAgICAgICBlbC51cmwgPSAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChvbGRJbmRleCwgbmV3SW5kZXgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFwiaGlrZXI6Ly9wYWdlL2NvbmZpZ1xcXCIpKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25maWcgPSBnZXRDb25maWcoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YS5zcGxpY2UobmV3SW5kZXgsIDAsIGNvbmZpZy5kYXRhLnNwbGljZShvbGRJbmRleCwgMSlbMF0pXFxuICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2xpdmUvY29uZmlnLmpzb25cXFwiLCBKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignc29ydEZsYWcnLCAnLTEnKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgICAgIH0sIHNvcnRGbGFnLCBpKVxcbiAgICAgICAgICAgICAgICBicmVha1xcbiAgICAgICAgICAgIGNhc2UgJ+e8lui+keiuoumYhSc6XFxuICAgICAgICAgICAgICAgIGxldCBhcnIgPSBbJ+e8lui+keWQjeensCcsICfnvJbovpHlnLDlnYAnLCAn57yW6L6R5YaF5a65J107XFxuICAgICAgICAgICAgICAgIGVsLnVybCA9ICQoYXJyLCAzKS5zZWxlY3QoKHYsIGkpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dCA9PSAn57yW6L6R5ZCN56ewJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKHYubmFtZSwgJ+i+k+WFpeaWsOWQjeensCcpLmlucHV0KChpKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL3BhZ2UvY29uZmlnXFxcIikpLnJ1bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWcgPSBnZXRDb25maWcoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlucHV0KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YVtpXS5uYW1lID0gaW5wdXRcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShcXFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9saXZlL2NvbmZpZy5qc29uXFxcIiwgSlNPTi5zdHJpbmdpZnkoY29uZmlnKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/kv67mlLnmiJDlip8nXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5LiN6IO95Li656m6J1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgaSk7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0ID09ICfnvJbovpHlnLDlnYAnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQodi51cmwsICfovpPlhaXmlrDlnLDlnYAnKS5pbnB1dCgoaSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFwiaGlrZXI6Ly9wYWdlL2NvbmZpZ1xcXCIpKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnID0gZ2V0Q29uZmlnKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dCA9PSBcXFwiXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+S4jeiDveS4uuepulxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dC5pbmRleE9mKFxcXCJodHRwXFxcIikgIT0gMCAmJiBpbnB1dC5pbmRleE9mKFxcXCJmaWxlXFxcIikgIT0gMCAmJiBpbnB1dC5pbmRleE9mKFxcXCJoaWtlclxcXCIpICE9IDApIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/pk77mjqXmoLzlvI/mnInor69cXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YVtpXS51cmwgPSBpbnB1dFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2xpdmUvY29uZmlnLmpzb25cXFwiLCBKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+S/ruaUueaIkOWKnydcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIGkpO1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dCA9PSAn57yW6L6R5YaF5a65Jykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh2LnVybC5zdGFydHNXaXRoKCdmaWxlOi8vJykgfHwgdi51cmwuc3RhcnRzV2l0aCgnaGlrZXI6Ly9maWxlcycpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnZWRpdEZpbGU6Ly8nICsgdi51cmw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnZWRpdEZpbGU6Ly9oaWtlcjovL2ZpbGVzL2xpYnMvJyArIG1kNSh2LnVybCkgKyAnLmpzJ1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9LCB2LCBpKTtcXG4gICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgY2FzZSAn5riF6Zmk57yT5a2YJzpcXG4gICAgICAgICAgICAgICAgZWwudXJsID0gJCgn56Gu5a6a5riF6Zmk4oCcJyArIHYubmFtZSArICfigJ3orqLpmIXnvJPlrZjvvJ9cXFxcbijlj6/nq4vljbPmm7TmlrApJykuY29uZmlybSgodXJsKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlQ2FjaGUodXJsKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/muIXpmaTmiJDlip8nXFxuICAgICAgICAgICAgICAgIH0sdi51cmwpXFxuICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgfVxcbiAgICAgICAgZC5wdXNoKGVsKVxcbiAgICB9KTtcXG4gICAgcmV0dXJuIGQ7XFxufVxcblxcbiQuZXhwb3J0cyA9IHtcXG4gICAgcmVuZGVyU2V0dGluZzogcmVuZGV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PSAoaVsxXS5tYXRjaCgvZ3JvdXAtdGl0bGU9XFxcXFxcXCIoLio/KVxcXFxcXFwiLykgfHwgW251bGwsIGdyb3VwXSlbMV07XFxcXG4gICAgICAgIH0gZWxzZSBpZiAoWycjZ2VucmUjJywnIyMnLCflpLQjJywnJGNfZW5kJ10uaW5jbHVkZXMoaVszXSkpIHtcXFxcbiAgICAgICAgICAgIGdyb3VwID0gaVsyXTtcXFxcbiAgICAgICAgICAgIGNvbnRpbnVlO1xcXFxuICAgICAgICB9XFxcXG4gICAgICAgIGxldCB0aXRsZSA9IGlbMl0sXFxcXG4gICAgICAgICAgICB1cmwgPSBpWzNdLmluY2x1ZGVzKCcjJykgPyBpWzNdLnNwbGl0KCcjJykgOiBbaVszXV0sXFxcXG4gICAgICAgICAgICBoZWFkZXJzID0gW107XFxcXG4gICAgICAgIGlmKCF1cmxbdXJsLmxlbmd0aC0xXSkgdXJsLnBvcCgpO1xcXFxuICAgICAgICB1cmwuZm9yRWFjaCgodixpbmRleCxhcnJheSk9PntcXFxcbiAgICAgICAgICAgIGlmKC87XFxcXFxcXFx7KC4qKVxcXFxcXFxcfS8udGVzdCh2KSl7XFxcXG4gICAgICAgICAgICAgICAgbGV0IG9iaiA9IHt9LFxcXFxuICAgICAgICAgICAgICAgICAgICAgY29uID0gdi5tYXRjaCgvO1xcXFxcXFxceyguKilcXFxcXFxcXH0vKVsxXSxcXFxcbiAgICAgICAgICAgICAgICAgICAgIGFyciA9IGNvbi5zcGxpdCgnJiYnKTtcXFxcbiAgICAgICAgICAgICAgICBhcnIuZm9yRWFjaCgoaSk9PntcXFxcbiAgICAgICAgICAgICAgICAgICAgbGV0IFtrZXksdmFsdWVdID0gaS5zcGxpdCgnQCcpO1xcXFxuICAgICAgICAgICAgICAgICAgICBvYmpba2V5XSA9IHZhbHVlLnJlcGxhY2UoLzsvZywn77yb77ybJyk7XFxcXG4gICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgICAgICBhcnJheVtpbmRleF0gPSB2Lm1hdGNoKC9eKFteO10qKTtcXFxcXFxcXHsvKVsxXVxcXFxuICAgICAgICAgICAgICAgIGhlYWRlcnMucHVzaChvYmopO1xcXFxuICAgICAgICAgICAgfWVsc2V7XFxcXG4gICAgICAgICAgICAgICAgaGVhZGVycy5wdXNoKHsnVXNlci1BZ2VudCcgOiBNT0JJTEVfVUEucmVwbGFjZSgvOy9nLCfvvJvvvJsnKX0pO1xcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgYXJyYXlbaW5kZXhdID0gYXJyYXlbaW5kZXhdLnJlcGxhY2UoLzsvZywn77yb77ybJykrJyNpc1ZpZGVvPXRydWUjJztcXFxcbiAgICAgICAgfSk7XFxcXG4gICAgICAgIGlmIChpdGVtc1tncm91cF0pIHtcXFxcbiAgICAgICAgICAgIGlmIChpdGVtc1tncm91cF1bdGl0bGVdKSB7XFxcXG4gICAgICAgICAgICAgICAgaXRlbXNbZ3JvdXBdW3RpdGxlXS51cmwgPSBpdGVtc1tncm91cF1bdGl0bGVdLnVybC5jb25jYXQodXJsKTtcXFxcbiAgICAgICAgICAgICAgICBpdGVtc1tncm91cF1bdGl0bGVdLmhlYWRlcnMgPSBpdGVtc1tncm91cF1bdGl0bGVdLmhlYWRlcnMuY29uY2F0KGhlYWRlcnMpO1xcXFxuICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICBpdGVtc1tncm91cF1bdGl0bGVdID0ge3VybDp1cmwsaGVhZGVyczpoZWFkZXJzfTtcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgIGl0ZW1zW2dyb3VwXSA9IHt9O1xcXFxuICAgICAgICAgICAgaXRlbXNbZ3JvdXBdW3RpdGxlXSA9IHt1cmw6dXJsLGhlYWRlcnM6aGVhZGVyc307XFxcXG4gICAgICAgIH07XFxcXG4gICAgfVxcXFxuICAgIHJldHVybiBpdGVtcztcXFxcbn1c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b2xsX2J1dHRvblxcXFxcXFwiLFxcXFxuICAgICAgICBkZXNjOiBcXFxcXFxcIuivt+i+k+WFpeebtOaSrea6kOiuoumYheWcsOWdgFxcXFxcXFwiLFxcXFxuICAgICAgICB1cmw6ICQoJycsICfor7fovpPlhaXorqLpmIXlnLDlnYAnKS5pbnB1dCgocnVsZSkgPT4ge1xcXFxuICAgICAgICAgICAgaWYgKGlucHV0ID09IFxcXFxcXFwiXFxcXFxcXCIpIHtcXFxcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJ0b2FzdDovL+S4jeiDveS4uuepulxcXFxcXFwiXFxcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0LmluZGV4T2YoXFxcXFxcXCJodHRwXFxcXFxcXCIpICE9IDAgJiYgaW5wdXQuaW5kZXhPZihcXFxcXFxcImZpbGVcXFxcXFxcIikgIT0gMCAmJiBpbnB1dC5pbmRleE9mKFxcXFxcXFwiaGlrZXJcXFxcXFxcIikgIT0gMCkge1xcXFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFxcXFxcInRvYXN0Oi8v6ZO+5o6l5qC85byP5pyJ6K+vXFxcXFxcXCJcXFxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgcmV0dXJuICQoJycsXFxcXFxcXCLor7fovpPlhaXorqLpmIXmoIfpophcXFxcXFxcIikuaW5wdXQoKHVybCwgcnVsZSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFxcXFxcImhpa2VyOi8vcGFnZS9jb25maWc/cnVsZT1cXFxcXFxcIiArIHJ1bGUpKS5ydWxlKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgbGV0IGNvbmZpZyA9IGdldENvbmZpZygpO1xcXFxuICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YS5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IGlucHV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cXCJ0ZXh0XzNcXFxcXFxcIlxcXFxuICAgICAgICB9XFxcXG4gICAgICAgIHN3aXRjaCAoZWRpdE1vZGUpIHtcXFxcbiAgICAgICAgICAgIGNhc2UgJ+WQr+eUqOemgeeUqCc6XFxcXG4gICAgICAgICAgICAgICAgZWwudGl0bGUgPSAodi5pblZpc2libGUgPyAn8J+UtCAnIDogJ/Cfn6IgJykgKyBlbC50aXRsZVxcXFxuICAgICAgICAgICAgICAgIGVsLnVybCA9ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGkpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXFxcXFxcXCJoaWtlcjovL3BhZ2UvY29uZmlnXFxcXFxcXCIpKS5ydWxlKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgY29uZmlnID0gZ2V0Q29uZmlnKCk7XFxcXG4gICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhW2ldLmluVmlzaWJsZSA9ICFjb25maWcuZGF0YVtpXS5pblZpc2libGU7XFxcXG4gICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShcXFxcXFxcImhpa2VyOi8vZmlsZXMvcnVsZXMvbGl2ZS9jb25maWcuanNvblxcXFxcXFwiLCBKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxcXG4gICAgICAgICAgICAgICAgfSwgaSlcXFxcbiAgICAgICAgICAgICAgICBicmVha1xcXFxuICAgICAgICAgICAgY2FzZSAn5Yig6Zmk6K6i6ZiFJzpcXFxcbiAgICAgICAgICAgICAgICBlbC51cmwgPSBcXFxcXFxcImNvbmZpcm06Ly/noa7orqTliKDpmaTigJxcXFxcXFxcIiArIHYubmFtZSArIFxcXFxcXFwi4oCd6K6i6ZiF77yfLmpzOlxcXFxcXFwiICsgJC50b1N0cmluZygoaSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFxcXFxcImhpa2VyOi8vcGFnZS9jb25maWdcXFxcXFxcIikpLnJ1bGUpO1xcXFxuICAgICAgICAgICAgICAgICAgICBjb25maWcgPSBnZXRDb25maWcoKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGEuc3BsaWNlKGksMSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShcXFxcXFxcImhpa2VyOi8vZmlsZXMvcnVsZXMvbGl2ZS9jb25maWcuanNvblxcXFxcXFwiLCBKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJ0b2FzdDovL+W3suWIoOmZpFxcXFxcXFwiO1xcXFxuICAgICAgICAgICAgICAgIH0sIGkpXFxcXG4gICAgICAgICAgICAgICAgYnJlYWtcXFxcbiAgICAgICAgICAgIGNhc2UgJ+mHjeaWsOaOkuW6jyc6XFxcXG4gICAgICAgICAgICAgICAgbGV0IHNvcnRGbGFnID0gcGFyc2VJbnQoZ2V0TXlWYXIoJ3NvcnRGbGFnJywgJy0xJykpXFxcXG4gICAgICAgICAgICAgICAgZWwudGl0bGUgPSAoc29ydEZsYWcgPT0gaSA/ICfwn5SDICAnIDogJycpICsgZWwudGl0bGVcXFxcbiAgICAgICAgICAgICAgICBpZiAoc29ydEZsYWcgPT0gLTEpXFxcXG4gICAgICAgICAgICAgICAgICAgIGVsLnVybCA9ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGkpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdzb3J0RmxhZycsIGkudG9TdHJpbmcoKSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+mAieaLqeimgeenu+WKqOWIsOeahOS9jee9ridcXFxcbiAgICAgICAgICAgICAgICAgICAgfSwgaSlcXFxcbiAgICAgICAgICAgICAgICBlbHNlXFxcXG4gICAgICAgICAgICAgICAgICAgIGVsLnVybCA9ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKG9sZEluZGV4LCBuZXdJbmRleCkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXFxcXFxcXCJoaWtlcjovL3BhZ2UvY29uZmlnXFxcXFxcXCIpKS5ydWxlKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZyA9IGdldENvbmZpZygpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGEuc3BsaWNlKG5ld0luZGV4LCAwLCBjb25maWcuZGF0YS5zcGxpY2Uob2xkSW5kZXgsIDEpWzBdKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKFxcXFxcXFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9saXZlL2NvbmZpZy5qc29uXFxcXFxcXCIsIEpTT04uc3RyaW5naWZ5KGNvbmZpZykpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ3NvcnRGbGFnJywgJy0xJylcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcXFxuICAgICAgICAgICAgICAgICAgICB9LCBzb3J0RmxhZywgaSlcXFxcbiAgICAgICAgICAgICAgICBicmVha1xcXFxuICAgICAgICAgICAgY2FzZSAn57yW6L6R6K6i6ZiFJzpcXFxcbiAgICAgICAgICAgICAgICBsZXQgYXJyID0gWyfnvJbovpHlkI3np7AnLCAn57yW6L6R5Zyw5Z2AJywgJ+e8lui+keWGheWuuSddO1xcXFxuICAgICAgICAgICAgICAgIGVsLnVybCA9ICQoYXJyLCAzKS5zZWxlY3QoKHYsIGkpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgaWYgKGlucHV0ID09ICfnvJbovpHlkI3np7AnKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCh2Lm5hbWUsICfovpPlhaXmlrDlkI3np7AnKS5pbnB1dCgoaSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KFxcXFxcXFwiaGlrZXI6Ly9wYWdlL2NvbmZpZ1xcXFxcXFwiKSkucnVsZSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnID0gZ2V0Q29uZmlnKCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlucHV0KSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhW2ldLm5hbWUgPSBpbnB1dFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoXFxcXFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2xpdmUvY29uZmlnLmpzb25cXFxcXFxcIiwgSlNPTi5zdHJpbmdpZnkoY29uZmlnKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5L+u5pS55oiQ5YqfJ1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/kuI3og73kuLrnqbonXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgaSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQgPT0gJ+e8lui+keWcsOWdgCcpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKHYudXJsLCAn6L6T5YWl5paw5Zyw5Z2AJykuaW5wdXQoKGkpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFxcXFxcImhpa2VyOi8vcGFnZS9jb25maWdcXFxcXFxcIikpLnJ1bGUpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZyA9IGdldENvbmZpZygpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dCA9PSBcXFxcXFxcIlxcXFxcXFwiKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFxcXFxcInRvYXN0Oi8v5LiN6IO95Li656m6XFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0LmluZGV4T2YoXFxcXFxcXCJodHRwXFxcXFxcXCIpICE9IDAgJiYgaW5wdXQuaW5kZXhPZihcXFxcXFxcImZpbGVcXFxcXFxcIikgIT0gMCAmJiBpbnB1dC5pbmRleE9mKFxcXFxcXFwiaGlrZXJcXFxcXFxcIikgIT0gMCkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJ0b2FzdDovL+mTvuaOpeagvOW8j+acieivr1xcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGFbaV0udXJsID0gaW5wdXRcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKFxcXFxcXFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9saXZlL2NvbmZpZy5qc29uXFxcXFxcXCIsIEpTT04uc3RyaW5naWZ5KGNvbmZpZykpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+S/ruaUueaIkOWKnydcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBpKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dCA9PSAn57yW6L6R5YaF5a65Jykge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHYudXJsLnN0YXJ0c1dpdGgoJ2ZpbGU6Ly8nKSB8fCB2LnVybC5zdGFydHNXaXRoKCdoaWtlcjovL2ZpbGVzJykpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2VkaXRGaWxlOi8vJyArIHYudXJsO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdlZGl0RmlsZTovL2hpa2VyOi8vZmlsZXMvbGlicy8nICsgbWQ1KHYudXJsKSArICcuanMnXFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB9LCB2LCBpKTtcXFxcbiAgICAgICAgICAgICAgICBicmVhaztcXFxcbiAgICAgICAgICAgIGNhc2UgJ+a4hemZpOe8k+WtmCc6XFxcXG4gICAgICAgICAgICAgICAgZWwudXJsID0gJCgn56Gu5a6a5riF6Zmk4oCcJyArIHYubmFtZSArICfigJ3orqLpmIXnvJPlrZj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