Advertisement
xiaomianao666

邀您一起看:齐木楠雄的灾难

Dec 5th, 2022
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥齐木楠雄的灾难@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCJcIixcImxpc3RUb0NsZWFyQXNzb2NpYXRlZEZLXCI6W10sXCJsaXN0VG9DbGVhclNlbGZGS1wiOltdLFwicGFnZUxpc3RcIjpbe1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuaOqOmAgVwiLFwicGF0aFwiOlwicHVzaFwiLFwicnVsZVwiOlwianM6XFxuLy9sb2coTVlfVVJMKTtcXG52YXIgaXRlbXMgPSBbXTtcXG52YXIgcmVhbHVybCA9IE1ZX1VSTC5zcGxpdCgnIyMnKVsxXS5zcGxpdCgnPz8/JylbMF07XFxuaWYgKE1ZX1BBR0UgPT0gMSkge1xcbiAgICBpdGVtcy5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiBcXFwi8J+TvSDmjqjpgIHliLBUVkJveCDwn5O6XFxcIixcXG4gICAgICAgIHVybDogJChyZWFsdXJsKS5sYXp5UnVsZSgoKSA9PiB7XFxuICAgICAgICAgICAgaW5wdXQgPSBkZWNvZGVVUklDb21wb25lbnQoaW5wdXQpO1xcbiAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9wYWdlL3B1c2g/cnVsZT1YWVHmjqjpgIEmcHVzaHVybD0nICsgZW5jb2RlVVJJQ29tcG9uZW50KGlucHV0KTtcXG4gICAgICAgIH0pLF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ICB9IGVsc2UgaWYgKGNhdGUgPT0gJ2ltYWdlJykge1xcbiAgICAgICAgICAgICAgICB2YXIgdGl0bGUgPSAn8J+WvCcgKyBjb250c1tpXS5uYW1lO1xcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY2F0ZSA9PSAnemlwJykge1xcbiAgICAgICAgICAgICAgICB2YXIgdGl0bGUgPSAn8J+TpicgKyBjb250c1tpXS5uYW1lO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHZhciB0aXRsZSA9IGNvbnRzW2ldLm5hbWVcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgdXJsOiAkKGNvbnRzW2ldLmZpbGVfaWQpLmxhenlSdWxlKChzaGFyZUlkLCBzaGFyZXRva2VuLCBkb25ndGFpLCBjYXRlLCBmbmFtZSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgZXZhbChkb25ndGFpKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBwbGF5XFxuICAgICAgICAgICAgICAgIH0sIHNoYXJlSWQsIHNoYXJldG9rZW4sIGRvbmd0YWksIGNhdGUsIGZuYW1lKSxcXG4gICAgICAgICAgICAgICAgZGVzYzogZm9ybWF0RGF0ZShjb250c1tpXS51cGRhdGVkX2F0KSArICcgICcgKyBmb3JtYXRTaXplKGNvbnRzW2ldLnNpemUpLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfMSdcXG5cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBpZiAoY2F0ZSA9PSAndmlkZW8nIHx8IGNhdGUgPT0gJ2F1ZGlvJykge1xcbiAgICAgICAgICAgICAgICB0dWlzb25nLnB1c2goXFxuICAgICAgICAgICAgICAgICAgICB0aXRsZS5yZXBsYWNlKC9cXFxcIy9nLCAnXycpLnJlcGxhY2Uo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IGZvciAodmFyIGkgaW4gY29udHMpIHtcXFxcbiAgICAgICAgdmFyIGxpc3R5cCA9IGNvbnRzW2ldLnR5cGU7XFxcXG4gICAgICAgIGlmIChsaXN0eXAgIT0gJ2ZvbGRlcicpIHtcXFxcbiAgICAgICAgICAgIHZhciBjYXRlID0gY29udHNbaV0uY2F0ZWdvcnk7XFxcXG4gICAgICAgICAgICB2YXIgZm5hbWUgPSBjb250c1tpXS5uYW1lO1xcXFxuICAgICAgICAgICAgaWYgKGNhdGUgPT0gJ3ZpZGVvJykge1xcXFxuICAgICAgICAgICAgICAgIHZhciB0aXRsZSA9ICfwn5O6JyArIGNvbnRzW2ldLm5hbWU7XFxcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNhdGUgPT0gJ2RvYycpIHtcXFxcbiAgICAgICAgICAgICAgICB2YXIgdGl0bGUgPSAn8J+TlicgKyBjb250c1tpXS5uYW1lO1xcXFxuICAgICAgICAgICAgfSBlbHNlIGlmIChjYXRlID09ICdpbWFnZScpIHtcXFxcbiAgICAgICAgICAgICAgICB2YXIgdGl0bGUgPSAn8J+WvCcgKyBjb250c1tpXS5uYW1lO1xcXFxuICAgICAgICAgICAgfSBlbHNlIGlmIChjYXRlID09ICd6aXAnKSB7XFxcXG4gICAgICAgICAgICAgICAgdmFyIHRpdGxlID0gJ/Cfk6YnICsgY29udHNbaV0ubmFtZTtcXFxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgdmFyIHRpdGxlID0gY29udHNbaV0ubmFtZVxcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHRpdGxlLFxcXFxuICAgICAgICAgICAgICAgIHVybDogJChjb250c1tpXS5maWxlX2lkKS5sYXp5UnVsZSgoc2hhcmVJZCwgc2hhcmV0b2tlbiwgZG9uZ3RhaSwgY2F0ZSwgZm5hbWUpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgZXZhbChkb25ndGFpKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHBsYXlcXFxcbiAgICAgICAgICAgICAgICB9LCBzaGFyZUlkLCBzaGFyZXRva2VuLCBkb25ndGFpLCBjYXRlLCBmbmFtZSksXFxcXG4gICAgICAgICAgICAgICAgZGVzYzogZm9ybWF0RGF0ZShjb250c1tpXS51cGRhdGVkX2F0KSArICcgICcgKyBmb3JtYXRTaXplKGNvbnRzW2ldLnNpemUpLFxcXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF8xJ1xcXFxuXFxcXG4gICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgIGlmIChjYXRlID09ICd2aWRlbycgfHwgY2F0ZSA9PSAnYXVkaW8nKSB7XFxcXG4gICAgICAgICAgICAgICAgdHVpc29uZy5wdXNoKFxcXFxuICAgICAgICAgICAgICAgICAgICB0aXRsZS5yZXBsYWNlKC9cXFxcXFxcXCMvZywgJ18nKS5yZXBsYWNlKC9cXFxcXFxcXCQvZywgJ18nKSArICckJyArIGNhdGUgKyAnfCcgKyBjb250c1tpXS5maWxlX2lkXFxcXG4gICAgICAgICAgICAgICAgKTtcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgIHRpdGxlOiAn8J+TgicgKyBjb250c1tpXS5uYW1lLFxcXFxuICAgICAgICAgICAgICAgIHVybDogJCgnaGlrZXI6Ly9lbXB0eScgKyBjb250c1tpXS5maWxlX2lkICsgJz8/P2Z5cGFnZScpLnJ1bGUoKHNoYXJlSWQsIHNoYXJldG9rZW4sIHB1c2huYW1lKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShmZXRjaCgnaGlrZXI6Ly9wYWdlL3J1bGVsb29wJywge30pKS5ydWxlKTtcXFxc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