xiaomianao666

小程序:某聚合

Dec 1st, 2024
800
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@某聚合@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi5p+Q6IGa5ZCIIiwiYXV0aG9yIjoiTMOtbiIsInVybCI6Imhpa2VyOi8vZW1wdHkiLCJ2ZXJzaW9uIjo1LCJjb2xfdHlwZSI6Im1vdmllXzMiLCJjbGFzc19uYW1lIjoiIiwidHlwZSI6ImFsbCIsImNsYXNzX3VybCI6IiIsImFyZWFfbmFtZSI6IiIsImFyZWFfdXJsIjoiIiwic29ydF9uYW1lIjoiIiwieWVhcl9uYW1lIjoiIiwic29ydF91cmwiOiIiLCJ5ZWFyX3VybCI6IiIsImZpbmRfcnVsZSI6ImpzOlxuaWYgKCFnZXRJdGVtKFwiOmZpcnN0VXNlXCIsIGZhbHNlKSkge1xuICAgIGNvbmZpcm0oe1xuICAgICAgICB0aXRsZTogXCLmj5DphpJcIixcbiAgICAgICAgY29udGVudDogXCLov5nmmK/kuIDkuKrmnoHluqbljbHpmannmoTpm4blkIjvvIzkuI3opoHkubHliIbkuqvvvIzkuI3opoHkubHliIbkuqvvvIzkuI3opoHkubHliIbkuqvvvIHvvIHvvIFcIixcbiAgICAgICAgY29uZmlybTogXCJzZXRJdGVtKCc6Zmlyc3RVc2UnLCAnMScpO3JlZnJlc2hQYWdlKClcIixcbiAgICAgICAgY2FuY2VsOiBcIid0b2FzdDovL+W+iOmBl+aGvu+8jOS4jeiDveS4uuaCqOacjeWKoeOAglxcXFxu6ZW/5oyJ5qCH6aKY5Y+v5Yig6Zmk44CCJ1wiXG4gICAgfSk7XG4gICAgc2V0UmVzdWx0KFtdKTtcbn1lbHNlIGlmIChNWV9SVUxFLnRpdGxlICE9PSBcIuafkOiBmuWQiFwiKSB7XG4gICAgY29uZmlybSh7XG4gICAgICAgIHRpdGxlOiBcIuitp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gICAgICAgICAgICBbXFxcIumtlOazleWwkeWls1xcXCIsIFxcXCLprZTms5XlsJHlpbNcXFwiXSxcXG4gICAgICAgICAgICBbXFxcIueVsOeoruaXj1xcXCIsIFxcXCLnlbDnqK7ml49cXFwiXSxcXG4gICAgICAgICAgICBbXFxcIuWmlueyvlxcXCIsIFxcXCLlppbnsr5cXFwiXSxcXG4gICAgICAgICAgICBbXFxcIumtlOeJqeWomFxcXCIsIFxcXCLprZTnianlqJhcXFwiXSxcXG4gICAgICAgICAgICBbXFxcIueNuOWomFxcXCIsIFxcXCLnjbjlqJhcXFwiXSxcXG4gICAgICAgICAgICBbXFxcIueip+axoFxcXCIsIFxcXCLnoqfmsaBcXFwiXSxcXG4gICAgICAgICAgICBbXFxcIueXtOWls1xcXCIsIFxcXCLnl7TlpbNcXFwiXSxcXG4gICAgICAgICAgICBbXFxcIuS4jeiJr+WwkeWls1xcXCIsIFxcXCLkuI3oia/lsJHlpbNcXFwiXSxcXG4gICAgICAgICAgICBbXFxcIuWCsuWsjFxcXCIsIFxcXCLlgrLlrIxcXFwiXSxcXG4gICAgICAgICAgICBbXFxcIueXheWsjFxcXCIsIFxcXCLnl4XlrIxcXFwiXSxcXG4gICAgICAgICAgICBbXFxcIueEoeWPo1xcXCIsIFxcXCLnhKHlj6NcXFwiXSxcXG4gICAgICAgICAgICBbXFxcIuWBveWomFxcXCIsIFxcXCLlgb3lqJhcXFwiXSxcXG4gICAgICAgICAgICBbXFxcIuaJtuS7llxcXCIsIFxcXCLmibbku5ZcXFwiXSxcXG4gICAgICAgICAgICBbXFxcIuefremrrlxcXCIsIFxcXCLnn63pq65cXFwiXSxcXG4gICAgICAgICAgICBbXFxcIummrOWwvlxcXCIsIFxcXCLppqzlsL5cXFwiXSxcXG4gICAgICAgICAgICBbXFxcIumbmemmrOWwvlxcXCIsIFxcXCLpm5nppqzlsL5cXFwiXSxcXG4gICAgICAgICAgICBbXFxcIuW3qOS5s1xcXCIsIFxcXCLlt6jkubNcXFwiXSxcXG4gICAgICAgICAgICBbXFxcIuiyp+S5s1xcXCIsIFxcXCLosqfkubNcXFwiXSxcXG4gICAgICAgICAgICBbXFxcIum7keearuiGmlxcXCIsIFxcXCLpu5Hnmq7ohppcXFwiXSxcXG4gICAgICAgICAgICBbXFxcIuecvOmPoeWomFxcXCIsIFxcXCLnnLzpj6HlqJhcXFwiXSxcXG4gICAgICAgICAgICBbXFxcIueNuOiAs1xcXCIsIFxcXCLnjbjogLNcXFwiXSxcXG4gICAgICAgICAgICBbXFxcIue+juS6uueXo1xcXCIsIFxcXCLnvo7kurrnl6NcXFwiXSxcXG4gICAgICAgICAgICBbXFxcIuiCjOiCieWls1xcXCIsIFxcXCLogozogonlpbNcXFwiXSxcXG4gICAgICAgICAgICBbXFxcIueZveiZjlxcXCIsIFxcXCLnmb3omY5cXFwiXSxcXG4gICAgICAgICAgICBbXFxcIuWkp+WxjFxcXCIsIFxcXCLlpKflsYxcXFwiXSxcXG4gICAgICAgICAgICBbXFxcIuawtOaJi+acjVxcXCIsIFxcXCLmsLTmiYvmnI1cXFwiXSxcXG4gICAgICAgICAgICBbXFxcIumrlOaTjeacjVxcXCIsIFxcXCLpq5Tmk43mnI1cXFwiXSxcXG4gICAgICAgICAgICBbXFxcIuazs+ijnVxcXCIsIFxcXCLms7Poo51cXFwiXSxcXG4gICAgICAgICAgICBbXFxcIuavlOWfuuWwvFxcXCIsIFxcXCLmr5Tln7rlsLxcXFwiXSxcXG4gICAgICAgICAgICBbXFxcIuWSjOacjVxcXCIsIFxcXCLlkozmnI1cXFwiXSxcXG4gICAgICAgICAgICBbXFxcIuWFlOWls+mDjlxcXCIsIFxcXCLlhZTlpbPpg45cXFwiXSxcXG4gICAgICAgICAgICBbXFxcIuWcjeijmVxcXCIsIFxcXCLlnI3oo5lcXFwiXSxcXG4gICAgICAgICAgICBbXFxcIuWVpuWVpumailxcXCIsIFxcXCLllabllabpmopcXFwiXSxcXG4gICAgICAgICAgICBbXFxcIuaXl+iijVxcXCIsIFxcXCLml5fooo1cXFwiXSxcXG4gICAgICAgICAgICBbXFxcIue1suilqlxcXCIsIFxcXCLntbLopapcXFwiXSxcXG4gICAgICAgICAgICBbXFxcIuWQiuilquW4tlxcXCIsIFxcXCLlkIroparluLZcXFwiXSxcXG4gICAgICAgICAgICBbXFxcIueGseikslxcXCIsIFxcXCLnhrHopLJcXFwiXSxcXG4gICAgICAgICAgICBbXFxcIui/t+S9oOijmVxcXCIsIFxcXCLov7fkvaDoo5lcXFwiXSxcXG4gICAgICAgICAgICBbXFxcIuaAp+aEn+WFp+iho1xcXCIsIFxcXCLmgKfmhJ/lhafooaNcXFwiXSxcXG4gICAgICAgICAgICBbXFxcIuS4geWtl+ikslxcXCIsIFxcXCLkuIHlrZfopLJcXFwiXSxcXG4gICAgICAgICAgICBbXFxcIumrmOi3n+mei1xcXCIsIFxcXCLpq5jot5/pnotcXFwiXSxcXG4gICAgICAgICAgICBbXFxcIua3q+e0i1xcXCIsIFxcXCLmt6vntItcXFwiXSxcXG4gICAgICAgICAgICBbXFxcIue0lOaEm1xcXCIsIFxcXCLntJTmhJtcXFwiXSxcXG4gICAgICAgICAgICBbXFxcIuaIgOaEm+WWnOWKh1xcXCIsIFxcXCLmiIDmhJvllpzliodcXFwiXSxcXG4gICAgICAgICAgICBbXFxcIuW+jOWurlxcXCIsIFxcXCLlvozlrq5cXFwiXSxcXG4gICAgICAgICAgICBbXFxcIumWi+Wkp+i7ilxcXCIsIFxcXCLplovlpKfou4pcXFwiXSxcXG4gICAgICAgICAgICBbXFxcIuWFrOecvuWgtOWQiFxcXCIsIFxcXCLlhaznnL7loLTlkIhcXFwiXSxcXG4gICAgICAgICAgICBbXFxcIk5UUlxcXCIsIFxcXCJOVFJcXFwiXSxcXG4gICAgICAgICAgICBbXFxcIueyvuelnuaOp+WItlxcXCIsIFxcXCLnsr7npZ7mjqfliLZcXFwiXSxcXG4gICAgICAgICAgICBbXFxcIuiXpeeJqVxcXCIsIFxcXCLol6XnialcXFw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FtdO1xcbiAgICAgICAgICAgIHZhciB0aXRsZXMgPSBbXTtcXG4gICAgICAgICAgICB2YXIgbGlzdCA9IHBkZmEoaHRtbCwgJ2JvZHkmJi5yb3csMyYmYScpO1xcbiAgICAgICAgICAgIGZvciAodmFyIGogaW4gbGlzdCkge1xcbiAgICAgICAgICAgICAgICB2aWRlb3MucHVzaCgnXFxcIicgKyBwZGZoKGxpc3Rbal0sICdhJiZocmVmJykgKyAnXFxcIicpXFxuICAgICAgICAgICAgICAgIHRpdGxlcy5wdXNoKCdcXFwiJyArIHBkZmgobGlzdFtqXSwgJ2EmJlRleHQnKS5yZXBsYWNlKFxcXCJNUDQgXFxcIiwgXFxcIlxcXCIpICsgJ1xcXCInKVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gXFxcInt1cmxzOltcXFwiICsgdmlkZW9zICsgXFxcIl0sbmFtZXM6W1xcXCIgKyB0aXRsZXMgKyBcXFwiXX1cXFwiXFxuICAgICAgICB9KVxcbiAgICB9XFxuICAgIHZhciBsaXN0ID0gcGFyc2VEb21Gb3JBcnJheShodG1sLCAnLnRodW1icyYmLml0ZW0nKTtcXG4gICAgZm9yICh2YXIgaiBpbiBsaXN0KSB7XFxuICAgICAgICB2YXIgbGogPSBwZGZoKGxpc3Rbal0sICdhJiZocmVmJyk7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiBwYXJzZURvbUZvckh0bWwobGlzdFtqXSwgJy50aHVtYl90aXRsZSYmVGV4dCcpLFxcbiAgICAgICAgICAgIHBpY191cmw6IHBhcnNlRG9tKGxpc3Rbal0sICdpbWcmJmRhdGEtb3JpZ2luYWwnKSxcXG4gICAgICAgICAgICB1cmw6IHBsYXllcihsaiksXFxuICAgICAgICAgICAgZGVzYzogcGRmaChsaXN0W2pdLCAnLmFkZGVkJiZUZXh0JyksXFxuICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8yJyxcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBsb25nQ2xpY2s6IFt7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+WIt+aWsCcsXFxuICAgICAgICAgICAgICAgICAgICBqczogJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfojrflj5bmoIfnrb4nLFxcbiAgICAgICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKHUpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCh1KS5sYXp5UnVsZSgoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBodG1sID0gZmV0Y2goaW5wdXQpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBBcnRpc3QgPSBwZGZoKGh0bWwsICdib2R5JiYucm93LDImJi5uYW1lJiZUZXh0JykucmVwbGFjZSgvIC9nLCBcXFwiLVxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdGFnID0gW0FydGlzdF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBsaXN0ID0gcGRmYShodG1sLCAnYm9keSYmLnJvdyw0LS1hLC0xJiZhJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGogaW4gbGlzdCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFnLnB1c2gocGRmaChsaXN0W2pdLCAnYSYmVGV4dCcpLnJlcGxhY2UoLyAvZywgXFxcIi1cXFwiKSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICA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ICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBsb25nQ2xpY2s6IFt7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+WIt+aWsCcsXFxuICAgICAgICAgICAgICAgICAgICBqczogJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfojrflj5bmoIfnrb4nLFxcbiAgICAgICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKGltZykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKGltZykubGF6eVJ1bGUoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgaHRtbCA9IGZldGNoKGlucHV0KVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdGFnID0gW107XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBsaXN0ID0gcGRmYShodG1sLCAnI3RhZy1zaWRlYmFyJiZsaScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBqIGluIGxpc3QpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhZy5wdXNoKHBkZmgobGlzdFtqXSwgJ2EsMSYmVGV4dCcpLnJlcGxhY2UoLyAvZywgXFxcIl9cXFwiKSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCh0YWcubWFwKHYgPT4gdikpLnNlbGVjdCgobmFtZSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWt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tcXG4gICAgICAgICAgICB2YXIgbGlzdCA9IHBkZmEoaHRtbCwgJ2JvZHkmJnNjcmlwdCcpO1xcbiAgICAgICAgICAgIGZvciAodmFyIGogaW4gbGlzdCkge1xcbiAgICAgICAgICAgICAgICB2YXIgdmlkZW8xID0gcGRmaChsaXN0W2pdLCAnc2NyaXB0JiZIdG1sJyk7XFxuICAgICAgICAgICAgICAgIGlmICh2aWRlbzEuaW5jbHVkZXMoJ2hsc1VybCcpKSB7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgdmlkZW8gPSB2aWRlbzEubWF0Y2goL2hsc1VybCA9ICcoLiopXFxcXCc7LylbMV07XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdmlkZW87XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KVxcbiAgICB9XFxuICAgIHZhciBsaXN0ID0gcGFyc2VEb21Gb3JBcnJheShodG1sLCAnLnBiLWUtbGctNDAmJi5jb2wtc20tNCcpO1xcbiAgICBmb3IgKHZhciBqIGluIGxpc3QpIHtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IHBhcnNlRG9tRm9ySHRtbChsaXN0W2pdLCAnaDYmJlRleHQnKSxcXG4gICAgICAgICAgICBwaWNfdXJsOiBwYXJzZURvbShsaXN0W2pdLCAnaW1nJiZkYXRhLXNyYycpLFxcbiAgICAgICAgICAgIHVybDogcGxheWVyKHBhcnNlRG9tRm9ySHRtbChsaXN0W2pdLCAnYSYmaHJlZicpKSxcXG4gICAgICAgICAgICBkZXNjOiBwZGZoKGxpc3Rbal0sICcubGFiZWwmJlRleHQnKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzInLFxcbiAgICAgICAgfSk7XFxuICAgIH1cXG59XFxuaWYgKHR5cGUgPT0gJ3duYWNnJyB8fCBrdSA9PSAnd25hY2cnKSB7XFxuICAgIGxldCBocmVmID0gJ2h0dHA6Ly93d3cud25hY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1sLCAnI2lubmVyX2NvbnRlbnQmJnNjcmlwdCcpO1xcbiAgICAgICAgICAgIGZvciAodmFyIGogaW4gbGlzdCkge1xcbiAgICAgICAgICAgICAgICB2YXIgdmlkZW8xID0gcGRmaChsaXN0W2pdLCAnc2NyaXB0JiZIdG1sJyk7XFxuICAgICAgICAgICAgICAgIGlmICh2aWRlbzEuaW5jbHVkZXMoJ2NvbnRlbnRVcmwnKSkge1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIHZpZGVvID0gdmlkZW8xLm1hdGNoKC9jb250ZW50VXJsXFxcIjogXFxcIiguKilcXFxcXFxcIiwvKVsxXTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB2aWRlbztcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pXFxuICAgIH1cXG5cXG4gICAgdmFyIGxpc3QgPSBwZGZhKGh0bWwsICcudmlkZW8tbGlzdCYmLnZpZGVvLWl0ZW0nKTtcXG4gICAgZm9yICh2YXIgaiBpbiBsaXN0KSB7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiBwZGZoKGxpc3Rbal0sICdoNCYmVGV4dCcpLFxcbiAgICAgICAgICAgIHBpY191cmw6IHBkZmgobGlzdFtqXSwgJ2ltZyYmZGF0YS1zcmMnKSxcXG4gICAgICAgICAgICB1cmw6IHBsYXllcignaHR0cHM6Ly9zcGFua2JhbmcucGFydHknICsgcGRmaChsaXN0W2pdLCAnYSYmaHJlZicpKSxcXG4gICAgICAgICAgICBkZXNjOiBcXFwi6KeC55yL5qyh5pWw77yaXFxcIiArIHBkZmgobGlzdFtqXSwgJy52JiZUZXh0JyksXFxuICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8yJyxcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBsb25nQ2xpY2s6IFt7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+WIt+aWsCcsXFxuICAgICAgICAgICAgICAgICAgICBqczogJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfV1cXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KTtcXG4gICAgfVxcbn1cXG5pZiAodHlwZSA9PSAnbm9vZGxlbWFnYXppbmUo57qv5pCc57SiKScgfHwga3UgPT0gJ25vb2RsZW1hZ2F6aW5lKOe6r+aQnOe0oiknKSB7XFxuICAgIGxldCBocmVmID0gJ2h0dHBzOi8vbm9vZGxlbWFnYXppbmUuY29tL3ZpZGVvLycgKyBrdyArICc/cD0nICsgKHBhZ2UgLSAxKTtcXG4gICAgdmFyIGh0bWwgPSBmZXRjaChocmVmKTtcXG5cXG4gICAgZnVuY3Rpb24gcGxheWVyKFVybCkge1xcbiAgICAgICAgcmV0dXJuICQoVXJsKS5sYXp5UnVsZSgoKSA9PiB7XFxuICAgICAgICAgICAgdmFyIGh0bWwgPSBmZXRjaChpbnB1dCk7XFxuICAgICAgICAgICAgdmFyIGhyZWYgPSAnaHR0cHM6Ly9ubWNvcnAudmlkZW8nICsgcGRmaChodG1sLCAnI2lwbGF5ZXImJnNyYycpLnJlcGxhY2UoXFxcInBsYXllclxcXCIsIFxcXCJwbGF5bGlzdFxcXCIpO1xcbiAgICAgICAgICAgIHZhciBodG1sbCA9IGZldGNoKGhyZWYpO1xcbiAgICAgICAgICAgIHZhciB2aWRlbzEgPSBwZGZoKGh0bWxsLCAnYm9keSYmSHRtbCcpO1xcbiAgICAgICAgICAgIGlmICh2aWRlbzEuaW5jbHVkZXMoJzI0MCcpICYmICF2aWRlbzEuaW5jbHVkZXMoJzM2MCcpKSB7XFxuICAgICAgICAgICAgICAgIHZhciB2aWRlbyA9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YWNlKC9hbXA7L2csIFxcXCJcXFwiKVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gdmlkZW9cXG4gICAgICAgIH0pXFxuICAgIH1cXG5cXG4gICAgdmFyIGxpc3QgPSBwZGZhKGh0bWwsICcubGlzdF92aWRlb3MmJi5pdGVtJyk7XFxuICAgIGZvciAodmFyIGogaW4gbGlzdCkge1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogcGRmaChsaXN0W2pdLCAnLnRpdGxlJiZUZXh0JyksXFxuICAgICAgICAgICAgcGljX3VybDogcGRmaChsaXN0W2pdLCAnaW1nJiZkYXRhLXNyYycpLFxcbiAgICAgICAgICAgIHVybDogcGxheWVyKCdodHRwczovL25vb2RsZW1hZ2F6aW5lLmNvbScgKyBwZGZoKGxpc3Rbal0sICdhJiZocmVmJykpLFxcbiAgICAgICAgICAgIGRlc2M6IFxcXCLml7bplb/vvJpcXFwiICsgcGRmaChsaXN0W2pdLCAnLm1fdGltZSYmVGV4dCcpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiAnbW92aWVfMicsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgbG9uZ0NsaWNrOiBbe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfliLfmlrAnLFxcbiAgICAgICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIjtcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgIH1dXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgIH1cXG59XFxuaWYgKHR5cGUgPT0gJ2hpdHhob3QnIHx8IGt1ID09ICdoaXR4aG90Jykge1xcbiAgICB2YXIgaHJlZiA9ICdodHRwczovL3d3dy5nb29nbGUuY29tL3NlYXJjaD9zaXRlc2VhcmNoPXd3dy5oaXR4aG90Lm9yZyZxPScgKyBrdztcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIGNvbF90eXBlOiBcXFwieDVfd2Vidmlld19zaW5nbGVcXFwiLFxcbiAgICAgICAgdXJsOiBocmVmLFxcbiAgICAgICAgZGVzYzogXFxcImZsb2F0JiYxMDAlXFxcIixcXG4gICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgY2FuQmFjazogdHJ1ZSxcXG4gICAgICAgICAgICB1cmxJbnRlcmNlcHRvcjogJC50b1N0cmluZygocnVsZSkgPT4ge1xcbiAgICAgICAgICAgICAgICBpZiAoaW5wdXQubWF0Y2goL2dhbGxlcnlzLykpIHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAkLnRvU3RyaW5nKCh1cmwsIHJ1bGUpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBmYmEub3BlbihKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJ1bGU6IHJ1bGUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBuYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICdoaWtlcjovL3BhZ2UvaGl0eGhvdOS6jOe6pz91cmw9JyArIHVybCArIFxcXCImcnVsZT1cXFwiICsgcnVsZVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pKTtcXG4gICAgICAgICAgICAgICAgICAgIH0sIGlucHV0LCBydWxlKVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSwgTVlfUlVMRS50aXRsZSksXFxuICAgICAgICAgICAgYmxvY2tSdWxlczogWycnXSxcXG4gICAgICAgICAgICB1YTogTU9CSUxFX1VBXFxuICAgICAgICB9XFxuICAgIH0pO1xcbn1cXG5pZiAodHlwZSA9PSAncG9ybmh1Yicg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gfVxcbiAgICB2YXIgbGlzdCA9IHBkZmEoaHRtbCwgJy52aWRlb0xpc3QmJi52aWRlb1dyYXBwZXInKTtcXG4gICAgZm9yICh2YXIgaiBpbiBsaXN0KSB7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiBwZGZoKGxpc3Rbal0sICcudGl0bGUmJlRleHQnKSxcXG4gICAgICAgICAgICBkZXNjOiBwZGZoKGxpc3Rbal0sICcudmlld3MmJlRleHQnKSArIFxcXCIgfCBcXFwiICsgcGRmaChsaXN0W2pdLCAnLnRpbWUmJlRleHQnKSxcXG4gICAgICAgICAgICBpbWc6IHBkZmgobGlzdFtqXSwgJ2ltZyYmc3JjJyksXFxuICAgICAgICAgICAgdXJsOiBwbGF5ZXIoJ2h0dHBzOi8vY24ucG9ybmh1Yi5jb20nICsgcGRmaChsaXN0W2pdLCAnLnRpdGxlJiZhJiZocmVmJykpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiAnbW92aWVfMicsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgbG9uZ0NsaWNrOiBbe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfliLfmlrAnLFxcbiAgICAgICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIjtcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgIH1dXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgIH1cXG59XFxuaWYgKHR5cGUgPT0gJ2VoZW50YWknIHx8IGt1ID09ICdlaGVudGFpJykge1xcbiAgICB2YXIgc3BhZ2UgPSBnZXRWYXIoXFxcInNwYWdlXFxcIiwgXFxcIlxcXCIpO1xcbiAgICB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xcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcIm1vdmllXzNfbWFycXVlZVxcXCJcXG4gICAgICAgIH0pXFxuICAgIH1cXG59XFxuaWYgKHR5cGUgPT0gJ2thaXp0eScgfHwga3UgPT0gJ2thaXp0eScpIHtcXG4gICAgdmFyIGhyZWYgPSAnaHR0cHM6Ly93d3cuZ29vZ2xlLmNvbS9zZWFyY2g/c2l0ZXNlYXJjaD13d3cua2FpenR5LmNvbSZxPScgKyBrdztcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIGNvbF90eXBlOiBcXFwieDVfd2Vidmlld19zaW5nbGVcXFwiLFxcbiAgICAgICAgdXJsOiBocmVmLFxcbiAgICAgICAgZGVzYzogXFxcImZsb2F0JiYxMDAlXFxcIixcXG4gICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgY2FuQmFjazogdHJ1ZSxcXG4gICAgICAgICAgICB1cmxJbnRlcmNlcHRvcjogJC50b1N0cmluZygocnVsZSkgPT4ge1xcbiAgICAgICAgICAgICAgICBpZiAoaW5wdXQubWF0Y2goL3Bob3Rvcy8pKSB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJC50b1N0cmluZygodXJsLCBydWxlKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZmJhLm9wZW4oSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBydWxlOiBydWxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogbmFtZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9wYWdlL2thaXp0eeS6jOe6pz91cmw9JyArIHVybCArIFxcXCImcnVsZT1cXFwiICsgcnVsZVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pKTtcXG4gICAgICAgICAgICAgICAgICAgIH0sIGlucHV0LCBydWxlKVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSwg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PT4ge1xcbiAgICAgICAgICAgIHN0b3JhZ2UwLnB1dE15VmFyKCdpbmRleCcsIDApXFxuICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxcbiAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgIH0pLFxcbiAgICAgICAgY29sX3R5cGU6IFxcXCJpY29uXzRcXFwiLFxcbiAgICB9LCB7XFxuICAgICAgICB0aXRsZTogaW5kZXggPT0gJzEnID8gJ+KAnOKAnOKAneKAnScgKyBgPGZvbnQgY29sb3IgPSBcXFwiJHtnZXRSYW5kb21Db2xvcigpfVxcXCIgPmAgKyAn5Yqo5ryrPC9mb250PicgOiAn5Yqo5ryrJyxcXG4gICAgICAgIHBpY191cmw6ICdodHRwczovL2docHJveHkuY29tL2h0dHBzOi8vcmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbS9sczEyNTc4MTAwMy9sbXR1Ymlhby9tYWluL21vcmUvNjMucG5nJyxcXG4gICAgICAgIHVybDogJCgnJykubGF6eVJ1bGUoKCkgPT4ge1xcbiAgICAgICAgICAgIHN0b3JhZ2UwLnB1dE15VmFyKCdpbmRleCcsIDEpXFxuICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxcbiAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgIH0pLFxcbiAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICBsb25nQ2xpY2s6IFt7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiAn6K6+572u6buY6K6k5oqY5Y+g5pa55byPJyxcXG4gICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKHUpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciDmipjlj6AgPSBbXFxcIuWxleW8gFxcXCIsIFxcXCLmipjlj6BcXFwiXTtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBuYW1lID0gZ2V0SXRlbShcXFwi5oqY5Y+gMVxcXCIsXFxcIuaKmOWPoFxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQo5oqY5Y+gLm1hcCh2ID0+IHYgPT09IG5hbWUgPyAn4oCc4oCcJyArIHYgKyAn4oCd4oCdJyA6IHYpKS5zZWxlY3QoKG5hbWUsIHUpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoL+KAnOKAnC4qP+KAneKAnS8udGVzdChpbnB1dCkpIHJldHVybjtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5wdXQgPT09ICflsZXlvIAnKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0SXRlbShcXFwi6buY6K6k5oqY5Y+g5qih5byPXFxcIixcXFwiMFxcXCIpICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKFxcXCLpu5jorqTmipjlj6DmqKHlvI9cXFwiLFxcXCIxXFxcIilcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgc2V0SXRlbShcXFwi5oqY5Y+gMVxcXCIsIGlucHV0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodSA9PSAnMScpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB0b2FzdChcXFwi5YiH5o2i5oiQ5YqfXFxcIilcXG4gICAgICAgICAgICAgICAgICAgIH0sbmFtZSx1KVxcbiAgICAgICAgICAgICAgICB9LGluZGV4KVxcbiAgICAgICAgICAgIH1dXFxuICAgICAgICB9LFxcbiAgICAgICAgY29sX3R5cGU6IFxcXCJpY29uXzRcXFwiLFxcbiAgICB9LCB7XFxuICAgICAgICB0aXRsZTogaW5kZXggPT0gJzInID8gJ+KAnO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IHZhciBsaXN0MSA9IHBkZmEoaHRtbCwgJy5uby1ndXR0ZXImJi5jb2wteHMtMTInKTtcXG4gICAgZm9yICh2YXIgaSBpbiBsaXN0MSkge1xcbiAgICAgICAgdmFyIGltZyA9IHBkZmgobGlzdDFbaV0sICdpbWcsMSYmc3JjJyk7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiBwZGZoKGxpc3QxW2ldLCAnLmNhcmQtbW9iaWxlLXRpdGxlJiZUZXh0JyksXFxuICAgICAgICAgICAgZGVzYzogJ+ingueci+asoeaVsO+8micgKyBwZGZoKGxpc3QxW2ldLCAnLmNhcmQtbW9iaWxlLWR1cmF0aW9uLDEmJlRleHQnKSxcXG4gICAgICAgICAgICBwaWNfdXJsOiBpbWcsXFxuICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9wYWdlL2ppZXhpP3VybD0nICsgcGRmaChsaXN0MVtpXSwgJ2EsMCYmaHJlZicpICsgJyNnYW1lVGhlbWUjI25vUmVjb3JkSGlzdG9yeSMnLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiAnbW92aWVfMicsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgbG9uZ0NsaWNrOiBbe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfliLfmlrAnLFxcbiAgICAgICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIjtcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgIH1dXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgIH1cXG59IGNhdGNoIChlKSB7fVxcblxcblxcbnRyeSB7XFxuICAgIHZhciBsaXN0ID0gcGRmYShodG1sLCAnLmhvbWUtcm93cy12aWRlb3Mtd3JhcHBlciYmYScpO1xcblxcbiAgICBmb3IgKHZhciBqIGluIGxpc3QpIHtcXG4gICAgICAgIHZhciBkZGQgPSBwZGZoKGxpc3Rbal0sICdhJiZocmVmJyk7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiBwZGZoKGxpc3Rbal0sICdUZXh0JyksXFxuICAgICAgICAgICAgcGljX3VybDogcGRmaChsaXN0W2pdLCAnaW1nJiZzcmMnKSxcXG4gICAgICAgICAgICB1cmw6ICdoaWtlcjovL3BhZ2UvamlleGk/dXJsPScgKyBwZGZoKGxpc3Rbal0sICdhJiZocmVmJykgKyAnI2dhbWVUaGVtZSMjbm9SZWNvcmRIaXN0b3J5IycsXFxuICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8zX21hcnF1ZWUnLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIGxvbmdDbGljazogW3tcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn5Yi35pawJyxcXG4gICAgICAgICAgICAgICAgICAgIGpzOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCI7XFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICB9XVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pO1xcbiAgICB9XFxufSBjYXRjaCAoZSkge31cIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIjEu5ryr55S75pCc57Si5YWx5ZCM5Y+K5LiA57qn6Kej5p6QXCIsXCJwYXRoXCI6XCJjb21pY2d0XCIsXCJydWxlXCI6XCJhZGRMaXN0ZW5lcignb25DbG9zZScsICQudG9TdHJpbmcoKCkgPT4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ICdtb3ZpZV8zX21hcnF1ZWUnLFxcbiAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICBsb25nQ2xpY2s6IFt7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiAn5Yi35pawJyxcXG4gICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCI7XFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICB0aXRsZTogJ+W/q+mAn+aQnOe0oicsXFxuICAgICAgICAgICAgICAgIGpzOiAkLnRvU3RyaW5nKCh0aXRsZSwgcnVsZSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL3NlYXJjaD9zPVxcXCIgKyB0aXRsZSArIFxcXCImcnVsZT1cXFwiICsgcnVsZTtcXG4gICAgICAgICAgICAgICAgfSwgdGl0bGUsIE1ZX1JVTEUudGl0bGUpXFxuICAgICAgICAgICAgfV1cXG4gICAgICAgIH1cXG4gICAgfSk7XFxufVwifSx7XCJjb2xfdHlwZVwiOlwibW92aWVfMlwiLFwibmFtZVwiOlwiMi7purvosYZcIixcInBhdGhcIjpcIm1hZG91X21haW5cIixcInJ1bGVcIjpcImpzOlxcbnZhciBkID0gW107XFxuY29uc3QgcGFnZSA9IE1ZX1BBR0U7XFxubGV0IGRhdGFUeXBlID0gZ2V0VmFyKFxcXCJXYXJlaG91c2UudHlwZVxcXCIsIFxcXCJcXFwiKTtcXG52YXIgaHJlZiA9ICdodHRwczovLzkxbWQubWUvaW5kZXgucGhwL3ZvZC90eXBlL2lkLycgKyBkYXRhVHlwZSArICcvcGFnZS8nICsgcGFnZSArICcuaHRtbCc7XFxuaWYgKGRhdGFUeXBlID09IFxcXCJcXFwiICYmIHBh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3RvYXN0Oi8v54K55LqG5Lmf5rKh55SoJyxcXG4gICAgICAgIGNvbF90eXBlOiAndGV4dF8xJ1xcbiAgICB9KTtcXG4gICAgdmFyIGxpc3QxID0gcGRmYShodG1sLCAnLnZpZGVvLWxpc3QsMSYmLnZpZGVvLWl0ZW0nKTtcXG4gICAgZm9yICh2YXIgaSA9IDA7IGkgPCA4OyBpKyspIHtcXG4gICAgICAgIHZhciB0aXRsZSA9IHBkZmgobGlzdDFbaV0sICcudGl0bGUmJlRleHQnKTtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IHRpdGxlLFxcbiAgICAgICAgICAgIGRlc2M6IHBkZmgobGlzdDFbaV0sICcudGltZSYmVGV4dCcpLFxcbiAgICAgICAgICAgIGltZzogcGQobGlzdDFbaV0sICdpbWcmJnNyYycpICsgJ0BSZWZlcmVyPScsXFxuICAgICAgICAgICAgdXJsOiBwbGF5ZXIoJ2h0dHBzOi8vOTFtZC5tZScgKyBwZGZoKGxpc3QxW2ldLCAnYSYmaHJlZicpKSxcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBsb25nQ2xpY2s6IFt7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+WIt+aWsCcsXFxuICAgICAgICAgICAgICAgICAgICBqczogJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICflv6vpgJ/mkJzntKInLFxcbiAgICAgICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKHRpdGxlLCBydWxlKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxc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pu4Tkuabkuoznuqc/dXJsPScgKyAnaHR0cHM6Ly94Y2hpbmEuY28nICsgcGRmaChsaXN0W2pdLCAnYSYmaHJlZicpLFxcbiAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICBsb25nQ2xpY2s6IFt7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiAn5Yi35pawJyxcXG4gICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCI7XFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICB0aXRsZTogJ+W/q+mAn+aQnOe0oicsXFxuICAgICAgICAgICAgICAgIGpzOiAkLnRvU3RyaW5nKCh0aXRsZSwgcnVsZSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL3NlYXJjaD9zPVxcXCIgKyB0aXRsZSArIFxcXCImcnVsZT1cXFwiICsgcnVsZTtcXG4gICAgICAgICAgICAgICAgfSwgdGl0bGUsIE1ZX1JVTEUudGl0bGUpXFxuICAgICAgICAgICAgfV1cXG4gICAgICAgIH1cXG4gICAgfSk7XFxufVxcbnNldFJlc3VsdChkKVwifSx7XCJjb2xfdHlwZVwiOlwibW92aWVfMlwiLFwibmFtZVwiOlwiMy7purvosYZjbHViXCIsXCJwYXRoXCI6XCJtYWRvdWNsdWJcIixcInJ1bGVcIjpcImpzOlxcbnZhciBkID0gW107XFxuY29uc3QgcGFnZSA9IE1ZX1BBR0U7XFxubGV0IGRhdGFUeXBlID0gZ2V0VmFyKFxcXCJXYXJlaG91c2UudHlwZVxcXCIsIFxcXCIvXFxcIik7XFxubGV0IGhyZWYgPSAnaHR0cHM6Ly9tYWRvdS5jbHViLycgKyBkYXRhVHlwZSArICcvcGFn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uICAgICAgICAgICAgICAgIGpzOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiO1xcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6ICfojrflj5bmoIfnrb4nLFxcbiAgICAgICAgICAgICAgICBqczogJC50b1N0cmluZygodSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQodSkubGF6eVJ1bGUoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBodG1sID0gZmV0Y2goaW5wdXQpXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IEFydGlzdCA9IHBkZmgoaHRtbCwgJ2JvZHkmJi5yb3csMiYmLm5hbWUmJlRleHQnKS5yZXBsYWNlKC8gL2csIFxcXCItXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHRhZyA9IFtBcnRpc3RdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBsaXN0ID0gcGRmYShodG1sLCAnYm9keSYmLnJvdyw0LS1hLC0xJiZhJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaiBpbiBsaXN0KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhZy5wdXNoKHBkZmgobGlzdFtqXSwgJ2EmJlRleHQnKS5yZXBsYWNlKC8gL2csIFxcXCItXFxcIikpXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKHRhZy5tYXAodiA9PiB2KSkuc2VsZWN0KChuYW1lKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9wYWdlL3NlYXJjaD9wPSN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An5Yi35pawJyxcXG4gICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCI7XFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICB0aXRsZTogJ+iOt+WPluagh+etvicsXFxuICAgICAgICAgICAgICAgIGpzOiAkLnRvU3RyaW5nKCh1KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCh1KS5sYXp5UnVsZSgoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGh0bWwgPSBmZXRjaChpbnB1dClcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgdGFnID0gW107XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGxpc3QgPSBwZGZhKGh0bWwsICcjdGFnLXNpZGViYXImJmxpJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaiBpbiBsaXN0KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhZy5wdXNoKHBkZmgobGlzdFtqXSwgJ2EsMSYmVGV4dCcpLnJlcGxhY2UoLyAvZywgXFxcIl9cXFwiKSlcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQodGFnLm1hcCh2ID0+IHYpKS5zZWxlY3QoKG5hbWUpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL3BhZ2Uvc2VhcmNoP3A9I25vSGlzdG9yeSMjbm9SZWNvcmRIaXN0b3J5I2Z5cGFnZSZ0eXBlPXlhbmRlJmt3PVxcXCIgKyBpbnB1dFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAg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lcyYmVGV4dCcpLFxcbiAgICAgICAgaW1nOiBwZChsaXN0W2pdLCAnaW1nJiZzcmMnKSxcXG4gICAgICAgIHVybDogcGRmaChsaXN0W2pdLCAnYSwxJiZocmVmJykgKyAnQGxhenlSdWxlPS5qczppbnB1dCcsXFxuICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgIGxvbmdDbGljazogW3tcXG4gICAgICAgICAgICAgICAgdGl0bGU6ICfliLfmlrAnLFxcbiAgICAgICAgICAgICAgICBqczogJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIjtcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICB0aXRsZTogJ+iOt+WPluagh+etvicsXFxuICAgICAgICAgICAgICAgIGpzOiAkLnRvU3RyaW5nKChpbWcpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAkKGltZykubGF6eVJ1bGUoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBodG1sID0gZmV0Y2goaW5wdXQpXFxudmFyIHRhZyA9IFtdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBsaXN0ID0gcGRmYShodG1sLCAnI3RhZy1zaWRlYmFyJiZsaScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGogaW4gbGlzdCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YWcucHVzaChwZGZoKGxpc3Rbal0sICdhLDEmJlRleHQnKS5yZXBsYWNlKC8gL2csXFxcIl9cXFwiKSlcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQodGFnLm1hcCh2ID0+IHYpKS5zZWxlY3QoKG5hbWUpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL3BhZ2Uvc2VhcmNoP3A9I25vSGlzdG9yeSMjbm9SZWNvcmRIaXN0b3J5I2Z5cGFnZSZ0eXBlPXlhbmRlJmt3PVxcXCIgKyBpbnB1dFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICB9LCBpbWcpXFxuICAgICAgICAgICAgfV1cXG4gICAgICAgIH1cXG4gICAgfSk7XFxufVxcblxcbmlmIChsaXN0Lmxlbmd0aCA9PSAwKSB7XFxuICAgIGlmIChUeXBlMyA9PSBkYXkpIHtcXG4gICAgICAgIGNvbmZpcm0oe1xcbiAgICAgICAgICAgIHRpdGxlOiBcXFwi5o+Q56S6XFxcIixcXG4gICAgICAgICAgICBjb250ZW50OiBcXFwi5LuK5pel6L+Y5rKh5pyJ5pWw5o2u77yM5piv5ZCm5pi+56S65pio5pel5o6S6KGM77yfXFxcIixcXG4gICAgICAgICAgICBjb25maXJtOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgdmFyIGRheXMgPSAobmV3IERhdGUoKS5nZXREYXRlKCkgLSAxKSArICcnO1xcbiAgICAgICAgICAgICAgICBwdXRWYXIoXFxcIldhcmVob3VzZS50eXBlM1xcXCIsIGRheXMpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xcbiAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgIGNhbmNlbDogXFxcIid0b2FzdDovL+ivt+iHquW3semAieaLqeaXpeacn2RlYXRoJ1xcXCJcXG4gICAgICAgIH0pO1xcbiAgICB9IGVsc2Uge1xcbiAgICAgICAgaWYgKFR5cGUxID09IHllYXIpIHtcXG4gICAgICAgICAgICB0b2FzdCgn5ZaC5ZaC77yM6L+Z5LiA5aSp5Yiw5LqG5ZCX77yBJyk7XFxuICAgICAgICB9XFxuICAgIH1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rlm77niYfpk77mjqXov5Tlm57kuLrnqbo+XFxcIik7XFxuICAgIH1cXG4gICAgaWYgKGluZm8uYm9va1RvcFBpYykge1xcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICBsZXQgYm9va1RvcFBpYyA9IFRvb2wuaGlrZXJQaWMoaW5mby5ib29rVG9wUGljKTtcXG4gICAgICAgICAgICBUb29sLnBpY0Rvd25sb2FkKGJvb2tUb3BQaWNbMF0sIG1haW5QYXRoICsgaW5mby5ib29rTmFtZSArIFxcXCIuanBnXFxcIiwgYm9va1RvcFBpY1sxXSwgaW5mby5kZWNvZGUpO1xcbiAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgIGxvZyhcXFwiPOWwgemdouS4i+i9vemUmeivrz4gXFxcIiArIGUubWVzc2FnZSk7XFxuICAgICAgICB9XFxuICAgIH1cXG5cXG4gICAgbGV0IGVycm9yTnVtID0gMDtcXG4gICAgZm9yICh2YXIgaSA9IDA7IGkgPCBMOyBpKyspIHtcXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgbGV0IHBpYyA9IFRvb2wuaGlrZXJQaWMocGljTGlzdFtpXSk7XFxuICAgICAgICAgICAgVG9vbC5waWNEb3dubG9hZChwaWNbMF0sIGNoYXB0ZXJQYXRoICsgKGkgKyAxKSArIFxcXCIuanBnXFxcIiwgcGljWzFdLCBpbmZvLmRlY29kZSk7XFxuICAgICAgICAgICAgaWYgKGludGVycnVwdCAmJiBnZXRNeVZhcihNWV9JRCArIFxcXCI6c3RhdHVzXFxcIiwgXFxcIlxcXCIpID09PSBcXFwiMVxcXCIpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIC0xO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBlcnJvck51bSA9IDA7XFxuICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgaWYgKGVycm9yTnVtIDwgMTApIHtcXG4gICAgICAgICAgICAgICAgaS0tO1xcbiAgICAgIC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S5zbGljZSgwLCA1KSArIFxcXCIlXFxcIixcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgIGlkOiBNWV9JRCArIFxcXCJ8fOS4i+i9vei/m+W6plxcXCJcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIHB1dExvZyhcXFwiW2xpc3RlbmVyXeW3suWujOaIkOS4i+i9ve+8mlxcXCIgKyBpZCk7XFxuICAgICAgICB9IGVsc2UgaWYgKENJRCA9PT0gLTEpIHtcXG4gICAgICAgICAgICBmYWlsTmFtZS5wdXNoKGlkKTtcXG4gICAgICAgICAgICBwdXRMb2coXFxcIltsaXN0ZW5lcl3lt7LlgZzmraLvvJpcXFwiICsgaWQpO1xcbiAgICAgICAgICAgIGNvdW50ID0gdGFza0NvdW50O1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgaWYgKHRhc2tDb3VudCAhPT0gY291bnQpIHJldHVybjtcXG4gICAgICAgIGlmIChzdWNjZXNzQ0lELmxlbmd0aCA9PT0gdGFza0NvdW50KSB7XFxuICAgICAgICAgICAgdXBkYXRlSXRlbSh7XFxuICAgICAgICAgICAgICAgIGRlc2M6IFxcXCLigJzigJzigJ3igJ1cXFwiICsgXFxcIuKWh1xcXCIucmVwZWF0KDEwKS5mb250Y29sb3IoXFxcIiMwMGZmMDBcXFwiKSArIFxcXCIgMTAwJVxcXCIsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICBpZDogTVlfSUQgKyBcXFwifHzkuIvovb3ov5vluqZcXFwiXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4gICAgICAgIGxldCBiYXRjaFRlYW0gPSBKU09OLnBhcnNlKGdldE15VmFyKE1ZX0lEICsgXFxcIjpiYXRjaFRlYW1cXFwiLCBcXFwiW11cXFwiKSB8fCBcXFwiW11cXFwiKT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I3kvJrmtojlpLEjXFxcIik7XFxuICAgICAgICAgICAgdXBkYXRlSXRlbSh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBcXFwiW+mHjeaWsOW8gOWni11cXFwiLFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgaWQ6IE1ZX0lEICsgXFxcInx85LiL6L295o6n5Yi2XFxcIlxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgcmV0dXJuIFxcXCJicmVha1xcXCI7XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIHB1dE15VmFyKE1ZX0lEICsgXFxcIjpzdGF0dXNcXFwiLCBcXFwiMlxcXCIpO1xcbiAgICAgICAgICAgIHB1dExvZyhcXFwi5LiL6L295Lu75YqhW1xcXCIgKyBpbmZvLmJvb2tOYW1lICsgXFxcIl3lt7Llhajpg6jmiJDlip/lrozmiJBcXFwiKTtcXG4gICAgICAgICAgICB1cGRhdGVJdGVtKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IFxcXCJb6L+U5ZueXVxcXCIsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICBpZDogTVlfSUQgKyBcXFwifHzkuIvovb3mjqfliLZcXFwiXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4gICAgICAgIHRvYXN0KFxcXCLkuIvovb3ku7vliqFbXFxcIiArIGluZm8uYm9va05hbWUgKyBcXFwiXeW3suWujOaIkFxcXCIpO1xcbiAgICB9XFxuICAgIGxldCB0YXNrVGVhbUNodW5rID0gW107XFxuICAgIGlmIChDb25maWcudGhyZWFkTnVtID4gMCkge1xcbiAgICAgICAgdGFza1RlYW1DaHVuayA9IFRvb2wuY2h1bmsodGFza1RlYW0sIENvbmZpZy50aHJlYWROdW0pO1xcbiAgICB9IGVsc2Uge1xcbiAgICAgIC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IFxcXCJ0ZXh0XzFcXFwiLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIGxpbmVWaXNpYmxlOiBmYWxzZSxcXG4gICAgICAgICAgICAgICAgaWQ6IE1ZX0lEICsgXFxcIiNsb2cjXFxcIiArIGxvZ0NvdW50XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgICAgICBsb2dDb3VudCsrO1xcbiAgICB9XFxuXFxuICAgIGZ1bmN0aW9uIHRhc2sodGFza1BhcmFtKSB7XFxuICAgICAgICBjb25zdCBUb29sID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvVG9vbC5qc1xcXCIpO1xcbiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCAxMDsgaSsrKSB7XFxuICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgbGV0IHBpYyA9IFRvb2wuaGlrZXJQaWModGFza1BhcmFtLnVybCk7XFxuICAgICAgICAgICAgICAgIFRvb2wucGljRG93bmxvYWQocGljWzBdLCB0YXNrUGFyYW0uY2hhcHRlclBhdGggKyAodGFza1BhcmFtLmkgKyAxKSArIFxcXCIuanBnXFxcIiwgcGljWzFdLCB0YXNrUGFyYW0uZGVjb2RlKTtcXG4gICAgICAgICAgICAgICAgaWYgKGdldE15VmFyKHRhc2tQYXJhbS5NWV9JRCArIFxcXCI6c3RhdHVzXFxcIiwgXFxcIlxcXCIpID09PSBcXFwiMVxcXCIpIHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAtMTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBlcnJvck51bSA9IDA7XFxuICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgaWYgKGkgPT09IDkpIHtcXG4gICAgICAgICAgICAgICAgICAgIHRocm93IGU7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICByZXR1cm4gdGFza1BhcmFtLkNJRDtcXG4gICAgfVxcbiAgICBsZXQgY291bnQgPSAwO1xcbiAgICBsZXQgdG90YWxDb3VudCA9IDA7XFxuICAgIGxldCBzdWNjZXNzQ0lEID0gW107XFxuXFxuICAgIGZ1bmN0aW9uIGxpc3RlbmVyKHBhcmFtLCBpZCwgZXJyb3IsIHJlc3VsdCkge1xcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICB0b3RhbENvdW50Kys7XFxuXFxuICAgICAgICAgICAgaWYgKGVycm9yICE9IG51bGwpIHtcXG4gICAgICAgICAgICAgICAgcHV0TG9nKFxcXCJbbGlzdGVuZXJd5LiL6L295aSx6LSl77yaXFxcIiArIGlkICsgXFxcIjxFUlJPUkAgXFxcIiArIGVycm9yICsgXFxcIj5cXFwiKTtcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHJlc3VsdCA9PT0gLTEpIHtcXG4gICAgICAgICAgICAgICAgcHV0TG9nKFxcXCJbbGlzdGVuZXJd5bey5YGc5q2i77yaXFxcIiArIGlkKTtcXG4gICAgICAgICAgICAgICAgdG90YWxDb3VudCA9IHBhcmFtLnBpdkNvdW50O1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIGNvdW50Kys7XFxuICAgICAgICAgICAgICAgIGxldCByYXRpbyA9ICgoY291bnQgLyBwYXJhbS5waXZDb3VudCkpLnRvRml4ZWQoNCk7XFxuICAgICAgICAgICAgICAgIGxldCBzdHJpcENvdW50ID0gTWF0aC5jZWlsKHJhdGlvICogMTApO1xcbiAgICAgICAgICAgICAgICBpZiAocGFyYW0ucGl2Q291bnQgPT09IHRvdGFsQ291bnQgJiYgdG90YWxDb3VudCA9PT0gY291bnQpIHtcXG4gICAgICAgICAgICAgICAgICAgIHN1Y2Nlc3NDSUQucHVzaChwYXJhbS5DSUQpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLkuIvovb3ov5vluqbvvJpcXFwiICsgKHN1Y2Nlc3NDSUQubGVuZ3RoKSArIFxcXCIvXFxcIiArIHBhcmFtLnRvdGFsLFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogXFxcIuKAnOKAnOKAneKAnVxcXCIgKyBcXFwi4paHXFxcIi5yZXBlYXQoc3RyaXBDb3VudCkuZm9udGNvbG9yKFxcXCIjZmZhYzJkXFxcIikgKyBcXFwi4paHXFxcIi5yZXBlYXQoMTAgLSBzdHJpcENvdW50KS5mb250Y29sb3IoXFxcIiNlNWUxZTRcXFwiKSArIFxcXCIgXFxcIiArIFN0cmluZygocmF0aW8gKiAxMDApKS5zbGljZSgwLCA1KSArIFxcXCIlXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IE1ZX0lEICsgXFxcInx85LiL6L296L+b5bqmXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgLy9wdXRMb2coXFxcIltsaXN0ZW5lcl3lt7LlrozmiJDkuIvovb3vvJpcXFwiICsgaWQpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZiAodG90YWxDb3VudCAhPT0gcGFyYW0ucGl2Q291bnQpIHJldHVybjtcXG4gICAgICAgICAgICBpZiAodG90YWxDb3VudCA9PT0gY291bnQpIHtcXG4gICAgICAgICAgICAgICAgRmlsZS5yZW5hbWVGaWxlKHBhcmFtLmNoYXB0ZXJQYXRoLCBwYXJhbS5DSUQgKyBcXFwiJEEkXFxcIiArIFRvb2wudGV4dFNoaWVsZChwYXJhbS50aXRsZSkpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB0b3RhbENvdW50ID0gY291bnQgPSAwO1xc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xcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICBsZXQgZ2V0UGljTGlzdCA9IG5ldyBGdW5jdGlvbihcXFwiaW5wdXRcXFwiLCBcXFwidXJsXFxcIiwgXFxcInJldHVyblxcXCIgKyBpbmZvLnBhcnNlQ29kZSk7XFxuICAgICAgICAgICAgcGljTGlzdCA9IGdldFBpY0xpc3QoaXRlbS51cmwsIGl0ZW0udXJsKTtcXG4gICAgICAgICAgICBpZiAodHlwZW9mIHBpY0xpc3QgPT09IFxcXCJzdHJpbmdcXFwiKSB7XFxuICAgICAgICAgICAgICAgIHBpY0xpc3QgPSBwaWNMaXN0LnJlcGxhY2UoXFxcInBpY3M6Ly9cXFwiLCBcXFwiXFxcIikuc3BsaXQoXFxcIiYmXFxcIik7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgIHB1dExvZyhcXFwiPOa8q+eUu+WbvueJh+ino+aekOmUmeivrz4gXFxcIiArIGUubWVzc2FnZSk7XFxuICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICB9XFxuICAgICAgICBpZiAocGljTGlzdC5sZW5ndGggPT09IDApIHtcXG4gICAgICAgICAgICBwdXRMb2coXFxcIjzmvKvnlLvlm77niYfop6PmnpDplJnor6/vvJrlm77niYfpk77mjqXov5Tlm57kuLrnqbo+XFxcIik7XFxuICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICB9XFxuICAgICAgICBwaWNMaXN0ID0gcGljTGlzdC5maWx0ZXIocCA9PiBwKTtcXG4gICAgICAgIHZhciB0YXNrVGVhbSA9IHBpY0xpc3QubWFwKCh1cmwsIGkpID0+ICh7XFxuICAgICAgICAgICAgZnVuYzogdGFzayxcXG4gICAgICAgICAgICBpZDogaSxcXG4gICAgICAgICAgICBwYXJhbToge1xcbiAgICAgICAgICAgICAgICB1cmw6IHVybCxcXG4gICAgICAgICAgICAgICAgaTogaSxcXG4gICAgICAgICAgICAgICAgY2hhcH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pcy5yZWFkKHRieXMpKSAhPSAtMSkge1xcbiAgICAgICAgICAgICAgICAgICAgdG9zLndyaXRlKHRieXMsIDAsIGxlbik7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgaXMuY2xvc2UoKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICB0b3MuY2xvc2UoKTtcXG4gICAgICAgIC8v6KeE5YiZ5pu/5o2i6KeE5YiZO1xcbiAgICAgICAgbGV0IG91dEZpbGUgPSBuZXcgRmlsZShmaWxlT3V0KTtcXG4gICAgICAgIGlmICh0eXBlb2YgaW50ZXJjZXB0ID09PSBcXFwiZnVuY3Rpb25cXFwiKSB7XFxuICAgICAgICAgICAgbGV0IHRpcyA9IG5ldyBGaWxlSW5wdXRTdHJlYW0odG1wRmlsZSk7XFxuICAgICAgICAgICAgbGV0IG9zID0gbmV3IEJ1ZmZlcmVkT3V0cHV0U3RyZWFtKG5ldyBGaWxlT3V0cHV0U3RyZWFtKG91dEZpbGUpKTtcXG4gICAgICAgICAgICBsZXQgbGVuID0gMDtcXG4gICAgICAgICAgICBsZXQgYnlzID0gQXJyYXkubmV3SW5zdGFuY2UoQnl0ZS5UWVBFLCBCVUZGRVJfU0laRSk7XFxuICAgICAgICAgICAgd2hpbGUgKChsZW4gPSB0aXMucmVhZChieXMpKSAhPSAtMSkge1xcbiAgICAgICAgICAgICAgICBsZXQgbmJ5cyA9IGludGVyY2VwdChuZXcgU3RyaW5nKGJ5cywwLGxlbikpO1xcbiAgICAgICAgICAgICAgICBvcy53cml0ZShuYnlzLCAwLCBuYnlzLmxlbmd0aCk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHRtcEZpbGUuZGVsZXRlKCk7XFxuICAgICAgICAgICAgdGlzLmNsb3NlKCk7XFxuICAgICAgICAgICAgb3MuY2xvc2UoKTtcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgaWYgKG91dEZpbGUuZXhpc3RzK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yZWFrO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBhcnJheVtpXSA9IHRleHQuc2xpY2UoMCwgaW5kZXgpO1xcbiAgICAgICAgICAgIGFycmF5W2kgKyAxXSA9IHRleHQuc2xpY2UoaW5kZXggKyB0YXJnZXQubGVuZ3RoKTtcXG4gICAgICAgIH1cXG4gICAgICAgIHJldHVybiBhcnJheTtcXG4gICAgfSxcXG4gICAgY2h1bmsoYXJyLCBzaXplKSB7XFxuICAgICAgICB2YXIgcmVzdWx0ID0gW107XFxuICAgICAgICBmb3IgKHZhciBpID0gMCwgbGVuID0gYXJyLmxlbmd0aDsgaSA8IGxlbjsgaSArPSBzaXplKSB7XFxuICAgICAgICAgICAgcmVzdWx0LnB1c2goYXJyLnNsaWNlKGksIGkgKyBzaXplKSk7XFxuICAgICAgICB9XFxuICAgICAgICByZXR1cm4gcmVzdWx0O1xcbiAgICB9LFxcbiAgICBoaWtlclBpYyh1cmwpIHtcXG4gICAgICAgIHZhciBoZWFkZXJzID0ge307XFxuICAgICAgICBsZXQgdXJscyA9IHVybC5zcGxpdChcXFwiQFxcXCIpO1xcbiAgICAgICAgbGV0IHBpY1VybCA9IHVybHMuc2hpZnQoKTtcXG4gICAgICAgIGxldCBsZW5ndGggPSB1cmxzLmxlbmd0aDtcXG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgbGVuZ3RoOyBpKyspIHtcXG4gICAgICAgICAgICBsZXQgW2tleSwgdmFsdWVdID0gdi5zcGxpdCh1cmxzW2ldLCBcXFwiPVxcXCIpO1xcbiAgICAgICAgICAgIGlmIChrZXkgPT09IFxcXCJoZWFkZXJzXFxcIikge1xcbiAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmFzc2lnbihoZWFkZXJzLCBKU09OLnBhcnNlKHZhbHVlKSk7XFxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgIGxvZyhlLnRvU3RyaW5nKCkpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSBlbHNlIGlmIChrZXkuaW5jbHVkZXMoXFxcIi5cXFwiKSB8fCBrZXkuaW5jbHVkZXMoXFxcIj9cXFwiKSkge1xcbiAgICAgICAgICAgICAgICBwaWNVcmwgKz0gXFxcIkBcXFwiICsga2V5ICsgKHZhbHVlID8gXFxcIj1cXFwiICsgdmFsdWUgOiBcXFwiXFxcIik7XFxuICAgICAgICAgICAgfSBlbHNlIGlmIChrZXkgIT09IFxcXCJqc1xcXCIpIHtcXG4gICAgICAgICAgICAgICAgaGVhZGVyc1trZXldID0gdmFsdWU7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICAgICAgcmV0dXJuIFtwaWNVcmwsIGhlYWRlcnNdO1xcbiAgICB9LFxcbiAgICByYW5nZShzdGFydCwgZW5kKSB7XFxuICAgICAgICByZXR1cm4gQXJyYXkoZW5kIC0gc3RhcnQpLmZpbGwoMCkubWFwKChlbCwgaSkgPT4gc3RhcnQgKyBpKTtcXG4gICAgfSxcXG4gICAgcGljRG93bmxvYWQodXJsLCBwYXRoLCBoZWFkZXJzLCBkZWNpcGhlKSB7XFxuICAgICAgICBpZiAodHlwZW9mIGRlY2lwaGUgPT09IFxcXCJzdHJpbmdcXFwiICYmIGRlY2lwaGUubGVuZ3RoID4gMCkge1xcbiAgICAgICAgICAgIGxldCBpbnN0cmVhbTtcXG4gICAgICAgICAgICBsZXQgb3V0c3RyZWFtO1xcbiAgICAgICAgICAgIGxldCBmaWxlO1xcbiAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgIGZpbGUgPSBuZXcgamF2YS5pby5GaWxlKHBhdGgpO1xcbiAgICAgICAgICAgICAgICBpZiAoZmlsZS5leGlzdHMoKSkge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGxldCBkaXIgPSBmaWxlLmdldFBhcmVudEZpbGUoKTtcXG4gICAgICAgICAgICAgICAgaWYgKGRpciAhPSBudWxsICYmICFkaXIuZXhpc3RzKCkpIHtcXG4gICAgICAgICAgICAgICAgICAgIGRpci5ta2RpcnMoKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBpbnN0cmVhbSA9IGZldGNoKHVybCwge1xcbiAgICAgICAgICAgICAgICAgICAgaGVhZGVyczogaGVhZGVycyxcXG4gICAgICAgICAgICAgICAgICAgIGlucHV0U3RyZWFtOiB0cnVlXFxuICAgICAgICAgICAgICAgIH0pO1xcblxcbiAgICAgICAgICAgICAgICBvdXRzdHJlYW0gPSBuZXcgamF2YS5pby5GaWxlT3V0cHV0U3RyZWFtKHBhdGgpO1xcbiAgICAgICAgICAgICAgICBsZXQgdCA9ICQuaGlrZXIuaW5wdXQsXFxuICAgICAgICAgICAgICAgICAgICBjID0gJC5oaWtlci51cmw7XFxuICAgICAgICAgICAgICAgICQuaGlrZXIuaW5wdXQgPSBpbnN0cmVhbTtcXG4gICAgICAgICAgICAgICAgJC5oaWtlci51cmwgPSB1cmw7XFxuICAgICAgICAgICAgICAgIGxldCBwaWNpbiA9IChuZXcgRnVuY3Rpb24oXFxcInJldHVybiBcXFwiICsgZGVjaXBoZSkpKCk7XFxuICAgICAgICAgICAgICAgICQuaGlrZXIuaW5wdXQgPSB0O1xcbiAgICAgICAgICAgICAgICAkLmhpa2VyLnVybCA9IGM7XFxuICAgICAgICAgICAgICAgIGxldCBidWYgPSBqYXZhLmxhbmcucmVmbGVjdC5BcnJheS5uZXdJbnN0YW5jZShqYXZhLmxhbmcuQnl0ZS5UWVBFLCAxMDI0KTtcXG4gICAgICAgICAgICAgICAgbGV0IGxlbjtcXG4gICAgICAgICAgICAgICAgd2hpbGUgKChsZW4gPSBwaWNpbi5yZWFkKGJ1ZikpICE9IC0xKSB7XFxuICAgICAgICAgICAgICAgICAgICBvdXRzdHJlYW0ud3JpdGUoYnVmLCAwLCBsZW4pO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGNsb3NlTWUoaW5zdHJlYW0pO1xcbiAgICAgICAgICAgICAgICBjbG9zZU1lKG91dHN0cmVhbSk7XFxuICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICBjbG9zZU1lKGluc3RyZWFtKTtcXG4gICAgICAgICAgICAgICAgY2xvc2VNZShvdXRzdHJlYW0pO1xcbiAgICAgICAgICAgICAgICBpZiAoZmlsZSBpbnN0YW5jZW9mIGphdmEuaW8uRmlsZSAmJiBmaWxlLmV4aXN0cygpKSB7XFxuICAgICAgICAgICAgICAgICAgICBmaWxlLmRlbGV0ZSgpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGxvZyhcXFwiPOino+WvhuS4i+i9vUVycm9yPlxcXCIgKyBlLnRvU3RyaW5nKCkpXFxuICAgICAgICAgICAgICAgIHRocm93IGU7XFxuICAgICAgICAgICAgfSBmaW5hbGx5IHtcXG4gICAgICAgICAgICAgICAgY2xvc2VNZShpbnN0cmVhbSk7XFxuICAgICAgICAgICAgICAgIGNsb3NlTWUob3V0c3RyZWFtKTtcXG4gICAgICAgICAgICB9XFxuXFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIHJlcXVpcmVEb3dubG9hZCh1cmwsIHBhdGgsIGhlYWRlcnMpO1xcbiAgICAgICAgfVxcbiAgICB9LFxcbiAgICB0ZXh0U2hpZWxkKHRleHQpIHtcXG4gICAgICAgIGxldCBlID0gLyN8OnwmfFxcXFx8fFxcXFxefEB8XFxcXDx8XFxcXD58JXxcXFxcL3xcXFxcPy9nO1xcbiAgICAgICAgcmV0dXJuIHRleHQucmVwbGFjZShlLCBcXFwiX1xcXCIpO1xcbiAgICB9XFxuICAgIFxcbn1cXG5cXG4kLmV4cG9ydHMgPSB2O1wifSx7XCJjb2xfdHlwZVwiOlwibW92aWVfM1wiLFw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IGlmKGluZm8udHlwZT09PVxcXCJjb21pY1xcXCImJmluZm8uY29taWNTY2hlbWU9PT1cXFwiMVxcXCIpe1xcbiAgICAgICAgICAgICAgICBkb3dubG9hZD1kb3dubG9hZC5iO1xcbiAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICBkb3dubG9hZD1kb3dubG9hZC5hO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gZG93bmxvYWQoY2hhcHRlclRlYW0sIGluZm8sIE1ZX0lEKSB8fCBcXFwidG9hc3Q6Ly/kuIvovb3plJnor69cXFwiO1xcbiAgICAgICAgfSwgY2hhcHRlclRlYW0sIGluZm8sIE1ZX0lEKSxcXG4gICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF9jZW50ZXJfMVxcXCIsXFxuICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgIGlkOiBNWV9JRCArIFxcXCJ8fOW8gOWni+S4i+i9vVxcXCJcXG4gICAgICAgIH1cXG4gICAgfSk7XFxuICAgIGxheW91dC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiBcXFwi5Lu75Yqh5YiX6KGo77yaXFxcIixcXG4gICAgICAgIGNvbF90eXBlOiBcXFwicmljaF90ZXh0XFxcIixcXG4gICAgfSk7XFxuICAgIGZvciAobGV0IGl0ZW0gb2YgY2hhcHRlclRlYW0pIHtcXG4gICAgICAgIGxheW91dC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogaXRlbS50aXRsZSxcXG4gICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL2VtcHR5XFxcIixcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfMlxcXCJcXG4gICAgICAgIH0pO1xcbiAgICB9XFxuXFxufSBlbHNlIHtcXG4gICAgbGF5b3V0LnB1c2goe1xcbiAgICAgICAgdGl0bGU6IFxcXCLkuIvovb3ov5vluqY6MC9cXFwiK2NoYXB0ZXJUZWFtLmxlbmd0aCxcXG4gICAg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HVzXFxcIiwgXFxcIjFcXFwiKTtcXG4gICAgICAgICAgICAgICAgdXBkYXRlSXRlbSh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcIlvmraPlnKjlgZzmraIuLi5dXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IE1ZX0lEICsgXFxcInx85LiL6L295o6n5Yi2XFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+ato+WcqOWPlua2iOS4i+i9veS7u+WKoVxcXCI7XFxuICAgICAgICAgICAgfSBlbHNlIGlmIChzdGF0dXMgPT09IFxcXCIxXFxcIikge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5q2j5Zyo5pqC5YGcLi4uXFxcIjtcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHN0YXR1cyA9PT0gXFxcIjJcXFwiKSB7XFxuICAgICAgICAgICAgICAgIGJhY2soKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+W3sumAgOWHuuS4i+i9veWZqFxcXCI7XFxuICAgICAgICAgICAgfSBlbHNlIGlmIChbXFxcIjNcXFwiLCBcXFwiNFxcXCJdLmluY2x1ZGVzKHN0YXR1cykpIHtcXG4gICAgICAgICAgICAgICAgY2xlYXJNeVZhcihNWV9JRCArIFxcXCI6aXNTdGFydFxcXCIpO1xcbiAgICAgICAgICAgICAgICBjbGVhck15VmFyKE1ZX0lEICsgXFxcIjpzdGF0dXNcXFwiKTtcXG4gICAgICAgICAgICAgICAgY2xlYXJNeVZhcihNWV9JRCArIFxcXCI6bG9nXFxcIik7XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/ph43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gICAgICAgICBpZiAocmFua01ldGhvZCA9PT0gbmFtZSkge1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJhbmtJc1JldmVyc2UpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByYW5rSXNSZXZlcnNlID0gXFxcIlxcXCI7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJhbmtJc1JldmVyc2UgPSBcXFwiMVxcXCI7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuXFxuICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKFxcXCJib29rcmFjazpyYW5rSXNSZXZlcnNlXFxcIiwgcmFua0lzUmV2ZXJzZSk7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKFxcXCJib29rcmFjazpyYW5rSXNSZXZlcnNlXFxcIiwgXFxcIlxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgc2V0SXRlbShcXFwiYm9va3JhY2s6cmFua01ldGhvZFxcXCIsIG5hbWUpO1xcblxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIjtcXG4gICAgICAgICAgICB9LCBuYW1lKVxcbiAgICAgICAgfSk7XFxuICAgIH1cXG4gICAgbGV0IHJhbmtNZXRob2RNYXAgPSB7XFxuICAgICAgICBcXFwi57O757ufXFxcIjogXFxcIlxcXCIsXFxuICAgICAgICBcXFwi5aSn5bCPXFxcIjogXFxcInNpemVcXFwiLFxcbiAgICAgICAgXFxcIuWQjeensFxcXCI6IFxcXCJuYW1lXFxcIixcXG4gICAgICAgIFxcXCLml7bpl7RcXFwiOiBcXFwidGltZVxcXCJcXG4gICAgfTtcXG4gICAgbGV0IGJvb2tMaXN0ID0gW107XFxuICAgIGxldCBsaXN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gICAgIHVybDogcGFnZVVybCArIFxcXCI/cnVsZT1cXFwiICsgTVlfUlVMRS50aXRsZSxcXG4gICAgICAgICAgICBjb2xfdHlwZTpjb2xfdHlwZSxcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBsb25nQ2xpY2s6IFt7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcIuWIoOmZpFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBqczogJC50b1N0cmluZygocGF0aCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkLnJlcXVpcmUoXFxcImxvbmdQcmVzcy5qc1xcXCIpLmRlbGV0ZUZpbGVGb3JCb29rKHBhdGgpO1xcbiAgICAgICAgICAgICAgICAgICAgfSwgaXRlbS5nZXRQYXRoKCkpXFxuICAgICAgICAgICAgICAgIH1dLFxcbiAgICAgICAgICAgICAgICBpZDogaXRlbS5nZXRQYXRoKCksXFxuICAgICAgICAgICAgICAgIHBhdGg6IGl0ZW0uZ2V0UGF0aCgpLFxcbiAgICAgICAgICAgICAgICBuYW1lOiBpdGVtLmdldE5hbWUoKVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pO1xcbiAgICB9XFxuICAgIGlmIChyYW5rSXNSZXZlcnNlKSB7XFxuICAgICAgICBib29rTGlzdC5yZXZlcnNlKCk7XFxuICAgIH1cXG5cXG4gICAgc2V0UmVzdWx0KGxheW91dC5jb25jYXQoYm9va0xpc3QpKTtcXG59KSgpO1wifSx7XCJjb2xfdHlwZVwiOlwibW92aWVfM1wiLFwibmFtZVwiOlwiI+aWh+S7tuaOkuW6j1wiLFwicGF0aFwiOlwiZmlsZVJhbmsuanNcIixcInJ1bGVcIjpcImpzOlxcbmNvbnN0IEZpbGUgPSAkLnJlcXVpcmUoXFxcIkZpbGUuanNcXFwiKTtcXG5sZXQgY2huTnVtQ2hhciA9IHtcXG4gICAg6Zu2OiAwLFxcbiAgICDkuIA6IDEsXFxuICAg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PT0gc3RyLmxlbmd0aCAtIDEpIHtcXG4gICAgICAgICAgICAgICAgc2VjdGlvbiArPSBudW1iZXI7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICBsZXQgdW5pdCA9IGNobk5hbWVWYWx1ZVtzdHJbaV1dLnZhbHVlO1xcbiAgICAgICAgICAgIHNlY1VuaXQgPSBjaG5OYW1lVmFsdWVbc3RyW2ldXS5zZWNVbml0O1xcbiAgICAgICAgICAgIGlmIChzZWNVbml0KSB7XFxuICAgICAgICAgICAgICAgIHNlY3Rpb24gPSAoc2VjdGlvbiArIG51bWJlcikgKiB1bml0O1xcbiAgICAgICAgICAgICAgICBydG4gKz0gc2VjdGlvbjtcXG4gICAgICAgICAgICAgICAgc2VjdGlvbiA9IDA7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgc2VjdGlvbiArPSAobnVtYmVyICogdW5pdCk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIG51bWJlciA9IDA7XFxuICAgICAgICB9XFxuICAgIH1cXG4gICAgcmV0dXJuIHJ0biArIHNlY3Rpb247XFxufVxcblxcbmZ1bmN0aW9uIG5hbWVDb21wYXJlKGEsIGIpIHtcXG4gICAgaWYgKGEgPT0gbnVsbCB8fCBiID09IG51bGwpXFxuICAgICAgICByZXR1cm4gYSA9PSBudWxsID8gYiA9PSBudWxsID8gMCA6IC0xIDogMTtcXG5cXG4gICAgYSA9IGEucmVwbGFjZSgvKFvpm7bkuIDkuozkuInlm5vkupTlha3kuIPlhavkuZ3ljYHnmb7ljYPkuIfkur9dKS9nLCBmdW5jdGlvbihtYXRjaCwgcDEsIHAyLCBwMywgb2Zmc2V0LCBzdHJpbmcpIHtcXG4gICAgICAgIC8vIHAxIGlzIG5vbmRpZ2l0cywgcDIgZGlnaXRzLCBhbmQgcDMgbm9uLWFscGhhbnVtZXJpY3NcXG4gICAgICAgIHJldHVybiB2LkNoaW5lc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29kZSAmJiBjMSA8PSBuaW5lQ2hhckNvZGUgJiYgYzIgPj0gemVyb0NoYXJDb2RlICYmIGMyIDw9IG5pbmVDaGFyQ29kZSkge1xcbiAgICAgICAgICAgIGNtcCA9IG5ldyBqYXZhLm1hdGguQmlnSW50ZWdlcihzcGxpdDFbaV0pLmNvbXBhcmVUbyhuZXcgamF2YS5tYXRoLkJpZ0ludGVnZXIoc3BsaXQyW2ldKSk7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBpZiAoY21wID09PSAwKSB7XFxuICAgICAgICAgICAgbGV0IHJlZ2V4ID0gL1thLXpBLVowLTldL1xcbiAgICAgICAgICAgIGxldCBzMSA9IFN0cmluZyhzcGxpdDFbaV0pXFxuICAgICAgICAgICAgbGV0IHMyID0gU3RyaW5nKHNwbGl0MltpXSlcXG4gICAgICAgICAgICBpZiAocmVnZXgudGVzdChzMSkgfHwgcmVnZXgudGVzdChzMikpIHtcXG4gICAgICAgICAgICAgICAgY21wID0gbmV3IGphdmEubGFuZy5TdHJpbmcoc3BsaXQxW2ldKS5jb21wYXJlVG8obmV3IGphdmEubGFuZy5TdHJpbmcoc3BsaXQyW2ldKSk7XFxuICAgICAgICAgICAgICAgIC8vIGNtcCA9IHMxLmxvY2FsZUNvbXBhcmUoczIsICdlbicpXFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgY21wID0gczEubG9jYWxlQ29tcGFyZShzMiwgJ3poJylcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuXFxuICAgICAgICBpZiAoY21wICE9PSAwKSB7XFxuICAgICAgICAgICAgcmV0dXJuIGNtcDtcXG4gICAgICAgIH1cXG4gICAgfVxcbiAgICBsZXQgbGVuZ3RoQ21wID0gc3BsaXQxLmxlbmd0aCAtIHNwbGl0Mi5sZW5ndGg7XFxuICAgIC8vIGlmIChsZW5ndGhDbXAgIT09IDApIGxlbmd0aENtcCA9IGxlbmd0aENtcCA+IDAgPyAtMSA6IDE7XFx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QgaXRlbSBvZiBtaGxpc3QpIHtcXG4gICAgICAgICAgICBsZXQgdGl0bGUgPSBnZXRUaXRsZShpdGVtLm5hbWUpO1xcbiAgICAgICAgICAgIGFycmF5LnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGUsXFxuICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS9jb21pY0NvbXBhdGlibGUudmlldyNhdXRvUGFnZSMjcmVhZFRoZW1lIz9wYXRoPVxcXCIraXRlbS5wYXRoLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogQ29uZmlnLmRlZl9WaWV3X1N0eWxlLFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgcGF0aDogaXRlbS5wYXRoLFxcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGdldFRpdGxlMihpdGVtLm5hbWUpXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4gICAgfVxcblxcbn0gZWxzZSB7XFxuICAgIGZvciAobGV0IGl0ZW0gb2YgbWhsaXN0KSB7XFxuICAgICAgICBsZXQgbmFtZSA9IGdldFRpdGxlMihpdGVtLm5hbWUpO1xcbiAgICAgICAgYXJyYXkucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IG5hbWUsXFxuICAgICAgICAgICAgdXJsOiAkKFxcXCLnoa7orqTliKDpmaRbXFxcIiArIG5hbWUgKyBcXFwiXe+8n1xcXCIpLmNvbmZpcm0oKHBhdGgpID0+IHtcXG4gICAgICAgICAgICAgICAgY29uc3QgRmlsZSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL0ZpbGUuanNcXFwiKTtcXG4gICAgICAgICAgICAgICAgaWYgKEZpbGUuZGVsZXRlRmlsZXMocGF0aCkpIHtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICA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yaW5nKChNWV9JRCkgPT4ge1xcbiAgICAgICAgY2xlYXJNeVZhcihcXFwic2VhcmNoS2V5XFxcIik7XFxuICAgICAgICBjbGVhck15VmFyKFxcXCIudGdudW1cXFwiKTtcXG4gICAgfSkpO1xcbiAgICBsZXQgdGFnID0gRmlsZS5nZXRGaWxlUGF0aChDb25maWdbdHlwZSArIFxcXCJQYXRoXFxcIl0sIFxcXCJkaXJcXFwiKTtcXG4gICAgaWYgKHRhZy5sZW5ndGggPT09IDApIHtcXG4gICAgICAgIGxheW91dC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogXFxcIuKame+4j1xcXCIsXFxuICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL1NldHRpbmcvTW9yZS52aWV3I25vUmVmcmVzaCMjbm9SZWNvcmRIaXN0b3J5IyNub0hpc3RvcnkjP3NldHRpbmdUeXBlPWNvbnRlbnRzXFxcIixcXG4gICAgICAgICAgICBkZXNjOiBDb25maWcuaG9tZVBhdGgsXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJzY3JvbGxfYnV0dG9uXFxcIlxcbiAgICAgICAgfSk7XFxuICAgICAgICBsYXlvdXQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6ICc8aDEgc3R5bGU9XFxcInRleHQtYWxpZ246IGNlbnRlcjtcXFwiPuWVpemDveayoeacieiAtjwvaDE+JyxcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcInJpY2hfdGV4dFxcXCJcXG4gICAgICAgIH0pO1xcbiAgICAgICAgcmV0dXJuIHNldFJlc3VsdChsYXlvdXQpO1xcbiAgICB9XFxuICAgIGxheW91dC5wdXNoKHtcXG4gICAgICAgIHVybDogJ1xcXCJoaWtlcjovL3NlYXJjaD9zPVxcXCIraW5wdXQnLFxcbiAgICAgICAgZGVzYzogXFxcIuaQnOS9oOaDs+imgeeahCNcXFwiICsgdHlwZSArIFxcXCIjLi4uLi4uXFxcIixcXG4gICAgICAgIHRpdGxlOiBcXFwi8J+UjVxcXCIsXFxuICAgICAgICBjb2xfdHlwZTogXFxcImlucHV0XFxcIixcXG4gICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgcnVsZXM6ICQudG9TdHJpbmcoKHRhZywgdHlwZSkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgYXJyMSA9IFtdO1xcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHRhZy5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgICAgICAgICAgICAgYXJyMS5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFwidGl0bGVcXFwiOiB0YWdbaV0ubmFtZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFwic2VhcmNoX3VybFxcXCI6IFxcXCJoaWtlcjovL2VtcHR5P2lzQWxsPTEmc2VhcmNoVGVybXM9KiomdHlwZT1cXFwiICsgdHlwZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFwic2VhcmNoRmluZFxcXCI6IFxcXCJqczokLnJlcXVpcmUoJ2hpa2VyOi8vcGFnZS9TZWFyY2gudmlldz9ydWxlPScrTVlfUlVMRS5fdGl0bGUpO1xcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9XFxuXFxuICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeShhcnIxKTtcXG4gICAgICAgICAgICB9LCB0YWcsIHR5cGUpLFxcbiAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTogZ2V0TXlWYXIoJ3NlYXJjaEtleScsICcnKSxcXG4gICAgICAgICAgICBvbkNoYW5nZTogXFxcInB1dE15VmFyKCdzZWFyY2hLZXknLGlucHV0KVxcXCJcXG4gICAgICAgIH1cXG4gICAgfSk7XFxuICAgIGxldCBjb2xfdHlwZSA9IGdldEl0ZW0oXFxcImJvb2tyYWNrOmNvbF90eXBlXFxcIiwgXFxcIm1vdmllXzNfbWFyc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ICAgICBpZiAodGdudW0gPT09IGkpIHtcXG4gICAgICAgICAgICBsYXlvdXQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBcXFwi4oCc4oCcXFxcIiArIGl0Lm5hbWUgKyBcXFwi4oCd4oCdXFxcIixcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJzY3JvbGxfYnV0dG9uXFxcIixcXG4gICAgICAgICAgICAgICAgdXJsOiAkKFtcXFwi5Yig6Zmk6K+l55uu5b2VXFxcIiwgXFxcIuaJk+W8gOS5puaetlxcXCJdLCAxLCBcXFwi6YCJ5oup5pON5L2cXFxcIikuc2VsZWN0KChpdCwgdHlwZSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKFxcXCLliKDpmaTor6Xnm67lvZVcXFwiID09PSBpbnB1dCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vcmV0dXJuIHRoZW4oW1xcXCLor6Xmk43kvZzkuI3kvJrliKDpmaTlsI/nqIvluo/vvIzkvYbor6XlsI/nqIvluo/kuIvovb3nmoTmiYDmnInmvKvnlLvlsIbooqvliKDpmaRcXFwiXSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoXFxcIuivpeaTjeS9nOS4jeS8muWIoOmZpOWwj+eoi+W6j++8jOS9huivpeWwj+eoi+W6j+S4i+i9veeahOaJgOaciSDmvKvnlLsv5bCP6K+0IOWwhuiiq+WIoOmZpFxcXCIpLmNvbmZpcm0oKHBhdGgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgRmlsZSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL0ZpbGUuanNcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKEZpbGUuZGVsZXRlRmlsZXMocGF0aCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyTXlWYXIoXFxcIi50Z251bVxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/liKDpmaTmiJDlip9cXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+WIoOmZpOWksei0pVxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBpdC5wYXRoKTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL3BhZ2UvQm9va3JhY2sudmlldz9ydWxlPeafkOiBmuWQiCZydWxlTmFtZT1cXFwiICsgaXQubmFtZSArIFxcXCImdHlwZT1cXFwiICsgdHlwZTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSwgaXQsIHR5cGUpXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIGxheW91dC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IGl0Lm5hbWUsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwic2Nyb2xsX2J1dHRvblxcXCIsXFxuICAgICAgICAgICAgICAgIHVybDogJChcXFwiI25vTG9hZGluZyNcXFwiKS5sYXp5UnVsZShpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXCIudGdudW1cXFwiLCBpKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiO1xcbiAgICAgICAgICAgICAgICB9LC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5b3V0LnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiBpdGVtLm5hbWUsXFxuICAgICAgICAgICAgcGljX3VybDogcGljLFxcbiAgICAgICAgICAgIHVybDogcGFnZVVybCArIFxcXCI/cnVsZT1cXFwiICsgTVlfUlVMRS50aXRsZSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogY29sX3R5cGUsXFxuICAgICAgICAgICAgZXh0cmE6IE9iamVjdC5hc3NpZ24oaXRlbSwge1xcbiAgICAgICAgICAgICAgICBsb25nQ2xpY2s6IFt7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcIuWIoOmZpFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBqczogJC50b1N0cmluZygocGF0aCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkLnJlcXVpcmUoXFxcImxvbmdQcmVzcy5qc1xcXCIpLmRlbGV0ZUZpbGVGb3JCb29rKHBhdGgpXFxuICAgICAgICAgICAgICAgICAgICB9LCBpdGVtLnBhdGgpXFxuICAgICAgICAgICAgICAgIH1dLFxcbiAgICAgICAgICAgICAgICBpZDogaXRlbS5wYXRoXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH0pO1xcbiAgICB9XFxuICAgIHNldFJlc3VsdChsYXlvdXQpO1xcbn1cXG5cXG5tYWluKCk7XCJ9LHtcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXCI6XCIxLmhhbmltZTHpppbpobXkuLvpobVcIixcInBhdGhcIjpcImhhbmltZTFcIixcInJ1bGVcIjpcImlmIChwYWdlID09IDEpIHtcXG4gICAgYWRkTGlzdGVuZXIoJ29uQ2xvc2UnLCAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgIGNsZWFyVmFyKFxcXCJjb29cXFwiKTtcXG4gICAgfSkpO1xcblxcbiAgICBmdW5jdGlvbiBlcnJvcigpIHtcXG4gICAgICAgIHZhciBjb28gPSBnZXRWYXIoXFxcImNvb1xcXCIsIFxcXCJcXFwiKTtcXG4gICAgICAgIHNldFJlc3VsdChbe1xcbiAgICAgICAgICAgIHVybDogXFxcImh0dHBzOi8vaGFuaW1lMS5tZS9cXFwiLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwieDVfd2Vidmlld19zaW5nbGVcXFwiLFxcbiAgICAgICAgICAgIGRlc2M6ICdmbG9hdCYmMzIwJyxcXG4gICAgICAgICAgICDCoMKgwqBleHRyYToge8KgwqDCoMKgwqDCoMKgXFxuICAgICAgICAgICAgICAgIHVhOiBNT0JJTEVfVUEsXFxuICAgICAgICAgICAgICAgIGpzOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBmID0gZmJhLmdldENvb2tpZShsb2NhdGlvbi5ocmVmKVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZiYS5wdXRWYXIoXFxcImNvb1xcXCIsIGYpXFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSwge8KgwqDCoFxcbiAgICAgICAgICAgIHRpdGxlOiBjb28uaW5jbHVkZXMoJ2NmX2NsZWFyYW5jZScpID09IHRydWUgPyAn4oCc4oCc6I635Y+W5oiQ5Yqf77yM5Y2z5bCG6YCA5Ye64oCd4oCdJyA6ICfigJzigJzigJ3igJ08Zm9udCBjb2xvciA9IFxcXCJyZWRcXFwiID7ngrnlh7vov5nph4wo6L+H5a6M5LiK6Z2i55qE6aqM6K+B4pid77iPLOeEtuWQjuS4gOebtOeCuSk8L2ZvbnQ+JyxcXG4gICAgICAgICAgICB1cmw6ICQoJycpLmxhenlSdWxlKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0X2N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KAnOKAnOKAneKAnScgKyBgPGZvbnQgY29sb3IgPSBcXFwiJHtnZXRSYW5kb21Db2xvcigpfVxcXCIgPmAgKyAn5pyA5pawPC9mb250PicgKyBgJHtzdHIucmVwZWF0KDQxKX1gICsgJzxzbWFsbD48Zm9udCBjb2xvcj1cXFwicmVkXFxcIj5b5pu05aSaXTwvZm9udD48L3NtYWxsPicsXFxuICAgICAgICAgICAgdXJsOiAkKCcnKS5sYXp5UnVsZSgoKSA9PiB7XFxuICAgICAgICAgICAgICAgIHN0b3JhZ2UwLnB1dE15VmFyKCdpbmRleCcsIDEpXFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgICAgICAgICAgICAgcHV0VmFyKFxcXCJXYXJlaG91c2UuZ29vZFxcXCIsIFxcXCJcXFwiKVxcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgbGluZVZpc2libGU6IGZhbHNlXFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfMVxcXCJcXG4gICAgICAgIH0pXFxuICAgICAgICB2YXIgbGlzdDEgPSBwZGZhKGh0bWwsICdib2R5JiYuaG9tZS1yb3dzLXZpZGVvcy13cmFwcGVyLDEmJi5oaWRkZW4teGwnKTtcXG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDw9IDc7IGkrKykge1xcbiAgICAgICAgICAgIHZhciBpbWcgPSBwZGZoKGxpc3QxW2ldLCAnaW1nLDEmJnNyYycpO1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBwZGZoKGxpc3QxW2ldLCAnLmNhcmQtbW9iaWxlLXRpdGxlJiZUZXh0JyksXFxuICAgICAgICAgICAgICAgIGRlc2M6ICfop4LnnIvmrKHmlbDvvJonICsgcGRmaChsaXN0MVtpXSwgJy5jYXJkLW1vYmlsZS1kdXJhdGlvbiwxJiZUZXh0JyksXFxuICAgICAgICAgICAgICAgIHBpY191cmw6IGltZyxcXG4gICAgICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9wYWdlL2ppZXhpP3VybD0nICsgcGRmaChsaXN0MVtpXSwgJ2EsMCYmaHJlZicpICsgJyNnYW1lVGhlbWUjI25vUmVjb3JkSGlzdG9yeSMnLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzInLFxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfVxcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogJ+KAnOKAnOKAneKAnScgKyBgPGZvbnQgY29sb3IgPSBcXFwiJHtnZXRSYW5kb21Db2xvcigpfVxcXCIgPmAgKyAn5paw55Wq6aKE5ZGKPC9mb250PicgKyBgJHtzdHIucmVwZWF0KDM3KX1gICsgJzxzbWFsbD48Zm9udCBjb2xvcj1cXFwicmVkXFxcIj5b5pu05aSaXTwvZm9udD48L3NtYWxsPicsXFxuICAgICAgICAgICAgdXJsOiAkKCcnKS5sYXp5UnVsZSgoKSA9PiB7XFxuICAgICAgICAgICAgICAgIHN0b3JhZ2UwLnB1dE15VmFyKCdpbmRleCcsIDEpXFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgICAgICAgICAgICAgcHV0TXlWYXIoJ2hlYWRlci5mb2xkJywgJzAnKVxcbiAgICAgICAgICAgICAgICBwdXRWYXIoXFxcIldhcmVob3VzZS5nb29kXFxcIiwgXFxcIuaWsOeVqumihOWRilxcXCIpXFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBsaW5lVmlzaWJsZTogZmFsc2VcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF8xXFxcIlxcbiAgICAgICAgfSlcXG4gICAgICAgIHZhciBsaXN0ID0gcGRmYShodG1sLCAnYm9keSYmLmhvbWUtcm93cy12aWRlb3Mtd3JhcHBlciwxMCYmYScpLnJldmVyc2UoKTtcXG4gICAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgNjsgaisrKSB7XFxuICAgICAgICAgICAgdmFyIHBpYyA9IHBkZmgobGlzdFtqXSwgJ2ltZyYmc3JjJyk7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHBkZmgobGlzdFtqXSwgJ1RleHQnKSxcXG4gICAgICAgICAgICAgICAgcGljX3VybDogcGljLFxcbiAgICAgICAgICAgICAgICB1cmw6ICdoaWtlcjovL3BhZ2UvamlleGk/dXJsPScgKyBwZGZoKGxpc3Rbal0sICdhJiZocmVmJykgKyAnI2dhbWVUaGVtZSMjbm9SZWNvcmRIaXN0b3J5IycsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbW92aWVfM19tYXJxdWVlJyxcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6ICfigJzigJzigJ3igJ0nICsgYDxmb250IGNvbG9yID0gXFxcIiR7Z2V0UmFuZG9tQ29sb3IoKX1cXFwiID5gICsgJ+S7luS7rOWcqOecizwvZm9udD4nICsgYCR7c3RyLnJlcGVhdCgzNyl9YCArICc8c21hbGw+PGZvbnQgY29sb3I9XFxcInJlZFxcXCI+W+WIt+aWsF08L2ZvbnQ+PC9zbWFsbD4nLFxcbiAgICAgICAgICAgIHVybDogJChcXFwiI25vTG9hZGluZyNcXFwiKS5sYXp5UnVsZSgoKSA9PiB7XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIjtcXG4gICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBsaW5lVmlzaWJsZTogZmFsc2VcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF8xXFxcIlxcbiAgICAgICAgfSlcXG4gICAgICAgIHZhciBsaXN0MSA9IHBkZmEoaHRtbCwgJ2JvZHkmJi5ob21lLXJvd3MtdmlkZW9zLXdyYXBwZXIsNCYmLmhpZGRlbi14bCcpO1xcbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPD0gNzsgaSsrKSB7XFxuICAgICAgICAgICAgdmFyIGltZyA9IHBkZmgobGlzdDFbaV0sICdpbWcsMSYmc3JjJyk7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHBkZmgobGlzdDFbaV0sICcuY2FyZC1tb2JpbGUtdGl0bGUmJlRleHQnKSxcXG4gICAgICAgICAgICAgICAgZGVzYzogJ+ingueci+asoeaVsO+8micgKyBwZGZoKGxpc3QxW2ldLCAnLmNhcmQtbW9iaWxlLWR1cmF0aW9uLDEmJlRleHQnKSxcXG4gICAgICAgICAgICAgICAgcGljX3VybDogaW1nLFxcbiAgICAgICAgICAgICAgICB1cmw6ICdoaWtlcjovL3BhZ2UvamlleGk/dXJsPScgKyBwZGZoKGxpc3QxW2ldLCAnYSwwJiZocmVmJykgKyAnI2dhbWVUaGVtZSMjbm9SZWNvcmRIaXN0b3J5IycsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbW92aWVfMicsXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgIGVycm9yKClcXG4gICAgfVxcbn1cIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcImExLuafkOiJsue9kVwiLFwicGF0aFwiOlwic2V3YW5nXCI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iAgICAgICAgICAgICAgICBpZiAoaSA8IDEwKSB7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgcHAgPSBwaWMgKyAnXzAwJyArIGkgKyAnLmpwZydcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBpZiAoaSA8IDEwMCAmJiBpID4gOSkge1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIHBwID0gcGljICsgJ18wJyArIGkgKyAnLmpwZydcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBpZiAoaSA+IDk5KSB7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgcHAgPSBwaWMgKyAnXycgKyBpICsgJy5qcGcnXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcGljcy5wdXNoKHBwKVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gXFxcInBpY3M6Ly9cXFwiICsgcGljcy5qb2luKFxcXCImJlxcXCIpO1xcbiAgICAgICAgfVxcbiAgICAgICAgbGV0IGRvd25sb2FkbGF6eSA9ICQudG9TdHJpbmco6Kej5p6QKTtcXG4gICAgICAgIHZhciBkb0xpc3QgPSBbXTtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6ICfigJzigJzigJ3igJ08Yj48c3BhbiBzdHlsZT1cXFwiY29sb3I6ICMxYWFkMTlcXFwiPvCfk6XkuIvovb08L3NwYW4+PC9iPicsXFxuICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL2Rvd25sb2FkLnZpZXcjbm9SZWNvcmRIaXN0b3J5IyNub1JlZnJlc2gjP3J1bGU95p+Q6IGa5ZCIXFxcIixcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfMlxcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgY2hhcHRlckxpc3Q6IGRvTGlzdCxcXG4gICAgICAgICAgICAgICAgaW5mbzoge1xcbiAgICAgICAgICAgICAgICAgICAgYm9va05hbWU6IHBkLFxcbiAgICAgICAgICAgICAgICAgICAgcnVsZU5hbWU6IFxcXCIxOEjmvKvnlLtcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgYm9va1RvcFBpYzogcGljICsgJ18wMDEuanBnJyxcXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlQ29kZTogZG93bmxvYWRsYXp5XFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIGRlZmF1bHRWaWV3OiBcXFwiMVxcXCJcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KTtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6ICfigJjigJjigJnigJk8c3Ryb25nPjxmb250IGNvbG9yPSBcXFwiIzA5OEFDMVxcXCI+JyArIFxcXCLwn5ez5Lmm5p62XFxcIiArICc8L2Zyb250Pjwvc3Ryb25nPicsXFxuICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL0Jvb2tyYWNrLnZpZXc/cnVsZT3mn5DogZrlkIgmcnVsZU5hbWU9MThI5ryr55S7XFxcIixcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfMlxcXCIsXFxuICAgICAgICB9KTtcXG4gICAgICAgIGRvTGlzdC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogXFxcIuesrOS4gOivnVxcXCIsXFxuICAgICAgICAgICAgdXJsOiBNWV9VUkwsXFxuICAgICAgICB9KVxcbiAgICAgICAgZm9yICh2YXIgaSA9IDE7IGkgPD0gcDsgaSsrKSB7XFxuICAgICAgICAgICAgaWYgKGkgPCAxMCkge1xcbiAgICAgICAgICAgICAgICB2YXIgcHAgPSBwaWMgKyAnXzAwJyArIGkgKyAnLmpwZydcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgaWYgKGkgPCAxMDAgJiYgaSA+IDkpIHtcXG4gICAgICAgICAgICAgICAgdmFyIHBwID0gcGljICsgJ18wJyArIGkgKyAnLmpwZydcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgaWYgKGkgPiA5OSkge1xcbiAgICAgICAgICAgICAgICB2YXIgcHAgPSBwaWMgKyAnXycgKyBpICsgJy5qcGcnXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHBpY3MucHVzaChwcClcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6ICfnrKzkuIDor50nLFxcbiAgICAgICAgICAgIHVybDogXFxcInBpY3M6Ly9cXFwiICsgcGljcy5qb2luKFxcXCImJlxcXCIpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF8yXFxcIixcXG4gICAgICAgIH0pXFxuICAgICAgICBzZXRSZXN1bHQoZCk7XFxuICAgIH0pXFxufSAvL+S6jOe6p+ino+aekFxcblxcbnZhciBsaXN0ID0gcGFyc2VEb21Gb3JBcnJheShodG1sLCAnLnBvc3RzJiYucG9zdCcpO1xcbmZvciAodmFyIGogaW4gbGlzdCkge1xcbiAgICB2YXIgdCA9IHBhcnNlRG9tRm9ySHRtbChsaXN0W2pdLCAnaDMmJlRleHQnKTtcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiB0LFxcbiAgICAgICAgZGVzYzogdC5zdWJzdHIoLTcsIDcpLm1hdGNoKC9cXFxcKCguKilcXFxcKS8pWzFdLnJlcGxhY2UoL1teMC05XS9pZywgXFxcIlxcXCIpICsgJ3AnLFxcbiAgICAgICAgcGljX3VybDogcGFyc2VEb20obGlzdFtqXSwgXFxcImltZyYmc3JjXFxcIiksXFxuICAgICAgICB1cmw6IHBsYXkocGRmaChsaXN0W2pdLCAnYSYmaHJlZicpKSxcXG4gICAgICAgIGNvbF90eXBlOiBcXFwibW92aWVfM1xcXCJcXG4gICAgfSk7XFxufVxcbnNldFJlc3VsdChkKTtcIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzN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0JiZUZXh0JyksXFxuICAgICAgICBwaWNfdXJsOiBwZGZoKGxpc3Rbal0sICdpbWcmJmRhdGEtc3JjJyksXFxuICAgICAgICB1cmw6IHBsYXllcignaHR0cHM6Ly9zcGFua2JhbmcucGFydHknICsgcGRmaChsaXN0W2pdLCAnYSYmaHJlZicpKSxcXG4gICAgICAgIGRlc2M6IFxcXCLop4LnnIvmrKHmlbDvvJpcXFwiICsgcGRmaChsaXN0W2pdLCAnLnYmJlRleHQnKSxcXG4gICAgICAgIGNvbF90eXBlOiAnbW92aWVfMicsXFxuICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgIGxvbmdDbGljazogW3tcXG4gICAgICAgICAgICAgICAgdGl0bGU6ICfliLfmlrAnLFxcbiAgICAgICAgICAgICAgICBqczogJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIjtcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9XVxcbiAgICAgICAgfVxcbiAgICB9KTtcXG59XFxuc2V0UmVzdWx0KGQpO1wifSx7XCJjb2xfdHlwZVwiOlwibW92aWVfM1wiLFwibmFtZVwiOlwiI+iBmuWQiOaQnOe0olwiLFwicGF0aFwiOlwiU2VhcmNoLnZpZXdcIixcInJ1bGVcIjpcImpzOlxcbmNvbnN0IEZpbGUgPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9GaWxlLmpzP3J1bGU9XFxcIiArIE1ZX1JVTEUuX3RpdGxlKTtcXG5jb25zdCBDb25maWcgPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9Db25maWcuanNvbj9ydWxlPVxcXCIgKyBNWV9SVUxFLl90aXRsZSk7XFxubGV0IGNvbWljUnVsZURpcnMgPSBGaWxlLmdldEZpbGVQYXRoKENvbmZpZ1tnZXRQYXJhbShcXF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vbWljQnJvd3Nlci52aWV3XFxcIjtcXG5mb3IgKGxldCBzb25EaXIgb2YgY29taWNSdWxlRGlycykge1xcbiAgICBsZXQgY29taWNMaXN0ID0gRmlsZS5nZXRGaWxlUGF0aChzb25EaXIucGF0aCwgXFxcImRpclxcXCIpO1xcbiAgICBmb3IgKGxldCBjb21pYyBvZiBjb21pY0xpc3QpIHtcXG4gICAgICAgIGlmIChzZWFyY2hUZXN0KGNvbWljLm5hbWUpKSB7XFxuICAgICAgICAgICAgc2VhcmNoUmVzdWx0LnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogY29taWMubmFtZSxcXG4gICAgICAgICAgICAgICAgcGljX3VybDogY29taWMucGF0aCArIFxcXCIvXFxcIiArIGNvbWljLm5hbWUgKyBcXFwiLmpwZ1xcXCIsXFxuICAgICAgICAgICAgICAgIHVybDogcGFnZVVybCArIFxcXCI/cnVsZT1cXFwiICsgTVlfUlVMRS5fdGl0bGUsXFxuICAgICAgICAgICAgICAgIGRlc2M6IHNvbkRpci5uYW1lLFxcbiAgICAgICAgICAgICAgICBleHRyYTogY29taWNcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4gICAgfVxcblxcbn1cXG5zZXRSZXN1bHQoc2VhcmNoUmVzdWx0KTtcIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIiPorr7nva5cIixcInBhdGhcIjpcIlNldHRpbmcvTW9yZS52aWV3XCIsXCJydWxlXCI6XCJqczpcXG5jb25zdCBGaWxlID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvRmlsZS5qc1xcXCIpO1xcbmNvbnN0IENvbmZpZyA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL0NvbmZpZy5qc29uXFxcIik7XFxuXFxuY29uc3Qgc2V0dGluZ1R5cGUgPSBNWV9QQVJBTVMuc2V0dGluZ1R5cGUgfHwgZ2V0UGFyYW0oXFxcInNldHRpbmdUeXBlXFxcIik7XFxuXFxubGV0IGxheW91dCA9IFtdO1xcbmxldCBpZCA9IFxcXCIjXFxcIiArIG5ldyBEYXRlKCkuZ2V0VGltZSgpO1xcbnN3aXRjaCAoc2V0dGluZ1R5cGUpIHtcXG5cXG4gICAgY2FzZSBcXFwiY29udGVudHNcXFwiOlxcbiAgICAgICAgbGV0IGYgPSByZXF1aXJlKFxcXCJodHRwOi8vaGlrZXIubm9raWEucHJlc3MvaGlrZXJ1bGUvcnVsZWxpc3QuanNvbj9pZD01MDk5XFxcIik7XFxuICAgICAgICBzZXRQYWdlVGl0bGUoXFxcIuebruW9leiuvue9rnzorr7nva5cXFwiKTtcXG4gICAgICAgIGxheW91dC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogXFxcIumAieaLqeaWh+S7tuWkuVxcXCIsXFxuICAgICAgICAgICAgdXJsOiBKU09OLnN0cmluZ2lmeShmLmZpbGVTZWxlY3Rpb25Vcmkoe1xcbiAgICAgICAgICAgICAgICBjYWxsYmFjazogJC50b1N0cmluZygoaWQpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGxldCB0YXJnZXQgPSBmaW5kSXRlbShpZCkuZXh0cmE7XFxuICAgICAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKGlkLCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IE9iamVjdC5hc3NpZ24odGFyZ2V0LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTogUEFUSFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xcbiAgICAgICAgICAgICAgICB9LCBpZCksXFxuICAgICAgICAgICAgICAgIGluaXRpYWxQYXRoOiBDb25maWcuaG9tZVBhdGgsXFxuICAgICAgICAgICAgICAgIHJlcXVpcmVVcmw6IFxcXCJodHRwOi8vaGlrZXIubm9raWEucHJlc3MvaGlrZXJ1bGUvcnVsZWxpc3QuanNvbj9pZD01MDk5XFxcIixcXG4gICAgICAgICAgICAgICAgcGF0dGVybjogMVxcbiAgICAgICAgICAgIH0pKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcImlucHV0XFxcIixcXG4gICAgICAgICAgICBkZXNjOiBcXFwi5pSv5oyBaGlrZXI6Ly9maWxlc+i3r+W+hCjor6Xmk43kvZzkuI3kvJrliJ3lp4vljJbnm67lvZUpXFxcIixcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBkZWZhdWx0VmFsdWU6IENvbmZpZy5ob21lUGF0aCxcXG4gICAgICAgICAgICAgICAgb25DaGFuZ2U6ICQudG9TdHJpbmcoKGlkKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihpZCwgaW5wdXQpO1xcbiAgICAgICAgICAgICAgICB9LCBpZCksXFxuICAgICAgICAgICAgICAgIGlkOiBpZFxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pO1xcbiAgICAgICAgbGF5b3V0LnB1c2goe1xcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwibGluZV9ibGFua1xcXCJcXG4gICAgICAgIH0pO1xcbiAgICAgICAgbGF5b3V0LnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiBcXFwi56Gu6K6kXFxcIixcXG4gICAgICAgICAgICB1cmw6ICQoXFxcIiNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoKGlkKSA9PiB7XFxuICAgICAgICAgICAgICAgIGxldCBpbnB1dCA9IGdldE15VmFyKGlkLCBmaW5kSXRlbShpZCkuZXh0cmEuZGVmYXVsdFZhbHVlIHx8IFxcXCJcXFwiKTtcXG4gICAgICAgICAgICAgICAgY29uc3QgQ29uZmlnID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvQ29uZmlnLmpzb25cXFwiKTtcXG4gICAgICAgICAgICAgICAgaWYgKGlucHV0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ZTogXFxcIjxzdHJvbmc+5ryr55S76ZiF6K+75Zmo6K6+572uPC9zdHJvbmc+XFxcIi5iaWcoKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcInJpY2hfdGV4dFxcXCJcXG4gICAgICAgIH0pO1xcbiAgICAgICAgbGF5b3V0LnB1c2goe1xcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwibGluZVxcXCJcXG4gICAgICAgIH0pO1xcbiAgICAgICAgbGF5b3V0LnB1c2goe1xcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwibGluZVxcXCJcXG4gICAgICAgIH0pO1xcbiAgICAgICAgbGF5b3V0LnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiBcXFwi5YW85a655qih5byPXFxcIixcXG4gICAgICAgICAgICB1cmw6ICQoXFxcIiNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoKGRlZl9pc0NvbWljQ29tcGF0aWJsZSkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgQ29uZmlnID0gSlNPTi5wYXJzZShyZWFkRmlsZShcXFwiY29uZmlnLmpzb25cXFwiLCAwKSB8fCBcXFwie31cXFwiKTtcXG5cXG4gICAgICAgICAgICAgICAgQ29uZmlnLmRlZl9pc0NvbWljQ29tcGF0aWJsZSA9IGRlZl9pc0NvbWljQ29tcGF0aWJsZSA9PT0gXFxcIjBcXFwiID8gXFxcIjFcXFwiIDogXFxcIjBcXFwiO1xcblxcbiAgICAgICAgICAgICAgICBzYXZlRmlsZShcXFwiY29uZmlnLmpzb25cXFwiLCBKU09OLnN0cmluZ2lmeShDb25maWcpLCAwKTtcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiO1xcbiAgICAgICAgICAgIH0sIENvbmZpZy5kZWZfaXNDb21pY0NvbXBhdGlibGUpLFxcbiAgICAgICAgICAgIGRlc2M6IENv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ICAgICAgIGxheW91dC5wdXNoKHtcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcImxpbmVfYmxhbmtcXFwiXFxuICAgICAgICB9KTtcXG4gICAgICAgIGxheW91dC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogXFxcIjxzdHJvbmc+5YW25LuW6K6+572uPC9zdHJvbmc+XFxcIi5iaWcoKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcInJpY2hfdGV4dFxcXCJcXG4gICAgICAgIH0pO1xcbiAgICAgICAgbGF5b3V0LnB1c2goe1xcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwibGluZVxcXCJcXG4gICAgICAgIH0pO1xcbiAgICAgICAgbGF5b3V0LnB1c2goe1xcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwibGluZVxcXCJcXG4gICAgICAgIH0pO1xcbiAgICAgICAgbGF5b3V0LnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiBcXFwi5riF55CG57yT5a2YXFxcIixcXG4gICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UvU2V0dGluZy9Nb3JlLnZpZXcjbm9SZWNvcmRIaXN0b3J5IyNub0hpc3RvcnkjP3NldHRpbmdUeXBlPWNhY2hlXFxcIixcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfMVxcXCJcXG4gICAgICAgIH0pO1xcbiAgICAgICAgYnJlYWs7XFxuICAgIGNhc2UgXFxcImNhY2hlXFxcIjpcXG4gICAgICAgIHNldFBhZ2VUaXRsZShcXFwi5riF6Zmk57yT5a2YfOiuvue9rlxcXCIpO1xcbiAgICAgICAgY29uc3Qga25vd25MaXN0ID0gbmV3IE1hcChbXFxuICAgICAgICAgICAgW0ZpbGUuZ2V0TmFtZShDb25maWcuY29taWNQYXRoKSwgXFxcIiPnrqHnkIblmagj5ryr55S757yT5a2Y55uu5b2VW+S4jeW7uuiurua4hemZpF1cXFwiXSxcXG4gICAgICAgICAgICBbRml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cbiAgICAgICAgZGVzYzogJ+aQnOe0oicsXFxuICAgICAgICBjb2xfdHlwZTogXFxcImlucHV0XFxcIlxcbiAgICB9KTtcXG59XFxuXFxudmFyIGxpc3QgPSBwZGZhKGh0bWwsICcudmlkZW9zJiYuY29udGVudG1lJyk7XFxuZm9yICh2YXIgaiBpbiBsaXN0KSB7XFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogcGRmaChsaXN0W2pdLCAnYSYmdGl0bGUnKSxcXG4gICAgICAgIGltZzogcGRmaChsaXN0W2pdLCAnLnhsZCYmc3JjJyksXFxuICAgICAgICB1cmw6ICdoaWtlcjovL3BhZ2Uva2FpenR55LqM57qnP3VybD1odHRwczovL3d3dy5rYWl6dHkuY29tJyArIHBkZmgobGlzdFtqXSwgJ2EmJmhyZWYnKSxcXG4gICAgICAgIGNvbF90eXBlOiAnbW92aWVfM19tYXJxdWVlJyxcXG4gICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgbG9uZ0NsaWNrOiBbe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogJ+WIt+aWsCcsXFxuICAgICAgICAgICAgICAgIGpzOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiO1xcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIH1dXFxuICAgICAgICB9XFxuICAgIH0pO1xcbn1cXG5zZXRSZXN1bHQoZClcIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcImE5LmthaXp0eeS6jOe6p1wiLFwicGF0aFwiOlwia2FpenR55LqM57qnXCIsXCJydWxlXCI6XCJqczpcXG52YXIgZCA9IFtdO1xcbmlmKE1ZX1VSTC5tYXRjaCgvcGFnZS8pKXtcXG5NWV9VUkwgPSBNWV9VUkwucmVwbGFjZSgvX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iAxKSB7XFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogJ+acgOaWsOW9seeJhycsXFxuICAgICAgICB1cmw6ICd0b2FzdDovL+eCueS6huS5n+ayoeeUqCcsXFxuICAgICAgICBjb2xfdHlwZTogJ3RleHRfMSdcXG4gICAgfSk7XFxuICAgIHZhciBsaXN0MSA9IHBkZmEoaHRtbCwgJy52aWRlby1saXN0LDEmJi52aWRlby1pdGVtJyk7XFxuICAgIGZvciAodmFyIGkgPSAwOyBpIDwgODsgaSsrKSB7XFxuICAgICAgICB2YXIgdGl0bGUgPSBwZGZoKGxpc3QxW2ldLCAnLnRpdGxlJiZUZXh0Jyk7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiB0aXRsZSxcXG4gICAgICAgICAgICBkZXNjOiBwZGZoKGxpc3QxW2ldLCAnLnRpbWUmJlRleHQnKSxcXG4gICAgICAgICAgICBpbWc6IHBkKGxpc3QxW2ldLCAnaW1nJiZzcmMnKSArICdAUmVmZXJlcj0nLFxcbiAgICAgICAgICAgIHVybDogcGxheWVyKCdodHRwczovLzkxbWQubWUnICsgcGRmaChsaXN0MVtpXSwgJ2EmJmhyZWYnKSksXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgbG9uZ0NsaWNrOiBbe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfliLfmlrAnLFxcbiAgICAgICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIjtcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn5b+r6YCf5pCc57SiJyxcXG4gICAgICAgICAgICAgIC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bWc6IHBkKGxpc3Rbal0sICdpbWcmJnNyYycpICsgJ0BSZWZlcmVyPScsXFxuICAgICAgICB1cmw6IHBsYXllcignaHR0cHM6Ly85MW1kLm1lJyArIHBkZmgobGlzdFtqXSwgJ2EmJmhyZWYnKSksXFxuICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgIGxvbmdDbGljazogW3tcXG4gICAgICAgICAgICAgICAgdGl0bGU6ICfliLfmlrAnLFxcbiAgICAgICAgICAgICAgICBqczogJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIjtcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiAn5b+r6YCf5pCc57SiJyxcXG4gICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKHRpdGxlLCBydWxlKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vc2VhcmNoP3M9XFxcIiArIHRpdGxlICsgXFxcIiZydWxlPVxcXCIgKyBydWxlO1xcbiAgICAgICAgICAgICAgICB9LCB0aXRsZSwgTVlfUlVMRS50aXRsZSlcXG4gICAgICAgICAgICB9XVxcbiAgICAgICAgfVxcbiAgICB9KTtcXG59XFxuc2V0UmVzdWx0KGQpO1wifV0iLCJpY29uIjoiaHR0cHM6Ly9naHByb3h5Lm5ldC9odHRwczovL3Jhdy5naXRodWJ1c2VyY29udGVudC5jb20vbHMxMjU3ODEwMDMvdHViaWFvL21haW4vcS80LnBuZyIsInByb3h5IjoiIn0=
Add Comment
Please, Sign In to add comment