Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥聚直播 ⚙ 聚直播设置 ⚙@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCJcIixcImxpc3RUb0NsZWFyQXNzb2NpYXRlZEZLXCI6W10sXCJsaXN0VG9DbGVhclNlbGZGS1wiOltdLFwicGFnZUxpc3RcIjpbe1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuWKoOi9veaVsOaNrlwiLFwicGF0aFwiOlwiY29uZmlnXCIsXCJydWxlXCI6XCJmdW5jdGlvbiBnZXRDb25maWcoKSB7XFxuICAgIHRyeSB7XFxuICAgICAgICBsZXQgY29uZmlnID0gZmV0Y2goXFxcImhpa2VyOi8vZmlsZXMvcnVsZXMvbGl2ZS9jb25maWcuanNvblxcXCIpO1xcbiAgICAgICAgaWYgKCFjb25maWcgfHwgY29uZmlnID09IFxcXCJcXFwiKSB7XFxuICAgICAgICAgICAgcmV0dXJuIHtcXG4gICAgICAgICAgICAgICAgZGF0YTogW10sXFxuICAgICAgICAgICAgICAgIHZlcnNpb246IDBcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIHJldHVybiBKU09OLnBhcnNlKGNvbmZpZylcXG4gICAgICAgIH1cXG4gICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICB0b2FzdChcXFwi6YWN572u5paH5Lu25qC85byP5pyJ6K+vXFxcIilcXG4gICAgICAgIH0gY2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pWzFdO1xcbiAgICAgICAgfSBlbHNlIGlmIChbJywjZ2VucmUjJywnIyMnLCflpLQjJywnJGNfZW5kJ10uaW5jbHVkZXMoaVszXSkpIHtcXG4gICAgICAgICAgICBncm91cCA9IGlbMl07XFxuICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICB9XFxuICAgICAgICBsZXQgdGl0bGUgPSBpWzJdLFxcbiAgICAgICAgICAgIHVybCA9IGlbM10uaW5jbHVkZXMoJyMnKSA/IGlbM10uc3BsaXQoJyMnKSA6IFtpWzNdXSxcXG4gICAgICAgICAgICBoZWFkZXJzID0gW107XFxuICAgICAgICBpZighdXJsW3VybC5sZW5ndGgtMV0pIHVybC5wb3AoKTtcXG4gICAgICAgIHVybC5mb3JFYWNoKCh2LGluZGV4LGFycmF5KT0+e1xcbiAgICAgICAgICAgIGlmKC87XFxcXHsoLiopXFxcXH0vLnRlc3Qodikpe1xcbiAgICAgICAgICAgICAgICBsZXQgb2JqID0ge30sXFxuICAgICAgICAgICAgICAgICAgICAgY29uID0gdi5tYXRjaCgvO1xcXFx7KC4qKVxcXFx9LylbMV0sXFxuICAgICAgICAgICAgICAgICAgICAgYXJyID0gY29uLnNwbGl0KCcmJicpO1xcbiAgICAgICAgICAgICAgICBhcnIuZm9yRWFjaCgoaSk9PntcXG4gICAgICAgICAgICAgICAgICAgIGxldCBba2V5LHZhbHVlXSA9IGkuc3BsaXQoJ0AnKTtcXG4gICAgICAgICAgICAgICAgICAgIG9ialtrZXldID0gdmFsdWUucmVwbGFjZSgvOy9nLCfvvJvvvJsnKTtcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgYXJyYXlbaW5kZXhdID0gdi5tYXRjaCgvXihbXjtdKik7XFxcXHsvKVsxXVxcbiAgICAgICAgICAgICAgICBoZWFkZXJzLnB1c2gob2JqKTtcXG4gICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgaGVhZGVycy5wdXNoKHsnVXNlci1BZ2VudC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bmRleE9mKFxcXCJoaWtlclxcXCIpICE9IDApIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+mTvuaOpeagvOW8j+acieivr1xcXCJcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJCgnJyxcXFwi6K+36L6T5YWl6K6i6ZiF5qCH6aKYXFxcIikuaW5wdXQoKHVybCwgcnVsZSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXFxcImhpa2VyOi8vcGFnZS9jb25maWc/cnVsZT1cXFwiICsgcnVsZSkpLnJ1bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGNvbmZpZyA9IGdldENvbmZpZygpO1xcbiAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGEucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZTogaW5wdXQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiB1cmxcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2xpdmUvY29uZmlnLmpzb25cXFwiLCBKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5bey5L+d5a2YXFxcIjtcXG4gICAgICAgICAgICAgICAgfSwgaW5wdXQsIHJ1bGUpXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSwgZ2V0TXlWYXIoJ3RpdGxlJykpXFxuICAgIH0pO1xcblxcbiAgICBkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6IGdldENvbG9yZWRUZXh0KFxcXCLmibnph4/lr7zlhaVcXFwiKSxcXG4gICAgICAgIGNvbF90eXBlO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+WQr+eUqOemgeeUqCcsICfliKDpmaTorqLpmIUnLCAn6YeN5paw5o6S5bqPJywgJ+e8lui+keiuoumYhScsJ+a4hemZpOe8k+WtmCddLmZvckVhY2goKHYpID0+IHtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IHYgPT0gZWRpdE1vZGUgPyAn4oCc4oCc4oCd4oCdJyArIHYuYm9sZCgpLmZvbnRjb2xvcignIzE5Qjg5RCcpIDogdixcXG4gICAgICAgICAgICB1cmw6IHYgPT0gZWRpdE1vZGUgPyAnaGlrZXI6Ly9lbXB0eScgOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKCh2KSA9PiB7XFxuICAgICAgICAgICAgICAgIHB1dE15VmFyKCdlZGl0TW9kZScsIHYpXFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfSwgdiksXFxuICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJ1xcbiAgICAgICAgfSlcXG4gICAgfSk7XFxuICAgIGNvbmZpZy5kYXRhLmZvckVhY2goKHYsIGkpID0+IHtcXG4gICAgICAgIGxldCBlbCA9IHtcXG4gICAgICAgICAgICB0aXRsZTogdi5uYW1lLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF8zXFxcIlxcbiAgICAgICAgfVxcbiAgICAgICAgc3dpdGNoIChlZGl0TW9kZSkge1xcbiAgICAgICAgICAgIGNhc2UgJ+WQr+eUqOemgeeUqCc6XFxuICAgICAgICAgICAgICAgIGVsLnRpdGxlID0gKHYuaW5WaXNpYmxlID8gJ/CflLQgJyA6ICfwn5+iICcpICsgZWwudGl0bGVcXG4gICAgICAgICAgICAgICAgZWwudXJsID0gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXFxcImhpa2VyOi8vcGFnZS9jb25maWdcXFwiKSkucnVsZSk7XFxuICAgICAgICAgICAgICAgICAgICBjb25maWcgPSBnZXRDb25maWcoKTtcXG4gICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhW2ldLmluVmlzaWJsZSA9ICFjb25maWcuZGF0YVtpXS5pblZpc2libGU7XFxuICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoXFxcImhpa2VyOi8vZmlsZXMvcnVsZXMvbGl2ZS9jb25maWcuanNvblxcXCIsIEpTT04uc3RyaW5naWZ5KGNvbmZpZykpO1xcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICB9LCBpKVxcbiAgICAgICAgICAgICAgICBicmVha1xcbiAgICAgICAgICAgIGNhc2UgJ+WIoOmZpOiuoumYhSc6XFxuICAgICAgICAgICAgICAgIGVsLnVybCA9IFxcXCJjb25maXJtOi8v56Gu6K6k5Yig6Zmk4oCcXFxcIiArIHYubmFtZSArIFxcXCLigJ3orqLpmIXvvJ8uanM6XFxcIiArICQudG9TdHJpbmcoKG5hbWUpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL3BhZ2UvY29uZmlnXFxcIikpLnJ1bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgY29uZmlnID0gZ2V0Q29uZmlnKCk7XFxuICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YSA9IGNvbmZpZy5kYXRhLmZpbHRlcihpID0+IGkubmFtZSAhPSBuYW1lKTtcXG4gICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShcXFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9saXZlL2NvbmZpZy5qc29uXFxcIiwgSlNPTi5zdHJpbmdpZnkoY29uZmlnKSk7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5bey5Yig6ZmkXFxcIjtcXG4gICAgICAgICAgICAgICAgfSwgdi5uYW1lKVxcbiAgICAgICAgICAgICAgICBicmVha1xcbiAgICAgICAgICAgIGNhc2UgJ+mHjeaWsOaOkuW6jyc6XFxuICAgICAgICAgICAgICAgIGxldCBzb3J0RmxhZyA9IHBhcnNlSW50KGdldE15VmFyKCdzb3J0RmxhZycsICctMScpKVxcbiAgICAgICAgICAgICAgICBlbC50aXRsZSA9IChzb3J0RmxhZyA9PSBpID8gJ/CflIMgICcgOiAnJykgKyBlbC50aXRsZVxcbiAgICAgICAgICAgICAgICBpZiAoc29ydEZsYWcgPT0gLTEpXFxuICAgICAgICAgICAgICAgICAgICBlbC51cmwgPSAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChpKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ3NvcnRGbGFnJywgaS50b1N0cmluZygpKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/pgInmi6nopoHnp7vliqjliLDnmoTkvY3nva4nXFxuICAgICAgICAgICAgICAgICAgICB9LCBpKVxcbiAgICAgICAgICAgICAgICBlbHNlXFxuICAgICAgICAgICAgICAgICAgICBlbC51cmwgPSAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChvbGRJbmRleCwgbmV3SW5kZXgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFwiaGlrZXI6Ly9wYWdlL2NvbmZpZ1xcXCIpKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25maWcgPSBnZXRDb25maWcoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YS5zcGxpY2UobmV3SW5kZXgsIDAsIGNvbmZpZy5kYXRhLnNwbGljZShvbGRJbmRleCwgMSlbMF0pXFxuICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2xpdmUvY29uZmlnLmpzb25cXFwiLCBKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignc29ydEZsYWcnLCAnLTEnKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgICAgIH0sIHNvcnRGbGFnLCBpKVxcbiAgICAgICAgICAgICAgICBicmVha1xcbiAgICAgICAgICAgIGNhc2UgJ+e8lui+keiuoumYhSc6XFxuICAgICAgICAgICAgICAgIGxldCBhcnIgPSBbJ+e8lui+keWQjeensCcsICfnvJbovpHlnLDlnYAnLCAn57yW6L6R5YaF5a65J107XFxuICAgICAgICAgICAgICAgIGVsLnVybCA9ICQoYXJyLCAzKS5zZWxlY3QoKHYsIGkpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dCA9PSAn57yW6L6R5ZCN56ewJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKHYubmFtZSwgJ+i+k+WFpeaWsOWQjeensCcpLmlucHV0KChpKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL3BhZ2UvY29uZmlnXFxcIikpLnJ1bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWcgPSBnZXRDb25maWcoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlucHV0KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YVtpXS5uYW1lID0gaW5wdXRcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShcXFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9saXZlL2NvbmZpZy5qc29uXFxcIiwgSlNPTi5zdHJpbmdpZnkoY29uZmlnKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/kv67mlLnmiJDlip8nXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5LiN6IO95Li656m6J1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgaSk7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0ID09ICfnvJbovpHlnLDlnYAnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQodi51cmwsICfovpPlhaXmlrDlnLDlnYAnKS5pbnB1dCgoaSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFwiaGlrZXI6Ly9wYWdlL2NvbmZpZ1xcXCIpKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnID0gZ2V0Q29uZmlnKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dCA9PSBcXFwiXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+S4jeiDveS4uuepulxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dC5pbmRleE9mKFxcXCJodHRwXFxcIikgIT0gMCAmJiBpbnB1dC5pbmRleE9mKFxcXCJmaWxlXFxcIikgIT0gMCAmJiBpbnB1dC5pbmRleE9mKFxcXCJoaWtlclxcXCIpICE9IDApIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/pk77mjqXmoLzlvI/mnInor69cXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YVtpXS51cmwgPSBpbnB1dFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2xpdmUvY29uZmlnLmpzb25cXFwiLCBKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+S/ruaUueaIkOWKnydcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIGkpO1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dCA9PSAn57yW6L6R5YaF5a65Jykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh2LnVybC5zdGFydHNXaXRoKCdmaWxlOi8vJykgfHwgdi51cmwuc3RhcnRzV2l0aCgnaGlrZXI6Ly9maWxlcycpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnZWRpdEZpbGU6Ly8nICsgdi51cmw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnZWRpdEZpbGU6Ly9oaWtlcjovL2ZpbGVzL2xpYnMvJyArIG1kNSh2LnVybCkgKyAnLmpzJ1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9LCB2LCBpKTtcXG4gICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgY2FzZSAn5riF6Zmk57yT5a2YJzpcXG4gICAgICAgICAgICAgICAgZWwudXJsID0gJCgn56Gu5a6a5riF6Zmk4oCcJyArIHYubmFtZSArICfigJ3orqLpmIXnvJPlrZjvvJ9cXFxcbijlj6/nq4vljbPmm7TmlrApJykuY29uZmlybSgodXJsKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlQ2FjaGUodXJsKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/muIXpmaTmiJDlip8nXFxuICAgICAgICAgICAgICAgIH0sdi51cmwpXFxuICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgfVxcbiAgICAgICAgZC5wdXNoKGVsKVxcbiAgICB9KTtcXG4gICAgcmV0dXJuIGQ7XFxufVxcblxcbiQuZXhwb3J0cyA9IHtcXG4gICAgcmVuZGVyU2V0dGluZzogcmVuZGVyU2V0dGluZ1xcbn1cIn1dLFwic2F2ZWRcIjpmYWxzZSxcInRpdGxlXCI6XCLogZrnm7Tmkq1cIixcInZlcnNpb25cIjowLFwidXJsXCI6XCJoaWtlcjovL2VtcHR5I25vTG9hZGluZyM7Z2V0O1VURi04O3tVc2VyLUFnZW50QE1vemlsbGEvNS4wIChMaW51eO+8m++8myBBbmRyb2lkIDEx77yb77ybIE1pIDEwIFBybykgQXBwbGVXZWJLaXQvNTM3LjM2IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lLzg4LjAuNDMyNC4xNTIgTW9iaWxlIFNhZmFyaS81MzcuMzZ9XCIsXCJjb2xfdH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gICAgfSBlbHNlIHtcXFxcbiAgICAgICAgbGV0IGludGVydmFsID0gTnVtYmVyKGdldEl0ZW0oJ2ludGVydmFsJywgJzI0JykpLFxcXFxuICAgICAgICAgICAgb2xkRGF0YSA9IGZldGNoKCdoaWtlcjovL2ZpbGVzL2xpYnMvJyArIG1kNSh1cmwpICsgJy5qcycpLFxcXFxuICAgICAgICAgICAgcmVtb3RlRGF0YSA9ICcnO1xcXFxuICAgICAgICB0cnkge1xcXFxuICAgICAgICAgICAgcmVtb3RlRGF0YSA9IGZldGNoQ2FjaGUodXJsLCBpbnRlcnZhbCwge1xcXFxuICAgICAgICAgICAgICAgIHRpbWVvdXQ6IDUwMDAwXFxcXG4gICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgfSBjYXRjaCAoZSkge31cXFxcbiAgICAgICAgaWYgKCFyZW1vdGVEYXRhLmluY2x1ZGVzKCdodHRwJykgfHwgcmVtb3RlRGF0YS5pbmNsdWRlcygnPGJvZHk+JykpIHsgXFxcXG4gICAgICAgICAgICBsb2coJ+abtOaWsOWksei0pScpO1xcXFxuICAgICAgICAgICAgaWYgKG9sZERhdGEpIHdyaXRlRmlsZSgnaGlrZXI6Ly9maWxlcy9saWJzLycgKyBtZDUodXJsKSArICcuanMnLCBvbGREYXRhKTtcXFxcbiAgICAgICAgICAgIG0zdSA9IG9sZERhdGE7XFxcXG4gICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICBtM3UgPSByZW1vdGVEYXRhO1xcXFxuICAgICAgICB9XFxcXG4gICAgfVxcXFxuXFxcXG4gICAgbGV0IG1vZGUgPSAgbTN1LmluZGV4T2YoJyNFWFRNM1UnKSA9PSAwICwgcmU7XFxcXG4gICAgaWYobW9kZSl7XFxcXG4gICAgICAgIHJlID0gLyguKiksKC4qKVxcXFxcXFxccyo/KCg/Omh0dHB8cnRtcHxydHNwKVteI1xcXFxcXFxcc10qKS9nO1xcXFxuICAgIH1lbHNle1xcXFxuICAgICAgICByZSA9IC8oKSg/OlxcXFxcXFxcQlxcXFxcXFxcJGNfc3RhcnR8XFxcXFxcXFxCI3sxLDJ9KT8oLio/KSw/KCMjfOWktCN8XFxcXFxcXFwkY19lbmR8LCNnZW5yZSN8KD86aHR0cHxydG1wfHJ0c3ApW15cXFxcXFxcXHNdKikvZztcXFxcbiAgICB9XFxcXG4gICAgICAgIFxcXFxuICAgIGxldCBpdGVtcyA9IHt9LFxcXFxuICAgICAgICBncm91cCA9ICfmnKrliIbnu4QnO1xcXFxuICAgIGZvciAobGV0IGkgPSByZS5leGVjKG0zdSk7IGkgIT0gbnVsbDsgaSA9IHJlLmV4ZWMobTN1KSkge1xcXFxuICAgICAgICBpZiAobW9kZSkge1xcXFxuICAgICAgICAgICAgZ3JvdXAgPSAoaVsxXS5tYXRjaCgvZ3JvdXAtdGl0bGU9XFxcXFxcXCIoLio/KVxcXFxcXFwiLykgfHwgW251bGwsIGdyb3VwXSlbMV07XFxcXG4gICAgICAgIH0gZWxzZSBpZiAoWycsI2dlbnJlIycsJyMjJywn5aS0IycsJyRjX2VuZCddLmluY2x1ZGVzKGlbM10pKSB7XFxcXG4gICAgICAgICAgICBncm91cCA9IGlbMl07XFxcXG4gICAgICAgICAgICBjb250aW51ZTtcXFxcbiAgICAgICAgfVxcXFxuICAgICAgICBsZXQgdGl0bGUgPSBpWzJdLFxcXFxuICAgICAgICAgICAgdXJsID0gaVszXS5pbmNsdWRlcygnIycpID8gaVszXS5zcGxpdCgnIycpIDogW2lbM11dLFxcXFxuICAgICAgICAgICAgaGVhZGVycyA9IFtdO1xcXFxuICAgICAgICBpZighdXJsW3VybC5sZW5ndGgtMV0pIHVybC5wb3AoKTtcXFxcbiAgICAgICAgdXJsLmZvckVhY2goKHYsaW5kZXgsYXJyYXkpPT57XFxcXG4gICAgICAgICAgICBpZigvO1xcXFxcXFxceyguKilcXFxcXFxcXH0vLnRlc3Qodikpe1xcXFxuICAgICAgICAgICAgICAgIGxldCBvYmogPSB7fSxcXFxcbiAgICAgICAgICAgICAgICAgICAgIGNvbiA9IHYubWF0Y2goLztcXFxcXFxcXHsoLiopXFxcXFxcXFx9LylbMV0sXFxcXG4gICAgICAgICAgICAgICAgICAgICBhcnIgPSBjb24uc3BsaXQoJyYmJyk7XFxcXG4gICAgICAgICAgICAgICAgYXJyLmZvckVhY2goKGkpPT57XFxcXG4gICAgICAgICAgICAgICAgICAgIGxldCBba2V5LHZhbHVlXSA9IGkuc3BsaXQoJ0AnKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgb2JqW2tleV0gPSB2YWx1ZS5yZXBsYWNlKC87L2csJ++8m++8mycpO1xcXFxuICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICAgICAgYXJyYXlbaW5kZXhdID0gdi5tYXRjaCgvXihbXjtdKik7XFxcXFxcXFx7LylbMV1cXFxcbiAgICAgICAgICAgICAgICBoZWFkZXJzLnB1c2gob2JqKTtcXFxcbiAgICAgICAgICAgIH1lbHNle1xcXFxuICAgICAgICAgICAgICAgIGhlYWRlcnMucHVzaCh7J1VzZXItQWdlbnQnIDogTU9CSUxFX1VBLnJlcGxhY2UoLzsvZywn77yb77ybJyl9KTtcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIGFycmF5W2luZGV4XSA9IGFycmF5W2luZGV4XS5yZXBsYWNlKC87L2csJ++8m++8mycpKycjaXNWaWRlbz10cnVlIyc7XFxcXG4gICAgICAgIH0pO1xcXFxuICAgICAgICBpZiAoaXRlbXNbZ3JvdXBdKSB7XFxcXG4gICAgICAgICAgICBpZiAoaXRlbXNbZ3JvdXBdW3RpdGxlXSkge1xcXFxuICAgICAgICAgICAgICAgIGl0ZW1zW2dyb3VwXVt0aXRsZV0udXJsID0gaXRlbXNbZ3JvdXBdW3RpdGxlXS51cmwuY29uY2F0KHVybCk7XFxcXG4gICAgICAgICAgICAgICAgaXRlbXNbZ3JvdXBdW3RpdGxlXS5oZWFkZXJzID0gaXRlbXNbZ3JvdXBdW3RpdGxlX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xcXFxuICAgICAgICAgICAgICAgIHJldHVybiAkKCcnLFxcXFxcXFwi6K+36L6T5YWl6K6i6ZiF5qCH6aKYXFxcXFxcXCIpLmlucHV0KCh1cmwsIHJ1bGUpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXFxcXFxcXCJoaWtlcjovL3BhZ2UvY29uZmlnP3J1bGU9XFxcXFxcXCIgKyBydWxlKSkucnVsZSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIGxldCBjb25maWcgPSBnZXRDb25maWcoKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGEucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lOiBpbnB1dCxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogdXJsXFxcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoXFxcXFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2xpdmUvY29uZmlnLmpzb25cXFxcXFxcIiwgSlNPTi5zdHJpbmdpZnkoY29uZmlnKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFxcXFxcInRvYXN0Oi8v5bey5L+d5a2YXFxcXFxcXCI7XFxcXG4gICAgICAgICAgICAgICAgfSwgaW5wdXQsIHJ1bGUpXFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIH0sIGdldE15VmFyKCd0aXRsZScpKVxcXFxuICAgIH0pO1xcXFxuXFxcXG4gICAgZC5wdXNoKHtcXFxcbiAgICAgICAgdGl0bGU6IGdldENvbG9yZWRUZXh0KFxcXFxcXFwi5om56YeP5a+85YWlXFxcXFxcXCIpLFxcXFxuICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJzY3JvbGxfYnV0dG9uXFxcXF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BlOiBcXFxcXFxcInRleHRfM1xcXFxcXFwiXFxcXG4gICAgICAgIH1cXFxcbiAgICAgICAgc3dpdGNoIChlZGl0TW9kZSkge1xcXFxuICAgICAgICAgICAgY2FzZSAn5ZCv55So56aB55SoJzpcXFxcbiAgICAgICAgICAgICAgICBlbC50aXRsZSA9ICh2LmluVmlzaWJsZSA/ICfwn5S0ICcgOiAn8J+foiAnKSArIGVsLnRpdGxlXFxcXG4gICAgICAgICAgICAgICAgZWwudXJsID0gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFxcXFxcImhpa2VyOi8vcGFnZS9jb25maWdcXFxcXFxcIikpLnJ1bGUpO1xcXFxuICAgICAgICAgICAgICAgICAgICBjb25maWcgPSBnZXRDb25maWcoKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGFbaV0uaW5WaXNpYmxlID0gIWNvbmZpZy5kYXRhW2ldLmluVmlzaWJsZTtcXFxcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKFxcXFxcXFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9saXZlL2NvbmZpZy5qc29uXFxcXFxcXCIsIEpTT04uc3RyaW5naWZ5KGNvbmZpZykpO1xcXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXFxcbiAgICAgICAgICAgICAgICB9LCBpKVxcXFxuICAgICAgICAgICAgICAgIGJyZWFrXFxcXG4gICAgICAgICAgICBjYXNlICfliKDpmaTorqLpmIUnOlxcXFxuICAgICAgICAgICAgICAgIGVsLnVybCA9IFxcXFxcXFwiY29uZmlybTovL+ehruiupOWIoOmZpOKAnFxcXFxcXFwiICsgdi5uYW1lICsgXFxcXFxcXCLigJ3orqLpmIXvvJ8uanM6XFxcXFxcXCIgKyAkLnRvU3RyaW5nKChuYW1lKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KFxcXFxcXFwiaGlrZXI6Ly9wYWdlL2NvbmZpZ1xcXFxcXFwiKSkucnVsZSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIGNvbmZpZyA9IGdldENvbmZpZygpO1xcXFxuICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YSA9IGNvbmZpZy5kYXRhLmZpbHRlcihpID0+IGkubmFtZSAhPSBuYW1lKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKFxcXFxcXFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9saXZlL2NvbmZpZy5qc29uXFxcXFxcXCIsIEpTT04uc3RyaW5naWZ5KGNvbmZpZykpO1xcXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFxcXFxcInRvYXN0Oi8v5bey5Yig6ZmkXFxcXFxcXCI7XFxcXG4gICAgICAgICAgICAgICAgfSwgdi5uYW1lKVxcXFxuICAgICAgICAgICAgICAgIGJyZWFrXFxcXG4gICAgICAgICAgICBjYXNlICfph43mlrDmjpLluo8nOlxcXFxuICAgICAgICAgICAgICAgIGxldCBzb3J0RmxhZyA9IHBhcnNlSW50KGdldE15VmFyKCdzb3J0RmxhZycsICctMScpKVxcXFxuICAgICAgICAgICAgICAgIGVsLnRpdGxlID0gKHNvcnRGbGFnID09IGkgPyAn8J+UgyAgJyA6ICcnKSArIGVsLnRpdGxlXFxcXG4gICAgICAgICAgICAgICAgaWYgKHNvcnRGbGFnID09IC0xKVxcXFxuICAgICAgICAgICAgICAgICAgICBlbC51cmwgPSAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChpKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignc29ydEZsYWcnLCBpLnRvU3RyaW5nKCkpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/pgInmi6nopoHnp7vliqjliLDnmoTkvY3nva4nXFxcXG4gICAgICAgICAgICAgICAgICAgIH0sIGkpXFxcXG4gICAgICAgICAgICAgICAgZWxzZVxcXFxuICAgICAgICAgICAgICAgICAgICBlbC51cmwgPSAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChvbGRJbmRleCwgbmV3SW5kZXgpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KFxcXFxcXFwiaGlrZXI6Ly9wYWdlL2NvbmZpZ1xcXFxcXFwiKSkucnVsZSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25maWcgPSBnZXRDb25maWcoKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhLnNwbGljZShuZXdJbmRleCwgMCwgY29uZmlnLmRhdGEuc3BsaWNlKG9sZEluZGV4LCAxKVswXSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShcXFxcXFxcImhpa2VyOi8vZmlsZXMvcnVsZXMvbGl2ZS9jb25maWcuanNvblxcXFxcXFwiLCBKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdzb3J0RmxhZycsICctMScpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXFxcbiAgICAgICAgICAgICAgICAgICAgfSwgc29ydEZsYWcsIGkpXFxcXG4gICAgICAgICAgICAgICAgYnJlYWtcXFxcbiAgICAgICAgICAgIGNhc2UgJ+e8lui+keiuoumYhSc6XFxcXG4gICAgICAgICAgICAgICAgbGV0IGFyciA9IFsn57yW6L6R5ZCN56ewJywgJ+e8lui+keWcsOWdgCcsICfnvJbovpHlhoXlrrknXTtcXFxcbiAgICAgICAgICAgICAgICBlbC51cmwgPSAkKGFyciwgMykuc2VsZWN0KCh2LCBpKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dCA9PSAn57yW6L6R5ZCN56ewJykge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQodi5uYW1lLCAn6L6T5YWl5paw5ZCN56ewJykuaW5wdXQoKGkpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFxcXFxcImhpa2VyOi8vcGFnZS9jb25maWdcXFxcXFxcIikpLnJ1bGUpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZyA9IGdldENvbmZpZygpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dCkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YVtpXS5uYW1lID0gaW5wdXRcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKFxcXFxcXFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9saXZlL2NvbmZpZy5qc29uXFxcXFxcXCIsIEpTT04uc3RyaW5naWZ5KGNvbmZpZykpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+S/ruaUueaIkOWKnydcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5LiN6IO95Li656m6J1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIGkpO1xcXFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0ID09ICfnvJbovpHlnLDlnYAnKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCh2LnVybCwgJ+i+k+WFpeaWsOWcsOWdgCcpLmlucHV0KChpKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXFxcXFxcXCJoaWtlcjovL3BhZ2UvY29uZmlnXFxcXFxcXCIpKS5ydWxlKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWcgPSBnZXRDb25maWcoKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5wdXQgPT0gXFxcXFxcXCJcXFxcXFxcIikge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJ0b2FzdDovL+S4jeiDveS4uuepulxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dC5pbmRleE9mKFxcXFxcXFwiaHR0cFxcXFxcXFwiKSAhPSAwICYmIGlucHV0LmluZGV4T2YoXFxcXFxcXCJmaWxlXFxcXFxcXCIpICE9IDAgJiYgaW5wdXQuaW5kZXhPZihcXFxcXFxcImhpa2VyXFxcXFxcXCIpICE9IDApIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwidG9hc3Q6Ly/pk77mjqXmoLzlvI/mnInor69cXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhW2ldLnVybCA9IGlucHV0XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShcXFxcXFxcImhpa2VyOi8vZmlsZXMvcnVsZXMvbGl2ZS9jb25maWcuanNvblxcXFxcXFwiLCBKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/kv67mlLnmiJDlip8nXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgaSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQgPT0gJ+e8lui+keWGheWuuScpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh2LnVybC5zdGFydHNXaXRoKCdmaWxlOi8vJykgfHwgdi51cmwuc3RhcnRzV2l0aCgnaGlrZXI6Ly9maWxlcycpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdlZGl0RmlsZTovLycgKyB2LnVybDtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnZWRpdEZpbGU6Ly9oaWtlcjovL2ZpbGVzL2xpYnMvJyArIG1kNSh2LnVybCkgKyAnLmpzJ1xcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgfSwgdiwgaSk7XFxcXG4gICAgICAgICAgICAgICAgYnJlYWs7XFxcXG4gICAgICAgICAgICBjYXNlICfmuIXpmaTnvJPlrZgnOlxcXFxuICAgICAgICAgICAgICAgIGVsLnVybCA9ICQoJ+ehruWumua4hemZpOKAnCcgKyB2Lm5hbWUgKyAn4oCd6K6i6ZiF57yT5a2Y77yfXFxcXFxcXFxuKOWPr+eri+WNs+abtOaWsCknKS5jb25maXJtKCh1cmwpPT57XFxcXG4gICAgICAgICAgICAgICAgICAgIGRlbGV0ZUNhY2hlKHVybCk7XFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/muIXpmaTmiJDlip8nXFxcXG4gICAgICAgICAgICAgICAgfSx2LnVybClcXFxcbiAgICAgICAgICAgICAgICBicmVhaztcXFxcbiAgICAgICAgfVxcXFxuICAgICAgICBkLnB1c2goZWwpXFxcXG4gICAgfSk7XFxcXG4gICAgcmV0dXJuIGQ7XFxcXG59XFxcXG5cXFxcbiQuZXhwb3J0cyA9IHtcXFxcbiAgICByZW5kZXJTZXR0aW5nOiByZW5kZXJTZXR0aW5nXFxcXG59XFxcIn1dXCJ9IiwicGljVXJsIjoiaHR0cHM6Ly9naW1nMi5iYWlkdS5jb20vaW1hZ2Vfc2VhcmNoL3NyYz1odHRwJTNBJTJGJTJGaXM0Lm16c3RhdGljLmNvbSUyRmltYWdlJTJGdGh1bWIlMkZQdXJwbGUzJTJGdjQlMkZkZiUyRmY2JTJGZGElMkZkZmY2ZGE4My00N2Q3LTljYjYtMjM5OC0xOTE5YzEzODM3YjQlMkZtemwua2dtbndvZG8ucG5nJTJGMHgwc3MtODUuanBnJnJlZmVyPWh0dHAlM0ElMkYlMkZpczQubXpzdGF0aWMuY29tJmFwcD0yMDAyJnNpemU9Zjk5OTksMTAwMDAmcT1hODAmbj0wJmc9MG4mZm10PWpwZWc/c2VjPTE2Mzg2MjkzNDkmdD0yZjZkOTY3MTg1ZmUyYjljNTRlOGIyMzBlYjgzZTY2YyIsInRpdGxlIjoi6IGa55u05pKtIOKamSDogZrnm7Tmkq3orr7nva4g4pqZIn0=
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement