Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥忍者刺客@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImdtdE1vZGlmaWVkXCI6MCxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCJcIixcImxpc3RUb0NsZWFyQXNzb2NpYXRlZEZLXCI6W10sXCJsaXN0VG9DbGVhclNlbGZGS1wiOltdLFwicGFnZUxpc3RcIjpbe1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuWKqOaAgeWIhuexu1wiLFwicGF0aFwiOlwic21cIixcInJ1bGVcIjpcImNvbnN0IGVtcHR5ID0gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuYWRkTGlzdGVuZXIoXFxcIm9uQ2xvc2VcXFwiLCAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgY2xlYXJNeVZhcihcXFwidXJsXFxcIik7XFxuICAgIGNsZWFyTXlWYXIoXFxcInRcXFwiKTtcXG59KSk7XFxudHJ5IHtcXG4gICAgdmFyIGNhdGVnb3JpZXMgPSBwZGZhKGh0bWwsIOWkp+exu+WumuS9jSkuY29uY2F0KHBkZmEoaHRtbCwg5ou85o6l5YiG57G7KSlcXG59IGNhdGNoIChlKSB7XFxuICAgIHZhciBjYXRlZ29yaWVzID0gcGRmYShodG1sLCDlpKfnsbvlrprkvY0pXFxufVxcblxcbmxldCBpbml0X2NhdGUgPSBbXVxcblxcbmZvciAobGV0IGkgPSAwOyBpIDwgMjA7IGkrKykge1xcbiAgICBpbml0X2NhdGUucHVzaChcXFwiMFxcXCIpXFxuf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wga2V5KSA9PiB7XFxuICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IHBkZmgoaXRlbSwg5YiG57G75qCH6aKYKVxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGtleS50b1N0cmluZygpID09PSBjYXRlX3RlbXBbaW5kZXhdID8gJ+KAnOKAnOKAneKAnTxiPjxzcGFuIHN0eWxlPVxcXCJjb2xvcjogJyArIOWIhuexu+minOiJsiArICdcXFwiPicgKyB0aXRsZSArICc8L3NwYW4+PC9iPicgOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJChwZChpdGVtLCDliIbnsbvpk77mjqUpICsgJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHBhcmFtcykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuZXdfY2F0ZSA9IFtdXFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLmNhdGVfdGVtcC5mb3JFYWNoKChjYXRlLCBpbmRleCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdfY2F0ZS5wdXNoKGluZGV4ID09PSAwID8gcGFyYW1zLmtleS50b1N0cmluZygpIDogXFxcIjBcXFwiKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoXFxcInRcXFwiLCBKU09OLnN0cmluZ2lmeShuZXdfY2F0ZSkpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoXFxcInVybFxcXCIsIGlucHV0KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhdGVfdGVtcDogY2F0ZV90ZW1wLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGtleToga2V5LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhZ2U6IHBhZ2UsXFxuICAgICAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImJsYW5rX2Jsb2NrXFxcIlxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfSBlbHNlIGlmIChmb2xkID09PSAnMScpIHtcXG4gICAgICAgICAgICBzdWJfY2F0ZWdvcmllcy5mb3JFYWNoKChpdGVtLCBrZXkpID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHRpdGxlID0gcGRmaChpdGVtLCDliIbnsbvmoIfpopgpXFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZToga2V5LnRvU3RyaW5nKCkgPT09IGNhdGVfdGVtcFtpbmRleF0gPyAn4oCc4oCc4oCd4oCdPGI+PHNwYW4gc3R5bGU9XFxcImNvbG9yOiAnICsg5YiG57G76aKc6ImyICsgJ1xcXCI+JyArIHRpdGxlICsgJzwvc3Bhbj48L2I+JyA6IHRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkKHBkKGl0ZW0sIOWIhuexu+mTvuaOpSkgKyAnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgocGFyYW1zKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLmNhdGVfdGVtcFtwYXJhbXMuaW5kZXhdID0gcGFyYW1zLmtleS50b1N0cmluZygpXFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoXFxcInRcXFwiLCBKU09OLnN0cmluZ2lmeShwYXJhbXMuY2F0ZV90ZW1wKSlcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihcXFwidXJsXFxcIiwgaW5wdXQpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2F0ZV90ZW1wOiBjYXRlX3RlbXAsXFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXg6IGluZGV4LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGtleToga2V5LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhZ2U6IHBhZ2UsXFxuICAgICAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImJsYW5rX2Jsb2NrXFxcIlxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfVxcbiAgICB9KVxcbn1cIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcImxhenlcIixcInBhdGhcIjpcImxhenlcIixcInJ1bGVcIjpcInZhciBsYXp5ID0gJCgnJykubGF6eVJ1bGUoKCkgPT4ge1xcblxcbiAgICAvL3g1cnVsZeW8uuWKm+WXheaOolxcbmZ1bmN0aW9uIHg1cnVsZShqaWV4dXJsLCBzcmN1cmwpIHtcXG4gICAgc2hvd0xvYWRpbmcoXFxcIue9kemhteiuv+mXruajgOe0ouS4re+8jOivt+eojeWAmS4uLlxcXCIpO1xcbiAgICB2YXIgdmlkZW8gPSAnd2ViUnVsZTovLycgKyBqaWV4dXJsICsgJ0AnICsgJC50b1N0cmluZygoc3JjdXJsKSA9PiB7XFxuICAgICAgICAvL2ZiYS5sb2coZmJhLmdldFVybHMoKSk7XFxuICAgICAgICB2YXIgdXJscyA9IF9nZXRVcmxzKCk7XFxuICAgICAgICBpZiAod2luZG93LmNvdW50ID09IG51bGwgfHwgd2luZG93LmNvdW50ID09IHVuZGVmaW5lZCkge1xcbiAgICAgICAgICAgIHdpbmRvdy5jb3VudCA9IDBcXG4gICAgICAgIH1cXG4gICAgICAgIGlmICh3aW5kb3cuY291bnQgPj0gMjMpIHtcXG4gICAgICAgICAgICByZXR1cm4gc3JjdXJsXFxuICAgICAgICB9XFxuICAgICAgICB3aW5kb3cuY291bnQgPSB3aW5kb3cuY291bnQgKyAxO1xcbiAgICAgICAgaWYgKHdpbmRvdy5jb3VudCA+IDEgJiYgd2luZG93LmNvdW50IDw9IDMgJiYgd2luZG93LmNvdW50ICE9IG51bGwgJiYgd2luZG93LmNvdW50ICE9IHVuZGVmaW5lZCkge1xcbiAgICAgICAgICAgIGlmIChkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCdib2R5JykuaW5uZXJUZXh0LnNlYXJjaCgv6Kem5Y+R5LqG6Ziy55uX6ZO+fOacquaOiOadg3zmjqXlj6PpmLLnm5d86K+35Yiw5Li756uZ6KeC55yLLykgIT0gLTEpIHtcXG4gICAgICAgICAgICAgICAgaWYgKCFzcmN1cmwpIHtcXG4gICAgICAgICAgICAgICAgXFx0ZmJhLmxvZygn5bCd6K+V6Lez6Ziy55uX6aqM6K+B5LiAJyk7XFxuICAgICAgICAgICAgICAgICAgICBsb2NhdGlvbi5ocmVmID0gbG9jYXRpb24uaHJlZjtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgXFx0ZmJhLmxvZygn5bCd6K+V6Lez6Ziy55uX6aqM6K+B5LqMJyk7XFxuICAgICAgICAgICAgICAgICAgICBsb2NhdGlvbi5ocmVmID0gc3JjdXJsXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9O1xcbiAgICAgICAgfSBlbHNlIGlmKHdpbmRvdy5jb3VudCA+IDMgJiYgd2luZG93LmNvdW50ICE9IG51bGwgJiYgd2luZG93LmNvdW50ICE9IHVuZGVmaW5lZCl7XFxuICAgICAgICAgICAgaWYgKHVybHMubGVuZ3RoIDwgMSkge1xcbiAgICAgICAgICAgICAgICBmYmEuaGlkZUxvYWRpbmcoKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+ajgOe0ouWksei0pe+8jOWPr+iDvemTvuaOpeaXoOazleiuv+mXruOAgic7XFxuICAgICAgICAgICAgfSBlbHNlIGlmICh1cmxzLmxlbmd0aCA9PSAxKSB7XFxuICAgICAgICAgICAgICAgIGZiYS5sb2coJ+WwneivleebtOmTvuS4jkpTT07op6PmnpAnKTtcXG4gICAgICAgICAgICAgICAgaWYgKHVybHNbMF0ubWF0Y2goL2R5Y2RuXFxcXC10b3NcXFxcLnBzdGF0cHxcXFxcLm0zdTh8XFxcXC5tcDR8XFxcXC5mbHZ8bmV0ZWFzZVxcXFwuY29tfHZpZGVvX21wNHx0eXBlXFxcXD1tM3U4fHB0XFxcXD1tM3U4LykgJiYgIXVybHNbMF0ubWF0Y2goL1xcXFwuaHRtbHxtM3U4XFxcXC50dnxcXFxcJm5leHR8YWNcXFxcPWRtfFxcXFw9aHR0cHxodHRwc1xcXFw6XFxcXC9cXFxcL1tcXFxcZF1cXFxcLm0zdTh8XFxcXD91cmxcXFxcPVxcXFwvbTN1OC8pKSB7XFxuICAgICAgICAgICAgICAgICAgICAvL2Z5X2JyaWRnZV9hcHAubG9nKHVybHNbMF0pXFxuICAgICAgICAgICAgICAgICAgICBpZiAodXJsc1swXS5pbmRleE9mKCdiaWxpdmlkZW8nKSAhPSAtMSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB1cmxzWzBdICsgJzt7UmVmZXJlckBodHRwczovL3d3dy5iaWxpYmlsaS5jb20mJlVzZXItQWdlbnRATW96aWxsYS81LjB9JztcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodXJsc1swXS5pbmRleE9mKCd0aXRhbi5tZ3R2LmNvbScpICE9IC0xKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVybHNbMF0gKyAnI2lzVmlkZW89dHJ1ZSMnICsgJzt7UmVmZXJlckB3d3cubWd0di5jb20mJlVzZXItQWdlbnRATW96aWxsYS81LjB9JztcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVybHNbMF1cXG4gICAgICAgICAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAobG9jYXRpb24uaHJlZi5tYXRjaCgvZHljZG5cXFxcLXRvc1xcXFwucHN0YXRwfFxcXFwubTN1OHxcXFxcLm1wNHxcXFxcLmZsdnxuZXRlYXNlXFxcXC5jb218dmlkZW9fbXA0fHR5cGVcXFxcPW0zdTh8cHRcXFxcPW0zdTgvKSAmJiAhbG9jYXRpb24uaHJlZi5tYXRjaCgvaHRtbHxtM3U4XFxcXC50dnxcXFxcJm5leHR8YWNcXFxcPWRtfFxcXFw9aHR0cHxodHRwc1xcXFw6XFxcXC9cXFxcL1tcXFxcZF1cXFxcLm0zdTh8XFxcXD91cmxcXFxcPVxcXFwvbTN1OC8pKSB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbG9jYXRpb24uaHJlZjtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBodG1sID0gZmJhLmZldGNoKGxvY2F0aW9uLmhyZWYsIHt9KTtcXG4gICAgICAgICAgICAgICAgICAgIGlmICghL1xcXFw8bWV0YS8udGVzdChodG1sKSYmIS9cXFxcPGh0bWwvLnRlc3QoaHRtbCkpIHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnBhcnNlKGh0bWwpLnVybDtcXG4gICAgICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGxvY2F0aW9uLmhyZWZ9XFxuICAgICAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgZmJhLmxvZygn5pel5b+X5qOA57Si56ysJyArIHdpbmRvdy5jb3VudCArICfmrKEnKTtcXG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaSBpbiB1cmxzKSB7XFxuICAgICAgICAgICAgICAgICAgICBpZiAodXJsc1tpXS5tYXRjaCgvZHljZG5cXFxcLXRvc1xcXFwucHN0YXRwfFxcXFwubTN1OHxcXFxcLm1wNHxcXFxcLmZsdnxuZXRlYXNlXFxcXC5jb218dmlkZW9fbXA0fHR5cGVcXFxcPW0zdTh8cHRcXFxcPW0zdTgvKSAmJiAhdXJsc1tpXS5tYXRjaCgvaHRtbHxtM3U4XFxcXC50dnxcXFxcJm5leHR8YWNcXFxcPWRtfFxcXFw9aHR0cHxodHRwc1xcXFw6XFxcXC9cXFxcL1tcXFxcZF1cXFxcLm0zdTh8XFxcXD91cmxcXFxcPVxcXFwvbTN1OC8pKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgLy9meV9icmlkZ2VfYXBwLmxvZyh1cmxzW2ldKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh1cmxzW2ldLmluZGV4T2YoJ2JpbGl2aWRlbycpICE9IC0xKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB1cmxzW2ldICsgJzt7UmVmZXJlckBodHRwczovL3d3dy5iaWxpYmlsaS5jb20mJlVzZXItQWdlbnRATW96aWxsYS81LjB9JztcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHVybHNbaV0uaW5kZXhPZigndGl0YW4ubWd0di5jb20nKSAhPSAtMSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdXJsc1tpXSArICcjaXNWaWRlbz10cnVlIycgKyAnO3tSZWZlcmVyQHd3dy5tZ3R2LmNvbSYmVXNlci1BZ2VudEBNb3ppbGxhLzUuMH0nO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodXJsc1tpXS5pbmRleE9mKCdqdWhhb2thbicpICE9IC0xKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB1cmxzW2ldICsgJzt7UmVmZXJlckBodHRwczovL3d3dy5qdWhhb2thbi5jYy99JztcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHVybHNbaV0uaW5kZXhPZignb2piaycpICE9IC0xKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB1cmxzW2ldICsgJzt7UmVmZXJlckBodHRwczovL3Yub2pia2p4LmNvbS99JztcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHVybHNbaV0uaW5kZXhPZignd2tmaWxlJykgIT0gLTEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVybHNbaV0gKyAnO3tSZWZlcmVyQGh0dHBzOi8vZmFudHVhbi53a2ZpbGUuY29tL30nO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB1cmxzW2ldICsgJyNpc1ZpZGVvPXRydWUjJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSAvL2VuZCBmb3IgaVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgfSwgc3JjdXJsKTtcXG4gICAgcmV0dXJuIHZpZGVvXFxufVxcbi8v57uT5p2feDVydWxl5by65Yqb5ZeF5o6iXFxuICAgIHJldHVybiB4NXJ1bGUoaW5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o8nIDogJyNGRjAwMDBcXFwiPuWAkuW6jyc7XFxuICAgICAgICB1cGRhdGVJdGVtKHtcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBpZDogTVlfVVJMICsgXFxcIl/mjpLluo9cXFwiLFxcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgdGl0bGU6IOaOkuW6j+WQjS5yZXBsYWNlKCfmjpLluo8nLCDmj5DnpLopXFxuICAgICAgICB9KVxcbiAgICAgICAgaWYgKOaOkuW6jyA9PSAnIzFhYWQxOVxcXCI+5q2j5bqPJykge1xcbiAgICAgICAgICAgIOeroOiKgi5yZXZlcnNlKClcXG4gICAgICAgIH1cXG4gICAgICAgIGxldCBjcCA9IOeroOiKgi5tYXAoKGRhdGEsIHNzaWQpID0+IHtcXG4gICAgICAgICAgICByZXR1cm4ge1xcbiAgICAgICAgICAgICAgICB0aXRsZTogcGRmaChkYXRhLCAnYSYmVGV4dCcpLFxcbiAgICAgICAgICAgICAgICB1cmw6IHBkKGRhdGEsICdhJiZocmVmJykgKyBsYXp5LFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTog56ug6IqCLmxlbmd0aCA+IDMgPyAndGV4dF80JyA6ICd0ZXh0XzInLFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgY2xzOiBNWV9VUkwgKyBcXFwiX+mAiembhlxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBpZDogcGQoZGF0YSwgJ2EmJmhyZWYnKVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfTtcXG4gICAgICAgIH0pO1xcbiAgICAgICAgZGVsZXRlSXRlbUJ5Q2xzKE1ZX1VSTCArIFxcXCJf6YCJ6ZuGXFxcIik7XFxuICAgICAgICBhZGRJdGVtQmVmb3JlKE1ZX1VSTCArIFxcXCJmb290ZXJcXFwiLCBjcCk7XFxuICAgICAgICBwdXRNeVZhcihNWV9VUkwgKyBcXFwi56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AgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZDogTVlfVVJMICsgXFxcIl/nur/ot69cXFwiICsgeGxpZFxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIHB1dE15VmFyKE1ZX1VSTCwgaWQpXFxuICAgICAgICAgICAgdmFyIOeroOiKgiA9IGxpc3RzW2dldE15VmFyKE1ZX1VSTCwgJzAnKV07XFxuICAgICAgICAgICAgaWYgKOaOkuW6jyA9PSAnI0ZGMDAwMFxcXCI+5YCS5bqPJykge1xcbiAgICAgICAgICAgICAgICDnq6DoioIucmV2ZXJzZSgpXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGxldCBjcCA9IOeroOiKgi5tYXAoKGRhdGEsIHNzaWQpID0+IHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBwZGZoKGRhdGEsICdhJiZUZXh0JyksXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IHBkKGRhdGEsICdhJiZocmVmJykgKyBsYXp5LFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IOeroOiKgi5sZW5ndGggPiAzID8gJ3RleHRfNCcgOiAndGV4dF8yJyxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBNWV9VUkwgKyBcXFwiX+mAiembhlxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IHBkKGRhdGEsICdhJiZocmVmJylcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBkZWxldGVJdGVtQnlDbHMoTVlfVVJMICsgXFxcIl/pgInpm4ZcXFwiKTtcXG4gICAgICAgICAgICBhZGRJdGVtQmVm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IfpopgpXFxcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGtleS50b1N0cmluZygpID09PSBjYXRlX3RlbXBbaW5kZXhdID8gJ+KAnOKAnOKAneKAnTxiPjxzcGFuIHN0eWxlPVxcXFxcXFwiY29sb3I6ICcgKyDliIbnsbvpopzoibIgKyAnXFxcXFxcXCI+JyArIHRpdGxlICsgJzwvc3Bhbj48L2I+JyA6IHRpdGxlLFxcXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQocGQoaXRlbSwg5YiG57G76ZO+5o6lKSArICcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChwYXJhbXMpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuZXdfY2F0ZSA9IFtdXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wLmZvckVhY2goKGNhdGUsIGluZGV4KSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3X2NhdGUucHVzaChpbmRleCA9PT0gMCA/IHBhcmFtcy5rZXkudG9TdHJpbmcoKSA6IFxcXFxcXFwiMFxcXFxcXFwiKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXFxcXFwidFxcXFxcXFwiLCBKU09OLnN0cmluZ2lmeShuZXdfY2F0ZSkpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihcXFxcXFxcInVybFxcXFxcXFwiLCBpbnB1dClcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJoaWtlcjovL2VtcHR5XFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICAgICAgfSwge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2F0ZV90ZW1wOiBjYXRlX3RlbXAsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBrZXk6IGtleSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhZ2U6IHBhZ2UsXFxcXG4gICAgICAgICAgICAgICAgICAgIH0pLFxcXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxcXFxuICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgZC5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJibGFua19ibG9ja1xcXFxcXFwiXFxcXG4gICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgfSBlbHNlIGlmIChmb2xkID09PSAnMScpIHtcXFxcbiAgICAgICAgICAgIHN1Yl9jYXRlZ29yaWVzLmZvckVhY2goKGl0ZW0sIGtleSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IHBkZmgoaXRlbSwg5YiG57G75qCH6aKYKVxcXFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBrZXkudG9TdHJpbmcoKSA9PT0gY2F0ZV90ZW1wW2luZGV4XSA/ICfigJzigJzigJ3igJ08Yj48c3BhbiBzdHlsZT1cXFxcXFxcImNvbG9yOiAnICsg5YiG57G76aKc6ImyICsgJ1xcXFxcXFwiPicgKyB0aXRsZSArICc8L3NwYW4+PC9iPicgOiB0aXRsZSxcXFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkKHBkKGl0ZW0sIOWIhuexu+mTvuaOpSkgKyAnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgocGFyYW1zKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wW3BhcmFtcy5pbmRleF0gPSBwYXJhbXMua2V5LnRvU3RyaW5nKClcXFxcblxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoXFxcXFxcXCJ0XFxcXFxcXCIsIEpTT04uc3RyaW5naWZ5KHBhcmFtcy5jYXRlX3RlbXApKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoXFxcXFxcXCJ1cmxcXFxcXFxcIiwgaW5wdXQpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwiaGlrZXI6Ly9lbXB0eVxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgIH0sIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhdGVfdGVtcDogY2F0ZV90ZW1wLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXg6IGluZGV4LFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBrZXksXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYWdlOiBwYWdlLFxcXFxuICAgICAgICAgICAgICAgICAgICB9KSxcXFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcXFxcbiAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwiYmxhbmtfYmxvY2tcXFxcXFxcIlxcXFxuICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgIH1cXFxcbiAgICB9KVxcXFxufVxcXCJ9LHtcXFwiY29sX3R5cGVcXFwiOlxcXCJtb3ZpZV8zXFxcIixcXFwibmFtZVxcXCI6XFxcImxhenlcXFwiLFxcXCJwYXRoXFxcIjpcXFwibGF6eVxcXCIsXFxcInJ1bGVcXFwiOlxcXCJ2YXIgbGF6eSA9ICQoJycpLmxhenlSdWxlKCgpID0+IHtcXFxcblxcXFxuICAgIC8veDVydWxl5by65Yqb5ZeF5o6iXFxcXG5mdW5jdGlvbiB4NXJ1bGUoamlleHVybCwgc3JjdXJsKSB7XFxcXG4gICAgc2hvd0xvYWRpbmcoXFxcXFxcXCLnvZHpobXorr/pl67mo4DntKLkuK3vvIzor7fnqI3lgJkuLi5cXFxcXFxcIik7XFxcXG4gICAgdmFyIHZpZGVvID0gJ3dlYlJ1bGU6Ly8nICsgamlleHVybCArICdAJyArICQudG9TdHJpbmcoKHNyY3VybCkgPT4ge1xcXFxuICAgICAgICAvL2ZiYS5sb2coZmJhLmdldFVybHMoKSk7XFxcXG4gICAgICAgIHZhciB1cmxzID0gX2dldFVybHMoKTtcXFxcbiAgICAgICAgaWYgKHdpbmRvdy5jb3VudCA9PSBudWxsIHx8IHdpbmRvdy5jb3VudCA9PSB1bmRlZmluZWQpIHtcXFxcbiAgICAgICAgICAgIHdpbmRvdy5jb3VudCA9IDBcXFxcbiAgICAgICAgfVxcXFxuICAgICAgICBpZiAod2luZG93LmNvdW50ID49IDIzKSB7XFxcXG4gICAgICAgICAgICByZXR1cm4gc3JjdXJsXFxcXG4gICAgICAgIH1cXFxcbiAgICAgICAgd2luZG93LmNvdW50ID0gd2luZG93LmNvdW50ICsgMTtcXFxcbiAgICAgICAgaWYgKHdpbmRvdy5jb3VudCA+IDEgJiYgd2luZG93LmNvdW50IDw9IDMgJiYgd2luZG93LmNvdW50ICE9IG51bGwgJiYgd2luZG93LmNvdW50ICE9IHVuZGVmaW5lZCkge1xcXFxuICAgICAgICAgICAgaWYgKGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJ2JvZHknKS5pbm5lclRleHQuc2VhcmNoKC/op6blj5HkuobpmLLnm5fpk7585pyq5o6I5p2DfOaOpeWPo+mYsuebl3zor7fliLDkuLvnq5nop4LnnIsvKSAhPSAtMSkge1xcXFxuICAgICAgICAgICAgICAgIGlmICghc3JjdXJsKSB7XFxcXG4gICAgICAgICAgICAgICAgXFxcXHRmYmEubG9nKCflsJ3or5Xot7PpmLLnm5fpqozor4HkuIAnKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgbG9jYXRpb24uaHJlZiA9IGxvY2F0aW9uLmhyZWY7XFxcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICBcXFxcdGZiYS5sb2coJ+Wwneivlei3s+mYsuebl+mqjOivgeS6jCcpO1xcXFxuICAgICAgICAgICAgICAgICAgICBsb2NhdGlvbi5ocmVmID0gc3JjdXJsXFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgfTtcXFxcbiAgICAgICAgfSBlbHNlIGlmKHdpbmRvdy5jb3VudCA+IDMgJiYgd2luZG93LmNvdW50ICE9IG51bGwgJiYgd2luZG93LmNvdW50ICE9IHVuZGVmaW5lZCl7XFxcXG4gICAgICAgICAgICBpZiAodXJscy5sZW5ndGggPCAxKSB7XFxcXG4gICAgICAgICAgICAgICAgZmJhLmhpZGVMb2FkaW5nKCk7XFxcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+ajgOe0ouWksei0pe+8jOWPr+iDvemTvuaOpeaXoOazleiuv+mXruOAgic7XFxcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHVybHMubGVuZ3RoID09IDEpIHtcXFxcbiAgICAgICAgICAgICAgICBmYmEubG9nKCflsJ3or5Xnm7Tpk77kuI5KU09O6Kej5p6QJyk7XFxcXG4gICAgICAgICAgICAgICAgaWYgKHVybHNbMF0ubWF0Y2goL2R5Y2RuXFxcXFxcXFwtdG9zXFxcXFxcXFwucHN0YXRwfFxcXFxcXFxcLm0zdTh8XFxcXFxcXFwubXA0fFxcXFxcXFxcLmZsdnxuZXRlYXNlXFxcXFxcXFwuY29tfHZpZGVvX21wNHx0eXBlXFxcXFxcXFw9bTN1OHxwdFxcXFxcXFxcPW0zdTgvKSAmJiAhdXJsc1swXS5tYXRjaCg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SZWZlcmVyQGh0dHBzOi8vd3d3Lmp1aGFva2FuLmNjL30nO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICh1cmxzW2ldLmluZGV4T2YoJ29qYmsnKSAhPSAtMSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB1cmxzW2ldICsgJzt7UmVmZXJlckBodHRwczovL3Yub2pia2p4LmNvbS99JztcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodXJsc1tpXS5pbmRleE9mKCd3a2ZpbGUnKSAhPSAtMSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB1cmxzW2ldICsgJzt7UmVmZXJlckBodHRwczovL2ZhbnR1YW4ud2tmaWxlLmNvbS99JztcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVybHNbaV0gKyAnI2lzVmlkZW89dHJ1ZSMnXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB9IC8vZW5kIGZvciBpXFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIH1cXFxcbiAgICB9LCBzcmN1cmwpO1xcXFxuICAgIHJldHVybiB2aWRlb1xcXFxufVxcXFxuLy/nu5PmnZ94NXJ1bGXlvLrlipvll4XmjqJcXFxcbiAgICByZXR1cm4geDVydWxlKGlucHV0LCBpbnB1dCk7XFxcXG59KVxcXCJ9XVwifSIsInBpY1VybCI6Imh0dHBzOi8vcGljMy55enp5aW1hZ2VzLmNvbS91cGxvYWQvdm9kLzIwMjItMDUtMDUvMTY1MTY4OTI4OTEuanBnQFJlZmVyZXI9IiwidGl0bGUiOiLlv43ogIXliLrlrqIifQ==
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement