Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥纯音乐☁超治愈☁适合学习喔~@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCJcIixcImxpc3RUb0NsZWFyQXNzb2NpYXRlZEZLXCI6W10sXCJsaXN0VG9DbGVhclNlbGZGS1wiOltdLFwicGFnZUxpc3RcIjpbe1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIumhtemdolwiLFwicGF0aFwiOlwiQ29uZmlnLnZpZXdcIixcInJ1bGVcIjpcImNvbnN0IGVtcHR5ID0gJ2hpa2VyOi8vZW1wdHknXFxuY29uc3QgcGFnZSA9IE1ZX1BBR0U7XFxuXFxuY29uc3QgQ29sb3IgPSAodGVzdCkgPT4ge1xcbiAgICByZXR1cm4gJzxmb250IGNvbG9yPVxcXCIjRkE3Mjk4XFxcIj4nICsgdGVzdCArICc8L2Zyb250Pic7XFxufVxcblxcbmNvbnN0IFN0cm9uZyA9ICh0ZXN0KSA9PiB7XFxuICAgIHJldHVybiAnPHN0cm9uZz4nICsgdGVzdCArICc8L3N0cm9uZz4nO1xcbn1cXG5cXG5jb25zdCBTbWFsbCA9ICh0ZXN0KSA9PiB7XFxuICAgIHJldHVybiAnPHNtYWxsPicgKyB0ZXN0ICsgJzwvc21hbGw+JztcXG59XFxuXFxuY29uc3QgR3JheSA9ICh0ZXN0KSA9PiB7XFxuICAgIHJldHVybiBcXFwiPGZvbnQgY29sb3I9J2dyYXknPlxcXCIgKyB0ZXN0ICsgXFxcIjwvZ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GdldENvbmZpZ1VybCA9IChwYXRoKSA9PiB7XFxuICAgIHJldHVybiBKU09OLnBhcnNlKHJlcXVlc3QocGF0aCkpXFxufVxcblxcbmNvbnN0IGdldEJhc2VQYXJzZSA9ICgpID0+IHtcXG4gICAgdHJ5IHtcXG4gICAgICAgIGxldCBpVGFnID0gc3RvcmFnZTAuZ2V0TXlWYXIoXFxcIjppVGFnXFxcIiwgW10pO1xcbiAgICAgICAgaWYgKGlUYWcubGVuZ3RoID09IDApIHtcXG4gICAgICAgICAgICBwYXRoID0gJ2h0dHA6Ly8xMDEuNDMuMTIuMTM1OjMyMDAvZ2V0U29uZ0xpc3RDYXRlZ29yaWVzJ1xcbiAgICAgICAgICAgIGlUYWcgPSBnZXRDb25maWdVcmwocGF0aCkucmVzcG9uc2UuZGF0YS5jYXRlZ29yaWVzXFxuICAgICAgICAgICAgc3RvcmFnZTAucHV0TXlWYXIoXFxcIjppVGFnXFxcIiwgaVRhZyk7XFxuICAgICAgICB9XFxuICAgICAgICBjb25zdCBkID0gW11cXG4gICAgICAgIGNvbnN0IGNvbnRsaXN0ID0gW107XFxuICAgICAgICBpVGFnLmZvckVhY2goKHRhYnMsIGkpID0+IHtcXG4gICAgICAgICAgICBuYW1lID0gdGFicy5jYXRlZ29yeUdyb3VwTmFtZVxcbiAgICAgICAgICAgIGlmIChwYWdlID09IDEpIHtcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBnZXRNeVZhcign5YiG57G7JywgJzAnKSA9PSBpID8gUmljaChTdHJvbmcoQ29sb3IobmFtZSkpKSA6IG5hbWUsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGVtcHR5LCBpKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ+WIhuexuycsIGkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZW1wdHk7XFxuICAgICAgICAgICAgICAgICAgICB9LCBlbXB0eSwgaSksXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBjb250bGlzdFtpXSA9IFtdO1xcbiAgICAgICAgICAgIGNvbnRzID0gdGFicy5pdGVtcztcXG4gICAgICAgICAgICBjb250cy5mb3JFYWNoKGl0ZW0gPT4ge1xcbiAgICAgICAgICAgICAgICBjb250bGlzdFtpXS5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtLmNhdGVnb3J5TmFtZSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogaXRlbS5jYXRlZ29yeUlkXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9KVxcbiAgICAgICAgY29uc3QgaW5kZXggPSBnZXRNeVZhcign5YiG57G7JywgJzAnKVxcbiAgICAgICAgaWYgKHBhZ2UgPT0gMSkge1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnYmxhbmtfYmxvY2snXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICBjb250bGlzdFtpbmRleF0uZm9yRWFjaCgoY29udHNsaXN0LCBpKSA9PiB7XFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogZ2V0TXlWYXIoaW5kZXgsICcwJykgPT0gaSA/IFJpY2goU3Ryb25nKENvbG9yKGNvbnRzbGlzdC50aXRsZSkpKSA6IGNvbnRzbGlzdC50aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaW5kZXgsIGVtcHR5LCBpKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoaW5kZXgsIGkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGVtcHR5O1xcbiAgICAgICAgICAgICAgICAgICAgfSwgaW5kZXgsIGVtcHR5LCBpKSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbidcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogXFxcIuivt+i+k+WFpeatjOabsuWQjeensC/lhbPplK7or41cXFwiLFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoZW1wdHkgKyAnI25vSGlzdG9yeSMjbm9SZWNvcmRIaXN0b3J5I2Z5cGFnZScpLnJ1bGUoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgc2V0UGFnZVRpdGxlKCfogYblkKzCt+aQnOe0oicpXFxuICAgICAgICAgICAgICAgICAgICByZXF1aXJlKCdoaWtlcjovL3BhZ2UvQ29uZmlnLnZpZXcnKVxcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgZCA9IFtdO1xcbiAgICAgICAgICAgICAgICAgICAgZ2V0U2VhcmNoUGFyc2UoZClcXG4gICAgICAgICAgICAgICAgICAgIHNldFJlc3VsdChkKVxcbiAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJpY29uXzFfc2VhcmNoXFxcIlxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9XFxuICAgICAgICBpZCA9IGNvbnRsaXN0W2luZGV4XVtnZXRNeVZhcihpbmRleCwgJzAnKV0udXJsXFxuICAgICAgICBib2R5ID0gJ2h0dHA6Ly8xMDEuNDMuMTIuMTM1OjMyMDAvZ2V0U29uZ0xp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RpZD0nICsgaXRlbS5kaXNzaWRcXG4gICAgICAgICAgICAgICAgICAgIGRhdGEgPSBnZXRDb25maWdVcmwoYm9keSkucmVzcG9uc2UuY2RsaXN0WzBdXFxuICAgICAgICAgICAgICAgICAgICBjb25zdCBkID0gW11cXG4gICAgICAgICAgICAgICAgICAgIGxheW91dHNQYXJzZShkLCBkYXRhKVxcbiAgICAgICAgICAgICAgICAgICAgc2V0UmVzdWx0KGQpXFxuICAgICAgICAgICAgICAgIH0sIGl0ZW0pLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2NhcmRfcGljXzMnXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH0pXFxuICAgIH0gZWxzZSB7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiBSaWNoKFNtYWxsKEdyYXkoJ++9nu+9nu+9nuaIkeaYr+acieW6lee6v+eahO+9nu+9nu+9nicpKSksXFxuICAgICAgICAgICAgdXJsOiBlbXB0eSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIGxpbmVWaXNpYmxlOiBmYWxzZVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pXFxuICAgIH1cXG59XFxuXFxuY29uc3QgZ2V0cGxheWVyID0gKGl0ZW0pID0+IHtcXG4gICAgdHJ5IHtcXG4gICAgICAgIG5hbWVNYXAgPSBbJ+agh+WHhicsICfpq5jmuIUnLCAnSETpq5jmuIUnLCAn5peg5o2fJ11cXG4gICAgICAgIG11c2ljTWFwID0gWydzaXplXzEyOG1wMycsICdzaXplXzE5MmFhYycsICdzaXplXzMyMG1wMycsICdzaXplX2ZsYWMnXVxcbiAgICAgICAgbXVzaWNzID0gW11cXG4gICAgICAgIGkgPSBtdXNpY01hcC5sZW5ndGhcXG4gICAgICAgIHdoaWxlIChpLS0pIHtcXG4gICAgICAgICAgICBib2R5ID0gJ2h0dHBzOi8vYXBpLmRvZzg4Ni5jb20vdjEvcXEvZ2V0UVFTb25nP2lkPScgKyAoaXRlbS5taWQgfHwgaXRlbS5zb25nbWlkKSArICcmY29kZT0nICsgbXVzaWNNYXBbaV1cXG4gICAgICAgICAgICBtdXNpYyA9IGdldENvbmZpZ1VybChib2R5KS5kYXRhLnVybFxcbiAgICAgICAgICAgIGlmIChtdXNpYy5zZWFyY2goJ2d1aWQnKSA+PSAxKSB7XFxuICAgICAgICAgICAgICAgIG11c2ljcy5wdXNoKG11c2ljKVxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIG5hbWVNYXAuc3BsaWNlKGksIDEpXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICAgICAgbmFtZXMgPSBbXVxcbiAgICAgICAgeCA9IG5hbWVNYXAubGVuZ3RoXFxuICAgICAgICB3aGlsZSAoeC0tKSB7XFxuICAgICAgICAgICAgbmFtZXMucHVzaChuYW1lTWFwW3hdKVxcbiAgICAgICAgfVxcbiAgICAgICAgYm9keSA9ICdodHRwczovL2FwaS5kb2c4ODYuY29tL3YxL3FxL2dldFFRTHlyaWM/aWQ9JyArIChpdGVtLm1pZCB8fCBpdGVtLnNvbmdtaWQpXFxuICAgICAgICBseXNpYyA9IGdldENvbmZpZ1VybChib2R5KS5kYXRhXFxuICAgICAgICBpZiAobXVzaWNzLmxlbmd0aCkge1xcbiAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgIHVybHM6IG11c2ljcyxcXG4gICAgICAgICAgICAgICAgbmFtZXM6IG5hbWVzLFxcbiAgICAgICAgICAgICAgICBseXJpYzogbHlzaWNcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfVxcbiAgICAgICAgcmV0dXJuICd0b2FzdDovL+aaguaXoOi1hOa6kOWPr+aSre+8ge+8gSdcXG4gICAgfSBjYXRjaCAoZSkge1xcbiAgICAg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h0dHBzOi8veS5ndGltZy5jbi9tdXNpYy9waG90b19uZXcvVDAwMlIzMDB4MzAwTTAwMCcgKyBpdGVtLmFsYnVtLm1pZCArICcuanBnJ1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogaXRlbS5uYW1lLFxcbiAgICAgICAgICAgICAgICBkZXNjOiBzaW5nZXIsXFxuICAgICAgICAgICAgICAgIGltZzogaW1nLFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoZW1wdHkpLmxhenlSdWxlKChpdGVtKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBNWV9QQUdFID0gMVxcbiAgICAgICAgICAgICAgICAgICAgcmVxdWlyZSgnaGlrZXI6Ly9wYWdlL0NvbmZpZy52aWV3JylcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBnZXRwbGF5ZXIoaXRlbSlcXG4gICAgICAgICAgICAgICAgfSwgaXRlbSksXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnY2FyZF9waWNfMycsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICBpbmhlcml0VGl0bGU6IGZhbHNlLFxcbiAgICAgICAgICAgICAgICAgICAgbGluZVZpc2libGU6IGZhbHNlXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSlcXG4gICAgfSBlbHNlIHtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IFJpY2goU21hbGwoR3JheSgn772e772e772e5oiR5piv5pyJ5bqV57q/55qE772e772e772eJykpKSxcXG4gICAgICAgICAgICB1cmw6IGVtcHR5LFxcbiAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMScsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgbGluZVZpc2libGU6IGZhbHNlXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSlcXG4gICAgfVxcbn1cXG5cXG5jb25zdCBnZXRTZWFyY2hQYXJzZSA9IChkKSA9PiB7XFxuICAgIGlmICghZ2V0TXlWYXIoJ+i/lOWbnicpKSB7XFxuICAgICAgICBjb25maXJtKHtcXG4gICAgICAgICAgICB0aXRsZTogXFxcIui/lOWbnuiusOW9lVxcXCIsXFxuICAgICAgICAgICAgY29udGVudDogXFxcIuS4i+asoei/m+WFpeaQnOe0oumhtemdolxcXFxu5bCG6L+U5Zue5Yiw5pCc57Si6K6w5b2VXFxcIixcXG4gICAgICAgICAgICBjb25maXJtOiAoKSA9PiB7XFxuICAgICAgICAgICAgICAgIHB1dE15VmFyKCfov5Tlm54nLCB0cnVlKTtcXG4gICAgICAgICAgICAgICAgdG9hc3QoJ2VtbW1+Jyk7XFxuICAgICAgICAgICAgICAgIGphdmEubGFuZy5UaHJlYWQuc2xlZXAoMzAwMCk7XFxuICAgICAgICAgICAgICAgIHRvYXN0KCfkuIvmrKHph43lkK/vvIzlsIbph43mlrDmi4nlkK/lvLnnqpcnKVxcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgY2FuY2VsOiAoKSA9PiB7XFxuICAgICAgICAgICAgICAgIHB1dE15VmFyKCfov5Tlm54nLCBmYWxzZSk7XFxuICAgICAgICAgICAgICAgIHRvYXN0KCfkv7rkuI3opoHjg70o4omn0JTiiaYp44OOficpO1xcbiAgICAgICAgICAgICAgICBqYXZhLmxhbmcuVGhyZWFkLnNsZWVwKDMwMDApO1xcbiAgICAgICAgICAgICAgICB0b2FzdCgn5LiL5qyh6YeN5ZCv77yM5bCG6YeN5paw5ouJ5ZCv5by556qXJylcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KVxcbiAgICB9XFxuICAgIGlmIChnZXRNeVZhcign6L+U5ZueJykgPT0gJ3RydWUnKSB7XFxuICAgICAgICBhZGRMaXN0ZW5lcignb25DbG9zZScsICgpID0+IHtcXG4gICAgICAgICAgICBjbGVhck15VmFyKCflhbPplK7or40nKVxcbiAgICAgICAgfSlcXG4gICAgfVxcbiAgICBpZiAocGFnZSA9PSAxKSB7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiAn8J+UjScsXFxuICAgICAgICAgICAgZGVzYzogXFxcIuaQnOS9oOaDs+imgeeahC4uLi4uLlxcXCIsXFxuICAgICAgICAgICAgdXJsOiAkLnRvU3RyaW5nKChnZXRTZWFyY2hVcmwsIGVtcHR5KSA9PiB7XFxuICAgICAgICAgICAgICAgIHB1dE15VmFyKCflhbPplK7or40nLCBpbnB1dCk7XFxuICAgICAgICAgICAgICAgIGlmIChpbnB1dCAhPSAnJykgZ2V0U2VhcmNoVXJsKGlucHV0KTtcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIGVtcHR5O1xcbiAgICAgICAgICAgIH0sIGdldFNlYXJjaFVybCwgZW1wdHkpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiAnaW5wdXQnLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTogZ2V0TXlWYXIoJ+WFs+mUruivjScpXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSlcXG4gICAgfVxcbiAgICBpZiAoZ2V0TXlWYXIoJ+WFs+mUruivjScpID09ICcnKSB7XFxuICAgICAgICBsZXQgbWVtID0gc3RvcmFnZTAuZ2V0SXRlbShcXFwi6IGG5ZCs6K6w5b2VXFxcIiwgW10pO1xcbiAgICAgICAgaWYgKG1lbS5sZW5ndGggPiAwKSB7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IFJpY2goQmlnKCfwn5OdIOaQnOe0ouWOhuWPsicpKSxcXG4gICAgICAgICAgICAgICAgdXJsOiAkKFxcXCIjbm9Mb2FkaW5nI1xcXCIpLmxhenlSdWxlKChlbXB0eSwgZ2V0Q29uZmlybSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgZ2V0Q29uZmlybSgpXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZW1wdHk7XFxuICAgICAgICAgICAgICAgIH0sIGVtcHR5LCBnZXRDb25maXJtKSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0XzEnLFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgbGluZVZpc2libGU6IGZhbHNlXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogUmljaChTbWFsbChHcmF5KCfvvZ7vvZ7vvZ7ov5jmsqHmkJzntKLlkaLvvZ7vvZ7vvZ4nKSkpLFxcbiAgICAgICAgICAgICAgICB1cmw6IGVtcHR5LFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnLFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgbGluZVZpc2libGU6IGZhbHNlXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfVxcbiAgICAgICAgZm9yIChsZXQgaSA9IG1lbS5sZW5ndGggLSAxOyBpID49IDA7IGktLSkge1xcbiAgICAgICAgICAgIGxldCBpdCA9IG1lbVtpXTtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogaXQsXFxuICAgICAgICAgICAgICAgIHVybDogJChcXFwiI25vTG9hZGluZyNcXFwiKS5sYXp5UnVsZSgoZ2V0U2VhcmNoVXJsLCBpdCwgZW1wdHkpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCflhbPplK7or40nLCBpdCk7XFxuICAgICAgICAgICAgICAgICA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AgICAgICBzaW5nZXIgPSBpdGVtLnNpbmdlci5tYXAoaXQgPT4gaXQubmFtZSkuam9pbignXFxcXHQnKVxcbiAgICAgICAgICAgICAgICBpbWcgPSAnaHR0cHM6Ly9taXNzdW8ucnUvZmlsZS81MWU3ODVkMzRhYmE4MWY2MTk5NGYuanBnJ1xcbiAgICAgICAgICAgICAgICBpZiAoaXRlbS5hbGJ1bW1pZCkge1xcbiAgICAgICAgICAgICAgICAgICAgaW1nID0gJ2h0dHBzOi8veS5ndGltZy5jbi9tdXNpYy9waG90b19uZXcvVDAwMlIzMDB4MzAwTTAwMCcgKyBpdGVtLmFsYnVtbWlkICsgJy5qcGcnXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtLnNvbmduYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogc2luZ2VyLFxcbiAgICAgICAgICAgICAgICAgICAgaW1nOiBpbWcsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQoZW1wdHkpLmxhenlSdWxlKChpdGVtKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgTVlfUEFHRSA9IDFcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXF1aXJlKCdoaWtlcjovL3BhZ2UvQ29uZmlnLnZpZXcnKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBnZXRwbGF5ZXIoaXRlbSlcXG4gICAgICAgICAgICAgICAgICAgIH0sIGl0ZW0pLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdjYXJkX3BpY18zJyxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5oZXJpdFRpdGxlOiBmYWxzZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBsaW5lVmlzaWJsZTogZmFsc2VcXG4gICAgICAgICAgICAgICAgICAgIH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PSBzdG9yYWdlMC5nZXRNeVZhcihcXFxcXFxcIjppVGFnXFxcXFxcXCIsIFtdKTtcXFxcbiAgICAgICAgaWYgKGlUYWcubGVuZ3RoID09IDApIHtcXFxcbiAgICAgICAgICAgIHBhdGggPSAnaHR0cDovLzEwMS40My4xMi4xMzU6MzIwMC9nZXRTb25nTGlzdENhdGVnb3JpZXMnXFxcXG4gICAgICAgICAgICBpVGFnID0gZ2V0Q29uZmlnVXJsKHBhdGgpLnJlc3BvbnNlLmRhdGEuY2F0ZWdvcmllc1xcXFxuICAgICAgICAgICAgc3RvcmFnZTAucHV0TXlWYXIoXFxcXFxcXCI6aVRhZ1xcXFxcXFwiLCBpVGFnKTtcXFxcbiAgICAgICAgfVxcXFxuICAgICAgICBjb25zdCBkID0gW11cXFxcbiAgICAgICAgY29uc3QgY29udGxpc3QgPSBbXTtcXFxcbiAgICAgICAgaVRhZy5mb3JFYWNoKCh0YWJzLCBpKSA9PiB7XFxcXG4gICAgICAgICAgICBuYW1lID0gdGFicy5jYXRlZ29yeUdyb3VwTmFtZVxcXFxuICAgICAgICAgICAgaWYgKHBhZ2UgPT0gMSkge1xcXFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBnZXRNeVZhcign5YiG57G7JywgJzAnKSA9PSBpID8gUmljaChTdHJvbmcoQ29sb3IobmFtZSkpKSA6IG5hbWUsXFxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoZW1wdHksIGkpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCfliIbnsbsnLCBpKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBlbXB0eTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfSwgZW1wdHksIGkpLFxcXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nXFxcXG4gICAgICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICBjb250bGlzdFtpXSA9IFtdO1xcXFxuICAgICAgICAgICAgY29udHMgPSB0YWJzLml0ZW1zO1xcXFxuICAgICAgICAgICAgY29udHMuZm9yRWFjaChpdGVtID0+IHtcXFxcbiAgICAgICAgICAgICAgICBjb250bGlzdFtpXS5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGl0ZW0uY2F0ZWdvcnlOYW1lLFxcXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IGl0ZW0uY2F0ZWdvcnlJZFxcXFxuICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgfSlcXFxcbiAgICAgICAgY29uc3QgaW5kZXggPSBnZXRNeVZhcign5YiG57G7JywgJzAnKVxcXFxuICAgICAgICBpZiAocGFnZSA9PSAxKSB7XFxcXG4gICAgICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnYmxhbmtfYmxvY2snXFxcXG4gICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgY29udGxpc3RbaW5kZXhdLmZvckVhY2goKGNvbnRzbGlzdCwgaSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBnZXRNeVZhcihpbmRleCwgJzAnKSA9PSBpID8gUmljaChTdHJvbmcoQ29sb3IoY29udHNsaXN0LnRpdGxlKSkpIDogY29udHNsaXN0LnRpdGxlLFxcXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGluZGV4LCBlbXB0eSwgaSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoaW5kZXgsIGkpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBlbXB0eTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfSwgaW5kZXgsIGVtcHR5LCBpKSxcXFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJ1xcXFxuICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgdGl0bGU6IFxcXFxcXFwi6K+36L6T5YWl5q2M5puy5ZCN56ewL+WFs+mUruivjVxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgIHVybDogJChlbXB0eSArICcjbm9IaXN0b3J5IyNub1JlY29yZEhpc3RvcnkjZnlwYWdlJykucnVsZSgoKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHNldFBhZ2VUaXRsZSgn6IGG5ZCswrfmkJzntKInKVxcXFxuICAgICAgICAgICAgICAgICAgICByZXF1aXJlKCdoaWtlcjovL3BhZ2UvQ29uZmlnLnZpZXcnKVxcXFxuICAgICAgICAgICAgICAgICAgICBjb25zdCBkID0gW107XFxcXG4gICAgICAgICAgICAgICAgICAgIGdldFNlYXJjaFBhcnNlKGQpXFxcXG4gICAgICAgICAgICAgICAgICAgIHNldFJlc3VsdChkKVxcXFxuICAgICAgICAgICAgICAgIH0pLFxcXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcImljb25fMV9zZWFyY2hcXFxcXFxcIlxcXFxuICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgfVxcXFxuICAgICAgICBpZCA9IGNvbnRsaXN0W2luZGV4XVtnZXRNeVZhcihpbmRleCwgJzAnKV0udXJsXFxcXG4gICAgICAgIGJvZHkgPSAnaHR0cDovLzEwMS40My4xMi4xMzU6MzIwMC9nZXRTb25nTGlzdHM/Y2F0ZWdvcnlJZD0nICsgaWQgKyAnJnBhZ2U9JyArIHBhZ2VcXFxcbiAgICAgICAgZGF0YSA9IGdldENvbmZpZ1VybChib2R5KS5yZXNwb25zZS5kYXRhLmxpc3RcXFxcbiAgICAgICAgbGF5b3V0UGFyc2UoZCwgZGF0YSlcXFxcbiAgICAgICAgc2V0UmVzdWx0KGQpXFxcXG4gICAgfSBjYXRjaCAoZSkge1xcXFxuICAgICAgICBzZXRSZXN1bHQoW3tcXFxcbiAgICAgICAgICAgIHRpdGxlOiBSaWNoKEdyYXkoU21hbGwoJ35+fuW9k+WJjee9kee7nOW8guW4uO+8jOivt+WIt+aWsOmHjeivlX5+ficpKSksXFxcXG4gICAgICAgICAgICB1cmw6IGVtcHR5LFxcXFxuICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJyxcXFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxcXG4gICAgICAgICAgICAgICAgbGluZVZpc2libGU6IGZhbHNlXFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIH1dKVxcXFxuICAgIH1cXFxcbn1cXFxcblxcXFxuY29uc3QgbGF5b3V0UGFyc2UgPSAoZCwgZGF0YSkgPT4ge1xcXFxuICAgIGlmIChkYXRhLmxlbmd0aCkge1xcXFxuICAgICAgICBkYXRhLmZvckVhY2goaXRlbSA9PiB7XFxcXG4gICAgICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtLmRpc3NuYW1lLFxcXFxuICAgICAgICAgICAgICAgIHBpY191cmw6IGl0ZW0uaW1ndXJsLFxcXFxuICAgICAgICAgICAgICAgIHVybDogJChlbXB0eSArICdmeXBhZ2UnKS5ydWxlKChpdGVtKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHJlcXVpcmUoJ2hpa2VyOi8vcGFnZS9Db25maWcudmlldycpXFxcXG4gICAgICAgICAgICAgICAgICAgIGJvZHkgPSAnaHR0cDovLzEwMS40My4xMi4xMzU6MzIwMC9nZXRTb25nTGlzdERldGFpbD9kaXNzdGlkPScgKyBpdGVtLmRpc3NpZFxcXFxuICAgICAgICAgICAgICAgICAgICBkYXRhID0gZ2V0Q29uZmlnVXJsKGJvZHkpLnJlc3BvbnNlLmNkbGlzdFswXVxcXFxuICAgICAgICAgICAgICAgICAgICBjb25zdCBkID0gW11cXFxcbiAgICAgICAgICAgICAgICAgICAgbGF5b3V0c1BhcnNlKGQsIGRhdGEpXFxcXG4gICAgICAgICAgICAgICAgICAgIHNldFJlc3VsdChkKVxcXFxuICAgICAgICAgICAgICAgIH0sIGl0ZW0pLFxcXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnY2FyZF9waWNfMydcXFxcbiAgICAgICAgICAgIH0pXFxcXG4gICAgICAgIH0pXFxcXG4gICAgfSBlbHNlIHtcXFxcbiAgICAgICAgZC5wdXNoKHtcXFxcbiAgICAgICAgICAgIHRpdGxlOiBSaWNoKFNtYWxsKEdyYXkoJ++9nu+9nu+9nuaIkeaYr+acieW6lee6v+eahO+9nu+9nu+9nicpKSksXFxcXG4gICAgICAgICAgICB1cmw6IGVtcHR5LFxcXFxuICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJyxcXFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxcXG4gICAgICAgICAgICAgICAgbGluZVZpc2libGU6IGZhbHNlXFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIH0pXFxcXG4gICAgfVxcXFxufVxcXFxuXFxcXG5jb25zdCBnZXRwbGF5ZXIgPSAoaXRlbSkgPT4ge1xcXFxuICAgIHRyeSB7XFxcXG4gICAgICAgIG5hbWVNYXAgPSBbJ+agh+WHhicsICfpq5jmuIUnLCAnSETpq5jmuIUnLCAn5peg5o2fJ11cXFxcbiAgICAgICAgbXVzaWNNYXAgPSBbJ3NpemVfMTI4bXAzJywgJ3NpemVfMTkyYWFjJywgJ3NpemVfMzIwbXAzJywgJ3NpemVfZmxhYyddXFxcXG4gICAgICAgIG11c2ljcyA9IFtdXFxcXG4gICAgICAgIGkgPSBtdXNpY01hcC5sZW5ndGhcXFxcbiAgICAgICAgd2hpbGUgKGktLSkge1xcXFxuICAgICAgICAgICAgYm9keSA9ICdodHRwczovL2FwaS5kb2c4ODYuY29tL3YxL3FxL2dldFFRU29uZz9pZD0nICsgKGl0ZW0ubWlkIHx8IGl0ZW0uc29uZ21pZCkgKyAnJmNvZGU9JyArIG11c2ljTWFwW2ldXFxcXG4gICAgICAgICAgICBtdXNpYyA9IGdldENvbmZpZ1VybChib2R5KS5kYXRhLnVybFxcXFxuICAgICAgICAgICAgaWYgKG11c2ljLnNlYXJjaCgnZ3VpZCcpID49IDEpIHtcXFxcbiAgICAgICAgICAgICAgICBtdXNpY3MucHVzaChtdXNpYylcXFxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgbmFtZU1hcC5zcGxpY2UoaSwgMSlcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgfVxcXFxuICAgICAgICBuYW1lcyA9IFtdXFxcXG4gICAgICAgIHggPSBuYW1lTWFwLmxlbmd0aFxcXFxuICAgICAgICB3aGlsZSAoeC0tKSB7XFxcXG4gICAgICAgICAgICBuYW1lcy5wdXNoKG5hbWVNYXBbeF0pXFxcXG4gICAgICAgIH1cXFxcbiAgICAgICAgYm9keSA9ICdodHRwczovL2FwaS5kb2c4ODYuY29tL3YxL3FxL2dldFFRTHlyaWM/aWQ9JyArIChpdGVtLm1pZCB8fCBpdGVtLnNvbmdtaWQpXFxcXG4gICAgICAgIGx5c2ljID0gZ2V0Q29uZmlnVXJsKGJvZHkpLmRhdGFcXFxcbiAgICAgICAgaWYgKG11c2ljcy5sZW5ndGgpIHtcXFxcbiAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeSh7XFxcXG4gICAgICAgICAgICAgICAgdXJsczogbXVzaWNzLFxcXFxuICAgICAgICAgICAgICAgIG5hbWVzOiBuYW1lcyxcXFxcbiAgICAgICAgICAgICAgICBseXJpYzogbHlzaWNcXFxcbiAgICAgICAgICAgIH0pXFxcXG4gICAgICAgIH1cXFxcbiAgICAgICAgcmV0dXJuICd0b2FzdDovL+aaguaXoOi1hOa6kOWPr+aSre+8ge+8gSdcXFxcbiAgICB9IGNhdGNoIChlKSB7XFxcXG4gICAgICAgIHJldHVybiAndG9hc3Q6Ly/ns5/ns5XltKnmuoPkuobvvIHvvIHor7fnrYnlvoXmsrvmhIguLi4uJ1xcXFxuICAgIH1cXFxcbn1cXFxcblxcXFxuY29uc3QgbGF5b3V0c1BhcnNlID0gKGQsIGRhdGEpID0+IHtcXFxcbiAgICBpZiAocGFnZSA9PSAxKSB7XFxcXG4gICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICB0aXRsZTogZGF0YS5kaXNzbmFtZSxcXFxcbiAgICAgICAgICAgIGRlc2M6IFJpY2goU21hbGwoZGF0YS5kZXNjKSksXFxcXG4gICAgICAgICAgICBwaWNfdXJsOiBkYXRhLmxvZ28sXFxcXG4gICAgICAgICAgICB1cmw6ICQoZW1wdHkpLmxhenlSdWxlKChkYXRhKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgZ2V0Q29wZSA9ICfohb7orq/mrYzljZUnICsgJ1xcXFxcXFxcbuatjOWNleWQjeensO+8micgKyBkYXRhLmRpc3NuYW1lICsgJ1xcXFxcXFxcbuatjOWNleivhuWIq++8micgKyBiYXNlNjRFbmNvZGUoJycgKyBkYXRhLmRpc3N0aWQgKyAnJylcXFxcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2NvcHk6Ly8nICsgZ2V0Q29wZVxcXFxuICAgICAgICAgICAgfSwgZGF0YSksXFxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzFfdmVydGljYWxfcGljJ1xcXFxuICAgICAgICB9KVxcXFxuICAgICAgICBkYXRhLnNvbmdsaXN0LmZvckVhY2goaXRlbSA9PiB7XFxcXG4gICAgICAgICAgICBzaW5nZXIgPSBpdGVtLnNpbmdlci5tYXAoaXQgPT4gaXQubmFtZSkuam9pbignXFxcXFxcXFx0JylcXFxcbiAgICAgICAgICAgIGltZyA9ICdodHRwczovL21pc3N1by5ydS9maWxlLzUxZTc4NWQzNGFiYTgxZjYxOTk0Zi5qcGcnXFxcXG4gICAgICAgICAgICBpZiAoaXRlbS5hbGJ1bS5taWQpIHtcXFxcbiAgICAgICAgICAgICAgICBpbWcgPSAnaHR0cHM6Ly95Lmd0aW1nLmNuL211c2ljL3Bob3RvX25ldy9UMDAyUjMwMHgzMDBNMDAwJyArIGl0ZW0uYWxidW0ubWlkICsgJy5qcGcnXFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtLm5hbWUsXFxcXG4gICAgICAgICAgICAgICAgZGVzYzogc2luZ2VyLFxcXFxuICAgICAgICAgICAgICAgIGltZzogaW1nLFxcXFxuICAgICAgICAgICAgICAgIHVybDogJChlbXB0eSkubGF6eVJ1bGUoKGl0ZW0pID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgTVlfUEFHRSA9IDFcXFxcbiAgICAgICAgICAgICAgICAgICAgcmVxdWlyZSgnaGlrZXI6Ly9wYWdlL0NvbmZpZy52aWV3JylcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGdldHBsYXllcihpdGVtKVxcXFxuICAgICAgICAgICAgICAgIH0sIGl0ZW0pLFxcXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnY2FyZF9waWNfMycsXFxcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgaW5oZXJpdFRpdGxlOiBmYWxzZSxcXFxcbiAgICAgICAgICAgICAgICAgICAgbGluZVZpc2libGU6IGZhbHNlXFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgfSlcXFxcbiAgICB9IGVsc2Uge1xcXFxuICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgdGl0bGU6IFJpY2goU21hbGwoR3JheSgn772e772e772e5oiR5piv5pyJ5bqV57q/55qE772e772e772eJykpKSxcXFxcbiAgICAgICAgICAgIHVybDogZW1wdHksXFxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnLFxcXFxuICAgICAgICAgICAgZXh0cmE6IHtcXFxcbiAgICAgICAgICAgICAgICBsaW5lVmlzaWJsZTogZmFsc2VcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgfSlcXFxcbiAgICB9XFxcXG59XFxcXG5cXFxcbmNvbnN0IGdldFNlYXJjaFBhcnNlID0gKGQpID0+IHtcXFxcbiAgICBpZiAoIWdldE15VmFyKCfov5Tlm54nKSkge1xcXFxuICAgICAgICBjb25maXJtKHtcXFxcbiAgICAgICAgICAgIHRpdGxlOiBcXFxcXFxcIui/lOWbnuiusOW9lVxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgY29udGVudDogXFxcXFxcXCLkuIvmrKHov5vlhaXmkJzntKLpobXpnaJcXFxcXFxcXG7lsIbov5Tlm57liLDmkJzntKLorrDlvZVcXFxcXFxcIixcXFxcbiAgICAgICAgICAgIGNvbmZpcm06ICgpID0+IHtcXFxcbiAgICAgICAgICAgICAgICBwdXRNeVZhcign6L+U5ZueJywgdHJ1ZSk7XFxcXG4gICAgICAgICAgICAgICAgdG9hc3QoJ2VtbW1+Jyk7XFxcXG4gICAgICAgICAgICAgICAgamF2YS5sYW5nLlRocmVhZC5zbGVlcCgzMDAwKTtcXFxcbiAgICAgICAgICAgICAgICB0b2FzdCgn5LiL5qyh6YeN5ZCv77yM5bCG6YeN5paw5ouJ5ZCv5by556qXJylcXFxcbiAgICAgICAgICAgIH0sXFxcXG4gICAgICAgICAgICBjYW5jZWw6ICgpID0+IHtcXFxcbiAgICAgICAgICAgICAgICBwdXRNeVZhcign6L+U5ZueJywgZmFsc2UpO1xcXFxuICAgICAgICAgICAgICAgIHRvYXN0KCfkv7rkuI3opoHjg70o4omn0JTiiaYp44OOficpO1xcXFxuICAgICAgICAgICAgICAgIGphdmEubGFuZy5UaHJlYWQuc2xlZXAoMzAwMCk7XFxcXG4gICAgICAgICAgICAgICAgdG9hc3QoJ+S4i+asoemHjeWQr++8jOWwhumHjeaWsOaLieWQr+W8ueeqlycpXFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIH0pXFxcXG4gICAgfVxcXFxuICAgIGlmIChnZXRNeVZhcign6L+U5ZueJykgPT0gJ3RydWUnKSB7XFxcXG4gICAgICAgIGFkZExpc3RlbmVyKCdvbkNsb3NlJywgKCkgPT4ge1xcXFxuICAgICAgICAgICAgY2xlYXJNeVZhcign5YWz6ZSu6K+NJylcXFxcbiAgICAgICAgfSlcXFxcbiAgICB9XFxcXG4gICAgaWYgKHBhZ2UgPT0gMSkge1xcXFxuICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgdGl0bGU6ICfwn5SNJyxcXFxcbiAgICAgICAgICAgIGRlc2M6IFxcXFxcXFwi5pCc5L2g5oOz6KaB55qELi4uLi4uXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICB1cmw6ICQudG9TdHJpbmcoKGdldFNlYXJjaFVybCwgZW1wdHkpID0+IHtcXFxcbiAgICAgICAgICAgICAgICBwdXRNeVZhcign5YWz6ZSu6K+NJywgaW5wdXQpO1xcXFxuICAgICAgICAgICAgICAgIGlmIChpbnB1dCAhPSAnJykgZ2V0U2VhcmNoVXJsKGlucHV0KTtcXFxcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xcXFxuICAgICAgICAgICAgICAgIHJldHVybiBlbXB0eTtcXFxcbiAgICAgICAgICAgIH0sIGdldFNlYXJjaFVybCwgZW1wdHkpLFxcXFxuICAgICAgICAgICAgY29sX3R5cGU6ICdpbnB1dCcsXFxcXG4gICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTogZ2V0TXlWYXIoJ+WFs+mUruivjScpXFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIH0pXFxcXG4gICAgfVxcXFxuICAgIGlmIChnZXRNeVZhcign5YWz6ZSu6K+NJykgPT0gJycpIHtcXFxcbiAgICAgICAgbGV0IG1lbSA9IHN0b3JhZ2UwLmdldEl0ZW0oXFxcXFxcXCLogYblkKzorrDlvZVcXFxcXFxcIiwgW10pO1xcXFxuICAgICAgICBpZiAobWVtLmxlbmd0aCA+IDApIHtcXFxcbiAgICAgICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgdGl0bGU6IFJpY2goQmlnKCfwn5OdIOaQnOe0ouWOhuWPsicpKSxcXFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoXFxcXFxcXCIjbm9Mb2FkaW5nI1xcXFxcXFwiKS5sYXp5UnVsZSgoZW1wdHksIGdldENvbmZpcm0pID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgZ2V0Q29uZmlybSgpXFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBlbXB0eTtcXFxcbiAgICAgICAgICAgICAgICB9LCBlbXB0eSwgZ2V0Q29uZmlybSksXFxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0XzEnLFxcXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGxpbmVWaXNpYmxlOiBmYWxzZVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIH0pXFxcXG4gICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgIHRpdGxlOiBSaWNoKFNtYWxsKEdyYXkoJ++9nu+9nu+9nui/mOayoeaQnOe0ouWRou+9nu+9nu+9nicpKSksXFxcXG4gICAgICAgICAgICAgICAgdXJsOiBlbXB0eSxcXFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnLFxcXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGxpbmVWaXNpYmxlOiBmYWxzZVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIH0pXFxcXG4gICAgICAgIH1cXFxcbiAgICAgICAgZm9yIChsZXQgaSA9IG1lbS5sZW5ndGggLSAxOyBpID49IDA7IGktLSkge1xcXFxuICAgICAgICAgICAgbGV0IGl0ID0gbWVtW2ldO1xcXFxuICAgICAgICAgICAgZC5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICB0aXRsZTogaXQsXFxcXG4gICAgICAgICAgICAgICAgdXJsOiAkKFxcXFxcXFwiI25vTG9hZGluZyNcXFxcXFxcIikubGF6eVJ1bGUoKGdldFNlYXJjaFVybCwgaXQsIGVtcHR5KSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCflhbPplK7or40nLCBpdCk7XFxcXG4gICAgICAgICAgICAgICAgICAgIGdldFNlYXJjaFVybChpdCk7XFxcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBlbXB0eTtcXFxcbiAgICAgICAgICAgICAgICB9LCBnZXRTZWFyY2hVcmwsIGl0LCBlbXB0eSksXFxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwiZmxleF9idXR0b25cXFxcXFxcIlxcXFxuICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgfVxcXFxuICAgIH0gZWxzZSB7XFxcXG4gICAgICAgIHRpbWUgPSBuZXcgRGF0ZSgpLmdldFRpbWUoKVxcXFxuICAgICAgICBwYXRoID0gJ2h0dHBzOi8vc2hjLnkucXEuY29t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cGcnXFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtLnNvbmduYW1lLFxcXFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiBzaW5nZXIsXFxcXG4gICAgICAgICAgICAgICAgICAgIGltZzogaW1nLFxcXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQoZW1wdHkpLmxhenlSdWxlKChpdGVtKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBNWV9QQUdFID0gMVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWlyZSgnaGlrZXI6Ly9wYWdlL0NvbmZpZy52aWV3JylcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBnZXRwbGF5ZXIoaXRlbSlcXFxcbiAgICAgICAgICAgICAgICAgICAgfSwgaXRlbSksXFxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnY2FyZF9waWNfMycsXFxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpbmhlcml0VGl0bGU6IGZhbHNlLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGluZVZpc2libGU6IGZhbHNlXFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgdGl0bGU6IFJpY2goU21hbGwoR3JheSgn772e772e772e5oiR5piv5pyJ5bqV57q/55qE772e772e772eJykpKSxcXFxcbiAgICAgICAgICAgICAgICB1cmw6IGVtcHR5LFxcXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMScsXFxcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgbGluZVZpc2libGU6IGZhbHNlXFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgfVxcXFxuICAgIH1cXFxcbn1cXFwifV1cIn0iLCJwaWNVcmwiOiJodHRwOi8vcC5xcGljLmNuL211c2ljX2NvdmVyL05kemliVWdUMTdsWm9EaHRJNG96bDg2ZldaT3VYdUNmUDdpYWR1aWF1dXY5a3hpY2lheVhpY29YcDFpY1EvNjAwP249MSIsInRpdGxlIjoi57qv6Z+z5LmQ4piB6LaF5rK75oSI4piB6YCC5ZCI5a2m5Lmg5ZaU772eIn0=
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement