xiaomianao666

小程序:加解密工具

Sep 8th, 2024
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@加解密工具@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi5Yqg6Kej5a+G5bel5YW3IiwiYXV0aG9yIjoiUngmUmVib3JuJkBMb3lEZ0lrJnd6aGpnb29kJkpva2VyIiwidXJsIjoiaGlrZXI6Ly9lbXB0eSNmeUFsbCIsInZlcnNpb24iOjI2LCJjb2xfdHlwZSI6InJpY2hfdGV4dCIsImNsYXNzX25hbWUiOiIiLCJ0eXBlIjoib3RoZXIiLCJjbGFzc191cmwiOiIiLCJhcmVhX25hbWUiOiIiLCJhcmVhX3VybCI6IiIsInNvcnRfbmFtZSI6IiIsInllYXJfbmFtZSI6IiIsInNvcnRfdXJsIjoiIiwieWVhcl91cmwiOiIiLCJmaW5kX3J1bGUiOiJqczpcbmxldCBuZXdXaW5kb3cgPSB0cnVlXG5sZXQgaG9tZVBhZ2UgPSBKU09OLnBhcnNlKHJlcXVlc3QoJ2hpa2VyOi8vcGFnZS9ob21lP3J1bGU95Yqg6Kej5a+G5bel5YW3JykpLnJ1bGVcbmV2YWwoaG9tZVBhZ2UpIiwic2VhcmNoX3VybCI6IiIsImdyb3VwIjoi4pGk5bel5YW3Iiwic2VhcmNoRmluZCI6IiIsImRldGFpbF9jb2xfdHlwZSI6Im1vdmllXzEiLCJkZXRhaWxfZmluZF9ydWxlIjoiIiwic2RldGFpbF9jb2xfdHlwZSI6Im1vdmllXzEiLCJzZGV0YWlsX2ZpbmRfcnVsZSI6IiIsInVhIjoibW9iaWxlIiwicHJlUnVsZSI6IiIsInBhZ2VzIjoiW3tcImNvbF90eXBlXCI6XCJ0ZXh0XzFcIixcIm5hbWVcIjpcIlVuaWNvZGVcIixcInBhdGhcIjpcInVuaWNvZGVcIixcInJ1bGVcIjpcImpzOlxcbmxldCB1bmljb2R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ZVwiLFwicnVsZVwiOlwianM6XFxuZnVuY3Rpb24gc2V0RW5jb2RlUGFnZShkLCBvYmopIHtcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiBcXFwi57yW56CBXFxcIixcXG4gICAgICAgIGRlc2M6IFxcXCLor7fovpPlhaXljp/mlodcXFwiLFxcbiAgICAgICAgY29sX3R5cGU6ICdpbnB1dCcsXFxuICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgIC8vIHRpdGxlVmlzaWJsZTogZmFsc2UsXFxuICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiBnZXRWYXIoXFxcImRlY29kZS10ZXh0XFxcIiwgXFxcIlxcXCIpLFxcbiAgICAgICAgICAgIHR5cGU6IFxcXCJ0ZXh0YXJlYVxcXCIsXFxuICAgICAgICAgICAgb25DaGFuZ2U6ICdwdXRWYXIoXFxcImRlY29kZS10ZXh0XFxcIixpbnB1dCknXFxuICAgICAgICB9LFxcbiAgICAgICAgdXJsOiAkLnRvU3RyaW5nKChvYmopID0+IHtcXG4gICAgICAgICAgICBvYmouZGVjVGV4dCA9IGlucHV0O1xcbiAgICAgICAgICAgIC8vIGxvZyhcXFwib2JqLmRlY1RleHQ6IFxcXCIgKyBvYmouZGVjVGV4dClcXG4gICAgICAgICAgICB2YXIgZW5jb2RlID0gXFxcIlxcXCI7XFxuICAgICAgICAgICAgdmFyIHRvb2wgPSB7fTtcXG4gICAgICAgICAgICBmb3IgKGxldCBrZXkgaW4gb2JqLnRvb2xzKSB7XFxuICAgICAgICAgICAgICAgIC8vIGxvZyhvYmoudHlwZSlcXG4gICAgICAgICAgICAgICAgbGV0IHR5cGUgPSBvYmoudHlwZS5zcGxpdChcXFwiQEBcXFwiKS5wb3AoKVxcbiAgICAgICAgICAgICAgICBpZiAodHlwZSA9PSBrZXkpIHtcXG4gICAgICAgICAgICAgICAgICAgIHRvb2wgPSBvYmoudG9vbHNba2V5XTtcXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGVuY29kZSA9IHRvb2wuZW5jb2RlKG9iaik7XFxuICAgICAgICAgICAgLy8gbG9nKFxcXCJlbmNvZGU6IFxcXCIgKyBlbmNvZGUpXFxuICAgICAgICAgICAgcHV0VmFyKCdlbmNvZGUtdGV4dCcsIGVuY29kZSk7XFxuICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcXG4gICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5Yqg5a+G5oiQ5YqfJztcXG4gICAgICAgIH0sIG9iaiksXFxuICAgIH0pO1xcblxcbiAgICBkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6IFxcXCLop6PnoIFcXFwiLFxcbiAgICAgICAgZGVzYzogXFxcIuivt+i+k+WFpeWvhuaWh1xcXCIsXFxuICAgICAgICBjb2xfdHlwZTogJ2lucHV0JyxcXG4gICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgLy8gdGl0bGVWaXNpYmxlOiBmYWxzZSxcXG4gICAgICAgICAgICBkZWZhdWx0VmFsdWU6IGdldFZhcihcXFwiZW5jb2RlLXRleHRcXFwiLCBcXFwiXFxcIiksXFxuICAgICAgICAgICAgdHlwZTogXFxcInRleHRhcmVhXFxcIixcXG4gICAgICAgICAgICBvbkNoYW5nZTogJ3B1dFZhcihcXFwiZW5jb2RlLXRleHRcXFwiLGlucHV0KSdcXG4gICAgICAgIH0sXFxuICAgICAgICB1cmw6ICQudG9TdHJpbmcoKG9iaikgPT4ge1xcbiAgICAgICAgICAgIG9iai5lbmNUZXh0ID0gaW5wdXQ7XFxuICAgICAgICAgICAgLy8gbG9nKFxcXCJvYmouZW5jVGV4dDogXFxcIiArIG9iai5lbmNUZXh0KVxcbiAgICAgICAgICAgIHZhciBkZWNvZGUgPSBcXFwiXFxcIjtcXG4gICAgICAgICAgICB2YXIgdG9vbCA9IHt9O1xcbiAgICAgICAgICAgIGZvciAobG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biAgICAgICAgICAgIFxcXCJIZXhcXFwiOiBcXFwiSGV4XFxcIixcXG4gICAgICAgICAgICBcXFwiTGF0aW4xXFxcIjogXFxcIkxhdGluMVxcXCJcXG4gICAgICAgIH0sXFxuICAgICAgICBpdkVuY29kZVR5cGU6IHtcXG4gICAgICAgICAgICBcXFwiVVRGLThcXFwiOiBcXFwiVVRGLThcXFwiLFxcbiAgICAgICAgICAgIFxcXCJIZXhcXFwiOiBcXFwiSGV4XFxcIixcXG4gICAgICAgICAgICBcXFwiTGF0aW4xXFxcIjogXFxcIkxhdGluMVxcXCJcXG4gICAgICAgIH1cXG4gICAgfSxcXG4gICAgY29uZmlnOiB7XFxuICAgICAgICB0eXBlOiB7XFxuICAgICAgICAgICAga2V5OiBcXFwiY3J5cHRvX3R5cGVcXFwiLFxcbiAgICAgICAgICAgIGdldDogZnVuY3Rpb24oKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBnZXRWYXIodGhpcy5rZXksIFxcXCJBRVNcXFwiKTtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgIHNldDogZnVuY3Rpb24obmV3VmFsdWUpIHtcXG4gICAgICAgICAgICAgICAgcHV0VmFyKHRoaXMua2V5LCBuZXdWYWx1ZSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSxcXG4gICAgICAgIG1vZGU6IHtcXG4gICAgICAgICAgICBrZXk6IFxcXCJjcnlwdG9fc2VsZWN0X21vZGVcXFwiLFxcbiAgICAgICAgICAgIGdldDogZnVuY3Rpb24oKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBnZXRWYXIodGhpcy5rZXksIFxcXCJDQkNcXFwiKTtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgIHNldDogZnVuY3Rpb24obmV3VmFsdWUpIHtcXG4gICAgICAgICAgICAgICAgcHV0VmFyKHRoaXMua2V5LCBuZXdWYWx1ZSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSxcXG4gICAgICAgIHBhZDoge1xcbiAgICAgICAgICAgIGtleTogXFxcImNyeXB0b19zZWxlY3RfcGFkXFxcIixcXG4gICAgICAgICAgICBnZXQ6IGZ1bmN0aW9uKCkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gZ2V0VmFyKHRoaXMua2V5LCBcXFwiUGtjczdcXFwiKTtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgIHNldDogZnVuY3Rpb24obmV3VmFsdWUpIHtcXG4gICAgICAgICAgICAgICAgcHV0VmFyKHRoaXMua2V5LCBuZXdWYWx1ZSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSxcXG4gICAgICAgIGl2OiB7XFxuICAgICAgICAgICAga2V5OiBcXFwiY3J5cHRvX2lucHV0X2l2XFxcIixcXG4gICAgICAgICAgICBnZXQ6IGZ1bmN0aW9uKCkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gZ2V0VmFyKHRoaXMua2V5LCBcXFwiXFxcIik7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICBzZXQ6IGZ1bmN0aW9uKG5ld1ZhbHVlKSB7XFxuICAgICAgICAgICAgICAgIHB1dFZhcih0aGlzLmtleSwgbmV3VmFsdWUpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sXFxuICAgICAgICBlbmNvZGU6IHtcXG4gICAgICAgICAgICBrZXk6IFxcXCJjcnlwdG9fb3V0cHV0X2VuY29kZVxcXCIsXFxuICAgICAgICAgICAgZ2V0OiBmdW5jdGlvbigpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIGdldFZhcih0aGlzLmtleSwgQ3J5cHRvLkNvbmZpZ01hcHBpbmcuZW5jb2RlW1xcXCJCYXNlNjRcXFwiXSlcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgIHNldDogZnVuY3Rpb24obmV3VmFsdWUpIHtcXG4gICAgICAgICAgICAgICAgcHV0VmFyKHRoaXMua2V5LCBuZXdWYWx1ZSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSxcXG4gICAgICAgIGtleToge1xcbiAgICAgICAgICAgIGtleTogXFxcImNyeXB0b19rZXlcXFwiLFxcbiAgICAgICAgICAgIGdldDogZnVuY3Rpb24oKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBnZXRWYXIodGhpcy5rZXksIFxcXCJcXFwiKTtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgIHNldDogZnVuY3Rpb24obmV3VmFsdWUpIHtcXG4gICAgICAgICAgICAgICAgcHV0VmFyKHRoaXMua2V5LCBuZXdWYWx1ZSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSxcXG4gICAgICAgIHRleHQ6IHtcXG4gICAgICAgICAgICBrZXk6IFxcXCJjcnlwdG9fdGV4dFxcXCIsXFxuICAgICAgICAgICAgZ2V0OiBmdW5jdGlvbigpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIGdldFZhcih0aGlzLmtleSwgXFxcIlxcXCIpO1xcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgc2V0OiBmdW5jdGlvbihuZXdWYWx1ZSkge1xcbiAgICAgICAgICAgICAgICBwdXRWYXIodGhpcy5rZXksIG5ld1ZhbHVlKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9LFxcbiAgICAgICAgY2lwaGVyVGV4dDoge1xcbiAgICAgICAgICAgIGtleTogXFxcImNyeXB0b19jaXBoZXJfdGV4dFxcXCIsXFxuICAgICAgICAgICAgZ2V0OiBmdW5jdGlvbigpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIGdldFZhcih0aGlzLmtleSwgXFxcIlxcXCIpO1xcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgc2V0OiBmdW5jdGlvbihuZXdWYWx1ZSkge1xcbiAgICAgICAgICAgICAgICBwdXRWYXIodGhpcy5rZXksIG5ld1ZhbHVlKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9LFxcbiAgICAgICAgYmxvY2tTaXplOiB7XFxuICAgICAgICAgICAga2V5OiBcXFwiY3J5cHRvX2Jsb2NrX3NpemVcXFwiLFxcbiAgICAgICAgICAgIGdldDogZnVuY3Rpb24oKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBnZXRWYXIodGhpcy5rZXksIFxcXCJBRVMtMTI4XFxcIik7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICBzZXQ6IGZ1bmN0aW9uKG5ld1ZhbHVlKSB7XFxuICAgICAgICAgICAgICAgIHB1dFZhcih0aGlzLmtleSwgbmV3VmFsdWUpO1xcbiAgICAgICAgICAgIH1cXG5cXG4gICAgICAgIH0sXFxuICAgICAgICBrZXlFbmNvZGVUeXBlOiB7XFxuICAgICAgICAgICAga2V5OiBcXFwiY3J5cHRvX2tleV9lbmNvZGVfdHlwZVxcXCIsXFxuICAgICAgICAgICAgZ2V0OiBmdW5jdGlvbigpIHtcXG4gICAgICAgICAgICAgICAgLy8gVE9ETyDmraTlpITkuI3nn6XkuLrkvZUgQ3J5cHRvLkNvbmZpZ01hcHBpbmcua2V5RW5jb2RlVHlwZVtcXFwiVVRGLThcXFwiXSDkvJrmiqUgQ3J5cHRvIHVuZGVmaW5lZFxcbiAgICAgICAgICAgICAgICByZXR1cm4gZ2V0VmFyKHRoaXMua2V5LCBcXFwiVVRGLThcXFwiKVxcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgc2V0OiBmdW5jdGlvbihuZXdWYWx1ZSkge1xcbiAgICAgICAgICAgICAgICBwdXRWYXIodGhpcy5rZXksIG5ld1ZhbHVlKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9LFxcbiAgICAgICAgaXZFbmNvZGVUeXBlOiB7XFxuICAgICAgICAgICAga2V5OiBcXFwiY3J5cHRvX2l2X2VuY29kZV90eXBlXFxcIixcXG4gICAgICAgICAgICBnZXQ6IGZ1bmN0aW9uKCkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gZ2V0VmFyKHRoaXMua2V5LCBcXFwiVVRGLThcXFwiKVxcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgc2V0OiBmdW5jdGlvbihuZXdWYWx1ZSkge1xcbiAgICAgICAgICAgICAgICBwdXRWYXIodGhpcy5rZXksIG5ld1ZhbHVlKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9LFxcbiAgICB9LFxcbiAgICBvbkNsb3NlOiBmdW5jdGlvbigpIHtcXG4gICAgICAgIGxldCBjb25maWdLZXlzID0gT2JqZWN0LmtleXModGhpcy5jb25maWcpO1xcbiAgICAgICAgZm9yIChsZXQgY29uZktleSBvZiBjb25maWdLZXlzKSB7XFxuICAgICAgICAgICAgbGV0IGtleSA9IHRoaXMuY29uZmlnW2NvbmZLZXldLmtleTtcXG4gICAgICAgICAgICBjbGVhclZhcihrZXkpO1xcbiAgICAgICAgfVxcbiAgICB9LFxcbiAgICBidWlsZENvbmZpZzogZnVuY3Rpb24oKSB7XFxuICAgICAgICBsZXQgbW9kZSA9IHRoaXMuY29uZmlnLm1vZGUuZ2V0KCk7XFxuICAgICAgICBsZXQgcGFkID0gdGhpcy5jb25maWcucGFkLmdldCgpO1xcbiAgICAgICAgbGV0IGl2ID0gdGhpcy5jb25maWcuaXYuZ2V0KCk7XFxuICAgICAgICBsZXQgY29uZiA9IHt9O1xcbiAgICAgICAgY29uZi5tb2RlID0gdGhpcy5Db25maWdNYXBwaW5nLm1vZGVbbW9kZV07XFxuICAgICAgICBjb25mLnBhZGRpbmcgPSB0aGlzLkNvbmZpZ01hcHBpbmcucGFkW3BhZF1cXG4gICAgICAgIGlmIChtb2RlICE9IFxcXCJFQ0JcXFwiICYmIGl2Lmxlbmd0aCAhPSAwKSB7XFxuICAgICAgICAgICAgY29uZi5pdiA9IENyeXB0b0pTLmVuYy5VdGY4LnBhcnNlKGl2KTtcXG4gICAgICAgICAgICBpZiAodGhpcy5jb25maWcuaXZFbmNvZGVUeXBlLmdldCgpID09IFxcXCJIZXhcXFwiKSB7XF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lbmMuTGF0aW4xLnBhcnNlKGtleVN0cmluZyk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgIGxldCBjb25mID0gdGhpcy5idWlsZENvbmZpZygpXFxuICAgICAgICAgICAgICAgIGxldCBlbmNyeXB0ZWQgPSB0aGlzLkNvbmZpZ01hcHBpbmcuZW5jVHlwZVt0aGlzLmNvbmZpZy50eXBlLmdldCgpXSh0ZXh0LCBrZXksIGNvbmYpO1xcbiAgICAgICAgICAgICAgICBsZXQgZW5jb2RlID0gdGhpcy5jb25maWcuZW5jb2RlLmdldCgpXFxuICAgICAgICAgICAgICAgIGxldCBjaXBoZXJUZXh0ID0gZW5jcnlwdGVkLnRvU3RyaW5nKCk7XFxuICAgICAgICAgICAgICAgIGlmIChlbmNvZGUgPT09ICdIRVgnKSB7XFxuICAgICAgICAgICAgICAgICAgICBjaXBoZXJUZXh0ID0gQ3J5cHRvSlMuZW5jLkhleC5zdHJpbmdpZnkoQ3J5cHRvSlMuZW5jLkJhc2U2NC5wYXJzZShjaXBoZXJUZXh0KSk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgLy8g5a+G5paHXFxuICAgICAgICAgICAgICAgIHRoaXMuY29uZmlnLmNpcGhlclRleHQuc2V0KGNpcGhlclRleHQpXFxuICAgICAgICAgICAgICAgIHJldHVybiBjaXBoZXJUZXh0O1xcbiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgbG9nKGUubWVzc2FnZSlcXG4gICAgICAgICAgICAgICAgc2V0RXJyb3IoZS5tZXNzYWdlKVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxcXCLmmI7mlofkuI3og73kuLrnqbrvvIFcXFwiKVxcbiAgICAgICAgfVxcbiAgICB9LFxcbiAgICBkZWNyeXB0b3I6IGZ1bmN0aW9uKG9iaikge1xcbiAgICAgICAgbGV0IHRleHQgPSBvYmouZW5jVGV4dDtcXG4gICAgICAgIGlmICh0ZXh0KSB7XFxuICAgICAgICAgICAgbGV0IGVuY29kZSA9IHRoaXMuY29uZmlnLmVuY29kZS5nZXQoKVxcbiAgICAgICAgICAgIGxldCBjaXBoZXJUZXh0O1xcbiAgICAgICAgICAgIGlmIChlbmNvZGUgPT09ICdCYXNlNjQnKSB7XFxuICAgICAgICAgICAgICAgIGNpcGhlclRleHQgPSB0ZXh0XFxuICAgICAgICAgICAgfSBlbHNlIGlmIChlbmNvZGUgPT09ICdIRVgnKSB7XFxuICAgICAgICAgICAgICAgIGNpcGhlclRleHQgPSBDcnlwdG9KUy5lbmMuQmFzZTY0LnN0cmluZ2lmeShDcnlwdG9KUy5lbmMuSGV4LnBhcnNlKHRleHQpKVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBsZXQga2V5U3RyaW5nID0gdGhpcy5jb25maWcua2V5LmdldCgpXFxuICAgICAgICAgICAgbGV0IGtleSA9IENyeXB0b0pTLmVuYy5VdGY4LnBhcnNlKGtleVN0cmluZyk7XFxuICAgICAgICAgICAgaWYgKHRoaXMuY29uZmlnLmtleUVuY29kZVR5cGUuZ2V0KCkgPT0gXFxcIkhleFxcXCIpIHtcXG4gICAgICAgICAgICAgICAga2V5U3RyaW5nID0ga2V5U3RyaW5nLnJlcGxhY2UoXFxcIltIRVhdOlxcXCIsIFxcXCJcXFwiKVxcbiAgICAgICAgICAgICAgICBrZXkgPSBDcnlwdG9KUy5lbmMuSGV4LnBhcnNlKGtleVN0cmluZyk7XFxuICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLmNvbmZpZy5rZXlFbmNvZGVUeXBlLmdldCgpID09IFxcXCJMYXRpbjFcXFwiKSB7XFxuICAgICAgICAgICAgICAgIGtleSA9IENyeXB0b0pTLmVuYy5MYXRpbjEucGFyc2Uoa2V5U3RyaW5nKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgbGV0IGNvbmYgPSB0aGlzLmJ1aWxkQ29uZmlnKClcXG4gICAgICAgICAgICAgICAgbGV0IGRlY3J5cHRlZCA9IHRoaXMuQ29uZmlnTWFwcGluZy5kZWNUeXBlW3RoaXMuY29uZmlnLnR5cGUuZ2V0KCldKGNpcGhlclRleHQsIGtleSwgY29uZik7XFxuICAgICAgICAgICAgICAgIGxldCBkZWNyeXB0ZWRTdHIgPSBkZWNyeXB0ZWQudG9TdHJpbmcoQ3J5cHRvSlMuZW5jLlV0ZjgpO1xcbiAgICAgICAgICAgICAgICBpZiAoIWRlY3J5cHRlZFN0cikge1xcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxcXCLor7fmo4Dmn6Xlr4bpkqUga2V544CB5YGP56e76YePIGl2IOS7peWPiuWvhuaWh+aYr+WQpuato+ehru+8gVxcXCIpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHRoaXMuY29uZmlnLnRleHQuc2V0KGRlY3J5cHRlZFN0cilcXG4gICAgICAgICAgICAgICAgcmV0dXJuIGRlY3J5cHRlZFN0clxcbiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxcXCLop6Plr4blpLHotKXvvIFcXFwiICsgZS5tZXNzYWdlKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcXFwi5a+G5paH5LiN6IO95Li656m677yBXFxcIilcXG4gICAgICAgIH1cXG4gICAgfSxcXG4gICAgY2hlY2tLZXk6IGZ1bmN0aW9uKG9iaikge1xcbiAgICAgICAgbGV0IGtleSA9IENyeXB0by5jb25maWcua2V5LmdldCgpO1xcbiAgICAgICAgaWYgKGtleS5sZW5ndGggPT09IDApIHtcXG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXFxcIuWvhumSpSBrZXkg5LiN6IO95Li656m677yBXFxcIilcXG4gICAgICAgIH1cXG4gICAgICAgIGxldCB0eXBlID0gQ3J5cHRvLmNvbmZpZy50eXBlLmdldCgpO1xcbiAgICAgICAgbGV0IGJsb2NrU2l6ZSA9IDEyODtcXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgYmxvY2tTaXplID0gQ3J5cHRvLkNvbmZpZ01hcHBpbmdbXFxcImJsb2NrU2l6ZVxcXCJdW3R5cGVdW0NyeXB0by5jb25maWcuYmxvY2tTaXplLmdldCgpXVxcbiAgICAgICAgICAgIC8vIGxvZyhcXFwiY2hlY2tLZXkjYmxvY2tTaXplOlxcXCIgKyBibG9ja1NpemUpXFxuICAgICAgICB9IGNhdGNoIChlKSB7fVxcbiAgICAgICAgaWYgKHR5cGUgPT09IFxcXCJERVNcXFwiKSB7XFxuICAgICAgICAgICAgYmxvY2tTaXplID0gNjQ7XFxuICAgICAgICB9XFxuICAgICAgICBpZiAoQ3J5cHRvLmNvbmZpZy5rZXlFbmNvZGVUeXBlLmdldCgpID09IFxcXCJIZXhcXFwiKSB7XFxuICAgICAgICAgICAga2V5ID0ga2V5LnJlcGxhY2UoXFxcIltIRVhdOlxcXCIsIFxcXCJcXFwiKVxcbiAgICAgICAgICAgIGJsb2NrU2l6ZSA9IGJsb2NrU2l6ZSAqIDI7XFxuICAgICAgICB9XFxuICAgICAgICAvLyDorr7nva7mlbDmja7lnZfplb/luqZcXG4gICAgICAgIGxldCBrZXlTaXplID0ga2V5Lmxlbmd0aCAqIDg7XFxuICAgICAgICAvLyBsb2coXFxcImNoZWNrS2V5I2tleVNpemU6XFxcIiArIGtleVNpemUpXFxuICAgICAgICAvLyBsb2coXFxcImNoZWNrS2V5I2tleVNpemUvODpcXFwiICsga2V5U2l6ZS84KVxcbiAgICAgICAgLy8gbG9nKFxcXCJjaGVja0tleSNibG9ja1NpemU6XFxcIiArIGJsb2NrU2l6ZSl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6IFxcXCIgKyBvYmouZGVjVGV4dClcXG4gICAgICAgICAgICBsZXQgdG9hc3RUZXh0ID0gXFxcIuWKoOWvhuaIkOWKn1xcXCI7XFxuICAgICAgICAgICAgdmFyIGNpcGhlclRleHQgPSBcXFwiXFxcIjtcXG4gICAgICAgICAgICBsZXQgQ3J5cHRvID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYWVzP3J1bGU9XFxcIiArIG9iai5ydWxlVGl0bGUpO1xcbiAgICAgICAgICAgIGxldCBjb25maWcgPSBDcnlwdG8uY29uZmlnO1xcbiAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgIENyeXB0by5jaGVja0tleShvYmopO1xcbiAgICAgICAgICAgICAgICBDcnlwdG8uY2hlY2tJdihvYmopO1xcbiAgICAgICAgICAgICAgICBvYmoudG9vbHNbXFxcIkFFU1xcXCJdID0gQ3J5cHRvLkFFUztcXG4gICAgICAgICAgICAgICAgb2JqLnRvb2xzW1xcXCJERVNcXFwiXSA9IENyeXB0by5ERVM7XFxuICAgICAgICAgICAgICAgIG9iai50b29sc1tcXFwiM0RFU1xcXCJdID0gQ3J5cHRvW1xcXCIzREVTXFxcIl07XFxuICAgICAgICAgICAgICAgIHZhciB0b29sID0ge307XFxuICAgICAgICAgICAgICAgIGZvciAobGV0IGtleSBpbiBvYmoudG9vbHMpIHtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChvYmoudHlwZS5pbmNsdWRlcyhcXFwiM0RFU1xcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdG9vbCA9IG9iai50b29sc1tcXFwiM0RFU1xcXCJdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgaWYgKG9iai50eXBlLmluY2x1ZGVzKGtleSkgJiYgIW9iai50eXBlLmluY2x1ZGVzKFxcXCIzREVTXFxcIikpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0b29sID0gb2JqLnRvb2xzW2tleV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgY2lwaGVyVGV4dCA9IHRvb2wuZW5jcnlwdChvYmopO1xcbiAgICAgICAgICAgICAgICAvLyBsb2coXFxcImNpcGhlclRleHQ6IFxcXCIgKyBjaXBoZXJUZXh0KVxcbiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgY2lwaGVyVGV4dCA9IGUubWVzc2FnZTtcXG4gICAgICAgICAgICAgICAgdG9hc3RUZXh0ID0gXFxcIuWKoOWvhuWksei0pVxcXCI7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGNvbmZpZy5jaXBoZXJUZXh0LnNldChjaXBoZXJUZXh0KVxcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XFxuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovLycgKyB0b2FzdFRleHQ7XFxuICAgICAgICB9LCBvYmopLFxcbiAgICB9KTtcXG4gICAgYnVpbGRDb25maWdzVUkoZCwgb2JqKTtcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiBcXFwi6Kej5a+GXFxcIixcXG4gICAgICAgIGRlc2M6IFxcXCLor7fovpPlhaXlr4bmlodcXFwiLFxcbiAgICAgICAgY29sX3R5cGU6ICdpbnB1dCcsXFxuICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgIC8vIHRpdGxlVmlzaWJsZTogZmFsc2UsXFxuICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiBnZXRWYXIoXFxcImNyeXB0b19jaXBoZXJfdGV4dFxcXCIsIFxcXCJcXFwiKSxcXG4gICAgICAgICAgICB0eXBlOiBcXFwidGV4dGFyZWFcXFwiLFxcbiAgICAgICAgICAgIG9uQ2hhbmdlOiAncHV0VmFyKFxcXCJjcnlwdG9fY2lwaGVyX3RleHRcXFwiLGlucHV0KSdcXG4gICAgICAgIH0sXFxuICAgICAgICB1cmw6ICQudG9TdHJpbmcoKG9iaikgPT4ge1xcbiAgICAgICAgICAgIG9iai5lbmNUZXh0ID0gaW5wdXQ7XFxuICAgICAgICAgICAgLy8gbG9nKFxcXCJvYmouZW5jVGV4dDogXFxcIiArIG9iai5lbmNUZXh0KVxcbiAgICAgICAgICAgIGxldCB0b2FzdFRleHQgPSBcXFwi6Kej5a+G5oiQ5YqfXFxcIjtcXG4gICAgICAgICAgICBsZXQgQ3J5cHRvID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYWVzP3J1bGU9XFxcIiArIG9iai5ydWxlVGl0bGUpO1xcbiAgICAgICAgICAgIHZhciB0ZXh0ID0gXFxcIlxcXCI7XFxuICAgICAgICAgICAgbGV0IGNvbmZpZyA9IENyeXB0by5jb25maWc7XFxuICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgQ3J5cHRvLmNoZWNrS2V5KG9iaik7XFxuICAgICAgICAgICAgICAgIENyeXB0by5jaGVja0l2KG9iaik7XFxuICAgICAgICAgICAgICAgIG9iai50b29sc1tcXFwiQUVTXFxcIl0gPSBDcnlwdG8uQUVTO1xcbiAgICAgICAgICAgICAgICBvYmoudG9vbHNbXFxcIkRFU1xcXCJdID0gQ3J5cHRvLkRFU1xcbiAgICAgICAgICAgICAgICB2YXIgdG9vbCA9IHt9O1xcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBrZXkgaW4gb2JqLnRvb2xzKSB7XFxuICAgICAgICAgICAgICAgICAgICBpZiAob2JqLnR5cGUuaW5jbHVkZXMoa2V5KSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRvb2wgPSBvYmoudG9vbHNba2V5XTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAg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pdGxlOiAn4oCc4oCc4oCd4oCdPHN0cm9uZz48Zm9udCBjb2xvcj1cXFwiYmxhY2tcXFwiPuaVsOaNruWdlzwvZm9udD48L3N0cm9uZz4nLFxcbiAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vZW1wdHlcXFwiLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwic2Nyb2xsX2J1dHRvblxcXCJcXG4gICAgICAgIH0pXFxuICAgICAgICBmb3IgKGxldCBibG9ja1NpemUgb2YgYmxvY2tTaXplcykge1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBibG9ja1NpemUgPT0gY29uZmlnLmJsb2NrU2l6ZS5nZXQoKSA/IFxcXCLigJjigJhcXFwiICsgYmxvY2tTaXplICsgXFxcIuKAmeKAmVxcXCIgOiBibG9ja1NpemUsXFxuICAgICAgICAgICAgICAgIHVybDogJChcXFwiI25vTG9hZGluZyNcXFwiKS5sYXp5UnVsZSgoYmxvY2tTaXplLCBjb25maWcpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbmZpZy5ibG9ja1NpemUuc2V0KGJsb2NrU2l6ZSlcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICAgICAgfSwgYmxvY2tTaXplLCBjb25maWcpLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInNjcm9sbF9idXR0b25cXFwiXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYmxhbmtfYmxvY2tcXFwiXFxuICAgICAgICB9KVxcbiAgICB9XFxuXFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogJ+KAnOKAnOKAneKAnTxzdHJvbm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gICBpZiAoY29uZmlnLnR5cGUuZ2V0KCkgPT09IFxcXCJERVNcXFwiKSB7XFxuICAgICAgICBibG9ja1NpemUgPSA2NDtcXG4gICAgfVxcbiAgICBvYmouYmxvY2tTaXplID0gYmxvY2tTaXplO1xcbiAgICBsZXQga2V5TGVuID0gYmxvY2tTaXplIC8gODtcXG4gICAgbGV0IGtleUxlblN0ciA9IGtleUxlbiArIFxcXCIg5Liq5a2X56ymXFxcIlxcbiAgICBpZiAoY29uZmlnLmtleUVuY29kZVR5cGUuZ2V0KCkgPT0gJ0hleCcpIHtcXG4gICAgICAgIGtleUxlblN0ciA9IChrZXlMZW4gKiAyKSArIFxcXCIg5Liq5Y2B5YWt6L+b5Yi25a2X56ymXFxcIjtcXG4gICAgfVxcbiAgICBkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6IFxcXCLpmo/mnLoga2V5XFxcIixcXG4gICAgICAgIGRlc2M6IFxcXCLlr4bpkqUga2V5LCDlv4XpobsgXFxcIiArIGtleUxlblN0cixcXG4gICAgICAgIGNvbF90eXBlOiAnaW5wdXQnLFxcbiAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAvLyB0aXRsZVZpc2libGU6IGZhbHNlLFxcbiAgICAgICAgICAgIC8qaGVpZ2h0OiAtMSxcXG4gICAgICAgICAgICB0eXBlOiBcXFwidGV4dGFyZWFcXFwiLCovXFxuICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiBjb25maWcua2V5LmdldCgpLFxcbiAgICAgICAgICAgIG9uQ2hhbmdlOiAkLnRvU3RyaW5nKChjb25maWcpID0+IHtcXG4gICAgICAgICAgICAgICAgY29uZmlnLmtleS5zZXQoaW5wdXQpXFxuICAgICAgICAgICAgfSwgY29uZmlnKVxcbiAgICAgICAgfSxcXG4gICAgICAgIHVybDogJC50b1N0cmluZygob2JqLCBjb25maWcpID0+IHtcXG4gICAgICAgICAgICBsZXQgVG9vbCA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL3V0aWxpeT9ydWxlPVxcXCIgKyBvYmoucnVsZVRpdGxlKTtcXG4gICAgICAgICAgICBsZXQga2V5TGVuID0gb2JqLmJsb2NrU2l6ZSAvIDg7XFxuICAgICAgICAgICAgaWYgKGNvbmZpZy50eXBlLmdldCgpID09PSAnREVTJykge1xcbiAgICAgICAgICAgICAgICBrZXlMZW4gPSA4O1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBsZXQgcmFuZG9tS2V5ID0gVG9vbC5yYW5kb21TdHJpbmcoa2V5TGVuKTtcXG4gICAgICAgICAgICBpZiAoY29uZmlnLmtleUVuY29kZVR5cGUuZ2V0KCkgPT0gJ0hleCcpIHtcXG4gICAgICAgICAgICAgICAgbGV0IGhleCA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2hleD9ydWxlPVxcXCIgKyBvYmoucnVsZVRpdGxlKS5oZXg7XFxuICAgICAgICAgICAgICAgIG9iai5kZWNUZXh0ID0gcmFuZG9tS2V5XFxuICAgICAgICAgICAgICAgIHJhbmRvbUtleSA9IGhleC5lbmNvZGUob2JqKVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBjb25maWcua2V5LnNldChyYW5kb21LZXkpO1xcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgfSwgb2JqLCBjb25maWcpXFxuICAgIH0pO1xcblxcbiAgICBkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6ICfigJzigJzigJ3igJ08c3Ryb25nPjxmb250IGNvbG9yPVxcXCJibGFja1xcXCI+5a+G6ZKl57yW56CBPC9mb250Pjwvc3Ryb25nPicsXFxuICAgICAgICB1cmw6ICQoXFxcIiNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoKGNvbmZpZykgPT4ge1xcbiAgICAgICAgICAgIGNvbmZpZy5rZXlFbmNvZGVUeXBlLnNldChcXFwiVVRGLThcXFwiKTtcXG4gICAgICAgICAgICByZWZyZXNoUGFnZShm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KG9sZEtleUVuY29kZVR5cGUpIHtcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcIlVURi04XFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoa2V5RW5jb2RlVHlwZSA9PSBcXFwiSGV4XFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvYmouZGVjVGV4dCA9IGtleVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoa2V5Lmxlbmd0aCAhPT0gMCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnLmtleS5zZXQoaGV4LmVuY29kZShvYmopKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5rZXlFbmNvZGVUeXBlLnNldChrZXlFbmNvZGVUeXBlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJIZXhcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChrZXkubGVuZ3RoID09IDApIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnLmtleUVuY29kZVR5cGUuc2V0KGtleUVuY29kZVR5cGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdG9hc3RUZXh0ID0gJ3RvYXN0Oi8v5b2T5YmN5LiN5pSv5oyBIEhleCDovazlhbbku5bnvJbnoIHvvIzoi6XpnIDopoHph43nva7pgInpobnor7fngrnlh7tb5a+G6ZKl57yW56CBXSdcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRvYXN0VGV4dDtcXG4gICAgICAgICAgICB9LCBrZXlFbmNvZGVUeXBlLCBjb25maWcsIG9iaiksXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJzY3JvbGxfYnV0dG9uXFxcIlxcbiAgICAgICAgfSk7XFxuICAgIH1cXG5cXG4gICAgaWYgKGNvbmZpZy5tb2RlLmdldCgpICE9PSBcXFwiRUNCXFxcIikge1xcbiAgICAgICAgbGV0IGl2U2l6ZSA9IChjb25maWcudHlwZS5nZXQoKSA9PT0gXFxcIkRFU1xcXCIgfHwgY29uZmlnLnR5cGUuZ2V0KCkgPT09IFxcXCIzREVTXFxcIikgPyA2NCA6IDEyODtcXG4gICAgICAgIG9iai5pdlNpemUgPSBpdlNpemU7XFxuICAgICAgICBsZXQgaXZMZW4gPSBpdlNpemUgLyA4O1xcbiAgICAgICAgbGV0IGl2TGVuU3RyID0gaXZMZW4gKyBcXFwiIOS4quWtl+esplxcXCJcXG4gICAgICAgIGlmIChjb25maWcuaXZFbmNvZGVUeXBlLmdldCgpID09ICdIZXgnKSB7XFxuICAgICAgICAgICAgaXZMZW5TdHIgPSAoaXZMZW4gKiAyKSArIFxcXCIg5Liq5Y2B5YWt6L+b5Yi25a2X56ymXFxcIjtcXG4gICAgICAgIH1cXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IFxcXCLpmo/mnLogaXZcXFwiLFxcbiAgICAgICAgICAgIGRlc2M6IFxcXCLlgY/np7vph48gaXYsIOW/hemhuyBcXFwiICsgaXZMZW5TdHIsXFxuICAgICAgICAgICAgY29sX3R5cGU6ICdpbnB1dCcsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgLy8gdGl0bGVWaXNpYmxlOiBmYWxzZSxcXG4gICAgICAgICAgICAgICAgLypoZWlnaHQ6IC0xLFxcbiAgICAgICAgICAgICAgICB0eXBlOiBcXFwidGV4dGFyZWFcXFwiLCovXFxuICAgICAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTogY29uZmlnLml2LmdldCgpLFxcbiAgICAgICAgICAgICAgICBvbkNoYW5nZTogJC50b1N0cmluZygoY29uZmlnKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBjb25maWcuaXYuc2V0KGlucHV0KVxcbiAgICAgICAgICAgICAgICB9LCBjb25maWcpXFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICB1cmw6ICQudG9TdHJpbmcoKG9iaiwgY29uZmlnKSA9PiB7XFxuICAgICAgICAgICAgICAgIGxldCBUb29sID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvdXRpbGl5P3J1bGU9XFxcIiArIG9iai5ydWxlVGl0bGUpO1xcbiAgICAgICAgICAgICAgICBsZXQgaXZMZW4gPSBvYmouaXZTaXplIC8gODtcXG4gICAgICAgICAgICAgICAgbGV0IHJhbmRvbUl2ID0gVG9vbC5yYW5kb21TdHJpbmcoaXZMZW4pO1xcbiAgICAgICAgICAgICAgICBpZiAoY29uZmlnLml2RW5jb2RlVHlwZS5nZXQoKSA9PSAnSGV4Jykge1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGhleCA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2hleD9ydWxlPVxcXCIgKyBvYmoucnVsZVRpdGxlKS5oZXg7XFxuICAgICAgICAgICAgICAgICAgICBvYmouZGVjVGV4dCA9IHJhbmRvbUl2XFxuICAgICAgICAgICAgICAgICAgICByYW5kb21JdiA9IGhleC5lbmNvZGUob2JqKVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGNvbmZpZy5pdi5zZXQocmFuZG9tSXYpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICB9LCBvYmosIG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bmNvZGVUeXBlLCBjb25maWcsIG9iaikgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHRvYXN0VGV4dCA9IFxcXCJoaWtlcjovL2VtcHR5XFxcIjtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBoZXggPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9oZXg/cnVsZT1cXFwiICsgb2JqLnJ1bGVUaXRsZSkuaGV4O1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGl2ID0gY29uZmlnLml2LmdldCgpO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IG9sZEl2RW5jb2RlVHlwZSA9IGNvbmZpZy5pdkVuY29kZVR5cGUuZ2V0KCk7XFxuICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKG9sZEl2RW5jb2RlVHlwZSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcIlVURi04XFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGl2RW5jb2RlVHlwZSA9PSBcXFwiSGV4XFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb2JqLmRlY1RleHQgPSBpdlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGl2Lmxlbmd0aCAhPT0gMCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5pdi5zZXQoaGV4LmVuY29kZShvYmopKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5pdkVuY29kZVR5cGUuc2V0KGl2RW5jb2RlVHlwZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwiSGV4XFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGl2Lmxlbmd0aCA9PSAwKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuaXZFbmNvZGVUeXBlLnNldChpdkVuY29kZVR5cGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdG9hc3RUZXh0ID0gJ3RvYXN0Oi8v5b2T5YmN5LiN5pSv5oyBIEhleCDovazlhbbku5bnvJbnoIHvvIzoi6XpnIDopoHph43nva7pgInpobnor7fngrnlh7tb5YGP56e76YeP57yW56CBXSdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0b2FzdFRleHQ7XFxuICAgICAgICAgICAgICAgIH0sIGl2RW5jb2RlVHlwZSwgY29uZmlnLCBvYmopLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInNjcm9sbF9idXR0b25cXFwiXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuICAgIH0gZWxzZSB7XFxuICAgICAgICBjb25maWcuaXYuc2V0KFxcXCJcXFwiKTtcXG4gICAgfVxcbn1cXG4kLmV4cG9ydHMuYnVpbGRBRVNVaSA9IGJ1aWxkQUVTVWlcIn0se1wiY29sX3R5cGVcIjpcInJpY2hfdGV4dFwiLFwibmFtZVwiOlwiUlNBLVVJXCIsXCJwYXRoXCI6XCJyc2F1aVwiLFwicnVsZVwiOlwianM6XFxubGV0IG5hdmlnYXRvciA9IHt9O1xcbmxldCB3aW5kb3cgPSB7XF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ZVZpc2libGU6IGZhbHNlLFxcbiAgICAgICAgICAgICAgICBkZWZhdWx0VmFsdWU6IGdldE15VmFyKFxcXCJyc2FfcHViX29yX3ByaV9rZXlcXFwiLCBcXFwiXFxcIiksXFxuICAgICAgICAgICAgICAgIHR5cGU6IFxcXCJ0ZXh0YXJlYVxcXCIsXFxuICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiAncHV0TXlWYXIoXFxcInJzYV9wdWJfb3JfcHJpX2tleVxcXCIsaW5wdXQpJ1xcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgdXJsOiAkLnRvU3RyaW5nKChvYmopID0+IHtcXG4gICAgICAgICAgICAgICAgY2xlYXJNeVZhcihcXFwicnNhX3B1Yl9vcl9wcmlfa2V5XFxcIilcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICB9LCBvYmopXFxuICAgICAgICB9XFxuICAgICAgICAvKiwge1xcbiAgICAgICAgICAgICAgICB0aXRsZTogXFxcIueUn+aIkFxcXCIsXFxuICAgICAgICAgICAgICAgIGRlc2M6IFxcXCLor7fovpPlhaUv55Sf5oiQ56eB6ZKlXFxcIixcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICdpbnB1dCcsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAvLyB0aXRsZVZpc2libGU6IGZhbHNlLFxcbiAgICAgICAgICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiBnZXRWYXIoXFxcInJzYV9wcmlfa2V5XFxcIiwgXFxcIlxcXCIpLFxcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogXFxcInRleHRhcmVhXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiAncHV0VmFyKFxcXCJyc2FfcHJpX2tleVxcXCIsaW5wdXQpJ1xcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICB1cmw6ICQudG9TdHJpbmcoKG9iaikgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgICAgICAgICB9LCBvYmopXFxuICAgICAgICAgICAgfSovXFxuICAgIClcXG5cXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiBcXFwi5riF56m6XFxcIixcXG4gICAgICAgIGRlc2M6IFxcXCLor7fovpPlhaXpnIDopoHliqDlr4bmiJbop6Plr4bnmoTlhoXlrrlcXFwiLFxcbiAgICAgICAgY29sX3R5cGU6ICdpbnB1dCcsXFxuICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgIC8vIHRpdGxlVmlzaWJsZTogZmFsc2UsXFxuICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiBnZXRNeVZhcihcXFwicnNhX2hhbmRsZV90ZXh0XFxcIiwgXFxcIlxcXCIpLFxcbiAgICAgICAgICAgIHR5cGU6IFxcXCJ0ZXh0YXJlYVxcXCIsXFxuICAgICAgICAgICAgb25DaGFuZ2U6ICdwdXRNeVZhcihcXFwicnNhX2hhbmRsZV90ZXh0XFxcIixpbnB1dCknXFxuICAgICAgICB9LFxcbiAgICAgICAgdXJsOiAkLnRvU3RyaW5nKChvYmopID0+IHtcXG4gICAgICAgICAgICBjbGVhck15VmFyKFxcXCJyc2FfaGFuZGxlX3RleHRcXFwiKVxcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgIH0sIG9iailcXG4gICAgfSlcXG4gICAgb2JqLm1vZGVzID0gW1xcXCLmraPluLjmqKHlvI9cXFwiLCBcXFwi5Y+Y5oCB5qih5byPXFxcIl1cXG4gICAgb2JqLmNob2ljZXMgPSBbXFxcIuaYr1xcXCI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c1xcbiAgICAgICAgICAgICAgICBsZXQgY2hvaWNlcyA9IG9iai5jaG9pY2VzXFxuICAgICAgICAgICAgICAgIGxldCB0eXBlID0gaXNOb3JtYWxNb2RlKG9iaiwgbW9kZXNbMF0pID8gMSA6IDJcXG4gICAgICAgICAgICAgICAgbGV0IGxvbmdTdGF0ID0gaXNMb25nKG9iaiwgY2hvaWNlc1swXSkgPyAyIDogMVxcbiAgICAgICAgICAgICAgICBsZXQgb3B0aW9ucyA9IHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbmZpZzogXFxcIlJTQS9FQ0IvUEtDUzFQYWRkaW5nXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIHR5cGU6IHR5cGUsXFxuICAgICAgICAgICAgICAgICAgICBsb25nOiBsb25nU3RhdCxcXG4gICAgICAgICAgICAgICAgICAgIGJsb2NrOiB0cnVlXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcmVzdWx0ID0gcnNhRW5jcnlwdChoYW5kbGVUZXh0LCBrZXksIG9wdGlvbnMpXFxuICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAvL2xvZyhlLm1lc3NhZ2UpXFxuICAgICAgICAgICAgICAgIHJlc3VsdCA9IGUubWVzc2FnZVxcbiAgICAgICAgICAgICAgICB0b2FzdFRleHQgPSBcXFwi5Yqg5a+G5aSx6LSlXFxcIlxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBwdXRNeVZhcihcXFwicnNhX3Jlc3VsdF90ZXh0XFxcIiwgcmVzdWx0KTtcXG4gICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xcbiAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly9cXFwiICsgdG9hc3RUZXh0XFxuICAgICAgICB9LCBvYmosIGlzTm9ybWFsTW9kZSwgaXNMb25nKVxcbiAgICB9LCB7XFxuICAgICAgICB0aXRsZTogKGlzTm9ybWFsTW9kZShvYmosIG9iai5tb2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ZSA9IGlzTm9ybWFsTW9kZShvYmosIG1vZGVzWzBdKSA/IDEgOiAyXFxuICAgICAgICAgICAgICAgIGxldCBsb25nU3RhdCA9IGlzTG9uZyhvYmosIGNob2ljZXNbMF0pID8gMiA6IDFcXG4gICAgICAgICAgICAgICAgbGV0IG9wdGlvbnMgPSB7XFxuICAgICAgICAgICAgICAgICAgICBjb25maWc6IFxcXCJSU0EvRUNCL1BLQ1MxUGFkZGluZ1xcXCIsXFxuICAgICAgICAgICAgICAgICAgICB0eXBlOiB0eXBlLFxcbiAgICAgICAgICAgICAgICAgICAgbG9uZzogbG9uZ1N0YXQsXFxuICAgICAgICAgICAgICAgICAgICBibG9jazogdHJ1ZVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHJlc3VsdCA9IHJzYURlY3J5cHQoaGFuZGxlVGV4dCwga2V5LCBvcHRpb25zKVxcbiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgcmVzdWx0ID0gZS5tZXNzYWdlXFxuICAgICAgICAgICAgICAgIHRvYXN0VGV4dCA9IFxcXCLop6Plr4blpLHotKVcXFwiXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHB1dE15VmFyKFxcXCJyc2FfcmVzdWx0X3RleHRcXFwiLCByZXN1bHQpXFxuICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxcbiAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly9cXFwiICsgdG9hc3RUZXh0XFxuICAgICAgICB9LCBvYmosIGlzTm9ybWFsTW9kZSwgaXNMb25nKVxcbiAgICB9LCB7XFxuICAgICAgICB0aXRsZTogXFxcIuWkjeWItlxcXCIsXFxuICAgICAgICBkZXNjOiBcXFwi5Yqg5a+G5oiW6Kej5a+G55qE5YaF5a655bCG5pi+56S65Zyo5q2kXFxcIixcXG4gICAgICAgIGNvbF90eXBlOiAnaW5wdXQnLFxcbiAgICAgICAgZXh0cmE6IHtcXG4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lYVxcXCIsXFxuICAgICAgICAgICAgb25DaGFuZ2U6ICdwdXRWYXIoXFxcImhhc2hfdGV4dFxcXCIsaW5wdXQpJ1xcbiAgICAgICAgfSxcXG4gICAgICAgIHVybDogJC50b1N0cmluZygob2JqKSA9PiB7XFxuICAgICAgICAgICAgLy8gb2JqLmRlY1RleHQgPSBpbnB1dDtcXG4gICAgICAgICAgICAvLyBsb2coXFxcIm9iai5kZWNUZXh0OiBcXFwiICsgb2JqLmRlY1RleHQpXFxuICAgICAgICAgICAgbGV0IHRvYXN0VGV4dCA9IFxcXCLliqDlr4bmiJDlip9cXFwiO1xcbiAgICAgICAgICAgIGxldCBoYXNoX3Jlc3VsdCA9IFxcXCJcXFwiO1xcbiAgICAgICAgICAgIGxldCB0b29sID0ge307XFxuICAgICAgICAgICAgbGV0IHRvb2xTZWxlY3RzID0gb2JqLnR5cGUuc3BsaXQoXFxcIkBAXFxcIik7XFxuICAgICAgICAgICAgbGV0IHRvb2xTZWxlY3QgPSB0b29sU2VsZWN0c1t0b29sU2VsZWN0cy5sZW5ndGggLSAxXTtcXG4gICAgICAgICAgICBsZXQgSGFzaEFsZ29yaXRobSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2hhc2hhbGdvcml0aG0/cnVsZT1cXFwiICsgb2JqLnJ1bGVUaXRsZSk7XFxuICAgICAgICAgICAgSGFzaEFsZ29yaXRobS5jb25maWcudHlwZS5zZXQodG9vbFNlbGVjdClcXG4gICAgICAgICAgICB0b29sID0gSGFzaEFsZ29yaXRobTtcXG4gICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICBoYXNoX3Jlc3VsdCA9IHRvb2wuaGFzaCgpO1xcbiAgICAgICAgICAgICAgICAvLyBsb2coXFxcImhhc2hfcmVzdWx0OiBcXFwiICsgaGFzaF9yZXN1bHQpXFxuICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICBoYXNoX3Jlc3VsdCA9IGUubWV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ZSArIFxcXCLigJnigJlcXFwiIDoga2V5U2l6ZSxcXG4gICAgICAgICAgICB1cmw6ICQoXFxcIiNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoKGtleVNpemUsIGNvbmZpZykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgY29uZmlnLmtleVNpemUuc2V0KGtleVNpemUpXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgfSwga2V5U2l6ZSwgY29uZmlnKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcInNjcm9sbF9idXR0b25cXFwiXFxuICAgICAgICB9KTtcXG4gICAgfVxcbiAgICBkLnB1c2goe1xcbiAgICAgICAgY29sX3R5cGU6IFxcXCJibGFua19ibG9ja1xcXCJcXG4gICAgfSlcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiBcXFwi6ZqP5py6IHNhbHRcXFwiLFxcbiAgICAgICAgZGVzYzogXFxcIuebkCBzYWx077yM5bu66K6u6Iez5bCR5Li6IDgg5a2X6IqC77yM5LiU6KaB5Li66ZqP5py65pWw44CCXFxcIixcXG4gICAgICAgIGNvbF90eXBlOiAnaW5wdXQnLFxcbiAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICB0aXRsZVZpc2libGU6IGZhbHNlLFxcbiAgICAgICAgICAgIGhlaWdodDogLTEsXFxuICAgICAgICAgICAgdHlwZTogXFxcInRleHRhcmVhXFxcIixcXG4gICAgICAgICAgICBkZWZhdWx0VmFsdWU6IGNvbmZpZy5zYWx0LmdldCgpLFxcbiAgICAgICAgICAgIG9uQ2hhbmdlOiAkLnRvU3RyaW5nKChjb25maWcpID0+IHtcXG4gICAgICAgICAgICAgICAgY29uZmlnLnNhbHQuc2V0KGlucHV0KVxcbiAgICAgICAgICAgIH0sIGNvbmZpZylcXG4g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RWYXIodGhpcy5rZXksIFxcXCJNRDVcXFwiKTtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgIHNldDogZnVuY3Rpb24gKG5ld1ZhbHVlKSB7XFxuICAgICAgICAgICAgICAgIHB1dFZhcih0aGlzLmtleSwgbmV3VmFsdWUpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sXFxuICAgICAgICBrZXk6IHtcXG4gICAgICAgICAgICBrZXk6IFxcXCJoYXNoX2htYWNfa2V5XFxcIixcXG4gICAgICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIGdldFZhcih0aGlzLmtleSwgXFxcIlxcXCIpO1xcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgc2V0OiBmdW5jdGlvbiAobmV3VmFsdWUpIHtcXG4gICAgICAgICAgICAgICAgcHV0VmFyKHRoaXMua2V5LCBuZXdWYWx1ZSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSxcXG5cXHRcXHR0ZXh0OiB7XFxuXFx0XFx0XFx0a2V5OiBcXFwiaGFzaF90ZXh0XFxcIixcXG4gICAgICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIGdldFZhcih0aGlzLmtleSwgXFxcIlxcXCIpO1xcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgc2V0OiBmdW5jdGlvbiAobmV3VmFsdWUpIHtcXG4gICAgICAgICAgICAgICAgcHV0VmFyKHRoaXMua2V5LCBuZXdWYWx1ZSk7XFxuICAgICAgICAgICAgfVxcblxcdFxcdH0sXFxuXFx0XFx0cmVzdWx0VGV4dDoge1xcblxcdFxcdFxcdGtleTogXFxcImhhc2hfcmVzdWx0X3RleHRcXFwiLFxcbiAgICAgICAgICAgIGdldDogZnVuY3Rpb24gKCkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gZ2V0VmFyKHRoaXMua2V5LCBcXFwiXFxcIik7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICBzZXQ6IGZ1bmN0aW9uIChuZXdWYWx1ZSkge1xcbiAgICAgICAgICAgICAgICBwdXRWYXIodGhpcy5rZXksIG5ld1ZhbHVlKTtcXG4gICAgICAgICAgICB9XFxuXFx0XFx0fSxcXG4gICAgICAgIGtleVNpemU6IHtcXG4gICAgICAgICAgICBrZXk6IFxcXCJoYXNoX2tleV9zaXplXFxcIixcXG4gICAgICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIGdldFZhcih0aGlzLmtleSwgXFxcIjEyOOS9jVxcXCIpO1xcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgc2V0OiBmdW5jdGlvbiAobmV3VmFsdWUpIHtcXG4gICAgICAgICAgICAgICAgcHV0VmFyKHRoaXMua2V5LCBuZXdWYWx1ZSk7XFxuICAgICAgICAgICAgfVxcblxcbiAgICAgICAgfSxcXG4gICAgICAgIHNhbHQ6IHtcXG4gICAgICAgICAgICBrZXk6IFxcXCJoYXNoX3NhbHRcXFwiLFxcbiAgICAgICAgICAgIGdldDogZnVuY3Rpb24gKCkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gZ2V0VmFyKHRoaXMua2V5LCBcXFwiXFxcIik7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICBzZXQ6IGZ1bmN0aW9uIChuZXdWYWx1ZSkge1xcbiAgICAgICAgICAgICAgICBwdXRWYXIodGhpcy5rZXksIG5ld1ZhbHVlKTtcXG4gICAgICAgICAgICB9XFxuXFxuICAgICAgICB9LFxcbiAgICAgICAgaXRlcmF0aW9uczoge1xcbiAgICAgICAgICAgIGtleTogXFxcImhhc2hfaXRlcmF0aW9uc1xcXCIsXFxuICAgICAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBnZXRWYXIodGhpcy5rZXksIFxcXCJcXFwiKTtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgIHNldDogZnVuY3Rpb24gKG5ld1ZhbHVlKSB7XFxuICAgICAgICAgICAgICAgIHB1dFZhcih0aGlzLmtleSwgbmV3VmFsdWUpO1xcbiAgICAgICAgICAgIH1cXG5cXG4gICAgICAgIH0sXFxuXFx0fSxcXG4gICAgb25DbG9zZTogZnVuY3Rpb24oKSB7XFxuICAgICAgICBsZXQgY29uZmlnS2V5cyA9IE9iamVjdC5rZXlzKHRoaXMuY29uZmlnKTtcXG4gICAgICAgIGZvcihsZXQgY29uZktleSBvZiBjb25maWdLZXlzKSB7XFxuICAgICAgICAgICAgbGV0IGtleSA9IHRoaXMuY29uZmlnW2NvbmZLZXldLmtleTtcXG4gICAgICAgICAgICBjbGVhclZhcihrZXkpO1xcbiAgICAgICAgfVxcbiAgICB9LFxcblxcdGhhc2g6IGZ1bmN0aW9uICgpIHtcXG5cXHRcXHRsZXQgdGV4dCA9IHRoaXMuY29uZmlnLnRleHQuZ2V0KCk7XFxuXFx0XFx0bGV0IHR5cGUgPSB0aGlzLmNvbmZpZy50eXBlLmdldCgpO1xcblxcdFxcdGxldCBoYXNoID0ge307XFxuXFx0XFx0aWYgKHRleHQpIHtcXG4gICAgICAgICAgICBpZiAodHlwZS5pbmNsdWRlcyhcXFwiSE1BQ1xcXCIpKSB7XFxuICAgICAgICAgICAgICAgIC8vIEhNQUMteHh4XFxuICAgICAgICAgICAgICAgIGxldCBrZXkgPSB0aGlzLmNvbmZpZy5rZXkuZ2V0KCk7XFxuICAgICAgICAgICAgICAgIGhhc2ggPSB0aGlzLk1hcHBpbmcuaGFzaFR5cGVbdHlwZV0odGV4dCwga2V5KVxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZS5pbmNsdWRlcyhcXFwiUEJLREYyXFxcIikpIHtcXG4gICAgICAgICAgICAgICAgLy8gUEJLREYyXFxuICAgICAgICAgICAgICAgIGxldCBrZXlTaXplID0gdGhpcy5NYXBw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AgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogJ+KAnOKAnOKAneKAnTxiPumAiemhuTwvYj4nLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9lbXB0eScsXFxuICAgICAgICB9KVxcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogJ+eCueaIkeWMluS4uuaWsOeql+WPoycsXFxuICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICB1cmw6ICdoaWtlcjovL3BhZ2UvaG9tZSNnYW1lVGhlbWUjJyxcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBuZXdXaW5kb3c6IHRydWUsXFxuICAgICAgICAgICAgICAgIC8vIGxpbmVWaXNpYmxlOiBmYWxzZVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pXFxuICAgIH1cXG59IGNhdGNoIChlKSB7XFxuICAgIGxvZyhlLm1lc3NhZ2UpXFxufVxcblxcbi8qKlxcbiAqIDIuIOWcqCB0b29scyDliqDlhaXplK7lgLzlr7nvvIznlKjkuo7mmKDlsITnrpfms5XvvIzmoLzlvI/kuLog5YiG57G75Lit55qE5pu/5o2i5YC877yI5Y2zIGZ5QWxsIOeahOWAvO+8iTog5byV5YWl55qE566X5rOV5L6d6LWW55qE5a+56LGh5ZCNXFxuICovXFxudmFyIG9iaiA9IHtcXG4gICAgcnVsZVRpdGxlOiBydWxlVGl0bGUsXFxuICAgIHR5cGU6IHR5cGUsXFxuICAgIHRvb2xzOiB7XFxuICAgICAgICBcXFwi5L2b5puwXFxcIjogYnVkZGhhLFxcbiAgICAgICAgXFxcIuaWsOS9m+absFxcXCI6IG5ld0J1ZGRoYSxcXG4gICAgICAgIFxcXCLnhormm7BcXFwiOiBiZWFyLFxcbiAgICAgICAgXFxcIuWFvemfs1x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6Kej5re35reGXFxcIixcXG4gICAgICAgIGRlc2M6IFxcXCLor7fovpPlhaUgamlhbWkuY29tLnY2IOeahOWvhuaWh1xcXCIsXFxuICAgICAgICBjb2xfdHlwZTogJ2lucHV0JyxcXG4gICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgLy8gdGl0bGVWaXNpYmxlOiBmYWxzZSxcXG4gICAgICAgICAgICBkZWZhdWx0VmFsdWU6IGdldE15VmFyKFxcXCJvdGhlci5lbmNvZGUudGV4dFxcXCIsIFxcXCJcXFwiKSxcXG4gICAgICAgICAgICB0eXBlOiBcXFwidGV4dGFyZWFcXFwiLFxcbiAgICAgICAgICAgIG9uQ2hhbmdlOiAncHV0TXlWYXIoXFxcIm90aGVyLmVuY29kZS50ZXh0XFxcIiwgaW5wdXQpJ1xcbiAgICAgICAgfSxcXG4gICAgICAgIHVybDogJC50b1N0cmluZygob2JqKSA9PiB7XFxuICAgICAgICAgICAgLy8gb2JqLmRlY1RleHQgPSBpbnB1dDtcXG4gICAgICAgICAgICAvLyBsb2coXFxcIm9iai5kZWNUZXh0OiBcXFwiICsgb2JqLmRlY1RleHQpXFxuICAgICAgICAgICAgaWYgKGlucHV0ID09PSAnJykgcmV0dXJuICd0b2FzdDovL+i+k+WFpeS4uuepuu+8jOivt+ajgOafpSEnXFxuICAgICAgICAgICAgbGV0IHRvYXN0VGV4dCA9IFxcXCLop6Pmt7fmt4bmiJDlip9cXFwiO1xcbiAgICAgICAgICAgIGxldCBkZWNfcmVzdWx0ID0gXFxcIlxcXCI7XFxuICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgbGV0IGNvZGUgPSAoL15odHRwKHMqKTpcXFxcL1xcXFwvLy50ZXN0KGlucHV0LnRyaW0oKSkpID8gcmVxdWVzdChpbnB1dCkgOiBpbnB1dDtcXG4gICAgICAgICAgICAgICAgZGVjX3Jlc3VsdCA9IGZldGNoKGJhc2U2NERlY29kZShcXFwiYUhSMGNITTZMeTluWVhSellua3RibWx1WlMxaWJIVnphQzUyWlhKalpXd3VZWEJ3TDJGd2FTOTJOZz09XFxcIiksIHtcXG4gICAgICAgICAgICAgICAgICAgIGJvZHk6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2RlOiBjb2RlXFxuICAgICAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgLy8gbG9nKFxcXCJoYXNoX3Jlc3VsdDogXFxcIiArIGhhc2hfcmVzdWx0KVxcbiAgICAgICAgICAgICAgICBpZiAoY29kZSA9PT0gJycpIHRvYXN0VGV4dCA9IFxcXCLop6Pmt7fmt4blpLHotKVcXFwiO1xcbiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgZGVjX3Jlc3VsdCA9IGUubWVzc2FnZTtcXG4gICAgICAgICAgICAgICAgdG9hc3RUZXh0ID0gXFxcIuino+a3t+a3huWksei0pVxcXCI7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHB1dE15VmFyKFxcXCJvdGhlci5kZWNvZGUudGV4dFxcXCIsIGRlY19yZXN1bHQpXFxuICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcXG4gICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8vJyArIHRvYXN0VGV4dDtcXG4gICAgICAgIH0sIG9iaiksXFxuICAgIH0pO1xcbiAgICBkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6IFxcXCLku6PnoIHmn6XnnItcXFwiLFxcbiAgICAgICAgZGVzYzogXFxcIue7k+aenOi+k+WHulxcXCIsXFxuICAgICAgICBjb2xfdHlwZTogJ2lucHV0JyxcXG4gICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgLy8gdGl0bGVWaXNpYmxlOiBmYWxzZSxcXG4gICAgICAgICAgICBkZWZhdWx0VmFsdWU6IGdldE15VmFyKFxcXCJvdGhlci5kZWNvZGUudGV4dFxcXCIsIFxcXCJcXFwiKSxcXG4gICAgICAgICAgICB0eXBlOiBcXFwidGV4dGFyZWFcXFwiLFxcbiAgICAgICAgICAgIG9uQ2hhbmdlOiAncHV0TXlWYXIoXFxcIm90aGVyLmRlY29kZS50ZXh0XFxcIiwgaW5wdXQpJ1xcbiAgICAgICAgfSxcXG4gICAgICAgIHVybDogJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgLy8gb2JqLmVuY1RleHQgPSBpbnB1dDtcXG4gICAgICAgICAgICAvLyBsb2coXFxcIm9iai5lbmNUZXh0OiBcXFwiICsgb2JqLmVuY1RleHQpXFxuICAgICAgICAgICAgaWYgKGlucHV0KSB7XFxuICAgICAgICAgICAgICAgIGxldCBjYWNoZVBhdGggPSAnaGlrZXI6Ly9maWxlcy9jYWNoZS9DcnlwdG9Ub29sLmNhY2hlJztcXG4gICAgICAgICAgICAgICAgd3JpdGVGaWxlKGNhY2hlUGF0aCwgaW5wdXQpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2VkaXRGaWxlOi8vJyArIGNhY2hlUGF0aDtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5YaF5a655Li656m677yBXFxcIlxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pLFxcbiAgICB9KTtcXG59XFxuXFxuZnVuY3Rpb24gYnVpbGRQcml2YXRlSnNVaShkLCBvYmopIHtcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiBcXFwi5Yqg5a+GXFxcIixcXG4gICAgICAgIGRlc2M6IFxcXCLor7fovpPlhaXku6PnoIHmmI7mlodcXFwiLFxcbiAgICAgICAgY29sX3R5cGU6ICdpbnB1dCcsXFxuICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgIC8vIHRpdGxlVmlzaWJsZTogZmFsc2UsXFxuICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiBnZXRNeVZhcihcXFwib3RoZXIuZW5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