{"matchId":"58244967","creationMatch":"match","runtimeMatch":"match","verifiedAt":"2026-11-03T17:41:24Z","creationBytecode":{"onchainBytecode":"0x61038060405234610708576156fe8038038061001a81610720565b92833981818101036103a081126107085761003483610745565b9061004160208501610745565b9361004e60408201610745565b9461005b60608301610745565b9560e0607f19850112610708576040519360e08501906001600160401b0382118683101761070c5760c09160405261009560808601610745565b86526100a360a08601610745565b60208701526100b3828601610745565b60408701526100c460e08601610745565b60608701526100d66101008601610745565b60808701526100e86101208601610745565b60a08701526100fa6101408601610745565b8683015261015f190112610708576040519660c088016001600160401b0381118982101761070c57604052610160840151885261018084015160208901526101a084015160408901526101c084015160608901526101e0840151608089015261020084015160a08901526102208401519081151582036107085761024085015161026086015190610280870151926102a0880151946102c0890151966101a36102e08b01610759565b986103008b01519c8d8060020b03610708576103208c01516001600160401b038111610708578f6101d9918e918201910161078c565b6103408d0151909f6001600160401b038211610708578d01908d01906101fe9161078c565b9f61020c6103608e01610759565b9c6103800161021a9061077d565b9d600160a01b60019003815116608052600160a01b6001900360208201511660a052600160a01b6001900360408201511660c052600160a01b6001900360608201511660e052600160a01b6001900360808201511661010052600160a01b6001900360a08201511661012052600160a01b600190039060c00151166101405280516101605260208101516101805260408101516101a05260608101516101c05260808101516101e05260a00151610200526102205261024052610260525f146106de5761032052600380546001600160a01b03191690555b610280526102a0526102c0526102e052610300525f805460c89490941b61ffff60c81b1660b09390931b62ffffff60b01b16600160801b600160d81b031990941660989290921b62ffffff60981b1691909117929092171762ffffff60801b60809390931b929092169190911781555b81518110156103fe578061037860019284610868565b51815f52600460205260405f2090838060681b0381511690825491600160681b8660d01b03602083015160681b169061ffff60d01b604084015160d01b169161ffff60e01b606085015160e01b1693608061ffff60f01b91015160f01b1694888060f01b039261ffff60e01b199163ffffffff60e01b1617161716171717905501610362565b505f5b82518110156104ad578061041760019285610868565b5161042961042483610890565b6108b4565b5f52600460205260405f2090838060681b0381511690825491600160681b8660d01b03602083015160681b169061ffff60d01b604084015160d01b169161ffff60e01b606085015160e01b1693608061ffff60f01b91015160f01b1694888060f01b039261ffff60e01b199163ffffffff60e01b1617161716171717905501610401565b5051905190806106d057505f195b61036052806106c257505f5b61034052604051614e3890816108c68239608051818181610bee0152613f08015260a051818181610c1e0152613f57015260c051818181610c4e0152613f33015260e051818181610c7e0152613fb8015261010051818181610cae0152613f94015261012051818181610cde0152614007015261014051818181610d0e0152613fe3015261016051818181610d360152611de2015261018051818181610d5d0152611f0801526101a051818181610d8401526120d701526101c051818181610dab01526121e801526101e051818181610dd201526126d5015261020051818181610df901526134b4015261022051818181610a2801528181610e2f015261231101526102405181818161081801528181610a540152818161187c01526138280152610260518181816106fa01528181610a83015281816118d4015261378a015261028051818181610aaa015281816118a1015281816119b60152818161273901528181612b97015261332b01526102a051818181610ad0015281816118f701528181611a3001528181612bbf015281816132d1015261330001526102c05181610af601526102e05181610b1c01526103005181610b42015261032051818181610b700152613585015261034051818181610b9801528181611107015261299b015261036051818181610bbf0152818161124f0152612d3b0152f35b6106cb90610890565b6104c7565b6106d9906108b4565b6104bb565b5f61032052600380546001600160a01b0319166001600160a01b03929092169190911790556102f2565b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b6040519190601f01601f191682016001600160401b0381118382101761070c57604052565b51906001600160a01b038216820361070857565b519062ffffff8216820361070857565b51906001600160681b038216820361070857565b519061ffff8216820361070857565b81601f82011215610708578051906001600160401b03821161070c576107b760208360051b01610720565b92602060a081868681520194028301019181831161070857602001925b8284106107e2575050505090565b60a084830312610708576040519060a08201906001600160401b0382118383101761070c5760a09260209260405261081987610769565b8152610826838801610769565b838201526108366040880161077d565b60408201526108476060880161077d565b60608201526108586080880161077d565b60808201528152019301926107d4565b805182101561087c5760209160051b010190565b634e487b7160e01b5f52603260045260245ffd5b600160ff1b81146108a0575f0390565b634e487b7160e01b5f52601160045260245ffd5b905f1982019182136001166108a05756fe6101e06040526004361015610012575f80fd5b5f6080525f3560e01c80630f7439531461179c5780631e2eaeaf146117805780631f21638c1461168c57806335fd631a14611636578063372aa224146115bc5780633ff20c8a1461158b5780635dd9a4c5146113fa578063658b6cb714611275578063943f3b1a1461108857806397962ef914610faf578063bcdb4dad14610957578063d83067861461092c578063dbd035ff14610892578063e24f0884146103e2578063ec069057146101c35763fbde1732146100ce575f80fd5b346101bd5760803660031901126101bd576100e7611abc565b6100ef611b00565b906044359067ffffffffffffffff82116101bd57604060031983360301126101bd5760643567ffffffffffffffff81116101bd57610131903690600401611ad2565b9161013a61392b565b5c61019157604094610179947fa147fd8f7d12de6da66feedc6d64a11bd371e5471ee1018f11f9072ede67a0fa61016f61392b565b5d60040191612049565b60805161018461392b565b5d82519182526020820152f35b7f3ee5aeb500000000000000000000000000000000000000000000000000000000608051526004608051fd5b60805180fd5b346101bd576080513660031901126101bd576101dd61392b565b5c610191576101ea61392b565b7f695543c3708653cda9d418b4ccd3be11368e40636c10c44b18cfe756b6d88b29905d610215613615565b6001600160801b0316806001600160801b0381931690610234916139c5565b926001600160801b031690610248916139fc565b9160805154928360081c60010b608051526004602052608051604090206040519061027282611bff565b54936001600160681b03851682528460681c6001600160681b0316602083015260408201908560d01c61ffff16825260608301928660e01c61ffff1684526080019560f01c86528660801c60020b6102ca828261385b565b925161ffff1601906102db9161385b565b8660181c6001600160681b03166102f181612374565b93516001600160681b039390940291020104946305f5e1006affffff000000000000000060709290921c919091160492600160401b620f424069ffff000000000000000060409490941b939093169290920401830181019081106103ca5769ffff000000000000000061037061036b620f42409388613998565b6138e1565b94516080515060401b160401016080515060805150600160401b019182600160401b116103ca576103ae61036b6040946001600160801b03936139b6565b916080516103ba61392b565b5d81845193168352166020820152f35b634e487b7160e01b6080515260116004526024608051fd5b346107fd5760c03660031901126107fd576103fb611abc565b60243580151581036107fd576044359081600f0b82036107fd57606435926001600160801b03841684036107fd5760843567ffffffffffffffff81116107fd57610449903690600401611ad2565b909360a43567ffffffffffffffff81116107fd5761046b903690600401611ad2565b909360ff5f541661086a5761047e61392b565b5c6108425785948389937f695543c3708653cda9d418b4ccd3be11368e40636c10c44b18cfe756b6d88b296104b161392b565b5d6104ce81846104bf613615565b9c91819a81988f948c33612603565b61010051919c9299909592908c15610725578d60805181126106e3575b506104f46137ec565b91333b156101bd578b908f61053a60405194859384937fc32510750000000000000000000000000000000000000000000000000000000085526080519660048601612020565b0381608051335af180156106d6576106bd575b5089608051811391826106a3575b505061067757848c6106539b60409f996105b0976106599f8b968f919d8f6001600160a01b039f5b6105996105936080515496613396565b99613396565b996001600160801b0381169060801c019a336133bd565b608051548951946f010000000000000000000000000000006effff000000000000000000000000006001600160681b038460181c169360601b169160805190600f0b1360781b1617178452876001600160801b03166fffffffffffffffffffffffffffffffff198660801b161760208501528884015216907f9734819749a91fc3be03ea83205f924ee08479bd3f0da48efc91d94d050cac1e60603392a3613396565b91613396565b60805161066461392b565b5d825191600f0b8252600f0b6020820152f35b7fbe79592100000000000000000000000000000000000000000000000000000000608051526004608051fd5b6106ad925061203c565b6106b56137ec565b10898f61055b565b6080516106c991611c37565b6080516101bd578e61054d565b6040513d608051823e3d90fd5b6106ef61071f91611fe0565b896001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016613b18565b8d6104eb565b905f8b12610801575b61073661374e565b91333b156107fd578e8c6107795f9360405195869485947fc325107500000000000000000000000000000000000000000000000000000000865260048601612020565b038183335af180156107f2576107de575b508c608051811391826107c4575b505061067757848c6106539b60409f996105b0976106599f8b968f919d8f6001600160a01b039f610583565b6107ce925061203c565b6107d661374e565b108c8f610798565b5f6107e891611c37565b5f6080528e61078a565b6040513d5f823e3d90fd5b5f80fd5b61083d61080d8c611fe0565b896001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016613b18565b61072e565b7f3ee5aeb5000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f51bd770c000000000000000000000000000000000000000000000000000000005f5260045ffd5b346107fd5760203660031901126107fd5760043567ffffffffffffffff81116107fd57366023820112156107fd5780600401359067ffffffffffffffff82116107fd578160051b9036602483830101116107fd5760408051809460208252602082015201918301916020806024604086019401925b8335548152019101908483821015610923575060208091610907565b60408186030190f35b346107fd575f3660031901126107fd576020610946611fa5565b6001600160a01b0360405191168152f35b346107fd575f3660031901126107fd575f6102e060405161097781611bce565b8281528260208201528260408201528260608201528260808201528260a08201528260c08201528260e08201528261010082015282610120820152826101408201528261016082015282610180820152826101a0820152826101c0820152826101e08201528261020082015282610220820152826102408201528261026082015282610280820152826102a0820152826102c08201520152610300604051610a1e81611bce565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001681526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001660208201526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001660408201527f000000000000000000000000000000000000000000000000000000000000000060608201527f000000000000000000000000000000000000000000000000000000000000000060808201527f000000000000000000000000000000000000000000000000000000000000000060a08201527f000000000000000000000000000000000000000000000000000000000000000060c08201527f000000000000000000000000000000000000000000000000000000000000000060e08201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166101008201527f00000000000000000000000000000000000000000000000000000000000000006101208201527f00000000000000000000000000000000000000000000000000000000000000006101408201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166101608201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166101808201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166101a08201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166101c08201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166101e08201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166102008201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166102208201527f00000000000000000000000000000000000000000000000000000000000000006102408201527f00000000000000000000000000000000000000000000000000000000000000006102608201527f00000000000000000000000000000000000000000000000000000000000000006102808201527f00000000000000000000000000000000000000000000000000000000000000006102a08201527f00000000000000000000000000000000000000000000000000000000000000006102c08201527f00000000000000000000000000000000000000000000000000000000000000006102e08201526102e0604051916001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001683526001600160a01b0360208201511660208401526001600160a01b036040820151166040840152606081015160608401526080810151608084015260a081015160a084015260c081015160c084015260e081015160e08401526001600160a01b03610100820151166101008401526101208101516101208401526101408101516101408401526001600160a01b03610160820151166101608401526001600160a01b03610180820151166101808401526001600160a01b036101a0820151166101a08401526001600160a01b036101c0820151166101c08401526001600160a01b036101e0820151166101e08401526001600160a01b03610200820151166102008401526001600160a01b03610220820151166102208401526102408101516102408401526102608101516102608401526102808101516102808401526102a08101516102a08401526102c08101516102c084015201516102e0820152f35b346107fd5760a03660031901126107fd57610fc8611abc565b610fd0611b00565b906044359067ffffffffffffffff82116107fd57604060031983360301126107fd5760643567ffffffffffffffff81116107fd57611012903690600401611ad2565b60849291923567ffffffffffffffff81116107fd57611035903690600401611ad2565b93909261104061392b565b5c6108425760409661107f967f3ff35dbce7a07ce455b128890d383c554afbc1b07cf7390a13e2d602a38c1a0a61107561392b565b5d60040191611d4e565b5f61018461392b565b346107fd5760603660031901126107fd576004358060010b8091036107fd5760243561ffff81168082036107fd576044359061ffff82168083036107fd576110ce612307565b6110d661392b565b5c610842577f6228ff59018d12017a2bb81d4aaee1d839faeb61bb29b616b08aec1d954bdf7c61110461392b565b5d7f00000000000000000000000000000000000000000000000000000000000000008512801561124c575b611220576112096040937f2a1317b5b5812150d82fa4b2e5ae289f62be0c42a042edbdc69b978673746a4795875f5260046020526111ba865f209182907fffff0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff7dffff0000000000000000000000000000000000000000000000000000000083549260e01b169116179055565b907dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffff00000000000000000000000000000000000000000000000000000000000083549260f01b169116179055565b82519182526020820152a25f61121d61392b565b5d005b847f64b6051e000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b507f0000000000000000000000000000000000000000000000000000000000000000851361112f565b346107fd576101203660031901126107fd5761128f611abc565b6024356001600160a01b03811681036107fd576044359081151582036107fd576064359283600f0b84036107fd57608435906001600160801b03821682036107fd5760a435906001600160801b038216938483036107fd5760c435936001600160801b038516948581036107fd5760e435906001600160801b038216958683036107fd576101043567ffffffffffffffff81116107fd57611334903690600401611ad2565b98909761133f61392b565b5c610842578885858f8f6113cc9f918f96918d8f61138d8f956113929c8e987fbaf2b3653c77cf277ac36a174e0624557a6829660e787388cf9abd21ceb18a4461138761392b565b5d612496565b612603565b909691956101005191979d8e979d8e946113b66113b05f5497613396565b9a613396565b9a6001600160801b0381169060801c019b6133bd565b7f1f6053de000000000000000000000000000000000000000000000000000000005f5260045260245260445ffd5b346107fd5760403660031901126107fd5760043562ffffff81168082036107fd576024359062ffffff8216928383036107fd57611435612307565b61143d61392b565b5c610842577ff88a537f51dde30be9a9960a2850ed980c30e495145525344f0f47ff82ba3b7361146b61392b565b5d5f549162ffffff8360981c168103611516575b5050505f549162ffffff8360b01c16810361149e575b5f61121d61392b565b7f4d14e59cea6a74cef5169f00d96334b2c0214358308e92227d7c47e943664b9c927fffffffffffffff000000ffffffffffffffffffffffffffffffffffffffffffff78ffffff0000000000000000000000000000000000000000000060209460b01b169116175f55604051908152a1808080611495565b7f0e7d070a63c6cf2ec01badac5543ae7bcd84ceebe76073c704e7f3e356f4f194927fffffffffffffffffffff000000ffffffffffffffffffffffffffffffffffffff75ffffff0000000000000000000000000000000000000060209460981b169116175f55604051908152a182808061147f565b346107fd5760203660031901126107fd5760043560ff811681036107fd576115ba906115b5612307565b611b19565b005b346107fd5760203660031901126107fd576001600160a01b036115dd611abc565b6115e5612307565b16807fffffffffffffffffffffffff000000000000000000000000000000000000000060035416176003557fb266add5f3044b17d27db796af992cecbe413921b4e8aaaee03c719e16b9806a5f80a2005b346107fd5760403660031901126107fd576024356004356040519160408360208152826020820152019060051b8301916001602060408501935b8354815201910190848382101561092357506020600191611670565b346107fd5760203660031901126107fd5760043561ffff8116908181036107fd576116b5612307565b6116bd61392b565b5c610842577faab56bc87c1aa4b7f07e347524cc16f26458efacbe0150d5f992ab348f9b5c9d6116eb61392b565b5d5f549161ffff8360c81c168103611706575f61121d61392b565b7f0262bdf5ceb29428fdaec304f1872012436cebf3ff5621c19bc17b61892940ea927fffffffffff0000ffffffffffffffffffffffffffffffffffffffffffffffffff7affff0000000000000000000000000000000000000000000000000060209460c81b169116175f55604051908152a1808080611495565b346107fd5760203660031901126107fd57600435545f5260205ff35b346107fd5760c03660031901126107fd576064356024356084356001600160a01b03811681036107fd5760a4356001600160a01b03811681036107fd576117e1612307565b6117e961392b565b5c610842577fd1d11922b700459ced204b3743fc4c79f65983a27e1363601f00585467c79c0761181761392b565b5d826004350192846044350192600754926008549460095493600a5497806119a3575b5050907f0f4f965b9381ad88a8ce70d51b86e6162cbebbdfa906901cb34fe0858b30b59697826080989796959493611955575b505094611932929394956119287f0000000000000000000000000000000000000000000000000000000000000000966118c97f00000000000000000000000000000000000000000000000000000000000000008092878b6123b9565b97906007558361191e7f0000000000000000000000000000000000000000000000000000000000000000809c7f0000000000000000000000000000000000000000000000000000000000000000998a926123b9565b9a906008556123b9565b97906009556123b9565b90600a55604051938452602084015260408301526060820152a15f61121d61392b565b61193294829892966002549061198761197a856001600160801b0385169d8e0261239b565b9485938e1c9a8b0261239b565b938491019901990301950301905f60025590959493928961186d565b9095939296946119b49892986137ec565b7f00000000000000000000000000000000000000000000000000000000000000006119de91612361565b968387600154996001600160801b038b166119f89161238e565b8489600254926001600160801b038416611a119161238e565b90611a1b9161238e565b90611a259161238e565b9a611a2e61374e565b7f0000000000000000000000000000000000000000000000000000000000000000611a5891612361565b9060801c611a659161238e565b9060801c611a729161238e565b90611a7c9161238e565b90611a869161238e565b95611a93848a840261239b565b938492880290611aa29161239b565b93849101970197030193030195888096929394959661183a565b600435906001600160a01b03821682036107fd57565b9181601f840112156107fd5782359167ffffffffffffffff83116107fd57602083818601950101116107fd57565b6024359069ffffffffffffffffffff821682036107fd57565b60ff1660028111611b70575f5460ff8116808314611b6b57827fd708418b295fcf080d236d5143d7d3a9e9694be43c2dedb73a16196b08daac569360409360ff1916175f5582519182526020820152a1565b505050565b7f39da1b10000000000000000000000000000000000000000000000000000000005f5260045ffd5b903590601e19813603018212156107fd570180359067ffffffffffffffff82116107fd57602001918160051b360383136107fd57565b610300810190811067ffffffffffffffff821117611beb57604052565b634e487b7160e01b5f52604160045260245ffd5b60a0810190811067ffffffffffffffff821117611beb57604052565b6040810190811067ffffffffffffffff821117611beb57604052565b90601f8019910116810190811067ffffffffffffffff821117611beb57604052565b9035601e19823603018112156107fd57016020813591019167ffffffffffffffff82116107fd578160051b360383136107fd57565b90918281527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83116107fd5760209260051b809284830137010190565b91906040810190611cdc8480611c59565b604083529283905260608201925f5b818110611d1857505050611d07846020611d1595960190611c59565b916020818503910152611c8e565b90565b8235855260209485019490920191600101611ceb565b908060209392818452848401375f828201840152601f01601f1916010190565b92959196949093611d5f8880611b98565b905015611f9857611d708880611b98565b9050611d7f60208a018a611b98565b91905003611f7057611e7996604091611e0687611de088611dd2898f8a908a519687957f0a2a56a600000000000000000000000000000000000000000000000000000000602088015233602488016134d8565b03601f198101835282611c37565b7f0000000000000000000000000000000000000000000000000000000000000000613a05565b82517fb10311de0000000000000000000000000000000000000000000000000000000081526001600160a01b038716600482015269ffffffffffffffffffff8816602482015261010060448201529889928392611e6761010485018e611ccb565b84810360031901606486015291611d2e565b60016084830152600460a4830152600560c4830152600660e4830152038173e0b1576ac63a582e6740a7e1dcfbbef730539cd45af480156107f2575f965f91611f2e575b50611f0692611f2c95949282611dd29399809b6040519889977f9a2983050000000000000000000000000000000000000000000000000000000060208a01523360248a01613527565b7f0000000000000000000000000000000000000000000000000000000000000000613a05565b565b96505092916040863d604011611f68575b81611f4c60409383611c37565b810103126107fd57855160209096015192939092611f06611ebd565b3d9150611f3f565b7f8bea10c5000000000000000000000000000000000000000000000000000000005f5260045ffd5b505f965086955050505050565b7f695543c3708653cda9d418b4ccd3be11368e40636c10c44b18cfe756b6d88b29611fce61392b565b5c14611fd8575f90565b611d15613583565b7f8000000000000000000000000000000000000000000000000000000000000000811461200c575f0390565b634e487b7160e01b5f52601160045260245ffd5b611d159492606092825260208201528160408201520191611d2e565b9190820180921161200c57565b9091939492946120598580611b98565b9050156122fc5761206a8580611b98565b90506120796020870187611b98565b91905003611f70576001600160a01b038216958633036122d4576120fb6040517f90c26d990000000000000000000000000000000000000000000000000000000060208201526120d581611dd286868c8b8b33602488016134d8565b7f0000000000000000000000000000000000000000000000000000000000000000613a05565b604051967f9eb58677000000000000000000000000000000000000000000000000000000008852600488015269ffffffffffffffffffff8416602488015260e060448801526060878061215160e482018a611ccb565b6001606483015260046084830152600560a4830152600660c4830152038173e0b1576ac63a582e6740a7e1dcfbbef730539cd45af49687156107f2575f5f915f99612280575b5092611f2c959492826121e695611dd2949a819c61220c575b6040519889977f016c32520000000000000000000000000000000000000000000000000000000060208a01523360248a01613527565b7f0000000000000000000000000000000000000000000000000000000000000000613a05565b5f545f8160081c60010b125f14612257576fffffffffffffffffffffffffff000000196fffffffffffffffffffffffffff0000006001600160681b035b60181b169116175f556121b0565b6fffffffffffffffffffffffffff000000196fffffffffffffffffffffffffff0000005f612249565b9850505092916060873d6060116122cc575b8161229f60609383611c37565b810103126107fd578651604060208901519801519283151584036107fd5792979394919390611f2c612197565b3d9150612292565b7f70d645e3000000000000000000000000000000000000000000000000000000005f5260045ffd5b505f94508493505050565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016330361233957565b7f0c6d42ae000000000000000000000000000000000000000000000000000000005f5260045ffd5b8181029291811591840414171561200c57565b6001600160681b0303906001600160681b03821161200c57565b9190820391821161200c57565b81156123a5570490565b634e487b7160e01b5f52601260045260245ffd5b929091926123c7828561239b565b90811561248d576001600160a01b0316916001600160a01b03604051947fa9059cbb000000000000000000000000000000000000000000000000000000005f521693846004528260245260205f60448180885af19060015f511482161561247e575b604052612461575060207f9a380920405cd56ab6f7f5f2375bfc42aa8ef39f7e3f43d8f8f02bb4c925319291604051908152a3905f90565b61247a9350816124749296959350612361565b9061238e565b9190565b90843b15153d15161690612429565b50505050905f90565b91818310156125db5782156125b35782811080156125aa575b612582575f5461ffff808260c81c161461257c578382148015612573575b6125375768ffff000000000000009060901c16600160401b019182600160401b1161200c576125138261250d81612507886125199761238e565b9461238e565b92612361565b93612361565b90612524818361396f565b831092831561255f575b50505061253757565b7f7f043c76000000000000000000000000000000000000000000000000000000005f5260045ffd5b61256a92935061396f565b115f808061252e565b508282146124cd565b50505050565b7fdc5eefea000000000000000000000000000000000000000000000000000000005f5260045ffd5b508181116124af565b7f6b95e45f000000000000000000000000000000000000000000000000000000005f5260045ffd5b7fd6e666c0000000000000000000000000000000000000000000000000000000005f5260045ffd5b96989491999792909399610160525f61010052600f0b95861561336e57611dd26001600160a01b03936001600160801b03806126d395818f896126f99b5f54610100526040519b8c9a7f3b9009e00000000000000000000000000000000000000000000000000000000060208d01521660248b015216604489015261016051151560648901528d60848901521660a48701526101005160c487015216988960e48601521696876101048501526001600160801b038c16610124850152610140610144850152610164840191611d2e565b7f0000000000000000000000000000000000000000000000000000000000000000613a05565b5f6101a0526101605115613350575061271c906001600160801b038516906139fc565b6101a0525b5f811360a0819052156132f55761016051156132cf577f00000000000000000000000000000000000000000000000000000000000000005b025b60c08190525f60e05260a05115613293575b505f608060405161277d81611bff565b82815282602082015282604082015282606082015201525f60206040516127a381611c1b565b82815201526001600160801b0360c0511161326b57604051610140526127cb61014051611c1b565b60c05161014051525f60206101405101525f548060081c60010b908060801c60020b91805f52600460205260405f20956040519661280888611bff565b546001600160681b03811688526001600160681b038160681c16602089015261ffff8160d01c16604089015261ffff8160e01c16606089015260f01c60808801526305f5e1006affffff00000000000000008071ffffffffffffffffffff00000000000000006128816001600160801b038b168961385b565b9a61289f6001600160801b038c1661ffff6040840151168b0161385b565b9096610120526001600160681b038860181c16989b6101c052965f6101805260701c161616046101805260a051155f146132355790959290916001600160801b035f5b16965b610140515115612e165761016051156132275761ffff6080820151165b620f424069ffff0000000000000000610180519260401b16046101a051010161293261016051826101c0516138a7565b6129406101605183866138a7565b91600192610160515f14613195576001600160681b0360208601511615801561318d575b61311a575b835b612e3d575b505050610160515f14612e2c578315905b8115612e23575b5015612e16576101605115612d355750507f0000000000000000000000000000000000000000000000000000000000000000610120511315612a6857505f19610120510161012052610120515f52600460205260405f2091604051926129ed84611bff565b54926001600160681b03841681526001600160681b038460681c16602082015261ffff8460d01c169384604083015261ffff8160e01c16606083015260f01c6080820152906001600160681b039360020b9003956101c05192612a596001600160801b0388168961385b565b6101c0525b92909693916128e5565b9350509092505b610120516101205160010b03612d1a576fffffffffffffffffffffffffff000000612a9b5f5493614c7a565b60181b1690808060020b03612d035760801b72ffffff0000000000000000000000000000000016917fffffffffffffffffffffffffff000000000000000000000000000000000000ff62ffff006101205160081b1691161717175f5560a051155f14612ceb57602061014051015190610140515160c05103915b6101605115612ce357915f03915b6001600160801b0360e05116838160e05160801c01610160515f14612ca1576fffffffffffffffffffffffffffffffff199182916001600160801b03612b71600154928883851601036138e1565b16938491161760801c0160801b16176001555b80612c26575b50612be4612bbc60e051927f000000000000000000000000000000000000000000000000000000000000000090613e56565b937f000000000000000000000000000000000000000000000000000000000000000090613e56565b9183151580612c1d575b15612bf557565b7f2e5a4599000000000000000000000000000000000000000000000000000000005f5260045ffd5b50821515612bee565b6101605115612c67576fffffffffffffffffffffffffffffffff196001600160801b03612c5960025493828516016138e1565b169116176002555b5f612b8a565b6001600160801b036fffffffffffffffffffffffffffffffff19612c92600254938460801c016138e1565b60801b16911617600255612c61565b90506001600160801b0383816fffffffffffffffffffffffffffffffff19612cd2600154958a8760801c01036138e1565b60801b169316011617600155612b84565b915f03612b23565b610140515160c0510390602061014051015191612b15565b63327269a760e01b5f52601860045260245260445ffd5b63327269a760e01b5f5260106004526101205160245260445ffd5b939096917f0000000000000000000000000000000000000000000000000000000000000000610120511215612e095750612d8490600161012051016101205261ffff60405f9601511601614a1a565b60020b956101c052610120515f52600460205260405f2090612e0360405192612dac84611bff565b54926001600160681b03841681526001600160681b038460681c16602082015261ffff8460d01c169384604083015261ffff8160e01c16606083015260f01c6080820152926001600160801b03881690890161385b565b92612a5e565b9550939550505050612a6f565b5050935050909250612a6f565b9050155f612988565b6001600160681b0384101590612981565b612e4982939792614051565b9662ffffff5f5460981c1697612e63896101805187614077565b90610160515f146130c65760a0516130925790612e93949392916001600160801b038c169461014051908a61484f565b9490919491949293985b8415801590613089575b612eb4575b505050612970565b7fcad09799f755048f0fd388c6b2fcc8e0cebefd15756c6903522cc2a95f661f7095606095612f036001600160801b03936fffffffffffffffffffffffffffffffff19956101805190856149e6565b8484821691840360801b161760e0510160e052836040519661012051885284169160801b16176020860152169160801b16176040820152a1610120515f52600460205261307e60405f206001600160681b0384511681549079ffffffffffffffffffffffffff00000000000000000000000000602087015160681b16907fffffffff000000000000000000000000000000000000000000000000000000007bffff0000000000000000000000000000000000000000000000000000604089015160d01b169316171717815561302a61ffff60608601511682907fffff0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff7dffff0000000000000000000000000000000000000000000000000000000083549260e01b169116179055565b608084015181547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1660f09190911b7fffff00000000000000000000000000000000000000000000000000000000000016179055565b5f8080808080612eac565b50831515612ea7565b906130b394939291999e996001600160801b038c169461014051908a61450a565b959195939092939295939499039d612e9d565b60a0516130f957906130eb949392916001600160801b038c169461014051908a614377565b949091949194929398612e9d565b906130b394939291999e996001600160801b038c169461014051908a614098565b925060a051155f1461314f57816001600160801b038816101561313f575b5f92612969565b5050505050935050909250612a6f565b6001600160801b03871615158061317a575b61313f578a613138575050505050935050909250612a6f565b50816001600160801b0388161015613161565b508615612964565b6001600160681b03855116158015613216575b6131b3575b8361296b565b925060a051155f146131d857826001600160801b038816111561313f575b5f926131ad565b6001600160801b038716151580613203575b61313f578a6131d1575050505050935050909250612a6f565b50826001600160801b03881611156131ea565b506001600160681b038710156131a8565b61ffff606082015116612902565b6101605115613259576001600160801b0360015460801c5b979492979391936128e2565b6001600160801b03806001541661324d565b7fd29a971a000000000000000000000000000000000000000000000000000000005f5260045ffd5b61016051156132bd576001600160801b0360015460801c5b168091111561276d5760c0525f61276d565b6001600160801b0380600154166132ab565b7f0000000000000000000000000000000000000000000000000000000000000000612759565b6101605115613329577f0000000000000000000000000000000000000000000000000000000000000000905b5f030261275b565b7f000000000000000000000000000000000000000000000000000000000000000090613321565b61336591506001600160801b038516906139c5565b6101a052612721565b7f2c5211c6000000000000000000000000000000000000000000000000000000005f5260045ffd5b9081600f0b918083036133a65750565b63327269a760e01b5f52608060045260245260445ffd5b9d9a98969492909c9b99979593919d6040519e8f9e8f92602084017fe6a7bba00000000000000000000000000000000000000000000000000000000090526001600160a01b031660248401526001600160a01b0316604483015215159060640152600f0b60848d01526001600160801b031660a48c015260c48b015260e48a01526001600160801b03166101048901526001600160801b03166101248801526001600160801b0316610144870152600f0b610164860152600f0b6101848501526101a48401526101c483016101c090526101e483019061349c92611d2e565b03601f19810182526134ae9082611c37565b611f2c907f0000000000000000000000000000000000000000000000000000000000000000613a05565b949269ffffffffffffffffffff906001600160a01b036135199481611d159a989516895216602088015216604086015260a0606086015260a0850190611ccb565b926080818503910152611d2e565b9390611d159896936001600160a01b0361356b948169ffffffffffffffffffff949b999b16885216602087015216604085015260e0606085015260e0840190611ccb565b94608083015260a082015260c0818503910152611d2e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b038116611d1557506001600160a01b036003541690565b51906001600160801b03821682036107fd57565b3d15613610573d9067ffffffffffffffff8211611beb5760405191613605601f8201601f191660200184611c37565b82523d5f602084013e565b606090565b5f9060606001600160a01b03613629613583565b166004604051809581937f171755b10000000000000000000000000000000000000000000000000000000083525af1905f825f945f946136f4575b506136c957602060446136756135d6565b6040519283917f46a149300000000000000000000000000000000000000000000000000000000083528160048401528051918291826024860152018484015e5f828201840152601f01601f19168101030190fd5b6136ef6001600160801b0384166001600160801b0386166001600160801b038416612496565b929190565b94509250506060833d606011613746575b8161371260609383611c37565b810103126107fd57613723836135c2565b9261373c6040613735602084016135c2565b92016135c2565b939093925f613664565b3d9150613705565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526020816024816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa9081156107f2575f916137bd575090565b90506020813d6020116137e4575b816137d860209383611c37565b810103126107fd575190565b3d91506137cb565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526020816024816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa9081156107f2575f916137bd575090565b905f821261387257611d1591620f42400190613bc8565b611d1591620f42400190613bc8565b9161388b81612374565b910291020160016001600160681b035f19830104019015150290565b91156138c757600160401b0180600160401b1161200c57611d15916139b6565b600160401b0180600160401b1161200c57611d1591613998565b6001600160801b0381116138fb576001600160801b031690565b7f6dfcc650000000000000000000000000000000000000000000000000000000005f52608060045260245260445ffd5b604051602081017ff9e3ebd3e85cd613d06ad4241f62088baffa30fdac338bc1f1a252f9a3b224a3815260208252613964604083611c37565b9051902060ff191690565b9061397f81600160401b84613d73565b9080156123a557600160401b611d15930915159061203c565b600160401b611d15926139ac828285613d73565b920915159061203c565b90600160401b611d1592613d73565b906139cf9161396f565b7fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000810190811161200c5790565b6139cf9161396f565b918215613b1357915b600781168015611b6b57613a2190613ec5565b6001600160a01b03811615613aeb575f80602085019283828751925af1613a466135d6565b9015613ab6576020815110613a8e577fffffffff00000000000000000000000000000000000000000000000000000000602081920151925116911603613a8e5760031c613a0e565b7fa59c2303000000000000000000000000000000000000000000000000000000005f5260045ffd5b80519081613ae6577f3c82bb14000000000000000000000000000000000000000000000000000000005f5260045ffd5b602001fd5b7fdf42d72e000000000000000000000000000000000000000000000000000000005f5260045ffd5b915050565b916001600160a01b03604051927fa9059cbb000000000000000000000000000000000000000000000000000000005f521660045260245260205f60448180865af19060015f5114821615613ba7575b60405215613b725750565b6001600160a01b03907f5274afe7000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b906001811516613bbf57823b15153d15161690613b67565b503d5f823e3d90fd5b9091905f905f198482099084810292838084109303928084039314613c415782620f42401115613c2f57507fde8f6cefed634549b62c77574f722e1ac57e23f24d8fd5cb790fb65668c261399394620f4240910990828211900360fa1b910360061c170290565b634e487b71905260116020526024601cfd5b505050620f42409192500490565b5f19600160401b8209918160401b91828085109403938085039414613ce75783821115613ccf57600160401b829109815f0382168092046002816003021880820260020302808202600203028082026002030280820260020302808202600203028091026002030293600183805f03040190848311900302920304170290565b50634e487b715f52156003026011186020526024601cfd5b5090611d15925061239b565b5f19600160801b8209918160801b91828085109403938085039414613ce75783821115613ccf57600160801b829109815f0382168092046002816003021880820260020302808202600203028082026002030280820260020302808202600203028091026002030293600183805f03040190848311900302920304170290565b90915f198383099280830292838086109503948086039514613e045784831115613dec5790829109815f0382168092046002816003021880820260020302808202600203028082026002030280820260020302808202600203028091026002030293600183805f03040190848311900302920304170290565b82634e487b715f52156003026011186020526024601cfd5b505090611d15925061239b565b8015613e26576001600160801b030460010190565b634e487b715f5260126020526024601cfd5b908015613e2657613e4e6001915f19840161239b565b019015150290565b908015613e2657613e6690614a46565b908115613e26577f800000000000000000000000000000000000000000000000000000000000000081145f1983141661200c578181059180820715159182613eb8575b5050613eb25790565b60010190565b5f92501812155f80613ea9565b6004811015613f79576002811015613f2a57600114613f06577fa5724489000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f000000000000000000000000000000000000000000000000000000000000000090565b600214613f55577f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b6008811015614029576006811015613fda57600414613fb6577f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b600614614005577f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b7fa5724489000000000000000000000000000000000000000000000000000000005f5260045ffd5b80156140725780600160401b0180600160401b1161200c57611d1591613c4f565b505f90565b90811561409157620f4240611d1593828403020401613c4f565b5050505f90565b9697929095946140a9878783613881565b9889845160401b106143605780871161433757506001600160681b03905b6001600160681b03895116996140eb896001600160681b0303809c8b86030261239b565b9a60018c61410d6140fd878d88613881565b6141078684613998565b92613998565b010160011c98898751809111155f146141ab575050505050955b88156141a2575b5090602091850260401c93840260401c9482868203986001600160681b036141558c614c7a565b8183511603168152016001600160681b036141748a8284511601614cc4565b16905281510381520186815101905261419761418f87614a46565b5f0395614a46565b939594939280920390565b9550602061412e565b60019d50848293959c96949b506141d092916001600160681b038f5116908689614a9b565b996001600160681b038c5116998b6141ed86888303809e0261239b565b9e8f6141fd6140fd848888613881565b010160011c9b8c8a519287848310918261432b575b5050614287575b505050505050845190818910908161427d575b50614275575b808811614241575b5050614127565b6142689398506142549297919a0261239b565b97886001600160681b03895116910261239b565b8401948151945f8061423a565b965086614232565b905089105f61422c565b909192959f506142a394979c93969d5015614322575b0261239b565b806142bf575050505081519480965f995b5f8080808080614219565b88939b98999299018881115f1461431c575087985b89838c516001600160681b031686830302906142ef9161239b565b9c6142f992613881565b90614304908c613998565b9061430f908c613998565b0160010160011c966142b4565b986142d4565b6001925061429d565b909150108f8890614212565b8181111561436057614357906001600160681b0383808a0392030261239b565b908782116140c7575b50505050945050509050905f905f905f905f905f90565b969291939490979584516001600160681b03895116908181105f146144f957906143ab918b6001600160681b03030261239b565b8901988551945b828110614476575b508415614462576001836143f86143f16143ea8e876143e46020986144579c9a61445f9e9c613881565b95613881565b9287613998565b9186613998565b010160011c91820260401c96870260401c80970395818884039a6001600160681b0361442387614c7a565b8183511603168152016001600160681b036144428c8284511601614cc4565b16905283815103815201908151019052614a46565b5f0394614a46565b92565b98505f975087968796508695509350505050565b838111156144e457614496906001600160681b038580860392030261239b565b818111156144e4578a8110156143ba579950936144cb8a6001600160681b038b511687806001600160681b030392030261239b565b90808210156144dd57505b935f6143ba565b90506144d6565b5098505f975087968796508695509350505050565b50986001600160681b0399946143b2565b94929796979590956001600160681b0361452388612374565b88840290860201049883518a15613e265760018b67ffffffffffffffff0401116148385784811161481857505f5b602087019461456e896001600160681b038851168482030261239b565b9a60018c61459d6001600160681b0361458687612374565b86028988020104614597858461396f565b9261396f565b010160011c94858751809111155f1461463a5750505050965b8915614631575b50918161461a94936020930260401c95860260401c96878203946001600160681b036145e88d614c7a565b81835116031690526001600160681b03614606868284511601614cc4565b169052815103815201878151019052614a46565b9361462486614a46565b5f03939594939280920390565b965060206145bd565b60019d506146899192965061468490846001600160681b038b9e97969e511661466288612374565b9261466c88612374565b61467e61467889613e11565b94613e11565b94614a9b565b612374565b996001600160681b03885116958b6146a686828103809a0261239b565b9e8f6146cd6001600160681b036146bc85612374565b87028886020104614597868461396f565b010160011c97888a519287848310918261480c575b5050614754575b505050505050845190818510908161474a575b50614742575b808411614710575b506145b6565b909961471f939298500261239b565b966147386001600160681b038451168981038302613e38565b958251915f61470a565b925082614702565b905089115f6146fc565b909192959f5061476f94979893969d5015614322570261239b565b8061478a5750505050815190865f995b5f80808080806146e9565b929a919891939280831115614804578203985b848a106147fb575b8287516001600160681b03168b820302906147bf9161239b565b9b8a6147ca81612374565b6001600160681b03930291020104906147e3908c61396f565b906147ee908c61396f565b0160010160011c9261477f565b985083986147a5565b505f9861479d565b909150118f88906146e2565b614830906001600160681b0386808603920302613e38565b808811614551575b50505050505050909150905f905f905f905f905f90565b939497959291909781519360208601946001600160681b03865116908181105f146149dc57906148829181038c02613e38565b998351995b808410614961575b50891561494c579260018a6148e46148dd8e6001600160681b036149419a98602098826149479e9c6148c081612374565b84029083020104936148d181612374565b9102910201049361396f565b918d61396f565b010160011c92830260401c97880260401c80980396888403946001600160681b0361490e8d614c7a565b81835116031690526001600160681b0361492c868284511601614cc4565b16905289815103815201908151019052614a46565b94614a46565b5f0392565b99505f98508897889750879650945050505050565b828110156149c657614981906001600160681b0385808603920302613e38565b818110156149c657808c101561488f579a50986149ad8a8c6001600160681b038951169082030261239b565b90808210156149bf57505b985f61488f565b90506149b8565b5099505f98508897889750879650945050505050565b50995f9a99614887565b919082158015614a12575b614a0a57611d159382620f424092030204810191613d73565b505050505f90565b5081156149f1565b627fffff8113614a3e57627fffff198112614a355760020b90565b50627fffff1990565b50627fffff90565b7f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8111614a705790565b7f24775e06000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b939594919095614ad1614ab782614ab188612374565b9561238e565b916001600160681b03614aca8885612361565b049061203c565b905f948481151580614c71575b80614c68575b614b72575b5050505082159081614b68575b50614b5f575b808211614b57575b5083614b10828461203c565b1115614b475750825b81841115614b25575050565b611d1592935081105f14614b3f5760ff60015b169061203c565b60ff5f614b38565b614b51908261203c565b92614b19565b90505f614b04565b60019150614afc565b905015155f614af6565b614b80918460401b90613d73565b80614b8c575b84614ae9565b83614b9d929394965060801b613cf3565b91806d01fffffffffffffffffffffffffe02906d01fffffffffffffffffffffffffe82040361200c5782614bd092613d73565b7f3fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8116810361200c5760021b600160801b0180600160801b1161200c57614c1690614d09565b7f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8216820361200c5760401b600160801b0180600160801b1161200c57614c5f9160011b61239b565b915f8080614b86565b50801515614ae4565b50831515614ade565b6001600160681b038111614c94576001600160681b031690565b7f6dfcc650000000000000000000000000000000000000000000000000000000005f52606860045260245260445ffd5b6001600160681b038111614cde576001600160681b031690565b7f6ce2737a000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b6001811115611d1557806001600160801b831015614e1a575b600482600160401b614dcc941015614e0d575b640100000000811015614e00575b62010000811015614df3575b610100811015614de7575b6010811015614ddb575b1015614dd3575b60030260011c614d7b818461239b565b0160011c614d89818461239b565b0160011c614d97818461239b565b0160011c614da5818461239b565b0160011c614db3818461239b565b0160011c614dc1818461239b565b0160011c809261239b565b8111900390565b60011b614d6b565b811c9160021b91614d64565b60081c91811b91614d5a565b60101c9160081b91614d4f565b60201c9160101b91614d43565b60401c9160201b91614d35565b5050608081901c600160401b614d2256fea164736f6c6343000823000a0000000000000000000000002a53833cc95548cf52c7b159110e22d3a9018f320000000000000000000000009d39a5de30e57443bff2a8307a4256c8797a34970000000000000000000000004c9edd5852cd905f086c759e8383e09bff1e68b300000000000000000000000053404d4946c7696eaa562d7d2f8bc09d2838171c000000000000000000000000e4038fa09f0bb9963068afaf97be0c045155090d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000b0d0bf187be46f30000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000001329770000000000000000000000000000000000000000000000000000000000030d40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003a0000000000000000000000000000000000000000000000000000000000000168000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","recompiledBytecode":"0x61038060405234610708576156fe8038038061001a81610720565b92833981818101036103a081126107085761003483610745565b9061004160208501610745565b9361004e60408201610745565b9461005b60608301610745565b9560e0607f19850112610708576040519360e08501906001600160401b0382118683101761070c5760c09160405261009560808601610745565b86526100a360a08601610745565b60208701526100b3828601610745565b60408701526100c460e08601610745565b60608701526100d66101008601610745565b60808701526100e86101208601610745565b60a08701526100fa6101408601610745565b8683015261015f190112610708576040519660c088016001600160401b0381118982101761070c57604052610160840151885261018084015160208901526101a084015160408901526101c084015160608901526101e0840151608089015261020084015160a08901526102208401519081151582036107085761024085015161026086015190610280870151926102a0880151946102c0890151966101a36102e08b01610759565b986103008b01519c8d8060020b03610708576103208c01516001600160401b038111610708578f6101d9918e918201910161078c565b6103408d0151909f6001600160401b038211610708578d01908d01906101fe9161078c565b9f61020c6103608e01610759565b9c6103800161021a9061077d565b9d600160a01b60019003815116608052600160a01b6001900360208201511660a052600160a01b6001900360408201511660c052600160a01b6001900360608201511660e052600160a01b6001900360808201511661010052600160a01b6001900360a08201511661012052600160a01b600190039060c00151166101405280516101605260208101516101805260408101516101a05260608101516101c05260808101516101e05260a00151610200526102205261024052610260525f146106de5761032052600380546001600160a01b03191690555b610280526102a0526102c0526102e052610300525f805460c89490941b61ffff60c81b1660b09390931b62ffffff60b01b16600160801b600160d81b031990941660989290921b62ffffff60981b1691909117929092171762ffffff60801b60809390931b929092169190911781555b81518110156103fe578061037860019284610868565b51815f52600460205260405f2090838060681b0381511690825491600160681b8660d01b03602083015160681b169061ffff60d01b604084015160d01b169161ffff60e01b606085015160e01b1693608061ffff60f01b91015160f01b1694888060f01b039261ffff60e01b199163ffffffff60e01b1617161716171717905501610362565b505f5b82518110156104ad578061041760019285610868565b5161042961042483610890565b6108b4565b5f52600460205260405f2090838060681b0381511690825491600160681b8660d01b03602083015160681b169061ffff60d01b604084015160d01b169161ffff60e01b606085015160e01b1693608061ffff60f01b91015160f01b1694888060f01b039261ffff60e01b199163ffffffff60e01b1617161716171717905501610401565b5051905190806106d057505f195b61036052806106c257505f5b61034052604051614e3890816108c68239608051818181610bee0152613f08015260a051818181610c1e0152613f57015260c051818181610c4e0152613f33015260e051818181610c7e0152613fb8015261010051818181610cae0152613f94015261012051818181610cde0152614007015261014051818181610d0e0152613fe3015261016051818181610d360152611de2015261018051818181610d5d0152611f0801526101a051818181610d8401526120d701526101c051818181610dab01526121e801526101e051818181610dd201526126d5015261020051818181610df901526134b4015261022051818181610a2801528181610e2f015261231101526102405181818161081801528181610a540152818161187c01526138280152610260518181816106fa01528181610a83015281816118d4015261378a015261028051818181610aaa015281816118a1015281816119b60152818161273901528181612b97015261332b01526102a051818181610ad0015281816118f701528181611a3001528181612bbf015281816132d1015261330001526102c05181610af601526102e05181610b1c01526103005181610b42015261032051818181610b700152613585015261034051818181610b9801528181611107015261299b015261036051818181610bbf0152818161124f0152612d3b0152f35b6106cb90610890565b6104c7565b6106d9906108b4565b6104bb565b5f61032052600380546001600160a01b0319166001600160a01b03929092169190911790556102f2565b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b6040519190601f01601f191682016001600160401b0381118382101761070c57604052565b51906001600160a01b038216820361070857565b519062ffffff8216820361070857565b51906001600160681b038216820361070857565b519061ffff8216820361070857565b81601f82011215610708578051906001600160401b03821161070c576107b760208360051b01610720565b92602060a081868681520194028301019181831161070857602001925b8284106107e2575050505090565b60a084830312610708576040519060a08201906001600160401b0382118383101761070c5760a09260209260405261081987610769565b8152610826838801610769565b838201526108366040880161077d565b60408201526108476060880161077d565b60608201526108586080880161077d565b60808201528152019301926107d4565b805182101561087c5760209160051b010190565b634e487b7160e01b5f52603260045260245ffd5b600160ff1b81146108a0575f0390565b634e487b7160e01b5f52601160045260245ffd5b905f1982019182136001166108a05756fe6101e06040526004361015610012575f80fd5b5f6080525f3560e01c80630f7439531461179c5780631e2eaeaf146117805780631f21638c1461168c57806335fd631a14611636578063372aa224146115bc5780633ff20c8a1461158b5780635dd9a4c5146113fa578063658b6cb714611275578063943f3b1a1461108857806397962ef914610faf578063bcdb4dad14610957578063d83067861461092c578063dbd035ff14610892578063e24f0884146103e2578063ec069057146101c35763fbde1732146100ce575f80fd5b346101bd5760803660031901126101bd576100e7611abc565b6100ef611b00565b906044359067ffffffffffffffff82116101bd57604060031983360301126101bd5760643567ffffffffffffffff81116101bd57610131903690600401611ad2565b9161013a61392b565b5c61019157604094610179947fa147fd8f7d12de6da66feedc6d64a11bd371e5471ee1018f11f9072ede67a0fa61016f61392b565b5d60040191612049565b60805161018461392b565b5d82519182526020820152f35b7f3ee5aeb500000000000000000000000000000000000000000000000000000000608051526004608051fd5b60805180fd5b346101bd576080513660031901126101bd576101dd61392b565b5c610191576101ea61392b565b7f695543c3708653cda9d418b4ccd3be11368e40636c10c44b18cfe756b6d88b29905d610215613615565b6001600160801b0316806001600160801b0381931690610234916139c5565b926001600160801b031690610248916139fc565b9160805154928360081c60010b608051526004602052608051604090206040519061027282611bff565b54936001600160681b03851682528460681c6001600160681b0316602083015260408201908560d01c61ffff16825260608301928660e01c61ffff1684526080019560f01c86528660801c60020b6102ca828261385b565b925161ffff1601906102db9161385b565b8660181c6001600160681b03166102f181612374565b93516001600160681b039390940291020104946305f5e1006affffff000000000000000060709290921c919091160492600160401b620f424069ffff000000000000000060409490941b939093169290920401830181019081106103ca5769ffff000000000000000061037061036b620f42409388613998565b6138e1565b94516080515060401b160401016080515060805150600160401b019182600160401b116103ca576103ae61036b6040946001600160801b03936139b6565b916080516103ba61392b565b5d81845193168352166020820152f35b634e487b7160e01b6080515260116004526024608051fd5b346107fd5760c03660031901126107fd576103fb611abc565b60243580151581036107fd576044359081600f0b82036107fd57606435926001600160801b03841684036107fd5760843567ffffffffffffffff81116107fd57610449903690600401611ad2565b909360a43567ffffffffffffffff81116107fd5761046b903690600401611ad2565b909360ff5f541661086a5761047e61392b565b5c6108425785948389937f695543c3708653cda9d418b4ccd3be11368e40636c10c44b18cfe756b6d88b296104b161392b565b5d6104ce81846104bf613615565b9c91819a81988f948c33612603565b61010051919c9299909592908c15610725578d60805181126106e3575b506104f46137ec565b91333b156101bd578b908f61053a60405194859384937fc32510750000000000000000000000000000000000000000000000000000000085526080519660048601612020565b0381608051335af180156106d6576106bd575b5089608051811391826106a3575b505061067757848c6106539b60409f996105b0976106599f8b968f919d8f6001600160a01b039f5b6105996105936080515496613396565b99613396565b996001600160801b0381169060801c019a336133bd565b608051548951946f010000000000000000000000000000006effff000000000000000000000000006001600160681b038460181c169360601b169160805190600f0b1360781b1617178452876001600160801b03166fffffffffffffffffffffffffffffffff198660801b161760208501528884015216907f9734819749a91fc3be03ea83205f924ee08479bd3f0da48efc91d94d050cac1e60603392a3613396565b91613396565b60805161066461392b565b5d825191600f0b8252600f0b6020820152f35b7fbe79592100000000000000000000000000000000000000000000000000000000608051526004608051fd5b6106ad925061203c565b6106b56137ec565b10898f61055b565b6080516106c991611c37565b6080516101bd578e61054d565b6040513d608051823e3d90fd5b6106ef61071f91611fe0565b896001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016613b18565b8d6104eb565b905f8b12610801575b61073661374e565b91333b156107fd578e8c6107795f9360405195869485947fc325107500000000000000000000000000000000000000000000000000000000865260048601612020565b038183335af180156107f2576107de575b508c608051811391826107c4575b505061067757848c6106539b60409f996105b0976106599f8b968f919d8f6001600160a01b039f610583565b6107ce925061203c565b6107d661374e565b108c8f610798565b5f6107e891611c37565b5f6080528e61078a565b6040513d5f823e3d90fd5b5f80fd5b61083d61080d8c611fe0565b896001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016613b18565b61072e565b7f3ee5aeb5000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f51bd770c000000000000000000000000000000000000000000000000000000005f5260045ffd5b346107fd5760203660031901126107fd5760043567ffffffffffffffff81116107fd57366023820112156107fd5780600401359067ffffffffffffffff82116107fd578160051b9036602483830101116107fd5760408051809460208252602082015201918301916020806024604086019401925b8335548152019101908483821015610923575060208091610907565b60408186030190f35b346107fd575f3660031901126107fd576020610946611fa5565b6001600160a01b0360405191168152f35b346107fd575f3660031901126107fd575f6102e060405161097781611bce565b8281528260208201528260408201528260608201528260808201528260a08201528260c08201528260e08201528261010082015282610120820152826101408201528261016082015282610180820152826101a0820152826101c0820152826101e08201528261020082015282610220820152826102408201528261026082015282610280820152826102a0820152826102c08201520152610300604051610a1e81611bce565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001681526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001660208201526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001660408201527f000000000000000000000000000000000000000000000000000000000000000060608201527f000000000000000000000000000000000000000000000000000000000000000060808201527f000000000000000000000000000000000000000000000000000000000000000060a08201527f000000000000000000000000000000000000000000000000000000000000000060c08201527f000000000000000000000000000000000000000000000000000000000000000060e08201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166101008201527f00000000000000000000000000000000000000000000000000000000000000006101208201527f00000000000000000000000000000000000000000000000000000000000000006101408201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166101608201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166101808201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166101a08201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166101c08201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166101e08201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166102008201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166102208201527f00000000000000000000000000000000000000000000000000000000000000006102408201527f00000000000000000000000000000000000000000000000000000000000000006102608201527f00000000000000000000000000000000000000000000000000000000000000006102808201527f00000000000000000000000000000000000000000000000000000000000000006102a08201527f00000000000000000000000000000000000000000000000000000000000000006102c08201527f00000000000000000000000000000000000000000000000000000000000000006102e08201526102e0604051916001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001683526001600160a01b0360208201511660208401526001600160a01b036040820151166040840152606081015160608401526080810151608084015260a081015160a084015260c081015160c084015260e081015160e08401526001600160a01b03610100820151166101008401526101208101516101208401526101408101516101408401526001600160a01b03610160820151166101608401526001600160a01b03610180820151166101808401526001600160a01b036101a0820151166101a08401526001600160a01b036101c0820151166101c08401526001600160a01b036101e0820151166101e08401526001600160a01b03610200820151166102008401526001600160a01b03610220820151166102208401526102408101516102408401526102608101516102608401526102808101516102808401526102a08101516102a08401526102c08101516102c084015201516102e0820152f35b346107fd5760a03660031901126107fd57610fc8611abc565b610fd0611b00565b906044359067ffffffffffffffff82116107fd57604060031983360301126107fd5760643567ffffffffffffffff81116107fd57611012903690600401611ad2565b60849291923567ffffffffffffffff81116107fd57611035903690600401611ad2565b93909261104061392b565b5c6108425760409661107f967f3ff35dbce7a07ce455b128890d383c554afbc1b07cf7390a13e2d602a38c1a0a61107561392b565b5d60040191611d4e565b5f61018461392b565b346107fd5760603660031901126107fd576004358060010b8091036107fd5760243561ffff81168082036107fd576044359061ffff82168083036107fd576110ce612307565b6110d661392b565b5c610842577f6228ff59018d12017a2bb81d4aaee1d839faeb61bb29b616b08aec1d954bdf7c61110461392b565b5d7f00000000000000000000000000000000000000000000000000000000000000008512801561124c575b611220576112096040937f2a1317b5b5812150d82fa4b2e5ae289f62be0c42a042edbdc69b978673746a4795875f5260046020526111ba865f209182907fffff0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff7dffff0000000000000000000000000000000000000000000000000000000083549260e01b169116179055565b907dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffff00000000000000000000000000000000000000000000000000000000000083549260f01b169116179055565b82519182526020820152a25f61121d61392b565b5d005b847f64b6051e000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b507f0000000000000000000000000000000000000000000000000000000000000000851361112f565b346107fd576101203660031901126107fd5761128f611abc565b6024356001600160a01b03811681036107fd576044359081151582036107fd576064359283600f0b84036107fd57608435906001600160801b03821682036107fd5760a435906001600160801b038216938483036107fd5760c435936001600160801b038516948581036107fd5760e435906001600160801b038216958683036107fd576101043567ffffffffffffffff81116107fd57611334903690600401611ad2565b98909761133f61392b565b5c610842578885858f8f6113cc9f918f96918d8f61138d8f956113929c8e987fbaf2b3653c77cf277ac36a174e0624557a6829660e787388cf9abd21ceb18a4461138761392b565b5d612496565b612603565b909691956101005191979d8e979d8e946113b66113b05f5497613396565b9a613396565b9a6001600160801b0381169060801c019b6133bd565b7f1f6053de000000000000000000000000000000000000000000000000000000005f5260045260245260445ffd5b346107fd5760403660031901126107fd5760043562ffffff81168082036107fd576024359062ffffff8216928383036107fd57611435612307565b61143d61392b565b5c610842577ff88a537f51dde30be9a9960a2850ed980c30e495145525344f0f47ff82ba3b7361146b61392b565b5d5f549162ffffff8360981c168103611516575b5050505f549162ffffff8360b01c16810361149e575b5f61121d61392b565b7f4d14e59cea6a74cef5169f00d96334b2c0214358308e92227d7c47e943664b9c927fffffffffffffff000000ffffffffffffffffffffffffffffffffffffffffffff78ffffff0000000000000000000000000000000000000000000060209460b01b169116175f55604051908152a1808080611495565b7f0e7d070a63c6cf2ec01badac5543ae7bcd84ceebe76073c704e7f3e356f4f194927fffffffffffffffffffff000000ffffffffffffffffffffffffffffffffffffff75ffffff0000000000000000000000000000000000000060209460981b169116175f55604051908152a182808061147f565b346107fd5760203660031901126107fd5760043560ff811681036107fd576115ba906115b5612307565b611b19565b005b346107fd5760203660031901126107fd576001600160a01b036115dd611abc565b6115e5612307565b16807fffffffffffffffffffffffff000000000000000000000000000000000000000060035416176003557fb266add5f3044b17d27db796af992cecbe413921b4e8aaaee03c719e16b9806a5f80a2005b346107fd5760403660031901126107fd576024356004356040519160408360208152826020820152019060051b8301916001602060408501935b8354815201910190848382101561092357506020600191611670565b346107fd5760203660031901126107fd5760043561ffff8116908181036107fd576116b5612307565b6116bd61392b565b5c610842577faab56bc87c1aa4b7f07e347524cc16f26458efacbe0150d5f992ab348f9b5c9d6116eb61392b565b5d5f549161ffff8360c81c168103611706575f61121d61392b565b7f0262bdf5ceb29428fdaec304f1872012436cebf3ff5621c19bc17b61892940ea927fffffffffff0000ffffffffffffffffffffffffffffffffffffffffffffffffff7affff0000000000000000000000000000000000000000000000000060209460c81b169116175f55604051908152a1808080611495565b346107fd5760203660031901126107fd57600435545f5260205ff35b346107fd5760c03660031901126107fd576064356024356084356001600160a01b03811681036107fd5760a4356001600160a01b03811681036107fd576117e1612307565b6117e961392b565b5c610842577fd1d11922b700459ced204b3743fc4c79f65983a27e1363601f00585467c79c0761181761392b565b5d826004350192846044350192600754926008549460095493600a5497806119a3575b5050907f0f4f965b9381ad88a8ce70d51b86e6162cbebbdfa906901cb34fe0858b30b59697826080989796959493611955575b505094611932929394956119287f0000000000000000000000000000000000000000000000000000000000000000966118c97f00000000000000000000000000000000000000000000000000000000000000008092878b6123b9565b97906007558361191e7f0000000000000000000000000000000000000000000000000000000000000000809c7f0000000000000000000000000000000000000000000000000000000000000000998a926123b9565b9a906008556123b9565b97906009556123b9565b90600a55604051938452602084015260408301526060820152a15f61121d61392b565b61193294829892966002549061198761197a856001600160801b0385169d8e0261239b565b9485938e1c9a8b0261239b565b938491019901990301950301905f60025590959493928961186d565b9095939296946119b49892986137ec565b7f00000000000000000000000000000000000000000000000000000000000000006119de91612361565b968387600154996001600160801b038b166119f89161238e565b8489600254926001600160801b038416611a119161238e565b90611a1b9161238e565b90611a259161238e565b9a611a2e61374e565b7f0000000000000000000000000000000000000000000000000000000000000000611a5891612361565b9060801c611a659161238e565b9060801c611a729161238e565b90611a7c9161238e565b90611a869161238e565b95611a93848a840261239b565b938492880290611aa29161239b565b93849101970197030193030195888096929394959661183a565b600435906001600160a01b03821682036107fd57565b9181601f840112156107fd5782359167ffffffffffffffff83116107fd57602083818601950101116107fd57565b6024359069ffffffffffffffffffff821682036107fd57565b60ff1660028111611b70575f5460ff8116808314611b6b57827fd708418b295fcf080d236d5143d7d3a9e9694be43c2dedb73a16196b08daac569360409360ff1916175f5582519182526020820152a1565b505050565b7f39da1b10000000000000000000000000000000000000000000000000000000005f5260045ffd5b903590601e19813603018212156107fd570180359067ffffffffffffffff82116107fd57602001918160051b360383136107fd57565b610300810190811067ffffffffffffffff821117611beb57604052565b634e487b7160e01b5f52604160045260245ffd5b60a0810190811067ffffffffffffffff821117611beb57604052565b6040810190811067ffffffffffffffff821117611beb57604052565b90601f8019910116810190811067ffffffffffffffff821117611beb57604052565b9035601e19823603018112156107fd57016020813591019167ffffffffffffffff82116107fd578160051b360383136107fd57565b90918281527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83116107fd5760209260051b809284830137010190565b91906040810190611cdc8480611c59565b604083529283905260608201925f5b818110611d1857505050611d07846020611d1595960190611c59565b916020818503910152611c8e565b90565b8235855260209485019490920191600101611ceb565b908060209392818452848401375f828201840152601f01601f1916010190565b92959196949093611d5f8880611b98565b905015611f9857611d708880611b98565b9050611d7f60208a018a611b98565b91905003611f7057611e7996604091611e0687611de088611dd2898f8a908a519687957f0a2a56a600000000000000000000000000000000000000000000000000000000602088015233602488016134d8565b03601f198101835282611c37565b7f0000000000000000000000000000000000000000000000000000000000000000613a05565b82517fb10311de0000000000000000000000000000000000000000000000000000000081526001600160a01b038716600482015269ffffffffffffffffffff8816602482015261010060448201529889928392611e6761010485018e611ccb565b84810360031901606486015291611d2e565b60016084830152600460a4830152600560c4830152600660e483015203817300000000000000000000000000000000000000005af480156107f2575f965f91611f2e575b50611f0692611f2c95949282611dd29399809b6040519889977f9a2983050000000000000000000000000000000000000000000000000000000060208a01523360248a01613527565b7f0000000000000000000000000000000000000000000000000000000000000000613a05565b565b96505092916040863d604011611f68575b81611f4c60409383611c37565b810103126107fd57855160209096015192939092611f06611ebd565b3d9150611f3f565b7f8bea10c5000000000000000000000000000000000000000000000000000000005f5260045ffd5b505f965086955050505050565b7f695543c3708653cda9d418b4ccd3be11368e40636c10c44b18cfe756b6d88b29611fce61392b565b5c14611fd8575f90565b611d15613583565b7f8000000000000000000000000000000000000000000000000000000000000000811461200c575f0390565b634e487b7160e01b5f52601160045260245ffd5b611d159492606092825260208201528160408201520191611d2e565b9190820180921161200c57565b9091939492946120598580611b98565b9050156122fc5761206a8580611b98565b90506120796020870187611b98565b91905003611f70576001600160a01b038216958633036122d4576120fb6040517f90c26d990000000000000000000000000000000000000000000000000000000060208201526120d581611dd286868c8b8b33602488016134d8565b7f0000000000000000000000000000000000000000000000000000000000000000613a05565b604051967f9eb58677000000000000000000000000000000000000000000000000000000008852600488015269ffffffffffffffffffff8416602488015260e060448801526060878061215160e482018a611ccb565b6001606483015260046084830152600560a4830152600660c483015203817300000000000000000000000000000000000000005af49687156107f2575f5f915f99612280575b5092611f2c959492826121e695611dd2949a819c61220c575b6040519889977f016c32520000000000000000000000000000000000000000000000000000000060208a01523360248a01613527565b7f0000000000000000000000000000000000000000000000000000000000000000613a05565b5f545f8160081c60010b125f14612257576fffffffffffffffffffffffffff000000196fffffffffffffffffffffffffff0000006001600160681b035b60181b169116175f556121b0565b6fffffffffffffffffffffffffff000000196fffffffffffffffffffffffffff0000005f612249565b9850505092916060873d6060116122cc575b8161229f60609383611c37565b810103126107fd578651604060208901519801519283151584036107fd5792979394919390611f2c612197565b3d9150612292565b7f70d645e3000000000000000000000000000000000000000000000000000000005f5260045ffd5b505f94508493505050565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016330361233957565b7f0c6d42ae000000000000000000000000000000000000000000000000000000005f5260045ffd5b8181029291811591840414171561200c57565b6001600160681b0303906001600160681b03821161200c57565b9190820391821161200c57565b81156123a5570490565b634e487b7160e01b5f52601260045260245ffd5b929091926123c7828561239b565b90811561248d576001600160a01b0316916001600160a01b03604051947fa9059cbb000000000000000000000000000000000000000000000000000000005f521693846004528260245260205f60448180885af19060015f511482161561247e575b604052612461575060207f9a380920405cd56ab6f7f5f2375bfc42aa8ef39f7e3f43d8f8f02bb4c925319291604051908152a3905f90565b61247a9350816124749296959350612361565b9061238e565b9190565b90843b15153d15161690612429565b50505050905f90565b91818310156125db5782156125b35782811080156125aa575b612582575f5461ffff808260c81c161461257c578382148015612573575b6125375768ffff000000000000009060901c16600160401b019182600160401b1161200c576125138261250d81612507886125199761238e565b9461238e565b92612361565b93612361565b90612524818361396f565b831092831561255f575b50505061253757565b7f7f043c76000000000000000000000000000000000000000000000000000000005f5260045ffd5b61256a92935061396f565b115f808061252e565b508282146124cd565b50505050565b7fdc5eefea000000000000000000000000000000000000000000000000000000005f5260045ffd5b508181116124af565b7f6b95e45f000000000000000000000000000000000000000000000000000000005f5260045ffd5b7fd6e666c0000000000000000000000000000000000000000000000000000000005f5260045ffd5b96989491999792909399610160525f61010052600f0b95861561336e57611dd26001600160a01b03936001600160801b03806126d395818f896126f99b5f54610100526040519b8c9a7f3b9009e00000000000000000000000000000000000000000000000000000000060208d01521660248b015216604489015261016051151560648901528d60848901521660a48701526101005160c487015216988960e48601521696876101048501526001600160801b038c16610124850152610140610144850152610164840191611d2e565b7f0000000000000000000000000000000000000000000000000000000000000000613a05565b5f6101a0526101605115613350575061271c906001600160801b038516906139fc565b6101a0525b5f811360a0819052156132f55761016051156132cf577f00000000000000000000000000000000000000000000000000000000000000005b025b60c08190525f60e05260a05115613293575b505f608060405161277d81611bff565b82815282602082015282604082015282606082015201525f60206040516127a381611c1b565b82815201526001600160801b0360c0511161326b57604051610140526127cb61014051611c1b565b60c05161014051525f60206101405101525f548060081c60010b908060801c60020b91805f52600460205260405f20956040519661280888611bff565b546001600160681b03811688526001600160681b038160681c16602089015261ffff8160d01c16604089015261ffff8160e01c16606089015260f01c60808801526305f5e1006affffff00000000000000008071ffffffffffffffffffff00000000000000006128816001600160801b038b168961385b565b9a61289f6001600160801b038c1661ffff6040840151168b0161385b565b9096610120526001600160681b038860181c16989b6101c052965f6101805260701c161616046101805260a051155f146132355790959290916001600160801b035f5b16965b610140515115612e165761016051156132275761ffff6080820151165b620f424069ffff0000000000000000610180519260401b16046101a051010161293261016051826101c0516138a7565b6129406101605183866138a7565b91600192610160515f14613195576001600160681b0360208601511615801561318d575b61311a575b835b612e3d575b505050610160515f14612e2c578315905b8115612e23575b5015612e16576101605115612d355750507f0000000000000000000000000000000000000000000000000000000000000000610120511315612a6857505f19610120510161012052610120515f52600460205260405f2091604051926129ed84611bff565b54926001600160681b03841681526001600160681b038460681c16602082015261ffff8460d01c169384604083015261ffff8160e01c16606083015260f01c6080820152906001600160681b039360020b9003956101c05192612a596001600160801b0388168961385b565b6101c0525b92909693916128e5565b9350509092505b610120516101205160010b03612d1a576fffffffffffffffffffffffffff000000612a9b5f5493614c7a565b60181b1690808060020b03612d035760801b72ffffff0000000000000000000000000000000016917fffffffffffffffffffffffffff000000000000000000000000000000000000ff62ffff006101205160081b1691161717175f5560a051155f14612ceb57602061014051015190610140515160c05103915b6101605115612ce357915f03915b6001600160801b0360e05116838160e05160801c01610160515f14612ca1576fffffffffffffffffffffffffffffffff199182916001600160801b03612b71600154928883851601036138e1565b16938491161760801c0160801b16176001555b80612c26575b50612be4612bbc60e051927f000000000000000000000000000000000000000000000000000000000000000090613e56565b937f000000000000000000000000000000000000000000000000000000000000000090613e56565b9183151580612c1d575b15612bf557565b7f2e5a4599000000000000000000000000000000000000000000000000000000005f5260045ffd5b50821515612bee565b6101605115612c67576fffffffffffffffffffffffffffffffff196001600160801b03612c5960025493828516016138e1565b169116176002555b5f612b8a565b6001600160801b036fffffffffffffffffffffffffffffffff19612c92600254938460801c016138e1565b60801b16911617600255612c61565b90506001600160801b0383816fffffffffffffffffffffffffffffffff19612cd2600154958a8760801c01036138e1565b60801b169316011617600155612b84565b915f03612b23565b610140515160c0510390602061014051015191612b15565b63327269a760e01b5f52601860045260245260445ffd5b63327269a760e01b5f5260106004526101205160245260445ffd5b939096917f0000000000000000000000000000000000000000000000000000000000000000610120511215612e095750612d8490600161012051016101205261ffff60405f9601511601614a1a565b60020b956101c052610120515f52600460205260405f2090612e0360405192612dac84611bff565b54926001600160681b03841681526001600160681b038460681c16602082015261ffff8460d01c169384604083015261ffff8160e01c16606083015260f01c6080820152926001600160801b03881690890161385b565b92612a5e565b9550939550505050612a6f565b5050935050909250612a6f565b9050155f612988565b6001600160681b0384101590612981565b612e4982939792614051565b9662ffffff5f5460981c1697612e63896101805187614077565b90610160515f146130c65760a0516130925790612e93949392916001600160801b038c169461014051908a61484f565b9490919491949293985b8415801590613089575b612eb4575b505050612970565b7fcad09799f755048f0fd388c6b2fcc8e0cebefd15756c6903522cc2a95f661f7095606095612f036001600160801b03936fffffffffffffffffffffffffffffffff19956101805190856149e6565b8484821691840360801b161760e0510160e052836040519661012051885284169160801b16176020860152169160801b16176040820152a1610120515f52600460205261307e60405f206001600160681b0384511681549079ffffffffffffffffffffffffff00000000000000000000000000602087015160681b16907fffffffff000000000000000000000000000000000000000000000000000000007bffff0000000000000000000000000000000000000000000000000000604089015160d01b169316171717815561302a61ffff60608601511682907fffff0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff7dffff0000000000000000000000000000000000000000000000000000000083549260e01b169116179055565b608084015181547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1660f09190911b7fffff00000000000000000000000000000000000000000000000000000000000016179055565b5f8080808080612eac565b50831515612ea7565b906130b394939291999e996001600160801b038c169461014051908a61450a565b959195939092939295939499039d612e9d565b60a0516130f957906130eb949392916001600160801b038c169461014051908a614377565b949091949194929398612e9d565b906130b394939291999e996001600160801b038c169461014051908a614098565b925060a051155f1461314f57816001600160801b038816101561313f575b5f92612969565b5050505050935050909250612a6f565b6001600160801b03871615158061317a575b61313f578a613138575050505050935050909250612a6f565b50816001600160801b0388161015613161565b508615612964565b6001600160681b03855116158015613216575b6131b3575b8361296b565b925060a051155f146131d857826001600160801b038816111561313f575b5f926131ad565b6001600160801b038716151580613203575b61313f578a6131d1575050505050935050909250612a6f565b50826001600160801b03881611156131ea565b506001600160681b038710156131a8565b61ffff606082015116612902565b6101605115613259576001600160801b0360015460801c5b979492979391936128e2565b6001600160801b03806001541661324d565b7fd29a971a000000000000000000000000000000000000000000000000000000005f5260045ffd5b61016051156132bd576001600160801b0360015460801c5b168091111561276d5760c0525f61276d565b6001600160801b0380600154166132ab565b7f0000000000000000000000000000000000000000000000000000000000000000612759565b6101605115613329577f0000000000000000000000000000000000000000000000000000000000000000905b5f030261275b565b7f000000000000000000000000000000000000000000000000000000000000000090613321565b61336591506001600160801b038516906139c5565b6101a052612721565b7f2c5211c6000000000000000000000000000000000000000000000000000000005f5260045ffd5b9081600f0b918083036133a65750565b63327269a760e01b5f52608060045260245260445ffd5b9d9a98969492909c9b99979593919d6040519e8f9e8f92602084017fe6a7bba00000000000000000000000000000000000000000000000000000000090526001600160a01b031660248401526001600160a01b0316604483015215159060640152600f0b60848d01526001600160801b031660a48c015260c48b015260e48a01526001600160801b03166101048901526001600160801b03166101248801526001600160801b0316610144870152600f0b610164860152600f0b6101848501526101a48401526101c483016101c090526101e483019061349c92611d2e565b03601f19810182526134ae9082611c37565b611f2c907f0000000000000000000000000000000000000000000000000000000000000000613a05565b949269ffffffffffffffffffff906001600160a01b036135199481611d159a989516895216602088015216604086015260a0606086015260a0850190611ccb565b926080818503910152611d2e565b9390611d159896936001600160a01b0361356b948169ffffffffffffffffffff949b999b16885216602087015216604085015260e0606085015260e0840190611ccb565b94608083015260a082015260c0818503910152611d2e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b038116611d1557506001600160a01b036003541690565b51906001600160801b03821682036107fd57565b3d15613610573d9067ffffffffffffffff8211611beb5760405191613605601f8201601f191660200184611c37565b82523d5f602084013e565b606090565b5f9060606001600160a01b03613629613583565b166004604051809581937f171755b10000000000000000000000000000000000000000000000000000000083525af1905f825f945f946136f4575b506136c957602060446136756135d6565b6040519283917f46a149300000000000000000000000000000000000000000000000000000000083528160048401528051918291826024860152018484015e5f828201840152601f01601f19168101030190fd5b6136ef6001600160801b0384166001600160801b0386166001600160801b038416612496565b929190565b94509250506060833d606011613746575b8161371260609383611c37565b810103126107fd57613723836135c2565b9261373c6040613735602084016135c2565b92016135c2565b939093925f613664565b3d9150613705565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526020816024816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa9081156107f2575f916137bd575090565b90506020813d6020116137e4575b816137d860209383611c37565b810103126107fd575190565b3d91506137cb565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526020816024816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa9081156107f2575f916137bd575090565b905f821261387257611d1591620f42400190613bc8565b611d1591620f42400190613bc8565b9161388b81612374565b910291020160016001600160681b035f19830104019015150290565b91156138c757600160401b0180600160401b1161200c57611d15916139b6565b600160401b0180600160401b1161200c57611d1591613998565b6001600160801b0381116138fb576001600160801b031690565b7f6dfcc650000000000000000000000000000000000000000000000000000000005f52608060045260245260445ffd5b604051602081017ff9e3ebd3e85cd613d06ad4241f62088baffa30fdac338bc1f1a252f9a3b224a3815260208252613964604083611c37565b9051902060ff191690565b9061397f81600160401b84613d73565b9080156123a557600160401b611d15930915159061203c565b600160401b611d15926139ac828285613d73565b920915159061203c565b90600160401b611d1592613d73565b906139cf9161396f565b7fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000810190811161200c5790565b6139cf9161396f565b918215613b1357915b600781168015611b6b57613a2190613ec5565b6001600160a01b03811615613aeb575f80602085019283828751925af1613a466135d6565b9015613ab6576020815110613a8e577fffffffff00000000000000000000000000000000000000000000000000000000602081920151925116911603613a8e5760031c613a0e565b7fa59c2303000000000000000000000000000000000000000000000000000000005f5260045ffd5b80519081613ae6577f3c82bb14000000000000000000000000000000000000000000000000000000005f5260045ffd5b602001fd5b7fdf42d72e000000000000000000000000000000000000000000000000000000005f5260045ffd5b915050565b916001600160a01b03604051927fa9059cbb000000000000000000000000000000000000000000000000000000005f521660045260245260205f60448180865af19060015f5114821615613ba7575b60405215613b725750565b6001600160a01b03907f5274afe7000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b906001811516613bbf57823b15153d15161690613b67565b503d5f823e3d90fd5b9091905f905f198482099084810292838084109303928084039314613c415782620f42401115613c2f57507fde8f6cefed634549b62c77574f722e1ac57e23f24d8fd5cb790fb65668c261399394620f4240910990828211900360fa1b910360061c170290565b634e487b71905260116020526024601cfd5b505050620f42409192500490565b5f19600160401b8209918160401b91828085109403938085039414613ce75783821115613ccf57600160401b829109815f0382168092046002816003021880820260020302808202600203028082026002030280820260020302808202600203028091026002030293600183805f03040190848311900302920304170290565b50634e487b715f52156003026011186020526024601cfd5b5090611d15925061239b565b5f19600160801b8209918160801b91828085109403938085039414613ce75783821115613ccf57600160801b829109815f0382168092046002816003021880820260020302808202600203028082026002030280820260020302808202600203028091026002030293600183805f03040190848311900302920304170290565b90915f198383099280830292838086109503948086039514613e045784831115613dec5790829109815f0382168092046002816003021880820260020302808202600203028082026002030280820260020302808202600203028091026002030293600183805f03040190848311900302920304170290565b82634e487b715f52156003026011186020526024601cfd5b505090611d15925061239b565b8015613e26576001600160801b030460010190565b634e487b715f5260126020526024601cfd5b908015613e2657613e4e6001915f19840161239b565b019015150290565b908015613e2657613e6690614a46565b908115613e26577f800000000000000000000000000000000000000000000000000000000000000081145f1983141661200c578181059180820715159182613eb8575b5050613eb25790565b60010190565b5f92501812155f80613ea9565b6004811015613f79576002811015613f2a57600114613f06577fa5724489000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f000000000000000000000000000000000000000000000000000000000000000090565b600214613f55577f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b6008811015614029576006811015613fda57600414613fb6577f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b600614614005577f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b7fa5724489000000000000000000000000000000000000000000000000000000005f5260045ffd5b80156140725780600160401b0180600160401b1161200c57611d1591613c4f565b505f90565b90811561409157620f4240611d1593828403020401613c4f565b5050505f90565b9697929095946140a9878783613881565b9889845160401b106143605780871161433757506001600160681b03905b6001600160681b03895116996140eb896001600160681b0303809c8b86030261239b565b9a60018c61410d6140fd878d88613881565b6141078684613998565b92613998565b010160011c98898751809111155f146141ab575050505050955b88156141a2575b5090602091850260401c93840260401c9482868203986001600160681b036141558c614c7a565b8183511603168152016001600160681b036141748a8284511601614cc4565b16905281510381520186815101905261419761418f87614a46565b5f0395614a46565b939594939280920390565b9550602061412e565b60019d50848293959c96949b506141d092916001600160681b038f5116908689614a9b565b996001600160681b038c5116998b6141ed86888303809e0261239b565b9e8f6141fd6140fd848888613881565b010160011c9b8c8a519287848310918261432b575b5050614287575b505050505050845190818910908161427d575b50614275575b808811614241575b5050614127565b6142689398506142549297919a0261239b565b97886001600160681b03895116910261239b565b8401948151945f8061423a565b965086614232565b905089105f61422c565b909192959f506142a394979c93969d5015614322575b0261239b565b806142bf575050505081519480965f995b5f8080808080614219565b88939b98999299018881115f1461431c575087985b89838c516001600160681b031686830302906142ef9161239b565b9c6142f992613881565b90614304908c613998565b9061430f908c613998565b0160010160011c966142b4565b986142d4565b6001925061429d565b909150108f8890614212565b8181111561436057614357906001600160681b0383808a0392030261239b565b908782116140c7575b50505050945050509050905f905f905f905f905f90565b969291939490979584516001600160681b03895116908181105f146144f957906143ab918b6001600160681b03030261239b565b8901988551945b828110614476575b508415614462576001836143f86143f16143ea8e876143e46020986144579c9a61445f9e9c613881565b95613881565b9287613998565b9186613998565b010160011c91820260401c96870260401c80970395818884039a6001600160681b0361442387614c7a565b8183511603168152016001600160681b036144428c8284511601614cc4565b16905283815103815201908151019052614a46565b5f0394614a46565b92565b98505f975087968796508695509350505050565b838111156144e457614496906001600160681b038580860392030261239b565b818111156144e4578a8110156143ba579950936144cb8a6001600160681b038b511687806001600160681b030392030261239b565b90808210156144dd57505b935f6143ba565b90506144d6565b5098505f975087968796508695509350505050565b50986001600160681b0399946143b2565b94929796979590956001600160681b0361452388612374565b88840290860201049883518a15613e265760018b67ffffffffffffffff0401116148385784811161481857505f5b602087019461456e896001600160681b038851168482030261239b565b9a60018c61459d6001600160681b0361458687612374565b86028988020104614597858461396f565b9261396f565b010160011c94858751809111155f1461463a5750505050965b8915614631575b50918161461a94936020930260401c95860260401c96878203946001600160681b036145e88d614c7a565b81835116031690526001600160681b03614606868284511601614cc4565b169052815103815201878151019052614a46565b9361462486614a46565b5f03939594939280920390565b965060206145bd565b60019d506146899192965061468490846001600160681b038b9e97969e511661466288612374565b9261466c88612374565b61467e61467889613e11565b94613e11565b94614a9b565b612374565b996001600160681b03885116958b6146a686828103809a0261239b565b9e8f6146cd6001600160681b036146bc85612374565b87028886020104614597868461396f565b010160011c97888a519287848310918261480c575b5050614754575b505050505050845190818510908161474a575b50614742575b808411614710575b506145b6565b909961471f939298500261239b565b966147386001600160681b038451168981038302613e38565b958251915f61470a565b925082614702565b905089115f6146fc565b909192959f5061476f94979893969d5015614322570261239b565b8061478a5750505050815190865f995b5f80808080806146e9565b929a919891939280831115614804578203985b848a106147fb575b8287516001600160681b03168b820302906147bf9161239b565b9b8a6147ca81612374565b6001600160681b03930291020104906147e3908c61396f565b906147ee908c61396f565b0160010160011c9261477f565b985083986147a5565b505f9861479d565b909150118f88906146e2565b614830906001600160681b0386808603920302613e38565b808811614551575b50505050505050909150905f905f905f905f905f90565b939497959291909781519360208601946001600160681b03865116908181105f146149dc57906148829181038c02613e38565b998351995b808410614961575b50891561494c579260018a6148e46148dd8e6001600160681b036149419a98602098826149479e9c6148c081612374565b84029083020104936148d181612374565b9102910201049361396f565b918d61396f565b010160011c92830260401c97880260401c80980396888403946001600160681b0361490e8d614c7a565b81835116031690526001600160681b0361492c868284511601614cc4565b16905289815103815201908151019052614a46565b94614a46565b5f0392565b99505f98508897889750879650945050505050565b828110156149c657614981906001600160681b0385808603920302613e38565b818110156149c657808c101561488f579a50986149ad8a8c6001600160681b038951169082030261239b565b90808210156149bf57505b985f61488f565b90506149b8565b5099505f98508897889750879650945050505050565b50995f9a99614887565b919082158015614a12575b614a0a57611d159382620f424092030204810191613d73565b505050505f90565b5081156149f1565b627fffff8113614a3e57627fffff198112614a355760020b90565b50627fffff1990565b50627fffff90565b7f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8111614a705790565b7f24775e06000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b939594919095614ad1614ab782614ab188612374565b9561238e565b916001600160681b03614aca8885612361565b049061203c565b905f948481151580614c71575b80614c68575b614b72575b5050505082159081614b68575b50614b5f575b808211614b57575b5083614b10828461203c565b1115614b475750825b81841115614b25575050565b611d1592935081105f14614b3f5760ff60015b169061203c565b60ff5f614b38565b614b51908261203c565b92614b19565b90505f614b04565b60019150614afc565b905015155f614af6565b614b80918460401b90613d73565b80614b8c575b84614ae9565b83614b9d929394965060801b613cf3565b91806d01fffffffffffffffffffffffffe02906d01fffffffffffffffffffffffffe82040361200c5782614bd092613d73565b7f3fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8116810361200c5760021b600160801b0180600160801b1161200c57614c1690614d09565b7f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8216820361200c5760401b600160801b0180600160801b1161200c57614c5f9160011b61239b565b915f8080614b86565b50801515614ae4565b50831515614ade565b6001600160681b038111614c94576001600160681b031690565b7f6dfcc650000000000000000000000000000000000000000000000000000000005f52606860045260245260445ffd5b6001600160681b038111614cde576001600160681b031690565b7f6ce2737a000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b6001811115611d1557806001600160801b831015614e1a575b600482600160401b614dcc941015614e0d575b640100000000811015614e00575b62010000811015614df3575b610100811015614de7575b6010811015614ddb575b1015614dd3575b60030260011c614d7b818461239b565b0160011c614d89818461239b565b0160011c614d97818461239b565b0160011c614da5818461239b565b0160011c614db3818461239b565b0160011c614dc1818461239b565b0160011c809261239b565b8111900390565b60011b614d6b565b811c9160021b91614d64565b60081c91811b91614d5a565b60101c9160081b91614d4f565b60201c9160101b91614d43565b60401c9160201b91614d35565b5050608081901c600160401b614d2256fea164736f6c6343000823000a","sourceMap":"2568:41509:2:-:0;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;-1:-1:-1;;2568:41509:2;;;;;;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;:::i;:::-;;;;;;;;;;:::i;:::-;;;;;;;;;;:::i;:::-;;;;;;;;;;:::i;:::-;;;;;;;;;;:::i;:::-;;;;;;;;;;:::i;:::-;;;;;-1:-1:-1;;2568:41509:2;;;;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;;;;;:::i;:::-;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;;2166:35:0;2568:41509:2;;;;;;;;;;;;2207:35:0;2568:41509:2;;;;;;;;;;;;2248:35:0;2568:41509:2;;;;;;;;;;;;2289:35:0;2568:41509:2;;;;;;;;;;;;2330:35:0;2568:41509:2;;;;;;;;;;;;2371:35:0;2568:41509:2;;;;;;;;;;;;2412:35:0;2568:41509:2;;;2453:63:0;2568:41509:2;;;;;2522:61:0;2568:41509:2;;;;;2589:69:0;2568:41509:2;;;;;2664:67:0;2568:41509:2;;;;;2737:46:0;2568:41509:2;;;;2789:44:0;2568:41509:2;6997:17;2568:41509;7020:15;2568:41509;7041:15;7063:214;;;;2568:41509;7099:41;7148:26;2568:41509;;-1:-1:-1;;;;;;2568:41509:2;;;7063:214;2568:41509;7283:48;2568:41509;7337:48;2568:41509;7392:70;2568:41509;7468:70;2568:41509;7544:59;-1:-1:-1;2568:41509:2;;;;;;;-1:-1:-1;;;2568:41509:2;;;;;;-1:-1:-1;;;2568:41509:2;-1:-1:-1;;;;;;;;2568:41509:2;;;;;;;;-1:-1:-1;;;2568:41509:2;;;;;;;;;;-1:-1:-1;;;2568:41509:2;;;;;;;;;;;;;;;7857:3;2568:41509;;7824:31;;;;;8009:23;;2568:41509;8009:23;;;:::i;:::-;;2568:41509;-1:-1:-1;2568:41509:2;7985:10;2568:41509;;;-1:-1:-1;2568:41509:2;;;;;;;;;;;;;;-1:-1:-1;;;2568:41509:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7809:13;;7824:31;;-1:-1:-1;8094:3:2;2568:41509;;8064:28;;;;;8251:20;;2568:41509;8251:20;;;:::i;:::-;;8233:14;:10;;;:::i;:::-;:14;:::i;:::-;-1:-1:-1;2568:41509:2;7985:10;2568:41509;;;-1:-1:-1;2568:41509:2;;;;;;;;;;;;;;-1:-1:-1;;;2568:41509:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8049:13;;8064:28;-1:-1:-1;2568:41509:2;;;;8500:7;;;-1:-1:-1;;;8500:37:2;2568:41509;8486:51;8667:9;;;:37;-1:-1:-1;8667:37:2;2568:41509;8654:50;2568:41509;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8667:37;8691:13;;;:::i;:::-;8667:37;;8500;8523:14;;;:::i;:::-;8500:37;;7063:214;-1:-1:-1;2568:41509:2;7195:37;7240:30;2568:41509;;-1:-1:-1;;;;;;2568:41509:2;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;7063:214;;2568:41509;-1:-1:-1;2568:41509:2;;;;;;-1:-1:-1;2568:41509:2;;;;;-1:-1:-1;2568:41509:2;;;;;;;;-1:-1:-1;;2568:41509:2;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;:::o;:::-;;;-1:-1:-1;;;;;2568:41509:2;;;;;;:::o;:::-;;;;;;;;;;:::o;:::-;;;-1:-1:-1;;;;;2568:41509:2;;;;;;:::o;:::-;;;;;;;;;;:::o;:::-;;;;;;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;:::i;:::-;;;;;;;;;;:::i;:::-;;;;;;;;;;:::i;:::-;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;-1:-1:-1;;;2568:41509:2;;;;;;;:::o;:::-;;;;;;;;;;;;;;8517:2;;2568:41509;;;;;;;;;:::o","linkReferences":{"contracts/libraries/LiquidityLib.sol":{"LiquidityLib":[{"start":10079,"length":20},{"start":10807,"length":20}]}},"cborAuxdata":{"1":{"value":"0xa164736f6c6343000823000a","offset":22258}},"transformations":[{"id":"lib/metric-core/contracts/libraries/LiquidityLib.sol:LiquidityLib","type":"replace","offset":10079,"reason":"library"},{"id":"lib/metric-core/contracts/libraries/LiquidityLib.sol:LiquidityLib","type":"replace","offset":10807,"reason":"library"},{"type":"insert","offset":22270,"reason":"constructorArguments"}],"transformationValues":{"libraries":{"lib/metric-core/contracts/libraries/LiquidityLib.sol:LiquidityLib":"0xe0b1576ac63a582e6740a7e1dcfbbef730539cd4"},"constructorArguments":"0x0000000000000000000000002a53833cc95548cf52c7b159110e22d3a9018f320000000000000000000000009d39a5de30e57443bff2a8307a4256c8797a34970000000000000000000000004c9edd5852cd905f086c759e8383e09bff1e68b300000000000000000000000053404d4946c7696eaa562d7d2f8bc09d2838171c000000000000000000000000e4038fa09f0bb9963068afaf97be0c045155090d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000b0d0bf187be46f30000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000001329770000000000000000000000000000000000000000000000000000000000030d40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003a0000000000000000000000000000000000000000000000000000000000000168000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"}},"runtimeBytecode":{"onchainBytecode":"0x6101e06040526004361015610012575f80fd5b5f6080525f3560e01c80630f7439531461179c5780631e2eaeaf146117805780631f21638c1461168c57806335fd631a14611636578063372aa224146115bc5780633ff20c8a1461158b5780635dd9a4c5146113fa578063658b6cb714611275578063943f3b1a1461108857806397962ef914610faf578063bcdb4dad14610957578063d83067861461092c578063dbd035ff14610892578063e24f0884146103e2578063ec069057146101c35763fbde1732146100ce575f80fd5b346101bd5760803660031901126101bd576100e7611abc565b6100ef611b00565b906044359067ffffffffffffffff82116101bd57604060031983360301126101bd5760643567ffffffffffffffff81116101bd57610131903690600401611ad2565b9161013a61392b565b5c61019157604094610179947fa147fd8f7d12de6da66feedc6d64a11bd371e5471ee1018f11f9072ede67a0fa61016f61392b565b5d60040191612049565b60805161018461392b565b5d82519182526020820152f35b7f3ee5aeb500000000000000000000000000000000000000000000000000000000608051526004608051fd5b60805180fd5b346101bd576080513660031901126101bd576101dd61392b565b5c610191576101ea61392b565b7f695543c3708653cda9d418b4ccd3be11368e40636c10c44b18cfe756b6d88b29905d610215613615565b6001600160801b0316806001600160801b0381931690610234916139c5565b926001600160801b031690610248916139fc565b9160805154928360081c60010b608051526004602052608051604090206040519061027282611bff565b54936001600160681b03851682528460681c6001600160681b0316602083015260408201908560d01c61ffff16825260608301928660e01c61ffff1684526080019560f01c86528660801c60020b6102ca828261385b565b925161ffff1601906102db9161385b565b8660181c6001600160681b03166102f181612374565b93516001600160681b039390940291020104946305f5e1006affffff000000000000000060709290921c919091160492600160401b620f424069ffff000000000000000060409490941b939093169290920401830181019081106103ca5769ffff000000000000000061037061036b620f42409388613998565b6138e1565b94516080515060401b160401016080515060805150600160401b019182600160401b116103ca576103ae61036b6040946001600160801b03936139b6565b916080516103ba61392b565b5d81845193168352166020820152f35b634e487b7160e01b6080515260116004526024608051fd5b346107fd5760c03660031901126107fd576103fb611abc565b60243580151581036107fd576044359081600f0b82036107fd57606435926001600160801b03841684036107fd5760843567ffffffffffffffff81116107fd57610449903690600401611ad2565b909360a43567ffffffffffffffff81116107fd5761046b903690600401611ad2565b909360ff5f541661086a5761047e61392b565b5c6108425785948389937f695543c3708653cda9d418b4ccd3be11368e40636c10c44b18cfe756b6d88b296104b161392b565b5d6104ce81846104bf613615565b9c91819a81988f948c33612603565b61010051919c9299909592908c15610725578d60805181126106e3575b506104f46137ec565b91333b156101bd578b908f61053a60405194859384937fc32510750000000000000000000000000000000000000000000000000000000085526080519660048601612020565b0381608051335af180156106d6576106bd575b5089608051811391826106a3575b505061067757848c6106539b60409f996105b0976106599f8b968f919d8f6001600160a01b039f5b6105996105936080515496613396565b99613396565b996001600160801b0381169060801c019a336133bd565b608051548951946f010000000000000000000000000000006effff000000000000000000000000006001600160681b038460181c169360601b169160805190600f0b1360781b1617178452876001600160801b03166fffffffffffffffffffffffffffffffff198660801b161760208501528884015216907f9734819749a91fc3be03ea83205f924ee08479bd3f0da48efc91d94d050cac1e60603392a3613396565b91613396565b60805161066461392b565b5d825191600f0b8252600f0b6020820152f35b7fbe79592100000000000000000000000000000000000000000000000000000000608051526004608051fd5b6106ad925061203c565b6106b56137ec565b10898f61055b565b6080516106c991611c37565b6080516101bd578e61054d565b6040513d608051823e3d90fd5b6106ef61071f91611fe0565b896001600160a01b037f0000000000000000000000004c9edd5852cd905f086c759e8383e09bff1e68b316613b18565b8d6104eb565b905f8b12610801575b61073661374e565b91333b156107fd578e8c6107795f9360405195869485947fc325107500000000000000000000000000000000000000000000000000000000865260048601612020565b038183335af180156107f2576107de575b508c608051811391826107c4575b505061067757848c6106539b60409f996105b0976106599f8b968f919d8f6001600160a01b039f610583565b6107ce925061203c565b6107d661374e565b108c8f610798565b5f6107e891611c37565b5f6080528e61078a565b6040513d5f823e3d90fd5b5f80fd5b61083d61080d8c611fe0565b896001600160a01b037f0000000000000000000000009d39a5de30e57443bff2a8307a4256c8797a349716613b18565b61072e565b7f3ee5aeb5000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f51bd770c000000000000000000000000000000000000000000000000000000005f5260045ffd5b346107fd5760203660031901126107fd5760043567ffffffffffffffff81116107fd57366023820112156107fd5780600401359067ffffffffffffffff82116107fd578160051b9036602483830101116107fd5760408051809460208252602082015201918301916020806024604086019401925b8335548152019101908483821015610923575060208091610907565b60408186030190f35b346107fd575f3660031901126107fd576020610946611fa5565b6001600160a01b0360405191168152f35b346107fd575f3660031901126107fd575f6102e060405161097781611bce565b8281528260208201528260408201528260608201528260808201528260a08201528260c08201528260e08201528261010082015282610120820152826101408201528261016082015282610180820152826101a0820152826101c0820152826101e08201528261020082015282610220820152826102408201528261026082015282610280820152826102a0820152826102c08201520152610300604051610a1e81611bce565b6001600160a01b037f0000000000000000000000002a53833cc95548cf52c7b159110e22d3a9018f321681526001600160a01b037f0000000000000000000000009d39a5de30e57443bff2a8307a4256c8797a34971660208201526001600160a01b037f0000000000000000000000004c9edd5852cd905f086c759e8383e09bff1e68b31660408201527f000000000000000000000000000000000000000000000000000000000000000160608201527f000000000000000000000000000000000000000000000000000000000000000160808201527f0000000000000000000000000000000000000000000000000b0d0bf187be46f360a08201527f0000000000000000000000000000000000000000000000000de0b6b3a764000060c08201527f000000000000000000000000000000000000000000000000000000000013297760e08201526001600160a01b037f00000000000000000000000053404d4946c7696eaa562d7d2f8bc09d2838171c166101008201527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe26101208201527f000000000000000000000000000000000000000000000000000000000000001d6101408201526001600160a01b037f000000000000000000000000e4038fa09f0bb9963068afaf97be0c045155090d166101608201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166101808201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166101a08201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166101c08201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166101e08201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166102008201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166102208201527f00000000000000000000000000000000000000000000000000000000000000006102408201527f00000000000000000000000000000000000000000000000000000000000000006102608201527f00000000000000000000000000000000000000000000000000000000000000006102808201527f00000000000000000000000000000000000000000000000000000000000000006102a08201527f00000000000000000000000000000000000000000000000000000000000000006102c08201527f00000000000000000000000000000000000000000000000000000000000000016102e08201526102e0604051916001600160a01b037f0000000000000000000000002a53833cc95548cf52c7b159110e22d3a9018f321683526001600160a01b0360208201511660208401526001600160a01b036040820151166040840152606081015160608401526080810151608084015260a081015160a084015260c081015160c084015260e081015160e08401526001600160a01b03610100820151166101008401526101208101516101208401526101408101516101408401526001600160a01b03610160820151166101608401526001600160a01b03610180820151166101808401526001600160a01b036101a0820151166101a08401526001600160a01b036101c0820151166101c08401526001600160a01b036101e0820151166101e08401526001600160a01b03610200820151166102008401526001600160a01b03610220820151166102208401526102408101516102408401526102608101516102608401526102808101516102808401526102a08101516102a08401526102c08101516102c084015201516102e0820152f35b346107fd5760a03660031901126107fd57610fc8611abc565b610fd0611b00565b906044359067ffffffffffffffff82116107fd57604060031983360301126107fd5760643567ffffffffffffffff81116107fd57611012903690600401611ad2565b60849291923567ffffffffffffffff81116107fd57611035903690600401611ad2565b93909261104061392b565b5c6108425760409661107f967f3ff35dbce7a07ce455b128890d383c554afbc1b07cf7390a13e2d602a38c1a0a61107561392b565b5d60040191611d4e565b5f61018461392b565b346107fd5760603660031901126107fd576004358060010b8091036107fd5760243561ffff81168082036107fd576044359061ffff82168083036107fd576110ce612307565b6110d661392b565b5c610842577f6228ff59018d12017a2bb81d4aaee1d839faeb61bb29b616b08aec1d954bdf7c61110461392b565b5d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe28512801561124c575b611220576112096040937f2a1317b5b5812150d82fa4b2e5ae289f62be0c42a042edbdc69b978673746a4795875f5260046020526111ba865f209182907fffff0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff7dffff0000000000000000000000000000000000000000000000000000000083549260e01b169116179055565b907dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffff00000000000000000000000000000000000000000000000000000000000083549260f01b169116179055565b82519182526020820152a25f61121d61392b565b5d005b847f64b6051e000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b507f000000000000000000000000000000000000000000000000000000000000001d851361112f565b346107fd576101203660031901126107fd5761128f611abc565b6024356001600160a01b03811681036107fd576044359081151582036107fd576064359283600f0b84036107fd57608435906001600160801b03821682036107fd5760a435906001600160801b038216938483036107fd5760c435936001600160801b038516948581036107fd5760e435906001600160801b038216958683036107fd576101043567ffffffffffffffff81116107fd57611334903690600401611ad2565b98909761133f61392b565b5c610842578885858f8f6113cc9f918f96918d8f61138d8f956113929c8e987fbaf2b3653c77cf277ac36a174e0624557a6829660e787388cf9abd21ceb18a4461138761392b565b5d612496565b612603565b909691956101005191979d8e979d8e946113b66113b05f5497613396565b9a613396565b9a6001600160801b0381169060801c019b6133bd565b7f1f6053de000000000000000000000000000000000000000000000000000000005f5260045260245260445ffd5b346107fd5760403660031901126107fd5760043562ffffff81168082036107fd576024359062ffffff8216928383036107fd57611435612307565b61143d61392b565b5c610842577ff88a537f51dde30be9a9960a2850ed980c30e495145525344f0f47ff82ba3b7361146b61392b565b5d5f549162ffffff8360981c168103611516575b5050505f549162ffffff8360b01c16810361149e575b5f61121d61392b565b7f4d14e59cea6a74cef5169f00d96334b2c0214358308e92227d7c47e943664b9c927fffffffffffffff000000ffffffffffffffffffffffffffffffffffffffffffff78ffffff0000000000000000000000000000000000000000000060209460b01b169116175f55604051908152a1808080611495565b7f0e7d070a63c6cf2ec01badac5543ae7bcd84ceebe76073c704e7f3e356f4f194927fffffffffffffffffffff000000ffffffffffffffffffffffffffffffffffffff75ffffff0000000000000000000000000000000000000060209460981b169116175f55604051908152a182808061147f565b346107fd5760203660031901126107fd5760043560ff811681036107fd576115ba906115b5612307565b611b19565b005b346107fd5760203660031901126107fd576001600160a01b036115dd611abc565b6115e5612307565b16807fffffffffffffffffffffffff000000000000000000000000000000000000000060035416176003557fb266add5f3044b17d27db796af992cecbe413921b4e8aaaee03c719e16b9806a5f80a2005b346107fd5760403660031901126107fd576024356004356040519160408360208152826020820152019060051b8301916001602060408501935b8354815201910190848382101561092357506020600191611670565b346107fd5760203660031901126107fd5760043561ffff8116908181036107fd576116b5612307565b6116bd61392b565b5c610842577faab56bc87c1aa4b7f07e347524cc16f26458efacbe0150d5f992ab348f9b5c9d6116eb61392b565b5d5f549161ffff8360c81c168103611706575f61121d61392b565b7f0262bdf5ceb29428fdaec304f1872012436cebf3ff5621c19bc17b61892940ea927fffffffffff0000ffffffffffffffffffffffffffffffffffffffffffffffffff7affff0000000000000000000000000000000000000000000000000060209460c81b169116175f55604051908152a1808080611495565b346107fd5760203660031901126107fd57600435545f5260205ff35b346107fd5760c03660031901126107fd576064356024356084356001600160a01b03811681036107fd5760a4356001600160a01b03811681036107fd576117e1612307565b6117e961392b565b5c610842577fd1d11922b700459ced204b3743fc4c79f65983a27e1363601f00585467c79c0761181761392b565b5d826004350192846044350192600754926008549460095493600a5497806119a3575b5050907f0f4f965b9381ad88a8ce70d51b86e6162cbebbdfa906901cb34fe0858b30b59697826080989796959493611955575b505094611932929394956119287f0000000000000000000000009d39a5de30e57443bff2a8307a4256c8797a3497966118c97f00000000000000000000000000000000000000000000000000000000000000018092878b6123b9565b97906007558361191e7f0000000000000000000000004c9edd5852cd905f086c759e8383e09bff1e68b3809c7f0000000000000000000000000000000000000000000000000000000000000001998a926123b9565b9a906008556123b9565b97906009556123b9565b90600a55604051938452602084015260408301526060820152a15f61121d61392b565b61193294829892966002549061198761197a856001600160801b0385169d8e0261239b565b9485938e1c9a8b0261239b565b938491019901990301950301905f60025590959493928961186d565b9095939296946119b49892986137ec565b7f00000000000000000000000000000000000000000000000000000000000000016119de91612361565b968387600154996001600160801b038b166119f89161238e565b8489600254926001600160801b038416611a119161238e565b90611a1b9161238e565b90611a259161238e565b9a611a2e61374e565b7f0000000000000000000000000000000000000000000000000000000000000001611a5891612361565b9060801c611a659161238e565b9060801c611a729161238e565b90611a7c9161238e565b90611a869161238e565b95611a93848a840261239b565b938492880290611aa29161239b565b93849101970197030193030195888096929394959661183a565b600435906001600160a01b03821682036107fd57565b9181601f840112156107fd5782359167ffffffffffffffff83116107fd57602083818601950101116107fd57565b6024359069ffffffffffffffffffff821682036107fd57565b60ff1660028111611b70575f5460ff8116808314611b6b57827fd708418b295fcf080d236d5143d7d3a9e9694be43c2dedb73a16196b08daac569360409360ff1916175f5582519182526020820152a1565b505050565b7f39da1b10000000000000000000000000000000000000000000000000000000005f5260045ffd5b903590601e19813603018212156107fd570180359067ffffffffffffffff82116107fd57602001918160051b360383136107fd57565b610300810190811067ffffffffffffffff821117611beb57604052565b634e487b7160e01b5f52604160045260245ffd5b60a0810190811067ffffffffffffffff821117611beb57604052565b6040810190811067ffffffffffffffff821117611beb57604052565b90601f8019910116810190811067ffffffffffffffff821117611beb57604052565b9035601e19823603018112156107fd57016020813591019167ffffffffffffffff82116107fd578160051b360383136107fd57565b90918281527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83116107fd5760209260051b809284830137010190565b91906040810190611cdc8480611c59565b604083529283905260608201925f5b818110611d1857505050611d07846020611d1595960190611c59565b916020818503910152611c8e565b90565b8235855260209485019490920191600101611ceb565b908060209392818452848401375f828201840152601f01601f1916010190565b92959196949093611d5f8880611b98565b905015611f9857611d708880611b98565b9050611d7f60208a018a611b98565b91905003611f7057611e7996604091611e0687611de088611dd2898f8a908a519687957f0a2a56a600000000000000000000000000000000000000000000000000000000602088015233602488016134d8565b03601f198101835282611c37565b7f0000000000000000000000000000000000000000000000000000000000000000613a05565b82517fb10311de0000000000000000000000000000000000000000000000000000000081526001600160a01b038716600482015269ffffffffffffffffffff8816602482015261010060448201529889928392611e6761010485018e611ccb565b84810360031901606486015291611d2e565b60016084830152600460a4830152600560c4830152600660e4830152038173e0b1576ac63a582e6740a7e1dcfbbef730539cd45af480156107f2575f965f91611f2e575b50611f0692611f2c95949282611dd29399809b6040519889977f9a2983050000000000000000000000000000000000000000000000000000000060208a01523360248a01613527565b7f0000000000000000000000000000000000000000000000000000000000000000613a05565b565b96505092916040863d604011611f68575b81611f4c60409383611c37565b810103126107fd57855160209096015192939092611f06611ebd565b3d9150611f3f565b7f8bea10c5000000000000000000000000000000000000000000000000000000005f5260045ffd5b505f965086955050505050565b7f695543c3708653cda9d418b4ccd3be11368e40636c10c44b18cfe756b6d88b29611fce61392b565b5c14611fd8575f90565b611d15613583565b7f8000000000000000000000000000000000000000000000000000000000000000811461200c575f0390565b634e487b7160e01b5f52601160045260245ffd5b611d159492606092825260208201528160408201520191611d2e565b9190820180921161200c57565b9091939492946120598580611b98565b9050156122fc5761206a8580611b98565b90506120796020870187611b98565b91905003611f70576001600160a01b038216958633036122d4576120fb6040517f90c26d990000000000000000000000000000000000000000000000000000000060208201526120d581611dd286868c8b8b33602488016134d8565b7f0000000000000000000000000000000000000000000000000000000000000000613a05565b604051967f9eb58677000000000000000000000000000000000000000000000000000000008852600488015269ffffffffffffffffffff8416602488015260e060448801526060878061215160e482018a611ccb565b6001606483015260046084830152600560a4830152600660c4830152038173e0b1576ac63a582e6740a7e1dcfbbef730539cd45af49687156107f2575f5f915f99612280575b5092611f2c959492826121e695611dd2949a819c61220c575b6040519889977f016c32520000000000000000000000000000000000000000000000000000000060208a01523360248a01613527565b7f0000000000000000000000000000000000000000000000000000000000000000613a05565b5f545f8160081c60010b125f14612257576fffffffffffffffffffffffffff000000196fffffffffffffffffffffffffff0000006001600160681b035b60181b169116175f556121b0565b6fffffffffffffffffffffffffff000000196fffffffffffffffffffffffffff0000005f612249565b9850505092916060873d6060116122cc575b8161229f60609383611c37565b810103126107fd578651604060208901519801519283151584036107fd5792979394919390611f2c612197565b3d9150612292565b7f70d645e3000000000000000000000000000000000000000000000000000000005f5260045ffd5b505f94508493505050565b6001600160a01b037f0000000000000000000000002a53833cc95548cf52c7b159110e22d3a9018f3216330361233957565b7f0c6d42ae000000000000000000000000000000000000000000000000000000005f5260045ffd5b8181029291811591840414171561200c57565b6001600160681b0303906001600160681b03821161200c57565b9190820391821161200c57565b81156123a5570490565b634e487b7160e01b5f52601260045260245ffd5b929091926123c7828561239b565b90811561248d576001600160a01b0316916001600160a01b03604051947fa9059cbb000000000000000000000000000000000000000000000000000000005f521693846004528260245260205f60448180885af19060015f511482161561247e575b604052612461575060207f9a380920405cd56ab6f7f5f2375bfc42aa8ef39f7e3f43d8f8f02bb4c925319291604051908152a3905f90565b61247a9350816124749296959350612361565b9061238e565b9190565b90843b15153d15161690612429565b50505050905f90565b91818310156125db5782156125b35782811080156125aa575b612582575f5461ffff808260c81c161461257c578382148015612573575b6125375768ffff000000000000009060901c16600160401b019182600160401b1161200c576125138261250d81612507886125199761238e565b9461238e565b92612361565b93612361565b90612524818361396f565b831092831561255f575b50505061253757565b7f7f043c76000000000000000000000000000000000000000000000000000000005f5260045ffd5b61256a92935061396f565b115f808061252e565b508282146124cd565b50505050565b7fdc5eefea000000000000000000000000000000000000000000000000000000005f5260045ffd5b508181116124af565b7f6b95e45f000000000000000000000000000000000000000000000000000000005f5260045ffd5b7fd6e666c0000000000000000000000000000000000000000000000000000000005f5260045ffd5b96989491999792909399610160525f61010052600f0b95861561336e57611dd26001600160a01b03936001600160801b03806126d395818f896126f99b5f54610100526040519b8c9a7f3b9009e00000000000000000000000000000000000000000000000000000000060208d01521660248b015216604489015261016051151560648901528d60848901521660a48701526101005160c487015216988960e48601521696876101048501526001600160801b038c16610124850152610140610144850152610164840191611d2e565b7f0000000000000000000000000000000000000000000000000000000000000000613a05565b5f6101a0526101605115613350575061271c906001600160801b038516906139fc565b6101a0525b5f811360a0819052156132f55761016051156132cf577f00000000000000000000000000000000000000000000000000000000000000015b025b60c08190525f60e05260a05115613293575b505f608060405161277d81611bff565b82815282602082015282604082015282606082015201525f60206040516127a381611c1b565b82815201526001600160801b0360c0511161326b57604051610140526127cb61014051611c1b565b60c05161014051525f60206101405101525f548060081c60010b908060801c60020b91805f52600460205260405f20956040519661280888611bff565b546001600160681b03811688526001600160681b038160681c16602089015261ffff8160d01c16604089015261ffff8160e01c16606089015260f01c60808801526305f5e1006affffff00000000000000008071ffffffffffffffffffff00000000000000006128816001600160801b038b168961385b565b9a61289f6001600160801b038c1661ffff6040840151168b0161385b565b9096610120526001600160681b038860181c16989b6101c052965f6101805260701c161616046101805260a051155f146132355790959290916001600160801b035f5b16965b610140515115612e165761016051156132275761ffff6080820151165b620f424069ffff0000000000000000610180519260401b16046101a051010161293261016051826101c0516138a7565b6129406101605183866138a7565b91600192610160515f14613195576001600160681b0360208601511615801561318d575b61311a575b835b612e3d575b505050610160515f14612e2c578315905b8115612e23575b5015612e16576101605115612d355750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe2610120511315612a6857505f19610120510161012052610120515f52600460205260405f2091604051926129ed84611bff565b54926001600160681b03841681526001600160681b038460681c16602082015261ffff8460d01c169384604083015261ffff8160e01c16606083015260f01c6080820152906001600160681b039360020b9003956101c05192612a596001600160801b0388168961385b565b6101c0525b92909693916128e5565b9350509092505b610120516101205160010b03612d1a576fffffffffffffffffffffffffff000000612a9b5f5493614c7a565b60181b1690808060020b03612d035760801b72ffffff0000000000000000000000000000000016917fffffffffffffffffffffffffff000000000000000000000000000000000000ff62ffff006101205160081b1691161717175f5560a051155f14612ceb57602061014051015190610140515160c05103915b6101605115612ce357915f03915b6001600160801b0360e05116838160e05160801c01610160515f14612ca1576fffffffffffffffffffffffffffffffff199182916001600160801b03612b71600154928883851601036138e1565b16938491161760801c0160801b16176001555b80612c26575b50612be4612bbc60e051927f000000000000000000000000000000000000000000000000000000000000000190613e56565b937f000000000000000000000000000000000000000000000000000000000000000190613e56565b9183151580612c1d575b15612bf557565b7f2e5a4599000000000000000000000000000000000000000000000000000000005f5260045ffd5b50821515612bee565b6101605115612c67576fffffffffffffffffffffffffffffffff196001600160801b03612c5960025493828516016138e1565b169116176002555b5f612b8a565b6001600160801b036fffffffffffffffffffffffffffffffff19612c92600254938460801c016138e1565b60801b16911617600255612c61565b90506001600160801b0383816fffffffffffffffffffffffffffffffff19612cd2600154958a8760801c01036138e1565b60801b169316011617600155612b84565b915f03612b23565b610140515160c0510390602061014051015191612b15565b63327269a760e01b5f52601860045260245260445ffd5b63327269a760e01b5f5260106004526101205160245260445ffd5b939096917f000000000000000000000000000000000000000000000000000000000000001d610120511215612e095750612d8490600161012051016101205261ffff60405f9601511601614a1a565b60020b956101c052610120515f52600460205260405f2090612e0360405192612dac84611bff565b54926001600160681b03841681526001600160681b038460681c16602082015261ffff8460d01c169384604083015261ffff8160e01c16606083015260f01c6080820152926001600160801b03881690890161385b565b92612a5e565b9550939550505050612a6f565b5050935050909250612a6f565b9050155f612988565b6001600160681b0384101590612981565b612e4982939792614051565b9662ffffff5f5460981c1697612e63896101805187614077565b90610160515f146130c65760a0516130925790612e93949392916001600160801b038c169461014051908a61484f565b9490919491949293985b8415801590613089575b612eb4575b505050612970565b7fcad09799f755048f0fd388c6b2fcc8e0cebefd15756c6903522cc2a95f661f7095606095612f036001600160801b03936fffffffffffffffffffffffffffffffff19956101805190856149e6565b8484821691840360801b161760e0510160e052836040519661012051885284169160801b16176020860152169160801b16176040820152a1610120515f52600460205261307e60405f206001600160681b0384511681549079ffffffffffffffffffffffffff00000000000000000000000000602087015160681b16907fffffffff000000000000000000000000000000000000000000000000000000007bffff0000000000000000000000000000000000000000000000000000604089015160d01b169316171717815561302a61ffff60608601511682907fffff0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff7dffff0000000000000000000000000000000000000000000000000000000083549260e01b169116179055565b608084015181547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1660f09190911b7fffff00000000000000000000000000000000000000000000000000000000000016179055565b5f8080808080612eac565b50831515612ea7565b906130b394939291999e996001600160801b038c169461014051908a61450a565b959195939092939295939499039d612e9d565b60a0516130f957906130eb949392916001600160801b038c169461014051908a614377565b949091949194929398612e9d565b906130b394939291999e996001600160801b038c169461014051908a614098565b925060a051155f1461314f57816001600160801b038816101561313f575b5f92612969565b5050505050935050909250612a6f565b6001600160801b03871615158061317a575b61313f578a613138575050505050935050909250612a6f565b50816001600160801b0388161015613161565b508615612964565b6001600160681b03855116158015613216575b6131b3575b8361296b565b925060a051155f146131d857826001600160801b038816111561313f575b5f926131ad565b6001600160801b038716151580613203575b61313f578a6131d1575050505050935050909250612a6f565b50826001600160801b03881611156131ea565b506001600160681b038710156131a8565b61ffff606082015116612902565b6101605115613259576001600160801b0360015460801c5b979492979391936128e2565b6001600160801b03806001541661324d565b7fd29a971a000000000000000000000000000000000000000000000000000000005f5260045ffd5b61016051156132bd576001600160801b0360015460801c5b168091111561276d5760c0525f61276d565b6001600160801b0380600154166132ab565b7f0000000000000000000000000000000000000000000000000000000000000001612759565b6101605115613329577f0000000000000000000000000000000000000000000000000000000000000001905b5f030261275b565b7f000000000000000000000000000000000000000000000000000000000000000190613321565b61336591506001600160801b038516906139c5565b6101a052612721565b7f2c5211c6000000000000000000000000000000000000000000000000000000005f5260045ffd5b9081600f0b918083036133a65750565b63327269a760e01b5f52608060045260245260445ffd5b9d9a98969492909c9b99979593919d6040519e8f9e8f92602084017fe6a7bba00000000000000000000000000000000000000000000000000000000090526001600160a01b031660248401526001600160a01b0316604483015215159060640152600f0b60848d01526001600160801b031660a48c015260c48b015260e48a01526001600160801b03166101048901526001600160801b03166101248801526001600160801b0316610144870152600f0b610164860152600f0b6101848501526101a48401526101c483016101c090526101e483019061349c92611d2e565b03601f19810182526134ae9082611c37565b611f2c907f0000000000000000000000000000000000000000000000000000000000000001613a05565b949269ffffffffffffffffffff906001600160a01b036135199481611d159a989516895216602088015216604086015260a0606086015260a0850190611ccb565b926080818503910152611d2e565b9390611d159896936001600160a01b0361356b948169ffffffffffffffffffff949b999b16885216602087015216604085015260e0606085015260e0840190611ccb565b94608083015260a082015260c0818503910152611d2e565b7f00000000000000000000000053404d4946c7696eaa562d7d2f8bc09d2838171c6001600160a01b038116611d1557506001600160a01b036003541690565b51906001600160801b03821682036107fd57565b3d15613610573d9067ffffffffffffffff8211611beb5760405191613605601f8201601f191660200184611c37565b82523d5f602084013e565b606090565b5f9060606001600160a01b03613629613583565b166004604051809581937f171755b10000000000000000000000000000000000000000000000000000000083525af1905f825f945f946136f4575b506136c957602060446136756135d6565b6040519283917f46a149300000000000000000000000000000000000000000000000000000000083528160048401528051918291826024860152018484015e5f828201840152601f01601f19168101030190fd5b6136ef6001600160801b0384166001600160801b0386166001600160801b038416612496565b929190565b94509250506060833d606011613746575b8161371260609383611c37565b810103126107fd57613723836135c2565b9261373c6040613735602084016135c2565b92016135c2565b939093925f613664565b3d9150613705565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526020816024816001600160a01b037f0000000000000000000000004c9edd5852cd905f086c759e8383e09bff1e68b3165afa9081156107f2575f916137bd575090565b90506020813d6020116137e4575b816137d860209383611c37565b810103126107fd575190565b3d91506137cb565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526020816024816001600160a01b037f0000000000000000000000009d39a5de30e57443bff2a8307a4256c8797a3497165afa9081156107f2575f916137bd575090565b905f821261387257611d1591620f42400190613bc8565b611d1591620f42400190613bc8565b9161388b81612374565b910291020160016001600160681b035f19830104019015150290565b91156138c757600160401b0180600160401b1161200c57611d15916139b6565b600160401b0180600160401b1161200c57611d1591613998565b6001600160801b0381116138fb576001600160801b031690565b7f6dfcc650000000000000000000000000000000000000000000000000000000005f52608060045260245260445ffd5b604051602081017ff9e3ebd3e85cd613d06ad4241f62088baffa30fdac338bc1f1a252f9a3b224a3815260208252613964604083611c37565b9051902060ff191690565b9061397f81600160401b84613d73565b9080156123a557600160401b611d15930915159061203c565b600160401b611d15926139ac828285613d73565b920915159061203c565b90600160401b611d1592613d73565b906139cf9161396f565b7fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000810190811161200c5790565b6139cf9161396f565b918215613b1357915b600781168015611b6b57613a2190613ec5565b6001600160a01b03811615613aeb575f80602085019283828751925af1613a466135d6565b9015613ab6576020815110613a8e577fffffffff00000000000000000000000000000000000000000000000000000000602081920151925116911603613a8e5760031c613a0e565b7fa59c2303000000000000000000000000000000000000000000000000000000005f5260045ffd5b80519081613ae6577f3c82bb14000000000000000000000000000000000000000000000000000000005f5260045ffd5b602001fd5b7fdf42d72e000000000000000000000000000000000000000000000000000000005f5260045ffd5b915050565b916001600160a01b03604051927fa9059cbb000000000000000000000000000000000000000000000000000000005f521660045260245260205f60448180865af19060015f5114821615613ba7575b60405215613b725750565b6001600160a01b03907f5274afe7000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b906001811516613bbf57823b15153d15161690613b67565b503d5f823e3d90fd5b9091905f905f198482099084810292838084109303928084039314613c415782620f42401115613c2f57507fde8f6cefed634549b62c77574f722e1ac57e23f24d8fd5cb790fb65668c261399394620f4240910990828211900360fa1b910360061c170290565b634e487b71905260116020526024601cfd5b505050620f42409192500490565b5f19600160401b8209918160401b91828085109403938085039414613ce75783821115613ccf57600160401b829109815f0382168092046002816003021880820260020302808202600203028082026002030280820260020302808202600203028091026002030293600183805f03040190848311900302920304170290565b50634e487b715f52156003026011186020526024601cfd5b5090611d15925061239b565b5f19600160801b8209918160801b91828085109403938085039414613ce75783821115613ccf57600160801b829109815f0382168092046002816003021880820260020302808202600203028082026002030280820260020302808202600203028091026002030293600183805f03040190848311900302920304170290565b90915f198383099280830292838086109503948086039514613e045784831115613dec5790829109815f0382168092046002816003021880820260020302808202600203028082026002030280820260020302808202600203028091026002030293600183805f03040190848311900302920304170290565b82634e487b715f52156003026011186020526024601cfd5b505090611d15925061239b565b8015613e26576001600160801b030460010190565b634e487b715f5260126020526024601cfd5b908015613e2657613e4e6001915f19840161239b565b019015150290565b908015613e2657613e6690614a46565b908115613e26577f800000000000000000000000000000000000000000000000000000000000000081145f1983141661200c578181059180820715159182613eb8575b5050613eb25790565b60010190565b5f92501812155f80613ea9565b6004811015613f79576002811015613f2a57600114613f06577fa5724489000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f000000000000000000000000e4038fa09f0bb9963068afaf97be0c045155090d90565b600214613f55577f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b6008811015614029576006811015613fda57600414613fb6577f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b600614614005577f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b7fa5724489000000000000000000000000000000000000000000000000000000005f5260045ffd5b80156140725780600160401b0180600160401b1161200c57611d1591613c4f565b505f90565b90811561409157620f4240611d1593828403020401613c4f565b5050505f90565b9697929095946140a9878783613881565b9889845160401b106143605780871161433757506001600160681b03905b6001600160681b03895116996140eb896001600160681b0303809c8b86030261239b565b9a60018c61410d6140fd878d88613881565b6141078684613998565b92613998565b010160011c98898751809111155f146141ab575050505050955b88156141a2575b5090602091850260401c93840260401c9482868203986001600160681b036141558c614c7a565b8183511603168152016001600160681b036141748a8284511601614cc4565b16905281510381520186815101905261419761418f87614a46565b5f0395614a46565b939594939280920390565b9550602061412e565b60019d50848293959c96949b506141d092916001600160681b038f5116908689614a9b565b996001600160681b038c5116998b6141ed86888303809e0261239b565b9e8f6141fd6140fd848888613881565b010160011c9b8c8a519287848310918261432b575b5050614287575b505050505050845190818910908161427d575b50614275575b808811614241575b5050614127565b6142689398506142549297919a0261239b565b97886001600160681b03895116910261239b565b8401948151945f8061423a565b965086614232565b905089105f61422c565b909192959f506142a394979c93969d5015614322575b0261239b565b806142bf575050505081519480965f995b5f8080808080614219565b88939b98999299018881115f1461431c575087985b89838c516001600160681b031686830302906142ef9161239b565b9c6142f992613881565b90614304908c613998565b9061430f908c613998565b0160010160011c966142b4565b986142d4565b6001925061429d565b909150108f8890614212565b8181111561436057614357906001600160681b0383808a0392030261239b565b908782116140c7575b50505050945050509050905f905f905f905f905f90565b969291939490979584516001600160681b03895116908181105f146144f957906143ab918b6001600160681b03030261239b565b8901988551945b828110614476575b508415614462576001836143f86143f16143ea8e876143e46020986144579c9a61445f9e9c613881565b95613881565b9287613998565b9186613998565b010160011c91820260401c96870260401c80970395818884039a6001600160681b0361442387614c7a565b8183511603168152016001600160681b036144428c8284511601614cc4565b16905283815103815201908151019052614a46565b5f0394614a46565b92565b98505f975087968796508695509350505050565b838111156144e457614496906001600160681b038580860392030261239b565b818111156144e4578a8110156143ba579950936144cb8a6001600160681b038b511687806001600160681b030392030261239b565b90808210156144dd57505b935f6143ba565b90506144d6565b5098505f975087968796508695509350505050565b50986001600160681b0399946143b2565b94929796979590956001600160681b0361452388612374565b88840290860201049883518a15613e265760018b67ffffffffffffffff0401116148385784811161481857505f5b602087019461456e896001600160681b038851168482030261239b565b9a60018c61459d6001600160681b0361458687612374565b86028988020104614597858461396f565b9261396f565b010160011c94858751809111155f1461463a5750505050965b8915614631575b50918161461a94936020930260401c95860260401c96878203946001600160681b036145e88d614c7a565b81835116031690526001600160681b03614606868284511601614cc4565b169052815103815201878151019052614a46565b9361462486614a46565b5f03939594939280920390565b965060206145bd565b60019d506146899192965061468490846001600160681b038b9e97969e511661466288612374565b9261466c88612374565b61467e61467889613e11565b94613e11565b94614a9b565b612374565b996001600160681b03885116958b6146a686828103809a0261239b565b9e8f6146cd6001600160681b036146bc85612374565b87028886020104614597868461396f565b010160011c97888a519287848310918261480c575b5050614754575b505050505050845190818510908161474a575b50614742575b808411614710575b506145b6565b909961471f939298500261239b565b966147386001600160681b038451168981038302613e38565b958251915f61470a565b925082614702565b905089115f6146fc565b909192959f5061476f94979893969d5015614322570261239b565b8061478a5750505050815190865f995b5f80808080806146e9565b929a919891939280831115614804578203985b848a106147fb575b8287516001600160681b03168b820302906147bf9161239b565b9b8a6147ca81612374565b6001600160681b03930291020104906147e3908c61396f565b906147ee908c61396f565b0160010160011c9261477f565b985083986147a5565b505f9861479d565b909150118f88906146e2565b614830906001600160681b0386808603920302613e38565b808811614551575b50505050505050909150905f905f905f905f905f90565b939497959291909781519360208601946001600160681b03865116908181105f146149dc57906148829181038c02613e38565b998351995b808410614961575b50891561494c579260018a6148e46148dd8e6001600160681b036149419a98602098826149479e9c6148c081612374565b84029083020104936148d181612374565b9102910201049361396f565b918d61396f565b010160011c92830260401c97880260401c80980396888403946001600160681b0361490e8d614c7a565b81835116031690526001600160681b0361492c868284511601614cc4565b16905289815103815201908151019052614a46565b94614a46565b5f0392565b99505f98508897889750879650945050505050565b828110156149c657614981906001600160681b0385808603920302613e38565b818110156149c657808c101561488f579a50986149ad8a8c6001600160681b038951169082030261239b565b90808210156149bf57505b985f61488f565b90506149b8565b5099505f98508897889750879650945050505050565b50995f9a99614887565b919082158015614a12575b614a0a57611d159382620f424092030204810191613d73565b505050505f90565b5081156149f1565b627fffff8113614a3e57627fffff198112614a355760020b90565b50627fffff1990565b50627fffff90565b7f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8111614a705790565b7f24775e06000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b939594919095614ad1614ab782614ab188612374565b9561238e565b916001600160681b03614aca8885612361565b049061203c565b905f948481151580614c71575b80614c68575b614b72575b5050505082159081614b68575b50614b5f575b808211614b57575b5083614b10828461203c565b1115614b475750825b81841115614b25575050565b611d1592935081105f14614b3f5760ff60015b169061203c565b60ff5f614b38565b614b51908261203c565b92614b19565b90505f614b04565b60019150614afc565b905015155f614af6565b614b80918460401b90613d73565b80614b8c575b84614ae9565b83614b9d929394965060801b613cf3565b91806d01fffffffffffffffffffffffffe02906d01fffffffffffffffffffffffffe82040361200c5782614bd092613d73565b7f3fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8116810361200c5760021b600160801b0180600160801b1161200c57614c1690614d09565b7f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8216820361200c5760401b600160801b0180600160801b1161200c57614c5f9160011b61239b565b915f8080614b86565b50801515614ae4565b50831515614ade565b6001600160681b038111614c94576001600160681b031690565b7f6dfcc650000000000000000000000000000000000000000000000000000000005f52606860045260245260445ffd5b6001600160681b038111614cde576001600160681b031690565b7f6ce2737a000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b6001811115611d1557806001600160801b831015614e1a575b600482600160401b614dcc941015614e0d575b640100000000811015614e00575b62010000811015614df3575b610100811015614de7575b6010811015614ddb575b1015614dd3575b60030260011c614d7b818461239b565b0160011c614d89818461239b565b0160011c614d97818461239b565b0160011c614da5818461239b565b0160011c614db3818461239b565b0160011c614dc1818461239b565b0160011c809261239b565b8111900390565b60011b614d6b565b811c9160021b91614d64565b60081c91811b91614d5a565b60101c9160081b91614d4f565b60201c9160101b91614d43565b60401c9160201b91614d35565b5050608081901c600160401b614d2256fea164736f6c6343000823000a","recompiledBytecode":"0x6101e06040526004361015610012575f80fd5b5f6080525f3560e01c80630f7439531461179c5780631e2eaeaf146117805780631f21638c1461168c57806335fd631a14611636578063372aa224146115bc5780633ff20c8a1461158b5780635dd9a4c5146113fa578063658b6cb714611275578063943f3b1a1461108857806397962ef914610faf578063bcdb4dad14610957578063d83067861461092c578063dbd035ff14610892578063e24f0884146103e2578063ec069057146101c35763fbde1732146100ce575f80fd5b346101bd5760803660031901126101bd576100e7611abc565b6100ef611b00565b906044359067ffffffffffffffff82116101bd57604060031983360301126101bd5760643567ffffffffffffffff81116101bd57610131903690600401611ad2565b9161013a61392b565b5c61019157604094610179947fa147fd8f7d12de6da66feedc6d64a11bd371e5471ee1018f11f9072ede67a0fa61016f61392b565b5d60040191612049565b60805161018461392b565b5d82519182526020820152f35b7f3ee5aeb500000000000000000000000000000000000000000000000000000000608051526004608051fd5b60805180fd5b346101bd576080513660031901126101bd576101dd61392b565b5c610191576101ea61392b565b7f695543c3708653cda9d418b4ccd3be11368e40636c10c44b18cfe756b6d88b29905d610215613615565b6001600160801b0316806001600160801b0381931690610234916139c5565b926001600160801b031690610248916139fc565b9160805154928360081c60010b608051526004602052608051604090206040519061027282611bff565b54936001600160681b03851682528460681c6001600160681b0316602083015260408201908560d01c61ffff16825260608301928660e01c61ffff1684526080019560f01c86528660801c60020b6102ca828261385b565b925161ffff1601906102db9161385b565b8660181c6001600160681b03166102f181612374565b93516001600160681b039390940291020104946305f5e1006affffff000000000000000060709290921c919091160492600160401b620f424069ffff000000000000000060409490941b939093169290920401830181019081106103ca5769ffff000000000000000061037061036b620f42409388613998565b6138e1565b94516080515060401b160401016080515060805150600160401b019182600160401b116103ca576103ae61036b6040946001600160801b03936139b6565b916080516103ba61392b565b5d81845193168352166020820152f35b634e487b7160e01b6080515260116004526024608051fd5b346107fd5760c03660031901126107fd576103fb611abc565b60243580151581036107fd576044359081600f0b82036107fd57606435926001600160801b03841684036107fd5760843567ffffffffffffffff81116107fd57610449903690600401611ad2565b909360a43567ffffffffffffffff81116107fd5761046b903690600401611ad2565b909360ff5f541661086a5761047e61392b565b5c6108425785948389937f695543c3708653cda9d418b4ccd3be11368e40636c10c44b18cfe756b6d88b296104b161392b565b5d6104ce81846104bf613615565b9c91819a81988f948c33612603565b61010051919c9299909592908c15610725578d60805181126106e3575b506104f46137ec565b91333b156101bd578b908f61053a60405194859384937fc32510750000000000000000000000000000000000000000000000000000000085526080519660048601612020565b0381608051335af180156106d6576106bd575b5089608051811391826106a3575b505061067757848c6106539b60409f996105b0976106599f8b968f919d8f6001600160a01b039f5b6105996105936080515496613396565b99613396565b996001600160801b0381169060801c019a336133bd565b608051548951946f010000000000000000000000000000006effff000000000000000000000000006001600160681b038460181c169360601b169160805190600f0b1360781b1617178452876001600160801b03166fffffffffffffffffffffffffffffffff198660801b161760208501528884015216907f9734819749a91fc3be03ea83205f924ee08479bd3f0da48efc91d94d050cac1e60603392a3613396565b91613396565b60805161066461392b565b5d825191600f0b8252600f0b6020820152f35b7fbe79592100000000000000000000000000000000000000000000000000000000608051526004608051fd5b6106ad925061203c565b6106b56137ec565b10898f61055b565b6080516106c991611c37565b6080516101bd578e61054d565b6040513d608051823e3d90fd5b6106ef61071f91611fe0565b896001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016613b18565b8d6104eb565b905f8b12610801575b61073661374e565b91333b156107fd578e8c6107795f9360405195869485947fc325107500000000000000000000000000000000000000000000000000000000865260048601612020565b038183335af180156107f2576107de575b508c608051811391826107c4575b505061067757848c6106539b60409f996105b0976106599f8b968f919d8f6001600160a01b039f610583565b6107ce925061203c565b6107d661374e565b108c8f610798565b5f6107e891611c37565b5f6080528e61078a565b6040513d5f823e3d90fd5b5f80fd5b61083d61080d8c611fe0565b896001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016613b18565b61072e565b7f3ee5aeb5000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f51bd770c000000000000000000000000000000000000000000000000000000005f5260045ffd5b346107fd5760203660031901126107fd5760043567ffffffffffffffff81116107fd57366023820112156107fd5780600401359067ffffffffffffffff82116107fd578160051b9036602483830101116107fd5760408051809460208252602082015201918301916020806024604086019401925b8335548152019101908483821015610923575060208091610907565b60408186030190f35b346107fd575f3660031901126107fd576020610946611fa5565b6001600160a01b0360405191168152f35b346107fd575f3660031901126107fd575f6102e060405161097781611bce565b8281528260208201528260408201528260608201528260808201528260a08201528260c08201528260e08201528261010082015282610120820152826101408201528261016082015282610180820152826101a0820152826101c0820152826101e08201528261020082015282610220820152826102408201528261026082015282610280820152826102a0820152826102c08201520152610300604051610a1e81611bce565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001681526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001660208201526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001660408201527f000000000000000000000000000000000000000000000000000000000000000060608201527f000000000000000000000000000000000000000000000000000000000000000060808201527f000000000000000000000000000000000000000000000000000000000000000060a08201527f000000000000000000000000000000000000000000000000000000000000000060c08201527f000000000000000000000000000000000000000000000000000000000000000060e08201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166101008201527f00000000000000000000000000000000000000000000000000000000000000006101208201527f00000000000000000000000000000000000000000000000000000000000000006101408201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166101608201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166101808201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166101a08201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166101c08201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166101e08201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166102008201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166102208201527f00000000000000000000000000000000000000000000000000000000000000006102408201527f00000000000000000000000000000000000000000000000000000000000000006102608201527f00000000000000000000000000000000000000000000000000000000000000006102808201527f00000000000000000000000000000000000000000000000000000000000000006102a08201527f00000000000000000000000000000000000000000000000000000000000000006102c08201527f00000000000000000000000000000000000000000000000000000000000000006102e08201526102e0604051916001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001683526001600160a01b0360208201511660208401526001600160a01b036040820151166040840152606081015160608401526080810151608084015260a081015160a084015260c081015160c084015260e081015160e08401526001600160a01b03610100820151166101008401526101208101516101208401526101408101516101408401526001600160a01b03610160820151166101608401526001600160a01b03610180820151166101808401526001600160a01b036101a0820151166101a08401526001600160a01b036101c0820151166101c08401526001600160a01b036101e0820151166101e08401526001600160a01b03610200820151166102008401526001600160a01b03610220820151166102208401526102408101516102408401526102608101516102608401526102808101516102808401526102a08101516102a08401526102c08101516102c084015201516102e0820152f35b346107fd5760a03660031901126107fd57610fc8611abc565b610fd0611b00565b906044359067ffffffffffffffff82116107fd57604060031983360301126107fd5760643567ffffffffffffffff81116107fd57611012903690600401611ad2565b60849291923567ffffffffffffffff81116107fd57611035903690600401611ad2565b93909261104061392b565b5c6108425760409661107f967f3ff35dbce7a07ce455b128890d383c554afbc1b07cf7390a13e2d602a38c1a0a61107561392b565b5d60040191611d4e565b5f61018461392b565b346107fd5760603660031901126107fd576004358060010b8091036107fd5760243561ffff81168082036107fd576044359061ffff82168083036107fd576110ce612307565b6110d661392b565b5c610842577f6228ff59018d12017a2bb81d4aaee1d839faeb61bb29b616b08aec1d954bdf7c61110461392b565b5d7f00000000000000000000000000000000000000000000000000000000000000008512801561124c575b611220576112096040937f2a1317b5b5812150d82fa4b2e5ae289f62be0c42a042edbdc69b978673746a4795875f5260046020526111ba865f209182907fffff0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff7dffff0000000000000000000000000000000000000000000000000000000083549260e01b169116179055565b907dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffff00000000000000000000000000000000000000000000000000000000000083549260f01b169116179055565b82519182526020820152a25f61121d61392b565b5d005b847f64b6051e000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b507f0000000000000000000000000000000000000000000000000000000000000000851361112f565b346107fd576101203660031901126107fd5761128f611abc565b6024356001600160a01b03811681036107fd576044359081151582036107fd576064359283600f0b84036107fd57608435906001600160801b03821682036107fd5760a435906001600160801b038216938483036107fd5760c435936001600160801b038516948581036107fd5760e435906001600160801b038216958683036107fd576101043567ffffffffffffffff81116107fd57611334903690600401611ad2565b98909761133f61392b565b5c610842578885858f8f6113cc9f918f96918d8f61138d8f956113929c8e987fbaf2b3653c77cf277ac36a174e0624557a6829660e787388cf9abd21ceb18a4461138761392b565b5d612496565b612603565b909691956101005191979d8e979d8e946113b66113b05f5497613396565b9a613396565b9a6001600160801b0381169060801c019b6133bd565b7f1f6053de000000000000000000000000000000000000000000000000000000005f5260045260245260445ffd5b346107fd5760403660031901126107fd5760043562ffffff81168082036107fd576024359062ffffff8216928383036107fd57611435612307565b61143d61392b565b5c610842577ff88a537f51dde30be9a9960a2850ed980c30e495145525344f0f47ff82ba3b7361146b61392b565b5d5f549162ffffff8360981c168103611516575b5050505f549162ffffff8360b01c16810361149e575b5f61121d61392b565b7f4d14e59cea6a74cef5169f00d96334b2c0214358308e92227d7c47e943664b9c927fffffffffffffff000000ffffffffffffffffffffffffffffffffffffffffffff78ffffff0000000000000000000000000000000000000000000060209460b01b169116175f55604051908152a1808080611495565b7f0e7d070a63c6cf2ec01badac5543ae7bcd84ceebe76073c704e7f3e356f4f194927fffffffffffffffffffff000000ffffffffffffffffffffffffffffffffffffff75ffffff0000000000000000000000000000000000000060209460981b169116175f55604051908152a182808061147f565b346107fd5760203660031901126107fd5760043560ff811681036107fd576115ba906115b5612307565b611b19565b005b346107fd5760203660031901126107fd576001600160a01b036115dd611abc565b6115e5612307565b16807fffffffffffffffffffffffff000000000000000000000000000000000000000060035416176003557fb266add5f3044b17d27db796af992cecbe413921b4e8aaaee03c719e16b9806a5f80a2005b346107fd5760403660031901126107fd576024356004356040519160408360208152826020820152019060051b8301916001602060408501935b8354815201910190848382101561092357506020600191611670565b346107fd5760203660031901126107fd5760043561ffff8116908181036107fd576116b5612307565b6116bd61392b565b5c610842577faab56bc87c1aa4b7f07e347524cc16f26458efacbe0150d5f992ab348f9b5c9d6116eb61392b565b5d5f549161ffff8360c81c168103611706575f61121d61392b565b7f0262bdf5ceb29428fdaec304f1872012436cebf3ff5621c19bc17b61892940ea927fffffffffff0000ffffffffffffffffffffffffffffffffffffffffffffffffff7affff0000000000000000000000000000000000000000000000000060209460c81b169116175f55604051908152a1808080611495565b346107fd5760203660031901126107fd57600435545f5260205ff35b346107fd5760c03660031901126107fd576064356024356084356001600160a01b03811681036107fd5760a4356001600160a01b03811681036107fd576117e1612307565b6117e961392b565b5c610842577fd1d11922b700459ced204b3743fc4c79f65983a27e1363601f00585467c79c0761181761392b565b5d826004350192846044350192600754926008549460095493600a5497806119a3575b5050907f0f4f965b9381ad88a8ce70d51b86e6162cbebbdfa906901cb34fe0858b30b59697826080989796959493611955575b505094611932929394956119287f0000000000000000000000000000000000000000000000000000000000000000966118c97f00000000000000000000000000000000000000000000000000000000000000008092878b6123b9565b97906007558361191e7f0000000000000000000000000000000000000000000000000000000000000000809c7f0000000000000000000000000000000000000000000000000000000000000000998a926123b9565b9a906008556123b9565b97906009556123b9565b90600a55604051938452602084015260408301526060820152a15f61121d61392b565b61193294829892966002549061198761197a856001600160801b0385169d8e0261239b565b9485938e1c9a8b0261239b565b938491019901990301950301905f60025590959493928961186d565b9095939296946119b49892986137ec565b7f00000000000000000000000000000000000000000000000000000000000000006119de91612361565b968387600154996001600160801b038b166119f89161238e565b8489600254926001600160801b038416611a119161238e565b90611a1b9161238e565b90611a259161238e565b9a611a2e61374e565b7f0000000000000000000000000000000000000000000000000000000000000000611a5891612361565b9060801c611a659161238e565b9060801c611a729161238e565b90611a7c9161238e565b90611a869161238e565b95611a93848a840261239b565b938492880290611aa29161239b565b93849101970197030193030195888096929394959661183a565b600435906001600160a01b03821682036107fd57565b9181601f840112156107fd5782359167ffffffffffffffff83116107fd57602083818601950101116107fd57565b6024359069ffffffffffffffffffff821682036107fd57565b60ff1660028111611b70575f5460ff8116808314611b6b57827fd708418b295fcf080d236d5143d7d3a9e9694be43c2dedb73a16196b08daac569360409360ff1916175f5582519182526020820152a1565b505050565b7f39da1b10000000000000000000000000000000000000000000000000000000005f5260045ffd5b903590601e19813603018212156107fd570180359067ffffffffffffffff82116107fd57602001918160051b360383136107fd57565b610300810190811067ffffffffffffffff821117611beb57604052565b634e487b7160e01b5f52604160045260245ffd5b60a0810190811067ffffffffffffffff821117611beb57604052565b6040810190811067ffffffffffffffff821117611beb57604052565b90601f8019910116810190811067ffffffffffffffff821117611beb57604052565b9035601e19823603018112156107fd57016020813591019167ffffffffffffffff82116107fd578160051b360383136107fd57565b90918281527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83116107fd5760209260051b809284830137010190565b91906040810190611cdc8480611c59565b604083529283905260608201925f5b818110611d1857505050611d07846020611d1595960190611c59565b916020818503910152611c8e565b90565b8235855260209485019490920191600101611ceb565b908060209392818452848401375f828201840152601f01601f1916010190565b92959196949093611d5f8880611b98565b905015611f9857611d708880611b98565b9050611d7f60208a018a611b98565b91905003611f7057611e7996604091611e0687611de088611dd2898f8a908a519687957f0a2a56a600000000000000000000000000000000000000000000000000000000602088015233602488016134d8565b03601f198101835282611c37565b7f0000000000000000000000000000000000000000000000000000000000000000613a05565b82517fb10311de0000000000000000000000000000000000000000000000000000000081526001600160a01b038716600482015269ffffffffffffffffffff8816602482015261010060448201529889928392611e6761010485018e611ccb565b84810360031901606486015291611d2e565b60016084830152600460a4830152600560c4830152600660e483015203817300000000000000000000000000000000000000005af480156107f2575f965f91611f2e575b50611f0692611f2c95949282611dd29399809b6040519889977f9a2983050000000000000000000000000000000000000000000000000000000060208a01523360248a01613527565b7f0000000000000000000000000000000000000000000000000000000000000000613a05565b565b96505092916040863d604011611f68575b81611f4c60409383611c37565b810103126107fd57855160209096015192939092611f06611ebd565b3d9150611f3f565b7f8bea10c5000000000000000000000000000000000000000000000000000000005f5260045ffd5b505f965086955050505050565b7f695543c3708653cda9d418b4ccd3be11368e40636c10c44b18cfe756b6d88b29611fce61392b565b5c14611fd8575f90565b611d15613583565b7f8000000000000000000000000000000000000000000000000000000000000000811461200c575f0390565b634e487b7160e01b5f52601160045260245ffd5b611d159492606092825260208201528160408201520191611d2e565b9190820180921161200c57565b9091939492946120598580611b98565b9050156122fc5761206a8580611b98565b90506120796020870187611b98565b91905003611f70576001600160a01b038216958633036122d4576120fb6040517f90c26d990000000000000000000000000000000000000000000000000000000060208201526120d581611dd286868c8b8b33602488016134d8565b7f0000000000000000000000000000000000000000000000000000000000000000613a05565b604051967f9eb58677000000000000000000000000000000000000000000000000000000008852600488015269ffffffffffffffffffff8416602488015260e060448801526060878061215160e482018a611ccb565b6001606483015260046084830152600560a4830152600660c483015203817300000000000000000000000000000000000000005af49687156107f2575f5f915f99612280575b5092611f2c959492826121e695611dd2949a819c61220c575b6040519889977f016c32520000000000000000000000000000000000000000000000000000000060208a01523360248a01613527565b7f0000000000000000000000000000000000000000000000000000000000000000613a05565b5f545f8160081c60010b125f14612257576fffffffffffffffffffffffffff000000196fffffffffffffffffffffffffff0000006001600160681b035b60181b169116175f556121b0565b6fffffffffffffffffffffffffff000000196fffffffffffffffffffffffffff0000005f612249565b9850505092916060873d6060116122cc575b8161229f60609383611c37565b810103126107fd578651604060208901519801519283151584036107fd5792979394919390611f2c612197565b3d9150612292565b7f70d645e3000000000000000000000000000000000000000000000000000000005f5260045ffd5b505f94508493505050565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016330361233957565b7f0c6d42ae000000000000000000000000000000000000000000000000000000005f5260045ffd5b8181029291811591840414171561200c57565b6001600160681b0303906001600160681b03821161200c57565b9190820391821161200c57565b81156123a5570490565b634e487b7160e01b5f52601260045260245ffd5b929091926123c7828561239b565b90811561248d576001600160a01b0316916001600160a01b03604051947fa9059cbb000000000000000000000000000000000000000000000000000000005f521693846004528260245260205f60448180885af19060015f511482161561247e575b604052612461575060207f9a380920405cd56ab6f7f5f2375bfc42aa8ef39f7e3f43d8f8f02bb4c925319291604051908152a3905f90565b61247a9350816124749296959350612361565b9061238e565b9190565b90843b15153d15161690612429565b50505050905f90565b91818310156125db5782156125b35782811080156125aa575b612582575f5461ffff808260c81c161461257c578382148015612573575b6125375768ffff000000000000009060901c16600160401b019182600160401b1161200c576125138261250d81612507886125199761238e565b9461238e565b92612361565b93612361565b90612524818361396f565b831092831561255f575b50505061253757565b7f7f043c76000000000000000000000000000000000000000000000000000000005f5260045ffd5b61256a92935061396f565b115f808061252e565b508282146124cd565b50505050565b7fdc5eefea000000000000000000000000000000000000000000000000000000005f5260045ffd5b508181116124af565b7f6b95e45f000000000000000000000000000000000000000000000000000000005f5260045ffd5b7fd6e666c0000000000000000000000000000000000000000000000000000000005f5260045ffd5b96989491999792909399610160525f61010052600f0b95861561336e57611dd26001600160a01b03936001600160801b03806126d395818f896126f99b5f54610100526040519b8c9a7f3b9009e00000000000000000000000000000000000000000000000000000000060208d01521660248b015216604489015261016051151560648901528d60848901521660a48701526101005160c487015216988960e48601521696876101048501526001600160801b038c16610124850152610140610144850152610164840191611d2e565b7f0000000000000000000000000000000000000000000000000000000000000000613a05565b5f6101a0526101605115613350575061271c906001600160801b038516906139fc565b6101a0525b5f811360a0819052156132f55761016051156132cf577f00000000000000000000000000000000000000000000000000000000000000005b025b60c08190525f60e05260a05115613293575b505f608060405161277d81611bff565b82815282602082015282604082015282606082015201525f60206040516127a381611c1b565b82815201526001600160801b0360c0511161326b57604051610140526127cb61014051611c1b565b60c05161014051525f60206101405101525f548060081c60010b908060801c60020b91805f52600460205260405f20956040519661280888611bff565b546001600160681b03811688526001600160681b038160681c16602089015261ffff8160d01c16604089015261ffff8160e01c16606089015260f01c60808801526305f5e1006affffff00000000000000008071ffffffffffffffffffff00000000000000006128816001600160801b038b168961385b565b9a61289f6001600160801b038c1661ffff6040840151168b0161385b565b9096610120526001600160681b038860181c16989b6101c052965f6101805260701c161616046101805260a051155f146132355790959290916001600160801b035f5b16965b610140515115612e165761016051156132275761ffff6080820151165b620f424069ffff0000000000000000610180519260401b16046101a051010161293261016051826101c0516138a7565b6129406101605183866138a7565b91600192610160515f14613195576001600160681b0360208601511615801561318d575b61311a575b835b612e3d575b505050610160515f14612e2c578315905b8115612e23575b5015612e16576101605115612d355750507f0000000000000000000000000000000000000000000000000000000000000000610120511315612a6857505f19610120510161012052610120515f52600460205260405f2091604051926129ed84611bff565b54926001600160681b03841681526001600160681b038460681c16602082015261ffff8460d01c169384604083015261ffff8160e01c16606083015260f01c6080820152906001600160681b039360020b9003956101c05192612a596001600160801b0388168961385b565b6101c0525b92909693916128e5565b9350509092505b610120516101205160010b03612d1a576fffffffffffffffffffffffffff000000612a9b5f5493614c7a565b60181b1690808060020b03612d035760801b72ffffff0000000000000000000000000000000016917fffffffffffffffffffffffffff000000000000000000000000000000000000ff62ffff006101205160081b1691161717175f5560a051155f14612ceb57602061014051015190610140515160c05103915b6101605115612ce357915f03915b6001600160801b0360e05116838160e05160801c01610160515f14612ca1576fffffffffffffffffffffffffffffffff199182916001600160801b03612b71600154928883851601036138e1565b16938491161760801c0160801b16176001555b80612c26575b50612be4612bbc60e051927f000000000000000000000000000000000000000000000000000000000000000090613e56565b937f000000000000000000000000000000000000000000000000000000000000000090613e56565b9183151580612c1d575b15612bf557565b7f2e5a4599000000000000000000000000000000000000000000000000000000005f5260045ffd5b50821515612bee565b6101605115612c67576fffffffffffffffffffffffffffffffff196001600160801b03612c5960025493828516016138e1565b169116176002555b5f612b8a565b6001600160801b036fffffffffffffffffffffffffffffffff19612c92600254938460801c016138e1565b60801b16911617600255612c61565b90506001600160801b0383816fffffffffffffffffffffffffffffffff19612cd2600154958a8760801c01036138e1565b60801b169316011617600155612b84565b915f03612b23565b610140515160c0510390602061014051015191612b15565b63327269a760e01b5f52601860045260245260445ffd5b63327269a760e01b5f5260106004526101205160245260445ffd5b939096917f0000000000000000000000000000000000000000000000000000000000000000610120511215612e095750612d8490600161012051016101205261ffff60405f9601511601614a1a565b60020b956101c052610120515f52600460205260405f2090612e0360405192612dac84611bff565b54926001600160681b03841681526001600160681b038460681c16602082015261ffff8460d01c169384604083015261ffff8160e01c16606083015260f01c6080820152926001600160801b03881690890161385b565b92612a5e565b9550939550505050612a6f565b5050935050909250612a6f565b9050155f612988565b6001600160681b0384101590612981565b612e4982939792614051565b9662ffffff5f5460981c1697612e63896101805187614077565b90610160515f146130c65760a0516130925790612e93949392916001600160801b038c169461014051908a61484f565b9490919491949293985b8415801590613089575b612eb4575b505050612970565b7fcad09799f755048f0fd388c6b2fcc8e0cebefd15756c6903522cc2a95f661f7095606095612f036001600160801b03936fffffffffffffffffffffffffffffffff19956101805190856149e6565b8484821691840360801b161760e0510160e052836040519661012051885284169160801b16176020860152169160801b16176040820152a1610120515f52600460205261307e60405f206001600160681b0384511681549079ffffffffffffffffffffffffff00000000000000000000000000602087015160681b16907fffffffff000000000000000000000000000000000000000000000000000000007bffff0000000000000000000000000000000000000000000000000000604089015160d01b169316171717815561302a61ffff60608601511682907fffff0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff7dffff0000000000000000000000000000000000000000000000000000000083549260e01b169116179055565b608084015181547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1660f09190911b7fffff00000000000000000000000000000000000000000000000000000000000016179055565b5f8080808080612eac565b50831515612ea7565b906130b394939291999e996001600160801b038c169461014051908a61450a565b959195939092939295939499039d612e9d565b60a0516130f957906130eb949392916001600160801b038c169461014051908a614377565b949091949194929398612e9d565b906130b394939291999e996001600160801b038c169461014051908a614098565b925060a051155f1461314f57816001600160801b038816101561313f575b5f92612969565b5050505050935050909250612a6f565b6001600160801b03871615158061317a575b61313f578a613138575050505050935050909250612a6f565b50816001600160801b0388161015613161565b508615612964565b6001600160681b03855116158015613216575b6131b3575b8361296b565b925060a051155f146131d857826001600160801b038816111561313f575b5f926131ad565b6001600160801b038716151580613203575b61313f578a6131d1575050505050935050909250612a6f565b50826001600160801b03881611156131ea565b506001600160681b038710156131a8565b61ffff606082015116612902565b6101605115613259576001600160801b0360015460801c5b979492979391936128e2565b6001600160801b03806001541661324d565b7fd29a971a000000000000000000000000000000000000000000000000000000005f5260045ffd5b61016051156132bd576001600160801b0360015460801c5b168091111561276d5760c0525f61276d565b6001600160801b0380600154166132ab565b7f0000000000000000000000000000000000000000000000000000000000000000612759565b6101605115613329577f0000000000000000000000000000000000000000000000000000000000000000905b5f030261275b565b7f000000000000000000000000000000000000000000000000000000000000000090613321565b61336591506001600160801b038516906139c5565b6101a052612721565b7f2c5211c6000000000000000000000000000000000000000000000000000000005f5260045ffd5b9081600f0b918083036133a65750565b63327269a760e01b5f52608060045260245260445ffd5b9d9a98969492909c9b99979593919d6040519e8f9e8f92602084017fe6a7bba00000000000000000000000000000000000000000000000000000000090526001600160a01b031660248401526001600160a01b0316604483015215159060640152600f0b60848d01526001600160801b031660a48c015260c48b015260e48a01526001600160801b03166101048901526001600160801b03166101248801526001600160801b0316610144870152600f0b610164860152600f0b6101848501526101a48401526101c483016101c090526101e483019061349c92611d2e565b03601f19810182526134ae9082611c37565b611f2c907f0000000000000000000000000000000000000000000000000000000000000000613a05565b949269ffffffffffffffffffff906001600160a01b036135199481611d159a989516895216602088015216604086015260a0606086015260a0850190611ccb565b926080818503910152611d2e565b9390611d159896936001600160a01b0361356b948169ffffffffffffffffffff949b999b16885216602087015216604085015260e0606085015260e0840190611ccb565b94608083015260a082015260c0818503910152611d2e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b038116611d1557506001600160a01b036003541690565b51906001600160801b03821682036107fd57565b3d15613610573d9067ffffffffffffffff8211611beb5760405191613605601f8201601f191660200184611c37565b82523d5f602084013e565b606090565b5f9060606001600160a01b03613629613583565b166004604051809581937f171755b10000000000000000000000000000000000000000000000000000000083525af1905f825f945f946136f4575b506136c957602060446136756135d6565b6040519283917f46a149300000000000000000000000000000000000000000000000000000000083528160048401528051918291826024860152018484015e5f828201840152601f01601f19168101030190fd5b6136ef6001600160801b0384166001600160801b0386166001600160801b038416612496565b929190565b94509250506060833d606011613746575b8161371260609383611c37565b810103126107fd57613723836135c2565b9261373c6040613735602084016135c2565b92016135c2565b939093925f613664565b3d9150613705565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526020816024816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa9081156107f2575f916137bd575090565b90506020813d6020116137e4575b816137d860209383611c37565b810103126107fd575190565b3d91506137cb565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526020816024816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa9081156107f2575f916137bd575090565b905f821261387257611d1591620f42400190613bc8565b611d1591620f42400190613bc8565b9161388b81612374565b910291020160016001600160681b035f19830104019015150290565b91156138c757600160401b0180600160401b1161200c57611d15916139b6565b600160401b0180600160401b1161200c57611d1591613998565b6001600160801b0381116138fb576001600160801b031690565b7f6dfcc650000000000000000000000000000000000000000000000000000000005f52608060045260245260445ffd5b604051602081017ff9e3ebd3e85cd613d06ad4241f62088baffa30fdac338bc1f1a252f9a3b224a3815260208252613964604083611c37565b9051902060ff191690565b9061397f81600160401b84613d73565b9080156123a557600160401b611d15930915159061203c565b600160401b611d15926139ac828285613d73565b920915159061203c565b90600160401b611d1592613d73565b906139cf9161396f565b7fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000810190811161200c5790565b6139cf9161396f565b918215613b1357915b600781168015611b6b57613a2190613ec5565b6001600160a01b03811615613aeb575f80602085019283828751925af1613a466135d6565b9015613ab6576020815110613a8e577fffffffff00000000000000000000000000000000000000000000000000000000602081920151925116911603613a8e5760031c613a0e565b7fa59c2303000000000000000000000000000000000000000000000000000000005f5260045ffd5b80519081613ae6577f3c82bb14000000000000000000000000000000000000000000000000000000005f5260045ffd5b602001fd5b7fdf42d72e000000000000000000000000000000000000000000000000000000005f5260045ffd5b915050565b916001600160a01b03604051927fa9059cbb000000000000000000000000000000000000000000000000000000005f521660045260245260205f60448180865af19060015f5114821615613ba7575b60405215613b725750565b6001600160a01b03907f5274afe7000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b906001811516613bbf57823b15153d15161690613b67565b503d5f823e3d90fd5b9091905f905f198482099084810292838084109303928084039314613c415782620f42401115613c2f57507fde8f6cefed634549b62c77574f722e1ac57e23f24d8fd5cb790fb65668c261399394620f4240910990828211900360fa1b910360061c170290565b634e487b71905260116020526024601cfd5b505050620f42409192500490565b5f19600160401b8209918160401b91828085109403938085039414613ce75783821115613ccf57600160401b829109815f0382168092046002816003021880820260020302808202600203028082026002030280820260020302808202600203028091026002030293600183805f03040190848311900302920304170290565b50634e487b715f52156003026011186020526024601cfd5b5090611d15925061239b565b5f19600160801b8209918160801b91828085109403938085039414613ce75783821115613ccf57600160801b829109815f0382168092046002816003021880820260020302808202600203028082026002030280820260020302808202600203028091026002030293600183805f03040190848311900302920304170290565b90915f198383099280830292838086109503948086039514613e045784831115613dec5790829109815f0382168092046002816003021880820260020302808202600203028082026002030280820260020302808202600203028091026002030293600183805f03040190848311900302920304170290565b82634e487b715f52156003026011186020526024601cfd5b505090611d15925061239b565b8015613e26576001600160801b030460010190565b634e487b715f5260126020526024601cfd5b908015613e2657613e4e6001915f19840161239b565b019015150290565b908015613e2657613e6690614a46565b908115613e26577f800000000000000000000000000000000000000000000000000000000000000081145f1983141661200c578181059180820715159182613eb8575b5050613eb25790565b60010190565b5f92501812155f80613ea9565b6004811015613f79576002811015613f2a57600114613f06577fa5724489000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f000000000000000000000000000000000000000000000000000000000000000090565b600214613f55577f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b6008811015614029576006811015613fda57600414613fb6577f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b600614614005577f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b7fa5724489000000000000000000000000000000000000000000000000000000005f5260045ffd5b80156140725780600160401b0180600160401b1161200c57611d1591613c4f565b505f90565b90811561409157620f4240611d1593828403020401613c4f565b5050505f90565b9697929095946140a9878783613881565b9889845160401b106143605780871161433757506001600160681b03905b6001600160681b03895116996140eb896001600160681b0303809c8b86030261239b565b9a60018c61410d6140fd878d88613881565b6141078684613998565b92613998565b010160011c98898751809111155f146141ab575050505050955b88156141a2575b5090602091850260401c93840260401c9482868203986001600160681b036141558c614c7a565b8183511603168152016001600160681b036141748a8284511601614cc4565b16905281510381520186815101905261419761418f87614a46565b5f0395614a46565b939594939280920390565b9550602061412e565b60019d50848293959c96949b506141d092916001600160681b038f5116908689614a9b565b996001600160681b038c5116998b6141ed86888303809e0261239b565b9e8f6141fd6140fd848888613881565b010160011c9b8c8a519287848310918261432b575b5050614287575b505050505050845190818910908161427d575b50614275575b808811614241575b5050614127565b6142689398506142549297919a0261239b565b97886001600160681b03895116910261239b565b8401948151945f8061423a565b965086614232565b905089105f61422c565b909192959f506142a394979c93969d5015614322575b0261239b565b806142bf575050505081519480965f995b5f8080808080614219565b88939b98999299018881115f1461431c575087985b89838c516001600160681b031686830302906142ef9161239b565b9c6142f992613881565b90614304908c613998565b9061430f908c613998565b0160010160011c966142b4565b986142d4565b6001925061429d565b909150108f8890614212565b8181111561436057614357906001600160681b0383808a0392030261239b565b908782116140c7575b50505050945050509050905f905f905f905f905f90565b969291939490979584516001600160681b03895116908181105f146144f957906143ab918b6001600160681b03030261239b565b8901988551945b828110614476575b508415614462576001836143f86143f16143ea8e876143e46020986144579c9a61445f9e9c613881565b95613881565b9287613998565b9186613998565b010160011c91820260401c96870260401c80970395818884039a6001600160681b0361442387614c7a565b8183511603168152016001600160681b036144428c8284511601614cc4565b16905283815103815201908151019052614a46565b5f0394614a46565b92565b98505f975087968796508695509350505050565b838111156144e457614496906001600160681b038580860392030261239b565b818111156144e4578a8110156143ba579950936144cb8a6001600160681b038b511687806001600160681b030392030261239b565b90808210156144dd57505b935f6143ba565b90506144d6565b5098505f975087968796508695509350505050565b50986001600160681b0399946143b2565b94929796979590956001600160681b0361452388612374565b88840290860201049883518a15613e265760018b67ffffffffffffffff0401116148385784811161481857505f5b602087019461456e896001600160681b038851168482030261239b565b9a60018c61459d6001600160681b0361458687612374565b86028988020104614597858461396f565b9261396f565b010160011c94858751809111155f1461463a5750505050965b8915614631575b50918161461a94936020930260401c95860260401c96878203946001600160681b036145e88d614c7a565b81835116031690526001600160681b03614606868284511601614cc4565b169052815103815201878151019052614a46565b9361462486614a46565b5f03939594939280920390565b965060206145bd565b60019d506146899192965061468490846001600160681b038b9e97969e511661466288612374565b9261466c88612374565b61467e61467889613e11565b94613e11565b94614a9b565b612374565b996001600160681b03885116958b6146a686828103809a0261239b565b9e8f6146cd6001600160681b036146bc85612374565b87028886020104614597868461396f565b010160011c97888a519287848310918261480c575b5050614754575b505050505050845190818510908161474a575b50614742575b808411614710575b506145b6565b909961471f939298500261239b565b966147386001600160681b038451168981038302613e38565b958251915f61470a565b925082614702565b905089115f6146fc565b909192959f5061476f94979893969d5015614322570261239b565b8061478a5750505050815190865f995b5f80808080806146e9565b929a919891939280831115614804578203985b848a106147fb575b8287516001600160681b03168b820302906147bf9161239b565b9b8a6147ca81612374565b6001600160681b03930291020104906147e3908c61396f565b906147ee908c61396f565b0160010160011c9261477f565b985083986147a5565b505f9861479d565b909150118f88906146e2565b614830906001600160681b0386808603920302613e38565b808811614551575b50505050505050909150905f905f905f905f905f90565b939497959291909781519360208601946001600160681b03865116908181105f146149dc57906148829181038c02613e38565b998351995b808410614961575b50891561494c579260018a6148e46148dd8e6001600160681b036149419a98602098826149479e9c6148c081612374565b84029083020104936148d181612374565b9102910201049361396f565b918d61396f565b010160011c92830260401c97880260401c80980396888403946001600160681b0361490e8d614c7a565b81835116031690526001600160681b0361492c868284511601614cc4565b16905289815103815201908151019052614a46565b94614a46565b5f0392565b99505f98508897889750879650945050505050565b828110156149c657614981906001600160681b0385808603920302613e38565b818110156149c657808c101561488f579a50986149ad8a8c6001600160681b038951169082030261239b565b90808210156149bf57505b985f61488f565b90506149b8565b5099505f98508897889750879650945050505050565b50995f9a99614887565b919082158015614a12575b614a0a57611d159382620f424092030204810191613d73565b505050505f90565b5081156149f1565b627fffff8113614a3e57627fffff198112614a355760020b90565b50627fffff1990565b50627fffff90565b7f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8111614a705790565b7f24775e06000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b939594919095614ad1614ab782614ab188612374565b9561238e565b916001600160681b03614aca8885612361565b049061203c565b905f948481151580614c71575b80614c68575b614b72575b5050505082159081614b68575b50614b5f575b808211614b57575b5083614b10828461203c565b1115614b475750825b81841115614b25575050565b611d1592935081105f14614b3f5760ff60015b169061203c565b60ff5f614b38565b614b51908261203c565b92614b19565b90505f614b04565b60019150614afc565b905015155f614af6565b614b80918460401b90613d73565b80614b8c575b84614ae9565b83614b9d929394965060801b613cf3565b91806d01fffffffffffffffffffffffffe02906d01fffffffffffffffffffffffffe82040361200c5782614bd092613d73565b7f3fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8116810361200c5760021b600160801b0180600160801b1161200c57614c1690614d09565b7f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8216820361200c5760401b600160801b0180600160801b1161200c57614c5f9160011b61239b565b915f8080614b86565b50801515614ae4565b50831515614ade565b6001600160681b038111614c94576001600160681b031690565b7f6dfcc650000000000000000000000000000000000000000000000000000000005f52606860045260245260445ffd5b6001600160681b038111614cde576001600160681b031690565b7f6ce2737a000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b6001811115611d1557806001600160801b831015614e1a575b600482600160401b614dcc941015614e0d575b640100000000811015614e00575b62010000811015614df3575b610100811015614de7575b6010811015614ddb575b1015614dd3575b60030260011c614d7b818461239b565b0160011c614d89818461239b565b0160011c614d97818461239b565b0160011c614da5818461239b565b0160011c614db3818461239b565b0160011c614dc1818461239b565b0160011c809261239b565b8111900390565b60011b614d6b565b811c9160021b91614d64565b60081c91811b91614d5a565b60101c9160081b91614d4f565b60201c9160101b91614d43565b60401c9160201b91614d35565b5050608081901c600160401b614d2256fea164736f6c6343000823000a","sourceMap":"2568:41509:2:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2568:41509:2;;;;;;:::i;:::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2015:24:25;;;:::i;:::-;4288:69:32;1270:79:25;;2568:41509:2;2015:24:25;9773:924:2;2015:24:25;489:28:15;2015:24:25;;:::i;:::-;4520:68:32;2568:41509:2;;9773:924;;:::i;:::-;2568:41509;;2015:24:25;;:::i;:::-;4520:68:32;2568:41509:2;;;;;;;;;;1270:79:25;1312:30;2568:41509:2;;1312:30:25;2568:41509:2;;;1312:30:25;2568:41509:2;;;;;;;;;;;;-1:-1:-1;;2568:41509:2;;;;2015:24:25;;:::i;:::-;4288:69:32;1270:79:25;;2015:24;;:::i;:::-;563:17:15;4520:68:32;;19827:29:2;;:::i;:::-;-1:-1:-1;;;;;2568:41509:2;;-1:-1:-1;;;;;2568:41509:2;;;4469:64:19;;;;:::i;:::-;2568:41509:2;-1:-1:-1;;;;;2568:41509:2;4556:65:19;;;;:::i;:::-;2568:41509:2;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20210:70;;;;:::i;:::-;2568:41509;;;;;20316:101;;;;:::i;:::-;2568:41509;;;-1:-1:-1;;;;;2568:41509:2;5292:22:19;;;:::i;:::-;2568:41509:2;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;563:3:13;2568:41509:2;;;;;;;;;;;;-1:-1:-1;;;1278:3:13;2568:41509:2;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2568:41509:2;;;20647:155;1906:73:13;1278:3;1906:73;;;:::i;:::-;20647:155:2;:::i;:::-;2568:41509;;-1:-1:-1;;2568:41509:2;;;;;;;-1:-1:-1;;;;;2568:41509:2;-1:-1:-1;;;2568:41509:2;;;-1:-1:-1;;;2568:41509:2;;;20823:156;1823:74:13;2568:41509:2;1823:74:13;-1:-1:-1;;;;;1823:74:13;;:::i;20823:156:2:-;2568:41509;;;2015:24:25;;:::i;:::-;4520:68:32;2568:41509:2;;;;;;;;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;-1:-1:-1;;2568:41509:2;;;;;;;-1:-1:-1;;2568:41509:2;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;27430:40;;2015:24:25;;:::i;:::-;4288:69:32;1270:79:25;;2015:24;;;;;563:17:15;2015:24:25;;:::i;:::-;4520:68:32;11267:196:2;11129:29;;;;:::i;:::-;11284:10;;;;;;;;;;11267:196;:::i;:::-;;;;;;;;;;;11470:1010;;;;2568:41509;;;11498:16;;11494:148;;11470:1010;11675:10;;;:::i;:::-;11284;;11693:98;;;;2568:41509;;;11693:98;2568:41509;;11693:98;;;;;2568:41509;11693:98;;2568:41509;;11693:98;2568:41509;11693:98;;;:::i;:::-;;2568:41509;;;11284:10;11693:98;;;;;;;;11470:1010;2568:41509;;;;11859:16;;:71;;;;11470:1010;11855:119;;;;11470:1010;;13310:23;11470:1010;2568:41509;11470:1010;;12865:13;11470:1010;13335:23;11470:1010;;;;;;;-1:-1:-1;;;;;11470:1010:2;;12808:23;12777;2568:41509;;2675:57:18;12777:23:2;;:::i;:::-;12808;;:::i;:::-;2128:88:20;-1:-1:-1;;;;;2128:88:20;;;2568:41509:2;2128:88:20;;11284:10:2;;12865:13;:::i;:::-;2568:41509;;;;;;5408:198:20;;-1:-1:-1;;;;;2568:41509:2;;;;5408:198:20;2568:41509:2;5408:198:20;;2568:41509:2;;;;;;12969:19;5408:198:20;;;;;2568:41509:2;;3269:96:20;-1:-1:-1;;;;;3269:96:20;-1:-1:-1;;3269:96:20;2568:41509:2;3269:96:20;;;2568:41509:2;;;;;;;;;11284:10;12896:400;2568:41509;11284:10;12896:400;;13310:23;:::i;:::-;13335;;:::i;:::-;2568:41509;;2015:24:25;;:::i;:::-;4520:68:32;2568:41509:2;;;;;;;;;;;;;;11855:119;11949:16;2568:41509;;11949:16;2568:41509;;;11949:16;11859:71;11879:38;;;;:::i;:::-;11920:10;;:::i;:::-;-1:-1:-1;11859:71:2;;;;11693:98;2568:41509;;11693:98;;;:::i;:::-;2568:41509;;;;11693:98;;;;2568:41509;;;;;;;;;;11494:148;11618:13;24578:6;11618:13;;:::i;:::-;24553:6;-1:-1:-1;;;;;24553:6:2;2568:41509;24578:6;:::i;:::-;11494:148;;;11470:1010;11998:16;2568:41509;11998:16;;11994:148;;11470:1010;12175:10;;:::i;:::-;11284;;12193:98;;;;2568:41509;;12193:98;2568:41509;;;;12193:98;;;;;2568:41509;12193:98;;2568:41509;12193:98;;;:::i;:::-;;11284:10;;;12193:98;;;;;;;;11470:1010;2568:41509;;;;12359:16;;:71;;;;11470:1010;12355:119;;;;11470:1010;;13310:23;11470:1010;2568:41509;11470:1010;;12865:13;11470:1010;13335:23;11470:1010;;;;;;;-1:-1:-1;;;;;11470:1010:2;;;12359:71;12379:38;;;;:::i;:::-;12420:10;;:::i;:::-;-1:-1:-1;12359:71:2;;;;12193:98;2568:41509;12193:98;;;:::i;:::-;2568:41509;;;12193:98;;;;2568:41509;;;;;;;;;12193:98;2568:41509;;;11994:148;24463:6;12118:13;;;:::i;:::-;24438:6;-1:-1:-1;;;;;24438:6:2;2568:41509;24463:6;:::i;:::-;11994:148;;1270:79:25;1312:30;2568:41509:2;1312:30:25;2568:41509:2;;1312:30:25;27430:40:2;27458:12;2568:41509;27458:12;2568:41509;;27458:12;2568:41509;;;;;;-1:-1:-1;;2568:41509:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1533:816:1;;;;2568:41509:2;1533:816:1;;2568:41509:2;1533:816:1;;;;;;;;2568:41509:2;1533:816:1;2568:41509:2;;1533:816:1;;2568:41509:2;;1533:816:1;;;;;;;;;;;;;;;;;;;2568:41509:2;1533:816:1;;;;;2568:41509:2;1533:816:1;;;;;;2568:41509:2;;;;;;-1:-1:-1;;2568:41509:2;;;;;;;:::i;:::-;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;;;;-1:-1:-1;;2568:41509:2;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;18510:7:2;2568:41509;;;-1:-1:-1;;;;;18533:6:2;2568:41509;;18478:1077;;2568:41509;-1:-1:-1;;;;;18555:6:2;2568:41509;;18478:1077;;2568:41509;18592:24;2568:41509;18478:1077;;2568:41509;18647:24;2568:41509;18478:1077;;2568:41509;18711:36;2568:41509;18478:1077;;2568:41509;18787:36;2568:41509;18478:1077;;2568:41509;18860:29;2568:41509;18478:1077;;2568:41509;-1:-1:-1;;;;;18921:24:2;2568:41509;;18478:1077;;2568:41509;18964:10;2568:41509;18478:1077;;2568:41509;18994:11;2568:41509;18478:1077;;2568:41509;-1:-1:-1;;;;;19025:11:2;2568:41509;;18478:1077;;2568:41509;-1:-1:-1;;;;;19056:11:2;2568:41509;;18478:1077;;2568:41509;-1:-1:-1;;;;;19087:11:2;2568:41509;;18478:1077;;2568:41509;-1:-1:-1;;;;;19118:11:2;2568:41509;;18478:1077;;2568:41509;-1:-1:-1;;;;;19149:11:2;2568:41509;;18478:1077;;2568:41509;-1:-1:-1;;;;;19180:11:2;2568:41509;;18478:1077;;2568:41509;-1:-1:-1;;;;;19211:11:2;2568:41509;;18478:1077;;2568:41509;19255:26;2568:41509;18478:1077;;2568:41509;19313:25;2568:41509;18478:1077;;2568:41509;19374:29;2568:41509;18478:1077;;2568:41509;19438:28;2568:41509;18478:1077;;2568:41509;19491:17;2568:41509;18478:1077;;2568:41509;19532:16;2568:41509;18478:1077;;2568:41509;;;;18510:7;-1:-1:-1;;;;;18510:7:2;2568:41509;;;-1:-1:-1;;;;;2568:41509:2;18478:1077;;2568:41509;;;;;;-1:-1:-1;;;;;2568:41509:2;18478:1077;;2568:41509;;;;;;;18478:1077;;2568:41509;;;;;;18478:1077;;2568:41509;;;;;;18478:1077;;2568:41509;;;;;;18478:1077;;2568:41509;;;;;;18478:1077;;2568:41509;;;;;-1:-1:-1;;;;;2568:41509:2;18478:1077;;2568:41509;;;;;;;18478:1077;;2568:41509;;;;;;18478:1077;;2568:41509;;;;;-1:-1:-1;;;;;2568:41509:2;18478:1077;;2568:41509;;;;;;-1:-1:-1;;;;;2568:41509:2;18478:1077;;2568:41509;;;;;;-1:-1:-1;;;;;2568:41509:2;18478:1077;;2568:41509;;;;;;-1:-1:-1;;;;;2568:41509:2;18478:1077;;2568:41509;;;;;;-1:-1:-1;;;;;2568:41509:2;18478:1077;;2568:41509;;;;;;-1:-1:-1;;;;;2568:41509:2;18478:1077;;2568:41509;;;;;;-1:-1:-1;;;;;2568:41509:2;18478:1077;;2568:41509;;;;;;;18478:1077;;2568:41509;;;;;;18478:1077;;2568:41509;;;;;;18478:1077;;2568:41509;;;;;;18478:1077;;2568:41509;;;;;;18478:1077;;2568:41509;;;;;18478:1077;2568:41509;;;;;;;;;;;;-1:-1:-1;;2568:41509:2;;;;;;:::i;:::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;:::i;:::-;2015:24:25;;;;;:::i;:::-;4288:69:32;1270:79:25;;2568:41509:2;2015:24:25;8970:759:2;2015:24:25;406:25:15;2015:24:25;;:::i;:::-;4520:68:32;2568:41509:2;;8970:759;;:::i;:::-;2568:41509;2015:24:25;;:::i;2568:41509:2:-;;;;;;-1:-1:-1;;2568:41509:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8754:56;;:::i;:::-;2015:24:25;;:::i;:::-;4288:69:32;1270:79:25;;1045:33:15;2015:24:25;;:::i;:::-;4520:68:32;17629:10:2;17623:16;;:37;;;;2568:41509;17619:70;;17770:29;2568:41509;;17810:56;2568:41509;;;;;;;17737:27;2568:41509;;;17737:27;;2568:41509;;;;;;;;;;;;;;;17737:27;2568:41509;;;;;;;;;;;;;;;17770:29;2568:41509;;;;;;;;;17810:56;2568:41509;2015:24:25;;:::i;:::-;4520:68:32;2568:41509:2;17619:70;17669:20;;2568:41509;17669:20;2568:41509;;;;17669:20;17623:37;17649:11;;17643:17;;17623:37;;2568:41509;;;;;;-1:-1:-1;;2568:41509:2;;;;;;:::i;:::-;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2015:24:25;;;;;:::i;:::-;4288:69:32;1270:79:25;;2015:24;;;;;14586:13:2;2015:24:25;;;;;;;13826:77:2;2015:24:25;;14012:192:2;2015:24:25;;;683:34:15;2015:24:25;;:::i;:::-;4520:68:32;13826:77:2;:::i;:::-;14012:192;:::i;:::-;;;;;;;;;;;;2675:57:18;;;14529:23:2;14498;2568:41509;2675:57:18;14498:23:2;;:::i;:::-;14529;;:::i;:::-;2128:88:20;-1:-1:-1;;;;;2128:88:20;;;2568:41509:2;2128:88:20;;14586:13:2;;:::i;:::-;14619:40;2568:41509;14619:40;2568:41509;;;;;;14619:40;2568:41509;;;;;;-1:-1:-1;;2568:41509:2;;;;;;;;;;;;;;;;;;;;;;;;;;8754:56;;:::i;:::-;2015:24:25;;:::i;:::-;4288:69:32;1270:79:25;;850:24:15;2015::25;;:::i;:::-;4520:68:32;2568:41509:2;;;;;;;;16418:29;;16414:129;;2568:41509;;;;;;;;;;;;16554:33;;16550:141;;2568:41509;;2015:24:25;;:::i;16550:141:2:-;16646:36;2568:41509;;;;;;;;;;;;;;;;;;16646:36;16550:141;;;;;16414:129;16502:32;2568:41509;;;;;;;;;;;;;;;;;;16502:32;16414:129;;;;;2568:41509;;;;;;-1:-1:-1;;2568:41509:2;;;;;;;;;;;;;8804:1;8754:56;;;:::i;:::-;8804:1;:::i;:::-;2568:41509;;;;;;;-1:-1:-1;;2568:41509:2;;;;-1:-1:-1;;;;;2568:41509:2;;:::i;:::-;8754:56;;:::i;:::-;2568:41509;;;18001:32;2568:41509;;;18001:32;2568:41509;18044:38;2568:41509;18044:38;;2568:41509;;;;;;;-1:-1:-1;;2568:41509:2;;;;;;;;;655:751:1;;2568:41509:2;655:751:1;2568:41509:2;655:751:1;;;2568:41509:2;655:751:1;;;;;;;;;;2568:41509:2;;;655:751:1;;;;;;;;;;;;;;;;;;;;2568:41509:2;;655:751:1;;;2568:41509:2;;;;;;-1:-1:-1;;2568:41509:2;;;;;;;;;;;;;;;8754:56;;:::i;:::-;2015:24:25;;:::i;:::-;4288:69:32;1270:79:25;;944:36:15;2015:24:25;;:::i;:::-;4520:68:32;2568:41509:2;;;;;;;;16917:47;;16913:177;;2568:41509;2015:24:25;;:::i;16913:177:2:-;17033:50;2568:41509;;;;;;;;;;;;;;;;;;17033:50;16913:177;;;;;2568:41509;;;;;;-1:-1:-1;;2568:41509:2;;;;;;436:83:1;2568:41509:2;436:83:1;2568:41509:2;;436:83:1;2568:41509:2;;;;;;-1:-1:-1;;2568:41509:2;;;;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;8754:56;;:::i;:::-;2015:24:25;;:::i;:::-;4288:69:32;1270:79:25;;771:24:15;2015::25;;:::i;:::-;4520:68:32;2568:41509:2;;;;;;;;;;21645:27;2568:41509;;21710:27;2568:41509;;21778:30;2568:41509;;21849:30;2568:41509;21895:16;;21891:963;;2568:41509;22881:18;;;16115:75;22881:18;;2568:41509;22881:18;;;;;;22877:581;;2568:41509;15534:6;;;15999:104;15534:6;;;;15833:104;15534:6;15592:24;15519:98;15592:24;15519:98;;;;;:::i;:::-;2568:41509;;21645:27;2568:41509;15688:6;15673:98;15688:6;15746:24;;;15673:98;;;;:::i;:::-;2568:41509;;21710:27;2568:41509;15833:104;:::i;:::-;2568:41509;;21778:30;2568:41509;15999:104;:::i;:::-;2568:41509;21849:30;2568:41509;;;;;;;;;;;;;;;;;;16115:75;2568:41509;2015:24:25;;:::i;22877:581:2:-;15999:104;2568:41509;;;;;22934:23;2568:41509;;23027:60;22934;2568:41509;-1:-1:-1;;;;;2568:41509:2;;;;;22934:60;:::i;:::-;2568:41509;;;;;;;;23027:60;:::i;:::-;2568:41509;;;;;;;;;;;;;;22934:23;2568:41509;22877:581;;;;;;;;21891:963;22011:10;;;;;;;;;;;:::i;:::-;22024:24;22011:37;;;:::i;:::-;2568:41509;;;;;;-1:-1:-1;;;;;2568:41509:2;;22011:71;;;:::i;:::-;2568:41509;;22093:23;2568:41509;;-1:-1:-1;;;;;2568:41509:2;;22011:105;;;:::i;:::-;:135;;;;:::i;:::-;:168;;;;:::i;:::-;22212:10;;;:::i;:::-;22225:24;22212:37;;;:::i;:::-;2568:41509;;;22212:71;;;:::i;:::-;2568:41509;;;22212:105;;;:::i;:::-;:135;;;;:::i;:::-;:168;;;;:::i;:::-;2568:41509;22460:47;2568:41509;;;;22460:47;:::i;:::-;2568:41509;;;;;22540:47;;;;:::i;:::-;2568:41509;;;;;;;;;;;;21891:963;;;;;;;;;;;2568:41509;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;:::o;17145:250::-;2568:41509;;17221:1;17210:12;;17206:44;;17272:10;2568:41509;;;;17260:22;;;17256:35;;2568:41509;17357:33;2568:41509;;;;;;;17272:10;2568:41509;;;;;;;;;;17357:33;17145:250::o;17256:35::-;17284:7;;;:::o;17206:44::-;17231:19;;;;;;2568:41509;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;:::o;:::-;-1:-1:-1;;;;2568:41509:2;;;;;-1:-1:-1;2568:41509:2;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;:::i;:::-;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2568:41509:2;;;;;;;;-1:-1:-1;;2568:41509:2;;;;:::o;8970:759::-;;;;;;;;9247:14;;;;:::i;:::-;:26;;;9243:45;;9298:14;;;;:::i;:::-;9323:13;;;;;;;;:::i;:::-;9298:45;;;;9294:88;;2568:41509;;;;4464:101:0;2568:41509:2;4464:101:0;2568:41509:2;4464:101:0;2568:41509:2;;;;;;4464:101:0;;;;9323:13:2;4464:101:0;;;9408:10:2;4464:101:0;;;;:::i;:::-;;2568:41509:2;;4464:101:0;;;;;;:::i;:::-;4430:26;4464:101;:::i;:::-;2568:41509:2;;;9492:132;;-1:-1:-1;;;;;2568:41509:2;;9571:10;9492:132;;2568:41509;;;;4464:101:0;2568:41509:2;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;2568:41509:2;;;;;;;:::i;:::-;9560:9;2568:41509;;;;9571:10;2568:41509;;;;9583:15;2568:41509;;;;9600:18;2568:41509;;;;9492:132;:12;;:132;;;;;;9247:14;;;9492:132;;;8970:759;9461:163;4868:144:0;9461:163:2;4868:144:0;9461:163:2;;;;4868:144:0;9461:163:2;;;2568:41509;;;4868:144:0;;;;9323:13:2;4868:144:0;;;9408:10:2;4464:101:0;4868:144;;;:::i;:::-;4835:25;4868:144;:::i;:::-;8970:759:2:o;9492:132::-;;;;;;2568:41509;9492:132;;2568:41509;9492:132;;;;;;2568:41509;9492:132;;;:::i;:::-;;;2568:41509;;;;;;9323:13;2568:41509;;;;9492:132;;;;4868:144:0;9492:132:2;;;;;-1:-1:-1;9492:132:2;;9294:88;9352:30;9247:14;9352:30;;9247:14;9352:30;9243:45;-1:-1:-1;9247:14:2;;-1:-1:-1;9247:14:2;;-1:-1:-1;;;;;9275:13:2:o;18171:186::-;563:17:15;2015:24:25;;:::i;:::-;4288:69:32;18246:36:2;18242:88;;2568:41509;18171:186;:::o;18242:88::-;18299:24;;:::i;2568:41509::-;;;;;;;;;:::o;:::-;-1:-1:-1;;;2568:41509:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;:::o;9773:924::-;;;;;;;10021:14;;;;:::i;:::-;:26;;;10017:45;;10072:14;;;;:::i;:::-;10097:13;;;;;;;;:::i;:::-;10072:45;;;;10068:88;;-1:-1:-1;;;;;2568:41509:2;;10166:10;;;:19;10162:50;;5271:104:0;2568:41509:2;;5271:104:0;10097:13:2;5271:104:0;;;;10166:10:2;5271:104:0;10166:10:2;;;;;;5271:104:0;;;;:::i;:::-;5234:29;5271:104;:::i;:::-;2568:41509:2;;10382:109;2568:41509;10382:109;;10443:10;10382:109;;2568:41509;;;;5271:104:0;2568:41509:2;;;;;;;;;;;;;;;;;:::i;:::-;10432:9;2568:41509;;;;10443:10;2568:41509;;;;10455:15;2568:41509;;;;10472:18;2568:41509;;;;10382:109;:12;;:109;;;;;;;10021:14;;;;10382:109;;;9773:924;10322:169;;5688:159:0;10322:169:2;;;;5688:159:0;10322:169:2;5688:159:0;10322:169:2;;;10497:89;;;9773:924;2568:41509;;5688:159:0;;;;10097:13:2;5688:159:0;;;10166:10:2;5271:104:0;5688:159;;;:::i;:::-;5652:28;5688:159;:::i;10497:89:2:-;10021:14;2568:41509;10021:14;2568:41509;;;10432:9;2568:41509;10542:13;:37;10021:14;;;-1:-1:-1;;2568:41509:2;-1:-1:-1;;;;;10542:37:2;2568:41509;;;;;;10021:14;2568:41509;10497:89;;10542:37;-1:-1:-1;;2568:41509:2;10021:14;10542:37;;10382:109;;;;;;;2568:41509;10382:109;;2568:41509;10382:109;;;;;;2568:41509;10382:109;;;:::i;:::-;;;2568:41509;;;;;;;10097:13;2568:41509;;;;;;;;;;;;;;10382:109;;;;;;;5688:159:0;10382:109:2;;;;;-1:-1:-1;10382:109:2;;10162:50;10194:18;10021:14;10194:18;;10021:14;10194:18;10017:45;-1:-1:-1;10021:14:2;;-1:-1:-1;10021:14:2;;-1:-1:-1;;;10049:13:2:o;27282:97::-;-1:-1:-1;;;;;27345:7:2;2568:41509;27331:10;:21;27327:47;;27282:97::o;27327:47::-;27361:13;;;;;;2568:41509;;;;;;;;;;;;;;;;:::o;:::-;-1:-1:-1;;;;;2568:41509:2;;-1:-1:-1;;;;;2568:41509:2;;;;:::o;:::-;;;;;;;;;;:::o;:::-;;;;;;;:::o;:::-;-1:-1:-1;;;2568:41509:2;;;;;;;;23472:502;;;;;23669:31;;;;:::i;:::-;23710:11;;;23706:42;;-1:-1:-1;;;;;2568:41509:2;2138:38:30;-1:-1:-1;;;;;8544:1067:30;;;8509:24;23720:1:2;8544:1067:30;;;;;;;;;;23720:1:2;8544:1067:30;;;;;;;;23720:1:2;8544:1067:30;;;;;;;23472:502:2;8544:1067:30;;23755:128:2;;2568:41509;8544:1067:30;23893:45:2;2568:41509;8544:1067:30;2568:41509:2;;;;23893:45;23944:25;23720:1;23472:502;:::o;23755:128::-;23827:40;23843:24;;;;;;;;;;:::i;:::-;23827:40;;:::i;:::-;23819:57;;:::o;8544:1067:30:-;;;;;;;;;;;;;23706:42:2;23723:25;;;;;23720:1;23723:25;:::o;31697:909::-;;31811:16;;;;31807:48;;31865:11;;31861:35;;31906:15;;;:34;;;;31697:909;31902:73;;31875:1;2568:41509;;;;;;;32026:23;32022:36;;32067:16;;;:36;;;;31697:909;32063:80;;376:19:19;;;;;-1:-1:-1;;;2568:41509:2;;;-1:-1:-1;;;2568:41509:2;;;32300:20;32215:15;32258;32215;;;32348:20;32215:15;;:::i;:::-;32258;;:::i;:::-;32300:20;;:::i;:::-;32348;;:::i;:::-;32398:60;;;;;:::i;:::-;32386:72;;:156;;;;;31697:909;32375:227;;;;;31697:909::o;32375:227::-;32564:31;31875:1;32564:31;;31875:1;32564:31;32386:156;32484:58;;;;;:::i;:::-;-1:-1:-1;32386:156:2;;;;;32067:36;32087:16;;;;32067:36;;32022;32051:7;;;;:::o;31902:73::-;31949:26;31875:1;31949:26;;31875:1;31949:26;31906:34;31925:15;;;;31906:34;;31861:35;31885:11;31875:1;31885:11;;31875:1;31885:11;31807:48;31836:19;;;;;;32951:1351;;;;;;;;;;;;;;;;2568:41509;;33349:20;;;2568:41509;;;-1:-1:-1;;;;;2675:57:18;-1:-1:-1;;;;;2675:57:18;6223:326:0;2675:57:18;;;;6223:326:0;2675:57:18;33368:1:2;2675:57:18;33394:51:2;;2568:41509;;6223:326:0;;;;;;;;2568:41509:2;6223:326:0;;;2568:41509:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;;;;;;;:::i;6223:326:0:-;6198:17;6223:326;:::i;:::-;33368:1:2;33700:211;;;;;;;2568:41509;33719:92;2568:41509;-1:-1:-1;;;;;2568:41509:2;;33719:92;;:::i;:::-;33700:211;;;33368:1;28219:19;;;;;;:344;;;28308:64;;;;;28321:24;28308:64;2568:41509;28219:344;28629:134;;;;33368:1;28629:134;;28666:20;;;36452:248;;28219:344;2568:41509;33368:1;2568:41509;;;;;;:::i;:::-;;;;;6223:326:0;2568:41509:2;;;;;;;;;;;;;;;33368:1;6223:326:0;2568:41509:2;;;;;:::i;:::-;;;;;;-1:-1:-1;;;;;34876:42:2;;;2568:41509;;;;;;;;;;:::i;:::-;;;;;;33368:1;6223:326:0;34959:102:2;;;2568:41509;33368:1;2568:41509;;;;;;;;;;;;;;33368:1;2568:41509;35203:10;6223:326:0;2568:41509:2;;33368:1;2568:41509;;;;;;;;:::i;:::-;;-1:-1:-1;;;;;2568:41509:2;;;;-1:-1:-1;;;;;2568:41509:2;;;;6223:326:0;2568:41509:2;;;;;;;;;;;;;;;;;;;;;;;;;;;563:3:13;2568:41509:2;;;35261:58;-1:-1:-1;;;;;2568:41509:2;;35261:58;;:::i;:::-;2568:41509;35350:89;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;35350:89;:::i;:::-;36708:330;;;;-1:-1:-1;;;;;2568:41509:2;;;;36708:330;;;;37072:38;33368:1;37072:38;;2568:41509;;;;;;519:47:13;;28666:20:2;;;37251:81;28666:20;;;37251:81;;;;;-1:-1:-1;;;;;33368:1:2;37251:81;2568:41509;37341:5953;;37348:36;;2568:41509;37348:40;;;37471:57;;;;;2568:41509;;37484:21;;2568:41509;;37471:57;1278:3:13;2568:41509:2;;;;;;;;;;;;37586:77;;;;;;;:::i;:::-;37695;;;;;;:::i;:::-;37783:23;2568:41509;37816:772;;;;;;;-1:-1:-1;;;;;6223:326:0;37848:28:2;;2568:41509;;37848:33;:58;;;;37816:772;37844:364;;37816:772;;;38598:3544;;37816:772;42172:74;;;;;;;;;42185:21;;42172:74;;42260:28;;;;42172:74;-1:-1:-1;42256:1030:2;;;42302:940;;;;;42354:10;;;42336:28;;;;42332:39;;2568:41509;;;42385:16;;2568:41509;42385:16;;2568:41509;;33368:1;2568:41509;35203:10;6223:326:0;2568:41509:2;;33368:1;2568:41509;;;;;;;;:::i;:::-;;;-1:-1:-1;;;;;2568:41509:2;;;;-1:-1:-1;;;;;2568:41509:2;;;;6223:326:0;2568:41509:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;42466:36;-1:-1:-1;;;;;2568:41509:2;;;;;42583:47;;;2568:41509;42669:58;-1:-1:-1;;;;;2568:41509:2;;42669:58;;:::i;:::-;42644:83;;42302:940;37341:5953;;;;;;;42332:39;42366:5;;;;;;37341:5953;33573:19:35;;33547:12;;2568:41509:2;;33573:19:35;33569:97;;2568:41509:2;35617:28;33368:1;2568:41509;35617:28;;:::i;:::-;2568:41509;;;;;;;;33035:19:35;33031:97;;2568:41509:2;;;;33547:12:35;2568:41509:2;;33547:12:35;;2568:41509:2;;;;;;;;33368:1;2568:41509;28666:20;;;43438:328;28666:20;;;6223:326:0;34959:102:2;;;2568:41509;43563:36;;;2568:41509;;;;43438:328;;43816:248;;;;;2568:41509;33368:1;2568:41509;43816:248;;-1:-1:-1;;;;;28807:18:2;;1975:65:20;2128:88;;;;2568:41509:2;2128:88:20;;29202:1301:2;;;;;;-1:-1:-1;;2568:41509:2;;;-1:-1:-1;;;;;29418:100:2;2568:41509;;;;;;;;;29418:100;:::i;:::-;2568:41509;;;;;;;;;;;;;;;29202:1301;30515:29;30511:321;;29202:1301;34104:19;26320:64;26235;34104:19;;26274:24;;26235:64;;:::i;:::-;26359:24;;26320:64;;:::i;:::-;34130:93;;34237:17;;:38;;;29202:1301;2568:41509;;;32951:1351::o;2568:41509::-;;33368:1;2568:41509;35203:10;33368:1;2568:41509;34237:38;34258:17;;;;34237:38;;30511:321;30556:268;;;;;-1:-1:-1;;;;;;;30610:74:2;2568:41509;;;;;;;30610:74;:::i;:::-;2568:41509;;;;;;30556:268;30511:321;;;30556:268;-1:-1:-1;;;;;;;30739:74:2;2568:41509;;;;;;;30739:74;:::i;:::-;2568:41509;;;;;;;;30556:268;;29202:1301;2568:41509;;-1:-1:-1;;;;;2568:41509:2;;-1:-1:-1;;30064:100:2;2568:41509;;;;;;;;;30064:100;:::i;:::-;2568:41509;;;;;;;;;;29202:1301;;43816:248;2568:41509;33368:1;2568:41509;43816:248;;43438:328;43665:36;;2568:41509;;;;34959:102;6223:326:0;34959:102:2;;;2568:41509;43438:328;;;33031:97:35;-1:-1:-1;;;33368:1:2;33077:40:35;2568:41509:2;35203:10;2568:41509;6223:326:0;2568:41509:2;;33368:1;33077:40:35;33569:97;-1:-1:-1;;;33368:1:2;33615:40:35;33645:2;35203:10:2;2568:41509;;;6223:326:0;2568:41509:2;;33368:1;33615:40:35;42302:940:2;42782:11;;;;;42764:29;;;;42760:40;;42814:16;42898:77;42814:16;2568:41509;42814:16;;2568:41509;42814:16;;2568:41509;;33368:1;42956:17;;2568:41509;;;42898:77;:::i;:::-;2568:41509;;42989:47;;;2568:41509;;33368:1;2568:41509;35203:10;6223:326:0;2568:41509:2;;33368:1;2568:41509;;43140:89;2568:41509;;;;;;:::i;:::-;;;-1:-1:-1;;;;;2568:41509:2;;;;-1:-1:-1;;;;;2568:41509:2;;;;6223:326:0;2568:41509:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;43140:89;:::i;:::-;42302:940;;;42760:40;42795:5;;;;;;;;;;42256:1030;43270:5;;;;;;;;;;42260:28;42276:12;;;42260:28;;;42172:74;-1:-1:-1;;;;;42209:37:2;;;42172:74;;;38598:3544;38656:42;;;;;;:::i;:::-;2568:41509;;33368:1;2568:41509;;;;38736:78;;;;;;;:::i;:::-;38826:22;39004:2134;;;;;;28666:20;;;;2568:41509;39177:310;2568:41509;;;;-1:-1:-1;;;;;2568:41509:2;;39177:310;;;;;;:::i;:::-;39068:419;;;;;;;;39034:1110;;41154:20;;;;:44;;;39004:2134;41150:982;;39004:2134;38598:3544;;;;;41150:982;41611:455;41274:98;2568:41509;41274:98;;-1:-1:-1;;;;;41274:98:2;-1:-1:-1;;41274:98:2;;;;;;:::i;:::-;2568:41509;;;;;;;;1628:106:20;;;;;;41388:189:2;;2568:41509;;;;;;;;3269:96:20;;;2568:41509:2;3269:96:20;;;6223:326:0;2568:41509:2;;;;3269:96:20;2568:41509:2;3269:96:20;;;2568:41509:2;;;;41611:455;2568:41509;;33368:1;2568:41509;35203:10;6223:326:0;2568:41509:2;;;33368:1;2568:41509;-1:-1:-1;;;;;2568:41509:2;;;;;;;6223:326:0;2568:41509:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;41150:982;;;;;;;;41154:44;41178:20;;;;41154:44;;39034:1110;2568:41509;39762:309;2568:41509;;;;;;;-1:-1:-1;;;;;2568:41509:2;;39762:309;;;;;;:::i;:::-;39524:547;;;;;;;;;;;2568:41509;;39034:1110;;;39004:2134;28666:20;;;;2568:41509;40301:292;2568:41509;;;;-1:-1:-1;;;;;2568:41509:2;;40301:292;;;;;;:::i;:::-;40194:399;;;;;;;;40162:976;39004:2134;;40162:976;2568:41509;40778:291;2568:41509;;;;;;;-1:-1:-1;;;;;2568:41509:2;;40778:291;;;;;;:::i;37844:364::-;28666:20;;;;;37922:241;28666:20;;;2568:41509;-1:-1:-1;;;;;2568:41509:2;;37960:28;;37956:39;;37922:241;33368:1;37844:364;;;37956:39;37990:5;;;;;;;;;;;;;37922:241;-1:-1:-1;;;;;2568:41509:2;;38036:18;;:50;;;37922:241;38032:61;;38113:28;37922:241;38109:39;38143:5;;;;;;;;;;;;;38036:50;2568:41509;;-1:-1:-1;;;;;2568:41509:2;;38058:28;;38036:50;;37848:58;37885:21;;;37848:58;;37816:772;-1:-1:-1;;;;;2568:41509:2;;;38228:33;:74;;;;37816:772;38224:364;;37816:772;;;;38224:364;28666:20;;;;;38316:231;28666:20;;;2568:41509;-1:-1:-1;;;;;2568:41509:2;;38352:28;;38348:39;;38316:231;33368:1;38224:364;;;38316:231;-1:-1:-1;;;;;2568:41509:2;;38424:18;;:50;;;38316:231;38420:61;;38499:28;38316:231;38495:39;38529:5;;;;;;;;;;;;;38424:50;2568:41509;;-1:-1:-1;;;;;2568:41509:2;;38446:28;;38424:50;;38228:74;38265:37;-1:-1:-1;;;;;38265:37:2;;;38228:74;;37471:57;2568:41509;;37508:20;;2568:41509;;37471:57;;37251:81;37271:60;;;;;-1:-1:-1;;;;;2568:41509:2;;;;37271:60;37251:81;;;;;;;;;37271:60;-1:-1:-1;;;;;2568:41509:2;;;;37271:60;;2568:41509;;33368:1;2568:41509;;33368:1;2568:41509;36452:248;36509:60;;;;;-1:-1:-1;;;;;36522:9:2;2568:41509;;;36509:60;2568:41509;36583:42;;;36579:113;36452:248;36579:113;36639:42;;36579:113;36452:248;;36509:60;-1:-1:-1;;;;;2568:41509:2;36547:9;2568:41509;;36509:60;;28308:64;28348:24;28308:64;;28219:344;28470:64;;;;;28483:24;28470:64;;33368:1;2568:41509;;28219:344;;28470:64;28510:24;28470:64;;;33700:211;33820:91;2568:41509;;-1:-1:-1;;;;;2568:41509:2;;33820:91;;:::i;:::-;33700:211;;;;2568:41509;;33368:1;2568:41509;;33368:1;2568:41509;25889:224:35;;2568:41509:2;;;26013:19:35;;;;26009:98;;25889:224;:::o;26009:98::-;-1:-1:-1;;;26055:41:35;;26085:3;26055:41;2568:41509:2;;;;26055:41:35;;6564:911:0;;;;;;;;;;;;;;;;2568:41509:2;;7034:430:0;;;;;;;;;;;-1:-1:-1;;;;;2568:41509:2;7034:430:0;;;2568:41509:2;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7034:430:0;2568:41509:2;;7034:430:0;;;;;;;;:::i;:::-;;;7010:16;7034:430;:::i;2568:41509:2:-;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;:::i;:::-;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;:::i;27098:180::-;27184:24;-1:-1:-1;;;;;2568:41509:2;;27214:33;;2568:41509;-1:-1:-1;;;;;27260:13:2;2568:41509;;27098:180;:::o;2568:41509::-;;;-1:-1:-1;;;;;2568:41509:2;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2568:41509:2;;;;;:::i;:::-;;;;-1:-1:-1;2568:41509:2;;;;:::o;:::-;;;:::o;30846:508::-;-1:-1:-1;30846:508:2;31052:46;-1:-1:-1;;;;;31018:24:2;;:::i;:::-;2568:41509;31052:46;2568:41509;;31052:46;;;;2568:41509;31052:46;;;;;-1:-1:-1;;;;;31052:46:2;;;30846:508;-1:-1:-1;31048:302:2;;2568:41509;;31273:77;;:::i;:::-;2568:41509;;31316:27;;;;;;;31052:46;31316:27;;2568:41509;;;;;;;;;;;;;;;;-1:-1:-1;2568:41509:2;;;;;;;;-1:-1:-1;;2568:41509:2;;;31316:27;;;;31048:302;31166:58;-1:-1:-1;;;;;2568:41509:2;;-1:-1:-1;;;;;2568:41509:2;;-1:-1:-1;;;;;2568:41509:2;;31166:58;:::i;:::-;31232:33;;;:::o;31052:46::-;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;2568:41509;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;:::i;:::-;31052:46;;;;;;;;;;-1:-1:-1;31052:46:2;;24251:109;2568:41509;;;24316:39;;24349:4;24316:39;;;2568:41509;;24323:6;24316:39;24323:6;-1:-1:-1;;;;;24323:6:2;2568:41509;24316:39;;;;;;;-1:-1:-1;24316:39:2;;;24309:46;24251:109;:::o;24316:39::-;;;2568:41509;24316:39;;2568:41509;24316:39;;;;;;2568:41509;24316:39;;;:::i;:::-;;;2568:41509;;;;;24251:109;:::o;24316:39::-;;;-1:-1:-1;24316:39:2;;24073:109;2568:41509;;;24138:39;;24171:4;24138:39;;;2568:41509;;24145:6;24138:39;24145:6;-1:-1:-1;;;;;24145:6:2;2568:41509;24138:39;;;;;;;-1:-1:-1;24138:39:2;;;24131:46;24073:109;:::o;24887:482::-;;2568:41509;25028:20;;2568:41509;;25125:67;2568:41509;25156:3;2568:41509;25125:67;;:::i;25024:335::-;25282:68;2568:41509;25313:3;2568:41509;25282:68;;:::i;5076:530:19:-;;5292:22;;;:::i;:::-;586:17;2568:41509:2;;;;6945:1:34;-1:-1:-1;;;;;2568:41509:2;;;;;;6930:5:34;;;2568:41509:2;5076:530:19;:::o;1676:308:13:-;;1804:175;;;-1:-1:-1;;;2568:41509:2;;-1:-1:-1;;;2568:41509:2;;;1823:74:13;;;:::i;1804:175::-;-1:-1:-1;;;2568:41509:2;;-1:-1:-1;;;2568:41509:2;;;1906:73:13;;;:::i;9261:218:35:-;-1:-1:-1;;;;;9341:25:35;;9337:105;;-1:-1:-1;;;;;2568:41509:2;9261:218:35;:::o;9337:105::-;9389:42;;;9420:3;9389:42;2568:41509:2;;;;9389:42:35;;468:161:25;2568:41509:2;;534:68:25;;;2568:41509:2;;;534:68:25;;;;2568:41509:2;534:68:25;;:::i;:::-;2568:41509:2;;524:79:25;;-1:-1:-1;;524:105:25;;468:161::o;11108:238:34:-;;11235:25;;-1:-1:-1;;;11235:25:34;;:::i;:::-;11279:26;11309:25;;;;-1:-1:-1;;;11235:104:34;11309:25;;:29;;11235:104;;:::i;11108:238::-;-1:-1:-1;;;11235:104:34;11108:238;11235:25;;;;;:::i;:::-;11279:26;11309:25;:29;;11235:104;;:::i;11108:238::-;;-1:-1:-1;;;11235:25:34;11108:238;11235:25;:::i;2976:253:19:-;;3142:72;2976:253;3142:72;:::i;:::-;2568:41509:2;;;;;;;;2976:253:19;:::o;3793:254::-;3960:72;3793:254;3960:72;:::i;3810:412:0:-;;3894:10;;3890:23;;3919:299;;3973:3;3965:11;;3988:19;;3984:30;;4042:33;;;:::i;:::-;-1:-1:-1;;;;;2568:41509:2;;4087:23:0;4083:57;;3903:1;365:20:12;;;;;;;;;;;;;;:::i;:::-;395:8;;391:190;;365:20;2568:41509:2;;590:18:12;586:72;;2568:41509:2;365:20:12;692:81;;;;807:79;;2568:41509:2;;;895:36:12;891:90;;4210:1:0;2568:41509:2;3919:299:0;;891:90:12;948:26;3903:1:0;948:26:12;;3903:1:0;948:26:12;391:190;2568:41509:2;;417:17:12;;413:126;;553:21;3903:1:0;553:21:12;;3903:1:0;553:21:12;413:126;365:20;446:85;;4083:57:0;4119:21;3903:1;4119:21;;3903:1;4119:21;3890:23;3906:7;;;:::o;1219:204:30:-;;-1:-1:-1;;;;;8544:1067:30;;;8509:24;-1:-1:-1;8544:1067:30;;;;;;;-1:-1:-1;8544:1067:30;;;;;;;1338:4;8544:1067;;;;;;;;1219:204;8544:1067;;1305:38;1301:116;;1219:204;:::o;1301:116::-;-1:-1:-1;;;;;1366:40:30;;8544:1067;1366:40;2568:41509:2;8544:1067:30;2568:41509:2;8544:1067:30;;1366:40;8544:1067;;1338:4;8544:1067;;;;;;;;;;;;;;;;;;;;;;;;;7296:3683:34;;;;2568:41509:2;;-1:-1:-1;;7296:3683:34;;1412:159;;;;;;;;;;;;;;;;7552:9;;7548:365;;8023:19;25313:3:2;8023:19:34;;8019:142;;8444:308;2568:41509:2;8444:308:34;;25313:3:2;8444:308:34;;;;;;;;2568:41509:2;;8444:308:34;;9016:384;;9463:18;2568:41509:2;7296:3683:34;:::o;8019:142::-;1829:135:31;;;940:4;1829:135;;;;;7548:365:34;7881:17;;;25313:3:2;7881:17:34;;;2568:41509:2;7874:24:34;:::o;7296:3683::-;-1:-1:-1;;;;;1412:159:34;;;;;;;;;;;;;;;;;7552:9;;7548:365;;8023:19;;;;8019:142;;-1:-1:-1;;;8444:308:34;;;2568:41509:2;;;8971:31:34;;9016:384;;;9854:1;2568:41509:2;9835:1:34;2568:41509:2;9834:21:34;2568:41509:2;;;9854:1:34;2568:41509:2;;;;;9854:1:34;2568:41509:2;;;;;9854:1:34;2568:41509:2;;;;;9854:1:34;2568:41509:2;;;;;9854:1:34;2568:41509:2;;;;;9854:1:34;2568:41509:2;;9016:384:34;;;;2568:41509:2;9016:384:34;;;8444:308;;;;;;2568:41509:2;8444:308:34;;9016:384;9463:18;2568:41509:2;7296:3683:34;:::o;8019:142::-;1829:135:31;;2568:41509:2;1829:135:31;8082:16:34;5328:5;2568:41509:2;940:4:31;5322:42:34;1829:135:31;;;;;7548:365:34;7881:17;;;;;;:::i;7296:3683::-;-1:-1:-1;;;;;1412:159:34;;;;;;;;;;;;;;;;;7552:9;;7548:365;;8023:19;;;;8019:142;;-1:-1:-1;;;8444:308:34;;;2568:41509:2;;;8971:31:34;;9016:384;;;9854:1;2568:41509:2;9835:1:34;2568:41509:2;9834:21:34;2568:41509:2;;;9854:1:34;2568:41509:2;;;;;9854:1:34;2568:41509:2;;;;;9854:1:34;2568:41509:2;;;;;9854:1:34;2568:41509:2;;;;;9854:1:34;2568:41509:2;;;;;9854:1:34;2568:41509:2;;9016:384:34;;;;2568:41509:2;9016:384:34;;;8444:308;;;;;;2568:41509:2;8444:308:34;;9016:384;9463:18;2568:41509:2;7296:3683:34;:::o;:::-;;;-1:-1:-1;;7296:3683:34;;1412:159;;;;;;;;;;;;;;;;7552:9;;7548:365;;8023:19;;;;8019:142;;8444:308;;;;2568:41509:2;;;8971:31:34;;9016:384;;;9854:1;2568:41509:2;9835:1:34;2568:41509:2;9834:21:34;2568:41509:2;;;9854:1:34;2568:41509:2;;;;;9854:1:34;2568:41509:2;;;;;9854:1:34;2568:41509:2;;;;;9854:1:34;2568:41509:2;;;;;9854:1:34;2568:41509:2;;;;;9854:1:34;2568:41509:2;;9016:384:34;;;;2568:41509:2;9016:384:34;;;8444:308;;;;;;2568:41509:2;8444:308:34;;9016:384;9463:18;2568:41509:2;7296:3683:34;:::o;8019:142::-;1829:135:31;;2568:41509:2;1829:135:31;8082:16:34;5328:5;2568:41509:2;940:4:31;5322:42:34;1829:135:31;;;;;7548:365:34;7881:17;;;;;;;:::i;6269:704::-;6354:6;;6350:150;;-1:-1:-1;;;;;2568:41509:2;6930:5:34;2568:41509:2;;6269:704:34:o;6350:150::-;1829:135:31;6359:1:34;1829:135:31;1035:4;1829:135;;;;;6269:704:34;;6354:6;;6350:150;;6940:11;6945:1;2568:41509:2;;;;;6940:11:34;:::i;:::-;2568:41509:2;6930:5:34;;;2568:41509:2;6269:704:34;:::o;1194:251:17:-;;1273:6;;1269:134;;1427:12;;;:::i;:::-;576:6;;;572:134;;2568:41509:2;;;-1:-1:-1;;2568:41509:2;;;;;;;;;;;;856:14:17;;:30;;;;1194:251;852:92;;;;1194:251;:::o;852:92::-;928:1;2568:41509:2;1194:251:17;:::o;856:30::-;1278:1;875:5;;;874:12;;856:30;;;;2923:678:0;3043:1;3026:18;;3043:1;;;3075;3058:18;;3075:1;;;3110;3092:19;3088:43;;3148:28;2568:41509:2;3148:28:0;3043:1;2568:41509:2;3148:28:0;3088:43;3120:11;3113:18;:::o;3054:227::-;3075:1;3205:19;3201:43;;3261:11;3254:18;:::o;3201:43::-;3233:11;3226:18;:::o;3022:575::-;3314:1;3297:18;;3314:1;;;3346;3329:18;;3346:1;;;3043;3363:19;3359:43;;3419:11;3412:18;:::o;3359:43::-;3391:11;3384:18;:::o;3325:210::-;3346:1;3459:19;3455:43;;3515:11;3508:18;:::o;3455:43::-;3487:11;3480:18;:::o;3293:304::-;3562:28;2568:41509:2;3562:28:0;3043:1;2568:41509:2;3562:28:0;3717:191:13;3808:16;;3804:30;;2568:41509:2;-1:-1:-1;;;2568:41509:2;;-1:-1:-1;;;2568:41509:2;;;3847:56:13;;;:::i;3804:30::-;3826:8;2568:41509:2;3826:8:13;:::o;2371:380::-;;2546:16;;2542:30;;2672:3;2690:50;2568:41509:2;;;;;;;2690:50:13;:::i;2542:30::-;2564:8;;;2568:41509:2;2564:8:13;:::o;27118:4910:19:-;;;;;;;27668:95;;;;;:::i;:::-;2568:41509:2;;;;27817:2:19;376:19;27776:63;27772:122;;27936:33;;;;;27981:28;-1:-1:-1;;;;;27932:442:19;;-1:-1:-1;;;;;2568:41509:2;;;;10063:75:19;2568:41509:2;-1:-1:-1;;;;;2568:41509:2;;;;;;;10063:75:19;:::i;:::-;28593:99;27744:18;28593:99;10972:66;28593:99;;;;;:::i;:::-;10877:69;;;;:::i;:::-;10972:66;;:::i;:::-;2568:41509:2;;27744:18:19;2568:41509:2;28700:93:19;;2568:41509:2;;28831:54:19;;;;28827:2327;28831:54;;;28897:26;;;;;28827:2327;;31166:15;;31162:62;;28827:2327;2568:41509:2;;31651:28:19;2568:41509:2;;;27817:2:19;2568:41509:2;;;;27817:2:19;2568:41509:2;;;;;;31545:22:19;-1:-1:-1;;;;;31545:22:19;;;:::i;:::-;2568:41509:2;;;;;;;;31651:28:19;-1:-1:-1;;;;;31614:85:19;2568:41509:2;;;;;;31614:85:19;:::i;:::-;2568:41509:2;;;;;;;;31770:28:19;2568:41509:2;;;;;;31887:26:19;31840:21;;;:::i;:::-;-1:-1:-1;2568:41509:2;31887:26:19;;:::i;:::-;31921:96;;;;;;2568:41509:2;;27118:4910:19;:::o;31162:62::-;;-1:-1:-1;31651:28:19;31162:62;;28827:2327;27744:18;2568:41509:2;;;;;;;;;;;28960:240:19;2568:41509:2;;-1:-1:-1;;;;;2568:41509:2;;;28960:240:19;;;;:::i;:::-;2568:41509:2;-1:-1:-1;;;;;2568:41509:2;;;;;10063:75:19;2568:41509:2;;;;;;;10063:75:19;:::i;:::-;29339:94;;10972:66;29339:94;;;;;:::i;10972:66::-;2568:41509:2;;27744:18:19;2568:41509:2;29443:85:19;;2568:41509:2;;29543:53:19;;;;;:83;;;;28827:2327;29539:1077;;;;28827:2327;2568:41509:2;;;;;;;;30630:53:19;;;;:83;;;;28827:2327;30626:165;;;28827:2327;30805:53;;;30801:345;;28827:2327;;;;;30801:345;7777:62;2568:41509:2;;;30885:68:19;2568:41509:2;;;;;30885:68:19;:::i;:::-;2568:41509:2;;-1:-1:-1;;;;;2568:41509:2;;;;;7777:62:19;:::i;:::-;2568:41509:2;;;;;30801:345:19;;;;;30626:165;30727:53;-1:-1:-1;30727:53:19;30626:165;;30630:83;30687:26;;;;30630:83;;;29539:1077;29644:19;;;;;;29767:61;29644:19;;;;;;;;29640:43;;29539:1077;2568:41509:2;29767:61:19;:::i;:::-;29844:16;;;2568:41509:2;;;;;;29943:22:19;;29979:14;-1:-1:-1;29840:766:19;;29539:1077;;;;;;;;29840:766;2568:41509:2;;;;;;;;30091:29:19;;;30087:153;30091:29;;;30138:26;;30087:153;;2568:41509:2;;;;-1:-1:-1;;;;;2568:41509:2;;;;;10063:75:19;;;;:::i;:::-;30400:94;;;;:::i;:::-;10877:69;;;;;:::i;:::-;10972:66;;;;;:::i;:::-;2568:41509:2;27744:18:19;2568:41509:2;27744:18:19;2568:41509:2;29840:766:19;;;30087:153;;;;29640:43;27744:18;;-1:-1:-1;29640:43:19;;29543:83;29600:26;;;;29543:83;;;;;27932:442;28038:33;;;;28034:96;;6800:76;28166:99;-1:-1:-1;;;;;2568:41509:2;;;;;;;6800:76:19;:::i;:::-;28139:126;;;28279:28;27932:442;28275:91;;28321:34;;;;;;;;;;;-1:-1:-1;28321:34:19;-1:-1:-1;28321:34:19;-1:-1:-1;28321:34:19;-1:-1:-1;28321:34:19;-1:-1:-1;28321:34:19;:::o;18275:2883::-;;;;;;;;;2568:41509:2;;-1:-1:-1;;;;;2568:41509:2;;;18805:67:19;;;;18801:415;18805:67;;;2568:41509:2;7777:62:19;2568:41509:2;;-1:-1:-1;;;;;2568:41509:2;;7777:62:19;:::i;:::-;2568:41509:2;;;;;18801:415:19;;19228:32;;;19224:718;;18801:415;19954:20;;;19950:111;;2862:1;20104:95;10972:66;10877:69;20239:96;20104:95;;;20875:28;20104:95;21069:26;20104:95;;21121:26;20104:95;;;:::i;:::-;20239:96;;:::i;:::-;10877:69;;;:::i;:::-;10972:66;;;:::i;:::-;2568:41509:2;;2862:1:19;2568:41509:2;;;;;;;;;;;;;;;;;;;20764:27:19;-1:-1:-1;;;;;20764:27:19;;;:::i;:::-;2568:41509:2;;;;;;;;20875:28:19;-1:-1:-1;;;;;20838:85:19;2568:41509:2;;;;;;20838:85:19;:::i;:::-;2568:41509:2;;;;;;;;;20995:28:19;2568:41509:2;;;;;;21069:26:19;:::i;:::-;18791:1;2568:41509:2;21121:26:19;;:::i;:::-;18275:2883;:::o;19950:111::-;20020:32;-1:-1:-1;18791:1:19;;-1:-1:-1;18791:1:19;;;;-1:-1:-1;18791:1:19;;-1:-1:-1;20020:32:19;-1:-1:-1;;;;20020:32:19:o;19224:718::-;19276:33;;;;19272:70;;6800:76;19397:99;-1:-1:-1;;;;;2568:41509:2;;;;;;;6800:76:19;:::i;:::-;19510:37;;;;19506:74;;19595:37;;;19591:343;19224:718;19591:343;19646:37;;;10063:75;19646:37;-1:-1:-1;;;;;2568:41509:2;;;;;-1:-1:-1;;;;;2568:41509:2;;;;10063:75:19;:::i;:::-;19854:69;:33;;;;;;:69;;19591:343;;19224:718;;19854:69;;;;;19506:74;-1:-1:-1;19549:31:19;-1:-1:-1;27777:36:19;;-1:-1:-1;27777:36:19;;;;-1:-1:-1;27777:36:19;;-1:-1:-1;19549:31:19;-1:-1:-1;;;;19549:31:19:o;18801:415::-;19126:25;;-1:-1:-1;;;;;19161:46:19;18801:415;;;33653:4771;;;;;;;;;-1:-1:-1;;;;;5292:22:19;;;:::i;:::-;2568:41509:2;;;;;;;;5385:83:19;2568:41509:2;;6354:6:34;;6350:150;;6930:5;2568:41509:2;;;;-1:-1:-1;34308:137:19;;34488:33;;;;;34533:18;2568:41509:2;34484:326:19;34931:28;;;2568:41509:2;9300:66:19;2568:41509:2;-1:-1:-1;;;;;2568:41509:2;;;;;;;9300:66:19;:::i;:::-;35029:100;6930:5:34;5292:22:19;11908:66;-1:-1:-1;;;;;5292:22:19;;;:::i;:::-;2568:41509:2;;;;;;;11813:69:19;;;;:::i;:::-;11908:66;;:::i;:::-;2568:41509:2;;6930:5:34;2568:41509:2;35137:93:19;;2568:41509:2;;35268:54:19;;;;35264:2286;35268:54;;;35334:26;;;;35264:2286;;37562:15;;37558:62;;35264:2286;2568:41509:2;;;38235:26:19;2568:41509:2;;34931:28:19;2568:41509:2;;;;;;;;;;;;;37941:22:19;-1:-1:-1;;;;;37941:22:19;;;:::i;:::-;2568:41509:2;;;;;;;;-1:-1:-1;;;;;38010:85:19;2568:41509:2;;;;;;38010:85:19;:::i;:::-;2568:41509:2;;;;;;;;38166:28:19;2568:41509:2;;;;;;38235:26:19;:::i;:::-;38288:21;;;;:::i;:::-;2568:41509:2;;38317:96:19;;;;;;2568:41509:2;;33653:4771:19;:::o;37558:62::-;37589:22;-1:-1:-1;34931:28:19;37558:62;;35264:2286;6930:5:34;2568:41509:2;;16707:31:19;2568:41509:2;;;;16468:226:19;2568:41509:2;;-1:-1:-1;;;;;2568:41509:2;;;;;;;16514:24:19;;;:::i;:::-;16546:28;;;;:::i;:::-;2562:32;;;;:::i;:::-;;;:::i;:::-;16468:226;;:::i;:::-;16707:31;:::i;:::-;2568:41509:2;-1:-1:-1;;;;;2568:41509:2;;;;;9300:66:19;2568:41509:2;;;;;;;9300:66:19;:::i;:::-;35777:95;;11908:66;-1:-1:-1;;;;;5292:22:19;;;:::i;:::-;2568:41509:2;;;;;;;11813:69:19;;;;:::i;11908:66::-;2568:41509:2;;6930:5:34;2568:41509:2;35882:85:19;;2568:41509:2;;35982:53:19;;;;;:83;;;;35264:2286;35978:1035;;;;35264:2286;2568:41509:2;;;;;;;;37026:53:19;;;;:83;;;;35264:2286;37022:165;;;35264:2286;37201:53;;;37197:345;;35264:2286;;;;37197:345;2568:41509:2;;37281:68:19;2568:41509:2;;;;;37281:68:19;:::i;:::-;2568:41509:2;8536:77:19;-1:-1:-1;;;;;2568:41509:2;;;;;;;;8536:77:19;:::i;:::-;2568:41509:2;;;37197:345:19;;;;37022:165;37123:53;-1:-1:-1;37123:53:19;37022:165;;37026:83;37083:26;;;;37026:83;;;35978:1035;36083:19;;;;;;36206:61;36083:19;;;;;;;;36079:43;;2568:41509:2;36206:61:19;:::i;:::-;36283:16;;;2568:41509:2;;;;;;36382:22:19;;2568:41509:2;36279:724:19;;35978:1035;;;;;;;;36279:724;36477:55;;;;;;;:24;;;;;;2568:41509:2;;36477:55:19;;36465:67;;36550:26;36546:89;;36477:55;2568:41509:2;;;-1:-1:-1;;;;;2568:41509:2;;;;;9300:66:19;;;;:::i;:::-;36796:95;5292:22;;;;:::i;:::-;-1:-1:-1;;;;;2568:41509:2;;;;;;;11813:69:19;;;;:::i;:::-;11908:66;;;;;:::i;:::-;2568:41509:2;6930:5:34;2568:41509:2;6930:5:34;2568:41509:2;36279:724:19;;;36546:89;36594:26;;;36546:89;;;36477:55;;2568:41509:2;36477:55:19;;;35982:83;36039:26;;;;35982:83;;;;;34484:326;6908:85;34603:98;-1:-1:-1;;;;;2568:41509:2;;;;;;;6908:85:19;:::i;:::-;34576:125;34715:28;;34484:326;34711:91;;34757:34;;;;;;;;;;;2568:41509:2;34757:34:19;2568:41509:2;34757:34:19;2568:41509:2;34757:34:19;2568:41509:2;34757:34:19;2568:41509:2;34757:34:19;:::o;22554:2873::-;;;;;;;;;2568:41509:2;;23123:28:19;;;;2568:41509:2;-1:-1:-1;;;;;2568:41509:2;;;23084:67:19;;;;23080:405;23084:67;;;2568:41509:2;8536:77:19;2568:41509:2;;;;;8536:77:19;:::i;:::-;2568:41509:2;;;23080:405:19;;23497:32;;;23493:717;;23080:405;24222:20;;;24218:111;;24372:96;2862:1;24372:96;11908:66;11813:69;24372:96;-1:-1:-1;;;;;25337:26:19;24372:96;;23123:28;24372:96;;25390:26;24372:96;;5292:22;;;:::i;:::-;2568:41509:2;;;;;;;;5292:22:19;5385:83;5292:22;:::i;:::-;586:17;2568:41509:2;;;;;5385:83:19;11813:69;:::i;:::-;11908:66;;;:::i;:::-;2568:41509:2;;2862:1:19;2568:41509:2;;;;;;;;;;;;;;;;;;25033:27:19;-1:-1:-1;;;;;25033:27:19;;;:::i;:::-;2568:41509:2;;;;;;;;-1:-1:-1;;;;;25107:85:19;2568:41509:2;;;;;;25107:85:19;:::i;:::-;2568:41509:2;;;;;;;;;25264:28:19;2568:41509:2;;;;;;25337:26:19;:::i;:::-;25390;;:::i;:::-;2568:41509:2;;22554:2873:19;:::o;24218:111::-;24288:32;-1:-1:-1;23070:1:19;;-1:-1:-1;23070:1:19;;;;-1:-1:-1;23070:1:19;;-1:-1:-1;24288:32:19;-1:-1:-1;;;;;24288:32:19:o;23493:717::-;23545:33;;;;23541:70;;6908:85;23666:98;-1:-1:-1;;;;;2568:41509:2;;;;;;;6908:85:19;:::i;:::-;23778:37;;;;23774:74;;23863:37;;;23859:343;23493:717;23859:343;23914:37;;;9300:66;23914:37;;-1:-1:-1;;;;;2568:41509:2;;;;;;;9300:66:19;:::i;:::-;24122:69;:33;;;;;;:69;;23859:343;;23493:717;;24122:69;;;;;23774:74;-1:-1:-1;23817:31:19;-1:-1:-1;23070:1:19;;-1:-1:-1;23070:1:19;;;;-1:-1:-1;23070:1:19;;-1:-1:-1;23817:31:19;-1:-1:-1;;;;;23817:31:19:o;23080:405::-;23405:15;;23070:1;23430:46;23080:405;;;3117:511:13;;;3327:23;;:46;;;;3117:511;3323:60;;3553:64;2568:41509:2;;3535:3:13;2568:41509:2;;;;;;3553:64:13;;:::i;3323:60::-;3375:8;;;;2568:41509:2;3375:8:13;:::o;3327:46::-;3354:19;;;3327:46;;25373:374:2;25474:15;25470:19;;25466:47;;-1:-1:-1;;25525:19:2;;25521:47;;2568:41509;;25373:374;:::o;25521:47::-;25546:22;-1:-1:-1;;25546:22:2;:::o;25466:47::-;25491:22;25474:15;25491:22;:::o;34377:314:35:-;34570:16;34554:33;;34550:105;;34377:314;:::o;34550:105::-;34610:34;;;;2568:41509:2;;34610:34:35;;13338:1837:19;;;;;;;13737:58;13674:29;13620:24;;;;:::i;:::-;13674:29;;:::i;:::-;13754:26;-1:-1:-1;;;;;13754:26:19;;;;:::i;:::-;2568:41509:2;13737:58:19;;:::i;:::-;13802:20;13821:1;13832:17;;;;;:42;;;13338:1837;13832:63;;;13338:1837;13828:843;;13338:1837;14772:13;;;;;;:32;;;;13338:1837;14768:50;;;13338:1837;14829:24;;;14825:54;;13338:1837;14898:21;;;;;;:::i;:::-;:38;14897:81;;;;;;14885:93;;15083:23;;15079:91;;13338:1837;;:::o;15079:91::-;15120:50;15134:35;;;:27;;:35;:27;;;2568:41509:2;15164:1:19;15134:35;2568:41509:2;15120:50:19;;:::i;15134:35::-;2568:41509:2;13821:1:19;15134:35;;14897:81;14957:21;;;;:::i;:::-;14897:81;;;14825:54;14855:24;;14825:54;;;14768:50;14817:1;;-1:-1:-1;14768:50:19;;14772:32;14789:15;;;;14772:32;;;13828:843;13921:66;376:19;;13969:2;376:19;13921:66;;:::i;:::-;14000:9;13996:669;;13828:843;;;;13996:669;376:19;14037:48;376:19;;;;;14064:3;376:19;14037:48;:::i;:::-;14359:35;2568:41509:2;;;;;;;;;;14325:70:19;;;;:::i;:::-;2568:41509:2;;;;;;;14359:1:19;2568:41509:2;-1:-1:-1;;;2568:41509:2;;-1:-1:-1;;;2568:41509:2;;;14554:22:19;;;:::i;:::-;2568:41509:2;;;;;;;13969:2:19;376:19;-1:-1:-1;;;2568:41509:2;;-1:-1:-1;;;2568:41509:2;;;14599:47:19;2568:41509:2;;;14599:47:19;:::i;:::-;13996:669;;;;;;13832:63;13878:17;;;;13832:63;;:42;13853:21;;;;13832:42;;10788:218:35;-1:-1:-1;;;;;10868:25:35;;10864:105;;-1:-1:-1;;;;;2568:41509:2;10788:218:35;:::o;10864:105::-;10916:42;;;10947:3;10916:42;2568:41509:2;;;;10916:42:35;;1355:318:19;-1:-1:-1;;;;;1449:25:19;;1445:112;;-1:-1:-1;;;;;2568:41509:2;1355:318:19;:::o;1445:112::-;1491:59;;;;2568:41509:2;;1491:59:19;;20859:5181:34;21025:1;21020:6;;;21016:53;;21996:14;21025:1;-1:-1:-1;;;22057:16:34;;;22053:92;;20859:5181;22677:6;22162:15;-1:-1:-1;;;26016:6:34;22162:15;;;22158:90;;20859:5181;22272:7;22265:15;;;22261:90;;20859:5181;22375:7;22368:15;;;22364:89;;20859:5181;22477:6;22470:14;;;22466:87;;20859:5181;22577:6;22570:14;;;22566:87;;20859:5181;22670:14;;22666:61;;20859:5181;23153:1;2568:41509:2;21025:1:34;2568:41509:2;25063:6:34;;;;:::i;:::-;2568:41509:2;21025:1:34;2568:41509:2;25172:6:34;;;;:::i;:::-;2568:41509:2;21025:1:34;2568:41509:2;25283:6:34;;;;:::i;:::-;2568:41509:2;21025:1:34;2568:41509:2;25392:6:34;;;;:::i;:::-;2568:41509:2;21025:1:34;2568:41509:2;25502:6:34;;;;:::i;:::-;2568:41509:2;21025:1:34;2568:41509:2;25612:6:34;;;;:::i;:::-;2568:41509:2;21025:1:34;2568:41509:2;26016:6:34;;;:::i;:::-;26011:11;;2568:41509:2;;20859:5181:34;:::o;22666:61::-;21025:1;376:19:19;22666:61:34;;22566:87;2568:41509:2;;376:19:19;22637:1:34;376:19:19;22566:87:34;;;22466;22511:1;2568:41509:2;376:19:19;;;22466:87:34;;;22364:89;22410:2;2568:41509:2;376:19:19;22437:1:34;376:19:19;22364:89:34;;;22261:90;22307:2;2568:41509:2;376:19:19;22334:2:34;376:19:19;22261:90:34;;;22158;22204:2;2568:41509:2;376:19:19;22231:2:34;376:19:19;22158:90:34;;;22053:92;-1:-1:-1;;22100:3:34;2568:41509:2;;;-1:-1:-1;;;22053:92:34;","linkReferences":{"contracts/libraries/LiquidityLib.sol":{"LiquidityLib":[{"start":7833,"length":20},{"start":8561,"length":20}]}},"cborAuxdata":{"1":{"value":"0xa164736f6c6343000823000a","offset":20012}},"immutableReferences":{"19":[{"start":3054,"length":32},{"start":16136,"length":32}],"21":[{"start":3102,"length":32},{"start":16215,"length":32}],"23":[{"start":3150,"length":32},{"start":16179,"length":32}],"25":[{"start":3198,"length":32},{"start":16312,"length":32}],"27":[{"start":3246,"length":32},{"start":16276,"length":32}],"29":[{"start":3294,"length":32},{"start":16391,"length":32}],"31":[{"start":3342,"length":32},{"start":16355,"length":32}],"34":[{"start":3382,"length":32},{"start":7650,"length":32}],"37":[{"start":3421,"length":32},{"start":7944,"length":32}],"40":[{"start":3460,"length":32},{"start":8407,"length":32}],"43":[{"start":3499,"length":32},{"start":8680,"length":32}],"46":[{"start":3538,"length":32},{"start":9941,"length":32}],"49":[{"start":3577,"length":32},{"start":13492,"length":32}],"601":[{"start":2600,"length":32},{"start":3631,"length":32},{"start":8977,"length":32}],"603":[{"start":2072,"length":32},{"start":2644,"length":32},{"start":6268,"length":32},{"start":14376,"length":32}],"605":[{"start":1786,"length":32},{"start":2691,"length":32},{"start":6356,"length":32},{"start":14218,"length":32}],"608":[{"start":2730,"length":32},{"start":6305,"length":32},{"start":6582,"length":32},{"start":10041,"length":32},{"start":11159,"length":32},{"start":13099,"length":32}],"611":[{"start":2768,"length":32},{"start":6391,"length":32},{"start":6704,"length":32},{"start":11199,"length":32},{"start":13009,"length":32},{"start":13056,"length":32}],"613":[{"start":2806,"length":32}],"615":[{"start":2844,"length":32}],"617":[{"start":2882,"length":32}],"620":[{"start":2928,"length":32},{"start":13701,"length":32}],"622":[{"start":2968,"length":32},{"start":4359,"length":32},{"start":10651,"length":32}],"624":[{"start":3007,"length":32},{"start":4687,"length":32},{"start":11579,"length":32}]},"transformations":[{"id":"605","type":"replace","offset":1786,"reason":"immutable"},{"id":"603","type":"replace","offset":2072,"reason":"immutable"},{"id":"601","type":"replace","offset":2600,"reason":"immutable"},{"id":"603","type":"replace","offset":2644,"reason":"immutable"},{"id":"605","type":"replace","offset":2691,"reason":"immutable"},{"id":"608","type":"replace","offset":2730,"reason":"immutable"},{"id":"611","type":"replace","offset":2768,"reason":"immutable"},{"id":"613","type":"replace","offset":2806,"reason":"immutable"},{"id":"615","type":"replace","offset":2844,"reason":"immutable"},{"id":"617","type":"replace","offset":2882,"reason":"immutable"},{"id":"620","type":"replace","offset":2928,"reason":"immutable"},{"id":"622","type":"replace","offset":2968,"reason":"immutable"},{"id":"624","type":"replace","offset":3007,"reason":"immutable"},{"id":"19","type":"replace","offset":3054,"reason":"immutable"},{"id":"21","type":"replace","offset":3102,"reason":"immutable"},{"id":"23","type":"replace","offset":3150,"reason":"immutable"},{"id":"25","type":"replace","offset":3198,"reason":"immutable"},{"id":"27","type":"replace","offset":3246,"reason":"immutable"},{"id":"29","type":"replace","offset":3294,"reason":"immutable"},{"id":"31","type":"replace","offset":3342,"reason":"immutable"},{"id":"34","type":"replace","offset":3382,"reason":"immutable"},{"id":"37","type":"replace","offset":3421,"reason":"immutable"},{"id":"40","type":"replace","offset":3460,"reason":"immutable"},{"id":"43","type":"replace","offset":3499,"reason":"immutable"},{"id":"46","type":"replace","offset":3538,"reason":"immutable"},{"id":"49","type":"replace","offset":3577,"reason":"immutable"},{"id":"601","type":"replace","offset":3631,"reason":"immutable"},{"id":"622","type":"replace","offset":4359,"reason":"immutable"},{"id":"624","type":"replace","offset":4687,"reason":"immutable"},{"id":"603","type":"replace","offset":6268,"reason":"immutable"},{"id":"608","type":"replace","offset":6305,"reason":"immutable"},{"id":"605","type":"replace","offset":6356,"reason":"immutable"},{"id":"611","type":"replace","offset":6391,"reason":"immutable"},{"id":"608","type":"replace","offset":6582,"reason":"immutable"},{"id":"611","type":"replace","offset":6704,"reason":"immutable"},{"id":"34","type":"replace","offset":7650,"reason":"immutable"},{"id":"37","type":"replace","offset":7944,"reason":"immutable"},{"id":"40","type":"replace","offset":8407,"reason":"immutable"},{"id":"43","type":"replace","offset":8680,"reason":"immutable"},{"id":"601","type":"replace","offset":8977,"reason":"immutable"},{"id":"46","type":"replace","offset":9941,"reason":"immutable"},{"id":"608","type":"replace","offset":10041,"reason":"immutable"},{"id":"622","type":"replace","offset":10651,"reason":"immutable"},{"id":"608","type":"replace","offset":11159,"reason":"immutable"},{"id":"611","type":"replace","offset":11199,"reason":"immutable"},{"id":"624","type":"replace","offset":11579,"reason":"immutable"},{"id":"611","type":"replace","offset":13009,"reason":"immutable"},{"id":"611","type":"replace","offset":13056,"reason":"immutable"},{"id":"608","type":"replace","offset":13099,"reason":"immutable"},{"id":"49","type":"replace","offset":13492,"reason":"immutable"},{"id":"620","type":"replace","offset":13701,"reason":"immutable"},{"id":"605","type":"replace","offset":14218,"reason":"immutable"},{"id":"603","type":"replace","offset":14376,"reason":"immutable"},{"id":"19","type":"replace","offset":16136,"reason":"immutable"},{"id":"23","type":"replace","offset":16179,"reason":"immutable"},{"id":"21","type":"replace","offset":16215,"reason":"immutable"},{"id":"27","type":"replace","offset":16276,"reason":"immutable"},{"id":"25","type":"replace","offset":16312,"reason":"immutable"},{"id":"31","type":"replace","offset":16355,"reason":"immutable"},{"id":"29","type":"replace","offset":16391,"reason":"immutable"},{"id":"lib/metric-core/contracts/libraries/LiquidityLib.sol:LiquidityLib","type":"replace","offset":7833,"reason":"library"},{"id":"lib/metric-core/contracts/libraries/LiquidityLib.sol:LiquidityLib","type":"replace","offset":8561,"reason":"library"}],"transformationValues":{"libraries":{"lib/metric-core/contracts/libraries/LiquidityLib.sol:LiquidityLib":"0xe0b1576ac63a582e6740a7e1dcfbbef730539cd4"},"immutables":{"19":"0x000000000000000000000000e4038fa09f0bb9963068afaf97be0c045155090d","21":"0x0000000000000000000000000000000000000000000000000000000000000000","23":"0x0000000000000000000000000000000000000000000000000000000000000000","25":"0x0000000000000000000000000000000000000000000000000000000000000000","27":"0x0000000000000000000000000000000000000000000000000000000000000000","29":"0x0000000000000000000000000000000000000000000000000000000000000000","31":"0x0000000000000000000000000000000000000000000000000000000000000000","34":"0x0000000000000000000000000000000000000000000000000000000000000000","37":"0x0000000000000000000000000000000000000000000000000000000000000000","40":"0x0000000000000000000000000000000000000000000000000000000000000000","43":"0x0000000000000000000000000000000000000000000000000000000000000000","46":"0x0000000000000000000000000000000000000000000000000000000000000000","49":"0x0000000000000000000000000000000000000000000000000000000000000001","601":"0x0000000000000000000000002a53833cc95548cf52c7b159110e22d3a9018f32","603":"0x0000000000000000000000009d39a5de30e57443bff2a8307a4256c8797a3497","605":"0x0000000000000000000000004c9edd5852cd905f086c759e8383e09bff1e68b3","608":"0x0000000000000000000000000000000000000000000000000000000000000001","611":"0x0000000000000000000000000000000000000000000000000000000000000001","613":"0x0000000000000000000000000000000000000000000000000b0d0bf187be46f3","615":"0x0000000000000000000000000000000000000000000000000de0b6b3a7640000","617":"0x0000000000000000000000000000000000000000000000000000000000132977","620":"0x00000000000000000000000053404d4946c7696eaa562d7d2f8bc09d2838171c","622":"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe2","624":"0x000000000000000000000000000000000000000000000000000000000000001d"}}},"deployment":{"transactionHash":"0x164906215c453a9e4f2a2f3bdae4fc21e3362abaa941816c66561b4d7432a37d","blockNumber":"26312212","transactionIndex":"67","deployer":"0x80f0A7d148729CcEdb6cD07FBaAEfC5A16f33D4f"},"sources":{"contracts/MetricOmmPool.sol":{"content":"// SPDX-License-Identifier: BUSL-1.1\npragma solidity ^0.8.35;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {Math} from \"@openzeppelin/contracts/utils/math/Math.sol\";\nimport {SafeCast} from \"@openzeppelin/contracts/utils/math/SafeCast.sol\";\nimport {MetricReentrancyGuardTransient} from \"./utils/MetricReentrancyGuardTransient.sol\";\nimport {PoolActions} from \"./libraries/PoolActions.sol\";\nimport {BinBalanceDelta, LiquidityDelta} from \"./types/PoolOperation.sol\";\nimport {\n  Packed2Int128,\n  Packed2Int128Lib,\n  Packed2Uint128,\n  Packed2Uint128Lib,\n  PackedSwapDetailsLib\n} from \"./types/Packed.sol\";\nimport {BinState, BinTotals} from \"./types/PoolStorage.sol\";\nimport {SwapMath, ONE_X64} from \"./libraries/SwapMath.sol\";\nimport {FeeMath} from \"./libraries/FeeMath.sol\";\nimport {SignedMath} from \"./libraries/SignedMath.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {IPriceProvider} from \"./interfaces/IPriceProvider/IPriceProvider.sol\";\nimport {Slot0Library} from \"./libraries/Slot0Library.sol\";\nimport {LiquidityLib} from \"./libraries/LiquidityLib.sol\";\nimport {ExtensionCalling} from \"./ExtensionCalling.sol\";\nimport {IMetricOmmPool, PoolImmutables} from \"./interfaces/IMetricOmmPool/IMetricOmmPool.sol\";\nimport {IMetricOmmPoolActions} from \"./interfaces/IMetricOmmPool/IMetricOmmPoolActions.sol\";\nimport {IMetricOmmPoolCollectFees} from \"./interfaces/IMetricOmmPool/IMetricOmmPoolCollectFees.sol\";\nimport {IMetricOmmPoolFactoryActions} from \"./interfaces/IMetricOmmPool/IMetricOmmPoolFactoryActions.sol\";\nimport {PoolExtensions, ExtensionOrders} from \"./types/PoolExtensionsConfig.sol\";\nimport {IMetricOmmSwapCallback} from \"./interfaces/callbacks/IMetricOmmSwapCallback.sol\";\nimport {Extsload} from \"./Extsload.sol\";\n\n/**\n * @title MetricOmmPool\n * @notice Oracle-Based OMM Pool with separate bin accounting\n * @dev Layout: immutables, state variables, constructor, modifiers,\n *      external state-changing functions, external views, then internal helpers.\n * @dev Contract uses `Extsload` for external storage reads, apart from `getImmutables()`, `inSwap()` and `getSellAndBuyPrices()`.\n * @dev External function order follows `IMetricOmmPool` composition: `IMetricOmmPoolActions`, then `IMetricOmmPoolCollectFees`, then `IMetricOmmPoolFactoryActions`.\n * @dev Contract coupling: storage layout and packing are mirrored by `contracts/libraries/PoolStateLibrary.sol`\n *      for EXTSLOAD-based reads. Any storage reorder or repack is a breaking change for EXTSLOAD readers.\n */\ncontract MetricOmmPool is IMetricOmmPool, Extsload, MetricReentrancyGuardTransient, ExtensionCalling {\n  using SafeCast for uint256;\n  using SafeCast for int256;\n  using SafeERC20 for IERC20;\n\n  // ============ Immutables ============\n  // Note: All immutables are internal; they are exposed via `getImmutables()`.\n\n  address internal immutable FACTORY;\n  address internal immutable TOKEN0;\n  address internal immutable TOKEN1;\n\n  /// @notice Multiplier to scale token0 external amounts to internal: 10^(max(18, token0.decimals(), token1.decimals()) - token0.decimals())\n  uint256 internal immutable TOKEN_0_SCALE_MULTIPLIER;\n  /// @notice Multiplier to scale token1 external amounts to internal: 10^(max(18, token0.decimals(), token1.decimals()) - token1.decimals())\n  uint256 internal immutable TOKEN_1_SCALE_MULTIPLIER;\n\n  uint256 internal immutable INITIAL_SCALED_TOKEN_0_PER_SHARE_E18;\n  uint256 internal immutable INITIAL_SCALED_TOKEN_1_PER_SHARE_E18;\n  uint256 internal immutable MINIMAL_OPERATIONAL_LIQUIDITY;\n\n  /// @dev If set this is the address of the immutable price provider\n  /// @dev If unset the `priceProvider` is the address of the mutable price provider.\n  address internal immutable IMMUTABLE_PRICE_PROVIDER;\n\n  int256 internal immutable LOWEST_BIN;\n  int256 internal immutable HIGHEST_BIN;\n\n  // ============ State Variables ============\n\n  // +++++++++++ Used when swapping ++++++++++\n\n  // Slot 0 ordering (from left to right):\n  //   [5 bytes unused] [2 bytes bidAskRefAsymmetryX8] [3 bytes notionalFeeE8] [3 bytes spreadFeeE6]\n  //   [3 bytes curBinDistFromProvidedPriceE6] [13 bytes curPosInBin] [2 bytes curBinIdx] [1 byte pauseLevel]\n  /// @dev 0 = active, 1 = paused by admin, 2 = paused by protocol. Transitions enforced by factory.\n  uint8 internal pauseLevel;\n  int16 internal curBinIdx; // current bin index\n  uint104 internal curPosInBin; // position inside the current bin: 0 = lower edge, type(uint104).max = upper edge\n  int24 internal curBinDistFromProvidedPriceE6; // lower edge of the current bin relative to the reference price, E6 (1e6 = 100%)\n  /// @dev Platform (protocol + admin) share of the spread fee, E6.\n  uint24 internal spreadFeeE6;\n  /// @dev Platform (protocol + admin) notional fee, E8.\n  uint24 internal notionalFeeE8;\n  /// @dev `m` in X8 (`M = 1 + m`); `type(uint16).max` disables the bid/ask/reference asymmetry check.\n  uint16 internal bidAskRefAsymmetryX8;\n\n  // Slot 1 ordering (from left to right):\n  //   [16bytes binTotals.scaledToken1] [16bytes binTotals.scaledToken0]\n  BinTotals internal binTotals;\n\n  // Slot 2 ordering (from left to right):\n  //   [16bytes notionalFeeToken1Scaled] [16bytes notionalFeeToken0Scaled]\n  uint128 internal notionalFeeToken0Scaled;\n  uint128 internal notionalFeeToken1Scaled;\n\n  // Slot 3 ordering (from left to right):\n  //   [12 bytes unused] [20 bytes priceProvider]\n  /// @dev The price provider address - only used when `IMMUTABLE_PRICE_PROVIDER == address(0)`\n  address internal priceProvider;\n\n  mapping(int256 => BinState) internal _binStates;\n\n  // ++++++++++ Unused when swapping ++++++++\n  mapping(int256 => uint256) internal _binTotalShares;\n  /// @dev Per-bin position shares keyed by `LiquidityLib._positionBinKey`.\n  mapping(bytes32 => uint256) internal _positionBinShares;\n\n  /// @dev Pending fee balances in internal scaled units; payouts convert to native units rounding down.\n  uint256 internal pendingAdminFeeToken0Scaled;\n  uint256 internal pendingAdminFeeToken1Scaled;\n  uint256 internal pendingProtocolFeeToken0Scaled;\n  uint256 internal pendingProtocolFeeToken1Scaled;\n\n  // ============ Constructor ============\n  /// @dev All initial checks MUST be validated before construction at the factory/deployer level.\n  constructor(\n    address factory,\n    address token0,\n    address token1,\n    address priceProvider_,\n    PoolExtensions memory extensions,\n    ExtensionOrders memory extensionOrders,\n    bool immutablePriceProvider,\n    uint256 token0ScaleMultiplier,\n    uint256 token1ScaleMultiplier,\n    uint256 initialScaledAmount0PerShareE18,\n    uint256 initialScaledAmount1PerShareE18,\n    uint256 minimalOperationalLiquidity,\n    uint24 spreadFeeE6_,\n    int24 initialCurBinDistFromProvidedPriceE6,\n    BinState[] memory nonNegativeBinStates,\n    BinState[] memory negativeBinStates,\n    uint24 notionalFeeE8_,\n    uint16 bidAskRefAsymmetryX8_\n  ) ExtensionCalling(extensions, extensionOrders) {\n    FACTORY = factory;\n    TOKEN0 = token0;\n    TOKEN1 = token1;\n\n    if (immutablePriceProvider) {\n      IMMUTABLE_PRICE_PROVIDER = priceProvider_;\n      priceProvider = address(0);\n    } else {\n      IMMUTABLE_PRICE_PROVIDER = address(0);\n      priceProvider = priceProvider_;\n    }\n\n    TOKEN_0_SCALE_MULTIPLIER = token0ScaleMultiplier;\n    TOKEN_1_SCALE_MULTIPLIER = token1ScaleMultiplier;\n\n    INITIAL_SCALED_TOKEN_0_PER_SHARE_E18 = initialScaledAmount0PerShareE18;\n    INITIAL_SCALED_TOKEN_1_PER_SHARE_E18 = initialScaledAmount1PerShareE18;\n    MINIMAL_OPERATIONAL_LIQUIDITY = minimalOperationalLiquidity;\n\n    spreadFeeE6 = spreadFeeE6_;\n    notionalFeeE8 = notionalFeeE8_;\n    bidAskRefAsymmetryX8 = bidAskRefAsymmetryX8_;\n\n    curBinDistFromProvidedPriceE6 = initialCurBinDistFromProvidedPriceE6;\n\n    for (uint256 i = 0; i < nonNegativeBinStates.length; i++) {\n      // safe because factory caps bins per side to 32_768\n      // forge-lint: disable-next-line(unsafe-typecast)\n      _binStates[int256(i)] = nonNegativeBinStates[i];\n    }\n    for (uint256 i = 0; i < negativeBinStates.length; i++) {\n      // safe because factory caps bins per side to 32_768\n      // forge-lint: disable-next-line(unsafe-typecast)\n      _binStates[-int256(i) - 1] = negativeBinStates[i];\n    }\n\n    uint256 nn = nonNegativeBinStates.length;\n    uint256 nNeg = negativeBinStates.length;\n    // safe because factory caps bins per side to 32_768\n    // forge-lint: disable-next-line(unsafe-typecast)\n    HIGHEST_BIN = nn == 0 ? int256(-1) : int256(nn) - 1;\n    // safe because factory caps bins per side to 32_768\n    // forge-lint: disable-next-line(unsafe-typecast)\n    LOWEST_BIN = nNeg == 0 ? int256(0) : -int256(nNeg);\n  }\n\n  // ============ Modifiers ============\n  modifier onlyFactory() {\n    _checkFactory();\n    _;\n  }\n\n  modifier whenNotPaused() {\n    _checkNotPaused();\n    _;\n  }\n\n  // ============ External: liquidity ============\n\n  /// @inheritdoc IMetricOmmPoolActions\n  function addLiquidity(\n    address owner,\n    uint80 salt,\n    LiquidityDelta calldata deltas,\n    bytes calldata callbackData,\n    bytes calldata extensionData\n  ) external nonReentrant(PoolActions.ADD_LIQUIDITY) returns (uint256 amount0Added, uint256 amount1Added) {\n    if (deltas.binIdxs.length == 0) return (0, 0);\n    if (deltas.binIdxs.length != deltas.shares.length) revert LiquidityDeltaLengthMismatch();\n    _beforeAddLiquidity(msg.sender, owner, salt, deltas, extensionData);\n    (amount0Added, amount1Added) = LiquidityLib.addLiquidity(\n      owner, salt, deltas, callbackData, binTotals, _binStates, _binTotalShares, _positionBinShares\n    );\n    _afterAddLiquidity(msg.sender, owner, salt, deltas, amount0Added, amount1Added, extensionData);\n  }\n\n  /// @inheritdoc IMetricOmmPoolActions\n  function removeLiquidity(address owner, uint80 salt, LiquidityDelta calldata deltas, bytes calldata extensionData)\n    external\n    nonReentrant(PoolActions.REMOVE_LIQUIDITY)\n    returns (uint256 amount0Removed, uint256 amount1Removed)\n  {\n    if (deltas.binIdxs.length == 0) return (0, 0);\n    if (deltas.binIdxs.length != deltas.shares.length) revert LiquidityDeltaLengthMismatch();\n    if (msg.sender != owner) revert NotPositionOwner();\n    _beforeRemoveLiquidity(msg.sender, owner, salt, deltas, extensionData);\n    bool emptiedCurrentBin;\n    (amount0Removed, amount1Removed, emptiedCurrentBin) =\n      LiquidityLib.removeLiquidity(owner, salt, deltas, binTotals, _binStates, _binTotalShares, _positionBinShares);\n    if (emptiedCurrentBin) {\n      curPosInBin = curBinIdx < 0 ? type(uint104).max : 0;\n    }\n    _afterRemoveLiquidity(msg.sender, owner, salt, deltas, amount0Removed, amount1Removed, extensionData);\n  }\n\n  // ============ External: swap ============\n\n  /// @inheritdoc IMetricOmmPoolActions\n  function swap(\n    address recipient,\n    bool zeroForOne,\n    int128 amountSpecified,\n    uint128 priceLimitX64,\n    bytes calldata callbackData,\n    bytes calldata extensionData\n  ) external whenNotPaused nonReentrant(PoolActions.SWAP) returns (int128, int128) {\n    (uint128 bidPriceX64, uint128 askPriceX64, uint128 referencePriceX64) = _getBidAskReferencePriceX64();\n\n    (int256 amount0Delta, int256 amount1Delta, Packed2Uint128 platformFees, uint256 packedSlot0Initial) = _swapCore(\n      msg.sender,\n      recipient,\n      zeroForOne,\n      amountSpecified,\n      priceLimitX64,\n      bidPriceX64,\n      askPriceX64,\n      referencePriceX64,\n      extensionData\n    );\n\n    if (zeroForOne) {\n      if (amount1Delta < 0) {\n        // forge-lint: disable-next-line(unsafe-typecast)\n        transferToken1(recipient, uint256(-amount1Delta));\n      }\n\n      uint256 balance0Before = balance0();\n      IMetricOmmSwapCallback(msg.sender).metricOmmSwapCallback(amount0Delta, amount1Delta, callbackData);\n      // forge-lint: disable-next-line(unsafe-typecast)\n      if (amount0Delta > 0 && balance0Before + uint256(amount0Delta) > balance0()) {\n        revert IncorrectDelta();\n      }\n    } else {\n      if (amount0Delta < 0) {\n        // forge-lint: disable-next-line(unsafe-typecast)\n        transferToken0(recipient, uint256(-amount0Delta));\n      }\n\n      uint256 balance1Before = balance1();\n      IMetricOmmSwapCallback(msg.sender).metricOmmSwapCallback(amount0Delta, amount1Delta, callbackData);\n      // forge-lint: disable-next-line(unsafe-typecast)\n      if (amount1Delta > 0 && balance1Before + uint256(amount1Delta) > balance1()) {\n        revert IncorrectDelta();\n      }\n    }\n\n    uint256 packedSlot0Final = Slot0Library.loadPackedSlot0();\n    _afterSwap(\n      msg.sender,\n      recipient,\n      zeroForOne,\n      amountSpecified,\n      priceLimitX64,\n      packedSlot0Initial,\n      packedSlot0Final,\n      bidPriceX64,\n      askPriceX64,\n      referencePriceX64,\n      amount0Delta.toInt128(),\n      amount1Delta.toInt128(),\n      platformFees.sum(),\n      extensionData\n    );\n\n    emit Swap(\n      msg.sender,\n      recipient,\n      PackedSwapDetailsLib.pack(amountSpecified > 0, curBinIdx, curPosInBin),\n      // `_afterSwap` above already narrowed both with a checked cast, so an out-of-range value has reverted before this point.\n      // forge-lint: disable-next-line(unsafe-typecast)\n      Packed2Int128Lib.pack(int128(amount0Delta), int128(amount1Delta)),\n      platformFees\n    );\n    return (amount0Delta.toInt128(), amount1Delta.toInt128());\n  }\n\n  // ============ External: swap simulation ============\n\n  /// @inheritdoc IMetricOmmPoolActions\n  function simulateSwapAndRevert(\n    address sender,\n    address recipient,\n    bool zeroForOne,\n    int128 amountSpecified,\n    uint128 priceLimitX64,\n    uint128 bidPriceX64,\n    uint128 askPriceX64,\n    uint128 referencePriceX64,\n    bytes calldata extensionData\n  ) external nonReentrant(PoolActions.SIMULATE_SWAP_AND_REVERT) returns (int128, int128) {\n    _validateBidAskReferencePriceX64(bidPriceX64, askPriceX64, referencePriceX64);\n\n    (int256 amount0Delta, int256 amount1Delta, Packed2Uint128 platformFees, uint256 packedSlot0Initial) = _swapCore(\n      sender,\n      recipient,\n      zeroForOne,\n      amountSpecified,\n      priceLimitX64,\n      bidPriceX64,\n      askPriceX64,\n      referencePriceX64,\n      extensionData\n    );\n\n    uint256 packedSlot0Final = Slot0Library.loadPackedSlot0();\n    _afterSwap(\n      sender,\n      recipient,\n      zeroForOne,\n      amountSpecified,\n      priceLimitX64,\n      packedSlot0Initial,\n      packedSlot0Final,\n      bidPriceX64,\n      askPriceX64,\n      referencePriceX64,\n      amount0Delta.toInt128(),\n      amount1Delta.toInt128(),\n      platformFees.sum(),\n      extensionData\n    );\n\n    revert SimulateSwap(amount0Delta, amount1Delta);\n  }\n\n  // ============ External: factory / protocol ============\n\n  /// @inheritdoc IMetricOmmPoolCollectFees\n  function collectFees(\n    uint256 protocolSpreadFeeE6,\n    uint256 adminSpreadFeeE6,\n    uint256 protocolNotionalFeeE8,\n    uint256 adminNotionalFeeE8,\n    address adminFeeDestination,\n    address protocolFeeDestination\n  ) external onlyFactory nonReentrant(PoolActions.COLLECT_FEES) {\n    (\n      uint256 updatedAdminFeeToken0Scaled,\n      uint256 updatedAdminFeeToken1Scaled,\n      uint256 updatedProtocolFeeToken0Scaled,\n      uint256 updatedProtocolFeeToken1Scaled\n    ) = _calculateUpdatedPendingFees(protocolSpreadFeeE6, adminSpreadFeeE6, protocolNotionalFeeE8, adminNotionalFeeE8);\n\n    uint256 paidAdmin0;\n    uint256 paidAdmin1;\n    uint256 paidProtocol0;\n    uint256 paidProtocol1;\n    (pendingAdminFeeToken0Scaled, paidAdmin0) =\n      _payPendingFee(TOKEN0, adminFeeDestination, updatedAdminFeeToken0Scaled, TOKEN_0_SCALE_MULTIPLIER);\n    (pendingAdminFeeToken1Scaled, paidAdmin1) =\n      _payPendingFee(TOKEN1, adminFeeDestination, updatedAdminFeeToken1Scaled, TOKEN_1_SCALE_MULTIPLIER);\n    (pendingProtocolFeeToken0Scaled, paidProtocol0) =\n      _payPendingFee(TOKEN0, protocolFeeDestination, updatedProtocolFeeToken0Scaled, TOKEN_0_SCALE_MULTIPLIER);\n    (pendingProtocolFeeToken1Scaled, paidProtocol1) =\n      _payPendingFee(TOKEN1, protocolFeeDestination, updatedProtocolFeeToken1Scaled, TOKEN_1_SCALE_MULTIPLIER);\n\n    emit ProtocolFeesCollected(paidProtocol0, paidProtocol1, paidAdmin0, paidAdmin1);\n  }\n\n  /// @inheritdoc IMetricOmmPoolFactoryActions\n  function setPoolFees(uint24 newSpreadFeeE6, uint24 newNotionalFeeE8)\n    external\n    onlyFactory\n    nonReentrant(PoolActions.SET_POOL_FEES)\n  {\n    unchecked {\n      if (newSpreadFeeE6 != spreadFeeE6) {\n        spreadFeeE6 = newSpreadFeeE6;\n        emit SpreadFeeUpdated(newSpreadFeeE6);\n      }\n      if (newNotionalFeeE8 != notionalFeeE8) {\n        notionalFeeE8 = newNotionalFeeE8;\n        emit NotionalFeeUpdated(newNotionalFeeE8);\n      }\n    }\n  }\n\n  /// @inheritdoc IMetricOmmPoolFactoryActions\n  function setBidAskRefAsymmetryX8(uint16 newBidAskRefAsymmetryX8)\n    external\n    onlyFactory\n    nonReentrant(PoolActions.SET_BID_ASK_REF_ASYMMETRY_X8)\n  {\n    if (newBidAskRefAsymmetryX8 != bidAskRefAsymmetryX8) {\n      bidAskRefAsymmetryX8 = newBidAskRefAsymmetryX8;\n      emit BidAskRefAsymmetryUpdated(newBidAskRefAsymmetryX8);\n    }\n  }\n\n  /// @inheritdoc IMetricOmmPoolFactoryActions\n  function setPause(uint8 newLevel) external onlyFactory {\n    if (newLevel > 2) revert InvalidPauseLevel();\n    if (newLevel == pauseLevel) return;\n    uint8 prev = pauseLevel;\n    pauseLevel = newLevel;\n    emit PauseLevelUpdated(prev, newLevel);\n  }\n\n  /// @inheritdoc IMetricOmmPoolFactoryActions\n  function setBinAdditionalFees(int16 bin, uint16 addFeeBuyE6, uint16 addFeeSellE6)\n    external\n    onlyFactory\n    nonReentrant(PoolActions.SET_BIN_ADDITIONAL_FEES)\n  {\n    if (bin < LOWEST_BIN || bin > HIGHEST_BIN) revert InvalidBinIndex(bin);\n    BinState storage s = _binStates[bin];\n    s.addFeeBuyE6 = addFeeBuyE6;\n    s.addFeeSellE6 = addFeeSellE6;\n    emit BinAdditionalFeesUpdated(bin, addFeeBuyE6, addFeeSellE6);\n  }\n\n  /// @inheritdoc IMetricOmmPoolFactoryActions\n  function setPriceProvider(address newPriceProvider) external onlyFactory {\n    priceProvider = newPriceProvider;\n    emit PriceProviderUpdated(newPriceProvider);\n  }\n\n  // ============ External: view ============\n\n  /// @inheritdoc IMetricOmmPool\n  function inSwap() external view returns (address priceProvider_) {\n    if (_currentAction() == PoolActions.SWAP) {\n      return _resolvedPriceProvider();\n    }\n    return address(0);\n  }\n\n  /// @inheritdoc IMetricOmmPool\n  function getImmutables() external view returns (PoolImmutables memory) {\n    return PoolImmutables({\n      factory: FACTORY,\n      token0: TOKEN0,\n      token1: TOKEN1,\n      token0ScaleMultiplier: TOKEN_0_SCALE_MULTIPLIER,\n      token1ScaleMultiplier: TOKEN_1_SCALE_MULTIPLIER,\n      initialScaledToken0PerShareE18: INITIAL_SCALED_TOKEN_0_PER_SHARE_E18,\n      initialScaledToken1PerShareE18: INITIAL_SCALED_TOKEN_1_PER_SHARE_E18,\n      minimalOperationalLiquidity: MINIMAL_OPERATIONAL_LIQUIDITY,\n      immutablePriceProvider: IMMUTABLE_PRICE_PROVIDER,\n      lowestBin: LOWEST_BIN,\n      highestBin: HIGHEST_BIN,\n      extension1: EXTENSION_1,\n      extension2: EXTENSION_2,\n      extension3: EXTENSION_3,\n      extension4: EXTENSION_4,\n      extension5: EXTENSION_5,\n      extension6: EXTENSION_6,\n      extension7: EXTENSION_7,\n      beforeAddLiquidityOrder: BEFORE_ADD_LIQUIDITY_ORDER,\n      afterAddLiquidityOrder: AFTER_ADD_LIQUIDITY_ORDER,\n      beforeRemoveLiquidityOrder: BEFORE_REMOVE_LIQUIDITY_ORDER,\n      afterRemoveLiquidityOrder: AFTER_REMOVE_LIQUIDITY_ORDER,\n      beforeSwapOrder: BEFORE_SWAP_ORDER,\n      afterSwapOrder: AFTER_SWAP_ORDER\n    });\n  }\n\n  /// @inheritdoc IMetricOmmPool\n  function getSellAndBuyPrices()\n    external\n    nonReentrant(PoolActions.SWAP)\n    returns (uint128 sellPriceX64, uint128 buyPriceX64)\n  {\n    (uint128 bidFromOracleX64, uint128 askFromOracleX64, uint128 referenceFromOracleX64) = _getBidAskReferencePriceX64();\n    (uint256 baseBuyFeeX64, uint256 baseSellFeeX64) = SwapMath.buySellBaseFeesX64FromBidAskAndReference(\n      uint256(bidFromOracleX64), uint256(askFromOracleX64), uint256(referenceFromOracleX64)\n    );\n    uint256 referencePriceX64 = uint256(referenceFromOracleX64);\n\n    BinState memory binState = _binStates[curBinIdx];\n    uint256 lowerPriceX64 = distanceE6ToPriceX64(curBinDistFromProvidedPriceE6, referencePriceX64);\n    uint256 upperPriceX64 =\n      distanceE6ToPriceX64(_addDistE6(curBinDistFromProvidedPriceE6, binState.lengthE6), referencePriceX64);\n\n    uint256 marginalPriceX64 =\n      SwapMath.calculatePriceAtBinPosition(lowerPriceX64, upperPriceX64, curPosInBin, Math.Rounding.Floor);\n\n    uint256 notionalFeeX64 = FeeMath._notionalFeeX64(notionalFeeE8);\n    buyPriceX64 = FeeMath.effectivePriceX64(\n        marginalPriceX64, FeeMath.binTotalFeeX64(baseBuyFeeX64, binState.addFeeBuyE6, notionalFeeX64), false\n      ).toUint128();\n    sellPriceX64 = FeeMath.effectivePriceX64(\n        marginalPriceX64, FeeMath.binTotalFeeX64(baseSellFeeX64, binState.addFeeSellE6, notionalFeeX64), true\n      ).toUint128();\n  }\n\n  // ============ Internal ============\n\n  function _calculateUpdatedPendingFees(\n    uint256 protocolSpreadFeeE6,\n    uint256 adminSpreadFeeE6,\n    uint256 protocolNotionalFeeE8,\n    uint256 adminNotionalFeeE8\n  )\n    private\n    returns (\n      uint256 updatedAdminFeeToken0Scaled,\n      uint256 updatedAdminFeeToken1Scaled,\n      uint256 updatedProtocolFeeToken0Scaled,\n      uint256 updatedProtocolFeeToken1Scaled\n    )\n  {\n    uint256 spreadSumE6;\n    uint256 notionalSumE8;\n    unchecked {\n      spreadSumE6 = protocolSpreadFeeE6 + adminSpreadFeeE6;\n      notionalSumE8 = protocolNotionalFeeE8 + adminNotionalFeeE8;\n\n      updatedAdminFeeToken0Scaled = pendingAdminFeeToken0Scaled;\n      updatedAdminFeeToken1Scaled = pendingAdminFeeToken1Scaled;\n      updatedProtocolFeeToken0Scaled = pendingProtocolFeeToken0Scaled;\n      updatedProtocolFeeToken1Scaled = pendingProtocolFeeToken1Scaled;\n    }\n    if (spreadSumE6 != 0) {\n      //// checked block start - just sanity check for underflow\n      uint256 surplus0Scaled = balance0() * TOKEN_0_SCALE_MULTIPLIER - uint256(binTotals.scaledToken0)\n        - notionalFeeToken0Scaled - updatedAdminFeeToken0Scaled - updatedProtocolFeeToken0Scaled;\n      uint256 surplus1Scaled = balance1() * TOKEN_1_SCALE_MULTIPLIER - uint256(binTotals.scaledToken1)\n        - notionalFeeToken1Scaled - updatedAdminFeeToken1Scaled - updatedProtocolFeeToken1Scaled;\n      //// checked block end\n      unchecked {\n        uint256 admin0Scaled = surplus0Scaled * adminSpreadFeeE6 / spreadSumE6;\n        uint256 admin1Scaled = surplus1Scaled * adminSpreadFeeE6 / spreadSumE6;\n        updatedAdminFeeToken0Scaled += admin0Scaled;\n        updatedAdminFeeToken1Scaled += admin1Scaled;\n        updatedProtocolFeeToken0Scaled += surplus0Scaled - admin0Scaled;\n        updatedProtocolFeeToken1Scaled += surplus1Scaled - admin1Scaled;\n      }\n    }\n    unchecked {\n      if (notionalSumE8 != 0) {\n        uint256 admin0Scaled = notionalFeeToken0Scaled * adminNotionalFeeE8 / notionalSumE8;\n        uint256 admin1Scaled = notionalFeeToken1Scaled * adminNotionalFeeE8 / notionalSumE8;\n        updatedAdminFeeToken0Scaled += admin0Scaled;\n        updatedAdminFeeToken1Scaled += admin1Scaled;\n        updatedProtocolFeeToken0Scaled += uint256(notionalFeeToken0Scaled) - admin0Scaled;\n        updatedProtocolFeeToken1Scaled += uint256(notionalFeeToken1Scaled) - admin1Scaled;\n        notionalFeeToken0Scaled = 0;\n        notionalFeeToken1Scaled = 0;\n      }\n    }\n  }\n\n  function _payPendingFee(address token, address destination, uint256 pendingScaled, uint256 scaleMultiplier)\n    private\n    returns (uint256 remainingScaled, uint256 paid)\n  {\n    uint256 amount = pendingScaled / scaleMultiplier;\n    if (amount == 0) return (pendingScaled, 0);\n\n    if (IERC20(token).trySafeTransfer(destination, amount)) {\n      return (pendingScaled - amount * scaleMultiplier, amount);\n    }\n    emit FeeTransferFailed(token, destination, amount);\n    return (pendingScaled, 0);\n  }\n\n  // ---- Token helpers ----\n\n  /// @notice Get the current balance of token0 held by the pool\n  function balance0() internal view returns (uint256) {\n    return IERC20(TOKEN0).balanceOf(address(this));\n  }\n\n  /// @notice Get the current balance of token1 held by the pool\n  function balance1() internal view returns (uint256) {\n    return IERC20(TOKEN1).balanceOf(address(this));\n  }\n\n  function transferToken0(address to, uint256 amount) internal {\n    IERC20(TOKEN0).safeTransfer(to, amount);\n  }\n\n  function transferToken1(address to, uint256 amount) internal {\n    IERC20(TOKEN1).safeTransfer(to, amount);\n  }\n\n  // ---- Math helpers ----\n\n  /// @dev Converts distance-from-reference-price (E6 units) to an absolute price Q64.64, rounded down:\n  /// `referencePriceX64 * (1e6 + distanceValueE6) / 1e6`. Requires `distanceValueE6 > -1e6`; the negative branch computes `1e6 - |distanceValueE6|` unchecked.\n  function distanceE6ToPriceX64(int256 distanceValueE6, uint256 referencePriceX64) internal pure returns (uint256) {\n    unchecked {\n      if (distanceValueE6 >= 0) {\n        // forge-lint: disable-next-line(unsafe-typecast)\n        return Math.mulDiv(referencePriceX64, 1e6 + uint256(distanceValueE6), 1e6);\n      } else {\n        // forge-lint: disable-next-line(unsafe-typecast)\n        return Math.mulDiv(referencePriceX64, 1e6 - uint256(-distanceValueE6), 1e6);\n      }\n    }\n  }\n\n  function _clampInt256ToInt24(int256 v) internal pure returns (int24) {\n    unchecked {\n      if (v > type(int24).max) return type(int24).max;\n      if (v < type(int24).min) return type(int24).min;\n      // casting to int24 is safe because values outside int24 bounds are clamped above.\n      // forge-lint: disable-next-line(unsafe-typecast)\n      return int24(v);\n    }\n  }\n\n  function _addDistE6(int256 dist, uint16 len) internal pure returns (int256) {\n    unchecked {\n      // casting is safe because len is uint16\n      return dist + int256(uint256(len));\n    }\n  }\n\n  /// @notice Convert signed scaled deltas to external token units, rounding toward positive infinity\n  function deltasScaledToExternal(int256 scaledDeltaAmount0, int256 scaledDeltaAmount1)\n    internal\n    view\n    returns (int256 deltaAmount0, int256 deltaAmount1)\n  {\n    deltaAmount0 = SignedMath.ceilDiv(scaledDeltaAmount0, TOKEN_0_SCALE_MULTIPLIER);\n    deltaAmount1 = SignedMath.ceilDiv(scaledDeltaAmount1, TOKEN_1_SCALE_MULTIPLIER);\n  }\n\n  /// @notice Convert unsigned scaled amounts to external token units, rounding up for `Ceil` and down otherwise\n  function deltasScaledToExternal(uint256 scaledDeltaAmount0, uint256 scaledDeltaAmount1, Math.Rounding rounding)\n    internal\n    view\n    returns (uint256 deltaAmount0, uint256 deltaAmount1)\n  {\n    if (rounding == Math.Rounding.Ceil) {\n      deltaAmount0 = Math.ceilDiv(scaledDeltaAmount0, TOKEN_0_SCALE_MULTIPLIER);\n      deltaAmount1 = Math.ceilDiv(scaledDeltaAmount1, TOKEN_1_SCALE_MULTIPLIER);\n    } else {\n      deltaAmount0 = scaledDeltaAmount0 / TOKEN_0_SCALE_MULTIPLIER;\n      deltaAmount1 = scaledDeltaAmount1 / TOKEN_1_SCALE_MULTIPLIER;\n    }\n  }\n\n  // ---- Shared helpers ----\n\n  function _resolvedPriceProvider() internal view returns (address) {\n    address imm = IMMUTABLE_PRICE_PROVIDER;\n    if (imm != address(0)) return imm;\n    return priceProvider;\n  }\n\n  function _checkFactory() internal view {\n    if (msg.sender != FACTORY) revert OnlyFactory();\n  }\n\n  function _checkNotPaused() internal view {\n    if (pauseLevel != 0) revert PoolPaused();\n  }\n\n  /// @dev Persists `binState` to `_binStates`. Exists primarily to reduce stack depth in swap paths.\n  function _saveBinState(int256 binIdx, BinState memory binState) internal {\n    _binStates[binIdx] = binState;\n  }\n\n  // ---- Swap orchestration ----\n\n  function _executeSwap(\n    bool zeroForOne,\n    int256 amountSpecified,\n    uint256 referencePriceX64,\n    uint256 baseFeeX64,\n    uint256 priceLimitX64\n  ) internal returns (int256 amount0DeltaScaled, int256 amount1DeltaScaled, Packed2Uint128 platformFees) {\n    unchecked {\n      // Safe while every scale multiplier is < 2^129 (decimal gap ≤ 38); the factory does not enforce this bound\n      // forge-lint: disable-next-line(unsafe-typecast)\n      uint256 amountSpecifiedScaled = amountSpecified > 0\n        // forge-lint: disable-next-line(unsafe-typecast)\n        ? (zeroForOne ? TOKEN_0_SCALE_MULTIPLIER : TOKEN_1_SCALE_MULTIPLIER) * uint256(amountSpecified)\n        // forge-lint: disable-next-line(unsafe-typecast)\n        : (zeroForOne ? TOKEN_1_SCALE_MULTIPLIER : TOKEN_0_SCALE_MULTIPLIER) * uint256(-amountSpecified);\n\n      (amount0DeltaScaled, amount1DeltaScaled, platformFees) = _swapAcrossBins(\n        zeroForOne, amountSpecified <= 0, amountSpecifiedScaled, referencePriceX64, baseFeeX64, priceLimitX64\n      );\n      uint256 platformNotionalFeeScaled = platformFees.low();\n\n      // Update bin totals: the platform spread fee and the notional fee are both carved from the input\n      // token and do NOT enter bins.\n      // For zeroForOne: token0 enters bins (minus both fees), token1 leaves bins.\n      // For !zeroForOne: token1 enters bins (minus both fees), token0 leaves bins.\n      uint256 totalPlatformFeeScaled = platformFees.sum();\n      if (zeroForOne) {\n        // casting to uint256 is safe because amount0DeltaScaled is positive in zeroForOne flow.\n        // forge-lint: disable-next-line(unsafe-typecast)\n        binTotals.scaledToken0 =\n          (uint256(binTotals.scaledToken0) + uint256(amount0DeltaScaled) - totalPlatformFeeScaled).toUint128(); // forge-lint: disable-line(unsafe-typecast)\n        // casting to uint128/uint256 is safe because bin totals remain bounded by uint128-scaled accounting invariants.\n        // forge-lint: disable-next-line(unsafe-typecast)\n        binTotals.scaledToken1 = uint128(uint256(binTotals.scaledToken1) - uint256(-amount1DeltaScaled));\n      } else {\n        // casting to uint256 is safe because amount1DeltaScaled is positive in !zeroForOne flow.\n        // forge-lint: disable-next-line(unsafe-typecast)\n        binTotals.scaledToken1 =\n          (uint256(binTotals.scaledToken1) + uint256(amount1DeltaScaled) - totalPlatformFeeScaled).toUint128(); // forge-lint: disable-line(unsafe-typecast)\n        // casting to uint128/uint256 is safe because bin totals remain bounded by uint128-scaled accounting invariants.\n        // forge-lint: disable-next-line(unsafe-typecast)\n        binTotals.scaledToken0 = uint128(uint256(binTotals.scaledToken0) - uint256(-amount0DeltaScaled));\n      }\n\n      if (platformNotionalFeeScaled > 0) {\n        if (zeroForOne) {\n          notionalFeeToken0Scaled = (uint256(notionalFeeToken0Scaled) + platformNotionalFeeScaled).toUint128();\n        } else {\n          notionalFeeToken1Scaled = (uint256(notionalFeeToken1Scaled) + platformNotionalFeeScaled).toUint128();\n        }\n      }\n    }\n  }\n\n  function _getBidAskReferencePriceX64()\n    internal\n    returns (uint128 bidPriceX64, uint128 askPriceX64, uint128 referencePriceX64)\n  {\n    address activePriceProvider = _resolvedPriceProvider();\n    try IPriceProvider(activePriceProvider).getQuote() returns (uint128 bid, uint128 ask, uint128 referencePrice) {\n      _validateBidAskReferencePriceX64(bid, ask, referencePrice);\n      return (bid, ask, referencePrice);\n    } catch (bytes memory reason) {\n      revert PriceProviderFailed(reason);\n    }\n  }\n\n  /// @dev Reverts unless `0 < bid < ask` and `ref` lies within `[bid, ask]` (inclusive).\n  ///      When `bidAskRefAsymmetryX8 == type(uint16).max`, a reference on `bid`/`ask` is allowed (waives that side's base fee).\n  ///      Otherwise enforces `1/M <= r1/r2 <= M` with `r1 = ref/bid - 1`, `r2 = ask/ref - 1`, `M = 1 + m` (`m` in X8).\n  function _validateBidAskReferencePriceX64(uint256 bidX64, uint256 askX64, uint256 refX64) internal view {\n    if (bidX64 >= askX64) revert BidGreaterThanAsk();\n    if (bidX64 == 0) revert BidIsZero();\n    if (refX64 < bidX64 || refX64 > askX64) revert ReferencePriceOutOfRange();\n\n    uint256 mX8 = bidAskRefAsymmetryX8;\n    if (mX8 == type(uint16).max) return;\n    if (refX64 == bidX64 || refX64 == askX64) revert BidAskRefAsymmetryOutOfBounds();\n\n    uint256 M_X64 = ONE_X64 + (mX8 << 56);\n    uint256 refMinusBid = refX64 - bidX64;\n    uint256 askMinusRef = askX64 - refX64;\n\n    uint256 numerator = refMinusBid * refX64;\n    uint256 denominator = bidX64 * askMinusRef;\n\n    if (\n      numerator < Math.mulDiv(denominator, ONE_X64, M_X64, Math.Rounding.Ceil)\n        || denominator < Math.mulDiv(numerator, ONE_X64, M_X64, Math.Rounding.Ceil)\n    ) {\n      revert BidAskRefAsymmetryOutOfBounds();\n    }\n  }\n\n  /// @dev Shared swap execution: runs `beforeSwap`, computes the base fee, executes the swap, and enforces\n  ///      the non-zero-delta invariant. Callers own price validation, token settlement, and `afterSwap`.\n  /// @param sender Forwarded to `beforeSwap` as-is; `swap` passes `msg.sender`, `simulateSwapAndRevert` may pass any address.\n  function _swapCore(\n    address sender,\n    address recipient,\n    bool zeroForOne,\n    int128 amountSpecified,\n    uint128 priceLimitX64,\n    uint128 bidPriceX64,\n    uint128 askPriceX64,\n    uint128 referencePriceX64,\n    bytes calldata extensionData\n  )\n    internal\n    returns (int256 amount0Delta, int256 amount1Delta, Packed2Uint128 platformFees, uint256 packedSlot0Initial)\n  {\n    require(amountSpecified != 0, InvalidAmount());\n\n    packedSlot0Initial = Slot0Library.loadPackedSlot0();\n\n    _beforeSwap(\n      sender,\n      recipient,\n      zeroForOne,\n      amountSpecified,\n      priceLimitX64,\n      packedSlot0Initial,\n      bidPriceX64,\n      askPriceX64,\n      referencePriceX64,\n      extensionData\n    );\n\n    uint256 baseFeeX64 = zeroForOne\n      ? SwapMath.sellBaseFeeX64FromBidAndReference(uint256(bidPriceX64), uint256(referencePriceX64))\n      : SwapMath.buyBaseFeeX64FromAskAndReference(uint256(askPriceX64), uint256(referencePriceX64));\n\n    (int256 amount0DeltaScaled, int256 amount1DeltaScaled, Packed2Uint128 fees) =\n      _executeSwap(zeroForOne, amountSpecified, uint256(referencePriceX64), baseFeeX64, priceLimitX64);\n    platformFees = fees;\n\n    (amount0Delta, amount1Delta) = deltasScaledToExternal(amount0DeltaScaled, amount1DeltaScaled);\n    require(amount0Delta != 0 && amount1Delta != 0, FinalAmountIsZero());\n  }\n\n  /// @dev Loads current swap state and computes bin price bounds for current bin.\n  /// @param amountSpecifiedScaled Reverts `AmountScaledExceedsMax` unless `<= type(uint128).max`.\n  function _getInitialStateForSwap(uint256 referencePriceX64, uint256 amountSpecifiedScaled)\n    internal\n    view\n    returns (\n      BinState memory binState,\n      SwapMath.SwapState memory state,\n      int256 curBinIdxCache,\n      uint256 curPosInBinCache,\n      int256 curBinDistE6Cache,\n      uint256 lowerReferencePriceX64,\n      uint256 upperReferencePriceX64\n    )\n  {\n    require(amountSpecifiedScaled <= type(uint128).max, AmountScaledExceedsMax());\n    state = SwapMath.SwapState({amountSpecifiedRemainingScaled: amountSpecifiedScaled, amountCalculatedScaled: 0});\n\n    curBinIdxCache = curBinIdx;\n    curPosInBinCache = curPosInBin;\n    curBinDistE6Cache = curBinDistFromProvidedPriceE6;\n\n    binState = _binStates[curBinIdxCache];\n\n    lowerReferencePriceX64 = distanceE6ToPriceX64(curBinDistE6Cache, referencePriceX64);\n    upperReferencePriceX64 = distanceE6ToPriceX64(_addDistE6(curBinDistE6Cache, binState.lengthE6), referencePriceX64);\n  }\n\n  function _finalizeSwap(int256 curBinIdxCache, uint256 curPosInBinCache, int256 curBinDistE6Cache) internal {\n    curBinIdx = curBinIdxCache.toInt16();\n    curPosInBin = curPosInBinCache.toUint104();\n    curBinDistFromProvidedPriceE6 = curBinDistE6Cache.toInt24();\n  }\n\n  // ---- Swap implementations ----\n\n  /// @dev Cross-bin swap loop parameterized by direction (`zeroForOne`) and exact-out (`specifiedOut`).\n  /// @return amount0DeltaScaled Net scaled token0 flow (positive = into the pool).\n  /// @return amount1DeltaScaled Net scaled token1 flow (positive = into the pool).\n  /// @return platformFees Platform (protocol + admin) fee legs, packed: `high` = spread, `low` = notional.\n  function _swapAcrossBins(\n    bool zeroForOne,\n    bool specifiedOut,\n    uint256 amountSpecifiedScaled,\n    uint256 referencePriceX64,\n    uint256 baseFeeX64,\n    uint256 priceLimitX64\n  ) internal returns (int256 amount0DeltaScaled, int256 amount1DeltaScaled, Packed2Uint128 platformFees) {\n    unchecked {\n      if (specifiedOut) {\n        uint256 availableOutScaled = zeroForOne ? binTotals.scaledToken1 : binTotals.scaledToken0;\n        if (amountSpecifiedScaled > availableOutScaled) {\n          amountSpecifiedScaled = availableOutScaled;\n        }\n      }\n\n      (\n        BinState memory binState,\n        SwapMath.SwapState memory state,\n        int256 curBinIdxCache,\n        uint256 curPosInBinCache,\n        int256 curBinDistE6Cache,\n        uint256 lowerReferencePriceX64,\n        uint256 upperReferencePriceX64\n      ) = _getInitialStateForSwap(referencePriceX64, amountSpecifiedScaled);\n\n      uint256 notionalFeeX64 = FeeMath._notionalFeeX64(notionalFeeE8);\n\n      // Exact-in only: remaining output liquidity across bins (exact-out caps up front).\n      uint256 totalAvailableOutScaled =\n        specifiedOut ? 0 : (zeroForOne ? binTotals.scaledToken1 : binTotals.scaledToken0);\n\n      while (state.amountSpecifiedRemainingScaled > 0) {\n        uint256 binTotalFeeX64 = FeeMath.binTotalFeeX64(\n          baseFeeX64, zeroForOne ? binState.addFeeSellE6 : binState.addFeeBuyE6, notionalFeeX64\n        );\n        uint256 effLowerX64 = FeeMath.effectivePriceX64(lowerReferencePriceX64, binTotalFeeX64, zeroForOne);\n        uint256 effUpperX64 = FeeMath.effectivePriceX64(upperReferencePriceX64, binTotalFeeX64, zeroForOne);\n\n        bool nonEmptyBin = true;\n        if (zeroForOne) {\n          if (binState.token1BalanceScaled == 0 || curPosInBinCache == 0) {\n            if (specifiedOut) {\n              if (priceLimitX64 >= effLowerX64) break;\n            } else {\n              if (priceLimitX64 != 0 && priceLimitX64 >= effLowerX64) break;\n              if (totalAvailableOutScaled == 0) break;\n            }\n            nonEmptyBin = false;\n          }\n        } else if (binState.token0BalanceScaled == 0 || curPosInBinCache >= type(uint104).max) {\n          if (specifiedOut) {\n            if (priceLimitX64 <= effUpperX64) break;\n          } else {\n            if (priceLimitX64 != 0 && priceLimitX64 <= effUpperX64) break;\n            if (totalAvailableOutScaled == 0) break;\n          }\n          nonEmptyBin = false;\n        }\n\n        if (nonEmptyBin) {\n          uint256 totalFeeOfGrossX64 = FeeMath.totalFeeOfGrossX64(binTotalFeeX64);\n          uint256 platformPartX64 = FeeMath.platformPartOfTotalFeeX64(binTotalFeeX64, notionalFeeX64, spreadFeeE6);\n          int256 binDelta0Scaled;\n          int256 binDelta1Scaled;\n          uint256 outAmountScaled;\n          uint256 platformFeeScaled;\n          uint256 lpFeeAmountScaled;\n\n          if (zeroForOne) {\n            if (specifiedOut) {\n              (curPosInBinCache, binDelta0Scaled, binDelta1Scaled, platformFeeScaled, lpFeeAmountScaled) =\n                SwapMath.buyToken1InBinSpecifiedOut(\n                  binState,\n                  curPosInBinCache,\n                  state,\n                  totalFeeOfGrossX64,\n                  platformPartX64,\n                  effLowerX64,\n                  effUpperX64,\n                  priceLimitX64\n                );\n            } else {\n              (\n                curPosInBinCache,\n                outAmountScaled,\n                binDelta0Scaled,\n                binDelta1Scaled,\n                platformFeeScaled,\n                lpFeeAmountScaled\n              ) =\n                SwapMath.buyToken1InBinSpecifiedIn(\n                  binState,\n                  curPosInBinCache,\n                  state,\n                  totalFeeOfGrossX64,\n                  platformPartX64,\n                  effLowerX64,\n                  effUpperX64,\n                  priceLimitX64\n                );\n              totalAvailableOutScaled -= outAmountScaled;\n            }\n          } else if (specifiedOut) {\n            (curPosInBinCache, binDelta0Scaled, binDelta1Scaled, platformFeeScaled, lpFeeAmountScaled) =\n              SwapMath.buyToken0InBinSpecifiedOut(\n                binState,\n                curPosInBinCache,\n                state,\n                totalFeeOfGrossX64,\n                platformPartX64,\n                effLowerX64,\n                effUpperX64,\n                priceLimitX64\n              );\n          } else {\n            (\n              curPosInBinCache, outAmountScaled, binDelta0Scaled, binDelta1Scaled, platformFeeScaled, lpFeeAmountScaled\n            ) =\n              SwapMath.buyToken0InBinSpecifiedIn(\n                binState,\n                curPosInBinCache,\n                state,\n                totalFeeOfGrossX64,\n                platformPartX64,\n                effLowerX64,\n                effUpperX64,\n                priceLimitX64\n              );\n            totalAvailableOutScaled -= outAmountScaled;\n          }\n\n          if (binDelta0Scaled != 0 || binDelta1Scaled != 0) {\n            {\n              uint256 notionalLegScaled =\n                FeeMath.notionalPartOfPlatformTake(platformFeeScaled, binTotalFeeX64, notionalFeeX64, spreadFeeE6);\n              platformFees =\n              // forge-lint: disable-next-line(unsafe-typecast)\n              platformFees.addBoth(uint128(platformFeeScaled - notionalLegScaled), uint128(notionalLegScaled));\n            }\n\n            emit BinSwapped(\n              curBinIdxCache,\n              // Bin balances are uint104, so both deltas fit int128 with 23 bits to spare.\n              // forge-lint: disable-next-line(unsafe-typecast)\n              Packed2Int128Lib.pack(int128(binDelta0Scaled), int128(binDelta1Scaled)),\n              // forge-lint: disable-next-line(unsafe-typecast)\n              Packed2Uint128Lib.pack(uint128(lpFeeAmountScaled), uint128(platformFeeScaled))\n            );\n            _saveBinState(curBinIdxCache, binState);\n          }\n        }\n\n        bool binExhausted = zeroForOne ? curPosInBinCache == 0 : curPosInBinCache >= type(uint104).max;\n        if (binExhausted || !nonEmptyBin) {\n          if (zeroForOne) {\n            if (curBinIdxCache <= LOWEST_BIN) break;\n            curBinIdxCache--;\n            binState = _binStates[curBinIdxCache];\n            curPosInBinCache = type(uint104).max;\n            curBinDistE6Cache -= int24(uint24(binState.lengthE6));\n            upperReferencePriceX64 = lowerReferencePriceX64;\n            lowerReferencePriceX64 = distanceE6ToPriceX64(curBinDistE6Cache, referencePriceX64);\n          } else {\n            if (curBinIdxCache >= HIGHEST_BIN) break;\n            curBinIdxCache++;\n            curPosInBinCache = 0;\n            curBinDistE6Cache = _clampInt256ToInt24(_addDistE6(int256(curBinDistE6Cache), binState.lengthE6));\n            lowerReferencePriceX64 = upperReferencePriceX64;\n            binState = _binStates[curBinIdxCache];\n            upperReferencePriceX64 =\n              distanceE6ToPriceX64(_addDistE6(curBinDistE6Cache, binState.lengthE6), referencePriceX64);\n          }\n        } else {\n          break;\n        }\n      }\n\n      _finalizeSwap(curBinIdxCache, curPosInBinCache, curBinDistE6Cache);\n\n      uint256 amountInScaled;\n      uint256 amountOutScaled;\n      if (specifiedOut) {\n        amountInScaled = state.amountCalculatedScaled;\n        amountOutScaled = amountSpecifiedScaled - state.amountSpecifiedRemainingScaled;\n      } else {\n        amountInScaled = amountSpecifiedScaled - state.amountSpecifiedRemainingScaled;\n        amountOutScaled = state.amountCalculatedScaled;\n      }\n      (amount0DeltaScaled, amount1DeltaScaled) = zeroForOne\n        // forge-lint: disable-next-line(unsafe-typecast)\n        ? (int256(amountInScaled), -int256(amountOutScaled))\n        // forge-lint: disable-next-line(unsafe-typecast)\n        : (-int256(amountOutScaled), int256(amountInScaled));\n    }\n  }\n}\n"},"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\n\npragma solidity >=0.4.16;\n\n/**\n * @dev Interface of the ERC-20 standard as defined in the ERC.\n */\ninterface IERC20 {\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n\n    /**\n     * @dev Returns the value of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the value of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the\n     * allowance mechanism. `value` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n"},"lib/openzeppelin-contracts/contracts/utils/math/Math.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.5.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\nimport {Panic} from \"../Panic.sol\";\nimport {SafeCast} from \"./SafeCast.sol\";\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n    enum Rounding {\n        Floor, // Toward negative infinity\n        Ceil, // Toward positive infinity\n        Trunc, // Toward zero\n        Expand // Away from zero\n    }\n\n    /**\n     * @dev Return the 512-bit addition of two uint256.\n     *\n     * The result is stored in two 256 variables such that sum = high * 2²⁵⁶ + low.\n     */\n    function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\n        assembly (\"memory-safe\") {\n            low := add(a, b)\n            high := lt(low, a)\n        }\n    }\n\n    /**\n     * @dev Return the 512-bit multiplication of two uint256.\n     *\n     * The result is stored in two 256 variables such that product = high * 2²⁵⁶ + low.\n     */\n    function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\n        // 512-bit multiply [high low] = x * y. Compute the product mod 2²⁵⁶ and mod 2²⁵⁶ - 1, then use\n        // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n        // variables such that product = high * 2²⁵⁶ + low.\n        assembly (\"memory-safe\") {\n            let mm := mulmod(a, b, not(0))\n            low := mul(a, b)\n            high := sub(sub(mm, low), lt(mm, low))\n        }\n    }\n\n    /**\n     * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\n     */\n    function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            uint256 c = a + b;\n            success = c >= a;\n            result = c * SafeCast.toUint(success);\n        }\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\n     */\n    function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            uint256 c = a - b;\n            success = c <= a;\n            result = c * SafeCast.toUint(success);\n        }\n    }\n\n    /**\n     * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\n     */\n    function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            uint256 c = a * b;\n            assembly (\"memory-safe\") {\n                // Only true when the multiplication doesn't overflow\n                // (c / a == b) || (a == 0)\n                success := or(eq(div(c, a), b), iszero(a))\n            }\n            // equivalent to: success ? c : 0\n            result = c * SafeCast.toUint(success);\n        }\n    }\n\n    /**\n     * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\n     */\n    function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            success = b > 0;\n            assembly (\"memory-safe\") {\n                // The `DIV` opcode returns zero when the denominator is 0.\n                result := div(a, b)\n            }\n        }\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\n     */\n    function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            success = b > 0;\n            assembly (\"memory-safe\") {\n                // The `MOD` opcode returns zero when the denominator is 0.\n                result := mod(a, b)\n            }\n        }\n    }\n\n    /**\n     * @dev Unsigned saturating addition, bounds to `2²⁵⁶ - 1` instead of overflowing.\n     */\n    function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\n        (bool success, uint256 result) = tryAdd(a, b);\n        return ternary(success, result, type(uint256).max);\n    }\n\n    /**\n     * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\n     */\n    function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\n        (, uint256 result) = trySub(a, b);\n        return result;\n    }\n\n    /**\n     * @dev Unsigned saturating multiplication, bounds to `2²⁵⁶ - 1` instead of overflowing.\n     */\n    function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\n        (bool success, uint256 result) = tryMul(a, b);\n        return ternary(success, result, type(uint256).max);\n    }\n\n    /**\n     * @dev Branchless ternary evaluation for `condition ? a : b`. Gas costs are constant.\n     *\n     * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n     * However, the compiler may optimize Solidity ternary operations (i.e. `condition ? a : b`) to only compute\n     * one branch when needed, making this function more expensive.\n     */\n    function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\n        unchecked {\n            // branchless ternary works because:\n            // b ^ (a ^ b) == a\n            // b ^ 0 == b\n            return b ^ ((a ^ b) * SafeCast.toUint(condition));\n        }\n    }\n\n    /**\n     * @dev Returns the largest of two numbers.\n     */\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\n        return ternary(a > b, a, b);\n    }\n\n    /**\n     * @dev Returns the smallest of two numbers.\n     */\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\n        return ternary(a < b, a, b);\n    }\n\n    /**\n     * @dev Returns the average of two numbers. The result is rounded towards\n     * zero.\n     */\n    function average(uint256 a, uint256 b) internal pure returns (uint256) {\n        unchecked {\n            // (a + b) / 2 can overflow.\n            return (a & b) + (a ^ b) / 2;\n        }\n    }\n\n    /**\n     * @dev Returns the ceiling of the division of two numbers.\n     *\n     * This differs from standard division with `/` in that it rounds towards infinity instead\n     * of rounding towards zero.\n     */\n    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n        if (b == 0) {\n            // Guarantee the same behavior as in a regular Solidity division.\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n\n        // The following calculation ensures accurate ceiling division without overflow.\n        // Since a is non-zero, (a - 1) / b will not overflow.\n        // The largest possible result occurs when (a - 1) / b is type(uint256).max,\n        // but the largest value we can obtain is type(uint256).max - 1, which happens\n        // when a = type(uint256).max and b = 1.\n        unchecked {\n            return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\n        }\n    }\n\n    /**\n     * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\n     * denominator == 0.\n     *\n     * Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n     * Uniswap Labs also under MIT license.\n     */\n    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n        unchecked {\n            (uint256 high, uint256 low) = mul512(x, y);\n\n            // Handle non-overflow cases, 256 by 256 division.\n            if (high == 0) {\n                // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n                // The surrounding unchecked block does not change this fact.\n                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n                return low / denominator;\n            }\n\n            // Make sure the result is less than 2²⁵⁶. Also prevents denominator == 0.\n            if (denominator <= high) {\n                Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\n            }\n\n            ///////////////////////////////////////////////\n            // 512 by 256 division.\n            ///////////////////////////////////////////////\n\n            // Make division exact by subtracting the remainder from [high low].\n            uint256 remainder;\n            assembly (\"memory-safe\") {\n                // Compute remainder using mulmod.\n                remainder := mulmod(x, y, denominator)\n\n                // Subtract 256 bit number from 512 bit number.\n                high := sub(high, gt(remainder, low))\n                low := sub(low, remainder)\n            }\n\n            // Factor powers of two out of denominator and compute largest power of two divisor of denominator.\n            // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n            uint256 twos = denominator & (0 - denominator);\n            assembly (\"memory-safe\") {\n                // Divide denominator by twos.\n                denominator := div(denominator, twos)\n\n                // Divide [high low] by twos.\n                low := div(low, twos)\n\n                // Flip twos such that it is 2²⁵⁶ / twos. If twos is zero, then it becomes one.\n                twos := add(div(sub(0, twos), twos), 1)\n            }\n\n            // Shift in bits from high into low.\n            low |= high * twos;\n\n            // Invert denominator mod 2²⁵⁶. Now that denominator is an odd number, it has an inverse modulo 2²⁵⁶ such\n            // that denominator * inv ≡ 1 mod 2²⁵⁶. Compute the inverse by starting with a seed that is correct for\n            // four bits. That is, denominator * inv ≡ 1 mod 2⁴.\n            uint256 inverse = (3 * denominator) ^ 2;\n\n            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also\n            // works in modular arithmetic, doubling the correct bits in each step.\n            inverse *= 2 - denominator * inverse; // inverse mod 2⁸\n            inverse *= 2 - denominator * inverse; // inverse mod 2¹⁶\n            inverse *= 2 - denominator * inverse; // inverse mod 2³²\n            inverse *= 2 - denominator * inverse; // inverse mod 2⁶⁴\n            inverse *= 2 - denominator * inverse; // inverse mod 2¹²⁸\n            inverse *= 2 - denominator * inverse; // inverse mod 2²⁵⁶\n\n            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n            // This will give us the correct result modulo 2²⁵⁶. Since the preconditions guarantee that the outcome is\n            // less than 2²⁵⁶, this is the final result. We don't need to compute the high bits of the result and high\n            // is no longer required.\n            result = low * inverse;\n            return result;\n        }\n    }\n\n    /**\n     * @dev Calculates x * y / denominator with full precision, following the selected rounding direction.\n     */\n    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n        return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\n    }\n\n    /**\n     * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\n     */\n    function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\n        unchecked {\n            (uint256 high, uint256 low) = mul512(x, y);\n            if (high >= 1 << n) {\n                Panic.panic(Panic.UNDER_OVERFLOW);\n            }\n            return (high << (256 - n)) | (low >> n);\n        }\n    }\n\n    /**\n     * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\n     */\n    function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\n        return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\n    }\n\n    /**\n     * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\n     *\n     * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\n     * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\n     *\n     * If the input value is not inversible, 0 is returned.\n     *\n     * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\n     * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\n     */\n    function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\n        unchecked {\n            if (n == 0) return 0;\n\n            // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\n            // Used to compute integers x and y such that: ax + ny = gcd(a, n).\n            // When the gcd is 1, then the inverse of a modulo n exists and it's x.\n            // ax + ny = 1\n            // ax = 1 + (-y)n\n            // ax ≡ 1 (mod n) # x is the inverse of a modulo n\n\n            // If the remainder is 0 the gcd is n right away.\n            uint256 remainder = a % n;\n            uint256 gcd = n;\n\n            // Therefore the initial coefficients are:\n            // ax + ny = gcd(a, n) = n\n            // 0a + 1n = n\n            int256 x = 0;\n            int256 y = 1;\n\n            while (remainder != 0) {\n                uint256 quotient = gcd / remainder;\n\n                (gcd, remainder) = (\n                    // The old remainder is the next gcd to try.\n                    remainder,\n                    // Compute the next remainder.\n                    // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\n                    // where gcd is at most n (capped to type(uint256).max)\n                    gcd - remainder * quotient\n                );\n\n                (x, y) = (\n                    // Increment the coefficient of a.\n                    y,\n                    // Decrement the coefficient of n.\n                    // Can overflow, but the result is casted to uint256 so that the\n                    // next value of y is \"wrapped around\" to a value between 0 and n - 1.\n                    x - y * int256(quotient)\n                );\n            }\n\n            if (gcd != 1) return 0; // No inverse exists.\n            return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\n        }\n    }\n\n    /**\n     * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\n     *\n     * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\n     * prime, then `a**(p-1) ≡ 1 mod p`. As a consequence, we have `a * a**(p-2) ≡ 1 mod p`, which means that\n     * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\n     *\n     * NOTE: this function does NOT check that `p` is a prime greater than `2`.\n     */\n    function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\n        unchecked {\n            return Math.modExp(a, p - 2, p);\n        }\n    }\n\n    /**\n     * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\n     *\n     * Requirements:\n     * - modulus can't be zero\n     * - underlying staticcall to precompile must succeed\n     *\n     * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\n     * sure the chain you're using it on supports the precompiled contract for modular exponentiation\n     * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\n     * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\n     * interpreted as 0.\n     */\n    function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\n        (bool success, uint256 result) = tryModExp(b, e, m);\n        if (!success) {\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n        return result;\n    }\n\n    /**\n     * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\n     * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\n     * to operate modulo 0 or if the underlying precompile reverted.\n     *\n     * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\n     * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\n     * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\n     * of a revert, but the result may be incorrectly interpreted as 0.\n     */\n    function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\n        if (m == 0) return (false, 0);\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            // | Offset    | Content    | Content (Hex)                                                      |\n            // |-----------|------------|--------------------------------------------------------------------|\n            // | 0x00:0x1f | size of b  | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n            // | 0x20:0x3f | size of e  | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n            // | 0x40:0x5f | size of m  | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n            // | 0x60:0x7f | value of b | 0x<.............................................................b> |\n            // | 0x80:0x9f | value of e | 0x<.............................................................e> |\n            // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\n            mstore(ptr, 0x20)\n            mstore(add(ptr, 0x20), 0x20)\n            mstore(add(ptr, 0x40), 0x20)\n            mstore(add(ptr, 0x60), b)\n            mstore(add(ptr, 0x80), e)\n            mstore(add(ptr, 0xa0), m)\n\n            // Given the result < m, it's guaranteed to fit in 32 bytes,\n            // so we can use the memory scratch space located at offset 0.\n            success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\n            result := mload(0x00)\n        }\n    }\n\n    /**\n     * @dev Variant of {modExp} that supports inputs of arbitrary length.\n     */\n    function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\n        (bool success, bytes memory result) = tryModExp(b, e, m);\n        if (!success) {\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n        return result;\n    }\n\n    /**\n     * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\n     */\n    function tryModExp(\n        bytes memory b,\n        bytes memory e,\n        bytes memory m\n    ) internal view returns (bool success, bytes memory result) {\n        if (_zeroBytes(m)) return (false, new bytes(0));\n\n        uint256 mLen = m.length;\n\n        // Encode call args in result and move the free memory pointer\n        result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\n\n        assembly (\"memory-safe\") {\n            let dataPtr := add(result, 0x20)\n            // Write result on top of args to avoid allocating extra memory.\n            success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\n            // Overwrite the length.\n            // result.length > returndatasize() is guaranteed because returndatasize() == m.length\n            mstore(result, mLen)\n            // Set the memory pointer after the returned data.\n            mstore(0x40, add(dataPtr, mLen))\n        }\n    }\n\n    /**\n     * @dev Returns whether the provided byte array is zero.\n     */\n    function _zeroBytes(bytes memory buffer) private pure returns (bool) {\n        uint256 chunk;\n        for (uint256 i = 0; i < buffer.length; i += 0x20) {\n            // See _unsafeReadBytesOffset from utils/Bytes.sol\n            assembly (\"memory-safe\") {\n                chunk := mload(add(add(buffer, 0x20), i))\n            }\n            if (chunk >> (8 * saturatingSub(i + 0x20, buffer.length)) != 0) {\n                return false;\n            }\n        }\n        return true;\n    }\n\n    /**\n     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded\n     * towards zero.\n     *\n     * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\n     * using integer operations.\n     */\n    function sqrt(uint256 a) internal pure returns (uint256) {\n        unchecked {\n            // Take care of easy edge cases when a == 0 or a == 1\n            if (a <= 1) {\n                return a;\n            }\n\n            // In this function, we use Newton's method to get a root of `f(x) := x² - a`. It involves building a\n            // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\n            // the current value as `ε_n = | x_n - sqrt(a) |`.\n            //\n            // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\n            // of the target. (i.e. `2**(e-1) ≤ sqrt(a) < 2**e`). We know that `e ≤ 128` because `(2¹²⁸)² = 2²⁵⁶` is\n            // bigger than any uint256.\n            //\n            // By noticing that\n            // `2**(e-1) ≤ sqrt(a) < 2**e → (2**(e-1))² ≤ a < (2**e)² → 2**(2*e-2) ≤ a < 2**(2*e)`\n            // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\n            // to the msb function.\n            uint256 aa = a;\n            uint256 xn = 1;\n\n            if (aa >= (1 << 128)) {\n                aa >>= 128;\n                xn <<= 64;\n            }\n            if (aa >= (1 << 64)) {\n                aa >>= 64;\n                xn <<= 32;\n            }\n            if (aa >= (1 << 32)) {\n                aa >>= 32;\n                xn <<= 16;\n            }\n            if (aa >= (1 << 16)) {\n                aa >>= 16;\n                xn <<= 8;\n            }\n            if (aa >= (1 << 8)) {\n                aa >>= 8;\n                xn <<= 4;\n            }\n            if (aa >= (1 << 4)) {\n                aa >>= 4;\n                xn <<= 2;\n            }\n            if (aa >= (1 << 2)) {\n                xn <<= 1;\n            }\n\n            // We now have x_n such that `x_n = 2**(e-1) ≤ sqrt(a) < 2**e = 2 * x_n`. This implies ε_n ≤ 2**(e-1).\n            //\n            // We can refine our estimation by noticing that the middle of that interval minimizes the error.\n            // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to ε_n ≤ 2**(e-2).\n            // This is going to be our x_0 (and ε_0)\n            xn = (3 * xn) >> 1; // ε_0 := | x_0 - sqrt(a) | ≤ 2**(e-2)\n\n            // From here, Newton's method give us:\n            // x_{n+1} = (x_n + a / x_n) / 2\n            //\n            // One should note that:\n            // x_{n+1}² - a = ((x_n + a / x_n) / 2)² - a\n            //              = ((x_n² + a) / (2 * x_n))² - a\n            //              = (x_n⁴ + 2 * a * x_n² + a²) / (4 * x_n²) - a\n            //              = (x_n⁴ + 2 * a * x_n² + a² - 4 * a * x_n²) / (4 * x_n²)\n            //              = (x_n⁴ - 2 * a * x_n² + a²) / (4 * x_n²)\n            //              = (x_n² - a)² / (2 * x_n)²\n            //              = ((x_n² - a) / (2 * x_n))²\n            //              ≥ 0\n            // Which proves that for all n ≥ 1, sqrt(a) ≤ x_n\n            //\n            // This gives us the proof of quadratic convergence of the sequence:\n            // ε_{n+1} = | x_{n+1} - sqrt(a) |\n            //         = | (x_n + a / x_n) / 2 - sqrt(a) |\n            //         = | (x_n² + a - 2*x_n*sqrt(a)) / (2 * x_n) |\n            //         = | (x_n - sqrt(a))² / (2 * x_n) |\n            //         = | ε_n² / (2 * x_n) |\n            //         = ε_n² / | (2 * x_n) |\n            //\n            // For the first iteration, we have a special case where x_0 is known:\n            // ε_1 = ε_0² / | (2 * x_0) |\n            //     ≤ (2**(e-2))² / (2 * (2**(e-1) + 2**(e-2)))\n            //     ≤ 2**(2*e-4) / (3 * 2**(e-1))\n            //     ≤ 2**(e-3) / 3\n            //     ≤ 2**(e-3-log2(3))\n            //     ≤ 2**(e-4.5)\n            //\n            // For the following iterations, we use the fact that, 2**(e-1) ≤ sqrt(a) ≤ x_n:\n            // ε_{n+1} = ε_n² / | (2 * x_n) |\n            //         ≤ (2**(e-k))² / (2 * 2**(e-1))\n            //         ≤ 2**(2*e-2*k) / 2**e\n            //         ≤ 2**(e-2*k)\n            xn = (xn + a / xn) >> 1; // ε_1 := | x_1 - sqrt(a) | ≤ 2**(e-4.5)  -- special case, see above\n            xn = (xn + a / xn) >> 1; // ε_2 := | x_2 - sqrt(a) | ≤ 2**(e-9)    -- general case with k = 4.5\n            xn = (xn + a / xn) >> 1; // ε_3 := | x_3 - sqrt(a) | ≤ 2**(e-18)   -- general case with k = 9\n            xn = (xn + a / xn) >> 1; // ε_4 := | x_4 - sqrt(a) | ≤ 2**(e-36)   -- general case with k = 18\n            xn = (xn + a / xn) >> 1; // ε_5 := | x_5 - sqrt(a) | ≤ 2**(e-72)   -- general case with k = 36\n            xn = (xn + a / xn) >> 1; // ε_6 := | x_6 - sqrt(a) | ≤ 2**(e-144)  -- general case with k = 72\n\n            // Because e ≤ 128 (as discussed during the first estimation phase), we know have reached a precision\n            // ε_6 ≤ 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\n            // sqrt(a) or sqrt(a) + 1.\n            return xn - SafeCast.toUint(xn > a / xn);\n        }\n    }\n\n    /**\n     * @dev Calculates sqrt(a), following the selected rounding direction.\n     */\n    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = sqrt(a);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 2 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     */\n    function log2(uint256 x) internal pure returns (uint256 r) {\n        // If value has upper 128 bits set, log2 result is at least 128\n        r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\n        // If upper 64 bits of 128-bit half set, add 64 to result\n        r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\n        // If upper 32 bits of 64-bit half set, add 32 to result\n        r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\n        // If upper 16 bits of 32-bit half set, add 16 to result\n        r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\n        // If upper 8 bits of 16-bit half set, add 8 to result\n        r |= SafeCast.toUint((x >> r) > 0xff) << 3;\n        // If upper 4 bits of 8-bit half set, add 4 to result\n        r |= SafeCast.toUint((x >> r) > 0xf) << 2;\n\n        // Shifts value right by the current result and use it as an index into this lookup table:\n        //\n        // | x (4 bits) |  index  | table[index] = MSB position |\n        // |------------|---------|-----------------------------|\n        // |    0000    |    0    |        table[0] = 0         |\n        // |    0001    |    1    |        table[1] = 0         |\n        // |    0010    |    2    |        table[2] = 1         |\n        // |    0011    |    3    |        table[3] = 1         |\n        // |    0100    |    4    |        table[4] = 2         |\n        // |    0101    |    5    |        table[5] = 2         |\n        // |    0110    |    6    |        table[6] = 2         |\n        // |    0111    |    7    |        table[7] = 2         |\n        // |    1000    |    8    |        table[8] = 3         |\n        // |    1001    |    9    |        table[9] = 3         |\n        // |    1010    |   10    |        table[10] = 3        |\n        // |    1011    |   11    |        table[11] = 3        |\n        // |    1100    |   12    |        table[12] = 3        |\n        // |    1101    |   13    |        table[13] = 3        |\n        // |    1110    |   14    |        table[14] = 3        |\n        // |    1111    |   15    |        table[15] = 3        |\n        //\n        // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the first 16 bytes (most significant half).\n        assembly (\"memory-safe\") {\n            r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\n        }\n    }\n\n    /**\n     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log2(value);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 10 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     */\n    function log10(uint256 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        unchecked {\n            if (value >= 10 ** 64) {\n                value /= 10 ** 64;\n                result += 64;\n            }\n            if (value >= 10 ** 32) {\n                value /= 10 ** 32;\n                result += 32;\n            }\n            if (value >= 10 ** 16) {\n                value /= 10 ** 16;\n                result += 16;\n            }\n            if (value >= 10 ** 8) {\n                value /= 10 ** 8;\n                result += 8;\n            }\n            if (value >= 10 ** 4) {\n                value /= 10 ** 4;\n                result += 4;\n            }\n            if (value >= 10 ** 2) {\n                value /= 10 ** 2;\n                result += 2;\n            }\n            if (value >= 10 ** 1) {\n                result += 1;\n            }\n        }\n        return result;\n    }\n\n    /**\n     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log10(value);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 256 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     *\n     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n     */\n    function log256(uint256 x) internal pure returns (uint256 r) {\n        // If value has upper 128 bits set, log2 result is at least 128\n        r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\n        // If upper 64 bits of 128-bit half set, add 64 to result\n        r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\n        // If upper 32 bits of 64-bit half set, add 32 to result\n        r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\n        // If upper 16 bits of 32-bit half set, add 16 to result\n        r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\n        // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\n        return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\n    }\n\n    /**\n     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log256(value);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\n        }\n    }\n\n    /**\n     * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n     */\n    function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n        return uint8(rounding) % 2 == 1;\n    }\n\n    /**\n     * @dev Counts the number of leading zero bits in a uint256.\n     */\n    function clz(uint256 x) internal pure returns (uint256) {\n        return ternary(x == 0, 256, 255 - log2(x));\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/math/SafeCast.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SafeCast.sol)\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX/bool casting operators with added overflow\n * checks.\n *\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n * easily result in undesired exploitation or bugs, since developers usually\n * assume that overflows raise errors. `SafeCast` restores this intuition by\n * reverting the transaction when such an operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeCast {\n    /**\n     * @dev Value doesn't fit in a uint of `bits` size.\n     */\n    error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);\n\n    /**\n     * @dev An int value doesn't fit in a uint of `bits` size.\n     */\n    error SafeCastOverflowedIntToUint(int256 value);\n\n    /**\n     * @dev Value doesn't fit in an int of `bits` size.\n     */\n    error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);\n\n    /**\n     * @dev A uint value doesn't fit in an int of `bits` size.\n     */\n    error SafeCastOverflowedUintToInt(uint256 value);\n\n    /**\n     * @dev Returns the downcasted uint248 from uint256, reverting on\n     * overflow (when the input is greater than largest uint248).\n     *\n     * Counterpart to Solidity's `uint248` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 248 bits\n     */\n    function toUint248(uint256 value) internal pure returns (uint248) {\n        if (value > type(uint248).max) {\n            revert SafeCastOverflowedUintDowncast(248, value);\n        }\n        return uint248(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint240 from uint256, reverting on\n     * overflow (when the input is greater than largest uint240).\n     *\n     * Counterpart to Solidity's `uint240` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 240 bits\n     */\n    function toUint240(uint256 value) internal pure returns (uint240) {\n        if (value > type(uint240).max) {\n            revert SafeCastOverflowedUintDowncast(240, value);\n        }\n        return uint240(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint232 from uint256, reverting on\n     * overflow (when the input is greater than largest uint232).\n     *\n     * Counterpart to Solidity's `uint232` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 232 bits\n     */\n    function toUint232(uint256 value) internal pure returns (uint232) {\n        if (value > type(uint232).max) {\n            revert SafeCastOverflowedUintDowncast(232, value);\n        }\n        return uint232(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint224 from uint256, reverting on\n     * overflow (when the input is greater than largest uint224).\n     *\n     * Counterpart to Solidity's `uint224` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 224 bits\n     */\n    function toUint224(uint256 value) internal pure returns (uint224) {\n        if (value > type(uint224).max) {\n            revert SafeCastOverflowedUintDowncast(224, value);\n        }\n        return uint224(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint216 from uint256, reverting on\n     * overflow (when the input is greater than largest uint216).\n     *\n     * Counterpart to Solidity's `uint216` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 216 bits\n     */\n    function toUint216(uint256 value) internal pure returns (uint216) {\n        if (value > type(uint216).max) {\n            revert SafeCastOverflowedUintDowncast(216, value);\n        }\n        return uint216(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint208 from uint256, reverting on\n     * overflow (when the input is greater than largest uint208).\n     *\n     * Counterpart to Solidity's `uint208` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 208 bits\n     */\n    function toUint208(uint256 value) internal pure returns (uint208) {\n        if (value > type(uint208).max) {\n            revert SafeCastOverflowedUintDowncast(208, value);\n        }\n        return uint208(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint200 from uint256, reverting on\n     * overflow (when the input is greater than largest uint200).\n     *\n     * Counterpart to Solidity's `uint200` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 200 bits\n     */\n    function toUint200(uint256 value) internal pure returns (uint200) {\n        if (value > type(uint200).max) {\n            revert SafeCastOverflowedUintDowncast(200, value);\n        }\n        return uint200(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint192 from uint256, reverting on\n     * overflow (when the input is greater than largest uint192).\n     *\n     * Counterpart to Solidity's `uint192` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 192 bits\n     */\n    function toUint192(uint256 value) internal pure returns (uint192) {\n        if (value > type(uint192).max) {\n            revert SafeCastOverflowedUintDowncast(192, value);\n        }\n        return uint192(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint184 from uint256, reverting on\n     * overflow (when the input is greater than largest uint184).\n     *\n     * Counterpart to Solidity's `uint184` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 184 bits\n     */\n    function toUint184(uint256 value) internal pure returns (uint184) {\n        if (value > type(uint184).max) {\n            revert SafeCastOverflowedUintDowncast(184, value);\n        }\n        return uint184(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint176 from uint256, reverting on\n     * overflow (when the input is greater than largest uint176).\n     *\n     * Counterpart to Solidity's `uint176` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 176 bits\n     */\n    function toUint176(uint256 value) internal pure returns (uint176) {\n        if (value > type(uint176).max) {\n            revert SafeCastOverflowedUintDowncast(176, value);\n        }\n        return uint176(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint168 from uint256, reverting on\n     * overflow (when the input is greater than largest uint168).\n     *\n     * Counterpart to Solidity's `uint168` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 168 bits\n     */\n    function toUint168(uint256 value) internal pure returns (uint168) {\n        if (value > type(uint168).max) {\n            revert SafeCastOverflowedUintDowncast(168, value);\n        }\n        return uint168(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint160 from uint256, reverting on\n     * overflow (when the input is greater than largest uint160).\n     *\n     * Counterpart to Solidity's `uint160` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 160 bits\n     */\n    function toUint160(uint256 value) internal pure returns (uint160) {\n        if (value > type(uint160).max) {\n            revert SafeCastOverflowedUintDowncast(160, value);\n        }\n        return uint160(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint152 from uint256, reverting on\n     * overflow (when the input is greater than largest uint152).\n     *\n     * Counterpart to Solidity's `uint152` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 152 bits\n     */\n    function toUint152(uint256 value) internal pure returns (uint152) {\n        if (value > type(uint152).max) {\n            revert SafeCastOverflowedUintDowncast(152, value);\n        }\n        return uint152(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint144 from uint256, reverting on\n     * overflow (when the input is greater than largest uint144).\n     *\n     * Counterpart to Solidity's `uint144` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 144 bits\n     */\n    function toUint144(uint256 value) internal pure returns (uint144) {\n        if (value > type(uint144).max) {\n            revert SafeCastOverflowedUintDowncast(144, value);\n        }\n        return uint144(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint136 from uint256, reverting on\n     * overflow (when the input is greater than largest uint136).\n     *\n     * Counterpart to Solidity's `uint136` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 136 bits\n     */\n    function toUint136(uint256 value) internal pure returns (uint136) {\n        if (value > type(uint136).max) {\n            revert SafeCastOverflowedUintDowncast(136, value);\n        }\n        return uint136(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint128 from uint256, reverting on\n     * overflow (when the input is greater than largest uint128).\n     *\n     * Counterpart to Solidity's `uint128` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 128 bits\n     */\n    function toUint128(uint256 value) internal pure returns (uint128) {\n        if (value > type(uint128).max) {\n            revert SafeCastOverflowedUintDowncast(128, value);\n        }\n        return uint128(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint120 from uint256, reverting on\n     * overflow (when the input is greater than largest uint120).\n     *\n     * Counterpart to Solidity's `uint120` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 120 bits\n     */\n    function toUint120(uint256 value) internal pure returns (uint120) {\n        if (value > type(uint120).max) {\n            revert SafeCastOverflowedUintDowncast(120, value);\n        }\n        return uint120(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint112 from uint256, reverting on\n     * overflow (when the input is greater than largest uint112).\n     *\n     * Counterpart to Solidity's `uint112` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 112 bits\n     */\n    function toUint112(uint256 value) internal pure returns (uint112) {\n        if (value > type(uint112).max) {\n            revert SafeCastOverflowedUintDowncast(112, value);\n        }\n        return uint112(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint104 from uint256, reverting on\n     * overflow (when the input is greater than largest uint104).\n     *\n     * Counterpart to Solidity's `uint104` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 104 bits\n     */\n    function toUint104(uint256 value) internal pure returns (uint104) {\n        if (value > type(uint104).max) {\n            revert SafeCastOverflowedUintDowncast(104, value);\n        }\n        return uint104(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint96 from uint256, reverting on\n     * overflow (when the input is greater than largest uint96).\n     *\n     * Counterpart to Solidity's `uint96` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 96 bits\n     */\n    function toUint96(uint256 value) internal pure returns (uint96) {\n        if (value > type(uint96).max) {\n            revert SafeCastOverflowedUintDowncast(96, value);\n        }\n        return uint96(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint88 from uint256, reverting on\n     * overflow (when the input is greater than largest uint88).\n     *\n     * Counterpart to Solidity's `uint88` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 88 bits\n     */\n    function toUint88(uint256 value) internal pure returns (uint88) {\n        if (value > type(uint88).max) {\n            revert SafeCastOverflowedUintDowncast(88, value);\n        }\n        return uint88(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint80 from uint256, reverting on\n     * overflow (when the input is greater than largest uint80).\n     *\n     * Counterpart to Solidity's `uint80` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 80 bits\n     */\n    function toUint80(uint256 value) internal pure returns (uint80) {\n        if (value > type(uint80).max) {\n            revert SafeCastOverflowedUintDowncast(80, value);\n        }\n        return uint80(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint72 from uint256, reverting on\n     * overflow (when the input is greater than largest uint72).\n     *\n     * Counterpart to Solidity's `uint72` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 72 bits\n     */\n    function toUint72(uint256 value) internal pure returns (uint72) {\n        if (value > type(uint72).max) {\n            revert SafeCastOverflowedUintDowncast(72, value);\n        }\n        return uint72(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint64 from uint256, reverting on\n     * overflow (when the input is greater than largest uint64).\n     *\n     * Counterpart to Solidity's `uint64` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 64 bits\n     */\n    function toUint64(uint256 value) internal pure returns (uint64) {\n        if (value > type(uint64).max) {\n            revert SafeCastOverflowedUintDowncast(64, value);\n        }\n        return uint64(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint56 from uint256, reverting on\n     * overflow (when the input is greater than largest uint56).\n     *\n     * Counterpart to Solidity's `uint56` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 56 bits\n     */\n    function toUint56(uint256 value) internal pure returns (uint56) {\n        if (value > type(uint56).max) {\n            revert SafeCastOverflowedUintDowncast(56, value);\n        }\n        return uint56(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint48 from uint256, reverting on\n     * overflow (when the input is greater than largest uint48).\n     *\n     * Counterpart to Solidity's `uint48` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 48 bits\n     */\n    function toUint48(uint256 value) internal pure returns (uint48) {\n        if (value > type(uint48).max) {\n            revert SafeCastOverflowedUintDowncast(48, value);\n        }\n        return uint48(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint40 from uint256, reverting on\n     * overflow (when the input is greater than largest uint40).\n     *\n     * Counterpart to Solidity's `uint40` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 40 bits\n     */\n    function toUint40(uint256 value) internal pure returns (uint40) {\n        if (value > type(uint40).max) {\n            revert SafeCastOverflowedUintDowncast(40, value);\n        }\n        return uint40(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint32 from uint256, reverting on\n     * overflow (when the input is greater than largest uint32).\n     *\n     * Counterpart to Solidity's `uint32` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 32 bits\n     */\n    function toUint32(uint256 value) internal pure returns (uint32) {\n        if (value > type(uint32).max) {\n            revert SafeCastOverflowedUintDowncast(32, value);\n        }\n        return uint32(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint24 from uint256, reverting on\n     * overflow (when the input is greater than largest uint24).\n     *\n     * Counterpart to Solidity's `uint24` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 24 bits\n     */\n    function toUint24(uint256 value) internal pure returns (uint24) {\n        if (value > type(uint24).max) {\n            revert SafeCastOverflowedUintDowncast(24, value);\n        }\n        return uint24(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint16 from uint256, reverting on\n     * overflow (when the input is greater than largest uint16).\n     *\n     * Counterpart to Solidity's `uint16` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 16 bits\n     */\n    function toUint16(uint256 value) internal pure returns (uint16) {\n        if (value > type(uint16).max) {\n            revert SafeCastOverflowedUintDowncast(16, value);\n        }\n        return uint16(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint8 from uint256, reverting on\n     * overflow (when the input is greater than largest uint8).\n     *\n     * Counterpart to Solidity's `uint8` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 8 bits\n     */\n    function toUint8(uint256 value) internal pure returns (uint8) {\n        if (value > type(uint8).max) {\n            revert SafeCastOverflowedUintDowncast(8, value);\n        }\n        return uint8(value);\n    }\n\n    /**\n     * @dev Converts a signed int256 into an unsigned uint256.\n     *\n     * Requirements:\n     *\n     * - input must be greater than or equal to 0.\n     */\n    function toUint256(int256 value) internal pure returns (uint256) {\n        if (value < 0) {\n            revert SafeCastOverflowedIntToUint(value);\n        }\n        return uint256(value);\n    }\n\n    /**\n     * @dev Returns the downcasted int248 from int256, reverting on\n     * overflow (when the input is less than smallest int248 or\n     * greater than largest int248).\n     *\n     * Counterpart to Solidity's `int248` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 248 bits\n     */\n    function toInt248(int256 value) internal pure returns (int248 downcasted) {\n        downcasted = int248(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(248, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int240 from int256, reverting on\n     * overflow (when the input is less than smallest int240 or\n     * greater than largest int240).\n     *\n     * Counterpart to Solidity's `int240` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 240 bits\n     */\n    function toInt240(int256 value) internal pure returns (int240 downcasted) {\n        downcasted = int240(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(240, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int232 from int256, reverting on\n     * overflow (when the input is less than smallest int232 or\n     * greater than largest int232).\n     *\n     * Counterpart to Solidity's `int232` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 232 bits\n     */\n    function toInt232(int256 value) internal pure returns (int232 downcasted) {\n        downcasted = int232(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(232, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int224 from int256, reverting on\n     * overflow (when the input is less than smallest int224 or\n     * greater than largest int224).\n     *\n     * Counterpart to Solidity's `int224` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 224 bits\n     */\n    function toInt224(int256 value) internal pure returns (int224 downcasted) {\n        downcasted = int224(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(224, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int216 from int256, reverting on\n     * overflow (when the input is less than smallest int216 or\n     * greater than largest int216).\n     *\n     * Counterpart to Solidity's `int216` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 216 bits\n     */\n    function toInt216(int256 value) internal pure returns (int216 downcasted) {\n        downcasted = int216(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(216, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int208 from int256, reverting on\n     * overflow (when the input is less than smallest int208 or\n     * greater than largest int208).\n     *\n     * Counterpart to Solidity's `int208` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 208 bits\n     */\n    function toInt208(int256 value) internal pure returns (int208 downcasted) {\n        downcasted = int208(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(208, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int200 from int256, reverting on\n     * overflow (when the input is less than smallest int200 or\n     * greater than largest int200).\n     *\n     * Counterpart to Solidity's `int200` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 200 bits\n     */\n    function toInt200(int256 value) internal pure returns (int200 downcasted) {\n        downcasted = int200(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(200, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int192 from int256, reverting on\n     * overflow (when the input is less than smallest int192 or\n     * greater than largest int192).\n     *\n     * Counterpart to Solidity's `int192` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 192 bits\n     */\n    function toInt192(int256 value) internal pure returns (int192 downcasted) {\n        downcasted = int192(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(192, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int184 from int256, reverting on\n     * overflow (when the input is less than smallest int184 or\n     * greater than largest int184).\n     *\n     * Counterpart to Solidity's `int184` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 184 bits\n     */\n    function toInt184(int256 value) internal pure returns (int184 downcasted) {\n        downcasted = int184(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(184, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int176 from int256, reverting on\n     * overflow (when the input is less than smallest int176 or\n     * greater than largest int176).\n     *\n     * Counterpart to Solidity's `int176` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 176 bits\n     */\n    function toInt176(int256 value) internal pure returns (int176 downcasted) {\n        downcasted = int176(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(176, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int168 from int256, reverting on\n     * overflow (when the input is less than smallest int168 or\n     * greater than largest int168).\n     *\n     * Counterpart to Solidity's `int168` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 168 bits\n     */\n    function toInt168(int256 value) internal pure returns (int168 downcasted) {\n        downcasted = int168(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(168, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int160 from int256, reverting on\n     * overflow (when the input is less than smallest int160 or\n     * greater than largest int160).\n     *\n     * Counterpart to Solidity's `int160` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 160 bits\n     */\n    function toInt160(int256 value) internal pure returns (int160 downcasted) {\n        downcasted = int160(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(160, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int152 from int256, reverting on\n     * overflow (when the input is less than smallest int152 or\n     * greater than largest int152).\n     *\n     * Counterpart to Solidity's `int152` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 152 bits\n     */\n    function toInt152(int256 value) internal pure returns (int152 downcasted) {\n        downcasted = int152(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(152, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int144 from int256, reverting on\n     * overflow (when the input is less than smallest int144 or\n     * greater than largest int144).\n     *\n     * Counterpart to Solidity's `int144` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 144 bits\n     */\n    function toInt144(int256 value) internal pure returns (int144 downcasted) {\n        downcasted = int144(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(144, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int136 from int256, reverting on\n     * overflow (when the input is less than smallest int136 or\n     * greater than largest int136).\n     *\n     * Counterpart to Solidity's `int136` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 136 bits\n     */\n    function toInt136(int256 value) internal pure returns (int136 downcasted) {\n        downcasted = int136(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(136, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int128 from int256, reverting on\n     * overflow (when the input is less than smallest int128 or\n     * greater than largest int128).\n     *\n     * Counterpart to Solidity's `int128` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 128 bits\n     */\n    function toInt128(int256 value) internal pure returns (int128 downcasted) {\n        downcasted = int128(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(128, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int120 from int256, reverting on\n     * overflow (when the input is less than smallest int120 or\n     * greater than largest int120).\n     *\n     * Counterpart to Solidity's `int120` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 120 bits\n     */\n    function toInt120(int256 value) internal pure returns (int120 downcasted) {\n        downcasted = int120(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(120, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int112 from int256, reverting on\n     * overflow (when the input is less than smallest int112 or\n     * greater than largest int112).\n     *\n     * Counterpart to Solidity's `int112` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 112 bits\n     */\n    function toInt112(int256 value) internal pure returns (int112 downcasted) {\n        downcasted = int112(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(112, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int104 from int256, reverting on\n     * overflow (when the input is less than smallest int104 or\n     * greater than largest int104).\n     *\n     * Counterpart to Solidity's `int104` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 104 bits\n     */\n    function toInt104(int256 value) internal pure returns (int104 downcasted) {\n        downcasted = int104(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(104, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int96 from int256, reverting on\n     * overflow (when the input is less than smallest int96 or\n     * greater than largest int96).\n     *\n     * Counterpart to Solidity's `int96` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 96 bits\n     */\n    function toInt96(int256 value) internal pure returns (int96 downcasted) {\n        downcasted = int96(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(96, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int88 from int256, reverting on\n     * overflow (when the input is less than smallest int88 or\n     * greater than largest int88).\n     *\n     * Counterpart to Solidity's `int88` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 88 bits\n     */\n    function toInt88(int256 value) internal pure returns (int88 downcasted) {\n        downcasted = int88(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(88, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int80 from int256, reverting on\n     * overflow (when the input is less than smallest int80 or\n     * greater than largest int80).\n     *\n     * Counterpart to Solidity's `int80` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 80 bits\n     */\n    function toInt80(int256 value) internal pure returns (int80 downcasted) {\n        downcasted = int80(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(80, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int72 from int256, reverting on\n     * overflow (when the input is less than smallest int72 or\n     * greater than largest int72).\n     *\n     * Counterpart to Solidity's `int72` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 72 bits\n     */\n    function toInt72(int256 value) internal pure returns (int72 downcasted) {\n        downcasted = int72(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(72, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int64 from int256, reverting on\n     * overflow (when the input is less than smallest int64 or\n     * greater than largest int64).\n     *\n     * Counterpart to Solidity's `int64` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 64 bits\n     */\n    function toInt64(int256 value) internal pure returns (int64 downcasted) {\n        downcasted = int64(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(64, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int56 from int256, reverting on\n     * overflow (when the input is less than smallest int56 or\n     * greater than largest int56).\n     *\n     * Counterpart to Solidity's `int56` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 56 bits\n     */\n    function toInt56(int256 value) internal pure returns (int56 downcasted) {\n        downcasted = int56(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(56, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int48 from int256, reverting on\n     * overflow (when the input is less than smallest int48 or\n     * greater than largest int48).\n     *\n     * Counterpart to Solidity's `int48` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 48 bits\n     */\n    function toInt48(int256 value) internal pure returns (int48 downcasted) {\n        downcasted = int48(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(48, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int40 from int256, reverting on\n     * overflow (when the input is less than smallest int40 or\n     * greater than largest int40).\n     *\n     * Counterpart to Solidity's `int40` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 40 bits\n     */\n    function toInt40(int256 value) internal pure returns (int40 downcasted) {\n        downcasted = int40(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(40, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int32 from int256, reverting on\n     * overflow (when the input is less than smallest int32 or\n     * greater than largest int32).\n     *\n     * Counterpart to Solidity's `int32` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 32 bits\n     */\n    function toInt32(int256 value) internal pure returns (int32 downcasted) {\n        downcasted = int32(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(32, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int24 from int256, reverting on\n     * overflow (when the input is less than smallest int24 or\n     * greater than largest int24).\n     *\n     * Counterpart to Solidity's `int24` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 24 bits\n     */\n    function toInt24(int256 value) internal pure returns (int24 downcasted) {\n        downcasted = int24(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(24, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int16 from int256, reverting on\n     * overflow (when the input is less than smallest int16 or\n     * greater than largest int16).\n     *\n     * Counterpart to Solidity's `int16` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 16 bits\n     */\n    function toInt16(int256 value) internal pure returns (int16 downcasted) {\n        downcasted = int16(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(16, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int8 from int256, reverting on\n     * overflow (when the input is less than smallest int8 or\n     * greater than largest int8).\n     *\n     * Counterpart to Solidity's `int8` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 8 bits\n     */\n    function toInt8(int256 value) internal pure returns (int8 downcasted) {\n        downcasted = int8(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(8, value);\n        }\n    }\n\n    /**\n     * @dev Converts an unsigned uint256 into a signed int256.\n     *\n     * Requirements:\n     *\n     * - input must be less than or equal to maxInt256.\n     */\n    function toInt256(uint256 value) internal pure returns (int256) {\n        // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\n        if (value > uint256(type(int256).max)) {\n            revert SafeCastOverflowedUintToInt(value);\n        }\n        return int256(value);\n    }\n\n    /**\n     * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\n     */\n    function toUint(bool b) internal pure returns (uint256 u) {\n        assembly (\"memory-safe\") {\n            u := iszero(iszero(b))\n        }\n    }\n}\n"},"contracts/utils/MetricReentrancyGuardTransient.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\nimport {TransientSlot} from \"@openzeppelin/contracts/utils/TransientSlot.sol\";\n\n/// @title MetricReentrancyGuardTransient\n/// @notice Transient reentrancy guard recording the running action id (function-name hash), forked from OpenZeppelin ReentrancyGuardTransient.\n/// @dev Stores a non-zero uint256 while an action runs; any second guarded entry reverts.\nabstract contract MetricReentrancyGuardTransient {\n  bytes32 private constant REENTRANCY_GUARD_STORAGE =\n    keccak256(abi.encode(uint256(keccak256(\"metric.storage.ReentrancyGuard\")) - 1)) & ~bytes32(uint256(0xff));\n\n  /// @dev Unauthorized reentrant call or overlapping guarded action.\n  error ReentrancyGuardReentrantCall();\n\n  /// @dev `actionId` must be non-zero (see PoolActions); `getSellAndBuyPrices` shares the SWAP id.\n  modifier nonReentrant(uint256 actionId) {\n    _nonReentrantBefore(actionId);\n    _;\n    _nonReentrantAfter();\n  }\n\n  /// @dev Blocks view functions while any guarded action is active. Currently unused by the pool, so its views\n  ///      (e.g. `extsload`, `inSwap`) remain callable mid-action.\n  modifier nonReentrantView() {\n    _nonReentrantBeforeView();\n    _;\n  }\n\n  function _nonReentrantBeforeView() private view {\n    if (_currentAction() != 0) {\n      revert ReentrancyGuardReentrantCall();\n    }\n  }\n\n  function _nonReentrantBefore(uint256 actionId) private {\n    _nonReentrantBeforeView();\n    TransientSlot.tstore(TransientSlot.asUint256(_reentrancyGuardStorageSlot()), actionId);\n  }\n\n  function _nonReentrantAfter() internal {\n    TransientSlot.tstore(TransientSlot.asUint256(_reentrancyGuardStorageSlot()), 0);\n  }\n\n  /// @dev Returns the active action id, or 0 if no guarded function is on the call stack.\n  function _currentAction() internal view returns (uint256) {\n    return TransientSlot.tload(TransientSlot.asUint256(_reentrancyGuardStorageSlot()));\n  }\n\n  function _reentrancyGuardStorageSlot() internal pure virtual returns (bytes32) {\n    return REENTRANCY_GUARD_STORAGE;\n  }\n}\n"},"contracts/libraries/PoolActions.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\n/// @title PoolActions\n/// @notice Ids stored by the transient reentrancy guard while a MetricOmmPool action runs.\n/// @dev The guard is global, not per-id: any second guarded entry reverts whatever the id. The id only lets\n///      `inSwap` report which action is running.\nlibrary PoolActions {\n  uint256 internal constant ADD_LIQUIDITY = uint256(keccak256(\"addLiquidity\"));\n  uint256 internal constant REMOVE_LIQUIDITY = uint256(keccak256(\"removeLiquidity\"));\n  uint256 internal constant SWAP = uint256(keccak256(\"swap\")); // also guards `getSellAndBuyPrices`\n  uint256 internal constant SIMULATE_SWAP_AND_REVERT = uint256(keccak256(\"simulateSwapAndRevert\"));\n  uint256 internal constant COLLECT_FEES = uint256(keccak256(\"collectFees\"));\n  uint256 internal constant SET_POOL_FEES = uint256(keccak256(\"setPoolFees\"));\n  uint256 internal constant SET_BID_ASK_REF_ASYMMETRY_X8 = uint256(keccak256(\"setBidAskRefAsymmetryX8\"));\n  uint256 internal constant SET_BIN_ADDITIONAL_FEES = uint256(keccak256(\"setBinAdditionalFees\"));\n}\n"},"contracts/types/PoolOperation.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\n/// @notice Batched per-bin liquidity add or remove payload (parallel arrays).\n/// @param binIdxs Bin indices to modify.\n/// @param shares Shares to add or remove per corresponding bin index.\nstruct LiquidityDelta {\n  int256[] binIdxs;\n  uint256[] shares;\n}\n\n/// @notice Per-bin balance change used in liquidity events.\n/// @dev `delta0Scaled` and `delta1Scaled` are scaled token balances inside bins (not raw ERC20 amounts).\n///      Positive means net token entered the bin; negative means net token left the bin.\n/// @param delta0Scaled Net change in the bin scaled token0 balance.\n/// @param delta1Scaled Net change in the bin scaled token1 balance.\nstruct BinBalanceDelta {\n  int256 delta0Scaled;\n  int256 delta1Scaled;\n}\n"},"contracts/types/Packed.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\n/// @notice Two `uint128` values in one word: `high` in the top 128 bits, `low` in the bottom.\n/// @dev Used to keep event payloads to a single word where two quantities always travel together.\n///      What `high` and `low` mean is documented at each use site, not here.\n///      `pack` takes `uint128` halves so narrowing -- and the choice of a checked or unchecked cast --\n///      is the caller's, made visibly at the call site.\ntype Packed2Uint128 is uint256;\n\nusing Packed2Uint128Lib for Packed2Uint128 global;\n\n/// @dev Implemented in assembly. Inline assembly reads the raw stack slot, which Solidity does not\n///      guarantee to be free of dirty high-order bits, so every half is masked to 128 bits before use.\n///      The low-half masks are load-bearing (see `test/Packed.t.sol`); the high-half mask is redundant under\n///      `shl(128, ...)`, which already discards any bits above 128.\nlibrary Packed2Uint128Lib {\n  uint256 private constant MASK = 0xffffffffffffffffffffffffffffffff;\n\n  function pack(uint128 high_, uint128 low_) internal pure returns (Packed2Uint128 packed) {\n    assembly (\"memory-safe\") {\n      packed := or(shl(128, and(high_, MASK)), and(low_, MASK))\n    }\n  }\n\n  /// @notice Add to BOTH halves at once.\n  /// @dev One word, one ADD -- valid because a running total can never reach 2^128 and so cannot carry\n  ///      out of the low half into the high one. Callers relying on this must keep both halves bounded.\n  function addBoth(Packed2Uint128 acc, uint128 high_, uint128 low_) internal pure returns (Packed2Uint128 packed) {\n    assembly (\"memory-safe\") {\n      packed := add(acc, or(shl(128, and(high_, MASK)), and(low_, MASK)))\n    }\n  }\n\n  function high(Packed2Uint128 packed) internal pure returns (uint256 value) {\n    assembly (\"memory-safe\") {\n      value := shr(128, packed)\n    }\n  }\n\n  function low(Packed2Uint128 packed) internal pure returns (uint256 value) {\n    assembly (\"memory-safe\") {\n      value := and(packed, MASK)\n    }\n  }\n\n  function sum(Packed2Uint128 packed) internal pure returns (uint256 value) {\n    assembly (\"memory-safe\") {\n      value := add(shr(128, packed), and(packed, MASK))\n    }\n  }\n}\n\n/// @notice Two `int128` values in one word: `high` in the top 128 bits, `low` in the bottom.\n/// @dev Two's-complement halves. Same contract as `Packed2Uint128`: meaning is documented at the use\n///      site, and `pack` takes `int128` halves so the narrowing happens visibly in the caller.\ntype Packed2Int128 is uint256;\n\nusing Packed2Int128Lib for Packed2Int128 global;\n\n/// @dev Implemented in assembly. The `low_` mask in `pack` is ESSENTIAL, not defensive: a negative\n///      `int128` is sign-extended on the stack, so without it the all-ones upper half would be OR'd\n///      straight over `high_` and destroy it. Reading back uses `SIGNEXTEND`, which is exactly the\n///      `int256(int128(uint128(...)))` cast chain in one opcode.\nlibrary Packed2Int128Lib {\n  uint256 private constant MASK = 0xffffffffffffffffffffffffffffffff;\n  /// @dev Byte index for `SIGNEXTEND` on a 16-byte (128-bit) value.\n  uint256 private constant SIGN_BYTE = 15;\n\n  function pack(int128 high_, int128 low_) internal pure returns (Packed2Int128 packed) {\n    assembly (\"memory-safe\") {\n      packed := or(shl(128, and(high_, MASK)), and(low_, MASK))\n    }\n  }\n\n  function high(Packed2Int128 packed) internal pure returns (int256 value) {\n    assembly (\"memory-safe\") {\n      value := signextend(SIGN_BYTE, shr(128, packed))\n    }\n  }\n\n  function low(Packed2Int128 packed) internal pure returns (int256 value) {\n    assembly (\"memory-safe\") {\n      value := signextend(SIGN_BYTE, packed)\n    }\n  }\n}\n\n/// @notice A swap's mode flag and resulting bin position in one word.\n/// @dev Purpose-built (unlike the two generic pairs above) because the three fields are heterogeneous\n///      and always travel together on `Swap`. Layout, low bits first:\n///\n///        bits   0..103 : posInBin   (uint104)\n///        bits 104..119 : binIdx     (int16, two's complement)\n///        bit       120 : exactInput (1 = the caller specified an exact input)\n///\n///      121 bits total, so the three fit one word with room to spare and cost one log word instead of\n///      three. `binIdx` is signed, so reads sign-extend it -- see `test/Packed.t.sol`.\n///\n///      Each field is exactly as wide as its parameter, so nothing a caller can construct is ever\n///      truncated.\ntype PackedSwapDetails is uint256;\n\nusing PackedSwapDetailsLib for PackedSwapDetails global;\n\nlibrary PackedSwapDetailsLib {\n  uint256 private constant POS_MASK = 0xffffffffffffffffffffffffff;\n  uint256 private constant BIN_IDX_MASK = 0xffff;\n  uint256 private constant BIN_IDX_SHIFT = 104;\n  uint256 private constant EXACT_INPUT_SHIFT = 120;\n  /// @dev Byte index for `SIGNEXTEND` on a 2-byte (16-bit) value.\n  uint256 private constant SIGN_BYTE = 1;\n\n  /// @dev The `binIdx_` mask is load-bearing: a negative index is sign-extended and would otherwise\n  ///      smear over the flag, which `test/Packed.t.sol` pins.\n  ///\n  ///      Mask `posInBin_` as well: inline assembly cannot assume narrow Solidity values have clean\n  ///      high-order bits. Only the declared 104-bit position belongs in the packed word.\n  function pack(bool exactInput_, int16 binIdx_, uint104 posInBin_) internal pure returns (PackedSwapDetails packed) {\n    assembly (\"memory-safe\") {\n      packed := or(\n        or(shl(EXACT_INPUT_SHIFT, and(exactInput_, 1)), shl(BIN_IDX_SHIFT, and(binIdx_, BIN_IDX_MASK))),\n        and(posInBin_, POS_MASK)\n      )\n    }\n  }\n\n  /// @notice Whether `amountSpecified` was treated as an exact input.\n  function exactInput(PackedSwapDetails packed) internal pure returns (bool value) {\n    assembly (\"memory-safe\") {\n      value := and(shr(EXACT_INPUT_SHIFT, packed), 1)\n    }\n  }\n\n  /// @notice Active bin index after the swap. Signed, so this sign-extends.\n  function binIdx(PackedSwapDetails packed) internal pure returns (int256 value) {\n    assembly (\"memory-safe\") {\n      value := signextend(SIGN_BYTE, shr(BIN_IDX_SHIFT, packed))\n    }\n  }\n\n  /// @notice Position within `binIdx` after the swap.\n  function posInBin(PackedSwapDetails packed) internal pure returns (uint256 value) {\n    assembly (\"memory-safe\") {\n      value := and(packed, POS_MASK)\n    }\n  }\n}\n"},"contracts/types/PoolStorage.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\n/// @notice Packed bin-level totals occupying a single storage slot.\n/// @dev Layout must stay `uint128, uint128` so the slot packing matches `PoolStateLibrary` EXTSLOAD decoding.\n/// @param scaledToken0 Sum of `token0BalanceScaled` across all bins.\n/// @param scaledToken1 Sum of `token1BalanceScaled` across all bins.\nstruct BinTotals {\n  uint128 scaledToken0;\n  uint128 scaledToken1;\n}\n\n/// @notice State of a single bin in the OMM pool\n/// @param token0BalanceScaled Current token0 in bin (in internal scaled units)\n/// @param token1BalanceScaled Current token1 in bin (in internal scaled units)\n/// @param lengthE6 Width of the bin in price distance from the reference price; 1e6 = 100% of the reference price\n/// @param addFeeBuyE6 Additional fee for buying token0; 1e6 = 100%\n/// @param addFeeSellE6 Additional fee for buying token1; 1e6 = 100%\nstruct BinState {\n  uint104 token0BalanceScaled;\n  uint104 token1BalanceScaled;\n  uint16 lengthE6;\n  uint16 addFeeBuyE6;\n  uint16 addFeeSellE6;\n}\n"},"contracts/libraries/SwapMath.sol":{"content":"// SPDX-License-Identifier: BUSL-1.1\npragma solidity ^0.8.35;\n\nimport {Math} from \"@openzeppelin/contracts/utils/math/Math.sol\";\nimport {SafeCast} from \"@openzeppelin/contracts/utils/math/SafeCast.sol\";\nimport {IMetricOmmPoolActions} from \"../interfaces/IMetricOmmPool/IMetricOmmPoolActions.sol\";\nimport {BinState} from \"../types/PoolStorage.sol\";\n\nuint256 constant ONE_X64 = 0x10000000000000000;\nuint256 constant ONE_X128 = 0x100000000000000000000000000000000;\n/// @dev Maximum discrete bin position (`type(uint104).max`); use as uint256 for arithmetic.\nuint256 constant MAX_POS_BIN = type(uint104).max;\n\n/**\n * @title SwapMath\n * @notice Library for pure swap calculation functions\n * @dev Functions do not access storage; in-bin swaps mutate the caller's memory `BinState` and `SwapState`.\n *      Incoming-leg bin balance writes revert with `OverflowedOnFittingBinBalances` when they would exceed\n *      `type(uint104).max` (instead of a generic SafeCast error).\n *      Callers must advance `SwapState` fields conservatively: keep per-iteration deltas within the bounds\n *      documented on each field so widened sums stay representable where the pool persists them.\n */\nlibrary SwapMath {\n  using SafeCast for uint256;\n  using SafeCast for int256;\n\n  /// @dev Cast an incoming-side bin balance to `uint104`, or revert with a defined pool error.\n  function _toUint104IncomingBinBalance(uint256 value) private pure returns (uint104) {\n    if (value > type(uint104).max) {\n      revert IMetricOmmPoolActions.OverflowedOnFittingBinBalances(value);\n    }\n    // forge-lint: disable-next-line(unsafe-typecast) -- guarded by the check above.\n    return uint104(value);\n  }\n\n  // ============ Type Definitions ============\n\n  /// @notice State tracked during a swap operation\n  /// @param amountSpecifiedRemainingScaled Remaining amount to swap (scaled to internal decimals). Assumes <= type(uint128).max.\n  /// @param amountCalculatedScaled Accumulated output/input amount (scaled to internal decimals). Assumes <= type(uint128).max.\n  /// @dev Orchestrators should treat both as running totals whose growth per bin step is bounded by the\n  ///      bin liquidity and swap amount; the pool assumes intermediate values fit `uint128` (the width of `binTotals`).\n  struct SwapState {\n    uint256 amountSpecifiedRemainingScaled;\n    uint256 amountCalculatedScaled;\n  }\n\n  // ============ Price and Position Helpers ============\n\n  /// @notice Invert a price in Q64.64 format.\n  function invertPriceX64(uint256 priceX64) internal pure returns (uint256) {\n    return Math.ceilDiv(ONE_X128, priceX64);\n  }\n\n  /// @notice Arithmetic mean of two values, rounded up.\n  /// @dev Requires `a + b + 1` to fit uint256; the addition is unchecked.\n  function calculateArithmeticMean(uint256 a, uint256 b) internal pure returns (uint256) {\n    unchecked {\n      return (a + b + 1) / 2;\n    }\n  }\n\n  /// @notice Base fee in Q64.64 when buying token0 (1-for-0 swap): ask vs reference spread.\n  function buyBaseFeeX64FromAskAndReference(uint256 askPriceX64, uint256 referencePriceX64)\n    internal\n    pure\n    returns (uint256 baseFeeX64)\n  {\n    baseFeeX64 = Math.mulDiv(askPriceX64, ONE_X64, referencePriceX64, Math.Rounding.Ceil) - ONE_X64;\n  }\n\n  /// @notice Base fee in Q64.64 when selling token0 (0-for-1 swap): reference vs bid spread.\n  /// @dev `reference/bid - 1` (not `1 - bid/reference`): `FeeMath.effectivePriceX64` divides sell prices by\n  ///      `1 + totalFee` (base plus any per-bin and notional fee), which scales the token0 input by the same factor,\n  ///      so this ratio is what makes the base fee alone land the realized price on `bid` at the reference price, up\n  ///      to rounding (mirrors how `ask/reference - 1` lands on `ask` for buys, where the price is multiplied instead).\n  function sellBaseFeeX64FromBidAndReference(uint256 bidPriceX64, uint256 referencePriceX64)\n    internal\n    pure\n    returns (uint256 baseFeeX64)\n  {\n    baseFeeX64 = Math.mulDiv(referencePriceX64, ONE_X64, bidPriceX64, Math.Rounding.Ceil) - ONE_X64;\n  }\n\n  /**\n   * @notice Both base fee legs in Q64.64 from bid/ask + reference.\n   * @dev Fee-only helper for `getSellAndBuyPrices`; the reference price itself is used as the mid/anchor price.\n   */\n  function buySellBaseFeesX64FromBidAskAndReference(uint256 bidPriceX64, uint256 askPriceX64, uint256 referencePriceX64)\n    internal\n    pure\n    returns (uint256 baseBuyFeeX64, uint256 baseSellFeeX64)\n  {\n    baseBuyFeeX64 = buyBaseFeeX64FromAskAndReference(askPriceX64, referencePriceX64);\n    baseSellFeeX64 = sellBaseFeeX64FromBidAndReference(bidPriceX64, referencePriceX64);\n  }\n\n  /**\n   * @notice Calculate price at a specific position within a bin\n   * @param lowerPriceX64 Price at the lower bound of the bin.\n   * @param upperPriceX64 Price at the upper bound of the bin.\n   * @param position Current position along the bin segment (uint256; must be ≤ `MAX_POS_BIN` or the subtraction reverts).\n   * @param rounding Rounding mode for interpolation.\n   * @return priceX64 Interpolated price at the given position.\n   */\n  function calculatePriceAtBinPosition(\n    uint256 lowerPriceX64,\n    uint256 upperPriceX64,\n    uint256 position,\n    Math.Rounding rounding\n  ) internal pure returns (uint256 priceX64) {\n    uint256 maxSubCurrPos = MAX_POS_BIN - position;\n    unchecked {\n      if (rounding == Math.Rounding.Floor) {\n        priceX64 = (lowerPriceX64 * maxSubCurrPos + upperPriceX64 * position) / MAX_POS_BIN;\n      } else {\n        priceX64 = Math.ceilDiv(lowerPriceX64 * maxSubCurrPos + upperPriceX64 * position, MAX_POS_BIN);\n      }\n    }\n  }\n\n  /**\n   * @notice Calculate finalBinPos position limited by price\n   * @param lowerPriceX64 Price at lower bound (typically EFFECTIVE / fee-inclusive).\n   * @param upperPriceX64 Price at upper bound (typically EFFECTIVE / fee-inclusive).\n   * @param priceX64 Price limit along the same encoding as the bounds (a maximum for buys, a minimum for sells). Assumes lowerPriceX64 < upperPriceX64 and priceX64 >= lowerPriceX64.\n   * @param rounding Rounding mode used for inverse interpolation.\n   * @return result Bin position where price limit is reached. Result <= MAX_POS_BIN when priceX64 <= upperPriceX64;\n   *         `buyToken1InBinSpecifiedIn` may pass a limit above the bin, in which case the result exceeds MAX_POS_BIN\n   *         and the caller returns early (no overflow: (2^128 * 2^104) fits in 256 bits).\n   */\n  function calculateBinPositionAtPrice(\n    uint256 lowerPriceX64,\n    uint256 upperPriceX64,\n    uint256 priceX64,\n    Math.Rounding rounding\n  ) internal pure returns (uint256) {\n    unchecked {\n      // Result ≤ MAX_POS_BIN when priceX64 ∈ [lower, upper]; larger (but no overflow) when priceX64 > upper.\n      if (rounding == Math.Rounding.Floor) {\n        return ((priceX64 - lowerPriceX64) * MAX_POS_BIN) / (upperPriceX64 - lowerPriceX64);\n      } else {\n        return Math.ceilDiv((priceX64 - lowerPriceX64) * MAX_POS_BIN, upperPriceX64 - lowerPriceX64);\n      }\n    }\n  }\n\n  /**\n   * @notice Calculate finalBinPos position to achieve desired token0 output\n   * @param currBinPos Current position in bin (uint104).\n   * @param tradedAmount0 Desired token0 output amount. Assumes <= availableToken0.\n   * @param availableToken0 Available token0 in bin. Assumes <= MAX_POS_BIN and > 0.\n   * @return finalBinPos Position after consuming tradedAmount0. Result <= MAX_POS_BIN.\n   */\n  function calculateBinPositionAfterSellingAmount0(uint256 currBinPos, uint256 tradedAmount0, uint256 availableToken0)\n    internal\n    pure\n    returns (uint256 finalBinPos)\n  {\n    unchecked {\n      // Product ≤ 2^104 × 2^104 = 2^208 < 2^256. Quotient ≤ max − currBinPos,\n      // so currBinPos + quotient ≤ MAX_POS_BIN.\n      return currBinPos + (((MAX_POS_BIN - currBinPos) * tradedAmount0) / availableToken0);\n    }\n  }\n\n  /**\n   * @notice Calculate finalBinPos position to achieve desired token1 output\n   * @param currBinPos Current position in bin (uint104).\n   * @param tradedAmount1 Desired token1 output amount. Assumes <= availableToken1.\n   * @param availableToken1 Available token1 in bin. Assumes <= MAX_POS_BIN and > 0.\n   * @return finalBinPos Position after consuming tradedAmount1.\n   */\n  function calculateBinPositionAfterSellingAmount1(uint256 currBinPos, uint256 tradedAmount1, uint256 availableToken1)\n    internal\n    pure\n    returns (uint256 finalBinPos)\n  {\n    unchecked {\n      // Product ≤ 2^104 × 2^104 = 2^208 < 2^256. Quotient ≤ currBinPos ≤ MAX_POS_BIN.\n      return Math.ceilDiv(currBinPos * (availableToken1 - tradedAmount1), availableToken1);\n    }\n  }\n\n  /**\n   * @notice Calculate output token1 amount from position movement\n   * @param availableToken1 Available token1 in bin. Assumes <= MAX_POS_BIN.\n   * @param currBinPos Start position (uint104). Assumes > 0.\n   * @param finalBinPos End position (uint104). Assumes <= currBinPos.\n   * @return outToken1 Amount of token1 to output (rounds down). Result <= MAX_POS_BIN.\n   */\n  function calculateOutputToken1FromBinPosition(uint256 availableToken1, uint256 currBinPos, uint256 finalBinPos)\n    internal\n    pure\n    returns (uint256 outToken1)\n  {\n    unchecked {\n      // Product ≤ 2^104 × 2^104 = 2^208. Quotient ≤ availableToken1 ≤ MAX_POS_BIN.\n      outToken1 = (availableToken1 * uint256(currBinPos - finalBinPos)) / currBinPos;\n    }\n  }\n\n  /**\n   * @notice Calculate output token0 amount from position movement\n   * @param availableToken0 Available token0 in bin. Assumes <= MAX_POS_BIN.\n   * @param currBinPos Start position (uint104). Assumes < MAX_POS_BIN.\n   * @param finalBinPos End position (uint104). Assumes >= currBinPos.\n   * @return outToken0 Amount of token0 to output (rounds down). Result <= MAX_POS_BIN.\n   */\n  function calculateOutputToken0FromBinPosition(uint256 availableToken0, uint256 currBinPos, uint256 finalBinPos)\n    internal\n    pure\n    returns (uint256 outToken0)\n  {\n    unchecked {\n      // Product ≤ 2^104 × 2^104 = 2^208. Quotient ≤ availableToken0 ≤ MAX_POS_BIN.\n      outToken0 = (availableToken0 * (finalBinPos - currBinPos)) / (MAX_POS_BIN - currBinPos);\n    }\n  }\n\n  // ============ Token Conversion Helpers ============\n\n  /**\n   * @notice Calculates the required token1 input for a given amount of token0 output\n   * @param token0Out Amount of token0 output. Assumes <= type(uint128).max.\n   * @param startingPriceX64 Starting price of token0 in token1 (Q64.64).\n   * @param finalPriceX64 Final price of token0 in token1 (Q64.64).\n   * @return requiredToken1In Token1 input in internal decimals. Not bounded here; an oversized result reverts downstream in `_toUint104IncomingBinBalance`.\n   */\n  function calculateRequiredToken1(uint256 token0Out, uint256 startingPriceX64, uint256 finalPriceX64)\n    internal\n    pure\n    returns (uint256 requiredToken1In)\n  {\n    uint256 startingCost = Math.mulDiv(token0Out, startingPriceX64, ONE_X64, Math.Rounding.Ceil);\n    uint256 finalCost = Math.mulDiv(token0Out, finalPriceX64, ONE_X64, Math.Rounding.Ceil);\n    requiredToken1In = calculateArithmeticMean(startingCost, finalCost);\n  }\n\n  /**\n   * @notice Calculates the required token0 input for a given amount of token1 output\n   * @param token1Out Amount of token1 output. Assumes <= type(uint128).max.\n   * @param startingPriceX64 Starting price of token0 in token1 (Q64.64). Must be > 0.\n   * @param finalPriceX64 Final price of token0 in token1 (Q64.64). Must be > 0.\n   * @return requiredToken0In Token0 input in internal decimals. Not bounded here; an oversized result reverts downstream in `_toUint104IncomingBinBalance`.\n   */\n  function calculateRequiredToken0(uint256 token1Out, uint256 startingPriceX64, uint256 finalPriceX64)\n    internal\n    pure\n    returns (uint256 requiredToken0In)\n  {\n    uint256 startingCost = Math.mulDiv(token1Out, ONE_X64, startingPriceX64, Math.Rounding.Ceil);\n    uint256 finalCost = Math.mulDiv(token1Out, ONE_X64, finalPriceX64, Math.Rounding.Ceil);\n    return calculateArithmeticMean(startingCost, finalCost);\n  }\n\n  // ============ Analytical Target Position Helpers ============\n\n  /**\n   * @notice Compute target bin position using analytical closed-form solution for selling specified amount of token1\n   * @dev Solves the quadratic equation: A×d + B×d² = target\n   *      d = 2 * target / (A + sqrt(A² + 4B×target)) = 2Q / (1 + sqrt(1 + 4rQ))\n   *      where:\n   *        r = B/A and Q = target / A\n   *        A = T0 × Pc / [(M-c) × 2^64], with Pc the effective (fee-inclusive) price at c\n   *        B = ΔP / (2M × Pc) × A\n   * @param currBinPos Current position in bin. Assumes <= MAX_POS_BIN.\n   * @param maxFinalBinPos Maximum achievable final position. Assumes currBinPos < maxFinalBinPos <= MAX_POS_BIN.\n   * @param inputAmount Amount of token1 input to spend. Assumes <= type(uint128).max.\n   * @param token0Balance Available token0 in bin. Assumes <= MAX_POS_BIN.\n   * @param lowerPriceX64 Lower price bound of bin. Assumes <= 2*type(uint128).max.\n   * @param upperPriceX64 Upper price bound of bin. Assumes lowerPriceX64 < upperPriceX64 <= 2*type(uint128).max.\n   * @dev `lowerPriceX64`/`upperPriceX64` are EFFECTIVE (fee-inclusive) prices, so no fee term appears here.\n   * @return targetPos Computed target position. Result satisfies currBinPos < targetPos <= maxFinalBinPos.\n   */\n  function computeAnalyticalTargetPosForBuyToken0(\n    uint256 currBinPos,\n    uint256 maxFinalBinPos,\n    uint256 inputAmount,\n    uint256 token0Balance,\n    uint256 lowerPriceX64,\n    uint256 upperPriceX64\n  ) internal pure returns (uint256 targetPos) {\n    uint256 maxSubCurrPos = MAX_POS_BIN - currBinPos;\n    uint256 deltaPriceX64 = upperPriceX64 - lowerPriceX64;\n    uint256 priceAtCurrPosX64 = lowerPriceX64 + (deltaPriceX64 * currBinPos) / MAX_POS_BIN;\n\n    uint256 deltaPos = 0;\n    if (token0Balance > 0 && priceAtCurrPosX64 > 0 && maxSubCurrPos > 0) {\n      uint256 aX128 = Math.mulDiv(token0Balance, priceAtCurrPosX64 << 64, maxSubCurrPos);\n\n      if (aX128 > 0) {\n        uint256 qX128 = Math.mulDiv(inputAmount << 128, 1 << 128, aX128);\n\n        // Apply quadratic correction\n        // Exact solution: d = 2Q / (1 + sqrt(1 + 4rQ))\n        // where r = B/A = ΔP / (2M × Pc)\n        {\n          // rQx128 = ΔP × qX128 / (2M × Pc) = rQ × 2^128\n          uint256 rQx128 = Math.mulDiv(deltaPriceX64, qX128, 2 * MAX_POS_BIN * priceAtCurrPosX64);\n\n          // Exact quadratic solution: d = 2Q / (1 + sqrt(1 + 4rQ))\n          uint256 sqrtArgX128 = (1 << 128) + 4 * rQx128;\n          uint256 sqrtValX64 = Math.sqrt(sqrtArgX128);\n          deltaPos = (2 * qX128) / ((1 << 128) + (sqrtValX64 << 64));\n        }\n      }\n    }\n\n    // Minimum forward progress when the closed form rounds to zero but input is non-zero.\n    if (deltaPos == 0 && inputAmount > 0) deltaPos = 1;\n\n    if (deltaPos > maxSubCurrPos) deltaPos = maxSubCurrPos;\n    targetPos = (currBinPos + deltaPos > maxFinalBinPos) ? maxFinalBinPos : currBinPos + deltaPos;\n    // Ensure we move at least one step toward `maxFinalBinPos` when the grid still allows it.\n    if (targetPos <= currBinPos) targetPos = currBinPos + (currBinPos < maxFinalBinPos ? 1 : 0);\n  }\n\n  /**\n   * @notice Compute target bin position using analytical closed-form solution for selling specified amount of token0\n   * @dev Use the same analytical closed-form solution as for buying token0, but invert the price and mirror bin positions.\n   * @param currBinPos Current position in bin. Assumes <= MAX_POS_BIN.\n   * @param minFinalBinPos Minimum achievable final position. Assumes minFinalBinPos < currBinPos.\n   * @param inputAmount Amount of token0 input to spend. Assumes <= type(uint128).max.\n   * @param token1Balance Available token1 in bin. Assumes <= MAX_POS_BIN.\n   * @param lowerPriceX64 Lower price bound of bin. Assumes <= 2*type(uint128).max.\n   * @param upperPriceX64 Upper price bound of bin. Assumes lowerPriceX64 < upperPriceX64 <= 2*type(uint128).max.\n   * @dev `lowerPriceX64`/`upperPriceX64` are EFFECTIVE (fee-inclusive) prices, so no fee term appears here.\n   * @return targetPos Computed target position. Result satisfies minFinalBinPos <= targetPos < currBinPos.\n   */\n  function computeAnalyticalTargetPosForSellToken0(\n    uint256 currBinPos,\n    uint256 minFinalBinPos,\n    uint256 inputAmount,\n    uint256 token1Balance,\n    uint256 lowerPriceX64,\n    uint256 upperPriceX64\n  ) internal pure returns (uint256 targetPos) {\n    uint256 mirroredTargetPos = computeAnalyticalTargetPosForBuyToken0(\n      MAX_POS_BIN - currBinPos,\n      MAX_POS_BIN - minFinalBinPos,\n      inputAmount,\n      token1Balance,\n      invertPriceX64(upperPriceX64),\n      invertPriceX64(lowerPriceX64)\n    );\n    return MAX_POS_BIN - mirroredTargetPos;\n  }\n\n  // ============ Swap In Bin Functions - Exact Output ============\n\n  /**\n   * @notice Calculate swap amounts for a single bin iteration (token1 → token0, exact output)\n   * @dev `lowerEffPriceX64`/`upperEffPriceX64` are EFFECTIVE prices, so `priceLimitX64` is compared against them\n   *      directly and therefore bounds the price the trader actually realizes.\n   * @param binState Current bin state\n   * @param currBinPos Current position in bin (uint104).\n   * @param state Current swap state\n   * @param totalFeeOfGrossX64 Whole carved fee as a fraction of the gross input, Q64.64 (`FeeMath.totalFeeOfGrossX64`).\n   * @param platformShareOfFeeX64 Platform share of the carved fee, Q64.64 (`FeeMath.platformPartOfTotalFeeX64`).\n   * @param lowerEffPriceX64 Effective lower bound price of bin (Q64.64). Assumes <= type(uint128).max.\n   * @param upperEffPriceX64 Effective upper bound price of bin. Assumes lowerEffPriceX64 < upperEffPriceX64 <= type(uint128).max.\n   * @param priceLimitX64 Price limit for the swap. Assumes <= type(uint128).max.\n   * @return finalBinPos End position in bin.\n   * @return binDelta0Scaled Change in the BIN's scaled token0 balance (negative = token0 left the bin).\n   * @return binDelta1Scaled Change in the BIN's scaled token1 balance (positive = token1 entered the bin, net of the platform take).\n   * @return platformFeeScaled Combined platform take withheld from the input (never enters the bin).\n   * @return lpFeeScaled LP leg of the carved fee for this step; stays in the bin.\n   */\n  function buyToken0InBinSpecifiedOut(\n    BinState memory binState,\n    uint256 currBinPos,\n    SwapState memory state,\n    uint256 totalFeeOfGrossX64,\n    uint256 platformShareOfFeeX64,\n    uint256 lowerEffPriceX64,\n    uint256 upperEffPriceX64,\n    uint256 priceLimitX64\n  )\n    internal\n    pure\n    returns (\n      uint256 finalBinPos,\n      int256 binDelta0Scaled,\n      int256 binDelta1Scaled,\n      uint256 platformFeeScaled,\n      uint256 lpFeeScaled\n    )\n  {\n    unchecked {\n      uint256 amountOutScaled = 0;\n\n      if (state.amountSpecifiedRemainingScaled < binState.token0BalanceScaled) {\n        finalBinPos = calculateBinPositionAfterSellingAmount0(\n          currBinPos, state.amountSpecifiedRemainingScaled, binState.token0BalanceScaled\n        );\n        amountOutScaled = state.amountSpecifiedRemainingScaled;\n      } else {\n        finalBinPos = MAX_POS_BIN;\n        amountOutScaled = binState.token0BalanceScaled;\n      }\n\n      if (priceLimitX64 < upperEffPriceX64) {\n        if (priceLimitX64 <= lowerEffPriceX64) return (currBinPos, 0, 0, 0, 0);\n\n        uint256 finalBinPosAtPriceLimit =\n          calculateBinPositionAtPrice(lowerEffPriceX64, upperEffPriceX64, priceLimitX64, Math.Rounding.Floor);\n        if (finalBinPosAtPriceLimit <= currBinPos) return (currBinPos, 0, 0, 0, 0);\n\n        if (finalBinPosAtPriceLimit < finalBinPos) {\n          finalBinPos = finalBinPosAtPriceLimit;\n          uint256 amountOutHelper =\n            calculateOutputToken0FromBinPosition(binState.token0BalanceScaled, currBinPos, finalBinPos);\n          amountOutScaled = amountOutHelper < amountOutScaled ? amountOutHelper : amountOutScaled;\n        }\n      }\n\n      if (amountOutScaled == 0) {\n        finalBinPos = currBinPos;\n        return (finalBinPos, 0, 0, 0, 0);\n      }\n\n      uint256 startingPriceX64 =\n        calculatePriceAtBinPosition(lowerEffPriceX64, upperEffPriceX64, currBinPos, Math.Rounding.Ceil);\n      uint256 finalPriceX64 =\n        calculatePriceAtBinPosition(lowerEffPriceX64, upperEffPriceX64, finalBinPos, Math.Rounding.Ceil);\n\n      uint256 amountInScaled = calculateRequiredToken1(amountOutScaled, startingPriceX64, finalPriceX64);\n\n      uint256 totalFeeScaled = (amountInScaled * totalFeeOfGrossX64) / ONE_X64;\n      platformFeeScaled = totalFeeScaled * platformShareOfFeeX64 / ONE_X64;\n      lpFeeScaled = totalFeeScaled - platformFeeScaled;\n      uint256 binCreditScaled = amountInScaled - platformFeeScaled;\n\n      binState.token0BalanceScaled -= amountOutScaled.toUint104();\n      binState.token1BalanceScaled =\n        _toUint104IncomingBinBalance(uint256(binState.token1BalanceScaled) + binCreditScaled);\n\n      state.amountSpecifiedRemainingScaled -= amountOutScaled;\n      state.amountCalculatedScaled += amountInScaled;\n\n      binDelta0Scaled = -amountOutScaled.toInt256();\n      binDelta1Scaled = binCreditScaled.toInt256();\n    }\n  }\n\n  /**\n   * @notice Calculate swap amounts for a single bin iteration (token0 → token1, exact output)\n   * @dev `lowerEffPriceX64`/`upperEffPriceX64` are EFFECTIVE prices; see `buyToken0InBinSpecifiedOut`.\n   * @param binState Current bin state\n   * @param currBinPos Current position in bin (uint104).\n   * @param state Current swap state\n   * @param totalFeeOfGrossX64 Whole carved fee as a fraction of the gross input, Q64.64 (`FeeMath.totalFeeOfGrossX64`).\n   * @param platformShareOfFeeX64 Platform share of the carved fee, Q64.64 (`FeeMath.platformPartOfTotalFeeX64`).\n   * @param lowerEffPriceX64 Effective lower bound price of bin (Q64.64). Assumes <= type(uint128).max.\n   * @param upperEffPriceX64 Effective upper bound price of bin. Assumes lowerEffPriceX64 < upperEffPriceX64 <= type(uint128).max.\n   * @param priceLimitX64 Price limit for the swap. Assumes <= type(uint128).max.\n   * @return finalBinPos End position in bin. Result <= MAX_POS_BIN.\n   * @return binDelta0Scaled Change in the BIN's scaled token0 balance (positive = token0 entered the bin, net of the platform take).\n   * @return binDelta1Scaled Change in the BIN's scaled token1 balance (negative = token1 left the bin).\n   * @return platformFeeScaled Combined platform take withheld from the input (never enters the bin).\n   * @return lpFeeScaled LP leg of the carved fee for this step; stays in the bin.\n   */\n  function buyToken1InBinSpecifiedOut(\n    BinState memory binState,\n    uint256 currBinPos,\n    SwapState memory state,\n    uint256 totalFeeOfGrossX64,\n    uint256 platformShareOfFeeX64,\n    uint256 lowerEffPriceX64,\n    uint256 upperEffPriceX64,\n    uint256 priceLimitX64\n  )\n    internal\n    pure\n    returns (\n      uint256 finalBinPos,\n      int256 binDelta0Scaled,\n      int256 binDelta1Scaled,\n      uint256 platformFeeScaled,\n      uint256 lpFeeScaled\n    )\n  {\n    unchecked {\n      uint256 amountOutScaled = 0;\n\n      if (state.amountSpecifiedRemainingScaled < binState.token1BalanceScaled) {\n        finalBinPos = calculateBinPositionAfterSellingAmount1(\n          currBinPos, state.amountSpecifiedRemainingScaled, binState.token1BalanceScaled\n        );\n        amountOutScaled = state.amountSpecifiedRemainingScaled;\n      } else {\n        finalBinPos = 0;\n        amountOutScaled = binState.token1BalanceScaled;\n      }\n\n      if (lowerEffPriceX64 < priceLimitX64) {\n        if (priceLimitX64 >= upperEffPriceX64) return (currBinPos, 0, 0, 0, 0);\n\n        uint256 finalBinPosAtPriceLimit =\n          calculateBinPositionAtPrice(lowerEffPriceX64, upperEffPriceX64, priceLimitX64, Math.Rounding.Ceil);\n        if (finalBinPosAtPriceLimit >= currBinPos) return (currBinPos, 0, 0, 0, 0);\n\n        if (finalBinPos < finalBinPosAtPriceLimit) {\n          finalBinPos = finalBinPosAtPriceLimit;\n          uint256 amountOutHelper =\n            calculateOutputToken1FromBinPosition(binState.token1BalanceScaled, currBinPos, finalBinPos);\n          amountOutScaled = amountOutHelper < amountOutScaled ? amountOutHelper : amountOutScaled;\n        }\n      }\n\n      if (amountOutScaled == 0) {\n        finalBinPos = currBinPos;\n        return (finalBinPos, 0, 0, 0, 0);\n      }\n\n      uint256 startingPriceX64 =\n        calculatePriceAtBinPosition(lowerEffPriceX64, upperEffPriceX64, currBinPos, Math.Rounding.Floor);\n      uint256 finalPriceX64 =\n        calculatePriceAtBinPosition(lowerEffPriceX64, upperEffPriceX64, finalBinPos, Math.Rounding.Floor);\n      uint256 amountInScaled = calculateRequiredToken0(amountOutScaled, startingPriceX64, finalPriceX64);\n\n      uint256 totalFeeScaled = (amountInScaled * totalFeeOfGrossX64) / ONE_X64;\n      platformFeeScaled = totalFeeScaled * platformShareOfFeeX64 / ONE_X64;\n      lpFeeScaled = totalFeeScaled - platformFeeScaled;\n      uint256 binCreditScaled = amountInScaled - platformFeeScaled;\n\n      binState.token1BalanceScaled -= amountOutScaled.toUint104();\n      binState.token0BalanceScaled =\n        _toUint104IncomingBinBalance(uint256(binState.token0BalanceScaled) + binCreditScaled);\n\n      state.amountSpecifiedRemainingScaled -= amountOutScaled;\n      state.amountCalculatedScaled += amountInScaled;\n\n      binDelta0Scaled = binCreditScaled.toInt256();\n      binDelta1Scaled = -amountOutScaled.toInt256();\n    }\n  }\n\n  // ============ Swap In Bin Functions - Exact Input ============\n\n  /**\n   * @notice Calculate swap amounts for a single bin iteration - exact input token1, output token0 (going up in price)\n   * @dev Uses the analytical solution with Math.sqrt, then at most one proportional rescale (clamped to the bin edge or\n   *      price limit); leftover input inside the bin is charged in full, and an overshoot scales the output down.\n   * @param binState Current bin state\n   * @param currBinPos Current position in bin (uint104).\n   * @param state Current swap state\n   * @param totalFeeOfGrossX64 Whole carved fee as a fraction of the gross input, Q64.64 (`FeeMath.totalFeeOfGrossX64`).\n   * @param platformShareOfFeeX64 Platform share of the carved fee, Q64.64 (`FeeMath.platformPartOfTotalFeeX64`).\n   * @param lowerEffPriceX64 Effective lower bound price of bin. Assumes <= type(uint128).max.\n   * @param upperEffPriceX64 Effective upper bound price of bin. Assumes lowerEffPriceX64 < upperEffPriceX64 <= type(uint128).max.\n   * @param priceLimitX64 Price limit for the swap. Assumes <= type(uint128).max.\n   * @return finalBinPos End position in bin. Result <= MAX_POS_BIN.\n   * @return out0Scaled Output token0 amount for this bin. Result <= MAX_POS_BIN.\n   * @return binDelta0Scaled Change in the BIN's scaled token0 balance (negative = token0 left the bin).\n   * @return binDelta1Scaled Change in the BIN's scaled token1 balance (positive = token1 entered the bin, net of the platform take).\n   * @return platformFeeScaled Combined platform take withheld from the input (never enters the bin).\n   * @return lpFeeScaled LP leg of the carved fee for this step; stays in the bin.\n   */\n  function buyToken0InBinSpecifiedIn(\n    BinState memory binState,\n    uint256 currBinPos,\n    SwapState memory state,\n    uint256 totalFeeOfGrossX64,\n    uint256 platformShareOfFeeX64,\n    uint256 lowerEffPriceX64,\n    uint256 upperEffPriceX64,\n    uint256 priceLimitX64\n  )\n    internal\n    pure\n    returns (\n      uint256 finalBinPos,\n      uint256 out0Scaled,\n      int256 binDelta0Scaled,\n      int256 binDelta1Scaled,\n      uint256 platformFeeScaled,\n      uint256 lpFeeScaled\n    )\n  {\n    unchecked {\n      uint256 startingPriceX64 =\n        calculatePriceAtBinPosition(lowerEffPriceX64, upperEffPriceX64, currBinPos, Math.Rounding.Ceil);\n\n      if ((state.amountSpecifiedRemainingScaled << 64) < startingPriceX64) {\n        return (currBinPos, 0, 0, 0, 0, 0);\n      }\n\n      uint256 maxFinalBinPos;\n      if (upperEffPriceX64 <= priceLimitX64) {\n        maxFinalBinPos = MAX_POS_BIN;\n      } else {\n        if (priceLimitX64 <= lowerEffPriceX64) {\n          return (currBinPos, 0, 0, 0, 0, 0);\n        }\n        maxFinalBinPos =\n          calculateBinPositionAtPrice(lowerEffPriceX64, upperEffPriceX64, priceLimitX64, Math.Rounding.Floor);\n        if (maxFinalBinPos <= currBinPos) {\n          return (currBinPos, 0, 0, 0, 0, 0);\n        }\n      }\n\n      // Check if we can consume up to maxFinalBinPos directly\n      out0Scaled = calculateOutputToken0FromBinPosition(binState.token0BalanceScaled, currBinPos, maxFinalBinPos);\n\n      uint256 finalPriceX64 =\n        calculatePriceAtBinPosition(lowerEffPriceX64, upperEffPriceX64, maxFinalBinPos, Math.Rounding.Ceil);\n      uint256 totalIn1Scaled = calculateRequiredToken1(out0Scaled, startingPriceX64, finalPriceX64);\n\n      uint256 targetPos;\n      if (totalIn1Scaled <= state.amountSpecifiedRemainingScaled) {\n        targetPos = maxFinalBinPos;\n      } else {\n        targetPos = computeAnalyticalTargetPosForBuyToken0(\n          currBinPos,\n          maxFinalBinPos,\n          state.amountSpecifiedRemainingScaled,\n          binState.token0BalanceScaled,\n          lowerEffPriceX64,\n          upperEffPriceX64\n        );\n\n        out0Scaled = calculateOutputToken0FromBinPosition(binState.token0BalanceScaled, currBinPos, targetPos);\n        finalPriceX64 = calculatePriceAtBinPosition(lowerEffPriceX64, upperEffPriceX64, targetPos, Math.Rounding.Ceil);\n        totalIn1Scaled = calculateRequiredToken1(out0Scaled, startingPriceX64, finalPriceX64);\n\n        if (totalIn1Scaled < state.amountSpecifiedRemainingScaled && targetPos < maxFinalBinPos) {\n          if (totalIn1Scaled == 0) totalIn1Scaled = 1;\n          uint256 delta = targetPos - currBinPos;\n          uint256 scaledDelta = delta * state.amountSpecifiedRemainingScaled / totalIn1Scaled;\n          if (scaledDelta == 0) {\n            totalIn1Scaled = state.amountSpecifiedRemainingScaled;\n            targetPos = currBinPos;\n            out0Scaled = 0;\n          } else {\n            uint256 scaledTarget = currBinPos + scaledDelta;\n            if (scaledTarget > maxFinalBinPos) {\n              targetPos = maxFinalBinPos;\n            } else {\n              targetPos = scaledTarget;\n            }\n\n            out0Scaled = calculateOutputToken0FromBinPosition(binState.token0BalanceScaled, currBinPos, targetPos);\n            finalPriceX64 =\n              calculatePriceAtBinPosition(lowerEffPriceX64, upperEffPriceX64, targetPos, Math.Rounding.Ceil);\n            totalIn1Scaled = calculateRequiredToken1(out0Scaled, startingPriceX64, finalPriceX64);\n          }\n        }\n\n        if (totalIn1Scaled < state.amountSpecifiedRemainingScaled && targetPos < maxFinalBinPos) {\n          totalIn1Scaled = state.amountSpecifiedRemainingScaled;\n        }\n\n        if (totalIn1Scaled > state.amountSpecifiedRemainingScaled) {\n          out0Scaled = (out0Scaled * state.amountSpecifiedRemainingScaled) / totalIn1Scaled;\n          targetPos = calculateBinPositionAfterSellingAmount0(currBinPos, out0Scaled, binState.token0BalanceScaled);\n          totalIn1Scaled = state.amountSpecifiedRemainingScaled;\n        }\n      }\n\n      if (out0Scaled == 0) {\n        targetPos = currBinPos;\n      }\n\n      uint256 totalFeeScaled = (totalIn1Scaled * totalFeeOfGrossX64) / ONE_X64;\n      platformFeeScaled = totalFeeScaled * platformShareOfFeeX64 / ONE_X64;\n      lpFeeScaled = totalFeeScaled - platformFeeScaled;\n      uint256 binCreditScaled = totalIn1Scaled - platformFeeScaled;\n\n      binState.token0BalanceScaled -= out0Scaled.toUint104();\n      binState.token1BalanceScaled =\n        _toUint104IncomingBinBalance(uint256(binState.token1BalanceScaled) + binCreditScaled);\n\n      state.amountSpecifiedRemainingScaled -= totalIn1Scaled;\n      state.amountCalculatedScaled += out0Scaled;\n\n      binDelta0Scaled = -out0Scaled.toInt256();\n      binDelta1Scaled = binCreditScaled.toInt256();\n      return (targetPos, out0Scaled, binDelta0Scaled, binDelta1Scaled, platformFeeScaled, lpFeeScaled);\n    }\n  }\n\n  /**\n   * @notice Calculate swap amounts for a single bin iteration - exact input token0, output token1 (going down in price)\n   * @dev Uses the analytical solution with Math.sqrt, then at most one proportional rescale (clamped to the bin edge or\n   *      price limit); leftover input inside the bin is charged in full, and an overshoot scales the output down.\n   * @param binState Current bin state\n   * @param currBinPos Current position in bin (uint104).\n   * @param state Current swap state\n   * @param totalFeeOfGrossX64 Whole carved fee as a fraction of the gross input, Q64.64 (`FeeMath.totalFeeOfGrossX64`).\n   * @param platformShareOfFeeX64 Platform share of the carved fee, Q64.64 (`FeeMath.platformPartOfTotalFeeX64`).\n   * @param lowerEffPriceX64 Effective lower bound price of bin. Assumes <= type(uint128).max.\n   * @param upperEffPriceX64 Effective upper bound price of bin. Assumes lowerEffPriceX64 < upperEffPriceX64 <= type(uint128).max.\n   * @param priceLimitX64 Price limit for the swap. Assumes <= type(uint128).max.\n   * @return finalBinPos End position in bin. Result <= MAX_POS_BIN.\n   * @return out1Scaled Output token1 amount for this bin. Result <= MAX_POS_BIN.\n   * @return binDelta0Scaled Change in the BIN's scaled token0 balance (positive = token0 entered the bin, net of the platform take).\n   * @return binDelta1Scaled Change in the BIN's scaled token1 balance (negative = token1 left the bin).\n   * @return platformFeeScaled Combined platform take withheld from the input (never enters the bin).\n   * @return lpFeeScaled LP leg of the carved fee for this step; stays in the bin.\n   */\n  function buyToken1InBinSpecifiedIn(\n    BinState memory binState,\n    uint256 currBinPos,\n    SwapState memory state,\n    uint256 totalFeeOfGrossX64,\n    uint256 platformShareOfFeeX64,\n    uint256 lowerEffPriceX64,\n    uint256 upperEffPriceX64,\n    uint256 priceLimitX64\n  )\n    internal\n    pure\n    returns (\n      uint256 finalBinPos,\n      uint256 out1Scaled,\n      int256 binDelta0Scaled,\n      int256 binDelta1Scaled,\n      uint256 platformFeeScaled,\n      uint256 lpFeeScaled\n    )\n  {\n    unchecked {\n      uint256 startingPriceX64 =\n        calculatePriceAtBinPosition(lowerEffPriceX64, upperEffPriceX64, currBinPos, Math.Rounding.Floor);\n\n      if (state.amountSpecifiedRemainingScaled < Math.ceilDiv(ONE_X64, startingPriceX64)) {\n        return (currBinPos, 0, 0, 0, 0, 0);\n      }\n\n      uint256 minFinalBinPos;\n\n      if (priceLimitX64 <= lowerEffPriceX64) {\n        minFinalBinPos = 0;\n      } else {\n        minFinalBinPos =\n          calculateBinPositionAtPrice(lowerEffPriceX64, upperEffPriceX64, priceLimitX64, Math.Rounding.Ceil);\n        if (currBinPos <= minFinalBinPos) {\n          return (currBinPos, 0, 0, 0, 0, 0);\n        }\n      }\n\n      // Check if we can consume up to minFinalBinPos directly\n      out1Scaled = calculateOutputToken1FromBinPosition(binState.token1BalanceScaled, currBinPos, minFinalBinPos);\n\n      uint256 finalPriceX64 =\n        calculatePriceAtBinPosition(lowerEffPriceX64, upperEffPriceX64, minFinalBinPos, Math.Rounding.Floor);\n      uint256 totalIn0Scaled = calculateRequiredToken0(out1Scaled, startingPriceX64, finalPriceX64);\n\n      uint256 targetPos;\n      if (totalIn0Scaled <= state.amountSpecifiedRemainingScaled) {\n        targetPos = minFinalBinPos;\n      } else {\n        targetPos = computeAnalyticalTargetPosForSellToken0(\n          currBinPos,\n          minFinalBinPos,\n          state.amountSpecifiedRemainingScaled,\n          binState.token1BalanceScaled,\n          lowerEffPriceX64,\n          upperEffPriceX64\n        );\n        out1Scaled = calculateOutputToken1FromBinPosition(binState.token1BalanceScaled, currBinPos, targetPos);\n\n        finalPriceX64 = calculatePriceAtBinPosition(lowerEffPriceX64, upperEffPriceX64, targetPos, Math.Rounding.Floor);\n        totalIn0Scaled = calculateRequiredToken0(out1Scaled, startingPriceX64, finalPriceX64);\n\n        if (totalIn0Scaled < state.amountSpecifiedRemainingScaled && targetPos > minFinalBinPos) {\n          if (totalIn0Scaled == 0) totalIn0Scaled = 1;\n          uint256 delta = currBinPos - targetPos;\n          uint256 scaledDelta = delta * state.amountSpecifiedRemainingScaled / totalIn0Scaled;\n          if (scaledDelta == 0) {\n            totalIn0Scaled = state.amountSpecifiedRemainingScaled;\n            targetPos = currBinPos;\n            out1Scaled = 0;\n          } else {\n            targetPos = currBinPos > scaledDelta ? currBinPos - scaledDelta : 0;\n            if (targetPos < minFinalBinPos) {\n              targetPos = minFinalBinPos;\n            }\n\n            out1Scaled = calculateOutputToken1FromBinPosition(binState.token1BalanceScaled, currBinPos, targetPos);\n\n            finalPriceX64 =\n              calculatePriceAtBinPosition(lowerEffPriceX64, upperEffPriceX64, targetPos, Math.Rounding.Floor);\n            totalIn0Scaled = calculateRequiredToken0(out1Scaled, startingPriceX64, finalPriceX64);\n          }\n        }\n        if (totalIn0Scaled < state.amountSpecifiedRemainingScaled && targetPos > minFinalBinPos) {\n          totalIn0Scaled = state.amountSpecifiedRemainingScaled;\n        }\n\n        if (totalIn0Scaled > state.amountSpecifiedRemainingScaled) {\n          out1Scaled = (out1Scaled * state.amountSpecifiedRemainingScaled) / totalIn0Scaled;\n          targetPos = calculateBinPositionAfterSellingAmount1(currBinPos, out1Scaled, binState.token1BalanceScaled);\n          totalIn0Scaled = state.amountSpecifiedRemainingScaled;\n        }\n      }\n\n      if (out1Scaled == 0) {\n        targetPos = currBinPos;\n      }\n\n      uint256 totalFeeScaled = (totalIn0Scaled * totalFeeOfGrossX64) / ONE_X64;\n      platformFeeScaled = totalFeeScaled * platformShareOfFeeX64 / ONE_X64;\n      lpFeeScaled = totalFeeScaled - platformFeeScaled;\n      uint256 binCreditScaled = totalIn0Scaled - platformFeeScaled;\n\n      binState.token1BalanceScaled -= out1Scaled.toUint104();\n      binState.token0BalanceScaled =\n        _toUint104IncomingBinBalance(uint256(binState.token0BalanceScaled) + binCreditScaled);\n\n      state.amountSpecifiedRemainingScaled -= totalIn0Scaled;\n      state.amountCalculatedScaled += out1Scaled;\n\n      binDelta0Scaled = binCreditScaled.toInt256();\n      binDelta1Scaled = -out1Scaled.toInt256();\n      return (targetPos, out1Scaled, binDelta0Scaled, binDelta1Scaled, platformFeeScaled, lpFeeScaled);\n    }\n  }\n}\n"},"contracts/libraries/FeeMath.sol":{"content":"// SPDX-License-Identifier: BUSL-1.1\npragma solidity ^0.8.35;\n\nimport {Math} from \"@openzeppelin/contracts/utils/math/Math.sol\";\nimport {ONE_X64} from \"./SwapMath.sol\";\n\n/// @title FeeMath\n/// @notice Fee-rate composition and platform/LP split helpers for swaps (Q64.64).\nlibrary FeeMath {\n  /// @notice Notional fee as a Q64.64 fraction.\n  /// @param notionalFeeE8 Pool's total notional fee in E8 (`1e8 = 100%`).\n  function _notionalFeeX64(uint24 notionalFeeE8) internal pure returns (uint256) {\n    unchecked {\n      return (uint256(notionalFeeE8) * ONE_X64) / 1e8;\n    }\n  }\n\n  /// @notice Whole fee a trader pays in a bin, in Q64.64: oracle base spread + per-bin add + notional.\n  /// @param baseFeeX64 Oracle base spread fee for the active direction.\n  /// @param addFeeE6 Per-bin additional fee for the active direction, in E6. Assumes\n  ///        `<= type(uint16).max` (both `BinState` add-fee fields are `uint16`); the unchecked\n  ///        multiply below relies on that bound.\n  /// @param notionalFeeX64_ Notional fee as a Q64.64 fraction (see `_notionalFeeX64`).\n  function binTotalFeeX64(uint256 baseFeeX64, uint256 addFeeE6, uint256 notionalFeeX64_)\n    internal\n    pure\n    returns (uint256)\n  {\n    unchecked {\n      return baseFeeX64 + (addFeeE6 * ONE_X64) / 1e6 + notionalFeeX64_;\n    }\n  }\n\n  /// @notice Fold a bin fee into a reference-anchored price to get the price the trader executes at.\n  /// @param priceX64 Reference-anchored (fee-exclusive) price.\n  /// @param totalFeeX64 Whole fee for the direction: base + per-bin add + notional.\n  /// @param zeroForOne True when selling token0 (price divides), false when buying token0 (price multiplies).\n  function effectivePriceX64(uint256 priceX64, uint256 totalFeeX64, bool zeroForOne) internal pure returns (uint256) {\n    return zeroForOne\n      ? Math.mulDiv(priceX64, ONE_X64, ONE_X64 + totalFeeX64, Math.Rounding.Floor)\n      : Math.mulDiv(priceX64, ONE_X64 + totalFeeX64, ONE_X64, Math.Rounding.Ceil);\n  }\n\n  /// @notice PLATFORM share of the carved fee, in Q64.64 (`ONE_X64` = the platform takes all of it).\n  /// @param totalFeeX64 Whole fee folded into the prices: base + per-bin add + notional.\n  /// @param notionalFeeX64 Notional leg of `totalFeeX64`. Assumes <= totalFeeX64.\n  /// @param spreadFeeE6 Platform share of the SPREAD leg in E6 (`protocolSpreadFeeE6 + adminSpreadFeeE6`).\n  function platformPartOfTotalFeeX64(uint256 totalFeeX64, uint256 notionalFeeX64, uint256 spreadFeeE6)\n    internal\n    pure\n    returns (uint256)\n  {\n    unchecked {\n      if (totalFeeX64 == 0) return 0;\n      uint256 platformRateX64 = notionalFeeX64 + ((totalFeeX64 - notionalFeeX64) * spreadFeeE6) / 1e6;\n      return Math.mulDiv(platformRateX64, ONE_X64, totalFeeX64);\n    }\n  }\n\n  /// @notice Notional leg of a platform take.\n  /// @param platformTakeScaled Combined platform fee withheld from the trader's input, in scaled units.\n  /// @param totalFeeX64 Whole fee folded into the prices.\n  /// @param notionalFeeX64 Notional amount in `totalFeeX64`. Assumes <= totalFeeX64.\n  /// @param spreadFeeE6 Platform share of the SPREAD leg in E6.\n  function notionalPartOfPlatformTake(\n    uint256 platformTakeScaled,\n    uint256 totalFeeX64,\n    uint256 notionalFeeX64,\n    uint256 spreadFeeE6\n  ) internal pure returns (uint256) {\n    unchecked {\n      if (platformTakeScaled == 0 || notionalFeeX64 == 0) return 0;\n\n      uint256 totalSpreadFeeX64 = totalFeeX64 - notionalFeeX64;\n      uint256 platformRateX64 = notionalFeeX64 + (totalSpreadFeeX64 * spreadFeeE6) / 1e6;\n      return Math.mulDiv(platformTakeScaled, notionalFeeX64, platformRateX64);\n    }\n  }\n\n  /// @notice Whole carved fee as a fraction of the trader's GROSS input, in Q64.64.\n  function totalFeeOfGrossX64(uint256 totalFeeX64) internal pure returns (uint256) {\n    if (totalFeeX64 == 0) return 0;\n    return Math.mulDiv(totalFeeX64, ONE_X64, ONE_X64 + totalFeeX64);\n  }\n}\n"},"contracts/libraries/SignedMath.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\nimport {Panic} from \"@openzeppelin/contracts/utils/Panic.sol\";\nimport {SafeCast} from \"@openzeppelin/contracts/utils/math/SafeCast.sol\";\n\n/// @title SignedMath\n/// @notice Helpers for signed integer arithmetic\nlibrary SignedMath {\n  using SafeCast for uint256;\n\n  /// @notice Returns ceil(a / b), rounded toward positive infinity\n  /// @dev Reverts on division by zero and on int256 min / -1 overflow (same behavior as Solidity division)\n  function ceilDiv(int256 a, int256 b) internal pure returns (int256) {\n    if (b == 0) {\n      // Guarantee the same behavior as in a regular Solidity division.\n      Panic.panic(Panic.DIVISION_BY_ZERO);\n    }\n\n    int256 quotient = a / b;\n    int256 remainder = a % b;\n\n    // If there is a remainder and the exact result is positive, round up by 1.\n    if (remainder != 0 && (a ^ b) >= 0) {\n      unchecked {\n        quotient += 1;\n      }\n    }\n\n    return quotient;\n  }\n\n  /// @notice Returns ceil(a / b), rounded toward positive infinity\n  /// @dev Reverts on division by zero (same behavior as Solidity division).\n  ///      Also reverts if b > type(int256).max due to checked conversion.\n  function ceilDiv(int256 a, uint256 b) internal pure returns (int256) {\n    if (b == 0) {\n      // Guarantee the same behavior as in a regular Solidity division.\n      Panic.panic(Panic.DIVISION_BY_ZERO);\n    }\n\n    return ceilDiv(a, b.toInt256());\n  }\n}\n"},"lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\nimport {IERC1363} from \"../../../interfaces/IERC1363.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC-20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n    /**\n     * @dev An operation with an ERC-20 token failed.\n     */\n    error SafeERC20FailedOperation(address token);\n\n    /**\n     * @dev Indicates a failed `decreaseAllowance` request.\n     */\n    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);\n\n    /**\n     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful.\n     */\n    function safeTransfer(IERC20 token, address to, uint256 value) internal {\n        if (!_safeTransfer(token, to, value, true)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\n     */\n    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n        if (!_safeTransferFrom(token, from, to, value, true)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\n     */\n    function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\n        return _safeTransfer(token, to, value, false);\n    }\n\n    /**\n     * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\n     */\n    function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\n        return _safeTransferFrom(token, from, to, value, false);\n    }\n\n    /**\n     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful.\n     *\n     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n     * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n     */\n    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n        uint256 oldAllowance = token.allowance(address(this), spender);\n        forceApprove(token, spender, oldAllowance + value);\n    }\n\n    /**\n     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no\n     * value, non-reverting calls are assumed to be successful.\n     *\n     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n     * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n     */\n    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {\n        unchecked {\n            uint256 currentAllowance = token.allowance(address(this), spender);\n            if (currentAllowance < requestedDecrease) {\n                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);\n            }\n            forceApprove(token, spender, currentAllowance - requestedDecrease);\n        }\n    }\n\n    /**\n     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\n     * to be set to zero before setting it to a non-zero value, such as USDT.\n     *\n     * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\n     * only sets the \"standard\" allowance. Any temporary allowance will remain active, in addition to the value being\n     * set here.\n     */\n    function forceApprove(IERC20 token, address spender, uint256 value) internal {\n        if (!_safeApprove(token, spender, value, false)) {\n            if (!_safeApprove(token, spender, 0, true)) revert SafeERC20FailedOperation(address(token));\n            if (!_safeApprove(token, spender, value, true)) revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\n     * code. This can be used to implement an {ERC721}-like safe transfer that relies on {ERC1363} checks when\n     * targeting contracts.\n     *\n     * Reverts if the returned value is other than `true`.\n     */\n    function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n        if (to.code.length == 0) {\n            safeTransfer(token, to, value);\n        } else if (!token.transferAndCall(to, value, data)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\n     * has no code. This can be used to implement an {ERC721}-like safe transfer that relies on {ERC1363} checks when\n     * targeting contracts.\n     *\n     * Reverts if the returned value is other than `true`.\n     */\n    function transferFromAndCallRelaxed(\n        IERC1363 token,\n        address from,\n        address to,\n        uint256 value,\n        bytes memory data\n    ) internal {\n        if (to.code.length == 0) {\n            safeTransferFrom(token, from, to, value);\n        } else if (!token.transferFromAndCall(from, to, value, data)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\n     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n     * targeting contracts.\n     *\n     * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\n     * Oppositely, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\n     * once without retrying, and relies on the returned value to be true.\n     *\n     * Reverts if the returned value is other than `true`.\n     */\n    function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n        if (to.code.length == 0) {\n            forceApprove(token, to, value);\n        } else if (!token.approveAndCall(to, value, data)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity `token.transfer(to, value)` call, relaxing the requirement on the return value: the\n     * return value is optional (but if data is returned, it must not be false).\n     *\n     * @param token The token targeted by the call.\n     * @param to The recipient of the tokens\n     * @param value The amount of token to transfer\n     * @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.\n     */\n    function _safeTransfer(IERC20 token, address to, uint256 value, bool bubble) private returns (bool success) {\n        bytes4 selector = IERC20.transfer.selector;\n\n        assembly (\"memory-safe\") {\n            let fmp := mload(0x40)\n            mstore(0x00, selector)\n            mstore(0x04, and(to, shr(96, not(0))))\n            mstore(0x24, value)\n            success := call(gas(), token, 0, 0x00, 0x44, 0x00, 0x20)\n            // if call success and return is true, all is good.\n            // otherwise (not success or return is not true), we need to perform further checks\n            if iszero(and(success, eq(mload(0x00), 1))) {\n                // if the call was a failure and bubble is enabled, bubble the error\n                if and(iszero(success), bubble) {\n                    returndatacopy(fmp, 0x00, returndatasize())\n                    revert(fmp, returndatasize())\n                }\n                // if the return value is not true, then the call is only successful if:\n                // - the token address has code\n                // - the returndata is empty\n                success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))\n            }\n            mstore(0x40, fmp)\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity `token.transferFrom(from, to, value)` call, relaxing the requirement on the return\n     * value: the return value is optional (but if data is returned, it must not be false).\n     *\n     * @param token The token targeted by the call.\n     * @param from The sender of the tokens\n     * @param to The recipient of the tokens\n     * @param value The amount of token to transfer\n     * @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.\n     */\n    function _safeTransferFrom(\n        IERC20 token,\n        address from,\n        address to,\n        uint256 value,\n        bool bubble\n    ) private returns (bool success) {\n        bytes4 selector = IERC20.transferFrom.selector;\n\n        assembly (\"memory-safe\") {\n            let fmp := mload(0x40)\n            mstore(0x00, selector)\n            mstore(0x04, and(from, shr(96, not(0))))\n            mstore(0x24, and(to, shr(96, not(0))))\n            mstore(0x44, value)\n            success := call(gas(), token, 0, 0x00, 0x64, 0x00, 0x20)\n            // if call success and return is true, all is good.\n            // otherwise (not success or return is not true), we need to perform further checks\n            if iszero(and(success, eq(mload(0x00), 1))) {\n                // if the call was a failure and bubble is enabled, bubble the error\n                if and(iszero(success), bubble) {\n                    returndatacopy(fmp, 0x00, returndatasize())\n                    revert(fmp, returndatasize())\n                }\n                // if the return value is not true, then the call is only successful if:\n                // - the token address has code\n                // - the returndata is empty\n                success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))\n            }\n            mstore(0x40, fmp)\n            mstore(0x60, 0)\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity `token.approve(spender, value)` call, relaxing the requirement on the return value:\n     * the return value is optional (but if data is returned, it must not be false).\n     *\n     * @param token The token targeted by the call.\n     * @param spender The spender of the tokens\n     * @param value The amount of token to transfer\n     * @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.\n     */\n    function _safeApprove(IERC20 token, address spender, uint256 value, bool bubble) private returns (bool success) {\n        bytes4 selector = IERC20.approve.selector;\n\n        assembly (\"memory-safe\") {\n            let fmp := mload(0x40)\n            mstore(0x00, selector)\n            mstore(0x04, and(spender, shr(96, not(0))))\n            mstore(0x24, value)\n            success := call(gas(), token, 0, 0x00, 0x44, 0x00, 0x20)\n            // if call success and return is true, all is good.\n            // otherwise (not success or return is not true), we need to perform further checks\n            if iszero(and(success, eq(mload(0x00), 1))) {\n                // if the call was a failure and bubble is enabled, bubble the error\n                if and(iszero(success), bubble) {\n                    returndatacopy(fmp, 0x00, returndatasize())\n                    revert(fmp, returndatasize())\n                }\n                // if the return value is not true, then the call is only successful if:\n                // - the token address has code\n                // - the returndata is empty\n                success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))\n            }\n            mstore(0x40, fmp)\n        }\n    }\n}\n"},"contracts/interfaces/IPriceProvider/IPriceProvider.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\n/// @title IPriceProvider\n/// @notice Oracle surface used by pools for bid/ask and token pair metadata.\n/// @dev Prices are Q64.64 whole-token ratios (token1 per token0), independent of ERC20 decimals.\ninterface IPriceProvider {\n  /// @notice Base token quoted by this provider; for Metric pools this must equal pool `token0`.\n  function token0() external view returns (address baseToken);\n\n  /// @notice Quote token quoted by this provider; for Metric pools this must equal pool `token1`.\n  function token1() external view returns (address quoteToken);\n\n  /// @notice Bid, ask, and reference in Q64.64 fixed-point.\n  /// @dev Protocol expectation: `referencePrice` equals sqrt(bidPrice * askPrice) and is a faithful\n  ///      geometric mid. The pool enforces `0 < bidPrice < askPrice`, an inclusive reference bound,\n  ///      and its configured `bidAskRefAsymmetryX8` tolerance, not exact equality to the geometric mean.\n  ///      `referencePrice` is used for fee calculation and as the mid/price-path anchor; bid and ask bound it.\n  ///      Providers that manipulate `referencePrice` to pay less fees may be blacklisted/deprioritized.\n  function getQuote() external returns (uint128 bidPrice, uint128 askPrice, uint128 referencePrice);\n}\n"},"contracts/libraries/Slot0Library.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\nimport {PoolSlot0} from \"../types/Slot0.sol\";\n\n/// @title Slot0Library\n/// @notice Pack and unpack MetricOmmPool storage slot 0.\n/// @dev Bit layout must match `MetricOmmPool` and `PoolStateLibrary`:\n///      pauseLevel(uint8,0) | curBinIdx(int16,8) | curPosInBin(uint104,24) |\n///      curBinDistE6(int24,128) | spreadFeeE6(uint24,152) | notionalFeeE8(uint24,176) |\n///      bidAskRefAsymmetryX8(uint16,200)\n///      Top bit used is 215, so the word still has 40 bits spare.\nlibrary Slot0Library {\n  function pack(\n    uint8 pauseLevel,\n    int16 curBinIdx,\n    uint104 curPosInBin,\n    int24 curBinDistFromProvidedPriceE6,\n    uint24 spreadFeeE6,\n    uint24 notionalFeeE8,\n    uint16 bidAskRefAsymmetryX8\n  ) internal pure returns (uint256 packed) {\n    packed = uint256(pauseLevel);\n    // casting int16 -> int256 is lossless; outer uint256 is masked to 16 bits so no truncation\n    // forge-lint: disable-next-line(unsafe-typecast)\n    packed |= (uint256(uint256(int256(curBinIdx)) & 0xffff) << 8);\n    packed |= uint256(curPosInBin) << 24;\n    // casting int24 -> int256 is lossless; outer uint256 is masked to 24 bits so no truncation\n    // forge-lint: disable-next-line(unsafe-typecast)\n    packed |= (uint256(uint256(int256(curBinDistFromProvidedPriceE6)) & 0xffffff) << 128);\n    packed |= uint256(spreadFeeE6) << 152;\n    packed |= uint256(notionalFeeE8) << 176;\n    packed |= uint256(bidAskRefAsymmetryX8) << 200;\n  }\n\n  function unpack(uint256 packed) internal pure returns (PoolSlot0 memory s) {\n    uint8 pauseLevel;\n    int256 binIdxWide;\n    int256 distWide;\n    assembly (\"memory-safe\") {\n      pauseLevel := and(packed, 0xff)\n      binIdxWide := signextend(1, shr(8, packed))\n      distWide := signextend(2, shr(128, packed))\n    }\n    s.pauseLevel = pauseLevel;\n    // forge-lint: disable-next-line(unsafe-typecast)\n    s.curBinIdx = int16(binIdxWide);\n    // forge-lint: disable-next-line(unsafe-typecast)\n    s.curPosInBin = uint104((packed >> 24) & type(uint104).max);\n    // forge-lint: disable-next-line(unsafe-typecast)\n    s.curBinDistFromProvidedPriceE6 = int24(distWide);\n    // forge-lint: disable-next-line(unsafe-typecast)\n    s.spreadFeeE6 = uint24((packed >> 152) & 0xFFFFFF);\n    // forge-lint: disable-next-line(unsafe-typecast)\n    s.notionalFeeE8 = uint24((packed >> 176) & 0xFFFFFF);\n    // forge-lint: disable-next-line(unsafe-typecast)\n    s.bidAskRefAsymmetryX8 = uint16((packed >> 200) & 0xFFFF);\n  }\n\n  /// @notice Read the pool's packed slot 0 (caller must be `MetricOmmPool` or delegate context).\n  function loadPackedSlot0() internal view returns (uint256 packed) {\n    assembly (\"memory-safe\") {\n      packed := sload(0)\n    }\n  }\n}\n"},"contracts/libraries/LiquidityLib.sol":{"content":"// SPDX-License-Identifier: BUSL-1.1\npragma solidity ^0.8.35;\n\nimport {Math} from \"@openzeppelin/contracts/utils/math/Math.sol\";\nimport {SafeCast} from \"@openzeppelin/contracts/utils/math/SafeCast.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {BinBalanceDelta, LiquidityDelta} from \"../types/PoolOperation.sol\";\nimport {BinState, BinTotals} from \"../types/PoolStorage.sol\";\nimport {IMetricOmmPoolActions} from \"../interfaces/IMetricOmmPool/IMetricOmmPoolActions.sol\";\nimport {IMetricOmmPool, PoolImmutables} from \"../interfaces/IMetricOmmPool/IMetricOmmPool.sol\";\nimport {IMetricOmmModifyLiquidityCallback} from \"../interfaces/callbacks/IMetricOmmModifyLiquidityCallback.sol\";\nimport {PoolStateLibrary} from \"./PoolStateLibrary.sol\";\n\n/// @title LiquidityLib\n/// @notice Holds `addLiquidity` / `removeLiquidity` logic as a deployable (DELEGATECALL-linked)\n///         library so it does not inflate `MetricOmmPool` bytecode.\n/// @dev Because every `public` function is called via DELEGATECALL from the pool:\n///      - `msg.sender` is the original external caller.\n///      - `address(this)` is the pool contract.\n///      - Storage references resolve against the pool's state.\n///      - ERC-20 calls (`balanceOf`, `safeTransfer`) operate on the pool's holdings.\nlibrary LiquidityLib {\n  using SafeCast for uint256;\n  using SafeERC20 for IERC20;\n\n  /// @notice Immutables + snapshot of mutable state loaded at the start of each liquidity call.\n  struct PoolContext {\n    address token0;\n    address token1;\n    uint256 token0ScaleMultiplier;\n    uint256 token1ScaleMultiplier;\n    uint256 initialScaledToken0PerShareE18;\n    uint256 initialScaledToken1PerShareE18;\n    uint256 minimalOperationalLiquidity;\n    int256 lowestBin;\n    int256 highestBin;\n    int256 curBinIdx;\n    uint104 curPosInBin;\n  }\n\n  function addLiquidity(\n    address owner,\n    uint80 salt,\n    LiquidityDelta calldata deltas,\n    bytes calldata callbackData,\n    BinTotals storage binTotals,\n    mapping(int256 => BinState) storage binStates,\n    mapping(int256 => uint256) storage binTotalShares,\n    mapping(bytes32 => uint256) storage positionBinShares\n  ) public returns (uint256 amount0Added, uint256 amount1Added) {\n    PoolContext memory ctx = _loadContext();\n    unchecked {\n      uint256 length = deltas.binIdxs.length;\n      if (length == 0) return (0, 0);\n\n      uint256 totalToken0ToAddScaled = 0;\n      uint256 totalToken1ToAddScaled = 0;\n\n      BinBalanceDelta[] memory binBalanceDeltas = new BinBalanceDelta[](length);\n\n      int256 curBinIdxCache = ctx.curBinIdx;\n\n      for (uint256 i = 0; i < length; i++) {\n        int256 binIdx = deltas.binIdxs[i];\n        uint256 sharesToAdd = deltas.shares[i];\n\n        if (binIdx < ctx.lowestBin || binIdx > ctx.highestBin) revert IMetricOmmPoolActions.InvalidBinIndex(binIdx);\n        if (sharesToAdd == 0) continue;\n        // Loose sanity bound: per-bin scaled balances are uint104, and an empty bin mints at most 1e18 (~2^60) shares per\n        // scaled unit (`initialScaledAmount*PerE18Shares >= 1`), so legitimate amounts stay far below 2^192.\n        if (sharesToAdd > type(uint192).max) revert IMetricOmmPoolActions.SharesAmountTooLarge();\n\n        {\n          // safe because LOWEST_BIN and HIGHEST_BIN fit int16 (enforced by factory)\n          // forge-lint: disable-next-line(unsafe-typecast)\n          bytes32 posKey = _positionBinKey(owner, salt, int16(binIdx));\n          uint256 binTotalSharesVal = binTotalShares[binIdx];\n          uint256 userShares = positionBinShares[posKey];\n\n          if (sharesToAdd < ctx.minimalOperationalLiquidity) {\n            revert IMetricOmmPoolActions.SharesDeltaSmallerThanMinimalOperationalLiquidity(\n              binIdx, sharesToAdd, ctx.minimalOperationalLiquidity\n            );\n          }\n          uint256 newUserShares = userShares + sharesToAdd;\n\n          BinState storage binState = binStates[binIdx];\n\n          uint256 amount0Scaled = 0;\n          uint256 amount1Scaled = 0;\n          if (binTotalSharesVal == 0) {\n            if (binIdx < curBinIdxCache) {\n              amount1Scaled = Math.mulDiv(ctx.initialScaledToken1PerShareE18, sharesToAdd, 1e18, Math.Rounding.Ceil);\n            } else if (binIdx > curBinIdxCache) {\n              amount0Scaled = Math.mulDiv(ctx.initialScaledToken0PerShareE18, sharesToAdd, 1e18, Math.Rounding.Ceil);\n            } else {\n              uint256 token0Proportion = type(uint104).max - ctx.curPosInBin;\n              uint256 token1Proportion = ctx.curPosInBin;\n              amount0Scaled =\n              (Math.mulDiv(\n                  token0Proportion * ctx.initialScaledToken0PerShareE18,\n                  sharesToAdd,\n                  uint256(type(uint104).max) * 1e18,\n                  Math.Rounding.Ceil\n                ));\n              amount1Scaled =\n              (Math.mulDiv(\n                  token1Proportion * ctx.initialScaledToken1PerShareE18,\n                  sharesToAdd,\n                  uint256(type(uint104).max) * 1e18,\n                  Math.Rounding.Ceil\n                ));\n            }\n          } else {\n            amount0Scaled =\n              Math.mulDiv(binState.token0BalanceScaled, sharesToAdd, binTotalSharesVal, Math.Rounding.Ceil);\n            amount1Scaled =\n              Math.mulDiv(binState.token1BalanceScaled, sharesToAdd, binTotalSharesVal, Math.Rounding.Ceil);\n          }\n\n          // This check makes sure that the later addition of amount(0|1)Scaled will not overflow.\n          if (amount0Scaled > type(uint104).max || amount1Scaled > type(uint104).max) {\n            revert IMetricOmmPoolActions.SharesAmountTooLarge();\n          }\n\n          if (amount0Scaled > 0) {\n            // The total starts at 0 and is increased at each loop iteration. It would require ~2^152 iterations to overflow.\n            totalToken0ToAddScaled += amount0Scaled;\n            // Both added values are bounded by uint104, so the addition will not overflow. The cast to uint104 may revert.\n            binState.token0BalanceScaled = (uint256(binState.token0BalanceScaled) + amount0Scaled).toUint104();\n          }\n          if (amount1Scaled > 0) {\n            totalToken1ToAddScaled += amount1Scaled;\n            binState.token1BalanceScaled = (uint256(binState.token1BalanceScaled) + amount1Scaled).toUint104();\n          }\n\n          // SharesToAdd is bounded by uint192.max. It would require ~2^64 separate additions to overflow.\n          binTotalShares[binIdx] = binTotalSharesVal + sharesToAdd;\n          positionBinShares[posKey] = newUserShares;\n\n          binBalanceDeltas[i] = BinBalanceDelta({\n            // Safe: per-bin deltas are bounded by uint104 bin balances.\n            // forge-lint: disable-next-line(unsafe-typecast)\n            delta0Scaled: int256(amount0Scaled),\n            // casting to int256 is safe because amount1Scaled is bounded by uint104 bin balances.\n            // forge-lint: disable-next-line(unsafe-typecast)\n            delta1Scaled: int256(amount1Scaled)\n          });\n        }\n      }\n\n      // totalToken(0|1)ToAddScaled is capped by uint104.max times the number of iterations. It would require ~2^152 iterations to overflow.\n      if (totalToken0ToAddScaled > 0) {\n        binTotals.scaledToken0 = (uint256(binTotals.scaledToken0) + totalToken0ToAddScaled).toUint128();\n      }\n      if (totalToken1ToAddScaled > 0) {\n        binTotals.scaledToken1 = (uint256(binTotals.scaledToken1) + totalToken1ToAddScaled).toUint128();\n      }\n\n      (amount0Added, amount1Added) =\n        _deltasScaledToExternal(totalToken0ToAddScaled, totalToken1ToAddScaled, ctx, Math.Rounding.Ceil);\n\n      if (amount0Added > 0 || amount1Added > 0) {\n        uint256 balance0Before = IERC20(ctx.token0).balanceOf(address(this));\n        uint256 balance1Before = IERC20(ctx.token1).balanceOf(address(this));\n        IMetricOmmModifyLiquidityCallback(msg.sender)\n          .metricOmmModifyLiquidityCallback(amount0Added, amount1Added, callbackData);\n        if (amount0Added > 0 && balance0Before + amount0Added > IERC20(ctx.token0).balanceOf(address(this))) {\n          revert IMetricOmmPoolActions.InsufficientTokenBalance();\n        }\n        if (amount1Added > 0 && balance1Before + amount1Added > IERC20(ctx.token1).balanceOf(address(this))) {\n          revert IMetricOmmPoolActions.InsufficientTokenBalance();\n        }\n      }\n\n      emit IMetricOmmPoolActions.LiquidityAdded(owner, salt, deltas.binIdxs, binBalanceDeltas, deltas.shares);\n    }\n  }\n\n  function removeLiquidity(\n    address owner,\n    uint80 salt,\n    LiquidityDelta calldata deltas,\n    BinTotals storage binTotals,\n    mapping(int256 => BinState) storage binStates,\n    mapping(int256 => uint256) storage binTotalShares,\n    mapping(bytes32 => uint256) storage positionBinShares\n  ) public returns (uint256 amount0Removed, uint256 amount1Removed, bool emptiedCurrentBin) {\n    PoolContext memory ctx = _loadContext();\n    unchecked {\n      uint256 length = deltas.binIdxs.length;\n      if (length == 0) return (0, 0, false);\n\n      uint256 totalToken0ToRemoveScaled = 0;\n      uint256 totalToken1ToRemoveScaled = 0;\n\n      BinBalanceDelta[] memory binBalanceDeltas = new BinBalanceDelta[](length);\n\n      for (uint256 i = 0; i < length; i++) {\n        int256 binIdx = deltas.binIdxs[i];\n        uint256 sharesToRemove = deltas.shares[i];\n\n        if (binIdx < ctx.lowestBin || binIdx > ctx.highestBin) {\n          revert IMetricOmmPoolActions.InvalidBinIndex(binIdx);\n        }\n        if (sharesToRemove == 0) continue;\n\n        {\n          // safe because LOWEST_BIN and HIGHEST_BIN fit int16 (enforced by factory)\n          // forge-lint: disable-next-line(unsafe-typecast)\n          bytes32 posKey = _positionBinKey(owner, salt, int16(binIdx));\n          uint256 binTotalSharesVal = binTotalShares[binIdx];\n          uint256 userShares = positionBinShares[posKey];\n\n          if (userShares < sharesToRemove) {\n            revert IMetricOmmPoolActions.InsufficientLiquidity(sharesToRemove, userShares);\n          }\n          if (sharesToRemove < ctx.minimalOperationalLiquidity) {\n            revert IMetricOmmPoolActions.SharesDeltaSmallerThanMinimalOperationalLiquidity(\n              binIdx, sharesToRemove, ctx.minimalOperationalLiquidity\n            );\n          }\n          uint256 newUserShares = userShares - sharesToRemove;\n          if (newUserShares > 0 && newUserShares < ctx.minimalOperationalLiquidity) {\n            revert IMetricOmmPoolActions.LeftoversSmallerThanMinimalOperationalLiquidity(\n              binIdx, newUserShares, ctx.minimalOperationalLiquidity\n            );\n          }\n\n          BinState storage binState = binStates[binIdx];\n          uint256 amount0Scaled = Math.mulDiv(binState.token0BalanceScaled, sharesToRemove, binTotalSharesVal);\n          uint256 amount1Scaled = Math.mulDiv(binState.token1BalanceScaled, sharesToRemove, binTotalSharesVal);\n\n          // casting to uint104 is safe because amount0Scaled and amount1Scaled are at most token(0|1)BalanceScaled\n          // forge-lint: disable-next-line(unsafe-typecast)\n          binState.token0BalanceScaled -= uint104(amount0Scaled);\n          // forge-lint: disable-next-line(unsafe-typecast)\n          binState.token1BalanceScaled -= uint104(amount1Scaled);\n          uint256 newBinTotalShares = binTotalSharesVal - sharesToRemove;\n          binTotalShares[binIdx] = newBinTotalShares;\n          positionBinShares[posKey] = newUserShares;\n          if (binIdx == ctx.curBinIdx && newBinTotalShares == 0) emptiedCurrentBin = true;\n\n          totalToken0ToRemoveScaled += amount0Scaled;\n          totalToken1ToRemoveScaled += amount1Scaled;\n\n          binBalanceDeltas[i] = BinBalanceDelta({\n            // safe because amount0Scaled is bounded by uint104 bin balances.\n            // forge-lint: disable-next-line(unsafe-typecast)\n            delta0Scaled: -int256(amount0Scaled),\n            // safe because amount1Scaled is bounded by uint104 bin balances.\n            // forge-lint: disable-next-line(unsafe-typecast)\n            delta1Scaled: -int256(amount1Scaled)\n          });\n        }\n      }\n\n      if (totalToken0ToRemoveScaled > 0) {\n        // forge-lint: disable-next-line(unsafe-typecast)\n        binTotals.scaledToken0 = uint128(uint256(binTotals.scaledToken0) - totalToken0ToRemoveScaled);\n      }\n      if (totalToken1ToRemoveScaled > 0) {\n        // forge-lint: disable-next-line(unsafe-typecast)\n        binTotals.scaledToken1 = uint128(uint256(binTotals.scaledToken1) - totalToken1ToRemoveScaled);\n      }\n\n      (amount0Removed, amount1Removed) =\n        _deltasScaledToExternal(totalToken0ToRemoveScaled, totalToken1ToRemoveScaled, ctx, Math.Rounding.Floor);\n\n      if (amount0Removed > 0) {\n        IERC20(ctx.token0).safeTransfer(owner, amount0Removed);\n      }\n      if (amount1Removed > 0) {\n        IERC20(ctx.token1).safeTransfer(owner, amount1Removed);\n      }\n\n      emit IMetricOmmPoolActions.LiquidityRemoved(owner, salt, deltas.binIdxs, binBalanceDeltas, deltas.shares);\n    }\n  }\n\n  // ---- Internal helpers (inlined into the public functions above) ----\n\n  function _loadContext() internal view returns (PoolContext memory ctx) {\n    PoolImmutables memory imm = IMetricOmmPool(address(this)).getImmutables();\n    (, int16 curBinIdx, uint104 curPosInBin,,,,) = PoolStateLibrary._slot0(address(this));\n    ctx = PoolContext({\n      token0: imm.token0,\n      token1: imm.token1,\n      token0ScaleMultiplier: imm.token0ScaleMultiplier,\n      token1ScaleMultiplier: imm.token1ScaleMultiplier,\n      initialScaledToken0PerShareE18: imm.initialScaledToken0PerShareE18,\n      initialScaledToken1PerShareE18: imm.initialScaledToken1PerShareE18,\n      minimalOperationalLiquidity: imm.minimalOperationalLiquidity,\n      lowestBin: imm.lowestBin,\n      highestBin: imm.highestBin,\n      // forge-lint: disable-next-line(unsafe-typecast)\n      curBinIdx: int256(curBinIdx),\n      curPosInBin: curPosInBin\n    });\n  }\n\n  /// @notice Deterministic key for position-bin shares; must match `PoolStateLibrary._toPositionBinKey`.\n  function _positionBinKey(address owner, uint80 salt, int16 bin) internal pure returns (bytes32 key) {\n    // forge-lint: disable-next-line(asm-keccak256)\n    return keccak256(abi.encode(owner, salt, bin));\n  }\n\n  function _deltasScaledToExternal(\n    uint256 scaledDeltaAmount0,\n    uint256 scaledDeltaAmount1,\n    PoolContext memory ctx,\n    Math.Rounding rounding\n  ) internal pure returns (uint256 deltaAmount0, uint256 deltaAmount1) {\n    if (rounding == Math.Rounding.Ceil) {\n      deltaAmount0 = Math.ceilDiv(scaledDeltaAmount0, ctx.token0ScaleMultiplier);\n      deltaAmount1 = Math.ceilDiv(scaledDeltaAmount1, ctx.token1ScaleMultiplier);\n    } else {\n      deltaAmount0 = scaledDeltaAmount0 / ctx.token0ScaleMultiplier;\n      deltaAmount1 = scaledDeltaAmount1 / ctx.token1ScaleMultiplier;\n    }\n  }\n}\n"},"contracts/ExtensionCalling.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\nimport {IMetricOmmExtensions} from \"./interfaces/extensions/IMetricOmmExtensions.sol\";\nimport {CallExtension} from \"./libraries/CallExtension.sol\";\nimport {LiquidityDelta} from \"./types/PoolOperation.sol\";\nimport {PoolExtensions, ExtensionOrders} from \"./types/PoolExtensionsConfig.sol\";\n\n/// @title ExtensionCalling\n/// @notice Abstract base holding per-pool extension immutables and ordered extension invocation.\n/// @dev Extensions are numbered 1-7 (`EXTENSION_1`..`EXTENSION_7`). Each action has a packed order word of 3-bit\n///      extension indices, least significant group first, terminated by a zero group (see `ExtensionOrders`).\n///      Extensions run sequentially in that order; any revert, malformed response, or wrong returned selector\n///      reverts the whole action.\nabstract contract ExtensionCalling {\n  /// @dev Should never happen if factory validates extensions config.\n  error PanicInvalidExtensionIndex();\n  /// @dev Should never happen if factory validates extensions config.\n  error PanicEmptyExtension();\n\n  address internal immutable EXTENSION_1;\n  address internal immutable EXTENSION_2;\n  address internal immutable EXTENSION_3;\n  address internal immutable EXTENSION_4;\n  address internal immutable EXTENSION_5;\n  address internal immutable EXTENSION_6;\n  address internal immutable EXTENSION_7;\n  /// @dev Order of extension calls for before add liquidity.\n  uint256 internal immutable BEFORE_ADD_LIQUIDITY_ORDER;\n  /// @dev Order of extension calls for after add liquidity.\n  uint256 internal immutable AFTER_ADD_LIQUIDITY_ORDER;\n  /// @dev Order of extension calls for before remove liquidity.\n  uint256 internal immutable BEFORE_REMOVE_LIQUIDITY_ORDER;\n  /// @dev Order of extension calls for after remove liquidity.\n  uint256 internal immutable AFTER_REMOVE_LIQUIDITY_ORDER;\n  /// @dev Order of extension calls for before swap.\n  uint256 internal immutable BEFORE_SWAP_ORDER;\n  /// @dev Order of extension calls for after swap.\n  uint256 internal immutable AFTER_SWAP_ORDER;\n\n  constructor(PoolExtensions memory extensions, ExtensionOrders memory extensionOrders) {\n    EXTENSION_1 = extensions.extension1;\n    EXTENSION_2 = extensions.extension2;\n    EXTENSION_3 = extensions.extension3;\n    EXTENSION_4 = extensions.extension4;\n    EXTENSION_5 = extensions.extension5;\n    EXTENSION_6 = extensions.extension6;\n    EXTENSION_7 = extensions.extension7;\n    BEFORE_ADD_LIQUIDITY_ORDER = extensionOrders.beforeAddLiquidity;\n    AFTER_ADD_LIQUIDITY_ORDER = extensionOrders.afterAddLiquidity;\n    BEFORE_REMOVE_LIQUIDITY_ORDER = extensionOrders.beforeRemoveLiquidity;\n    AFTER_REMOVE_LIQUIDITY_ORDER = extensionOrders.afterRemoveLiquidity;\n    BEFORE_SWAP_ORDER = extensionOrders.beforeSwap;\n    AFTER_SWAP_ORDER = extensionOrders.afterSwap;\n  }\n\n  /// @dev Reverts with `PanicInvalidExtensionIndex` for 0 or any index above 7.\n  function _extensionAddress(uint256 extensionIndex) internal view returns (address extension) {\n    if (extensionIndex < 4) {\n      if (extensionIndex < 2) {\n        if (extensionIndex == 1) return EXTENSION_1;\n        revert PanicInvalidExtensionIndex();\n      } else {\n        if (extensionIndex == 2) return EXTENSION_2;\n        return EXTENSION_3;\n      }\n    } else if (extensionIndex < 8) {\n      if (extensionIndex < 6) {\n        if (extensionIndex == 4) return EXTENSION_4;\n        return EXTENSION_5;\n      } else {\n        if (extensionIndex == 6) return EXTENSION_6;\n        return EXTENSION_7;\n      }\n    } else {\n      revert PanicInvalidExtensionIndex();\n    }\n  }\n\n  /// @dev Walks `order` three bits at a time until a zero group or an exhausted word; an order of 0 calls nothing.\n  ///      Reverts with `PanicEmptyExtension` if an indexed slot holds the zero address.\n  function _callExtensionsInOrder(uint256 order, bytes memory data) private {\n    if (order == 0) return;\n\n    while (true) {\n      uint256 extensionIndex = order & 0x7;\n      if (extensionIndex == 0) break;\n      address extension = _extensionAddress(extensionIndex);\n      if (extension == address(0)) revert PanicEmptyExtension();\n      CallExtension.callExtension(extension, data);\n      order >>= 3;\n    }\n  }\n\n  function _beforeAddLiquidity(\n    address sender,\n    address owner,\n    uint80 salt,\n    LiquidityDelta calldata deltas,\n    bytes calldata extensionData\n  ) internal {\n    _callExtensionsInOrder(\n      BEFORE_ADD_LIQUIDITY_ORDER,\n      abi.encodeCall(IMetricOmmExtensions.beforeAddLiquidity, (sender, owner, salt, deltas, extensionData))\n    );\n  }\n\n  function _afterAddLiquidity(\n    address sender,\n    address owner,\n    uint80 salt,\n    LiquidityDelta calldata deltas,\n    uint256 amount0Added,\n    uint256 amount1Added,\n    bytes calldata extensionData\n  ) internal {\n    _callExtensionsInOrder(\n      AFTER_ADD_LIQUIDITY_ORDER,\n      abi.encodeCall(\n        IMetricOmmExtensions.afterAddLiquidity, (sender, owner, salt, deltas, amount0Added, amount1Added, extensionData)\n      )\n    );\n  }\n\n  function _beforeRemoveLiquidity(\n    address sender,\n    address owner,\n    uint80 salt,\n    LiquidityDelta calldata deltas,\n    bytes calldata extensionData\n  ) internal {\n    _callExtensionsInOrder(\n      BEFORE_REMOVE_LIQUIDITY_ORDER,\n      abi.encodeCall(IMetricOmmExtensions.beforeRemoveLiquidity, (sender, owner, salt, deltas, extensionData))\n    );\n  }\n\n  function _afterRemoveLiquidity(\n    address sender,\n    address owner,\n    uint80 salt,\n    LiquidityDelta calldata deltas,\n    uint256 amount0Removed,\n    uint256 amount1Removed,\n    bytes calldata extensionData\n  ) internal {\n    _callExtensionsInOrder(\n      AFTER_REMOVE_LIQUIDITY_ORDER,\n      abi.encodeCall(\n        IMetricOmmExtensions.afterRemoveLiquidity,\n        (sender, owner, salt, deltas, amount0Removed, amount1Removed, extensionData)\n      )\n    );\n  }\n\n  function _beforeSwap(\n    address sender,\n    address recipient,\n    bool zeroForOne,\n    int128 amountSpecified,\n    uint128 priceLimitX64,\n    uint256 packedSlot0Initial,\n    uint128 bidPriceX64,\n    uint128 askPriceX64,\n    uint128 referencePriceX64,\n    bytes calldata extensionData\n  ) internal {\n    _callExtensionsInOrder(\n      BEFORE_SWAP_ORDER,\n      abi.encodeCall(\n        IMetricOmmExtensions.beforeSwap,\n        (\n          sender,\n          recipient,\n          zeroForOne,\n          amountSpecified,\n          priceLimitX64,\n          packedSlot0Initial,\n          bidPriceX64,\n          askPriceX64,\n          referencePriceX64,\n          extensionData\n        )\n      )\n    );\n  }\n\n  function _afterSwap(\n    address sender,\n    address recipient,\n    bool zeroForOne,\n    int128 amountSpecified,\n    uint128 priceLimitX64,\n    uint256 packedSlot0Initial,\n    uint256 packedSlot0Final,\n    uint128 bidPriceX64,\n    uint128 askPriceX64,\n    uint128 referencePriceX64,\n    int128 amount0Delta,\n    int128 amount1Delta,\n    uint256 platformFeeAmount,\n    bytes calldata extensionData\n  ) internal {\n    _callExtensionsInOrder(\n      AFTER_SWAP_ORDER,\n      abi.encodeCall(\n        IMetricOmmExtensions.afterSwap,\n        (\n          sender,\n          recipient,\n          zeroForOne,\n          amountSpecified,\n          priceLimitX64,\n          packedSlot0Initial,\n          packedSlot0Final,\n          bidPriceX64,\n          askPriceX64,\n          referencePriceX64,\n          amount0Delta,\n          amount1Delta,\n          platformFeeAmount,\n          extensionData\n        )\n      )\n    );\n  }\n}\n"},"contracts/interfaces/IMetricOmmPool/IMetricOmmPool.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\nimport {IMetricOmmPoolActions} from \"./IMetricOmmPoolActions.sol\";\nimport {IMetricOmmPoolCollectFees} from \"./IMetricOmmPoolCollectFees.sol\";\nimport {IMetricOmmPoolFactoryActions} from \"./IMetricOmmPoolFactoryActions.sol\";\n\n/// @notice All constructor-set immutables of a `MetricOmmPool`, returned by `getImmutables()`.\n/// @dev Scale multipliers convert native token amounts to internal precision; initial scaled per-share\n///      amounts are the `createPool` inputs `initialScaledAmount{0,1}PerE18Shares`, stored unchanged.\nstruct PoolImmutables {\n  address factory;\n  address token0;\n  address token1;\n  /// @notice `10^(max(18, token0Decimals, token1Decimals) - token0Decimals)`.\n  uint256 token0ScaleMultiplier;\n  /// @notice `10^(max(18, token0Decimals, token1Decimals) - token1Decimals)`.\n  uint256 token1ScaleMultiplier;\n  /// @notice Scaled token0 per `1e18` shares minted into an empty bin (pro-rated by position in the current bin).\n  uint256 initialScaledToken0PerShareE18;\n  /// @notice Scaled token1 per `1e18` shares minted into an empty bin (pro-rated by position in the current bin).\n  uint256 initialScaledToken1PerShareE18;\n  /// @notice Minimum non-zero share delta per bin, and minimum non-zero leftover after removal.\n  uint256 minimalOperationalLiquidity;\n  /// @notice Fixed provider, or zero in mutable mode (read the provider from storage slot 3).\n  address immutablePriceProvider;\n  int256 lowestBin;\n  int256 highestBin;\n  address extension1;\n  address extension2;\n  address extension3;\n  address extension4;\n  address extension5;\n  address extension6;\n  address extension7;\n  uint256 beforeAddLiquidityOrder;\n  uint256 afterAddLiquidityOrder;\n  uint256 beforeRemoveLiquidityOrder;\n  uint256 afterRemoveLiquidityOrder;\n  uint256 beforeSwapOrder;\n  uint256 afterSwapOrder;\n}\n\n/// @title IMetricOmmPool\n/// @notice Full external API of `MetricOmmPool` for typing integrators and the factory.\n/// @dev Composition: user liquidity and swap (`IMetricOmmPoolActions`), factory fee sweep (`IMetricOmmPoolCollectFees`), factory-only pool controls (`IMetricOmmPoolFactoryActions`). User-facing custom errors are on `IMetricOmmPoolActions` (`InvalidBinIndex` is also raised by factory-only `setBinAdditionalFees`); factory-only errors are on `IMetricOmmPoolFactoryActions`. The reentrancy error `ReentrancyGuardReentrantCall` is declared on `MetricReentrancyGuardTransient`.\ninterface IMetricOmmPool is IMetricOmmPoolActions, IMetricOmmPoolCollectFees, IMetricOmmPoolFactoryActions {\n  /// @notice Return every constructor-set immutable in a single call.\n  /// @dev Immutables live in contract bytecode, not storage, so they cannot be read via EXTSLOAD.\n  function getImmutables() external view returns (PoolImmutables memory);\n\n  /// @notice Whether a live swap or `getSellAndBuyPrices` is executing and which price provider supplies its quotes.\n  /// @return priceProvider Active price provider during either; address(0) otherwise, including during simulation.\n  function inSwap() external view returns (address priceProvider);\n\n  /// @notice Live sell/buy prices (Q64.64) for token0 at the pool's current marginal bin position.\n  /// @dev Informational only — not a guaranteed executable quote. Sell = token0 → token1; buy = token1 → token0.\n  ///      Includes oracle spread, per-bin additional fees, and notional fees (zero-size exact-in marginal prices)\n  ///      via the active price provider (same path as `swap`). For real pricing/execution decisions, call `swap`\n  ///      and decide in the swap callback, or use the periphery quoter. The quote may update provider state.\n  ///      Shares the swap reentrancy guard; callable while paused, but not during another guarded action.\n  /// @return sellPriceX64 Fee-adjusted sell price (token1 per token0, Q64.64).\n  /// @return buyPriceX64 Fee-adjusted buy price (token1 per token0, Q64.64).\n  function getSellAndBuyPrices() external returns (uint128 sellPriceX64, uint128 buyPriceX64);\n}\n"},"contracts/interfaces/IMetricOmmPool/IMetricOmmPoolActions.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\nimport {BinBalanceDelta, LiquidityDelta} from \"../../types/PoolOperation.sol\";\nimport {Packed2Int128, Packed2Uint128, PackedSwapDetails} from \"../../types/Packed.sol\";\n\n/// @title IMetricOmmPoolActions\n/// @notice User-facing mutators on Metric OMM pools: liquidity (shares per bin) and swap execution.\n/// @dev State reads live on the concrete pool or libraries. Liquidity paths use native ERC20 amounts in callbacks; bin events carry scaled balances (`BinBalanceDelta`, see `PoolOperation.sol`). Successful `swap` consults the live price provider and is blocked when `pauseLevel != 0` (`PoolPaused`); `addLiquidity` / `removeLiquidity` are not gated by pause so ops policy can diverge (e.g. unwind while swaps are off).\ninterface IMetricOmmPoolActions {\n  // ============ Events: Liquidity ============\n\n  /// @notice Liquidity was minted into one or more bins for a single position key.\n  /// @dev Arrays are parallel: `binIdxs[i]`, `binBalanceDeltas[i]`, and `shares[i]` describe the same bin. Zero-share rows remain in the arrays with zero deltas; indexers can reconcile bins from `binBalanceDeltas` (scaled) separately from callback token flows (native).\n  /// @param provider `owner` leg of the position key; indexed for position-scoped subscriptions.\n  /// @param salt `salt` leg of the position key; indexed with `provider` to disambiguate positions.\n  /// @param binIdxs Bin index per input row (pool-configured range).\n  /// @param binBalanceDeltas Scaled token0/token1 balance change inside each bin (`BinBalanceDelta`); not wallet transfer amounts.\n  /// @param shares Liquidity shares minted per input row for this position.\n  event LiquidityAdded(\n    address indexed provider,\n    uint80 indexed salt,\n    int256[] binIdxs,\n    BinBalanceDelta[] binBalanceDeltas,\n    uint256[] shares\n  );\n\n  /// @notice Liquidity was burned from one or more bins for a single position key.\n  /// @dev Same parallel-array layout as `LiquidityAdded`. `removeLiquidity` requires `msg.sender == owner`, so the position key always matches the caller for this event.\n  /// @param provider Position owner (equals `msg.sender` for the removing call).\n  /// @param salt Position salt with `provider` in the key.\n  /// @param binIdxs Bin index per input row.\n  /// @param binBalanceDeltas Scaled balance change per bin (non-positive: tokens leaving the bin).\n  /// @param shares Shares burned per input row.\n  event LiquidityRemoved(\n    address indexed provider,\n    uint80 indexed salt,\n    int256[] binIdxs,\n    BinBalanceDelta[] binBalanceDeltas,\n    uint256[] shares\n  );\n\n  // ============ Events: Swap ============\n\n  /// @notice One step of routing updated a bin during `swap` (may emit multiple times per call).\n  /// @dev Refer to types/Packed.sol to decode the packed values.\n  /// @param binIdx Bin touched in this step.\n  /// @param binDeltas Change in THAT BIN's scaled balances, packed: `high` = token0, `low` = token1.\n  /// @param fees This step's two fee legs, packed: `high` = LP leg (stays in the bin), `low` = platform leg (protocol + admin, withheld). Scaled units.\n  event BinSwapped(int256 binIdx, Packed2Int128 binDeltas, Packed2Uint128 fees);\n\n  /// @notice Terminal summary after a successful `swap`.\n  /// @dev Refer to types/Packed.sol to decode the packed values.\n  /// @param sender `msg.sender` of `swap` (the account that may receive swap callback).\n  /// @param recipient Address that received the output token leg.\n  /// @param details Swap mode and resulting bin position packed into one word: `exactInput()`,\n  ///        `binIdx()` (signed), `posInBin()`. Check details in PackedSwapDetailsLib.\n  /// @param amountDeltas Net native-token flows for the whole call, packed: `high` = token0, `low` = token1 (positive = the pool gained that token).\n  /// @param platformFees Platform (protocol + admin) fee for this swap on the input-token leg, packed: `high` = SPREAD leg, `low` = NOTIONAL leg. Scaled units.\n  event Swap(\n    address indexed sender,\n    address indexed recipient,\n    PackedSwapDetails details,\n    Packed2Int128 amountDeltas,\n    Packed2Uint128 platformFees\n  );\n\n  // ============ Errors: Liquidity ============\n\n  /// @notice Add or remove share delta is below the pool operational floor.\n  /// @dev Raised when non-zero `sharesToAdd` / `sharesToRemove` is `< MINIMAL_OPERATIONAL_LIQUIDITY`.\n  /// @param binIdx Bin where the offending delta was applied.\n  /// @param sharesDelta Offending share delta.\n  /// @param minimalRequired Pool immutable `MINIMAL_OPERATIONAL_LIQUIDITY`.\n  error SharesDeltaSmallerThanMinimalOperationalLiquidity(int256 binIdx, uint256 sharesDelta, uint256 minimalRequired);\n\n  /// @notice Remove would leave a non-zero position below the pool operational floor.\n  /// @dev Raised when leftover shares are `> 0` and `< MINIMAL_OPERATIONAL_LIQUIDITY`; remove more or exit to zero.\n  /// @param binIdx Bin where the leftover would remain.\n  /// @param leftovers Remaining shares after the attempted remove.\n  /// @param minimalRequired Pool immutable `MINIMAL_OPERATIONAL_LIQUIDITY`.\n  error LeftoversSmallerThanMinimalOperationalLiquidity(int256 binIdx, uint256 leftovers, uint256 minimalRequired);\n\n  /// @notice Burn asked for more shares than exist for that position in a bin.\n  /// @param requested `deltas.shares[i]` for the offending bin.\n  /// @param available Shares recorded for `owner`+`salt` in that bin when this entry is processed.\n  error InsufficientLiquidity(uint256 requested, uint256 available);\n\n  /// @notice The modify-liquidity callback sent fewer tokens than the pool debt for this add.\n  /// @dev Fires after the pool computed required `amount0`/`amount1` and invoked `msg.sender`; safe for retry once the callback actually pays.\n  error InsufficientTokenBalance();\n\n  /// @notice `removeLiquidity` caller is not the position owner.\n  /// @dev Only `owner` may burn; `addLiquidity` may use a different `msg.sender` when `owner` is supplied, but removal is stricter.\n  error NotPositionOwner();\n\n  /// @notice Deposit allowlist rejected this `owner` for `addLiquidity`.\n  /// @dev Never reverted by the pool itself; gating extensions raise it from the add-liquidity extension points.\n  error NotAllowedToDeposit();\n\n  /// @notice `LiquidityDelta` arrays are not the same length.\n  /// @dev Checked only for non-empty `binIdxs`; an empty array returns `(0, 0)`.\n  error LiquidityDeltaLengthMismatch();\n\n  /// @notice A bin index in `deltas.binIdxs` (or `setBinAdditionalFees`) is outside this pool’s\n  ///         `[LOWEST_BIN, HIGHEST_BIN]`.\n  /// @param binIdx First failing index from the caller payload.\n  error InvalidBinIndex(int256 binIdx);\n\n  /// @notice A row's shares exceed `type(uint192).max`, or its required scaled token amount exceeds `type(uint104).max`.\n  /// @dev Overflow of the resulting bin or pool totals reverts with a `SafeCast` error instead.\n  error SharesAmountTooLarge();\n\n  // ============ Errors: Swap ============\n\n  /// @notice Swap callback paid less than the input amount the pool requested.\n  /// @dev Distinct from `InsufficientTokenBalance` (liquidity path); the swap callback left the pool balance short of the input amount the pool requested.\n  error IncorrectDelta();\n\n  /// @notice Swap allowlist rejected the swap `sender` (`msg.sender` for `swap`, the supplied `sender` for `simulateSwapAndRevert`).\n  /// @dev Never reverted by the pool itself; gating extensions raise it from `beforeSwap`, which `swap` and `simulateSwapAndRevert` run identically.\n  error NotAllowedToSwap();\n\n  /// @notice `amountSpecified == 0` on `swap` / `simulateSwapAndRevert`.\n  error InvalidAmount();\n\n  /// @notice Swap math settled with a zero input or output delta (native units).\n  /// @dev After conversion to native units, either `amount0Delta` or `amount1Delta` is zero — e.g. price limit blocks all progress or amounts round away.\n  error FinalAmountIsZero();\n\n  /// @notice The scaled `amountSpecified` (native × token scale multiplier) exceeds `type(uint128).max`.\n  /// @dev Exact-output requests are capped to the pool's available output before this check.\n  error AmountScaledExceedsMax();\n\n  /// @notice A swap would write a bin's scaled token balance above `type(uint104).max`.\n  /// @dev Happens when the input credited to a bin would grow its incoming-side balance past the packed `BinState` width.\n  ///      That direction can remain blocked until liquidity is removed or the opposite swap drains the incoming side; prefer smaller bins / less dense liquidity.\n  /// @param attemptedScaledBalance The balance that would have been stored (internal scaled units).\n  error OverflowedOnFittingBinBalances(uint256 attemptedScaledBalance);\n\n  /// @notice Swaps are disabled while the pool pause level is non-zero.\n  /// @dev Pause level is factory-controlled; liquidity mutators are intentionally not blocked by the same check.\n  error PoolPaused();\n\n  /// @notice Bid price is not strictly below ask (`bidPriceX64 >= askPriceX64`).\n  /// @dev On `swap`, comes from the live `IPriceProvider` quote; on `simulateSwapAndRevert`, from the arguments you passed.\n  error BidGreaterThanAsk();\n\n  /// @notice Bid price was zero, so mid/spread cannot be formed.\n  /// @dev On `swap`, from the live provider; on `simulateSwapAndRevert`, from `bidPriceX64` you passed.\n  error BidIsZero();\n\n  /// @notice Reference price was not within `[bidPriceX64, askPriceX64]`, or was zero.\n  /// @dev On `swap`, from the live provider; on `simulateSwapAndRevert`, from `referencePriceX64` you passed.\n  error ReferencePriceOutOfRange();\n\n  /// @notice Bid/ask returns about the reference are too asymmetric for the pool's `bidAskRefAsymmetryX8` bound.\n  /// @dev With `r1 = reference/bid - 1`, `r2 = ask/reference - 1`, and `M = 1 + m` (`m` stored in X8), requires\n  ///      `1/M <= r1/r2 <= M`. Skipped when `bidAskRefAsymmetryX8 == type(uint16).max`. Otherwise a reference on bid/ask reverts.\n  error BidAskRefAsymmetryOutOfBounds();\n\n  /// @notice External call to the active `IPriceProvider` reverted or bubbled a failure.\n  /// @param reason Opaque revert data from the provider (decode off-chain if the provider documents errors).\n  error PriceProviderFailed(bytes reason);\n\n  /// @notice Deliberate revert carrying simulated swap deltas; no settlement callback or token transfers.\n  /// @dev Uses validated caller-supplied quotes and runs swap hooks, even while paused. All state changes revert.\n  ///      Both deltas must fit `int128` before `afterSwap`, despite the error using `int256` fields.\n  ///      Decode this error from revert data; execution failures propagate their own errors instead.\n  /// @param amount0Delta Net token0 the swap would move into (`>0`) or out of (`<0`) the pool (native decimals).\n  /// @param amount1Delta Net token1 the swap would move into or out of the pool (native decimals).\n  error SimulateSwap(int256 amount0Delta, int256 amount1Delta);\n\n  // ============ Mutating: Liquidity ============\n\n  /// @notice Mint shares across bins for `(owner, salt)`; pulls tokens via `IMetricOmmModifyLiquidityCallback` on `msg.sender`.\n  /// @dev Callback amounts round up per bin and again on conversion to native units; underpay reverts\n  ///      `InsufficientTokenBalance`. `msg.sender` pays but need not equal `owner`. Empty `binIdxs` skips hooks and callbacks.\n  /// @param owner Position owner encoded in the pool’s position key.\n  /// @param salt Caller-chosen second leg of the position key.\n  /// @param deltas Parallel `binIdxs` / `shares` arrays (see `LiquidityDelta`).\n  /// @param callbackData Opaque bytes forwarded unmodified to the modify-liquidity callback.\n  /// @param extensionData Opaque bytes forwarded to liquidity extensions (beforeAddLiquidity / afterAddLiquidity).\n  /// @return amount0Added Token0 amount the pool required from the callback (native).\n  /// @return amount1Added Token1 amount the pool required from the callback (native).\n  /// @dev Reverts `LiquidityDeltaLengthMismatch` when `binIdxs` is non-empty and its length differs from `shares`.\n  function addLiquidity(\n    address owner,\n    uint80 salt,\n    LiquidityDelta calldata deltas,\n    bytes calldata callbackData,\n    bytes calldata extensionData\n  ) external returns (uint256 amount0Added, uint256 amount1Added);\n\n  /// @notice Burn shares across bins for `(owner, salt)` and send underlying tokens to `owner`.\n  /// @dev Requires `msg.sender == owner` except for empty `binIdxs`, which returns `(0, 0)`.\n  ///      Payouts round down per bin and again on conversion to native units; no callback.\n  ///      Emptying the current bin resets its position to `0` for non-negative bins or `type(uint104).max` for negative bins.\n  /// @param owner Must equal `msg.sender`.\n  /// @param salt Position salt with `owner`.\n  /// @param deltas Parallel arrays of bins and share burns.\n  /// @param extensionData Opaque bytes forwarded to liquidity extensions (beforeRemoveLiquidity / afterRemoveLiquidity).\n  /// @return amount0Removed Total token0 sent from the pool to `owner` (native).\n  /// @return amount1Removed Total token1 sent from the pool to `owner` (native).\n  function removeLiquidity(address owner, uint80 salt, LiquidityDelta calldata deltas, bytes calldata extensionData)\n    external\n    returns (uint256 amount0Removed, uint256 amount1Removed);\n\n  // ============ Mutating: Swap ============\n\n  /// @notice Execute a spot swap against pool liquidity using live oracle prices.\n  /// @dev Pulls input from `msg.sender` through `IMetricOmmSwapCallback` after sending output to `recipient`.\n  /// @param recipient Address that receives the output token (sent before the callback; the swap reverts if the\n  ///        callback then underpays the input).\n  /// @param zeroForOne `true` sells token0 for token1 along the pool’s ordering.\n  /// @param amountSpecified Exact input if `>0`, exact output magnitude if `<0`, in native units of that leg.\n  ///        May be partially filled; check the returned deltas.\n  /// @param priceLimitX64 Fee-inclusive token1-per-token0 price in Q64.64: a floor when `zeroForOne`, a cap otherwise.\n  ///        Zero permits sells but prevents buys; rounding can significantly breach the bound for tiny amounts.\n  /// @param callbackData Opaque bytes forwarded to the swap callback.\n  /// @param extensionData Opaque bytes forwarded to swap extension point functions (beforeSwap / afterSwap).\n  /// @return amount0Delta Net token0 change for the pool (signed, native; positive = pool received).\n  /// @return amount1Delta Net token1 change for the pool (signed, native; positive = pool received).\n  function swap(\n    address recipient,\n    bool zeroForOne,\n    int128 amountSpecified,\n    uint128 priceLimitX64,\n    bytes calldata callbackData,\n    bytes calldata extensionData\n  ) external returns (int128 amount0Delta, int128 amount1Delta);\n\n  /// @notice Run swap math with caller-supplied bid/ask/reference; reverts with `SimulateSwap` on success or an execution error on failure.\n  /// @dev Does not use the pool’s live oracle prices for the mid—use for quotes/off-chain routing. Invokes the same swap extension point functions as `swap` when enabled; still enforces `priceLimitX64` and path logic; no ERC20 transfers or swap callback. Typical usage: `eth_call` or `try/catch` decoding `SimulateSwap`. `sender` is forwarded to the extension points as-is instead of `msg.sender`, so you can simulate as an arbitrary address (e.g. checking a sender-gated extension for a specific user) — safe only because the call always reverts and nothing persists.\n  /// @param sender Address forwarded to swap extension point functions in place of `msg.sender`; has no other effect since the call always reverts.\n  /// @param recipient Same as `swap` (forwarded to swap extension point functions).\n  /// @param zeroForOne Same as `swap`.\n  /// @param amountSpecified Same sign convention as `swap`.\n  /// @param priceLimitX64 Same encoding as `swap`.\n  /// @param bidPriceX64 Bid used for extension context and swap math in this simulation (Q64.64).\n  /// @param askPriceX64 Ask used for extension context and swap math in this simulation (Q64.64).\n  /// @param referencePriceX64 Reference price used as the mid/price-path anchor and for fee calculation in this simulation (Q64.64).\n  /// @param extensionData Opaque bytes forwarded to swap extension point functions (beforeSwap / afterSwap).\n  /// @return amount0Delta Unused in practice; values appear only on the reverting `SimulateSwap` error.\n  /// @return amount1Delta Unused in practice; values appear only on the reverting `SimulateSwap` error.\n  function simulateSwapAndRevert(\n    address sender,\n    address recipient,\n    bool zeroForOne,\n    int128 amountSpecified,\n    uint128 priceLimitX64,\n    uint128 bidPriceX64,\n    uint128 askPriceX64,\n    uint128 referencePriceX64,\n    bytes calldata extensionData\n  ) external returns (int128 amount0Delta, int128 amount1Delta);\n}\n"},"contracts/interfaces/IMetricOmmPool/IMetricOmmPoolCollectFees.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\n/// @title IMetricOmmPoolCollectFees\n/// @notice Allocate and distribute protocol and admin fee balances held on the pool.\n/// @dev Collection is factory-only. Unpaid allocations retain their split\n///      and are retried using the latest destinations. `ProtocolFeesCollected` reports amounts actually transferred.\ninterface IMetricOmmPoolCollectFees {\n  // ============ Events ============\n\n  event FeeTransferFailed(address indexed token, address indexed destination, uint256 amount);\n\n  /// @notice Emitted on every `collectFees` call; amounts are those actually transferred.\n  /// @param amount0ToProtocol Token0 amount sent to `protocolFeeDestination` (native).\n  /// @param amount1ToProtocol Token1 amount sent to `protocolFeeDestination` (native).\n  /// @param amount0ToAdmin Token0 amount sent to `adminFeeDestination` (native).\n  /// @param amount1ToAdmin Token1 amount sent to `adminFeeDestination` (native).\n  event ProtocolFeesCollected(\n    uint256 amount0ToProtocol, uint256 amount1ToProtocol, uint256 amount0ToAdmin, uint256 amount1ToAdmin\n  );\n\n  // ============ Mutating ============\n\n  /// @notice Allocate accrued fees using supplied rates, then attempt payouts including previously unpaid fees.\n  /// @dev Pending balances retain scaled rounding remainders; transfer failures do not revert allocation.\n  ///      Supported tokens must not move funds when reporting a failed transfer.\n  /// @param protocolSpreadFeeE6 Protocol spread component in E6 at collection time (must match factory policy).\n  /// @param adminSpreadFeeE6 Admin spread component in E6 at collection time.\n  /// @param protocolNotionalFeeE8 Protocol notional component in E8 at collection time.\n  /// @param adminNotionalFeeE8 Admin notional component in E8 at collection time.\n  /// @param adminFeeDestination Recipient for the admin share of collected tokens (per factory configuration).\n  /// @param protocolFeeDestination Recipient for the protocol share (the factory's `feeReceiver`).\n  function collectFees(\n    uint256 protocolSpreadFeeE6,\n    uint256 adminSpreadFeeE6,\n    uint256 protocolNotionalFeeE8,\n    uint256 adminNotionalFeeE8,\n    address adminFeeDestination,\n    address protocolFeeDestination\n  ) external;\n}\n"},"contracts/interfaces/IMetricOmmPool/IMetricOmmPoolFactoryActions.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\n/// @title IMetricOmmPoolFactoryActions\n/// @notice Entrypoints on `MetricOmmPool` that only the pool factory may call (`msg.sender == FACTORY`).\n/// @dev Integrators must use `MetricOmmPoolFactory` (owner or pool admin flows); calling these on the pool directly reverts with `OnlyFactory` unless `msg.sender` is the factory contract address.\ninterface IMetricOmmPoolFactoryActions {\n  // ============ Events ============\n\n  /// @notice Emitted when the platform share of the spread fee on the pool is updated.\n  /// @param spreadFeeE6 New platform share of the spread fee in E6 (`1e6 = 100%`).\n  event SpreadFeeUpdated(uint24 spreadFeeE6);\n\n  /// @notice Emitted when total notional fee on the pool is updated.\n  /// @param notionalFeeE8 New aggregate notional fee in E8 (`1e8 = 100%`).\n  event NotionalFeeUpdated(uint24 notionalFeeE8);\n\n  /// @notice Emitted when pause level changes.\n  /// @param previousLevel Prior pause level (`0` active, `1` admin pause, `2` protocol pause).\n  /// @param newLevel New pause level after the update.\n  event PauseLevelUpdated(uint8 previousLevel, uint8 newLevel);\n\n  /// @notice Emitted when the mutable price provider address stored on the pool is updated.\n  /// @param newPriceProvider New active `IPriceProvider` (immutable pools never emit this from rotation).\n  event PriceProviderUpdated(address indexed newPriceProvider);\n\n  /// @notice Emitted when per-bin additional spread fees are set.\n  /// @param bin Bin index whose overrides were updated.\n  /// @param addFeeBuyE6 Additional buy-side spread fee in E6 on top of base spread.\n  /// @param addFeeSellE6 Additional sell-side spread fee in E6 on top of base spread.\n  event BinAdditionalFeesUpdated(int16 indexed bin, uint16 addFeeBuyE6, uint16 addFeeSellE6);\n\n  /// @notice Emitted when bid/ask/ref asymmetry slack `m` in X8 is updated (`M = 1 + m`).\n  /// @param bidAskRefAsymmetryX8 New asymmetry bound; `type(uint16).max` disables the check.\n  event BidAskRefAsymmetryUpdated(uint16 bidAskRefAsymmetryX8);\n\n  // ============ Errors ============\n\n  /// @notice Thrown when `msg.sender` is not the pool factory.\n  error OnlyFactory();\n\n  /// @notice Thrown when `setPause` is called with a level outside `0..2`.\n  error InvalidPauseLevel();\n\n  // ============ Mutating ============\n\n  /// @notice Set aggregate pool spread and notional fee rates (sum of protocol + admin components).\n  /// @param newSpreadFeeE6 Platform share (protocol + admin) of the spread fee in E6 (`1e6 = 100%`).\n  /// @param newNotionalFeeE8 Total notional fee in E8 (`1e8 = 100%`).\n  function setPoolFees(uint24 newSpreadFeeE6, uint24 newNotionalFeeE8) external;\n\n  /// @notice Update bid/ask/reference asymmetry bound `m` in X8 (`type(uint16).max` disables the check).\n  function setBidAskRefAsymmetryX8(uint16 newBidAskRefAsymmetryX8) external;\n\n  /// @notice Set pool pause level (`0` active, `1` admin paused, `2` protocol paused).\n  /// @dev Transition rules are enforced by the factory, not the pool.\n  /// @param newLevel Pause level enforced by the pool; must be at most `2`.\n  function setPause(uint8 newLevel) external;\n\n  /// @notice Set per-bin additional buy and sell spread fees in E6 on top of base spread.\n  /// @param bin Bin index within the pool configured bin range.\n  /// @param addFeeBuyE6 Additional fee on swaps buying token0 (E6).\n  /// @param addFeeSellE6 Additional fee on swaps selling token0 (E6).\n  function setBinAdditionalFees(int16 bin, uint16 addFeeBuyE6, uint16 addFeeSellE6) external;\n\n  /// @notice Update the pool active price provider (the factory only calls this for pools created with a mutable provider).\n  /// @param newPriceProvider New provider contract; the factory validates its `token0`/`token1`, the pool stores it as given.\n  function setPriceProvider(address newPriceProvider) external;\n}\n"},"contracts/types/PoolExtensionsConfig.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\n/// @notice Each field encodes the invocation order for an extension action.\n/// @dev Pool contains up to 7 extensions that are numbered from 1 to 7 (1-based positions in the factory's `extensions` array).\n///      To encode invocation order we pack array of 3-bit (values 0-7) into a single uint256.\n///      Least significant slot is first element of the array.\n///      0 terminates the sequence; the factory rejects zero groups below a non-zero group and duplicate indices.\n///      The sequence defines which extensions will be called for a given action.\nstruct ExtensionOrders {\n  uint256 beforeAddLiquidity;\n  uint256 afterAddLiquidity;\n  uint256 beforeRemoveLiquidity;\n  uint256 afterRemoveLiquidity;\n  uint256 beforeSwap;\n  uint256 afterSwap;\n}\n\n/// @notice Contains addresses of all extensions that are configured for the pool.\nstruct PoolExtensions {\n  address extension1;\n  address extension2;\n  address extension3;\n  address extension4;\n  address extension5;\n  address extension6;\n  address extension7;\n}\n"},"contracts/interfaces/callbacks/IMetricOmmSwapCallback.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\n/// @title IMetricOmmSwapCallback\n/// @notice Callback invoked by the pool during `swap` so the caller can settle token flows with the pool.\n/// @dev Implementations must treat `msg.sender` as the pool they intended to call (verify against a known pool).\n///      Positive `amount0Delta` / `amount1Delta` mean the pool must receive that many native token units from the callback payer.\n///      Negative deltas mean the pool sends tokens out (handled by the pool before this callback for output legs).\ninterface IMetricOmmSwapCallback {\n  // ============ Mutating ============\n\n  /// @notice Settle token0 and token1 deltas for the swap on `msg.sender` (the pool).\n  /// @param amount0Delta Token0 delta from pool perspective: positive = pool must receive from payer.\n  /// @param amount1Delta Token1 delta from pool perspective: positive = pool must receive from payer.\n  /// @param callbackData Opaque bytes forwarded from swap; conventionally ABI-encoded router context.\n  function metricOmmSwapCallback(int256 amount0Delta, int256 amount1Delta, bytes calldata callbackData) external;\n}\n"},"contracts/Extsload.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\nimport {IExtsload} from \"./interfaces/IExtsload.sol\";\n\n/// @notice Enables public storage access for efficient state retrieval by external contracts.\n/// https://eips.ethereum.org/EIPS/eip-2330#rationale\n/// forked from Uniswap v4-core\nabstract contract Extsload is IExtsload {\n  /// @inheritdoc IExtsload\n  function extsload(bytes32 slot) external view returns (bytes32) {\n    assembly (\"memory-safe\") {\n      mstore(0, sload(slot))\n      return(0, 0x20)\n    }\n  }\n\n  /// @inheritdoc IExtsload\n  function extsload(bytes32 startSlot, uint256 nSlots) external view returns (bytes32[] memory) {\n    assembly (\"memory-safe\") {\n      let memptr := mload(0x40)\n      let start := memptr\n      // A left bit-shift of 5 is equivalent to multiplying by 32 but costs less gas.\n      let length := shl(5, nSlots)\n      // The abi offset of dynamic array in the returndata is 32.\n      mstore(memptr, 0x20)\n      // Store the length of the array returned\n      mstore(add(memptr, 0x20), nSlots)\n      // update memptr to the first location to hold a result\n      memptr := add(memptr, 0x40)\n      let end := add(memptr, length)\n      for {} 1 {} {\n        mstore(memptr, sload(startSlot))\n        memptr := add(memptr, 0x20)\n        startSlot := add(startSlot, 1)\n        if iszero(lt(memptr, end)) { break }\n      }\n      return(start, sub(end, start))\n    }\n  }\n\n  /// @inheritdoc IExtsload\n  function extsload(bytes32[] calldata slots) external view returns (bytes32[] memory) {\n    assembly (\"memory-safe\") {\n      let memptr := mload(0x40)\n      let start := memptr\n      // for abi encoding the response - the array will be found at 0x20\n      mstore(memptr, 0x20)\n      // next we store the length of the return array\n      mstore(add(memptr, 0x20), slots.length)\n      // update memptr to the first location to hold an array entry\n      memptr := add(memptr, 0x40)\n      // A left bit-shift of 5 is equivalent to multiplying by 32 but costs less gas.\n      let end := add(memptr, shl(5, slots.length))\n      let calldataptr := slots.offset\n      for {} 1 {} {\n        mstore(memptr, sload(calldataload(calldataptr)))\n        memptr := add(memptr, 0x20)\n        calldataptr := add(calldataptr, 0x20)\n        if iszero(lt(memptr, end)) { break }\n      }\n      return(start, sub(end, start))\n    }\n  }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/Panic.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Helper library for emitting standardized panic codes.\n *\n * ```solidity\n * contract Example {\n *      using Panic for uint256;\n *\n *      // Use any of the declared internal constants\n *      function foo() { Panic.GENERIC.panic(); }\n *\n *      // Alternatively\n *      function foo() { Panic.panic(Panic.GENERIC); }\n * }\n * ```\n *\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\n *\n * _Available since v5.1._\n */\n// slither-disable-next-line unused-state\nlibrary Panic {\n    /// @dev generic / unspecified error\n    uint256 internal constant GENERIC = 0x00;\n    /// @dev used by the assert() builtin\n    uint256 internal constant ASSERT = 0x01;\n    /// @dev arithmetic underflow or overflow\n    uint256 internal constant UNDER_OVERFLOW = 0x11;\n    /// @dev division or modulo by zero\n    uint256 internal constant DIVISION_BY_ZERO = 0x12;\n    /// @dev enum conversion error\n    uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\n    /// @dev invalid encoding in storage\n    uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\n    /// @dev empty array pop\n    uint256 internal constant EMPTY_ARRAY_POP = 0x31;\n    /// @dev array out of bounds access\n    uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\n    /// @dev resource error (too large allocation or too large array)\n    uint256 internal constant RESOURCE_ERROR = 0x41;\n    /// @dev calling invalid internal function\n    uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\n\n    /// @dev Reverts with a panic code. Recommended to use with\n    /// the internal constants with predefined codes.\n    function panic(uint256 code) internal pure {\n        assembly (\"memory-safe\") {\n            mstore(0x00, 0x4e487b71)\n            mstore(0x20, code)\n            revert(0x1c, 0x24)\n        }\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/TransientSlot.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/TransientSlot.sol)\n// This file was procedurally generated from scripts/generate/templates/TransientSlot.js.\n\npragma solidity ^0.8.24;\n\n/**\n * @dev Library for reading and writing value-types to specific transient storage slots.\n *\n * Transient slots are often used to store temporary values that are removed after the current transaction.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n *  * Example reading and writing values using transient storage:\n * ```solidity\n * contract Lock {\n *     using TransientSlot for *;\n *\n *     // Define the slot. Alternatively, use the SlotDerivation library to derive the slot.\n *     bytes32 internal constant _LOCK_SLOT = 0xf4678858b2b588224636b8522b729e7722d32fc491da849ed75b3fdf3c84f542;\n *\n *     modifier locked() {\n *         require(!_LOCK_SLOT.asBoolean().tload());\n *\n *         _LOCK_SLOT.asBoolean().tstore(true);\n *         _;\n *         _LOCK_SLOT.asBoolean().tstore(false);\n *     }\n * }\n * ```\n *\n * TIP: Consider using this library along with {SlotDerivation}.\n */\nlibrary TransientSlot {\n    /**\n     * @dev UDVT that represents a slot holding an address.\n     */\n    type AddressSlot is bytes32;\n\n    /**\n     * @dev Cast an arbitrary slot to a AddressSlot.\n     */\n    function asAddress(bytes32 slot) internal pure returns (AddressSlot) {\n        return AddressSlot.wrap(slot);\n    }\n\n    /**\n     * @dev UDVT that represents a slot holding a bool.\n     */\n    type BooleanSlot is bytes32;\n\n    /**\n     * @dev Cast an arbitrary slot to a BooleanSlot.\n     */\n    function asBoolean(bytes32 slot) internal pure returns (BooleanSlot) {\n        return BooleanSlot.wrap(slot);\n    }\n\n    /**\n     * @dev UDVT that represents a slot holding a bytes32.\n     */\n    type Bytes32Slot is bytes32;\n\n    /**\n     * @dev Cast an arbitrary slot to a Bytes32Slot.\n     */\n    function asBytes32(bytes32 slot) internal pure returns (Bytes32Slot) {\n        return Bytes32Slot.wrap(slot);\n    }\n\n    /**\n     * @dev UDVT that represents a slot holding a uint256.\n     */\n    type Uint256Slot is bytes32;\n\n    /**\n     * @dev Cast an arbitrary slot to a Uint256Slot.\n     */\n    function asUint256(bytes32 slot) internal pure returns (Uint256Slot) {\n        return Uint256Slot.wrap(slot);\n    }\n\n    /**\n     * @dev UDVT that represents a slot holding a int256.\n     */\n    type Int256Slot is bytes32;\n\n    /**\n     * @dev Cast an arbitrary slot to a Int256Slot.\n     */\n    function asInt256(bytes32 slot) internal pure returns (Int256Slot) {\n        return Int256Slot.wrap(slot);\n    }\n\n    /**\n     * @dev Load the value held at location `slot` in transient storage.\n     */\n    function tload(AddressSlot slot) internal view returns (address value) {\n        assembly (\"memory-safe\") {\n            value := tload(slot)\n        }\n    }\n\n    /**\n     * @dev Store `value` at location `slot` in transient storage.\n     */\n    function tstore(AddressSlot slot, address value) internal {\n        assembly (\"memory-safe\") {\n            tstore(slot, value)\n        }\n    }\n\n    /**\n     * @dev Load the value held at location `slot` in transient storage.\n     */\n    function tload(BooleanSlot slot) internal view returns (bool value) {\n        assembly (\"memory-safe\") {\n            value := tload(slot)\n        }\n    }\n\n    /**\n     * @dev Store `value` at location `slot` in transient storage.\n     */\n    function tstore(BooleanSlot slot, bool value) internal {\n        assembly (\"memory-safe\") {\n            tstore(slot, value)\n        }\n    }\n\n    /**\n     * @dev Load the value held at location `slot` in transient storage.\n     */\n    function tload(Bytes32Slot slot) internal view returns (bytes32 value) {\n        assembly (\"memory-safe\") {\n            value := tload(slot)\n        }\n    }\n\n    /**\n     * @dev Store `value` at location `slot` in transient storage.\n     */\n    function tstore(Bytes32Slot slot, bytes32 value) internal {\n        assembly (\"memory-safe\") {\n            tstore(slot, value)\n        }\n    }\n\n    /**\n     * @dev Load the value held at location `slot` in transient storage.\n     */\n    function tload(Uint256Slot slot) internal view returns (uint256 value) {\n        assembly (\"memory-safe\") {\n            value := tload(slot)\n        }\n    }\n\n    /**\n     * @dev Store `value` at location `slot` in transient storage.\n     */\n    function tstore(Uint256Slot slot, uint256 value) internal {\n        assembly (\"memory-safe\") {\n            tstore(slot, value)\n        }\n    }\n\n    /**\n     * @dev Load the value held at location `slot` in transient storage.\n     */\n    function tload(Int256Slot slot) internal view returns (int256 value) {\n        assembly (\"memory-safe\") {\n            value := tload(slot)\n        }\n    }\n\n    /**\n     * @dev Store `value` at location `slot` in transient storage.\n     */\n    function tstore(Int256Slot slot, int256 value) internal {\n        assembly (\"memory-safe\") {\n            tstore(slot, value)\n        }\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/interfaces/IERC1363.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\n\npragma solidity >=0.6.2;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @title IERC1363\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\n *\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\n */\ninterface IERC1363 is IERC20, IERC165 {\n    /*\n     * Note: the ERC-165 identifier for this interface is 0xb0202a11.\n     * 0xb0202a11 ===\n     *   bytes4(keccak256('transferAndCall(address,uint256)')) ^\n     *   bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\n     *   bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\n     *   bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\n     *   bytes4(keccak256('approveAndCall(address,uint256)')) ^\n     *   bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\n     */\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferAndCall(address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @param data Additional data with no specified format, sent in call to `to`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param from The address which you want to send tokens from.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param from The address which you want to send tokens from.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @param data Additional data with no specified format, sent in call to `to`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n     * @param spender The address which will spend the funds.\n     * @param value The amount of tokens to be spent.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function approveAndCall(address spender, uint256 value) external returns (bool);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n     * @param spender The address which will spend the funds.\n     * @param value The amount of tokens to be spent.\n     * @param data Additional data with no specified format, sent in call to `spender`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\n}\n"},"contracts/types/Slot0.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\n/// @dev Decoded storage slot 0; pack/unpack via `Slot0Library`.\nstruct PoolSlot0 {\n  uint8 pauseLevel;\n  int16 curBinIdx;\n  uint104 curPosInBin;\n  int24 curBinDistFromProvidedPriceE6;\n  uint24 spreadFeeE6;\n  uint24 notionalFeeE8;\n  /// @dev `m` in X8 (`M = 1 + m`). `type(uint16).max` disables the check.\n  uint16 bidAskRefAsymmetryX8;\n}\n"},"contracts/interfaces/callbacks/IMetricOmmModifyLiquidityCallback.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\n/// @title IMetricOmmModifyLiquidityCallback\n/// @notice Callback invoked by the pool during `addLiquidity` (unless nothing is owed) so the caller can transfer\n///         tokens owed to the pool.\n/// @dev Implementations must treat `msg.sender` as the pool address they intended to call (verify against a known pool).\n///      After the callback returns, the pool checks balances: for each token, if the owed delta is positive, the pool\n///      balance must have increased by at least that amount or the call reverts.\ninterface IMetricOmmModifyLiquidityCallback {\n  // ============ Mutating ============\n\n  /// @notice Pay token0 and token1 amounts owed to the pool after liquidity is added.\n  /// @param amount0Delta Token0 amount the pool must receive (native smallest units).\n  /// @param amount1Delta Token1 amount the pool must receive (native smallest units).\n  /// @param callbackData Opaque bytes forwarded from addLiquidity; conventionally ABI-encoded router context.\n  function metricOmmModifyLiquidityCallback(uint256 amount0Delta, uint256 amount1Delta, bytes calldata callbackData)\n    external;\n}\n"},"contracts/libraries/PoolStateLibrary.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\nimport {SafeCast} from \"@openzeppelin/contracts/utils/math/SafeCast.sol\";\nimport {IExtsload} from \"../interfaces/IExtsload.sol\";\nimport {PoolSlot0} from \"../types/Slot0.sol\";\nimport {Slot0Library} from \"./Slot0Library.sol\";\n\n/// @title PoolStateLibrary\n/// @notice Read MetricOmmPool mutable storage via EXTSLOAD; immutables use the pool's `getImmutables()`.\n/// @dev Contract coupling: this library is tightly coupled to `contracts/MetricOmmPool.sol` storage\n///      layout and packing. Any storage reorder or repack in the pool is a breaking change for\n///      EXTSLOAD readers (including off-chain integrations using these slot calculations).\n/// @dev Constants and packing must match MetricOmmPool storage layout exactly.\n///\n/// Storage Layout:\n/// Slot 0: pauseLevel(uint8,0) | curBinIdx(int16,8) | curPosInBin(uint104,24) | curBinDistE6(int24,128) |\n///         spreadFeeE6(uint24,152) | notionalFeeE8(uint24,176) | bidAskRefAsymmetryX8(uint16,200)\n/// Slot 1: binTotals.scaledToken0(uint128,0) | binTotals.scaledToken1(uint128,128)\n/// Slot 2: notionalFeeToken0Scaled(uint128,0) | notionalFeeToken1Scaled(uint128,128)\n/// Slot 3: priceProvider(address) (mutable mode; immutable oracle is an immutable on the pool)\n/// Slot 4: _binStates mapping(int256 => BinState)\n/// Slot 5: _binTotalShares mapping(int256 => uint256)\n/// Slot 6: _positionBinShares mapping(bytes32 => uint256)\n/// Slot 7: pendingAdminFeeToken0Scaled(uint256)\n/// Slot 8: pendingAdminFeeToken1Scaled(uint256)\n/// Slot 9: pendingProtocolFeeToken0Scaled(uint256)\n/// Slot 10: pendingProtocolFeeToken1Scaled(uint256)\n/// @dev Bin indices are treated as `int16` throughout pool configuration; the factory caps the grid at\n///      32,768 bins per side so keys computed here match the `int256` mapping keys on the pool.\n/// @dev This library intentionally exposes underscored helpers to keep call sites explicit.\nlibrary PoolStateLibrary {\n  using SafeCast for uint256;\n  using SafeCast for int256;\n\n  uint256 internal constant SLOT0 = 0;\n  uint256 internal constant SLOT1_TOTALS = 1;\n  uint256 internal constant SLOT2_NOTIONAL_ACCUMULATORS = 2;\n  uint256 internal constant SLOT3_PRICE_PROVIDER = 3;\n  uint256 internal constant MAPPING_BIN_STATES = 4;\n  uint256 internal constant MAPPING_BIN_TOTAL_SHARES = 5;\n  uint256 internal constant MAPPING_POSITION_BIN_SHARES = 6;\n  uint256 internal constant SLOT7_PENDING_FEES = 7;\n\n  // ========= Slot0 =========\n\n  function _decodeSlot0(bytes32 data)\n    internal\n    pure\n    returns (\n      uint8 pauseLevel,\n      int16 curBinIdx,\n      uint104 curPosInBin,\n      int24 curBinDistFromProvidedPriceE6,\n      uint24 spreadFeeE6,\n      uint24 notionalFeeE8,\n      uint16 bidAskRefAsymmetryX8\n    )\n  {\n    PoolSlot0 memory s = Slot0Library.unpack(uint256(data));\n    pauseLevel = s.pauseLevel;\n    curBinIdx = s.curBinIdx;\n    curPosInBin = s.curPosInBin;\n    curBinDistFromProvidedPriceE6 = s.curBinDistFromProvidedPriceE6;\n    spreadFeeE6 = s.spreadFeeE6;\n    notionalFeeE8 = s.notionalFeeE8;\n    bidAskRefAsymmetryX8 = s.bidAskRefAsymmetryX8;\n  }\n\n  /// @notice Get all slot0 values in a single call\n  function _slot0(address pool)\n    internal\n    view\n    returns (\n      uint8 _pauseLevel,\n      int16 _curBinIdx,\n      uint104 _curPosInBin,\n      int24 _curBinDistFromProvidedPriceE6,\n      uint24 _spreadFeeE6,\n      uint24 _notionalFeeE8,\n      uint16 _bidAskRefAsymmetryX8\n    )\n  {\n    bytes32 slot0 = IExtsload(pool).extsload(bytes32(uint256(SLOT0)));\n    return _decodeSlot0(slot0);\n  }\n\n  // ========= Slot1 =========\n  function _decodeSlot1(bytes32 data)\n    internal\n    pure\n    returns (uint128 totalScaledToken0InBins, uint128 totalScaledToken1InBins)\n  {\n    uint256 packed = uint256(data);\n    // forge-lint: disable-next-line(unsafe-typecast)\n    totalScaledToken0InBins = uint128(packed & type(uint128).max);\n    // forge-lint: disable-next-line(unsafe-typecast)\n    totalScaledToken1InBins = uint128(packed >> 128);\n  }\n\n  /// @notice Get all slot1 values in a single call\n  function _slot1(address pool)\n    internal\n    view\n    returns (uint128 _totalScaledToken0InBins, uint128 _totalScaledToken1InBins)\n  {\n    bytes32 data = IExtsload(pool).extsload(bytes32(uint256(SLOT1_TOTALS)));\n    return _decodeSlot1(data);\n  }\n\n  // ========= Slot2 =========\n  function _decodeSlot2(bytes32 data)\n    internal\n    pure\n    returns (uint128 notionalFeeToken0Scaled, uint128 notionalFeeToken1Scaled)\n  {\n    uint256 packed = uint256(data);\n    // forge-lint: disable-next-line(unsafe-typecast)\n    notionalFeeToken0Scaled = uint128(packed & type(uint128).max);\n    // forge-lint: disable-next-line(unsafe-typecast)\n    notionalFeeToken1Scaled = uint128(packed >> 128);\n  }\n\n  /// @notice Get all slot2 values in a single call\n  function _slot2(address pool)\n    internal\n    view\n    returns (uint128 _notionalFeeToken0Scaled, uint128 _notionalFeeToken1Scaled)\n  {\n    bytes32 data = IExtsload(pool).extsload(bytes32(uint256(SLOT2_NOTIONAL_ACCUMULATORS)));\n    return _decodeSlot2(data);\n  }\n\n  // ========= Slot3 =========\n  function _decodeSlot3(bytes32 data) internal pure returns (address priceProvider) {\n    // forge-lint: disable-next-line(unsafe-typecast)\n    priceProvider = address(uint160(uint256(data)));\n  }\n\n  /// @notice Get the price provider from slot3 (`address(0)` for pools with an immutable provider)\n  function _slot3(address pool) internal view returns (address _priceProvider) {\n    bytes32 data = IExtsload(pool).extsload(bytes32(uint256(SLOT3_PRICE_PROVIDER)));\n    return _decodeSlot3(data);\n  }\n\n  // ========= Slot4: Bins States =========\n\n  /// @notice Calculate the storage slot for a bin state\n  /// @dev For mapping(int256 => BinState), slot = keccak256(abi.encode(key, baseSlot)); `int16` keys match int256 encoding for values in int16 range.\n  function _calculateBinStateSlot(int16 binIdx) internal pure returns (bytes32 slot) {\n    uint256 baseSlot = MAPPING_BIN_STATES;\n    assembly {\n      mstore(0x00, binIdx)\n      mstore(0x20, baseSlot)\n      slot := keccak256(0x00, 0x40)\n    }\n  }\n\n  function _decodeBinState(bytes32 data)\n    internal\n    pure\n    returns (uint104 token0Balance, uint104 token1Balance, uint16 lengthE6, uint16 addFeeBuyE6, uint16 addFeeSellE6)\n  {\n    uint256 packed = uint256(data);\n    // forge-lint: disable-next-line(unsafe-typecast)\n    token0Balance = uint104(packed & type(uint104).max);\n    // forge-lint: disable-next-line(unsafe-typecast)\n    token1Balance = uint104((packed >> 104) & type(uint104).max);\n    // forge-lint: disable-next-line(unsafe-typecast)\n    lengthE6 = uint16((packed >> 208) & 0xFFFF);\n    // forge-lint: disable-next-line(unsafe-typecast)\n    addFeeBuyE6 = uint16((packed >> 224) & 0xFFFF);\n    // forge-lint: disable-next-line(unsafe-typecast)\n    addFeeSellE6 = uint16((packed >> 240) & 0xFFFF);\n  }\n\n  /// @notice Get bin state (scaled balances and configuration)\n  /// @dev BinState: token0BalanceScaled(uint104,0) | token1BalanceScaled(uint104,104) | lengthE6(uint16,208) | addFeeBuyE6(uint16,224) | addFeeSellE6(uint16,240)\n  function _binState(address pool, int16 binIdx)\n    internal\n    view\n    returns (\n      uint104 _token0Balance,\n      uint104 _token1Balance,\n      uint16 _lengthE6,\n      uint16 _addFeeBuyE6,\n      uint16 _addFeeSellE6\n    )\n  {\n    bytes32 slot = _calculateBinStateSlot(binIdx);\n    bytes32 data = IExtsload(pool).extsload(slot);\n    return _decodeBinState(data);\n  }\n\n  /// @notice Get bin states for multiple bins in batch\n  /// @dev Decode each returned item with `_decodeBinState`.\n  function _multipleBinStates(address pool, int16[] memory binIdxs)\n    internal\n    view\n    returns (bytes32[] memory binStatesAsBytes32)\n  {\n    uint256 length = binIdxs.length;\n\n    bytes32[] memory slots = new bytes32[](length);\n    for (uint256 i = 0; i < length; i++) {\n      slots[i] = _calculateBinStateSlot(binIdxs[i]);\n    }\n    binStatesAsBytes32 = IExtsload(pool).extsload(slots);\n  }\n\n  // ========= Slot5: Bin Total Shares =========\n\n  /// @notice Calculate the storage slot for bin total shares\n  function _calculateBinTotalSharesSlot(int16 binIdx) private pure returns (bytes32 slot) {\n    uint256 baseSlot = MAPPING_BIN_TOTAL_SHARES;\n    assembly {\n      mstore(0x00, binIdx)\n      mstore(0x20, baseSlot)\n      slot := keccak256(0x00, 0x40)\n    }\n  }\n\n  function _decodeBinTotalShares(bytes32 data) internal pure returns (uint256 totalShares) {\n    totalShares = uint256(data);\n  }\n\n  /// @notice Get bin total shares\n  function _binTotalShares(address pool, int16 binIdx) internal view returns (uint256) {\n    bytes32 slot = _calculateBinTotalSharesSlot(binIdx);\n    bytes32 data = IExtsload(pool).extsload(slot);\n    return _decodeBinTotalShares(data);\n  }\n\n  /// @notice Get bin total shares for multiple bins in batch\n  /// @dev Decode each returned item with `_decodeBinTotalShares`.\n  function _multipleBinTotalShares(address pool, int16[] memory binIdxs)\n    internal\n    view\n    returns (bytes32[] memory totalSharesAsBytes32)\n  {\n    uint256 length = binIdxs.length;\n\n    bytes32[] memory slots = new bytes32[](length);\n    for (uint256 i = 0; i < length; i++) {\n      slots[i] = _calculateBinTotalSharesSlot(binIdxs[i]);\n    }\n\n    totalSharesAsBytes32 = IExtsload(pool).extsload(slots);\n  }\n\n  // ========= Slot6: Position Bin Shares =========\n\n  // ========= Position Readers =========\n\n  /// @notice Calculate the storage slot for position bin shares\n  /// @dev `positionBinKey` equals `keccak256(abi.encode(owner, salt, bin))` (see `_toPositionBinKey`).\n  function _calculatePositionBinSharesSlot(bytes32 positionBinKey) private pure returns (bytes32 slot) {\n    uint256 baseSlot = MAPPING_POSITION_BIN_SHARES;\n    assembly {\n      mstore(0x00, positionBinKey)\n      mstore(0x20, baseSlot)\n      slot := keccak256(0x00, 0x40)\n    }\n  }\n\n  function _decodePositionBinShares(bytes32 data) internal pure returns (uint256 shares) {\n    return uint256(data);\n  }\n\n  /// @notice Create a position bin key (same as `LiquidityLib._positionBinKey`)\n  function _toPositionBinKey(address owner, uint80 salt, int16 bin) internal pure returns (bytes32 key) {\n    // abi.encode layout is intentionally matched with `LiquidityLib._positionBinKey` for storage compatibility.\n    // forge-lint: disable-next-line(asm-keccak256)\n    return keccak256(abi.encode(owner, salt, bin));\n  }\n\n  /// @notice Get position bin shares\n  function _positionBinShares(address pool, address owner, uint80 salt, int16 bin) internal view returns (uint256) {\n    bytes32 positionBinKey = _toPositionBinKey(owner, salt, bin);\n    bytes32 slot = _calculatePositionBinSharesSlot(positionBinKey);\n    bytes32 data = IExtsload(pool).extsload(slot);\n    return _decodePositionBinShares(data);\n  }\n\n  /// @notice Get position bin shares by key\n  /// @dev Build keys with `_toPositionBinKey`.\n  function _positionBinShares(address pool, bytes32 positionBinKey) internal view returns (uint256) {\n    bytes32 slot = _calculatePositionBinSharesSlot(positionBinKey);\n    bytes32 data = IExtsload(pool).extsload(slot);\n    return _decodePositionBinShares(data);\n  }\n\n  /// @notice Get position bin shares for multiple bins in a single call\n  /// @dev Decode each returned item with `_decodePositionBinShares`.\n  function _multiplePositionBinShares(address pool, address owner, uint80 salt, int16[] memory binIdxs)\n    internal\n    view\n    returns (bytes32[] memory sharesAsBytes32)\n  {\n    uint256 length = binIdxs.length;\n    bytes32[] memory slots = new bytes32[](length);\n    for (uint256 i = 0; i < length; i++) {\n      slots[i] = _calculatePositionBinSharesSlot(_toPositionBinKey(owner, salt, binIdxs[i]));\n    }\n    sharesAsBytes32 = IExtsload(pool).extsload(slots);\n  }\n\n  /// @notice Get all pending fee balances in scaled units with a single call.\n  function _pendingFeesScaled(address pool)\n    internal\n    view\n    returns (\n      uint256 pendingAdminFeeToken0Scaled,\n      uint256 pendingAdminFeeToken1Scaled,\n      uint256 pendingProtocolFeeToken0Scaled,\n      uint256 pendingProtocolFeeToken1Scaled\n    )\n  {\n    bytes32[] memory data = IExtsload(pool).extsload(bytes32(SLOT7_PENDING_FEES), 4);\n    return (uint256(data[0]), uint256(data[1]), uint256(data[2]), uint256(data[3]));\n  }\n}\n"},"contracts/interfaces/extensions/IMetricOmmExtensions.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\nimport {LiquidityDelta} from \"../../types/PoolOperation.sol\";\n\n/// @title IMetricOmmExtensions\n/// @notice Optional per-pool extension invoked by `MetricOmmPool` at liquidity and swap extension points.\n/// @dev Each function below (except for `initialize`) is an extension point function: the pool calls it at the matching extension\n///      point (before/after add, remove, swap). Return the ABI-encoded function selector on success.\n///      `sender` is the pool caller. In `simulateSwapAndRevert`, `sender` and the bid/ask/reference prices are\n///      caller-supplied (not read from the price provider) and all effects revert.\ninterface IMetricOmmExtensions {\n  /// @notice One-time extension setup invoked by the factory immediately after pool deployment.\n  /// @dev Runs before factory registration and per-pool metadata are stored; authenticate the factory caller.\n  function initialize(address pool, bytes calldata data) external returns (bytes4);\n\n  function beforeAddLiquidity(\n    address sender,\n    address owner,\n    uint80 salt,\n    LiquidityDelta calldata deltas,\n    bytes calldata extensionData\n  ) external returns (bytes4);\n\n  function afterAddLiquidity(\n    address sender,\n    address owner,\n    uint80 salt,\n    LiquidityDelta calldata deltas,\n    uint256 amount0Added,\n    uint256 amount1Added,\n    bytes calldata extensionData\n  ) external returns (bytes4);\n\n  function beforeRemoveLiquidity(\n    address sender,\n    address owner,\n    uint80 salt,\n    LiquidityDelta calldata deltas,\n    bytes calldata extensionData\n  ) external returns (bytes4);\n\n  function afterRemoveLiquidity(\n    address sender,\n    address owner,\n    uint80 salt,\n    LiquidityDelta calldata deltas,\n    uint256 amount0Removed,\n    uint256 amount1Removed,\n    bytes calldata extensionData\n  ) external returns (bytes4);\n\n  function beforeSwap(\n    address sender,\n    address recipient,\n    bool zeroForOne,\n    int128 amountSpecified,\n    uint128 priceLimitX64,\n    uint256 packedSlot0Initial,\n    uint128 bidPriceX64,\n    uint128 askPriceX64,\n    uint128 referencePriceX64,\n    bytes calldata extensionData\n  ) external returns (bytes4);\n\n  function afterSwap(\n    address sender,\n    address recipient,\n    bool zeroForOne,\n    int128 amountSpecified,\n    uint128 priceLimitX64,\n    uint256 packedSlot0Initial,\n    uint256 packedSlot0Final,\n    uint128 bidPriceX64,\n    uint128 askPriceX64,\n    uint128 referencePriceX64,\n    int128 amount0Delta,\n    int128 amount1Delta,\n    uint256 platformFeeAmount,\n    bytes calldata extensionData\n  ) external returns (bytes4);\n}\n"},"contracts/libraries/CallExtension.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\nlibrary CallExtension {\n  error ExtensionCallFailed();\n  error InvalidExtensionResponse();\n\n  /// @dev `data` must be ABI-encoded calldata; its selector is also the required return selector.\n  function callExtension(address extension, bytes memory data) internal {\n    (bool success, bytes memory result) = extension.call(data);\n    if (!success) {\n      if (result.length > 0) {\n        assembly (\"memory-safe\") {\n          revert(add(result, 32), mload(result))\n        }\n      }\n      revert ExtensionCallFailed();\n    }\n    if (result.length < 32) {\n      revert InvalidExtensionResponse();\n    }\n    bytes4 returnedSelector;\n    assembly (\"memory-safe\") {\n      returnedSelector := mload(add(result, 32))\n    }\n    bytes4 expectedSelector;\n    assembly (\"memory-safe\") {\n      expectedSelector := mload(add(data, 32))\n    }\n    if (returnedSelector != expectedSelector) {\n      revert InvalidExtensionResponse();\n    }\n  }\n}\n"},"contracts/interfaces/IExtsload.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\n/// @title IExtsload\n/// @notice Read arbitrary contract storage via `EXTSLOAD`-style external calls (Uniswap V4-style pattern).\n/// @dev Off-chain callers and libraries must interpret slot values using the target contract's storage layout.\n///      Miscomputed slots read unrelated data; there is no runtime validation of layout at this boundary.\ninterface IExtsload {\n  // ============ View ============\n\n  /// @notice Read a single 32-byte storage slot.\n  /// @param slot Keccak-derived or raw slot key as used by the implementation contract.\n  /// @return value Raw `bytes32` contents of the slot.\n  function extsload(bytes32 slot) external view returns (bytes32 value);\n\n  /// @notice Read many storage slots in one call.\n  /// @param slots Each entry is a slot key as for `extsload(bytes32)`.\n  /// @return values One `bytes32` per slot, same order as `slots`.\n  function extsload(bytes32[] calldata slots) external view returns (bytes32[] memory values);\n\n  /// @notice Read a contiguous run of slots starting at `startSlot` for `nSlots` steps.\n  /// @param startSlot First slot (inclusive).\n  /// @param nSlots Number of consecutive slots to read (`startSlot`, `startSlot + 1`, ...).\n  /// @return values Raw slot values in order.\n  function extsload(bytes32 startSlot, uint256 nSlots) external view returns (bytes32[] memory values);\n}\n"},"lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\n\npragma solidity >=0.4.16;\n\nimport {IERC20} from \"../token/ERC20/IERC20.sol\";\n"},"lib/openzeppelin-contracts/contracts/interfaces/IERC165.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\n\npragma solidity >=0.4.16;\n\nimport {IERC165} from \"../utils/introspection/IERC165.sol\";\n"},"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\n\npragma solidity >=0.4.16;\n\n/**\n * @dev Interface of the ERC-165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n    /**\n     * @dev Returns true if this contract implements the interface defined by\n     * `interfaceId`. See the corresponding\n     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]\n     * to learn more about how these ids are created.\n     *\n     * This function call must use less than 30 000 gas.\n     */\n    function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n"}},"compilation":{"language":"Solidity","compiler":"solc","compilerVersion":"0.8.35+commit.47b9dedd","compilerSettings":{"viaIR":true,"metadata":{"appendCBOR":true,"bytecodeHash":"none","useLiteralContent":false},"libraries":{"contracts/MetricOmmPool.sol":{"LiquidityLib":"0xe0b1576ac63a582e6740a7e1dcfbbef730539cd4"}},"optimizer":{"runs":1999,"enabled":true},"evmVersion":"cancun","remappings":["forge-std/=lib/forge-std/src/","@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/","openzeppelin-contracts/=lib/openzeppelin-contracts/","erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/","halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/"]},"name":"MetricOmmPool","fullyQualifiedName":"contracts/MetricOmmPool.sol:MetricOmmPool"},"abi":[{"type":"constructor","inputs":[{"name":"factory","type":"address","internalType":"address"},{"name":"token0","type":"address","internalType":"address"},{"name":"token1","type":"address","internalType":"address"},{"name":"priceProvider_","type":"address","internalType":"address"},{"name":"extensions","type":"tuple","components":[{"name":"extension1","type":"address","internalType":"address"},{"name":"extension2","type":"address","internalType":"address"},{"name":"extension3","type":"address","internalType":"address"},{"name":"extension4","type":"address","internalType":"address"},{"name":"extension5","type":"address","internalType":"address"},{"name":"extension6","type":"address","internalType":"address"},{"name":"extension7","type":"address","internalType":"address"}],"internalType":"struct PoolExtensions"},{"name":"extensionOrders","type":"tuple","components":[{"name":"beforeAddLiquidity","type":"uint256","internalType":"uint256"},{"name":"afterAddLiquidity","type":"uint256","internalType":"uint256"},{"name":"beforeRemoveLiquidity","type":"uint256","internalType":"uint256"},{"name":"afterRemoveLiquidity","type":"uint256","internalType":"uint256"},{"name":"beforeSwap","type":"uint256","internalType":"uint256"},{"name":"afterSwap","type":"uint256","internalType":"uint256"}],"internalType":"struct ExtensionOrders"},{"name":"immutablePriceProvider","type":"bool","internalType":"bool"},{"name":"token0ScaleMultiplier","type":"uint256","internalType":"uint256"},{"name":"token1ScaleMultiplier","type":"uint256","internalType":"uint256"},{"name":"initialScaledAmount0PerShareE18","type":"uint256","internalType":"uint256"},{"name":"initialScaledAmount1PerShareE18","type":"uint256","internalType":"uint256"},{"name":"minimalOperationalLiquidity","type":"uint256","internalType":"uint256"},{"name":"spreadFeeE6_","type":"uint24","internalType":"uint24"},{"name":"initialCurBinDistFromProvidedPriceE6","type":"int24","internalType":"int24"},{"name":"nonNegativeBinStates","type":"tuple[]","components":[{"name":"token0BalanceScaled","type":"uint104","internalType":"uint104"},{"name":"token1BalanceScaled","type":"uint104","internalType":"uint104"},{"name":"lengthE6","type":"uint16","internalType":"uint16"},{"name":"addFeeBuyE6","type":"uint16","internalType":"uint16"},{"name":"addFeeSellE6","type":"uint16","internalType":"uint16"}],"internalType":"struct BinState[]"},{"name":"negativeBinStates","type":"tuple[]","components":[{"name":"token0BalanceScaled","type":"uint104","internalType":"uint104"},{"name":"token1BalanceScaled","type":"uint104","internalType":"uint104"},{"name":"lengthE6","type":"uint16","internalType":"uint16"},{"name":"addFeeBuyE6","type":"uint16","internalType":"uint16"},{"name":"addFeeSellE6","type":"uint16","internalType":"uint16"}],"internalType":"struct BinState[]"},{"name":"notionalFeeE8_","type":"uint24","internalType":"uint24"},{"name":"bidAskRefAsymmetryX8_","type":"uint16","internalType":"uint16"}],"stateMutability":"nonpayable"},{"name":"AmountScaledExceedsMax","type":"error","inputs":[]},{"name":"BidAskRefAsymmetryOutOfBounds","type":"error","inputs":[]},{"name":"BidGreaterThanAsk","type":"error","inputs":[]},{"name":"BidIsZero","type":"error","inputs":[]},{"name":"ExtensionCallFailed","type":"error","inputs":[]},{"name":"FinalAmountIsZero","type":"error","inputs":[]},{"name":"IncorrectDelta","type":"error","inputs":[]},{"name":"InsufficientLiquidity","type":"error","inputs":[{"name":"requested","type":"uint256","internalType":"uint256"},{"name":"available","type":"uint256","internalType":"uint256"}]},{"name":"InsufficientTokenBalance","type":"error","inputs":[]},{"name":"InvalidAmount","type":"error","inputs":[]},{"name":"InvalidBinIndex","type":"error","inputs":[{"name":"binIdx","type":"int256","internalType":"int256"}]},{"name":"InvalidExtensionResponse","type":"error","inputs":[]},{"name":"InvalidPauseLevel","type":"error","inputs":[]},{"name":"LeftoversSmallerThanMinimalOperationalLiquidity","type":"error","inputs":[{"name":"binIdx","type":"int256","internalType":"int256"},{"name":"leftovers","type":"uint256","internalType":"uint256"},{"name":"minimalRequired","type":"uint256","internalType":"uint256"}]},{"name":"LiquidityDeltaLengthMismatch","type":"error","inputs":[]},{"name":"NotAllowedToDeposit","type":"error","inputs":[]},{"name":"NotAllowedToSwap","type":"error","inputs":[]},{"name":"NotPositionOwner","type":"error","inputs":[]},{"name":"OnlyFactory","type":"error","inputs":[]},{"name":"OverflowedOnFittingBinBalances","type":"error","inputs":[{"name":"attemptedScaledBalance","type":"uint256","internalType":"uint256"}]},{"name":"PanicEmptyExtension","type":"error","inputs":[]},{"name":"PanicInvalidExtensionIndex","type":"error","inputs":[]},{"name":"PoolPaused","type":"error","inputs":[]},{"name":"PriceProviderFailed","type":"error","inputs":[{"name":"reason","type":"bytes","internalType":"bytes"}]},{"name":"ReentrancyGuardReentrantCall","type":"error","inputs":[]},{"name":"ReferencePriceOutOfRange","type":"error","inputs":[]},{"name":"SafeCastOverflowedIntDowncast","type":"error","inputs":[{"name":"bits","type":"uint8","internalType":"uint8"},{"name":"value","type":"int256","internalType":"int256"}]},{"name":"SafeCastOverflowedUintDowncast","type":"error","inputs":[{"name":"bits","type":"uint8","internalType":"uint8"},{"name":"value","type":"uint256","internalType":"uint256"}]},{"name":"SafeCastOverflowedUintToInt","type":"error","inputs":[{"name":"value","type":"uint256","internalType":"uint256"}]},{"name":"SafeERC20FailedOperation","type":"error","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"name":"SharesAmountTooLarge","type":"error","inputs":[]},{"name":"SharesDeltaSmallerThanMinimalOperationalLiquidity","type":"error","inputs":[{"name":"binIdx","type":"int256","internalType":"int256"},{"name":"sharesDelta","type":"uint256","internalType":"uint256"},{"name":"minimalRequired","type":"uint256","internalType":"uint256"}]},{"name":"SimulateSwap","type":"error","inputs":[{"name":"amount0Delta","type":"int256","internalType":"int256"},{"name":"amount1Delta","type":"int256","internalType":"int256"}]},{"name":"BidAskRefAsymmetryUpdated","type":"event","inputs":[{"name":"bidAskRefAsymmetryX8","type":"uint16","indexed":false,"internalType":"uint16"}],"anonymous":false},{"name":"BinAdditionalFeesUpdated","type":"event","inputs":[{"name":"bin","type":"int16","indexed":true,"internalType":"int16"},{"name":"addFeeBuyE6","type":"uint16","indexed":false,"internalType":"uint16"},{"name":"addFeeSellE6","type":"uint16","indexed":false,"internalType":"uint16"}],"anonymous":false},{"name":"BinSwapped","type":"event","inputs":[{"name":"binIdx","type":"int256","indexed":false,"internalType":"int256"},{"name":"binDeltas","type":"uint256","indexed":false,"internalType":"Packed2Int128"},{"name":"fees","type":"uint256","indexed":false,"internalType":"Packed2Uint128"}],"anonymous":false},{"name":"FeeTransferFailed","type":"event","inputs":[{"name":"token","type":"address","indexed":true,"internalType":"address"},{"name":"destination","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"LiquidityAdded","type":"event","inputs":[{"name":"provider","type":"address","indexed":true,"internalType":"address"},{"name":"salt","type":"uint80","indexed":true,"internalType":"uint80"},{"name":"binIdxs","type":"int256[]","indexed":false,"internalType":"int256[]"},{"name":"binBalanceDeltas","type":"tuple[]","indexed":false,"components":[{"name":"delta0Scaled","type":"int256","internalType":"int256"},{"name":"delta1Scaled","type":"int256","internalType":"int256"}],"internalType":"struct BinBalanceDelta[]"},{"name":"shares","type":"uint256[]","indexed":false,"internalType":"uint256[]"}],"anonymous":false},{"name":"LiquidityRemoved","type":"event","inputs":[{"name":"provider","type":"address","indexed":true,"internalType":"address"},{"name":"salt","type":"uint80","indexed":true,"internalType":"uint80"},{"name":"binIdxs","type":"int256[]","indexed":false,"internalType":"int256[]"},{"name":"binBalanceDeltas","type":"tuple[]","indexed":false,"components":[{"name":"delta0Scaled","type":"int256","internalType":"int256"},{"name":"delta1Scaled","type":"int256","internalType":"int256"}],"internalType":"struct BinBalanceDelta[]"},{"name":"shares","type":"uint256[]","indexed":false,"internalType":"uint256[]"}],"anonymous":false},{"name":"NotionalFeeUpdated","type":"event","inputs":[{"name":"notionalFeeE8","type":"uint24","indexed":false,"internalType":"uint24"}],"anonymous":false},{"name":"PauseLevelUpdated","type":"event","inputs":[{"name":"previousLevel","type":"uint8","indexed":false,"internalType":"uint8"},{"name":"newLevel","type":"uint8","indexed":false,"internalType":"uint8"}],"anonymous":false},{"name":"PriceProviderUpdated","type":"event","inputs":[{"name":"newPriceProvider","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"name":"ProtocolFeesCollected","type":"event","inputs":[{"name":"amount0ToProtocol","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"amount1ToProtocol","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"amount0ToAdmin","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"amount1ToAdmin","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"SpreadFeeUpdated","type":"event","inputs":[{"name":"spreadFeeE6","type":"uint24","indexed":false,"internalType":"uint24"}],"anonymous":false},{"name":"Swap","type":"event","inputs":[{"name":"sender","type":"address","indexed":true,"internalType":"address"},{"name":"recipient","type":"address","indexed":true,"internalType":"address"},{"name":"details","type":"uint256","indexed":false,"internalType":"PackedSwapDetails"},{"name":"amountDeltas","type":"uint256","indexed":false,"internalType":"Packed2Int128"},{"name":"platformFees","type":"uint256","indexed":false,"internalType":"Packed2Uint128"}],"anonymous":false},{"name":"addLiquidity","type":"function","inputs":[{"name":"owner","type":"address","internalType":"address"},{"name":"salt","type":"uint80","internalType":"uint80"},{"name":"deltas","type":"tuple","components":[{"name":"binIdxs","type":"int256[]","internalType":"int256[]"},{"name":"shares","type":"uint256[]","internalType":"uint256[]"}],"internalType":"struct LiquidityDelta"},{"name":"callbackData","type":"bytes","internalType":"bytes"},{"name":"extensionData","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"amount0Added","type":"uint256","internalType":"uint256"},{"name":"amount1Added","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"name":"collectFees","type":"function","inputs":[{"name":"protocolSpreadFeeE6","type":"uint256","internalType":"uint256"},{"name":"adminSpreadFeeE6","type":"uint256","internalType":"uint256"},{"name":"protocolNotionalFeeE8","type":"uint256","internalType":"uint256"},{"name":"adminNotionalFeeE8","type":"uint256","internalType":"uint256"},{"name":"adminFeeDestination","type":"address","internalType":"address"},{"name":"protocolFeeDestination","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"extsload","type":"function","inputs":[{"name":"slot","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"name":"extsload","type":"function","inputs":[{"name":"startSlot","type":"bytes32","internalType":"bytes32"},{"name":"nSlots","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bytes32[]","internalType":"bytes32[]"}],"stateMutability":"view"},{"name":"extsload","type":"function","inputs":[{"name":"slots","type":"bytes32[]","internalType":"bytes32[]"}],"outputs":[{"name":"","type":"bytes32[]","internalType":"bytes32[]"}],"stateMutability":"view"},{"name":"getImmutables","type":"function","inputs":[],"outputs":[{"name":"","type":"tuple","components":[{"name":"factory","type":"address","internalType":"address"},{"name":"token0","type":"address","internalType":"address"},{"name":"token1","type":"address","internalType":"address"},{"name":"token0ScaleMultiplier","type":"uint256","internalType":"uint256"},{"name":"token1ScaleMultiplier","type":"uint256","internalType":"uint256"},{"name":"initialScaledToken0PerShareE18","type":"uint256","internalType":"uint256"},{"name":"initialScaledToken1PerShareE18","type":"uint256","internalType":"uint256"},{"name":"minimalOperationalLiquidity","type":"uint256","internalType":"uint256"},{"name":"immutablePriceProvider","type":"address","internalType":"address"},{"name":"lowestBin","type":"int256","internalType":"int256"},{"name":"highestBin","type":"int256","internalType":"int256"},{"name":"extension1","type":"address","internalType":"address"},{"name":"extension2","type":"address","internalType":"address"},{"name":"extension3","type":"address","internalType":"address"},{"name":"extension4","type":"address","internalType":"address"},{"name":"extension5","type":"address","internalType":"address"},{"name":"extension6","type":"address","internalType":"address"},{"name":"extension7","type":"address","internalType":"address"},{"name":"beforeAddLiquidityOrder","type":"uint256","internalType":"uint256"},{"name":"afterAddLiquidityOrder","type":"uint256","internalType":"uint256"},{"name":"beforeRemoveLiquidityOrder","type":"uint256","internalType":"uint256"},{"name":"afterRemoveLiquidityOrder","type":"uint256","internalType":"uint256"},{"name":"beforeSwapOrder","type":"uint256","internalType":"uint256"},{"name":"afterSwapOrder","type":"uint256","internalType":"uint256"}],"internalType":"struct PoolImmutables"}],"stateMutability":"view"},{"name":"getSellAndBuyPrices","type":"function","inputs":[],"outputs":[{"name":"sellPriceX64","type":"uint128","internalType":"uint128"},{"name":"buyPriceX64","type":"uint128","internalType":"uint128"}],"stateMutability":"nonpayable"},{"name":"inSwap","type":"function","inputs":[],"outputs":[{"name":"priceProvider_","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"removeLiquidity","type":"function","inputs":[{"name":"owner","type":"address","internalType":"address"},{"name":"salt","type":"uint80","internalType":"uint80"},{"name":"deltas","type":"tuple","components":[{"name":"binIdxs","type":"int256[]","internalType":"int256[]"},{"name":"shares","type":"uint256[]","internalType":"uint256[]"}],"internalType":"struct LiquidityDelta"},{"name":"extensionData","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"amount0Removed","type":"uint256","internalType":"uint256"},{"name":"amount1Removed","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"name":"setBidAskRefAsymmetryX8","type":"function","inputs":[{"name":"newBidAskRefAsymmetryX8","type":"uint16","internalType":"uint16"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setBinAdditionalFees","type":"function","inputs":[{"name":"bin","type":"int16","internalType":"int16"},{"name":"addFeeBuyE6","type":"uint16","internalType":"uint16"},{"name":"addFeeSellE6","type":"uint16","internalType":"uint16"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setPause","type":"function","inputs":[{"name":"newLevel","type":"uint8","internalType":"uint8"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setPoolFees","type":"function","inputs":[{"name":"newSpreadFeeE6","type":"uint24","internalType":"uint24"},{"name":"newNotionalFeeE8","type":"uint24","internalType":"uint24"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setPriceProvider","type":"function","inputs":[{"name":"newPriceProvider","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"simulateSwapAndRevert","type":"function","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"recipient","type":"address","internalType":"address"},{"name":"zeroForOne","type":"bool","internalType":"bool"},{"name":"amountSpecified","type":"int128","internalType":"int128"},{"name":"priceLimitX64","type":"uint128","internalType":"uint128"},{"name":"bidPriceX64","type":"uint128","internalType":"uint128"},{"name":"askPriceX64","type":"uint128","internalType":"uint128"},{"name":"referencePriceX64","type":"uint128","internalType":"uint128"},{"name":"extensionData","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"int128","internalType":"int128"},{"name":"","type":"int128","internalType":"int128"}],"stateMutability":"nonpayable"},{"name":"swap","type":"function","inputs":[{"name":"recipient","type":"address","internalType":"address"},{"name":"zeroForOne","type":"bool","internalType":"bool"},{"name":"amountSpecified","type":"int128","internalType":"int128"},{"name":"priceLimitX64","type":"uint128","internalType":"uint128"},{"name":"callbackData","type":"bytes","internalType":"bytes"},{"name":"extensionData","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"int128","internalType":"int128"},{"name":"","type":"int128","internalType":"int128"}],"stateMutability":"nonpayable"}],"metadata":{"compiler":{"version":"0.8.35+commit.47b9dedd"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"factory","type":"address"},{"internalType":"address","name":"token0","type":"address"},{"internalType":"address","name":"token1","type":"address"},{"internalType":"address","name":"priceProvider_","type":"address"},{"components":[{"internalType":"address","name":"extension1","type":"address"},{"internalType":"address","name":"extension2","type":"address"},{"internalType":"address","name":"extension3","type":"address"},{"internalType":"address","name":"extension4","type":"address"},{"internalType":"address","name":"extension5","type":"address"},{"internalType":"address","name":"extension6","type":"address"},{"internalType":"address","name":"extension7","type":"address"}],"internalType":"struct PoolExtensions","name":"extensions","type":"tuple"},{"components":[{"internalType":"uint256","name":"beforeAddLiquidity","type":"uint256"},{"internalType":"uint256","name":"afterAddLiquidity","type":"uint256"},{"internalType":"uint256","name":"beforeRemoveLiquidity","type":"uint256"},{"internalType":"uint256","name":"afterRemoveLiquidity","type":"uint256"},{"internalType":"uint256","name":"beforeSwap","type":"uint256"},{"internalType":"uint256","name":"afterSwap","type":"uint256"}],"internalType":"struct ExtensionOrders","name":"extensionOrders","type":"tuple"},{"internalType":"bool","name":"immutablePriceProvider","type":"bool"},{"internalType":"uint256","name":"token0ScaleMultiplier","type":"uint256"},{"internalType":"uint256","name":"token1ScaleMultiplier","type":"uint256"},{"internalType":"uint256","name":"initialScaledAmount0PerShareE18","type":"uint256"},{"internalType":"uint256","name":"initialScaledAmount1PerShareE18","type":"uint256"},{"internalType":"uint256","name":"minimalOperationalLiquidity","type":"uint256"},{"internalType":"uint24","name":"spreadFeeE6_","type":"uint24"},{"internalType":"int24","name":"initialCurBinDistFromProvidedPriceE6","type":"int24"},{"components":[{"internalType":"uint104","name":"token0BalanceScaled","type":"uint104"},{"internalType":"uint104","name":"token1BalanceScaled","type":"uint104"},{"internalType":"uint16","name":"lengthE6","type":"uint16"},{"internalType":"uint16","name":"addFeeBuyE6","type":"uint16"},{"internalType":"uint16","name":"addFeeSellE6","type":"uint16"}],"internalType":"struct BinState[]","name":"nonNegativeBinStates","type":"tuple[]"},{"components":[{"internalType":"uint104","name":"token0BalanceScaled","type":"uint104"},{"internalType":"uint104","name":"token1BalanceScaled","type":"uint104"},{"internalType":"uint16","name":"lengthE6","type":"uint16"},{"internalType":"uint16","name":"addFeeBuyE6","type":"uint16"},{"internalType":"uint16","name":"addFeeSellE6","type":"uint16"}],"internalType":"struct BinState[]","name":"negativeBinStates","type":"tuple[]"},{"internalType":"uint24","name":"notionalFeeE8_","type":"uint24"},{"internalType":"uint16","name":"bidAskRefAsymmetryX8_","type":"uint16"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AmountScaledExceedsMax","type":"error"},{"inputs":[],"name":"BidAskRefAsymmetryOutOfBounds","type":"error"},{"inputs":[],"name":"BidGreaterThanAsk","type":"error"},{"inputs":[],"name":"BidIsZero","type":"error"},{"inputs":[],"name":"ExtensionCallFailed","type":"error"},{"inputs":[],"name":"FinalAmountIsZero","type":"error"},{"inputs":[],"name":"IncorrectDelta","type":"error"},{"inputs":[{"internalType":"uint256","name":"requested","type":"uint256"},{"internalType":"uint256","name":"available","type":"uint256"}],"name":"InsufficientLiquidity","type":"error"},{"inputs":[],"name":"InsufficientTokenBalance","type":"error"},{"inputs":[],"name":"InvalidAmount","type":"error"},{"inputs":[{"internalType":"int256","name":"binIdx","type":"int256"}],"name":"InvalidBinIndex","type":"error"},{"inputs":[],"name":"InvalidExtensionResponse","type":"error"},{"inputs":[],"name":"InvalidPauseLevel","type":"error"},{"inputs":[{"internalType":"int256","name":"binIdx","type":"int256"},{"internalType":"uint256","name":"leftovers","type":"uint256"},{"internalType":"uint256","name":"minimalRequired","type":"uint256"}],"name":"LeftoversSmallerThanMinimalOperationalLiquidity","type":"error"},{"inputs":[],"name":"LiquidityDeltaLengthMismatch","type":"error"},{"inputs":[],"name":"NotAllowedToDeposit","type":"error"},{"inputs":[],"name":"NotAllowedToSwap","type":"error"},{"inputs":[],"name":"NotPositionOwner","type":"error"},{"inputs":[],"name":"OnlyFactory","type":"error"},{"inputs":[{"internalType":"uint256","name":"attemptedScaledBalance","type":"uint256"}],"name":"OverflowedOnFittingBinBalances","type":"error"},{"inputs":[],"name":"PanicEmptyExtension","type":"error"},{"inputs":[],"name":"PanicInvalidExtensionIndex","type":"error"},{"inputs":[],"name":"PoolPaused","type":"error"},{"inputs":[{"internalType":"bytes","name":"reason","type":"bytes"}],"name":"PriceProviderFailed","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[],"name":"ReferencePriceOutOfRange","type":"error"},{"inputs":[{"internalType":"uint8","name":"bits","type":"uint8"},{"internalType":"int256","name":"value","type":"int256"}],"name":"SafeCastOverflowedIntDowncast","type":"error"},{"inputs":[{"internalType":"uint8","name":"bits","type":"uint8"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"SafeCastOverflowedUintDowncast","type":"error"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"SafeCastOverflowedUintToInt","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[],"name":"SharesAmountTooLarge","type":"error"},{"inputs":[{"internalType":"int256","name":"binIdx","type":"int256"},{"internalType":"uint256","name":"sharesDelta","type":"uint256"},{"internalType":"uint256","name":"minimalRequired","type":"uint256"}],"name":"SharesDeltaSmallerThanMinimalOperationalLiquidity","type":"error"},{"inputs":[{"internalType":"int256","name":"amount0Delta","type":"int256"},{"internalType":"int256","name":"amount1Delta","type":"int256"}],"name":"SimulateSwap","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"bidAskRefAsymmetryX8","type":"uint16"}],"name":"BidAskRefAsymmetryUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"int16","name":"bin","type":"int16"},{"indexed":false,"internalType":"uint16","name":"addFeeBuyE6","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"addFeeSellE6","type":"uint16"}],"name":"BinAdditionalFeesUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"int256","name":"binIdx","type":"int256"},{"indexed":false,"internalType":"Packed2Int128","name":"binDeltas","type":"uint256"},{"indexed":false,"internalType":"Packed2Uint128","name":"fees","type":"uint256"}],"name":"BinSwapped","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"destination","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"FeeTransferFailed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"provider","type":"address"},{"indexed":true,"internalType":"uint80","name":"salt","type":"uint80"},{"indexed":false,"internalType":"int256[]","name":"binIdxs","type":"int256[]"},{"components":[{"internalType":"int256","name":"delta0Scaled","type":"int256"},{"internalType":"int256","name":"delta1Scaled","type":"int256"}],"indexed":false,"internalType":"struct BinBalanceDelta[]","name":"binBalanceDeltas","type":"tuple[]"},{"indexed":false,"internalType":"uint256[]","name":"shares","type":"uint256[]"}],"name":"LiquidityAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"provider","type":"address"},{"indexed":true,"internalType":"uint80","name":"salt","type":"uint80"},{"indexed":false,"internalType":"int256[]","name":"binIdxs","type":"int256[]"},{"components":[{"internalType":"int256","name":"delta0Scaled","type":"int256"},{"internalType":"int256","name":"delta1Scaled","type":"int256"}],"indexed":false,"internalType":"struct BinBalanceDelta[]","name":"binBalanceDeltas","type":"tuple[]"},{"indexed":false,"internalType":"uint256[]","name":"shares","type":"uint256[]"}],"name":"LiquidityRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint24","name":"notionalFeeE8","type":"uint24"}],"name":"NotionalFeeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"previousLevel","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"newLevel","type":"uint8"}],"name":"PauseLevelUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newPriceProvider","type":"address"}],"name":"PriceProviderUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount0ToProtocol","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1ToProtocol","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount0ToAdmin","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1ToAdmin","type":"uint256"}],"name":"ProtocolFeesCollected","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint24","name":"spreadFeeE6","type":"uint24"}],"name":"SpreadFeeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"PackedSwapDetails","name":"details","type":"uint256"},{"indexed":false,"internalType":"Packed2Int128","name":"amountDeltas","type":"uint256"},{"indexed":false,"internalType":"Packed2Uint128","name":"platformFees","type":"uint256"}],"name":"Swap","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint80","name":"salt","type":"uint80"},{"components":[{"internalType":"int256[]","name":"binIdxs","type":"int256[]"},{"internalType":"uint256[]","name":"shares","type":"uint256[]"}],"internalType":"struct LiquidityDelta","name":"deltas","type":"tuple"},{"internalType":"bytes","name":"callbackData","type":"bytes"},{"internalType":"bytes","name":"extensionData","type":"bytes"}],"name":"addLiquidity","outputs":[{"internalType":"uint256","name":"amount0Added","type":"uint256"},{"internalType":"uint256","name":"amount1Added","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"protocolSpreadFeeE6","type":"uint256"},{"internalType":"uint256","name":"adminSpreadFeeE6","type":"uint256"},{"internalType":"uint256","name":"protocolNotionalFeeE8","type":"uint256"},{"internalType":"uint256","name":"adminNotionalFeeE8","type":"uint256"},{"internalType":"address","name":"adminFeeDestination","type":"address"},{"internalType":"address","name":"protocolFeeDestination","type":"address"}],"name":"collectFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"slot","type":"bytes32"}],"name":"extsload","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"startSlot","type":"bytes32"},{"internalType":"uint256","name":"nSlots","type":"uint256"}],"name":"extsload","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"slots","type":"bytes32[]"}],"name":"extsload","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getImmutables","outputs":[{"components":[{"internalType":"address","name":"factory","type":"address"},{"internalType":"address","name":"token0","type":"address"},{"internalType":"address","name":"token1","type":"address"},{"internalType":"uint256","name":"token0ScaleMultiplier","type":"uint256"},{"internalType":"uint256","name":"token1ScaleMultiplier","type":"uint256"},{"internalType":"uint256","name":"initialScaledToken0PerShareE18","type":"uint256"},{"internalType":"uint256","name":"initialScaledToken1PerShareE18","type":"uint256"},{"internalType":"uint256","name":"minimalOperationalLiquidity","type":"uint256"},{"internalType":"address","name":"immutablePriceProvider","type":"address"},{"internalType":"int256","name":"lowestBin","type":"int256"},{"internalType":"int256","name":"highestBin","type":"int256"},{"internalType":"address","name":"extension1","type":"address"},{"internalType":"address","name":"extension2","type":"address"},{"internalType":"address","name":"extension3","type":"address"},{"internalType":"address","name":"extension4","type":"address"},{"internalType":"address","name":"extension5","type":"address"},{"internalType":"address","name":"extension6","type":"address"},{"internalType":"address","name":"extension7","type":"address"},{"internalType":"uint256","name":"beforeAddLiquidityOrder","type":"uint256"},{"internalType":"uint256","name":"afterAddLiquidityOrder","type":"uint256"},{"internalType":"uint256","name":"beforeRemoveLiquidityOrder","type":"uint256"},{"internalType":"uint256","name":"afterRemoveLiquidityOrder","type":"uint256"},{"internalType":"uint256","name":"beforeSwapOrder","type":"uint256"},{"internalType":"uint256","name":"afterSwapOrder","type":"uint256"}],"internalType":"struct PoolImmutables","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSellAndBuyPrices","outputs":[{"internalType":"uint128","name":"sellPriceX64","type":"uint128"},{"internalType":"uint128","name":"buyPriceX64","type":"uint128"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"inSwap","outputs":[{"internalType":"address","name":"priceProvider_","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint80","name":"salt","type":"uint80"},{"components":[{"internalType":"int256[]","name":"binIdxs","type":"int256[]"},{"internalType":"uint256[]","name":"shares","type":"uint256[]"}],"internalType":"struct LiquidityDelta","name":"deltas","type":"tuple"},{"internalType":"bytes","name":"extensionData","type":"bytes"}],"name":"removeLiquidity","outputs":[{"internalType":"uint256","name":"amount0Removed","type":"uint256"},{"internalType":"uint256","name":"amount1Removed","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"newBidAskRefAsymmetryX8","type":"uint16"}],"name":"setBidAskRefAsymmetryX8","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"int16","name":"bin","type":"int16"},{"internalType":"uint16","name":"addFeeBuyE6","type":"uint16"},{"internalType":"uint16","name":"addFeeSellE6","type":"uint16"}],"name":"setBinAdditionalFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"newLevel","type":"uint8"}],"name":"setPause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint24","name":"newSpreadFeeE6","type":"uint24"},{"internalType":"uint24","name":"newNotionalFeeE8","type":"uint24"}],"name":"setPoolFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newPriceProvider","type":"address"}],"name":"setPriceProvider","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"bool","name":"zeroForOne","type":"bool"},{"internalType":"int128","name":"amountSpecified","type":"int128"},{"internalType":"uint128","name":"priceLimitX64","type":"uint128"},{"internalType":"uint128","name":"bidPriceX64","type":"uint128"},{"internalType":"uint128","name":"askPriceX64","type":"uint128"},{"internalType":"uint128","name":"referencePriceX64","type":"uint128"},{"internalType":"bytes","name":"extensionData","type":"bytes"}],"name":"simulateSwapAndRevert","outputs":[{"internalType":"int128","name":"","type":"int128"},{"internalType":"int128","name":"","type":"int128"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"bool","name":"zeroForOne","type":"bool"},{"internalType":"int128","name":"amountSpecified","type":"int128"},{"internalType":"uint128","name":"priceLimitX64","type":"uint128"},{"internalType":"bytes","name":"callbackData","type":"bytes"},{"internalType":"bytes","name":"extensionData","type":"bytes"}],"name":"swap","outputs":[{"internalType":"int128","name":"","type":"int128"},{"internalType":"int128","name":"","type":"int128"}],"stateMutability":"nonpayable","type":"function"}],"devdoc":{"details":"Layout: immutables, state variables, constructor, modifiers,      external state-changing functions, external views, then internal helpers.Contract uses `Extsload` for external storage reads, apart from `getImmutables()`, `inSwap()` and `getSellAndBuyPrices()`.External function order follows `IMetricOmmPool` composition: `IMetricOmmPoolActions`, then `IMetricOmmPoolCollectFees`, then `IMetricOmmPoolFactoryActions`.Contract coupling: storage layout and packing are mirrored by `contracts/libraries/PoolStateLibrary.sol`      for EXTSLOAD-based reads. Any storage reorder or repack is a breaking change for EXTSLOAD readers.","errors":{"AmountScaledExceedsMax()":[{"details":"Exact-output requests are capped to the pool's available output before this check."}],"BidAskRefAsymmetryOutOfBounds()":[{"details":"With `r1 = reference/bid - 1`, `r2 = ask/reference - 1`, and `M = 1 + m` (`m` stored in X8), requires      `1/M <= r1/r2 <= M`. Skipped when `bidAskRefAsymmetryX8 == type(uint16).max`. Otherwise a reference on bid/ask reverts."}],"BidGreaterThanAsk()":[{"details":"On `swap`, comes from the live `IPriceProvider` quote; on `simulateSwapAndRevert`, from the arguments you passed."}],"BidIsZero()":[{"details":"On `swap`, from the live provider; on `simulateSwapAndRevert`, from `bidPriceX64` you passed."}],"FinalAmountIsZero()":[{"details":"After conversion to native units, either `amount0Delta` or `amount1Delta` is zero — e.g. price limit blocks all progress or amounts round away."}],"IncorrectDelta()":[{"details":"Distinct from `InsufficientTokenBalance` (liquidity path); the swap callback left the pool balance short of the input amount the pool requested."}],"InsufficientLiquidity(uint256,uint256)":[{"params":{"available":"Shares recorded for `owner`+`salt` in that bin when this entry is processed.","requested":"`deltas.shares[i]` for the offending bin."}}],"InsufficientTokenBalance()":[{"details":"Fires after the pool computed required `amount0`/`amount1` and invoked `msg.sender`; safe for retry once the callback actually pays."}],"InvalidBinIndex(int256)":[{"params":{"binIdx":"First failing index from the caller payload."}}],"LeftoversSmallerThanMinimalOperationalLiquidity(int256,uint256,uint256)":[{"details":"Raised when leftover shares are `> 0` and `< MINIMAL_OPERATIONAL_LIQUIDITY`; remove more or exit to zero.","params":{"binIdx":"Bin where the leftover would remain.","leftovers":"Remaining shares after the attempted remove.","minimalRequired":"Pool immutable `MINIMAL_OPERATIONAL_LIQUIDITY`."}}],"LiquidityDeltaLengthMismatch()":[{"details":"Checked only for non-empty `binIdxs`; an empty array returns `(0, 0)`."}],"NotAllowedToDeposit()":[{"details":"Never reverted by the pool itself; gating extensions raise it from the add-liquidity extension points."}],"NotAllowedToSwap()":[{"details":"Never reverted by the pool itself; gating extensions raise it from `beforeSwap`, which `swap` and `simulateSwapAndRevert` run identically."}],"NotPositionOwner()":[{"details":"Only `owner` may burn; `addLiquidity` may use a different `msg.sender` when `owner` is supplied, but removal is stricter."}],"OverflowedOnFittingBinBalances(uint256)":[{"details":"Happens when the input credited to a bin would grow its incoming-side balance past the packed `BinState` width.      That direction can remain blocked until liquidity is removed or the opposite swap drains the incoming side; prefer smaller bins / less dense liquidity.","params":{"attemptedScaledBalance":"The balance that would have been stored (internal scaled units)."}}],"PanicEmptyExtension()":[{"details":"Should never happen if factory validates extensions config."}],"PanicInvalidExtensionIndex()":[{"details":"Should never happen if factory validates extensions config."}],"PoolPaused()":[{"details":"Pause level is factory-controlled; liquidity mutators are intentionally not blocked by the same check."}],"PriceProviderFailed(bytes)":[{"params":{"reason":"Opaque revert data from the provider (decode off-chain if the provider documents errors)."}}],"ReentrancyGuardReentrantCall()":[{"details":"Unauthorized reentrant call or overlapping guarded action."}],"ReferencePriceOutOfRange()":[{"details":"On `swap`, from the live provider; on `simulateSwapAndRevert`, from `referencePriceX64` you passed."}],"SafeCastOverflowedIntDowncast(uint8,int256)":[{"details":"Value doesn't fit in an int of `bits` size."}],"SafeCastOverflowedUintDowncast(uint8,uint256)":[{"details":"Value doesn't fit in a uint of `bits` size."}],"SafeCastOverflowedUintToInt(uint256)":[{"details":"A uint value doesn't fit in an int of `bits` size."}],"SafeERC20FailedOperation(address)":[{"details":"An operation with an ERC-20 token failed."}],"SharesAmountTooLarge()":[{"details":"Overflow of the resulting bin or pool totals reverts with a `SafeCast` error instead."}],"SharesDeltaSmallerThanMinimalOperationalLiquidity(int256,uint256,uint256)":[{"details":"Raised when non-zero `sharesToAdd` / `sharesToRemove` is `< MINIMAL_OPERATIONAL_LIQUIDITY`.","params":{"binIdx":"Bin where the offending delta was applied.","minimalRequired":"Pool immutable `MINIMAL_OPERATIONAL_LIQUIDITY`.","sharesDelta":"Offending share delta."}}],"SimulateSwap(int256,int256)":[{"details":"Uses validated caller-supplied quotes and runs swap hooks, even while paused. All state changes revert.      Both deltas must fit `int128` before `afterSwap`, despite the error using `int256` fields.      Decode this error from revert data; execution failures propagate their own errors instead.","params":{"amount0Delta":"Net token0 the swap would move into (`>0`) or out of (`<0`) the pool (native decimals).","amount1Delta":"Net token1 the swap would move into or out of the pool (native decimals)."}}]},"events":{"BidAskRefAsymmetryUpdated(uint16)":{"params":{"bidAskRefAsymmetryX8":"New asymmetry bound; `type(uint16).max` disables the check."}},"BinAdditionalFeesUpdated(int16,uint16,uint16)":{"params":{"addFeeBuyE6":"Additional buy-side spread fee in E6 on top of base spread.","addFeeSellE6":"Additional sell-side spread fee in E6 on top of base spread.","bin":"Bin index whose overrides were updated."}},"BinSwapped(int256,uint256,uint256)":{"details":"Refer to types/Packed.sol to decode the packed values.","params":{"binDeltas":"Change in THAT BIN's scaled balances, packed: `high` = token0, `low` = token1.","binIdx":"Bin touched in this step.","fees":"This step's two fee legs, packed: `high` = LP leg (stays in the bin), `low` = platform leg (protocol + admin, withheld). Scaled units."}},"LiquidityAdded(address,uint80,int256[],(int256,int256)[],uint256[])":{"details":"Arrays are parallel: `binIdxs[i]`, `binBalanceDeltas[i]`, and `shares[i]` describe the same bin. Zero-share rows remain in the arrays with zero deltas; indexers can reconcile bins from `binBalanceDeltas` (scaled) separately from callback token flows (native).","params":{"binBalanceDeltas":"Scaled token0/token1 balance change inside each bin (`BinBalanceDelta`); not wallet transfer amounts.","binIdxs":"Bin index per input row (pool-configured range).","provider":"`owner` leg of the position key; indexed for position-scoped subscriptions.","salt":"`salt` leg of the position key; indexed with `provider` to disambiguate positions.","shares":"Liquidity shares minted per input row for this position."}},"LiquidityRemoved(address,uint80,int256[],(int256,int256)[],uint256[])":{"details":"Same parallel-array layout as `LiquidityAdded`. `removeLiquidity` requires `msg.sender == owner`, so the position key always matches the caller for this event.","params":{"binBalanceDeltas":"Scaled balance change per bin (non-positive: tokens leaving the bin).","binIdxs":"Bin index per input row.","provider":"Position owner (equals `msg.sender` for the removing call).","salt":"Position salt with `provider` in the key.","shares":"Shares burned per input row."}},"NotionalFeeUpdated(uint24)":{"params":{"notionalFeeE8":"New aggregate notional fee in E8 (`1e8 = 100%`)."}},"PauseLevelUpdated(uint8,uint8)":{"params":{"newLevel":"New pause level after the update.","previousLevel":"Prior pause level (`0` active, `1` admin pause, `2` protocol pause)."}},"PriceProviderUpdated(address)":{"params":{"newPriceProvider":"New active `IPriceProvider` (immutable pools never emit this from rotation)."}},"ProtocolFeesCollected(uint256,uint256,uint256,uint256)":{"params":{"amount0ToAdmin":"Token0 amount sent to `adminFeeDestination` (native).","amount0ToProtocol":"Token0 amount sent to `protocolFeeDestination` (native).","amount1ToAdmin":"Token1 amount sent to `adminFeeDestination` (native).","amount1ToProtocol":"Token1 amount sent to `protocolFeeDestination` (native)."}},"SpreadFeeUpdated(uint24)":{"params":{"spreadFeeE6":"New platform share of the spread fee in E6 (`1e6 = 100%`)."}},"Swap(address,address,uint256,uint256,uint256)":{"details":"Refer to types/Packed.sol to decode the packed values.","params":{"amountDeltas":"Net native-token flows for the whole call, packed: `high` = token0, `low` = token1 (positive = the pool gained that token).","details":"Swap mode and resulting bin position packed into one word: `exactInput()`,        `binIdx()` (signed), `posInBin()`. Check details in PackedSwapDetailsLib.","platformFees":"Platform (protocol + admin) fee for this swap on the input-token leg, packed: `high` = SPREAD leg, `low` = NOTIONAL leg. Scaled units.","recipient":"Address that received the output token leg.","sender":"`msg.sender` of `swap` (the account that may receive swap callback)."}}},"kind":"dev","methods":{"addLiquidity(address,uint80,(int256[],uint256[]),bytes,bytes)":{"details":"Callback amounts round up per bin and again on conversion to native units; underpay reverts      `InsufficientTokenBalance`. `msg.sender` pays but need not equal `owner`. Empty `binIdxs` skips hooks and callbacks.Reverts `LiquidityDeltaLengthMismatch` when `binIdxs` is non-empty and its length differs from `shares`.","params":{"callbackData":"Opaque bytes forwarded unmodified to the modify-liquidity callback.","deltas":"Parallel `binIdxs` / `shares` arrays (see `LiquidityDelta`).","extensionData":"Opaque bytes forwarded to liquidity extensions (beforeAddLiquidity / afterAddLiquidity).","owner":"Position owner encoded in the pool’s position key.","salt":"Caller-chosen second leg of the position key."},"returns":{"amount0Added":"Token0 amount the pool required from the callback (native).","amount1Added":"Token1 amount the pool required from the callback (native)."}},"collectFees(uint256,uint256,uint256,uint256,address,address)":{"details":"Pending balances retain scaled rounding remainders; transfer failures do not revert allocation.      Supported tokens must not move funds when reporting a failed transfer.","params":{"adminFeeDestination":"Recipient for the admin share of collected tokens (per factory configuration).","adminNotionalFeeE8":"Admin notional component in E8 at collection time.","adminSpreadFeeE6":"Admin spread component in E6 at collection time.","protocolFeeDestination":"Recipient for the protocol share (the factory's `feeReceiver`).","protocolNotionalFeeE8":"Protocol notional component in E8 at collection time.","protocolSpreadFeeE6":"Protocol spread component in E6 at collection time (must match factory policy)."}},"constructor":{"details":"All initial checks MUST be validated before construction at the factory/deployer level."},"extsload(bytes32)":{"params":{"slot":"Keccak-derived or raw slot key as used by the implementation contract."},"returns":{"_0":"Raw `bytes32` contents of the slot."}},"extsload(bytes32,uint256)":{"params":{"nSlots":"Number of consecutive slots to read (`startSlot`, `startSlot + 1`, ...).","startSlot":"First slot (inclusive)."},"returns":{"_0":"Raw slot values in order."}},"extsload(bytes32[])":{"params":{"slots":"Each entry is a slot key as for `extsload(bytes32)`."},"returns":{"_0":"One `bytes32` per slot, same order as `slots`."}},"getImmutables()":{"details":"Immutables live in contract bytecode, not storage, so they cannot be read via EXTSLOAD."},"getSellAndBuyPrices()":{"details":"Informational only — not a guaranteed executable quote. Sell = token0 → token1; buy = token1 → token0.      Includes oracle spread, per-bin additional fees, and notional fees (zero-size exact-in marginal prices)      via the active price provider (same path as `swap`). For real pricing/execution decisions, call `swap`      and decide in the swap callback, or use the periphery quoter. The quote may update provider state.      Shares the swap reentrancy guard; callable while paused, but not during another guarded action.","returns":{"buyPriceX64":"Fee-adjusted buy price (token1 per token0, Q64.64).","sellPriceX64":"Fee-adjusted sell price (token1 per token0, Q64.64)."}},"inSwap()":{"returns":{"priceProvider_":"Active price provider during either; address(0) otherwise, including during simulation."}},"removeLiquidity(address,uint80,(int256[],uint256[]),bytes)":{"details":"Requires `msg.sender == owner` except for empty `binIdxs`, which returns `(0, 0)`.      Payouts round down per bin and again on conversion to native units; no callback.      Emptying the current bin resets its position to `0` for non-negative bins or `type(uint104).max` for negative bins.","params":{"deltas":"Parallel arrays of bins and share burns.","extensionData":"Opaque bytes forwarded to liquidity extensions (beforeRemoveLiquidity / afterRemoveLiquidity).","owner":"Must equal `msg.sender`.","salt":"Position salt with `owner`."},"returns":{"amount0Removed":"Total token0 sent from the pool to `owner` (native).","amount1Removed":"Total token1 sent from the pool to `owner` (native)."}},"setBinAdditionalFees(int16,uint16,uint16)":{"params":{"addFeeBuyE6":"Additional fee on swaps buying token0 (E6).","addFeeSellE6":"Additional fee on swaps selling token0 (E6).","bin":"Bin index within the pool configured bin range."}},"setPause(uint8)":{"details":"Transition rules are enforced by the factory, not the pool.","params":{"newLevel":"Pause level enforced by the pool; must be at most `2`."}},"setPoolFees(uint24,uint24)":{"params":{"newNotionalFeeE8":"Total notional fee in E8 (`1e8 = 100%`).","newSpreadFeeE6":"Platform share (protocol + admin) of the spread fee in E6 (`1e6 = 100%`)."}},"setPriceProvider(address)":{"params":{"newPriceProvider":"New provider contract; the factory validates its `token0`/`token1`, the pool stores it as given."}},"simulateSwapAndRevert(address,address,bool,int128,uint128,uint128,uint128,uint128,bytes)":{"details":"Does not use the pool’s live oracle prices for the mid—use for quotes/off-chain routing. Invokes the same swap extension point functions as `swap` when enabled; still enforces `priceLimitX64` and path logic; no ERC20 transfers or swap callback. Typical usage: `eth_call` or `try/catch` decoding `SimulateSwap`. `sender` is forwarded to the extension points as-is instead of `msg.sender`, so you can simulate as an arbitrary address (e.g. checking a sender-gated extension for a specific user) — safe only because the call always reverts and nothing persists.","params":{"amountSpecified":"Same sign convention as `swap`.","askPriceX64":"Ask used for extension context and swap math in this simulation (Q64.64).","bidPriceX64":"Bid used for extension context and swap math in this simulation (Q64.64).","extensionData":"Opaque bytes forwarded to swap extension point functions (beforeSwap / afterSwap).","priceLimitX64":"Same encoding as `swap`.","recipient":"Same as `swap` (forwarded to swap extension point functions).","referencePriceX64":"Reference price used as the mid/price-path anchor and for fee calculation in this simulation (Q64.64).","sender":"Address forwarded to swap extension point functions in place of `msg.sender`; has no other effect since the call always reverts.","zeroForOne":"Same as `swap`."},"returns":{"_0":"Unused in practice; values appear only on the reverting `SimulateSwap` error.","_1":"Unused in practice; values appear only on the reverting `SimulateSwap` error."}},"swap(address,bool,int128,uint128,bytes,bytes)":{"details":"Pulls input from `msg.sender` through `IMetricOmmSwapCallback` after sending output to `recipient`.","params":{"amountSpecified":"Exact input if `>0`, exact output magnitude if `<0`, in native units of that leg.        May be partially filled; check the returned deltas.","callbackData":"Opaque bytes forwarded to the swap callback.","extensionData":"Opaque bytes forwarded to swap extension point functions (beforeSwap / afterSwap).","priceLimitX64":"Fee-inclusive token1-per-token0 price in Q64.64: a floor when `zeroForOne`, a cap otherwise.        Zero permits sells but prevents buys; rounding can significantly breach the bound for tiny amounts.","recipient":"Address that receives the output token (sent before the callback; the swap reverts if the        callback then underpays the input).","zeroForOne":"`true` sells token0 for token1 along the pool’s ordering."},"returns":{"_0":"Net token0 change for the pool (signed, native; positive = pool received).","_1":"Net token1 change for the pool (signed, native; positive = pool received)."}}},"stateVariables":{"IMMUTABLE_PRICE_PROVIDER":{"details":"If set this is the address of the immutable price providerIf unset the `priceProvider` is the address of the mutable price provider."},"_positionBinShares":{"details":"Per-bin position shares keyed by `LiquidityLib._positionBinKey`."},"bidAskRefAsymmetryX8":{"details":"`m` in X8 (`M = 1 + m`); `type(uint16).max` disables the bid/ask/reference asymmetry check."},"notionalFeeE8":{"details":"Platform (protocol + admin) notional fee, E8."},"pauseLevel":{"details":"0 = active, 1 = paused by admin, 2 = paused by protocol. Transitions enforced by factory."},"pendingAdminFeeToken0Scaled":{"details":"Pending fee balances in internal scaled units; payouts convert to native units rounding down."},"priceProvider":{"details":"The price provider address - only used when `IMMUTABLE_PRICE_PROVIDER == address(0)`"},"spreadFeeE6":{"details":"Platform (protocol + admin) share of the spread fee, E6."}},"title":"MetricOmmPool","version":1},"userdoc":{"errors":{"AmountScaledExceedsMax()":[{"notice":"The scaled `amountSpecified` (native × token scale multiplier) exceeds `type(uint128).max`."}],"BidAskRefAsymmetryOutOfBounds()":[{"notice":"Bid/ask returns about the reference are too asymmetric for the pool's `bidAskRefAsymmetryX8` bound."}],"BidGreaterThanAsk()":[{"notice":"Bid price is not strictly below ask (`bidPriceX64 >= askPriceX64`)."}],"BidIsZero()":[{"notice":"Bid price was zero, so mid/spread cannot be formed."}],"FinalAmountIsZero()":[{"notice":"Swap math settled with a zero input or output delta (native units)."}],"IncorrectDelta()":[{"notice":"Swap callback paid less than the input amount the pool requested."}],"InsufficientLiquidity(uint256,uint256)":[{"notice":"Burn asked for more shares than exist for that position in a bin."}],"InsufficientTokenBalance()":[{"notice":"The modify-liquidity callback sent fewer tokens than the pool debt for this add."}],"InvalidAmount()":[{"notice":"`amountSpecified == 0` on `swap` / `simulateSwapAndRevert`."}],"InvalidBinIndex(int256)":[{"notice":"A bin index in `deltas.binIdxs` (or `setBinAdditionalFees`) is outside this pool’s         `[LOWEST_BIN, HIGHEST_BIN]`."}],"InvalidPauseLevel()":[{"notice":"Thrown when `setPause` is called with a level outside `0..2`."}],"LeftoversSmallerThanMinimalOperationalLiquidity(int256,uint256,uint256)":[{"notice":"Remove would leave a non-zero position below the pool operational floor."}],"LiquidityDeltaLengthMismatch()":[{"notice":"`LiquidityDelta` arrays are not the same length."}],"NotAllowedToDeposit()":[{"notice":"Deposit allowlist rejected this `owner` for `addLiquidity`."}],"NotAllowedToSwap()":[{"notice":"Swap allowlist rejected the swap `sender` (`msg.sender` for `swap`, the supplied `sender` for `simulateSwapAndRevert`)."}],"NotPositionOwner()":[{"notice":"`removeLiquidity` caller is not the position owner."}],"OnlyFactory()":[{"notice":"Thrown when `msg.sender` is not the pool factory."}],"OverflowedOnFittingBinBalances(uint256)":[{"notice":"A swap would write a bin's scaled token balance above `type(uint104).max`."}],"PoolPaused()":[{"notice":"Swaps are disabled while the pool pause level is non-zero."}],"PriceProviderFailed(bytes)":[{"notice":"External call to the active `IPriceProvider` reverted or bubbled a failure."}],"ReferencePriceOutOfRange()":[{"notice":"Reference price was not within `[bidPriceX64, askPriceX64]`, or was zero."}],"SharesAmountTooLarge()":[{"notice":"A row's shares exceed `type(uint192).max`, or its required scaled token amount exceeds `type(uint104).max`."}],"SharesDeltaSmallerThanMinimalOperationalLiquidity(int256,uint256,uint256)":[{"notice":"Add or remove share delta is below the pool operational floor."}],"SimulateSwap(int256,int256)":[{"notice":"Deliberate revert carrying simulated swap deltas; no settlement callback or token transfers."}]},"events":{"BidAskRefAsymmetryUpdated(uint16)":{"notice":"Emitted when bid/ask/ref asymmetry slack `m` in X8 is updated (`M = 1 + m`)."},"BinAdditionalFeesUpdated(int16,uint16,uint16)":{"notice":"Emitted when per-bin additional spread fees are set."},"BinSwapped(int256,uint256,uint256)":{"notice":"One step of routing updated a bin during `swap` (may emit multiple times per call)."},"LiquidityAdded(address,uint80,int256[],(int256,int256)[],uint256[])":{"notice":"Liquidity was minted into one or more bins for a single position key."},"LiquidityRemoved(address,uint80,int256[],(int256,int256)[],uint256[])":{"notice":"Liquidity was burned from one or more bins for a single position key."},"NotionalFeeUpdated(uint24)":{"notice":"Emitted when total notional fee on the pool is updated."},"PauseLevelUpdated(uint8,uint8)":{"notice":"Emitted when pause level changes."},"PriceProviderUpdated(address)":{"notice":"Emitted when the mutable price provider address stored on the pool is updated."},"ProtocolFeesCollected(uint256,uint256,uint256,uint256)":{"notice":"Emitted on every `collectFees` call; amounts are those actually transferred."},"SpreadFeeUpdated(uint24)":{"notice":"Emitted when the platform share of the spread fee on the pool is updated."},"Swap(address,address,uint256,uint256,uint256)":{"notice":"Terminal summary after a successful `swap`."}},"kind":"user","methods":{"addLiquidity(address,uint80,(int256[],uint256[]),bytes,bytes)":{"notice":"Mint shares across bins for `(owner, salt)`; pulls tokens via `IMetricOmmModifyLiquidityCallback` on `msg.sender`."},"collectFees(uint256,uint256,uint256,uint256,address,address)":{"notice":"Allocate accrued fees using supplied rates, then attempt payouts including previously unpaid fees."},"extsload(bytes32)":{"notice":"Read a single 32-byte storage slot."},"extsload(bytes32,uint256)":{"notice":"Read a contiguous run of slots starting at `startSlot` for `nSlots` steps."},"extsload(bytes32[])":{"notice":"Read many storage slots in one call."},"getImmutables()":{"notice":"Return every constructor-set immutable in a single call."},"getSellAndBuyPrices()":{"notice":"Live sell/buy prices (Q64.64) for token0 at the pool's current marginal bin position."},"inSwap()":{"notice":"Whether a live swap or `getSellAndBuyPrices` is executing and which price provider supplies its quotes."},"removeLiquidity(address,uint80,(int256[],uint256[]),bytes)":{"notice":"Burn shares across bins for `(owner, salt)` and send underlying tokens to `owner`."},"setBidAskRefAsymmetryX8(uint16)":{"notice":"Update bid/ask/reference asymmetry bound `m` in X8 (`type(uint16).max` disables the check)."},"setBinAdditionalFees(int16,uint16,uint16)":{"notice":"Set per-bin additional buy and sell spread fees in E6 on top of base spread."},"setPause(uint8)":{"notice":"Set pool pause level (`0` active, `1` admin paused, `2` protocol paused)."},"setPoolFees(uint24,uint24)":{"notice":"Set aggregate pool spread and notional fee rates (sum of protocol + admin components)."},"setPriceProvider(address)":{"notice":"Update the pool active price provider (the factory only calls this for pools created with a mutable provider)."},"simulateSwapAndRevert(address,address,bool,int128,uint128,uint128,uint128,uint128,bytes)":{"notice":"Run swap math with caller-supplied bid/ask/reference; reverts with `SimulateSwap` on success or an execution error on failure."},"swap(address,bool,int128,uint128,bytes,bytes)":{"notice":"Execute a spot swap against pool liquidity using live oracle prices."}},"notice":"Oracle-Based OMM Pool with separate bin accounting","version":1}},"settings":{"compilationTarget":{"contracts/MetricOmmPool.sol":"MetricOmmPool"},"evmVersion":"cancun","libraries":{"contracts/MetricOmmPool.sol:LiquidityLib":"0xe0b1576ac63a582e6740a7e1dcfbbef730539cd4"},"metadata":{"bytecodeHash":"none"},"optimizer":{"enabled":true,"runs":1999},"remappings":[":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",":erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",":forge-std/=lib/forge-std/src/",":halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",":openzeppelin-contracts/=lib/openzeppelin-contracts/"],"viaIR":true},"sources":{"contracts/ExtensionCalling.sol":{"keccak256":"0x88ee39a71e363ab99b5e5b28f06399cadb50bbc0cd435da97e7bdda59ac20570","license":"MIT","urls":["bzz-raw://ebd54d3d09f2f0ffda355bf41c807c4cfeb21da8047e0ef700121545f3d8e073","dweb:/ipfs/QmaEfWgyFZMK8pAaaVQxnBmxkdQcrS8Znmz4T8Gz6psmdK"]},"contracts/Extsload.sol":{"keccak256":"0xb428e83ca19476214f559d2b8f31b40ab69d2b0ec94c0baa5770fbfe5e678455","license":"MIT","urls":["bzz-raw://c788d78f617714c916c212da258b510e0cc8dda22ba24a26877cf70513937f0b","dweb:/ipfs/QmbxQzMW8Jic4Wo4aDAEwrQgw9AYL9V9dwZTPpudZ8V55W"]},"contracts/MetricOmmPool.sol":{"keccak256":"0xd48fd168093fc1585a8747972dbc1ceb6505d00f42aa6969f607baecfa6d19c5","license":"BUSL-1.1","urls":["bzz-raw://86050026f3a6af657c646d16a154350da3f11f3ed3c41e72e4a7887f3df0ba97","dweb:/ipfs/QmV1wvnwUjMAw1iW7aW1DCSbD6Fu9rh33bMbmw2R5qFogf"]},"contracts/interfaces/IExtsload.sol":{"keccak256":"0xf8ffc91feecf0eda634893219ca0d132a480eb49a82caac7a2be6919bdce2b9d","license":"MIT","urls":["bzz-raw://4bf5f555ca73a823be84bf1d0415fa91ded371a65cd49002f452dccbf5dd1328","dweb:/ipfs/QmRCSKQE9GemJdRic57rRU8d2syX77hyhHcutHaxwMAbhq"]},"contracts/interfaces/IMetricOmmPool/IMetricOmmPool.sol":{"keccak256":"0xe099a070735cb44fa9f53e1e9787fbad4078b3b6109ab51429d0d2450dc2f61b","license":"MIT","urls":["bzz-raw://dc83d14c1cbadb20b8dafcf61a625b23fccb398d8ceb95b8f67a31db09d80f48","dweb:/ipfs/QmTzTZPRxnwrz5r7nNbeWdxLThhidssAxpYpR84DrD3PSQ"]},"contracts/interfaces/IMetricOmmPool/IMetricOmmPoolActions.sol":{"keccak256":"0x0c6c0b6e36ddbe493149fb464ac763b6a5a3cd8474893f2582f14d6b5810bf5b","license":"MIT","urls":["bzz-raw://1c4cb8173df4ed290ca49b907550c9ff566f91ba147f1a8d9e1e90a4ec0bdc0d","dweb:/ipfs/QmNMgF3z1CCj26s2Yt7R6meVT9hohR9tVp1TBugCmVDREs"]},"contracts/interfaces/IMetricOmmPool/IMetricOmmPoolCollectFees.sol":{"keccak256":"0x07c326b601a1cc1d8e73d48ad6a7b74479ddb078a6f39f96158c0cc30311c99c","license":"MIT","urls":["bzz-raw://cdbffc80a2be758035b37742631054b24612c3d04b80e286e6173b3a39515cdf","dweb:/ipfs/QmNyv9ZjiS2Bo7FbXU6aFVEw1N1bVUQezYwo8Fd23gCDTh"]},"contracts/interfaces/IMetricOmmPool/IMetricOmmPoolFactoryActions.sol":{"keccak256":"0x3fb7d4ca9fc3507511ad322a22f422c05ddac93027bff0b60f3e2800746616fd","license":"MIT","urls":["bzz-raw://e44bf7e2e622f288dcd750a5b86bb16aa2cff09c4c9b4d87d9bd13804c137308","dweb:/ipfs/QmVHj6xphVg9TQoYu68URRg2n3PpEx7q9rvGSmey1A1k1L"]},"contracts/interfaces/IPriceProvider/IPriceProvider.sol":{"keccak256":"0xe20a101e6175e4d424491db6aac2943cb95cc6f99d4d8f99e7622b5344736329","license":"MIT","urls":["bzz-raw://79625b8c45cdcaff9ab4c80d142d0c2d0ecf03c83a3141107d2b126613ef7849","dweb:/ipfs/QmPeMjDMRTyX6KwaDv7gY1jvfjkKLfzHTu9XWfe4NBiDfM"]},"contracts/interfaces/callbacks/IMetricOmmModifyLiquidityCallback.sol":{"keccak256":"0x2054f19356ad76bb1e4c25d87eb94e87c9b3fbcd160575f48e620ef1e7f5868c","license":"MIT","urls":["bzz-raw://b769b15769cae01b9809f37479d3459cad8ebb5b71bad49a38cf090627bb0827","dweb:/ipfs/QmZmNt83d8iNwj6DeySJKmRQHFnN6qT3LSedVkpdPUC4LS"]},"contracts/interfaces/callbacks/IMetricOmmSwapCallback.sol":{"keccak256":"0x9cac017c296fbda725cea3625ad32593d6e4ffaa5aa419974992a37c1d46c05c","license":"MIT","urls":["bzz-raw://297d5fbb003b919e820c31ee26d8288ef3aba4bc9125649e13c73a865dd10163","dweb:/ipfs/QmSWbeX5aSUpkeZa7Uhb4yeVYw8MHazGSqKiNbtgDwaaif"]},"contracts/interfaces/extensions/IMetricOmmExtensions.sol":{"keccak256":"0x5fa68e1ccf4d55a92a332f2beeb74f6faa16b2ce896e0f7ae7981a89786f3fa1","license":"MIT","urls":["bzz-raw://46609f46fca7a517c6e89293cbddc302a1f0f2802241b3f688d23969fe683d97","dweb:/ipfs/QmbVbFeDGS4BQQGsQNLhR67RUeHzNHfaWeXd5gAUWzd2yu"]},"contracts/libraries/CallExtension.sol":{"keccak256":"0xf949399708682adb63db206160530f473558b585940932f069355bf817b83404","license":"MIT","urls":["bzz-raw://eef0fba6d240a8b00817280e3a591cf821b40fc2d790c0e504940f8218fe34e7","dweb:/ipfs/QmYdwRWBgJXUgCvBH5brkyjrGyeaJm3XFczB81zx5XekXo"]},"contracts/libraries/FeeMath.sol":{"keccak256":"0x535673de140ef293ff14e3c3019343ec178968b3858ea432cb8ac66f0e6d0016","license":"BUSL-1.1","urls":["bzz-raw://5e6d5f134578b91388565d766ed7f4475b3957a27e3b5cbbf97755b9169a470c","dweb:/ipfs/QmcuRKVpwC59ig1pmAop66Gccwzc4LeXArZi5CDhPn4tH7"]},"contracts/libraries/LiquidityLib.sol":{"keccak256":"0x688bc0aaafa152fdea47b682871e97005f2ed27a95f002a6c807ff523ae5905c","license":"BUSL-1.1","urls":["bzz-raw://e42776b67a0500dcd62b02dea9c086c3d3b5cfa44ad34a12a6774720852f63c5","dweb:/ipfs/QmaoZAfL4rUcbnhMSS9gFAN69Ht4W2319ZtW6PeDMJRLy6"]},"contracts/libraries/PoolActions.sol":{"keccak256":"0x95d6a5552ea3c1cf67e07a5369c765e43b48b3e93c25202192f39293989881f4","license":"MIT","urls":["bzz-raw://9e5915a2cdb16fdc8afbb6f33bc168ddd1022aedf3e883c8ab0722126dd45d5e","dweb:/ipfs/QmR37HD7efLG2sgsQKQi1XDp9ZQ9N4YUAGkBSjzcVDzYw3"]},"contracts/libraries/PoolStateLibrary.sol":{"keccak256":"0x7a52d5daf484669e588e99f55d0555e79f57589e8b1e0c90b4f414ebe61164d6","license":"MIT","urls":["bzz-raw://966e6a41f589c9f4f2b98d187806a473a0bd38740dba28e7a023f2efa2f50ffb","dweb:/ipfs/QmVBY87kxr2gyW4DZGwqPpx3HTJkk5uTupoAFYjYtig7dW"]},"contracts/libraries/SignedMath.sol":{"keccak256":"0x6c199881bf4e757a5a5f43c40c175661555428015296df42268b2f5a59ec846b","license":"MIT","urls":["bzz-raw://976c3c9eb76aec80b904df6eb1c66576079367b3db650c39f4714421d85a0379","dweb:/ipfs/QmfDsCHQBHsARzmpDNdu2yMZHjUEgUxcCErxHgQPE3PCEt"]},"contracts/libraries/Slot0Library.sol":{"keccak256":"0xc18a58d28c2c3a4ac683686ddbb42215179b60986b58c35b1b761c383211416b","license":"MIT","urls":["bzz-raw://fd62023c93bf7c980848f8278ba4be600aa95d5cf95959116320ea8b3d6215dc","dweb:/ipfs/QmeLDq5Xz5Jwn4MLKqqrU7zYhrzF5yvNvCBW5BMzJjAAnn"]},"contracts/libraries/SwapMath.sol":{"keccak256":"0x03da3cad860343cac127dd5ed17e3ee8a7c3f811e3d86d4b8fe571ecfed58a52","license":"BUSL-1.1","urls":["bzz-raw://345ec5f22bc7d8dc5baed5737401896f89c0c0e997bc3aee285139e125339957","dweb:/ipfs/QmUY4q1G2Rb7ykXBCQ9k6HxCKn9mqM8RcFEwT1GuMJX9qh"]},"contracts/types/Packed.sol":{"keccak256":"0xb45c9c541fe40145b66dc0988632eddc421d0c9a8ce6de3fa9c0f2fba1ce8d5d","license":"MIT","urls":["bzz-raw://f4820045bac4b7928a8901323e32c12e1615eeabe1da69dd2fd716db14757771","dweb:/ipfs/QmU1uCvACUf1Vbtp3AVbrVW6pmgTKTQV1kL5j5eK5ZiKhy"]},"contracts/types/PoolExtensionsConfig.sol":{"keccak256":"0x404149fd4b5248a283a1f599a7ef309c3f46dfc449f44e71fd8d58d0c5f182e2","license":"MIT","urls":["bzz-raw://55b099938b5f8b87ba213925fb1284b46bf5554366a28355ff9b49ad9357350c","dweb:/ipfs/Qmd5Mgs6GgwoLjcjyB2aPkpib7sLTNw7J5yjaojVPwgkvT"]},"contracts/types/PoolOperation.sol":{"keccak256":"0xe9bfadce2dbf16e48f0a759f3975a0d5535be584f32ca8998c0d11a3abaf9729","license":"MIT","urls":["bzz-raw://4c575117438d9de5ac0a0ebf35ffc80142143ddfbd8db8f583ecc1968ca6796b","dweb:/ipfs/Qmba83MzYZ9siRCZ1yNTagru7sqZMGKm5zTaGFGhb3tCzi"]},"contracts/types/PoolStorage.sol":{"keccak256":"0xe0470ebac23701699b6396ae2cde4dd3c3311d4d6df6dcc7fe848d4f0cd3116d","license":"MIT","urls":["bzz-raw://aee470995e83dd337736d8d865f1b92403faeabe7b0057b42f0697dcb17889eb","dweb:/ipfs/QmZNgez3zabnAnEwQ6crJyg6BCRYNBcxQD45tkDnFjpSdS"]},"contracts/types/Slot0.sol":{"keccak256":"0xbc4ab36bbc0cdf436b39ef74f18e6eb6430a8754c5d60c2fab35cb265c122adc","license":"MIT","urls":["bzz-raw://6cd88eebc4981ef93ac0f1d8bfddbae79fdb7fa01cd1c559899a4f25ddc0d3db","dweb:/ipfs/QmZSmYEessCE5jn2igVvtMWJwXJkyA7mk4w2F8ErwzHWaW"]},"contracts/utils/MetricReentrancyGuardTransient.sol":{"keccak256":"0xf8c505dd297ef44e37c1f4aa35ecee9a326abb935d266bd085945b15d8eda0b2","license":"MIT","urls":["bzz-raw://758c5fdcf3a833c14c320a73c2fcac3085e5ff83b562d0f985a39819cf669259","dweb:/ipfs/QmRZiwe8njEtNKja62UCgispzGweWA5ZREqpHua7eic5bZ"]},"lib/openzeppelin-contracts/contracts/interfaces/IERC1363.sol":{"keccak256":"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d","license":"MIT","urls":["bzz-raw://da5e832b40fc5c3145d3781e2e5fa60ac2052c9d08af7e300dc8ab80c4343100","dweb:/ipfs/QmTzf7N5ZUdh5raqtzbM11yexiUoLC9z3Ws632MCuycq1d"]},"lib/openzeppelin-contracts/contracts/interfaces/IERC165.sol":{"keccak256":"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc","license":"MIT","urls":["bzz-raw://1c299900ac4ec268d4570ecef0d697a3013cd11a6eb74e295ee3fbc945056037","dweb:/ipfs/Qmab9owJoxcA7vJT5XNayCMaUR1qxqj1NDzzisduwaJMcZ"]},"lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol":{"keccak256":"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44","license":"MIT","urls":["bzz-raw://1bb2332a7ee26dd0b0de9b7fe266749f54820c99ab6a3bcb6f7e6b751d47ee2d","dweb:/ipfs/QmcRWpaBeCYkhy68PR3B4AgD7asuQk7PwkWxrvJbZcikLF"]},"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol":{"keccak256":"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2","license":"MIT","urls":["bzz-raw://5282825a626cfe924e504274b864a652b0023591fa66f06a067b25b51ba9b303","dweb:/ipfs/QmeCfPykghhMc81VJTrHTC7sF6CRvaA1FXVq2pJhwYp1dV"]},"lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol":{"keccak256":"0x304d732678032a9781ae85c8f204c8fba3d3a5e31c02616964e75cfdc5049098","license":"MIT","urls":["bzz-raw://299ced486011781dc98f638059678323c03079fefae1482abaa2135b22fa92d0","dweb:/ipfs/QmbZNbcPTBxNvwChavN2kkZZs7xHhYL7mv51KrxMhsMs3j"]},"lib/openzeppelin-contracts/contracts/utils/Panic.sol":{"keccak256":"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a","license":"MIT","urls":["bzz-raw://c6a5ff4f9fd8649b7ee20800b7fa387d3465bd77cf20c2d1068cd5c98e1ed57a","dweb:/ipfs/QmVSaVJf9FXFhdYEYeCEfjMVHrxDh5qL4CGkxdMWpQCrqG"]},"lib/openzeppelin-contracts/contracts/utils/TransientSlot.sol":{"keccak256":"0xac673fa1e374d9e6107504af363333e3e5f6344d2e83faf57d9bfd41d77cc946","license":"MIT","urls":["bzz-raw://5982478dbbb218e9dd5a6e83f5c0e8d1654ddf20178484b43ef21dd2246809de","dweb:/ipfs/QmaB1hS68n2kG8vTbt7EPEzmrGhkUbfiFyykGGLsAr9X22"]},"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol":{"keccak256":"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c","license":"MIT","urls":["bzz-raw://971f954442df5c2ef5b5ebf1eb245d7105d9fbacc7386ee5c796df1d45b21617","dweb:/ipfs/QmadRjHbkicwqwwh61raUEapaVEtaLMcYbQZWs9gUkgj3u"]},"lib/openzeppelin-contracts/contracts/utils/math/Math.sol":{"keccak256":"0xe7b82bf9ab6d5016033e5cd2b1d4320a9c12551551d4c57650b5ddebfa47ff07","license":"MIT","urls":["bzz-raw://57dd5fbf78e3866b8988cfada7592de8a285cd14e6b42c694526971481bf23d2","dweb:/ipfs/Qmf6Lu6k74k6vgj5kTNYqh2eSHx72urgiD5yYrw7MTY7JT"]},"lib/openzeppelin-contracts/contracts/utils/math/SafeCast.sol":{"keccak256":"0x340b2f51e4c8aa4e3b2c4e3e12a34ac86f4383ecda2bdbad2e263b5a2d3444a3","license":"MIT","urls":["bzz-raw://f7ce09e887e3407bcfc09de5e263143cc44c8bcc4162a32acdb3144eafd89ce2","dweb:/ipfs/QmXda4wEQSWT5xQrETZdBXP2M67LH4F49QxQ16rTj6zZ99"]}},"version":1},"storageLayout":{"types":{"t_int16":{"label":"int16","encoding":"inplace","numberOfBytes":"2"},"t_int24":{"label":"int24","encoding":"inplace","numberOfBytes":"3"},"t_uint8":{"label":"uint8","encoding":"inplace","numberOfBytes":"1"},"t_int256":{"label":"int256","encoding":"inplace","numberOfBytes":"32"},"t_uint16":{"label":"uint16","encoding":"inplace","numberOfBytes":"2"},"t_uint24":{"label":"uint24","encoding":"inplace","numberOfBytes":"3"},"t_address":{"label":"address","encoding":"inplace","numberOfBytes":"20"},"t_bytes32":{"label":"bytes32","encoding":"inplace","numberOfBytes":"32"},"t_uint104":{"label":"uint104","encoding":"inplace","numberOfBytes":"13"},"t_uint128":{"label":"uint128","encoding":"inplace","numberOfBytes":"16"},"t_uint256":{"label":"uint256","encoding":"inplace","numberOfBytes":"32"},"t_mapping(t_int256,t_uint256)":{"key":"t_int256","label":"mapping(int256 => uint256)","value":"t_uint256","encoding":"mapping","numberOfBytes":"32"},"t_mapping(t_bytes32,t_uint256)":{"key":"t_bytes32","label":"mapping(bytes32 => uint256)","value":"t_uint256","encoding":"mapping","numberOfBytes":"32"},"t_struct(BinState)9392_storage":{"label":"struct BinState","members":[{"slot":"0","type":"t_uint104","astId":9383,"label":"token0BalanceScaled","offset":0,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"0","type":"t_uint104","astId":9385,"label":"token1BalanceScaled","offset":13,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"0","type":"t_uint16","astId":9387,"label":"lengthE6","offset":26,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"0","type":"t_uint16","astId":9389,"label":"addFeeBuyE6","offset":28,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"0","type":"t_uint16","astId":9391,"label":"addFeeSellE6","offset":30,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"}],"encoding":"inplace","numberOfBytes":"32"},"t_struct(BinTotals)9380_storage":{"label":"struct BinTotals","members":[{"slot":"0","type":"t_uint128","astId":9377,"label":"scaledToken0","offset":0,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"0","type":"t_uint128","astId":9379,"label":"scaledToken1","offset":16,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"}],"encoding":"inplace","numberOfBytes":"32"},"t_mapping(t_int256,t_struct(BinState)9392_storage)":{"key":"t_int256","label":"mapping(int256 => struct BinState)","value":"t_struct(BinState)9392_storage","encoding":"mapping","numberOfBytes":"32"}},"storage":[{"slot":"0","type":"t_uint8","astId":627,"label":"pauseLevel","offset":0,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"0","type":"t_int16","astId":629,"label":"curBinIdx","offset":1,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"0","type":"t_uint104","astId":631,"label":"curPosInBin","offset":3,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"0","type":"t_int24","astId":633,"label":"curBinDistFromProvidedPriceE6","offset":16,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"0","type":"t_uint24","astId":636,"label":"spreadFeeE6","offset":19,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"0","type":"t_uint24","astId":639,"label":"notionalFeeE8","offset":22,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"0","type":"t_uint16","astId":642,"label":"bidAskRefAsymmetryX8","offset":25,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"1","type":"t_struct(BinTotals)9380_storage","astId":645,"label":"binTotals","offset":0,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"2","type":"t_uint128","astId":647,"label":"notionalFeeToken0Scaled","offset":0,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"2","type":"t_uint128","astId":649,"label":"notionalFeeToken1Scaled","offset":16,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"3","type":"t_address","astId":652,"label":"priceProvider","offset":0,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"4","type":"t_mapping(t_int256,t_struct(BinState)9392_storage)","astId":657,"label":"_binStates","offset":0,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"5","type":"t_mapping(t_int256,t_uint256)","astId":661,"label":"_binTotalShares","offset":0,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"6","type":"t_mapping(t_bytes32,t_uint256)","astId":666,"label":"_positionBinShares","offset":0,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"7","type":"t_uint256","astId":669,"label":"pendingAdminFeeToken0Scaled","offset":0,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"8","type":"t_uint256","astId":671,"label":"pendingAdminFeeToken1Scaled","offset":0,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"9","type":"t_uint256","astId":673,"label":"pendingProtocolFeeToken0Scaled","offset":0,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"10","type":"t_uint256","astId":675,"label":"pendingProtocolFeeToken1Scaled","offset":0,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"}]},"transientStorageLayout":{"types":null,"storage":[]},"userdoc":{"kind":"user","errors":{"BidIsZero()":[{"notice":"Bid price was zero, so mid/spread cannot be formed."}],"PoolPaused()":[{"notice":"Swaps are disabled while the pool pause level is non-zero."}],"OnlyFactory()":[{"notice":"Thrown when `msg.sender` is not the pool factory."}],"InvalidAmount()":[{"notice":"`amountSpecified == 0` on `swap` / `simulateSwapAndRevert`."}],"IncorrectDelta()":[{"notice":"Swap callback paid less than the input amount the pool requested."}],"NotAllowedToSwap()":[{"notice":"Swap allowlist rejected the swap `sender` (`msg.sender` for `swap`, the supplied `sender` for `simulateSwapAndRevert`)."}],"NotPositionOwner()":[{"notice":"`removeLiquidity` caller is not the position owner."}],"BidGreaterThanAsk()":[{"notice":"Bid price is not strictly below ask (`bidPriceX64 >= askPriceX64`)."}],"FinalAmountIsZero()":[{"notice":"Swap math settled with a zero input or output delta (native units)."}],"InvalidPauseLevel()":[{"notice":"Thrown when `setPause` is called with a level outside `0..2`."}],"NotAllowedToDeposit()":[{"notice":"Deposit allowlist rejected this `owner` for `addLiquidity`."}],"SharesAmountTooLarge()":[{"notice":"A row's shares exceed `type(uint192).max`, or its required scaled token amount exceeds `type(uint104).max`."}],"InvalidBinIndex(int256)":[{"notice":"A bin index in `deltas.binIdxs` (or `setBinAdditionalFees`) is outside this pool’s         `[LOWEST_BIN, HIGHEST_BIN]`."}],"AmountScaledExceedsMax()":[{"notice":"The scaled `amountSpecified` (native × token scale multiplier) exceeds `type(uint128).max`."}],"InsufficientTokenBalance()":[{"notice":"The modify-liquidity callback sent fewer tokens than the pool debt for this add."}],"PriceProviderFailed(bytes)":[{"notice":"External call to the active `IPriceProvider` reverted or bubbled a failure."}],"ReferencePriceOutOfRange()":[{"notice":"Reference price was not within `[bidPriceX64, askPriceX64]`, or was zero."}],"SimulateSwap(int256,int256)":[{"notice":"Deliberate revert carrying simulated swap deltas; no settlement callback or token transfers."}],"LiquidityDeltaLengthMismatch()":[{"notice":"`LiquidityDelta` arrays are not the same length."}],"BidAskRefAsymmetryOutOfBounds()":[{"notice":"Bid/ask returns about the reference are too asymmetric for the pool's `bidAskRefAsymmetryX8` bound."}],"InsufficientLiquidity(uint256,uint256)":[{"notice":"Burn asked for more shares than exist for that position in a bin."}],"OverflowedOnFittingBinBalances(uint256)":[{"notice":"A swap would write a bin's scaled token balance above `type(uint104).max`."}],"LeftoversSmallerThanMinimalOperationalLiquidity(int256,uint256,uint256)":[{"notice":"Remove would leave a non-zero position below the pool operational floor."}],"SharesDeltaSmallerThanMinimalOperationalLiquidity(int256,uint256,uint256)":[{"notice":"Add or remove share delta is below the pool operational floor."}]},"events":{"SpreadFeeUpdated(uint24)":{"notice":"Emitted when the platform share of the spread fee on the pool is updated."},"NotionalFeeUpdated(uint24)":{"notice":"Emitted when total notional fee on the pool is updated."},"PriceProviderUpdated(address)":{"notice":"Emitted when the mutable price provider address stored on the pool is updated."},"PauseLevelUpdated(uint8,uint8)":{"notice":"Emitted when pause level changes."},"BidAskRefAsymmetryUpdated(uint16)":{"notice":"Emitted when bid/ask/ref asymmetry slack `m` in X8 is updated (`M = 1 + m`)."},"BinSwapped(int256,uint256,uint256)":{"notice":"One step of routing updated a bin during `swap` (may emit multiple times per call)."},"BinAdditionalFeesUpdated(int16,uint16,uint16)":{"notice":"Emitted when per-bin additional spread fees are set."},"Swap(address,address,uint256,uint256,uint256)":{"notice":"Terminal summary after a successful `swap`."},"ProtocolFeesCollected(uint256,uint256,uint256,uint256)":{"notice":"Emitted on every `collectFees` call; amounts are those actually transferred."},"LiquidityAdded(address,uint80,int256[],(int256,int256)[],uint256[])":{"notice":"Liquidity was minted into one or more bins for a single position key."},"LiquidityRemoved(address,uint80,int256[],(int256,int256)[],uint256[])":{"notice":"Liquidity was burned from one or more bins for a single position key."}},"notice":"Oracle-Based OMM Pool with separate bin accounting","methods":{"inSwap()":{"notice":"Whether a live swap or `getSellAndBuyPrices` is executing and which price provider supplies its quotes."},"getImmutables()":{"notice":"Return every constructor-set immutable in a single call."},"setPause(uint8)":{"notice":"Set pool pause level (`0` active, `1` admin paused, `2` protocol paused)."},"extsload(bytes32)":{"notice":"Read a single 32-byte storage slot."},"extsload(bytes32[])":{"notice":"Read many storage slots in one call."},"getSellAndBuyPrices()":{"notice":"Live sell/buy prices (Q64.64) for token0 at the pool's current marginal bin position."},"extsload(bytes32,uint256)":{"notice":"Read a contiguous run of slots starting at `startSlot` for `nSlots` steps."},"setPriceProvider(address)":{"notice":"Update the pool active price provider (the factory only calls this for pools created with a mutable provider)."},"setPoolFees(uint24,uint24)":{"notice":"Set aggregate pool spread and notional fee rates (sum of protocol + admin components)."},"setBidAskRefAsymmetryX8(uint16)":{"notice":"Update bid/ask/reference asymmetry bound `m` in X8 (`type(uint16).max` disables the check)."},"setBinAdditionalFees(int16,uint16,uint16)":{"notice":"Set per-bin additional buy and sell spread fees in E6 on top of base spread."},"swap(address,bool,int128,uint128,bytes,bytes)":{"notice":"Execute a spot swap against pool liquidity using live oracle prices."},"removeLiquidity(address,uint80,(int256[],uint256[]),bytes)":{"notice":"Burn shares across bins for `(owner, salt)` and send underlying tokens to `owner`."},"collectFees(uint256,uint256,uint256,uint256,address,address)":{"notice":"Allocate accrued fees using supplied rates, then attempt payouts including previously unpaid fees."},"addLiquidity(address,uint80,(int256[],uint256[]),bytes,bytes)":{"notice":"Mint shares across bins for `(owner, salt)`; pulls tokens via `IMetricOmmModifyLiquidityCallback` on `msg.sender`."},"simulateSwapAndRevert(address,address,bool,int128,uint128,uint128,uint128,uint128,bytes)":{"notice":"Run swap math with caller-supplied bid/ask/reference; reverts with `SimulateSwap` on success or an execution error on failure."}},"version":1},"devdoc":{"kind":"dev","title":"MetricOmmPool","errors":{"BidIsZero()":[{"details":"On `swap`, from the live provider; on `simulateSwapAndRevert`, from `bidPriceX64` you passed."}],"PoolPaused()":[{"details":"Pause level is factory-controlled; liquidity mutators are intentionally not blocked by the same check."}],"IncorrectDelta()":[{"details":"Distinct from `InsufficientTokenBalance` (liquidity path); the swap callback left the pool balance short of the input amount the pool requested."}],"NotAllowedToSwap()":[{"details":"Never reverted by the pool itself; gating extensions raise it from `beforeSwap`, which `swap` and `simulateSwapAndRevert` run identically."}],"NotPositionOwner()":[{"details":"Only `owner` may burn; `addLiquidity` may use a different `msg.sender` when `owner` is supplied, but removal is stricter."}],"BidGreaterThanAsk()":[{"details":"On `swap`, comes from the live `IPriceProvider` quote; on `simulateSwapAndRevert`, from the arguments you passed."}],"FinalAmountIsZero()":[{"details":"After conversion to native units, either `amount0Delta` or `amount1Delta` is zero — e.g. price limit blocks all progress or amounts round away."}],"NotAllowedToDeposit()":[{"details":"Never reverted by the pool itself; gating extensions raise it from the add-liquidity extension points."}],"PanicEmptyExtension()":[{"details":"Should never happen if factory validates extensions config."}],"SharesAmountTooLarge()":[{"details":"Overflow of the resulting bin or pool totals reverts with a `SafeCast` error instead."}],"InvalidBinIndex(int256)":[{"params":{"binIdx":"First failing index from the caller payload."}}],"AmountScaledExceedsMax()":[{"details":"Exact-output requests are capped to the pool's available output before this check."}],"InsufficientTokenBalance()":[{"details":"Fires after the pool computed required `amount0`/`amount1` and invoked `msg.sender`; safe for retry once the callback actually pays."}],"PriceProviderFailed(bytes)":[{"params":{"reason":"Opaque revert data from the provider (decode off-chain if the provider documents errors)."}}],"ReferencePriceOutOfRange()":[{"details":"On `swap`, from the live provider; on `simulateSwapAndRevert`, from `referencePriceX64` you passed."}],"SimulateSwap(int256,int256)":[{"params":{"amount0Delta":"Net token0 the swap would move into (`>0`) or out of (`<0`) the pool (native decimals).","amount1Delta":"Net token1 the swap would move into or out of the pool (native decimals)."},"details":"Uses validated caller-supplied quotes and runs swap hooks, even while paused. All state changes revert.      Both deltas must fit `int128` before `afterSwap`, despite the error using `int256` fields.      Decode this error from revert data; execution failures propagate their own errors instead."}],"PanicInvalidExtensionIndex()":[{"details":"Should never happen if factory validates extensions config."}],"LiquidityDeltaLengthMismatch()":[{"details":"Checked only for non-empty `binIdxs`; an empty array returns `(0, 0)`."}],"ReentrancyGuardReentrantCall()":[{"details":"Unauthorized reentrant call or overlapping guarded action."}],"BidAskRefAsymmetryOutOfBounds()":[{"details":"With `r1 = reference/bid - 1`, `r2 = ask/reference - 1`, and `M = 1 + m` (`m` stored in X8), requires      `1/M <= r1/r2 <= M`. Skipped when `bidAskRefAsymmetryX8 == type(uint16).max`. Otherwise a reference on bid/ask reverts."}],"SafeERC20FailedOperation(address)":[{"details":"An operation with an ERC-20 token failed."}],"SafeCastOverflowedUintToInt(uint256)":[{"details":"A uint value doesn't fit in an int of `bits` size."}],"InsufficientLiquidity(uint256,uint256)":[{"params":{"available":"Shares recorded for `owner`+`salt` in that bin when this entry is processed.","requested":"`deltas.shares[i]` for the offending bin."}}],"OverflowedOnFittingBinBalances(uint256)":[{"params":{"attemptedScaledBalance":"The balance that would have been stored (internal scaled units)."},"details":"Happens when the input credited to a bin would grow its incoming-side balance past the packed `BinState` width.      That direction can remain blocked until liquidity is removed or the opposite swap drains the incoming side; prefer smaller bins / less dense liquidity."}],"SafeCastOverflowedIntDowncast(uint8,int256)":[{"details":"Value doesn't fit in an int of `bits` size."}],"SafeCastOverflowedUintDowncast(uint8,uint256)":[{"details":"Value doesn't fit in a uint of `bits` size."}],"LeftoversSmallerThanMinimalOperationalLiquidity(int256,uint256,uint256)":[{"params":{"binIdx":"Bin where the leftover would remain.","leftovers":"Remaining shares after the attempted remove.","minimalRequired":"Pool immutable `MINIMAL_OPERATIONAL_LIQUIDITY`."},"details":"Raised when leftover shares are `> 0` and `< MINIMAL_OPERATIONAL_LIQUIDITY`; remove more or exit to zero."}],"SharesDeltaSmallerThanMinimalOperationalLiquidity(int256,uint256,uint256)":[{"params":{"binIdx":"Bin where the offending delta was applied.","sharesDelta":"Offending share delta.","minimalRequired":"Pool immutable `MINIMAL_OPERATIONAL_LIQUIDITY`."},"details":"Raised when non-zero `sharesToAdd` / `sharesToRemove` is `< MINIMAL_OPERATIONAL_LIQUIDITY`."}]},"events":{"SpreadFeeUpdated(uint24)":{"params":{"spreadFeeE6":"New platform share of the spread fee in E6 (`1e6 = 100%`)."}},"NotionalFeeUpdated(uint24)":{"params":{"notionalFeeE8":"New aggregate notional fee in E8 (`1e8 = 100%`)."}},"PriceProviderUpdated(address)":{"params":{"newPriceProvider":"New active `IPriceProvider` (immutable pools never emit this from rotation)."}},"PauseLevelUpdated(uint8,uint8)":{"params":{"newLevel":"New pause level after the update.","previousLevel":"Prior pause level (`0` active, `1` admin pause, `2` protocol pause)."}},"BidAskRefAsymmetryUpdated(uint16)":{"params":{"bidAskRefAsymmetryX8":"New asymmetry bound; `type(uint16).max` disables the check."}},"BinSwapped(int256,uint256,uint256)":{"params":{"fees":"This step's two fee legs, packed: `high` = LP leg (stays in the bin), `low` = platform leg (protocol + admin, withheld). Scaled units.","binIdx":"Bin touched in this step.","binDeltas":"Change in THAT BIN's scaled balances, packed: `high` = token0, `low` = token1."},"details":"Refer to types/Packed.sol to decode the packed values."},"BinAdditionalFeesUpdated(int16,uint16,uint16)":{"params":{"bin":"Bin index whose overrides were updated.","addFeeBuyE6":"Additional buy-side spread fee in E6 on top of base spread.","addFeeSellE6":"Additional sell-side spread fee in E6 on top of base spread."}},"Swap(address,address,uint256,uint256,uint256)":{"params":{"sender":"`msg.sender` of `swap` (the account that may receive swap callback).","details":"Swap mode and resulting bin position packed into one word: `exactInput()`,        `binIdx()` (signed), `posInBin()`. Check details in PackedSwapDetailsLib.","recipient":"Address that received the output token leg.","amountDeltas":"Net native-token flows for the whole call, packed: `high` = token0, `low` = token1 (positive = the pool gained that token).","platformFees":"Platform (protocol + admin) fee for this swap on the input-token leg, packed: `high` = SPREAD leg, `low` = NOTIONAL leg. Scaled units."},"details":"Refer to types/Packed.sol to decode the packed values."},"ProtocolFeesCollected(uint256,uint256,uint256,uint256)":{"params":{"amount0ToAdmin":"Token0 amount sent to `adminFeeDestination` (native).","amount1ToAdmin":"Token1 amount sent to `adminFeeDestination` (native).","amount0ToProtocol":"Token0 amount sent to `protocolFeeDestination` (native).","amount1ToProtocol":"Token1 amount sent to `protocolFeeDestination` (native)."}},"LiquidityAdded(address,uint80,int256[],(int256,int256)[],uint256[])":{"params":{"salt":"`salt` leg of the position key; indexed with `provider` to disambiguate positions.","shares":"Liquidity shares minted per input row for this position.","binIdxs":"Bin index per input row (pool-configured range).","provider":"`owner` leg of the position key; indexed for position-scoped subscriptions.","binBalanceDeltas":"Scaled token0/token1 balance change inside each bin (`BinBalanceDelta`); not wallet transfer amounts."},"details":"Arrays are parallel: `binIdxs[i]`, `binBalanceDeltas[i]`, and `shares[i]` describe the same bin. Zero-share rows remain in the arrays with zero deltas; indexers can reconcile bins from `binBalanceDeltas` (scaled) separately from callback token flows (native)."},"LiquidityRemoved(address,uint80,int256[],(int256,int256)[],uint256[])":{"params":{"salt":"Position salt with `provider` in the key.","shares":"Shares burned per input row.","binIdxs":"Bin index per input row.","provider":"Position owner (equals `msg.sender` for the removing call).","binBalanceDeltas":"Scaled balance change per bin (non-positive: tokens leaving the bin)."},"details":"Same parallel-array layout as `LiquidityAdded`. `removeLiquidity` requires `msg.sender == owner`, so the position key always matches the caller for this event."}},"details":"Layout: immutables, state variables, constructor, modifiers,      external state-changing functions, external views, then internal helpers.Contract uses `Extsload` for external storage reads, apart from `getImmutables()`, `inSwap()` and `getSellAndBuyPrices()`.External function order follows `IMetricOmmPool` composition: `IMetricOmmPoolActions`, then `IMetricOmmPoolCollectFees`, then `IMetricOmmPoolFactoryActions`.Contract coupling: storage layout and packing are mirrored by `contracts/libraries/PoolStateLibrary.sol`      for EXTSLOAD-based reads. Any storage reorder or repack is a breaking change for EXTSLOAD readers.","methods":{"inSwap()":{"returns":{"priceProvider_":"Active price provider during either; address(0) otherwise, including during simulation."}},"constructor":{"details":"All initial checks MUST be validated before construction at the factory/deployer level."},"getImmutables()":{"details":"Immutables live in contract bytecode, not storage, so they cannot be read via EXTSLOAD."},"setPause(uint8)":{"params":{"newLevel":"Pause level enforced by the pool; must be at most `2`."},"details":"Transition rules are enforced by the factory, not the pool."},"extsload(bytes32)":{"params":{"slot":"Keccak-derived or raw slot key as used by the implementation contract."},"returns":{"_0":"Raw `bytes32` contents of the slot."}},"extsload(bytes32[])":{"params":{"slots":"Each entry is a slot key as for `extsload(bytes32)`."},"returns":{"_0":"One `bytes32` per slot, same order as `slots`."}},"getSellAndBuyPrices()":{"details":"Informational only — not a guaranteed executable quote. Sell = token0 → token1; buy = token1 → token0.      Includes oracle spread, per-bin additional fees, and notional fees (zero-size exact-in marginal prices)      via the active price provider (same path as `swap`). For real pricing/execution decisions, call `swap`      and decide in the swap callback, or use the periphery quoter. The quote may update provider state.      Shares the swap reentrancy guard; callable while paused, but not during another guarded action.","returns":{"buyPriceX64":"Fee-adjusted buy price (token1 per token0, Q64.64).","sellPriceX64":"Fee-adjusted sell price (token1 per token0, Q64.64)."}},"extsload(bytes32,uint256)":{"params":{"nSlots":"Number of consecutive slots to read (`startSlot`, `startSlot + 1`, ...).","startSlot":"First slot (inclusive)."},"returns":{"_0":"Raw slot values in order."}},"setPriceProvider(address)":{"params":{"newPriceProvider":"New provider contract; the factory validates its `token0`/`token1`, the pool stores it as given."}},"setPoolFees(uint24,uint24)":{"params":{"newSpreadFeeE6":"Platform share (protocol + admin) of the spread fee in E6 (`1e6 = 100%`).","newNotionalFeeE8":"Total notional fee in E8 (`1e8 = 100%`)."}},"setBinAdditionalFees(int16,uint16,uint16)":{"params":{"bin":"Bin index within the pool configured bin range.","addFeeBuyE6":"Additional fee on swaps buying token0 (E6).","addFeeSellE6":"Additional fee on swaps selling token0 (E6)."}},"swap(address,bool,int128,uint128,bytes,bytes)":{"params":{"recipient":"Address that receives the output token (sent before the callback; the swap reverts if the        callback then underpays the input).","zeroForOne":"`true` sells token0 for token1 along the pool’s ordering.","callbackData":"Opaque bytes forwarded to the swap callback.","extensionData":"Opaque bytes forwarded to swap extension point functions (beforeSwap / afterSwap).","priceLimitX64":"Fee-inclusive token1-per-token0 price in Q64.64: a floor when `zeroForOne`, a cap otherwise.        Zero permits sells but prevents buys; rounding can significantly breach the bound for tiny amounts.","amountSpecified":"Exact input if `>0`, exact output magnitude if `<0`, in native units of that leg.        May be partially filled; check the returned deltas."},"details":"Pulls input from `msg.sender` through `IMetricOmmSwapCallback` after sending output to `recipient`.","returns":{"_0":"Net token0 change for the pool (signed, native; positive = pool received).","_1":"Net token1 change for the pool (signed, native; positive = pool received)."}},"removeLiquidity(address,uint80,(int256[],uint256[]),bytes)":{"params":{"salt":"Position salt with `owner`.","owner":"Must equal `msg.sender`.","deltas":"Parallel arrays of bins and share burns.","extensionData":"Opaque bytes forwarded to liquidity extensions (beforeRemoveLiquidity / afterRemoveLiquidity)."},"details":"Requires `msg.sender == owner` except for empty `binIdxs`, which returns `(0, 0)`.      Payouts round down per bin and again on conversion to native units; no callback.      Emptying the current bin resets its position to `0` for non-negative bins or `type(uint104).max` for negative bins.","returns":{"amount0Removed":"Total token0 sent from the pool to `owner` (native).","amount1Removed":"Total token1 sent from the pool to `owner` (native)."}},"collectFees(uint256,uint256,uint256,uint256,address,address)":{"params":{"adminSpreadFeeE6":"Admin spread component in E6 at collection time.","adminNotionalFeeE8":"Admin notional component in E8 at collection time.","adminFeeDestination":"Recipient for the admin share of collected tokens (per factory configuration).","protocolSpreadFeeE6":"Protocol spread component in E6 at collection time (must match factory policy).","protocolNotionalFeeE8":"Protocol notional component in E8 at collection time.","protocolFeeDestination":"Recipient for the protocol share (the factory's `feeReceiver`)."},"details":"Pending balances retain scaled rounding remainders; transfer failures do not revert allocation.      Supported tokens must not move funds when reporting a failed transfer."},"addLiquidity(address,uint80,(int256[],uint256[]),bytes,bytes)":{"params":{"salt":"Caller-chosen second leg of the position key.","owner":"Position owner encoded in the pool’s position key.","deltas":"Parallel `binIdxs` / `shares` arrays (see `LiquidityDelta`).","callbackData":"Opaque bytes forwarded unmodified to the modify-liquidity callback.","extensionData":"Opaque bytes forwarded to liquidity extensions (beforeAddLiquidity / afterAddLiquidity)."},"details":"Callback amounts round up per bin and again on conversion to native units; underpay reverts      `InsufficientTokenBalance`. `msg.sender` pays but need not equal `owner`. Empty `binIdxs` skips hooks and callbacks.Reverts `LiquidityDeltaLengthMismatch` when `binIdxs` is non-empty and its length differs from `shares`.","returns":{"amount0Added":"Token0 amount the pool required from the callback (native).","amount1Added":"Token1 amount the pool required from the callback (native)."}},"simulateSwapAndRevert(address,address,bool,int128,uint128,uint128,uint128,uint128,bytes)":{"params":{"sender":"Address forwarded to swap extension point functions in place of `msg.sender`; has no other effect since the call always reverts.","recipient":"Same as `swap` (forwarded to swap extension point functions).","zeroForOne":"Same as `swap`.","askPriceX64":"Ask used for extension context and swap math in this simulation (Q64.64).","bidPriceX64":"Bid used for extension context and swap math in this simulation (Q64.64).","extensionData":"Opaque bytes forwarded to swap extension point functions (beforeSwap / afterSwap).","priceLimitX64":"Same encoding as `swap`.","amountSpecified":"Same sign convention as `swap`.","referencePriceX64":"Reference price used as the mid/price-path anchor and for fee calculation in this simulation (Q64.64)."},"details":"Does not use the pool’s live oracle prices for the mid—use for quotes/off-chain routing. Invokes the same swap extension point functions as `swap` when enabled; still enforces `priceLimitX64` and path logic; no ERC20 transfers or swap callback. Typical usage: `eth_call` or `try/catch` decoding `SimulateSwap`. `sender` is forwarded to the extension points as-is instead of `msg.sender`, so you can simulate as an arbitrary address (e.g. checking a sender-gated extension for a specific user) — safe only because the call always reverts and nothing persists.","returns":{"_0":"Unused in practice; values appear only on the reverting `SimulateSwap` error.","_1":"Unused in practice; values appear only on the reverting `SimulateSwap` error."}}},"version":1,"stateVariables":{"pauseLevel":{"details":"0 = active, 1 = paused by admin, 2 = paused by protocol. Transitions enforced by factory."},"spreadFeeE6":{"details":"Platform (protocol + admin) share of the spread fee, E6."},"notionalFeeE8":{"details":"Platform (protocol + admin) notional fee, E8."},"priceProvider":{"details":"The price provider address - only used when `IMMUTABLE_PRICE_PROVIDER == address(0)`"},"_positionBinShares":{"details":"Per-bin position shares keyed by `LiquidityLib._positionBinKey`."},"bidAskRefAsymmetryX8":{"details":"`m` in X8 (`M = 1 + m`); `type(uint16).max` disables the bid/ask/reference asymmetry check."},"IMMUTABLE_PRICE_PROVIDER":{"details":"If set this is the address of the immutable price providerIf unset the `priceProvider` is the address of the mutable price provider."},"pendingAdminFeeToken0Scaled":{"details":"Pending fee balances in internal scaled units; payouts convert to native units rounding down."}}},"sourceIds":{"contracts/Extsload.sol":{"id":1},"contracts/types/Slot0.sol":{"id":24},"contracts/types/Packed.sol":{"id":20},"contracts/MetricOmmPool.sol":{"id":2},"contracts/ExtensionCalling.sol":{"id":0},"contracts/libraries/FeeMath.sol":{"id":13},"contracts/types/PoolStorage.sol":{"id":23},"contracts/libraries/SwapMath.sol":{"id":19},"contracts/types/PoolOperation.sol":{"id":22},"contracts/interfaces/IExtsload.sol":{"id":3},"contracts/libraries/SignedMath.sol":{"id":17},"contracts/libraries/PoolActions.sol":{"id":15},"contracts/libraries/LiquidityLib.sol":{"id":14},"contracts/libraries/Slot0Library.sol":{"id":18},"contracts/libraries/CallExtension.sol":{"id":12},"contracts/libraries/PoolStateLibrary.sol":{"id":16},"contracts/types/PoolExtensionsConfig.sol":{"id":21},"contracts/utils/MetricReentrancyGuardTransient.sol":{"id":25},"lib/openzeppelin-contracts/contracts/utils/Panic.sol":{"id":31},"contracts/interfaces/IMetricOmmPool/IMetricOmmPool.sol":{"id":4},"contracts/interfaces/IPriceProvider/IPriceProvider.sol":{"id":8},"contracts/interfaces/extensions/IMetricOmmExtensions.sol":{"id":11},"lib/openzeppelin-contracts/contracts/utils/math/Math.sol":{"id":34},"contracts/interfaces/callbacks/IMetricOmmSwapCallback.sol":{"id":10},"lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol":{"id":28},"lib/openzeppelin-contracts/contracts/interfaces/IERC165.sol":{"id":27},"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol":{"id":29},"lib/openzeppelin-contracts/contracts/interfaces/IERC1363.sol":{"id":26},"lib/openzeppelin-contracts/contracts/utils/TransientSlot.sol":{"id":32},"lib/openzeppelin-contracts/contracts/utils/math/SafeCast.sol":{"id":35},"contracts/interfaces/IMetricOmmPool/IMetricOmmPoolActions.sol":{"id":5},"contracts/interfaces/IMetricOmmPool/IMetricOmmPoolCollectFees.sol":{"id":6},"contracts/interfaces/IMetricOmmPool/IMetricOmmPoolFactoryActions.sol":{"id":7},"contracts/interfaces/callbacks/IMetricOmmModifyLiquidityCallback.sol":{"id":9},"lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol":{"id":30},"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol":{"id":33}},"additionalInput":null,"stdJsonInput":{"sources":{"contracts/Extsload.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\nimport {IExtsload} from \"./interfaces/IExtsload.sol\";\n\n/// @notice Enables public storage access for efficient state retrieval by external contracts.\n/// https://eips.ethereum.org/EIPS/eip-2330#rationale\n/// forked from Uniswap v4-core\nabstract contract Extsload is IExtsload {\n  /// @inheritdoc IExtsload\n  function extsload(bytes32 slot) external view returns (bytes32) {\n    assembly (\"memory-safe\") {\n      mstore(0, sload(slot))\n      return(0, 0x20)\n    }\n  }\n\n  /// @inheritdoc IExtsload\n  function extsload(bytes32 startSlot, uint256 nSlots) external view returns (bytes32[] memory) {\n    assembly (\"memory-safe\") {\n      let memptr := mload(0x40)\n      let start := memptr\n      // A left bit-shift of 5 is equivalent to multiplying by 32 but costs less gas.\n      let length := shl(5, nSlots)\n      // The abi offset of dynamic array in the returndata is 32.\n      mstore(memptr, 0x20)\n      // Store the length of the array returned\n      mstore(add(memptr, 0x20), nSlots)\n      // update memptr to the first location to hold a result\n      memptr := add(memptr, 0x40)\n      let end := add(memptr, length)\n      for {} 1 {} {\n        mstore(memptr, sload(startSlot))\n        memptr := add(memptr, 0x20)\n        startSlot := add(startSlot, 1)\n        if iszero(lt(memptr, end)) { break }\n      }\n      return(start, sub(end, start))\n    }\n  }\n\n  /// @inheritdoc IExtsload\n  function extsload(bytes32[] calldata slots) external view returns (bytes32[] memory) {\n    assembly (\"memory-safe\") {\n      let memptr := mload(0x40)\n      let start := memptr\n      // for abi encoding the response - the array will be found at 0x20\n      mstore(memptr, 0x20)\n      // next we store the length of the return array\n      mstore(add(memptr, 0x20), slots.length)\n      // update memptr to the first location to hold an array entry\n      memptr := add(memptr, 0x40)\n      // A left bit-shift of 5 is equivalent to multiplying by 32 but costs less gas.\n      let end := add(memptr, shl(5, slots.length))\n      let calldataptr := slots.offset\n      for {} 1 {} {\n        mstore(memptr, sload(calldataload(calldataptr)))\n        memptr := add(memptr, 0x20)\n        calldataptr := add(calldataptr, 0x20)\n        if iszero(lt(memptr, end)) { break }\n      }\n      return(start, sub(end, start))\n    }\n  }\n}\n"},"contracts/types/Slot0.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\n/// @dev Decoded storage slot 0; pack/unpack via `Slot0Library`.\nstruct PoolSlot0 {\n  uint8 pauseLevel;\n  int16 curBinIdx;\n  uint104 curPosInBin;\n  int24 curBinDistFromProvidedPriceE6;\n  uint24 spreadFeeE6;\n  uint24 notionalFeeE8;\n  /// @dev `m` in X8 (`M = 1 + m`). `type(uint16).max` disables the check.\n  uint16 bidAskRefAsymmetryX8;\n}\n"},"contracts/types/Packed.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\n/// @notice Two `uint128` values in one word: `high` in the top 128 bits, `low` in the bottom.\n/// @dev Used to keep event payloads to a single word where two quantities always travel together.\n///      What `high` and `low` mean is documented at each use site, not here.\n///      `pack` takes `uint128` halves so narrowing -- and the choice of a checked or unchecked cast --\n///      is the caller's, made visibly at the call site.\ntype Packed2Uint128 is uint256;\n\nusing Packed2Uint128Lib for Packed2Uint128 global;\n\n/// @dev Implemented in assembly. Inline assembly reads the raw stack slot, which Solidity does not\n///      guarantee to be free of dirty high-order bits, so every half is masked to 128 bits before use.\n///      The low-half masks are load-bearing (see `test/Packed.t.sol`); the high-half mask is redundant under\n///      `shl(128, ...)`, which already discards any bits above 128.\nlibrary Packed2Uint128Lib {\n  uint256 private constant MASK = 0xffffffffffffffffffffffffffffffff;\n\n  function pack(uint128 high_, uint128 low_) internal pure returns (Packed2Uint128 packed) {\n    assembly (\"memory-safe\") {\n      packed := or(shl(128, and(high_, MASK)), and(low_, MASK))\n    }\n  }\n\n  /// @notice Add to BOTH halves at once.\n  /// @dev One word, one ADD -- valid because a running total can never reach 2^128 and so cannot carry\n  ///      out of the low half into the high one. Callers relying on this must keep both halves bounded.\n  function addBoth(Packed2Uint128 acc, uint128 high_, uint128 low_) internal pure returns (Packed2Uint128 packed) {\n    assembly (\"memory-safe\") {\n      packed := add(acc, or(shl(128, and(high_, MASK)), and(low_, MASK)))\n    }\n  }\n\n  function high(Packed2Uint128 packed) internal pure returns (uint256 value) {\n    assembly (\"memory-safe\") {\n      value := shr(128, packed)\n    }\n  }\n\n  function low(Packed2Uint128 packed) internal pure returns (uint256 value) {\n    assembly (\"memory-safe\") {\n      value := and(packed, MASK)\n    }\n  }\n\n  function sum(Packed2Uint128 packed) internal pure returns (uint256 value) {\n    assembly (\"memory-safe\") {\n      value := add(shr(128, packed), and(packed, MASK))\n    }\n  }\n}\n\n/// @notice Two `int128` values in one word: `high` in the top 128 bits, `low` in the bottom.\n/// @dev Two's-complement halves. Same contract as `Packed2Uint128`: meaning is documented at the use\n///      site, and `pack` takes `int128` halves so the narrowing happens visibly in the caller.\ntype Packed2Int128 is uint256;\n\nusing Packed2Int128Lib for Packed2Int128 global;\n\n/// @dev Implemented in assembly. The `low_` mask in `pack` is ESSENTIAL, not defensive: a negative\n///      `int128` is sign-extended on the stack, so without it the all-ones upper half would be OR'd\n///      straight over `high_` and destroy it. Reading back uses `SIGNEXTEND`, which is exactly the\n///      `int256(int128(uint128(...)))` cast chain in one opcode.\nlibrary Packed2Int128Lib {\n  uint256 private constant MASK = 0xffffffffffffffffffffffffffffffff;\n  /// @dev Byte index for `SIGNEXTEND` on a 16-byte (128-bit) value.\n  uint256 private constant SIGN_BYTE = 15;\n\n  function pack(int128 high_, int128 low_) internal pure returns (Packed2Int128 packed) {\n    assembly (\"memory-safe\") {\n      packed := or(shl(128, and(high_, MASK)), and(low_, MASK))\n    }\n  }\n\n  function high(Packed2Int128 packed) internal pure returns (int256 value) {\n    assembly (\"memory-safe\") {\n      value := signextend(SIGN_BYTE, shr(128, packed))\n    }\n  }\n\n  function low(Packed2Int128 packed) internal pure returns (int256 value) {\n    assembly (\"memory-safe\") {\n      value := signextend(SIGN_BYTE, packed)\n    }\n  }\n}\n\n/// @notice A swap's mode flag and resulting bin position in one word.\n/// @dev Purpose-built (unlike the two generic pairs above) because the three fields are heterogeneous\n///      and always travel together on `Swap`. Layout, low bits first:\n///\n///        bits   0..103 : posInBin   (uint104)\n///        bits 104..119 : binIdx     (int16, two's complement)\n///        bit       120 : exactInput (1 = the caller specified an exact input)\n///\n///      121 bits total, so the three fit one word with room to spare and cost one log word instead of\n///      three. `binIdx` is signed, so reads sign-extend it -- see `test/Packed.t.sol`.\n///\n///      Each field is exactly as wide as its parameter, so nothing a caller can construct is ever\n///      truncated.\ntype PackedSwapDetails is uint256;\n\nusing PackedSwapDetailsLib for PackedSwapDetails global;\n\nlibrary PackedSwapDetailsLib {\n  uint256 private constant POS_MASK = 0xffffffffffffffffffffffffff;\n  uint256 private constant BIN_IDX_MASK = 0xffff;\n  uint256 private constant BIN_IDX_SHIFT = 104;\n  uint256 private constant EXACT_INPUT_SHIFT = 120;\n  /// @dev Byte index for `SIGNEXTEND` on a 2-byte (16-bit) value.\n  uint256 private constant SIGN_BYTE = 1;\n\n  /// @dev The `binIdx_` mask is load-bearing: a negative index is sign-extended and would otherwise\n  ///      smear over the flag, which `test/Packed.t.sol` pins.\n  ///\n  ///      Mask `posInBin_` as well: inline assembly cannot assume narrow Solidity values have clean\n  ///      high-order bits. Only the declared 104-bit position belongs in the packed word.\n  function pack(bool exactInput_, int16 binIdx_, uint104 posInBin_) internal pure returns (PackedSwapDetails packed) {\n    assembly (\"memory-safe\") {\n      packed := or(\n        or(shl(EXACT_INPUT_SHIFT, and(exactInput_, 1)), shl(BIN_IDX_SHIFT, and(binIdx_, BIN_IDX_MASK))),\n        and(posInBin_, POS_MASK)\n      )\n    }\n  }\n\n  /// @notice Whether `amountSpecified` was treated as an exact input.\n  function exactInput(PackedSwapDetails packed) internal pure returns (bool value) {\n    assembly (\"memory-safe\") {\n      value := and(shr(EXACT_INPUT_SHIFT, packed), 1)\n    }\n  }\n\n  /// @notice Active bin index after the swap. Signed, so this sign-extends.\n  function binIdx(PackedSwapDetails packed) internal pure returns (int256 value) {\n    assembly (\"memory-safe\") {\n      value := signextend(SIGN_BYTE, shr(BIN_IDX_SHIFT, packed))\n    }\n  }\n\n  /// @notice Position within `binIdx` after the swap.\n  function posInBin(PackedSwapDetails packed) internal pure returns (uint256 value) {\n    assembly (\"memory-safe\") {\n      value := and(packed, POS_MASK)\n    }\n  }\n}\n"},"contracts/MetricOmmPool.sol":{"content":"// SPDX-License-Identifier: BUSL-1.1\npragma solidity ^0.8.35;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {Math} from \"@openzeppelin/contracts/utils/math/Math.sol\";\nimport {SafeCast} from \"@openzeppelin/contracts/utils/math/SafeCast.sol\";\nimport {MetricReentrancyGuardTransient} from \"./utils/MetricReentrancyGuardTransient.sol\";\nimport {PoolActions} from \"./libraries/PoolActions.sol\";\nimport {BinBalanceDelta, LiquidityDelta} from \"./types/PoolOperation.sol\";\nimport {\n  Packed2Int128,\n  Packed2Int128Lib,\n  Packed2Uint128,\n  Packed2Uint128Lib,\n  PackedSwapDetailsLib\n} from \"./types/Packed.sol\";\nimport {BinState, BinTotals} from \"./types/PoolStorage.sol\";\nimport {SwapMath, ONE_X64} from \"./libraries/SwapMath.sol\";\nimport {FeeMath} from \"./libraries/FeeMath.sol\";\nimport {SignedMath} from \"./libraries/SignedMath.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {IPriceProvider} from \"./interfaces/IPriceProvider/IPriceProvider.sol\";\nimport {Slot0Library} from \"./libraries/Slot0Library.sol\";\nimport {LiquidityLib} from \"./libraries/LiquidityLib.sol\";\nimport {ExtensionCalling} from \"./ExtensionCalling.sol\";\nimport {IMetricOmmPool, PoolImmutables} from \"./interfaces/IMetricOmmPool/IMetricOmmPool.sol\";\nimport {IMetricOmmPoolActions} from \"./interfaces/IMetricOmmPool/IMetricOmmPoolActions.sol\";\nimport {IMetricOmmPoolCollectFees} from \"./interfaces/IMetricOmmPool/IMetricOmmPoolCollectFees.sol\";\nimport {IMetricOmmPoolFactoryActions} from \"./interfaces/IMetricOmmPool/IMetricOmmPoolFactoryActions.sol\";\nimport {PoolExtensions, ExtensionOrders} from \"./types/PoolExtensionsConfig.sol\";\nimport {IMetricOmmSwapCallback} from \"./interfaces/callbacks/IMetricOmmSwapCallback.sol\";\nimport {Extsload} from \"./Extsload.sol\";\n\n/**\n * @title MetricOmmPool\n * @notice Oracle-Based OMM Pool with separate bin accounting\n * @dev Layout: immutables, state variables, constructor, modifiers,\n *      external state-changing functions, external views, then internal helpers.\n * @dev Contract uses `Extsload` for external storage reads, apart from `getImmutables()`, `inSwap()` and `getSellAndBuyPrices()`.\n * @dev External function order follows `IMetricOmmPool` composition: `IMetricOmmPoolActions`, then `IMetricOmmPoolCollectFees`, then `IMetricOmmPoolFactoryActions`.\n * @dev Contract coupling: storage layout and packing are mirrored by `contracts/libraries/PoolStateLibrary.sol`\n *      for EXTSLOAD-based reads. Any storage reorder or repack is a breaking change for EXTSLOAD readers.\n */\ncontract MetricOmmPool is IMetricOmmPool, Extsload, MetricReentrancyGuardTransient, ExtensionCalling {\n  using SafeCast for uint256;\n  using SafeCast for int256;\n  using SafeERC20 for IERC20;\n\n  // ============ Immutables ============\n  // Note: All immutables are internal; they are exposed via `getImmutables()`.\n\n  address internal immutable FACTORY;\n  address internal immutable TOKEN0;\n  address internal immutable TOKEN1;\n\n  /// @notice Multiplier to scale token0 external amounts to internal: 10^(max(18, token0.decimals(), token1.decimals()) - token0.decimals())\n  uint256 internal immutable TOKEN_0_SCALE_MULTIPLIER;\n  /// @notice Multiplier to scale token1 external amounts to internal: 10^(max(18, token0.decimals(), token1.decimals()) - token1.decimals())\n  uint256 internal immutable TOKEN_1_SCALE_MULTIPLIER;\n\n  uint256 internal immutable INITIAL_SCALED_TOKEN_0_PER_SHARE_E18;\n  uint256 internal immutable INITIAL_SCALED_TOKEN_1_PER_SHARE_E18;\n  uint256 internal immutable MINIMAL_OPERATIONAL_LIQUIDITY;\n\n  /// @dev If set this is the address of the immutable price provider\n  /// @dev If unset the `priceProvider` is the address of the mutable price provider.\n  address internal immutable IMMUTABLE_PRICE_PROVIDER;\n\n  int256 internal immutable LOWEST_BIN;\n  int256 internal immutable HIGHEST_BIN;\n\n  // ============ State Variables ============\n\n  // +++++++++++ Used when swapping ++++++++++\n\n  // Slot 0 ordering (from left to right):\n  //   [5 bytes unused] [2 bytes bidAskRefAsymmetryX8] [3 bytes notionalFeeE8] [3 bytes spreadFeeE6]\n  //   [3 bytes curBinDistFromProvidedPriceE6] [13 bytes curPosInBin] [2 bytes curBinIdx] [1 byte pauseLevel]\n  /// @dev 0 = active, 1 = paused by admin, 2 = paused by protocol. Transitions enforced by factory.\n  uint8 internal pauseLevel;\n  int16 internal curBinIdx; // current bin index\n  uint104 internal curPosInBin; // position inside the current bin: 0 = lower edge, type(uint104).max = upper edge\n  int24 internal curBinDistFromProvidedPriceE6; // lower edge of the current bin relative to the reference price, E6 (1e6 = 100%)\n  /// @dev Platform (protocol + admin) share of the spread fee, E6.\n  uint24 internal spreadFeeE6;\n  /// @dev Platform (protocol + admin) notional fee, E8.\n  uint24 internal notionalFeeE8;\n  /// @dev `m` in X8 (`M = 1 + m`); `type(uint16).max` disables the bid/ask/reference asymmetry check.\n  uint16 internal bidAskRefAsymmetryX8;\n\n  // Slot 1 ordering (from left to right):\n  //   [16bytes binTotals.scaledToken1] [16bytes binTotals.scaledToken0]\n  BinTotals internal binTotals;\n\n  // Slot 2 ordering (from left to right):\n  //   [16bytes notionalFeeToken1Scaled] [16bytes notionalFeeToken0Scaled]\n  uint128 internal notionalFeeToken0Scaled;\n  uint128 internal notionalFeeToken1Scaled;\n\n  // Slot 3 ordering (from left to right):\n  //   [12 bytes unused] [20 bytes priceProvider]\n  /// @dev The price provider address - only used when `IMMUTABLE_PRICE_PROVIDER == address(0)`\n  address internal priceProvider;\n\n  mapping(int256 => BinState) internal _binStates;\n\n  // ++++++++++ Unused when swapping ++++++++\n  mapping(int256 => uint256) internal _binTotalShares;\n  /// @dev Per-bin position shares keyed by `LiquidityLib._positionBinKey`.\n  mapping(bytes32 => uint256) internal _positionBinShares;\n\n  /// @dev Pending fee balances in internal scaled units; payouts convert to native units rounding down.\n  uint256 internal pendingAdminFeeToken0Scaled;\n  uint256 internal pendingAdminFeeToken1Scaled;\n  uint256 internal pendingProtocolFeeToken0Scaled;\n  uint256 internal pendingProtocolFeeToken1Scaled;\n\n  // ============ Constructor ============\n  /// @dev All initial checks MUST be validated before construction at the factory/deployer level.\n  constructor(\n    address factory,\n    address token0,\n    address token1,\n    address priceProvider_,\n    PoolExtensions memory extensions,\n    ExtensionOrders memory extensionOrders,\n    bool immutablePriceProvider,\n    uint256 token0ScaleMultiplier,\n    uint256 token1ScaleMultiplier,\n    uint256 initialScaledAmount0PerShareE18,\n    uint256 initialScaledAmount1PerShareE18,\n    uint256 minimalOperationalLiquidity,\n    uint24 spreadFeeE6_,\n    int24 initialCurBinDistFromProvidedPriceE6,\n    BinState[] memory nonNegativeBinStates,\n    BinState[] memory negativeBinStates,\n    uint24 notionalFeeE8_,\n    uint16 bidAskRefAsymmetryX8_\n  ) ExtensionCalling(extensions, extensionOrders) {\n    FACTORY = factory;\n    TOKEN0 = token0;\n    TOKEN1 = token1;\n\n    if (immutablePriceProvider) {\n      IMMUTABLE_PRICE_PROVIDER = priceProvider_;\n      priceProvider = address(0);\n    } else {\n      IMMUTABLE_PRICE_PROVIDER = address(0);\n      priceProvider = priceProvider_;\n    }\n\n    TOKEN_0_SCALE_MULTIPLIER = token0ScaleMultiplier;\n    TOKEN_1_SCALE_MULTIPLIER = token1ScaleMultiplier;\n\n    INITIAL_SCALED_TOKEN_0_PER_SHARE_E18 = initialScaledAmount0PerShareE18;\n    INITIAL_SCALED_TOKEN_1_PER_SHARE_E18 = initialScaledAmount1PerShareE18;\n    MINIMAL_OPERATIONAL_LIQUIDITY = minimalOperationalLiquidity;\n\n    spreadFeeE6 = spreadFeeE6_;\n    notionalFeeE8 = notionalFeeE8_;\n    bidAskRefAsymmetryX8 = bidAskRefAsymmetryX8_;\n\n    curBinDistFromProvidedPriceE6 = initialCurBinDistFromProvidedPriceE6;\n\n    for (uint256 i = 0; i < nonNegativeBinStates.length; i++) {\n      // safe because factory caps bins per side to 32_768\n      // forge-lint: disable-next-line(unsafe-typecast)\n      _binStates[int256(i)] = nonNegativeBinStates[i];\n    }\n    for (uint256 i = 0; i < negativeBinStates.length; i++) {\n      // safe because factory caps bins per side to 32_768\n      // forge-lint: disable-next-line(unsafe-typecast)\n      _binStates[-int256(i) - 1] = negativeBinStates[i];\n    }\n\n    uint256 nn = nonNegativeBinStates.length;\n    uint256 nNeg = negativeBinStates.length;\n    // safe because factory caps bins per side to 32_768\n    // forge-lint: disable-next-line(unsafe-typecast)\n    HIGHEST_BIN = nn == 0 ? int256(-1) : int256(nn) - 1;\n    // safe because factory caps bins per side to 32_768\n    // forge-lint: disable-next-line(unsafe-typecast)\n    LOWEST_BIN = nNeg == 0 ? int256(0) : -int256(nNeg);\n  }\n\n  // ============ Modifiers ============\n  modifier onlyFactory() {\n    _checkFactory();\n    _;\n  }\n\n  modifier whenNotPaused() {\n    _checkNotPaused();\n    _;\n  }\n\n  // ============ External: liquidity ============\n\n  /// @inheritdoc IMetricOmmPoolActions\n  function addLiquidity(\n    address owner,\n    uint80 salt,\n    LiquidityDelta calldata deltas,\n    bytes calldata callbackData,\n    bytes calldata extensionData\n  ) external nonReentrant(PoolActions.ADD_LIQUIDITY) returns (uint256 amount0Added, uint256 amount1Added) {\n    if (deltas.binIdxs.length == 0) return (0, 0);\n    if (deltas.binIdxs.length != deltas.shares.length) revert LiquidityDeltaLengthMismatch();\n    _beforeAddLiquidity(msg.sender, owner, salt, deltas, extensionData);\n    (amount0Added, amount1Added) = LiquidityLib.addLiquidity(\n      owner, salt, deltas, callbackData, binTotals, _binStates, _binTotalShares, _positionBinShares\n    );\n    _afterAddLiquidity(msg.sender, owner, salt, deltas, amount0Added, amount1Added, extensionData);\n  }\n\n  /// @inheritdoc IMetricOmmPoolActions\n  function removeLiquidity(address owner, uint80 salt, LiquidityDelta calldata deltas, bytes calldata extensionData)\n    external\n    nonReentrant(PoolActions.REMOVE_LIQUIDITY)\n    returns (uint256 amount0Removed, uint256 amount1Removed)\n  {\n    if (deltas.binIdxs.length == 0) return (0, 0);\n    if (deltas.binIdxs.length != deltas.shares.length) revert LiquidityDeltaLengthMismatch();\n    if (msg.sender != owner) revert NotPositionOwner();\n    _beforeRemoveLiquidity(msg.sender, owner, salt, deltas, extensionData);\n    bool emptiedCurrentBin;\n    (amount0Removed, amount1Removed, emptiedCurrentBin) =\n      LiquidityLib.removeLiquidity(owner, salt, deltas, binTotals, _binStates, _binTotalShares, _positionBinShares);\n    if (emptiedCurrentBin) {\n      curPosInBin = curBinIdx < 0 ? type(uint104).max : 0;\n    }\n    _afterRemoveLiquidity(msg.sender, owner, salt, deltas, amount0Removed, amount1Removed, extensionData);\n  }\n\n  // ============ External: swap ============\n\n  /// @inheritdoc IMetricOmmPoolActions\n  function swap(\n    address recipient,\n    bool zeroForOne,\n    int128 amountSpecified,\n    uint128 priceLimitX64,\n    bytes calldata callbackData,\n    bytes calldata extensionData\n  ) external whenNotPaused nonReentrant(PoolActions.SWAP) returns (int128, int128) {\n    (uint128 bidPriceX64, uint128 askPriceX64, uint128 referencePriceX64) = _getBidAskReferencePriceX64();\n\n    (int256 amount0Delta, int256 amount1Delta, Packed2Uint128 platformFees, uint256 packedSlot0Initial) = _swapCore(\n      msg.sender,\n      recipient,\n      zeroForOne,\n      amountSpecified,\n      priceLimitX64,\n      bidPriceX64,\n      askPriceX64,\n      referencePriceX64,\n      extensionData\n    );\n\n    if (zeroForOne) {\n      if (amount1Delta < 0) {\n        // forge-lint: disable-next-line(unsafe-typecast)\n        transferToken1(recipient, uint256(-amount1Delta));\n      }\n\n      uint256 balance0Before = balance0();\n      IMetricOmmSwapCallback(msg.sender).metricOmmSwapCallback(amount0Delta, amount1Delta, callbackData);\n      // forge-lint: disable-next-line(unsafe-typecast)\n      if (amount0Delta > 0 && balance0Before + uint256(amount0Delta) > balance0()) {\n        revert IncorrectDelta();\n      }\n    } else {\n      if (amount0Delta < 0) {\n        // forge-lint: disable-next-line(unsafe-typecast)\n        transferToken0(recipient, uint256(-amount0Delta));\n      }\n\n      uint256 balance1Before = balance1();\n      IMetricOmmSwapCallback(msg.sender).metricOmmSwapCallback(amount0Delta, amount1Delta, callbackData);\n      // forge-lint: disable-next-line(unsafe-typecast)\n      if (amount1Delta > 0 && balance1Before + uint256(amount1Delta) > balance1()) {\n        revert IncorrectDelta();\n      }\n    }\n\n    uint256 packedSlot0Final = Slot0Library.loadPackedSlot0();\n    _afterSwap(\n      msg.sender,\n      recipient,\n      zeroForOne,\n      amountSpecified,\n      priceLimitX64,\n      packedSlot0Initial,\n      packedSlot0Final,\n      bidPriceX64,\n      askPriceX64,\n      referencePriceX64,\n      amount0Delta.toInt128(),\n      amount1Delta.toInt128(),\n      platformFees.sum(),\n      extensionData\n    );\n\n    emit Swap(\n      msg.sender,\n      recipient,\n      PackedSwapDetailsLib.pack(amountSpecified > 0, curBinIdx, curPosInBin),\n      // `_afterSwap` above already narrowed both with a checked cast, so an out-of-range value has reverted before this point.\n      // forge-lint: disable-next-line(unsafe-typecast)\n      Packed2Int128Lib.pack(int128(amount0Delta), int128(amount1Delta)),\n      platformFees\n    );\n    return (amount0Delta.toInt128(), amount1Delta.toInt128());\n  }\n\n  // ============ External: swap simulation ============\n\n  /// @inheritdoc IMetricOmmPoolActions\n  function simulateSwapAndRevert(\n    address sender,\n    address recipient,\n    bool zeroForOne,\n    int128 amountSpecified,\n    uint128 priceLimitX64,\n    uint128 bidPriceX64,\n    uint128 askPriceX64,\n    uint128 referencePriceX64,\n    bytes calldata extensionData\n  ) external nonReentrant(PoolActions.SIMULATE_SWAP_AND_REVERT) returns (int128, int128) {\n    _validateBidAskReferencePriceX64(bidPriceX64, askPriceX64, referencePriceX64);\n\n    (int256 amount0Delta, int256 amount1Delta, Packed2Uint128 platformFees, uint256 packedSlot0Initial) = _swapCore(\n      sender,\n      recipient,\n      zeroForOne,\n      amountSpecified,\n      priceLimitX64,\n      bidPriceX64,\n      askPriceX64,\n      referencePriceX64,\n      extensionData\n    );\n\n    uint256 packedSlot0Final = Slot0Library.loadPackedSlot0();\n    _afterSwap(\n      sender,\n      recipient,\n      zeroForOne,\n      amountSpecified,\n      priceLimitX64,\n      packedSlot0Initial,\n      packedSlot0Final,\n      bidPriceX64,\n      askPriceX64,\n      referencePriceX64,\n      amount0Delta.toInt128(),\n      amount1Delta.toInt128(),\n      platformFees.sum(),\n      extensionData\n    );\n\n    revert SimulateSwap(amount0Delta, amount1Delta);\n  }\n\n  // ============ External: factory / protocol ============\n\n  /// @inheritdoc IMetricOmmPoolCollectFees\n  function collectFees(\n    uint256 protocolSpreadFeeE6,\n    uint256 adminSpreadFeeE6,\n    uint256 protocolNotionalFeeE8,\n    uint256 adminNotionalFeeE8,\n    address adminFeeDestination,\n    address protocolFeeDestination\n  ) external onlyFactory nonReentrant(PoolActions.COLLECT_FEES) {\n    (\n      uint256 updatedAdminFeeToken0Scaled,\n      uint256 updatedAdminFeeToken1Scaled,\n      uint256 updatedProtocolFeeToken0Scaled,\n      uint256 updatedProtocolFeeToken1Scaled\n    ) = _calculateUpdatedPendingFees(protocolSpreadFeeE6, adminSpreadFeeE6, protocolNotionalFeeE8, adminNotionalFeeE8);\n\n    uint256 paidAdmin0;\n    uint256 paidAdmin1;\n    uint256 paidProtocol0;\n    uint256 paidProtocol1;\n    (pendingAdminFeeToken0Scaled, paidAdmin0) =\n      _payPendingFee(TOKEN0, adminFeeDestination, updatedAdminFeeToken0Scaled, TOKEN_0_SCALE_MULTIPLIER);\n    (pendingAdminFeeToken1Scaled, paidAdmin1) =\n      _payPendingFee(TOKEN1, adminFeeDestination, updatedAdminFeeToken1Scaled, TOKEN_1_SCALE_MULTIPLIER);\n    (pendingProtocolFeeToken0Scaled, paidProtocol0) =\n      _payPendingFee(TOKEN0, protocolFeeDestination, updatedProtocolFeeToken0Scaled, TOKEN_0_SCALE_MULTIPLIER);\n    (pendingProtocolFeeToken1Scaled, paidProtocol1) =\n      _payPendingFee(TOKEN1, protocolFeeDestination, updatedProtocolFeeToken1Scaled, TOKEN_1_SCALE_MULTIPLIER);\n\n    emit ProtocolFeesCollected(paidProtocol0, paidProtocol1, paidAdmin0, paidAdmin1);\n  }\n\n  /// @inheritdoc IMetricOmmPoolFactoryActions\n  function setPoolFees(uint24 newSpreadFeeE6, uint24 newNotionalFeeE8)\n    external\n    onlyFactory\n    nonReentrant(PoolActions.SET_POOL_FEES)\n  {\n    unchecked {\n      if (newSpreadFeeE6 != spreadFeeE6) {\n        spreadFeeE6 = newSpreadFeeE6;\n        emit SpreadFeeUpdated(newSpreadFeeE6);\n      }\n      if (newNotionalFeeE8 != notionalFeeE8) {\n        notionalFeeE8 = newNotionalFeeE8;\n        emit NotionalFeeUpdated(newNotionalFeeE8);\n      }\n    }\n  }\n\n  /// @inheritdoc IMetricOmmPoolFactoryActions\n  function setBidAskRefAsymmetryX8(uint16 newBidAskRefAsymmetryX8)\n    external\n    onlyFactory\n    nonReentrant(PoolActions.SET_BID_ASK_REF_ASYMMETRY_X8)\n  {\n    if (newBidAskRefAsymmetryX8 != bidAskRefAsymmetryX8) {\n      bidAskRefAsymmetryX8 = newBidAskRefAsymmetryX8;\n      emit BidAskRefAsymmetryUpdated(newBidAskRefAsymmetryX8);\n    }\n  }\n\n  /// @inheritdoc IMetricOmmPoolFactoryActions\n  function setPause(uint8 newLevel) external onlyFactory {\n    if (newLevel > 2) revert InvalidPauseLevel();\n    if (newLevel == pauseLevel) return;\n    uint8 prev = pauseLevel;\n    pauseLevel = newLevel;\n    emit PauseLevelUpdated(prev, newLevel);\n  }\n\n  /// @inheritdoc IMetricOmmPoolFactoryActions\n  function setBinAdditionalFees(int16 bin, uint16 addFeeBuyE6, uint16 addFeeSellE6)\n    external\n    onlyFactory\n    nonReentrant(PoolActions.SET_BIN_ADDITIONAL_FEES)\n  {\n    if (bin < LOWEST_BIN || bin > HIGHEST_BIN) revert InvalidBinIndex(bin);\n    BinState storage s = _binStates[bin];\n    s.addFeeBuyE6 = addFeeBuyE6;\n    s.addFeeSellE6 = addFeeSellE6;\n    emit BinAdditionalFeesUpdated(bin, addFeeBuyE6, addFeeSellE6);\n  }\n\n  /// @inheritdoc IMetricOmmPoolFactoryActions\n  function setPriceProvider(address newPriceProvider) external onlyFactory {\n    priceProvider = newPriceProvider;\n    emit PriceProviderUpdated(newPriceProvider);\n  }\n\n  // ============ External: view ============\n\n  /// @inheritdoc IMetricOmmPool\n  function inSwap() external view returns (address priceProvider_) {\n    if (_currentAction() == PoolActions.SWAP) {\n      return _resolvedPriceProvider();\n    }\n    return address(0);\n  }\n\n  /// @inheritdoc IMetricOmmPool\n  function getImmutables() external view returns (PoolImmutables memory) {\n    return PoolImmutables({\n      factory: FACTORY,\n      token0: TOKEN0,\n      token1: TOKEN1,\n      token0ScaleMultiplier: TOKEN_0_SCALE_MULTIPLIER,\n      token1ScaleMultiplier: TOKEN_1_SCALE_MULTIPLIER,\n      initialScaledToken0PerShareE18: INITIAL_SCALED_TOKEN_0_PER_SHARE_E18,\n      initialScaledToken1PerShareE18: INITIAL_SCALED_TOKEN_1_PER_SHARE_E18,\n      minimalOperationalLiquidity: MINIMAL_OPERATIONAL_LIQUIDITY,\n      immutablePriceProvider: IMMUTABLE_PRICE_PROVIDER,\n      lowestBin: LOWEST_BIN,\n      highestBin: HIGHEST_BIN,\n      extension1: EXTENSION_1,\n      extension2: EXTENSION_2,\n      extension3: EXTENSION_3,\n      extension4: EXTENSION_4,\n      extension5: EXTENSION_5,\n      extension6: EXTENSION_6,\n      extension7: EXTENSION_7,\n      beforeAddLiquidityOrder: BEFORE_ADD_LIQUIDITY_ORDER,\n      afterAddLiquidityOrder: AFTER_ADD_LIQUIDITY_ORDER,\n      beforeRemoveLiquidityOrder: BEFORE_REMOVE_LIQUIDITY_ORDER,\n      afterRemoveLiquidityOrder: AFTER_REMOVE_LIQUIDITY_ORDER,\n      beforeSwapOrder: BEFORE_SWAP_ORDER,\n      afterSwapOrder: AFTER_SWAP_ORDER\n    });\n  }\n\n  /// @inheritdoc IMetricOmmPool\n  function getSellAndBuyPrices()\n    external\n    nonReentrant(PoolActions.SWAP)\n    returns (uint128 sellPriceX64, uint128 buyPriceX64)\n  {\n    (uint128 bidFromOracleX64, uint128 askFromOracleX64, uint128 referenceFromOracleX64) = _getBidAskReferencePriceX64();\n    (uint256 baseBuyFeeX64, uint256 baseSellFeeX64) = SwapMath.buySellBaseFeesX64FromBidAskAndReference(\n      uint256(bidFromOracleX64), uint256(askFromOracleX64), uint256(referenceFromOracleX64)\n    );\n    uint256 referencePriceX64 = uint256(referenceFromOracleX64);\n\n    BinState memory binState = _binStates[curBinIdx];\n    uint256 lowerPriceX64 = distanceE6ToPriceX64(curBinDistFromProvidedPriceE6, referencePriceX64);\n    uint256 upperPriceX64 =\n      distanceE6ToPriceX64(_addDistE6(curBinDistFromProvidedPriceE6, binState.lengthE6), referencePriceX64);\n\n    uint256 marginalPriceX64 =\n      SwapMath.calculatePriceAtBinPosition(lowerPriceX64, upperPriceX64, curPosInBin, Math.Rounding.Floor);\n\n    uint256 notionalFeeX64 = FeeMath._notionalFeeX64(notionalFeeE8);\n    buyPriceX64 = FeeMath.effectivePriceX64(\n        marginalPriceX64, FeeMath.binTotalFeeX64(baseBuyFeeX64, binState.addFeeBuyE6, notionalFeeX64), false\n      ).toUint128();\n    sellPriceX64 = FeeMath.effectivePriceX64(\n        marginalPriceX64, FeeMath.binTotalFeeX64(baseSellFeeX64, binState.addFeeSellE6, notionalFeeX64), true\n      ).toUint128();\n  }\n\n  // ============ Internal ============\n\n  function _calculateUpdatedPendingFees(\n    uint256 protocolSpreadFeeE6,\n    uint256 adminSpreadFeeE6,\n    uint256 protocolNotionalFeeE8,\n    uint256 adminNotionalFeeE8\n  )\n    private\n    returns (\n      uint256 updatedAdminFeeToken0Scaled,\n      uint256 updatedAdminFeeToken1Scaled,\n      uint256 updatedProtocolFeeToken0Scaled,\n      uint256 updatedProtocolFeeToken1Scaled\n    )\n  {\n    uint256 spreadSumE6;\n    uint256 notionalSumE8;\n    unchecked {\n      spreadSumE6 = protocolSpreadFeeE6 + adminSpreadFeeE6;\n      notionalSumE8 = protocolNotionalFeeE8 + adminNotionalFeeE8;\n\n      updatedAdminFeeToken0Scaled = pendingAdminFeeToken0Scaled;\n      updatedAdminFeeToken1Scaled = pendingAdminFeeToken1Scaled;\n      updatedProtocolFeeToken0Scaled = pendingProtocolFeeToken0Scaled;\n      updatedProtocolFeeToken1Scaled = pendingProtocolFeeToken1Scaled;\n    }\n    if (spreadSumE6 != 0) {\n      //// checked block start - just sanity check for underflow\n      uint256 surplus0Scaled = balance0() * TOKEN_0_SCALE_MULTIPLIER - uint256(binTotals.scaledToken0)\n        - notionalFeeToken0Scaled - updatedAdminFeeToken0Scaled - updatedProtocolFeeToken0Scaled;\n      uint256 surplus1Scaled = balance1() * TOKEN_1_SCALE_MULTIPLIER - uint256(binTotals.scaledToken1)\n        - notionalFeeToken1Scaled - updatedAdminFeeToken1Scaled - updatedProtocolFeeToken1Scaled;\n      //// checked block end\n      unchecked {\n        uint256 admin0Scaled = surplus0Scaled * adminSpreadFeeE6 / spreadSumE6;\n        uint256 admin1Scaled = surplus1Scaled * adminSpreadFeeE6 / spreadSumE6;\n        updatedAdminFeeToken0Scaled += admin0Scaled;\n        updatedAdminFeeToken1Scaled += admin1Scaled;\n        updatedProtocolFeeToken0Scaled += surplus0Scaled - admin0Scaled;\n        updatedProtocolFeeToken1Scaled += surplus1Scaled - admin1Scaled;\n      }\n    }\n    unchecked {\n      if (notionalSumE8 != 0) {\n        uint256 admin0Scaled = notionalFeeToken0Scaled * adminNotionalFeeE8 / notionalSumE8;\n        uint256 admin1Scaled = notionalFeeToken1Scaled * adminNotionalFeeE8 / notionalSumE8;\n        updatedAdminFeeToken0Scaled += admin0Scaled;\n        updatedAdminFeeToken1Scaled += admin1Scaled;\n        updatedProtocolFeeToken0Scaled += uint256(notionalFeeToken0Scaled) - admin0Scaled;\n        updatedProtocolFeeToken1Scaled += uint256(notionalFeeToken1Scaled) - admin1Scaled;\n        notionalFeeToken0Scaled = 0;\n        notionalFeeToken1Scaled = 0;\n      }\n    }\n  }\n\n  function _payPendingFee(address token, address destination, uint256 pendingScaled, uint256 scaleMultiplier)\n    private\n    returns (uint256 remainingScaled, uint256 paid)\n  {\n    uint256 amount = pendingScaled / scaleMultiplier;\n    if (amount == 0) return (pendingScaled, 0);\n\n    if (IERC20(token).trySafeTransfer(destination, amount)) {\n      return (pendingScaled - amount * scaleMultiplier, amount);\n    }\n    emit FeeTransferFailed(token, destination, amount);\n    return (pendingScaled, 0);\n  }\n\n  // ---- Token helpers ----\n\n  /// @notice Get the current balance of token0 held by the pool\n  function balance0() internal view returns (uint256) {\n    return IERC20(TOKEN0).balanceOf(address(this));\n  }\n\n  /// @notice Get the current balance of token1 held by the pool\n  function balance1() internal view returns (uint256) {\n    return IERC20(TOKEN1).balanceOf(address(this));\n  }\n\n  function transferToken0(address to, uint256 amount) internal {\n    IERC20(TOKEN0).safeTransfer(to, amount);\n  }\n\n  function transferToken1(address to, uint256 amount) internal {\n    IERC20(TOKEN1).safeTransfer(to, amount);\n  }\n\n  // ---- Math helpers ----\n\n  /// @dev Converts distance-from-reference-price (E6 units) to an absolute price Q64.64, rounded down:\n  /// `referencePriceX64 * (1e6 + distanceValueE6) / 1e6`. Requires `distanceValueE6 > -1e6`; the negative branch computes `1e6 - |distanceValueE6|` unchecked.\n  function distanceE6ToPriceX64(int256 distanceValueE6, uint256 referencePriceX64) internal pure returns (uint256) {\n    unchecked {\n      if (distanceValueE6 >= 0) {\n        // forge-lint: disable-next-line(unsafe-typecast)\n        return Math.mulDiv(referencePriceX64, 1e6 + uint256(distanceValueE6), 1e6);\n      } else {\n        // forge-lint: disable-next-line(unsafe-typecast)\n        return Math.mulDiv(referencePriceX64, 1e6 - uint256(-distanceValueE6), 1e6);\n      }\n    }\n  }\n\n  function _clampInt256ToInt24(int256 v) internal pure returns (int24) {\n    unchecked {\n      if (v > type(int24).max) return type(int24).max;\n      if (v < type(int24).min) return type(int24).min;\n      // casting to int24 is safe because values outside int24 bounds are clamped above.\n      // forge-lint: disable-next-line(unsafe-typecast)\n      return int24(v);\n    }\n  }\n\n  function _addDistE6(int256 dist, uint16 len) internal pure returns (int256) {\n    unchecked {\n      // casting is safe because len is uint16\n      return dist + int256(uint256(len));\n    }\n  }\n\n  /// @notice Convert signed scaled deltas to external token units, rounding toward positive infinity\n  function deltasScaledToExternal(int256 scaledDeltaAmount0, int256 scaledDeltaAmount1)\n    internal\n    view\n    returns (int256 deltaAmount0, int256 deltaAmount1)\n  {\n    deltaAmount0 = SignedMath.ceilDiv(scaledDeltaAmount0, TOKEN_0_SCALE_MULTIPLIER);\n    deltaAmount1 = SignedMath.ceilDiv(scaledDeltaAmount1, TOKEN_1_SCALE_MULTIPLIER);\n  }\n\n  /// @notice Convert unsigned scaled amounts to external token units, rounding up for `Ceil` and down otherwise\n  function deltasScaledToExternal(uint256 scaledDeltaAmount0, uint256 scaledDeltaAmount1, Math.Rounding rounding)\n    internal\n    view\n    returns (uint256 deltaAmount0, uint256 deltaAmount1)\n  {\n    if (rounding == Math.Rounding.Ceil) {\n      deltaAmount0 = Math.ceilDiv(scaledDeltaAmount0, TOKEN_0_SCALE_MULTIPLIER);\n      deltaAmount1 = Math.ceilDiv(scaledDeltaAmount1, TOKEN_1_SCALE_MULTIPLIER);\n    } else {\n      deltaAmount0 = scaledDeltaAmount0 / TOKEN_0_SCALE_MULTIPLIER;\n      deltaAmount1 = scaledDeltaAmount1 / TOKEN_1_SCALE_MULTIPLIER;\n    }\n  }\n\n  // ---- Shared helpers ----\n\n  function _resolvedPriceProvider() internal view returns (address) {\n    address imm = IMMUTABLE_PRICE_PROVIDER;\n    if (imm != address(0)) return imm;\n    return priceProvider;\n  }\n\n  function _checkFactory() internal view {\n    if (msg.sender != FACTORY) revert OnlyFactory();\n  }\n\n  function _checkNotPaused() internal view {\n    if (pauseLevel != 0) revert PoolPaused();\n  }\n\n  /// @dev Persists `binState` to `_binStates`. Exists primarily to reduce stack depth in swap paths.\n  function _saveBinState(int256 binIdx, BinState memory binState) internal {\n    _binStates[binIdx] = binState;\n  }\n\n  // ---- Swap orchestration ----\n\n  function _executeSwap(\n    bool zeroForOne,\n    int256 amountSpecified,\n    uint256 referencePriceX64,\n    uint256 baseFeeX64,\n    uint256 priceLimitX64\n  ) internal returns (int256 amount0DeltaScaled, int256 amount1DeltaScaled, Packed2Uint128 platformFees) {\n    unchecked {\n      // Safe while every scale multiplier is < 2^129 (decimal gap ≤ 38); the factory does not enforce this bound\n      // forge-lint: disable-next-line(unsafe-typecast)\n      uint256 amountSpecifiedScaled = amountSpecified > 0\n        // forge-lint: disable-next-line(unsafe-typecast)\n        ? (zeroForOne ? TOKEN_0_SCALE_MULTIPLIER : TOKEN_1_SCALE_MULTIPLIER) * uint256(amountSpecified)\n        // forge-lint: disable-next-line(unsafe-typecast)\n        : (zeroForOne ? TOKEN_1_SCALE_MULTIPLIER : TOKEN_0_SCALE_MULTIPLIER) * uint256(-amountSpecified);\n\n      (amount0DeltaScaled, amount1DeltaScaled, platformFees) = _swapAcrossBins(\n        zeroForOne, amountSpecified <= 0, amountSpecifiedScaled, referencePriceX64, baseFeeX64, priceLimitX64\n      );\n      uint256 platformNotionalFeeScaled = platformFees.low();\n\n      // Update bin totals: the platform spread fee and the notional fee are both carved from the input\n      // token and do NOT enter bins.\n      // For zeroForOne: token0 enters bins (minus both fees), token1 leaves bins.\n      // For !zeroForOne: token1 enters bins (minus both fees), token0 leaves bins.\n      uint256 totalPlatformFeeScaled = platformFees.sum();\n      if (zeroForOne) {\n        // casting to uint256 is safe because amount0DeltaScaled is positive in zeroForOne flow.\n        // forge-lint: disable-next-line(unsafe-typecast)\n        binTotals.scaledToken0 =\n          (uint256(binTotals.scaledToken0) + uint256(amount0DeltaScaled) - totalPlatformFeeScaled).toUint128(); // forge-lint: disable-line(unsafe-typecast)\n        // casting to uint128/uint256 is safe because bin totals remain bounded by uint128-scaled accounting invariants.\n        // forge-lint: disable-next-line(unsafe-typecast)\n        binTotals.scaledToken1 = uint128(uint256(binTotals.scaledToken1) - uint256(-amount1DeltaScaled));\n      } else {\n        // casting to uint256 is safe because amount1DeltaScaled is positive in !zeroForOne flow.\n        // forge-lint: disable-next-line(unsafe-typecast)\n        binTotals.scaledToken1 =\n          (uint256(binTotals.scaledToken1) + uint256(amount1DeltaScaled) - totalPlatformFeeScaled).toUint128(); // forge-lint: disable-line(unsafe-typecast)\n        // casting to uint128/uint256 is safe because bin totals remain bounded by uint128-scaled accounting invariants.\n        // forge-lint: disable-next-line(unsafe-typecast)\n        binTotals.scaledToken0 = uint128(uint256(binTotals.scaledToken0) - uint256(-amount0DeltaScaled));\n      }\n\n      if (platformNotionalFeeScaled > 0) {\n        if (zeroForOne) {\n          notionalFeeToken0Scaled = (uint256(notionalFeeToken0Scaled) + platformNotionalFeeScaled).toUint128();\n        } else {\n          notionalFeeToken1Scaled = (uint256(notionalFeeToken1Scaled) + platformNotionalFeeScaled).toUint128();\n        }\n      }\n    }\n  }\n\n  function _getBidAskReferencePriceX64()\n    internal\n    returns (uint128 bidPriceX64, uint128 askPriceX64, uint128 referencePriceX64)\n  {\n    address activePriceProvider = _resolvedPriceProvider();\n    try IPriceProvider(activePriceProvider).getQuote() returns (uint128 bid, uint128 ask, uint128 referencePrice) {\n      _validateBidAskReferencePriceX64(bid, ask, referencePrice);\n      return (bid, ask, referencePrice);\n    } catch (bytes memory reason) {\n      revert PriceProviderFailed(reason);\n    }\n  }\n\n  /// @dev Reverts unless `0 < bid < ask` and `ref` lies within `[bid, ask]` (inclusive).\n  ///      When `bidAskRefAsymmetryX8 == type(uint16).max`, a reference on `bid`/`ask` is allowed (waives that side's base fee).\n  ///      Otherwise enforces `1/M <= r1/r2 <= M` with `r1 = ref/bid - 1`, `r2 = ask/ref - 1`, `M = 1 + m` (`m` in X8).\n  function _validateBidAskReferencePriceX64(uint256 bidX64, uint256 askX64, uint256 refX64) internal view {\n    if (bidX64 >= askX64) revert BidGreaterThanAsk();\n    if (bidX64 == 0) revert BidIsZero();\n    if (refX64 < bidX64 || refX64 > askX64) revert ReferencePriceOutOfRange();\n\n    uint256 mX8 = bidAskRefAsymmetryX8;\n    if (mX8 == type(uint16).max) return;\n    if (refX64 == bidX64 || refX64 == askX64) revert BidAskRefAsymmetryOutOfBounds();\n\n    uint256 M_X64 = ONE_X64 + (mX8 << 56);\n    uint256 refMinusBid = refX64 - bidX64;\n    uint256 askMinusRef = askX64 - refX64;\n\n    uint256 numerator = refMinusBid * refX64;\n    uint256 denominator = bidX64 * askMinusRef;\n\n    if (\n      numerator < Math.mulDiv(denominator, ONE_X64, M_X64, Math.Rounding.Ceil)\n        || denominator < Math.mulDiv(numerator, ONE_X64, M_X64, Math.Rounding.Ceil)\n    ) {\n      revert BidAskRefAsymmetryOutOfBounds();\n    }\n  }\n\n  /// @dev Shared swap execution: runs `beforeSwap`, computes the base fee, executes the swap, and enforces\n  ///      the non-zero-delta invariant. Callers own price validation, token settlement, and `afterSwap`.\n  /// @param sender Forwarded to `beforeSwap` as-is; `swap` passes `msg.sender`, `simulateSwapAndRevert` may pass any address.\n  function _swapCore(\n    address sender,\n    address recipient,\n    bool zeroForOne,\n    int128 amountSpecified,\n    uint128 priceLimitX64,\n    uint128 bidPriceX64,\n    uint128 askPriceX64,\n    uint128 referencePriceX64,\n    bytes calldata extensionData\n  )\n    internal\n    returns (int256 amount0Delta, int256 amount1Delta, Packed2Uint128 platformFees, uint256 packedSlot0Initial)\n  {\n    require(amountSpecified != 0, InvalidAmount());\n\n    packedSlot0Initial = Slot0Library.loadPackedSlot0();\n\n    _beforeSwap(\n      sender,\n      recipient,\n      zeroForOne,\n      amountSpecified,\n      priceLimitX64,\n      packedSlot0Initial,\n      bidPriceX64,\n      askPriceX64,\n      referencePriceX64,\n      extensionData\n    );\n\n    uint256 baseFeeX64 = zeroForOne\n      ? SwapMath.sellBaseFeeX64FromBidAndReference(uint256(bidPriceX64), uint256(referencePriceX64))\n      : SwapMath.buyBaseFeeX64FromAskAndReference(uint256(askPriceX64), uint256(referencePriceX64));\n\n    (int256 amount0DeltaScaled, int256 amount1DeltaScaled, Packed2Uint128 fees) =\n      _executeSwap(zeroForOne, amountSpecified, uint256(referencePriceX64), baseFeeX64, priceLimitX64);\n    platformFees = fees;\n\n    (amount0Delta, amount1Delta) = deltasScaledToExternal(amount0DeltaScaled, amount1DeltaScaled);\n    require(amount0Delta != 0 && amount1Delta != 0, FinalAmountIsZero());\n  }\n\n  /// @dev Loads current swap state and computes bin price bounds for current bin.\n  /// @param amountSpecifiedScaled Reverts `AmountScaledExceedsMax` unless `<= type(uint128).max`.\n  function _getInitialStateForSwap(uint256 referencePriceX64, uint256 amountSpecifiedScaled)\n    internal\n    view\n    returns (\n      BinState memory binState,\n      SwapMath.SwapState memory state,\n      int256 curBinIdxCache,\n      uint256 curPosInBinCache,\n      int256 curBinDistE6Cache,\n      uint256 lowerReferencePriceX64,\n      uint256 upperReferencePriceX64\n    )\n  {\n    require(amountSpecifiedScaled <= type(uint128).max, AmountScaledExceedsMax());\n    state = SwapMath.SwapState({amountSpecifiedRemainingScaled: amountSpecifiedScaled, amountCalculatedScaled: 0});\n\n    curBinIdxCache = curBinIdx;\n    curPosInBinCache = curPosInBin;\n    curBinDistE6Cache = curBinDistFromProvidedPriceE6;\n\n    binState = _binStates[curBinIdxCache];\n\n    lowerReferencePriceX64 = distanceE6ToPriceX64(curBinDistE6Cache, referencePriceX64);\n    upperReferencePriceX64 = distanceE6ToPriceX64(_addDistE6(curBinDistE6Cache, binState.lengthE6), referencePriceX64);\n  }\n\n  function _finalizeSwap(int256 curBinIdxCache, uint256 curPosInBinCache, int256 curBinDistE6Cache) internal {\n    curBinIdx = curBinIdxCache.toInt16();\n    curPosInBin = curPosInBinCache.toUint104();\n    curBinDistFromProvidedPriceE6 = curBinDistE6Cache.toInt24();\n  }\n\n  // ---- Swap implementations ----\n\n  /// @dev Cross-bin swap loop parameterized by direction (`zeroForOne`) and exact-out (`specifiedOut`).\n  /// @return amount0DeltaScaled Net scaled token0 flow (positive = into the pool).\n  /// @return amount1DeltaScaled Net scaled token1 flow (positive = into the pool).\n  /// @return platformFees Platform (protocol + admin) fee legs, packed: `high` = spread, `low` = notional.\n  function _swapAcrossBins(\n    bool zeroForOne,\n    bool specifiedOut,\n    uint256 amountSpecifiedScaled,\n    uint256 referencePriceX64,\n    uint256 baseFeeX64,\n    uint256 priceLimitX64\n  ) internal returns (int256 amount0DeltaScaled, int256 amount1DeltaScaled, Packed2Uint128 platformFees) {\n    unchecked {\n      if (specifiedOut) {\n        uint256 availableOutScaled = zeroForOne ? binTotals.scaledToken1 : binTotals.scaledToken0;\n        if (amountSpecifiedScaled > availableOutScaled) {\n          amountSpecifiedScaled = availableOutScaled;\n        }\n      }\n\n      (\n        BinState memory binState,\n        SwapMath.SwapState memory state,\n        int256 curBinIdxCache,\n        uint256 curPosInBinCache,\n        int256 curBinDistE6Cache,\n        uint256 lowerReferencePriceX64,\n        uint256 upperReferencePriceX64\n      ) = _getInitialStateForSwap(referencePriceX64, amountSpecifiedScaled);\n\n      uint256 notionalFeeX64 = FeeMath._notionalFeeX64(notionalFeeE8);\n\n      // Exact-in only: remaining output liquidity across bins (exact-out caps up front).\n      uint256 totalAvailableOutScaled =\n        specifiedOut ? 0 : (zeroForOne ? binTotals.scaledToken1 : binTotals.scaledToken0);\n\n      while (state.amountSpecifiedRemainingScaled > 0) {\n        uint256 binTotalFeeX64 = FeeMath.binTotalFeeX64(\n          baseFeeX64, zeroForOne ? binState.addFeeSellE6 : binState.addFeeBuyE6, notionalFeeX64\n        );\n        uint256 effLowerX64 = FeeMath.effectivePriceX64(lowerReferencePriceX64, binTotalFeeX64, zeroForOne);\n        uint256 effUpperX64 = FeeMath.effectivePriceX64(upperReferencePriceX64, binTotalFeeX64, zeroForOne);\n\n        bool nonEmptyBin = true;\n        if (zeroForOne) {\n          if (binState.token1BalanceScaled == 0 || curPosInBinCache == 0) {\n            if (specifiedOut) {\n              if (priceLimitX64 >= effLowerX64) break;\n            } else {\n              if (priceLimitX64 != 0 && priceLimitX64 >= effLowerX64) break;\n              if (totalAvailableOutScaled == 0) break;\n            }\n            nonEmptyBin = false;\n          }\n        } else if (binState.token0BalanceScaled == 0 || curPosInBinCache >= type(uint104).max) {\n          if (specifiedOut) {\n            if (priceLimitX64 <= effUpperX64) break;\n          } else {\n            if (priceLimitX64 != 0 && priceLimitX64 <= effUpperX64) break;\n            if (totalAvailableOutScaled == 0) break;\n          }\n          nonEmptyBin = false;\n        }\n\n        if (nonEmptyBin) {\n          uint256 totalFeeOfGrossX64 = FeeMath.totalFeeOfGrossX64(binTotalFeeX64);\n          uint256 platformPartX64 = FeeMath.platformPartOfTotalFeeX64(binTotalFeeX64, notionalFeeX64, spreadFeeE6);\n          int256 binDelta0Scaled;\n          int256 binDelta1Scaled;\n          uint256 outAmountScaled;\n          uint256 platformFeeScaled;\n          uint256 lpFeeAmountScaled;\n\n          if (zeroForOne) {\n            if (specifiedOut) {\n              (curPosInBinCache, binDelta0Scaled, binDelta1Scaled, platformFeeScaled, lpFeeAmountScaled) =\n                SwapMath.buyToken1InBinSpecifiedOut(\n                  binState,\n                  curPosInBinCache,\n                  state,\n                  totalFeeOfGrossX64,\n                  platformPartX64,\n                  effLowerX64,\n                  effUpperX64,\n                  priceLimitX64\n                );\n            } else {\n              (\n                curPosInBinCache,\n                outAmountScaled,\n                binDelta0Scaled,\n                binDelta1Scaled,\n                platformFeeScaled,\n                lpFeeAmountScaled\n              ) =\n                SwapMath.buyToken1InBinSpecifiedIn(\n                  binState,\n                  curPosInBinCache,\n                  state,\n                  totalFeeOfGrossX64,\n                  platformPartX64,\n                  effLowerX64,\n                  effUpperX64,\n                  priceLimitX64\n                );\n              totalAvailableOutScaled -= outAmountScaled;\n            }\n          } else if (specifiedOut) {\n            (curPosInBinCache, binDelta0Scaled, binDelta1Scaled, platformFeeScaled, lpFeeAmountScaled) =\n              SwapMath.buyToken0InBinSpecifiedOut(\n                binState,\n                curPosInBinCache,\n                state,\n                totalFeeOfGrossX64,\n                platformPartX64,\n                effLowerX64,\n                effUpperX64,\n                priceLimitX64\n              );\n          } else {\n            (\n              curPosInBinCache, outAmountScaled, binDelta0Scaled, binDelta1Scaled, platformFeeScaled, lpFeeAmountScaled\n            ) =\n              SwapMath.buyToken0InBinSpecifiedIn(\n                binState,\n                curPosInBinCache,\n                state,\n                totalFeeOfGrossX64,\n                platformPartX64,\n                effLowerX64,\n                effUpperX64,\n                priceLimitX64\n              );\n            totalAvailableOutScaled -= outAmountScaled;\n          }\n\n          if (binDelta0Scaled != 0 || binDelta1Scaled != 0) {\n            {\n              uint256 notionalLegScaled =\n                FeeMath.notionalPartOfPlatformTake(platformFeeScaled, binTotalFeeX64, notionalFeeX64, spreadFeeE6);\n              platformFees =\n              // forge-lint: disable-next-line(unsafe-typecast)\n              platformFees.addBoth(uint128(platformFeeScaled - notionalLegScaled), uint128(notionalLegScaled));\n            }\n\n            emit BinSwapped(\n              curBinIdxCache,\n              // Bin balances are uint104, so both deltas fit int128 with 23 bits to spare.\n              // forge-lint: disable-next-line(unsafe-typecast)\n              Packed2Int128Lib.pack(int128(binDelta0Scaled), int128(binDelta1Scaled)),\n              // forge-lint: disable-next-line(unsafe-typecast)\n              Packed2Uint128Lib.pack(uint128(lpFeeAmountScaled), uint128(platformFeeScaled))\n            );\n            _saveBinState(curBinIdxCache, binState);\n          }\n        }\n\n        bool binExhausted = zeroForOne ? curPosInBinCache == 0 : curPosInBinCache >= type(uint104).max;\n        if (binExhausted || !nonEmptyBin) {\n          if (zeroForOne) {\n            if (curBinIdxCache <= LOWEST_BIN) break;\n            curBinIdxCache--;\n            binState = _binStates[curBinIdxCache];\n            curPosInBinCache = type(uint104).max;\n            curBinDistE6Cache -= int24(uint24(binState.lengthE6));\n            upperReferencePriceX64 = lowerReferencePriceX64;\n            lowerReferencePriceX64 = distanceE6ToPriceX64(curBinDistE6Cache, referencePriceX64);\n          } else {\n            if (curBinIdxCache >= HIGHEST_BIN) break;\n            curBinIdxCache++;\n            curPosInBinCache = 0;\n            curBinDistE6Cache = _clampInt256ToInt24(_addDistE6(int256(curBinDistE6Cache), binState.lengthE6));\n            lowerReferencePriceX64 = upperReferencePriceX64;\n            binState = _binStates[curBinIdxCache];\n            upperReferencePriceX64 =\n              distanceE6ToPriceX64(_addDistE6(curBinDistE6Cache, binState.lengthE6), referencePriceX64);\n          }\n        } else {\n          break;\n        }\n      }\n\n      _finalizeSwap(curBinIdxCache, curPosInBinCache, curBinDistE6Cache);\n\n      uint256 amountInScaled;\n      uint256 amountOutScaled;\n      if (specifiedOut) {\n        amountInScaled = state.amountCalculatedScaled;\n        amountOutScaled = amountSpecifiedScaled - state.amountSpecifiedRemainingScaled;\n      } else {\n        amountInScaled = amountSpecifiedScaled - state.amountSpecifiedRemainingScaled;\n        amountOutScaled = state.amountCalculatedScaled;\n      }\n      (amount0DeltaScaled, amount1DeltaScaled) = zeroForOne\n        // forge-lint: disable-next-line(unsafe-typecast)\n        ? (int256(amountInScaled), -int256(amountOutScaled))\n        // forge-lint: disable-next-line(unsafe-typecast)\n        : (-int256(amountOutScaled), int256(amountInScaled));\n    }\n  }\n}\n"},"contracts/ExtensionCalling.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\nimport {IMetricOmmExtensions} from \"./interfaces/extensions/IMetricOmmExtensions.sol\";\nimport {CallExtension} from \"./libraries/CallExtension.sol\";\nimport {LiquidityDelta} from \"./types/PoolOperation.sol\";\nimport {PoolExtensions, ExtensionOrders} from \"./types/PoolExtensionsConfig.sol\";\n\n/// @title ExtensionCalling\n/// @notice Abstract base holding per-pool extension immutables and ordered extension invocation.\n/// @dev Extensions are numbered 1-7 (`EXTENSION_1`..`EXTENSION_7`). Each action has a packed order word of 3-bit\n///      extension indices, least significant group first, terminated by a zero group (see `ExtensionOrders`).\n///      Extensions run sequentially in that order; any revert, malformed response, or wrong returned selector\n///      reverts the whole action.\nabstract contract ExtensionCalling {\n  /// @dev Should never happen if factory validates extensions config.\n  error PanicInvalidExtensionIndex();\n  /// @dev Should never happen if factory validates extensions config.\n  error PanicEmptyExtension();\n\n  address internal immutable EXTENSION_1;\n  address internal immutable EXTENSION_2;\n  address internal immutable EXTENSION_3;\n  address internal immutable EXTENSION_4;\n  address internal immutable EXTENSION_5;\n  address internal immutable EXTENSION_6;\n  address internal immutable EXTENSION_7;\n  /// @dev Order of extension calls for before add liquidity.\n  uint256 internal immutable BEFORE_ADD_LIQUIDITY_ORDER;\n  /// @dev Order of extension calls for after add liquidity.\n  uint256 internal immutable AFTER_ADD_LIQUIDITY_ORDER;\n  /// @dev Order of extension calls for before remove liquidity.\n  uint256 internal immutable BEFORE_REMOVE_LIQUIDITY_ORDER;\n  /// @dev Order of extension calls for after remove liquidity.\n  uint256 internal immutable AFTER_REMOVE_LIQUIDITY_ORDER;\n  /// @dev Order of extension calls for before swap.\n  uint256 internal immutable BEFORE_SWAP_ORDER;\n  /// @dev Order of extension calls for after swap.\n  uint256 internal immutable AFTER_SWAP_ORDER;\n\n  constructor(PoolExtensions memory extensions, ExtensionOrders memory extensionOrders) {\n    EXTENSION_1 = extensions.extension1;\n    EXTENSION_2 = extensions.extension2;\n    EXTENSION_3 = extensions.extension3;\n    EXTENSION_4 = extensions.extension4;\n    EXTENSION_5 = extensions.extension5;\n    EXTENSION_6 = extensions.extension6;\n    EXTENSION_7 = extensions.extension7;\n    BEFORE_ADD_LIQUIDITY_ORDER = extensionOrders.beforeAddLiquidity;\n    AFTER_ADD_LIQUIDITY_ORDER = extensionOrders.afterAddLiquidity;\n    BEFORE_REMOVE_LIQUIDITY_ORDER = extensionOrders.beforeRemoveLiquidity;\n    AFTER_REMOVE_LIQUIDITY_ORDER = extensionOrders.afterRemoveLiquidity;\n    BEFORE_SWAP_ORDER = extensionOrders.beforeSwap;\n    AFTER_SWAP_ORDER = extensionOrders.afterSwap;\n  }\n\n  /// @dev Reverts with `PanicInvalidExtensionIndex` for 0 or any index above 7.\n  function _extensionAddress(uint256 extensionIndex) internal view returns (address extension) {\n    if (extensionIndex < 4) {\n      if (extensionIndex < 2) {\n        if (extensionIndex == 1) return EXTENSION_1;\n        revert PanicInvalidExtensionIndex();\n      } else {\n        if (extensionIndex == 2) return EXTENSION_2;\n        return EXTENSION_3;\n      }\n    } else if (extensionIndex < 8) {\n      if (extensionIndex < 6) {\n        if (extensionIndex == 4) return EXTENSION_4;\n        return EXTENSION_5;\n      } else {\n        if (extensionIndex == 6) return EXTENSION_6;\n        return EXTENSION_7;\n      }\n    } else {\n      revert PanicInvalidExtensionIndex();\n    }\n  }\n\n  /// @dev Walks `order` three bits at a time until a zero group or an exhausted word; an order of 0 calls nothing.\n  ///      Reverts with `PanicEmptyExtension` if an indexed slot holds the zero address.\n  function _callExtensionsInOrder(uint256 order, bytes memory data) private {\n    if (order == 0) return;\n\n    while (true) {\n      uint256 extensionIndex = order & 0x7;\n      if (extensionIndex == 0) break;\n      address extension = _extensionAddress(extensionIndex);\n      if (extension == address(0)) revert PanicEmptyExtension();\n      CallExtension.callExtension(extension, data);\n      order >>= 3;\n    }\n  }\n\n  function _beforeAddLiquidity(\n    address sender,\n    address owner,\n    uint80 salt,\n    LiquidityDelta calldata deltas,\n    bytes calldata extensionData\n  ) internal {\n    _callExtensionsInOrder(\n      BEFORE_ADD_LIQUIDITY_ORDER,\n      abi.encodeCall(IMetricOmmExtensions.beforeAddLiquidity, (sender, owner, salt, deltas, extensionData))\n    );\n  }\n\n  function _afterAddLiquidity(\n    address sender,\n    address owner,\n    uint80 salt,\n    LiquidityDelta calldata deltas,\n    uint256 amount0Added,\n    uint256 amount1Added,\n    bytes calldata extensionData\n  ) internal {\n    _callExtensionsInOrder(\n      AFTER_ADD_LIQUIDITY_ORDER,\n      abi.encodeCall(\n        IMetricOmmExtensions.afterAddLiquidity, (sender, owner, salt, deltas, amount0Added, amount1Added, extensionData)\n      )\n    );\n  }\n\n  function _beforeRemoveLiquidity(\n    address sender,\n    address owner,\n    uint80 salt,\n    LiquidityDelta calldata deltas,\n    bytes calldata extensionData\n  ) internal {\n    _callExtensionsInOrder(\n      BEFORE_REMOVE_LIQUIDITY_ORDER,\n      abi.encodeCall(IMetricOmmExtensions.beforeRemoveLiquidity, (sender, owner, salt, deltas, extensionData))\n    );\n  }\n\n  function _afterRemoveLiquidity(\n    address sender,\n    address owner,\n    uint80 salt,\n    LiquidityDelta calldata deltas,\n    uint256 amount0Removed,\n    uint256 amount1Removed,\n    bytes calldata extensionData\n  ) internal {\n    _callExtensionsInOrder(\n      AFTER_REMOVE_LIQUIDITY_ORDER,\n      abi.encodeCall(\n        IMetricOmmExtensions.afterRemoveLiquidity,\n        (sender, owner, salt, deltas, amount0Removed, amount1Removed, extensionData)\n      )\n    );\n  }\n\n  function _beforeSwap(\n    address sender,\n    address recipient,\n    bool zeroForOne,\n    int128 amountSpecified,\n    uint128 priceLimitX64,\n    uint256 packedSlot0Initial,\n    uint128 bidPriceX64,\n    uint128 askPriceX64,\n    uint128 referencePriceX64,\n    bytes calldata extensionData\n  ) internal {\n    _callExtensionsInOrder(\n      BEFORE_SWAP_ORDER,\n      abi.encodeCall(\n        IMetricOmmExtensions.beforeSwap,\n        (\n          sender,\n          recipient,\n          zeroForOne,\n          amountSpecified,\n          priceLimitX64,\n          packedSlot0Initial,\n          bidPriceX64,\n          askPriceX64,\n          referencePriceX64,\n          extensionData\n        )\n      )\n    );\n  }\n\n  function _afterSwap(\n    address sender,\n    address recipient,\n    bool zeroForOne,\n    int128 amountSpecified,\n    uint128 priceLimitX64,\n    uint256 packedSlot0Initial,\n    uint256 packedSlot0Final,\n    uint128 bidPriceX64,\n    uint128 askPriceX64,\n    uint128 referencePriceX64,\n    int128 amount0Delta,\n    int128 amount1Delta,\n    uint256 platformFeeAmount,\n    bytes calldata extensionData\n  ) internal {\n    _callExtensionsInOrder(\n      AFTER_SWAP_ORDER,\n      abi.encodeCall(\n        IMetricOmmExtensions.afterSwap,\n        (\n          sender,\n          recipient,\n          zeroForOne,\n          amountSpecified,\n          priceLimitX64,\n          packedSlot0Initial,\n          packedSlot0Final,\n          bidPriceX64,\n          askPriceX64,\n          referencePriceX64,\n          amount0Delta,\n          amount1Delta,\n          platformFeeAmount,\n          extensionData\n        )\n      )\n    );\n  }\n}\n"},"contracts/libraries/FeeMath.sol":{"content":"// SPDX-License-Identifier: BUSL-1.1\npragma solidity ^0.8.35;\n\nimport {Math} from \"@openzeppelin/contracts/utils/math/Math.sol\";\nimport {ONE_X64} from \"./SwapMath.sol\";\n\n/// @title FeeMath\n/// @notice Fee-rate composition and platform/LP split helpers for swaps (Q64.64).\nlibrary FeeMath {\n  /// @notice Notional fee as a Q64.64 fraction.\n  /// @param notionalFeeE8 Pool's total notional fee in E8 (`1e8 = 100%`).\n  function _notionalFeeX64(uint24 notionalFeeE8) internal pure returns (uint256) {\n    unchecked {\n      return (uint256(notionalFeeE8) * ONE_X64) / 1e8;\n    }\n  }\n\n  /// @notice Whole fee a trader pays in a bin, in Q64.64: oracle base spread + per-bin add + notional.\n  /// @param baseFeeX64 Oracle base spread fee for the active direction.\n  /// @param addFeeE6 Per-bin additional fee for the active direction, in E6. Assumes\n  ///        `<= type(uint16).max` (both `BinState` add-fee fields are `uint16`); the unchecked\n  ///        multiply below relies on that bound.\n  /// @param notionalFeeX64_ Notional fee as a Q64.64 fraction (see `_notionalFeeX64`).\n  function binTotalFeeX64(uint256 baseFeeX64, uint256 addFeeE6, uint256 notionalFeeX64_)\n    internal\n    pure\n    returns (uint256)\n  {\n    unchecked {\n      return baseFeeX64 + (addFeeE6 * ONE_X64) / 1e6 + notionalFeeX64_;\n    }\n  }\n\n  /// @notice Fold a bin fee into a reference-anchored price to get the price the trader executes at.\n  /// @param priceX64 Reference-anchored (fee-exclusive) price.\n  /// @param totalFeeX64 Whole fee for the direction: base + per-bin add + notional.\n  /// @param zeroForOne True when selling token0 (price divides), false when buying token0 (price multiplies).\n  function effectivePriceX64(uint256 priceX64, uint256 totalFeeX64, bool zeroForOne) internal pure returns (uint256) {\n    return zeroForOne\n      ? Math.mulDiv(priceX64, ONE_X64, ONE_X64 + totalFeeX64, Math.Rounding.Floor)\n      : Math.mulDiv(priceX64, ONE_X64 + totalFeeX64, ONE_X64, Math.Rounding.Ceil);\n  }\n\n  /// @notice PLATFORM share of the carved fee, in Q64.64 (`ONE_X64` = the platform takes all of it).\n  /// @param totalFeeX64 Whole fee folded into the prices: base + per-bin add + notional.\n  /// @param notionalFeeX64 Notional leg of `totalFeeX64`. Assumes <= totalFeeX64.\n  /// @param spreadFeeE6 Platform share of the SPREAD leg in E6 (`protocolSpreadFeeE6 + adminSpreadFeeE6`).\n  function platformPartOfTotalFeeX64(uint256 totalFeeX64, uint256 notionalFeeX64, uint256 spreadFeeE6)\n    internal\n    pure\n    returns (uint256)\n  {\n    unchecked {\n      if (totalFeeX64 == 0) return 0;\n      uint256 platformRateX64 = notionalFeeX64 + ((totalFeeX64 - notionalFeeX64) * spreadFeeE6) / 1e6;\n      return Math.mulDiv(platformRateX64, ONE_X64, totalFeeX64);\n    }\n  }\n\n  /// @notice Notional leg of a platform take.\n  /// @param platformTakeScaled Combined platform fee withheld from the trader's input, in scaled units.\n  /// @param totalFeeX64 Whole fee folded into the prices.\n  /// @param notionalFeeX64 Notional amount in `totalFeeX64`. Assumes <= totalFeeX64.\n  /// @param spreadFeeE6 Platform share of the SPREAD leg in E6.\n  function notionalPartOfPlatformTake(\n    uint256 platformTakeScaled,\n    uint256 totalFeeX64,\n    uint256 notionalFeeX64,\n    uint256 spreadFeeE6\n  ) internal pure returns (uint256) {\n    unchecked {\n      if (platformTakeScaled == 0 || notionalFeeX64 == 0) return 0;\n\n      uint256 totalSpreadFeeX64 = totalFeeX64 - notionalFeeX64;\n      uint256 platformRateX64 = notionalFeeX64 + (totalSpreadFeeX64 * spreadFeeE6) / 1e6;\n      return Math.mulDiv(platformTakeScaled, notionalFeeX64, platformRateX64);\n    }\n  }\n\n  /// @notice Whole carved fee as a fraction of the trader's GROSS input, in Q64.64.\n  function totalFeeOfGrossX64(uint256 totalFeeX64) internal pure returns (uint256) {\n    if (totalFeeX64 == 0) return 0;\n    return Math.mulDiv(totalFeeX64, ONE_X64, ONE_X64 + totalFeeX64);\n  }\n}\n"},"contracts/types/PoolStorage.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\n/// @notice Packed bin-level totals occupying a single storage slot.\n/// @dev Layout must stay `uint128, uint128` so the slot packing matches `PoolStateLibrary` EXTSLOAD decoding.\n/// @param scaledToken0 Sum of `token0BalanceScaled` across all bins.\n/// @param scaledToken1 Sum of `token1BalanceScaled` across all bins.\nstruct BinTotals {\n  uint128 scaledToken0;\n  uint128 scaledToken1;\n}\n\n/// @notice State of a single bin in the OMM pool\n/// @param token0BalanceScaled Current token0 in bin (in internal scaled units)\n/// @param token1BalanceScaled Current token1 in bin (in internal scaled units)\n/// @param lengthE6 Width of the bin in price distance from the reference price; 1e6 = 100% of the reference price\n/// @param addFeeBuyE6 Additional fee for buying token0; 1e6 = 100%\n/// @param addFeeSellE6 Additional fee for buying token1; 1e6 = 100%\nstruct BinState {\n  uint104 token0BalanceScaled;\n  uint104 token1BalanceScaled;\n  uint16 lengthE6;\n  uint16 addFeeBuyE6;\n  uint16 addFeeSellE6;\n}\n"},"contracts/libraries/SwapMath.sol":{"content":"// SPDX-License-Identifier: BUSL-1.1\npragma solidity ^0.8.35;\n\nimport {Math} from \"@openzeppelin/contracts/utils/math/Math.sol\";\nimport {SafeCast} from \"@openzeppelin/contracts/utils/math/SafeCast.sol\";\nimport {IMetricOmmPoolActions} from \"../interfaces/IMetricOmmPool/IMetricOmmPoolActions.sol\";\nimport {BinState} from \"../types/PoolStorage.sol\";\n\nuint256 constant ONE_X64 = 0x10000000000000000;\nuint256 constant ONE_X128 = 0x100000000000000000000000000000000;\n/// @dev Maximum discrete bin position (`type(uint104).max`); use as uint256 for arithmetic.\nuint256 constant MAX_POS_BIN = type(uint104).max;\n\n/**\n * @title SwapMath\n * @notice Library for pure swap calculation functions\n * @dev Functions do not access storage; in-bin swaps mutate the caller's memory `BinState` and `SwapState`.\n *      Incoming-leg bin balance writes revert with `OverflowedOnFittingBinBalances` when they would exceed\n *      `type(uint104).max` (instead of a generic SafeCast error).\n *      Callers must advance `SwapState` fields conservatively: keep per-iteration deltas within the bounds\n *      documented on each field so widened sums stay representable where the pool persists them.\n */\nlibrary SwapMath {\n  using SafeCast for uint256;\n  using SafeCast for int256;\n\n  /// @dev Cast an incoming-side bin balance to `uint104`, or revert with a defined pool error.\n  function _toUint104IncomingBinBalance(uint256 value) private pure returns (uint104) {\n    if (value > type(uint104).max) {\n      revert IMetricOmmPoolActions.OverflowedOnFittingBinBalances(value);\n    }\n    // forge-lint: disable-next-line(unsafe-typecast) -- guarded by the check above.\n    return uint104(value);\n  }\n\n  // ============ Type Definitions ============\n\n  /// @notice State tracked during a swap operation\n  /// @param amountSpecifiedRemainingScaled Remaining amount to swap (scaled to internal decimals). Assumes <= type(uint128).max.\n  /// @param amountCalculatedScaled Accumulated output/input amount (scaled to internal decimals). Assumes <= type(uint128).max.\n  /// @dev Orchestrators should treat both as running totals whose growth per bin step is bounded by the\n  ///      bin liquidity and swap amount; the pool assumes intermediate values fit `uint128` (the width of `binTotals`).\n  struct SwapState {\n    uint256 amountSpecifiedRemainingScaled;\n    uint256 amountCalculatedScaled;\n  }\n\n  // ============ Price and Position Helpers ============\n\n  /// @notice Invert a price in Q64.64 format.\n  function invertPriceX64(uint256 priceX64) internal pure returns (uint256) {\n    return Math.ceilDiv(ONE_X128, priceX64);\n  }\n\n  /// @notice Arithmetic mean of two values, rounded up.\n  /// @dev Requires `a + b + 1` to fit uint256; the addition is unchecked.\n  function calculateArithmeticMean(uint256 a, uint256 b) internal pure returns (uint256) {\n    unchecked {\n      return (a + b + 1) / 2;\n    }\n  }\n\n  /// @notice Base fee in Q64.64 when buying token0 (1-for-0 swap): ask vs reference spread.\n  function buyBaseFeeX64FromAskAndReference(uint256 askPriceX64, uint256 referencePriceX64)\n    internal\n    pure\n    returns (uint256 baseFeeX64)\n  {\n    baseFeeX64 = Math.mulDiv(askPriceX64, ONE_X64, referencePriceX64, Math.Rounding.Ceil) - ONE_X64;\n  }\n\n  /// @notice Base fee in Q64.64 when selling token0 (0-for-1 swap): reference vs bid spread.\n  /// @dev `reference/bid - 1` (not `1 - bid/reference`): `FeeMath.effectivePriceX64` divides sell prices by\n  ///      `1 + totalFee` (base plus any per-bin and notional fee), which scales the token0 input by the same factor,\n  ///      so this ratio is what makes the base fee alone land the realized price on `bid` at the reference price, up\n  ///      to rounding (mirrors how `ask/reference - 1` lands on `ask` for buys, where the price is multiplied instead).\n  function sellBaseFeeX64FromBidAndReference(uint256 bidPriceX64, uint256 referencePriceX64)\n    internal\n    pure\n    returns (uint256 baseFeeX64)\n  {\n    baseFeeX64 = Math.mulDiv(referencePriceX64, ONE_X64, bidPriceX64, Math.Rounding.Ceil) - ONE_X64;\n  }\n\n  /**\n   * @notice Both base fee legs in Q64.64 from bid/ask + reference.\n   * @dev Fee-only helper for `getSellAndBuyPrices`; the reference price itself is used as the mid/anchor price.\n   */\n  function buySellBaseFeesX64FromBidAskAndReference(uint256 bidPriceX64, uint256 askPriceX64, uint256 referencePriceX64)\n    internal\n    pure\n    returns (uint256 baseBuyFeeX64, uint256 baseSellFeeX64)\n  {\n    baseBuyFeeX64 = buyBaseFeeX64FromAskAndReference(askPriceX64, referencePriceX64);\n    baseSellFeeX64 = sellBaseFeeX64FromBidAndReference(bidPriceX64, referencePriceX64);\n  }\n\n  /**\n   * @notice Calculate price at a specific position within a bin\n   * @param lowerPriceX64 Price at the lower bound of the bin.\n   * @param upperPriceX64 Price at the upper bound of the bin.\n   * @param position Current position along the bin segment (uint256; must be ≤ `MAX_POS_BIN` or the subtraction reverts).\n   * @param rounding Rounding mode for interpolation.\n   * @return priceX64 Interpolated price at the given position.\n   */\n  function calculatePriceAtBinPosition(\n    uint256 lowerPriceX64,\n    uint256 upperPriceX64,\n    uint256 position,\n    Math.Rounding rounding\n  ) internal pure returns (uint256 priceX64) {\n    uint256 maxSubCurrPos = MAX_POS_BIN - position;\n    unchecked {\n      if (rounding == Math.Rounding.Floor) {\n        priceX64 = (lowerPriceX64 * maxSubCurrPos + upperPriceX64 * position) / MAX_POS_BIN;\n      } else {\n        priceX64 = Math.ceilDiv(lowerPriceX64 * maxSubCurrPos + upperPriceX64 * position, MAX_POS_BIN);\n      }\n    }\n  }\n\n  /**\n   * @notice Calculate finalBinPos position limited by price\n   * @param lowerPriceX64 Price at lower bound (typically EFFECTIVE / fee-inclusive).\n   * @param upperPriceX64 Price at upper bound (typically EFFECTIVE / fee-inclusive).\n   * @param priceX64 Price limit along the same encoding as the bounds (a maximum for buys, a minimum for sells). Assumes lowerPriceX64 < upperPriceX64 and priceX64 >= lowerPriceX64.\n   * @param rounding Rounding mode used for inverse interpolation.\n   * @return result Bin position where price limit is reached. Result <= MAX_POS_BIN when priceX64 <= upperPriceX64;\n   *         `buyToken1InBinSpecifiedIn` may pass a limit above the bin, in which case the result exceeds MAX_POS_BIN\n   *         and the caller returns early (no overflow: (2^128 * 2^104) fits in 256 bits).\n   */\n  function calculateBinPositionAtPrice(\n    uint256 lowerPriceX64,\n    uint256 upperPriceX64,\n    uint256 priceX64,\n    Math.Rounding rounding\n  ) internal pure returns (uint256) {\n    unchecked {\n      // Result ≤ MAX_POS_BIN when priceX64 ∈ [lower, upper]; larger (but no overflow) when priceX64 > upper.\n      if (rounding == Math.Rounding.Floor) {\n        return ((priceX64 - lowerPriceX64) * MAX_POS_BIN) / (upperPriceX64 - lowerPriceX64);\n      } else {\n        return Math.ceilDiv((priceX64 - lowerPriceX64) * MAX_POS_BIN, upperPriceX64 - lowerPriceX64);\n      }\n    }\n  }\n\n  /**\n   * @notice Calculate finalBinPos position to achieve desired token0 output\n   * @param currBinPos Current position in bin (uint104).\n   * @param tradedAmount0 Desired token0 output amount. Assumes <= availableToken0.\n   * @param availableToken0 Available token0 in bin. Assumes <= MAX_POS_BIN and > 0.\n   * @return finalBinPos Position after consuming tradedAmount0. Result <= MAX_POS_BIN.\n   */\n  function calculateBinPositionAfterSellingAmount0(uint256 currBinPos, uint256 tradedAmount0, uint256 availableToken0)\n    internal\n    pure\n    returns (uint256 finalBinPos)\n  {\n    unchecked {\n      // Product ≤ 2^104 × 2^104 = 2^208 < 2^256. Quotient ≤ max − currBinPos,\n      // so currBinPos + quotient ≤ MAX_POS_BIN.\n      return currBinPos + (((MAX_POS_BIN - currBinPos) * tradedAmount0) / availableToken0);\n    }\n  }\n\n  /**\n   * @notice Calculate finalBinPos position to achieve desired token1 output\n   * @param currBinPos Current position in bin (uint104).\n   * @param tradedAmount1 Desired token1 output amount. Assumes <= availableToken1.\n   * @param availableToken1 Available token1 in bin. Assumes <= MAX_POS_BIN and > 0.\n   * @return finalBinPos Position after consuming tradedAmount1.\n   */\n  function calculateBinPositionAfterSellingAmount1(uint256 currBinPos, uint256 tradedAmount1, uint256 availableToken1)\n    internal\n    pure\n    returns (uint256 finalBinPos)\n  {\n    unchecked {\n      // Product ≤ 2^104 × 2^104 = 2^208 < 2^256. Quotient ≤ currBinPos ≤ MAX_POS_BIN.\n      return Math.ceilDiv(currBinPos * (availableToken1 - tradedAmount1), availableToken1);\n    }\n  }\n\n  /**\n   * @notice Calculate output token1 amount from position movement\n   * @param availableToken1 Available token1 in bin. Assumes <= MAX_POS_BIN.\n   * @param currBinPos Start position (uint104). Assumes > 0.\n   * @param finalBinPos End position (uint104). Assumes <= currBinPos.\n   * @return outToken1 Amount of token1 to output (rounds down). Result <= MAX_POS_BIN.\n   */\n  function calculateOutputToken1FromBinPosition(uint256 availableToken1, uint256 currBinPos, uint256 finalBinPos)\n    internal\n    pure\n    returns (uint256 outToken1)\n  {\n    unchecked {\n      // Product ≤ 2^104 × 2^104 = 2^208. Quotient ≤ availableToken1 ≤ MAX_POS_BIN.\n      outToken1 = (availableToken1 * uint256(currBinPos - finalBinPos)) / currBinPos;\n    }\n  }\n\n  /**\n   * @notice Calculate output token0 amount from position movement\n   * @param availableToken0 Available token0 in bin. Assumes <= MAX_POS_BIN.\n   * @param currBinPos Start position (uint104). Assumes < MAX_POS_BIN.\n   * @param finalBinPos End position (uint104). Assumes >= currBinPos.\n   * @return outToken0 Amount of token0 to output (rounds down). Result <= MAX_POS_BIN.\n   */\n  function calculateOutputToken0FromBinPosition(uint256 availableToken0, uint256 currBinPos, uint256 finalBinPos)\n    internal\n    pure\n    returns (uint256 outToken0)\n  {\n    unchecked {\n      // Product ≤ 2^104 × 2^104 = 2^208. Quotient ≤ availableToken0 ≤ MAX_POS_BIN.\n      outToken0 = (availableToken0 * (finalBinPos - currBinPos)) / (MAX_POS_BIN - currBinPos);\n    }\n  }\n\n  // ============ Token Conversion Helpers ============\n\n  /**\n   * @notice Calculates the required token1 input for a given amount of token0 output\n   * @param token0Out Amount of token0 output. Assumes <= type(uint128).max.\n   * @param startingPriceX64 Starting price of token0 in token1 (Q64.64).\n   * @param finalPriceX64 Final price of token0 in token1 (Q64.64).\n   * @return requiredToken1In Token1 input in internal decimals. Not bounded here; an oversized result reverts downstream in `_toUint104IncomingBinBalance`.\n   */\n  function calculateRequiredToken1(uint256 token0Out, uint256 startingPriceX64, uint256 finalPriceX64)\n    internal\n    pure\n    returns (uint256 requiredToken1In)\n  {\n    uint256 startingCost = Math.mulDiv(token0Out, startingPriceX64, ONE_X64, Math.Rounding.Ceil);\n    uint256 finalCost = Math.mulDiv(token0Out, finalPriceX64, ONE_X64, Math.Rounding.Ceil);\n    requiredToken1In = calculateArithmeticMean(startingCost, finalCost);\n  }\n\n  /**\n   * @notice Calculates the required token0 input for a given amount of token1 output\n   * @param token1Out Amount of token1 output. Assumes <= type(uint128).max.\n   * @param startingPriceX64 Starting price of token0 in token1 (Q64.64). Must be > 0.\n   * @param finalPriceX64 Final price of token0 in token1 (Q64.64). Must be > 0.\n   * @return requiredToken0In Token0 input in internal decimals. Not bounded here; an oversized result reverts downstream in `_toUint104IncomingBinBalance`.\n   */\n  function calculateRequiredToken0(uint256 token1Out, uint256 startingPriceX64, uint256 finalPriceX64)\n    internal\n    pure\n    returns (uint256 requiredToken0In)\n  {\n    uint256 startingCost = Math.mulDiv(token1Out, ONE_X64, startingPriceX64, Math.Rounding.Ceil);\n    uint256 finalCost = Math.mulDiv(token1Out, ONE_X64, finalPriceX64, Math.Rounding.Ceil);\n    return calculateArithmeticMean(startingCost, finalCost);\n  }\n\n  // ============ Analytical Target Position Helpers ============\n\n  /**\n   * @notice Compute target bin position using analytical closed-form solution for selling specified amount of token1\n   * @dev Solves the quadratic equation: A×d + B×d² = target\n   *      d = 2 * target / (A + sqrt(A² + 4B×target)) = 2Q / (1 + sqrt(1 + 4rQ))\n   *      where:\n   *        r = B/A and Q = target / A\n   *        A = T0 × Pc / [(M-c) × 2^64], with Pc the effective (fee-inclusive) price at c\n   *        B = ΔP / (2M × Pc) × A\n   * @param currBinPos Current position in bin. Assumes <= MAX_POS_BIN.\n   * @param maxFinalBinPos Maximum achievable final position. Assumes currBinPos < maxFinalBinPos <= MAX_POS_BIN.\n   * @param inputAmount Amount of token1 input to spend. Assumes <= type(uint128).max.\n   * @param token0Balance Available token0 in bin. Assumes <= MAX_POS_BIN.\n   * @param lowerPriceX64 Lower price bound of bin. Assumes <= 2*type(uint128).max.\n   * @param upperPriceX64 Upper price bound of bin. Assumes lowerPriceX64 < upperPriceX64 <= 2*type(uint128).max.\n   * @dev `lowerPriceX64`/`upperPriceX64` are EFFECTIVE (fee-inclusive) prices, so no fee term appears here.\n   * @return targetPos Computed target position. Result satisfies currBinPos < targetPos <= maxFinalBinPos.\n   */\n  function computeAnalyticalTargetPosForBuyToken0(\n    uint256 currBinPos,\n    uint256 maxFinalBinPos,\n    uint256 inputAmount,\n    uint256 token0Balance,\n    uint256 lowerPriceX64,\n    uint256 upperPriceX64\n  ) internal pure returns (uint256 targetPos) {\n    uint256 maxSubCurrPos = MAX_POS_BIN - currBinPos;\n    uint256 deltaPriceX64 = upperPriceX64 - lowerPriceX64;\n    uint256 priceAtCurrPosX64 = lowerPriceX64 + (deltaPriceX64 * currBinPos) / MAX_POS_BIN;\n\n    uint256 deltaPos = 0;\n    if (token0Balance > 0 && priceAtCurrPosX64 > 0 && maxSubCurrPos > 0) {\n      uint256 aX128 = Math.mulDiv(token0Balance, priceAtCurrPosX64 << 64, maxSubCurrPos);\n\n      if (aX128 > 0) {\n        uint256 qX128 = Math.mulDiv(inputAmount << 128, 1 << 128, aX128);\n\n        // Apply quadratic correction\n        // Exact solution: d = 2Q / (1 + sqrt(1 + 4rQ))\n        // where r = B/A = ΔP / (2M × Pc)\n        {\n          // rQx128 = ΔP × qX128 / (2M × Pc) = rQ × 2^128\n          uint256 rQx128 = Math.mulDiv(deltaPriceX64, qX128, 2 * MAX_POS_BIN * priceAtCurrPosX64);\n\n          // Exact quadratic solution: d = 2Q / (1 + sqrt(1 + 4rQ))\n          uint256 sqrtArgX128 = (1 << 128) + 4 * rQx128;\n          uint256 sqrtValX64 = Math.sqrt(sqrtArgX128);\n          deltaPos = (2 * qX128) / ((1 << 128) + (sqrtValX64 << 64));\n        }\n      }\n    }\n\n    // Minimum forward progress when the closed form rounds to zero but input is non-zero.\n    if (deltaPos == 0 && inputAmount > 0) deltaPos = 1;\n\n    if (deltaPos > maxSubCurrPos) deltaPos = maxSubCurrPos;\n    targetPos = (currBinPos + deltaPos > maxFinalBinPos) ? maxFinalBinPos : currBinPos + deltaPos;\n    // Ensure we move at least one step toward `maxFinalBinPos` when the grid still allows it.\n    if (targetPos <= currBinPos) targetPos = currBinPos + (currBinPos < maxFinalBinPos ? 1 : 0);\n  }\n\n  /**\n   * @notice Compute target bin position using analytical closed-form solution for selling specified amount of token0\n   * @dev Use the same analytical closed-form solution as for buying token0, but invert the price and mirror bin positions.\n   * @param currBinPos Current position in bin. Assumes <= MAX_POS_BIN.\n   * @param minFinalBinPos Minimum achievable final position. Assumes minFinalBinPos < currBinPos.\n   * @param inputAmount Amount of token0 input to spend. Assumes <= type(uint128).max.\n   * @param token1Balance Available token1 in bin. Assumes <= MAX_POS_BIN.\n   * @param lowerPriceX64 Lower price bound of bin. Assumes <= 2*type(uint128).max.\n   * @param upperPriceX64 Upper price bound of bin. Assumes lowerPriceX64 < upperPriceX64 <= 2*type(uint128).max.\n   * @dev `lowerPriceX64`/`upperPriceX64` are EFFECTIVE (fee-inclusive) prices, so no fee term appears here.\n   * @return targetPos Computed target position. Result satisfies minFinalBinPos <= targetPos < currBinPos.\n   */\n  function computeAnalyticalTargetPosForSellToken0(\n    uint256 currBinPos,\n    uint256 minFinalBinPos,\n    uint256 inputAmount,\n    uint256 token1Balance,\n    uint256 lowerPriceX64,\n    uint256 upperPriceX64\n  ) internal pure returns (uint256 targetPos) {\n    uint256 mirroredTargetPos = computeAnalyticalTargetPosForBuyToken0(\n      MAX_POS_BIN - currBinPos,\n      MAX_POS_BIN - minFinalBinPos,\n      inputAmount,\n      token1Balance,\n      invertPriceX64(upperPriceX64),\n      invertPriceX64(lowerPriceX64)\n    );\n    return MAX_POS_BIN - mirroredTargetPos;\n  }\n\n  // ============ Swap In Bin Functions - Exact Output ============\n\n  /**\n   * @notice Calculate swap amounts for a single bin iteration (token1 → token0, exact output)\n   * @dev `lowerEffPriceX64`/`upperEffPriceX64` are EFFECTIVE prices, so `priceLimitX64` is compared against them\n   *      directly and therefore bounds the price the trader actually realizes.\n   * @param binState Current bin state\n   * @param currBinPos Current position in bin (uint104).\n   * @param state Current swap state\n   * @param totalFeeOfGrossX64 Whole carved fee as a fraction of the gross input, Q64.64 (`FeeMath.totalFeeOfGrossX64`).\n   * @param platformShareOfFeeX64 Platform share of the carved fee, Q64.64 (`FeeMath.platformPartOfTotalFeeX64`).\n   * @param lowerEffPriceX64 Effective lower bound price of bin (Q64.64). Assumes <= type(uint128).max.\n   * @param upperEffPriceX64 Effective upper bound price of bin. Assumes lowerEffPriceX64 < upperEffPriceX64 <= type(uint128).max.\n   * @param priceLimitX64 Price limit for the swap. Assumes <= type(uint128).max.\n   * @return finalBinPos End position in bin.\n   * @return binDelta0Scaled Change in the BIN's scaled token0 balance (negative = token0 left the bin).\n   * @return binDelta1Scaled Change in the BIN's scaled token1 balance (positive = token1 entered the bin, net of the platform take).\n   * @return platformFeeScaled Combined platform take withheld from the input (never enters the bin).\n   * @return lpFeeScaled LP leg of the carved fee for this step; stays in the bin.\n   */\n  function buyToken0InBinSpecifiedOut(\n    BinState memory binState,\n    uint256 currBinPos,\n    SwapState memory state,\n    uint256 totalFeeOfGrossX64,\n    uint256 platformShareOfFeeX64,\n    uint256 lowerEffPriceX64,\n    uint256 upperEffPriceX64,\n    uint256 priceLimitX64\n  )\n    internal\n    pure\n    returns (\n      uint256 finalBinPos,\n      int256 binDelta0Scaled,\n      int256 binDelta1Scaled,\n      uint256 platformFeeScaled,\n      uint256 lpFeeScaled\n    )\n  {\n    unchecked {\n      uint256 amountOutScaled = 0;\n\n      if (state.amountSpecifiedRemainingScaled < binState.token0BalanceScaled) {\n        finalBinPos = calculateBinPositionAfterSellingAmount0(\n          currBinPos, state.amountSpecifiedRemainingScaled, binState.token0BalanceScaled\n        );\n        amountOutScaled = state.amountSpecifiedRemainingScaled;\n      } else {\n        finalBinPos = MAX_POS_BIN;\n        amountOutScaled = binState.token0BalanceScaled;\n      }\n\n      if (priceLimitX64 < upperEffPriceX64) {\n        if (priceLimitX64 <= lowerEffPriceX64) return (currBinPos, 0, 0, 0, 0);\n\n        uint256 finalBinPosAtPriceLimit =\n          calculateBinPositionAtPrice(lowerEffPriceX64, upperEffPriceX64, priceLimitX64, Math.Rounding.Floor);\n        if (finalBinPosAtPriceLimit <= currBinPos) return (currBinPos, 0, 0, 0, 0);\n\n        if (finalBinPosAtPriceLimit < finalBinPos) {\n          finalBinPos = finalBinPosAtPriceLimit;\n          uint256 amountOutHelper =\n            calculateOutputToken0FromBinPosition(binState.token0BalanceScaled, currBinPos, finalBinPos);\n          amountOutScaled = amountOutHelper < amountOutScaled ? amountOutHelper : amountOutScaled;\n        }\n      }\n\n      if (amountOutScaled == 0) {\n        finalBinPos = currBinPos;\n        return (finalBinPos, 0, 0, 0, 0);\n      }\n\n      uint256 startingPriceX64 =\n        calculatePriceAtBinPosition(lowerEffPriceX64, upperEffPriceX64, currBinPos, Math.Rounding.Ceil);\n      uint256 finalPriceX64 =\n        calculatePriceAtBinPosition(lowerEffPriceX64, upperEffPriceX64, finalBinPos, Math.Rounding.Ceil);\n\n      uint256 amountInScaled = calculateRequiredToken1(amountOutScaled, startingPriceX64, finalPriceX64);\n\n      uint256 totalFeeScaled = (amountInScaled * totalFeeOfGrossX64) / ONE_X64;\n      platformFeeScaled = totalFeeScaled * platformShareOfFeeX64 / ONE_X64;\n      lpFeeScaled = totalFeeScaled - platformFeeScaled;\n      uint256 binCreditScaled = amountInScaled - platformFeeScaled;\n\n      binState.token0BalanceScaled -= amountOutScaled.toUint104();\n      binState.token1BalanceScaled =\n        _toUint104IncomingBinBalance(uint256(binState.token1BalanceScaled) + binCreditScaled);\n\n      state.amountSpecifiedRemainingScaled -= amountOutScaled;\n      state.amountCalculatedScaled += amountInScaled;\n\n      binDelta0Scaled = -amountOutScaled.toInt256();\n      binDelta1Scaled = binCreditScaled.toInt256();\n    }\n  }\n\n  /**\n   * @notice Calculate swap amounts for a single bin iteration (token0 → token1, exact output)\n   * @dev `lowerEffPriceX64`/`upperEffPriceX64` are EFFECTIVE prices; see `buyToken0InBinSpecifiedOut`.\n   * @param binState Current bin state\n   * @param currBinPos Current position in bin (uint104).\n   * @param state Current swap state\n   * @param totalFeeOfGrossX64 Whole carved fee as a fraction of the gross input, Q64.64 (`FeeMath.totalFeeOfGrossX64`).\n   * @param platformShareOfFeeX64 Platform share of the carved fee, Q64.64 (`FeeMath.platformPartOfTotalFeeX64`).\n   * @param lowerEffPriceX64 Effective lower bound price of bin (Q64.64). Assumes <= type(uint128).max.\n   * @param upperEffPriceX64 Effective upper bound price of bin. Assumes lowerEffPriceX64 < upperEffPriceX64 <= type(uint128).max.\n   * @param priceLimitX64 Price limit for the swap. Assumes <= type(uint128).max.\n   * @return finalBinPos End position in bin. Result <= MAX_POS_BIN.\n   * @return binDelta0Scaled Change in the BIN's scaled token0 balance (positive = token0 entered the bin, net of the platform take).\n   * @return binDelta1Scaled Change in the BIN's scaled token1 balance (negative = token1 left the bin).\n   * @return platformFeeScaled Combined platform take withheld from the input (never enters the bin).\n   * @return lpFeeScaled LP leg of the carved fee for this step; stays in the bin.\n   */\n  function buyToken1InBinSpecifiedOut(\n    BinState memory binState,\n    uint256 currBinPos,\n    SwapState memory state,\n    uint256 totalFeeOfGrossX64,\n    uint256 platformShareOfFeeX64,\n    uint256 lowerEffPriceX64,\n    uint256 upperEffPriceX64,\n    uint256 priceLimitX64\n  )\n    internal\n    pure\n    returns (\n      uint256 finalBinPos,\n      int256 binDelta0Scaled,\n      int256 binDelta1Scaled,\n      uint256 platformFeeScaled,\n      uint256 lpFeeScaled\n    )\n  {\n    unchecked {\n      uint256 amountOutScaled = 0;\n\n      if (state.amountSpecifiedRemainingScaled < binState.token1BalanceScaled) {\n        finalBinPos = calculateBinPositionAfterSellingAmount1(\n          currBinPos, state.amountSpecifiedRemainingScaled, binState.token1BalanceScaled\n        );\n        amountOutScaled = state.amountSpecifiedRemainingScaled;\n      } else {\n        finalBinPos = 0;\n        amountOutScaled = binState.token1BalanceScaled;\n      }\n\n      if (lowerEffPriceX64 < priceLimitX64) {\n        if (priceLimitX64 >= upperEffPriceX64) return (currBinPos, 0, 0, 0, 0);\n\n        uint256 finalBinPosAtPriceLimit =\n          calculateBinPositionAtPrice(lowerEffPriceX64, upperEffPriceX64, priceLimitX64, Math.Rounding.Ceil);\n        if (finalBinPosAtPriceLimit >= currBinPos) return (currBinPos, 0, 0, 0, 0);\n\n        if (finalBinPos < finalBinPosAtPriceLimit) {\n          finalBinPos = finalBinPosAtPriceLimit;\n          uint256 amountOutHelper =\n            calculateOutputToken1FromBinPosition(binState.token1BalanceScaled, currBinPos, finalBinPos);\n          amountOutScaled = amountOutHelper < amountOutScaled ? amountOutHelper : amountOutScaled;\n        }\n      }\n\n      if (amountOutScaled == 0) {\n        finalBinPos = currBinPos;\n        return (finalBinPos, 0, 0, 0, 0);\n      }\n\n      uint256 startingPriceX64 =\n        calculatePriceAtBinPosition(lowerEffPriceX64, upperEffPriceX64, currBinPos, Math.Rounding.Floor);\n      uint256 finalPriceX64 =\n        calculatePriceAtBinPosition(lowerEffPriceX64, upperEffPriceX64, finalBinPos, Math.Rounding.Floor);\n      uint256 amountInScaled = calculateRequiredToken0(amountOutScaled, startingPriceX64, finalPriceX64);\n\n      uint256 totalFeeScaled = (amountInScaled * totalFeeOfGrossX64) / ONE_X64;\n      platformFeeScaled = totalFeeScaled * platformShareOfFeeX64 / ONE_X64;\n      lpFeeScaled = totalFeeScaled - platformFeeScaled;\n      uint256 binCreditScaled = amountInScaled - platformFeeScaled;\n\n      binState.token1BalanceScaled -= amountOutScaled.toUint104();\n      binState.token0BalanceScaled =\n        _toUint104IncomingBinBalance(uint256(binState.token0BalanceScaled) + binCreditScaled);\n\n      state.amountSpecifiedRemainingScaled -= amountOutScaled;\n      state.amountCalculatedScaled += amountInScaled;\n\n      binDelta0Scaled = binCreditScaled.toInt256();\n      binDelta1Scaled = -amountOutScaled.toInt256();\n    }\n  }\n\n  // ============ Swap In Bin Functions - Exact Input ============\n\n  /**\n   * @notice Calculate swap amounts for a single bin iteration - exact input token1, output token0 (going up in price)\n   * @dev Uses the analytical solution with Math.sqrt, then at most one proportional rescale (clamped to the bin edge or\n   *      price limit); leftover input inside the bin is charged in full, and an overshoot scales the output down.\n   * @param binState Current bin state\n   * @param currBinPos Current position in bin (uint104).\n   * @param state Current swap state\n   * @param totalFeeOfGrossX64 Whole carved fee as a fraction of the gross input, Q64.64 (`FeeMath.totalFeeOfGrossX64`).\n   * @param platformShareOfFeeX64 Platform share of the carved fee, Q64.64 (`FeeMath.platformPartOfTotalFeeX64`).\n   * @param lowerEffPriceX64 Effective lower bound price of bin. Assumes <= type(uint128).max.\n   * @param upperEffPriceX64 Effective upper bound price of bin. Assumes lowerEffPriceX64 < upperEffPriceX64 <= type(uint128).max.\n   * @param priceLimitX64 Price limit for the swap. Assumes <= type(uint128).max.\n   * @return finalBinPos End position in bin. Result <= MAX_POS_BIN.\n   * @return out0Scaled Output token0 amount for this bin. Result <= MAX_POS_BIN.\n   * @return binDelta0Scaled Change in the BIN's scaled token0 balance (negative = token0 left the bin).\n   * @return binDelta1Scaled Change in the BIN's scaled token1 balance (positive = token1 entered the bin, net of the platform take).\n   * @return platformFeeScaled Combined platform take withheld from the input (never enters the bin).\n   * @return lpFeeScaled LP leg of the carved fee for this step; stays in the bin.\n   */\n  function buyToken0InBinSpecifiedIn(\n    BinState memory binState,\n    uint256 currBinPos,\n    SwapState memory state,\n    uint256 totalFeeOfGrossX64,\n    uint256 platformShareOfFeeX64,\n    uint256 lowerEffPriceX64,\n    uint256 upperEffPriceX64,\n    uint256 priceLimitX64\n  )\n    internal\n    pure\n    returns (\n      uint256 finalBinPos,\n      uint256 out0Scaled,\n      int256 binDelta0Scaled,\n      int256 binDelta1Scaled,\n      uint256 platformFeeScaled,\n      uint256 lpFeeScaled\n    )\n  {\n    unchecked {\n      uint256 startingPriceX64 =\n        calculatePriceAtBinPosition(lowerEffPriceX64, upperEffPriceX64, currBinPos, Math.Rounding.Ceil);\n\n      if ((state.amountSpecifiedRemainingScaled << 64) < startingPriceX64) {\n        return (currBinPos, 0, 0, 0, 0, 0);\n      }\n\n      uint256 maxFinalBinPos;\n      if (upperEffPriceX64 <= priceLimitX64) {\n        maxFinalBinPos = MAX_POS_BIN;\n      } else {\n        if (priceLimitX64 <= lowerEffPriceX64) {\n          return (currBinPos, 0, 0, 0, 0, 0);\n        }\n        maxFinalBinPos =\n          calculateBinPositionAtPrice(lowerEffPriceX64, upperEffPriceX64, priceLimitX64, Math.Rounding.Floor);\n        if (maxFinalBinPos <= currBinPos) {\n          return (currBinPos, 0, 0, 0, 0, 0);\n        }\n      }\n\n      // Check if we can consume up to maxFinalBinPos directly\n      out0Scaled = calculateOutputToken0FromBinPosition(binState.token0BalanceScaled, currBinPos, maxFinalBinPos);\n\n      uint256 finalPriceX64 =\n        calculatePriceAtBinPosition(lowerEffPriceX64, upperEffPriceX64, maxFinalBinPos, Math.Rounding.Ceil);\n      uint256 totalIn1Scaled = calculateRequiredToken1(out0Scaled, startingPriceX64, finalPriceX64);\n\n      uint256 targetPos;\n      if (totalIn1Scaled <= state.amountSpecifiedRemainingScaled) {\n        targetPos = maxFinalBinPos;\n      } else {\n        targetPos = computeAnalyticalTargetPosForBuyToken0(\n          currBinPos,\n          maxFinalBinPos,\n          state.amountSpecifiedRemainingScaled,\n          binState.token0BalanceScaled,\n          lowerEffPriceX64,\n          upperEffPriceX64\n        );\n\n        out0Scaled = calculateOutputToken0FromBinPosition(binState.token0BalanceScaled, currBinPos, targetPos);\n        finalPriceX64 = calculatePriceAtBinPosition(lowerEffPriceX64, upperEffPriceX64, targetPos, Math.Rounding.Ceil);\n        totalIn1Scaled = calculateRequiredToken1(out0Scaled, startingPriceX64, finalPriceX64);\n\n        if (totalIn1Scaled < state.amountSpecifiedRemainingScaled && targetPos < maxFinalBinPos) {\n          if (totalIn1Scaled == 0) totalIn1Scaled = 1;\n          uint256 delta = targetPos - currBinPos;\n          uint256 scaledDelta = delta * state.amountSpecifiedRemainingScaled / totalIn1Scaled;\n          if (scaledDelta == 0) {\n            totalIn1Scaled = state.amountSpecifiedRemainingScaled;\n            targetPos = currBinPos;\n            out0Scaled = 0;\n          } else {\n            uint256 scaledTarget = currBinPos + scaledDelta;\n            if (scaledTarget > maxFinalBinPos) {\n              targetPos = maxFinalBinPos;\n            } else {\n              targetPos = scaledTarget;\n            }\n\n            out0Scaled = calculateOutputToken0FromBinPosition(binState.token0BalanceScaled, currBinPos, targetPos);\n            finalPriceX64 =\n              calculatePriceAtBinPosition(lowerEffPriceX64, upperEffPriceX64, targetPos, Math.Rounding.Ceil);\n            totalIn1Scaled = calculateRequiredToken1(out0Scaled, startingPriceX64, finalPriceX64);\n          }\n        }\n\n        if (totalIn1Scaled < state.amountSpecifiedRemainingScaled && targetPos < maxFinalBinPos) {\n          totalIn1Scaled = state.amountSpecifiedRemainingScaled;\n        }\n\n        if (totalIn1Scaled > state.amountSpecifiedRemainingScaled) {\n          out0Scaled = (out0Scaled * state.amountSpecifiedRemainingScaled) / totalIn1Scaled;\n          targetPos = calculateBinPositionAfterSellingAmount0(currBinPos, out0Scaled, binState.token0BalanceScaled);\n          totalIn1Scaled = state.amountSpecifiedRemainingScaled;\n        }\n      }\n\n      if (out0Scaled == 0) {\n        targetPos = currBinPos;\n      }\n\n      uint256 totalFeeScaled = (totalIn1Scaled * totalFeeOfGrossX64) / ONE_X64;\n      platformFeeScaled = totalFeeScaled * platformShareOfFeeX64 / ONE_X64;\n      lpFeeScaled = totalFeeScaled - platformFeeScaled;\n      uint256 binCreditScaled = totalIn1Scaled - platformFeeScaled;\n\n      binState.token0BalanceScaled -= out0Scaled.toUint104();\n      binState.token1BalanceScaled =\n        _toUint104IncomingBinBalance(uint256(binState.token1BalanceScaled) + binCreditScaled);\n\n      state.amountSpecifiedRemainingScaled -= totalIn1Scaled;\n      state.amountCalculatedScaled += out0Scaled;\n\n      binDelta0Scaled = -out0Scaled.toInt256();\n      binDelta1Scaled = binCreditScaled.toInt256();\n      return (targetPos, out0Scaled, binDelta0Scaled, binDelta1Scaled, platformFeeScaled, lpFeeScaled);\n    }\n  }\n\n  /**\n   * @notice Calculate swap amounts for a single bin iteration - exact input token0, output token1 (going down in price)\n   * @dev Uses the analytical solution with Math.sqrt, then at most one proportional rescale (clamped to the bin edge or\n   *      price limit); leftover input inside the bin is charged in full, and an overshoot scales the output down.\n   * @param binState Current bin state\n   * @param currBinPos Current position in bin (uint104).\n   * @param state Current swap state\n   * @param totalFeeOfGrossX64 Whole carved fee as a fraction of the gross input, Q64.64 (`FeeMath.totalFeeOfGrossX64`).\n   * @param platformShareOfFeeX64 Platform share of the carved fee, Q64.64 (`FeeMath.platformPartOfTotalFeeX64`).\n   * @param lowerEffPriceX64 Effective lower bound price of bin. Assumes <= type(uint128).max.\n   * @param upperEffPriceX64 Effective upper bound price of bin. Assumes lowerEffPriceX64 < upperEffPriceX64 <= type(uint128).max.\n   * @param priceLimitX64 Price limit for the swap. Assumes <= type(uint128).max.\n   * @return finalBinPos End position in bin. Result <= MAX_POS_BIN.\n   * @return out1Scaled Output token1 amount for this bin. Result <= MAX_POS_BIN.\n   * @return binDelta0Scaled Change in the BIN's scaled token0 balance (positive = token0 entered the bin, net of the platform take).\n   * @return binDelta1Scaled Change in the BIN's scaled token1 balance (negative = token1 left the bin).\n   * @return platformFeeScaled Combined platform take withheld from the input (never enters the bin).\n   * @return lpFeeScaled LP leg of the carved fee for this step; stays in the bin.\n   */\n  function buyToken1InBinSpecifiedIn(\n    BinState memory binState,\n    uint256 currBinPos,\n    SwapState memory state,\n    uint256 totalFeeOfGrossX64,\n    uint256 platformShareOfFeeX64,\n    uint256 lowerEffPriceX64,\n    uint256 upperEffPriceX64,\n    uint256 priceLimitX64\n  )\n    internal\n    pure\n    returns (\n      uint256 finalBinPos,\n      uint256 out1Scaled,\n      int256 binDelta0Scaled,\n      int256 binDelta1Scaled,\n      uint256 platformFeeScaled,\n      uint256 lpFeeScaled\n    )\n  {\n    unchecked {\n      uint256 startingPriceX64 =\n        calculatePriceAtBinPosition(lowerEffPriceX64, upperEffPriceX64, currBinPos, Math.Rounding.Floor);\n\n      if (state.amountSpecifiedRemainingScaled < Math.ceilDiv(ONE_X64, startingPriceX64)) {\n        return (currBinPos, 0, 0, 0, 0, 0);\n      }\n\n      uint256 minFinalBinPos;\n\n      if (priceLimitX64 <= lowerEffPriceX64) {\n        minFinalBinPos = 0;\n      } else {\n        minFinalBinPos =\n          calculateBinPositionAtPrice(lowerEffPriceX64, upperEffPriceX64, priceLimitX64, Math.Rounding.Ceil);\n        if (currBinPos <= minFinalBinPos) {\n          return (currBinPos, 0, 0, 0, 0, 0);\n        }\n      }\n\n      // Check if we can consume up to minFinalBinPos directly\n      out1Scaled = calculateOutputToken1FromBinPosition(binState.token1BalanceScaled, currBinPos, minFinalBinPos);\n\n      uint256 finalPriceX64 =\n        calculatePriceAtBinPosition(lowerEffPriceX64, upperEffPriceX64, minFinalBinPos, Math.Rounding.Floor);\n      uint256 totalIn0Scaled = calculateRequiredToken0(out1Scaled, startingPriceX64, finalPriceX64);\n\n      uint256 targetPos;\n      if (totalIn0Scaled <= state.amountSpecifiedRemainingScaled) {\n        targetPos = minFinalBinPos;\n      } else {\n        targetPos = computeAnalyticalTargetPosForSellToken0(\n          currBinPos,\n          minFinalBinPos,\n          state.amountSpecifiedRemainingScaled,\n          binState.token1BalanceScaled,\n          lowerEffPriceX64,\n          upperEffPriceX64\n        );\n        out1Scaled = calculateOutputToken1FromBinPosition(binState.token1BalanceScaled, currBinPos, targetPos);\n\n        finalPriceX64 = calculatePriceAtBinPosition(lowerEffPriceX64, upperEffPriceX64, targetPos, Math.Rounding.Floor);\n        totalIn0Scaled = calculateRequiredToken0(out1Scaled, startingPriceX64, finalPriceX64);\n\n        if (totalIn0Scaled < state.amountSpecifiedRemainingScaled && targetPos > minFinalBinPos) {\n          if (totalIn0Scaled == 0) totalIn0Scaled = 1;\n          uint256 delta = currBinPos - targetPos;\n          uint256 scaledDelta = delta * state.amountSpecifiedRemainingScaled / totalIn0Scaled;\n          if (scaledDelta == 0) {\n            totalIn0Scaled = state.amountSpecifiedRemainingScaled;\n            targetPos = currBinPos;\n            out1Scaled = 0;\n          } else {\n            targetPos = currBinPos > scaledDelta ? currBinPos - scaledDelta : 0;\n            if (targetPos < minFinalBinPos) {\n              targetPos = minFinalBinPos;\n            }\n\n            out1Scaled = calculateOutputToken1FromBinPosition(binState.token1BalanceScaled, currBinPos, targetPos);\n\n            finalPriceX64 =\n              calculatePriceAtBinPosition(lowerEffPriceX64, upperEffPriceX64, targetPos, Math.Rounding.Floor);\n            totalIn0Scaled = calculateRequiredToken0(out1Scaled, startingPriceX64, finalPriceX64);\n          }\n        }\n        if (totalIn0Scaled < state.amountSpecifiedRemainingScaled && targetPos > minFinalBinPos) {\n          totalIn0Scaled = state.amountSpecifiedRemainingScaled;\n        }\n\n        if (totalIn0Scaled > state.amountSpecifiedRemainingScaled) {\n          out1Scaled = (out1Scaled * state.amountSpecifiedRemainingScaled) / totalIn0Scaled;\n          targetPos = calculateBinPositionAfterSellingAmount1(currBinPos, out1Scaled, binState.token1BalanceScaled);\n          totalIn0Scaled = state.amountSpecifiedRemainingScaled;\n        }\n      }\n\n      if (out1Scaled == 0) {\n        targetPos = currBinPos;\n      }\n\n      uint256 totalFeeScaled = (totalIn0Scaled * totalFeeOfGrossX64) / ONE_X64;\n      platformFeeScaled = totalFeeScaled * platformShareOfFeeX64 / ONE_X64;\n      lpFeeScaled = totalFeeScaled - platformFeeScaled;\n      uint256 binCreditScaled = totalIn0Scaled - platformFeeScaled;\n\n      binState.token1BalanceScaled -= out1Scaled.toUint104();\n      binState.token0BalanceScaled =\n        _toUint104IncomingBinBalance(uint256(binState.token0BalanceScaled) + binCreditScaled);\n\n      state.amountSpecifiedRemainingScaled -= totalIn0Scaled;\n      state.amountCalculatedScaled += out1Scaled;\n\n      binDelta0Scaled = binCreditScaled.toInt256();\n      binDelta1Scaled = -out1Scaled.toInt256();\n      return (targetPos, out1Scaled, binDelta0Scaled, binDelta1Scaled, platformFeeScaled, lpFeeScaled);\n    }\n  }\n}\n"},"contracts/types/PoolOperation.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\n/// @notice Batched per-bin liquidity add or remove payload (parallel arrays).\n/// @param binIdxs Bin indices to modify.\n/// @param shares Shares to add or remove per corresponding bin index.\nstruct LiquidityDelta {\n  int256[] binIdxs;\n  uint256[] shares;\n}\n\n/// @notice Per-bin balance change used in liquidity events.\n/// @dev `delta0Scaled` and `delta1Scaled` are scaled token balances inside bins (not raw ERC20 amounts).\n///      Positive means net token entered the bin; negative means net token left the bin.\n/// @param delta0Scaled Net change in the bin scaled token0 balance.\n/// @param delta1Scaled Net change in the bin scaled token1 balance.\nstruct BinBalanceDelta {\n  int256 delta0Scaled;\n  int256 delta1Scaled;\n}\n"},"contracts/interfaces/IExtsload.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\n/// @title IExtsload\n/// @notice Read arbitrary contract storage via `EXTSLOAD`-style external calls (Uniswap V4-style pattern).\n/// @dev Off-chain callers and libraries must interpret slot values using the target contract's storage layout.\n///      Miscomputed slots read unrelated data; there is no runtime validation of layout at this boundary.\ninterface IExtsload {\n  // ============ View ============\n\n  /// @notice Read a single 32-byte storage slot.\n  /// @param slot Keccak-derived or raw slot key as used by the implementation contract.\n  /// @return value Raw `bytes32` contents of the slot.\n  function extsload(bytes32 slot) external view returns (bytes32 value);\n\n  /// @notice Read many storage slots in one call.\n  /// @param slots Each entry is a slot key as for `extsload(bytes32)`.\n  /// @return values One `bytes32` per slot, same order as `slots`.\n  function extsload(bytes32[] calldata slots) external view returns (bytes32[] memory values);\n\n  /// @notice Read a contiguous run of slots starting at `startSlot` for `nSlots` steps.\n  /// @param startSlot First slot (inclusive).\n  /// @param nSlots Number of consecutive slots to read (`startSlot`, `startSlot + 1`, ...).\n  /// @return values Raw slot values in order.\n  function extsload(bytes32 startSlot, uint256 nSlots) external view returns (bytes32[] memory values);\n}\n"},"contracts/libraries/SignedMath.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\nimport {Panic} from \"@openzeppelin/contracts/utils/Panic.sol\";\nimport {SafeCast} from \"@openzeppelin/contracts/utils/math/SafeCast.sol\";\n\n/// @title SignedMath\n/// @notice Helpers for signed integer arithmetic\nlibrary SignedMath {\n  using SafeCast for uint256;\n\n  /// @notice Returns ceil(a / b), rounded toward positive infinity\n  /// @dev Reverts on division by zero and on int256 min / -1 overflow (same behavior as Solidity division)\n  function ceilDiv(int256 a, int256 b) internal pure returns (int256) {\n    if (b == 0) {\n      // Guarantee the same behavior as in a regular Solidity division.\n      Panic.panic(Panic.DIVISION_BY_ZERO);\n    }\n\n    int256 quotient = a / b;\n    int256 remainder = a % b;\n\n    // If there is a remainder and the exact result is positive, round up by 1.\n    if (remainder != 0 && (a ^ b) >= 0) {\n      unchecked {\n        quotient += 1;\n      }\n    }\n\n    return quotient;\n  }\n\n  /// @notice Returns ceil(a / b), rounded toward positive infinity\n  /// @dev Reverts on division by zero (same behavior as Solidity division).\n  ///      Also reverts if b > type(int256).max due to checked conversion.\n  function ceilDiv(int256 a, uint256 b) internal pure returns (int256) {\n    if (b == 0) {\n      // Guarantee the same behavior as in a regular Solidity division.\n      Panic.panic(Panic.DIVISION_BY_ZERO);\n    }\n\n    return ceilDiv(a, b.toInt256());\n  }\n}\n"},"contracts/libraries/PoolActions.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\n/// @title PoolActions\n/// @notice Ids stored by the transient reentrancy guard while a MetricOmmPool action runs.\n/// @dev The guard is global, not per-id: any second guarded entry reverts whatever the id. The id only lets\n///      `inSwap` report which action is running.\nlibrary PoolActions {\n  uint256 internal constant ADD_LIQUIDITY = uint256(keccak256(\"addLiquidity\"));\n  uint256 internal constant REMOVE_LIQUIDITY = uint256(keccak256(\"removeLiquidity\"));\n  uint256 internal constant SWAP = uint256(keccak256(\"swap\")); // also guards `getSellAndBuyPrices`\n  uint256 internal constant SIMULATE_SWAP_AND_REVERT = uint256(keccak256(\"simulateSwapAndRevert\"));\n  uint256 internal constant COLLECT_FEES = uint256(keccak256(\"collectFees\"));\n  uint256 internal constant SET_POOL_FEES = uint256(keccak256(\"setPoolFees\"));\n  uint256 internal constant SET_BID_ASK_REF_ASYMMETRY_X8 = uint256(keccak256(\"setBidAskRefAsymmetryX8\"));\n  uint256 internal constant SET_BIN_ADDITIONAL_FEES = uint256(keccak256(\"setBinAdditionalFees\"));\n}\n"},"contracts/libraries/LiquidityLib.sol":{"content":"// SPDX-License-Identifier: BUSL-1.1\npragma solidity ^0.8.35;\n\nimport {Math} from \"@openzeppelin/contracts/utils/math/Math.sol\";\nimport {SafeCast} from \"@openzeppelin/contracts/utils/math/SafeCast.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {BinBalanceDelta, LiquidityDelta} from \"../types/PoolOperation.sol\";\nimport {BinState, BinTotals} from \"../types/PoolStorage.sol\";\nimport {IMetricOmmPoolActions} from \"../interfaces/IMetricOmmPool/IMetricOmmPoolActions.sol\";\nimport {IMetricOmmPool, PoolImmutables} from \"../interfaces/IMetricOmmPool/IMetricOmmPool.sol\";\nimport {IMetricOmmModifyLiquidityCallback} from \"../interfaces/callbacks/IMetricOmmModifyLiquidityCallback.sol\";\nimport {PoolStateLibrary} from \"./PoolStateLibrary.sol\";\n\n/// @title LiquidityLib\n/// @notice Holds `addLiquidity` / `removeLiquidity` logic as a deployable (DELEGATECALL-linked)\n///         library so it does not inflate `MetricOmmPool` bytecode.\n/// @dev Because every `public` function is called via DELEGATECALL from the pool:\n///      - `msg.sender` is the original external caller.\n///      - `address(this)` is the pool contract.\n///      - Storage references resolve against the pool's state.\n///      - ERC-20 calls (`balanceOf`, `safeTransfer`) operate on the pool's holdings.\nlibrary LiquidityLib {\n  using SafeCast for uint256;\n  using SafeERC20 for IERC20;\n\n  /// @notice Immutables + snapshot of mutable state loaded at the start of each liquidity call.\n  struct PoolContext {\n    address token0;\n    address token1;\n    uint256 token0ScaleMultiplier;\n    uint256 token1ScaleMultiplier;\n    uint256 initialScaledToken0PerShareE18;\n    uint256 initialScaledToken1PerShareE18;\n    uint256 minimalOperationalLiquidity;\n    int256 lowestBin;\n    int256 highestBin;\n    int256 curBinIdx;\n    uint104 curPosInBin;\n  }\n\n  function addLiquidity(\n    address owner,\n    uint80 salt,\n    LiquidityDelta calldata deltas,\n    bytes calldata callbackData,\n    BinTotals storage binTotals,\n    mapping(int256 => BinState) storage binStates,\n    mapping(int256 => uint256) storage binTotalShares,\n    mapping(bytes32 => uint256) storage positionBinShares\n  ) public returns (uint256 amount0Added, uint256 amount1Added) {\n    PoolContext memory ctx = _loadContext();\n    unchecked {\n      uint256 length = deltas.binIdxs.length;\n      if (length == 0) return (0, 0);\n\n      uint256 totalToken0ToAddScaled = 0;\n      uint256 totalToken1ToAddScaled = 0;\n\n      BinBalanceDelta[] memory binBalanceDeltas = new BinBalanceDelta[](length);\n\n      int256 curBinIdxCache = ctx.curBinIdx;\n\n      for (uint256 i = 0; i < length; i++) {\n        int256 binIdx = deltas.binIdxs[i];\n        uint256 sharesToAdd = deltas.shares[i];\n\n        if (binIdx < ctx.lowestBin || binIdx > ctx.highestBin) revert IMetricOmmPoolActions.InvalidBinIndex(binIdx);\n        if (sharesToAdd == 0) continue;\n        // Loose sanity bound: per-bin scaled balances are uint104, and an empty bin mints at most 1e18 (~2^60) shares per\n        // scaled unit (`initialScaledAmount*PerE18Shares >= 1`), so legitimate amounts stay far below 2^192.\n        if (sharesToAdd > type(uint192).max) revert IMetricOmmPoolActions.SharesAmountTooLarge();\n\n        {\n          // safe because LOWEST_BIN and HIGHEST_BIN fit int16 (enforced by factory)\n          // forge-lint: disable-next-line(unsafe-typecast)\n          bytes32 posKey = _positionBinKey(owner, salt, int16(binIdx));\n          uint256 binTotalSharesVal = binTotalShares[binIdx];\n          uint256 userShares = positionBinShares[posKey];\n\n          if (sharesToAdd < ctx.minimalOperationalLiquidity) {\n            revert IMetricOmmPoolActions.SharesDeltaSmallerThanMinimalOperationalLiquidity(\n              binIdx, sharesToAdd, ctx.minimalOperationalLiquidity\n            );\n          }\n          uint256 newUserShares = userShares + sharesToAdd;\n\n          BinState storage binState = binStates[binIdx];\n\n          uint256 amount0Scaled = 0;\n          uint256 amount1Scaled = 0;\n          if (binTotalSharesVal == 0) {\n            if (binIdx < curBinIdxCache) {\n              amount1Scaled = Math.mulDiv(ctx.initialScaledToken1PerShareE18, sharesToAdd, 1e18, Math.Rounding.Ceil);\n            } else if (binIdx > curBinIdxCache) {\n              amount0Scaled = Math.mulDiv(ctx.initialScaledToken0PerShareE18, sharesToAdd, 1e18, Math.Rounding.Ceil);\n            } else {\n              uint256 token0Proportion = type(uint104).max - ctx.curPosInBin;\n              uint256 token1Proportion = ctx.curPosInBin;\n              amount0Scaled =\n              (Math.mulDiv(\n                  token0Proportion * ctx.initialScaledToken0PerShareE18,\n                  sharesToAdd,\n                  uint256(type(uint104).max) * 1e18,\n                  Math.Rounding.Ceil\n                ));\n              amount1Scaled =\n              (Math.mulDiv(\n                  token1Proportion * ctx.initialScaledToken1PerShareE18,\n                  sharesToAdd,\n                  uint256(type(uint104).max) * 1e18,\n                  Math.Rounding.Ceil\n                ));\n            }\n          } else {\n            amount0Scaled =\n              Math.mulDiv(binState.token0BalanceScaled, sharesToAdd, binTotalSharesVal, Math.Rounding.Ceil);\n            amount1Scaled =\n              Math.mulDiv(binState.token1BalanceScaled, sharesToAdd, binTotalSharesVal, Math.Rounding.Ceil);\n          }\n\n          // This check makes sure that the later addition of amount(0|1)Scaled will not overflow.\n          if (amount0Scaled > type(uint104).max || amount1Scaled > type(uint104).max) {\n            revert IMetricOmmPoolActions.SharesAmountTooLarge();\n          }\n\n          if (amount0Scaled > 0) {\n            // The total starts at 0 and is increased at each loop iteration. It would require ~2^152 iterations to overflow.\n            totalToken0ToAddScaled += amount0Scaled;\n            // Both added values are bounded by uint104, so the addition will not overflow. The cast to uint104 may revert.\n            binState.token0BalanceScaled = (uint256(binState.token0BalanceScaled) + amount0Scaled).toUint104();\n          }\n          if (amount1Scaled > 0) {\n            totalToken1ToAddScaled += amount1Scaled;\n            binState.token1BalanceScaled = (uint256(binState.token1BalanceScaled) + amount1Scaled).toUint104();\n          }\n\n          // SharesToAdd is bounded by uint192.max. It would require ~2^64 separate additions to overflow.\n          binTotalShares[binIdx] = binTotalSharesVal + sharesToAdd;\n          positionBinShares[posKey] = newUserShares;\n\n          binBalanceDeltas[i] = BinBalanceDelta({\n            // Safe: per-bin deltas are bounded by uint104 bin balances.\n            // forge-lint: disable-next-line(unsafe-typecast)\n            delta0Scaled: int256(amount0Scaled),\n            // casting to int256 is safe because amount1Scaled is bounded by uint104 bin balances.\n            // forge-lint: disable-next-line(unsafe-typecast)\n            delta1Scaled: int256(amount1Scaled)\n          });\n        }\n      }\n\n      // totalToken(0|1)ToAddScaled is capped by uint104.max times the number of iterations. It would require ~2^152 iterations to overflow.\n      if (totalToken0ToAddScaled > 0) {\n        binTotals.scaledToken0 = (uint256(binTotals.scaledToken0) + totalToken0ToAddScaled).toUint128();\n      }\n      if (totalToken1ToAddScaled > 0) {\n        binTotals.scaledToken1 = (uint256(binTotals.scaledToken1) + totalToken1ToAddScaled).toUint128();\n      }\n\n      (amount0Added, amount1Added) =\n        _deltasScaledToExternal(totalToken0ToAddScaled, totalToken1ToAddScaled, ctx, Math.Rounding.Ceil);\n\n      if (amount0Added > 0 || amount1Added > 0) {\n        uint256 balance0Before = IERC20(ctx.token0).balanceOf(address(this));\n        uint256 balance1Before = IERC20(ctx.token1).balanceOf(address(this));\n        IMetricOmmModifyLiquidityCallback(msg.sender)\n          .metricOmmModifyLiquidityCallback(amount0Added, amount1Added, callbackData);\n        if (amount0Added > 0 && balance0Before + amount0Added > IERC20(ctx.token0).balanceOf(address(this))) {\n          revert IMetricOmmPoolActions.InsufficientTokenBalance();\n        }\n        if (amount1Added > 0 && balance1Before + amount1Added > IERC20(ctx.token1).balanceOf(address(this))) {\n          revert IMetricOmmPoolActions.InsufficientTokenBalance();\n        }\n      }\n\n      emit IMetricOmmPoolActions.LiquidityAdded(owner, salt, deltas.binIdxs, binBalanceDeltas, deltas.shares);\n    }\n  }\n\n  function removeLiquidity(\n    address owner,\n    uint80 salt,\n    LiquidityDelta calldata deltas,\n    BinTotals storage binTotals,\n    mapping(int256 => BinState) storage binStates,\n    mapping(int256 => uint256) storage binTotalShares,\n    mapping(bytes32 => uint256) storage positionBinShares\n  ) public returns (uint256 amount0Removed, uint256 amount1Removed, bool emptiedCurrentBin) {\n    PoolContext memory ctx = _loadContext();\n    unchecked {\n      uint256 length = deltas.binIdxs.length;\n      if (length == 0) return (0, 0, false);\n\n      uint256 totalToken0ToRemoveScaled = 0;\n      uint256 totalToken1ToRemoveScaled = 0;\n\n      BinBalanceDelta[] memory binBalanceDeltas = new BinBalanceDelta[](length);\n\n      for (uint256 i = 0; i < length; i++) {\n        int256 binIdx = deltas.binIdxs[i];\n        uint256 sharesToRemove = deltas.shares[i];\n\n        if (binIdx < ctx.lowestBin || binIdx > ctx.highestBin) {\n          revert IMetricOmmPoolActions.InvalidBinIndex(binIdx);\n        }\n        if (sharesToRemove == 0) continue;\n\n        {\n          // safe because LOWEST_BIN and HIGHEST_BIN fit int16 (enforced by factory)\n          // forge-lint: disable-next-line(unsafe-typecast)\n          bytes32 posKey = _positionBinKey(owner, salt, int16(binIdx));\n          uint256 binTotalSharesVal = binTotalShares[binIdx];\n          uint256 userShares = positionBinShares[posKey];\n\n          if (userShares < sharesToRemove) {\n            revert IMetricOmmPoolActions.InsufficientLiquidity(sharesToRemove, userShares);\n          }\n          if (sharesToRemove < ctx.minimalOperationalLiquidity) {\n            revert IMetricOmmPoolActions.SharesDeltaSmallerThanMinimalOperationalLiquidity(\n              binIdx, sharesToRemove, ctx.minimalOperationalLiquidity\n            );\n          }\n          uint256 newUserShares = userShares - sharesToRemove;\n          if (newUserShares > 0 && newUserShares < ctx.minimalOperationalLiquidity) {\n            revert IMetricOmmPoolActions.LeftoversSmallerThanMinimalOperationalLiquidity(\n              binIdx, newUserShares, ctx.minimalOperationalLiquidity\n            );\n          }\n\n          BinState storage binState = binStates[binIdx];\n          uint256 amount0Scaled = Math.mulDiv(binState.token0BalanceScaled, sharesToRemove, binTotalSharesVal);\n          uint256 amount1Scaled = Math.mulDiv(binState.token1BalanceScaled, sharesToRemove, binTotalSharesVal);\n\n          // casting to uint104 is safe because amount0Scaled and amount1Scaled are at most token(0|1)BalanceScaled\n          // forge-lint: disable-next-line(unsafe-typecast)\n          binState.token0BalanceScaled -= uint104(amount0Scaled);\n          // forge-lint: disable-next-line(unsafe-typecast)\n          binState.token1BalanceScaled -= uint104(amount1Scaled);\n          uint256 newBinTotalShares = binTotalSharesVal - sharesToRemove;\n          binTotalShares[binIdx] = newBinTotalShares;\n          positionBinShares[posKey] = newUserShares;\n          if (binIdx == ctx.curBinIdx && newBinTotalShares == 0) emptiedCurrentBin = true;\n\n          totalToken0ToRemoveScaled += amount0Scaled;\n          totalToken1ToRemoveScaled += amount1Scaled;\n\n          binBalanceDeltas[i] = BinBalanceDelta({\n            // safe because amount0Scaled is bounded by uint104 bin balances.\n            // forge-lint: disable-next-line(unsafe-typecast)\n            delta0Scaled: -int256(amount0Scaled),\n            // safe because amount1Scaled is bounded by uint104 bin balances.\n            // forge-lint: disable-next-line(unsafe-typecast)\n            delta1Scaled: -int256(amount1Scaled)\n          });\n        }\n      }\n\n      if (totalToken0ToRemoveScaled > 0) {\n        // forge-lint: disable-next-line(unsafe-typecast)\n        binTotals.scaledToken0 = uint128(uint256(binTotals.scaledToken0) - totalToken0ToRemoveScaled);\n      }\n      if (totalToken1ToRemoveScaled > 0) {\n        // forge-lint: disable-next-line(unsafe-typecast)\n        binTotals.scaledToken1 = uint128(uint256(binTotals.scaledToken1) - totalToken1ToRemoveScaled);\n      }\n\n      (amount0Removed, amount1Removed) =\n        _deltasScaledToExternal(totalToken0ToRemoveScaled, totalToken1ToRemoveScaled, ctx, Math.Rounding.Floor);\n\n      if (amount0Removed > 0) {\n        IERC20(ctx.token0).safeTransfer(owner, amount0Removed);\n      }\n      if (amount1Removed > 0) {\n        IERC20(ctx.token1).safeTransfer(owner, amount1Removed);\n      }\n\n      emit IMetricOmmPoolActions.LiquidityRemoved(owner, salt, deltas.binIdxs, binBalanceDeltas, deltas.shares);\n    }\n  }\n\n  // ---- Internal helpers (inlined into the public functions above) ----\n\n  function _loadContext() internal view returns (PoolContext memory ctx) {\n    PoolImmutables memory imm = IMetricOmmPool(address(this)).getImmutables();\n    (, int16 curBinIdx, uint104 curPosInBin,,,,) = PoolStateLibrary._slot0(address(this));\n    ctx = PoolContext({\n      token0: imm.token0,\n      token1: imm.token1,\n      token0ScaleMultiplier: imm.token0ScaleMultiplier,\n      token1ScaleMultiplier: imm.token1ScaleMultiplier,\n      initialScaledToken0PerShareE18: imm.initialScaledToken0PerShareE18,\n      initialScaledToken1PerShareE18: imm.initialScaledToken1PerShareE18,\n      minimalOperationalLiquidity: imm.minimalOperationalLiquidity,\n      lowestBin: imm.lowestBin,\n      highestBin: imm.highestBin,\n      // forge-lint: disable-next-line(unsafe-typecast)\n      curBinIdx: int256(curBinIdx),\n      curPosInBin: curPosInBin\n    });\n  }\n\n  /// @notice Deterministic key for position-bin shares; must match `PoolStateLibrary._toPositionBinKey`.\n  function _positionBinKey(address owner, uint80 salt, int16 bin) internal pure returns (bytes32 key) {\n    // forge-lint: disable-next-line(asm-keccak256)\n    return keccak256(abi.encode(owner, salt, bin));\n  }\n\n  function _deltasScaledToExternal(\n    uint256 scaledDeltaAmount0,\n    uint256 scaledDeltaAmount1,\n    PoolContext memory ctx,\n    Math.Rounding rounding\n  ) internal pure returns (uint256 deltaAmount0, uint256 deltaAmount1) {\n    if (rounding == Math.Rounding.Ceil) {\n      deltaAmount0 = Math.ceilDiv(scaledDeltaAmount0, ctx.token0ScaleMultiplier);\n      deltaAmount1 = Math.ceilDiv(scaledDeltaAmount1, ctx.token1ScaleMultiplier);\n    } else {\n      deltaAmount0 = scaledDeltaAmount0 / ctx.token0ScaleMultiplier;\n      deltaAmount1 = scaledDeltaAmount1 / ctx.token1ScaleMultiplier;\n    }\n  }\n}\n"},"contracts/libraries/Slot0Library.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\nimport {PoolSlot0} from \"../types/Slot0.sol\";\n\n/// @title Slot0Library\n/// @notice Pack and unpack MetricOmmPool storage slot 0.\n/// @dev Bit layout must match `MetricOmmPool` and `PoolStateLibrary`:\n///      pauseLevel(uint8,0) | curBinIdx(int16,8) | curPosInBin(uint104,24) |\n///      curBinDistE6(int24,128) | spreadFeeE6(uint24,152) | notionalFeeE8(uint24,176) |\n///      bidAskRefAsymmetryX8(uint16,200)\n///      Top bit used is 215, so the word still has 40 bits spare.\nlibrary Slot0Library {\n  function pack(\n    uint8 pauseLevel,\n    int16 curBinIdx,\n    uint104 curPosInBin,\n    int24 curBinDistFromProvidedPriceE6,\n    uint24 spreadFeeE6,\n    uint24 notionalFeeE8,\n    uint16 bidAskRefAsymmetryX8\n  ) internal pure returns (uint256 packed) {\n    packed = uint256(pauseLevel);\n    // casting int16 -> int256 is lossless; outer uint256 is masked to 16 bits so no truncation\n    // forge-lint: disable-next-line(unsafe-typecast)\n    packed |= (uint256(uint256(int256(curBinIdx)) & 0xffff) << 8);\n    packed |= uint256(curPosInBin) << 24;\n    // casting int24 -> int256 is lossless; outer uint256 is masked to 24 bits so no truncation\n    // forge-lint: disable-next-line(unsafe-typecast)\n    packed |= (uint256(uint256(int256(curBinDistFromProvidedPriceE6)) & 0xffffff) << 128);\n    packed |= uint256(spreadFeeE6) << 152;\n    packed |= uint256(notionalFeeE8) << 176;\n    packed |= uint256(bidAskRefAsymmetryX8) << 200;\n  }\n\n  function unpack(uint256 packed) internal pure returns (PoolSlot0 memory s) {\n    uint8 pauseLevel;\n    int256 binIdxWide;\n    int256 distWide;\n    assembly (\"memory-safe\") {\n      pauseLevel := and(packed, 0xff)\n      binIdxWide := signextend(1, shr(8, packed))\n      distWide := signextend(2, shr(128, packed))\n    }\n    s.pauseLevel = pauseLevel;\n    // forge-lint: disable-next-line(unsafe-typecast)\n    s.curBinIdx = int16(binIdxWide);\n    // forge-lint: disable-next-line(unsafe-typecast)\n    s.curPosInBin = uint104((packed >> 24) & type(uint104).max);\n    // forge-lint: disable-next-line(unsafe-typecast)\n    s.curBinDistFromProvidedPriceE6 = int24(distWide);\n    // forge-lint: disable-next-line(unsafe-typecast)\n    s.spreadFeeE6 = uint24((packed >> 152) & 0xFFFFFF);\n    // forge-lint: disable-next-line(unsafe-typecast)\n    s.notionalFeeE8 = uint24((packed >> 176) & 0xFFFFFF);\n    // forge-lint: disable-next-line(unsafe-typecast)\n    s.bidAskRefAsymmetryX8 = uint16((packed >> 200) & 0xFFFF);\n  }\n\n  /// @notice Read the pool's packed slot 0 (caller must be `MetricOmmPool` or delegate context).\n  function loadPackedSlot0() internal view returns (uint256 packed) {\n    assembly (\"memory-safe\") {\n      packed := sload(0)\n    }\n  }\n}\n"},"contracts/libraries/CallExtension.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\nlibrary CallExtension {\n  error ExtensionCallFailed();\n  error InvalidExtensionResponse();\n\n  /// @dev `data` must be ABI-encoded calldata; its selector is also the required return selector.\n  function callExtension(address extension, bytes memory data) internal {\n    (bool success, bytes memory result) = extension.call(data);\n    if (!success) {\n      if (result.length > 0) {\n        assembly (\"memory-safe\") {\n          revert(add(result, 32), mload(result))\n        }\n      }\n      revert ExtensionCallFailed();\n    }\n    if (result.length < 32) {\n      revert InvalidExtensionResponse();\n    }\n    bytes4 returnedSelector;\n    assembly (\"memory-safe\") {\n      returnedSelector := mload(add(result, 32))\n    }\n    bytes4 expectedSelector;\n    assembly (\"memory-safe\") {\n      expectedSelector := mload(add(data, 32))\n    }\n    if (returnedSelector != expectedSelector) {\n      revert InvalidExtensionResponse();\n    }\n  }\n}\n"},"contracts/libraries/PoolStateLibrary.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\nimport {SafeCast} from \"@openzeppelin/contracts/utils/math/SafeCast.sol\";\nimport {IExtsload} from \"../interfaces/IExtsload.sol\";\nimport {PoolSlot0} from \"../types/Slot0.sol\";\nimport {Slot0Library} from \"./Slot0Library.sol\";\n\n/// @title PoolStateLibrary\n/// @notice Read MetricOmmPool mutable storage via EXTSLOAD; immutables use the pool's `getImmutables()`.\n/// @dev Contract coupling: this library is tightly coupled to `contracts/MetricOmmPool.sol` storage\n///      layout and packing. Any storage reorder or repack in the pool is a breaking change for\n///      EXTSLOAD readers (including off-chain integrations using these slot calculations).\n/// @dev Constants and packing must match MetricOmmPool storage layout exactly.\n///\n/// Storage Layout:\n/// Slot 0: pauseLevel(uint8,0) | curBinIdx(int16,8) | curPosInBin(uint104,24) | curBinDistE6(int24,128) |\n///         spreadFeeE6(uint24,152) | notionalFeeE8(uint24,176) | bidAskRefAsymmetryX8(uint16,200)\n/// Slot 1: binTotals.scaledToken0(uint128,0) | binTotals.scaledToken1(uint128,128)\n/// Slot 2: notionalFeeToken0Scaled(uint128,0) | notionalFeeToken1Scaled(uint128,128)\n/// Slot 3: priceProvider(address) (mutable mode; immutable oracle is an immutable on the pool)\n/// Slot 4: _binStates mapping(int256 => BinState)\n/// Slot 5: _binTotalShares mapping(int256 => uint256)\n/// Slot 6: _positionBinShares mapping(bytes32 => uint256)\n/// Slot 7: pendingAdminFeeToken0Scaled(uint256)\n/// Slot 8: pendingAdminFeeToken1Scaled(uint256)\n/// Slot 9: pendingProtocolFeeToken0Scaled(uint256)\n/// Slot 10: pendingProtocolFeeToken1Scaled(uint256)\n/// @dev Bin indices are treated as `int16` throughout pool configuration; the factory caps the grid at\n///      32,768 bins per side so keys computed here match the `int256` mapping keys on the pool.\n/// @dev This library intentionally exposes underscored helpers to keep call sites explicit.\nlibrary PoolStateLibrary {\n  using SafeCast for uint256;\n  using SafeCast for int256;\n\n  uint256 internal constant SLOT0 = 0;\n  uint256 internal constant SLOT1_TOTALS = 1;\n  uint256 internal constant SLOT2_NOTIONAL_ACCUMULATORS = 2;\n  uint256 internal constant SLOT3_PRICE_PROVIDER = 3;\n  uint256 internal constant MAPPING_BIN_STATES = 4;\n  uint256 internal constant MAPPING_BIN_TOTAL_SHARES = 5;\n  uint256 internal constant MAPPING_POSITION_BIN_SHARES = 6;\n  uint256 internal constant SLOT7_PENDING_FEES = 7;\n\n  // ========= Slot0 =========\n\n  function _decodeSlot0(bytes32 data)\n    internal\n    pure\n    returns (\n      uint8 pauseLevel,\n      int16 curBinIdx,\n      uint104 curPosInBin,\n      int24 curBinDistFromProvidedPriceE6,\n      uint24 spreadFeeE6,\n      uint24 notionalFeeE8,\n      uint16 bidAskRefAsymmetryX8\n    )\n  {\n    PoolSlot0 memory s = Slot0Library.unpack(uint256(data));\n    pauseLevel = s.pauseLevel;\n    curBinIdx = s.curBinIdx;\n    curPosInBin = s.curPosInBin;\n    curBinDistFromProvidedPriceE6 = s.curBinDistFromProvidedPriceE6;\n    spreadFeeE6 = s.spreadFeeE6;\n    notionalFeeE8 = s.notionalFeeE8;\n    bidAskRefAsymmetryX8 = s.bidAskRefAsymmetryX8;\n  }\n\n  /// @notice Get all slot0 values in a single call\n  function _slot0(address pool)\n    internal\n    view\n    returns (\n      uint8 _pauseLevel,\n      int16 _curBinIdx,\n      uint104 _curPosInBin,\n      int24 _curBinDistFromProvidedPriceE6,\n      uint24 _spreadFeeE6,\n      uint24 _notionalFeeE8,\n      uint16 _bidAskRefAsymmetryX8\n    )\n  {\n    bytes32 slot0 = IExtsload(pool).extsload(bytes32(uint256(SLOT0)));\n    return _decodeSlot0(slot0);\n  }\n\n  // ========= Slot1 =========\n  function _decodeSlot1(bytes32 data)\n    internal\n    pure\n    returns (uint128 totalScaledToken0InBins, uint128 totalScaledToken1InBins)\n  {\n    uint256 packed = uint256(data);\n    // forge-lint: disable-next-line(unsafe-typecast)\n    totalScaledToken0InBins = uint128(packed & type(uint128).max);\n    // forge-lint: disable-next-line(unsafe-typecast)\n    totalScaledToken1InBins = uint128(packed >> 128);\n  }\n\n  /// @notice Get all slot1 values in a single call\n  function _slot1(address pool)\n    internal\n    view\n    returns (uint128 _totalScaledToken0InBins, uint128 _totalScaledToken1InBins)\n  {\n    bytes32 data = IExtsload(pool).extsload(bytes32(uint256(SLOT1_TOTALS)));\n    return _decodeSlot1(data);\n  }\n\n  // ========= Slot2 =========\n  function _decodeSlot2(bytes32 data)\n    internal\n    pure\n    returns (uint128 notionalFeeToken0Scaled, uint128 notionalFeeToken1Scaled)\n  {\n    uint256 packed = uint256(data);\n    // forge-lint: disable-next-line(unsafe-typecast)\n    notionalFeeToken0Scaled = uint128(packed & type(uint128).max);\n    // forge-lint: disable-next-line(unsafe-typecast)\n    notionalFeeToken1Scaled = uint128(packed >> 128);\n  }\n\n  /// @notice Get all slot2 values in a single call\n  function _slot2(address pool)\n    internal\n    view\n    returns (uint128 _notionalFeeToken0Scaled, uint128 _notionalFeeToken1Scaled)\n  {\n    bytes32 data = IExtsload(pool).extsload(bytes32(uint256(SLOT2_NOTIONAL_ACCUMULATORS)));\n    return _decodeSlot2(data);\n  }\n\n  // ========= Slot3 =========\n  function _decodeSlot3(bytes32 data) internal pure returns (address priceProvider) {\n    // forge-lint: disable-next-line(unsafe-typecast)\n    priceProvider = address(uint160(uint256(data)));\n  }\n\n  /// @notice Get the price provider from slot3 (`address(0)` for pools with an immutable provider)\n  function _slot3(address pool) internal view returns (address _priceProvider) {\n    bytes32 data = IExtsload(pool).extsload(bytes32(uint256(SLOT3_PRICE_PROVIDER)));\n    return _decodeSlot3(data);\n  }\n\n  // ========= Slot4: Bins States =========\n\n  /// @notice Calculate the storage slot for a bin state\n  /// @dev For mapping(int256 => BinState), slot = keccak256(abi.encode(key, baseSlot)); `int16` keys match int256 encoding for values in int16 range.\n  function _calculateBinStateSlot(int16 binIdx) internal pure returns (bytes32 slot) {\n    uint256 baseSlot = MAPPING_BIN_STATES;\n    assembly {\n      mstore(0x00, binIdx)\n      mstore(0x20, baseSlot)\n      slot := keccak256(0x00, 0x40)\n    }\n  }\n\n  function _decodeBinState(bytes32 data)\n    internal\n    pure\n    returns (uint104 token0Balance, uint104 token1Balance, uint16 lengthE6, uint16 addFeeBuyE6, uint16 addFeeSellE6)\n  {\n    uint256 packed = uint256(data);\n    // forge-lint: disable-next-line(unsafe-typecast)\n    token0Balance = uint104(packed & type(uint104).max);\n    // forge-lint: disable-next-line(unsafe-typecast)\n    token1Balance = uint104((packed >> 104) & type(uint104).max);\n    // forge-lint: disable-next-line(unsafe-typecast)\n    lengthE6 = uint16((packed >> 208) & 0xFFFF);\n    // forge-lint: disable-next-line(unsafe-typecast)\n    addFeeBuyE6 = uint16((packed >> 224) & 0xFFFF);\n    // forge-lint: disable-next-line(unsafe-typecast)\n    addFeeSellE6 = uint16((packed >> 240) & 0xFFFF);\n  }\n\n  /// @notice Get bin state (scaled balances and configuration)\n  /// @dev BinState: token0BalanceScaled(uint104,0) | token1BalanceScaled(uint104,104) | lengthE6(uint16,208) | addFeeBuyE6(uint16,224) | addFeeSellE6(uint16,240)\n  function _binState(address pool, int16 binIdx)\n    internal\n    view\n    returns (\n      uint104 _token0Balance,\n      uint104 _token1Balance,\n      uint16 _lengthE6,\n      uint16 _addFeeBuyE6,\n      uint16 _addFeeSellE6\n    )\n  {\n    bytes32 slot = _calculateBinStateSlot(binIdx);\n    bytes32 data = IExtsload(pool).extsload(slot);\n    return _decodeBinState(data);\n  }\n\n  /// @notice Get bin states for multiple bins in batch\n  /// @dev Decode each returned item with `_decodeBinState`.\n  function _multipleBinStates(address pool, int16[] memory binIdxs)\n    internal\n    view\n    returns (bytes32[] memory binStatesAsBytes32)\n  {\n    uint256 length = binIdxs.length;\n\n    bytes32[] memory slots = new bytes32[](length);\n    for (uint256 i = 0; i < length; i++) {\n      slots[i] = _calculateBinStateSlot(binIdxs[i]);\n    }\n    binStatesAsBytes32 = IExtsload(pool).extsload(slots);\n  }\n\n  // ========= Slot5: Bin Total Shares =========\n\n  /// @notice Calculate the storage slot for bin total shares\n  function _calculateBinTotalSharesSlot(int16 binIdx) private pure returns (bytes32 slot) {\n    uint256 baseSlot = MAPPING_BIN_TOTAL_SHARES;\n    assembly {\n      mstore(0x00, binIdx)\n      mstore(0x20, baseSlot)\n      slot := keccak256(0x00, 0x40)\n    }\n  }\n\n  function _decodeBinTotalShares(bytes32 data) internal pure returns (uint256 totalShares) {\n    totalShares = uint256(data);\n  }\n\n  /// @notice Get bin total shares\n  function _binTotalShares(address pool, int16 binIdx) internal view returns (uint256) {\n    bytes32 slot = _calculateBinTotalSharesSlot(binIdx);\n    bytes32 data = IExtsload(pool).extsload(slot);\n    return _decodeBinTotalShares(data);\n  }\n\n  /// @notice Get bin total shares for multiple bins in batch\n  /// @dev Decode each returned item with `_decodeBinTotalShares`.\n  function _multipleBinTotalShares(address pool, int16[] memory binIdxs)\n    internal\n    view\n    returns (bytes32[] memory totalSharesAsBytes32)\n  {\n    uint256 length = binIdxs.length;\n\n    bytes32[] memory slots = new bytes32[](length);\n    for (uint256 i = 0; i < length; i++) {\n      slots[i] = _calculateBinTotalSharesSlot(binIdxs[i]);\n    }\n\n    totalSharesAsBytes32 = IExtsload(pool).extsload(slots);\n  }\n\n  // ========= Slot6: Position Bin Shares =========\n\n  // ========= Position Readers =========\n\n  /// @notice Calculate the storage slot for position bin shares\n  /// @dev `positionBinKey` equals `keccak256(abi.encode(owner, salt, bin))` (see `_toPositionBinKey`).\n  function _calculatePositionBinSharesSlot(bytes32 positionBinKey) private pure returns (bytes32 slot) {\n    uint256 baseSlot = MAPPING_POSITION_BIN_SHARES;\n    assembly {\n      mstore(0x00, positionBinKey)\n      mstore(0x20, baseSlot)\n      slot := keccak256(0x00, 0x40)\n    }\n  }\n\n  function _decodePositionBinShares(bytes32 data) internal pure returns (uint256 shares) {\n    return uint256(data);\n  }\n\n  /// @notice Create a position bin key (same as `LiquidityLib._positionBinKey`)\n  function _toPositionBinKey(address owner, uint80 salt, int16 bin) internal pure returns (bytes32 key) {\n    // abi.encode layout is intentionally matched with `LiquidityLib._positionBinKey` for storage compatibility.\n    // forge-lint: disable-next-line(asm-keccak256)\n    return keccak256(abi.encode(owner, salt, bin));\n  }\n\n  /// @notice Get position bin shares\n  function _positionBinShares(address pool, address owner, uint80 salt, int16 bin) internal view returns (uint256) {\n    bytes32 positionBinKey = _toPositionBinKey(owner, salt, bin);\n    bytes32 slot = _calculatePositionBinSharesSlot(positionBinKey);\n    bytes32 data = IExtsload(pool).extsload(slot);\n    return _decodePositionBinShares(data);\n  }\n\n  /// @notice Get position bin shares by key\n  /// @dev Build keys with `_toPositionBinKey`.\n  function _positionBinShares(address pool, bytes32 positionBinKey) internal view returns (uint256) {\n    bytes32 slot = _calculatePositionBinSharesSlot(positionBinKey);\n    bytes32 data = IExtsload(pool).extsload(slot);\n    return _decodePositionBinShares(data);\n  }\n\n  /// @notice Get position bin shares for multiple bins in a single call\n  /// @dev Decode each returned item with `_decodePositionBinShares`.\n  function _multiplePositionBinShares(address pool, address owner, uint80 salt, int16[] memory binIdxs)\n    internal\n    view\n    returns (bytes32[] memory sharesAsBytes32)\n  {\n    uint256 length = binIdxs.length;\n    bytes32[] memory slots = new bytes32[](length);\n    for (uint256 i = 0; i < length; i++) {\n      slots[i] = _calculatePositionBinSharesSlot(_toPositionBinKey(owner, salt, binIdxs[i]));\n    }\n    sharesAsBytes32 = IExtsload(pool).extsload(slots);\n  }\n\n  /// @notice Get all pending fee balances in scaled units with a single call.\n  function _pendingFeesScaled(address pool)\n    internal\n    view\n    returns (\n      uint256 pendingAdminFeeToken0Scaled,\n      uint256 pendingAdminFeeToken1Scaled,\n      uint256 pendingProtocolFeeToken0Scaled,\n      uint256 pendingProtocolFeeToken1Scaled\n    )\n  {\n    bytes32[] memory data = IExtsload(pool).extsload(bytes32(SLOT7_PENDING_FEES), 4);\n    return (uint256(data[0]), uint256(data[1]), uint256(data[2]), uint256(data[3]));\n  }\n}\n"},"contracts/types/PoolExtensionsConfig.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\n/// @notice Each field encodes the invocation order for an extension action.\n/// @dev Pool contains up to 7 extensions that are numbered from 1 to 7 (1-based positions in the factory's `extensions` array).\n///      To encode invocation order we pack array of 3-bit (values 0-7) into a single uint256.\n///      Least significant slot is first element of the array.\n///      0 terminates the sequence; the factory rejects zero groups below a non-zero group and duplicate indices.\n///      The sequence defines which extensions will be called for a given action.\nstruct ExtensionOrders {\n  uint256 beforeAddLiquidity;\n  uint256 afterAddLiquidity;\n  uint256 beforeRemoveLiquidity;\n  uint256 afterRemoveLiquidity;\n  uint256 beforeSwap;\n  uint256 afterSwap;\n}\n\n/// @notice Contains addresses of all extensions that are configured for the pool.\nstruct PoolExtensions {\n  address extension1;\n  address extension2;\n  address extension3;\n  address extension4;\n  address extension5;\n  address extension6;\n  address extension7;\n}\n"},"contracts/utils/MetricReentrancyGuardTransient.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\nimport {TransientSlot} from \"@openzeppelin/contracts/utils/TransientSlot.sol\";\n\n/// @title MetricReentrancyGuardTransient\n/// @notice Transient reentrancy guard recording the running action id (function-name hash), forked from OpenZeppelin ReentrancyGuardTransient.\n/// @dev Stores a non-zero uint256 while an action runs; any second guarded entry reverts.\nabstract contract MetricReentrancyGuardTransient {\n  bytes32 private constant REENTRANCY_GUARD_STORAGE =\n    keccak256(abi.encode(uint256(keccak256(\"metric.storage.ReentrancyGuard\")) - 1)) & ~bytes32(uint256(0xff));\n\n  /// @dev Unauthorized reentrant call or overlapping guarded action.\n  error ReentrancyGuardReentrantCall();\n\n  /// @dev `actionId` must be non-zero (see PoolActions); `getSellAndBuyPrices` shares the SWAP id.\n  modifier nonReentrant(uint256 actionId) {\n    _nonReentrantBefore(actionId);\n    _;\n    _nonReentrantAfter();\n  }\n\n  /// @dev Blocks view functions while any guarded action is active. Currently unused by the pool, so its views\n  ///      (e.g. `extsload`, `inSwap`) remain callable mid-action.\n  modifier nonReentrantView() {\n    _nonReentrantBeforeView();\n    _;\n  }\n\n  function _nonReentrantBeforeView() private view {\n    if (_currentAction() != 0) {\n      revert ReentrancyGuardReentrantCall();\n    }\n  }\n\n  function _nonReentrantBefore(uint256 actionId) private {\n    _nonReentrantBeforeView();\n    TransientSlot.tstore(TransientSlot.asUint256(_reentrancyGuardStorageSlot()), actionId);\n  }\n\n  function _nonReentrantAfter() internal {\n    TransientSlot.tstore(TransientSlot.asUint256(_reentrancyGuardStorageSlot()), 0);\n  }\n\n  /// @dev Returns the active action id, or 0 if no guarded function is on the call stack.\n  function _currentAction() internal view returns (uint256) {\n    return TransientSlot.tload(TransientSlot.asUint256(_reentrancyGuardStorageSlot()));\n  }\n\n  function _reentrancyGuardStorageSlot() internal pure virtual returns (bytes32) {\n    return REENTRANCY_GUARD_STORAGE;\n  }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/Panic.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Helper library for emitting standardized panic codes.\n *\n * ```solidity\n * contract Example {\n *      using Panic for uint256;\n *\n *      // Use any of the declared internal constants\n *      function foo() { Panic.GENERIC.panic(); }\n *\n *      // Alternatively\n *      function foo() { Panic.panic(Panic.GENERIC); }\n * }\n * ```\n *\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\n *\n * _Available since v5.1._\n */\n// slither-disable-next-line unused-state\nlibrary Panic {\n    /// @dev generic / unspecified error\n    uint256 internal constant GENERIC = 0x00;\n    /// @dev used by the assert() builtin\n    uint256 internal constant ASSERT = 0x01;\n    /// @dev arithmetic underflow or overflow\n    uint256 internal constant UNDER_OVERFLOW = 0x11;\n    /// @dev division or modulo by zero\n    uint256 internal constant DIVISION_BY_ZERO = 0x12;\n    /// @dev enum conversion error\n    uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\n    /// @dev invalid encoding in storage\n    uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\n    /// @dev empty array pop\n    uint256 internal constant EMPTY_ARRAY_POP = 0x31;\n    /// @dev array out of bounds access\n    uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\n    /// @dev resource error (too large allocation or too large array)\n    uint256 internal constant RESOURCE_ERROR = 0x41;\n    /// @dev calling invalid internal function\n    uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\n\n    /// @dev Reverts with a panic code. Recommended to use with\n    /// the internal constants with predefined codes.\n    function panic(uint256 code) internal pure {\n        assembly (\"memory-safe\") {\n            mstore(0x00, 0x4e487b71)\n            mstore(0x20, code)\n            revert(0x1c, 0x24)\n        }\n    }\n}\n"},"contracts/interfaces/IMetricOmmPool/IMetricOmmPool.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\nimport {IMetricOmmPoolActions} from \"./IMetricOmmPoolActions.sol\";\nimport {IMetricOmmPoolCollectFees} from \"./IMetricOmmPoolCollectFees.sol\";\nimport {IMetricOmmPoolFactoryActions} from \"./IMetricOmmPoolFactoryActions.sol\";\n\n/// @notice All constructor-set immutables of a `MetricOmmPool`, returned by `getImmutables()`.\n/// @dev Scale multipliers convert native token amounts to internal precision; initial scaled per-share\n///      amounts are the `createPool` inputs `initialScaledAmount{0,1}PerE18Shares`, stored unchanged.\nstruct PoolImmutables {\n  address factory;\n  address token0;\n  address token1;\n  /// @notice `10^(max(18, token0Decimals, token1Decimals) - token0Decimals)`.\n  uint256 token0ScaleMultiplier;\n  /// @notice `10^(max(18, token0Decimals, token1Decimals) - token1Decimals)`.\n  uint256 token1ScaleMultiplier;\n  /// @notice Scaled token0 per `1e18` shares minted into an empty bin (pro-rated by position in the current bin).\n  uint256 initialScaledToken0PerShareE18;\n  /// @notice Scaled token1 per `1e18` shares minted into an empty bin (pro-rated by position in the current bin).\n  uint256 initialScaledToken1PerShareE18;\n  /// @notice Minimum non-zero share delta per bin, and minimum non-zero leftover after removal.\n  uint256 minimalOperationalLiquidity;\n  /// @notice Fixed provider, or zero in mutable mode (read the provider from storage slot 3).\n  address immutablePriceProvider;\n  int256 lowestBin;\n  int256 highestBin;\n  address extension1;\n  address extension2;\n  address extension3;\n  address extension4;\n  address extension5;\n  address extension6;\n  address extension7;\n  uint256 beforeAddLiquidityOrder;\n  uint256 afterAddLiquidityOrder;\n  uint256 beforeRemoveLiquidityOrder;\n  uint256 afterRemoveLiquidityOrder;\n  uint256 beforeSwapOrder;\n  uint256 afterSwapOrder;\n}\n\n/// @title IMetricOmmPool\n/// @notice Full external API of `MetricOmmPool` for typing integrators and the factory.\n/// @dev Composition: user liquidity and swap (`IMetricOmmPoolActions`), factory fee sweep (`IMetricOmmPoolCollectFees`), factory-only pool controls (`IMetricOmmPoolFactoryActions`). User-facing custom errors are on `IMetricOmmPoolActions` (`InvalidBinIndex` is also raised by factory-only `setBinAdditionalFees`); factory-only errors are on `IMetricOmmPoolFactoryActions`. The reentrancy error `ReentrancyGuardReentrantCall` is declared on `MetricReentrancyGuardTransient`.\ninterface IMetricOmmPool is IMetricOmmPoolActions, IMetricOmmPoolCollectFees, IMetricOmmPoolFactoryActions {\n  /// @notice Return every constructor-set immutable in a single call.\n  /// @dev Immutables live in contract bytecode, not storage, so they cannot be read via EXTSLOAD.\n  function getImmutables() external view returns (PoolImmutables memory);\n\n  /// @notice Whether a live swap or `getSellAndBuyPrices` is executing and which price provider supplies its quotes.\n  /// @return priceProvider Active price provider during either; address(0) otherwise, including during simulation.\n  function inSwap() external view returns (address priceProvider);\n\n  /// @notice Live sell/buy prices (Q64.64) for token0 at the pool's current marginal bin position.\n  /// @dev Informational only — not a guaranteed executable quote. Sell = token0 → token1; buy = token1 → token0.\n  ///      Includes oracle spread, per-bin additional fees, and notional fees (zero-size exact-in marginal prices)\n  ///      via the active price provider (same path as `swap`). For real pricing/execution decisions, call `swap`\n  ///      and decide in the swap callback, or use the periphery quoter. The quote may update provider state.\n  ///      Shares the swap reentrancy guard; callable while paused, but not during another guarded action.\n  /// @return sellPriceX64 Fee-adjusted sell price (token1 per token0, Q64.64).\n  /// @return buyPriceX64 Fee-adjusted buy price (token1 per token0, Q64.64).\n  function getSellAndBuyPrices() external returns (uint128 sellPriceX64, uint128 buyPriceX64);\n}\n"},"contracts/interfaces/IPriceProvider/IPriceProvider.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\n/// @title IPriceProvider\n/// @notice Oracle surface used by pools for bid/ask and token pair metadata.\n/// @dev Prices are Q64.64 whole-token ratios (token1 per token0), independent of ERC20 decimals.\ninterface IPriceProvider {\n  /// @notice Base token quoted by this provider; for Metric pools this must equal pool `token0`.\n  function token0() external view returns (address baseToken);\n\n  /// @notice Quote token quoted by this provider; for Metric pools this must equal pool `token1`.\n  function token1() external view returns (address quoteToken);\n\n  /// @notice Bid, ask, and reference in Q64.64 fixed-point.\n  /// @dev Protocol expectation: `referencePrice` equals sqrt(bidPrice * askPrice) and is a faithful\n  ///      geometric mid. The pool enforces `0 < bidPrice < askPrice`, an inclusive reference bound,\n  ///      and its configured `bidAskRefAsymmetryX8` tolerance, not exact equality to the geometric mean.\n  ///      `referencePrice` is used for fee calculation and as the mid/price-path anchor; bid and ask bound it.\n  ///      Providers that manipulate `referencePrice` to pay less fees may be blacklisted/deprioritized.\n  function getQuote() external returns (uint128 bidPrice, uint128 askPrice, uint128 referencePrice);\n}\n"},"contracts/interfaces/extensions/IMetricOmmExtensions.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\nimport {LiquidityDelta} from \"../../types/PoolOperation.sol\";\n\n/// @title IMetricOmmExtensions\n/// @notice Optional per-pool extension invoked by `MetricOmmPool` at liquidity and swap extension points.\n/// @dev Each function below (except for `initialize`) is an extension point function: the pool calls it at the matching extension\n///      point (before/after add, remove, swap). Return the ABI-encoded function selector on success.\n///      `sender` is the pool caller. In `simulateSwapAndRevert`, `sender` and the bid/ask/reference prices are\n///      caller-supplied (not read from the price provider) and all effects revert.\ninterface IMetricOmmExtensions {\n  /// @notice One-time extension setup invoked by the factory immediately after pool deployment.\n  /// @dev Runs before factory registration and per-pool metadata are stored; authenticate the factory caller.\n  function initialize(address pool, bytes calldata data) external returns (bytes4);\n\n  function beforeAddLiquidity(\n    address sender,\n    address owner,\n    uint80 salt,\n    LiquidityDelta calldata deltas,\n    bytes calldata extensionData\n  ) external returns (bytes4);\n\n  function afterAddLiquidity(\n    address sender,\n    address owner,\n    uint80 salt,\n    LiquidityDelta calldata deltas,\n    uint256 amount0Added,\n    uint256 amount1Added,\n    bytes calldata extensionData\n  ) external returns (bytes4);\n\n  function beforeRemoveLiquidity(\n    address sender,\n    address owner,\n    uint80 salt,\n    LiquidityDelta calldata deltas,\n    bytes calldata extensionData\n  ) external returns (bytes4);\n\n  function afterRemoveLiquidity(\n    address sender,\n    address owner,\n    uint80 salt,\n    LiquidityDelta calldata deltas,\n    uint256 amount0Removed,\n    uint256 amount1Removed,\n    bytes calldata extensionData\n  ) external returns (bytes4);\n\n  function beforeSwap(\n    address sender,\n    address recipient,\n    bool zeroForOne,\n    int128 amountSpecified,\n    uint128 priceLimitX64,\n    uint256 packedSlot0Initial,\n    uint128 bidPriceX64,\n    uint128 askPriceX64,\n    uint128 referencePriceX64,\n    bytes calldata extensionData\n  ) external returns (bytes4);\n\n  function afterSwap(\n    address sender,\n    address recipient,\n    bool zeroForOne,\n    int128 amountSpecified,\n    uint128 priceLimitX64,\n    uint256 packedSlot0Initial,\n    uint256 packedSlot0Final,\n    uint128 bidPriceX64,\n    uint128 askPriceX64,\n    uint128 referencePriceX64,\n    int128 amount0Delta,\n    int128 amount1Delta,\n    uint256 platformFeeAmount,\n    bytes calldata extensionData\n  ) external returns (bytes4);\n}\n"},"lib/openzeppelin-contracts/contracts/utils/math/Math.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.5.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\nimport {Panic} from \"../Panic.sol\";\nimport {SafeCast} from \"./SafeCast.sol\";\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n    enum Rounding {\n        Floor, // Toward negative infinity\n        Ceil, // Toward positive infinity\n        Trunc, // Toward zero\n        Expand // Away from zero\n    }\n\n    /**\n     * @dev Return the 512-bit addition of two uint256.\n     *\n     * The result is stored in two 256 variables such that sum = high * 2²⁵⁶ + low.\n     */\n    function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\n        assembly (\"memory-safe\") {\n            low := add(a, b)\n            high := lt(low, a)\n        }\n    }\n\n    /**\n     * @dev Return the 512-bit multiplication of two uint256.\n     *\n     * The result is stored in two 256 variables such that product = high * 2²⁵⁶ + low.\n     */\n    function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\n        // 512-bit multiply [high low] = x * y. Compute the product mod 2²⁵⁶ and mod 2²⁵⁶ - 1, then use\n        // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n        // variables such that product = high * 2²⁵⁶ + low.\n        assembly (\"memory-safe\") {\n            let mm := mulmod(a, b, not(0))\n            low := mul(a, b)\n            high := sub(sub(mm, low), lt(mm, low))\n        }\n    }\n\n    /**\n     * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\n     */\n    function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            uint256 c = a + b;\n            success = c >= a;\n            result = c * SafeCast.toUint(success);\n        }\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\n     */\n    function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            uint256 c = a - b;\n            success = c <= a;\n            result = c * SafeCast.toUint(success);\n        }\n    }\n\n    /**\n     * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\n     */\n    function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            uint256 c = a * b;\n            assembly (\"memory-safe\") {\n                // Only true when the multiplication doesn't overflow\n                // (c / a == b) || (a == 0)\n                success := or(eq(div(c, a), b), iszero(a))\n            }\n            // equivalent to: success ? c : 0\n            result = c * SafeCast.toUint(success);\n        }\n    }\n\n    /**\n     * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\n     */\n    function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            success = b > 0;\n            assembly (\"memory-safe\") {\n                // The `DIV` opcode returns zero when the denominator is 0.\n                result := div(a, b)\n            }\n        }\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\n     */\n    function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            success = b > 0;\n            assembly (\"memory-safe\") {\n                // The `MOD` opcode returns zero when the denominator is 0.\n                result := mod(a, b)\n            }\n        }\n    }\n\n    /**\n     * @dev Unsigned saturating addition, bounds to `2²⁵⁶ - 1` instead of overflowing.\n     */\n    function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\n        (bool success, uint256 result) = tryAdd(a, b);\n        return ternary(success, result, type(uint256).max);\n    }\n\n    /**\n     * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\n     */\n    function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\n        (, uint256 result) = trySub(a, b);\n        return result;\n    }\n\n    /**\n     * @dev Unsigned saturating multiplication, bounds to `2²⁵⁶ - 1` instead of overflowing.\n     */\n    function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\n        (bool success, uint256 result) = tryMul(a, b);\n        return ternary(success, result, type(uint256).max);\n    }\n\n    /**\n     * @dev Branchless ternary evaluation for `condition ? a : b`. Gas costs are constant.\n     *\n     * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n     * However, the compiler may optimize Solidity ternary operations (i.e. `condition ? a : b`) to only compute\n     * one branch when needed, making this function more expensive.\n     */\n    function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\n        unchecked {\n            // branchless ternary works because:\n            // b ^ (a ^ b) == a\n            // b ^ 0 == b\n            return b ^ ((a ^ b) * SafeCast.toUint(condition));\n        }\n    }\n\n    /**\n     * @dev Returns the largest of two numbers.\n     */\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\n        return ternary(a > b, a, b);\n    }\n\n    /**\n     * @dev Returns the smallest of two numbers.\n     */\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\n        return ternary(a < b, a, b);\n    }\n\n    /**\n     * @dev Returns the average of two numbers. The result is rounded towards\n     * zero.\n     */\n    function average(uint256 a, uint256 b) internal pure returns (uint256) {\n        unchecked {\n            // (a + b) / 2 can overflow.\n            return (a & b) + (a ^ b) / 2;\n        }\n    }\n\n    /**\n     * @dev Returns the ceiling of the division of two numbers.\n     *\n     * This differs from standard division with `/` in that it rounds towards infinity instead\n     * of rounding towards zero.\n     */\n    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n        if (b == 0) {\n            // Guarantee the same behavior as in a regular Solidity division.\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n\n        // The following calculation ensures accurate ceiling division without overflow.\n        // Since a is non-zero, (a - 1) / b will not overflow.\n        // The largest possible result occurs when (a - 1) / b is type(uint256).max,\n        // but the largest value we can obtain is type(uint256).max - 1, which happens\n        // when a = type(uint256).max and b = 1.\n        unchecked {\n            return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\n        }\n    }\n\n    /**\n     * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\n     * denominator == 0.\n     *\n     * Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n     * Uniswap Labs also under MIT license.\n     */\n    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n        unchecked {\n            (uint256 high, uint256 low) = mul512(x, y);\n\n            // Handle non-overflow cases, 256 by 256 division.\n            if (high == 0) {\n                // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n                // The surrounding unchecked block does not change this fact.\n                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n                return low / denominator;\n            }\n\n            // Make sure the result is less than 2²⁵⁶. Also prevents denominator == 0.\n            if (denominator <= high) {\n                Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\n            }\n\n            ///////////////////////////////////////////////\n            // 512 by 256 division.\n            ///////////////////////////////////////////////\n\n            // Make division exact by subtracting the remainder from [high low].\n            uint256 remainder;\n            assembly (\"memory-safe\") {\n                // Compute remainder using mulmod.\n                remainder := mulmod(x, y, denominator)\n\n                // Subtract 256 bit number from 512 bit number.\n                high := sub(high, gt(remainder, low))\n                low := sub(low, remainder)\n            }\n\n            // Factor powers of two out of denominator and compute largest power of two divisor of denominator.\n            // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n            uint256 twos = denominator & (0 - denominator);\n            assembly (\"memory-safe\") {\n                // Divide denominator by twos.\n                denominator := div(denominator, twos)\n\n                // Divide [high low] by twos.\n                low := div(low, twos)\n\n                // Flip twos such that it is 2²⁵⁶ / twos. If twos is zero, then it becomes one.\n                twos := add(div(sub(0, twos), twos), 1)\n            }\n\n            // Shift in bits from high into low.\n            low |= high * twos;\n\n            // Invert denominator mod 2²⁵⁶. Now that denominator is an odd number, it has an inverse modulo 2²⁵⁶ such\n            // that denominator * inv ≡ 1 mod 2²⁵⁶. Compute the inverse by starting with a seed that is correct for\n            // four bits. That is, denominator * inv ≡ 1 mod 2⁴.\n            uint256 inverse = (3 * denominator) ^ 2;\n\n            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also\n            // works in modular arithmetic, doubling the correct bits in each step.\n            inverse *= 2 - denominator * inverse; // inverse mod 2⁸\n            inverse *= 2 - denominator * inverse; // inverse mod 2¹⁶\n            inverse *= 2 - denominator * inverse; // inverse mod 2³²\n            inverse *= 2 - denominator * inverse; // inverse mod 2⁶⁴\n            inverse *= 2 - denominator * inverse; // inverse mod 2¹²⁸\n            inverse *= 2 - denominator * inverse; // inverse mod 2²⁵⁶\n\n            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n            // This will give us the correct result modulo 2²⁵⁶. Since the preconditions guarantee that the outcome is\n            // less than 2²⁵⁶, this is the final result. We don't need to compute the high bits of the result and high\n            // is no longer required.\n            result = low * inverse;\n            return result;\n        }\n    }\n\n    /**\n     * @dev Calculates x * y / denominator with full precision, following the selected rounding direction.\n     */\n    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n        return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\n    }\n\n    /**\n     * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\n     */\n    function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\n        unchecked {\n            (uint256 high, uint256 low) = mul512(x, y);\n            if (high >= 1 << n) {\n                Panic.panic(Panic.UNDER_OVERFLOW);\n            }\n            return (high << (256 - n)) | (low >> n);\n        }\n    }\n\n    /**\n     * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\n     */\n    function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\n        return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\n    }\n\n    /**\n     * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\n     *\n     * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\n     * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\n     *\n     * If the input value is not inversible, 0 is returned.\n     *\n     * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\n     * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\n     */\n    function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\n        unchecked {\n            if (n == 0) return 0;\n\n            // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\n            // Used to compute integers x and y such that: ax + ny = gcd(a, n).\n            // When the gcd is 1, then the inverse of a modulo n exists and it's x.\n            // ax + ny = 1\n            // ax = 1 + (-y)n\n            // ax ≡ 1 (mod n) # x is the inverse of a modulo n\n\n            // If the remainder is 0 the gcd is n right away.\n            uint256 remainder = a % n;\n            uint256 gcd = n;\n\n            // Therefore the initial coefficients are:\n            // ax + ny = gcd(a, n) = n\n            // 0a + 1n = n\n            int256 x = 0;\n            int256 y = 1;\n\n            while (remainder != 0) {\n                uint256 quotient = gcd / remainder;\n\n                (gcd, remainder) = (\n                    // The old remainder is the next gcd to try.\n                    remainder,\n                    // Compute the next remainder.\n                    // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\n                    // where gcd is at most n (capped to type(uint256).max)\n                    gcd - remainder * quotient\n                );\n\n                (x, y) = (\n                    // Increment the coefficient of a.\n                    y,\n                    // Decrement the coefficient of n.\n                    // Can overflow, but the result is casted to uint256 so that the\n                    // next value of y is \"wrapped around\" to a value between 0 and n - 1.\n                    x - y * int256(quotient)\n                );\n            }\n\n            if (gcd != 1) return 0; // No inverse exists.\n            return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\n        }\n    }\n\n    /**\n     * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\n     *\n     * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\n     * prime, then `a**(p-1) ≡ 1 mod p`. As a consequence, we have `a * a**(p-2) ≡ 1 mod p`, which means that\n     * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\n     *\n     * NOTE: this function does NOT check that `p` is a prime greater than `2`.\n     */\n    function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\n        unchecked {\n            return Math.modExp(a, p - 2, p);\n        }\n    }\n\n    /**\n     * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\n     *\n     * Requirements:\n     * - modulus can't be zero\n     * - underlying staticcall to precompile must succeed\n     *\n     * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\n     * sure the chain you're using it on supports the precompiled contract for modular exponentiation\n     * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\n     * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\n     * interpreted as 0.\n     */\n    function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\n        (bool success, uint256 result) = tryModExp(b, e, m);\n        if (!success) {\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n        return result;\n    }\n\n    /**\n     * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\n     * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\n     * to operate modulo 0 or if the underlying precompile reverted.\n     *\n     * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\n     * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\n     * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\n     * of a revert, but the result may be incorrectly interpreted as 0.\n     */\n    function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\n        if (m == 0) return (false, 0);\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            // | Offset    | Content    | Content (Hex)                                                      |\n            // |-----------|------------|--------------------------------------------------------------------|\n            // | 0x00:0x1f | size of b  | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n            // | 0x20:0x3f | size of e  | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n            // | 0x40:0x5f | size of m  | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n            // | 0x60:0x7f | value of b | 0x<.............................................................b> |\n            // | 0x80:0x9f | value of e | 0x<.............................................................e> |\n            // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\n            mstore(ptr, 0x20)\n            mstore(add(ptr, 0x20), 0x20)\n            mstore(add(ptr, 0x40), 0x20)\n            mstore(add(ptr, 0x60), b)\n            mstore(add(ptr, 0x80), e)\n            mstore(add(ptr, 0xa0), m)\n\n            // Given the result < m, it's guaranteed to fit in 32 bytes,\n            // so we can use the memory scratch space located at offset 0.\n            success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\n            result := mload(0x00)\n        }\n    }\n\n    /**\n     * @dev Variant of {modExp} that supports inputs of arbitrary length.\n     */\n    function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\n        (bool success, bytes memory result) = tryModExp(b, e, m);\n        if (!success) {\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n        return result;\n    }\n\n    /**\n     * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\n     */\n    function tryModExp(\n        bytes memory b,\n        bytes memory e,\n        bytes memory m\n    ) internal view returns (bool success, bytes memory result) {\n        if (_zeroBytes(m)) return (false, new bytes(0));\n\n        uint256 mLen = m.length;\n\n        // Encode call args in result and move the free memory pointer\n        result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\n\n        assembly (\"memory-safe\") {\n            let dataPtr := add(result, 0x20)\n            // Write result on top of args to avoid allocating extra memory.\n            success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\n            // Overwrite the length.\n            // result.length > returndatasize() is guaranteed because returndatasize() == m.length\n            mstore(result, mLen)\n            // Set the memory pointer after the returned data.\n            mstore(0x40, add(dataPtr, mLen))\n        }\n    }\n\n    /**\n     * @dev Returns whether the provided byte array is zero.\n     */\n    function _zeroBytes(bytes memory buffer) private pure returns (bool) {\n        uint256 chunk;\n        for (uint256 i = 0; i < buffer.length; i += 0x20) {\n            // See _unsafeReadBytesOffset from utils/Bytes.sol\n            assembly (\"memory-safe\") {\n                chunk := mload(add(add(buffer, 0x20), i))\n            }\n            if (chunk >> (8 * saturatingSub(i + 0x20, buffer.length)) != 0) {\n                return false;\n            }\n        }\n        return true;\n    }\n\n    /**\n     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded\n     * towards zero.\n     *\n     * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\n     * using integer operations.\n     */\n    function sqrt(uint256 a) internal pure returns (uint256) {\n        unchecked {\n            // Take care of easy edge cases when a == 0 or a == 1\n            if (a <= 1) {\n                return a;\n            }\n\n            // In this function, we use Newton's method to get a root of `f(x) := x² - a`. It involves building a\n            // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\n            // the current value as `ε_n = | x_n - sqrt(a) |`.\n            //\n            // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\n            // of the target. (i.e. `2**(e-1) ≤ sqrt(a) < 2**e`). We know that `e ≤ 128` because `(2¹²⁸)² = 2²⁵⁶` is\n            // bigger than any uint256.\n            //\n            // By noticing that\n            // `2**(e-1) ≤ sqrt(a) < 2**e → (2**(e-1))² ≤ a < (2**e)² → 2**(2*e-2) ≤ a < 2**(2*e)`\n            // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\n            // to the msb function.\n            uint256 aa = a;\n            uint256 xn = 1;\n\n            if (aa >= (1 << 128)) {\n                aa >>= 128;\n                xn <<= 64;\n            }\n            if (aa >= (1 << 64)) {\n                aa >>= 64;\n                xn <<= 32;\n            }\n            if (aa >= (1 << 32)) {\n                aa >>= 32;\n                xn <<= 16;\n            }\n            if (aa >= (1 << 16)) {\n                aa >>= 16;\n                xn <<= 8;\n            }\n            if (aa >= (1 << 8)) {\n                aa >>= 8;\n                xn <<= 4;\n            }\n            if (aa >= (1 << 4)) {\n                aa >>= 4;\n                xn <<= 2;\n            }\n            if (aa >= (1 << 2)) {\n                xn <<= 1;\n            }\n\n            // We now have x_n such that `x_n = 2**(e-1) ≤ sqrt(a) < 2**e = 2 * x_n`. This implies ε_n ≤ 2**(e-1).\n            //\n            // We can refine our estimation by noticing that the middle of that interval minimizes the error.\n            // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to ε_n ≤ 2**(e-2).\n            // This is going to be our x_0 (and ε_0)\n            xn = (3 * xn) >> 1; // ε_0 := | x_0 - sqrt(a) | ≤ 2**(e-2)\n\n            // From here, Newton's method give us:\n            // x_{n+1} = (x_n + a / x_n) / 2\n            //\n            // One should note that:\n            // x_{n+1}² - a = ((x_n + a / x_n) / 2)² - a\n            //              = ((x_n² + a) / (2 * x_n))² - a\n            //              = (x_n⁴ + 2 * a * x_n² + a²) / (4 * x_n²) - a\n            //              = (x_n⁴ + 2 * a * x_n² + a² - 4 * a * x_n²) / (4 * x_n²)\n            //              = (x_n⁴ - 2 * a * x_n² + a²) / (4 * x_n²)\n            //              = (x_n² - a)² / (2 * x_n)²\n            //              = ((x_n² - a) / (2 * x_n))²\n            //              ≥ 0\n            // Which proves that for all n ≥ 1, sqrt(a) ≤ x_n\n            //\n            // This gives us the proof of quadratic convergence of the sequence:\n            // ε_{n+1} = | x_{n+1} - sqrt(a) |\n            //         = | (x_n + a / x_n) / 2 - sqrt(a) |\n            //         = | (x_n² + a - 2*x_n*sqrt(a)) / (2 * x_n) |\n            //         = | (x_n - sqrt(a))² / (2 * x_n) |\n            //         = | ε_n² / (2 * x_n) |\n            //         = ε_n² / | (2 * x_n) |\n            //\n            // For the first iteration, we have a special case where x_0 is known:\n            // ε_1 = ε_0² / | (2 * x_0) |\n            //     ≤ (2**(e-2))² / (2 * (2**(e-1) + 2**(e-2)))\n            //     ≤ 2**(2*e-4) / (3 * 2**(e-1))\n            //     ≤ 2**(e-3) / 3\n            //     ≤ 2**(e-3-log2(3))\n            //     ≤ 2**(e-4.5)\n            //\n            // For the following iterations, we use the fact that, 2**(e-1) ≤ sqrt(a) ≤ x_n:\n            // ε_{n+1} = ε_n² / | (2 * x_n) |\n            //         ≤ (2**(e-k))² / (2 * 2**(e-1))\n            //         ≤ 2**(2*e-2*k) / 2**e\n            //         ≤ 2**(e-2*k)\n            xn = (xn + a / xn) >> 1; // ε_1 := | x_1 - sqrt(a) | ≤ 2**(e-4.5)  -- special case, see above\n            xn = (xn + a / xn) >> 1; // ε_2 := | x_2 - sqrt(a) | ≤ 2**(e-9)    -- general case with k = 4.5\n            xn = (xn + a / xn) >> 1; // ε_3 := | x_3 - sqrt(a) | ≤ 2**(e-18)   -- general case with k = 9\n            xn = (xn + a / xn) >> 1; // ε_4 := | x_4 - sqrt(a) | ≤ 2**(e-36)   -- general case with k = 18\n            xn = (xn + a / xn) >> 1; // ε_5 := | x_5 - sqrt(a) | ≤ 2**(e-72)   -- general case with k = 36\n            xn = (xn + a / xn) >> 1; // ε_6 := | x_6 - sqrt(a) | ≤ 2**(e-144)  -- general case with k = 72\n\n            // Because e ≤ 128 (as discussed during the first estimation phase), we know have reached a precision\n            // ε_6 ≤ 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\n            // sqrt(a) or sqrt(a) + 1.\n            return xn - SafeCast.toUint(xn > a / xn);\n        }\n    }\n\n    /**\n     * @dev Calculates sqrt(a), following the selected rounding direction.\n     */\n    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = sqrt(a);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 2 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     */\n    function log2(uint256 x) internal pure returns (uint256 r) {\n        // If value has upper 128 bits set, log2 result is at least 128\n        r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\n        // If upper 64 bits of 128-bit half set, add 64 to result\n        r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\n        // If upper 32 bits of 64-bit half set, add 32 to result\n        r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\n        // If upper 16 bits of 32-bit half set, add 16 to result\n        r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\n        // If upper 8 bits of 16-bit half set, add 8 to result\n        r |= SafeCast.toUint((x >> r) > 0xff) << 3;\n        // If upper 4 bits of 8-bit half set, add 4 to result\n        r |= SafeCast.toUint((x >> r) > 0xf) << 2;\n\n        // Shifts value right by the current result and use it as an index into this lookup table:\n        //\n        // | x (4 bits) |  index  | table[index] = MSB position |\n        // |------------|---------|-----------------------------|\n        // |    0000    |    0    |        table[0] = 0         |\n        // |    0001    |    1    |        table[1] = 0         |\n        // |    0010    |    2    |        table[2] = 1         |\n        // |    0011    |    3    |        table[3] = 1         |\n        // |    0100    |    4    |        table[4] = 2         |\n        // |    0101    |    5    |        table[5] = 2         |\n        // |    0110    |    6    |        table[6] = 2         |\n        // |    0111    |    7    |        table[7] = 2         |\n        // |    1000    |    8    |        table[8] = 3         |\n        // |    1001    |    9    |        table[9] = 3         |\n        // |    1010    |   10    |        table[10] = 3        |\n        // |    1011    |   11    |        table[11] = 3        |\n        // |    1100    |   12    |        table[12] = 3        |\n        // |    1101    |   13    |        table[13] = 3        |\n        // |    1110    |   14    |        table[14] = 3        |\n        // |    1111    |   15    |        table[15] = 3        |\n        //\n        // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the first 16 bytes (most significant half).\n        assembly (\"memory-safe\") {\n            r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\n        }\n    }\n\n    /**\n     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log2(value);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 10 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     */\n    function log10(uint256 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        unchecked {\n            if (value >= 10 ** 64) {\n                value /= 10 ** 64;\n                result += 64;\n            }\n            if (value >= 10 ** 32) {\n                value /= 10 ** 32;\n                result += 32;\n            }\n            if (value >= 10 ** 16) {\n                value /= 10 ** 16;\n                result += 16;\n            }\n            if (value >= 10 ** 8) {\n                value /= 10 ** 8;\n                result += 8;\n            }\n            if (value >= 10 ** 4) {\n                value /= 10 ** 4;\n                result += 4;\n            }\n            if (value >= 10 ** 2) {\n                value /= 10 ** 2;\n                result += 2;\n            }\n            if (value >= 10 ** 1) {\n                result += 1;\n            }\n        }\n        return result;\n    }\n\n    /**\n     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log10(value);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 256 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     *\n     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n     */\n    function log256(uint256 x) internal pure returns (uint256 r) {\n        // If value has upper 128 bits set, log2 result is at least 128\n        r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\n        // If upper 64 bits of 128-bit half set, add 64 to result\n        r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\n        // If upper 32 bits of 64-bit half set, add 32 to result\n        r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\n        // If upper 16 bits of 32-bit half set, add 16 to result\n        r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\n        // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\n        return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\n    }\n\n    /**\n     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log256(value);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\n        }\n    }\n\n    /**\n     * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n     */\n    function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n        return uint8(rounding) % 2 == 1;\n    }\n\n    /**\n     * @dev Counts the number of leading zero bits in a uint256.\n     */\n    function clz(uint256 x) internal pure returns (uint256) {\n        return ternary(x == 0, 256, 255 - log2(x));\n    }\n}\n"},"contracts/interfaces/callbacks/IMetricOmmSwapCallback.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\n/// @title IMetricOmmSwapCallback\n/// @notice Callback invoked by the pool during `swap` so the caller can settle token flows with the pool.\n/// @dev Implementations must treat `msg.sender` as the pool they intended to call (verify against a known pool).\n///      Positive `amount0Delta` / `amount1Delta` mean the pool must receive that many native token units from the callback payer.\n///      Negative deltas mean the pool sends tokens out (handled by the pool before this callback for output legs).\ninterface IMetricOmmSwapCallback {\n  // ============ Mutating ============\n\n  /// @notice Settle token0 and token1 deltas for the swap on `msg.sender` (the pool).\n  /// @param amount0Delta Token0 delta from pool perspective: positive = pool must receive from payer.\n  /// @param amount1Delta Token1 delta from pool perspective: positive = pool must receive from payer.\n  /// @param callbackData Opaque bytes forwarded from swap; conventionally ABI-encoded router context.\n  function metricOmmSwapCallback(int256 amount0Delta, int256 amount1Delta, bytes calldata callbackData) external;\n}\n"},"lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\n\npragma solidity >=0.4.16;\n\nimport {IERC20} from \"../token/ERC20/IERC20.sol\";\n"},"lib/openzeppelin-contracts/contracts/interfaces/IERC165.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\n\npragma solidity >=0.4.16;\n\nimport {IERC165} from \"../utils/introspection/IERC165.sol\";\n"},"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\n\npragma solidity >=0.4.16;\n\n/**\n * @dev Interface of the ERC-20 standard as defined in the ERC.\n */\ninterface IERC20 {\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n\n    /**\n     * @dev Returns the value of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the value of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the\n     * allowance mechanism. `value` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n"},"lib/openzeppelin-contracts/contracts/interfaces/IERC1363.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\n\npragma solidity >=0.6.2;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @title IERC1363\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\n *\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\n */\ninterface IERC1363 is IERC20, IERC165 {\n    /*\n     * Note: the ERC-165 identifier for this interface is 0xb0202a11.\n     * 0xb0202a11 ===\n     *   bytes4(keccak256('transferAndCall(address,uint256)')) ^\n     *   bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\n     *   bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\n     *   bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\n     *   bytes4(keccak256('approveAndCall(address,uint256)')) ^\n     *   bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\n     */\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferAndCall(address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @param data Additional data with no specified format, sent in call to `to`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param from The address which you want to send tokens from.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param from The address which you want to send tokens from.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @param data Additional data with no specified format, sent in call to `to`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n     * @param spender The address which will spend the funds.\n     * @param value The amount of tokens to be spent.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function approveAndCall(address spender, uint256 value) external returns (bool);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n     * @param spender The address which will spend the funds.\n     * @param value The amount of tokens to be spent.\n     * @param data Additional data with no specified format, sent in call to `spender`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\n}\n"},"lib/openzeppelin-contracts/contracts/utils/TransientSlot.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/TransientSlot.sol)\n// This file was procedurally generated from scripts/generate/templates/TransientSlot.js.\n\npragma solidity ^0.8.24;\n\n/**\n * @dev Library for reading and writing value-types to specific transient storage slots.\n *\n * Transient slots are often used to store temporary values that are removed after the current transaction.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n *  * Example reading and writing values using transient storage:\n * ```solidity\n * contract Lock {\n *     using TransientSlot for *;\n *\n *     // Define the slot. Alternatively, use the SlotDerivation library to derive the slot.\n *     bytes32 internal constant _LOCK_SLOT = 0xf4678858b2b588224636b8522b729e7722d32fc491da849ed75b3fdf3c84f542;\n *\n *     modifier locked() {\n *         require(!_LOCK_SLOT.asBoolean().tload());\n *\n *         _LOCK_SLOT.asBoolean().tstore(true);\n *         _;\n *         _LOCK_SLOT.asBoolean().tstore(false);\n *     }\n * }\n * ```\n *\n * TIP: Consider using this library along with {SlotDerivation}.\n */\nlibrary TransientSlot {\n    /**\n     * @dev UDVT that represents a slot holding an address.\n     */\n    type AddressSlot is bytes32;\n\n    /**\n     * @dev Cast an arbitrary slot to a AddressSlot.\n     */\n    function asAddress(bytes32 slot) internal pure returns (AddressSlot) {\n        return AddressSlot.wrap(slot);\n    }\n\n    /**\n     * @dev UDVT that represents a slot holding a bool.\n     */\n    type BooleanSlot is bytes32;\n\n    /**\n     * @dev Cast an arbitrary slot to a BooleanSlot.\n     */\n    function asBoolean(bytes32 slot) internal pure returns (BooleanSlot) {\n        return BooleanSlot.wrap(slot);\n    }\n\n    /**\n     * @dev UDVT that represents a slot holding a bytes32.\n     */\n    type Bytes32Slot is bytes32;\n\n    /**\n     * @dev Cast an arbitrary slot to a Bytes32Slot.\n     */\n    function asBytes32(bytes32 slot) internal pure returns (Bytes32Slot) {\n        return Bytes32Slot.wrap(slot);\n    }\n\n    /**\n     * @dev UDVT that represents a slot holding a uint256.\n     */\n    type Uint256Slot is bytes32;\n\n    /**\n     * @dev Cast an arbitrary slot to a Uint256Slot.\n     */\n    function asUint256(bytes32 slot) internal pure returns (Uint256Slot) {\n        return Uint256Slot.wrap(slot);\n    }\n\n    /**\n     * @dev UDVT that represents a slot holding a int256.\n     */\n    type Int256Slot is bytes32;\n\n    /**\n     * @dev Cast an arbitrary slot to a Int256Slot.\n     */\n    function asInt256(bytes32 slot) internal pure returns (Int256Slot) {\n        return Int256Slot.wrap(slot);\n    }\n\n    /**\n     * @dev Load the value held at location `slot` in transient storage.\n     */\n    function tload(AddressSlot slot) internal view returns (address value) {\n        assembly (\"memory-safe\") {\n            value := tload(slot)\n        }\n    }\n\n    /**\n     * @dev Store `value` at location `slot` in transient storage.\n     */\n    function tstore(AddressSlot slot, address value) internal {\n        assembly (\"memory-safe\") {\n            tstore(slot, value)\n        }\n    }\n\n    /**\n     * @dev Load the value held at location `slot` in transient storage.\n     */\n    function tload(BooleanSlot slot) internal view returns (bool value) {\n        assembly (\"memory-safe\") {\n            value := tload(slot)\n        }\n    }\n\n    /**\n     * @dev Store `value` at location `slot` in transient storage.\n     */\n    function tstore(BooleanSlot slot, bool value) internal {\n        assembly (\"memory-safe\") {\n            tstore(slot, value)\n        }\n    }\n\n    /**\n     * @dev Load the value held at location `slot` in transient storage.\n     */\n    function tload(Bytes32Slot slot) internal view returns (bytes32 value) {\n        assembly (\"memory-safe\") {\n            value := tload(slot)\n        }\n    }\n\n    /**\n     * @dev Store `value` at location `slot` in transient storage.\n     */\n    function tstore(Bytes32Slot slot, bytes32 value) internal {\n        assembly (\"memory-safe\") {\n            tstore(slot, value)\n        }\n    }\n\n    /**\n     * @dev Load the value held at location `slot` in transient storage.\n     */\n    function tload(Uint256Slot slot) internal view returns (uint256 value) {\n        assembly (\"memory-safe\") {\n            value := tload(slot)\n        }\n    }\n\n    /**\n     * @dev Store `value` at location `slot` in transient storage.\n     */\n    function tstore(Uint256Slot slot, uint256 value) internal {\n        assembly (\"memory-safe\") {\n            tstore(slot, value)\n        }\n    }\n\n    /**\n     * @dev Load the value held at location `slot` in transient storage.\n     */\n    function tload(Int256Slot slot) internal view returns (int256 value) {\n        assembly (\"memory-safe\") {\n            value := tload(slot)\n        }\n    }\n\n    /**\n     * @dev Store `value` at location `slot` in transient storage.\n     */\n    function tstore(Int256Slot slot, int256 value) internal {\n        assembly (\"memory-safe\") {\n            tstore(slot, value)\n        }\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/math/SafeCast.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SafeCast.sol)\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX/bool casting operators with added overflow\n * checks.\n *\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n * easily result in undesired exploitation or bugs, since developers usually\n * assume that overflows raise errors. `SafeCast` restores this intuition by\n * reverting the transaction when such an operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeCast {\n    /**\n     * @dev Value doesn't fit in a uint of `bits` size.\n     */\n    error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);\n\n    /**\n     * @dev An int value doesn't fit in a uint of `bits` size.\n     */\n    error SafeCastOverflowedIntToUint(int256 value);\n\n    /**\n     * @dev Value doesn't fit in an int of `bits` size.\n     */\n    error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);\n\n    /**\n     * @dev A uint value doesn't fit in an int of `bits` size.\n     */\n    error SafeCastOverflowedUintToInt(uint256 value);\n\n    /**\n     * @dev Returns the downcasted uint248 from uint256, reverting on\n     * overflow (when the input is greater than largest uint248).\n     *\n     * Counterpart to Solidity's `uint248` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 248 bits\n     */\n    function toUint248(uint256 value) internal pure returns (uint248) {\n        if (value > type(uint248).max) {\n            revert SafeCastOverflowedUintDowncast(248, value);\n        }\n        return uint248(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint240 from uint256, reverting on\n     * overflow (when the input is greater than largest uint240).\n     *\n     * Counterpart to Solidity's `uint240` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 240 bits\n     */\n    function toUint240(uint256 value) internal pure returns (uint240) {\n        if (value > type(uint240).max) {\n            revert SafeCastOverflowedUintDowncast(240, value);\n        }\n        return uint240(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint232 from uint256, reverting on\n     * overflow (when the input is greater than largest uint232).\n     *\n     * Counterpart to Solidity's `uint232` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 232 bits\n     */\n    function toUint232(uint256 value) internal pure returns (uint232) {\n        if (value > type(uint232).max) {\n            revert SafeCastOverflowedUintDowncast(232, value);\n        }\n        return uint232(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint224 from uint256, reverting on\n     * overflow (when the input is greater than largest uint224).\n     *\n     * Counterpart to Solidity's `uint224` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 224 bits\n     */\n    function toUint224(uint256 value) internal pure returns (uint224) {\n        if (value > type(uint224).max) {\n            revert SafeCastOverflowedUintDowncast(224, value);\n        }\n        return uint224(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint216 from uint256, reverting on\n     * overflow (when the input is greater than largest uint216).\n     *\n     * Counterpart to Solidity's `uint216` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 216 bits\n     */\n    function toUint216(uint256 value) internal pure returns (uint216) {\n        if (value > type(uint216).max) {\n            revert SafeCastOverflowedUintDowncast(216, value);\n        }\n        return uint216(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint208 from uint256, reverting on\n     * overflow (when the input is greater than largest uint208).\n     *\n     * Counterpart to Solidity's `uint208` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 208 bits\n     */\n    function toUint208(uint256 value) internal pure returns (uint208) {\n        if (value > type(uint208).max) {\n            revert SafeCastOverflowedUintDowncast(208, value);\n        }\n        return uint208(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint200 from uint256, reverting on\n     * overflow (when the input is greater than largest uint200).\n     *\n     * Counterpart to Solidity's `uint200` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 200 bits\n     */\n    function toUint200(uint256 value) internal pure returns (uint200) {\n        if (value > type(uint200).max) {\n            revert SafeCastOverflowedUintDowncast(200, value);\n        }\n        return uint200(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint192 from uint256, reverting on\n     * overflow (when the input is greater than largest uint192).\n     *\n     * Counterpart to Solidity's `uint192` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 192 bits\n     */\n    function toUint192(uint256 value) internal pure returns (uint192) {\n        if (value > type(uint192).max) {\n            revert SafeCastOverflowedUintDowncast(192, value);\n        }\n        return uint192(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint184 from uint256, reverting on\n     * overflow (when the input is greater than largest uint184).\n     *\n     * Counterpart to Solidity's `uint184` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 184 bits\n     */\n    function toUint184(uint256 value) internal pure returns (uint184) {\n        if (value > type(uint184).max) {\n            revert SafeCastOverflowedUintDowncast(184, value);\n        }\n        return uint184(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint176 from uint256, reverting on\n     * overflow (when the input is greater than largest uint176).\n     *\n     * Counterpart to Solidity's `uint176` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 176 bits\n     */\n    function toUint176(uint256 value) internal pure returns (uint176) {\n        if (value > type(uint176).max) {\n            revert SafeCastOverflowedUintDowncast(176, value);\n        }\n        return uint176(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint168 from uint256, reverting on\n     * overflow (when the input is greater than largest uint168).\n     *\n     * Counterpart to Solidity's `uint168` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 168 bits\n     */\n    function toUint168(uint256 value) internal pure returns (uint168) {\n        if (value > type(uint168).max) {\n            revert SafeCastOverflowedUintDowncast(168, value);\n        }\n        return uint168(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint160 from uint256, reverting on\n     * overflow (when the input is greater than largest uint160).\n     *\n     * Counterpart to Solidity's `uint160` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 160 bits\n     */\n    function toUint160(uint256 value) internal pure returns (uint160) {\n        if (value > type(uint160).max) {\n            revert SafeCastOverflowedUintDowncast(160, value);\n        }\n        return uint160(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint152 from uint256, reverting on\n     * overflow (when the input is greater than largest uint152).\n     *\n     * Counterpart to Solidity's `uint152` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 152 bits\n     */\n    function toUint152(uint256 value) internal pure returns (uint152) {\n        if (value > type(uint152).max) {\n            revert SafeCastOverflowedUintDowncast(152, value);\n        }\n        return uint152(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint144 from uint256, reverting on\n     * overflow (when the input is greater than largest uint144).\n     *\n     * Counterpart to Solidity's `uint144` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 144 bits\n     */\n    function toUint144(uint256 value) internal pure returns (uint144) {\n        if (value > type(uint144).max) {\n            revert SafeCastOverflowedUintDowncast(144, value);\n        }\n        return uint144(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint136 from uint256, reverting on\n     * overflow (when the input is greater than largest uint136).\n     *\n     * Counterpart to Solidity's `uint136` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 136 bits\n     */\n    function toUint136(uint256 value) internal pure returns (uint136) {\n        if (value > type(uint136).max) {\n            revert SafeCastOverflowedUintDowncast(136, value);\n        }\n        return uint136(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint128 from uint256, reverting on\n     * overflow (when the input is greater than largest uint128).\n     *\n     * Counterpart to Solidity's `uint128` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 128 bits\n     */\n    function toUint128(uint256 value) internal pure returns (uint128) {\n        if (value > type(uint128).max) {\n            revert SafeCastOverflowedUintDowncast(128, value);\n        }\n        return uint128(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint120 from uint256, reverting on\n     * overflow (when the input is greater than largest uint120).\n     *\n     * Counterpart to Solidity's `uint120` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 120 bits\n     */\n    function toUint120(uint256 value) internal pure returns (uint120) {\n        if (value > type(uint120).max) {\n            revert SafeCastOverflowedUintDowncast(120, value);\n        }\n        return uint120(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint112 from uint256, reverting on\n     * overflow (when the input is greater than largest uint112).\n     *\n     * Counterpart to Solidity's `uint112` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 112 bits\n     */\n    function toUint112(uint256 value) internal pure returns (uint112) {\n        if (value > type(uint112).max) {\n            revert SafeCastOverflowedUintDowncast(112, value);\n        }\n        return uint112(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint104 from uint256, reverting on\n     * overflow (when the input is greater than largest uint104).\n     *\n     * Counterpart to Solidity's `uint104` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 104 bits\n     */\n    function toUint104(uint256 value) internal pure returns (uint104) {\n        if (value > type(uint104).max) {\n            revert SafeCastOverflowedUintDowncast(104, value);\n        }\n        return uint104(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint96 from uint256, reverting on\n     * overflow (when the input is greater than largest uint96).\n     *\n     * Counterpart to Solidity's `uint96` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 96 bits\n     */\n    function toUint96(uint256 value) internal pure returns (uint96) {\n        if (value > type(uint96).max) {\n            revert SafeCastOverflowedUintDowncast(96, value);\n        }\n        return uint96(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint88 from uint256, reverting on\n     * overflow (when the input is greater than largest uint88).\n     *\n     * Counterpart to Solidity's `uint88` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 88 bits\n     */\n    function toUint88(uint256 value) internal pure returns (uint88) {\n        if (value > type(uint88).max) {\n            revert SafeCastOverflowedUintDowncast(88, value);\n        }\n        return uint88(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint80 from uint256, reverting on\n     * overflow (when the input is greater than largest uint80).\n     *\n     * Counterpart to Solidity's `uint80` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 80 bits\n     */\n    function toUint80(uint256 value) internal pure returns (uint80) {\n        if (value > type(uint80).max) {\n            revert SafeCastOverflowedUintDowncast(80, value);\n        }\n        return uint80(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint72 from uint256, reverting on\n     * overflow (when the input is greater than largest uint72).\n     *\n     * Counterpart to Solidity's `uint72` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 72 bits\n     */\n    function toUint72(uint256 value) internal pure returns (uint72) {\n        if (value > type(uint72).max) {\n            revert SafeCastOverflowedUintDowncast(72, value);\n        }\n        return uint72(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint64 from uint256, reverting on\n     * overflow (when the input is greater than largest uint64).\n     *\n     * Counterpart to Solidity's `uint64` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 64 bits\n     */\n    function toUint64(uint256 value) internal pure returns (uint64) {\n        if (value > type(uint64).max) {\n            revert SafeCastOverflowedUintDowncast(64, value);\n        }\n        return uint64(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint56 from uint256, reverting on\n     * overflow (when the input is greater than largest uint56).\n     *\n     * Counterpart to Solidity's `uint56` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 56 bits\n     */\n    function toUint56(uint256 value) internal pure returns (uint56) {\n        if (value > type(uint56).max) {\n            revert SafeCastOverflowedUintDowncast(56, value);\n        }\n        return uint56(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint48 from uint256, reverting on\n     * overflow (when the input is greater than largest uint48).\n     *\n     * Counterpart to Solidity's `uint48` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 48 bits\n     */\n    function toUint48(uint256 value) internal pure returns (uint48) {\n        if (value > type(uint48).max) {\n            revert SafeCastOverflowedUintDowncast(48, value);\n        }\n        return uint48(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint40 from uint256, reverting on\n     * overflow (when the input is greater than largest uint40).\n     *\n     * Counterpart to Solidity's `uint40` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 40 bits\n     */\n    function toUint40(uint256 value) internal pure returns (uint40) {\n        if (value > type(uint40).max) {\n            revert SafeCastOverflowedUintDowncast(40, value);\n        }\n        return uint40(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint32 from uint256, reverting on\n     * overflow (when the input is greater than largest uint32).\n     *\n     * Counterpart to Solidity's `uint32` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 32 bits\n     */\n    function toUint32(uint256 value) internal pure returns (uint32) {\n        if (value > type(uint32).max) {\n            revert SafeCastOverflowedUintDowncast(32, value);\n        }\n        return uint32(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint24 from uint256, reverting on\n     * overflow (when the input is greater than largest uint24).\n     *\n     * Counterpart to Solidity's `uint24` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 24 bits\n     */\n    function toUint24(uint256 value) internal pure returns (uint24) {\n        if (value > type(uint24).max) {\n            revert SafeCastOverflowedUintDowncast(24, value);\n        }\n        return uint24(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint16 from uint256, reverting on\n     * overflow (when the input is greater than largest uint16).\n     *\n     * Counterpart to Solidity's `uint16` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 16 bits\n     */\n    function toUint16(uint256 value) internal pure returns (uint16) {\n        if (value > type(uint16).max) {\n            revert SafeCastOverflowedUintDowncast(16, value);\n        }\n        return uint16(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint8 from uint256, reverting on\n     * overflow (when the input is greater than largest uint8).\n     *\n     * Counterpart to Solidity's `uint8` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 8 bits\n     */\n    function toUint8(uint256 value) internal pure returns (uint8) {\n        if (value > type(uint8).max) {\n            revert SafeCastOverflowedUintDowncast(8, value);\n        }\n        return uint8(value);\n    }\n\n    /**\n     * @dev Converts a signed int256 into an unsigned uint256.\n     *\n     * Requirements:\n     *\n     * - input must be greater than or equal to 0.\n     */\n    function toUint256(int256 value) internal pure returns (uint256) {\n        if (value < 0) {\n            revert SafeCastOverflowedIntToUint(value);\n        }\n        return uint256(value);\n    }\n\n    /**\n     * @dev Returns the downcasted int248 from int256, reverting on\n     * overflow (when the input is less than smallest int248 or\n     * greater than largest int248).\n     *\n     * Counterpart to Solidity's `int248` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 248 bits\n     */\n    function toInt248(int256 value) internal pure returns (int248 downcasted) {\n        downcasted = int248(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(248, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int240 from int256, reverting on\n     * overflow (when the input is less than smallest int240 or\n     * greater than largest int240).\n     *\n     * Counterpart to Solidity's `int240` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 240 bits\n     */\n    function toInt240(int256 value) internal pure returns (int240 downcasted) {\n        downcasted = int240(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(240, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int232 from int256, reverting on\n     * overflow (when the input is less than smallest int232 or\n     * greater than largest int232).\n     *\n     * Counterpart to Solidity's `int232` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 232 bits\n     */\n    function toInt232(int256 value) internal pure returns (int232 downcasted) {\n        downcasted = int232(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(232, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int224 from int256, reverting on\n     * overflow (when the input is less than smallest int224 or\n     * greater than largest int224).\n     *\n     * Counterpart to Solidity's `int224` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 224 bits\n     */\n    function toInt224(int256 value) internal pure returns (int224 downcasted) {\n        downcasted = int224(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(224, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int216 from int256, reverting on\n     * overflow (when the input is less than smallest int216 or\n     * greater than largest int216).\n     *\n     * Counterpart to Solidity's `int216` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 216 bits\n     */\n    function toInt216(int256 value) internal pure returns (int216 downcasted) {\n        downcasted = int216(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(216, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int208 from int256, reverting on\n     * overflow (when the input is less than smallest int208 or\n     * greater than largest int208).\n     *\n     * Counterpart to Solidity's `int208` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 208 bits\n     */\n    function toInt208(int256 value) internal pure returns (int208 downcasted) {\n        downcasted = int208(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(208, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int200 from int256, reverting on\n     * overflow (when the input is less than smallest int200 or\n     * greater than largest int200).\n     *\n     * Counterpart to Solidity's `int200` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 200 bits\n     */\n    function toInt200(int256 value) internal pure returns (int200 downcasted) {\n        downcasted = int200(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(200, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int192 from int256, reverting on\n     * overflow (when the input is less than smallest int192 or\n     * greater than largest int192).\n     *\n     * Counterpart to Solidity's `int192` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 192 bits\n     */\n    function toInt192(int256 value) internal pure returns (int192 downcasted) {\n        downcasted = int192(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(192, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int184 from int256, reverting on\n     * overflow (when the input is less than smallest int184 or\n     * greater than largest int184).\n     *\n     * Counterpart to Solidity's `int184` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 184 bits\n     */\n    function toInt184(int256 value) internal pure returns (int184 downcasted) {\n        downcasted = int184(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(184, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int176 from int256, reverting on\n     * overflow (when the input is less than smallest int176 or\n     * greater than largest int176).\n     *\n     * Counterpart to Solidity's `int176` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 176 bits\n     */\n    function toInt176(int256 value) internal pure returns (int176 downcasted) {\n        downcasted = int176(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(176, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int168 from int256, reverting on\n     * overflow (when the input is less than smallest int168 or\n     * greater than largest int168).\n     *\n     * Counterpart to Solidity's `int168` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 168 bits\n     */\n    function toInt168(int256 value) internal pure returns (int168 downcasted) {\n        downcasted = int168(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(168, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int160 from int256, reverting on\n     * overflow (when the input is less than smallest int160 or\n     * greater than largest int160).\n     *\n     * Counterpart to Solidity's `int160` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 160 bits\n     */\n    function toInt160(int256 value) internal pure returns (int160 downcasted) {\n        downcasted = int160(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(160, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int152 from int256, reverting on\n     * overflow (when the input is less than smallest int152 or\n     * greater than largest int152).\n     *\n     * Counterpart to Solidity's `int152` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 152 bits\n     */\n    function toInt152(int256 value) internal pure returns (int152 downcasted) {\n        downcasted = int152(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(152, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int144 from int256, reverting on\n     * overflow (when the input is less than smallest int144 or\n     * greater than largest int144).\n     *\n     * Counterpart to Solidity's `int144` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 144 bits\n     */\n    function toInt144(int256 value) internal pure returns (int144 downcasted) {\n        downcasted = int144(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(144, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int136 from int256, reverting on\n     * overflow (when the input is less than smallest int136 or\n     * greater than largest int136).\n     *\n     * Counterpart to Solidity's `int136` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 136 bits\n     */\n    function toInt136(int256 value) internal pure returns (int136 downcasted) {\n        downcasted = int136(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(136, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int128 from int256, reverting on\n     * overflow (when the input is less than smallest int128 or\n     * greater than largest int128).\n     *\n     * Counterpart to Solidity's `int128` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 128 bits\n     */\n    function toInt128(int256 value) internal pure returns (int128 downcasted) {\n        downcasted = int128(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(128, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int120 from int256, reverting on\n     * overflow (when the input is less than smallest int120 or\n     * greater than largest int120).\n     *\n     * Counterpart to Solidity's `int120` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 120 bits\n     */\n    function toInt120(int256 value) internal pure returns (int120 downcasted) {\n        downcasted = int120(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(120, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int112 from int256, reverting on\n     * overflow (when the input is less than smallest int112 or\n     * greater than largest int112).\n     *\n     * Counterpart to Solidity's `int112` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 112 bits\n     */\n    function toInt112(int256 value) internal pure returns (int112 downcasted) {\n        downcasted = int112(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(112, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int104 from int256, reverting on\n     * overflow (when the input is less than smallest int104 or\n     * greater than largest int104).\n     *\n     * Counterpart to Solidity's `int104` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 104 bits\n     */\n    function toInt104(int256 value) internal pure returns (int104 downcasted) {\n        downcasted = int104(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(104, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int96 from int256, reverting on\n     * overflow (when the input is less than smallest int96 or\n     * greater than largest int96).\n     *\n     * Counterpart to Solidity's `int96` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 96 bits\n     */\n    function toInt96(int256 value) internal pure returns (int96 downcasted) {\n        downcasted = int96(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(96, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int88 from int256, reverting on\n     * overflow (when the input is less than smallest int88 or\n     * greater than largest int88).\n     *\n     * Counterpart to Solidity's `int88` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 88 bits\n     */\n    function toInt88(int256 value) internal pure returns (int88 downcasted) {\n        downcasted = int88(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(88, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int80 from int256, reverting on\n     * overflow (when the input is less than smallest int80 or\n     * greater than largest int80).\n     *\n     * Counterpart to Solidity's `int80` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 80 bits\n     */\n    function toInt80(int256 value) internal pure returns (int80 downcasted) {\n        downcasted = int80(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(80, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int72 from int256, reverting on\n     * overflow (when the input is less than smallest int72 or\n     * greater than largest int72).\n     *\n     * Counterpart to Solidity's `int72` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 72 bits\n     */\n    function toInt72(int256 value) internal pure returns (int72 downcasted) {\n        downcasted = int72(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(72, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int64 from int256, reverting on\n     * overflow (when the input is less than smallest int64 or\n     * greater than largest int64).\n     *\n     * Counterpart to Solidity's `int64` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 64 bits\n     */\n    function toInt64(int256 value) internal pure returns (int64 downcasted) {\n        downcasted = int64(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(64, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int56 from int256, reverting on\n     * overflow (when the input is less than smallest int56 or\n     * greater than largest int56).\n     *\n     * Counterpart to Solidity's `int56` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 56 bits\n     */\n    function toInt56(int256 value) internal pure returns (int56 downcasted) {\n        downcasted = int56(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(56, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int48 from int256, reverting on\n     * overflow (when the input is less than smallest int48 or\n     * greater than largest int48).\n     *\n     * Counterpart to Solidity's `int48` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 48 bits\n     */\n    function toInt48(int256 value) internal pure returns (int48 downcasted) {\n        downcasted = int48(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(48, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int40 from int256, reverting on\n     * overflow (when the input is less than smallest int40 or\n     * greater than largest int40).\n     *\n     * Counterpart to Solidity's `int40` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 40 bits\n     */\n    function toInt40(int256 value) internal pure returns (int40 downcasted) {\n        downcasted = int40(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(40, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int32 from int256, reverting on\n     * overflow (when the input is less than smallest int32 or\n     * greater than largest int32).\n     *\n     * Counterpart to Solidity's `int32` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 32 bits\n     */\n    function toInt32(int256 value) internal pure returns (int32 downcasted) {\n        downcasted = int32(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(32, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int24 from int256, reverting on\n     * overflow (when the input is less than smallest int24 or\n     * greater than largest int24).\n     *\n     * Counterpart to Solidity's `int24` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 24 bits\n     */\n    function toInt24(int256 value) internal pure returns (int24 downcasted) {\n        downcasted = int24(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(24, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int16 from int256, reverting on\n     * overflow (when the input is less than smallest int16 or\n     * greater than largest int16).\n     *\n     * Counterpart to Solidity's `int16` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 16 bits\n     */\n    function toInt16(int256 value) internal pure returns (int16 downcasted) {\n        downcasted = int16(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(16, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int8 from int256, reverting on\n     * overflow (when the input is less than smallest int8 or\n     * greater than largest int8).\n     *\n     * Counterpart to Solidity's `int8` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 8 bits\n     */\n    function toInt8(int256 value) internal pure returns (int8 downcasted) {\n        downcasted = int8(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(8, value);\n        }\n    }\n\n    /**\n     * @dev Converts an unsigned uint256 into a signed int256.\n     *\n     * Requirements:\n     *\n     * - input must be less than or equal to maxInt256.\n     */\n    function toInt256(uint256 value) internal pure returns (int256) {\n        // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\n        if (value > uint256(type(int256).max)) {\n            revert SafeCastOverflowedUintToInt(value);\n        }\n        return int256(value);\n    }\n\n    /**\n     * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\n     */\n    function toUint(bool b) internal pure returns (uint256 u) {\n        assembly (\"memory-safe\") {\n            u := iszero(iszero(b))\n        }\n    }\n}\n"},"contracts/interfaces/IMetricOmmPool/IMetricOmmPoolActions.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\nimport {BinBalanceDelta, LiquidityDelta} from \"../../types/PoolOperation.sol\";\nimport {Packed2Int128, Packed2Uint128, PackedSwapDetails} from \"../../types/Packed.sol\";\n\n/// @title IMetricOmmPoolActions\n/// @notice User-facing mutators on Metric OMM pools: liquidity (shares per bin) and swap execution.\n/// @dev State reads live on the concrete pool or libraries. Liquidity paths use native ERC20 amounts in callbacks; bin events carry scaled balances (`BinBalanceDelta`, see `PoolOperation.sol`). Successful `swap` consults the live price provider and is blocked when `pauseLevel != 0` (`PoolPaused`); `addLiquidity` / `removeLiquidity` are not gated by pause so ops policy can diverge (e.g. unwind while swaps are off).\ninterface IMetricOmmPoolActions {\n  // ============ Events: Liquidity ============\n\n  /// @notice Liquidity was minted into one or more bins for a single position key.\n  /// @dev Arrays are parallel: `binIdxs[i]`, `binBalanceDeltas[i]`, and `shares[i]` describe the same bin. Zero-share rows remain in the arrays with zero deltas; indexers can reconcile bins from `binBalanceDeltas` (scaled) separately from callback token flows (native).\n  /// @param provider `owner` leg of the position key; indexed for position-scoped subscriptions.\n  /// @param salt `salt` leg of the position key; indexed with `provider` to disambiguate positions.\n  /// @param binIdxs Bin index per input row (pool-configured range).\n  /// @param binBalanceDeltas Scaled token0/token1 balance change inside each bin (`BinBalanceDelta`); not wallet transfer amounts.\n  /// @param shares Liquidity shares minted per input row for this position.\n  event LiquidityAdded(\n    address indexed provider,\n    uint80 indexed salt,\n    int256[] binIdxs,\n    BinBalanceDelta[] binBalanceDeltas,\n    uint256[] shares\n  );\n\n  /// @notice Liquidity was burned from one or more bins for a single position key.\n  /// @dev Same parallel-array layout as `LiquidityAdded`. `removeLiquidity` requires `msg.sender == owner`, so the position key always matches the caller for this event.\n  /// @param provider Position owner (equals `msg.sender` for the removing call).\n  /// @param salt Position salt with `provider` in the key.\n  /// @param binIdxs Bin index per input row.\n  /// @param binBalanceDeltas Scaled balance change per bin (non-positive: tokens leaving the bin).\n  /// @param shares Shares burned per input row.\n  event LiquidityRemoved(\n    address indexed provider,\n    uint80 indexed salt,\n    int256[] binIdxs,\n    BinBalanceDelta[] binBalanceDeltas,\n    uint256[] shares\n  );\n\n  // ============ Events: Swap ============\n\n  /// @notice One step of routing updated a bin during `swap` (may emit multiple times per call).\n  /// @dev Refer to types/Packed.sol to decode the packed values.\n  /// @param binIdx Bin touched in this step.\n  /// @param binDeltas Change in THAT BIN's scaled balances, packed: `high` = token0, `low` = token1.\n  /// @param fees This step's two fee legs, packed: `high` = LP leg (stays in the bin), `low` = platform leg (protocol + admin, withheld). Scaled units.\n  event BinSwapped(int256 binIdx, Packed2Int128 binDeltas, Packed2Uint128 fees);\n\n  /// @notice Terminal summary after a successful `swap`.\n  /// @dev Refer to types/Packed.sol to decode the packed values.\n  /// @param sender `msg.sender` of `swap` (the account that may receive swap callback).\n  /// @param recipient Address that received the output token leg.\n  /// @param details Swap mode and resulting bin position packed into one word: `exactInput()`,\n  ///        `binIdx()` (signed), `posInBin()`. Check details in PackedSwapDetailsLib.\n  /// @param amountDeltas Net native-token flows for the whole call, packed: `high` = token0, `low` = token1 (positive = the pool gained that token).\n  /// @param platformFees Platform (protocol + admin) fee for this swap on the input-token leg, packed: `high` = SPREAD leg, `low` = NOTIONAL leg. Scaled units.\n  event Swap(\n    address indexed sender,\n    address indexed recipient,\n    PackedSwapDetails details,\n    Packed2Int128 amountDeltas,\n    Packed2Uint128 platformFees\n  );\n\n  // ============ Errors: Liquidity ============\n\n  /// @notice Add or remove share delta is below the pool operational floor.\n  /// @dev Raised when non-zero `sharesToAdd` / `sharesToRemove` is `< MINIMAL_OPERATIONAL_LIQUIDITY`.\n  /// @param binIdx Bin where the offending delta was applied.\n  /// @param sharesDelta Offending share delta.\n  /// @param minimalRequired Pool immutable `MINIMAL_OPERATIONAL_LIQUIDITY`.\n  error SharesDeltaSmallerThanMinimalOperationalLiquidity(int256 binIdx, uint256 sharesDelta, uint256 minimalRequired);\n\n  /// @notice Remove would leave a non-zero position below the pool operational floor.\n  /// @dev Raised when leftover shares are `> 0` and `< MINIMAL_OPERATIONAL_LIQUIDITY`; remove more or exit to zero.\n  /// @param binIdx Bin where the leftover would remain.\n  /// @param leftovers Remaining shares after the attempted remove.\n  /// @param minimalRequired Pool immutable `MINIMAL_OPERATIONAL_LIQUIDITY`.\n  error LeftoversSmallerThanMinimalOperationalLiquidity(int256 binIdx, uint256 leftovers, uint256 minimalRequired);\n\n  /// @notice Burn asked for more shares than exist for that position in a bin.\n  /// @param requested `deltas.shares[i]` for the offending bin.\n  /// @param available Shares recorded for `owner`+`salt` in that bin when this entry is processed.\n  error InsufficientLiquidity(uint256 requested, uint256 available);\n\n  /// @notice The modify-liquidity callback sent fewer tokens than the pool debt for this add.\n  /// @dev Fires after the pool computed required `amount0`/`amount1` and invoked `msg.sender`; safe for retry once the callback actually pays.\n  error InsufficientTokenBalance();\n\n  /// @notice `removeLiquidity` caller is not the position owner.\n  /// @dev Only `owner` may burn; `addLiquidity` may use a different `msg.sender` when `owner` is supplied, but removal is stricter.\n  error NotPositionOwner();\n\n  /// @notice Deposit allowlist rejected this `owner` for `addLiquidity`.\n  /// @dev Never reverted by the pool itself; gating extensions raise it from the add-liquidity extension points.\n  error NotAllowedToDeposit();\n\n  /// @notice `LiquidityDelta` arrays are not the same length.\n  /// @dev Checked only for non-empty `binIdxs`; an empty array returns `(0, 0)`.\n  error LiquidityDeltaLengthMismatch();\n\n  /// @notice A bin index in `deltas.binIdxs` (or `setBinAdditionalFees`) is outside this pool’s\n  ///         `[LOWEST_BIN, HIGHEST_BIN]`.\n  /// @param binIdx First failing index from the caller payload.\n  error InvalidBinIndex(int256 binIdx);\n\n  /// @notice A row's shares exceed `type(uint192).max`, or its required scaled token amount exceeds `type(uint104).max`.\n  /// @dev Overflow of the resulting bin or pool totals reverts with a `SafeCast` error instead.\n  error SharesAmountTooLarge();\n\n  // ============ Errors: Swap ============\n\n  /// @notice Swap callback paid less than the input amount the pool requested.\n  /// @dev Distinct from `InsufficientTokenBalance` (liquidity path); the swap callback left the pool balance short of the input amount the pool requested.\n  error IncorrectDelta();\n\n  /// @notice Swap allowlist rejected the swap `sender` (`msg.sender` for `swap`, the supplied `sender` for `simulateSwapAndRevert`).\n  /// @dev Never reverted by the pool itself; gating extensions raise it from `beforeSwap`, which `swap` and `simulateSwapAndRevert` run identically.\n  error NotAllowedToSwap();\n\n  /// @notice `amountSpecified == 0` on `swap` / `simulateSwapAndRevert`.\n  error InvalidAmount();\n\n  /// @notice Swap math settled with a zero input or output delta (native units).\n  /// @dev After conversion to native units, either `amount0Delta` or `amount1Delta` is zero — e.g. price limit blocks all progress or amounts round away.\n  error FinalAmountIsZero();\n\n  /// @notice The scaled `amountSpecified` (native × token scale multiplier) exceeds `type(uint128).max`.\n  /// @dev Exact-output requests are capped to the pool's available output before this check.\n  error AmountScaledExceedsMax();\n\n  /// @notice A swap would write a bin's scaled token balance above `type(uint104).max`.\n  /// @dev Happens when the input credited to a bin would grow its incoming-side balance past the packed `BinState` width.\n  ///      That direction can remain blocked until liquidity is removed or the opposite swap drains the incoming side; prefer smaller bins / less dense liquidity.\n  /// @param attemptedScaledBalance The balance that would have been stored (internal scaled units).\n  error OverflowedOnFittingBinBalances(uint256 attemptedScaledBalance);\n\n  /// @notice Swaps are disabled while the pool pause level is non-zero.\n  /// @dev Pause level is factory-controlled; liquidity mutators are intentionally not blocked by the same check.\n  error PoolPaused();\n\n  /// @notice Bid price is not strictly below ask (`bidPriceX64 >= askPriceX64`).\n  /// @dev On `swap`, comes from the live `IPriceProvider` quote; on `simulateSwapAndRevert`, from the arguments you passed.\n  error BidGreaterThanAsk();\n\n  /// @notice Bid price was zero, so mid/spread cannot be formed.\n  /// @dev On `swap`, from the live provider; on `simulateSwapAndRevert`, from `bidPriceX64` you passed.\n  error BidIsZero();\n\n  /// @notice Reference price was not within `[bidPriceX64, askPriceX64]`, or was zero.\n  /// @dev On `swap`, from the live provider; on `simulateSwapAndRevert`, from `referencePriceX64` you passed.\n  error ReferencePriceOutOfRange();\n\n  /// @notice Bid/ask returns about the reference are too asymmetric for the pool's `bidAskRefAsymmetryX8` bound.\n  /// @dev With `r1 = reference/bid - 1`, `r2 = ask/reference - 1`, and `M = 1 + m` (`m` stored in X8), requires\n  ///      `1/M <= r1/r2 <= M`. Skipped when `bidAskRefAsymmetryX8 == type(uint16).max`. Otherwise a reference on bid/ask reverts.\n  error BidAskRefAsymmetryOutOfBounds();\n\n  /// @notice External call to the active `IPriceProvider` reverted or bubbled a failure.\n  /// @param reason Opaque revert data from the provider (decode off-chain if the provider documents errors).\n  error PriceProviderFailed(bytes reason);\n\n  /// @notice Deliberate revert carrying simulated swap deltas; no settlement callback or token transfers.\n  /// @dev Uses validated caller-supplied quotes and runs swap hooks, even while paused. All state changes revert.\n  ///      Both deltas must fit `int128` before `afterSwap`, despite the error using `int256` fields.\n  ///      Decode this error from revert data; execution failures propagate their own errors instead.\n  /// @param amount0Delta Net token0 the swap would move into (`>0`) or out of (`<0`) the pool (native decimals).\n  /// @param amount1Delta Net token1 the swap would move into or out of the pool (native decimals).\n  error SimulateSwap(int256 amount0Delta, int256 amount1Delta);\n\n  // ============ Mutating: Liquidity ============\n\n  /// @notice Mint shares across bins for `(owner, salt)`; pulls tokens via `IMetricOmmModifyLiquidityCallback` on `msg.sender`.\n  /// @dev Callback amounts round up per bin and again on conversion to native units; underpay reverts\n  ///      `InsufficientTokenBalance`. `msg.sender` pays but need not equal `owner`. Empty `binIdxs` skips hooks and callbacks.\n  /// @param owner Position owner encoded in the pool’s position key.\n  /// @param salt Caller-chosen second leg of the position key.\n  /// @param deltas Parallel `binIdxs` / `shares` arrays (see `LiquidityDelta`).\n  /// @param callbackData Opaque bytes forwarded unmodified to the modify-liquidity callback.\n  /// @param extensionData Opaque bytes forwarded to liquidity extensions (beforeAddLiquidity / afterAddLiquidity).\n  /// @return amount0Added Token0 amount the pool required from the callback (native).\n  /// @return amount1Added Token1 amount the pool required from the callback (native).\n  /// @dev Reverts `LiquidityDeltaLengthMismatch` when `binIdxs` is non-empty and its length differs from `shares`.\n  function addLiquidity(\n    address owner,\n    uint80 salt,\n    LiquidityDelta calldata deltas,\n    bytes calldata callbackData,\n    bytes calldata extensionData\n  ) external returns (uint256 amount0Added, uint256 amount1Added);\n\n  /// @notice Burn shares across bins for `(owner, salt)` and send underlying tokens to `owner`.\n  /// @dev Requires `msg.sender == owner` except for empty `binIdxs`, which returns `(0, 0)`.\n  ///      Payouts round down per bin and again on conversion to native units; no callback.\n  ///      Emptying the current bin resets its position to `0` for non-negative bins or `type(uint104).max` for negative bins.\n  /// @param owner Must equal `msg.sender`.\n  /// @param salt Position salt with `owner`.\n  /// @param deltas Parallel arrays of bins and share burns.\n  /// @param extensionData Opaque bytes forwarded to liquidity extensions (beforeRemoveLiquidity / afterRemoveLiquidity).\n  /// @return amount0Removed Total token0 sent from the pool to `owner` (native).\n  /// @return amount1Removed Total token1 sent from the pool to `owner` (native).\n  function removeLiquidity(address owner, uint80 salt, LiquidityDelta calldata deltas, bytes calldata extensionData)\n    external\n    returns (uint256 amount0Removed, uint256 amount1Removed);\n\n  // ============ Mutating: Swap ============\n\n  /// @notice Execute a spot swap against pool liquidity using live oracle prices.\n  /// @dev Pulls input from `msg.sender` through `IMetricOmmSwapCallback` after sending output to `recipient`.\n  /// @param recipient Address that receives the output token (sent before the callback; the swap reverts if the\n  ///        callback then underpays the input).\n  /// @param zeroForOne `true` sells token0 for token1 along the pool’s ordering.\n  /// @param amountSpecified Exact input if `>0`, exact output magnitude if `<0`, in native units of that leg.\n  ///        May be partially filled; check the returned deltas.\n  /// @param priceLimitX64 Fee-inclusive token1-per-token0 price in Q64.64: a floor when `zeroForOne`, a cap otherwise.\n  ///        Zero permits sells but prevents buys; rounding can significantly breach the bound for tiny amounts.\n  /// @param callbackData Opaque bytes forwarded to the swap callback.\n  /// @param extensionData Opaque bytes forwarded to swap extension point functions (beforeSwap / afterSwap).\n  /// @return amount0Delta Net token0 change for the pool (signed, native; positive = pool received).\n  /// @return amount1Delta Net token1 change for the pool (signed, native; positive = pool received).\n  function swap(\n    address recipient,\n    bool zeroForOne,\n    int128 amountSpecified,\n    uint128 priceLimitX64,\n    bytes calldata callbackData,\n    bytes calldata extensionData\n  ) external returns (int128 amount0Delta, int128 amount1Delta);\n\n  /// @notice Run swap math with caller-supplied bid/ask/reference; reverts with `SimulateSwap` on success or an execution error on failure.\n  /// @dev Does not use the pool’s live oracle prices for the mid—use for quotes/off-chain routing. Invokes the same swap extension point functions as `swap` when enabled; still enforces `priceLimitX64` and path logic; no ERC20 transfers or swap callback. Typical usage: `eth_call` or `try/catch` decoding `SimulateSwap`. `sender` is forwarded to the extension points as-is instead of `msg.sender`, so you can simulate as an arbitrary address (e.g. checking a sender-gated extension for a specific user) — safe only because the call always reverts and nothing persists.\n  /// @param sender Address forwarded to swap extension point functions in place of `msg.sender`; has no other effect since the call always reverts.\n  /// @param recipient Same as `swap` (forwarded to swap extension point functions).\n  /// @param zeroForOne Same as `swap`.\n  /// @param amountSpecified Same sign convention as `swap`.\n  /// @param priceLimitX64 Same encoding as `swap`.\n  /// @param bidPriceX64 Bid used for extension context and swap math in this simulation (Q64.64).\n  /// @param askPriceX64 Ask used for extension context and swap math in this simulation (Q64.64).\n  /// @param referencePriceX64 Reference price used as the mid/price-path anchor and for fee calculation in this simulation (Q64.64).\n  /// @param extensionData Opaque bytes forwarded to swap extension point functions (beforeSwap / afterSwap).\n  /// @return amount0Delta Unused in practice; values appear only on the reverting `SimulateSwap` error.\n  /// @return amount1Delta Unused in practice; values appear only on the reverting `SimulateSwap` error.\n  function simulateSwapAndRevert(\n    address sender,\n    address recipient,\n    bool zeroForOne,\n    int128 amountSpecified,\n    uint128 priceLimitX64,\n    uint128 bidPriceX64,\n    uint128 askPriceX64,\n    uint128 referencePriceX64,\n    bytes calldata extensionData\n  ) external returns (int128 amount0Delta, int128 amount1Delta);\n}\n"},"contracts/interfaces/IMetricOmmPool/IMetricOmmPoolCollectFees.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\n/// @title IMetricOmmPoolCollectFees\n/// @notice Allocate and distribute protocol and admin fee balances held on the pool.\n/// @dev Collection is factory-only. Unpaid allocations retain their split\n///      and are retried using the latest destinations. `ProtocolFeesCollected` reports amounts actually transferred.\ninterface IMetricOmmPoolCollectFees {\n  // ============ Events ============\n\n  event FeeTransferFailed(address indexed token, address indexed destination, uint256 amount);\n\n  /// @notice Emitted on every `collectFees` call; amounts are those actually transferred.\n  /// @param amount0ToProtocol Token0 amount sent to `protocolFeeDestination` (native).\n  /// @param amount1ToProtocol Token1 amount sent to `protocolFeeDestination` (native).\n  /// @param amount0ToAdmin Token0 amount sent to `adminFeeDestination` (native).\n  /// @param amount1ToAdmin Token1 amount sent to `adminFeeDestination` (native).\n  event ProtocolFeesCollected(\n    uint256 amount0ToProtocol, uint256 amount1ToProtocol, uint256 amount0ToAdmin, uint256 amount1ToAdmin\n  );\n\n  // ============ Mutating ============\n\n  /// @notice Allocate accrued fees using supplied rates, then attempt payouts including previously unpaid fees.\n  /// @dev Pending balances retain scaled rounding remainders; transfer failures do not revert allocation.\n  ///      Supported tokens must not move funds when reporting a failed transfer.\n  /// @param protocolSpreadFeeE6 Protocol spread component in E6 at collection time (must match factory policy).\n  /// @param adminSpreadFeeE6 Admin spread component in E6 at collection time.\n  /// @param protocolNotionalFeeE8 Protocol notional component in E8 at collection time.\n  /// @param adminNotionalFeeE8 Admin notional component in E8 at collection time.\n  /// @param adminFeeDestination Recipient for the admin share of collected tokens (per factory configuration).\n  /// @param protocolFeeDestination Recipient for the protocol share (the factory's `feeReceiver`).\n  function collectFees(\n    uint256 protocolSpreadFeeE6,\n    uint256 adminSpreadFeeE6,\n    uint256 protocolNotionalFeeE8,\n    uint256 adminNotionalFeeE8,\n    address adminFeeDestination,\n    address protocolFeeDestination\n  ) external;\n}\n"},"contracts/interfaces/IMetricOmmPool/IMetricOmmPoolFactoryActions.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\n/// @title IMetricOmmPoolFactoryActions\n/// @notice Entrypoints on `MetricOmmPool` that only the pool factory may call (`msg.sender == FACTORY`).\n/// @dev Integrators must use `MetricOmmPoolFactory` (owner or pool admin flows); calling these on the pool directly reverts with `OnlyFactory` unless `msg.sender` is the factory contract address.\ninterface IMetricOmmPoolFactoryActions {\n  // ============ Events ============\n\n  /// @notice Emitted when the platform share of the spread fee on the pool is updated.\n  /// @param spreadFeeE6 New platform share of the spread fee in E6 (`1e6 = 100%`).\n  event SpreadFeeUpdated(uint24 spreadFeeE6);\n\n  /// @notice Emitted when total notional fee on the pool is updated.\n  /// @param notionalFeeE8 New aggregate notional fee in E8 (`1e8 = 100%`).\n  event NotionalFeeUpdated(uint24 notionalFeeE8);\n\n  /// @notice Emitted when pause level changes.\n  /// @param previousLevel Prior pause level (`0` active, `1` admin pause, `2` protocol pause).\n  /// @param newLevel New pause level after the update.\n  event PauseLevelUpdated(uint8 previousLevel, uint8 newLevel);\n\n  /// @notice Emitted when the mutable price provider address stored on the pool is updated.\n  /// @param newPriceProvider New active `IPriceProvider` (immutable pools never emit this from rotation).\n  event PriceProviderUpdated(address indexed newPriceProvider);\n\n  /// @notice Emitted when per-bin additional spread fees are set.\n  /// @param bin Bin index whose overrides were updated.\n  /// @param addFeeBuyE6 Additional buy-side spread fee in E6 on top of base spread.\n  /// @param addFeeSellE6 Additional sell-side spread fee in E6 on top of base spread.\n  event BinAdditionalFeesUpdated(int16 indexed bin, uint16 addFeeBuyE6, uint16 addFeeSellE6);\n\n  /// @notice Emitted when bid/ask/ref asymmetry slack `m` in X8 is updated (`M = 1 + m`).\n  /// @param bidAskRefAsymmetryX8 New asymmetry bound; `type(uint16).max` disables the check.\n  event BidAskRefAsymmetryUpdated(uint16 bidAskRefAsymmetryX8);\n\n  // ============ Errors ============\n\n  /// @notice Thrown when `msg.sender` is not the pool factory.\n  error OnlyFactory();\n\n  /// @notice Thrown when `setPause` is called with a level outside `0..2`.\n  error InvalidPauseLevel();\n\n  // ============ Mutating ============\n\n  /// @notice Set aggregate pool spread and notional fee rates (sum of protocol + admin components).\n  /// @param newSpreadFeeE6 Platform share (protocol + admin) of the spread fee in E6 (`1e6 = 100%`).\n  /// @param newNotionalFeeE8 Total notional fee in E8 (`1e8 = 100%`).\n  function setPoolFees(uint24 newSpreadFeeE6, uint24 newNotionalFeeE8) external;\n\n  /// @notice Update bid/ask/reference asymmetry bound `m` in X8 (`type(uint16).max` disables the check).\n  function setBidAskRefAsymmetryX8(uint16 newBidAskRefAsymmetryX8) external;\n\n  /// @notice Set pool pause level (`0` active, `1` admin paused, `2` protocol paused).\n  /// @dev Transition rules are enforced by the factory, not the pool.\n  /// @param newLevel Pause level enforced by the pool; must be at most `2`.\n  function setPause(uint8 newLevel) external;\n\n  /// @notice Set per-bin additional buy and sell spread fees in E6 on top of base spread.\n  /// @param bin Bin index within the pool configured bin range.\n  /// @param addFeeBuyE6 Additional fee on swaps buying token0 (E6).\n  /// @param addFeeSellE6 Additional fee on swaps selling token0 (E6).\n  function setBinAdditionalFees(int16 bin, uint16 addFeeBuyE6, uint16 addFeeSellE6) external;\n\n  /// @notice Update the pool active price provider (the factory only calls this for pools created with a mutable provider).\n  /// @param newPriceProvider New provider contract; the factory validates its `token0`/`token1`, the pool stores it as given.\n  function setPriceProvider(address newPriceProvider) external;\n}\n"},"contracts/interfaces/callbacks/IMetricOmmModifyLiquidityCallback.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.35;\n\n/// @title IMetricOmmModifyLiquidityCallback\n/// @notice Callback invoked by the pool during `addLiquidity` (unless nothing is owed) so the caller can transfer\n///         tokens owed to the pool.\n/// @dev Implementations must treat `msg.sender` as the pool address they intended to call (verify against a known pool).\n///      After the callback returns, the pool checks balances: for each token, if the owed delta is positive, the pool\n///      balance must have increased by at least that amount or the call reverts.\ninterface IMetricOmmModifyLiquidityCallback {\n  // ============ Mutating ============\n\n  /// @notice Pay token0 and token1 amounts owed to the pool after liquidity is added.\n  /// @param amount0Delta Token0 amount the pool must receive (native smallest units).\n  /// @param amount1Delta Token1 amount the pool must receive (native smallest units).\n  /// @param callbackData Opaque bytes forwarded from addLiquidity; conventionally ABI-encoded router context.\n  function metricOmmModifyLiquidityCallback(uint256 amount0Delta, uint256 amount1Delta, bytes calldata callbackData)\n    external;\n}\n"},"lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\nimport {IERC1363} from \"../../../interfaces/IERC1363.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC-20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n    /**\n     * @dev An operation with an ERC-20 token failed.\n     */\n    error SafeERC20FailedOperation(address token);\n\n    /**\n     * @dev Indicates a failed `decreaseAllowance` request.\n     */\n    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);\n\n    /**\n     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful.\n     */\n    function safeTransfer(IERC20 token, address to, uint256 value) internal {\n        if (!_safeTransfer(token, to, value, true)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\n     */\n    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n        if (!_safeTransferFrom(token, from, to, value, true)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\n     */\n    function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\n        return _safeTransfer(token, to, value, false);\n    }\n\n    /**\n     * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\n     */\n    function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\n        return _safeTransferFrom(token, from, to, value, false);\n    }\n\n    /**\n     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful.\n     *\n     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n     * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n     */\n    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n        uint256 oldAllowance = token.allowance(address(this), spender);\n        forceApprove(token, spender, oldAllowance + value);\n    }\n\n    /**\n     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no\n     * value, non-reverting calls are assumed to be successful.\n     *\n     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n     * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n     */\n    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {\n        unchecked {\n            uint256 currentAllowance = token.allowance(address(this), spender);\n            if (currentAllowance < requestedDecrease) {\n                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);\n            }\n            forceApprove(token, spender, currentAllowance - requestedDecrease);\n        }\n    }\n\n    /**\n     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\n     * to be set to zero before setting it to a non-zero value, such as USDT.\n     *\n     * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\n     * only sets the \"standard\" allowance. Any temporary allowance will remain active, in addition to the value being\n     * set here.\n     */\n    function forceApprove(IERC20 token, address spender, uint256 value) internal {\n        if (!_safeApprove(token, spender, value, false)) {\n            if (!_safeApprove(token, spender, 0, true)) revert SafeERC20FailedOperation(address(token));\n            if (!_safeApprove(token, spender, value, true)) revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\n     * code. This can be used to implement an {ERC721}-like safe transfer that relies on {ERC1363} checks when\n     * targeting contracts.\n     *\n     * Reverts if the returned value is other than `true`.\n     */\n    function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n        if (to.code.length == 0) {\n            safeTransfer(token, to, value);\n        } else if (!token.transferAndCall(to, value, data)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\n     * has no code. This can be used to implement an {ERC721}-like safe transfer that relies on {ERC1363} checks when\n     * targeting contracts.\n     *\n     * Reverts if the returned value is other than `true`.\n     */\n    function transferFromAndCallRelaxed(\n        IERC1363 token,\n        address from,\n        address to,\n        uint256 value,\n        bytes memory data\n    ) internal {\n        if (to.code.length == 0) {\n            safeTransferFrom(token, from, to, value);\n        } else if (!token.transferFromAndCall(from, to, value, data)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\n     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n     * targeting contracts.\n     *\n     * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\n     * Oppositely, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\n     * once without retrying, and relies on the returned value to be true.\n     *\n     * Reverts if the returned value is other than `true`.\n     */\n    function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n        if (to.code.length == 0) {\n            forceApprove(token, to, value);\n        } else if (!token.approveAndCall(to, value, data)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity `token.transfer(to, value)` call, relaxing the requirement on the return value: the\n     * return value is optional (but if data is returned, it must not be false).\n     *\n     * @param token The token targeted by the call.\n     * @param to The recipient of the tokens\n     * @param value The amount of token to transfer\n     * @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.\n     */\n    function _safeTransfer(IERC20 token, address to, uint256 value, bool bubble) private returns (bool success) {\n        bytes4 selector = IERC20.transfer.selector;\n\n        assembly (\"memory-safe\") {\n            let fmp := mload(0x40)\n            mstore(0x00, selector)\n            mstore(0x04, and(to, shr(96, not(0))))\n            mstore(0x24, value)\n            success := call(gas(), token, 0, 0x00, 0x44, 0x00, 0x20)\n            // if call success and return is true, all is good.\n            // otherwise (not success or return is not true), we need to perform further checks\n            if iszero(and(success, eq(mload(0x00), 1))) {\n                // if the call was a failure and bubble is enabled, bubble the error\n                if and(iszero(success), bubble) {\n                    returndatacopy(fmp, 0x00, returndatasize())\n                    revert(fmp, returndatasize())\n                }\n                // if the return value is not true, then the call is only successful if:\n                // - the token address has code\n                // - the returndata is empty\n                success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))\n            }\n            mstore(0x40, fmp)\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity `token.transferFrom(from, to, value)` call, relaxing the requirement on the return\n     * value: the return value is optional (but if data is returned, it must not be false).\n     *\n     * @param token The token targeted by the call.\n     * @param from The sender of the tokens\n     * @param to The recipient of the tokens\n     * @param value The amount of token to transfer\n     * @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.\n     */\n    function _safeTransferFrom(\n        IERC20 token,\n        address from,\n        address to,\n        uint256 value,\n        bool bubble\n    ) private returns (bool success) {\n        bytes4 selector = IERC20.transferFrom.selector;\n\n        assembly (\"memory-safe\") {\n            let fmp := mload(0x40)\n            mstore(0x00, selector)\n            mstore(0x04, and(from, shr(96, not(0))))\n            mstore(0x24, and(to, shr(96, not(0))))\n            mstore(0x44, value)\n            success := call(gas(), token, 0, 0x00, 0x64, 0x00, 0x20)\n            // if call success and return is true, all is good.\n            // otherwise (not success or return is not true), we need to perform further checks\n            if iszero(and(success, eq(mload(0x00), 1))) {\n                // if the call was a failure and bubble is enabled, bubble the error\n                if and(iszero(success), bubble) {\n                    returndatacopy(fmp, 0x00, returndatasize())\n                    revert(fmp, returndatasize())\n                }\n                // if the return value is not true, then the call is only successful if:\n                // - the token address has code\n                // - the returndata is empty\n                success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))\n            }\n            mstore(0x40, fmp)\n            mstore(0x60, 0)\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity `token.approve(spender, value)` call, relaxing the requirement on the return value:\n     * the return value is optional (but if data is returned, it must not be false).\n     *\n     * @param token The token targeted by the call.\n     * @param spender The spender of the tokens\n     * @param value The amount of token to transfer\n     * @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.\n     */\n    function _safeApprove(IERC20 token, address spender, uint256 value, bool bubble) private returns (bool success) {\n        bytes4 selector = IERC20.approve.selector;\n\n        assembly (\"memory-safe\") {\n            let fmp := mload(0x40)\n            mstore(0x00, selector)\n            mstore(0x04, and(spender, shr(96, not(0))))\n            mstore(0x24, value)\n            success := call(gas(), token, 0, 0x00, 0x44, 0x00, 0x20)\n            // if call success and return is true, all is good.\n            // otherwise (not success or return is not true), we need to perform further checks\n            if iszero(and(success, eq(mload(0x00), 1))) {\n                // if the call was a failure and bubble is enabled, bubble the error\n                if and(iszero(success), bubble) {\n                    returndatacopy(fmp, 0x00, returndatasize())\n                    revert(fmp, returndatasize())\n                }\n                // if the return value is not true, then the call is only successful if:\n                // - the token address has code\n                // - the returndata is empty\n                success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))\n            }\n            mstore(0x40, fmp)\n        }\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\n\npragma solidity >=0.4.16;\n\n/**\n * @dev Interface of the ERC-165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n    /**\n     * @dev Returns true if this contract implements the interface defined by\n     * `interfaceId`. See the corresponding\n     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]\n     * to learn more about how these ids are created.\n     *\n     * This function call must use less than 30 000 gas.\n     */\n    function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n"}},"language":"Solidity","settings":{"viaIR":true,"metadata":{"appendCBOR":true,"bytecodeHash":"none","useLiteralContent":false},"libraries":{"contracts/MetricOmmPool.sol":{"LiquidityLib":"0xe0b1576ac63a582e6740a7e1dcfbbef730539cd4"}},"optimizer":{"runs":1999,"enabled":true},"evmVersion":"cancun","remappings":["forge-std/=lib/forge-std/src/","@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/","openzeppelin-contracts/=lib/openzeppelin-contracts/","erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/","halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/"]}},"stdJsonOutput":{"sources":{"contracts/Extsload.sol":{"id":1},"contracts/types/Slot0.sol":{"id":24},"contracts/types/Packed.sol":{"id":20},"contracts/MetricOmmPool.sol":{"id":2},"contracts/ExtensionCalling.sol":{"id":0},"contracts/libraries/FeeMath.sol":{"id":13},"contracts/types/PoolStorage.sol":{"id":23},"contracts/libraries/SwapMath.sol":{"id":19},"contracts/types/PoolOperation.sol":{"id":22},"contracts/interfaces/IExtsload.sol":{"id":3},"contracts/libraries/SignedMath.sol":{"id":17},"contracts/libraries/PoolActions.sol":{"id":15},"contracts/libraries/LiquidityLib.sol":{"id":14},"contracts/libraries/Slot0Library.sol":{"id":18},"contracts/libraries/CallExtension.sol":{"id":12},"contracts/libraries/PoolStateLibrary.sol":{"id":16},"contracts/types/PoolExtensionsConfig.sol":{"id":21},"contracts/utils/MetricReentrancyGuardTransient.sol":{"id":25},"lib/openzeppelin-contracts/contracts/utils/Panic.sol":{"id":31},"contracts/interfaces/IMetricOmmPool/IMetricOmmPool.sol":{"id":4},"contracts/interfaces/IPriceProvider/IPriceProvider.sol":{"id":8},"contracts/interfaces/extensions/IMetricOmmExtensions.sol":{"id":11},"lib/openzeppelin-contracts/contracts/utils/math/Math.sol":{"id":34},"contracts/interfaces/callbacks/IMetricOmmSwapCallback.sol":{"id":10},"lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol":{"id":28},"lib/openzeppelin-contracts/contracts/interfaces/IERC165.sol":{"id":27},"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol":{"id":29},"lib/openzeppelin-contracts/contracts/interfaces/IERC1363.sol":{"id":26},"lib/openzeppelin-contracts/contracts/utils/TransientSlot.sol":{"id":32},"lib/openzeppelin-contracts/contracts/utils/math/SafeCast.sol":{"id":35},"contracts/interfaces/IMetricOmmPool/IMetricOmmPoolActions.sol":{"id":5},"contracts/interfaces/IMetricOmmPool/IMetricOmmPoolCollectFees.sol":{"id":6},"contracts/interfaces/IMetricOmmPool/IMetricOmmPoolFactoryActions.sol":{"id":7},"contracts/interfaces/callbacks/IMetricOmmModifyLiquidityCallback.sol":{"id":9},"lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol":{"id":30},"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol":{"id":33}},"contracts":{"contracts/MetricOmmPool.sol":{"MetricOmmPool":{"abi":[{"type":"constructor","inputs":[{"name":"factory","type":"address","internalType":"address"},{"name":"token0","type":"address","internalType":"address"},{"name":"token1","type":"address","internalType":"address"},{"name":"priceProvider_","type":"address","internalType":"address"},{"name":"extensions","type":"tuple","components":[{"name":"extension1","type":"address","internalType":"address"},{"name":"extension2","type":"address","internalType":"address"},{"name":"extension3","type":"address","internalType":"address"},{"name":"extension4","type":"address","internalType":"address"},{"name":"extension5","type":"address","internalType":"address"},{"name":"extension6","type":"address","internalType":"address"},{"name":"extension7","type":"address","internalType":"address"}],"internalType":"struct PoolExtensions"},{"name":"extensionOrders","type":"tuple","components":[{"name":"beforeAddLiquidity","type":"uint256","internalType":"uint256"},{"name":"afterAddLiquidity","type":"uint256","internalType":"uint256"},{"name":"beforeRemoveLiquidity","type":"uint256","internalType":"uint256"},{"name":"afterRemoveLiquidity","type":"uint256","internalType":"uint256"},{"name":"beforeSwap","type":"uint256","internalType":"uint256"},{"name":"afterSwap","type":"uint256","internalType":"uint256"}],"internalType":"struct ExtensionOrders"},{"name":"immutablePriceProvider","type":"bool","internalType":"bool"},{"name":"token0ScaleMultiplier","type":"uint256","internalType":"uint256"},{"name":"token1ScaleMultiplier","type":"uint256","internalType":"uint256"},{"name":"initialScaledAmount0PerShareE18","type":"uint256","internalType":"uint256"},{"name":"initialScaledAmount1PerShareE18","type":"uint256","internalType":"uint256"},{"name":"minimalOperationalLiquidity","type":"uint256","internalType":"uint256"},{"name":"spreadFeeE6_","type":"uint24","internalType":"uint24"},{"name":"initialCurBinDistFromProvidedPriceE6","type":"int24","internalType":"int24"},{"name":"nonNegativeBinStates","type":"tuple[]","components":[{"name":"token0BalanceScaled","type":"uint104","internalType":"uint104"},{"name":"token1BalanceScaled","type":"uint104","internalType":"uint104"},{"name":"lengthE6","type":"uint16","internalType":"uint16"},{"name":"addFeeBuyE6","type":"uint16","internalType":"uint16"},{"name":"addFeeSellE6","type":"uint16","internalType":"uint16"}],"internalType":"struct BinState[]"},{"name":"negativeBinStates","type":"tuple[]","components":[{"name":"token0BalanceScaled","type":"uint104","internalType":"uint104"},{"name":"token1BalanceScaled","type":"uint104","internalType":"uint104"},{"name":"lengthE6","type":"uint16","internalType":"uint16"},{"name":"addFeeBuyE6","type":"uint16","internalType":"uint16"},{"name":"addFeeSellE6","type":"uint16","internalType":"uint16"}],"internalType":"struct BinState[]"},{"name":"notionalFeeE8_","type":"uint24","internalType":"uint24"},{"name":"bidAskRefAsymmetryX8_","type":"uint16","internalType":"uint16"}],"stateMutability":"nonpayable"},{"name":"AmountScaledExceedsMax","type":"error","inputs":[]},{"name":"BidAskRefAsymmetryOutOfBounds","type":"error","inputs":[]},{"name":"BidGreaterThanAsk","type":"error","inputs":[]},{"name":"BidIsZero","type":"error","inputs":[]},{"name":"ExtensionCallFailed","type":"error","inputs":[]},{"name":"FinalAmountIsZero","type":"error","inputs":[]},{"name":"IncorrectDelta","type":"error","inputs":[]},{"name":"InsufficientLiquidity","type":"error","inputs":[{"name":"requested","type":"uint256","internalType":"uint256"},{"name":"available","type":"uint256","internalType":"uint256"}]},{"name":"InsufficientTokenBalance","type":"error","inputs":[]},{"name":"InvalidAmount","type":"error","inputs":[]},{"name":"InvalidBinIndex","type":"error","inputs":[{"name":"binIdx","type":"int256","internalType":"int256"}]},{"name":"InvalidExtensionResponse","type":"error","inputs":[]},{"name":"InvalidPauseLevel","type":"error","inputs":[]},{"name":"LeftoversSmallerThanMinimalOperationalLiquidity","type":"error","inputs":[{"name":"binIdx","type":"int256","internalType":"int256"},{"name":"leftovers","type":"uint256","internalType":"uint256"},{"name":"minimalRequired","type":"uint256","internalType":"uint256"}]},{"name":"LiquidityDeltaLengthMismatch","type":"error","inputs":[]},{"name":"NotAllowedToDeposit","type":"error","inputs":[]},{"name":"NotAllowedToSwap","type":"error","inputs":[]},{"name":"NotPositionOwner","type":"error","inputs":[]},{"name":"OnlyFactory","type":"error","inputs":[]},{"name":"OverflowedOnFittingBinBalances","type":"error","inputs":[{"name":"attemptedScaledBalance","type":"uint256","internalType":"uint256"}]},{"name":"PanicEmptyExtension","type":"error","inputs":[]},{"name":"PanicInvalidExtensionIndex","type":"error","inputs":[]},{"name":"PoolPaused","type":"error","inputs":[]},{"name":"PriceProviderFailed","type":"error","inputs":[{"name":"reason","type":"bytes","internalType":"bytes"}]},{"name":"ReentrancyGuardReentrantCall","type":"error","inputs":[]},{"name":"ReferencePriceOutOfRange","type":"error","inputs":[]},{"name":"SafeCastOverflowedIntDowncast","type":"error","inputs":[{"name":"bits","type":"uint8","internalType":"uint8"},{"name":"value","type":"int256","internalType":"int256"}]},{"name":"SafeCastOverflowedUintDowncast","type":"error","inputs":[{"name":"bits","type":"uint8","internalType":"uint8"},{"name":"value","type":"uint256","internalType":"uint256"}]},{"name":"SafeCastOverflowedUintToInt","type":"error","inputs":[{"name":"value","type":"uint256","internalType":"uint256"}]},{"name":"SafeERC20FailedOperation","type":"error","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"name":"SharesAmountTooLarge","type":"error","inputs":[]},{"name":"SharesDeltaSmallerThanMinimalOperationalLiquidity","type":"error","inputs":[{"name":"binIdx","type":"int256","internalType":"int256"},{"name":"sharesDelta","type":"uint256","internalType":"uint256"},{"name":"minimalRequired","type":"uint256","internalType":"uint256"}]},{"name":"SimulateSwap","type":"error","inputs":[{"name":"amount0Delta","type":"int256","internalType":"int256"},{"name":"amount1Delta","type":"int256","internalType":"int256"}]},{"name":"BidAskRefAsymmetryUpdated","type":"event","inputs":[{"name":"bidAskRefAsymmetryX8","type":"uint16","indexed":false,"internalType":"uint16"}],"anonymous":false},{"name":"BinAdditionalFeesUpdated","type":"event","inputs":[{"name":"bin","type":"int16","indexed":true,"internalType":"int16"},{"name":"addFeeBuyE6","type":"uint16","indexed":false,"internalType":"uint16"},{"name":"addFeeSellE6","type":"uint16","indexed":false,"internalType":"uint16"}],"anonymous":false},{"name":"BinSwapped","type":"event","inputs":[{"name":"binIdx","type":"int256","indexed":false,"internalType":"int256"},{"name":"binDeltas","type":"uint256","indexed":false,"internalType":"Packed2Int128"},{"name":"fees","type":"uint256","indexed":false,"internalType":"Packed2Uint128"}],"anonymous":false},{"name":"FeeTransferFailed","type":"event","inputs":[{"name":"token","type":"address","indexed":true,"internalType":"address"},{"name":"destination","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"LiquidityAdded","type":"event","inputs":[{"name":"provider","type":"address","indexed":true,"internalType":"address"},{"name":"salt","type":"uint80","indexed":true,"internalType":"uint80"},{"name":"binIdxs","type":"int256[]","indexed":false,"internalType":"int256[]"},{"name":"binBalanceDeltas","type":"tuple[]","indexed":false,"components":[{"name":"delta0Scaled","type":"int256","internalType":"int256"},{"name":"delta1Scaled","type":"int256","internalType":"int256"}],"internalType":"struct BinBalanceDelta[]"},{"name":"shares","type":"uint256[]","indexed":false,"internalType":"uint256[]"}],"anonymous":false},{"name":"LiquidityRemoved","type":"event","inputs":[{"name":"provider","type":"address","indexed":true,"internalType":"address"},{"name":"salt","type":"uint80","indexed":true,"internalType":"uint80"},{"name":"binIdxs","type":"int256[]","indexed":false,"internalType":"int256[]"},{"name":"binBalanceDeltas","type":"tuple[]","indexed":false,"components":[{"name":"delta0Scaled","type":"int256","internalType":"int256"},{"name":"delta1Scaled","type":"int256","internalType":"int256"}],"internalType":"struct BinBalanceDelta[]"},{"name":"shares","type":"uint256[]","indexed":false,"internalType":"uint256[]"}],"anonymous":false},{"name":"NotionalFeeUpdated","type":"event","inputs":[{"name":"notionalFeeE8","type":"uint24","indexed":false,"internalType":"uint24"}],"anonymous":false},{"name":"PauseLevelUpdated","type":"event","inputs":[{"name":"previousLevel","type":"uint8","indexed":false,"internalType":"uint8"},{"name":"newLevel","type":"uint8","indexed":false,"internalType":"uint8"}],"anonymous":false},{"name":"PriceProviderUpdated","type":"event","inputs":[{"name":"newPriceProvider","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"name":"ProtocolFeesCollected","type":"event","inputs":[{"name":"amount0ToProtocol","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"amount1ToProtocol","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"amount0ToAdmin","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"amount1ToAdmin","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"SpreadFeeUpdated","type":"event","inputs":[{"name":"spreadFeeE6","type":"uint24","indexed":false,"internalType":"uint24"}],"anonymous":false},{"name":"Swap","type":"event","inputs":[{"name":"sender","type":"address","indexed":true,"internalType":"address"},{"name":"recipient","type":"address","indexed":true,"internalType":"address"},{"name":"details","type":"uint256","indexed":false,"internalType":"PackedSwapDetails"},{"name":"amountDeltas","type":"uint256","indexed":false,"internalType":"Packed2Int128"},{"name":"platformFees","type":"uint256","indexed":false,"internalType":"Packed2Uint128"}],"anonymous":false},{"name":"addLiquidity","type":"function","inputs":[{"name":"owner","type":"address","internalType":"address"},{"name":"salt","type":"uint80","internalType":"uint80"},{"name":"deltas","type":"tuple","components":[{"name":"binIdxs","type":"int256[]","internalType":"int256[]"},{"name":"shares","type":"uint256[]","internalType":"uint256[]"}],"internalType":"struct LiquidityDelta"},{"name":"callbackData","type":"bytes","internalType":"bytes"},{"name":"extensionData","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"amount0Added","type":"uint256","internalType":"uint256"},{"name":"amount1Added","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"name":"collectFees","type":"function","inputs":[{"name":"protocolSpreadFeeE6","type":"uint256","internalType":"uint256"},{"name":"adminSpreadFeeE6","type":"uint256","internalType":"uint256"},{"name":"protocolNotionalFeeE8","type":"uint256","internalType":"uint256"},{"name":"adminNotionalFeeE8","type":"uint256","internalType":"uint256"},{"name":"adminFeeDestination","type":"address","internalType":"address"},{"name":"protocolFeeDestination","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"extsload","type":"function","inputs":[{"name":"slot","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"name":"extsload","type":"function","inputs":[{"name":"startSlot","type":"bytes32","internalType":"bytes32"},{"name":"nSlots","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bytes32[]","internalType":"bytes32[]"}],"stateMutability":"view"},{"name":"extsload","type":"function","inputs":[{"name":"slots","type":"bytes32[]","internalType":"bytes32[]"}],"outputs":[{"name":"","type":"bytes32[]","internalType":"bytes32[]"}],"stateMutability":"view"},{"name":"getImmutables","type":"function","inputs":[],"outputs":[{"name":"","type":"tuple","components":[{"name":"factory","type":"address","internalType":"address"},{"name":"token0","type":"address","internalType":"address"},{"name":"token1","type":"address","internalType":"address"},{"name":"token0ScaleMultiplier","type":"uint256","internalType":"uint256"},{"name":"token1ScaleMultiplier","type":"uint256","internalType":"uint256"},{"name":"initialScaledToken0PerShareE18","type":"uint256","internalType":"uint256"},{"name":"initialScaledToken1PerShareE18","type":"uint256","internalType":"uint256"},{"name":"minimalOperationalLiquidity","type":"uint256","internalType":"uint256"},{"name":"immutablePriceProvider","type":"address","internalType":"address"},{"name":"lowestBin","type":"int256","internalType":"int256"},{"name":"highestBin","type":"int256","internalType":"int256"},{"name":"extension1","type":"address","internalType":"address"},{"name":"extension2","type":"address","internalType":"address"},{"name":"extension3","type":"address","internalType":"address"},{"name":"extension4","type":"address","internalType":"address"},{"name":"extension5","type":"address","internalType":"address"},{"name":"extension6","type":"address","internalType":"address"},{"name":"extension7","type":"address","internalType":"address"},{"name":"beforeAddLiquidityOrder","type":"uint256","internalType":"uint256"},{"name":"afterAddLiquidityOrder","type":"uint256","internalType":"uint256"},{"name":"beforeRemoveLiquidityOrder","type":"uint256","internalType":"uint256"},{"name":"afterRemoveLiquidityOrder","type":"uint256","internalType":"uint256"},{"name":"beforeSwapOrder","type":"uint256","internalType":"uint256"},{"name":"afterSwapOrder","type":"uint256","internalType":"uint256"}],"internalType":"struct PoolImmutables"}],"stateMutability":"view"},{"name":"getSellAndBuyPrices","type":"function","inputs":[],"outputs":[{"name":"sellPriceX64","type":"uint128","internalType":"uint128"},{"name":"buyPriceX64","type":"uint128","internalType":"uint128"}],"stateMutability":"nonpayable"},{"name":"inSwap","type":"function","inputs":[],"outputs":[{"name":"priceProvider_","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"removeLiquidity","type":"function","inputs":[{"name":"owner","type":"address","internalType":"address"},{"name":"salt","type":"uint80","internalType":"uint80"},{"name":"deltas","type":"tuple","components":[{"name":"binIdxs","type":"int256[]","internalType":"int256[]"},{"name":"shares","type":"uint256[]","internalType":"uint256[]"}],"internalType":"struct LiquidityDelta"},{"name":"extensionData","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"amount0Removed","type":"uint256","internalType":"uint256"},{"name":"amount1Removed","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"name":"setBidAskRefAsymmetryX8","type":"function","inputs":[{"name":"newBidAskRefAsymmetryX8","type":"uint16","internalType":"uint16"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setBinAdditionalFees","type":"function","inputs":[{"name":"bin","type":"int16","internalType":"int16"},{"name":"addFeeBuyE6","type":"uint16","internalType":"uint16"},{"name":"addFeeSellE6","type":"uint16","internalType":"uint16"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setPause","type":"function","inputs":[{"name":"newLevel","type":"uint8","internalType":"uint8"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setPoolFees","type":"function","inputs":[{"name":"newSpreadFeeE6","type":"uint24","internalType":"uint24"},{"name":"newNotionalFeeE8","type":"uint24","internalType":"uint24"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setPriceProvider","type":"function","inputs":[{"name":"newPriceProvider","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"simulateSwapAndRevert","type":"function","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"recipient","type":"address","internalType":"address"},{"name":"zeroForOne","type":"bool","internalType":"bool"},{"name":"amountSpecified","type":"int128","internalType":"int128"},{"name":"priceLimitX64","type":"uint128","internalType":"uint128"},{"name":"bidPriceX64","type":"uint128","internalType":"uint128"},{"name":"askPriceX64","type":"uint128","internalType":"uint128"},{"name":"referencePriceX64","type":"uint128","internalType":"uint128"},{"name":"extensionData","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"int128","internalType":"int128"},{"name":"","type":"int128","internalType":"int128"}],"stateMutability":"nonpayable"},{"name":"swap","type":"function","inputs":[{"name":"recipient","type":"address","internalType":"address"},{"name":"zeroForOne","type":"bool","internalType":"bool"},{"name":"amountSpecified","type":"int128","internalType":"int128"},{"name":"priceLimitX64","type":"uint128","internalType":"uint128"},{"name":"callbackData","type":"bytes","internalType":"bytes"},{"name":"extensionData","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"int128","internalType":"int128"},{"name":"","type":"int128","internalType":"int128"}],"stateMutability":"nonpayable"}],"metadata":"{\"compiler\":{\"version\":\"0.8.35+commit.47b9dedd\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"factory\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token0\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token1\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"priceProvider_\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"extension1\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"extension2\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"extension3\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"extension4\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"extension5\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"extension6\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"extension7\",\"type\":\"address\"}],\"internalType\":\"struct PoolExtensions\",\"name\":\"extensions\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"beforeAddLiquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"afterAddLiquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"beforeRemoveLiquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"afterRemoveLiquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"beforeSwap\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"afterSwap\",\"type\":\"uint256\"}],\"internalType\":\"struct ExtensionOrders\",\"name\":\"extensionOrders\",\"type\":\"tuple\"},{\"internalType\":\"bool\",\"name\":\"immutablePriceProvider\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"token0ScaleMultiplier\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"token1ScaleMultiplier\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"initialScaledAmount0PerShareE18\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"initialScaledAmount1PerShareE18\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minimalOperationalLiquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint24\",\"name\":\"spreadFeeE6_\",\"type\":\"uint24\"},{\"internalType\":\"int24\",\"name\":\"initialCurBinDistFromProvidedPriceE6\",\"type\":\"int24\"},{\"components\":[{\"internalType\":\"uint104\",\"name\":\"token0BalanceScaled\",\"type\":\"uint104\"},{\"internalType\":\"uint104\",\"name\":\"token1BalanceScaled\",\"type\":\"uint104\"},{\"internalType\":\"uint16\",\"name\":\"lengthE6\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"addFeeBuyE6\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"addFeeSellE6\",\"type\":\"uint16\"}],\"internalType\":\"struct BinState[]\",\"name\":\"nonNegativeBinStates\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"uint104\",\"name\":\"token0BalanceScaled\",\"type\":\"uint104\"},{\"internalType\":\"uint104\",\"name\":\"token1BalanceScaled\",\"type\":\"uint104\"},{\"internalType\":\"uint16\",\"name\":\"lengthE6\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"addFeeBuyE6\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"addFeeSellE6\",\"type\":\"uint16\"}],\"internalType\":\"struct BinState[]\",\"name\":\"negativeBinStates\",\"type\":\"tuple[]\"},{\"internalType\":\"uint24\",\"name\":\"notionalFeeE8_\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"bidAskRefAsymmetryX8_\",\"type\":\"uint16\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AmountScaledExceedsMax\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BidAskRefAsymmetryOutOfBounds\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BidGreaterThanAsk\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BidIsZero\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ExtensionCallFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FinalAmountIsZero\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IncorrectDelta\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requested\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"available\",\"type\":\"uint256\"}],\"name\":\"InsufficientLiquidity\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientTokenBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAmount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"binIdx\",\"type\":\"int256\"}],\"name\":\"InvalidBinIndex\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidExtensionResponse\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPauseLevel\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"binIdx\",\"type\":\"int256\"},{\"internalType\":\"uint256\",\"name\":\"leftovers\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minimalRequired\",\"type\":\"uint256\"}],\"name\":\"LeftoversSmallerThanMinimalOperationalLiquidity\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LiquidityDeltaLengthMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotAllowedToDeposit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotAllowedToSwap\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotPositionOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyFactory\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"attemptedScaledBalance\",\"type\":\"uint256\"}],\"name\":\"OverflowedOnFittingBinBalances\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PanicEmptyExtension\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PanicInvalidExtensionIndex\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PoolPaused\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"reason\",\"type\":\"bytes\"}],\"name\":\"PriceProviderFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrancyGuardReentrantCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReferencePriceOutOfRange\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"bits\",\"type\":\"uint8\"},{\"internalType\":\"int256\",\"name\":\"value\",\"type\":\"int256\"}],\"name\":\"SafeCastOverflowedIntDowncast\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"bits\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SafeCastOverflowedUintDowncast\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SafeCastOverflowedUintToInt\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SharesAmountTooLarge\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"binIdx\",\"type\":\"int256\"},{\"internalType\":\"uint256\",\"name\":\"sharesDelta\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minimalRequired\",\"type\":\"uint256\"}],\"name\":\"SharesDeltaSmallerThanMinimalOperationalLiquidity\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"amount0Delta\",\"type\":\"int256\"},{\"internalType\":\"int256\",\"name\":\"amount1Delta\",\"type\":\"int256\"}],\"name\":\"SimulateSwap\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"bidAskRefAsymmetryX8\",\"type\":\"uint16\"}],\"name\":\"BidAskRefAsymmetryUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"int16\",\"name\":\"bin\",\"type\":\"int16\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"addFeeBuyE6\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"addFeeSellE6\",\"type\":\"uint16\"}],\"name\":\"BinAdditionalFeesUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"binIdx\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"Packed2Int128\",\"name\":\"binDeltas\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"Packed2Uint128\",\"name\":\"fees\",\"type\":\"uint256\"}],\"name\":\"BinSwapped\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"FeeTransferFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"provider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint80\",\"name\":\"salt\",\"type\":\"uint80\"},{\"indexed\":false,\"internalType\":\"int256[]\",\"name\":\"binIdxs\",\"type\":\"int256[]\"},{\"components\":[{\"internalType\":\"int256\",\"name\":\"delta0Scaled\",\"type\":\"int256\"},{\"internalType\":\"int256\",\"name\":\"delta1Scaled\",\"type\":\"int256\"}],\"indexed\":false,\"internalType\":\"struct BinBalanceDelta[]\",\"name\":\"binBalanceDeltas\",\"type\":\"tuple[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"shares\",\"type\":\"uint256[]\"}],\"name\":\"LiquidityAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"provider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint80\",\"name\":\"salt\",\"type\":\"uint80\"},{\"indexed\":false,\"internalType\":\"int256[]\",\"name\":\"binIdxs\",\"type\":\"int256[]\"},{\"components\":[{\"internalType\":\"int256\",\"name\":\"delta0Scaled\",\"type\":\"int256\"},{\"internalType\":\"int256\",\"name\":\"delta1Scaled\",\"type\":\"int256\"}],\"indexed\":false,\"internalType\":\"struct BinBalanceDelta[]\",\"name\":\"binBalanceDeltas\",\"type\":\"tuple[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"shares\",\"type\":\"uint256[]\"}],\"name\":\"LiquidityRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint24\",\"name\":\"notionalFeeE8\",\"type\":\"uint24\"}],\"name\":\"NotionalFeeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"previousLevel\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"newLevel\",\"type\":\"uint8\"}],\"name\":\"PauseLevelUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newPriceProvider\",\"type\":\"address\"}],\"name\":\"PriceProviderUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount0ToProtocol\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount1ToProtocol\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount0ToAdmin\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount1ToAdmin\",\"type\":\"uint256\"}],\"name\":\"ProtocolFeesCollected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint24\",\"name\":\"spreadFeeE6\",\"type\":\"uint24\"}],\"name\":\"SpreadFeeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"PackedSwapDetails\",\"name\":\"details\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"Packed2Int128\",\"name\":\"amountDeltas\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"Packed2Uint128\",\"name\":\"platformFees\",\"type\":\"uint256\"}],\"name\":\"Swap\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint80\",\"name\":\"salt\",\"type\":\"uint80\"},{\"components\":[{\"internalType\":\"int256[]\",\"name\":\"binIdxs\",\"type\":\"int256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"shares\",\"type\":\"uint256[]\"}],\"internalType\":\"struct LiquidityDelta\",\"name\":\"deltas\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"callbackData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"extensionData\",\"type\":\"bytes\"}],\"name\":\"addLiquidity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount0Added\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1Added\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"protocolSpreadFeeE6\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"adminSpreadFeeE6\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"protocolNotionalFeeE8\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"adminNotionalFeeE8\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"adminFeeDestination\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"protocolFeeDestination\",\"type\":\"address\"}],\"name\":\"collectFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"extsload\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"startSlot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"nSlots\",\"type\":\"uint256\"}],\"name\":\"extsload\",\"outputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"\",\"type\":\"bytes32[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"slots\",\"type\":\"bytes32[]\"}],\"name\":\"extsload\",\"outputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"\",\"type\":\"bytes32[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getImmutables\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"factory\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token0\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token1\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"token0ScaleMultiplier\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"token1ScaleMultiplier\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"initialScaledToken0PerShareE18\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"initialScaledToken1PerShareE18\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minimalOperationalLiquidity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"immutablePriceProvider\",\"type\":\"address\"},{\"internalType\":\"int256\",\"name\":\"lowestBin\",\"type\":\"int256\"},{\"internalType\":\"int256\",\"name\":\"highestBin\",\"type\":\"int256\"},{\"internalType\":\"address\",\"name\":\"extension1\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"extension2\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"extension3\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"extension4\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"extension5\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"extension6\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"extension7\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"beforeAddLiquidityOrder\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"afterAddLiquidityOrder\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"beforeRemoveLiquidityOrder\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"afterRemoveLiquidityOrder\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"beforeSwapOrder\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"afterSwapOrder\",\"type\":\"uint256\"}],\"internalType\":\"struct PoolImmutables\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSellAndBuyPrices\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"sellPriceX64\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"buyPriceX64\",\"type\":\"uint128\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"inSwap\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"priceProvider_\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint80\",\"name\":\"salt\",\"type\":\"uint80\"},{\"components\":[{\"internalType\":\"int256[]\",\"name\":\"binIdxs\",\"type\":\"int256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"shares\",\"type\":\"uint256[]\"}],\"internalType\":\"struct LiquidityDelta\",\"name\":\"deltas\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"extensionData\",\"type\":\"bytes\"}],\"name\":\"removeLiquidity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount0Removed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1Removed\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"newBidAskRefAsymmetryX8\",\"type\":\"uint16\"}],\"name\":\"setBidAskRefAsymmetryX8\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"int16\",\"name\":\"bin\",\"type\":\"int16\"},{\"internalType\":\"uint16\",\"name\":\"addFeeBuyE6\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"addFeeSellE6\",\"type\":\"uint16\"}],\"name\":\"setBinAdditionalFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"newLevel\",\"type\":\"uint8\"}],\"name\":\"setPause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint24\",\"name\":\"newSpreadFeeE6\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"newNotionalFeeE8\",\"type\":\"uint24\"}],\"name\":\"setPoolFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newPriceProvider\",\"type\":\"address\"}],\"name\":\"setPriceProvider\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"zeroForOne\",\"type\":\"bool\"},{\"internalType\":\"int128\",\"name\":\"amountSpecified\",\"type\":\"int128\"},{\"internalType\":\"uint128\",\"name\":\"priceLimitX64\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"bidPriceX64\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"askPriceX64\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"referencePriceX64\",\"type\":\"uint128\"},{\"internalType\":\"bytes\",\"name\":\"extensionData\",\"type\":\"bytes\"}],\"name\":\"simulateSwapAndRevert\",\"outputs\":[{\"internalType\":\"int128\",\"name\":\"\",\"type\":\"int128\"},{\"internalType\":\"int128\",\"name\":\"\",\"type\":\"int128\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"zeroForOne\",\"type\":\"bool\"},{\"internalType\":\"int128\",\"name\":\"amountSpecified\",\"type\":\"int128\"},{\"internalType\":\"uint128\",\"name\":\"priceLimitX64\",\"type\":\"uint128\"},{\"internalType\":\"bytes\",\"name\":\"callbackData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"extensionData\",\"type\":\"bytes\"}],\"name\":\"swap\",\"outputs\":[{\"internalType\":\"int128\",\"name\":\"\",\"type\":\"int128\"},{\"internalType\":\"int128\",\"name\":\"\",\"type\":\"int128\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Layout: immutables, state variables, constructor, modifiers,      external state-changing functions, external views, then internal helpers.Contract uses `Extsload` for external storage reads, apart from `getImmutables()`, `inSwap()` and `getSellAndBuyPrices()`.External function order follows `IMetricOmmPool` composition: `IMetricOmmPoolActions`, then `IMetricOmmPoolCollectFees`, then `IMetricOmmPoolFactoryActions`.Contract coupling: storage layout and packing are mirrored by `contracts/libraries/PoolStateLibrary.sol`      for EXTSLOAD-based reads. Any storage reorder or repack is a breaking change for EXTSLOAD readers.\",\"errors\":{\"AmountScaledExceedsMax()\":[{\"details\":\"Exact-output requests are capped to the pool's available output before this check.\"}],\"BidAskRefAsymmetryOutOfBounds()\":[{\"details\":\"With `r1 = reference/bid - 1`, `r2 = ask/reference - 1`, and `M = 1 + m` (`m` stored in X8), requires      `1/M <= r1/r2 <= M`. Skipped when `bidAskRefAsymmetryX8 == type(uint16).max`. Otherwise a reference on bid/ask reverts.\"}],\"BidGreaterThanAsk()\":[{\"details\":\"On `swap`, comes from the live `IPriceProvider` quote; on `simulateSwapAndRevert`, from the arguments you passed.\"}],\"BidIsZero()\":[{\"details\":\"On `swap`, from the live provider; on `simulateSwapAndRevert`, from `bidPriceX64` you passed.\"}],\"FinalAmountIsZero()\":[{\"details\":\"After conversion to native units, either `amount0Delta` or `amount1Delta` is zero — e.g. price limit blocks all progress or amounts round away.\"}],\"IncorrectDelta()\":[{\"details\":\"Distinct from `InsufficientTokenBalance` (liquidity path); the swap callback left the pool balance short of the input amount the pool requested.\"}],\"InsufficientLiquidity(uint256,uint256)\":[{\"params\":{\"available\":\"Shares recorded for `owner`+`salt` in that bin when this entry is processed.\",\"requested\":\"`deltas.shares[i]` for the offending bin.\"}}],\"InsufficientTokenBalance()\":[{\"details\":\"Fires after the pool computed required `amount0`/`amount1` and invoked `msg.sender`; safe for retry once the callback actually pays.\"}],\"InvalidBinIndex(int256)\":[{\"params\":{\"binIdx\":\"First failing index from the caller payload.\"}}],\"LeftoversSmallerThanMinimalOperationalLiquidity(int256,uint256,uint256)\":[{\"details\":\"Raised when leftover shares are `> 0` and `< MINIMAL_OPERATIONAL_LIQUIDITY`; remove more or exit to zero.\",\"params\":{\"binIdx\":\"Bin where the leftover would remain.\",\"leftovers\":\"Remaining shares after the attempted remove.\",\"minimalRequired\":\"Pool immutable `MINIMAL_OPERATIONAL_LIQUIDITY`.\"}}],\"LiquidityDeltaLengthMismatch()\":[{\"details\":\"Checked only for non-empty `binIdxs`; an empty array returns `(0, 0)`.\"}],\"NotAllowedToDeposit()\":[{\"details\":\"Never reverted by the pool itself; gating extensions raise it from the add-liquidity extension points.\"}],\"NotAllowedToSwap()\":[{\"details\":\"Never reverted by the pool itself; gating extensions raise it from `beforeSwap`, which `swap` and `simulateSwapAndRevert` run identically.\"}],\"NotPositionOwner()\":[{\"details\":\"Only `owner` may burn; `addLiquidity` may use a different `msg.sender` when `owner` is supplied, but removal is stricter.\"}],\"OverflowedOnFittingBinBalances(uint256)\":[{\"details\":\"Happens when the input credited to a bin would grow its incoming-side balance past the packed `BinState` width.      That direction can remain blocked until liquidity is removed or the opposite swap drains the incoming side; prefer smaller bins / less dense liquidity.\",\"params\":{\"attemptedScaledBalance\":\"The balance that would have been stored (internal scaled units).\"}}],\"PanicEmptyExtension()\":[{\"details\":\"Should never happen if factory validates extensions config.\"}],\"PanicInvalidExtensionIndex()\":[{\"details\":\"Should never happen if factory validates extensions config.\"}],\"PoolPaused()\":[{\"details\":\"Pause level is factory-controlled; liquidity mutators are intentionally not blocked by the same check.\"}],\"PriceProviderFailed(bytes)\":[{\"params\":{\"reason\":\"Opaque revert data from the provider (decode off-chain if the provider documents errors).\"}}],\"ReentrancyGuardReentrantCall()\":[{\"details\":\"Unauthorized reentrant call or overlapping guarded action.\"}],\"ReferencePriceOutOfRange()\":[{\"details\":\"On `swap`, from the live provider; on `simulateSwapAndRevert`, from `referencePriceX64` you passed.\"}],\"SafeCastOverflowedIntDowncast(uint8,int256)\":[{\"details\":\"Value doesn't fit in an int of `bits` size.\"}],\"SafeCastOverflowedUintDowncast(uint8,uint256)\":[{\"details\":\"Value doesn't fit in a uint of `bits` size.\"}],\"SafeCastOverflowedUintToInt(uint256)\":[{\"details\":\"A uint value doesn't fit in an int of `bits` size.\"}],\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC-20 token failed.\"}],\"SharesAmountTooLarge()\":[{\"details\":\"Overflow of the resulting bin or pool totals reverts with a `SafeCast` error instead.\"}],\"SharesDeltaSmallerThanMinimalOperationalLiquidity(int256,uint256,uint256)\":[{\"details\":\"Raised when non-zero `sharesToAdd` / `sharesToRemove` is `< MINIMAL_OPERATIONAL_LIQUIDITY`.\",\"params\":{\"binIdx\":\"Bin where the offending delta was applied.\",\"minimalRequired\":\"Pool immutable `MINIMAL_OPERATIONAL_LIQUIDITY`.\",\"sharesDelta\":\"Offending share delta.\"}}],\"SimulateSwap(int256,int256)\":[{\"details\":\"Uses validated caller-supplied quotes and runs swap hooks, even while paused. All state changes revert.      Both deltas must fit `int128` before `afterSwap`, despite the error using `int256` fields.      Decode this error from revert data; execution failures propagate their own errors instead.\",\"params\":{\"amount0Delta\":\"Net token0 the swap would move into (`>0`) or out of (`<0`) the pool (native decimals).\",\"amount1Delta\":\"Net token1 the swap would move into or out of the pool (native decimals).\"}}]},\"events\":{\"BidAskRefAsymmetryUpdated(uint16)\":{\"params\":{\"bidAskRefAsymmetryX8\":\"New asymmetry bound; `type(uint16).max` disables the check.\"}},\"BinAdditionalFeesUpdated(int16,uint16,uint16)\":{\"params\":{\"addFeeBuyE6\":\"Additional buy-side spread fee in E6 on top of base spread.\",\"addFeeSellE6\":\"Additional sell-side spread fee in E6 on top of base spread.\",\"bin\":\"Bin index whose overrides were updated.\"}},\"BinSwapped(int256,uint256,uint256)\":{\"details\":\"Refer to types/Packed.sol to decode the packed values.\",\"params\":{\"binDeltas\":\"Change in THAT BIN's scaled balances, packed: `high` = token0, `low` = token1.\",\"binIdx\":\"Bin touched in this step.\",\"fees\":\"This step's two fee legs, packed: `high` = LP leg (stays in the bin), `low` = platform leg (protocol + admin, withheld). Scaled units.\"}},\"LiquidityAdded(address,uint80,int256[],(int256,int256)[],uint256[])\":{\"details\":\"Arrays are parallel: `binIdxs[i]`, `binBalanceDeltas[i]`, and `shares[i]` describe the same bin. Zero-share rows remain in the arrays with zero deltas; indexers can reconcile bins from `binBalanceDeltas` (scaled) separately from callback token flows (native).\",\"params\":{\"binBalanceDeltas\":\"Scaled token0/token1 balance change inside each bin (`BinBalanceDelta`); not wallet transfer amounts.\",\"binIdxs\":\"Bin index per input row (pool-configured range).\",\"provider\":\"`owner` leg of the position key; indexed for position-scoped subscriptions.\",\"salt\":\"`salt` leg of the position key; indexed with `provider` to disambiguate positions.\",\"shares\":\"Liquidity shares minted per input row for this position.\"}},\"LiquidityRemoved(address,uint80,int256[],(int256,int256)[],uint256[])\":{\"details\":\"Same parallel-array layout as `LiquidityAdded`. `removeLiquidity` requires `msg.sender == owner`, so the position key always matches the caller for this event.\",\"params\":{\"binBalanceDeltas\":\"Scaled balance change per bin (non-positive: tokens leaving the bin).\",\"binIdxs\":\"Bin index per input row.\",\"provider\":\"Position owner (equals `msg.sender` for the removing call).\",\"salt\":\"Position salt with `provider` in the key.\",\"shares\":\"Shares burned per input row.\"}},\"NotionalFeeUpdated(uint24)\":{\"params\":{\"notionalFeeE8\":\"New aggregate notional fee in E8 (`1e8 = 100%`).\"}},\"PauseLevelUpdated(uint8,uint8)\":{\"params\":{\"newLevel\":\"New pause level after the update.\",\"previousLevel\":\"Prior pause level (`0` active, `1` admin pause, `2` protocol pause).\"}},\"PriceProviderUpdated(address)\":{\"params\":{\"newPriceProvider\":\"New active `IPriceProvider` (immutable pools never emit this from rotation).\"}},\"ProtocolFeesCollected(uint256,uint256,uint256,uint256)\":{\"params\":{\"amount0ToAdmin\":\"Token0 amount sent to `adminFeeDestination` (native).\",\"amount0ToProtocol\":\"Token0 amount sent to `protocolFeeDestination` (native).\",\"amount1ToAdmin\":\"Token1 amount sent to `adminFeeDestination` (native).\",\"amount1ToProtocol\":\"Token1 amount sent to `protocolFeeDestination` (native).\"}},\"SpreadFeeUpdated(uint24)\":{\"params\":{\"spreadFeeE6\":\"New platform share of the spread fee in E6 (`1e6 = 100%`).\"}},\"Swap(address,address,uint256,uint256,uint256)\":{\"details\":\"Refer to types/Packed.sol to decode the packed values.\",\"params\":{\"amountDeltas\":\"Net native-token flows for the whole call, packed: `high` = token0, `low` = token1 (positive = the pool gained that token).\",\"details\":\"Swap mode and resulting bin position packed into one word: `exactInput()`,        `binIdx()` (signed), `posInBin()`. Check details in PackedSwapDetailsLib.\",\"platformFees\":\"Platform (protocol + admin) fee for this swap on the input-token leg, packed: `high` = SPREAD leg, `low` = NOTIONAL leg. Scaled units.\",\"recipient\":\"Address that received the output token leg.\",\"sender\":\"`msg.sender` of `swap` (the account that may receive swap callback).\"}}},\"kind\":\"dev\",\"methods\":{\"addLiquidity(address,uint80,(int256[],uint256[]),bytes,bytes)\":{\"details\":\"Callback amounts round up per bin and again on conversion to native units; underpay reverts      `InsufficientTokenBalance`. `msg.sender` pays but need not equal `owner`. Empty `binIdxs` skips hooks and callbacks.Reverts `LiquidityDeltaLengthMismatch` when `binIdxs` is non-empty and its length differs from `shares`.\",\"params\":{\"callbackData\":\"Opaque bytes forwarded unmodified to the modify-liquidity callback.\",\"deltas\":\"Parallel `binIdxs` / `shares` arrays (see `LiquidityDelta`).\",\"extensionData\":\"Opaque bytes forwarded to liquidity extensions (beforeAddLiquidity / afterAddLiquidity).\",\"owner\":\"Position owner encoded in the pool’s position key.\",\"salt\":\"Caller-chosen second leg of the position key.\"},\"returns\":{\"amount0Added\":\"Token0 amount the pool required from the callback (native).\",\"amount1Added\":\"Token1 amount the pool required from the callback (native).\"}},\"collectFees(uint256,uint256,uint256,uint256,address,address)\":{\"details\":\"Pending balances retain scaled rounding remainders; transfer failures do not revert allocation.      Supported tokens must not move funds when reporting a failed transfer.\",\"params\":{\"adminFeeDestination\":\"Recipient for the admin share of collected tokens (per factory configuration).\",\"adminNotionalFeeE8\":\"Admin notional component in E8 at collection time.\",\"adminSpreadFeeE6\":\"Admin spread component in E6 at collection time.\",\"protocolFeeDestination\":\"Recipient for the protocol share (the factory's `feeReceiver`).\",\"protocolNotionalFeeE8\":\"Protocol notional component in E8 at collection time.\",\"protocolSpreadFeeE6\":\"Protocol spread component in E6 at collection time (must match factory policy).\"}},\"constructor\":{\"details\":\"All initial checks MUST be validated before construction at the factory/deployer level.\"},\"extsload(bytes32)\":{\"params\":{\"slot\":\"Keccak-derived or raw slot key as used by the implementation contract.\"},\"returns\":{\"_0\":\"Raw `bytes32` contents of the slot.\"}},\"extsload(bytes32,uint256)\":{\"params\":{\"nSlots\":\"Number of consecutive slots to read (`startSlot`, `startSlot + 1`, ...).\",\"startSlot\":\"First slot (inclusive).\"},\"returns\":{\"_0\":\"Raw slot values in order.\"}},\"extsload(bytes32[])\":{\"params\":{\"slots\":\"Each entry is a slot key as for `extsload(bytes32)`.\"},\"returns\":{\"_0\":\"One `bytes32` per slot, same order as `slots`.\"}},\"getImmutables()\":{\"details\":\"Immutables live in contract bytecode, not storage, so they cannot be read via EXTSLOAD.\"},\"getSellAndBuyPrices()\":{\"details\":\"Informational only — not a guaranteed executable quote. Sell = token0 → token1; buy = token1 → token0.      Includes oracle spread, per-bin additional fees, and notional fees (zero-size exact-in marginal prices)      via the active price provider (same path as `swap`). For real pricing/execution decisions, call `swap`      and decide in the swap callback, or use the periphery quoter. The quote may update provider state.      Shares the swap reentrancy guard; callable while paused, but not during another guarded action.\",\"returns\":{\"buyPriceX64\":\"Fee-adjusted buy price (token1 per token0, Q64.64).\",\"sellPriceX64\":\"Fee-adjusted sell price (token1 per token0, Q64.64).\"}},\"inSwap()\":{\"returns\":{\"priceProvider_\":\"Active price provider during either; address(0) otherwise, including during simulation.\"}},\"removeLiquidity(address,uint80,(int256[],uint256[]),bytes)\":{\"details\":\"Requires `msg.sender == owner` except for empty `binIdxs`, which returns `(0, 0)`.      Payouts round down per bin and again on conversion to native units; no callback.      Emptying the current bin resets its position to `0` for non-negative bins or `type(uint104).max` for negative bins.\",\"params\":{\"deltas\":\"Parallel arrays of bins and share burns.\",\"extensionData\":\"Opaque bytes forwarded to liquidity extensions (beforeRemoveLiquidity / afterRemoveLiquidity).\",\"owner\":\"Must equal `msg.sender`.\",\"salt\":\"Position salt with `owner`.\"},\"returns\":{\"amount0Removed\":\"Total token0 sent from the pool to `owner` (native).\",\"amount1Removed\":\"Total token1 sent from the pool to `owner` (native).\"}},\"setBinAdditionalFees(int16,uint16,uint16)\":{\"params\":{\"addFeeBuyE6\":\"Additional fee on swaps buying token0 (E6).\",\"addFeeSellE6\":\"Additional fee on swaps selling token0 (E6).\",\"bin\":\"Bin index within the pool configured bin range.\"}},\"setPause(uint8)\":{\"details\":\"Transition rules are enforced by the factory, not the pool.\",\"params\":{\"newLevel\":\"Pause level enforced by the pool; must be at most `2`.\"}},\"setPoolFees(uint24,uint24)\":{\"params\":{\"newNotionalFeeE8\":\"Total notional fee in E8 (`1e8 = 100%`).\",\"newSpreadFeeE6\":\"Platform share (protocol + admin) of the spread fee in E6 (`1e6 = 100%`).\"}},\"setPriceProvider(address)\":{\"params\":{\"newPriceProvider\":\"New provider contract; the factory validates its `token0`/`token1`, the pool stores it as given.\"}},\"simulateSwapAndRevert(address,address,bool,int128,uint128,uint128,uint128,uint128,bytes)\":{\"details\":\"Does not use the pool’s live oracle prices for the mid—use for quotes/off-chain routing. Invokes the same swap extension point functions as `swap` when enabled; still enforces `priceLimitX64` and path logic; no ERC20 transfers or swap callback. Typical usage: `eth_call` or `try/catch` decoding `SimulateSwap`. `sender` is forwarded to the extension points as-is instead of `msg.sender`, so you can simulate as an arbitrary address (e.g. checking a sender-gated extension for a specific user) — safe only because the call always reverts and nothing persists.\",\"params\":{\"amountSpecified\":\"Same sign convention as `swap`.\",\"askPriceX64\":\"Ask used for extension context and swap math in this simulation (Q64.64).\",\"bidPriceX64\":\"Bid used for extension context and swap math in this simulation (Q64.64).\",\"extensionData\":\"Opaque bytes forwarded to swap extension point functions (beforeSwap / afterSwap).\",\"priceLimitX64\":\"Same encoding as `swap`.\",\"recipient\":\"Same as `swap` (forwarded to swap extension point functions).\",\"referencePriceX64\":\"Reference price used as the mid/price-path anchor and for fee calculation in this simulation (Q64.64).\",\"sender\":\"Address forwarded to swap extension point functions in place of `msg.sender`; has no other effect since the call always reverts.\",\"zeroForOne\":\"Same as `swap`.\"},\"returns\":{\"_0\":\"Unused in practice; values appear only on the reverting `SimulateSwap` error.\",\"_1\":\"Unused in practice; values appear only on the reverting `SimulateSwap` error.\"}},\"swap(address,bool,int128,uint128,bytes,bytes)\":{\"details\":\"Pulls input from `msg.sender` through `IMetricOmmSwapCallback` after sending output to `recipient`.\",\"params\":{\"amountSpecified\":\"Exact input if `>0`, exact output magnitude if `<0`, in native units of that leg.        May be partially filled; check the returned deltas.\",\"callbackData\":\"Opaque bytes forwarded to the swap callback.\",\"extensionData\":\"Opaque bytes forwarded to swap extension point functions (beforeSwap / afterSwap).\",\"priceLimitX64\":\"Fee-inclusive token1-per-token0 price in Q64.64: a floor when `zeroForOne`, a cap otherwise.        Zero permits sells but prevents buys; rounding can significantly breach the bound for tiny amounts.\",\"recipient\":\"Address that receives the output token (sent before the callback; the swap reverts if the        callback then underpays the input).\",\"zeroForOne\":\"`true` sells token0 for token1 along the pool’s ordering.\"},\"returns\":{\"_0\":\"Net token0 change for the pool (signed, native; positive = pool received).\",\"_1\":\"Net token1 change for the pool (signed, native; positive = pool received).\"}}},\"stateVariables\":{\"IMMUTABLE_PRICE_PROVIDER\":{\"details\":\"If set this is the address of the immutable price providerIf unset the `priceProvider` is the address of the mutable price provider.\"},\"_positionBinShares\":{\"details\":\"Per-bin position shares keyed by `LiquidityLib._positionBinKey`.\"},\"bidAskRefAsymmetryX8\":{\"details\":\"`m` in X8 (`M = 1 + m`); `type(uint16).max` disables the bid/ask/reference asymmetry check.\"},\"notionalFeeE8\":{\"details\":\"Platform (protocol + admin) notional fee, E8.\"},\"pauseLevel\":{\"details\":\"0 = active, 1 = paused by admin, 2 = paused by protocol. Transitions enforced by factory.\"},\"pendingAdminFeeToken0Scaled\":{\"details\":\"Pending fee balances in internal scaled units; payouts convert to native units rounding down.\"},\"priceProvider\":{\"details\":\"The price provider address - only used when `IMMUTABLE_PRICE_PROVIDER == address(0)`\"},\"spreadFeeE6\":{\"details\":\"Platform (protocol + admin) share of the spread fee, E6.\"}},\"title\":\"MetricOmmPool\",\"version\":1},\"userdoc\":{\"errors\":{\"AmountScaledExceedsMax()\":[{\"notice\":\"The scaled `amountSpecified` (native × token scale multiplier) exceeds `type(uint128).max`.\"}],\"BidAskRefAsymmetryOutOfBounds()\":[{\"notice\":\"Bid/ask returns about the reference are too asymmetric for the pool's `bidAskRefAsymmetryX8` bound.\"}],\"BidGreaterThanAsk()\":[{\"notice\":\"Bid price is not strictly below ask (`bidPriceX64 >= askPriceX64`).\"}],\"BidIsZero()\":[{\"notice\":\"Bid price was zero, so mid/spread cannot be formed.\"}],\"FinalAmountIsZero()\":[{\"notice\":\"Swap math settled with a zero input or output delta (native units).\"}],\"IncorrectDelta()\":[{\"notice\":\"Swap callback paid less than the input amount the pool requested.\"}],\"InsufficientLiquidity(uint256,uint256)\":[{\"notice\":\"Burn asked for more shares than exist for that position in a bin.\"}],\"InsufficientTokenBalance()\":[{\"notice\":\"The modify-liquidity callback sent fewer tokens than the pool debt for this add.\"}],\"InvalidAmount()\":[{\"notice\":\"`amountSpecified == 0` on `swap` / `simulateSwapAndRevert`.\"}],\"InvalidBinIndex(int256)\":[{\"notice\":\"A bin index in `deltas.binIdxs` (or `setBinAdditionalFees`) is outside this pool’s         `[LOWEST_BIN, HIGHEST_BIN]`.\"}],\"InvalidPauseLevel()\":[{\"notice\":\"Thrown when `setPause` is called with a level outside `0..2`.\"}],\"LeftoversSmallerThanMinimalOperationalLiquidity(int256,uint256,uint256)\":[{\"notice\":\"Remove would leave a non-zero position below the pool operational floor.\"}],\"LiquidityDeltaLengthMismatch()\":[{\"notice\":\"`LiquidityDelta` arrays are not the same length.\"}],\"NotAllowedToDeposit()\":[{\"notice\":\"Deposit allowlist rejected this `owner` for `addLiquidity`.\"}],\"NotAllowedToSwap()\":[{\"notice\":\"Swap allowlist rejected the swap `sender` (`msg.sender` for `swap`, the supplied `sender` for `simulateSwapAndRevert`).\"}],\"NotPositionOwner()\":[{\"notice\":\"`removeLiquidity` caller is not the position owner.\"}],\"OnlyFactory()\":[{\"notice\":\"Thrown when `msg.sender` is not the pool factory.\"}],\"OverflowedOnFittingBinBalances(uint256)\":[{\"notice\":\"A swap would write a bin's scaled token balance above `type(uint104).max`.\"}],\"PoolPaused()\":[{\"notice\":\"Swaps are disabled while the pool pause level is non-zero.\"}],\"PriceProviderFailed(bytes)\":[{\"notice\":\"External call to the active `IPriceProvider` reverted or bubbled a failure.\"}],\"ReferencePriceOutOfRange()\":[{\"notice\":\"Reference price was not within `[bidPriceX64, askPriceX64]`, or was zero.\"}],\"SharesAmountTooLarge()\":[{\"notice\":\"A row's shares exceed `type(uint192).max`, or its required scaled token amount exceeds `type(uint104).max`.\"}],\"SharesDeltaSmallerThanMinimalOperationalLiquidity(int256,uint256,uint256)\":[{\"notice\":\"Add or remove share delta is below the pool operational floor.\"}],\"SimulateSwap(int256,int256)\":[{\"notice\":\"Deliberate revert carrying simulated swap deltas; no settlement callback or token transfers.\"}]},\"events\":{\"BidAskRefAsymmetryUpdated(uint16)\":{\"notice\":\"Emitted when bid/ask/ref asymmetry slack `m` in X8 is updated (`M = 1 + m`).\"},\"BinAdditionalFeesUpdated(int16,uint16,uint16)\":{\"notice\":\"Emitted when per-bin additional spread fees are set.\"},\"BinSwapped(int256,uint256,uint256)\":{\"notice\":\"One step of routing updated a bin during `swap` (may emit multiple times per call).\"},\"LiquidityAdded(address,uint80,int256[],(int256,int256)[],uint256[])\":{\"notice\":\"Liquidity was minted into one or more bins for a single position key.\"},\"LiquidityRemoved(address,uint80,int256[],(int256,int256)[],uint256[])\":{\"notice\":\"Liquidity was burned from one or more bins for a single position key.\"},\"NotionalFeeUpdated(uint24)\":{\"notice\":\"Emitted when total notional fee on the pool is updated.\"},\"PauseLevelUpdated(uint8,uint8)\":{\"notice\":\"Emitted when pause level changes.\"},\"PriceProviderUpdated(address)\":{\"notice\":\"Emitted when the mutable price provider address stored on the pool is updated.\"},\"ProtocolFeesCollected(uint256,uint256,uint256,uint256)\":{\"notice\":\"Emitted on every `collectFees` call; amounts are those actually transferred.\"},\"SpreadFeeUpdated(uint24)\":{\"notice\":\"Emitted when the platform share of the spread fee on the pool is updated.\"},\"Swap(address,address,uint256,uint256,uint256)\":{\"notice\":\"Terminal summary after a successful `swap`.\"}},\"kind\":\"user\",\"methods\":{\"addLiquidity(address,uint80,(int256[],uint256[]),bytes,bytes)\":{\"notice\":\"Mint shares across bins for `(owner, salt)`; pulls tokens via `IMetricOmmModifyLiquidityCallback` on `msg.sender`.\"},\"collectFees(uint256,uint256,uint256,uint256,address,address)\":{\"notice\":\"Allocate accrued fees using supplied rates, then attempt payouts including previously unpaid fees.\"},\"extsload(bytes32)\":{\"notice\":\"Read a single 32-byte storage slot.\"},\"extsload(bytes32,uint256)\":{\"notice\":\"Read a contiguous run of slots starting at `startSlot` for `nSlots` steps.\"},\"extsload(bytes32[])\":{\"notice\":\"Read many storage slots in one call.\"},\"getImmutables()\":{\"notice\":\"Return every constructor-set immutable in a single call.\"},\"getSellAndBuyPrices()\":{\"notice\":\"Live sell/buy prices (Q64.64) for token0 at the pool's current marginal bin position.\"},\"inSwap()\":{\"notice\":\"Whether a live swap or `getSellAndBuyPrices` is executing and which price provider supplies its quotes.\"},\"removeLiquidity(address,uint80,(int256[],uint256[]),bytes)\":{\"notice\":\"Burn shares across bins for `(owner, salt)` and send underlying tokens to `owner`.\"},\"setBidAskRefAsymmetryX8(uint16)\":{\"notice\":\"Update bid/ask/reference asymmetry bound `m` in X8 (`type(uint16).max` disables the check).\"},\"setBinAdditionalFees(int16,uint16,uint16)\":{\"notice\":\"Set per-bin additional buy and sell spread fees in E6 on top of base spread.\"},\"setPause(uint8)\":{\"notice\":\"Set pool pause level (`0` active, `1` admin paused, `2` protocol paused).\"},\"setPoolFees(uint24,uint24)\":{\"notice\":\"Set aggregate pool spread and notional fee rates (sum of protocol + admin components).\"},\"setPriceProvider(address)\":{\"notice\":\"Update the pool active price provider (the factory only calls this for pools created with a mutable provider).\"},\"simulateSwapAndRevert(address,address,bool,int128,uint128,uint128,uint128,uint128,bytes)\":{\"notice\":\"Run swap math with caller-supplied bid/ask/reference; reverts with `SimulateSwap` on success or an execution error on failure.\"},\"swap(address,bool,int128,uint128,bytes,bytes)\":{\"notice\":\"Execute a spot swap against pool liquidity using live oracle prices.\"}},\"notice\":\"Oracle-Based OMM Pool with separate bin accounting\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/MetricOmmPool.sol\":\"MetricOmmPool\"},\"evmVersion\":\"cancun\",\"libraries\":{\"contracts/MetricOmmPool.sol:LiquidityLib\":\"0xe0b1576ac63a582e6740a7e1dcfbbef730539cd4\"},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":1999},\"remappings\":[\":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/\",\":erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\"],\"viaIR\":true},\"sources\":{\"contracts/ExtensionCalling.sol\":{\"keccak256\":\"0x88ee39a71e363ab99b5e5b28f06399cadb50bbc0cd435da97e7bdda59ac20570\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ebd54d3d09f2f0ffda355bf41c807c4cfeb21da8047e0ef700121545f3d8e073\",\"dweb:/ipfs/QmaEfWgyFZMK8pAaaVQxnBmxkdQcrS8Znmz4T8Gz6psmdK\"]},\"contracts/Extsload.sol\":{\"keccak256\":\"0xb428e83ca19476214f559d2b8f31b40ab69d2b0ec94c0baa5770fbfe5e678455\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c788d78f617714c916c212da258b510e0cc8dda22ba24a26877cf70513937f0b\",\"dweb:/ipfs/QmbxQzMW8Jic4Wo4aDAEwrQgw9AYL9V9dwZTPpudZ8V55W\"]},\"contracts/MetricOmmPool.sol\":{\"keccak256\":\"0xd48fd168093fc1585a8747972dbc1ceb6505d00f42aa6969f607baecfa6d19c5\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://86050026f3a6af657c646d16a154350da3f11f3ed3c41e72e4a7887f3df0ba97\",\"dweb:/ipfs/QmV1wvnwUjMAw1iW7aW1DCSbD6Fu9rh33bMbmw2R5qFogf\"]},\"contracts/interfaces/IExtsload.sol\":{\"keccak256\":\"0xf8ffc91feecf0eda634893219ca0d132a480eb49a82caac7a2be6919bdce2b9d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4bf5f555ca73a823be84bf1d0415fa91ded371a65cd49002f452dccbf5dd1328\",\"dweb:/ipfs/QmRCSKQE9GemJdRic57rRU8d2syX77hyhHcutHaxwMAbhq\"]},\"contracts/interfaces/IMetricOmmPool/IMetricOmmPool.sol\":{\"keccak256\":\"0xe099a070735cb44fa9f53e1e9787fbad4078b3b6109ab51429d0d2450dc2f61b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://dc83d14c1cbadb20b8dafcf61a625b23fccb398d8ceb95b8f67a31db09d80f48\",\"dweb:/ipfs/QmTzTZPRxnwrz5r7nNbeWdxLThhidssAxpYpR84DrD3PSQ\"]},\"contracts/interfaces/IMetricOmmPool/IMetricOmmPoolActions.sol\":{\"keccak256\":\"0x0c6c0b6e36ddbe493149fb464ac763b6a5a3cd8474893f2582f14d6b5810bf5b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1c4cb8173df4ed290ca49b907550c9ff566f91ba147f1a8d9e1e90a4ec0bdc0d\",\"dweb:/ipfs/QmNMgF3z1CCj26s2Yt7R6meVT9hohR9tVp1TBugCmVDREs\"]},\"contracts/interfaces/IMetricOmmPool/IMetricOmmPoolCollectFees.sol\":{\"keccak256\":\"0x07c326b601a1cc1d8e73d48ad6a7b74479ddb078a6f39f96158c0cc30311c99c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://cdbffc80a2be758035b37742631054b24612c3d04b80e286e6173b3a39515cdf\",\"dweb:/ipfs/QmNyv9ZjiS2Bo7FbXU6aFVEw1N1bVUQezYwo8Fd23gCDTh\"]},\"contracts/interfaces/IMetricOmmPool/IMetricOmmPoolFactoryActions.sol\":{\"keccak256\":\"0x3fb7d4ca9fc3507511ad322a22f422c05ddac93027bff0b60f3e2800746616fd\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e44bf7e2e622f288dcd750a5b86bb16aa2cff09c4c9b4d87d9bd13804c137308\",\"dweb:/ipfs/QmVHj6xphVg9TQoYu68URRg2n3PpEx7q9rvGSmey1A1k1L\"]},\"contracts/interfaces/IPriceProvider/IPriceProvider.sol\":{\"keccak256\":\"0xe20a101e6175e4d424491db6aac2943cb95cc6f99d4d8f99e7622b5344736329\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://79625b8c45cdcaff9ab4c80d142d0c2d0ecf03c83a3141107d2b126613ef7849\",\"dweb:/ipfs/QmPeMjDMRTyX6KwaDv7gY1jvfjkKLfzHTu9XWfe4NBiDfM\"]},\"contracts/interfaces/callbacks/IMetricOmmModifyLiquidityCallback.sol\":{\"keccak256\":\"0x2054f19356ad76bb1e4c25d87eb94e87c9b3fbcd160575f48e620ef1e7f5868c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b769b15769cae01b9809f37479d3459cad8ebb5b71bad49a38cf090627bb0827\",\"dweb:/ipfs/QmZmNt83d8iNwj6DeySJKmRQHFnN6qT3LSedVkpdPUC4LS\"]},\"contracts/interfaces/callbacks/IMetricOmmSwapCallback.sol\":{\"keccak256\":\"0x9cac017c296fbda725cea3625ad32593d6e4ffaa5aa419974992a37c1d46c05c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://297d5fbb003b919e820c31ee26d8288ef3aba4bc9125649e13c73a865dd10163\",\"dweb:/ipfs/QmSWbeX5aSUpkeZa7Uhb4yeVYw8MHazGSqKiNbtgDwaaif\"]},\"contracts/interfaces/extensions/IMetricOmmExtensions.sol\":{\"keccak256\":\"0x5fa68e1ccf4d55a92a332f2beeb74f6faa16b2ce896e0f7ae7981a89786f3fa1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://46609f46fca7a517c6e89293cbddc302a1f0f2802241b3f688d23969fe683d97\",\"dweb:/ipfs/QmbVbFeDGS4BQQGsQNLhR67RUeHzNHfaWeXd5gAUWzd2yu\"]},\"contracts/libraries/CallExtension.sol\":{\"keccak256\":\"0xf949399708682adb63db206160530f473558b585940932f069355bf817b83404\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://eef0fba6d240a8b00817280e3a591cf821b40fc2d790c0e504940f8218fe34e7\",\"dweb:/ipfs/QmYdwRWBgJXUgCvBH5brkyjrGyeaJm3XFczB81zx5XekXo\"]},\"contracts/libraries/FeeMath.sol\":{\"keccak256\":\"0x535673de140ef293ff14e3c3019343ec178968b3858ea432cb8ac66f0e6d0016\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://5e6d5f134578b91388565d766ed7f4475b3957a27e3b5cbbf97755b9169a470c\",\"dweb:/ipfs/QmcuRKVpwC59ig1pmAop66Gccwzc4LeXArZi5CDhPn4tH7\"]},\"contracts/libraries/LiquidityLib.sol\":{\"keccak256\":\"0x688bc0aaafa152fdea47b682871e97005f2ed27a95f002a6c807ff523ae5905c\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://e42776b67a0500dcd62b02dea9c086c3d3b5cfa44ad34a12a6774720852f63c5\",\"dweb:/ipfs/QmaoZAfL4rUcbnhMSS9gFAN69Ht4W2319ZtW6PeDMJRLy6\"]},\"contracts/libraries/PoolActions.sol\":{\"keccak256\":\"0x95d6a5552ea3c1cf67e07a5369c765e43b48b3e93c25202192f39293989881f4\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9e5915a2cdb16fdc8afbb6f33bc168ddd1022aedf3e883c8ab0722126dd45d5e\",\"dweb:/ipfs/QmR37HD7efLG2sgsQKQi1XDp9ZQ9N4YUAGkBSjzcVDzYw3\"]},\"contracts/libraries/PoolStateLibrary.sol\":{\"keccak256\":\"0x7a52d5daf484669e588e99f55d0555e79f57589e8b1e0c90b4f414ebe61164d6\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://966e6a41f589c9f4f2b98d187806a473a0bd38740dba28e7a023f2efa2f50ffb\",\"dweb:/ipfs/QmVBY87kxr2gyW4DZGwqPpx3HTJkk5uTupoAFYjYtig7dW\"]},\"contracts/libraries/SignedMath.sol\":{\"keccak256\":\"0x6c199881bf4e757a5a5f43c40c175661555428015296df42268b2f5a59ec846b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://976c3c9eb76aec80b904df6eb1c66576079367b3db650c39f4714421d85a0379\",\"dweb:/ipfs/QmfDsCHQBHsARzmpDNdu2yMZHjUEgUxcCErxHgQPE3PCEt\"]},\"contracts/libraries/Slot0Library.sol\":{\"keccak256\":\"0xc18a58d28c2c3a4ac683686ddbb42215179b60986b58c35b1b761c383211416b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fd62023c93bf7c980848f8278ba4be600aa95d5cf95959116320ea8b3d6215dc\",\"dweb:/ipfs/QmeLDq5Xz5Jwn4MLKqqrU7zYhrzF5yvNvCBW5BMzJjAAnn\"]},\"contracts/libraries/SwapMath.sol\":{\"keccak256\":\"0x03da3cad860343cac127dd5ed17e3ee8a7c3f811e3d86d4b8fe571ecfed58a52\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://345ec5f22bc7d8dc5baed5737401896f89c0c0e997bc3aee285139e125339957\",\"dweb:/ipfs/QmUY4q1G2Rb7ykXBCQ9k6HxCKn9mqM8RcFEwT1GuMJX9qh\"]},\"contracts/types/Packed.sol\":{\"keccak256\":\"0xb45c9c541fe40145b66dc0988632eddc421d0c9a8ce6de3fa9c0f2fba1ce8d5d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f4820045bac4b7928a8901323e32c12e1615eeabe1da69dd2fd716db14757771\",\"dweb:/ipfs/QmU1uCvACUf1Vbtp3AVbrVW6pmgTKTQV1kL5j5eK5ZiKhy\"]},\"contracts/types/PoolExtensionsConfig.sol\":{\"keccak256\":\"0x404149fd4b5248a283a1f599a7ef309c3f46dfc449f44e71fd8d58d0c5f182e2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://55b099938b5f8b87ba213925fb1284b46bf5554366a28355ff9b49ad9357350c\",\"dweb:/ipfs/Qmd5Mgs6GgwoLjcjyB2aPkpib7sLTNw7J5yjaojVPwgkvT\"]},\"contracts/types/PoolOperation.sol\":{\"keccak256\":\"0xe9bfadce2dbf16e48f0a759f3975a0d5535be584f32ca8998c0d11a3abaf9729\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4c575117438d9de5ac0a0ebf35ffc80142143ddfbd8db8f583ecc1968ca6796b\",\"dweb:/ipfs/Qmba83MzYZ9siRCZ1yNTagru7sqZMGKm5zTaGFGhb3tCzi\"]},\"contracts/types/PoolStorage.sol\":{\"keccak256\":\"0xe0470ebac23701699b6396ae2cde4dd3c3311d4d6df6dcc7fe848d4f0cd3116d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://aee470995e83dd337736d8d865f1b92403faeabe7b0057b42f0697dcb17889eb\",\"dweb:/ipfs/QmZNgez3zabnAnEwQ6crJyg6BCRYNBcxQD45tkDnFjpSdS\"]},\"contracts/types/Slot0.sol\":{\"keccak256\":\"0xbc4ab36bbc0cdf436b39ef74f18e6eb6430a8754c5d60c2fab35cb265c122adc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6cd88eebc4981ef93ac0f1d8bfddbae79fdb7fa01cd1c559899a4f25ddc0d3db\",\"dweb:/ipfs/QmZSmYEessCE5jn2igVvtMWJwXJkyA7mk4w2F8ErwzHWaW\"]},\"contracts/utils/MetricReentrancyGuardTransient.sol\":{\"keccak256\":\"0xf8c505dd297ef44e37c1f4aa35ecee9a326abb935d266bd085945b15d8eda0b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://758c5fdcf3a833c14c320a73c2fcac3085e5ff83b562d0f985a39819cf669259\",\"dweb:/ipfs/QmRZiwe8njEtNKja62UCgispzGweWA5ZREqpHua7eic5bZ\"]},\"lib/openzeppelin-contracts/contracts/interfaces/IERC1363.sol\":{\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://da5e832b40fc5c3145d3781e2e5fa60ac2052c9d08af7e300dc8ab80c4343100\",\"dweb:/ipfs/QmTzf7N5ZUdh5raqtzbM11yexiUoLC9z3Ws632MCuycq1d\"]},\"lib/openzeppelin-contracts/contracts/interfaces/IERC165.sol\":{\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1c299900ac4ec268d4570ecef0d697a3013cd11a6eb74e295ee3fbc945056037\",\"dweb:/ipfs/Qmab9owJoxcA7vJT5XNayCMaUR1qxqj1NDzzisduwaJMcZ\"]},\"lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol\":{\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1bb2332a7ee26dd0b0de9b7fe266749f54820c99ab6a3bcb6f7e6b751d47ee2d\",\"dweb:/ipfs/QmcRWpaBeCYkhy68PR3B4AgD7asuQk7PwkWxrvJbZcikLF\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5282825a626cfe924e504274b864a652b0023591fa66f06a067b25b51ba9b303\",\"dweb:/ipfs/QmeCfPykghhMc81VJTrHTC7sF6CRvaA1FXVq2pJhwYp1dV\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol\":{\"keccak256\":\"0x304d732678032a9781ae85c8f204c8fba3d3a5e31c02616964e75cfdc5049098\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://299ced486011781dc98f638059678323c03079fefae1482abaa2135b22fa92d0\",\"dweb:/ipfs/QmbZNbcPTBxNvwChavN2kkZZs7xHhYL7mv51KrxMhsMs3j\"]},\"lib/openzeppelin-contracts/contracts/utils/Panic.sol\":{\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c6a5ff4f9fd8649b7ee20800b7fa387d3465bd77cf20c2d1068cd5c98e1ed57a\",\"dweb:/ipfs/QmVSaVJf9FXFhdYEYeCEfjMVHrxDh5qL4CGkxdMWpQCrqG\"]},\"lib/openzeppelin-contracts/contracts/utils/TransientSlot.sol\":{\"keccak256\":\"0xac673fa1e374d9e6107504af363333e3e5f6344d2e83faf57d9bfd41d77cc946\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5982478dbbb218e9dd5a6e83f5c0e8d1654ddf20178484b43ef21dd2246809de\",\"dweb:/ipfs/QmaB1hS68n2kG8vTbt7EPEzmrGhkUbfiFyykGGLsAr9X22\"]},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://971f954442df5c2ef5b5ebf1eb245d7105d9fbacc7386ee5c796df1d45b21617\",\"dweb:/ipfs/QmadRjHbkicwqwwh61raUEapaVEtaLMcYbQZWs9gUkgj3u\"]},\"lib/openzeppelin-contracts/contracts/utils/math/Math.sol\":{\"keccak256\":\"0xe7b82bf9ab6d5016033e5cd2b1d4320a9c12551551d4c57650b5ddebfa47ff07\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://57dd5fbf78e3866b8988cfada7592de8a285cd14e6b42c694526971481bf23d2\",\"dweb:/ipfs/Qmf6Lu6k74k6vgj5kTNYqh2eSHx72urgiD5yYrw7MTY7JT\"]},\"lib/openzeppelin-contracts/contracts/utils/math/SafeCast.sol\":{\"keccak256\":\"0x340b2f51e4c8aa4e3b2c4e3e12a34ac86f4383ecda2bdbad2e263b5a2d3444a3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f7ce09e887e3407bcfc09de5e263143cc44c8bcc4162a32acdb3144eafd89ce2\",\"dweb:/ipfs/QmXda4wEQSWT5xQrETZdBXP2M67LH4F49QxQ16rTj6zZ99\"]}},\"version\":1}","userdoc":{"kind":"user","errors":{"BidIsZero()":[{"notice":"Bid price was zero, so mid/spread cannot be formed."}],"PoolPaused()":[{"notice":"Swaps are disabled while the pool pause level is non-zero."}],"OnlyFactory()":[{"notice":"Thrown when `msg.sender` is not the pool factory."}],"InvalidAmount()":[{"notice":"`amountSpecified == 0` on `swap` / `simulateSwapAndRevert`."}],"IncorrectDelta()":[{"notice":"Swap callback paid less than the input amount the pool requested."}],"NotAllowedToSwap()":[{"notice":"Swap allowlist rejected the swap `sender` (`msg.sender` for `swap`, the supplied `sender` for `simulateSwapAndRevert`)."}],"NotPositionOwner()":[{"notice":"`removeLiquidity` caller is not the position owner."}],"BidGreaterThanAsk()":[{"notice":"Bid price is not strictly below ask (`bidPriceX64 >= askPriceX64`)."}],"FinalAmountIsZero()":[{"notice":"Swap math settled with a zero input or output delta (native units)."}],"InvalidPauseLevel()":[{"notice":"Thrown when `setPause` is called with a level outside `0..2`."}],"NotAllowedToDeposit()":[{"notice":"Deposit allowlist rejected this `owner` for `addLiquidity`."}],"SharesAmountTooLarge()":[{"notice":"A row's shares exceed `type(uint192).max`, or its required scaled token amount exceeds `type(uint104).max`."}],"InvalidBinIndex(int256)":[{"notice":"A bin index in `deltas.binIdxs` (or `setBinAdditionalFees`) is outside this pool’s         `[LOWEST_BIN, HIGHEST_BIN]`."}],"AmountScaledExceedsMax()":[{"notice":"The scaled `amountSpecified` (native × token scale multiplier) exceeds `type(uint128).max`."}],"InsufficientTokenBalance()":[{"notice":"The modify-liquidity callback sent fewer tokens than the pool debt for this add."}],"PriceProviderFailed(bytes)":[{"notice":"External call to the active `IPriceProvider` reverted or bubbled a failure."}],"ReferencePriceOutOfRange()":[{"notice":"Reference price was not within `[bidPriceX64, askPriceX64]`, or was zero."}],"SimulateSwap(int256,int256)":[{"notice":"Deliberate revert carrying simulated swap deltas; no settlement callback or token transfers."}],"LiquidityDeltaLengthMismatch()":[{"notice":"`LiquidityDelta` arrays are not the same length."}],"BidAskRefAsymmetryOutOfBounds()":[{"notice":"Bid/ask returns about the reference are too asymmetric for the pool's `bidAskRefAsymmetryX8` bound."}],"InsufficientLiquidity(uint256,uint256)":[{"notice":"Burn asked for more shares than exist for that position in a bin."}],"OverflowedOnFittingBinBalances(uint256)":[{"notice":"A swap would write a bin's scaled token balance above `type(uint104).max`."}],"LeftoversSmallerThanMinimalOperationalLiquidity(int256,uint256,uint256)":[{"notice":"Remove would leave a non-zero position below the pool operational floor."}],"SharesDeltaSmallerThanMinimalOperationalLiquidity(int256,uint256,uint256)":[{"notice":"Add or remove share delta is below the pool operational floor."}]},"events":{"SpreadFeeUpdated(uint24)":{"notice":"Emitted when the platform share of the spread fee on the pool is updated."},"NotionalFeeUpdated(uint24)":{"notice":"Emitted when total notional fee on the pool is updated."},"PriceProviderUpdated(address)":{"notice":"Emitted when the mutable price provider address stored on the pool is updated."},"PauseLevelUpdated(uint8,uint8)":{"notice":"Emitted when pause level changes."},"BidAskRefAsymmetryUpdated(uint16)":{"notice":"Emitted when bid/ask/ref asymmetry slack `m` in X8 is updated (`M = 1 + m`)."},"BinSwapped(int256,uint256,uint256)":{"notice":"One step of routing updated a bin during `swap` (may emit multiple times per call)."},"BinAdditionalFeesUpdated(int16,uint16,uint16)":{"notice":"Emitted when per-bin additional spread fees are set."},"Swap(address,address,uint256,uint256,uint256)":{"notice":"Terminal summary after a successful `swap`."},"ProtocolFeesCollected(uint256,uint256,uint256,uint256)":{"notice":"Emitted on every `collectFees` call; amounts are those actually transferred."},"LiquidityAdded(address,uint80,int256[],(int256,int256)[],uint256[])":{"notice":"Liquidity was minted into one or more bins for a single position key."},"LiquidityRemoved(address,uint80,int256[],(int256,int256)[],uint256[])":{"notice":"Liquidity was burned from one or more bins for a single position key."}},"notice":"Oracle-Based OMM Pool with separate bin accounting","methods":{"inSwap()":{"notice":"Whether a live swap or `getSellAndBuyPrices` is executing and which price provider supplies its quotes."},"getImmutables()":{"notice":"Return every constructor-set immutable in a single call."},"setPause(uint8)":{"notice":"Set pool pause level (`0` active, `1` admin paused, `2` protocol paused)."},"extsload(bytes32)":{"notice":"Read a single 32-byte storage slot."},"extsload(bytes32[])":{"notice":"Read many storage slots in one call."},"getSellAndBuyPrices()":{"notice":"Live sell/buy prices (Q64.64) for token0 at the pool's current marginal bin position."},"extsload(bytes32,uint256)":{"notice":"Read a contiguous run of slots starting at `startSlot` for `nSlots` steps."},"setPriceProvider(address)":{"notice":"Update the pool active price provider (the factory only calls this for pools created with a mutable provider)."},"setPoolFees(uint24,uint24)":{"notice":"Set aggregate pool spread and notional fee rates (sum of protocol + admin components)."},"setBidAskRefAsymmetryX8(uint16)":{"notice":"Update bid/ask/reference asymmetry bound `m` in X8 (`type(uint16).max` disables the check)."},"setBinAdditionalFees(int16,uint16,uint16)":{"notice":"Set per-bin additional buy and sell spread fees in E6 on top of base spread."},"swap(address,bool,int128,uint128,bytes,bytes)":{"notice":"Execute a spot swap against pool liquidity using live oracle prices."},"removeLiquidity(address,uint80,(int256[],uint256[]),bytes)":{"notice":"Burn shares across bins for `(owner, salt)` and send underlying tokens to `owner`."},"collectFees(uint256,uint256,uint256,uint256,address,address)":{"notice":"Allocate accrued fees using supplied rates, then attempt payouts including previously unpaid fees."},"addLiquidity(address,uint80,(int256[],uint256[]),bytes,bytes)":{"notice":"Mint shares across bins for `(owner, salt)`; pulls tokens via `IMetricOmmModifyLiquidityCallback` on `msg.sender`."},"simulateSwapAndRevert(address,address,bool,int128,uint128,uint128,uint128,uint128,bytes)":{"notice":"Run swap math with caller-supplied bid/ask/reference; reverts with `SimulateSwap` on success or an execution error on failure."}},"version":1},"devdoc":{"kind":"dev","title":"MetricOmmPool","errors":{"BidIsZero()":[{"details":"On `swap`, from the live provider; on `simulateSwapAndRevert`, from `bidPriceX64` you passed."}],"PoolPaused()":[{"details":"Pause level is factory-controlled; liquidity mutators are intentionally not blocked by the same check."}],"IncorrectDelta()":[{"details":"Distinct from `InsufficientTokenBalance` (liquidity path); the swap callback left the pool balance short of the input amount the pool requested."}],"NotAllowedToSwap()":[{"details":"Never reverted by the pool itself; gating extensions raise it from `beforeSwap`, which `swap` and `simulateSwapAndRevert` run identically."}],"NotPositionOwner()":[{"details":"Only `owner` may burn; `addLiquidity` may use a different `msg.sender` when `owner` is supplied, but removal is stricter."}],"BidGreaterThanAsk()":[{"details":"On `swap`, comes from the live `IPriceProvider` quote; on `simulateSwapAndRevert`, from the arguments you passed."}],"FinalAmountIsZero()":[{"details":"After conversion to native units, either `amount0Delta` or `amount1Delta` is zero — e.g. price limit blocks all progress or amounts round away."}],"NotAllowedToDeposit()":[{"details":"Never reverted by the pool itself; gating extensions raise it from the add-liquidity extension points."}],"PanicEmptyExtension()":[{"details":"Should never happen if factory validates extensions config."}],"SharesAmountTooLarge()":[{"details":"Overflow of the resulting bin or pool totals reverts with a `SafeCast` error instead."}],"InvalidBinIndex(int256)":[{"params":{"binIdx":"First failing index from the caller payload."}}],"AmountScaledExceedsMax()":[{"details":"Exact-output requests are capped to the pool's available output before this check."}],"InsufficientTokenBalance()":[{"details":"Fires after the pool computed required `amount0`/`amount1` and invoked `msg.sender`; safe for retry once the callback actually pays."}],"PriceProviderFailed(bytes)":[{"params":{"reason":"Opaque revert data from the provider (decode off-chain if the provider documents errors)."}}],"ReferencePriceOutOfRange()":[{"details":"On `swap`, from the live provider; on `simulateSwapAndRevert`, from `referencePriceX64` you passed."}],"SimulateSwap(int256,int256)":[{"params":{"amount0Delta":"Net token0 the swap would move into (`>0`) or out of (`<0`) the pool (native decimals).","amount1Delta":"Net token1 the swap would move into or out of the pool (native decimals)."},"details":"Uses validated caller-supplied quotes and runs swap hooks, even while paused. All state changes revert.      Both deltas must fit `int128` before `afterSwap`, despite the error using `int256` fields.      Decode this error from revert data; execution failures propagate their own errors instead."}],"PanicInvalidExtensionIndex()":[{"details":"Should never happen if factory validates extensions config."}],"LiquidityDeltaLengthMismatch()":[{"details":"Checked only for non-empty `binIdxs`; an empty array returns `(0, 0)`."}],"ReentrancyGuardReentrantCall()":[{"details":"Unauthorized reentrant call or overlapping guarded action."}],"BidAskRefAsymmetryOutOfBounds()":[{"details":"With `r1 = reference/bid - 1`, `r2 = ask/reference - 1`, and `M = 1 + m` (`m` stored in X8), requires      `1/M <= r1/r2 <= M`. Skipped when `bidAskRefAsymmetryX8 == type(uint16).max`. Otherwise a reference on bid/ask reverts."}],"SafeERC20FailedOperation(address)":[{"details":"An operation with an ERC-20 token failed."}],"SafeCastOverflowedUintToInt(uint256)":[{"details":"A uint value doesn't fit in an int of `bits` size."}],"InsufficientLiquidity(uint256,uint256)":[{"params":{"available":"Shares recorded for `owner`+`salt` in that bin when this entry is processed.","requested":"`deltas.shares[i]` for the offending bin."}}],"OverflowedOnFittingBinBalances(uint256)":[{"params":{"attemptedScaledBalance":"The balance that would have been stored (internal scaled units)."},"details":"Happens when the input credited to a bin would grow its incoming-side balance past the packed `BinState` width.      That direction can remain blocked until liquidity is removed or the opposite swap drains the incoming side; prefer smaller bins / less dense liquidity."}],"SafeCastOverflowedIntDowncast(uint8,int256)":[{"details":"Value doesn't fit in an int of `bits` size."}],"SafeCastOverflowedUintDowncast(uint8,uint256)":[{"details":"Value doesn't fit in a uint of `bits` size."}],"LeftoversSmallerThanMinimalOperationalLiquidity(int256,uint256,uint256)":[{"params":{"binIdx":"Bin where the leftover would remain.","leftovers":"Remaining shares after the attempted remove.","minimalRequired":"Pool immutable `MINIMAL_OPERATIONAL_LIQUIDITY`."},"details":"Raised when leftover shares are `> 0` and `< MINIMAL_OPERATIONAL_LIQUIDITY`; remove more or exit to zero."}],"SharesDeltaSmallerThanMinimalOperationalLiquidity(int256,uint256,uint256)":[{"params":{"binIdx":"Bin where the offending delta was applied.","sharesDelta":"Offending share delta.","minimalRequired":"Pool immutable `MINIMAL_OPERATIONAL_LIQUIDITY`."},"details":"Raised when non-zero `sharesToAdd` / `sharesToRemove` is `< MINIMAL_OPERATIONAL_LIQUIDITY`."}]},"events":{"SpreadFeeUpdated(uint24)":{"params":{"spreadFeeE6":"New platform share of the spread fee in E6 (`1e6 = 100%`)."}},"NotionalFeeUpdated(uint24)":{"params":{"notionalFeeE8":"New aggregate notional fee in E8 (`1e8 = 100%`)."}},"PriceProviderUpdated(address)":{"params":{"newPriceProvider":"New active `IPriceProvider` (immutable pools never emit this from rotation)."}},"PauseLevelUpdated(uint8,uint8)":{"params":{"newLevel":"New pause level after the update.","previousLevel":"Prior pause level (`0` active, `1` admin pause, `2` protocol pause)."}},"BidAskRefAsymmetryUpdated(uint16)":{"params":{"bidAskRefAsymmetryX8":"New asymmetry bound; `type(uint16).max` disables the check."}},"BinSwapped(int256,uint256,uint256)":{"params":{"fees":"This step's two fee legs, packed: `high` = LP leg (stays in the bin), `low` = platform leg (protocol + admin, withheld). Scaled units.","binIdx":"Bin touched in this step.","binDeltas":"Change in THAT BIN's scaled balances, packed: `high` = token0, `low` = token1."},"details":"Refer to types/Packed.sol to decode the packed values."},"BinAdditionalFeesUpdated(int16,uint16,uint16)":{"params":{"bin":"Bin index whose overrides were updated.","addFeeBuyE6":"Additional buy-side spread fee in E6 on top of base spread.","addFeeSellE6":"Additional sell-side spread fee in E6 on top of base spread."}},"Swap(address,address,uint256,uint256,uint256)":{"params":{"sender":"`msg.sender` of `swap` (the account that may receive swap callback).","details":"Swap mode and resulting bin position packed into one word: `exactInput()`,        `binIdx()` (signed), `posInBin()`. Check details in PackedSwapDetailsLib.","recipient":"Address that received the output token leg.","amountDeltas":"Net native-token flows for the whole call, packed: `high` = token0, `low` = token1 (positive = the pool gained that token).","platformFees":"Platform (protocol + admin) fee for this swap on the input-token leg, packed: `high` = SPREAD leg, `low` = NOTIONAL leg. Scaled units."},"details":"Refer to types/Packed.sol to decode the packed values."},"ProtocolFeesCollected(uint256,uint256,uint256,uint256)":{"params":{"amount0ToAdmin":"Token0 amount sent to `adminFeeDestination` (native).","amount1ToAdmin":"Token1 amount sent to `adminFeeDestination` (native).","amount0ToProtocol":"Token0 amount sent to `protocolFeeDestination` (native).","amount1ToProtocol":"Token1 amount sent to `protocolFeeDestination` (native)."}},"LiquidityAdded(address,uint80,int256[],(int256,int256)[],uint256[])":{"params":{"salt":"`salt` leg of the position key; indexed with `provider` to disambiguate positions.","shares":"Liquidity shares minted per input row for this position.","binIdxs":"Bin index per input row (pool-configured range).","provider":"`owner` leg of the position key; indexed for position-scoped subscriptions.","binBalanceDeltas":"Scaled token0/token1 balance change inside each bin (`BinBalanceDelta`); not wallet transfer amounts."},"details":"Arrays are parallel: `binIdxs[i]`, `binBalanceDeltas[i]`, and `shares[i]` describe the same bin. Zero-share rows remain in the arrays with zero deltas; indexers can reconcile bins from `binBalanceDeltas` (scaled) separately from callback token flows (native)."},"LiquidityRemoved(address,uint80,int256[],(int256,int256)[],uint256[])":{"params":{"salt":"Position salt with `provider` in the key.","shares":"Shares burned per input row.","binIdxs":"Bin index per input row.","provider":"Position owner (equals `msg.sender` for the removing call).","binBalanceDeltas":"Scaled balance change per bin (non-positive: tokens leaving the bin)."},"details":"Same parallel-array layout as `LiquidityAdded`. `removeLiquidity` requires `msg.sender == owner`, so the position key always matches the caller for this event."}},"details":"Layout: immutables, state variables, constructor, modifiers,      external state-changing functions, external views, then internal helpers.Contract uses `Extsload` for external storage reads, apart from `getImmutables()`, `inSwap()` and `getSellAndBuyPrices()`.External function order follows `IMetricOmmPool` composition: `IMetricOmmPoolActions`, then `IMetricOmmPoolCollectFees`, then `IMetricOmmPoolFactoryActions`.Contract coupling: storage layout and packing are mirrored by `contracts/libraries/PoolStateLibrary.sol`      for EXTSLOAD-based reads. Any storage reorder or repack is a breaking change for EXTSLOAD readers.","methods":{"inSwap()":{"returns":{"priceProvider_":"Active price provider during either; address(0) otherwise, including during simulation."}},"constructor":{"details":"All initial checks MUST be validated before construction at the factory/deployer level."},"getImmutables()":{"details":"Immutables live in contract bytecode, not storage, so they cannot be read via EXTSLOAD."},"setPause(uint8)":{"params":{"newLevel":"Pause level enforced by the pool; must be at most `2`."},"details":"Transition rules are enforced by the factory, not the pool."},"extsload(bytes32)":{"params":{"slot":"Keccak-derived or raw slot key as used by the implementation contract."},"returns":{"_0":"Raw `bytes32` contents of the slot."}},"extsload(bytes32[])":{"params":{"slots":"Each entry is a slot key as for `extsload(bytes32)`."},"returns":{"_0":"One `bytes32` per slot, same order as `slots`."}},"getSellAndBuyPrices()":{"details":"Informational only — not a guaranteed executable quote. Sell = token0 → token1; buy = token1 → token0.      Includes oracle spread, per-bin additional fees, and notional fees (zero-size exact-in marginal prices)      via the active price provider (same path as `swap`). For real pricing/execution decisions, call `swap`      and decide in the swap callback, or use the periphery quoter. The quote may update provider state.      Shares the swap reentrancy guard; callable while paused, but not during another guarded action.","returns":{"buyPriceX64":"Fee-adjusted buy price (token1 per token0, Q64.64).","sellPriceX64":"Fee-adjusted sell price (token1 per token0, Q64.64)."}},"extsload(bytes32,uint256)":{"params":{"nSlots":"Number of consecutive slots to read (`startSlot`, `startSlot + 1`, ...).","startSlot":"First slot (inclusive)."},"returns":{"_0":"Raw slot values in order."}},"setPriceProvider(address)":{"params":{"newPriceProvider":"New provider contract; the factory validates its `token0`/`token1`, the pool stores it as given."}},"setPoolFees(uint24,uint24)":{"params":{"newSpreadFeeE6":"Platform share (protocol + admin) of the spread fee in E6 (`1e6 = 100%`).","newNotionalFeeE8":"Total notional fee in E8 (`1e8 = 100%`)."}},"setBinAdditionalFees(int16,uint16,uint16)":{"params":{"bin":"Bin index within the pool configured bin range.","addFeeBuyE6":"Additional fee on swaps buying token0 (E6).","addFeeSellE6":"Additional fee on swaps selling token0 (E6)."}},"swap(address,bool,int128,uint128,bytes,bytes)":{"params":{"recipient":"Address that receives the output token (sent before the callback; the swap reverts if the        callback then underpays the input).","zeroForOne":"`true` sells token0 for token1 along the pool’s ordering.","callbackData":"Opaque bytes forwarded to the swap callback.","extensionData":"Opaque bytes forwarded to swap extension point functions (beforeSwap / afterSwap).","priceLimitX64":"Fee-inclusive token1-per-token0 price in Q64.64: a floor when `zeroForOne`, a cap otherwise.        Zero permits sells but prevents buys; rounding can significantly breach the bound for tiny amounts.","amountSpecified":"Exact input if `>0`, exact output magnitude if `<0`, in native units of that leg.        May be partially filled; check the returned deltas."},"details":"Pulls input from `msg.sender` through `IMetricOmmSwapCallback` after sending output to `recipient`.","returns":{"_0":"Net token0 change for the pool (signed, native; positive = pool received).","_1":"Net token1 change for the pool (signed, native; positive = pool received)."}},"removeLiquidity(address,uint80,(int256[],uint256[]),bytes)":{"params":{"salt":"Position salt with `owner`.","owner":"Must equal `msg.sender`.","deltas":"Parallel arrays of bins and share burns.","extensionData":"Opaque bytes forwarded to liquidity extensions (beforeRemoveLiquidity / afterRemoveLiquidity)."},"details":"Requires `msg.sender == owner` except for empty `binIdxs`, which returns `(0, 0)`.      Payouts round down per bin and again on conversion to native units; no callback.      Emptying the current bin resets its position to `0` for non-negative bins or `type(uint104).max` for negative bins.","returns":{"amount0Removed":"Total token0 sent from the pool to `owner` (native).","amount1Removed":"Total token1 sent from the pool to `owner` (native)."}},"collectFees(uint256,uint256,uint256,uint256,address,address)":{"params":{"adminSpreadFeeE6":"Admin spread component in E6 at collection time.","adminNotionalFeeE8":"Admin notional component in E8 at collection time.","adminFeeDestination":"Recipient for the admin share of collected tokens (per factory configuration).","protocolSpreadFeeE6":"Protocol spread component in E6 at collection time (must match factory policy).","protocolNotionalFeeE8":"Protocol notional component in E8 at collection time.","protocolFeeDestination":"Recipient for the protocol share (the factory's `feeReceiver`)."},"details":"Pending balances retain scaled rounding remainders; transfer failures do not revert allocation.      Supported tokens must not move funds when reporting a failed transfer."},"addLiquidity(address,uint80,(int256[],uint256[]),bytes,bytes)":{"params":{"salt":"Caller-chosen second leg of the position key.","owner":"Position owner encoded in the pool’s position key.","deltas":"Parallel `binIdxs` / `shares` arrays (see `LiquidityDelta`).","callbackData":"Opaque bytes forwarded unmodified to the modify-liquidity callback.","extensionData":"Opaque bytes forwarded to liquidity extensions (beforeAddLiquidity / afterAddLiquidity)."},"details":"Callback amounts round up per bin and again on conversion to native units; underpay reverts      `InsufficientTokenBalance`. `msg.sender` pays but need not equal `owner`. Empty `binIdxs` skips hooks and callbacks.Reverts `LiquidityDeltaLengthMismatch` when `binIdxs` is non-empty and its length differs from `shares`.","returns":{"amount0Added":"Token0 amount the pool required from the callback (native).","amount1Added":"Token1 amount the pool required from the callback (native)."}},"simulateSwapAndRevert(address,address,bool,int128,uint128,uint128,uint128,uint128,bytes)":{"params":{"sender":"Address forwarded to swap extension point functions in place of `msg.sender`; has no other effect since the call always reverts.","recipient":"Same as `swap` (forwarded to swap extension point functions).","zeroForOne":"Same as `swap`.","askPriceX64":"Ask used for extension context and swap math in this simulation (Q64.64).","bidPriceX64":"Bid used for extension context and swap math in this simulation (Q64.64).","extensionData":"Opaque bytes forwarded to swap extension point functions (beforeSwap / afterSwap).","priceLimitX64":"Same encoding as `swap`.","amountSpecified":"Same sign convention as `swap`.","referencePriceX64":"Reference price used as the mid/price-path anchor and for fee calculation in this simulation (Q64.64)."},"details":"Does not use the pool’s live oracle prices for the mid—use for quotes/off-chain routing. Invokes the same swap extension point functions as `swap` when enabled; still enforces `priceLimitX64` and path logic; no ERC20 transfers or swap callback. Typical usage: `eth_call` or `try/catch` decoding `SimulateSwap`. `sender` is forwarded to the extension points as-is instead of `msg.sender`, so you can simulate as an arbitrary address (e.g. checking a sender-gated extension for a specific user) — safe only because the call always reverts and nothing persists.","returns":{"_0":"Unused in practice; values appear only on the reverting `SimulateSwap` error.","_1":"Unused in practice; values appear only on the reverting `SimulateSwap` error."}}},"version":1,"stateVariables":{"pauseLevel":{"details":"0 = active, 1 = paused by admin, 2 = paused by protocol. Transitions enforced by factory."},"spreadFeeE6":{"details":"Platform (protocol + admin) share of the spread fee, E6."},"notionalFeeE8":{"details":"Platform (protocol + admin) notional fee, E8."},"priceProvider":{"details":"The price provider address - only used when `IMMUTABLE_PRICE_PROVIDER == address(0)`"},"_positionBinShares":{"details":"Per-bin position shares keyed by `LiquidityLib._positionBinKey`."},"bidAskRefAsymmetryX8":{"details":"`m` in X8 (`M = 1 + m`); `type(uint16).max` disables the bid/ask/reference asymmetry check."},"IMMUTABLE_PRICE_PROVIDER":{"details":"If set this is the address of the immutable price providerIf unset the `priceProvider` is the address of the mutable price provider."},"pendingAdminFeeToken0Scaled":{"details":"Pending fee balances in internal scaled units; payouts convert to native units rounding down."}}},"storageLayout":{"types":{"t_int16":{"label":"int16","encoding":"inplace","numberOfBytes":"2"},"t_int24":{"label":"int24","encoding":"inplace","numberOfBytes":"3"},"t_uint8":{"label":"uint8","encoding":"inplace","numberOfBytes":"1"},"t_int256":{"label":"int256","encoding":"inplace","numberOfBytes":"32"},"t_uint16":{"label":"uint16","encoding":"inplace","numberOfBytes":"2"},"t_uint24":{"label":"uint24","encoding":"inplace","numberOfBytes":"3"},"t_address":{"label":"address","encoding":"inplace","numberOfBytes":"20"},"t_bytes32":{"label":"bytes32","encoding":"inplace","numberOfBytes":"32"},"t_uint104":{"label":"uint104","encoding":"inplace","numberOfBytes":"13"},"t_uint128":{"label":"uint128","encoding":"inplace","numberOfBytes":"16"},"t_uint256":{"label":"uint256","encoding":"inplace","numberOfBytes":"32"},"t_mapping(t_int256,t_uint256)":{"key":"t_int256","label":"mapping(int256 => uint256)","value":"t_uint256","encoding":"mapping","numberOfBytes":"32"},"t_mapping(t_bytes32,t_uint256)":{"key":"t_bytes32","label":"mapping(bytes32 => uint256)","value":"t_uint256","encoding":"mapping","numberOfBytes":"32"},"t_struct(BinState)9392_storage":{"label":"struct BinState","members":[{"slot":"0","type":"t_uint104","astId":9383,"label":"token0BalanceScaled","offset":0,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"0","type":"t_uint104","astId":9385,"label":"token1BalanceScaled","offset":13,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"0","type":"t_uint16","astId":9387,"label":"lengthE6","offset":26,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"0","type":"t_uint16","astId":9389,"label":"addFeeBuyE6","offset":28,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"0","type":"t_uint16","astId":9391,"label":"addFeeSellE6","offset":30,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"}],"encoding":"inplace","numberOfBytes":"32"},"t_struct(BinTotals)9380_storage":{"label":"struct BinTotals","members":[{"slot":"0","type":"t_uint128","astId":9377,"label":"scaledToken0","offset":0,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"0","type":"t_uint128","astId":9379,"label":"scaledToken1","offset":16,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"}],"encoding":"inplace","numberOfBytes":"32"},"t_mapping(t_int256,t_struct(BinState)9392_storage)":{"key":"t_int256","label":"mapping(int256 => struct BinState)","value":"t_struct(BinState)9392_storage","encoding":"mapping","numberOfBytes":"32"}},"storage":[{"slot":"0","type":"t_uint8","astId":627,"label":"pauseLevel","offset":0,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"0","type":"t_int16","astId":629,"label":"curBinIdx","offset":1,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"0","type":"t_uint104","astId":631,"label":"curPosInBin","offset":3,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"0","type":"t_int24","astId":633,"label":"curBinDistFromProvidedPriceE6","offset":16,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"0","type":"t_uint24","astId":636,"label":"spreadFeeE6","offset":19,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"0","type":"t_uint24","astId":639,"label":"notionalFeeE8","offset":22,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"0","type":"t_uint16","astId":642,"label":"bidAskRefAsymmetryX8","offset":25,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"1","type":"t_struct(BinTotals)9380_storage","astId":645,"label":"binTotals","offset":0,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"2","type":"t_uint128","astId":647,"label":"notionalFeeToken0Scaled","offset":0,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"2","type":"t_uint128","astId":649,"label":"notionalFeeToken1Scaled","offset":16,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"3","type":"t_address","astId":652,"label":"priceProvider","offset":0,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"4","type":"t_mapping(t_int256,t_struct(BinState)9392_storage)","astId":657,"label":"_binStates","offset":0,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"5","type":"t_mapping(t_int256,t_uint256)","astId":661,"label":"_binTotalShares","offset":0,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"6","type":"t_mapping(t_bytes32,t_uint256)","astId":666,"label":"_positionBinShares","offset":0,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"7","type":"t_uint256","astId":669,"label":"pendingAdminFeeToken0Scaled","offset":0,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"8","type":"t_uint256","astId":671,"label":"pendingAdminFeeToken1Scaled","offset":0,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"9","type":"t_uint256","astId":673,"label":"pendingProtocolFeeToken0Scaled","offset":0,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"},{"slot":"10","type":"t_uint256","astId":675,"label":"pendingProtocolFeeToken1Scaled","offset":0,"contract":"contracts/MetricOmmPool.sol:MetricOmmPool"}]},"transientStorageLayout":{"types":null,"storage":[]},"evm":{"bytecode":{"object":"61038060405234610708576156fe8038038061001a81610720565b92833981818101036103a081126107085761003483610745565b9061004160208501610745565b9361004e60408201610745565b9461005b60608301610745565b9560e0607f19850112610708576040519360e08501906001600160401b0382118683101761070c5760c09160405261009560808601610745565b86526100a360a08601610745565b60208701526100b3828601610745565b60408701526100c460e08601610745565b60608701526100d66101008601610745565b60808701526100e86101208601610745565b60a08701526100fa6101408601610745565b8683015261015f190112610708576040519660c088016001600160401b0381118982101761070c57604052610160840151885261018084015160208901526101a084015160408901526101c084015160608901526101e0840151608089015261020084015160a08901526102208401519081151582036107085761024085015161026086015190610280870151926102a0880151946102c0890151966101a36102e08b01610759565b986103008b01519c8d8060020b03610708576103208c01516001600160401b038111610708578f6101d9918e918201910161078c565b6103408d0151909f6001600160401b038211610708578d01908d01906101fe9161078c565b9f61020c6103608e01610759565b9c6103800161021a9061077d565b9d600160a01b60019003815116608052600160a01b6001900360208201511660a052600160a01b6001900360408201511660c052600160a01b6001900360608201511660e052600160a01b6001900360808201511661010052600160a01b6001900360a08201511661012052600160a01b600190039060c00151166101405280516101605260208101516101805260408101516101a05260608101516101c05260808101516101e05260a00151610200526102205261024052610260525f146106de5761032052600380546001600160a01b03191690555b610280526102a0526102c0526102e052610300525f805460c89490941b61ffff60c81b1660b09390931b62ffffff60b01b16600160801b600160d81b031990941660989290921b62ffffff60981b1691909117929092171762ffffff60801b60809390931b929092169190911781555b81518110156103fe578061037860019284610868565b51815f52600460205260405f2090838060681b0381511690825491600160681b8660d01b03602083015160681b169061ffff60d01b604084015160d01b169161ffff60e01b606085015160e01b1693608061ffff60f01b91015160f01b1694888060f01b039261ffff60e01b199163ffffffff60e01b1617161716171717905501610362565b505f5b82518110156104ad578061041760019285610868565b5161042961042483610890565b6108b4565b5f52600460205260405f2090838060681b0381511690825491600160681b8660d01b03602083015160681b169061ffff60d01b604084015160d01b169161ffff60e01b606085015160e01b1693608061ffff60f01b91015160f01b1694888060f01b039261ffff60e01b199163ffffffff60e01b1617161716171717905501610401565b5051905190806106d057505f195b61036052806106c257505f5b61034052604051614e3890816108c68239608051818181610bee0152613f08015260a051818181610c1e0152613f57015260c051818181610c4e0152613f33015260e051818181610c7e0152613fb8015261010051818181610cae0152613f94015261012051818181610cde0152614007015261014051818181610d0e0152613fe3015261016051818181610d360152611de2015261018051818181610d5d0152611f0801526101a051818181610d8401526120d701526101c051818181610dab01526121e801526101e051818181610dd201526126d5015261020051818181610df901526134b4015261022051818181610a2801528181610e2f015261231101526102405181818161081801528181610a540152818161187c01526138280152610260518181816106fa01528181610a83015281816118d4015261378a015261028051818181610aaa015281816118a1015281816119b60152818161273901528181612b97015261332b01526102a051818181610ad0015281816118f701528181611a3001528181612bbf015281816132d1015261330001526102c05181610af601526102e05181610b1c01526103005181610b42015261032051818181610b700152613585015261034051818181610b9801528181611107015261299b015261036051818181610bbf0152818161124f0152612d3b0152f35b6106cb90610890565b6104c7565b6106d9906108b4565b6104bb565b5f61032052600380546001600160a01b0319166001600160a01b03929092169190911790556102f2565b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b6040519190601f01601f191682016001600160401b0381118382101761070c57604052565b51906001600160a01b038216820361070857565b519062ffffff8216820361070857565b51906001600160681b038216820361070857565b519061ffff8216820361070857565b81601f82011215610708578051906001600160401b03821161070c576107b760208360051b01610720565b92602060a081868681520194028301019181831161070857602001925b8284106107e2575050505090565b60a084830312610708576040519060a08201906001600160401b0382118383101761070c5760a09260209260405261081987610769565b8152610826838801610769565b838201526108366040880161077d565b60408201526108476060880161077d565b60608201526108586080880161077d565b60808201528152019301926107d4565b805182101561087c5760209160051b010190565b634e487b7160e01b5f52603260045260245ffd5b600160ff1b81146108a0575f0390565b634e487b7160e01b5f52601160045260245ffd5b905f1982019182136001166108a05756fe6101e06040526004361015610012575f80fd5b5f6080525f3560e01c80630f7439531461179c5780631e2eaeaf146117805780631f21638c1461168c57806335fd631a14611636578063372aa224146115bc5780633ff20c8a1461158b5780635dd9a4c5146113fa578063658b6cb714611275578063943f3b1a1461108857806397962ef914610faf578063bcdb4dad14610957578063d83067861461092c578063dbd035ff14610892578063e24f0884146103e2578063ec069057146101c35763fbde1732146100ce575f80fd5b346101bd5760803660031901126101bd576100e7611abc565b6100ef611b00565b906044359067ffffffffffffffff82116101bd57604060031983360301126101bd5760643567ffffffffffffffff81116101bd57610131903690600401611ad2565b9161013a61392b565b5c61019157604094610179947fa147fd8f7d12de6da66feedc6d64a11bd371e5471ee1018f11f9072ede67a0fa61016f61392b565b5d60040191612049565b60805161018461392b565b5d82519182526020820152f35b7f3ee5aeb500000000000000000000000000000000000000000000000000000000608051526004608051fd5b60805180fd5b346101bd576080513660031901126101bd576101dd61392b565b5c610191576101ea61392b565b7f695543c3708653cda9d418b4ccd3be11368e40636c10c44b18cfe756b6d88b29905d610215613615565b6001600160801b0316806001600160801b0381931690610234916139c5565b926001600160801b031690610248916139fc565b9160805154928360081c60010b608051526004602052608051604090206040519061027282611bff565b54936001600160681b03851682528460681c6001600160681b0316602083015260408201908560d01c61ffff16825260608301928660e01c61ffff1684526080019560f01c86528660801c60020b6102ca828261385b565b925161ffff1601906102db9161385b565b8660181c6001600160681b03166102f181612374565b93516001600160681b039390940291020104946305f5e1006affffff000000000000000060709290921c919091160492600160401b620f424069ffff000000000000000060409490941b939093169290920401830181019081106103ca5769ffff000000000000000061037061036b620f42409388613998565b6138e1565b94516080515060401b160401016080515060805150600160401b019182600160401b116103ca576103ae61036b6040946001600160801b03936139b6565b916080516103ba61392b565b5d81845193168352166020820152f35b634e487b7160e01b6080515260116004526024608051fd5b346107fd5760c03660031901126107fd576103fb611abc565b60243580151581036107fd576044359081600f0b82036107fd57606435926001600160801b03841684036107fd5760843567ffffffffffffffff81116107fd57610449903690600401611ad2565b909360a43567ffffffffffffffff81116107fd5761046b903690600401611ad2565b909360ff5f541661086a5761047e61392b565b5c6108425785948389937f695543c3708653cda9d418b4ccd3be11368e40636c10c44b18cfe756b6d88b296104b161392b565b5d6104ce81846104bf613615565b9c91819a81988f948c33612603565b61010051919c9299909592908c15610725578d60805181126106e3575b506104f46137ec565b91333b156101bd578b908f61053a60405194859384937fc32510750000000000000000000000000000000000000000000000000000000085526080519660048601612020565b0381608051335af180156106d6576106bd575b5089608051811391826106a3575b505061067757848c6106539b60409f996105b0976106599f8b968f919d8f6001600160a01b039f5b6105996105936080515496613396565b99613396565b996001600160801b0381169060801c019a336133bd565b608051548951946f010000000000000000000000000000006effff000000000000000000000000006001600160681b038460181c169360601b169160805190600f0b1360781b1617178452876001600160801b03166fffffffffffffffffffffffffffffffff198660801b161760208501528884015216907f9734819749a91fc3be03ea83205f924ee08479bd3f0da48efc91d94d050cac1e60603392a3613396565b91613396565b60805161066461392b565b5d825191600f0b8252600f0b6020820152f35b7fbe79592100000000000000000000000000000000000000000000000000000000608051526004608051fd5b6106ad925061203c565b6106b56137ec565b10898f61055b565b6080516106c991611c37565b6080516101bd578e61054d565b6040513d608051823e3d90fd5b6106ef61071f91611fe0565b896001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016613b18565b8d6104eb565b905f8b12610801575b61073661374e565b91333b156107fd578e8c6107795f9360405195869485947fc325107500000000000000000000000000000000000000000000000000000000865260048601612020565b038183335af180156107f2576107de575b508c608051811391826107c4575b505061067757848c6106539b60409f996105b0976106599f8b968f919d8f6001600160a01b039f610583565b6107ce925061203c565b6107d661374e565b108c8f610798565b5f6107e891611c37565b5f6080528e61078a565b6040513d5f823e3d90fd5b5f80fd5b61083d61080d8c611fe0565b896001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016613b18565b61072e565b7f3ee5aeb5000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f51bd770c000000000000000000000000000000000000000000000000000000005f5260045ffd5b346107fd5760203660031901126107fd5760043567ffffffffffffffff81116107fd57366023820112156107fd5780600401359067ffffffffffffffff82116107fd578160051b9036602483830101116107fd5760408051809460208252602082015201918301916020806024604086019401925b8335548152019101908483821015610923575060208091610907565b60408186030190f35b346107fd575f3660031901126107fd576020610946611fa5565b6001600160a01b0360405191168152f35b346107fd575f3660031901126107fd575f6102e060405161097781611bce565b8281528260208201528260408201528260608201528260808201528260a08201528260c08201528260e08201528261010082015282610120820152826101408201528261016082015282610180820152826101a0820152826101c0820152826101e08201528261020082015282610220820152826102408201528261026082015282610280820152826102a0820152826102c08201520152610300604051610a1e81611bce565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001681526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001660208201526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001660408201527f000000000000000000000000000000000000000000000000000000000000000060608201527f000000000000000000000000000000000000000000000000000000000000000060808201527f000000000000000000000000000000000000000000000000000000000000000060a08201527f000000000000000000000000000000000000000000000000000000000000000060c08201527f000000000000000000000000000000000000000000000000000000000000000060e08201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166101008201527f00000000000000000000000000000000000000000000000000000000000000006101208201527f00000000000000000000000000000000000000000000000000000000000000006101408201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166101608201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166101808201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166101a08201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166101c08201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166101e08201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166102008201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166102208201527f00000000000000000000000000000000000000000000000000000000000000006102408201527f00000000000000000000000000000000000000000000000000000000000000006102608201527f00000000000000000000000000000000000000000000000000000000000000006102808201527f00000000000000000000000000000000000000000000000000000000000000006102a08201527f00000000000000000000000000000000000000000000000000000000000000006102c08201527f00000000000000000000000000000000000000000000000000000000000000006102e08201526102e0604051916001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001683526001600160a01b0360208201511660208401526001600160a01b036040820151166040840152606081015160608401526080810151608084015260a081015160a084015260c081015160c084015260e081015160e08401526001600160a01b03610100820151166101008401526101208101516101208401526101408101516101408401526001600160a01b03610160820151166101608401526001600160a01b03610180820151166101808401526001600160a01b036101a0820151166101a08401526001600160a01b036101c0820151166101c08401526001600160a01b036101e0820151166101e08401526001600160a01b03610200820151166102008401526001600160a01b03610220820151166102208401526102408101516102408401526102608101516102608401526102808101516102808401526102a08101516102a08401526102c08101516102c084015201516102e0820152f35b346107fd5760a03660031901126107fd57610fc8611abc565b610fd0611b00565b906044359067ffffffffffffffff82116107fd57604060031983360301126107fd5760643567ffffffffffffffff81116107fd57611012903690600401611ad2565b60849291923567ffffffffffffffff81116107fd57611035903690600401611ad2565b93909261104061392b565b5c6108425760409661107f967f3ff35dbce7a07ce455b128890d383c554afbc1b07cf7390a13e2d602a38c1a0a61107561392b565b5d60040191611d4e565b5f61018461392b565b346107fd5760603660031901126107fd576004358060010b8091036107fd5760243561ffff81168082036107fd576044359061ffff82168083036107fd576110ce612307565b6110d661392b565b5c610842577f6228ff59018d12017a2bb81d4aaee1d839faeb61bb29b616b08aec1d954bdf7c61110461392b565b5d7f00000000000000000000000000000000000000000000000000000000000000008512801561124c575b611220576112096040937f2a1317b5b5812150d82fa4b2e5ae289f62be0c42a042edbdc69b978673746a4795875f5260046020526111ba865f209182907fffff0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff7dffff0000000000000000000000000000000000000000000000000000000083549260e01b169116179055565b907dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffff00000000000000000000000000000000000000000000000000000000000083549260f01b169116179055565b82519182526020820152a25f61121d61392b565b5d005b847f64b6051e000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b507f0000000000000000000000000000000000000000000000000000000000000000851361112f565b346107fd576101203660031901126107fd5761128f611abc565b6024356001600160a01b03811681036107fd576044359081151582036107fd576064359283600f0b84036107fd57608435906001600160801b03821682036107fd5760a435906001600160801b038216938483036107fd5760c435936001600160801b038516948581036107fd5760e435906001600160801b038216958683036107fd576101043567ffffffffffffffff81116107fd57611334903690600401611ad2565b98909761133f61392b565b5c610842578885858f8f6113cc9f918f96918d8f61138d8f956113929c8e987fbaf2b3653c77cf277ac36a174e0624557a6829660e787388cf9abd21ceb18a4461138761392b565b5d612496565b612603565b909691956101005191979d8e979d8e946113b66113b05f5497613396565b9a613396565b9a6001600160801b0381169060801c019b6133bd565b7f1f6053de000000000000000000000000000000000000000000000000000000005f5260045260245260445ffd5b346107fd5760403660031901126107fd5760043562ffffff81168082036107fd576024359062ffffff8216928383036107fd57611435612307565b61143d61392b565b5c610842577ff88a537f51dde30be9a9960a2850ed980c30e495145525344f0f47ff82ba3b7361146b61392b565b5d5f549162ffffff8360981c168103611516575b5050505f549162ffffff8360b01c16810361149e575b5f61121d61392b565b7f4d14e59cea6a74cef5169f00d96334b2c0214358308e92227d7c47e943664b9c927fffffffffffffff000000ffffffffffffffffffffffffffffffffffffffffffff78ffffff0000000000000000000000000000000000000000000060209460b01b169116175f55604051908152a1808080611495565b7f0e7d070a63c6cf2ec01badac5543ae7bcd84ceebe76073c704e7f3e356f4f194927fffffffffffffffffffff000000ffffffffffffffffffffffffffffffffffffff75ffffff0000000000000000000000000000000000000060209460981b169116175f55604051908152a182808061147f565b346107fd5760203660031901126107fd5760043560ff811681036107fd576115ba906115b5612307565b611b19565b005b346107fd5760203660031901126107fd576001600160a01b036115dd611abc565b6115e5612307565b16807fffffffffffffffffffffffff000000000000000000000000000000000000000060035416176003557fb266add5f3044b17d27db796af992cecbe413921b4e8aaaee03c719e16b9806a5f80a2005b346107fd5760403660031901126107fd576024356004356040519160408360208152826020820152019060051b8301916001602060408501935b8354815201910190848382101561092357506020600191611670565b346107fd5760203660031901126107fd5760043561ffff8116908181036107fd576116b5612307565b6116bd61392b565b5c610842577faab56bc87c1aa4b7f07e347524cc16f26458efacbe0150d5f992ab348f9b5c9d6116eb61392b565b5d5f549161ffff8360c81c168103611706575f61121d61392b565b7f0262bdf5ceb29428fdaec304f1872012436cebf3ff5621c19bc17b61892940ea927fffffffffff0000ffffffffffffffffffffffffffffffffffffffffffffffffff7affff0000000000000000000000000000000000000000000000000060209460c81b169116175f55604051908152a1808080611495565b346107fd5760203660031901126107fd57600435545f5260205ff35b346107fd5760c03660031901126107fd576064356024356084356001600160a01b03811681036107fd5760a4356001600160a01b03811681036107fd576117e1612307565b6117e961392b565b5c610842577fd1d11922b700459ced204b3743fc4c79f65983a27e1363601f00585467c79c0761181761392b565b5d826004350192846044350192600754926008549460095493600a5497806119a3575b5050907f0f4f965b9381ad88a8ce70d51b86e6162cbebbdfa906901cb34fe0858b30b59697826080989796959493611955575b505094611932929394956119287f0000000000000000000000000000000000000000000000000000000000000000966118c97f00000000000000000000000000000000000000000000000000000000000000008092878b6123b9565b97906007558361191e7f0000000000000000000000000000000000000000000000000000000000000000809c7f0000000000000000000000000000000000000000000000000000000000000000998a926123b9565b9a906008556123b9565b97906009556123b9565b90600a55604051938452602084015260408301526060820152a15f61121d61392b565b61193294829892966002549061198761197a856001600160801b0385169d8e0261239b565b9485938e1c9a8b0261239b565b938491019901990301950301905f60025590959493928961186d565b9095939296946119b49892986137ec565b7f00000000000000000000000000000000000000000000000000000000000000006119de91612361565b968387600154996001600160801b038b166119f89161238e565b8489600254926001600160801b038416611a119161238e565b90611a1b9161238e565b90611a259161238e565b9a611a2e61374e565b7f0000000000000000000000000000000000000000000000000000000000000000611a5891612361565b9060801c611a659161238e565b9060801c611a729161238e565b90611a7c9161238e565b90611a869161238e565b95611a93848a840261239b565b938492880290611aa29161239b565b93849101970197030193030195888096929394959661183a565b600435906001600160a01b03821682036107fd57565b9181601f840112156107fd5782359167ffffffffffffffff83116107fd57602083818601950101116107fd57565b6024359069ffffffffffffffffffff821682036107fd57565b60ff1660028111611b70575f5460ff8116808314611b6b57827fd708418b295fcf080d236d5143d7d3a9e9694be43c2dedb73a16196b08daac569360409360ff1916175f5582519182526020820152a1565b505050565b7f39da1b10000000000000000000000000000000000000000000000000000000005f5260045ffd5b903590601e19813603018212156107fd570180359067ffffffffffffffff82116107fd57602001918160051b360383136107fd57565b610300810190811067ffffffffffffffff821117611beb57604052565b634e487b7160e01b5f52604160045260245ffd5b60a0810190811067ffffffffffffffff821117611beb57604052565b6040810190811067ffffffffffffffff821117611beb57604052565b90601f8019910116810190811067ffffffffffffffff821117611beb57604052565b9035601e19823603018112156107fd57016020813591019167ffffffffffffffff82116107fd578160051b360383136107fd57565b90918281527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83116107fd5760209260051b809284830137010190565b91906040810190611cdc8480611c59565b604083529283905260608201925f5b818110611d1857505050611d07846020611d1595960190611c59565b916020818503910152611c8e565b90565b8235855260209485019490920191600101611ceb565b908060209392818452848401375f828201840152601f01601f1916010190565b92959196949093611d5f8880611b98565b905015611f9857611d708880611b98565b9050611d7f60208a018a611b98565b91905003611f7057611e7996604091611e0687611de088611dd2898f8a908a519687957f0a2a56a600000000000000000000000000000000000000000000000000000000602088015233602488016134d8565b03601f198101835282611c37565b7f0000000000000000000000000000000000000000000000000000000000000000613a05565b82517fb10311de0000000000000000000000000000000000000000000000000000000081526001600160a01b038716600482015269ffffffffffffffffffff8816602482015261010060448201529889928392611e6761010485018e611ccb565b84810360031901606486015291611d2e565b60016084830152600460a4830152600560c4830152600660e483015203817300000000000000000000000000000000000000005af480156107f2575f965f91611f2e575b50611f0692611f2c95949282611dd29399809b6040519889977f9a2983050000000000000000000000000000000000000000000000000000000060208a01523360248a01613527565b7f0000000000000000000000000000000000000000000000000000000000000000613a05565b565b96505092916040863d604011611f68575b81611f4c60409383611c37565b810103126107fd57855160209096015192939092611f06611ebd565b3d9150611f3f565b7f8bea10c5000000000000000000000000000000000000000000000000000000005f5260045ffd5b505f965086955050505050565b7f695543c3708653cda9d418b4ccd3be11368e40636c10c44b18cfe756b6d88b29611fce61392b565b5c14611fd8575f90565b611d15613583565b7f8000000000000000000000000000000000000000000000000000000000000000811461200c575f0390565b634e487b7160e01b5f52601160045260245ffd5b611d159492606092825260208201528160408201520191611d2e565b9190820180921161200c57565b9091939492946120598580611b98565b9050156122fc5761206a8580611b98565b90506120796020870187611b98565b91905003611f70576001600160a01b038216958633036122d4576120fb6040517f90c26d990000000000000000000000000000000000000000000000000000000060208201526120d581611dd286868c8b8b33602488016134d8565b7f0000000000000000000000000000000000000000000000000000000000000000613a05565b604051967f9eb58677000000000000000000000000000000000000000000000000000000008852600488015269ffffffffffffffffffff8416602488015260e060448801526060878061215160e482018a611ccb565b6001606483015260046084830152600560a4830152600660c483015203817300000000000000000000000000000000000000005af49687156107f2575f5f915f99612280575b5092611f2c959492826121e695611dd2949a819c61220c575b6040519889977f016c32520000000000000000000000000000000000000000000000000000000060208a01523360248a01613527565b7f0000000000000000000000000000000000000000000000000000000000000000613a05565b5f545f8160081c60010b125f14612257576fffffffffffffffffffffffffff000000196fffffffffffffffffffffffffff0000006001600160681b035b60181b169116175f556121b0565b6fffffffffffffffffffffffffff000000196fffffffffffffffffffffffffff0000005f612249565b9850505092916060873d6060116122cc575b8161229f60609383611c37565b810103126107fd578651604060208901519801519283151584036107fd5792979394919390611f2c612197565b3d9150612292565b7f70d645e3000000000000000000000000000000000000000000000000000000005f5260045ffd5b505f94508493505050565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016330361233957565b7f0c6d42ae000000000000000000000000000000000000000000000000000000005f5260045ffd5b8181029291811591840414171561200c57565b6001600160681b0303906001600160681b03821161200c57565b9190820391821161200c57565b81156123a5570490565b634e487b7160e01b5f52601260045260245ffd5b929091926123c7828561239b565b90811561248d576001600160a01b0316916001600160a01b03604051947fa9059cbb000000000000000000000000000000000000000000000000000000005f521693846004528260245260205f60448180885af19060015f511482161561247e575b604052612461575060207f9a380920405cd56ab6f7f5f2375bfc42aa8ef39f7e3f43d8f8f02bb4c925319291604051908152a3905f90565b61247a9350816124749296959350612361565b9061238e565b9190565b90843b15153d15161690612429565b50505050905f90565b91818310156125db5782156125b35782811080156125aa575b612582575f5461ffff808260c81c161461257c578382148015612573575b6125375768ffff000000000000009060901c16600160401b019182600160401b1161200c576125138261250d81612507886125199761238e565b9461238e565b92612361565b93612361565b90612524818361396f565b831092831561255f575b50505061253757565b7f7f043c76000000000000000000000000000000000000000000000000000000005f5260045ffd5b61256a92935061396f565b115f808061252e565b508282146124cd565b50505050565b7fdc5eefea000000000000000000000000000000000000000000000000000000005f5260045ffd5b508181116124af565b7f6b95e45f000000000000000000000000000000000000000000000000000000005f5260045ffd5b7fd6e666c0000000000000000000000000000000000000000000000000000000005f5260045ffd5b96989491999792909399610160525f61010052600f0b95861561336e57611dd26001600160a01b03936001600160801b03806126d395818f896126f99b5f54610100526040519b8c9a7f3b9009e00000000000000000000000000000000000000000000000000000000060208d01521660248b015216604489015261016051151560648901528d60848901521660a48701526101005160c487015216988960e48601521696876101048501526001600160801b038c16610124850152610140610144850152610164840191611d2e565b7f0000000000000000000000000000000000000000000000000000000000000000613a05565b5f6101a0526101605115613350575061271c906001600160801b038516906139fc565b6101a0525b5f811360a0819052156132f55761016051156132cf577f00000000000000000000000000000000000000000000000000000000000000005b025b60c08190525f60e05260a05115613293575b505f608060405161277d81611bff565b82815282602082015282604082015282606082015201525f60206040516127a381611c1b565b82815201526001600160801b0360c0511161326b57604051610140526127cb61014051611c1b565b60c05161014051525f60206101405101525f548060081c60010b908060801c60020b91805f52600460205260405f20956040519661280888611bff565b546001600160681b03811688526001600160681b038160681c16602089015261ffff8160d01c16604089015261ffff8160e01c16606089015260f01c60808801526305f5e1006affffff00000000000000008071ffffffffffffffffffff00000000000000006128816001600160801b038b168961385b565b9a61289f6001600160801b038c1661ffff6040840151168b0161385b565b9096610120526001600160681b038860181c16989b6101c052965f6101805260701c161616046101805260a051155f146132355790959290916001600160801b035f5b16965b610140515115612e165761016051156132275761ffff6080820151165b620f424069ffff0000000000000000610180519260401b16046101a051010161293261016051826101c0516138a7565b6129406101605183866138a7565b91600192610160515f14613195576001600160681b0360208601511615801561318d575b61311a575b835b612e3d575b505050610160515f14612e2c578315905b8115612e23575b5015612e16576101605115612d355750507f0000000000000000000000000000000000000000000000000000000000000000610120511315612a6857505f19610120510161012052610120515f52600460205260405f2091604051926129ed84611bff565b54926001600160681b03841681526001600160681b038460681c16602082015261ffff8460d01c169384604083015261ffff8160e01c16606083015260f01c6080820152906001600160681b039360020b9003956101c05192612a596001600160801b0388168961385b565b6101c0525b92909693916128e5565b9350509092505b610120516101205160010b03612d1a576fffffffffffffffffffffffffff000000612a9b5f5493614c7a565b60181b1690808060020b03612d035760801b72ffffff0000000000000000000000000000000016917fffffffffffffffffffffffffff000000000000000000000000000000000000ff62ffff006101205160081b1691161717175f5560a051155f14612ceb57602061014051015190610140515160c05103915b6101605115612ce357915f03915b6001600160801b0360e05116838160e05160801c01610160515f14612ca1576fffffffffffffffffffffffffffffffff199182916001600160801b03612b71600154928883851601036138e1565b16938491161760801c0160801b16176001555b80612c26575b50612be4612bbc60e051927f000000000000000000000000000000000000000000000000000000000000000090613e56565b937f000000000000000000000000000000000000000000000000000000000000000090613e56565b9183151580612c1d575b15612bf557565b7f2e5a4599000000000000000000000000000000000000000000000000000000005f5260045ffd5b50821515612bee565b6101605115612c67576fffffffffffffffffffffffffffffffff196001600160801b03612c5960025493828516016138e1565b169116176002555b5f612b8a565b6001600160801b036fffffffffffffffffffffffffffffffff19612c92600254938460801c016138e1565b60801b16911617600255612c61565b90506001600160801b0383816fffffffffffffffffffffffffffffffff19612cd2600154958a8760801c01036138e1565b60801b169316011617600155612b84565b915f03612b23565b610140515160c0510390602061014051015191612b15565b63327269a760e01b5f52601860045260245260445ffd5b63327269a760e01b5f5260106004526101205160245260445ffd5b939096917f0000000000000000000000000000000000000000000000000000000000000000610120511215612e095750612d8490600161012051016101205261ffff60405f9601511601614a1a565b60020b956101c052610120515f52600460205260405f2090612e0360405192612dac84611bff565b54926001600160681b03841681526001600160681b038460681c16602082015261ffff8460d01c169384604083015261ffff8160e01c16606083015260f01c6080820152926001600160801b03881690890161385b565b92612a5e565b9550939550505050612a6f565b5050935050909250612a6f565b9050155f612988565b6001600160681b0384101590612981565b612e4982939792614051565b9662ffffff5f5460981c1697612e63896101805187614077565b90610160515f146130c65760a0516130925790612e93949392916001600160801b038c169461014051908a61484f565b9490919491949293985b8415801590613089575b612eb4575b505050612970565b7fcad09799f755048f0fd388c6b2fcc8e0cebefd15756c6903522cc2a95f661f7095606095612f036001600160801b03936fffffffffffffffffffffffffffffffff19956101805190856149e6565b8484821691840360801b161760e0510160e052836040519661012051885284169160801b16176020860152169160801b16176040820152a1610120515f52600460205261307e60405f206001600160681b0384511681549079ffffffffffffffffffffffffff00000000000000000000000000602087015160681b16907fffffffff000000000000000000000000000000000000000000000000000000007bffff0000000000000000000000000000000000000000000000000000604089015160d01b169316171717815561302a61ffff60608601511682907fffff0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff7dffff0000000000000000000000000000000000000000000000000000000083549260e01b169116179055565b608084015181547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1660f09190911b7fffff00000000000000000000000000000000000000000000000000000000000016179055565b5f8080808080612eac565b50831515612ea7565b906130b394939291999e996001600160801b038c169461014051908a61450a565b959195939092939295939499039d612e9d565b60a0516130f957906130eb949392916001600160801b038c169461014051908a614377565b949091949194929398612e9d565b906130b394939291999e996001600160801b038c169461014051908a614098565b925060a051155f1461314f57816001600160801b038816101561313f575b5f92612969565b5050505050935050909250612a6f565b6001600160801b03871615158061317a575b61313f578a613138575050505050935050909250612a6f565b50816001600160801b0388161015613161565b508615612964565b6001600160681b03855116158015613216575b6131b3575b8361296b565b925060a051155f146131d857826001600160801b038816111561313f575b5f926131ad565b6001600160801b038716151580613203575b61313f578a6131d1575050505050935050909250612a6f565b50826001600160801b03881611156131ea565b506001600160681b038710156131a8565b61ffff606082015116612902565b6101605115613259576001600160801b0360015460801c5b979492979391936128e2565b6001600160801b03806001541661324d565b7fd29a971a000000000000000000000000000000000000000000000000000000005f5260045ffd5b61016051156132bd576001600160801b0360015460801c5b168091111561276d5760c0525f61276d565b6001600160801b0380600154166132ab565b7f0000000000000000000000000000000000000000000000000000000000000000612759565b6101605115613329577f0000000000000000000000000000000000000000000000000000000000000000905b5f030261275b565b7f000000000000000000000000000000000000000000000000000000000000000090613321565b61336591506001600160801b038516906139c5565b6101a052612721565b7f2c5211c6000000000000000000000000000000000000000000000000000000005f5260045ffd5b9081600f0b918083036133a65750565b63327269a760e01b5f52608060045260245260445ffd5b9d9a98969492909c9b99979593919d6040519e8f9e8f92602084017fe6a7bba00000000000000000000000000000000000000000000000000000000090526001600160a01b031660248401526001600160a01b0316604483015215159060640152600f0b60848d01526001600160801b031660a48c015260c48b015260e48a01526001600160801b03166101048901526001600160801b03166101248801526001600160801b0316610144870152600f0b610164860152600f0b6101848501526101a48401526101c483016101c090526101e483019061349c92611d2e565b03601f19810182526134ae9082611c37565b611f2c907f0000000000000000000000000000000000000000000000000000000000000000613a05565b949269ffffffffffffffffffff906001600160a01b036135199481611d159a989516895216602088015216604086015260a0606086015260a0850190611ccb565b926080818503910152611d2e565b9390611d159896936001600160a01b0361356b948169ffffffffffffffffffff949b999b16885216602087015216604085015260e0606085015260e0840190611ccb565b94608083015260a082015260c0818503910152611d2e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b038116611d1557506001600160a01b036003541690565b51906001600160801b03821682036107fd57565b3d15613610573d9067ffffffffffffffff8211611beb5760405191613605601f8201601f191660200184611c37565b82523d5f602084013e565b606090565b5f9060606001600160a01b03613629613583565b166004604051809581937f171755b10000000000000000000000000000000000000000000000000000000083525af1905f825f945f946136f4575b506136c957602060446136756135d6565b6040519283917f46a149300000000000000000000000000000000000000000000000000000000083528160048401528051918291826024860152018484015e5f828201840152601f01601f19168101030190fd5b6136ef6001600160801b0384166001600160801b0386166001600160801b038416612496565b929190565b94509250506060833d606011613746575b8161371260609383611c37565b810103126107fd57613723836135c2565b9261373c6040613735602084016135c2565b92016135c2565b939093925f613664565b3d9150613705565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526020816024816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa9081156107f2575f916137bd575090565b90506020813d6020116137e4575b816137d860209383611c37565b810103126107fd575190565b3d91506137cb565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526020816024816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa9081156107f2575f916137bd575090565b905f821261387257611d1591620f42400190613bc8565b611d1591620f42400190613bc8565b9161388b81612374565b910291020160016001600160681b035f19830104019015150290565b91156138c757600160401b0180600160401b1161200c57611d15916139b6565b600160401b0180600160401b1161200c57611d1591613998565b6001600160801b0381116138fb576001600160801b031690565b7f6dfcc650000000000000000000000000000000000000000000000000000000005f52608060045260245260445ffd5b604051602081017ff9e3ebd3e85cd613d06ad4241f62088baffa30fdac338bc1f1a252f9a3b224a3815260208252613964604083611c37565b9051902060ff191690565b9061397f81600160401b84613d73565b9080156123a557600160401b611d15930915159061203c565b600160401b611d15926139ac828285613d73565b920915159061203c565b90600160401b611d1592613d73565b906139cf9161396f565b7fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000810190811161200c5790565b6139cf9161396f565b918215613b1357915b600781168015611b6b57613a2190613ec5565b6001600160a01b03811615613aeb575f80602085019283828751925af1613a466135d6565b9015613ab6576020815110613a8e577fffffffff00000000000000000000000000000000000000000000000000000000602081920151925116911603613a8e5760031c613a0e565b7fa59c2303000000000000000000000000000000000000000000000000000000005f5260045ffd5b80519081613ae6577f3c82bb14000000000000000000000000000000000000000000000000000000005f5260045ffd5b602001fd5b7fdf42d72e000000000000000000000000000000000000000000000000000000005f5260045ffd5b915050565b916001600160a01b03604051927fa9059cbb000000000000000000000000000000000000000000000000000000005f521660045260245260205f60448180865af19060015f5114821615613ba7575b60405215613b725750565b6001600160a01b03907f5274afe7000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b906001811516613bbf57823b15153d15161690613b67565b503d5f823e3d90fd5b9091905f905f198482099084810292838084109303928084039314613c415782620f42401115613c2f57507fde8f6cefed634549b62c77574f722e1ac57e23f24d8fd5cb790fb65668c261399394620f4240910990828211900360fa1b910360061c170290565b634e487b71905260116020526024601cfd5b505050620f42409192500490565b5f19600160401b8209918160401b91828085109403938085039414613ce75783821115613ccf57600160401b829109815f0382168092046002816003021880820260020302808202600203028082026002030280820260020302808202600203028091026002030293600183805f03040190848311900302920304170290565b50634e487b715f52156003026011186020526024601cfd5b5090611d15925061239b565b5f19600160801b8209918160801b91828085109403938085039414613ce75783821115613ccf57600160801b829109815f0382168092046002816003021880820260020302808202600203028082026002030280820260020302808202600203028091026002030293600183805f03040190848311900302920304170290565b90915f198383099280830292838086109503948086039514613e045784831115613dec5790829109815f0382168092046002816003021880820260020302808202600203028082026002030280820260020302808202600203028091026002030293600183805f03040190848311900302920304170290565b82634e487b715f52156003026011186020526024601cfd5b505090611d15925061239b565b8015613e26576001600160801b030460010190565b634e487b715f5260126020526024601cfd5b908015613e2657613e4e6001915f19840161239b565b019015150290565b908015613e2657613e6690614a46565b908115613e26577f800000000000000000000000000000000000000000000000000000000000000081145f1983141661200c578181059180820715159182613eb8575b5050613eb25790565b60010190565b5f92501812155f80613ea9565b6004811015613f79576002811015613f2a57600114613f06577fa5724489000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f000000000000000000000000000000000000000000000000000000000000000090565b600214613f55577f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b6008811015614029576006811015613fda57600414613fb6577f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b600614614005577f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b7fa5724489000000000000000000000000000000000000000000000000000000005f5260045ffd5b80156140725780600160401b0180600160401b1161200c57611d1591613c4f565b505f90565b90811561409157620f4240611d1593828403020401613c4f565b5050505f90565b9697929095946140a9878783613881565b9889845160401b106143605780871161433757506001600160681b03905b6001600160681b03895116996140eb896001600160681b0303809c8b86030261239b565b9a60018c61410d6140fd878d88613881565b6141078684613998565b92613998565b010160011c98898751809111155f146141ab575050505050955b88156141a2575b5090602091850260401c93840260401c9482868203986001600160681b036141558c614c7a565b8183511603168152016001600160681b036141748a8284511601614cc4565b16905281510381520186815101905261419761418f87614a46565b5f0395614a46565b939594939280920390565b9550602061412e565b60019d50848293959c96949b506141d092916001600160681b038f5116908689614a9b565b996001600160681b038c5116998b6141ed86888303809e0261239b565b9e8f6141fd6140fd848888613881565b010160011c9b8c8a519287848310918261432b575b5050614287575b505050505050845190818910908161427d575b50614275575b808811614241575b5050614127565b6142689398506142549297919a0261239b565b97886001600160681b03895116910261239b565b8401948151945f8061423a565b965086614232565b905089105f61422c565b909192959f506142a394979c93969d5015614322575b0261239b565b806142bf575050505081519480965f995b5f8080808080614219565b88939b98999299018881115f1461431c575087985b89838c516001600160681b031686830302906142ef9161239b565b9c6142f992613881565b90614304908c613998565b9061430f908c613998565b0160010160011c966142b4565b986142d4565b6001925061429d565b909150108f8890614212565b8181111561436057614357906001600160681b0383808a0392030261239b565b908782116140c7575b50505050945050509050905f905f905f905f905f90565b969291939490979584516001600160681b03895116908181105f146144f957906143ab918b6001600160681b03030261239b565b8901988551945b828110614476575b508415614462576001836143f86143f16143ea8e876143e46020986144579c9a61445f9e9c613881565b95613881565b9287613998565b9186613998565b010160011c91820260401c96870260401c80970395818884039a6001600160681b0361442387614c7a565b8183511603168152016001600160681b036144428c8284511601614cc4565b16905283815103815201908151019052614a46565b5f0394614a46565b92565b98505f975087968796508695509350505050565b838111156144e457614496906001600160681b038580860392030261239b565b818111156144e4578a8110156143ba579950936144cb8a6001600160681b038b511687806001600160681b030392030261239b565b90808210156144dd57505b935f6143ba565b90506144d6565b5098505f975087968796508695509350505050565b50986001600160681b0399946143b2565b94929796979590956001600160681b0361452388612374565b88840290860201049883518a15613e265760018b67ffffffffffffffff0401116148385784811161481857505f5b602087019461456e896001600160681b038851168482030261239b565b9a60018c61459d6001600160681b0361458687612374565b86028988020104614597858461396f565b9261396f565b010160011c94858751809111155f1461463a5750505050965b8915614631575b50918161461a94936020930260401c95860260401c96878203946001600160681b036145e88d614c7a565b81835116031690526001600160681b03614606868284511601614cc4565b169052815103815201878151019052614a46565b9361462486614a46565b5f03939594939280920390565b965060206145bd565b60019d506146899192965061468490846001600160681b038b9e97969e511661466288612374565b9261466c88612374565b61467e61467889613e11565b94613e11565b94614a9b565b612374565b996001600160681b03885116958b6146a686828103809a0261239b565b9e8f6146cd6001600160681b036146bc85612374565b87028886020104614597868461396f565b010160011c97888a519287848310918261480c575b5050614754575b505050505050845190818510908161474a575b50614742575b808411614710575b506145b6565b909961471f939298500261239b565b966147386001600160681b038451168981038302613e38565b958251915f61470a565b925082614702565b905089115f6146fc565b909192959f5061476f94979893969d5015614322570261239b565b8061478a5750505050815190865f995b5f80808080806146e9565b929a919891939280831115614804578203985b848a106147fb575b8287516001600160681b03168b820302906147bf9161239b565b9b8a6147ca81612374565b6001600160681b03930291020104906147e3908c61396f565b906147ee908c61396f565b0160010160011c9261477f565b985083986147a5565b505f9861479d565b909150118f88906146e2565b614830906001600160681b0386808603920302613e38565b808811614551575b50505050505050909150905f905f905f905f905f90565b939497959291909781519360208601946001600160681b03865116908181105f146149dc57906148829181038c02613e38565b998351995b808410614961575b50891561494c579260018a6148e46148dd8e6001600160681b036149419a98602098826149479e9c6148c081612374565b84029083020104936148d181612374565b9102910201049361396f565b918d61396f565b010160011c92830260401c97880260401c80980396888403946001600160681b0361490e8d614c7a565b81835116031690526001600160681b0361492c868284511601614cc4565b16905289815103815201908151019052614a46565b94614a46565b5f0392565b99505f98508897889750879650945050505050565b828110156149c657614981906001600160681b0385808603920302613e38565b818110156149c657808c101561488f579a50986149ad8a8c6001600160681b038951169082030261239b565b90808210156149bf57505b985f61488f565b90506149b8565b5099505f98508897889750879650945050505050565b50995f9a99614887565b919082158015614a12575b614a0a57611d159382620f424092030204810191613d73565b505050505f90565b5081156149f1565b627fffff8113614a3e57627fffff198112614a355760020b90565b50627fffff1990565b50627fffff90565b7f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8111614a705790565b7f24775e06000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b939594919095614ad1614ab782614ab188612374565b9561238e565b916001600160681b03614aca8885612361565b049061203c565b905f948481151580614c71575b80614c68575b614b72575b5050505082159081614b68575b50614b5f575b808211614b57575b5083614b10828461203c565b1115614b475750825b81841115614b25575050565b611d1592935081105f14614b3f5760ff60015b169061203c565b60ff5f614b38565b614b51908261203c565b92614b19565b90505f614b04565b60019150614afc565b905015155f614af6565b614b80918460401b90613d73565b80614b8c575b84614ae9565b83614b9d929394965060801b613cf3565b91806d01fffffffffffffffffffffffffe02906d01fffffffffffffffffffffffffe82040361200c5782614bd092613d73565b7f3fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8116810361200c5760021b600160801b0180600160801b1161200c57614c1690614d09565b7f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8216820361200c5760401b600160801b0180600160801b1161200c57614c5f9160011b61239b565b915f8080614b86565b50801515614ae4565b50831515614ade565b6001600160681b038111614c94576001600160681b031690565b7f6dfcc650000000000000000000000000000000000000000000000000000000005f52606860045260245260445ffd5b6001600160681b038111614cde576001600160681b031690565b7f6ce2737a000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b6001811115611d1557806001600160801b831015614e1a575b600482600160401b614dcc941015614e0d575b640100000000811015614e00575b62010000811015614df3575b610100811015614de7575b6010811015614ddb575b1015614dd3575b60030260011c614d7b818461239b565b0160011c614d89818461239b565b0160011c614d97818461239b565b0160011c614da5818461239b565b0160011c614db3818461239b565b0160011c614dc1818461239b565b0160011c809261239b565b8111900390565b60011b614d6b565b811c9160021b91614d64565b60081c91811b91614d5a565b60101c9160081b91614d4f565b60201c9160101b91614d43565b60401c9160201b91614d35565b5050608081901c600160401b614d2256fea164736f6c6343000823000a","sourceMap":"2568:41509:2:-:0;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;-1:-1:-1;;2568:41509:2;;;;;;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;:::i;:::-;;;;;;;;;;:::i;:::-;;;;;;;;;;:::i;:::-;;;;;;;;;;:::i;:::-;;;;;;;;;;:::i;:::-;;;;;;;;;;:::i;:::-;;;;;-1:-1:-1;;2568:41509:2;;;;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;;;;;:::i;:::-;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;;2166:35:0;2568:41509:2;;;;;;;;;;;;2207:35:0;2568:41509:2;;;;;;;;;;;;2248:35:0;2568:41509:2;;;;;;;;;;;;2289:35:0;2568:41509:2;;;;;;;;;;;;2330:35:0;2568:41509:2;;;;;;;;;;;;2371:35:0;2568:41509:2;;;;;;;;;;;;2412:35:0;2568:41509:2;;;2453:63:0;2568:41509:2;;;;;2522:61:0;2568:41509:2;;;;;2589:69:0;2568:41509:2;;;;;2664:67:0;2568:41509:2;;;;;2737:46:0;2568:41509:2;;;;2789:44:0;2568:41509:2;6997:17;2568:41509;7020:15;2568:41509;7041:15;7063:214;;;;2568:41509;7099:41;7148:26;2568:41509;;-1:-1:-1;;;;;;2568:41509:2;;;7063:214;2568:41509;7283:48;2568:41509;7337:48;2568:41509;7392:70;2568:41509;7468:70;2568:41509;7544:59;-1:-1:-1;2568:41509:2;;;;;;;-1:-1:-1;;;2568:41509:2;;;;;;-1:-1:-1;;;2568:41509:2;-1:-1:-1;;;;;;;;2568:41509:2;;;;;;;;-1:-1:-1;;;2568:41509:2;;;;;;;;;;-1:-1:-1;;;2568:41509:2;;;;;;;;;;;;;;;7857:3;2568:41509;;7824:31;;;;;8009:23;;2568:41509;8009:23;;;:::i;:::-;;2568:41509;-1:-1:-1;2568:41509:2;7985:10;2568:41509;;;-1:-1:-1;2568:41509:2;;;;;;;;;;;;;;-1:-1:-1;;;2568:41509:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7809:13;;7824:31;;-1:-1:-1;8094:3:2;2568:41509;;8064:28;;;;;8251:20;;2568:41509;8251:20;;;:::i;:::-;;8233:14;:10;;;:::i;:::-;:14;:::i;:::-;-1:-1:-1;2568:41509:2;7985:10;2568:41509;;;-1:-1:-1;2568:41509:2;;;;;;;;;;;;;;-1:-1:-1;;;2568:41509:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8049:13;;8064:28;-1:-1:-1;2568:41509:2;;;;8500:7;;;-1:-1:-1;;;8500:37:2;2568:41509;8486:51;8667:9;;;:37;-1:-1:-1;8667:37:2;2568:41509;8654:50;2568:41509;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8667:37;8691:13;;;:::i;:::-;8667:37;;8500;8523:14;;;:::i;:::-;8500:37;;7063:214;-1:-1:-1;2568:41509:2;7195:37;7240:30;2568:41509;;-1:-1:-1;;;;;;2568:41509:2;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;7063:214;;2568:41509;-1:-1:-1;2568:41509:2;;;;;;-1:-1:-1;2568:41509:2;;;;;-1:-1:-1;2568:41509:2;;;;;;;;-1:-1:-1;;2568:41509:2;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;:::o;:::-;;;-1:-1:-1;;;;;2568:41509:2;;;;;;:::o;:::-;;;;;;;;;;:::o;:::-;;;-1:-1:-1;;;;;2568:41509:2;;;;;;:::o;:::-;;;;;;;;;;:::o;:::-;;;;;;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;:::i;:::-;;;;;;;;;;:::i;:::-;;;;;;;;;;:::i;:::-;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;-1:-1:-1;;;2568:41509:2;;;;;;;:::o;:::-;;;;;;;;;;;;;;8517:2;;2568:41509;;;;;;;;;:::o","linkReferences":{"contracts/libraries/LiquidityLib.sol":{"LiquidityLib":[{"start":10079,"length":20},{"start":10807,"length":20}]}}},"deployedBytecode":{"object":"6101e06040526004361015610012575f80fd5b5f6080525f3560e01c80630f7439531461179c5780631e2eaeaf146117805780631f21638c1461168c57806335fd631a14611636578063372aa224146115bc5780633ff20c8a1461158b5780635dd9a4c5146113fa578063658b6cb714611275578063943f3b1a1461108857806397962ef914610faf578063bcdb4dad14610957578063d83067861461092c578063dbd035ff14610892578063e24f0884146103e2578063ec069057146101c35763fbde1732146100ce575f80fd5b346101bd5760803660031901126101bd576100e7611abc565b6100ef611b00565b906044359067ffffffffffffffff82116101bd57604060031983360301126101bd5760643567ffffffffffffffff81116101bd57610131903690600401611ad2565b9161013a61392b565b5c61019157604094610179947fa147fd8f7d12de6da66feedc6d64a11bd371e5471ee1018f11f9072ede67a0fa61016f61392b565b5d60040191612049565b60805161018461392b565b5d82519182526020820152f35b7f3ee5aeb500000000000000000000000000000000000000000000000000000000608051526004608051fd5b60805180fd5b346101bd576080513660031901126101bd576101dd61392b565b5c610191576101ea61392b565b7f695543c3708653cda9d418b4ccd3be11368e40636c10c44b18cfe756b6d88b29905d610215613615565b6001600160801b0316806001600160801b0381931690610234916139c5565b926001600160801b031690610248916139fc565b9160805154928360081c60010b608051526004602052608051604090206040519061027282611bff565b54936001600160681b03851682528460681c6001600160681b0316602083015260408201908560d01c61ffff16825260608301928660e01c61ffff1684526080019560f01c86528660801c60020b6102ca828261385b565b925161ffff1601906102db9161385b565b8660181c6001600160681b03166102f181612374565b93516001600160681b039390940291020104946305f5e1006affffff000000000000000060709290921c919091160492600160401b620f424069ffff000000000000000060409490941b939093169290920401830181019081106103ca5769ffff000000000000000061037061036b620f42409388613998565b6138e1565b94516080515060401b160401016080515060805150600160401b019182600160401b116103ca576103ae61036b6040946001600160801b03936139b6565b916080516103ba61392b565b5d81845193168352166020820152f35b634e487b7160e01b6080515260116004526024608051fd5b346107fd5760c03660031901126107fd576103fb611abc565b60243580151581036107fd576044359081600f0b82036107fd57606435926001600160801b03841684036107fd5760843567ffffffffffffffff81116107fd57610449903690600401611ad2565b909360a43567ffffffffffffffff81116107fd5761046b903690600401611ad2565b909360ff5f541661086a5761047e61392b565b5c6108425785948389937f695543c3708653cda9d418b4ccd3be11368e40636c10c44b18cfe756b6d88b296104b161392b565b5d6104ce81846104bf613615565b9c91819a81988f948c33612603565b61010051919c9299909592908c15610725578d60805181126106e3575b506104f46137ec565b91333b156101bd578b908f61053a60405194859384937fc32510750000000000000000000000000000000000000000000000000000000085526080519660048601612020565b0381608051335af180156106d6576106bd575b5089608051811391826106a3575b505061067757848c6106539b60409f996105b0976106599f8b968f919d8f6001600160a01b039f5b6105996105936080515496613396565b99613396565b996001600160801b0381169060801c019a336133bd565b608051548951946f010000000000000000000000000000006effff000000000000000000000000006001600160681b038460181c169360601b169160805190600f0b1360781b1617178452876001600160801b03166fffffffffffffffffffffffffffffffff198660801b161760208501528884015216907f9734819749a91fc3be03ea83205f924ee08479bd3f0da48efc91d94d050cac1e60603392a3613396565b91613396565b60805161066461392b565b5d825191600f0b8252600f0b6020820152f35b7fbe79592100000000000000000000000000000000000000000000000000000000608051526004608051fd5b6106ad925061203c565b6106b56137ec565b10898f61055b565b6080516106c991611c37565b6080516101bd578e61054d565b6040513d608051823e3d90fd5b6106ef61071f91611fe0565b896001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016613b18565b8d6104eb565b905f8b12610801575b61073661374e565b91333b156107fd578e8c6107795f9360405195869485947fc325107500000000000000000000000000000000000000000000000000000000865260048601612020565b038183335af180156107f2576107de575b508c608051811391826107c4575b505061067757848c6106539b60409f996105b0976106599f8b968f919d8f6001600160a01b039f610583565b6107ce925061203c565b6107d661374e565b108c8f610798565b5f6107e891611c37565b5f6080528e61078a565b6040513d5f823e3d90fd5b5f80fd5b61083d61080d8c611fe0565b896001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016613b18565b61072e565b7f3ee5aeb5000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f51bd770c000000000000000000000000000000000000000000000000000000005f5260045ffd5b346107fd5760203660031901126107fd5760043567ffffffffffffffff81116107fd57366023820112156107fd5780600401359067ffffffffffffffff82116107fd578160051b9036602483830101116107fd5760408051809460208252602082015201918301916020806024604086019401925b8335548152019101908483821015610923575060208091610907565b60408186030190f35b346107fd575f3660031901126107fd576020610946611fa5565b6001600160a01b0360405191168152f35b346107fd575f3660031901126107fd575f6102e060405161097781611bce565b8281528260208201528260408201528260608201528260808201528260a08201528260c08201528260e08201528261010082015282610120820152826101408201528261016082015282610180820152826101a0820152826101c0820152826101e08201528261020082015282610220820152826102408201528261026082015282610280820152826102a0820152826102c08201520152610300604051610a1e81611bce565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001681526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001660208201526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001660408201527f000000000000000000000000000000000000000000000000000000000000000060608201527f000000000000000000000000000000000000000000000000000000000000000060808201527f000000000000000000000000000000000000000000000000000000000000000060a08201527f000000000000000000000000000000000000000000000000000000000000000060c08201527f000000000000000000000000000000000000000000000000000000000000000060e08201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166101008201527f00000000000000000000000000000000000000000000000000000000000000006101208201527f00000000000000000000000000000000000000000000000000000000000000006101408201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166101608201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166101808201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166101a08201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166101c08201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166101e08201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166102008201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166102208201527f00000000000000000000000000000000000000000000000000000000000000006102408201527f00000000000000000000000000000000000000000000000000000000000000006102608201527f00000000000000000000000000000000000000000000000000000000000000006102808201527f00000000000000000000000000000000000000000000000000000000000000006102a08201527f00000000000000000000000000000000000000000000000000000000000000006102c08201527f00000000000000000000000000000000000000000000000000000000000000006102e08201526102e0604051916001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001683526001600160a01b0360208201511660208401526001600160a01b036040820151166040840152606081015160608401526080810151608084015260a081015160a084015260c081015160c084015260e081015160e08401526001600160a01b03610100820151166101008401526101208101516101208401526101408101516101408401526001600160a01b03610160820151166101608401526001600160a01b03610180820151166101808401526001600160a01b036101a0820151166101a08401526001600160a01b036101c0820151166101c08401526001600160a01b036101e0820151166101e08401526001600160a01b03610200820151166102008401526001600160a01b03610220820151166102208401526102408101516102408401526102608101516102608401526102808101516102808401526102a08101516102a08401526102c08101516102c084015201516102e0820152f35b346107fd5760a03660031901126107fd57610fc8611abc565b610fd0611b00565b906044359067ffffffffffffffff82116107fd57604060031983360301126107fd5760643567ffffffffffffffff81116107fd57611012903690600401611ad2565b60849291923567ffffffffffffffff81116107fd57611035903690600401611ad2565b93909261104061392b565b5c6108425760409661107f967f3ff35dbce7a07ce455b128890d383c554afbc1b07cf7390a13e2d602a38c1a0a61107561392b565b5d60040191611d4e565b5f61018461392b565b346107fd5760603660031901126107fd576004358060010b8091036107fd5760243561ffff81168082036107fd576044359061ffff82168083036107fd576110ce612307565b6110d661392b565b5c610842577f6228ff59018d12017a2bb81d4aaee1d839faeb61bb29b616b08aec1d954bdf7c61110461392b565b5d7f00000000000000000000000000000000000000000000000000000000000000008512801561124c575b611220576112096040937f2a1317b5b5812150d82fa4b2e5ae289f62be0c42a042edbdc69b978673746a4795875f5260046020526111ba865f209182907fffff0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff7dffff0000000000000000000000000000000000000000000000000000000083549260e01b169116179055565b907dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffff00000000000000000000000000000000000000000000000000000000000083549260f01b169116179055565b82519182526020820152a25f61121d61392b565b5d005b847f64b6051e000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b507f0000000000000000000000000000000000000000000000000000000000000000851361112f565b346107fd576101203660031901126107fd5761128f611abc565b6024356001600160a01b03811681036107fd576044359081151582036107fd576064359283600f0b84036107fd57608435906001600160801b03821682036107fd5760a435906001600160801b038216938483036107fd5760c435936001600160801b038516948581036107fd5760e435906001600160801b038216958683036107fd576101043567ffffffffffffffff81116107fd57611334903690600401611ad2565b98909761133f61392b565b5c610842578885858f8f6113cc9f918f96918d8f61138d8f956113929c8e987fbaf2b3653c77cf277ac36a174e0624557a6829660e787388cf9abd21ceb18a4461138761392b565b5d612496565b612603565b909691956101005191979d8e979d8e946113b66113b05f5497613396565b9a613396565b9a6001600160801b0381169060801c019b6133bd565b7f1f6053de000000000000000000000000000000000000000000000000000000005f5260045260245260445ffd5b346107fd5760403660031901126107fd5760043562ffffff81168082036107fd576024359062ffffff8216928383036107fd57611435612307565b61143d61392b565b5c610842577ff88a537f51dde30be9a9960a2850ed980c30e495145525344f0f47ff82ba3b7361146b61392b565b5d5f549162ffffff8360981c168103611516575b5050505f549162ffffff8360b01c16810361149e575b5f61121d61392b565b7f4d14e59cea6a74cef5169f00d96334b2c0214358308e92227d7c47e943664b9c927fffffffffffffff000000ffffffffffffffffffffffffffffffffffffffffffff78ffffff0000000000000000000000000000000000000000000060209460b01b169116175f55604051908152a1808080611495565b7f0e7d070a63c6cf2ec01badac5543ae7bcd84ceebe76073c704e7f3e356f4f194927fffffffffffffffffffff000000ffffffffffffffffffffffffffffffffffffff75ffffff0000000000000000000000000000000000000060209460981b169116175f55604051908152a182808061147f565b346107fd5760203660031901126107fd5760043560ff811681036107fd576115ba906115b5612307565b611b19565b005b346107fd5760203660031901126107fd576001600160a01b036115dd611abc565b6115e5612307565b16807fffffffffffffffffffffffff000000000000000000000000000000000000000060035416176003557fb266add5f3044b17d27db796af992cecbe413921b4e8aaaee03c719e16b9806a5f80a2005b346107fd5760403660031901126107fd576024356004356040519160408360208152826020820152019060051b8301916001602060408501935b8354815201910190848382101561092357506020600191611670565b346107fd5760203660031901126107fd5760043561ffff8116908181036107fd576116b5612307565b6116bd61392b565b5c610842577faab56bc87c1aa4b7f07e347524cc16f26458efacbe0150d5f992ab348f9b5c9d6116eb61392b565b5d5f549161ffff8360c81c168103611706575f61121d61392b565b7f0262bdf5ceb29428fdaec304f1872012436cebf3ff5621c19bc17b61892940ea927fffffffffff0000ffffffffffffffffffffffffffffffffffffffffffffffffff7affff0000000000000000000000000000000000000000000000000060209460c81b169116175f55604051908152a1808080611495565b346107fd5760203660031901126107fd57600435545f5260205ff35b346107fd5760c03660031901126107fd576064356024356084356001600160a01b03811681036107fd5760a4356001600160a01b03811681036107fd576117e1612307565b6117e961392b565b5c610842577fd1d11922b700459ced204b3743fc4c79f65983a27e1363601f00585467c79c0761181761392b565b5d826004350192846044350192600754926008549460095493600a5497806119a3575b5050907f0f4f965b9381ad88a8ce70d51b86e6162cbebbdfa906901cb34fe0858b30b59697826080989796959493611955575b505094611932929394956119287f0000000000000000000000000000000000000000000000000000000000000000966118c97f00000000000000000000000000000000000000000000000000000000000000008092878b6123b9565b97906007558361191e7f0000000000000000000000000000000000000000000000000000000000000000809c7f0000000000000000000000000000000000000000000000000000000000000000998a926123b9565b9a906008556123b9565b97906009556123b9565b90600a55604051938452602084015260408301526060820152a15f61121d61392b565b61193294829892966002549061198761197a856001600160801b0385169d8e0261239b565b9485938e1c9a8b0261239b565b938491019901990301950301905f60025590959493928961186d565b9095939296946119b49892986137ec565b7f00000000000000000000000000000000000000000000000000000000000000006119de91612361565b968387600154996001600160801b038b166119f89161238e565b8489600254926001600160801b038416611a119161238e565b90611a1b9161238e565b90611a259161238e565b9a611a2e61374e565b7f0000000000000000000000000000000000000000000000000000000000000000611a5891612361565b9060801c611a659161238e565b9060801c611a729161238e565b90611a7c9161238e565b90611a869161238e565b95611a93848a840261239b565b938492880290611aa29161239b565b93849101970197030193030195888096929394959661183a565b600435906001600160a01b03821682036107fd57565b9181601f840112156107fd5782359167ffffffffffffffff83116107fd57602083818601950101116107fd57565b6024359069ffffffffffffffffffff821682036107fd57565b60ff1660028111611b70575f5460ff8116808314611b6b57827fd708418b295fcf080d236d5143d7d3a9e9694be43c2dedb73a16196b08daac569360409360ff1916175f5582519182526020820152a1565b505050565b7f39da1b10000000000000000000000000000000000000000000000000000000005f5260045ffd5b903590601e19813603018212156107fd570180359067ffffffffffffffff82116107fd57602001918160051b360383136107fd57565b610300810190811067ffffffffffffffff821117611beb57604052565b634e487b7160e01b5f52604160045260245ffd5b60a0810190811067ffffffffffffffff821117611beb57604052565b6040810190811067ffffffffffffffff821117611beb57604052565b90601f8019910116810190811067ffffffffffffffff821117611beb57604052565b9035601e19823603018112156107fd57016020813591019167ffffffffffffffff82116107fd578160051b360383136107fd57565b90918281527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83116107fd5760209260051b809284830137010190565b91906040810190611cdc8480611c59565b604083529283905260608201925f5b818110611d1857505050611d07846020611d1595960190611c59565b916020818503910152611c8e565b90565b8235855260209485019490920191600101611ceb565b908060209392818452848401375f828201840152601f01601f1916010190565b92959196949093611d5f8880611b98565b905015611f9857611d708880611b98565b9050611d7f60208a018a611b98565b91905003611f7057611e7996604091611e0687611de088611dd2898f8a908a519687957f0a2a56a600000000000000000000000000000000000000000000000000000000602088015233602488016134d8565b03601f198101835282611c37565b7f0000000000000000000000000000000000000000000000000000000000000000613a05565b82517fb10311de0000000000000000000000000000000000000000000000000000000081526001600160a01b038716600482015269ffffffffffffffffffff8816602482015261010060448201529889928392611e6761010485018e611ccb565b84810360031901606486015291611d2e565b60016084830152600460a4830152600560c4830152600660e483015203817300000000000000000000000000000000000000005af480156107f2575f965f91611f2e575b50611f0692611f2c95949282611dd29399809b6040519889977f9a2983050000000000000000000000000000000000000000000000000000000060208a01523360248a01613527565b7f0000000000000000000000000000000000000000000000000000000000000000613a05565b565b96505092916040863d604011611f68575b81611f4c60409383611c37565b810103126107fd57855160209096015192939092611f06611ebd565b3d9150611f3f565b7f8bea10c5000000000000000000000000000000000000000000000000000000005f5260045ffd5b505f965086955050505050565b7f695543c3708653cda9d418b4ccd3be11368e40636c10c44b18cfe756b6d88b29611fce61392b565b5c14611fd8575f90565b611d15613583565b7f8000000000000000000000000000000000000000000000000000000000000000811461200c575f0390565b634e487b7160e01b5f52601160045260245ffd5b611d159492606092825260208201528160408201520191611d2e565b9190820180921161200c57565b9091939492946120598580611b98565b9050156122fc5761206a8580611b98565b90506120796020870187611b98565b91905003611f70576001600160a01b038216958633036122d4576120fb6040517f90c26d990000000000000000000000000000000000000000000000000000000060208201526120d581611dd286868c8b8b33602488016134d8565b7f0000000000000000000000000000000000000000000000000000000000000000613a05565b604051967f9eb58677000000000000000000000000000000000000000000000000000000008852600488015269ffffffffffffffffffff8416602488015260e060448801526060878061215160e482018a611ccb565b6001606483015260046084830152600560a4830152600660c483015203817300000000000000000000000000000000000000005af49687156107f2575f5f915f99612280575b5092611f2c959492826121e695611dd2949a819c61220c575b6040519889977f016c32520000000000000000000000000000000000000000000000000000000060208a01523360248a01613527565b7f0000000000000000000000000000000000000000000000000000000000000000613a05565b5f545f8160081c60010b125f14612257576fffffffffffffffffffffffffff000000196fffffffffffffffffffffffffff0000006001600160681b035b60181b169116175f556121b0565b6fffffffffffffffffffffffffff000000196fffffffffffffffffffffffffff0000005f612249565b9850505092916060873d6060116122cc575b8161229f60609383611c37565b810103126107fd578651604060208901519801519283151584036107fd5792979394919390611f2c612197565b3d9150612292565b7f70d645e3000000000000000000000000000000000000000000000000000000005f5260045ffd5b505f94508493505050565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016330361233957565b7f0c6d42ae000000000000000000000000000000000000000000000000000000005f5260045ffd5b8181029291811591840414171561200c57565b6001600160681b0303906001600160681b03821161200c57565b9190820391821161200c57565b81156123a5570490565b634e487b7160e01b5f52601260045260245ffd5b929091926123c7828561239b565b90811561248d576001600160a01b0316916001600160a01b03604051947fa9059cbb000000000000000000000000000000000000000000000000000000005f521693846004528260245260205f60448180885af19060015f511482161561247e575b604052612461575060207f9a380920405cd56ab6f7f5f2375bfc42aa8ef39f7e3f43d8f8f02bb4c925319291604051908152a3905f90565b61247a9350816124749296959350612361565b9061238e565b9190565b90843b15153d15161690612429565b50505050905f90565b91818310156125db5782156125b35782811080156125aa575b612582575f5461ffff808260c81c161461257c578382148015612573575b6125375768ffff000000000000009060901c16600160401b019182600160401b1161200c576125138261250d81612507886125199761238e565b9461238e565b92612361565b93612361565b90612524818361396f565b831092831561255f575b50505061253757565b7f7f043c76000000000000000000000000000000000000000000000000000000005f5260045ffd5b61256a92935061396f565b115f808061252e565b508282146124cd565b50505050565b7fdc5eefea000000000000000000000000000000000000000000000000000000005f5260045ffd5b508181116124af565b7f6b95e45f000000000000000000000000000000000000000000000000000000005f5260045ffd5b7fd6e666c0000000000000000000000000000000000000000000000000000000005f5260045ffd5b96989491999792909399610160525f61010052600f0b95861561336e57611dd26001600160a01b03936001600160801b03806126d395818f896126f99b5f54610100526040519b8c9a7f3b9009e00000000000000000000000000000000000000000000000000000000060208d01521660248b015216604489015261016051151560648901528d60848901521660a48701526101005160c487015216988960e48601521696876101048501526001600160801b038c16610124850152610140610144850152610164840191611d2e565b7f0000000000000000000000000000000000000000000000000000000000000000613a05565b5f6101a0526101605115613350575061271c906001600160801b038516906139fc565b6101a0525b5f811360a0819052156132f55761016051156132cf577f00000000000000000000000000000000000000000000000000000000000000005b025b60c08190525f60e05260a05115613293575b505f608060405161277d81611bff565b82815282602082015282604082015282606082015201525f60206040516127a381611c1b565b82815201526001600160801b0360c0511161326b57604051610140526127cb61014051611c1b565b60c05161014051525f60206101405101525f548060081c60010b908060801c60020b91805f52600460205260405f20956040519661280888611bff565b546001600160681b03811688526001600160681b038160681c16602089015261ffff8160d01c16604089015261ffff8160e01c16606089015260f01c60808801526305f5e1006affffff00000000000000008071ffffffffffffffffffff00000000000000006128816001600160801b038b168961385b565b9a61289f6001600160801b038c1661ffff6040840151168b0161385b565b9096610120526001600160681b038860181c16989b6101c052965f6101805260701c161616046101805260a051155f146132355790959290916001600160801b035f5b16965b610140515115612e165761016051156132275761ffff6080820151165b620f424069ffff0000000000000000610180519260401b16046101a051010161293261016051826101c0516138a7565b6129406101605183866138a7565b91600192610160515f14613195576001600160681b0360208601511615801561318d575b61311a575b835b612e3d575b505050610160515f14612e2c578315905b8115612e23575b5015612e16576101605115612d355750507f0000000000000000000000000000000000000000000000000000000000000000610120511315612a6857505f19610120510161012052610120515f52600460205260405f2091604051926129ed84611bff565b54926001600160681b03841681526001600160681b038460681c16602082015261ffff8460d01c169384604083015261ffff8160e01c16606083015260f01c6080820152906001600160681b039360020b9003956101c05192612a596001600160801b0388168961385b565b6101c0525b92909693916128e5565b9350509092505b610120516101205160010b03612d1a576fffffffffffffffffffffffffff000000612a9b5f5493614c7a565b60181b1690808060020b03612d035760801b72ffffff0000000000000000000000000000000016917fffffffffffffffffffffffffff000000000000000000000000000000000000ff62ffff006101205160081b1691161717175f5560a051155f14612ceb57602061014051015190610140515160c05103915b6101605115612ce357915f03915b6001600160801b0360e05116838160e05160801c01610160515f14612ca1576fffffffffffffffffffffffffffffffff199182916001600160801b03612b71600154928883851601036138e1565b16938491161760801c0160801b16176001555b80612c26575b50612be4612bbc60e051927f000000000000000000000000000000000000000000000000000000000000000090613e56565b937f000000000000000000000000000000000000000000000000000000000000000090613e56565b9183151580612c1d575b15612bf557565b7f2e5a4599000000000000000000000000000000000000000000000000000000005f5260045ffd5b50821515612bee565b6101605115612c67576fffffffffffffffffffffffffffffffff196001600160801b03612c5960025493828516016138e1565b169116176002555b5f612b8a565b6001600160801b036fffffffffffffffffffffffffffffffff19612c92600254938460801c016138e1565b60801b16911617600255612c61565b90506001600160801b0383816fffffffffffffffffffffffffffffffff19612cd2600154958a8760801c01036138e1565b60801b169316011617600155612b84565b915f03612b23565b610140515160c0510390602061014051015191612b15565b63327269a760e01b5f52601860045260245260445ffd5b63327269a760e01b5f5260106004526101205160245260445ffd5b939096917f0000000000000000000000000000000000000000000000000000000000000000610120511215612e095750612d8490600161012051016101205261ffff60405f9601511601614a1a565b60020b956101c052610120515f52600460205260405f2090612e0360405192612dac84611bff565b54926001600160681b03841681526001600160681b038460681c16602082015261ffff8460d01c169384604083015261ffff8160e01c16606083015260f01c6080820152926001600160801b03881690890161385b565b92612a5e565b9550939550505050612a6f565b5050935050909250612a6f565b9050155f612988565b6001600160681b0384101590612981565b612e4982939792614051565b9662ffffff5f5460981c1697612e63896101805187614077565b90610160515f146130c65760a0516130925790612e93949392916001600160801b038c169461014051908a61484f565b9490919491949293985b8415801590613089575b612eb4575b505050612970565b7fcad09799f755048f0fd388c6b2fcc8e0cebefd15756c6903522cc2a95f661f7095606095612f036001600160801b03936fffffffffffffffffffffffffffffffff19956101805190856149e6565b8484821691840360801b161760e0510160e052836040519661012051885284169160801b16176020860152169160801b16176040820152a1610120515f52600460205261307e60405f206001600160681b0384511681549079ffffffffffffffffffffffffff00000000000000000000000000602087015160681b16907fffffffff000000000000000000000000000000000000000000000000000000007bffff0000000000000000000000000000000000000000000000000000604089015160d01b169316171717815561302a61ffff60608601511682907fffff0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff7dffff0000000000000000000000000000000000000000000000000000000083549260e01b169116179055565b608084015181547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1660f09190911b7fffff00000000000000000000000000000000000000000000000000000000000016179055565b5f8080808080612eac565b50831515612ea7565b906130b394939291999e996001600160801b038c169461014051908a61450a565b959195939092939295939499039d612e9d565b60a0516130f957906130eb949392916001600160801b038c169461014051908a614377565b949091949194929398612e9d565b906130b394939291999e996001600160801b038c169461014051908a614098565b925060a051155f1461314f57816001600160801b038816101561313f575b5f92612969565b5050505050935050909250612a6f565b6001600160801b03871615158061317a575b61313f578a613138575050505050935050909250612a6f565b50816001600160801b0388161015613161565b508615612964565b6001600160681b03855116158015613216575b6131b3575b8361296b565b925060a051155f146131d857826001600160801b038816111561313f575b5f926131ad565b6001600160801b038716151580613203575b61313f578a6131d1575050505050935050909250612a6f565b50826001600160801b03881611156131ea565b506001600160681b038710156131a8565b61ffff606082015116612902565b6101605115613259576001600160801b0360015460801c5b979492979391936128e2565b6001600160801b03806001541661324d565b7fd29a971a000000000000000000000000000000000000000000000000000000005f5260045ffd5b61016051156132bd576001600160801b0360015460801c5b168091111561276d5760c0525f61276d565b6001600160801b0380600154166132ab565b7f0000000000000000000000000000000000000000000000000000000000000000612759565b6101605115613329577f0000000000000000000000000000000000000000000000000000000000000000905b5f030261275b565b7f000000000000000000000000000000000000000000000000000000000000000090613321565b61336591506001600160801b038516906139c5565b6101a052612721565b7f2c5211c6000000000000000000000000000000000000000000000000000000005f5260045ffd5b9081600f0b918083036133a65750565b63327269a760e01b5f52608060045260245260445ffd5b9d9a98969492909c9b99979593919d6040519e8f9e8f92602084017fe6a7bba00000000000000000000000000000000000000000000000000000000090526001600160a01b031660248401526001600160a01b0316604483015215159060640152600f0b60848d01526001600160801b031660a48c015260c48b015260e48a01526001600160801b03166101048901526001600160801b03166101248801526001600160801b0316610144870152600f0b610164860152600f0b6101848501526101a48401526101c483016101c090526101e483019061349c92611d2e565b03601f19810182526134ae9082611c37565b611f2c907f0000000000000000000000000000000000000000000000000000000000000000613a05565b949269ffffffffffffffffffff906001600160a01b036135199481611d159a989516895216602088015216604086015260a0606086015260a0850190611ccb565b926080818503910152611d2e565b9390611d159896936001600160a01b0361356b948169ffffffffffffffffffff949b999b16885216602087015216604085015260e0606085015260e0840190611ccb565b94608083015260a082015260c0818503910152611d2e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b038116611d1557506001600160a01b036003541690565b51906001600160801b03821682036107fd57565b3d15613610573d9067ffffffffffffffff8211611beb5760405191613605601f8201601f191660200184611c37565b82523d5f602084013e565b606090565b5f9060606001600160a01b03613629613583565b166004604051809581937f171755b10000000000000000000000000000000000000000000000000000000083525af1905f825f945f946136f4575b506136c957602060446136756135d6565b6040519283917f46a149300000000000000000000000000000000000000000000000000000000083528160048401528051918291826024860152018484015e5f828201840152601f01601f19168101030190fd5b6136ef6001600160801b0384166001600160801b0386166001600160801b038416612496565b929190565b94509250506060833d606011613746575b8161371260609383611c37565b810103126107fd57613723836135c2565b9261373c6040613735602084016135c2565b92016135c2565b939093925f613664565b3d9150613705565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526020816024816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa9081156107f2575f916137bd575090565b90506020813d6020116137e4575b816137d860209383611c37565b810103126107fd575190565b3d91506137cb565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526020816024816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa9081156107f2575f916137bd575090565b905f821261387257611d1591620f42400190613bc8565b611d1591620f42400190613bc8565b9161388b81612374565b910291020160016001600160681b035f19830104019015150290565b91156138c757600160401b0180600160401b1161200c57611d15916139b6565b600160401b0180600160401b1161200c57611d1591613998565b6001600160801b0381116138fb576001600160801b031690565b7f6dfcc650000000000000000000000000000000000000000000000000000000005f52608060045260245260445ffd5b604051602081017ff9e3ebd3e85cd613d06ad4241f62088baffa30fdac338bc1f1a252f9a3b224a3815260208252613964604083611c37565b9051902060ff191690565b9061397f81600160401b84613d73565b9080156123a557600160401b611d15930915159061203c565b600160401b611d15926139ac828285613d73565b920915159061203c565b90600160401b611d1592613d73565b906139cf9161396f565b7fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000810190811161200c5790565b6139cf9161396f565b918215613b1357915b600781168015611b6b57613a2190613ec5565b6001600160a01b03811615613aeb575f80602085019283828751925af1613a466135d6565b9015613ab6576020815110613a8e577fffffffff00000000000000000000000000000000000000000000000000000000602081920151925116911603613a8e5760031c613a0e565b7fa59c2303000000000000000000000000000000000000000000000000000000005f5260045ffd5b80519081613ae6577f3c82bb14000000000000000000000000000000000000000000000000000000005f5260045ffd5b602001fd5b7fdf42d72e000000000000000000000000000000000000000000000000000000005f5260045ffd5b915050565b916001600160a01b03604051927fa9059cbb000000000000000000000000000000000000000000000000000000005f521660045260245260205f60448180865af19060015f5114821615613ba7575b60405215613b725750565b6001600160a01b03907f5274afe7000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b906001811516613bbf57823b15153d15161690613b67565b503d5f823e3d90fd5b9091905f905f198482099084810292838084109303928084039314613c415782620f42401115613c2f57507fde8f6cefed634549b62c77574f722e1ac57e23f24d8fd5cb790fb65668c261399394620f4240910990828211900360fa1b910360061c170290565b634e487b71905260116020526024601cfd5b505050620f42409192500490565b5f19600160401b8209918160401b91828085109403938085039414613ce75783821115613ccf57600160401b829109815f0382168092046002816003021880820260020302808202600203028082026002030280820260020302808202600203028091026002030293600183805f03040190848311900302920304170290565b50634e487b715f52156003026011186020526024601cfd5b5090611d15925061239b565b5f19600160801b8209918160801b91828085109403938085039414613ce75783821115613ccf57600160801b829109815f0382168092046002816003021880820260020302808202600203028082026002030280820260020302808202600203028091026002030293600183805f03040190848311900302920304170290565b90915f198383099280830292838086109503948086039514613e045784831115613dec5790829109815f0382168092046002816003021880820260020302808202600203028082026002030280820260020302808202600203028091026002030293600183805f03040190848311900302920304170290565b82634e487b715f52156003026011186020526024601cfd5b505090611d15925061239b565b8015613e26576001600160801b030460010190565b634e487b715f5260126020526024601cfd5b908015613e2657613e4e6001915f19840161239b565b019015150290565b908015613e2657613e6690614a46565b908115613e26577f800000000000000000000000000000000000000000000000000000000000000081145f1983141661200c578181059180820715159182613eb8575b5050613eb25790565b60010190565b5f92501812155f80613ea9565b6004811015613f79576002811015613f2a57600114613f06577fa5724489000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f000000000000000000000000000000000000000000000000000000000000000090565b600214613f55577f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b6008811015614029576006811015613fda57600414613fb6577f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b600614614005577f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b7fa5724489000000000000000000000000000000000000000000000000000000005f5260045ffd5b80156140725780600160401b0180600160401b1161200c57611d1591613c4f565b505f90565b90811561409157620f4240611d1593828403020401613c4f565b5050505f90565b9697929095946140a9878783613881565b9889845160401b106143605780871161433757506001600160681b03905b6001600160681b03895116996140eb896001600160681b0303809c8b86030261239b565b9a60018c61410d6140fd878d88613881565b6141078684613998565b92613998565b010160011c98898751809111155f146141ab575050505050955b88156141a2575b5090602091850260401c93840260401c9482868203986001600160681b036141558c614c7a565b8183511603168152016001600160681b036141748a8284511601614cc4565b16905281510381520186815101905261419761418f87614a46565b5f0395614a46565b939594939280920390565b9550602061412e565b60019d50848293959c96949b506141d092916001600160681b038f5116908689614a9b565b996001600160681b038c5116998b6141ed86888303809e0261239b565b9e8f6141fd6140fd848888613881565b010160011c9b8c8a519287848310918261432b575b5050614287575b505050505050845190818910908161427d575b50614275575b808811614241575b5050614127565b6142689398506142549297919a0261239b565b97886001600160681b03895116910261239b565b8401948151945f8061423a565b965086614232565b905089105f61422c565b909192959f506142a394979c93969d5015614322575b0261239b565b806142bf575050505081519480965f995b5f8080808080614219565b88939b98999299018881115f1461431c575087985b89838c516001600160681b031686830302906142ef9161239b565b9c6142f992613881565b90614304908c613998565b9061430f908c613998565b0160010160011c966142b4565b986142d4565b6001925061429d565b909150108f8890614212565b8181111561436057614357906001600160681b0383808a0392030261239b565b908782116140c7575b50505050945050509050905f905f905f905f905f90565b969291939490979584516001600160681b03895116908181105f146144f957906143ab918b6001600160681b03030261239b565b8901988551945b828110614476575b508415614462576001836143f86143f16143ea8e876143e46020986144579c9a61445f9e9c613881565b95613881565b9287613998565b9186613998565b010160011c91820260401c96870260401c80970395818884039a6001600160681b0361442387614c7a565b8183511603168152016001600160681b036144428c8284511601614cc4565b16905283815103815201908151019052614a46565b5f0394614a46565b92565b98505f975087968796508695509350505050565b838111156144e457614496906001600160681b038580860392030261239b565b818111156144e4578a8110156143ba579950936144cb8a6001600160681b038b511687806001600160681b030392030261239b565b90808210156144dd57505b935f6143ba565b90506144d6565b5098505f975087968796508695509350505050565b50986001600160681b0399946143b2565b94929796979590956001600160681b0361452388612374565b88840290860201049883518a15613e265760018b67ffffffffffffffff0401116148385784811161481857505f5b602087019461456e896001600160681b038851168482030261239b565b9a60018c61459d6001600160681b0361458687612374565b86028988020104614597858461396f565b9261396f565b010160011c94858751809111155f1461463a5750505050965b8915614631575b50918161461a94936020930260401c95860260401c96878203946001600160681b036145e88d614c7a565b81835116031690526001600160681b03614606868284511601614cc4565b169052815103815201878151019052614a46565b9361462486614a46565b5f03939594939280920390565b965060206145bd565b60019d506146899192965061468490846001600160681b038b9e97969e511661466288612374565b9261466c88612374565b61467e61467889613e11565b94613e11565b94614a9b565b612374565b996001600160681b03885116958b6146a686828103809a0261239b565b9e8f6146cd6001600160681b036146bc85612374565b87028886020104614597868461396f565b010160011c97888a519287848310918261480c575b5050614754575b505050505050845190818510908161474a575b50614742575b808411614710575b506145b6565b909961471f939298500261239b565b966147386001600160681b038451168981038302613e38565b958251915f61470a565b925082614702565b905089115f6146fc565b909192959f5061476f94979893969d5015614322570261239b565b8061478a5750505050815190865f995b5f80808080806146e9565b929a919891939280831115614804578203985b848a106147fb575b8287516001600160681b03168b820302906147bf9161239b565b9b8a6147ca81612374565b6001600160681b03930291020104906147e3908c61396f565b906147ee908c61396f565b0160010160011c9261477f565b985083986147a5565b505f9861479d565b909150118f88906146e2565b614830906001600160681b0386808603920302613e38565b808811614551575b50505050505050909150905f905f905f905f905f90565b939497959291909781519360208601946001600160681b03865116908181105f146149dc57906148829181038c02613e38565b998351995b808410614961575b50891561494c579260018a6148e46148dd8e6001600160681b036149419a98602098826149479e9c6148c081612374565b84029083020104936148d181612374565b9102910201049361396f565b918d61396f565b010160011c92830260401c97880260401c80980396888403946001600160681b0361490e8d614c7a565b81835116031690526001600160681b0361492c868284511601614cc4565b16905289815103815201908151019052614a46565b94614a46565b5f0392565b99505f98508897889750879650945050505050565b828110156149c657614981906001600160681b0385808603920302613e38565b818110156149c657808c101561488f579a50986149ad8a8c6001600160681b038951169082030261239b565b90808210156149bf57505b985f61488f565b90506149b8565b5099505f98508897889750879650945050505050565b50995f9a99614887565b919082158015614a12575b614a0a57611d159382620f424092030204810191613d73565b505050505f90565b5081156149f1565b627fffff8113614a3e57627fffff198112614a355760020b90565b50627fffff1990565b50627fffff90565b7f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8111614a705790565b7f24775e06000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b939594919095614ad1614ab782614ab188612374565b9561238e565b916001600160681b03614aca8885612361565b049061203c565b905f948481151580614c71575b80614c68575b614b72575b5050505082159081614b68575b50614b5f575b808211614b57575b5083614b10828461203c565b1115614b475750825b81841115614b25575050565b611d1592935081105f14614b3f5760ff60015b169061203c565b60ff5f614b38565b614b51908261203c565b92614b19565b90505f614b04565b60019150614afc565b905015155f614af6565b614b80918460401b90613d73565b80614b8c575b84614ae9565b83614b9d929394965060801b613cf3565b91806d01fffffffffffffffffffffffffe02906d01fffffffffffffffffffffffffe82040361200c5782614bd092613d73565b7f3fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8116810361200c5760021b600160801b0180600160801b1161200c57614c1690614d09565b7f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8216820361200c5760401b600160801b0180600160801b1161200c57614c5f9160011b61239b565b915f8080614b86565b50801515614ae4565b50831515614ade565b6001600160681b038111614c94576001600160681b031690565b7f6dfcc650000000000000000000000000000000000000000000000000000000005f52606860045260245260445ffd5b6001600160681b038111614cde576001600160681b031690565b7f6ce2737a000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b6001811115611d1557806001600160801b831015614e1a575b600482600160401b614dcc941015614e0d575b640100000000811015614e00575b62010000811015614df3575b610100811015614de7575b6010811015614ddb575b1015614dd3575b60030260011c614d7b818461239b565b0160011c614d89818461239b565b0160011c614d97818461239b565b0160011c614da5818461239b565b0160011c614db3818461239b565b0160011c614dc1818461239b565b0160011c809261239b565b8111900390565b60011b614d6b565b811c9160021b91614d64565b60081c91811b91614d5a565b60101c9160081b91614d4f565b60201c9160101b91614d43565b60401c9160201b91614d35565b5050608081901c600160401b614d2256fea164736f6c6343000823000a","sourceMap":"2568:41509:2:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2568:41509:2;;;;;;:::i;:::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2015:24:25;;;:::i;:::-;4288:69:32;1270:79:25;;2568:41509:2;2015:24:25;9773:924:2;2015:24:25;489:28:15;2015:24:25;;:::i;:::-;4520:68:32;2568:41509:2;;9773:924;;:::i;:::-;2568:41509;;2015:24:25;;:::i;:::-;4520:68:32;2568:41509:2;;;;;;;;;;1270:79:25;1312:30;2568:41509:2;;1312:30:25;2568:41509:2;;;1312:30:25;2568:41509:2;;;;;;;;;;;;-1:-1:-1;;2568:41509:2;;;;2015:24:25;;:::i;:::-;4288:69:32;1270:79:25;;2015:24;;:::i;:::-;563:17:15;4520:68:32;;19827:29:2;;:::i;:::-;-1:-1:-1;;;;;2568:41509:2;;-1:-1:-1;;;;;2568:41509:2;;;4469:64:19;;;;:::i;:::-;2568:41509:2;-1:-1:-1;;;;;2568:41509:2;4556:65:19;;;;:::i;:::-;2568:41509:2;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20210:70;;;;:::i;:::-;2568:41509;;;;;20316:101;;;;:::i;:::-;2568:41509;;;-1:-1:-1;;;;;2568:41509:2;5292:22:19;;;:::i;:::-;2568:41509:2;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;563:3:13;2568:41509:2;;;;;;;;;;;;-1:-1:-1;;;1278:3:13;2568:41509:2;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2568:41509:2;;;20647:155;1906:73:13;1278:3;1906:73;;;:::i;:::-;20647:155:2;:::i;:::-;2568:41509;;-1:-1:-1;;2568:41509:2;;;;;;;-1:-1:-1;;;;;2568:41509:2;-1:-1:-1;;;2568:41509:2;;;-1:-1:-1;;;2568:41509:2;;;20823:156;1823:74:13;2568:41509:2;1823:74:13;-1:-1:-1;;;;;1823:74:13;;:::i;20823:156:2:-;2568:41509;;;2015:24:25;;:::i;:::-;4520:68:32;2568:41509:2;;;;;;;;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;-1:-1:-1;;2568:41509:2;;;;;;;-1:-1:-1;;2568:41509:2;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;27430:40;;2015:24:25;;:::i;:::-;4288:69:32;1270:79:25;;2015:24;;;;;563:17:15;2015:24:25;;:::i;:::-;4520:68:32;11267:196:2;11129:29;;;;:::i;:::-;11284:10;;;;;;;;;;11267:196;:::i;:::-;;;;;;;;;;;11470:1010;;;;2568:41509;;;11498:16;;11494:148;;11470:1010;11675:10;;;:::i;:::-;11284;;11693:98;;;;2568:41509;;;11693:98;2568:41509;;11693:98;;;;;2568:41509;11693:98;;2568:41509;;11693:98;2568:41509;11693:98;;;:::i;:::-;;2568:41509;;;11284:10;11693:98;;;;;;;;11470:1010;2568:41509;;;;11859:16;;:71;;;;11470:1010;11855:119;;;;11470:1010;;13310:23;11470:1010;2568:41509;11470:1010;;12865:13;11470:1010;13335:23;11470:1010;;;;;;;-1:-1:-1;;;;;11470:1010:2;;12808:23;12777;2568:41509;;2675:57:18;12777:23:2;;:::i;:::-;12808;;:::i;:::-;2128:88:20;-1:-1:-1;;;;;2128:88:20;;;2568:41509:2;2128:88:20;;11284:10:2;;12865:13;:::i;:::-;2568:41509;;;;;;5408:198:20;;-1:-1:-1;;;;;2568:41509:2;;;;5408:198:20;2568:41509:2;5408:198:20;;2568:41509:2;;;;;;12969:19;5408:198:20;;;;;2568:41509:2;;3269:96:20;-1:-1:-1;;;;;3269:96:20;-1:-1:-1;;3269:96:20;2568:41509:2;3269:96:20;;;2568:41509:2;;;;;;;;;11284:10;12896:400;2568:41509;11284:10;12896:400;;13310:23;:::i;:::-;13335;;:::i;:::-;2568:41509;;2015:24:25;;:::i;:::-;4520:68:32;2568:41509:2;;;;;;;;;;;;;;11855:119;11949:16;2568:41509;;11949:16;2568:41509;;;11949:16;11859:71;11879:38;;;;:::i;:::-;11920:10;;:::i;:::-;-1:-1:-1;11859:71:2;;;;11693:98;2568:41509;;11693:98;;;:::i;:::-;2568:41509;;;;11693:98;;;;2568:41509;;;;;;;;;;11494:148;11618:13;24578:6;11618:13;;:::i;:::-;24553:6;-1:-1:-1;;;;;24553:6:2;2568:41509;24578:6;:::i;:::-;11494:148;;;11470:1010;11998:16;2568:41509;11998:16;;11994:148;;11470:1010;12175:10;;:::i;:::-;11284;;12193:98;;;;2568:41509;;12193:98;2568:41509;;;;12193:98;;;;;2568:41509;12193:98;;2568:41509;12193:98;;;:::i;:::-;;11284:10;;;12193:98;;;;;;;;11470:1010;2568:41509;;;;12359:16;;:71;;;;11470:1010;12355:119;;;;11470:1010;;13310:23;11470:1010;2568:41509;11470:1010;;12865:13;11470:1010;13335:23;11470:1010;;;;;;;-1:-1:-1;;;;;11470:1010:2;;;12359:71;12379:38;;;;:::i;:::-;12420:10;;:::i;:::-;-1:-1:-1;12359:71:2;;;;12193:98;2568:41509;12193:98;;;:::i;:::-;2568:41509;;;12193:98;;;;2568:41509;;;;;;;;;12193:98;2568:41509;;;11994:148;24463:6;12118:13;;;:::i;:::-;24438:6;-1:-1:-1;;;;;24438:6:2;2568:41509;24463:6;:::i;:::-;11994:148;;1270:79:25;1312:30;2568:41509:2;1312:30:25;2568:41509:2;;1312:30:25;27430:40:2;27458:12;2568:41509;27458:12;2568:41509;;27458:12;2568:41509;;;;;;-1:-1:-1;;2568:41509:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1533:816:1;;;;2568:41509:2;1533:816:1;;2568:41509:2;1533:816:1;;;;;;;;2568:41509:2;1533:816:1;2568:41509:2;;1533:816:1;;2568:41509:2;;1533:816:1;;;;;;;;;;;;;;;;;;;2568:41509:2;1533:816:1;;;;;2568:41509:2;1533:816:1;;;;;;2568:41509:2;;;;;;-1:-1:-1;;2568:41509:2;;;;;;;:::i;:::-;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;;;;-1:-1:-1;;2568:41509:2;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;18510:7:2;2568:41509;;;-1:-1:-1;;;;;18533:6:2;2568:41509;;18478:1077;;2568:41509;-1:-1:-1;;;;;18555:6:2;2568:41509;;18478:1077;;2568:41509;18592:24;2568:41509;18478:1077;;2568:41509;18647:24;2568:41509;18478:1077;;2568:41509;18711:36;2568:41509;18478:1077;;2568:41509;18787:36;2568:41509;18478:1077;;2568:41509;18860:29;2568:41509;18478:1077;;2568:41509;-1:-1:-1;;;;;18921:24:2;2568:41509;;18478:1077;;2568:41509;18964:10;2568:41509;18478:1077;;2568:41509;18994:11;2568:41509;18478:1077;;2568:41509;-1:-1:-1;;;;;19025:11:2;2568:41509;;18478:1077;;2568:41509;-1:-1:-1;;;;;19056:11:2;2568:41509;;18478:1077;;2568:41509;-1:-1:-1;;;;;19087:11:2;2568:41509;;18478:1077;;2568:41509;-1:-1:-1;;;;;19118:11:2;2568:41509;;18478:1077;;2568:41509;-1:-1:-1;;;;;19149:11:2;2568:41509;;18478:1077;;2568:41509;-1:-1:-1;;;;;19180:11:2;2568:41509;;18478:1077;;2568:41509;-1:-1:-1;;;;;19211:11:2;2568:41509;;18478:1077;;2568:41509;19255:26;2568:41509;18478:1077;;2568:41509;19313:25;2568:41509;18478:1077;;2568:41509;19374:29;2568:41509;18478:1077;;2568:41509;19438:28;2568:41509;18478:1077;;2568:41509;19491:17;2568:41509;18478:1077;;2568:41509;19532:16;2568:41509;18478:1077;;2568:41509;;;;18510:7;-1:-1:-1;;;;;18510:7:2;2568:41509;;;-1:-1:-1;;;;;2568:41509:2;18478:1077;;2568:41509;;;;;;-1:-1:-1;;;;;2568:41509:2;18478:1077;;2568:41509;;;;;;;18478:1077;;2568:41509;;;;;;18478:1077;;2568:41509;;;;;;18478:1077;;2568:41509;;;;;;18478:1077;;2568:41509;;;;;;18478:1077;;2568:41509;;;;;-1:-1:-1;;;;;2568:41509:2;18478:1077;;2568:41509;;;;;;;18478:1077;;2568:41509;;;;;;18478:1077;;2568:41509;;;;;-1:-1:-1;;;;;2568:41509:2;18478:1077;;2568:41509;;;;;;-1:-1:-1;;;;;2568:41509:2;18478:1077;;2568:41509;;;;;;-1:-1:-1;;;;;2568:41509:2;18478:1077;;2568:41509;;;;;;-1:-1:-1;;;;;2568:41509:2;18478:1077;;2568:41509;;;;;;-1:-1:-1;;;;;2568:41509:2;18478:1077;;2568:41509;;;;;;-1:-1:-1;;;;;2568:41509:2;18478:1077;;2568:41509;;;;;;-1:-1:-1;;;;;2568:41509:2;18478:1077;;2568:41509;;;;;;;18478:1077;;2568:41509;;;;;;18478:1077;;2568:41509;;;;;;18478:1077;;2568:41509;;;;;;18478:1077;;2568:41509;;;;;;18478:1077;;2568:41509;;;;;18478:1077;2568:41509;;;;;;;;;;;;-1:-1:-1;;2568:41509:2;;;;;;:::i;:::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;:::i;:::-;2015:24:25;;;;;:::i;:::-;4288:69:32;1270:79:25;;2568:41509:2;2015:24:25;8970:759:2;2015:24:25;406:25:15;2015:24:25;;:::i;:::-;4520:68:32;2568:41509:2;;8970:759;;:::i;:::-;2568:41509;2015:24:25;;:::i;2568:41509:2:-;;;;;;-1:-1:-1;;2568:41509:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8754:56;;:::i;:::-;2015:24:25;;:::i;:::-;4288:69:32;1270:79:25;;1045:33:15;2015:24:25;;:::i;:::-;4520:68:32;17629:10:2;17623:16;;:37;;;;2568:41509;17619:70;;17770:29;2568:41509;;17810:56;2568:41509;;;;;;;17737:27;2568:41509;;;17737:27;;2568:41509;;;;;;;;;;;;;;;17737:27;2568:41509;;;;;;;;;;;;;;;17770:29;2568:41509;;;;;;;;;17810:56;2568:41509;2015:24:25;;:::i;:::-;4520:68:32;2568:41509:2;17619:70;17669:20;;2568:41509;17669:20;2568:41509;;;;17669:20;17623:37;17649:11;;17643:17;;17623:37;;2568:41509;;;;;;-1:-1:-1;;2568:41509:2;;;;;;:::i;:::-;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2015:24:25;;;;;:::i;:::-;4288:69:32;1270:79:25;;2015:24;;;;;14586:13:2;2015:24:25;;;;;;;13826:77:2;2015:24:25;;14012:192:2;2015:24:25;;;683:34:15;2015:24:25;;:::i;:::-;4520:68:32;13826:77:2;:::i;:::-;14012:192;:::i;:::-;;;;;;;;;;;;2675:57:18;;;14529:23:2;14498;2568:41509;2675:57:18;14498:23:2;;:::i;:::-;14529;;:::i;:::-;2128:88:20;-1:-1:-1;;;;;2128:88:20;;;2568:41509:2;2128:88:20;;14586:13:2;;:::i;:::-;14619:40;2568:41509;14619:40;2568:41509;;;;;;14619:40;2568:41509;;;;;;-1:-1:-1;;2568:41509:2;;;;;;;;;;;;;;;;;;;;;;;;;;8754:56;;:::i;:::-;2015:24:25;;:::i;:::-;4288:69:32;1270:79:25;;850:24:15;2015::25;;:::i;:::-;4520:68:32;2568:41509:2;;;;;;;;16418:29;;16414:129;;2568:41509;;;;;;;;;;;;16554:33;;16550:141;;2568:41509;;2015:24:25;;:::i;16550:141:2:-;16646:36;2568:41509;;;;;;;;;;;;;;;;;;16646:36;16550:141;;;;;16414:129;16502:32;2568:41509;;;;;;;;;;;;;;;;;;16502:32;16414:129;;;;;2568:41509;;;;;;-1:-1:-1;;2568:41509:2;;;;;;;;;;;;;8804:1;8754:56;;;:::i;:::-;8804:1;:::i;:::-;2568:41509;;;;;;;-1:-1:-1;;2568:41509:2;;;;-1:-1:-1;;;;;2568:41509:2;;:::i;:::-;8754:56;;:::i;:::-;2568:41509;;;18001:32;2568:41509;;;18001:32;2568:41509;18044:38;2568:41509;18044:38;;2568:41509;;;;;;;-1:-1:-1;;2568:41509:2;;;;;;;;;655:751:1;;2568:41509:2;655:751:1;2568:41509:2;655:751:1;;;2568:41509:2;655:751:1;;;;;;;;;;2568:41509:2;;;655:751:1;;;;;;;;;;;;;;;;;;;;2568:41509:2;;655:751:1;;;2568:41509:2;;;;;;-1:-1:-1;;2568:41509:2;;;;;;;;;;;;;;;8754:56;;:::i;:::-;2015:24:25;;:::i;:::-;4288:69:32;1270:79:25;;944:36:15;2015:24:25;;:::i;:::-;4520:68:32;2568:41509:2;;;;;;;;16917:47;;16913:177;;2568:41509;2015:24:25;;:::i;16913:177:2:-;17033:50;2568:41509;;;;;;;;;;;;;;;;;;17033:50;16913:177;;;;;2568:41509;;;;;;-1:-1:-1;;2568:41509:2;;;;;;436:83:1;2568:41509:2;436:83:1;2568:41509:2;;436:83:1;2568:41509:2;;;;;;-1:-1:-1;;2568:41509:2;;;;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;8754:56;;:::i;:::-;2015:24:25;;:::i;:::-;4288:69:32;1270:79:25;;771:24:15;2015::25;;:::i;:::-;4520:68:32;2568:41509:2;;;;;;;;;;21645:27;2568:41509;;21710:27;2568:41509;;21778:30;2568:41509;;21849:30;2568:41509;21895:16;;21891:963;;2568:41509;22881:18;;;16115:75;22881:18;;2568:41509;22881:18;;;;;;22877:581;;2568:41509;15534:6;;;15999:104;15534:6;;;;15833:104;15534:6;15592:24;15519:98;15592:24;15519:98;;;;;:::i;:::-;2568:41509;;21645:27;2568:41509;15688:6;15673:98;15688:6;15746:24;;;15673:98;;;;:::i;:::-;2568:41509;;21710:27;2568:41509;15833:104;:::i;:::-;2568:41509;;21778:30;2568:41509;15999:104;:::i;:::-;2568:41509;21849:30;2568:41509;;;;;;;;;;;;;;;;;;16115:75;2568:41509;2015:24:25;;:::i;22877:581:2:-;15999:104;2568:41509;;;;;22934:23;2568:41509;;23027:60;22934;2568:41509;-1:-1:-1;;;;;2568:41509:2;;;;;22934:60;:::i;:::-;2568:41509;;;;;;;;23027:60;:::i;:::-;2568:41509;;;;;;;;;;;;;;22934:23;2568:41509;22877:581;;;;;;;;21891:963;22011:10;;;;;;;;;;;:::i;:::-;22024:24;22011:37;;;:::i;:::-;2568:41509;;;;;;-1:-1:-1;;;;;2568:41509:2;;22011:71;;;:::i;:::-;2568:41509;;22093:23;2568:41509;;-1:-1:-1;;;;;2568:41509:2;;22011:105;;;:::i;:::-;:135;;;;:::i;:::-;:168;;;;:::i;:::-;22212:10;;;:::i;:::-;22225:24;22212:37;;;:::i;:::-;2568:41509;;;22212:71;;;:::i;:::-;2568:41509;;;22212:105;;;:::i;:::-;:135;;;;:::i;:::-;:168;;;;:::i;:::-;2568:41509;22460:47;2568:41509;;;;22460:47;:::i;:::-;2568:41509;;;;;22540:47;;;;:::i;:::-;2568:41509;;;;;;;;;;;;21891:963;;;;;;;;;;;2568:41509;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;:::o;17145:250::-;2568:41509;;17221:1;17210:12;;17206:44;;17272:10;2568:41509;;;;17260:22;;;17256:35;;2568:41509;17357:33;2568:41509;;;;;;;17272:10;2568:41509;;;;;;;;;;17357:33;17145:250::o;17256:35::-;17284:7;;;:::o;17206:44::-;17231:19;;;;;;2568:41509;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;:::o;:::-;-1:-1:-1;;;;2568:41509:2;;;;;-1:-1:-1;2568:41509:2;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;:::i;:::-;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2568:41509:2;;;;;;;;-1:-1:-1;;2568:41509:2;;;;:::o;8970:759::-;;;;;;;;9247:14;;;;:::i;:::-;:26;;;9243:45;;9298:14;;;;:::i;:::-;9323:13;;;;;;;;:::i;:::-;9298:45;;;;9294:88;;2568:41509;;;;4464:101:0;2568:41509:2;4464:101:0;2568:41509:2;4464:101:0;2568:41509:2;;;;;;4464:101:0;;;;9323:13:2;4464:101:0;;;9408:10:2;4464:101:0;;;;:::i;:::-;;2568:41509:2;;4464:101:0;;;;;;:::i;:::-;4430:26;4464:101;:::i;:::-;2568:41509:2;;;9492:132;;-1:-1:-1;;;;;2568:41509:2;;9571:10;9492:132;;2568:41509;;;;4464:101:0;2568:41509:2;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;2568:41509:2;;;;;;;:::i;:::-;9560:9;2568:41509;;;;9571:10;2568:41509;;;;9583:15;2568:41509;;;;9600:18;2568:41509;;;;9492:132;:12;;:132;;;;;;9247:14;;;9492:132;;;8970:759;9461:163;4868:144:0;9461:163:2;4868:144:0;9461:163:2;;;;4868:144:0;9461:163:2;;;2568:41509;;;4868:144:0;;;;9323:13:2;4868:144:0;;;9408:10:2;4464:101:0;4868:144;;;:::i;:::-;4835:25;4868:144;:::i;:::-;8970:759:2:o;9492:132::-;;;;;;2568:41509;9492:132;;2568:41509;9492:132;;;;;;2568:41509;9492:132;;;:::i;:::-;;;2568:41509;;;;;;9323:13;2568:41509;;;;9492:132;;;;4868:144:0;9492:132:2;;;;;-1:-1:-1;9492:132:2;;9294:88;9352:30;9247:14;9352:30;;9247:14;9352:30;9243:45;-1:-1:-1;9247:14:2;;-1:-1:-1;9247:14:2;;-1:-1:-1;;;;;9275:13:2:o;18171:186::-;563:17:15;2015:24:25;;:::i;:::-;4288:69:32;18246:36:2;18242:88;;2568:41509;18171:186;:::o;18242:88::-;18299:24;;:::i;2568:41509::-;;;;;;;;;:::o;:::-;-1:-1:-1;;;2568:41509:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;:::o;9773:924::-;;;;;;;10021:14;;;;:::i;:::-;:26;;;10017:45;;10072:14;;;;:::i;:::-;10097:13;;;;;;;;:::i;:::-;10072:45;;;;10068:88;;-1:-1:-1;;;;;2568:41509:2;;10166:10;;;:19;10162:50;;5271:104:0;2568:41509:2;;5271:104:0;10097:13:2;5271:104:0;;;;10166:10:2;5271:104:0;10166:10:2;;;;;;5271:104:0;;;;:::i;:::-;5234:29;5271:104;:::i;:::-;2568:41509:2;;10382:109;2568:41509;10382:109;;10443:10;10382:109;;2568:41509;;;;5271:104:0;2568:41509:2;;;;;;;;;;;;;;;;;:::i;:::-;10432:9;2568:41509;;;;10443:10;2568:41509;;;;10455:15;2568:41509;;;;10472:18;2568:41509;;;;10382:109;:12;;:109;;;;;;;10021:14;;;;10382:109;;;9773:924;10322:169;;5688:159:0;10322:169:2;;;;5688:159:0;10322:169:2;5688:159:0;10322:169:2;;;10497:89;;;9773:924;2568:41509;;5688:159:0;;;;10097:13:2;5688:159:0;;;10166:10:2;5271:104:0;5688:159;;;:::i;:::-;5652:28;5688:159;:::i;10497:89:2:-;10021:14;2568:41509;10021:14;2568:41509;;;10432:9;2568:41509;10542:13;:37;10021:14;;;-1:-1:-1;;2568:41509:2;-1:-1:-1;;;;;10542:37:2;2568:41509;;;;;;10021:14;2568:41509;10497:89;;10542:37;-1:-1:-1;;2568:41509:2;10021:14;10542:37;;10382:109;;;;;;;2568:41509;10382:109;;2568:41509;10382:109;;;;;;2568:41509;10382:109;;;:::i;:::-;;;2568:41509;;;;;;;10097:13;2568:41509;;;;;;;;;;;;;;10382:109;;;;;;;5688:159:0;10382:109:2;;;;;-1:-1:-1;10382:109:2;;10162:50;10194:18;10021:14;10194:18;;10021:14;10194:18;10017:45;-1:-1:-1;10021:14:2;;-1:-1:-1;10021:14:2;;-1:-1:-1;;;10049:13:2:o;27282:97::-;-1:-1:-1;;;;;27345:7:2;2568:41509;27331:10;:21;27327:47;;27282:97::o;27327:47::-;27361:13;;;;;;2568:41509;;;;;;;;;;;;;;;;:::o;:::-;-1:-1:-1;;;;;2568:41509:2;;-1:-1:-1;;;;;2568:41509:2;;;;:::o;:::-;;;;;;;;;;:::o;:::-;;;;;;;:::o;:::-;-1:-1:-1;;;2568:41509:2;;;;;;;;23472:502;;;;;23669:31;;;;:::i;:::-;23710:11;;;23706:42;;-1:-1:-1;;;;;2568:41509:2;2138:38:30;-1:-1:-1;;;;;8544:1067:30;;;8509:24;23720:1:2;8544:1067:30;;;;;;;;;;23720:1:2;8544:1067:30;;;;;;;;23720:1:2;8544:1067:30;;;;;;;23472:502:2;8544:1067:30;;23755:128:2;;2568:41509;8544:1067:30;23893:45:2;2568:41509;8544:1067:30;2568:41509:2;;;;23893:45;23944:25;23720:1;23472:502;:::o;23755:128::-;23827:40;23843:24;;;;;;;;;;:::i;:::-;23827:40;;:::i;:::-;23819:57;;:::o;8544:1067:30:-;;;;;;;;;;;;;23706:42:2;23723:25;;;;;23720:1;23723:25;:::o;31697:909::-;;31811:16;;;;31807:48;;31865:11;;31861:35;;31906:15;;;:34;;;;31697:909;31902:73;;31875:1;2568:41509;;;;;;;32026:23;32022:36;;32067:16;;;:36;;;;31697:909;32063:80;;376:19:19;;;;;-1:-1:-1;;;2568:41509:2;;;-1:-1:-1;;;2568:41509:2;;;32300:20;32215:15;32258;32215;;;32348:20;32215:15;;:::i;:::-;32258;;:::i;:::-;32300:20;;:::i;:::-;32348;;:::i;:::-;32398:60;;;;;:::i;:::-;32386:72;;:156;;;;;31697:909;32375:227;;;;;31697:909::o;32375:227::-;32564:31;31875:1;32564:31;;31875:1;32564:31;32386:156;32484:58;;;;;:::i;:::-;-1:-1:-1;32386:156:2;;;;;32067:36;32087:16;;;;32067:36;;32022;32051:7;;;;:::o;31902:73::-;31949:26;31875:1;31949:26;;31875:1;31949:26;31906:34;31925:15;;;;31906:34;;31861:35;31885:11;31875:1;31885:11;;31875:1;31885:11;31807:48;31836:19;;;;;;32951:1351;;;;;;;;;;;;;;;;2568:41509;;33349:20;;;2568:41509;;;-1:-1:-1;;;;;2675:57:18;-1:-1:-1;;;;;2675:57:18;6223:326:0;2675:57:18;;;;6223:326:0;2675:57:18;33368:1:2;2675:57:18;33394:51:2;;2568:41509;;6223:326:0;;;;;;;;2568:41509:2;6223:326:0;;;2568:41509:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;;;;;;;:::i;6223:326:0:-;6198:17;6223:326;:::i;:::-;33368:1:2;33700:211;;;;;;;2568:41509;33719:92;2568:41509;-1:-1:-1;;;;;2568:41509:2;;33719:92;;:::i;:::-;33700:211;;;33368:1;28219:19;;;;;;:344;;;28308:64;;;;;28321:24;28308:64;2568:41509;28219:344;28629:134;;;;33368:1;28629:134;;28666:20;;;36452:248;;28219:344;2568:41509;33368:1;2568:41509;;;;;;:::i;:::-;;;;;6223:326:0;2568:41509:2;;;;;;;;;;;;;;;33368:1;6223:326:0;2568:41509:2;;;;;:::i;:::-;;;;;;-1:-1:-1;;;;;34876:42:2;;;2568:41509;;;;;;;;;;:::i;:::-;;;;;;33368:1;6223:326:0;34959:102:2;;;2568:41509;33368:1;2568:41509;;;;;;;;;;;;;;33368:1;2568:41509;35203:10;6223:326:0;2568:41509:2;;33368:1;2568:41509;;;;;;;;:::i;:::-;;-1:-1:-1;;;;;2568:41509:2;;;;-1:-1:-1;;;;;2568:41509:2;;;;6223:326:0;2568:41509:2;;;;;;;;;;;;;;;;;;;;;;;;;;;563:3:13;2568:41509:2;;;35261:58;-1:-1:-1;;;;;2568:41509:2;;35261:58;;:::i;:::-;2568:41509;35350:89;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;35350:89;:::i;:::-;36708:330;;;;-1:-1:-1;;;;;2568:41509:2;;;;36708:330;;;;37072:38;33368:1;37072:38;;2568:41509;;;;;;519:47:13;;28666:20:2;;;37251:81;28666:20;;;37251:81;;;;;-1:-1:-1;;;;;33368:1:2;37251:81;2568:41509;37341:5953;;37348:36;;2568:41509;37348:40;;;37471:57;;;;;2568:41509;;37484:21;;2568:41509;;37471:57;1278:3:13;2568:41509:2;;;;;;;;;;;;37586:77;;;;;;;:::i;:::-;37695;;;;;;:::i;:::-;37783:23;2568:41509;37816:772;;;;;;;-1:-1:-1;;;;;6223:326:0;37848:28:2;;2568:41509;;37848:33;:58;;;;37816:772;37844:364;;37816:772;;;38598:3544;;37816:772;42172:74;;;;;;;;;42185:21;;42172:74;;42260:28;;;;42172:74;-1:-1:-1;42256:1030:2;;;42302:940;;;;;42354:10;;;42336:28;;;;42332:39;;2568:41509;;;42385:16;;2568:41509;42385:16;;2568:41509;;33368:1;2568:41509;35203:10;6223:326:0;2568:41509:2;;33368:1;2568:41509;;;;;;;;:::i;:::-;;;-1:-1:-1;;;;;2568:41509:2;;;;-1:-1:-1;;;;;2568:41509:2;;;;6223:326:0;2568:41509:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;42466:36;-1:-1:-1;;;;;2568:41509:2;;;;;42583:47;;;2568:41509;42669:58;-1:-1:-1;;;;;2568:41509:2;;42669:58;;:::i;:::-;42644:83;;42302:940;37341:5953;;;;;;;42332:39;42366:5;;;;;;37341:5953;33573:19:35;;33547:12;;2568:41509:2;;33573:19:35;33569:97;;2568:41509:2;35617:28;33368:1;2568:41509;35617:28;;:::i;:::-;2568:41509;;;;;;;;33035:19:35;33031:97;;2568:41509:2;;;;33547:12:35;2568:41509:2;;33547:12:35;;2568:41509:2;;;;;;;;33368:1;2568:41509;28666:20;;;43438:328;28666:20;;;6223:326:0;34959:102:2;;;2568:41509;43563:36;;;2568:41509;;;;43438:328;;43816:248;;;;;2568:41509;33368:1;2568:41509;43816:248;;-1:-1:-1;;;;;28807:18:2;;1975:65:20;2128:88;;;;2568:41509:2;2128:88:20;;29202:1301:2;;;;;;-1:-1:-1;;2568:41509:2;;;-1:-1:-1;;;;;29418:100:2;2568:41509;;;;;;;;;29418:100;:::i;:::-;2568:41509;;;;;;;;;;;;;;;29202:1301;30515:29;30511:321;;29202:1301;34104:19;26320:64;26235;34104:19;;26274:24;;26235:64;;:::i;:::-;26359:24;;26320:64;;:::i;:::-;34130:93;;34237:17;;:38;;;29202:1301;2568:41509;;;32951:1351::o;2568:41509::-;;33368:1;2568:41509;35203:10;33368:1;2568:41509;34237:38;34258:17;;;;34237:38;;30511:321;30556:268;;;;;-1:-1:-1;;;;;;;30610:74:2;2568:41509;;;;;;;30610:74;:::i;:::-;2568:41509;;;;;;30556:268;30511:321;;;30556:268;-1:-1:-1;;;;;;;30739:74:2;2568:41509;;;;;;;30739:74;:::i;:::-;2568:41509;;;;;;;;30556:268;;29202:1301;2568:41509;;-1:-1:-1;;;;;2568:41509:2;;-1:-1:-1;;30064:100:2;2568:41509;;;;;;;;;30064:100;:::i;:::-;2568:41509;;;;;;;;;;29202:1301;;43816:248;2568:41509;33368:1;2568:41509;43816:248;;43438:328;43665:36;;2568:41509;;;;34959:102;6223:326:0;34959:102:2;;;2568:41509;43438:328;;;33031:97:35;-1:-1:-1;;;33368:1:2;33077:40:35;2568:41509:2;35203:10;2568:41509;6223:326:0;2568:41509:2;;33368:1;33077:40:35;33569:97;-1:-1:-1;;;33368:1:2;33615:40:35;33645:2;35203:10:2;2568:41509;;;6223:326:0;2568:41509:2;;33368:1;33615:40:35;42302:940:2;42782:11;;;;;42764:29;;;;42760:40;;42814:16;42898:77;42814:16;2568:41509;42814:16;;2568:41509;42814:16;;2568:41509;;33368:1;42956:17;;2568:41509;;;42898:77;:::i;:::-;2568:41509;;42989:47;;;2568:41509;;33368:1;2568:41509;35203:10;6223:326:0;2568:41509:2;;33368:1;2568:41509;;43140:89;2568:41509;;;;;;:::i;:::-;;;-1:-1:-1;;;;;2568:41509:2;;;;-1:-1:-1;;;;;2568:41509:2;;;;6223:326:0;2568:41509:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;43140:89;:::i;:::-;42302:940;;;42760:40;42795:5;;;;;;;;;;42256:1030;43270:5;;;;;;;;;;42260:28;42276:12;;;42260:28;;;42172:74;-1:-1:-1;;;;;42209:37:2;;;42172:74;;;38598:3544;38656:42;;;;;;:::i;:::-;2568:41509;;33368:1;2568:41509;;;;38736:78;;;;;;;:::i;:::-;38826:22;39004:2134;;;;;;28666:20;;;;2568:41509;39177:310;2568:41509;;;;-1:-1:-1;;;;;2568:41509:2;;39177:310;;;;;;:::i;:::-;39068:419;;;;;;;;39034:1110;;41154:20;;;;:44;;;39004:2134;41150:982;;39004:2134;38598:3544;;;;;41150:982;41611:455;41274:98;2568:41509;41274:98;;-1:-1:-1;;;;;41274:98:2;-1:-1:-1;;41274:98:2;;;;;;:::i;:::-;2568:41509;;;;;;;;1628:106:20;;;;;;41388:189:2;;2568:41509;;;;;;;;3269:96:20;;;2568:41509:2;3269:96:20;;;6223:326:0;2568:41509:2;;;;3269:96:20;2568:41509:2;3269:96:20;;;2568:41509:2;;;;41611:455;2568:41509;;33368:1;2568:41509;35203:10;6223:326:0;2568:41509:2;;;33368:1;2568:41509;-1:-1:-1;;;;;2568:41509:2;;;;;;;6223:326:0;2568:41509:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;41150:982;;;;;;;;41154:44;41178:20;;;;41154:44;;39034:1110;2568:41509;39762:309;2568:41509;;;;;;;-1:-1:-1;;;;;2568:41509:2;;39762:309;;;;;;:::i;:::-;39524:547;;;;;;;;;;;2568:41509;;39034:1110;;;39004:2134;28666:20;;;;2568:41509;40301:292;2568:41509;;;;-1:-1:-1;;;;;2568:41509:2;;40301:292;;;;;;:::i;:::-;40194:399;;;;;;;;40162:976;39004:2134;;40162:976;2568:41509;40778:291;2568:41509;;;;;;;-1:-1:-1;;;;;2568:41509:2;;40778:291;;;;;;:::i;37844:364::-;28666:20;;;;;37922:241;28666:20;;;2568:41509;-1:-1:-1;;;;;2568:41509:2;;37960:28;;37956:39;;37922:241;33368:1;37844:364;;;37956:39;37990:5;;;;;;;;;;;;;37922:241;-1:-1:-1;;;;;2568:41509:2;;38036:18;;:50;;;37922:241;38032:61;;38113:28;37922:241;38109:39;38143:5;;;;;;;;;;;;;38036:50;2568:41509;;-1:-1:-1;;;;;2568:41509:2;;38058:28;;38036:50;;37848:58;37885:21;;;37848:58;;37816:772;-1:-1:-1;;;;;2568:41509:2;;;38228:33;:74;;;;37816:772;38224:364;;37816:772;;;;38224:364;28666:20;;;;;38316:231;28666:20;;;2568:41509;-1:-1:-1;;;;;2568:41509:2;;38352:28;;38348:39;;38316:231;33368:1;38224:364;;;38316:231;-1:-1:-1;;;;;2568:41509:2;;38424:18;;:50;;;38316:231;38420:61;;38499:28;38316:231;38495:39;38529:5;;;;;;;;;;;;;38424:50;2568:41509;;-1:-1:-1;;;;;2568:41509:2;;38446:28;;38424:50;;38228:74;38265:37;-1:-1:-1;;;;;38265:37:2;;;38228:74;;37471:57;2568:41509;;37508:20;;2568:41509;;37471:57;;37251:81;37271:60;;;;;-1:-1:-1;;;;;2568:41509:2;;;;37271:60;37251:81;;;;;;;;;37271:60;-1:-1:-1;;;;;2568:41509:2;;;;37271:60;;2568:41509;;33368:1;2568:41509;;33368:1;2568:41509;36452:248;36509:60;;;;;-1:-1:-1;;;;;36522:9:2;2568:41509;;;36509:60;2568:41509;36583:42;;;36579:113;36452:248;36579:113;36639:42;;36579:113;36452:248;;36509:60;-1:-1:-1;;;;;2568:41509:2;36547:9;2568:41509;;36509:60;;28308:64;28348:24;28308:64;;28219:344;28470:64;;;;;28483:24;28470:64;;33368:1;2568:41509;;28219:344;;28470:64;28510:24;28470:64;;;33700:211;33820:91;2568:41509;;-1:-1:-1;;;;;2568:41509:2;;33820:91;;:::i;:::-;33700:211;;;;2568:41509;;33368:1;2568:41509;;33368:1;2568:41509;25889:224:35;;2568:41509:2;;;26013:19:35;;;;26009:98;;25889:224;:::o;26009:98::-;-1:-1:-1;;;26055:41:35;;26085:3;26055:41;2568:41509:2;;;;26055:41:35;;6564:911:0;;;;;;;;;;;;;;;;2568:41509:2;;7034:430:0;;;;;;;;;;;-1:-1:-1;;;;;2568:41509:2;7034:430:0;;;2568:41509:2;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7034:430:0;2568:41509:2;;7034:430:0;;;;;;;;:::i;:::-;;;7010:16;7034:430;:::i;2568:41509:2:-;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;:::i;:::-;;;;;;;-1:-1:-1;;;;;2568:41509:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;:::i;27098:180::-;27184:24;-1:-1:-1;;;;;2568:41509:2;;27214:33;;2568:41509;-1:-1:-1;;;;;27260:13:2;2568:41509;;27098:180;:::o;2568:41509::-;;;-1:-1:-1;;;;;2568:41509:2;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2568:41509:2;;;;;:::i;:::-;;;;-1:-1:-1;2568:41509:2;;;;:::o;:::-;;;:::o;30846:508::-;-1:-1:-1;30846:508:2;31052:46;-1:-1:-1;;;;;31018:24:2;;:::i;:::-;2568:41509;31052:46;2568:41509;;31052:46;;;;2568:41509;31052:46;;;;;-1:-1:-1;;;;;31052:46:2;;;30846:508;-1:-1:-1;31048:302:2;;2568:41509;;31273:77;;:::i;:::-;2568:41509;;31316:27;;;;;;;31052:46;31316:27;;2568:41509;;;;;;;;;;;;;;;;-1:-1:-1;2568:41509:2;;;;;;;;-1:-1:-1;;2568:41509:2;;;31316:27;;;;31048:302;31166:58;-1:-1:-1;;;;;2568:41509:2;;-1:-1:-1;;;;;2568:41509:2;;-1:-1:-1;;;;;2568:41509:2;;31166:58;:::i;:::-;31232:33;;;:::o;31052:46::-;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;2568:41509;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;:::i;:::-;31052:46;;;;;;;;;;-1:-1:-1;31052:46:2;;24251:109;2568:41509;;;24316:39;;24349:4;24316:39;;;2568:41509;;24323:6;24316:39;24323:6;-1:-1:-1;;;;;24323:6:2;2568:41509;24316:39;;;;;;;-1:-1:-1;24316:39:2;;;24309:46;24251:109;:::o;24316:39::-;;;2568:41509;24316:39;;2568:41509;24316:39;;;;;;2568:41509;24316:39;;;:::i;:::-;;;2568:41509;;;;;24251:109;:::o;24316:39::-;;;-1:-1:-1;24316:39:2;;24073:109;2568:41509;;;24138:39;;24171:4;24138:39;;;2568:41509;;24145:6;24138:39;24145:6;-1:-1:-1;;;;;24145:6:2;2568:41509;24138:39;;;;;;;-1:-1:-1;24138:39:2;;;24131:46;24073:109;:::o;24887:482::-;;2568:41509;25028:20;;2568:41509;;25125:67;2568:41509;25156:3;2568:41509;25125:67;;:::i;25024:335::-;25282:68;2568:41509;25313:3;2568:41509;25282:68;;:::i;5076:530:19:-;;5292:22;;;:::i;:::-;586:17;2568:41509:2;;;;6945:1:34;-1:-1:-1;;;;;2568:41509:2;;;;;;6930:5:34;;;2568:41509:2;5076:530:19;:::o;1676:308:13:-;;1804:175;;;-1:-1:-1;;;2568:41509:2;;-1:-1:-1;;;2568:41509:2;;;1823:74:13;;;:::i;1804:175::-;-1:-1:-1;;;2568:41509:2;;-1:-1:-1;;;2568:41509:2;;;1906:73:13;;;:::i;9261:218:35:-;-1:-1:-1;;;;;9341:25:35;;9337:105;;-1:-1:-1;;;;;2568:41509:2;9261:218:35;:::o;9337:105::-;9389:42;;;9420:3;9389:42;2568:41509:2;;;;9389:42:35;;468:161:25;2568:41509:2;;534:68:25;;;2568:41509:2;;;534:68:25;;;;2568:41509:2;534:68:25;;:::i;:::-;2568:41509:2;;524:79:25;;-1:-1:-1;;524:105:25;;468:161::o;11108:238:34:-;;11235:25;;-1:-1:-1;;;11235:25:34;;:::i;:::-;11279:26;11309:25;;;;-1:-1:-1;;;11235:104:34;11309:25;;:29;;11235:104;;:::i;11108:238::-;-1:-1:-1;;;11235:104:34;11108:238;11235:25;;;;;:::i;:::-;11279:26;11309:25;:29;;11235:104;;:::i;11108:238::-;;-1:-1:-1;;;11235:25:34;11108:238;11235:25;:::i;2976:253:19:-;;3142:72;2976:253;3142:72;:::i;:::-;2568:41509:2;;;;;;;;2976:253:19;:::o;3793:254::-;3960:72;3793:254;3960:72;:::i;3810:412:0:-;;3894:10;;3890:23;;3919:299;;3973:3;3965:11;;3988:19;;3984:30;;4042:33;;;:::i;:::-;-1:-1:-1;;;;;2568:41509:2;;4087:23:0;4083:57;;3903:1;365:20:12;;;;;;;;;;;;;;:::i;:::-;395:8;;391:190;;365:20;2568:41509:2;;590:18:12;586:72;;2568:41509:2;365:20:12;692:81;;;;807:79;;2568:41509:2;;;895:36:12;891:90;;4210:1:0;2568:41509:2;3919:299:0;;891:90:12;948:26;3903:1:0;948:26:12;;3903:1:0;948:26:12;391:190;2568:41509:2;;417:17:12;;413:126;;553:21;3903:1:0;553:21:12;;3903:1:0;553:21:12;413:126;365:20;446:85;;4083:57:0;4119:21;3903:1;4119:21;;3903:1;4119:21;3890:23;3906:7;;;:::o;1219:204:30:-;;-1:-1:-1;;;;;8544:1067:30;;;8509:24;-1:-1:-1;8544:1067:30;;;;;;;-1:-1:-1;8544:1067:30;;;;;;;1338:4;8544:1067;;;;;;;;1219:204;8544:1067;;1305:38;1301:116;;1219:204;:::o;1301:116::-;-1:-1:-1;;;;;1366:40:30;;8544:1067;1366:40;2568:41509:2;8544:1067:30;2568:41509:2;8544:1067:30;;1366:40;8544:1067;;1338:4;8544:1067;;;;;;;;;;;;;;;;;;;;;;;;;7296:3683:34;;;;2568:41509:2;;-1:-1:-1;;7296:3683:34;;1412:159;;;;;;;;;;;;;;;;7552:9;;7548:365;;8023:19;25313:3:2;8023:19:34;;8019:142;;8444:308;2568:41509:2;8444:308:34;;25313:3:2;8444:308:34;;;;;;;;2568:41509:2;;8444:308:34;;9016:384;;9463:18;2568:41509:2;7296:3683:34;:::o;8019:142::-;1829:135:31;;;940:4;1829:135;;;;;7548:365:34;7881:17;;;25313:3:2;7881:17:34;;;2568:41509:2;7874:24:34;:::o;7296:3683::-;-1:-1:-1;;;;;1412:159:34;;;;;;;;;;;;;;;;;7552:9;;7548:365;;8023:19;;;;8019:142;;-1:-1:-1;;;8444:308:34;;;2568:41509:2;;;8971:31:34;;9016:384;;;9854:1;2568:41509:2;9835:1:34;2568:41509:2;9834:21:34;2568:41509:2;;;9854:1:34;2568:41509:2;;;;;9854:1:34;2568:41509:2;;;;;9854:1:34;2568:41509:2;;;;;9854:1:34;2568:41509:2;;;;;9854:1:34;2568:41509:2;;;;;9854:1:34;2568:41509:2;;9016:384:34;;;;2568:41509:2;9016:384:34;;;8444:308;;;;;;2568:41509:2;8444:308:34;;9016:384;9463:18;2568:41509:2;7296:3683:34;:::o;8019:142::-;1829:135:31;;2568:41509:2;1829:135:31;8082:16:34;5328:5;2568:41509:2;940:4:31;5322:42:34;1829:135:31;;;;;7548:365:34;7881:17;;;;;;:::i;7296:3683::-;-1:-1:-1;;;;;1412:159:34;;;;;;;;;;;;;;;;;7552:9;;7548:365;;8023:19;;;;8019:142;;-1:-1:-1;;;8444:308:34;;;2568:41509:2;;;8971:31:34;;9016:384;;;9854:1;2568:41509:2;9835:1:34;2568:41509:2;9834:21:34;2568:41509:2;;;9854:1:34;2568:41509:2;;;;;9854:1:34;2568:41509:2;;;;;9854:1:34;2568:41509:2;;;;;9854:1:34;2568:41509:2;;;;;9854:1:34;2568:41509:2;;;;;9854:1:34;2568:41509:2;;9016:384:34;;;;2568:41509:2;9016:384:34;;;8444:308;;;;;;2568:41509:2;8444:308:34;;9016:384;9463:18;2568:41509:2;7296:3683:34;:::o;:::-;;;-1:-1:-1;;7296:3683:34;;1412:159;;;;;;;;;;;;;;;;7552:9;;7548:365;;8023:19;;;;8019:142;;8444:308;;;;2568:41509:2;;;8971:31:34;;9016:384;;;9854:1;2568:41509:2;9835:1:34;2568:41509:2;9834:21:34;2568:41509:2;;;9854:1:34;2568:41509:2;;;;;9854:1:34;2568:41509:2;;;;;9854:1:34;2568:41509:2;;;;;9854:1:34;2568:41509:2;;;;;9854:1:34;2568:41509:2;;;;;9854:1:34;2568:41509:2;;9016:384:34;;;;2568:41509:2;9016:384:34;;;8444:308;;;;;;2568:41509:2;8444:308:34;;9016:384;9463:18;2568:41509:2;7296:3683:34;:::o;8019:142::-;1829:135:31;;2568:41509:2;1829:135:31;8082:16:34;5328:5;2568:41509:2;940:4:31;5322:42:34;1829:135:31;;;;;7548:365:34;7881:17;;;;;;;:::i;6269:704::-;6354:6;;6350:150;;-1:-1:-1;;;;;2568:41509:2;6930:5:34;2568:41509:2;;6269:704:34:o;6350:150::-;1829:135:31;6359:1:34;1829:135:31;1035:4;1829:135;;;;;6269:704:34;;6354:6;;6350:150;;6940:11;6945:1;2568:41509:2;;;;;6940:11:34;:::i;:::-;2568:41509:2;6930:5:34;;;2568:41509:2;6269:704:34;:::o;1194:251:17:-;;1273:6;;1269:134;;1427:12;;;:::i;:::-;576:6;;;572:134;;2568:41509:2;;;-1:-1:-1;;2568:41509:2;;;;;;;;;;;;856:14:17;;:30;;;;1194:251;852:92;;;;1194:251;:::o;852:92::-;928:1;2568:41509:2;1194:251:17;:::o;856:30::-;1278:1;875:5;;;874:12;;856:30;;;;2923:678:0;3043:1;3026:18;;3043:1;;;3075;3058:18;;3075:1;;;3110;3092:19;3088:43;;3148:28;2568:41509:2;3148:28:0;3043:1;2568:41509:2;3148:28:0;3088:43;3120:11;3113:18;:::o;3054:227::-;3075:1;3205:19;3201:43;;3261:11;3254:18;:::o;3201:43::-;3233:11;3226:18;:::o;3022:575::-;3314:1;3297:18;;3314:1;;;3346;3329:18;;3346:1;;;3043;3363:19;3359:43;;3419:11;3412:18;:::o;3359:43::-;3391:11;3384:18;:::o;3325:210::-;3346:1;3459:19;3455:43;;3515:11;3508:18;:::o;3455:43::-;3487:11;3480:18;:::o;3293:304::-;3562:28;2568:41509:2;3562:28:0;3043:1;2568:41509:2;3562:28:0;3717:191:13;3808:16;;3804:30;;2568:41509:2;-1:-1:-1;;;2568:41509:2;;-1:-1:-1;;;2568:41509:2;;;3847:56:13;;;:::i;3804:30::-;3826:8;2568:41509:2;3826:8:13;:::o;2371:380::-;;2546:16;;2542:30;;2672:3;2690:50;2568:41509:2;;;;;;;2690:50:13;:::i;2542:30::-;2564:8;;;2568:41509:2;2564:8:13;:::o;27118:4910:19:-;;;;;;;27668:95;;;;;:::i;:::-;2568:41509:2;;;;27817:2:19;376:19;27776:63;27772:122;;27936:33;;;;;27981:28;-1:-1:-1;;;;;27932:442:19;;-1:-1:-1;;;;;2568:41509:2;;;;10063:75:19;2568:41509:2;-1:-1:-1;;;;;2568:41509:2;;;;;;;10063:75:19;:::i;:::-;28593:99;27744:18;28593:99;10972:66;28593:99;;;;;:::i;:::-;10877:69;;;;:::i;:::-;10972:66;;:::i;:::-;2568:41509:2;;27744:18:19;2568:41509:2;28700:93:19;;2568:41509:2;;28831:54:19;;;;28827:2327;28831:54;;;28897:26;;;;;28827:2327;;31166:15;;31162:62;;28827:2327;2568:41509:2;;31651:28:19;2568:41509:2;;;27817:2:19;2568:41509:2;;;;27817:2:19;2568:41509:2;;;;;;31545:22:19;-1:-1:-1;;;;;31545:22:19;;;:::i;:::-;2568:41509:2;;;;;;;;31651:28:19;-1:-1:-1;;;;;31614:85:19;2568:41509:2;;;;;;31614:85:19;:::i;:::-;2568:41509:2;;;;;;;;31770:28:19;2568:41509:2;;;;;;31887:26:19;31840:21;;;:::i;:::-;-1:-1:-1;2568:41509:2;31887:26:19;;:::i;:::-;31921:96;;;;;;2568:41509:2;;27118:4910:19;:::o;31162:62::-;;-1:-1:-1;31651:28:19;31162:62;;28827:2327;27744:18;2568:41509:2;;;;;;;;;;;28960:240:19;2568:41509:2;;-1:-1:-1;;;;;2568:41509:2;;;28960:240:19;;;;:::i;:::-;2568:41509:2;-1:-1:-1;;;;;2568:41509:2;;;;;10063:75:19;2568:41509:2;;;;;;;10063:75:19;:::i;:::-;29339:94;;10972:66;29339:94;;;;;:::i;10972:66::-;2568:41509:2;;27744:18:19;2568:41509:2;29443:85:19;;2568:41509:2;;29543:53:19;;;;;:83;;;;28827:2327;29539:1077;;;;28827:2327;2568:41509:2;;;;;;;;30630:53:19;;;;:83;;;;28827:2327;30626:165;;;28827:2327;30805:53;;;30801:345;;28827:2327;;;;;30801:345;7777:62;2568:41509:2;;;30885:68:19;2568:41509:2;;;;;30885:68:19;:::i;:::-;2568:41509:2;;-1:-1:-1;;;;;2568:41509:2;;;;;7777:62:19;:::i;:::-;2568:41509:2;;;;;30801:345:19;;;;;30626:165;30727:53;-1:-1:-1;30727:53:19;30626:165;;30630:83;30687:26;;;;30630:83;;;29539:1077;29644:19;;;;;;29767:61;29644:19;;;;;;;;29640:43;;29539:1077;2568:41509:2;29767:61:19;:::i;:::-;29844:16;;;2568:41509:2;;;;;;29943:22:19;;29979:14;-1:-1:-1;29840:766:19;;29539:1077;;;;;;;;29840:766;2568:41509:2;;;;;;;;30091:29:19;;;30087:153;30091:29;;;30138:26;;30087:153;;2568:41509:2;;;;-1:-1:-1;;;;;2568:41509:2;;;;;10063:75:19;;;;:::i;:::-;30400:94;;;;:::i;:::-;10877:69;;;;;:::i;:::-;10972:66;;;;;:::i;:::-;2568:41509:2;27744:18:19;2568:41509:2;27744:18:19;2568:41509:2;29840:766:19;;;30087:153;;;;29640:43;27744:18;;-1:-1:-1;29640:43:19;;29543:83;29600:26;;;;29543:83;;;;;27932:442;28038:33;;;;28034:96;;6800:76;28166:99;-1:-1:-1;;;;;2568:41509:2;;;;;;;6800:76:19;:::i;:::-;28139:126;;;28279:28;27932:442;28275:91;;28321:34;;;;;;;;;;;-1:-1:-1;28321:34:19;-1:-1:-1;28321:34:19;-1:-1:-1;28321:34:19;-1:-1:-1;28321:34:19;-1:-1:-1;28321:34:19;:::o;18275:2883::-;;;;;;;;;2568:41509:2;;-1:-1:-1;;;;;2568:41509:2;;;18805:67:19;;;;18801:415;18805:67;;;2568:41509:2;7777:62:19;2568:41509:2;;-1:-1:-1;;;;;2568:41509:2;;7777:62:19;:::i;:::-;2568:41509:2;;;;;18801:415:19;;19228:32;;;19224:718;;18801:415;19954:20;;;19950:111;;2862:1;20104:95;10972:66;10877:69;20239:96;20104:95;;;20875:28;20104:95;21069:26;20104:95;;21121:26;20104:95;;;:::i;:::-;20239:96;;:::i;:::-;10877:69;;;:::i;:::-;10972:66;;;:::i;:::-;2568:41509:2;;2862:1:19;2568:41509:2;;;;;;;;;;;;;;;;;;;20764:27:19;-1:-1:-1;;;;;20764:27:19;;;:::i;:::-;2568:41509:2;;;;;;;;20875:28:19;-1:-1:-1;;;;;20838:85:19;2568:41509:2;;;;;;20838:85:19;:::i;:::-;2568:41509:2;;;;;;;;;20995:28:19;2568:41509:2;;;;;;21069:26:19;:::i;:::-;18791:1;2568:41509:2;21121:26:19;;:::i;:::-;18275:2883;:::o;19950:111::-;20020:32;-1:-1:-1;18791:1:19;;-1:-1:-1;18791:1:19;;;;-1:-1:-1;18791:1:19;;-1:-1:-1;20020:32:19;-1:-1:-1;;;;20020:32:19:o;19224:718::-;19276:33;;;;19272:70;;6800:76;19397:99;-1:-1:-1;;;;;2568:41509:2;;;;;;;6800:76:19;:::i;:::-;19510:37;;;;19506:74;;19595:37;;;19591:343;19224:718;19591:343;19646:37;;;10063:75;19646:37;-1:-1:-1;;;;;2568:41509:2;;;;;-1:-1:-1;;;;;2568:41509:2;;;;10063:75:19;:::i;:::-;19854:69;:33;;;;;;:69;;19591:343;;19224:718;;19854:69;;;;;19506:74;-1:-1:-1;19549:31:19;-1:-1:-1;27777:36:19;;-1:-1:-1;27777:36:19;;;;-1:-1:-1;27777:36:19;;-1:-1:-1;19549:31:19;-1:-1:-1;;;;19549:31:19:o;18801:415::-;19126:25;;-1:-1:-1;;;;;19161:46:19;18801:415;;;33653:4771;;;;;;;;;-1:-1:-1;;;;;5292:22:19;;;:::i;:::-;2568:41509:2;;;;;;;;5385:83:19;2568:41509:2;;6354:6:34;;6350:150;;6930:5;2568:41509:2;;;;-1:-1:-1;34308:137:19;;34488:33;;;;;34533:18;2568:41509:2;34484:326:19;34931:28;;;2568:41509:2;9300:66:19;2568:41509:2;-1:-1:-1;;;;;2568:41509:2;;;;;;;9300:66:19;:::i;:::-;35029:100;6930:5:34;5292:22:19;11908:66;-1:-1:-1;;;;;5292:22:19;;;:::i;:::-;2568:41509:2;;;;;;;11813:69:19;;;;:::i;:::-;11908:66;;:::i;:::-;2568:41509:2;;6930:5:34;2568:41509:2;35137:93:19;;2568:41509:2;;35268:54:19;;;;35264:2286;35268:54;;;35334:26;;;;35264:2286;;37562:15;;37558:62;;35264:2286;2568:41509:2;;;38235:26:19;2568:41509:2;;34931:28:19;2568:41509:2;;;;;;;;;;;;;37941:22:19;-1:-1:-1;;;;;37941:22:19;;;:::i;:::-;2568:41509:2;;;;;;;;-1:-1:-1;;;;;38010:85:19;2568:41509:2;;;;;;38010:85:19;:::i;:::-;2568:41509:2;;;;;;;;38166:28:19;2568:41509:2;;;;;;38235:26:19;:::i;:::-;38288:21;;;;:::i;:::-;2568:41509:2;;38317:96:19;;;;;;2568:41509:2;;33653:4771:19;:::o;37558:62::-;37589:22;-1:-1:-1;34931:28:19;37558:62;;35264:2286;6930:5:34;2568:41509:2;;16707:31:19;2568:41509:2;;;;16468:226:19;2568:41509:2;;-1:-1:-1;;;;;2568:41509:2;;;;;;;16514:24:19;;;:::i;:::-;16546:28;;;;:::i;:::-;2562:32;;;;:::i;:::-;;;:::i;:::-;16468:226;;:::i;:::-;16707:31;:::i;:::-;2568:41509:2;-1:-1:-1;;;;;2568:41509:2;;;;;9300:66:19;2568:41509:2;;;;;;;9300:66:19;:::i;:::-;35777:95;;11908:66;-1:-1:-1;;;;;5292:22:19;;;:::i;:::-;2568:41509:2;;;;;;;11813:69:19;;;;:::i;11908:66::-;2568:41509:2;;6930:5:34;2568:41509:2;35882:85:19;;2568:41509:2;;35982:53:19;;;;;:83;;;;35264:2286;35978:1035;;;;35264:2286;2568:41509:2;;;;;;;;37026:53:19;;;;:83;;;;35264:2286;37022:165;;;35264:2286;37201:53;;;37197:345;;35264:2286;;;;37197:345;2568:41509:2;;37281:68:19;2568:41509:2;;;;;37281:68:19;:::i;:::-;2568:41509:2;8536:77:19;-1:-1:-1;;;;;2568:41509:2;;;;;;;;8536:77:19;:::i;:::-;2568:41509:2;;;37197:345:19;;;;37022:165;37123:53;-1:-1:-1;37123:53:19;37022:165;;37026:83;37083:26;;;;37026:83;;;35978:1035;36083:19;;;;;;36206:61;36083:19;;;;;;;;36079:43;;2568:41509:2;36206:61:19;:::i;:::-;36283:16;;;2568:41509:2;;;;;;36382:22:19;;2568:41509:2;36279:724:19;;35978:1035;;;;;;;;36279:724;36477:55;;;;;;;:24;;;;;;2568:41509:2;;36477:55:19;;36465:67;;36550:26;36546:89;;36477:55;2568:41509:2;;;-1:-1:-1;;;;;2568:41509:2;;;;;9300:66:19;;;;:::i;:::-;36796:95;5292:22;;;;:::i;:::-;-1:-1:-1;;;;;2568:41509:2;;;;;;;11813:69:19;;;;:::i;:::-;11908:66;;;;;:::i;:::-;2568:41509:2;6930:5:34;2568:41509:2;6930:5:34;2568:41509:2;36279:724:19;;;36546:89;36594:26;;;36546:89;;;36477:55;;2568:41509:2;36477:55:19;;;35982:83;36039:26;;;;35982:83;;;;;34484:326;6908:85;34603:98;-1:-1:-1;;;;;2568:41509:2;;;;;;;6908:85:19;:::i;:::-;34576:125;34715:28;;34484:326;34711:91;;34757:34;;;;;;;;;;;2568:41509:2;34757:34:19;2568:41509:2;34757:34:19;2568:41509:2;34757:34:19;2568:41509:2;34757:34:19;2568:41509:2;34757:34:19;:::o;22554:2873::-;;;;;;;;;2568:41509:2;;23123:28:19;;;;2568:41509:2;-1:-1:-1;;;;;2568:41509:2;;;23084:67:19;;;;23080:405;23084:67;;;2568:41509:2;8536:77:19;2568:41509:2;;;;;8536:77:19;:::i;:::-;2568:41509:2;;;23080:405:19;;23497:32;;;23493:717;;23080:405;24222:20;;;24218:111;;24372:96;2862:1;24372:96;11908:66;11813:69;24372:96;-1:-1:-1;;;;;25337:26:19;24372:96;;23123:28;24372:96;;25390:26;24372:96;;5292:22;;;:::i;:::-;2568:41509:2;;;;;;;;5292:22:19;5385:83;5292:22;:::i;:::-;586:17;2568:41509:2;;;;;5385:83:19;11813:69;:::i;:::-;11908:66;;;:::i;:::-;2568:41509:2;;2862:1:19;2568:41509:2;;;;;;;;;;;;;;;;;;25033:27:19;-1:-1:-1;;;;;25033:27:19;;;:::i;:::-;2568:41509:2;;;;;;;;-1:-1:-1;;;;;25107:85:19;2568:41509:2;;;;;;25107:85:19;:::i;:::-;2568:41509:2;;;;;;;;;25264:28:19;2568:41509:2;;;;;;25337:26:19;:::i;:::-;25390;;:::i;:::-;2568:41509:2;;22554:2873:19;:::o;24218:111::-;24288:32;-1:-1:-1;23070:1:19;;-1:-1:-1;23070:1:19;;;;-1:-1:-1;23070:1:19;;-1:-1:-1;24288:32:19;-1:-1:-1;;;;;24288:32:19:o;23493:717::-;23545:33;;;;23541:70;;6908:85;23666:98;-1:-1:-1;;;;;2568:41509:2;;;;;;;6908:85:19;:::i;:::-;23778:37;;;;23774:74;;23863:37;;;23859:343;23493:717;23859:343;23914:37;;;9300:66;23914:37;;-1:-1:-1;;;;;2568:41509:2;;;;;;;9300:66:19;:::i;:::-;24122:69;:33;;;;;;:69;;23859:343;;23493:717;;24122:69;;;;;23774:74;-1:-1:-1;23817:31:19;-1:-1:-1;23070:1:19;;-1:-1:-1;23070:1:19;;;;-1:-1:-1;23070:1:19;;-1:-1:-1;23817:31:19;-1:-1:-1;;;;;23817:31:19:o;23080:405::-;23405:15;;23070:1;23430:46;23080:405;;;3117:511:13;;;3327:23;;:46;;;;3117:511;3323:60;;3553:64;2568:41509:2;;3535:3:13;2568:41509:2;;;;;;3553:64:13;;:::i;3323:60::-;3375:8;;;;2568:41509:2;3375:8:13;:::o;3327:46::-;3354:19;;;3327:46;;25373:374:2;25474:15;25470:19;;25466:47;;-1:-1:-1;;25525:19:2;;25521:47;;2568:41509;;25373:374;:::o;25521:47::-;25546:22;-1:-1:-1;;25546:22:2;:::o;25466:47::-;25491:22;25474:15;25491:22;:::o;34377:314:35:-;34570:16;34554:33;;34550:105;;34377:314;:::o;34550:105::-;34610:34;;;;2568:41509:2;;34610:34:35;;13338:1837:19;;;;;;;13737:58;13674:29;13620:24;;;;:::i;:::-;13674:29;;:::i;:::-;13754:26;-1:-1:-1;;;;;13754:26:19;;;;:::i;:::-;2568:41509:2;13737:58:19;;:::i;:::-;13802:20;13821:1;13832:17;;;;;:42;;;13338:1837;13832:63;;;13338:1837;13828:843;;13338:1837;14772:13;;;;;;:32;;;;13338:1837;14768:50;;;13338:1837;14829:24;;;14825:54;;13338:1837;14898:21;;;;;;:::i;:::-;:38;14897:81;;;;;;14885:93;;15083:23;;15079:91;;13338:1837;;:::o;15079:91::-;15120:50;15134:35;;;:27;;:35;:27;;;2568:41509:2;15164:1:19;15134:35;2568:41509:2;15120:50:19;;:::i;15134:35::-;2568:41509:2;13821:1:19;15134:35;;14897:81;14957:21;;;;:::i;:::-;14897:81;;;14825:54;14855:24;;14825:54;;;14768:50;14817:1;;-1:-1:-1;14768:50:19;;14772:32;14789:15;;;;14772:32;;;13828:843;13921:66;376:19;;13969:2;376:19;13921:66;;:::i;:::-;14000:9;13996:669;;13828:843;;;;13996:669;376:19;14037:48;376:19;;;;;14064:3;376:19;14037:48;:::i;:::-;14359:35;2568:41509:2;;;;;;;;;;14325:70:19;;;;:::i;:::-;2568:41509:2;;;;;;;14359:1:19;2568:41509:2;-1:-1:-1;;;2568:41509:2;;-1:-1:-1;;;2568:41509:2;;;14554:22:19;;;:::i;:::-;2568:41509:2;;;;;;;13969:2:19;376:19;-1:-1:-1;;;2568:41509:2;;-1:-1:-1;;;2568:41509:2;;;14599:47:19;2568:41509:2;;;14599:47:19;:::i;:::-;13996:669;;;;;;13832:63;13878:17;;;;13832:63;;:42;13853:21;;;;13832:42;;10788:218:35;-1:-1:-1;;;;;10868:25:35;;10864:105;;-1:-1:-1;;;;;2568:41509:2;10788:218:35;:::o;10864:105::-;10916:42;;;10947:3;10916:42;2568:41509:2;;;;10916:42:35;;1355:318:19;-1:-1:-1;;;;;1449:25:19;;1445:112;;-1:-1:-1;;;;;2568:41509:2;1355:318:19;:::o;1445:112::-;1491:59;;;;2568:41509:2;;1491:59:19;;20859:5181:34;21025:1;21020:6;;;21016:53;;21996:14;21025:1;-1:-1:-1;;;22057:16:34;;;22053:92;;20859:5181;22677:6;22162:15;-1:-1:-1;;;26016:6:34;22162:15;;;22158:90;;20859:5181;22272:7;22265:15;;;22261:90;;20859:5181;22375:7;22368:15;;;22364:89;;20859:5181;22477:6;22470:14;;;22466:87;;20859:5181;22577:6;22570:14;;;22566:87;;20859:5181;22670:14;;22666:61;;20859:5181;23153:1;2568:41509:2;21025:1:34;2568:41509:2;25063:6:34;;;;:::i;:::-;2568:41509:2;21025:1:34;2568:41509:2;25172:6:34;;;;:::i;:::-;2568:41509:2;21025:1:34;2568:41509:2;25283:6:34;;;;:::i;:::-;2568:41509:2;21025:1:34;2568:41509:2;25392:6:34;;;;:::i;:::-;2568:41509:2;21025:1:34;2568:41509:2;25502:6:34;;;;:::i;:::-;2568:41509:2;21025:1:34;2568:41509:2;25612:6:34;;;;:::i;:::-;2568:41509:2;21025:1:34;2568:41509:2;26016:6:34;;;:::i;:::-;26011:11;;2568:41509:2;;20859:5181:34;:::o;22666:61::-;21025:1;376:19:19;22666:61:34;;22566:87;2568:41509:2;;376:19:19;22637:1:34;376:19:19;22566:87:34;;;22466;22511:1;2568:41509:2;376:19:19;;;22466:87:34;;;22364:89;22410:2;2568:41509:2;376:19:19;22437:1:34;376:19:19;22364:89:34;;;22261:90;22307:2;2568:41509:2;376:19:19;22334:2:34;376:19:19;22261:90:34;;;22158;22204:2;2568:41509:2;376:19:19;22231:2:34;376:19:19;22158:90:34;;;22053:92;-1:-1:-1;;22100:3:34;2568:41509:2;;;-1:-1:-1;;;22053:92:34;","linkReferences":{"contracts/libraries/LiquidityLib.sol":{"LiquidityLib":[{"start":7833,"length":20},{"start":8561,"length":20}]}},"immutableReferences":{"19":[{"start":3054,"length":32},{"start":16136,"length":32}],"21":[{"start":3102,"length":32},{"start":16215,"length":32}],"23":[{"start":3150,"length":32},{"start":16179,"length":32}],"25":[{"start":3198,"length":32},{"start":16312,"length":32}],"27":[{"start":3246,"length":32},{"start":16276,"length":32}],"29":[{"start":3294,"length":32},{"start":16391,"length":32}],"31":[{"start":3342,"length":32},{"start":16355,"length":32}],"34":[{"start":3382,"length":32},{"start":7650,"length":32}],"37":[{"start":3421,"length":32},{"start":7944,"length":32}],"40":[{"start":3460,"length":32},{"start":8407,"length":32}],"43":[{"start":3499,"length":32},{"start":8680,"length":32}],"46":[{"start":3538,"length":32},{"start":9941,"length":32}],"49":[{"start":3577,"length":32},{"start":13492,"length":32}],"601":[{"start":2600,"length":32},{"start":3631,"length":32},{"start":8977,"length":32}],"603":[{"start":2072,"length":32},{"start":2644,"length":32},{"start":6268,"length":32},{"start":14376,"length":32}],"605":[{"start":1786,"length":32},{"start":2691,"length":32},{"start":6356,"length":32},{"start":14218,"length":32}],"608":[{"start":2730,"length":32},{"start":6305,"length":32},{"start":6582,"length":32},{"start":10041,"length":32},{"start":11159,"length":32},{"start":13099,"length":32}],"611":[{"start":2768,"length":32},{"start":6391,"length":32},{"start":6704,"length":32},{"start":11199,"length":32},{"start":13009,"length":32},{"start":13056,"length":32}],"613":[{"start":2806,"length":32}],"615":[{"start":2844,"length":32}],"617":[{"start":2882,"length":32}],"620":[{"start":2928,"length":32},{"start":13701,"length":32}],"622":[{"start":2968,"length":32},{"start":4359,"length":32},{"start":10651,"length":32}],"624":[{"start":3007,"length":32},{"start":4687,"length":32},{"start":11579,"length":32}]}}}}}}},"signatures":{"function":[{"signature":"addLiquidity(address,uint80,(int256[],uint256[]),bytes,bytes)","signatureHash4":"0x97962ef9","signatureHash32":"0x97962ef900a571f747b571da0dee663ffdd9990b9612eca6f53a957734a14985"},{"signature":"collectFees(uint256,uint256,uint256,uint256,address,address)","signatureHash4":"0x0f743953","signatureHash32":"0x0f743953d99bbb55b737013c82442068ca220e31600a1a977f89b9d72ba8005d"},{"signature":"extsload(bytes32)","signatureHash4":"0x1e2eaeaf","signatureHash32":"0x1e2eaeaf359bcf8483b3f56d0cb21c62497a55c6235418a97a6974726b7c6a6e"},{"signature":"extsload(bytes32[])","signatureHash4":"0xdbd035ff","signatureHash32":"0xdbd035ff3c9455299a51fe368c1054593e2bf679beb1fad19c780674b5fc2333"},{"signature":"extsload(bytes32,uint256)","signatureHash4":"0x35fd631a","signatureHash32":"0x35fd631a0e4a7cadf198f46796c5d823ad2071c8ec4c404d604511183fe8e794"},{"signature":"getImmutables()","signatureHash4":"0xbcdb4dad","signatureHash32":"0xbcdb4dad94857340ffb1675400b2877c6ebca29652652a3b151bd4f2076f6719"},{"signature":"getSellAndBuyPrices()","signatureHash4":"0xec069057","signatureHash32":"0xec0690573d8898180e122956c85b71647603135b416639206479c50323f72fdb"},{"signature":"inSwap()","signatureHash4":"0xd8306786","signatureHash32":"0xd8306786b9626956b39e35bb9b02071f604b87fae0836e5b96f5e392ee76e31e"},{"signature":"removeLiquidity(address,uint80,(int256[],uint256[]),bytes)","signatureHash4":"0xfbde1732","signatureHash32":"0xfbde1732f09e37b0606de4adc888e9389a9b0e2a47c544c3ca4b02798781b6e2"},{"signature":"setBidAskRefAsymmetryX8(uint16)","signatureHash4":"0x1f21638c","signatureHash32":"0x1f21638cfd21868e192a6e21df892047e0d55781ddd9e7bcb06f9818bfa70f61"},{"signature":"setBinAdditionalFees(int16,uint16,uint16)","signatureHash4":"0x943f3b1a","signatureHash32":"0x943f3b1ad8ac997370d279c8f8a4f08408530433aabe868a6acc5acf25f9dc15"},{"signature":"setPause(uint8)","signatureHash4":"0x3ff20c8a","signatureHash32":"0x3ff20c8ab862011c847aad51116360dc728081a5fe754b9782eed7c750093268"},{"signature":"setPoolFees(uint24,uint24)","signatureHash4":"0x5dd9a4c5","signatureHash32":"0x5dd9a4c59aeb4f5e71f560ad06d92d67cdfa55a70f674aba49720f854897127a"},{"signature":"setPriceProvider(address)","signatureHash4":"0x372aa224","signatureHash32":"0x372aa224c22e96b68b6d41317e0221634ac03042156a8dc91b56265fe7f663d9"},{"signature":"simulateSwapAndRevert(address,address,bool,int128,uint128,uint128,uint128,uint128,bytes)","signatureHash4":"0x658b6cb7","signatureHash32":"0x658b6cb7ac03f9d08a78618f0da1aa99e2f03e9482297aac416e5ac6d841542f"},{"signature":"swap(address,bool,int128,uint128,bytes,bytes)","signatureHash4":"0xe24f0884","signatureHash32":"0xe24f0884c6d3ea4f6bb59c38b92a3645320b4b3f5f9bfba38e7e47d7da449df6"}],"event":[{"signature":"BidAskRefAsymmetryUpdated(uint16)","signatureHash4":"0x0262bdf5","signatureHash32":"0x0262bdf5ceb29428fdaec304f1872012436cebf3ff5621c19bc17b61892940ea"},{"signature":"BinAdditionalFeesUpdated(int16,uint16,uint16)","signatureHash4":"0x2a1317b5","signatureHash32":"0x2a1317b5b5812150d82fa4b2e5ae289f62be0c42a042edbdc69b978673746a47"},{"signature":"BinSwapped(int256,uint256,uint256)","signatureHash4":"0xcad09799","signatureHash32":"0xcad09799f755048f0fd388c6b2fcc8e0cebefd15756c6903522cc2a95f661f70"},{"signature":"FeeTransferFailed(address,address,uint256)","signatureHash4":"0x9a380920","signatureHash32":"0x9a380920405cd56ab6f7f5f2375bfc42aa8ef39f7e3f43d8f8f02bb4c9253192"},{"signature":"LiquidityAdded(address,uint80,int256[],(int256,int256)[],uint256[])","signatureHash4":"0xa5577243","signatureHash32":"0xa55772434bee2a347743b1e8086fa44bac69a060e124ec92ab6b9cc7fc5268af"},{"signature":"LiquidityRemoved(address,uint80,int256[],(int256,int256)[],uint256[])","signatureHash4":"0xf53d04bd","signatureHash32":"0xf53d04bdbda6d88dd536895ec533833d3e09d0cbe2474fae32a368c5f83fc610"},{"signature":"NotionalFeeUpdated(uint24)","signatureHash4":"0x4d14e59c","signatureHash32":"0x4d14e59cea6a74cef5169f00d96334b2c0214358308e92227d7c47e943664b9c"},{"signature":"PauseLevelUpdated(uint8,uint8)","signatureHash4":"0xd708418b","signatureHash32":"0xd708418b295fcf080d236d5143d7d3a9e9694be43c2dedb73a16196b08daac56"},{"signature":"PriceProviderUpdated(address)","signatureHash4":"0xb266add5","signatureHash32":"0xb266add5f3044b17d27db796af992cecbe413921b4e8aaaee03c719e16b9806a"},{"signature":"ProtocolFeesCollected(uint256,uint256,uint256,uint256)","signatureHash4":"0x0f4f965b","signatureHash32":"0x0f4f965b9381ad88a8ce70d51b86e6162cbebbdfa906901cb34fe0858b30b596"},{"signature":"SpreadFeeUpdated(uint24)","signatureHash4":"0x0e7d070a","signatureHash32":"0x0e7d070a63c6cf2ec01badac5543ae7bcd84ceebe76073c704e7f3e356f4f194"},{"signature":"Swap(address,address,uint256,uint256,uint256)","signatureHash4":"0x97348197","signatureHash32":"0x9734819749a91fc3be03ea83205f924ee08479bd3f0da48efc91d94d050cac1e"}],"error":[{"signature":"AmountScaledExceedsMax()","signatureHash4":"0xd29a971a","signatureHash32":"0xd29a971ac055149262701fbbd512ced7209f910b74dfd8d938d1ffb047806abd"},{"signature":"BidAskRefAsymmetryOutOfBounds()","signatureHash4":"0x7f043c76","signatureHash32":"0x7f043c7689570c150ee747ac06cc47c0f38603fe6713fd4153b6bfdb68879f3e"},{"signature":"BidGreaterThanAsk()","signatureHash4":"0xd6e666c0","signatureHash32":"0xd6e666c082bb3a9a19422f990fdcf124b5c28454a2654578cd06bffc3ede1c44"},{"signature":"BidIsZero()","signatureHash4":"0x6b95e45f","signatureHash32":"0x6b95e45fdf2cda2b6bd79470e46c4dbc6f9cd05dfdad1e34924d5a61fece836b"},{"signature":"ExtensionCallFailed()","signatureHash4":"0x3c82bb14","signatureHash32":"0x3c82bb142e8792e7c560c741b86b5207cdcb502364a5757d764b07a422146395"},{"signature":"FinalAmountIsZero()","signatureHash4":"0x2e5a4599","signatureHash32":"0x2e5a459980dd835eb1c2175670e7aa2fd6f3aaa2d1a486dc53df3aa3741ac58c"},{"signature":"IncorrectDelta()","signatureHash4":"0xbe795921","signatureHash32":"0xbe79592187832fed666c420c73bbefdfd4e5b98116224ef888383d6afb0051be"},{"signature":"InsufficientLiquidity(uint256,uint256)","signatureHash4":"0xa17e11d5","signatureHash32":"0xa17e11d5aed9d2c4240142d28db52e7da7283f43ac33766dd68e8f3dc6613c0d"},{"signature":"InsufficientTokenBalance()","signatureHash4":"0xe4455cae","signatureHash32":"0xe4455caee31c3f7a85e1e6832355c66a80e77364685fffb7c6a9a99c9d737b99"},{"signature":"InvalidAmount()","signatureHash4":"0x2c5211c6","signatureHash32":"0x2c5211c6cb73b16841677a034781e8336d18ce66df858e54153c86854e11f7b8"},{"signature":"InvalidBinIndex(int256)","signatureHash4":"0x64b6051e","signatureHash32":"0x64b6051ed47a2cc7fd3a85b0599ad3222afa0297512474a233ae9399cf7e5bb5"},{"signature":"InvalidExtensionResponse()","signatureHash4":"0xa59c2303","signatureHash32":"0xa59c230313b18c590409736c03c921a74aae7ce4b4700e62e8134687eb07512e"},{"signature":"InvalidPauseLevel()","signatureHash4":"0x39da1b10","signatureHash32":"0x39da1b102c41a28ca6ce84381baeb8e75ad97d3921955d75fd501e25a5343bd7"},{"signature":"LeftoversSmallerThanMinimalOperationalLiquidity(int256,uint256,uint256)","signatureHash4":"0x411a4c8f","signatureHash32":"0x411a4c8f781d64f8b0aca3230f79e4f08c46801355d7e8d61458e2592e9e7a45"},{"signature":"LiquidityDeltaLengthMismatch()","signatureHash4":"0x8bea10c5","signatureHash32":"0x8bea10c58b21189c8c571d6e85e8f5d635bfc7574f06756112edfdb23744b976"},{"signature":"NotAllowedToDeposit()","signatureHash4":"0xe45c5709","signatureHash32":"0xe45c57095f663fb0a6f0aa2ae93400e5c9ea3ff2c3bfcb18d39aacce5c179b32"},{"signature":"NotAllowedToSwap()","signatureHash4":"0x68ee158d","signatureHash32":"0x68ee158d89bb67926db4a067b2491fa26ab73027dfd60384cbff31f68ea84a0b"},{"signature":"NotPositionOwner()","signatureHash4":"0x70d645e3","signatureHash32":"0x70d645e3cffa9bcb1758ab8fc1c18dcbb98086f94ed57c54a3f87fe1e767157c"},{"signature":"OnlyFactory()","signatureHash4":"0x0c6d42ae","signatureHash32":"0x0c6d42aee1b4832deb27409f37a942e97dfedc101aa8a02a9e70506e047120da"},{"signature":"OverflowedOnFittingBinBalances(uint256)","signatureHash4":"0x6ce2737a","signatureHash32":"0x6ce2737a400398a69ee0331108aceb964bcedecd4a8b050127a3cf66e9f93159"},{"signature":"PanicEmptyExtension()","signatureHash4":"0xdf42d72e","signatureHash32":"0xdf42d72e2b310710efd53bc126203a84645b4c90f5668774b8b29ab00fead767"},{"signature":"PanicInvalidExtensionIndex()","signatureHash4":"0xa5724489","signatureHash32":"0xa5724489e766546480b9709be938c5e25338328c460928e0d830e0de1d3f8e62"},{"signature":"PoolPaused()","signatureHash4":"0x51bd770c","signatureHash32":"0x51bd770c2b635efdffcc64ac0fd7ab9e459e21f6823fb6140afea01a88345447"},{"signature":"PriceProviderFailed(bytes)","signatureHash4":"0x46a14930","signatureHash32":"0x46a14930a0144fae277c82dac07f2378ec766a85a7e23515fcb736fa3d214973"},{"signature":"ReentrancyGuardReentrantCall()","signatureHash4":"0x3ee5aeb5","signatureHash32":"0x3ee5aeb571de7fc460830b4d0017439a1ca56fb0bc39062227ade4fe4a24c1ca"},{"signature":"ReferencePriceOutOfRange()","signatureHash4":"0xdc5eefea","signatureHash32":"0xdc5eefea513622d09876258584f818992a6a225ae40b54347d4b9a6a4491a2bc"},{"signature":"SafeCastOverflowedIntDowncast(uint8,int256)","signatureHash4":"0x327269a7","signatureHash32":"0x327269a7f29c3c5436f42eeed1c1adf0d4d525f36360483f4e83ab79e98f9089"},{"signature":"SafeCastOverflowedUintDowncast(uint8,uint256)","signatureHash4":"0x6dfcc650","signatureHash32":"0x6dfcc6503a32754ce7a89698e18201fc5294fd4aad43edefee786f88423b1a12"},{"signature":"SafeCastOverflowedUintToInt(uint256)","signatureHash4":"0x24775e06","signatureHash32":"0x24775e0629ae69d78c11bae050651b81820407f300ff750ff2be51e4ce75c37f"},{"signature":"SafeERC20FailedOperation(address)","signatureHash4":"0x5274afe7","signatureHash32":"0x5274afe73c98b4749fc91ffae6b7b574e7842cb2144a159e9377a5f20b32edf9"},{"signature":"SharesAmountTooLarge()","signatureHash4":"0x28056180","signatureHash32":"0x2805618016d4e5328d541bfa3087a24e7b2193a821482b00556d06377a22ee29"},{"signature":"SharesDeltaSmallerThanMinimalOperationalLiquidity(int256,uint256,uint256)","signatureHash4":"0x3778fe9c","signatureHash32":"0x3778fe9c215a07eae30e6ec5adc0d7169e61725a7b73b54bac5a85c1c9920e16"},{"signature":"SimulateSwap(int256,int256)","signatureHash4":"0x1f6053de","signatureHash32":"0x1f6053dea8b0018857be93e9dd134fbb697ed5be9761f4a1845b536c86cac7b4"}]},"proxyResolution":{"isProxy":false,"proxyType":null,"implementations":[]},"match":"match","chainId":"1","address":"0x5b9D015787d1e1b91F1EDAacC214Aa75090A5493"}