Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@GithubApp1@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6ImJvZHkmJmRpdltkYXRhLWhwY10mJnNlY3Rpb24mJmgyJiZUZXh0IiwidGl0bGUiOiJHaXRodWJBcHAxIiwiYXV0aG9yIjoiUjrkuI3opoHkv67mlLnlsI/nqIvluo/lkI3vvIzlj6/og73kvJrmiqXplJkiLCJ1cmwiOiJoaWtlcjovL2VtcHR5IyMiLCJ2ZXJzaW9uIjoyMDI0MDcxMiwiY29sX3R5cGUiOiJtb3ZpZV8zIiwiY2xhc3NfbmFtZSI6IiIsInR5cGUiOiJ2aWRlbyIsImNsYXNzX3VybCI6IiIsImFyZWFfbmFtZSI6IiIsImFyZWFfdXJsIjoiIiwic29ydF9uYW1lIjoiIiwieWVhcl9uYW1lIjoiIiwic29ydF91cmwiOiIiLCJ5ZWFyX3VybCI6IiIsImZpbmRfcnVsZSI6ImpzOlxudmFyIGQgPSBbXVxuXG52YXIg5pu05pawID0gMjQgLy8o5bCP5pe2KeaPkOmGkuajgOa1i+abtOaWsOmXtOmalOaXtumXtFxudmFyIOmXtOmalCA9IGNvbmZpZy7pl7TpmpRcblxuZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoJ2hpa2VyOi8vcGFnZS/mt7vliqAnLCB7fSkpLnJ1bGUpXG5cbmV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KCdoaWtlcjovL3BhZ2UvZGF0YScsIHt9KSkucnVsZSlcblxuLy8g6K6+572u5Y2V5Ye75pON5L2c5piv6L+b5YWl5LqM57qn6aG16Z2i6L+Y5piv5o6S5bqPXG52YXIgY2xpY2tfYWN0aW9uID0gZ2V0TXlWYXIoJ2NsaWNrX2FjdGlvbicsICdjbGljaycpXG5cbmlmICjpl7TpmpQgPj0gOCApe1xudmFyIHVwZGF0ZTtcbiAgICAgICAgICAgICAgICAgICAgdHJ5IHtc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cbiAgICAgICAgaWYgKCFhcnIxLmluY2x1ZGVzKGFycjJbaV0pKSB7XG4gICAgICAgICAgICBkaWZmZXJlbnRJbmRpY2VzLnB1c2goaSlcbiAgICAgICAgfVxuICAgIH1cbiAgICByZXR1cm4gZGlmZmVyZW50SW5kaWNlc1xufVxuXG52YXIgZGF0YSA9IEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vZmlsZXMvcnVsZXMvYXBvbGxvL0dpdGh1YkFwcC9HaXRodWJBcHAudHh0JykgfHwgJ1tdJylcbi8vbG9nKGRhdGEpXG52YXIgdmVyc2lvbiA9IGdldEl0ZW0oJ3YnKS5zcGxpdCgn8J+UpScpXG52YXIgYXBwdnMgPSBbXVxuXG5pZiAoTVlfUEFHRSA9PSAxKSB7XG4gICAgZC5wdXNoKFxuICAgICAgICB7XG4gICAgICAgICAgICB0aXRsZTpcbiAgICAgICAgICAgICAgICDpl7TpmpQgPCDmm7TmlrAgPyAn4oCc4oCc4oCd4oCdJyArICdcXHTimpkg5qOA5rWL5pu05pawIOKamScuYm9sZCgpIDogJ+KAnOKAnOKAneKAnScgKyAnXFx04pqZIOajgOa1i+abtOaWsCDimpknLmJvbGQoKS5mb250Y29sb3IoJyNGRjAwRkYnKSxcbiAgICAgICAgICAgIGltZzogJ2hpa2VyOi8vaW1hZ2VzL2ljb25fc2VhcmNoNicsXG4gICAgICAgICAgICBjb2xfdHlwZTogJ2ljb25fMl9yb3VuZCcsXG4gICAgICAgICAgICB1cmw6XG4gICAgICAgICAgICAgICAgJ2hpa2VyOi8vZW1wdHknICtcbiAgICAgICAgICAgICAgICAkKCcnKS5sYXp5UnVsZShcbiAgICAgICAgICAgICAgICAgICAgKGRhdGEsIHZlcnNpb24sIGNvbXBhcmVBcnJheXMpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkYXRhLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdXJscyA9IFtdXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIFVybHMgPSBkYXRhLm1hcCgoaSkgPT4gaS5zcGxpdCgn8J+UpScpWzFdKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFVybHMuZm9yRWFjaCgodSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmxzLnB1c2goeyB1cmw6IHUgfSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB2cyA9IGJmKHVybHMpLm1hcCgoaCkgPT4ge1xuICB0cnkge1xuICAgIHJldHVybiBwZGZoKGgsICdib2R5JiZkaXZbZGF0YS1ocGNdJiZzZWN0aW9uJiZoMiYmVGV4dCcpXG4gIH0gY2F0Y2ggKGUpIHtcbiAgICBcbiAgICByZXR1cm4gcGRmaChoLCAnYm9keSYmI3JlcG8tY29udGVudC1wamF4LWNvbnRhaW5lciYmaDImJlRleHQnKVxuICAgICAgIFxuICB9XG59KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgciA9IGNvbXBhcmVBcnJheXModmVyc2lvbiwgdnMpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHMgPSByLmpvaW4oJ/CflKUnKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB2ID0gdnMuam9pbign8J+UpScpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHYuaW5jbHVkZXMoJ/CflKXwn5SlJykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyByZXR1cm4gJ3RvYXN0Oi8v5qOA5rWL5aSx6LSl77yM6K+36YeN6K+VJ1xuICAgIC8vIOajgOa1i+Wksei0pe+8jOWumuS9jeWksei0pWFwcO+8jOiOt+WPlmFwcOeahOWQjeWtl+WSjOS9jee9rlxuICAgIHZhciBmID0gW11cbiAgICB2cy5tYXAoKGVsZSwgaW5kZXgpID0+IHtcbiAgICAgICAgaWYgKGVsZSA9PSBcIlwiKSB7XG4gICAgICAgICAgICBmLnB1c2goZGF0YVtpbmRleF0uc3BsaXQoXCLwn5SlXCIpWzBdICsgYCgke2luZGV4ICsgMX0pYCk7XG4gICAgICAgIH1cbiAgICB9KTtcbiAgICAvLyB0b2FzdOaPkOekuuacieWTquS6m2FwcCjluKbkvY3nva4p5qOA5rWL5aSx6LSl5LqGXG4gICAgZiA9IGYuam9pbihcIiwgXCIpO1xuICAgIHJldHVybiBcInRvYXN0Oi8v5qOA5rWL5aSx6LSlOiDjgJBcIiArIGYgKyBcIuOAkVwiO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh2ZXJzaW9uLmxlbmd0aCA8IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oJ3YnLCB2KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5Yid5aeL54mI5pys5Y+35oiQ5YqfJ1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0SXRlbSgncycsIHMpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKCd2JywgdilcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+ajgOa1i+aciScgKyByLmxlbmd0aCArICfkuKrmm7TmlrB+J1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5rKh5pyJ5pWw5o2ufidcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgZGF0YSxcbiAgICAgICAgICAgICAgICAgICAgdmVyc2lvbixcbiAgICAgICAgICAgICAgICAgICAgY29tcGFyZUFycmF5c1xuICAgICAgICAgICAgICAgICksXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICAgIHRpdGxlOiAn4oCc4oCc4oCd4oCdJyArICdcXHTimpkg5pu05aSa5Yqf6IO9IOKamScuYm9sZCgpLFxuICAgICAgICAgICAgaW1nOiAnaGlrZXI6Ly9pbWFnZXMvaWNvbl9tZW51NicsXG4gICAgICAgICAgICBjb2xfdHlwZTogJ2ljb25fMl9yb3VuZCcsXG4gICAgICAgICAgICB1cmw6ICQoXG4gICAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgICAgICAn5a+85YWl5YiG5Lqr5pWw5o2uJyxcbiAgICAgICAgICAgICAgICAgICAgJ+WIhuS6q+WOn+Wni+aVsOaNricsXG4gICAgICAgICAgICAgICAgICAgICfliIbkuqvkupHliarotLTmnb8nLFxuICAgICAgICAgICAgICAgICAgICAn5YiG5Lqr5LqR5Y+j5LukJyxcbiAgICAgICAgICAgICAgICAgICAgJ+aLieWPluKaoO+4j+S6keaVsOaNricsXG4gICAgICAgICAgICAgICAgICAgICflkIjlubbmnKzlnLDlkozkupEnLFxuICAgICAgICAgICAgICAgICAgICAn5oGi5aSN6buY6K6k5pWw5o2uJyxcbiAgICAgICAgICAgICAgICAgICAgJ+a4heepuuacrOWcsOaVsOaNricsXG4gICAgICAgICAgICAgICAgICAgICfnvJbovpHov5znqIvmlbDmja4nLFxuICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgKS5zZWxlY3QoKG1kYXRhKSA9PiB7XG4gICAgICAgICAgICAgICAgaWYgKGlucHV0ID09ICflr7zlhaXliIbkuqvmlbDmja4nKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAkKCcnLCAn5pSv5oyB5Y6f5aeL5pWw5o2u5ZKM5LqR5Ymq6LS05p2/5YiG5LqrJykuaW5wdXQoKHJ1bGUpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KCdoaWtlcjovL3BhZ2UvYmF0Y2hJbT9ydWxlPScgKyBydWxlKSkucnVsZSlcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dC5zdGFydHNXaXRoKCdHaXRodWJBcHDliIbkuqsjIycpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5wdXQgPSBiYXNlNjREZWNvZGUocGFyc2VQYXN0ZShpbnB1dC5zcGxpdCgnIyNcXG4nKVsxXSkpXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0LnN0YXJ0c1dpdGgoJ0dpdGh1YkFwcOWIhuS6qywnKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlucHV0ID0gYmFzZTY0RGVjb2RlKHBhcnNlUGFzdGUoaW5wdXQuc3BsaXQoJ1xcbicpWzFdLnNwbGl0KCdAJylbMF0pKVxuICAgICAgICAgICAgICAgICAgICAgICAgfSBcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBiYXRjaEltcG9ydChpbnB1dCwgcnVsZSlcbiAgICAgICAgICAgICAgICAgICAgfSwgJ0dpdGh1YkFwcCcpXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dCA9PSAn5ZCI5bm25pys5Zyw5ZKM5LqRJykge1xuICAgICAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoJ2hpa2VyOi8vcGFnZS9iYXRjaEltJywge30pKS5ydWxlKVxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHlkYXRhID0gZmV0Y2goXCJodHRwczovL2lnZHV4LnRvcC9+R2l0aHViQXBwMFwiLHt0aW1lb3V0OjIwMjN9KVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGJhdGNoSW1wb3J0KHlkYXRhLCAnR2l0aHViQXBwJylcbiAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v6I635Y+W5aSx6LSl77yM6K+36YeN6K+VJ1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dCA9PSAn5ouJ5Y+W4pqg77iP5LqR5pWw5o2uJykge1xuICAgICAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKGZldGNoKCdoaWtlcjovL3BhZ2UvZGF0YScsIHt9KSkucnVsZSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB5ZGF0YSA9IEpTT04ucGFyc2UoZmV0Y2goXCJodHRwczovL2lnZHV4LnRvcC9+R2l0aHViQXBwMFwiLHt0aW1lb3V0OjIwMjN9KSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZSgnaGlrZXI6Ly9maWxlcy9ydWxlcy9hcG9sbG8vR2l0aHViQXBwL0dpdGh1YkFwcC50eHQnLCBKU09OLnN0cmluZ2lmeSh5ZGF0YSkpXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcbiAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v6I635Y+W5aSx6LSl77yM6K+36YeN6K+VJ1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dCA9PSAn5oGi5aSN6buY6K6k5pWw5o2uJykge1xuLy9ldmFsKEpTT04ucGFyc2UocmVxdWVzdCgnaGlrZXI6Ly9wYWdlL2RhdGEnLCB7fSkpLnJ1bGUpXG53cml0ZUZpbGUoJ2hpa2VyOi8vZmlsZXMvcnVsZXMvYXBvbGxvL0dpdGh1YkFwcC9HaXRodWJBcHAudHh0JywgSlNPTi5zdHJpbmdpZnkobWRhdGEpKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXG4gICAgICAgICAgICAgICAgfWVsc2UgaWYgKGlucHV0ID09ICfmuIXnqbrmnKzlnLDmlbDmja4nKSB7XG4gICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZSgnaGlrZXI6Ly9maWxlcy9ydWxlcy9hcG9sbG8vR2l0aHViQXBwL0dpdGh1YkFwcC50eHQnLCAnJylcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0ID09ICfnvJbovpHov5znqIvmlbDmja4nKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAkKCcnLCAn5a+G56CBXFxu5LiN55+l6YGT6K+355WZ56m6JykuaW5wdXQoKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd3ZWI6Ly9odHRwczovL2lnZHV4LnRvcC9+R2l0aHViQXBwMDonICsgaW5wdXRcbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCgn56Gu5a6a5a+85Ye677yfJykuY29uZmlybSgodHlwZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGNvbmZpZyA9IEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vZmlsZXMvcnVsZXMvYXBvbGxvL0dpdGh1YkFwcC9HaXRodWJBcHAudHh0JykgfHwgJ1tdJylcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0eXBlID09ICfliIbkuqvkupHliarotLTmnb8nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGRhdGEgPSAnR2l0aHViQXBw5YiG5LqrIyNcXG4nICsgc2hhcmVQYXN0ZShiYXNlNjRFbmNvZGUoSlNPTi5zdHJpbmdpZnkoY29uZmlnKSkpXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHR5cGUgPT0gJ+WIhuS6q+S6keWPo+S7pCcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgZGF0YSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdHaXRodWJBcHDliIbkuqss5aSN5Yi25ZCO5omT5byA6L2v5Lu25Y2z5Y+v5a+85YWlXFxuJyArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNoYXJlUGFzdGUoYmFzZTY0RW5jb2RlKEpTT04uc3RyaW5naWZ5KGNvbmZpZykpKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdAaW1wb3J0PWpzOmV2YWwoSlNPTi5wYXJzZShmZXRjaChcImhpa2VyOi8vcGFnZS9jbG91ZD9ydWxlPUdpdGh1YkFwcFwiKSkucnVsZSknXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBkYXRhID0gSlNPTi5zdHJpbmdpZnkoY29uZmlnKVxuICAgICAgICAgICAg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x0Ly8g5Y2V5Ye75pON5L2cOiDov5Tlm551cmxz77yMXG5cdFx0Ly8g5o6S5bqP5pON5L2cOiDmoLnmja7ojrflj5bnmoTnp7vliqhBcHDkvY3nva5tb3ZlX2luZGV45ZKM54K55Ye76KaB5pS+572u5L2N572ucmVwbGFjZV9pbmRleO+8jOi/m+ihjOWvuUdpdGh1YkFwcC50eHTnmoTlhoXlrrnov5vooYzph43mlrDmjpLluo/lubbph43mlrDlhpnlm55cbiAgICAgICAgdXJsOlxuICAgICAgICAgICAgY2xpY2tfYWN0aW9uID09ICdjbGljaydcbiAgICAgICAgICAgICAgICA/IChVcmxzLmVuZHNXaXRoKCd0YWdzJyk/IFwid2ViOi8vXCIgKyBVcmxzIDogVXJscylcbiAgICAgICAgICAgICAgICA6ICQoKS5sYXp5UnVsZSgocmVwbGFjZV9pbmRleCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdjbGlja19hY3Rpb24nLCAnY2xpY2snKVxuICAgICAgICAgICAgICAgICAgICAgIGxldCBtb3ZlX2luZGV4ID0gZ2V0TXlWYXIoJ21vdmVfaW5kZXgnLCAwKVxuICAgICAgICAgICAgICAgICAgICAgLy8gJC5sb2coJ+enu+WKqOeahOe0ouW8leS4ujogJyArIG1vdmVfaW5kZXgpXG4gICAgICAgICAgICAgICAgICAgICAvLyAkLmxvZygn5pu/5o2i55qE5L2N572u5Li6OiAnICsgcmVwbGFjZV9pbmRleClcbiAgICAgICAgICAgICAgICAgICAgICBsZXQgY29uZmlnID0gSlNPTi5wYXJzZShmZXRjaCgnaGlrZXI6Ly9maWxlcy9ydWxlcy9hcG9sbG8vR2l0aHViQXBwL0dpdGh1YkFwcC50eHQnKSlcbiAgICAgICAgICAgICAgICAgICAgICBjb25zdCBlbGVtZW50ID0gY29uZmlnLnNwbGljZShtb3ZlX2luZGV4LCAxKVswXVxuICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5zcGxpY2UocmVwbGFjZV9pbmRleCwgMCwgZWxlbWVudClcbiAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoJ2hpa2VyOi8vZmlsZXMvcnVsZXMvYXBvbGxvL0dpdGh1YkFwcC9HaXRodWJBcHAudHh0JywgSlNPTi5zdHJpbmdpZnkoY29uZmlnKSlcbiAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcbiAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5o6S5bqP5a6M5q+VJ1xuICAgICAgICAgICAgICAgICAgfSwgaSksXG4gICAgICAgIGNvbF90eXBlOiAnaWNvbl80X2NhcmQnLFxuICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgc3M6IHNzLFxuICAgICAgICAgICAgaTogaSxcbiAgICAgICAgICAgIGxvbmdDbGljazogW1xuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICcg57yWIOi+kSAnLFxuICAgICAgICAgICAgICAgICAgICBqczogJC50b1N0cmluZyhcbiAgICAgICAgICAgICAgICAgICAgICAgIChkYXRhLCBpKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoJ2hpa2VyOi8vZW1wdHknKS5ydWxlKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZGF0YSwgaSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0UGFnZVRpdGxlKCfnvJbovpFHaXRodWJBcHAnKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGQgPSBbXVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZC5wdXNoKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICflkI3np7AnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiAn6L6T5YWlQXBw5ZCN5a2XJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkLnRvU3RyaW5nKCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJNeVZhcignbmEnKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdpbnB1dCcsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0VmFsdWU6IGRhdGFbaV0uc3BsaXQoJ/CflKUnKVswXSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6ICd0ZXh0YXJlYScsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IC0xLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U6IFwicHV0TXlWYXIoJ25hJyxpbnB1dClcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICflnLDlnYAnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiAn6L6T5YWlZ2l0aHViIHJlbGVhc2VzJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkLnRvU3RyaW5nKCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJNeVZhcigncmVsZWFzZScpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2lucHV0JyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTogZGF0YVtpXS5zcGxpdCgn8J+UpScpWzFdLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogJ3RleHRhcmVhJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDogLTEsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogXCJwdXRNeVZhcigncmVsZWFzZScsaW5wdXQpXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn5Zu+5qCHJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogJ+i+k+WFpeWbvuagh+WcsOWdgCcsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJC50b1N0cmluZygoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyTXlWYXIoJ2ljbycpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2lucHV0JyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTogZGF0YVtpXS5zcGxpdCgn8J+UpScpWzJdLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogJ3RleHRhcmVhJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDogLTEsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogXCJwdXRNeVZhcignaWNvJyxpbnB1dClcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfigJzigJzigJ3igJ0nICsgJ+ehruiupOS/ruaUuScuZm9udGNvbG9yKCcjRkYwMEZGJykuYmlnKCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkYXRhLCBpKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGdldE15VmFyKCduYScpID09ICcnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lkI3lrZfkuI3og73kuLrnqbp+J1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdldE15VmFyKCdyZWxlYXNlJykgPT0gJycgfHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIS9eaHR0cHNcXDpcXC9cXC9naXRodWJcXC5jb21cXC8uKj9cXC8ocmVsZWFzZXN8dGFncykvLnRlc3QoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnZXRNeVZhcigncmVsZWFzZScpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+ivt+i+k+WFpeato+ehrueahOWcsOWdgH4nXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGl0ZW0gPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2V0TXlWYXIoJ25hJywgJycpICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICfwn5SlJyArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnZXRNeVZhcigncmVsZWFzZScsICcnKS50b0xvd2VyQ2FzZSgpICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICfwn5SlJyArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnZXRNeVZhcignaWNvJywgJycpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFbaV0gPSBpdGVtXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdoaWtlcjovL2ZpbGVzL3J1bGVzL2Fwb2xsby9HaXRodWJBcHAvR2l0aHViQXBwLnR4dCcsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBKU09OLnN0cmluZ2lmeShkYXRhKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2sodHJ1ZSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+S/ruaUueaIkOWKn34nXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMScsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7IGxpbmVWaXNpYmxlOiBmYWxzZSB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFJlc3VsdChkKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEsXG4gICAgICAgICAgICAgICAgICAgICAgICBpXG4gICAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAnIOenuyDkvY0gJyxcbiAgICAgICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoXG4gICAgICAgICAgICAgICAgICAgICAgICAoZGF0YSwgbW92ZV9pbmRleCkgPT4ge1xuXHRcdFx0XHRcdFx0XHQvLyDorr7nva7ljZXlh7vliqjkvZzkuLrmjpLluo/vvIzojrflj5bopoHnp7vliqhBcHDnmoTkvY3nva5tb3ZlX2luZGV4XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ2NsaWNrX2FjdGlvbicsICdtb3ZlJylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignbW92ZV9pbmRleCcsIG1vdmVfaW5kZXgpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gcmV0dXJuICQoJycsICfor7fovpPlhaXnp7vliqjliLDnrKzlh6DkvY1cXG4x5Li6572u6aG2LCcrZGF0YS5sZW5ndGgrJ+S4uue9ruW6lScpLmlucHV0KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vICAgICAoZGF0YSwgaSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vICAgICAgICAgdmFyIHRlbXAgPSBkYXRhW2ldXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gICAgICAgICBpZiAoaW5wdXQgLSAxIDwgaSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgIGRhdGEuc3BsaWNlKGlucHV0IC0gMSwgMCwgdGVtcClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgICAgICAgICBkYXRhLnNwbGljZShpICsgMSwgMSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgZGF0YS5zcGxpY2UoaW5wdXQsIDAsIHRlbXApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgZGF0YS5zcGxpY2UoaSwgMSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgICAgIHdyaXRlRmlsZShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgICAgICAgICAnaGlrZXI6Ly9maWxlcy9ydWxlcy9hcG9sbG8vR2l0aHViQXBwL0dpdGh1YkFwcC50eHQnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgIEpTT04uc3RyaW5naWZ5KGRhdGEpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/np7vkvY3miJDlip9+J1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vICAgICBkYXRhLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vICAgICBpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gKVxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEsXG4gICAgICAgICAgICAgICAgICAgICAgICBpXG4gICAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAnIOWIoCDpmaQgJyxcbiAgICAgICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoXG4gICAgICAgICAgICAgICAgICAgICAgICAoZGF0YSwgaSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEuc3BsaWNlKGksIDEpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKCdoaWtlcjovL2ZpbGVzL3J1bGVzL2Fwb2xsby9HaXRodWJBcHAvR2l0aHViQXBwLnR4dCcsIEpTT04uc3RyaW5naWZ5KGRhdGEpKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhLFxuICAgICAgICAgICAgICAgICAgICAgICAgaVxuICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJyDmt7sg5YqgICcsXG4gICAgICAgICAgICAgICAgICAgIGpzOiAkLnRvU3RyaW5nKFxuICAgICAgICAgICAgICAgICAgICAgICAgKOa3u+WKoCwgaSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eScgKyDmt7vliqBcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICDmt7vliqAsXG4gICAgICAgICAgICAgICAgICAgICAgICBpXG4gICAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAnICcgKyAoaSArIDEpICsgJyAnLFxuICAgICAgICAgICAgICAgICAgICBqczogJC50b1N0cmluZygoZGF0YSx2ZXJzaW9uLGkpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBkYXRhaSA9IEpTT04uc3RyaW5naWZ5KFtkYXRhW2ldXSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHRvYXN0KCfniYjmnKzlj7fvvJonICsgdmVyc2lvbltpXSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcImNvcHk6Ly9cIiArIGRhdGFpXG4gICAgICAgICAgICAgICAgICAgIH0sZGF0YSx2ZXJzaW9uLGkpLFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBdLFxuICAgICAgICB9LFxuICAgIH0pXG59XG5cbmQucHVzaCh7XG4gICAgdGl0bGU6ICfmt7vliqAnLFxuICAgIGltZzogJ2h0dHBzOi8vaW1nLnZpbnVhLmNuL2ltYWdlcy9JS1doUi5wbmcnLFxuICAgIHVybDogJ2hpa2VyOi8vZW1wdHknICsg5re75YqgLFxuICAgIGNvbF90eXBlOiAnaWNvbl80X2NhcmQnLFxuICAgIGV4dHJhOiB7XG4gICAgICAgIGk6IGRhdGEubGVuZ3RoLFxuICAgICAgICBsb25nQ2xpY2s6IFtcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB0aXRsZTogJ+W5uOi/kOaXpScsXG4gICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICB2YXIgbnVtYiA9IDEgKyBNYXRoLmZsb29yKE1hdGgucmFuZG9tKCkgKiAzMSlcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+S9oOeahOW5uOi/kOaXpeaYr+OAkCcgKyBudW1iICsgJ+OAkeaXpSdcbiAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgIF0sXG4gICAgfSxcbn0pXG5cbiAgICAgIC8vbG9nKGFwcHZzLmpvaW4oJ1xcbicpKVxuXG5zZXRSZXN1bHQoZCkiLCJzZWFyY2hfdXJsIjoiIiwiZ3JvdXAiOiLikaDkuroiLCJzZWFyY2hGaW5kIjoiIiwiZGV0YWlsX2NvbF90eXBlIjoibW92aWVfMSIsImRldGFpbF9maW5kX3J1bGUiOiJqczpcbmFkZExpc3RlbmVyKFwib25DbG9zZVwiLCAkLnRvU3RyaW5nKCgpID0+IHtcbiAgICByZWZyZXNoUGFnZShmYWxzZSlcbn0pKTtcbnZhciBkID0gW11cbnZhciBodG1sID0gZmV0Y2goTVlfVVJMKVxuXG52YXIgc3MgPSBNWV9QQVJBTVMuc3NcbnZhciBpID0gTVlfUEFSQU1TLmlcbiAgICAgICAgICAgICAgICAgICAgdmFyIGluZGV4ID0gc3MuaW5kZXhPZihpLnRvU3RyaW5nKCkpXG4gICAgICAgICAgICAgICAgICAgIGlmKGluZGV4ICE9PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICBzcy5zcGxpY2UoaW5kZXgsIDEpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoc3MubGVuZ3RoPDEpXG4gICAgICAgICAgICAgICAgICAgICAgIHt2YXIgcyA9ICcnfWVsc2V7XG4gICAgICAgICAgICAgICAgICAgICAgIHZhciBzID0gc3Muam9pbign8J+UpScpfSAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oJ3MnLCBzKVxuICAgICAgICAgICAgICAgICAgICAgfVxuXG52YXIgYXV0aG9yID0gcGRmaChodG1sLCdib2R5JiZkaXZbZGF0YS1ocGNdJiZzZWN0aW9uJiYubWItbWQtMiYmVGV4dCcpXG52YXIgaW1nID0gcGRmaChodG1sLCdib2R5JiZkaXZbZGF0YS1ocGNdJiZzZWN0aW9uJiYubWItbWQtMiYmaW1nJiZ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QQVJBTVMuaVxcbiAgICAgICAgICAgIHNldFBhZ2VUaXRsZSgn5re75YqgR2l0aHViQXBwJylcXG4gICAgICAgICAgICB2YXIgZCA9IFtdXFxuICAgICAgICAgICAgZC5wdXNoKFxcbiAgICAgICAgICAgICAgICB7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+WQjeensCcsXFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiAn6L6T5YWlQXBw5ZCN5a2XJyxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJNeVZhcignbmFtZScpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2lucHV0JyxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiBnZXRNeVZhcignbmFtZScsICcnKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiAndGV4dGFyZWEnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDogLTEsXFxuICAgICAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U6IFxcXCJwdXRNeVZhcignbmFtZScsaW5wdXQpXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn5Zyw5Z2AJyxcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6ICfovpPlhaVnaXRodWIgcmVsZWFzZXMnLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICBjbGVhck15VmFyKCdyZWxlYXNlcycpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2lucHV0JyxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiBnZXRNeVZhcigncmVsZWFzZXMnLCAnJyksXFxuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogJ3RleHRhcmVhJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IC0xLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiBcXFwicHV0TXlWYXIoJ3JlbGVhc2VzJyxpbnB1dClcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICflm77moIcnLFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogJ+i+k+WFpeWbvuagh+WcsOWdgCcsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyTXlWYXIoJ2ljb24nKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdpbnB1dCcsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTogZ2V0TXlWYXIoJ2ljb24nLCAnJyksXFxuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogJ3RleHRhcmVhJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IC0xLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiBcXFwicHV0TXlWYXIoJ2ljb24nLGlucHV0KVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICB7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+KAnOKAnOKAneKAnScgKyAn56Gu6K6k5re75YqgJy5mb250Y29sb3IoJyNGRjAwRkYnKS5iaWcoKSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaW5kZXgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZ2V0TXlWYXIoJ25hbWUnKSA9PSAnJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5ZCN5a2X5LiN6IO95Li656m6fidcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBnZXRNeVZhcigncmVsZWFzZXMnKSA9PSAnJyB8fFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAhL15odHRwc1xcXFw6XFxcXC9cXFxcL2dpdGh1YlxcXFwuY29tXFxcXC8uKj9cXFxcLyhyZWxlYXNlcyR8dGFncyQpLy50ZXN0KGdldE15VmFyKCdyZWxlYXNlcycpKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v6K+36L6T5YWl5q2j56Gu55qE5Zyw5Z2Afue9keWdgOWQjue8gOayoeaciVxcXCIvXFxcIidcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgaXRlbSA9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnZXRNeVZhcignbmFtZScsICcnKSArXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAn8J+UpScgK1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2V0TXlWYXIoJ3JlbGVhc2VzJywgJycpLnRvTG93ZXJDYXNlKCkgK1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ/CflKUnICtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdldE15VmFyKCdpY29uJywgJycpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBzdHIgPSBmZXRjaCgnaGlrZXI6Ly9maWxlcy9ydWxlcy9hcG9sbG8vR2l0aHViQXBwL0dpdGh1YkFwcC50eHQnKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIXN0cikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGxpc3QgPSBbaXRlbV1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZSgnaGlrZXI6Ly9maWxlcy9ydWxlcy9hcG9sbG8vR2l0aHViQXBwL0dpdGh1YkFwcC50eHQnLCBKU09OLnN0cmluZ2lmeShsaXN0KSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2sodHJ1ZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly9BcHDmt7vliqDmiJDlip9+J1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGxpc3QgPSBKU09OLnBhcnNlKHN0cilcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciByZWxlYXNlID0gbGlzdC5tYXAoKGkpID0+IGkuc3BsaXQoJ/CflKUnKVsxXS50b0xvd2VyQ2FzZSgpKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJlbGVhc2UuaW5kZXhPZihpdGVtLnNwbGl0KCfwn5SlJylbMV0pID09ICctMScpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gIGxpc3QucHVzaChpdGVtKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGxpc3QudW5zaGlmdChpdGVtKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpc3Quc3BsaWNlKGluZGV4LCAwLCBpdGVtKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdoaWtlcjovL2ZpbGVzL3J1bGVzL2Fwb2xsby9HaXRodWJBcHAvR2l0aHViQXBwLnR4dCcsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEpTT04uc3RyaW5naWZ5KGxpc3QpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2sodHJ1ZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8vQXBw5re75Yqg5oiQ5YqffidcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suacieebuOWQjEFwcH4nXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9LGluZGV4KSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMScsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYTogeyBsaW5lVmlzaWJsZTogZmFsc2UgfSxcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfigJzigJzigJ3igJ0nICsgJ+eCueaIkemihOiniCcuZm9udGNvbG9yKCcjMDBEQUM0JyksXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0XzEnLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHsgbGluZVZpc2libGU6IGZhbHNlIH0sXFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBnZXRNeVZhcignbmFtZScsICcnKSxcXG4gICAgICAgICAgICAgICAgICAgIGltZzogZ2V0TXlWYXIoJ2ljb24nLCAnJyksXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyTXlWYXIoJ2ljb24nKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyTXlWYXIoJ25hbWUnKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyTXlWYXIoJ3JlbGVhc2VzJylcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnaWNvbl80X2NhcmQnLFxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgKVxcbiAgICAgICAgICAgIHNldFJlc3VsdChkKVxcbiAgICAgICAgfSlcIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuS4iuS8oOS6keerr1wiLFwicGF0aFwiOlwidXBsb2FkXCIsXCJydWxlXCI6XCJmdW5jdGlvbiBiYXRjaHVwbG9hZChpbnB1dCwgcnVsZSkge1xcbiAgICBpbnB1dCA9IGlucHV0LnRyaW0oKTtcXG4gICAgbGV0IGltID0gSlNPTi5wYXJzZShpbnB1dCk7ICAgXFxuICAgIGxldCBjb25maWcgPSBKU09OLnBhcnNlKGZldGNoKCdoaWtlcjovL2ZpbGVzL3J1bGVzL2Fwb2xsby9HaXRodWJBcHAvR2l0aHViQXBwLnR4dCcpIHx8ICdbXScpO1xcbiAgICBsZXQgY291bnQgPSAwO1xcbiAgICBsZXQgYWxsID0gaW0ubWFwKGl0ID0+IGl0LnNwbGl0KCfwn5SlJylbMV0udG9Mb3dlckNhc2UoKSk7XFxuICAgIGZvciAobGV0IGkgb2YgY29uZmlnKSB7XFxuICAgICAgICBpZiAoYWxsLmluZGV4T2YoaS5zcGxpdCgn8J+UpScpWzFdLnRvTG93ZXJDYXNlKCkpID49IDApIHtcXG4gICAgICAgICAgICAvL+mHjeWkjeeahOS4jeimgVxcbiAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgfVxcbiAgICAgICAgY291bnQrKztcXG4gICAgICAgIGltL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