Advertisement
xiaomianao666

邀您一起看:长夜与风说

Dec 30th, 2024
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥长夜与风说@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZGlzcGxheU5hbWVcIjpcIuauteWPi+W9seinhjJcIixcImZpZWxkc1RvU2V0VG9EZWZhdWx0XCI6W10sXCJnbXRNb2RpZmllZFwiOjAsXCJpZFwiOjAsXCJsYXN0X2NoYXB0ZXJfcnVsZVwiOlwianM6KFxcbmZ1bmN0aW9uIChhcHB0eXBlLCBhcHBVcmwsIGFwcFVhKSB7XFxuICAgIGxldCBjaHAgPSBbXTtcXG4gICAgdHJ5IHtcXG4gICAgICAgIGxldCBjb250cyA9IFtdLCBodG1sID0gSlNPTi5wYXJzZShmZXRjaChNWV9VUkwuc3BsaXQoXFxcIiMjXFxcIilbMV0sIHtoZWFkZXJzOiB7XFxcIlVzZXItQWdlbnRcXFwiOiBhcHBVYX19KSk7XFxuICAgICAgICBpZiAoL+elnumprHxUVi8udGVzdChhcHB0eXBlKSkge1xcbiAgICAgICAgICAgIGNvbnRzID0gT2JqZWN0LmtleXMoaHRtbC52aWRlb2xpc3QpO1xcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICBpZiAoYXBwVXJsLmluY2x1ZGVzKFxcXCJhcGkucGhwL2FwcFxcXCIpKSB7XFxuICAgICAgICAgICAgICAgIGNvbnRzID0gaHRtbC5kYXRhLnZvZF91cmxfd2l0aF9wbGF5ZXI7XFxuICAgICAgICAgICAgICAgIGlmIChjb250cy5sZW5ndGggPCAxKSB7XFxuICAgICAgICAgICAgICAgICAgICBjb250cyA9IGh0bWwuZGF0YS52b2RfcGxheV91cmwuc3BsaXQoXFxcIiQkJFxcXCIpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgaWYgKGFwcFVybC5pbmNsdWRlcyhcXFwieGdhcHBcXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgY29udHMgPSBodG1sLmRhdGEudm9kX2luZm8udm9kX3VybF93aXRoX3BsYXllcjtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChjb250cy5sZW5ndGggPCAxKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY29udHMgPSBodG1sLmRhdGEudm9kX2luZm8udm9kX3BsYXlfdXJsLnNwbGl0KFxcXCIkJCRcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbnRzID0gaHRtbC5kYXRhLnZvZF9wbGF5X2xpc3Q7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoY29udHMubGVuZ3RoIDwgMSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRzID0gaHRtbC5kYXRhLnZvZF9wbGF5X3VybC5zcGxpdChcXFwiJCQkXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICBsZXQgbGlzdCA9IFtdO1xcbiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBjb250cy5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgICAgIGlmICgv56We6amsfFRWLy50ZXN0KGFwcHR5cGUpKSB7XFxuICAgICAgICAgICAgICAgIGxpc3QgPSBodG1sLnZpZGVvbGlzdFtjb250c1tpXV07XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgaWYgKGNvbnRzW2ldLnVybHMpIHtcXG4gICAgICAgICA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ZW50QE1vemlsbGEvNS4wfVxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHVybC5pbmNsdWRlcyhcXFwib2pia1xcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmwgPSB1cmwgKyBcXFwiO3tSZWZlcmVyQGh0dHBzOi8vYmFrLm9qYmtqeC5jb20vfVxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgaWYgKCF1cmwuaW5jbHVkZXMoXFxcImh0dHBcXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxcXCJcXFxcdTk0ZmVcXFxcdTYzYTVcXFxcdTRlMGRcXFxcdTY2MmZcXFxcdTRlZTVodHRwXFxcXHU1ZjAwXFxcXHU1OTM0KFxcXFx1NTNlZlxcXFx1ODBmZFxcXFx1NTJhMFxcXFx1NWJjNlxcXFx1NGU4NilcXFwiKTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIGlmICgvXFxcXC5tM3U4Ly50ZXN0KHVybCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gY2FjaGVNM3U4KHVybCk7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB1cmwgKyBcXFwiI2lzVmlkZW89dHJ1ZSNcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgIGlmICgvXFxcXC5tM3U4fFxcXFwubXA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lLCB3aXRoU3RhdHVzQ29kZTogdHJ1ZX0pKTtcXG4gICAgICAgICAgICAgICAgaWYgKHNjb2RlLnN0YXR1c0NvZGUgPT0gXFxcIjMwMlxcXCIgfHwgc2NvZGUuc3RhdHVzQ29kZSA9PSBcXFwiMzAxXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHJlZHVybCA9IHNjb2RlLmhlYWRlcnMubG9jYXRpb25bMF0ucmVwbGFjZSgvXFxcXFxcXFwvZywgXFxcIlxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgbG9nKFxcXCJcXFxcdTkxY2RcXFxcdTViOWFcXFxcdTU0MTE6XFxcIiArIHJlZHVybCk7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoIS8odXJsfHZpZHx2KVxcXFw9Ly50ZXN0KHJlZHVybCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gY2hhbmdlVmlkZW9VcmwocmVkdXJsKTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHNjb2RlLmJvZHkgPSBmZXRjaChyZWR1cmwpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGxldCBodG1sID0gc2NvZGUuYm9keTtcXG4gICAgICAgICAgICAgICAgaWYgKC80MDQgTm90IEZvdW5kfOWkh+ahiOWQjuWPr+e7p+e7reiuv+mXri8udGVzdChodG1sKSkge1xcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxcXCI0MDRcXFxcdTRlODZcXFwiKTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIGlmICgvXFxcXDxib2R5Ly50ZXN0KGh0bWwpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoW1xcXCJcXFxcdTVmMDBcXFxcdTU5Y2JcXFxcdTg5YzZcXFxcdTk4OTFcXFxcdTU1YzVcXFxcdTYzYT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9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dCA9PSBcXFwiXFxcXHU0ZjdmXFxcXHU3NTI4XFxcXHU1MTg1XFxcXHU3ZjZlXFxcXHU4OWUzXFxcXHU2NzkwXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coXFxcIlxcXFx1NGY3ZlxcXFx1NzUyOFxcXFx1NTE4NVxcXFx1N2Y2ZVxcXFx1ODllM1xcXFx1Njc5MFxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaG93TG9hZGluZyhcXFwiXFxcXHU2YjYzXFxcXHU1NzI4XFxcXHU4ZmRiXFxcXHU4ODRjXFxcXHU4OWUzXFxcXHU2NzkwLi4uXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBldmFsKEpTT04ucGFyc2UoZmV0Y2goXFxcImhpa2VyOi8vcGFnZS9teVBhcnNlXFxcIikpLnJ1bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAsIGxpbmssIHB0YWIsIHZsaW5rLCBhcHBVcmwpO1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcHVybCA9IEpTT04ucGFyc2UoaHRtbCkudXJsO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gY2hhbmdlVmlkZW9VcmwocHVybCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAg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mVcXFxcXFxcXHU2M2E1OlxcXFxcXFwiICsgdmxpbmspO1xcXFxuICAgICAgICAgICAgZnVuY3Rpb24gY2hhbmdlVmlkZW9VcmwodXJsKSB7XFxcXG4gICAgICAgICAgICAgICAgaWYgKHVybC5pbmNsdWRlcyhcXFxcXFxcIndrZmlsZVxcXFxcXFwiKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICB1cmwgPSB1cmwgKyBcXFxcXFxcIjt7UmVmZXJlckBodHRwczovL2ZhbnR1YW4ud2tmaWxlLmNvbS99XFxcXFxcXCI7XFxcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgaWYgKHB0YWIgPT0gXFxcXFxcXCJiaWxpYmlsaVxcXFxcXFwiKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmwgPSB1cmwgKyBcXFxcXFxcIjt7UmVmZXJlckBodHRwczovL3d3dy5iaWxpYmlsaS5jb20vJiZVc2VyLUFnZW50QE1vemlsbGEvNS4wfVxcXFxcXFwiO1xcXFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHB0YWIgPT0gXFxcXFxcXCJtZ3R2XFxcXFxcXCIpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmwgPSB1cmwgKyBcXFxcXFxcIjt7UmVmZXJlckB3d3cubWd0di5jb20mJlVzZXItQWdlbnRATW96aWxsYS81LjB9XFxcXFxcXCI7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh1cmwuaW5jbHVkZXMoXFxcXFxcXCJvamJrXFxcXFxcXCIpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybCA9IHVybCArIFxcXFxcXFwiO3tSZWZlcmVyQGh0dHBzOi8vYmFrLm9qYmtqeC5jb20vfVxcXFxcXFwiO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICBpZiAoIXVybC5pbmNsdWRlcyhcXFxcXFxcImh0dHBcXFxcXFxcIikpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxcXFxcXFwiXFxcXFxcXFx1OTRmZVxcXFxcXFxcdTYzYTVcXFxcXFxcXHU0ZTBkXFxcXFxcXFx1NjYyZlxcXFxcXFxcdTRlZTVodHRwXFxcXFxcXFx1NWYwMFxcXFxcXFxcdTU5MzQoXFxcXFxcXFx1NTNlZlxcXFxcXFxcdTgwZmRcXFxcXFxcXHU1MmEwXFxcXFxcXFx1NWJjNlxcXFxcXFxcdTRlODYpXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGlmICgvXFxcXFxcXFwubTN1OC8udGVzdCh1cmwpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gY2FjaGVNM3U4KHVybCk7XFxcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdXJsICsgXFxcXFxcXCIjaXNWaWRlbz10cnVlI1xcXFxcXFwiO1xcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgdHJ5IHtcXFxcbiAgICAgICAgICAgICAgICBpZiAoL1xcXFxcXFxcLm0zdTh8XFxcXFxcXFwubXA0fG9ialxcXFxcXFxcL3Rvc3xuZXRlYXNlXFxcXFxcXFwuY29tLy50ZXN0KHZsaW5rKSAmJiAvaHR0cC8udGVz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lxcXFxcXFwiKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlcXVpcmVDYWNoZShcXFxcXFxcImh0dHBzOi8vY29kZS5hbGl5dW4uY29tL2x6azIzNTU5L1B1YmxpY1J1bGUvcmF3L21hc3Rlci94NXJ1bGUuanNcXFxcXFxcIiwgMjQpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4geDVydWxlKGxpbmssIGxpbmspO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dCA9PSBcXFxcXFxcIlxcXFxcXFxcdTYyNTNcXFxcXFxcXHU1ZjAwXFxcXFxcXFx1ODllM1xcXFxcXFxcdTY3OTBcXFxcXFxcXHU3ZjUxXFxcXFxcXFx1OTg3NVxcXFxcXFwiKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJ3ZWI6Ly9cXFxcXFxcIiArIGxpbms7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5wdXQgPT0gXFxcXFxcXCJcXFxcXFxcXHU0ZjdmXFxcXFxcXFx1NzUyOFxcXFxcXFxcdTUxODVcXFxcXFxcXHU3ZjZlXFxcXFxcXFx1ODllM1xcXFxcXFxcdTY3OTBcXFxcXFxcIikge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZyhcXFxcXFxcIlxcXFxcXFxcdTRmN2ZcXFxcXFxcXHU3NTI4XFxcXFxcXFx1NTE4NVxcXFxcXFxcdTdmNmVcXFxcXFxcXHU4OWUzXFxcXFxcXFx1Njc5MFxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaG93TG9hZGluZyhcXFxcXFxcIlxcXFxcXFxcdTZiNjNcXFxcXFxcXHU1NzI4XFxcXFxcXFx1OGZkYlxcXFxcXFxcdTg4NGNcXFxcXFxcXHU4OWUzXFxcXFxcXFx1Njc5MC4uLlxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZXZhbChKU09OLnBhcnNlKGZldGNoKFxcXFxcXFwiaGlrZXI6Ly9wYWdlL215UGFyc2VcXFxcXFxcIikpLnJ1bGUpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgLCBsaW5rLCBwdGFiLCB2bGluaywgYXBwVXJsKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHB1cmwgPSBKU09OLnBhcnNlKGh0bWwpLnVybDtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gY2hhbmdlVmlkZW9VcmwocHVybCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXRjaCAoZSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcXFxcXFxcIlxcXFxcXFxcdTg5ZTNcXFxcXFxcXHU2NzkwXFxcXFxcXFx1NTNlZlxcXFxcXFxcdTgwZmRcXFxcXFxcXHU1MmEwXFxcXFxcXFx1NWJjNlxcXFxcXFxcdTRlODZcXFxcXFxcIik7XFxcXG4gICA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