xiaomianao666

小程序:MyFree歌单·X

Mar 12th, 2023
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@MyFree歌单·X@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoiTXlGcmVl5q2M5Y2VwrdYIiwiYXV0aG9yIjoi57yY5YiGJlt6ZXRhbHBoYeS/ruaUuV0iLCJ1cmwiOiJodHRwczovL3BsLWZlLmNuL2Nsb3VkLW11c2ljLWFwaS90b3AvcGxheWxpc3Q/Y2F0PWZ5QWxsJm9mZnNldD1meXBhZ2VALTFAKjUwQCYiLCJ2ZXJzaW9uIjoxMiwiY29sX3R5cGUiOiJjYXJkX3BpY18zIiwiY2xhc3NfbmFtZSI6IuWFqOmDqCbljY7or60m5rWB6KGMJuaRh+a7mibmsJHosKMm5qyn576OJuaXpeivrVxuJumfqeivrSbnsqTor60m55S15a2QJuiInuabsibor7TllLEm6L276Z+z5LmQJueIteWjq1xu5Lmh5p2RJlLvvIbvvIZCL1NvdWwm6YeR5bGeJuiTneiwgybpm7fprLwm5LiW55WM6Z+z5LmQIiwidHlwZSI6Im11c2ljIiwiY2xhc3NfdXJsIjoi5YWo6YOoJuWNjuivrSbmtYHooYwm5pGH5ruaJuawkeiwoybmrKfnvo4m5pel6K+tXG4m6Z+p6K+tJueypOivrSbnlLXlrZAm6Iie5puyJuivtOWUsSbovbvpn7PkuZAm54i15aOrXG7kuaHmnZEmUu+8hu+8hkIvU291bCbph5HlsZ4m6JOd6LCDJumbt+msvCbkuJbnlYzpn7PkuZAiLCJhcmVhX25hbWUiOiLnvZHnu5zmrYzmm7ImS1RWJue7j+WFuCbnv7vllLEm5ZCJ5LuWJumSoueQtCblmajkuZAm5qac5Y2VJuWPpOWFuCbmsJHml48m6Iux5LymJuaLieS4gSZOZXcgQWdlJuWPpOmjjiIsImFyZWFfdXJsIjoi572R57uc5q2M5puyJktUVibnu4/lhbgm57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An4p6h77iPJyArIGl0IDogaXQ7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGxldCB0aXBzID0gJ+ivt+mAieaLqUg15pKt5pS+6Z+z6LSoJztcbiAgICAgICAgICAgIHJldHVybiAkKOmfs+i0qCwgMSwgdGlwcykuc2VsZWN0KCgpID0+IHtcbiAgICAgICAgICAgICAgICBpbnB1dCA9IGlucHV0LnJlcGxhY2UoL+Keoe+4jy9nLCAnJyk7XG4gICAgICAgICAgICAgICAgdmFyIHF1YWxpdHkgPSBpbnB1dC5zcGxpdCgnOicpWzFdXG4gICAgICAgICAgICAgICAgLy9sb2cocXVhbGl0eSlcbiAgICAgICAgICAgICAgICBpbnB1dCA9IGlucHV0LnNwbGl0KCc6JylbMF1cblxuICAgICAgICAgICAgICAgIHN0b3JhZ2UwLnNldEl0ZW0oJ+mfs+i0qCcsIGlucHV0KTtcblxuICAgICAgICAgICAgICAgIHN0b3JhZ2UwLnNldEl0ZW0oJ3F1YWxpdHknLCBxdWFsaXR5KVxuXG4gICAgICAgICAgICAgICAgdmFyIG9sZCA9IGZpbmRJdGVtKCdxdWFsaXR5JylcbiAgICAgICAgICAgICAgICB2YXIgdGl0bGUgPSBvbGQudGl0bGUucmVwbGFjZSgvKOmfs+i0qDopLio/KDwpL2dtLCAoYSwgeCwgeSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4geCArIHN0b3JhZ2UwLmdldEl0ZW0oJ+mfs+i0qCcsICfotoXpq5gnKSArIHk7XG4gICAgICAgICAgICAgICAgfSlcblxuICAgICAgICAgICAgICAgIC8vbG9nKHRpdGxlKVxuXG4gICAgICAgICAgICAgICAgdXBkYXRlSXRlbSgncXVhbGl0eScsIHtcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHRpdGxlLFxuICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suWIh0g15pKt5pS+5Zmo6Z+z6LSoOicgKyB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ZW0oJ+exu+WeiycsICdNJykgKyAnPHNwYW4+PC9zbWFsbD4nXG5cbiAgICBzZWFyY2h0aXRsZSA9IHRpdGxlU3R5bGUoc2VhcmNodGl0bGUsc3R5bGUpXG5cbiAgICBkLnB1c2goe1xuICAgICAgICB0aXRsZTogc2VhcmNodGl0bGUsXG4gICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoKSA9PiB7XG4gICAgICAgICAgICBsb2coaW5wdXQpXG4gICAgICAgICAgICBsZXQgYWxsX2NvbHMgPSBbJ00nLCAnQicsICdEJ11cbiAgICAgICAgICAgIGxldCBjb2wgPSAoc3RvcmFnZTAuZ2V0SXRlbSgn57G75Z6LJywgJ00nKSB8fCAnJyk7XG4gICAgICAgICAgICBsZXQg57G75Z6LID0gYWxsX2NvbHMubWFwKChpdCkgPT4ge1xuICAgICAgICAgICAgICAgIHJldHVybiBpdCA9PT0gY29sID8gJ+Keoe+4jycgKyBpdCA6IGl0O1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBsZXQgdGlwcyA9ICfor7fpgInmi6nmkJzntKLnsbvlnosnO1xuICAgICAgICAgICAgcmV0dXJuICQo57G75Z6LLCAxLCB0aXBzKS5zZWxlY3QoKCkgPT4ge1xuICAgICAgICAgICAgICAgIGlucHV0ID0gaW5wdXQucmVwbGFjZSgv4p6h77iPL2csICcnKTtcbiAgICAgICAgICAgICAgICBzdG9yYWdlMC5zZXRJdGVtKCfnsbvlnosnLCBpbnB1dCk7XG5cbiAgICAgICAgICAgICAgICB2YXIgb2xkID0gZmluZEl0ZW0oJ3R5cGUnKVxuICAgICAgICAgICAgICAgIHZhciB0aXRsZSA9IG9sZC50aXRsZS5yZXBsYWNlKC8o5pCc57Si57G7OikuKj8oPCkvZ20sIChhLCB4LCB5KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB4ICsgc3RvcmFnZTAuZ2V0SXRlbSgn57G75Z6LJywgJ00nKSArIHk7XG4gICAgICAgICAgICAgICAgfSlcblxuICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oJ3R5cGUnLCB7XG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZSxcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oJ3NlYXJjaCcsIHtcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHN0b3JhZ2UwLmdldEl0ZW0oJ+exu+WeiycsICdNJylcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7LliIfmkJzntKLnsbvlnos6JyArIGlucHV0O1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXG4gICAgICAgIH0pLFxuICAgICAgICBpbWc6ICdodHRwczovL2NkbjMuaWNvbmZpbmRlci5jb20vZGF0YS9pY29ucy9idWRpY29uLWNocm9tYS11aS8yNC9zZWFyY2gtbGlzdC02NC5wbmcnLFxuICAgICAgICBjb2xfdHlwZTogc3R5bGUsXG4gICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICBpZDogJ3R5cGUnLFxuICAgICAgICB9XG4gICAgfSlcblxuICAgIGQucHVzaCh7XG4gICAgICAgIHRpdGxlOiBzdG9yYWdlMC5nZXRJdGVtKCfnsbvlnosnLCAnTScpLFxuICAgICAgICB1cmw6ICQudG9TdHJpbmcoKHIpID0+IHtcbiAgICAgICAgICAgIHB1dE15VmFyKCdrZXl3b3JkJywgaW5wdXQpO1xuICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL3NlYXJjaD9ydWxlPScgKyByICsgJyZzPScgKyBpbnB1dDtcbiAgICAgICAgfSwgTVlfUlVMRS50aXRsZSksXG4gICAgICAgIGRlc2M6ICfmkJzngrnku4DkuYjlkKwnLFxuICAgICAgICBjb2xfdHlwZTogXCJpbnB1dFwiLFxuICAgICAgICBleHRyYToge1xuIC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cXCJ0b2tlblxcXCI6IHQuZ3Rva2VuKGRhdGEpXFxuICAgICAgICB9XFxuICAgICAgICB2YXIganNvbiA9IEpTT04ucGFyc2UocmVxdWVzdCgnaHR0cHM6Ly90ZXN0LnF1YW5qaWFuLmNvbS5jbi9tL2FwaS9seXJpYycsIHtcXG4gICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgIFxcXCJVc2VyLUFnZW50XFxcIjogTU9CSUxFX1VBLFxcbiAgICAgICAgICAgICAgICAnT3JpZ2luJzogJ2h0dHBzOi8vdG9vbC5saXVtaW5neWUuY24nLFxcbiAgICAgICAgICAgICAgICAnY29udGVudC10eXBlJzogJ2FwcGxpY2F0aW9uL2pzb24nLFxcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgYm9keTogSlNPTi5zdHJpbmdpZnkoYm9keSksXFxuICAgICAgICAgICAgbWV0aG9kOiBcXFwiUE9TVFxcXCJcXG4gICAgICAgIH0pKS5kYXRhO1xcbiAgICAgICAgbHJjID0ganNvbi5scmNcXG4gICAgICAgIGlmIChscmMgPT0gbnVsbCkge1xcbiAgICAgICAgICAgIGxyYyA9ICcnO1xcbiAgICAgICAgICAgIHRocm93ICcnXFxuICAgICAgICB9XFxuXFxuICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgIHVybHM6IHBsYXlzLFxcbiAgICAgICAgICAgIG5hbWVzOiBbJ+aXoOaNnycsICfotoXpq5gnLCAn5qCH5YeGJ10sXFxuICAgICAgICAgICAgbHlyaWM6IGxyY1xcbiAgICAgICAgfSlcXG4gICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICB2YXIgbHJjID0gcGRmaChyZXF1ZXN0KCdodHRwOi8vemhhbm5laS5iYWlkdS5jb20vY3NlL3NlYXJjaD9xPScgKyB0aXRsZSArICctJyArIGRlc2MgKyAnJnM9MjIzNzk3NjM4OTY3ODY5MzUzMCZlbnRyeT0xJyksICcucmVzdWx0LWxpc3QmJmEmJmhyZWYnKTtcXG5cXG4gICAgICAgICAgICB2YXIgbHJjID0gJ2h0dHBzOi8vd3d3LmlnZWNpa3UuY29tJyArIHBkZmgocmVxdWVzdChscmMpLCAnLmRvd25sb2FkJiZhJiZocmVmJykucmVwbGFjZSgndHh0JywgJ2xyYycpO1xcbiAgICAgICAgfSBjYXRjaCB7fVxcblxcbiAgICAgICAgKGxyYyAhPSBudWxsIHx8IGxyYyAhPSAnJykgPyBscmM6IGwuZ2V0bHJjKGAke3RpdGxlfS0ke2Rlc2N9YClcXG5cXG4gICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgdXJsczogcGxheXMsXFxuICAgICAgICAgICAgbmFtZXM6IFsn5peg5o2fJywgJ+i2hemrmCcsICfmoIflh4YnXSxcXG4gICAgICAgICAgICBseXJpYzogbHJjXFxuICAgICAgICB9KVxcbiAgICB9XFxufSxULEwpXCJ9LHtcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXCI6XCLmrYzor41cIixcInBhdGhcIjpcImxyY1wiLFwicnVsZVwiOlwianM6XFxuZnVuY3Rpb24gZ2V0THJjKHRpdGxlKSB7XFxuICAgIHZhciBscmMgPSAnJ1xcbiAgICB0cnkge1xcbiAgICAgICAgdmFyIHNvbmdzID0gSlNPTi5wYXJzZShmZXRjaCgnaHR0cDovLzEyMS40Ljc4LjEwNjo0MDAxL3NlYXJjaD9rZXl3b3Jkcz0nICsgdGl0bGUpKS5yZXN1bHQuc29uZ3NcXG4gICAgICAgIHZhciBsaXN0ID0gc29uZ3MubWFwKHggPT4ge1xcbiAgICAgICAgICAgIHJldHVybiB7XFxuICAgICAgICAgICAgICAgIGlkOiB4LmlkLFxcbiAgICAgICAgICAgICAgICB0aXRsZTogeC5uYW1lXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSlcXG4gICAgICAgIHZhciBscmNzID0gSlNPTi5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ntKLlvJUnLCBmaXJzdCkgJiYgTVlfUEFHRSA9PSAxID8geHkgOiB0aXRsZSxcXG4gICAgICAgICAgICBkZXNjOiBkZXNjLFxcbiAgICAgICAgICAgIGltZzogaW1nLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBjb2xfdHlwZSxcXG4gICAgICAgICAgICB1cmw6ICQoJyNub0hpc3RvcnkjI25vTG9hZGluZyMnKS5sYXp5UnVsZSgodGl0bGUsIGZpcnN0LCB4eSkgPT4ge1xcbiAgICAgICAgICAgICAgICBpZiAoZ2V0VmFyKCfntKLlvJUnKSAhPSB0aXRsZSkge1xcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFg1V2ViVmlldyhnZXRQYXRoKCdoaWtlcjovL2ZpbGVzL3J1bGVzL2R6SG91c2UvaHRtbC9oNemfs+S5kOaSreaUvuWZqC5odG1sJykpXFxuICAgICAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKGdldFZhcign57Si5byVJywgZmlyc3QpLCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGdldFZhcign57Si5byVJywgZmlyc3QpXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgdXBkYXRlSXRlbSh0aXRsZSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiB4eVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIHB1dFZhcign57Si5byVJywgdGl0bGUpXFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2Rvd25sb2FkOi8vJyArIGdldFZhcign5pKt5pS+6ZO+5o6lJyk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5JztcXG4gICAgICAgICAgICB9LCB0aXRsZSwgZmlyc3QsIHh5KSxcXG4gICAgICAgICAgICBleHRyYToge1xcb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5nIycpLmxhenlSdWxlKCgpID0+IHtcXG4gICAgICAgICAgICBsZXQgYWxsX2NvbHMgPSBbJycsICdzbWFsbCcsICdiJ11cXG4gICAgICAgICAgICBsZXQgY29sID0gc3RvcmFnZTAuZ2V0SXRlbSgnZnN0eWxlJywgJycpXFxuICAgICAgICAgICAgbGV0IOWtl+S9k+agt+W8jyA9IGFsbF9jb2xzLm1hcCgoaXQpID0+IHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIGl0ID09PSBjb2wgPyAn4p6h77iPJyArIGl0IDogaXQ7XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgbGV0IHRpcHMgPSAn6K+36YCJ5oup5qC35byPJztcXG4gICAgICAgICAgICByZXR1cm4gJCjlrZfkvZPmoLflvI8sIDIsIHRpcHMpLnNlbGVjdCgoKSA9PiB7XFxuICAgICAgICAgICAgICAgIGlucHV0ID0gaW5wdXQucmVwbGFjZSgv4p6h77iPL2csICcnKTtcXG4gICAgICAgICAgICAgICAgc3RvcmFnZTAuc2V0SXRlbSgnZnN0eWxlJywgaW5wdXQpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG5cXG4gICAgICAgICAgICAgICAgdXBkYXRlSXRlbSgnZnN0eWxlJywge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICflrZfkvZPmoLflvI86JyArIHN0b3JhZ2UwLmdldEl0ZW0oJ2ZzdHlsZScsICcnKVxcbiAgICAgICAgICAgICAgICB9KTtcXG5cXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suWIh+aNouWtl+S9k+agt+W8j+S4ujonICsgaW5wdXQ7XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgfSksXFxuICAgICAgICBjb2xfdHlwZTogJ3RleHRfMicsXFxuICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgIGlkOiAnZnN0eWxlJ1xcbiAgICAgICAgfVxcbiAgICB9KVxcblxcblxcbiAgICBkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6IGDpmo/mnLrpopzoibJgLFxcbiAgICAgICAgdXJsOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICBsZXQgYWxsX2NvbHMgPSBbJ+aVtOS9k+maj+acujoxJywgJ+WFqOmDqOmaj+acujoyJ11cXG4gICAgICAgICAgICBhbGxfY29scy51bnNoaWZ0KCflm7rlrprpopzoibI6JyArIGlucHV0KVxcbiAgICAgICAgICAgIHJldHVybiAkKGFsbF9jb2xzLCAxLCAnMeaVtOS9k+maj+acuiAy5YWo6YOo6ZqP5py6Jykuc2VsZWN0KCgpID0+IHtcXG4gICAgICAgICAgICAgICAgdmFyIGNvbG9yID0gaW5wdXQuc3BsaXQoJzonKVsxXVxcbiAgICAgICAgICAgICAgICBzdG9yYWdlMC5zZXRJdGVtKCdjb2xvcicsIGNvbG9yKTtcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH0pLFxcbiAgICAgICAgY29sX3R5cGU6ICdpbnB1dCcsXFxuICAgICAgICBkZXNjOiAnI+W8gOWktOminOiJsuS7o+eggeaIluiAhTHlkowyJyxcXG4gICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiBzdG9yYWdlMC5nZXRJdGVtKCdjb2xvcicsICcjMDAwJyksXFxuICAgICAgICB9XFxuXFxuICAgIH0pXFxuXFxuXFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogJ+Wbvuagh+agt+W8jycsXFxuICAgICAgICB1cmw6ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgIGxldCBhbGxfY29scyA9IGdldENvbFR5cGVzKCk7XFxuICAgICAgICAgICAgYWxsX2NvbHMgPSBhbGxfY29scy5maWx0ZXIoaXRlbSA9PiAvKGljb3x0ZXh0X3xhdmF0YXJ8YnV0dG9uKS8udGVzdChpdGVtKSAmJiAhLyhzZWFyY2gpLy50ZXN0KGl0ZW0pKVxcbiAgICAgICAgICAgIHJldHVybiAkKGFsbF9jb2xzLCAyLCAn6K+35Zu+5qCH5pi+56S65qC35byPJylcXG4gICAgICAgICAgICAgICAgLnNlbGVjdCgoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBzdG9yYWdlMC5zZXRJdGVtKCdzdHlsZScsIGlucHV0KTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgIH0pLFxcbiAgICAgICAgY29sX3R5cGU6ICdpbnB1dCcsXFxuICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTogc3RvcmFnZTAuZ2V0SXRlbSgnc3R5bGUnLCAndGV4dF80JyksXFxuICAgICAgICB9XFxuXFxuICAgIH0pXFxuXFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogJ+WOn+eUn+S6jOe6p+agt+W8jycsXFxuICAgICAgICB1cmw6ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgIGxldCBhbGxfY29scyA9IGdldENvbFR5cGVzKCk7XFxuICAgICAgICAgICAgcmV0dXJuICQoYWxsX2NvbHMsIDIsICfor7fpgInmi6nljp/nlJ/kuoznuqfnuqfmmL7npLrmoLflvI8nKVxcbiAgICAgICAgICAgICAgICAuc2VsZWN0KCgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHN0b3JhZ2UwLnNldEl0ZW0oJ2NvbF90eXBlJywgaW5wdXQpO1xcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suWIh+aNouWOn+eUn+S6jOe6p+aYvuekuuagt+W8jycgKyBpbnB1dFxcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgfSksXFxuICAgICAgICBjb2xfdHlwZTogJ2lucHV0JyxcXG4gICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiBzdG9yYWdlMC5nZXRJdGVtKCdjb2xfdHlwZScsICdhdmF0YXInKSxcXG4gICAgICAgIH1cXG5cXG4gICAgfSlcXG4gICAgXFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogJ0g15LqM57qn5qC35byPJyxcXG4gICAgICAgIHVybDogJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgbGV0IGFsbF9jb2xzID0gZ2V0Q29sVHlwZXMoKTtcXG4gICAgICAgICAgICBhbGxfY29scyA9IGFsbF9jb2xzLmZpbHRlcihpdGVtID0+IS8oYmxhbmt8bGluZXxyaWNofGxvbmd8eDV8aW5wdXR8c2VhcmNoKS8udGVzdChpdGVtKSYmICEvXihwaWNfMXxwaWNfMnxtb3ZpZV8yfG1vdmllXzMpJC9tLnRlc3QoaXRlbSkpXFxuICAgICAgICAgICAgcmV0dXJuICQoYWxsX2NvbHMsIDIsICfor7fpgInmi6lINeS6jOe6p+aYvuekuuagt+W8jycpXFxuICAgICAgICAgICAgICAgIC5zZWxlY3QoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgc3RvcmFnZTAuc2V0SXRlbSgnaDVjb2xfdHlwZScsIGlucHV0KTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7LliIfmjaJINeS6jOe6p+aYvuekuuagt+W8jycgKyBpbnB1dFxcbiAgICAgICAgICAgICAgICB9KVxcb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GQucHVzaCh7XFxuICAgICAgICB0aXRsZTogeC5uYW1lLFxcbiAgICAgICAgZGVzYzogYXJ0LFxcbiAgICAgICAgY29sX3R5cGU6ICdhdmF0YXInLFxcbiAgICAgICAgaW1nOiBwaWMsXFxuICAgICAgICB1cmw6IHguaGFzaCArICcjJyArIHgubmFtZSArICcjJyArIGFydCArIGxhenlcXG4gICAgfSlcXG59KVxcblxcblxcbnNldEhvbWVSZXN1bHQoZClcIn1dIiwiaWNvbiI6Imh0dHBzOi8vbGFubWVpZ3VvamlhbmcuY29tL3R1Ymlhby9tdXNpYy8zNy5zdmciLCJwcm94eSI6IiJ9
Add Comment
Please, Sign In to add comment