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wsCisgICAgICAgICAgICAgICAgLmlkZW50ID0gIlN0cmF0dXMvTkVDIGZ0U2VydmVyIiwKKyAgICAgICAgICAgICAgICAubWF0Y2hlcyA9IHsKKyAgICAgICAgICAgICAgICAgICAgICAgIERNSV9NQVRDSChETUlfU1lTX1ZFTkRPUiwgIk5FQyIpLAorICAgICAgICAgICAgICAgICAgICAgICAgRE1JX01BVENIKERNSV9QUk9EVUNUX05BTUUsICJFeHByZXNzNTgwMC9SMzIiKSwKKyAgICAgICAgICAgICAgICB9LAorICAgICAgICB9LAorICAgICAgICB7CisgICAgICAgICAgICAgICAgLmNhbGxiYWNrID0gc2V0X3NjYW5fYWxsLAorICAgICAgICAgICAgICAgIC5pZGVudCA9ICJTdHJhdHVzL05FQyBmdFNlcnZlciIsCisgICAgICAgICAgICAgICAgLm1hdGNoZXMgPSB7CisgICAgICAgICAgICAgICAgICAgICAgICBETUlfTUFUQ0goRE1JX1NZU19WRU5ET1IsICJORUMiKSwKKyAgICAgICAgICAgICAgICAgICAgICAgIERNSV9NQVRDSChETUlfUFJPRFVDVF9OQU1FLCAiRXhwcmVzczU4MDAvUjMxIiksCisgICAgICAgICAgICAgICAgfSwKKyAgICAgICAgfSwKIAl7fQogfTsKIApkaWZmIC0tZ2l0IGEvYXJjaC94ODYvcGNpL2ludGVsX21pZF9wY2kuYyBiL2FyY2gveDg2L3BjaS9pbnRlbF9taWRfcGNpLmMKaW5kZXggNDRiOTI3MS4uODUyYWE0YyAxMDA2NDQKLS0tIGEvYXJjaC94ODYvcGNpL2ludGVsX21pZF9wY2kuYworKysgYi9hcmNoL3g4Ni9wY2kvaW50ZWxfbWlkX3BjaS5jCkBAIC0yOTMsNyArMjkzLDYgQEAKIERFQ0xBUkVfUENJX0ZJWFVQX0ZJTkFMKFBDSV9WRU5ET1JfSURfSU5URUwsIDB4MDgwMSwgbXJzdF9wb3dlcl9vZmZfdW51c2VkX2Rldik7CiBERUNMQVJFX1BDSV9GSVhVUF9GSU5BTChQQ0lf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