@squadx_dev/brix-client-library 1.0.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk/{DiSJkrZf.es.js → CGLF2cgi.es.js} +25252 -27291
- package/dist/chunk/CGLF2cgi.es.js.map +1 -0
- package/dist/chunk/CPmhQymA.cjs.js +86 -0
- package/dist/chunk/CPmhQymA.cjs.js.map +1 -0
- package/dist/chunk/CcFwM_wb.cjs.js +4 -0
- package/dist/chunk/CcFwM_wb.cjs.js.map +1 -0
- package/dist/chunk/{B-tN7nvh.es.js → CcS3vBvQ.es.js} +18 -16
- package/dist/chunk/CcS3vBvQ.es.js.map +1 -0
- package/dist/component/PlayerUser/PlayerUser.d.ts +24 -0
- package/dist/component/index.cjs.js +2 -2
- package/dist/component/index.d.ts +1 -1
- package/dist/component/index.es.js +2 -2
- package/dist/lib/api.d.ts +38 -0
- package/dist/umd/index.d.ts +1 -0
- package/dist/umd/index.umd.js +311 -0
- package/package.json +31 -38
- package/dist/chunk/B-tN7nvh.es.js.map +0 -1
- package/dist/chunk/BVABk0Tw.cjs.js +0 -4
- package/dist/chunk/BVABk0Tw.cjs.js.map +0 -1
- package/dist/chunk/Ch7W_T2h.cjs.js +0 -145
- package/dist/chunk/Ch7W_T2h.cjs.js.map +0 -1
- package/dist/chunk/DiSJkrZf.es.js.map +0 -1
- package/dist/client-library/src/component/PlayerUser/PlayerUser.d.ts +0 -12
- package/dist/client-library/src/component/PlayerUser/PlayerUser.stories.d.ts +0 -7
- package/dist/client-library/src/component/index.d.ts +0 -1
- package/dist/client-library/src/lib/api.d.ts +0 -14
- package/dist/component/index.umd.js +0 -148
- package/dist/component/index.umd.js.map +0 -1
- /package/dist/{client-library/src/component → component}/PlayerUser/index.d.ts +0 -0
- /package/dist/{client-library/src/lib → lib}/useFetch.d.ts +0 -0
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(`@charset "UTF-8";._root_1qxmy_1{position:relative;width:100%;height:100%;overflow:hidden}._progress_1qxmy_8{position:absolute;bottom:0;left:0;right:0;transform:translateY(calc(22px - var(--inject-progress-height, 22px) / 2 + var(--inject-progress-height, 22px) - 4px))}._progress_1qxmy_8:hover{animation:_pop_1qxmy_1 .45s ease forwards}@keyframes _pop_1qxmy_1{to{transform:translateY(calc(22px - var(--inject-progress-height, 22px) / 2))}}._play_button_1qxmy_25,._pause_button_1qxmy_26{position:absolute;top:0;right:0;bottom:0;left:0;font-size:70px;display:flex;align-items:center;justify-content:center;background-color:#0003;color:#fff;cursor:pointer}._play_button_1qxmy_25:after{content:"";width:50px;height:56px;object-fit:contain;opacity:.9;background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='55'%20height='61.6'%20viewBox='0%200%2055%2061.6'%3e%3cdefs%3e%3cfilter%20id='l68eu3kg8a'%20x='0'%20y='0'%20width='55'%20height='61.6'%20filterUnits='userSpaceOnUse'%3e%3cfeOffset/%3e%3cfeGaussianBlur%20stdDeviation='1'%20result='blur'/%3e%3cfeFlood%20flood-opacity='.161'/%3e%3cfeComposite%20operator='in'%20in2='blur'/%3e%3cfeComposite%20in='SourceGraphic'/%3e%3c/filter%3e%3c/defs%3e%3cg%20data-name='ic_play%20_50'%20style='opacity:.9'%3e%3cg%20data-name='그룹%2026289'%3e%3cpath%20data-name='사각형%2011990'%20transform='translate(2.516%203)'%20style='fill:transparent'%20d='M0%200h50v56H0z'/%3e%3cg%20style='filter:url(%23l68eu3kg8a)'%3e%3cpath%20data-name='다각형%2038'%20d='M24.721%205.427a3.54%203.54%200%200%201%206.158%200L52.6%2043.713A3.54%203.54%200%200%201%2049.522%2049H6.078A3.54%203.54%200%200%201%203%2043.713z'%20transform='rotate(90%2024.498%2027.498)'%20style='fill:%23fff'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e")}._play_icon_1qxmy_47{width:50px;height:56px;object-fit:contain;opacity:.9}._pause_button_1qxmy_26{opacity:0}._mute_button_1qxmy_58{position:absolute;top:17px;right:17px;height:32px;width:32px;display:flex;font-size:24px;align-items:center;justify-content:center;color:#fff;cursor:pointer}._mute_button_1qxmy_58:after{content:"";width:100%;height:100%}._mute_button_1qxmy_58._sound_off_icon_1qxmy_78:after{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%3e%3cpath%20data-name='사각형%2011991'%20style='fill:none'%20d='M0%200h32v32H0z'/%3e%3cpath%20data-name='패스%2019487'%20d='M14.657%2028.857a12.437%2012.437%200%200%201-5.025-1.024%2013.39%2013.39%200%200%201-6.958-6.958%2012.866%2012.866%200%200%201-.007-10.043%2013.29%2013.29%200%200%201%206.965-6.964%2012.545%2012.545%200%200%201%205.011-1.01%2012.593%2012.593%200%200%201%205.018%201.01%2013.077%2013.077%200%200%201%204.148%202.81%2013.4%2013.4%200%200%201%202.817%204.155%2012.866%2012.866%200%200%201%20.007%2010.043%2013.328%2013.328%200%200%201-6.958%206.958%2012.451%2012.451%200%200%201-5.018%201.023z'%20transform='translate(1.35%20.143)'%20style='fill:rgba(0,0,0,.4)'/%3e%3cg%20data-name='그룹%2026283'%3e%3cpath%20data-name='패스%2019484'%20d='M11.231%2018.554h1.86a.235.235%200%200%201%20.174.067l2.783%202.636a1.609%201.609%200%200%200%20.442.328%201.059%201.059%200%200%200%20.455.1.621.621%200%200%200%20.482-.227l.12-.4-7.32-7.306h-.08a1.044%201.044%200%200%200-.248.368%201.33%201.33%200%200%200-.1.529v2.435a1.487%201.487%200%200%200%20.375%201.1%201.43%201.43%200%200%200%201.057.37zm2.556-5.928%203.948%203.948v-5.728a.8.8%200%200%200-.227-.582.752.752%200%200%200-.562-.234.913.913%200%200%200-.448.107%202.319%202.319%200%200%200-.448.348zm6.713%209.728a.665.665%200%200%200%20.9%200%20.649.649%200%200%200%20.187-.455.6.6%200%200%200-.187-.442L9.944%2010.264a.663.663%200%200%200-.923%200%20.665.665%200%200%200%200%20.9z'%20transform='translate(-1.046%20.143)'%20style='fill:%23fff'/%3e%3cpath%20data-name='패스%2019486'%20d='M17.133%2018.795a.628.628%200%200%200%20.5.107.778.778%200%200%200%20.462-.281%203.878%203.878%200%200%200%20.622-1.244%205.192%205.192%200%200%200%20.221-1.525%204.961%204.961%200%200%200-.227-1.5%204.76%204.76%200%200%200-.616-1.285.778.778%200%200%200-.455-.274.6.6%200%200%200-.508.114.71.71%200%200%200-.314.482.76.76%200%200%200%20.154.575%203%203%200%200%201%20.549%201.887%203.223%203.223%200%200%201-.549%201.887.692.692%200%200%200%20.161%201.057zm2.367%201.726a.683.683%200%200%200%20.529.1.7.7%200%200%200%20.435-.288%207.565%207.565%200%200%200%201.017-2.087%208.126%208.126%200%200%200%20.007-4.77%207.434%207.434%200%200%200-1.024-2.094.708.708%200%200%200-.448-.328.6.6%200%200%200-.515.127.65.65%200%200%200-.294.462.719.719%200%200%200%20.147.542%206.259%206.259%200%200%201%201.071%203.666%206.968%206.968%200%200%201-.281%201.974%205.306%205.306%200%200%201-.8%201.666.772.772%200%200%200-.147.562.645.645%200%200%200%20.303.468z'%20transform='translate(1.745%20.162)'%20style='fill:%23fff'/%3e%3c/g%3e%3c/svg%3e")}._mute_button_1qxmy_58._sound_on_icon_1qxmy_82:after{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%3e%3cpath%20data-name='사각형%201011'%20transform='translate(-.001)'%20style='fill:none'%20d='M0%200h32v32H0z'/%3e%3cpath%20data-name='패스%2019481'%20d='M14.657%2028.857a12.437%2012.437%200%200%201-5.025-1.024%2013.39%2013.39%200%200%201-6.958-6.958%2012.866%2012.866%200%200%201-.007-10.043%2013.29%2013.29%200%200%201%206.965-6.964%2012.545%2012.545%200%200%201%205.011-1.01%2012.593%2012.593%200%200%201%205.018%201.01%2013.077%2013.077%200%200%201%204.148%202.81%2013.4%2013.4%200%200%201%202.817%204.155%2012.866%2012.866%200%200%201%20.007%2010.043%2013.328%2013.328%200%200%201-6.958%206.958%2012.451%2012.451%200%200%201-5.018%201.023z'%20transform='translate(1.349%20.143)'%20style='fill:rgba(0,0,0,.4)'/%3e%3cpath%20data-name='패스%2019483'%20d='M14.162%2021.685a.742.742%200%200%200%20.555-.227.776.776%200%200%200%20.221-.562v-10.05a.8.8%200%200%200-.227-.582.768.768%200%200%200-.575-.234.858.858%200%200%200-.422.107%202.319%202.319%200%200%200-.448.348l-2.8%202.623a.212.212%200%200%201-.174.054H8.448a1.429%201.429%200%200%200-1.057.375%201.507%201.507%200%200%200-.375%201.111v2.435a1.487%201.487%200%200%200%20.375%201.1%201.43%201.43%200%200%200%201.057.375h1.847a.21.21%200%200%201%20.174.067l2.8%202.636a1.609%201.609%200%200%200%20.442.328%201.059%201.059%200%200%200%20.451.096zm2.971-2.89a.628.628%200%200%200%20.5.107.778.778%200%200%200%20.462-.281%203.878%203.878%200%200%200%20.622-1.244%205.192%205.192%200%200%200%20.221-1.525%204.961%204.961%200%200%200-.227-1.5%204.76%204.76%200%200%200-.616-1.285.778.778%200%200%200-.455-.274.6.6%200%200%200-.508.114.71.71%200%200%200-.314.482.76.76%200%200%200%20.154.575%203%203%200%200%201%20.549%201.887%203.223%203.223%200%200%201-.549%201.887.692.692%200%200%200%20.161%201.057zm2.367%201.726a.683.683%200%200%200%20.529.1.7.7%200%200%200%20.435-.288%207.565%207.565%200%200%200%201.017-2.087%208.126%208.126%200%200%200%20.007-4.77%207.434%207.434%200%200%200-1.024-2.094.708.708%200%200%200-.448-.328.6.6%200%200%200-.515.127.65.65%200%200%200-.294.462.719.719%200%200%200%20.147.542%206.259%206.259%200%200%201%201.071%203.666%206.968%206.968%200%200%201-.281%201.974%205.306%205.306%200%200%201-.8%201.666.772.772%200%200%200-.147.562.645.645%200%200%200%20.303.468z'%20transform='translate(1.783%20.143)'%20style='fill:%23fff'/%3e%3c/svg%3e")}._error_1qxmy_86{position:absolute;top:0;right:0;bottom:0;left:0;background-color:#222;color:#fff;line-height:30px;font-size:14px;font-weight:400;display:flex;align-items:center;justify-content:center;text-align:center;white-space:pre}._root_1iegb_2{background-image:var(--icon-url, url("data:image/svg+xml,%3csvg%20width='500'%20height='500'%20viewBox='0%200%20500%20500'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M254%2011L236%2029'%20stroke='white'%20stroke-width='1.5'%20stroke-miterlimit='10'/%3e%3cpath%20d='M236%2011L254%2029'%20stroke='white'%20stroke-width='1.5'%20stroke-miterlimit='10'/%3e%3cpath%20d='M202.154%2026.9231C202.154%2027.4739%20201.935%2028.0022%20201.546%2028.3917C201.156%2028.7812%20200.628%2029%20200.077%2029C199.526%2029%20198.998%2028.7812%20198.608%2028.3917C198.219%2028.0022%20198%2027.4739%20198%2026.9231C198%2026.3722%20198.219%2025.844%20198.608%2025.4545C198.998%2025.065%20199.526%2024.8462%20200.077%2024.8462C200.628%2024.8462%20201.156%2025.065%20201.546%2025.4545C201.935%2025.844%20202.154%2026.3722%20202.154%2026.9231ZM202.154%2020C202.154%2020.5508%20201.935%2021.0791%20201.546%2021.4686C201.156%2021.8581%20200.628%2022.0769%20200.077%2022.0769C199.526%2022.0769%20198.998%2021.8581%20198.608%2021.4686C198.219%2021.0791%20198%2020.5508%20198%2020C198%2019.4492%20198.219%2018.9209%20198.608%2018.5314C198.998%2018.1419%20199.526%2017.9231%20200.077%2017.9231C200.628%2017.9231%20201.156%2018.1419%20201.546%2018.5314C201.935%2018.9209%20202.154%2019.4492%20202.154%2020ZM202.154%2013.0769C202.154%2013.6278%20201.935%2014.156%20201.546%2014.5455C201.156%2014.935%20200.628%2015.1538%20200.077%2015.1538C199.526%2015.1538%20198.998%2014.935%20198.608%2014.5455C198.219%2014.156%20198%2013.6278%20198%2013.0769C198%2012.5261%20198.219%2011.9978%20198.608%2011.6083C198.998%2011.2188%20199.526%2011%20200.077%2011C200.628%2011%20201.156%2011.2188%20201.546%2011.6083C201.935%2011.9978%20202.154%2012.5261%20202.154%2013.0769Z'%20fill='white'/%3e%3cpath%20d='M28.8718%2012H10.8205C10.3674%2012%2010%2012.398%2010%2012.8889V27.1111C10%2027.602%2010.3674%2028%2010.8205%2028H28.8718C29.3249%2028%2029.6923%2027.602%2029.6923%2027.1111V12.8889C29.6923%2012.398%2029.3249%2012%2028.8718%2012Z'%20stroke='white'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M21.0771%2028V21.4359C21.0771%2021.2182%2021.1597%2021.0095%2021.3065%2020.8557C21.4534%2020.7018%2021.6526%2020.6154%2021.8604%2020.6154H29.6925'%20stroke='white'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M196%20110L204%20118'%20stroke='black'%20stroke-width='1.5'/%3e%3cpath%20d='M204%20102L196%20110.5'%20stroke='black'%20stroke-width='1.5'/%3e%3cpath%20d='M149%20107L155%20113L161%20107'%20stroke='white'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M29.22%20101L11%20119.22'%20stroke='%23060405'%20stroke-width='1.5'%20stroke-miterlimit='10'/%3e%3cpath%20d='M11%20101L29.22%20119.22'%20stroke='%23060405'%20stroke-width='1.5'%20stroke-miterlimit='10'/%3e%3cg%20clip-path='url(%23clip0_410_133)'%3e%3cpath%20d='M300.153%2065.6432H279.847C279.378%2065.6432%20279%2065.2649%20279%2064.7959V60.3701C279%2059.9011%20279.378%2059.5228%20279.847%2059.5228H300.153C300.622%2059.5228%20301%2059.9011%20301%2060.3701V64.7883C301%2065.2649%20300.622%2065.6432%20300.153%2065.6432Z'%20fill='white'/%3e%3cpath%20d='M298.602%2076.4162H281.406C280.702%2076.4162%20280.127%2075.8488%20280.127%2075.1376V67.7085C280.127%2067.0049%20280.695%2066.4299%20281.406%2066.4299H298.602C299.306%2066.4299%20299.881%2066.9973%20299.881%2067.7085V75.1376C299.873%2075.8412%20299.306%2076.4162%20298.602%2076.4162Z'%20fill='white'/%3e%3cpath%20d='M287.367%2060.1432C287.367%2060.1432%20283.115%2057.7601%20285.211%2055.324C287.307%2052.888%20290.991%2055.1576%20289.743%2060.1432H287.367Z'%20stroke='white'%20stroke-width='2'%20stroke-miterlimit='10'/%3e%3cpath%20d='M292.633%2060.1432C292.633%2060.1432%20296.884%2057.7601%20294.789%2055.324C292.693%2052.888%20289.009%2055.1576%20290.257%2060.1432H292.633Z'%20stroke='white'%20stroke-width='2'%20stroke-miterlimit='10'/%3e%3c/g%3e%3cpath%20d='M202.962%2055.3081H197.04C194.823%2055.3081%20192.699%2056.2303%20191.176%2057.8463C188.139%2061.0868%20188.3%2066.1717%20191.54%2069.2092V73.8457V73.8541C191.54%2074.3195%20191.921%2074.7002%20192.395%2074.6917C192.589%2074.6917%20192.784%2074.6241%20192.936%2074.4971L196.684%2071.3751C196.794%2071.3836%20196.921%2071.3836%20197.04%2071.3836H202.962C205.179%2071.3836%20207.193%2070.4867%20208.648%2069.0315C210.103%2067.5762%20211%2065.5626%20211%2063.3458C211%2058.9039%20207.404%2055.3081%20202.962%2055.3081ZM204.231%2062.2882H195.771C195.424%2062.2882%20195.136%2062.0006%20195.136%2061.6537C195.136%2061.3068%20195.424%2061.0191%20195.771%2061.0191H204.231C204.578%2061.0191%20204.866%2061.3068%20204.866%2061.6537C204.866%2062.0006%20204.587%2062.2882%20204.231%2062.2882ZM204.866%2065.461C204.866%2065.8079%20204.578%2066.0956%20204.231%2066.0956H195.771C195.424%2066.0956%20195.136%2065.8079%20195.136%2065.461C195.136%2065.1141%20195.424%2064.8265%20195.771%2064.8265H204.231C204.587%2064.8265%20204.866%2065.1141%20204.866%2065.461Z'%20fill='white'/%3e%3cpath%20d='M157.962%2055.3081H152.04C149.823%2055.3081%20147.699%2056.2303%20146.176%2057.8463C143.139%2061.0868%20143.3%2066.1717%20146.54%2069.2092V73.8457V73.8541C146.54%2074.3195%20146.921%2074.7002%20147.395%2074.6917C147.589%2074.6917%20147.784%2074.6241%20147.936%2074.4971L151.684%2071.3751C151.794%2071.3836%20151.921%2071.3836%20152.04%2071.3836H157.962C160.179%2071.3836%20162.193%2070.4867%20163.648%2069.0315C165.103%2067.5762%20166%2065.5626%20166%2063.3458C166%2058.9039%20162.404%2055.3081%20157.962%2055.3081ZM159.231%2062.2882H150.771C150.424%2062.2882%20150.136%2062.0006%20150.136%2061.6537C150.136%2061.3068%20150.424%2061.0191%20150.771%2061.0191H159.231C159.578%2061.0191%20159.866%2061.3068%20159.866%2061.6537C159.866%2062.0006%20159.587%2062.2882%20159.231%2062.2882ZM159.866%2065.461C159.866%2065.8079%20159.578%2066.0956%20159.231%2066.0956H150.771C150.424%2066.0956%20150.136%2065.8079%20150.136%2065.461C150.136%2065.1141%20150.424%2064.8265%20150.771%2064.8265H159.231C159.587%2064.8265%20159.866%2065.1141%20159.866%2065.461Z'%20fill='white'/%3e%3cg%20clip-path='url(%23clip1_410_133)'%3e%3cpath%20d='M103.348%2068.488H100.287C99.2988%2068.488%2098.5%2067.6892%2098.5%2066.7005V61.5675C98.5%2060.5788%2099.2988%2059.78%20100.287%2059.78H103.348C103.728%2059.78%20104.036%2060.0884%20104.036%2060.4681V67.7999C104.036%2068.1796%20103.728%2068.488%20103.348%2068.488Z'%20fill='white'/%3e%3cpath%20d='M105.183%2060.128V68.1163C105.183%2068.314%20105.349%2068.4722%20105.547%2068.4643C106.615%2068.401%20109.802%2068.4168%20112.167%2070.4891C114.35%2072.4031%20116.359%2073.3364%20117.205%2073.6765C117.403%2073.7556%20117.624%2073.6053%20117.624%2073.3917V54.7814C117.624%2054.5599%20117.403%2054.4096%20117.197%2054.4966C116.414%2054.8288%20114.603%2055.6909%20112.048%2057.3756C108.774%2059.5427%20107.548%2059.7642%20105.531%2059.78C105.341%2059.78%20105.183%2059.9382%20105.183%2060.128Z'%20fill='white'/%3e%3cpath%20d='M100.074%2070.2913L101.205%2075.2425C101.244%2075.4086%20101.395%2075.5272%20101.569%2075.5272H103.957C104.179%2075.5272%20104.353%2075.3374%20104.329%2075.1159L103.767%2070.1648C103.744%2069.9749%20103.586%2069.8326%20103.396%2069.8326H100.43C100.192%2069.8405%20100.018%2070.0619%20100.074%2070.2913Z'%20fill='white'/%3e%3cpath%20d='M118.779%2061.3539V66.8113C120.282%2066.8113%20121.508%2065.5933%20121.508%2064.0826C121.5%2062.5799%20120.282%2061.3539%20118.779%2061.3539Z'%20fill='white'/%3e%3c/g%3e%3cpath%20d='M54%2060.7516V60.5495C54%2057.4842%2056.4565%2055%2059.4979%2055H59.9157C61.9962%2055%2063.9263%2056.0947%2064.9958%2057.8968C66.0653%2056.1032%2067.9954%2055%2070.076%2055H70.4937C73.5351%2055%2076%2057.4842%2076%2060.5495V60.9705C76%2062.4947%2075.4235%2063.9516%2074.3957%2065.0632L74.3122%2065.1642L65.0376%2075L65.0125%2074.9747L64.9875%2075L55.6962%2065.1558L55.6126%2065.0547C54.5765%2063.9516%2054%2062.4863%2054.0084%2060.9621V60.7516H54Z'%20fill='white'/%3e%3cg%20clip-path='url(%23clip2_410_133)'%3e%3cpath%20d='M30.255%2055H12.8265C11.5486%2055%2010.5059%2056.0427%2010.5059%2057.3207V61.5386H11.6662V57.3207C11.6662%2056.6778%2012.1836%2056.1603%2012.8265%2056.1603H30.255C30.8979%2056.1603%2031.4153%2056.6778%2031.4153%2057.3207V68.5241C31.4153%2069.167%2030.8979%2069.6844%2030.255%2069.6844H25.9116V70.8448H30.255C31.5329%2070.8448%2032.5756%2069.802%2032.5756%2068.5241V57.3207C32.5756%2056.0427%2031.5329%2055%2030.255%2055Z'%20fill='white'/%3e%3cpath%20d='M27.221%2060.4959H24.5005V75H27.221C28.1932%2075%2028.985%2074.2082%2028.985%2073.236V62.2599C28.985%2061.2878%2028.1932%2060.4959%2027.221%2060.4959Z'%20fill='white'/%3e%3cpath%20d='M15.9707%2066.7209C16.347%2066.7209%2016.6606%2066.4152%2016.6606%2066.031C16.6606%2065.6547%2016.3548%2065.3411%2015.9707%2065.3411C15.5944%2065.3411%2015.2808%2065.6468%2015.2808%2066.031C15.2808%2066.4152%2015.5944%2066.7209%2015.9707%2066.7209Z'%20fill='white'/%3e%3cpath%20d='M19.4121%2070.1548C19.7931%2070.1548%2020.102%2069.8459%2020.102%2069.4649C20.102%2069.0839%2019.7931%2068.775%2019.4121%2068.775C19.0311%2068.775%2018.7222%2069.0839%2018.7222%2069.4649C18.7222%2069.8459%2019.0311%2070.1548%2019.4121%2070.1548Z'%20fill='white'/%3e%3cpath%20d='M9.18882%2060.4959C8.21665%2060.4959%207.4248%2061.2878%207.4248%2062.2599V65.1764H8.01281C9.29074%2065.1764%2010.3335%2066.1721%2010.3335%2067.3952C10.3335%2068.6182%209.29074%2069.6139%208.01281%2069.6139H7.4248V73.236C7.4248%2074.2082%208.21665%2075%209.18882%2075H23.4029V60.4959H9.18882ZM15.9705%2064.6511C16.731%2064.6511%2017.3425%2065.2705%2017.3425%2066.0232C17.3425%2066.7836%2016.7231%2067.3952%2015.9705%2067.3952C15.21%2067.3952%2014.5985%2066.7758%2014.5985%2066.0232C14.5985%2065.2705%2015.21%2064.6511%2015.9705%2064.6511ZM15.5314%2070.3979C15.3981%2070.5312%2015.1786%2070.5312%2015.0453%2070.3979C14.9121%2070.2646%2014.9121%2070.0451%2015.0453%2069.9118L19.8591%2065.098C19.9924%2064.9647%2020.2119%2064.9647%2020.3452%2065.098C20.4785%2065.2313%2020.4785%2065.4508%2020.3452%2065.5841L15.5314%2070.3979ZM19.4123%2070.8448C18.6518%2070.8448%2018.0402%2070.2254%2018.0402%2069.4728C18.0402%2068.7123%2018.6596%2068.1008%2019.4123%2068.1008C20.1649%2068.1008%2020.7843%2068.7201%2020.7843%2069.4728C20.7843%2070.2254%2020.1649%2070.8448%2019.4123%2070.8448Z'%20fill='white'/%3e%3c/g%3e%3cg%20clip-path='url(%23clip3_410_133)'%3e%3cpath%20d='M326.4%207.93331L318.6%203.59998V12.2666L326.4%207.93331Z'%20stroke='white'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cg%20clip-path='url(%23clip4_410_133)'%3e%3cpath%20d='M341.767%2012.6667C341.767%2012.6667%20337%209.95154%20337%206.69335C337%203.43516%20340.707%203.16365%20341.767%205.71286C342.826%203.16365%20346.533%203.43516%20346.533%206.69335C346.533%209.95154%20341.767%2012.6667%20341.767%2012.6667Z'%20stroke='white'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cpath%20d='M18.5%20202H61.4289C61.9234%20202%2062.4067%20202.147%2062.8179%20202.421C63.229%20202.696%2063.5494%20203.086%2063.7386%20203.543C63.9279%20204%2063.9774%20204.503%2063.8809%20204.988C63.7844%20205.473%2063.5463%20205.918%2063.1967%20206.268L39.9645%20229.5L16.7322%20206.268C16.3826%20205.918%2016.1445%20205.473%2016.048%20204.988C15.9516%20204.503%2016.0011%20204%2016.1903%20203.543C16.3795%20203.086%2016.7%20202.696%2017.1111%20202.421C17.5222%20202.147%2018.0055%20202%2018.5%20202Z'%20stroke='%23AAAAAA'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M18.5%20257H61.4289C61.9234%20257%2062.4067%20256.853%2062.8179%20256.579C63.229%20256.304%2063.5494%20255.914%2063.7386%20255.457C63.9279%20255%2063.9774%20254.497%2063.8809%20254.012C63.7844%20253.527%2063.5463%20253.082%2063.1967%20252.732L39.9645%20229.5L16.7322%20252.732C16.3826%20253.082%2016.1445%20253.527%2016.048%20254.012C15.9516%20254.497%2016.0011%20255%2016.1903%20255.457C16.3795%20255.914%2016.7%20256.304%2017.1111%20256.579C17.5222%20256.853%2018.0055%20257%2018.5%20257Z'%20stroke='%23AAAAAA'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M54.9639%20244.5H24.9639'%20stroke='%23AAAAAA'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M103.787%20208.787L146.214%20251.213'%20stroke='%23AAAAAA'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M125%20260C141.569%20260%20155%20246.569%20155%20230C155%20213.431%20141.569%20200%20125%20200C108.431%20200%2095%20213.431%2095%20230C95%20246.569%20108.431%20260%20125%20260Z'%20stroke='%23AAAAAA'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cg%20clip-path='url(%23clip5_410_133)'%3e%3cpath%20d='M348.441%2092.8H336.824C336.423%2092.8%20336.098%2093.112%20336.098%2093.497V102.502C336.098%20103.086%20336.802%20103.411%20337.278%20103.046L339.529%20101.317C339.658%20101.218%20339.818%20101.164%20339.983%20101.164H348.441C348.842%20101.164%20349.167%20100.852%20349.167%20100.467V93.497C349.167%2093.112%20348.842%2092.8%20348.441%2092.8Z'%20stroke='%23666666'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M345.537%2096.9821H345.539V96.9841H345.537V96.9821Z'%20stroke='%23666666'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M342.633%2096.9821H342.635V96.9841H342.633V96.9821Z'%20stroke='%23666666'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M339.729%2096.9821H339.731V96.9841H339.729V96.9821Z'%20stroke='%23666666'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cpath%20d='M358.036%2099C357.752%2099%20357.508%2098.9018%20357.305%2098.7056C357.102%2098.5093%20357%2098.2741%20357%2098C357%2097.7259%20357.102%2097.4907%20357.305%2097.2944C357.508%2097.0981%20357.752%2097%20358.036%2097C358.32%2097%20358.564%2097.0981%20358.767%2097.2944C358.971%2097.4907%20359.072%2097.7259%20359.072%2098C359.072%2098.1815%20359.024%2098.3481%20358.928%2098.5C358.836%2098.6518%20358.711%2098.7741%20358.554%2098.8667C358.401%2098.9556%20358.228%2099%20358.036%2099ZM362.5%2099C362.216%2099%20361.972%2098.9018%20361.769%2098.7056C361.566%2098.5093%20361.464%2098.2741%20361.464%2098C361.464%2097.7259%20361.566%2097.4907%20361.769%2097.2944C361.972%2097.0981%20362.216%2097%20362.5%2097C362.784%2097%20363.028%2097.0981%20363.231%2097.2944C363.434%2097.4907%20363.536%2097.7259%20363.536%2098C363.536%2098.1815%20363.488%2098.3481%20363.392%2098.5C363.3%2098.6518%20363.175%2098.7741%20363.018%2098.8667C362.865%2098.9556%20362.692%2099%20362.5%2099ZM366.964%2099C366.68%2099%20366.436%2098.9018%20366.233%2098.7056C366.029%2098.5093%20365.928%2098.2741%20365.928%2098C365.928%2097.7259%20366.029%2097.4907%20366.233%2097.2944C366.436%2097.0981%20366.68%2097%20366.964%2097C367.248%2097%20367.492%2097.0981%20367.695%2097.2944C367.898%2097.4907%20368%2097.7259%20368%2098C368%2098.1815%20367.952%2098.3481%20367.856%2098.5C367.764%2098.6518%20367.639%2098.7741%20367.482%2098.8667C367.328%2098.9556%20367.156%2099%20366.964%2099Z'%20fill='%23666666'/%3e%3cg%20clip-path='url(%23clip6_410_133)'%3e%3cpath%20d='M380.156%2099.8438L377.812%20102.188'%20stroke='%23666666'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M384.045%2091.7378L380.392%2095.3907C380.392%2095.3907%20378.766%2094.5779%20377.029%2095.9796C376.977%2096.0209%20376.935%2096.0726%20376.905%2096.1312C376.875%2096.1898%20376.858%2096.2541%20376.854%2096.3199C376.851%2096.3856%20376.861%2096.4514%20376.884%2096.513C376.908%2096.5745%20376.944%2096.6304%20376.991%2096.677L383.313%20102.999C383.36%20103.047%20383.417%20103.083%20383.48%20103.107C383.543%20103.13%20383.61%20103.14%20383.677%20103.136C383.743%20103.131%20383.809%20103.112%20383.867%20103.08C383.926%20103.048%20383.978%20103.004%20384.018%20102.95C384.51%20102.297%20385.282%20100.953%20384.611%2099.6095L388.263%2095.9566C388.351%2095.8687%20388.401%2095.7494%20388.401%2095.6251C388.401%2095.5008%20388.351%2095.3816%20388.263%2095.2937L384.708%2091.7378C384.62%2091.6499%20384.501%2091.6005%20384.376%2091.6005C384.252%2091.6005%20384.133%2091.6499%20384.045%2091.7378Z'%20stroke='%23666666'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M384.045%2091.7379L380.392%2095.3908C380.392%2095.3908%20378.766%2094.578%20377.029%2095.9797C376.977%2096.021%20376.935%2096.0726%20376.905%2096.1313C376.875%2096.1899%20376.858%2096.2542%20376.854%2096.3199C376.851%2096.3857%20376.861%2096.4515%20376.884%2096.513C376.908%2096.5746%20376.944%2096.6305%20376.991%2096.6771L383.313%20102.999C383.36%20103.047%20383.417%20103.083%20383.48%20103.107C383.543%20103.13%20383.61%20103.14%20383.677%20103.136C383.743%20103.131%20383.809%20103.112%20383.867%20103.08C383.926%20103.048%20383.978%20103.004%20384.018%20102.95C384.51%20102.297%20385.282%20100.953%20384.611%2099.6095L388.263%2095.9566C388.351%2095.8687%20388.401%2095.7495%20388.401%2095.6252C388.401%2095.5009%20388.351%2095.3816%20388.263%2095.2937L384.708%2091.7379C384.62%2091.65%20384.501%2091.6006%20384.376%2091.6006C384.252%2091.6006%20384.133%2091.65%20384.045%2091.7379Z'%20stroke='%23666666'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cpath%20d='M322.18%20101.756C325.564%20101.756%20327.878%2099.6132%20327.878%2096.0765C327.878%2092.5545%20325.564%2090.5%20322.18%2090.5C318.779%2090.5%20316.465%2092.5398%20316.465%2096.0765C316.465%2099.6132%20318.779%20101.756%20322.18%20101.756ZM322.18%2099.9801C320.263%2099.9801%20319.072%2098.5273%20319.072%2096.0765C319.072%2093.7579%20320.263%2092.3637%20322.18%2092.3637C324.079%2092.3637%20325.288%2093.7579%20325.288%2096.0765C325.288%2098.5273%20324.079%2099.9801%20322.18%2099.9801ZM326.307%20104.5C327.239%20104.5%20327.999%20104.368%20328.465%20104.177L327.999%20102.578C327.619%20102.695%20327.153%20102.768%20326.583%20102.768C325.305%20102.768%20323.993%20102.328%20323.509%20101.271L320.92%20101.492C321.731%20103.223%20323.596%20104.5%20326.307%20104.5Z'%20fill='%23666666'/%3e%3cpath%20d='M102.85%20284.034L118.815%20293.61C119.861%20294.24%20119.861%20295.756%20118.815%20296.386L102.85%20305.967C101.772%20306.616%20100.4%20305.838%20100.4%20304.581V285.424C100.4%20284.163%20101.772%20283.385%20102.85%20284.034Z'%20fill='white'/%3e%3cpath%20d='M61.3931%20306.989H57.8786C57.3939%20306.989%2057%20306.588%2057%20306.088V284.907C57%20284.406%2057.3939%20284%2057.8786%20284H61.3931C61.8779%20284%2062.2718%20284.406%2062.2718%20284.907V306.088C62.2667%20306.588%2061.8779%20306.989%2061.3931%20306.989Z'%20fill='white'/%3e%3cpath%20d='M72.9264%20306.989H69.4118C68.9271%20306.989%2068.5332%20306.583%2068.5332%20306.083V284.907C68.5332%20284.406%2068.9271%20284%2069.4118%20284H72.9264C73.4111%20284%2073.805%20284.406%2073.805%20284.907V306.088C73.7999%20306.588%2073.4111%20306.989%2072.9264%20306.989Z'%20fill='white'/%3e%3cg%20clip-path='url(%23clip7_410_133)'%3e%3cpath%20d='M19.9873%20286.25V283.25L13.7373%20287.5L19.9873%20291.75V288.75C24.1248%20288.75%2027.4873%20292.113%2027.4873%20296.25C27.4873%20300.388%2024.1248%20303.75%2019.9873%20303.75C15.8498%20303.75%2012.4873%20300.388%2012.4873%20296.25H9.9873C9.9873%20301.775%2014.4623%20306.25%2019.9873%20306.25C25.5123%20306.25%2029.9873%20301.775%2029.9873%20296.25C29.9873%20290.725%2025.5123%20286.25%2019.9873%20286.25Z'%20fill='white'/%3e%3cpath%20d='M18.6121%20300H17.5496V295.925L16.2871%20296.312V295.45L18.4996%20294.662H18.6121V300Z'%20fill='white'/%3e%3cpath%20d='M23.9621%20297.8C23.9621%20298.2%2023.9246%20298.55%2023.8371%20298.825C23.7496%20299.1%2023.6246%20299.35%2023.4746%20299.537C23.3246%20299.725%2023.1246%20299.862%2022.9121%20299.95C22.6996%20300.037%2022.4496%20300.075%2022.1746%20300.075C21.8996%20300.075%2021.6621%20300.037%2021.4371%20299.95C21.2121%20299.862%2021.0246%20299.725%2020.8621%20299.537C20.6996%20299.35%2020.5746%20299.112%2020.4871%20298.825C20.3996%20298.537%2020.3496%20298.2%2020.3496%20297.8V296.875C20.3496%20296.475%2020.3871%20296.125%2020.4746%20295.85C20.5621%20295.575%2020.6871%20295.325%2020.8371%20295.137C20.9871%20294.95%2021.1871%20294.812%2021.3996%20294.725C21.6121%20294.637%2021.8621%20294.6%2022.1371%20294.6C22.4121%20294.6%2022.6496%20294.637%2022.8746%20294.725C23.0996%20294.812%2023.2871%20294.95%2023.4496%20295.137C23.6121%20295.325%2023.7371%20295.562%2023.8246%20295.85C23.9121%20296.137%2023.9621%20296.475%2023.9621%20296.875V297.8ZM22.8996%20296.725C22.8996%20296.487%2022.8871%20296.287%2022.8496%20296.125C22.8121%20295.962%2022.7621%20295.837%2022.6996%20295.737C22.6371%20295.637%2022.5621%20295.562%2022.4621%20295.525C22.3621%20295.487%2022.2621%20295.462%2022.1496%20295.462C22.0371%20295.462%2021.9246%20295.487%2021.8371%20295.525C21.7496%20295.562%2021.6621%20295.637%2021.5996%20295.737C21.5371%20295.837%2021.4871%20295.962%2021.4496%20296.125C21.4121%20296.287%2021.3996%20296.487%2021.3996%20296.725V297.937C21.3996%20298.175%2021.4121%20298.375%2021.4496%20298.537C21.4871%20298.7%2021.5371%20298.837%2021.5996%20298.937C21.6621%20299.037%2021.7371%20299.112%2021.8371%20299.15C21.9371%20299.187%2022.0371%20299.212%2022.1496%20299.212C22.2621%20299.212%2022.3746%20299.187%2022.4621%20299.15C22.5496%20299.112%2022.6371%20299.037%2022.6996%20298.937C22.7621%20298.837%2022.8121%20298.7%2022.8371%20298.537C22.8621%20298.375%2022.8871%20298.175%2022.8871%20297.937V296.725H22.8996Z'%20fill='white'/%3e%3c/g%3e%3cpath%20d='M239%20281L251%20295L239%20309'%20stroke='%23E3E3E3'%20stroke-width='3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M241%20340L249%20348'%20stroke='white'/%3e%3cpath%20d='M249%20332L241%20340.5'%20stroke='white'/%3e%3cg%20clip-path='url(%23clip8_410_133)'%3e%3cpath%20d='M163.5%20296.25C163.5%20300.388%20160.137%20303.75%20156%20303.75C151.863%20303.75%20148.5%20300.388%20148.5%20296.25C148.5%20292.113%20151.863%20288.75%20156%20288.75V291.75L162.25%20287.5L156%20283.25V286.25C150.475%20286.25%20146%20290.725%20146%20296.25C146%20301.775%20150.475%20306.25%20156%20306.25C161.525%20306.25%20166%20301.775%20166%20296.25H163.5Z'%20fill='white'/%3e%3cpath%20d='M154.575%20299.925V294.588H154.463L152.25%20295.375V296.238L153.513%20295.85V299.925H154.575Z'%20fill='white'/%3e%3cpath%20d='M156.312%20296.8V297.725C156.312%20300.1%20157.95%20300%20158.112%20300C158.287%20300%20159.912%20300.113%20159.912%20297.725V296.8C159.912%20294.425%20158.275%20294.525%20158.112%20294.525C157.937%20294.525%20156.312%20294.413%20156.312%20296.8ZM158.862%20296.65V297.863C158.862%20298.825%20158.6%20299.15%20158.125%20299.15C157.65%20299.15%20157.375%20298.825%20157.375%20297.863V296.65C157.375%20295.713%20157.65%20295.388%20158.112%20295.388C158.587%20295.375%20158.862%20295.713%20158.862%20296.65Z'%20fill='white'/%3e%3c/g%3e%3cpath%20d='M206%20309L194%20295L206%20281'%20stroke='%23E3E3E3'%20stroke-width='3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M362%204.9375V8H365.062'%20stroke='white'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M362%2012.8125C364.658%2012.8125%20366.812%2010.6579%20366.812%208C366.812%205.34213%20364.658%203.1875%20362%203.1875C359.342%203.1875%20357.188%205.34213%20357.188%208C357.188%2010.6579%20359.342%2012.8125%20362%2012.8125Z'%20stroke='white'%20stroke-miterlimit='10'/%3e%3cpath%20d='M365.712%202.43152L367.569%204.28767'%20stroke='white'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M356.432%204.28767L358.288%202.43152'%20stroke='white'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M112.962%20339.308H107.04C104.823%20339.308%20102.699%20340.23%20101.176%20341.846C98.139%20345.087%2098.2997%20350.172%20101.54%20353.209V357.846V357.854C101.54%20358.319%20101.921%20358.7%20102.395%20358.692C102.589%20358.692%20102.784%20358.624%20102.936%20358.497L106.684%20355.375C106.794%20355.384%20106.921%20355.384%20107.04%20355.384H112.962C115.179%20355.384%20117.193%20354.487%20118.648%20353.031C120.103%20351.576%20121%20349.563%20121%20347.346C121%20342.904%20117.404%20339.308%20112.962%20339.308ZM114.231%20346.288H105.771C105.424%20346.288%20105.136%20346.001%20105.136%20345.654C105.136%20345.307%20105.424%20345.019%20105.771%20345.019H114.231C114.578%20345.019%20114.866%20345.307%20114.866%20345.654C114.866%20346.001%20114.587%20346.288%20114.231%20346.288ZM114.866%20349.461C114.866%20349.808%20114.578%20350.096%20114.231%20350.096H105.771C105.424%20350.096%20105.136%20349.808%20105.136%20349.461C105.136%20349.114%20105.424%20348.826%20105.771%20348.826H114.231C114.587%20348.826%20114.866%20349.114%20114.866%20349.461Z'%20fill='white'/%3e%3cpath%20d='M161.98%20342.984V345.947C162.011%20347.049%20161.141%20347.97%20160.028%20348H145.353C144.241%20347.98%20143.371%20347.059%20143.401%20345.947V334.053C143.371%20332.951%20144.241%20332.03%20145.353%20332H154.648'%20stroke='white'%20stroke-width='1.5'%20stroke-miterlimit='10'/%3e%3cpath%20d='M152.725%20342.731C152.725%20342.731%20152.31%20336.399%20157.296%20336.298C161.079%20336.217%20165.589%20336.319%20165.589%20336.319'%20stroke='white'%20stroke-width='1.5'%20stroke-miterlimit='10'/%3e%3cpath%20d='M162.163%20332.03L165.804%20335.671L162.163%20339.312'%20stroke='white'%20stroke-width='1.5'/%3e%3cpath%20d='M204%20340L196%20332'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M196%20348L204%20339.5'%20stroke='black'%20stroke-width='2'/%3e%3cpath%20d='M54%20344.752V344.549C54%20341.484%2056.4565%20339%2059.4979%20339H59.9157C61.9962%20339%2063.9263%20340.095%2064.9958%20341.897C66.0653%20340.103%2067.9954%20339%2070.076%20339H70.4937C73.5351%20339%2076%20341.484%2076%20344.549V344.971C76%20346.495%2075.4235%20347.952%2074.3957%20349.063L74.3122%20349.164L65.0376%20359L65.0125%20358.975L64.9875%20359L55.6962%20349.156L55.6126%20349.055C54.5765%20347.952%2054%20346.486%2054.0084%20344.962V344.752H54Z'%20fill='white'/%3e%3cg%20clip-path='url(%23clip9_410_133)'%3e%3cpath%20d='M72.4966%2017.5V22.5'%20stroke='white'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M75.8301%2015.8333V24.1666'%20stroke='white'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M57.5%2010.8333L74.1667%2029.1666'%20stroke='white'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M64.1831%2013.2285L68.3341%2010V17.7947'%20stroke='white'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M68.3333%2022.75V30L60.8333%2024.1666H55.8333C55.6123%2024.1666%2055.4004%2024.0788%2055.2441%2023.9226C55.0878%2023.7663%2055%2023.5543%2055%2023.3333V16.6666C55%2016.4456%2055.0878%2016.2337%2055.2441%2016.0774C55.4004%2015.9211%2055.6123%2015.8333%2055.8333%2015.8333H62.0455'%20stroke='white'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cg%20clip-path='url(%23clip10_410_133)'%3e%3cpath%20d='M105.833%2024.1667H100.833C100.612%2024.1667%20100.4%2024.0789%20100.244%2023.9226C100.088%2023.7663%20100%2023.5543%20100%2023.3333V16.6667C100%2016.4457%20100.088%2016.2337%20100.244%2016.0774C100.4%2015.9211%20100.612%2015.8333%20100.833%2015.8333H105.833L113.333%2010V30L105.833%2024.1667Z'%20stroke='white'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M117.499%2017.5001V22.5001'%20stroke='white'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M120.831%2015.8333V24.1666'%20stroke='white'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cg%20clip-path='url(%23clip11_410_133)'%3e%3cpath%20d='M161.98%2022.9836V25.9469C162.011%2027.0493%20161.141%2027.9697%20160.028%2028H145.353C144.241%2027.9798%20143.371%2027.0594%20143.401%2025.9469V14.0531C143.371%2012.9507%20144.241%2012.0303%20145.353%2012H154.648'%20stroke='white'%20stroke-width='1.5'%20stroke-miterlimit='10'/%3e%3cpath%20d='M152.725%2022.7306C152.725%2022.7306%20152.31%2016.3994%20157.296%2016.2983C161.079%2016.2174%20165.589%2016.3185%20165.589%2016.3185'%20stroke='white'%20stroke-width='1.5'%20stroke-miterlimit='10'/%3e%3cpath%20d='M162.163%2012.0304L165.804%2015.6714L162.163%2019.3123'%20stroke='white'%20stroke-width='1.5'/%3e%3c/g%3e%3cg%20clip-path='url(%23clip12_410_133)'%3e%3cpath%20d='M24.4142%20341.397C24.4343%20341.397%2024.4544%20341.398%2024.4745%20341.4V340.619C24.4745%20340.276%2024.1931%20340%2023.8448%20340H15.7552C15.4068%20340%2015.1255%20340.276%2015.1255%20340.619V341.401C15.1456%20341.4%2015.1657%20341.398%2015.1858%20341.398H24.4142V341.397Z'%20fill='white'/%3e%3cpath%20d='M26.9035%20342.159C26.8726%20342.158%2026.8432%20342.155%2026.811%20342.155H12.7888C12.758%20342.155%2012.7272%20342.158%2012.6964%20342.159C11.9582%20342.207%2011.374%20342.807%2011.374%20343.544V344.4H12.6964H26.9035H28.2258V343.544C28.2258%20342.807%2027.6417%20342.207%2026.9035%20342.159Z'%20fill='white'/%3e%3cpath%20d='M28.2259%20346.374C28.944%20346.374%2029.5282%20346.948%2029.5282%20347.653V356.867C29.5282%20357.573%2028.944%20358.147%2028.2259%20358.147H11.3741C10.656%20358.147%2010.0718%20357.573%2010.0718%20356.867V347.653C10.0718%20346.948%2010.656%20346.374%2011.3741%20346.374H12.6965H26.9035H28.2259ZM28.2259%20345.32H26.9035H12.6965H11.3741C10.0624%20345.32%209%20346.364%209%20347.653V356.867C9%20358.156%2010.0624%20359.2%2011.3741%20359.2H28.2259C29.5375%20359.2%2030.6%20358.156%2030.6%20356.867V347.653C30.6%20346.364%2029.5375%20345.32%2028.2259%20345.32Z'%20fill='white'/%3e%3cpath%20d='M17.1484%20355.874L23.0582%20352.43L17.1484%20348.646V355.874Z'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_410_133'%3e%3crect%20width='22'%20height='22.8322'%20fill='white'%20transform='translate(279%2053.584)'/%3e%3c/clipPath%3e%3cclipPath%20id='clip1_410_133'%3e%3crect%20width='23'%20height='21.0543'%20fill='white'%20transform='translate(98.5%2054.4729)'/%3e%3c/clipPath%3e%3cclipPath%20id='clip2_410_133'%3e%3crect%20width='25.1509'%20height='20'%20fill='white'%20transform='translate(7.4248%2055)'/%3e%3c/clipPath%3e%3cclipPath%20id='clip3_410_133'%3e%3crect%20width='13'%20height='13'%20fill='white'%20transform='translate(316%201)'/%3e%3c/clipPath%3e%3cclipPath%20id='clip4_410_133'%3e%3crect%20width='13'%20height='13'%20fill='white'%20transform='translate(335%201.5)'/%3e%3c/clipPath%3e%3cclipPath%20id='clip5_410_133'%3e%3crect%20width='15'%20height='12'%20fill='white'%20transform='translate(335%2092)'/%3e%3c/clipPath%3e%3cclipPath%20id='clip6_410_133'%3e%3crect%20width='15'%20height='15'%20fill='white'%20transform='translate(375%2090)'/%3e%3c/clipPath%3e%3cclipPath%20id='clip7_410_133'%3e%3crect%20width='30'%20height='30'%20fill='white'%20transform='translate(5%20280)'/%3e%3c/clipPath%3e%3cclipPath%20id='clip8_410_133'%3e%3crect%20width='30'%20height='30'%20fill='white'%20transform='translate(141%20280)'/%3e%3c/clipPath%3e%3cclipPath%20id='clip9_410_133'%3e%3crect%20width='40'%20height='40'%20fill='white'%20transform='translate(45)'/%3e%3c/clipPath%3e%3cclipPath%20id='clip10_410_133'%3e%3crect%20width='40'%20height='40'%20fill='white'%20transform='translate(90)'/%3e%3c/clipPath%3e%3cclipPath%20id='clip11_410_133'%3e%3crect%20width='40'%20height='40'%20fill='white'%20transform='translate(135)'/%3e%3c/clipPath%3e%3cclipPath%20id='clip12_410_133'%3e%3crect%20width='21.6'%20height='19.2'%20fill='white'%20transform='translate(9%20340)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e"));background-size:500px 500px;background-repeat:no-repeat;display:inline-block}._pip_1iegb_10{width:40px;height:40px;background-position:0px 0px}._mute_1iegb_16{width:40px;height:40px;background-position:-45px 0px}._unmute_1iegb_22{width:40px;height:40px;background-position:-90px 0px}._share_1iegb_28{width:40px;height:40px;background-position:-135px 0px}._setting_1iegb_34{width:40px;height:40px;background-position:-180px 0px}._close_1iegb_40{width:40px;height:40px;background-position:-225px 0px}._coupon_1iegb_47{width:40px;height:40px;background-position:0px -45px}._like_1iegb_53{width:40px;height:40px;background-position:-45px -45px}._notice_1iegb_59{width:40px;height:40px;background-position:-90px -45px}._chat_1iegb_65{width:40px;height:40px;background-position:-135px -45px}._comment_1iegb_71{width:40px;height:40px;background-position:-180px -45px}._product_1iegb_77{width:40px;height:40px;background-position:-225px -45px}._event_1iegb_83{width:40px;height:40px;background-position:-270px -45px}._purchase_1iegb_90{width:85px;height:40px;background-position:-45px -90px}._close_pane_1iegb_96{width:40px;height:40px;background-position:0px -90px}._close_pane_B_1iegb_102{width:40px;height:40px;background-position:-135px -90px}._back_1iegb_108{width:40px;height:40px;background-position:-180px -90px}._backward_1iegb_115{width:40px;height:40px;background-position:0px -275px}._pause_1iegb_121{width:40px;height:40px;background-position:-45px -275px}._play_1iegb_127{width:40px;height:40px;background-position:-90px -275px}._forward_1iegb_133{width:40px;height:40px;background-position:-135px -275px}._left_1iegb_140{width:40px;height:40px;background-position:-180px -275px}._right_1iegb_146{width:40px;height:40px;background-position:-225px -275px}._converting_1iegb_153{width:80px;height:80px;background-position:0px -190px}._cancel_1iegb_159{width:80px;height:80px;background-position:-85px -190px}._sm_view_1iegb_166{width:15px;height:15px;background-position:-315px 0px}._sm_like_1iegb_172{width:15px;height:15px;background-position:-335px 0px}._sm_countdown_1iegb_178{width:15px;height:15px;background-position:-355px 0px}._sm_question_1iegb_184{width:15px;height:15px;background-position:-315px -90px}._sm_comment_1iegb_190{width:15px;height:15px;background-position:-335px -90px}._sm_more_1iegb_196{width:15px;height:15px;background-position:-355px -90px}._sm_fix_1iegb_202{width:15px;height:15px;background-position:-375px -90px}._chapter_shorts_1iegb_208{width:40px;height:40px;background-position:0px -320px}._like_shorts_1iegb_214{width:40px;height:40px;background-position:-45px -320px}._comment_shorts_1iegb_220{width:40px;height:40px;background-position:-90px -320px}._share_shorts_1iegb_226{width:40px;height:40px;background-position:-135px -320px}._more_product_shorts_1iegb_232{width:40px;height:40px;background-position:-180px -320px}._close_drawer_shorts_1iegb_238{width:40px;height:40px;background-position:-225px -320px}._root_1twf4_1{position:relative;-webkit-user-select:none;user-select:none;width:100%;height:100%;overflow:hidden}._video_1twf4_9{display:block;width:100%;height:100%;object-fit:cover;pointer-events:none}._poster_1twf4_17{position:absolute;top:0;right:0;bottom:0;left:0;background-size:cover;background-position:50% 50%;background-repeat:no-repeat;pointer-events:none}._origin_ratio_1twf4_26{object-fit:contain;background-size:contain}._layer_1twf4_33{position:absolute;top:0;right:0;bottom:0;left:0;cursor:pointer}._shadow_1twf4_39:after{content:"";position:absolute;left:0;right:0;top:0;min-height:125px;height:13%;background-image:linear-gradient(rgba(0,0,0,.25),transparent)}._shadow_1twf4_39:before{content:"";position:absolute;left:0;right:0;bottom:0;min-height:315px;height:40%;background-image:linear-gradient(transparent,#0000008c)}._forward_animation_1twf4_61 ._forward_1twf4_61,._backward_animation_1twf4_65 ._backward_1twf4_65{opacity:1}._indicator_1twf4_69{position:absolute;display:flex;top:0;right:0;bottom:0;left:0;pointer-events:none}._indicator_right_1twf4_76{left:50%;background:linear-gradient(to right,transparent,rgba(0,0,0,.3764705882))}._indicator_left_1twf4_81{transform:rotate(180deg);right:50%;background:linear-gradient(to right,transparent,rgba(0,0,0,.3764705882))}._progress_1twf4_87{position:absolute;bottom:65px;left:16px;right:16px;z-index:0}._time_1twf4_95{position:absolute;bottom:65px;left:16px;right:16px}._button_1twf4_108{border:0px;background-color:transparent;color:#fff;font-weight:500;font-size:13px;outline:transparent;cursor:pointer}._backward_1twf4_65{position:absolute;bottom:24px;left:calc(40% - 40px)}._forward_1twf4_61{position:absolute;bottom:24px;right:calc(40% - 40px)}._playbackrate_1twf4_130{position:absolute;left:16px;bottom:24px;border-radius:20px;min-width:60px;padding:4px 15px;background-color:#00000030;letter-spacing:1.2px}._play_toggle_1twf4_141{position:absolute;bottom:24px;left:50%;transform:translate(-50%)}._chapter_toggle_1twf4_148{position:absolute;right:16px;bottom:24px;border-radius:20px;padding:4px 15px;background-color:#00000030}._chapter_wrap_1twf4_157{position:absolute;bottom:115px;left:0;right:0;overflow-x:auto;padding:8px;display:flex;gap:8px}._chapter_wrap_1twf4_157::-webkit-scrollbar{display:none}._root_yg3vm_2{--progress-background-color: var( --inject-progress-background-color, var(--primary-color, #ea5a73) );--progress-handle-color: var( --inject-progress-handle-color, var(--primary-color) );--progress-height: var(--inject-progress-height, 4px)}._progress_wrap_yg3vm_14{position:relative;min-height:44px;display:flex;align-items:center;cursor:pointer}._rail_yg3vm_22{position:relative;width:100%;height:var(--progress-height);background-color:#ffffff4c}._progress_yg3vm_14{position:absolute;height:var(--progress-height);width:40px;background-color:var(--progress-background-color);pointer-events:none}._handle_yg3vm_38:after{content:"";position:absolute;right:-7.5px;top:-5px;border-radius:10px;width:15px;height:15px;background-color:var(--progress-handle-color)}._root_pwcz5_1{display:flex;color:#fff;font-size:12px;justify-content:space-between}._root_1v1it_1{position:relative;display:inline-block;height:130px;width:90px;border-radius:5px;overflow:hidden;border:1px solid rgba(255,255,255,.2980392157);flex-shrink:0;cursor:pointer}._root_1v1it_1:active:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background-color:#0000001a}._chapter_img_1v1it_20{display:block;width:100%;height:100%}._name_1v1it_26{position:absolute;left:5px;right:5px;top:10px;text-align:center;color:#fff;font-weight:500;font-size:14px}._time_1v1it_37{position:absolute;left:5px;bottom:5px;color:#fff;font-size:12px}._root_1a1im_2{--input-background-color: var(--inject-input-background-color, #ffffff);--input-border-color: var(--inject-input-border-color, #ccc);--input-color: var(--inject-input-color, var(--font-color, #000))}._root_1a1im_2{position:relative;padding:8px 16px;font-weight:500;font-size:14px;font-family:inherit;border-radius:8px;border:1px solid var(--input-border-color);background-color:var(--input-background-color);color:var(--input-color);outline:transparent;cursor:pointer}._checkbox_1a1im_23{display:inline-flex;padding:0;border-radius:4px;border:1px solid var(--input-border-color);background-color:var(--input-background-color);overflow:hidden}._checkbox_input_1a1im_32{display:none}._checkbox_label_1a1im_36{display:block;position:relative;font-size:14px;width:20px;height:20px;cursor:pointer}._checkbox_input_1a1im_32:checked+._checkbox_label_1a1im_36:after{content:"✓";position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;background-color:var(--primary-color);color:#fff;z-index:0}._toggle_1a1im_58{display:inline-flex;padding:0;background-color:transparent;border:0px;width:75px;height:30px}._toggle_input_1a1im_67{display:none;background-color:transparent}._toggle_label_1a1im_72{position:relative;cursor:pointer;width:100%;height:100%;background-color:var(--input-background-color);border:1px solid var(--input-border-color);border-radius:34px;transition:background-color .3s}._toggle_label_1a1im_72:before{content:"";position:absolute;left:4px;top:4px;aspect-ratio:1/1;height:calc(100% - 8px);background-color:#eee;border-radius:50%;transition:transform .3s}._toggle_input_1a1im_67:checked+._toggle_label_1a1im_72{background-color:var(--primary-color)}._toggle_input_1a1im_67:checked+._toggle_label_1a1im_72:before{transform:translate(calc(33.5px + 50%))}`)),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
(function(tg){typeof define=="function"&&define.amd?define(tg):tg()})(function(){"use strict";var tg=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Cy(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Ry={exports:{}},Vn={};/*
|
|
3
|
+
object-assign
|
|
4
|
+
(c) Sindre Sorhus
|
|
5
|
+
@license MIT
|
|
6
|
+
*/var Ay,nT;function Ed(){if(nT)return Ay;nT=1;var r=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function n(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function s(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var u={},c=0;c<10;c++)u["_"+String.fromCharCode(c)]=c;var h=Object.getOwnPropertyNames(u).map(function(y){return u[y]});if(h.join("")!=="0123456789")return!1;var m={};return"abcdefghijklmnopqrst".split("").forEach(function(y){m[y]=y}),Object.keys(Object.assign({},m)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Ay=s()?Object.assign:function(o,u){for(var c,h=n(o),m,y=1;y<arguments.length;y++){c=Object(arguments[y]);for(var E in c)e.call(c,E)&&(h[E]=c[E]);if(r){m=r(c);for(var T=0;T<m.length;T++)t.call(c,m[T])&&(h[m[T]]=c[m[T]])}}return h},Ay}/** @license React v17.0.2
|
|
7
|
+
* react.production.min.js
|
|
8
|
+
*
|
|
9
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
10
|
+
*
|
|
11
|
+
* This source code is licensed under the MIT license found in the
|
|
12
|
+
* LICENSE file in the root directory of this source tree.
|
|
13
|
+
*/var rT;function NI(){if(rT)return Vn;rT=1;var r=Ed(),e=60103,t=60106;Vn.Fragment=60107,Vn.StrictMode=60108,Vn.Profiler=60114;var n=60109,s=60110,o=60112;Vn.Suspense=60113;var u=60115,c=60116;if(typeof Symbol=="function"&&Symbol.for){var h=Symbol.for;e=h("react.element"),t=h("react.portal"),Vn.Fragment=h("react.fragment"),Vn.StrictMode=h("react.strict_mode"),Vn.Profiler=h("react.profiler"),n=h("react.provider"),s=h("react.context"),o=h("react.forward_ref"),Vn.Suspense=h("react.suspense"),u=h("react.memo"),c=h("react.lazy")}var m=typeof Symbol=="function"&&Symbol.iterator;function y(ne){return ne===null||typeof ne!="object"?null:(ne=m&&ne[m]||ne["@@iterator"],typeof ne=="function"?ne:null)}function E(ne){for(var _e="https://reactjs.org/docs/error-decoder.html?invariant="+ne,Ue=1;Ue<arguments.length;Ue++)_e+="&args[]="+encodeURIComponent(arguments[Ue]);return"Minified React error #"+ne+"; visit "+_e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R={};function _(ne,_e,Ue){this.props=ne,this.context=_e,this.refs=R,this.updater=Ue||T}_.prototype.isReactComponent={},_.prototype.setState=function(ne,_e){if(typeof ne!="object"&&typeof ne!="function"&&ne!=null)throw Error(E(85));this.updater.enqueueSetState(this,ne,_e,"setState")},_.prototype.forceUpdate=function(ne){this.updater.enqueueForceUpdate(this,ne,"forceUpdate")};function L(){}L.prototype=_.prototype;function M(ne,_e,Ue){this.props=ne,this.context=_e,this.refs=R,this.updater=Ue||T}var F=M.prototype=new L;F.constructor=M,r(F,_.prototype),F.isPureReactComponent=!0;var Z={current:null},K=Object.prototype.hasOwnProperty,Y={key:!0,ref:!0,__self:!0,__source:!0};function X(ne,_e,Ue){var He,Be={},Je=null,Xe=null;if(_e!=null)for(He in _e.ref!==void 0&&(Xe=_e.ref),_e.key!==void 0&&(Je=""+_e.key),_e)K.call(_e,He)&&!Y.hasOwnProperty(He)&&(Be[He]=_e[He]);var Et=arguments.length-2;if(Et===1)Be.children=Ue;else if(1<Et){for(var gt=Array(Et),Ot=0;Ot<Et;Ot++)gt[Ot]=arguments[Ot+2];Be.children=gt}if(ne&&ne.defaultProps)for(He in Et=ne.defaultProps,Et)Be[He]===void 0&&(Be[He]=Et[He]);return{$$typeof:e,type:ne,key:Je,ref:Xe,props:Be,_owner:Z.current}}function ue(ne,_e){return{$$typeof:e,type:ne.type,key:_e,ref:ne.ref,props:ne.props,_owner:ne._owner}}function ie(ne){return typeof ne=="object"&&ne!==null&&ne.$$typeof===e}function ye(ne){var _e={"=":"=0",":":"=2"};return"$"+ne.replace(/[=:]/g,function(Ue){return _e[Ue]})}var de=/\/+/g;function Re(ne,_e){return typeof ne=="object"&&ne!==null&&ne.key!=null?ye(""+ne.key):_e.toString(36)}function Ce(ne,_e,Ue,He,Be){var Je=typeof ne;(Je==="undefined"||Je==="boolean")&&(ne=null);var Xe=!1;if(ne===null)Xe=!0;else switch(Je){case"string":case"number":Xe=!0;break;case"object":switch(ne.$$typeof){case e:case t:Xe=!0}}if(Xe)return Xe=ne,Be=Be(Xe),ne=He===""?"."+Re(Xe,0):He,Array.isArray(Be)?(Ue="",ne!=null&&(Ue=ne.replace(de,"$&/")+"/"),Ce(Be,_e,Ue,"",function(Ot){return Ot})):Be!=null&&(ie(Be)&&(Be=ue(Be,Ue+(!Be.key||Xe&&Xe.key===Be.key?"":(""+Be.key).replace(de,"$&/")+"/")+ne)),_e.push(Be)),1;if(Xe=0,He=He===""?".":He+":",Array.isArray(ne))for(var Et=0;Et<ne.length;Et++){Je=ne[Et];var gt=He+Re(Je,Et);Xe+=Ce(Je,_e,Ue,gt,Be)}else if(gt=y(ne),typeof gt=="function")for(ne=gt.call(ne),Et=0;!(Je=ne.next()).done;)Je=Je.value,gt=He+Re(Je,Et++),Xe+=Ce(Je,_e,Ue,gt,Be);else if(Je==="object")throw _e=""+ne,Error(E(31,_e==="[object Object]"?"object with keys {"+Object.keys(ne).join(", ")+"}":_e));return Xe}function Ve(ne,_e,Ue){if(ne==null)return ne;var He=[],Be=0;return Ce(ne,He,"","",function(Je){return _e.call(Ue,Je,Be++)}),He}function ze(ne){if(ne._status===-1){var _e=ne._result;_e=_e(),ne._status=0,ne._result=_e,_e.then(function(Ue){ne._status===0&&(Ue=Ue.default,ne._status=1,ne._result=Ue)},function(Ue){ne._status===0&&(ne._status=2,ne._result=Ue)})}if(ne._status===1)return ne._result;throw ne._result}var Qe={current:null};function et(){var ne=Qe.current;if(ne===null)throw Error(E(321));return ne}var Pe={ReactCurrentDispatcher:Qe,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:Z,IsSomeRendererActing:{current:!1},assign:r};return Vn.Children={map:Ve,forEach:function(ne,_e,Ue){Ve(ne,function(){_e.apply(this,arguments)},Ue)},count:function(ne){var _e=0;return Ve(ne,function(){_e++}),_e},toArray:function(ne){return Ve(ne,function(_e){return _e})||[]},only:function(ne){if(!ie(ne))throw Error(E(143));return ne}},Vn.Component=_,Vn.PureComponent=M,Vn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Pe,Vn.cloneElement=function(ne,_e,Ue){if(ne==null)throw Error(E(267,ne));var He=r({},ne.props),Be=ne.key,Je=ne.ref,Xe=ne._owner;if(_e!=null){if(_e.ref!==void 0&&(Je=_e.ref,Xe=Z.current),_e.key!==void 0&&(Be=""+_e.key),ne.type&&ne.type.defaultProps)var Et=ne.type.defaultProps;for(gt in _e)K.call(_e,gt)&&!Y.hasOwnProperty(gt)&&(He[gt]=_e[gt]===void 0&&Et!==void 0?Et[gt]:_e[gt])}var gt=arguments.length-2;if(gt===1)He.children=Ue;else if(1<gt){Et=Array(gt);for(var Ot=0;Ot<gt;Ot++)Et[Ot]=arguments[Ot+2];He.children=Et}return{$$typeof:e,type:ne.type,key:Be,ref:Je,props:He,_owner:Xe}},Vn.createContext=function(ne,_e){return _e===void 0&&(_e=null),ne={$$typeof:s,_calculateChangedBits:_e,_currentValue:ne,_currentValue2:ne,_threadCount:0,Provider:null,Consumer:null},ne.Provider={$$typeof:n,_context:ne},ne.Consumer=ne},Vn.createElement=X,Vn.createFactory=function(ne){var _e=X.bind(null,ne);return _e.type=ne,_e},Vn.createRef=function(){return{current:null}},Vn.forwardRef=function(ne){return{$$typeof:o,render:ne}},Vn.isValidElement=ie,Vn.lazy=function(ne){return{$$typeof:c,_payload:{_status:-1,_result:ne},_init:ze}},Vn.memo=function(ne,_e){return{$$typeof:u,type:ne,compare:_e===void 0?null:_e}},Vn.useCallback=function(ne,_e){return et().useCallback(ne,_e)},Vn.useContext=function(ne,_e){return et().useContext(ne,_e)},Vn.useDebugValue=function(){},Vn.useEffect=function(ne,_e){return et().useEffect(ne,_e)},Vn.useImperativeHandle=function(ne,_e,Ue){return et().useImperativeHandle(ne,_e,Ue)},Vn.useLayoutEffect=function(ne,_e){return et().useLayoutEffect(ne,_e)},Vn.useMemo=function(ne,_e){return et().useMemo(ne,_e)},Vn.useReducer=function(ne,_e,Ue){return et().useReducer(ne,_e,Ue)},Vn.useRef=function(ne){return et().useRef(ne)},Vn.useState=function(ne){return et().useState(ne)},Vn.version="17.0.2",Vn}var _y={},iT;function UI(){return iT||(iT=1,function(r){var e={};/** @license React v17.0.2
|
|
14
|
+
* react.development.js
|
|
15
|
+
*
|
|
16
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
17
|
+
*
|
|
18
|
+
* This source code is licensed under the MIT license found in the
|
|
19
|
+
* LICENSE file in the root directory of this source tree.
|
|
20
|
+
*/e.NODE_ENV!=="production"&&function(){var t=Ed(),n="17.0.2",s=60103,o=60106;r.Fragment=60107,r.StrictMode=60108,r.Profiler=60114;var u=60109,c=60110,h=60112;r.Suspense=60113;var m=60120,y=60115,E=60116,T=60121,R=60122,_=60117,L=60129,M=60131;if(typeof Symbol=="function"&&Symbol.for){var F=Symbol.for;s=F("react.element"),o=F("react.portal"),r.Fragment=F("react.fragment"),r.StrictMode=F("react.strict_mode"),r.Profiler=F("react.profiler"),u=F("react.provider"),c=F("react.context"),h=F("react.forward_ref"),r.Suspense=F("react.suspense"),m=F("react.suspense_list"),y=F("react.memo"),E=F("react.lazy"),T=F("react.block"),R=F("react.server.block"),_=F("react.fundamental"),F("react.scope"),F("react.opaque.id"),L=F("react.debug_trace_mode"),F("react.offscreen"),M=F("react.legacy_hidden")}var Z=typeof Symbol=="function"&&Symbol.iterator,K="@@iterator";function Y(j){if(j===null||typeof j!="object")return null;var be=Z&&j[Z]||j[K];return typeof be=="function"?be:null}var X={current:null},ue={transition:0},ie={current:null},ye={},de=null;function Re(j){de=j}ye.setExtraStackFrame=function(j){de=j},ye.getCurrentStack=null,ye.getStackAddendum=function(){var j="";de&&(j+=de);var be=ye.getCurrentStack;return be&&(j+=be()||""),j};var Ce={current:!1},Ve={ReactCurrentDispatcher:X,ReactCurrentBatchConfig:ue,ReactCurrentOwner:ie,IsSomeRendererActing:Ce,assign:t};Ve.ReactDebugCurrentFrame=ye;function ze(j){{for(var be=arguments.length,We=new Array(be>1?be-1:0),tt=1;tt<be;tt++)We[tt-1]=arguments[tt];et("warn",j,We)}}function Qe(j){{for(var be=arguments.length,We=new Array(be>1?be-1:0),tt=1;tt<be;tt++)We[tt-1]=arguments[tt];et("error",j,We)}}function et(j,be,We){{var tt=Ve.ReactDebugCurrentFrame,Rt=tt.getStackAddendum();Rt!==""&&(be+="%s",We=We.concat([Rt]));var Kt=We.map(function(Qt){return""+Qt});Kt.unshift("Warning: "+be),Function.prototype.apply.call(console[j],console,Kt)}}var Pe={};function ne(j,be){{var We=j.constructor,tt=We&&(We.displayName||We.name)||"ReactClass",Rt=tt+"."+be;if(Pe[Rt])return;Qe("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",be,tt),Pe[Rt]=!0}}var _e={isMounted:function(j){return!1},enqueueForceUpdate:function(j,be,We){ne(j,"forceUpdate")},enqueueReplaceState:function(j,be,We,tt){ne(j,"replaceState")},enqueueSetState:function(j,be,We,tt){ne(j,"setState")}},Ue={};Object.freeze(Ue);function He(j,be,We){this.props=j,this.context=be,this.refs=Ue,this.updater=We||_e}He.prototype.isReactComponent={},He.prototype.setState=function(j,be){if(!(typeof j=="object"||typeof j=="function"||j==null))throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,j,be,"setState")},He.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};{var Be={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},Je=function(j,be){Object.defineProperty(He.prototype,j,{get:function(){ze("%s(...) is deprecated in plain JavaScript React classes. %s",be[0],be[1])}})};for(var Xe in Be)Be.hasOwnProperty(Xe)&&Je(Xe,Be[Xe])}function Et(){}Et.prototype=He.prototype;function gt(j,be,We){this.props=j,this.context=be,this.refs=Ue,this.updater=We||_e}var Ot=gt.prototype=new Et;Ot.constructor=gt,t(Ot,He.prototype),Ot.isPureReactComponent=!0;function Dt(){var j={current:null};return Object.seal(j),j}function bn(j,be,We){var tt=be.displayName||be.name||"";return j.displayName||(tt!==""?We+"("+tt+")":We)}function tn(j){return j.displayName||"Context"}function Fn(j){if(j==null)return null;if(typeof j.tag=="number"&&Qe("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),typeof j=="function")return j.displayName||j.name||null;if(typeof j=="string")return j;switch(j){case r.Fragment:return"Fragment";case o:return"Portal";case r.Profiler:return"Profiler";case r.StrictMode:return"StrictMode";case r.Suspense:return"Suspense";case m:return"SuspenseList"}if(typeof j=="object")switch(j.$$typeof){case c:var be=j;return tn(be)+".Consumer";case u:var We=j;return tn(We._context)+".Provider";case h:return bn(j,j.render,"ForwardRef");case y:return Fn(j.type);case T:return Fn(j._render);case E:{var tt=j,Rt=tt._payload,Kt=tt._init;try{return Fn(Kt(Rt))}catch{return null}}}return null}var wt=Object.prototype.hasOwnProperty,Tn={key:!0,ref:!0,__self:!0,__source:!0},Mn,Pi,Rr;Rr={};function Ar(j){if(wt.call(j,"ref")){var be=Object.getOwnPropertyDescriptor(j,"ref").get;if(be&&be.isReactWarning)return!1}return j.ref!==void 0}function ii(j){if(wt.call(j,"key")){var be=Object.getOwnPropertyDescriptor(j,"key").get;if(be&&be.isReactWarning)return!1}return j.key!==void 0}function Xr(j,be){var We=function(){Mn||(Mn=!0,Qe("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",be))};We.isReactWarning=!0,Object.defineProperty(j,"key",{get:We,configurable:!0})}function xi(j,be){var We=function(){Pi||(Pi=!0,Qe("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",be))};We.isReactWarning=!0,Object.defineProperty(j,"ref",{get:We,configurable:!0})}function As(j){if(typeof j.ref=="string"&&ie.current&&j.__self&&ie.current.stateNode!==j.__self){var be=Fn(ie.current.type);Rr[be]||(Qe('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',be,j.ref),Rr[be]=!0)}}var Pr=function(j,be,We,tt,Rt,Kt,Qt){var bt={$$typeof:s,type:j,key:be,ref:We,props:Qt,_owner:Kt};return bt._store={},Object.defineProperty(bt._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(bt,"_self",{configurable:!1,enumerable:!1,writable:!1,value:tt}),Object.defineProperty(bt,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Rt}),Object.freeze&&(Object.freeze(bt.props),Object.freeze(bt)),bt};function si(j,be,We){var tt,Rt={},Kt=null,Qt=null,bt=null,Dn=null;if(be!=null){Ar(be)&&(Qt=be.ref,As(be)),ii(be)&&(Kt=""+be.key),bt=be.__self===void 0?null:be.__self,Dn=be.__source===void 0?null:be.__source;for(tt in be)wt.call(be,tt)&&!Tn.hasOwnProperty(tt)&&(Rt[tt]=be[tt])}var sr=arguments.length-2;if(sr===1)Rt.children=We;else if(sr>1){for(var Zn=Array(sr),Xn=0;Xn<sr;Xn++)Zn[Xn]=arguments[Xn+2];Object.freeze&&Object.freeze(Zn),Rt.children=Zn}if(j&&j.defaultProps){var wi=j.defaultProps;for(tt in wi)Rt[tt]===void 0&&(Rt[tt]=wi[tt])}if(Kt||Qt){var ti=typeof j=="function"?j.displayName||j.name||"Unknown":j;Kt&&Xr(Rt,ti),Qt&&xi(Rt,ti)}return Pr(j,Kt,Qt,bt,Dn,ie.current,Rt)}function Ft(j,be){var We=Pr(j.type,be,j.ref,j._self,j._source,j._owner,j.props);return We}function nr(j,be,We){if(j==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+j+".");var tt,Rt=t({},j.props),Kt=j.key,Qt=j.ref,bt=j._self,Dn=j._source,sr=j._owner;if(be!=null){Ar(be)&&(Qt=be.ref,sr=ie.current),ii(be)&&(Kt=""+be.key);var Zn;j.type&&j.type.defaultProps&&(Zn=j.type.defaultProps);for(tt in be)wt.call(be,tt)&&!Tn.hasOwnProperty(tt)&&(be[tt]===void 0&&Zn!==void 0?Rt[tt]=Zn[tt]:Rt[tt]=be[tt])}var Xn=arguments.length-2;if(Xn===1)Rt.children=We;else if(Xn>1){for(var wi=Array(Xn),ti=0;ti<Xn;ti++)wi[ti]=arguments[ti+2];Rt.children=wi}return Pr(j.type,Kt,Qt,bt,Dn,sr,Rt)}function _r(j){return typeof j=="object"&&j!==null&&j.$$typeof===s}var ai=".",or=":";function dr(j){var be=/[=:]/g,We={"=":"=0",":":"=2"},tt=j.replace(be,function(Rt){return We[Rt]});return"$"+tt}var fa=!1,da=/\/+/g;function Mr(j){return j.replace(da,"$&/")}function xt(j,be){return typeof j=="object"&&j!==null&&j.key!=null?dr(""+j.key):be.toString(36)}function Pt(j,be,We,tt,Rt){var Kt=typeof j;(Kt==="undefined"||Kt==="boolean")&&(j=null);var Qt=!1;if(j===null)Qt=!0;else switch(Kt){case"string":case"number":Qt=!0;break;case"object":switch(j.$$typeof){case s:case o:Qt=!0}}if(Qt){var bt=j,Dn=Rt(bt),sr=tt===""?ai+xt(bt,0):tt;if(Array.isArray(Dn)){var Zn="";sr!=null&&(Zn=Mr(sr)+"/"),Pt(Dn,be,Zn,"",function(Ps){return Ps})}else Dn!=null&&(_r(Dn)&&(Dn=Ft(Dn,We+(Dn.key&&(!bt||bt.key!==Dn.key)?Mr(""+Dn.key)+"/":"")+sr)),be.push(Dn));return 1}var Xn,wi,ti=0,ni=tt===""?ai:tt+or;if(Array.isArray(j))for(var va=0;va<j.length;va++)Xn=j[va],wi=ni+xt(Xn,va),ti+=Pt(Xn,be,We,wi,Rt);else{var $a=Y(j);if(typeof $a=="function"){var Is=j;$a===Is.entries&&(fa||ze("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),fa=!0);for(var hf=$a.call(Is),Tu,Ec=0;!(Tu=hf.next()).done;)Xn=Tu.value,wi=ni+xt(Xn,Ec++),ti+=Pt(Xn,be,We,wi,Rt)}else if(Kt==="object"){var ya=""+j;throw Error("Objects are not valid as a React child (found: "+(ya==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":ya)+"). If you meant to render a collection of children, use an array instead.")}}return ti}function Jt(j,be,We){if(j==null)return j;var tt=[],Rt=0;return Pt(j,tt,"","",function(Kt){return be.call(We,Kt,Rt++)}),tt}function On(j){var be=0;return Jt(j,function(){be++}),be}function $n(j,be,We){Jt(j,function(){be.apply(this,arguments)},We)}function Yn(j){return Jt(j,function(be){return be})||[]}function hr(j){if(!_r(j))throw Error("React.Children.only expected to receive a single React element child.");return j}function Sr(j,be){be===void 0?be=null:be!==null&&typeof be!="function"&&Qe("createContext: Expected the optional second argument to be a function. Instead received: %s",be);var We={$$typeof:c,_calculateChangedBits:be,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null};We.Provider={$$typeof:u,_context:We};var tt=!1,Rt=!1,Kt=!1;{var Qt={$$typeof:c,_context:We,_calculateChangedBits:We._calculateChangedBits};Object.defineProperties(Qt,{Provider:{get:function(){return Rt||(Rt=!0,Qe("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),We.Provider},set:function(bt){We.Provider=bt}},_currentValue:{get:function(){return We._currentValue},set:function(bt){We._currentValue=bt}},_currentValue2:{get:function(){return We._currentValue2},set:function(bt){We._currentValue2=bt}},_threadCount:{get:function(){return We._threadCount},set:function(bt){We._threadCount=bt}},Consumer:{get:function(){return tt||(tt=!0,Qe("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),We.Consumer}},displayName:{get:function(){return We.displayName},set:function(bt){Kt||(ze("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",bt),Kt=!0)}}}),We.Consumer=Qt}return We._currentRenderer=null,We._currentRenderer2=null,We}var jn=-1,oi=0,ha=1,_s=2;function qs(j){if(j._status===jn){var be=j._result,We=be(),tt=j;tt._status=oi,tt._result=We,We.then(function(Rt){if(j._status===oi){var Kt=Rt.default;Kt===void 0&&Qe(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
21
|
+
|
|
22
|
+
Your code should look like:
|
|
23
|
+
const MyComponent = lazy(() => import('./MyComponent'))`,Rt);var Qt=j;Qt._status=ha,Qt._result=Kt}},function(Rt){if(j._status===oi){var Kt=j;Kt._status=_s,Kt._result=Rt}})}if(j._status===ha)return j._result;throw j._result}function pa(j){var be={_status:-1,_result:j},We={$$typeof:E,_payload:be,_init:qs};{var tt,Rt;Object.defineProperties(We,{defaultProps:{configurable:!0,get:function(){return tt},set:function(Kt){Qe("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),tt=Kt,Object.defineProperty(We,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return Rt},set:function(Kt){Qe("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),Rt=Kt,Object.defineProperty(We,"propTypes",{enumerable:!0})}}})}return We}function vt(j){j!=null&&j.$$typeof===y?Qe("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof j!="function"?Qe("forwardRef requires a render function but was given %s.",j===null?"null":typeof j):j.length!==0&&j.length!==2&&Qe("forwardRef render functions accept exactly two parameters: props and ref. %s",j.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),j!=null&&(j.defaultProps!=null||j.propTypes!=null)&&Qe("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");var be={$$typeof:h,render:j};{var We;Object.defineProperty(be,"displayName",{enumerable:!1,configurable:!0,get:function(){return We},set:function(tt){We=tt,j.displayName==null&&(j.displayName=tt)}})}return be}var Nn=!1;function li(j){return!!(typeof j=="string"||typeof j=="function"||j===r.Fragment||j===r.Profiler||j===L||j===r.StrictMode||j===r.Suspense||j===m||j===M||Nn||typeof j=="object"&&j!==null&&(j.$$typeof===E||j.$$typeof===y||j.$$typeof===u||j.$$typeof===c||j.$$typeof===h||j.$$typeof===_||j.$$typeof===T||j[0]===R))}function Qr(j,be){li(j)||Qe("memo: The first argument must be a component. Instead received: %s",j===null?"null":typeof j);var We={$$typeof:y,type:j,compare:be===void 0?null:be};{var tt;Object.defineProperty(We,"displayName",{enumerable:!1,configurable:!0,get:function(){return tt},set:function(Rt){tt=Rt,j.displayName==null&&(j.displayName=Rt)}})}return We}function Rn(){var j=X.current;if(j===null)throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
24
|
+
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
25
|
+
2. You might be breaking the Rules of Hooks
|
|
26
|
+
3. You might have more than one copy of React in the same app
|
|
27
|
+
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`);return j}function Ls(j,be){var We=Rn();if(be!==void 0&&Qe("useContext() second argument is reserved for future use in React. Passing it is not supported. You passed: %s.%s",be,typeof be=="number"&&Array.isArray(arguments[2])?`
|
|
28
|
+
|
|
29
|
+
Did you call array.map(useContext)? Calling Hooks inside a loop is not supported. Learn more at https://reactjs.org/link/rules-of-hooks`:""),j._context!==void 0){var tt=j._context;tt.Consumer===j?Qe("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):tt.Provider===j&&Qe("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return We.useContext(j,be)}function ge(j){var be=Rn();return be.useState(j)}function lt(j,be,We){var tt=Rn();return tt.useReducer(j,be,We)}function yt(j){var be=Rn();return be.useRef(j)}function $t(j,be){var We=Rn();return We.useEffect(j,be)}function Nt(j,be){var We=Rn();return We.useLayoutEffect(j,be)}function Xt(j,be){var We=Rn();return We.useCallback(j,be)}function wn(j,be){var We=Rn();return We.useMemo(j,be)}function yn(j,be,We){var tt=Rn();return tt.useImperativeHandle(j,be,We)}function rr(j,be){{var We=Rn();return We.useDebugValue(j,be)}}var kn=0,lr,Jr,Vi,Ys,bi,xu,_l;function Ll(){}Ll.__reactDisabledLog=!0;function ui(){{if(kn===0){lr=console.log,Jr=console.info,Vi=console.warn,Ys=console.error,bi=console.group,xu=console.groupCollapsed,_l=console.groupEnd;var j={configurable:!0,enumerable:!0,value:Ll,writable:!0};Object.defineProperties(console,{info:j,log:j,warn:j,error:j,group:j,groupCollapsed:j,groupEnd:j})}kn++}}function Qi(){{if(kn--,kn===0){var j={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:t({},j,{value:lr}),info:t({},j,{value:Jr}),warn:t({},j,{value:Vi}),error:t({},j,{value:Ys}),group:t({},j,{value:bi}),groupCollapsed:t({},j,{value:xu}),groupEnd:t({},j,{value:_l})})}kn<0&&Qe("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var uo=Ve.ReactCurrentDispatcher,Ji;function pr(j,be,We){{if(Ji===void 0)try{throw Error()}catch(Rt){var tt=Rt.stack.trim().match(/\n( *(at )?)/);Ji=tt&&tt[1]||""}return`
|
|
30
|
+
`+Ji+j}}var ci=!1,Zi;{var $o=typeof WeakMap=="function"?WeakMap:Map;Zi=new $o}function Mi(j,be){if(!j||ci)return"";{var We=Zi.get(j);if(We!==void 0)return We}var tt;ci=!0;var Rt=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Kt;Kt=uo.current,uo.current=null,ui();try{if(be){var Qt=function(){throw Error()};if(Object.defineProperty(Qt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Qt,[])}catch(ni){tt=ni}Reflect.construct(j,[],Qt)}else{try{Qt.call()}catch(ni){tt=ni}j.call(Qt.prototype)}}else{try{throw Error()}catch(ni){tt=ni}j()}}catch(ni){if(ni&&tt&&typeof ni.stack=="string"){for(var bt=ni.stack.split(`
|
|
31
|
+
`),Dn=tt.stack.split(`
|
|
32
|
+
`),sr=bt.length-1,Zn=Dn.length-1;sr>=1&&Zn>=0&&bt[sr]!==Dn[Zn];)Zn--;for(;sr>=1&&Zn>=0;sr--,Zn--)if(bt[sr]!==Dn[Zn]){if(sr!==1||Zn!==1)do if(sr--,Zn--,Zn<0||bt[sr]!==Dn[Zn]){var Xn=`
|
|
33
|
+
`+bt[sr].replace(" at new "," at ");return typeof j=="function"&&Zi.set(j,Xn),Xn}while(sr>=1&&Zn>=0);break}}}finally{ci=!1,uo.current=Kt,Qi(),Error.prepareStackTrace=Rt}var wi=j?j.displayName||j.name:"",ti=wi?pr(wi):"";return typeof j=="function"&&Zi.set(j,ti),ti}function Ua(j,be,We){return Mi(j,!1)}function ks(j){var be=j.prototype;return!!(be&&be.isReactComponent)}function Ti(j,be,We){if(j==null)return"";if(typeof j=="function")return Mi(j,ks(j));if(typeof j=="string")return pr(j);switch(j){case r.Suspense:return pr("Suspense");case m:return pr("SuspenseList")}if(typeof j=="object")switch(j.$$typeof){case h:return Ua(j.render);case y:return Ti(j.type,be,We);case T:return Ua(j._render);case E:{var tt=j,Rt=tt._payload,Kt=tt._init;try{return Ti(Kt(Rt),be,We)}catch{}}}return""}var es={},fi=Ve.ReactDebugCurrentFrame;function ts(j){if(j){var be=j._owner,We=Ti(j.type,j._source,be?be.type:null);fi.setExtraStackFrame(We)}else fi.setExtraStackFrame(null)}function co(j,be,We,tt,Rt){{var Kt=Function.call.bind(Object.prototype.hasOwnProperty);for(var Qt in j)if(Kt(j,Qt)){var bt=void 0;try{if(typeof j[Qt]!="function"){var Dn=Error((tt||"React class")+": "+We+" type `"+Qt+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof j[Qt]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Dn.name="Invariant Violation",Dn}bt=j[Qt](be,Qt,tt,We,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(sr){bt=sr}bt&&!(bt instanceof Error)&&(ts(Rt),Qe("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",tt||"React class",We,Qt,typeof bt),ts(null)),bt instanceof Error&&!(bt.message in es)&&(es[bt.message]=!0,ts(Rt),Qe("Failed %s type: %s",We,bt.message),ts(null))}}}function ns(j){if(j){var be=j._owner,We=Ti(j.type,j._source,be?be.type:null);Re(We)}else Re(null)}var dt;dt=!1;function Vo(){if(ie.current){var j=Fn(ie.current.type);if(j)return`
|
|
34
|
+
|
|
35
|
+
Check the render method of \``+j+"`."}return""}function Or(j){if(j!==void 0){var be=j.fileName.replace(/^.*[\\\/]/,""),We=j.lineNumber;return`
|
|
36
|
+
|
|
37
|
+
Check your code at `+be+":"+We+"."}return""}function ma(j){return j!=null?Or(j.__source):""}var Ds={};function zo(j){var be=Vo();if(!be){var We=typeof j=="string"?j:j.displayName||j.name;We&&(be=`
|
|
38
|
+
|
|
39
|
+
Check the top-level render call using <`+We+">.")}return be}function Zr(j,be){if(!(!j._store||j._store.validated||j.key!=null)){j._store.validated=!0;var We=zo(be);if(!Ds[We]){Ds[We]=!0;var tt="";j&&j._owner&&j._owner!==ie.current&&(tt=" It was passed a child from "+Fn(j._owner.type)+"."),ns(j),Qe('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',We,tt),ns(null)}}}function ir(j,be){if(typeof j=="object"){if(Array.isArray(j))for(var We=0;We<j.length;We++){var tt=j[We];_r(tt)&&Zr(tt,be)}else if(_r(j))j._store&&(j._store.validated=!0);else if(j){var Rt=Y(j);if(typeof Rt=="function"&&Rt!==j.entries)for(var Kt=Rt.call(j),Qt;!(Qt=Kt.next()).done;)_r(Qt.value)&&Zr(Qt.value,be)}}}function ei(j){{var be=j.type;if(be==null||typeof be=="string")return;var We;if(typeof be=="function")We=be.propTypes;else if(typeof be=="object"&&(be.$$typeof===h||be.$$typeof===y))We=be.propTypes;else return;if(We){var tt=Fn(be);co(We,j.props,"prop",tt,j)}else if(be.PropTypes!==void 0&&!dt){dt=!0;var Rt=Fn(be);Qe("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Rt||"Unknown")}typeof be.getDefaultProps=="function"&&!be.getDefaultProps.isReactClassApproved&&Qe("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function bu(j){{for(var be=Object.keys(j.props),We=0;We<be.length;We++){var tt=be[We];if(tt!=="children"&&tt!=="key"){ns(j),Qe("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",tt),ns(null);break}}j.ref!==null&&(ns(j),Qe("Invalid attribute `ref` supplied to `React.Fragment`."),ns(null))}}function Er(j,be,We){var tt=li(j);if(!tt){var Rt="";(j===void 0||typeof j=="object"&&j!==null&&Object.keys(j).length===0)&&(Rt+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Kt=ma(be);Kt?Rt+=Kt:Rt+=Vo();var Qt;j===null?Qt="null":Array.isArray(j)?Qt="array":j!==void 0&&j.$$typeof===s?(Qt="<"+(Fn(j.type)||"Unknown")+" />",Rt=" Did you accidentally export a JSX literal instead of a component?"):Qt=typeof j,Qe("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Qt,Rt)}var bt=si.apply(this,arguments);if(bt==null)return bt;if(tt)for(var Dn=2;Dn<arguments.length;Dn++)ir(arguments[Dn],j);return j===r.Fragment?bu(bt):ei(bt),bt}var Oi=!1;function jo(j){var be=Er.bind(null,j);return be.type=j,Oi||(Oi=!0,ze("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(be,"type",{enumerable:!1,get:function(){return ze("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:j}),j}}),be}function ga(j,be,We){for(var tt=nr.apply(this,arguments),Rt=2;Rt<arguments.length;Rt++)ir(arguments[Rt],tt.type);return ei(tt),tt}try{var Ho=Object.freeze({})}catch{}var kl=Er,Dl=ga,Il=jo,Ba={map:Jt,forEach:$n,count:On,toArray:Yn,only:hr};r.Children=Ba,r.Component=He,r.PureComponent=gt,r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ve,r.cloneElement=Dl,r.createContext=Sr,r.createElement=kl,r.createFactory=Il,r.createRef=Dt,r.forwardRef=vt,r.isValidElement=_r,r.lazy=pa,r.memo=Qr,r.useCallback=Xt,r.useContext=Ls,r.useDebugValue=rr,r.useEffect=$t,r.useImperativeHandle=yn,r.useLayoutEffect=Nt,r.useMemo=wn,r.useReducer=lt,r.useRef=yt,r.useState=ge,r.version=n}()}(_y)),_y}var BI={};BI.NODE_ENV==="production"?Ry.exports=NI():Ry.exports=UI();var Tt=Ry.exports;const gr=Cy(Tt);var Ly={exports:{}},Da={},ng={exports:{}},ky={};/** @license React v0.20.2
|
|
40
|
+
* scheduler.production.min.js
|
|
41
|
+
*
|
|
42
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
43
|
+
*
|
|
44
|
+
* This source code is licensed under the MIT license found in the
|
|
45
|
+
* LICENSE file in the root directory of this source tree.
|
|
46
|
+
*/var sT;function $I(){return sT||(sT=1,function(r){var e,t,n,s;if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;r.unstable_now=function(){return o.now()}}else{var u=Date,c=u.now();r.unstable_now=function(){return u.now()-c}}if(typeof window>"u"||typeof MessageChannel!="function"){var h=null,m=null,y=function(){if(h!==null)try{var Be=r.unstable_now();h(!0,Be),h=null}catch(Je){throw setTimeout(y,0),Je}};e=function(Be){h!==null?setTimeout(e,0,Be):(h=Be,setTimeout(y,0))},t=function(Be,Je){m=setTimeout(Be,Je)},n=function(){clearTimeout(m)},r.unstable_shouldYield=function(){return!1},s=r.unstable_forceFrameRate=function(){}}else{var E=window.setTimeout,T=window.clearTimeout;if(typeof console<"u"){var R=window.cancelAnimationFrame;typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof R!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var _=!1,L=null,M=-1,F=5,Z=0;r.unstable_shouldYield=function(){return r.unstable_now()>=Z},s=function(){},r.unstable_forceFrameRate=function(Be){0>Be||125<Be?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<Be?Math.floor(1e3/Be):5};var K=new MessageChannel,Y=K.port2;K.port1.onmessage=function(){if(L!==null){var Be=r.unstable_now();Z=Be+F;try{L(!0,Be)?Y.postMessage(null):(_=!1,L=null)}catch(Je){throw Y.postMessage(null),Je}}else _=!1},e=function(Be){L=Be,_||(_=!0,Y.postMessage(null))},t=function(Be,Je){M=E(function(){Be(r.unstable_now())},Je)},n=function(){T(M),M=-1}}function X(Be,Je){var Xe=Be.length;Be.push(Je);e:for(;;){var Et=Xe-1>>>1,gt=Be[Et];if(gt!==void 0&&0<ye(gt,Je))Be[Et]=Je,Be[Xe]=gt,Xe=Et;else break e}}function ue(Be){return Be=Be[0],Be===void 0?null:Be}function ie(Be){var Je=Be[0];if(Je!==void 0){var Xe=Be.pop();if(Xe!==Je){Be[0]=Xe;e:for(var Et=0,gt=Be.length;Et<gt;){var Ot=2*(Et+1)-1,Dt=Be[Ot],bn=Ot+1,tn=Be[bn];if(Dt!==void 0&&0>ye(Dt,Xe))tn!==void 0&&0>ye(tn,Dt)?(Be[Et]=tn,Be[bn]=Xe,Et=bn):(Be[Et]=Dt,Be[Ot]=Xe,Et=Ot);else if(tn!==void 0&&0>ye(tn,Xe))Be[Et]=tn,Be[bn]=Xe,Et=bn;else break e}}return Je}return null}function ye(Be,Je){var Xe=Be.sortIndex-Je.sortIndex;return Xe!==0?Xe:Be.id-Je.id}var de=[],Re=[],Ce=1,Ve=null,ze=3,Qe=!1,et=!1,Pe=!1;function ne(Be){for(var Je=ue(Re);Je!==null;){if(Je.callback===null)ie(Re);else if(Je.startTime<=Be)ie(Re),Je.sortIndex=Je.expirationTime,X(de,Je);else break;Je=ue(Re)}}function _e(Be){if(Pe=!1,ne(Be),!et)if(ue(de)!==null)et=!0,e(Ue);else{var Je=ue(Re);Je!==null&&t(_e,Je.startTime-Be)}}function Ue(Be,Je){et=!1,Pe&&(Pe=!1,n()),Qe=!0;var Xe=ze;try{for(ne(Je),Ve=ue(de);Ve!==null&&(!(Ve.expirationTime>Je)||Be&&!r.unstable_shouldYield());){var Et=Ve.callback;if(typeof Et=="function"){Ve.callback=null,ze=Ve.priorityLevel;var gt=Et(Ve.expirationTime<=Je);Je=r.unstable_now(),typeof gt=="function"?Ve.callback=gt:Ve===ue(de)&&ie(de),ne(Je)}else ie(de);Ve=ue(de)}if(Ve!==null)var Ot=!0;else{var Dt=ue(Re);Dt!==null&&t(_e,Dt.startTime-Je),Ot=!1}return Ot}finally{Ve=null,ze=Xe,Qe=!1}}var He=s;r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(Be){Be.callback=null},r.unstable_continueExecution=function(){et||Qe||(et=!0,e(Ue))},r.unstable_getCurrentPriorityLevel=function(){return ze},r.unstable_getFirstCallbackNode=function(){return ue(de)},r.unstable_next=function(Be){switch(ze){case 1:case 2:case 3:var Je=3;break;default:Je=ze}var Xe=ze;ze=Je;try{return Be()}finally{ze=Xe}},r.unstable_pauseExecution=function(){},r.unstable_requestPaint=He,r.unstable_runWithPriority=function(Be,Je){switch(Be){case 1:case 2:case 3:case 4:case 5:break;default:Be=3}var Xe=ze;ze=Be;try{return Je()}finally{ze=Xe}},r.unstable_scheduleCallback=function(Be,Je,Xe){var Et=r.unstable_now();switch(typeof Xe=="object"&&Xe!==null?(Xe=Xe.delay,Xe=typeof Xe=="number"&&0<Xe?Et+Xe:Et):Xe=Et,Be){case 1:var gt=-1;break;case 2:gt=250;break;case 5:gt=1073741823;break;case 4:gt=1e4;break;default:gt=5e3}return gt=Xe+gt,Be={id:Ce++,callback:Je,priorityLevel:Be,startTime:Xe,expirationTime:gt,sortIndex:-1},Xe>Et?(Be.sortIndex=Xe,X(Re,Be),ue(de)===null&&Be===ue(Re)&&(Pe?n():Pe=!0,t(_e,Xe-Et))):(Be.sortIndex=gt,X(de,Be),et||Qe||(et=!0,e(Ue))),Be},r.unstable_wrapCallback=function(Be){var Je=ze;return function(){var Xe=ze;ze=Je;try{return Be.apply(this,arguments)}finally{ze=Xe}}}}(ky)),ky}var Dy={},aT;function VI(){return aT||(aT=1,function(r){var e={};/** @license React v0.20.2
|
|
47
|
+
* scheduler.development.js
|
|
48
|
+
*
|
|
49
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
50
|
+
*
|
|
51
|
+
* This source code is licensed under the MIT license found in the
|
|
52
|
+
* LICENSE file in the root directory of this source tree.
|
|
53
|
+
*/e.NODE_ENV!=="production"&&function(){var t=!1,n=!1,s,o,u,c,h=typeof performance=="object"&&typeof performance.now=="function";if(h){var m=performance;r.unstable_now=function(){return m.now()}}else{var y=Date,E=y.now();r.unstable_now=function(){return y.now()-E}}if(typeof window>"u"||typeof MessageChannel!="function"){var T=null,R=null,_=function(){if(T!==null)try{var xt=r.unstable_now(),Pt=!0;T(Pt,xt),T=null}catch(Jt){throw setTimeout(_,0),Jt}};s=function(xt){T!==null?setTimeout(s,0,xt):(T=xt,setTimeout(_,0))},o=function(xt,Pt){R=setTimeout(xt,Pt)},u=function(){clearTimeout(R)},r.unstable_shouldYield=function(){return!1},c=r.unstable_forceFrameRate=function(){}}else{var L=window.setTimeout,M=window.clearTimeout;if(typeof console<"u"){var F=window.requestAnimationFrame,Z=window.cancelAnimationFrame;typeof F!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof Z!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var K=!1,Y=null,X=-1,ue=5,ie=0;r.unstable_shouldYield=function(){return r.unstable_now()>=ie},c=function(){},r.unstable_forceFrameRate=function(xt){if(xt<0||xt>125){console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported");return}xt>0?ue=Math.floor(1e3/xt):ue=5};var ye=function(){if(Y!==null){var xt=r.unstable_now();ie=xt+ue;var Pt=!0;try{var Jt=Y(Pt,xt);Jt?Re.postMessage(null):(K=!1,Y=null)}catch(On){throw Re.postMessage(null),On}}else K=!1},de=new MessageChannel,Re=de.port2;de.port1.onmessage=ye,s=function(xt){Y=xt,K||(K=!0,Re.postMessage(null))},o=function(xt,Pt){X=L(function(){xt(r.unstable_now())},Pt)},u=function(){M(X),X=-1}}function Ce(xt,Pt){var Jt=xt.length;xt.push(Pt),Qe(xt,Pt,Jt)}function Ve(xt){var Pt=xt[0];return Pt===void 0?null:Pt}function ze(xt){var Pt=xt[0];if(Pt!==void 0){var Jt=xt.pop();return Jt!==Pt&&(xt[0]=Jt,et(xt,Jt,0)),Pt}else return null}function Qe(xt,Pt,Jt){for(var On=Jt;;){var $n=On-1>>>1,Yn=xt[$n];if(Yn!==void 0&&Pe(Yn,Pt)>0)xt[$n]=Pt,xt[On]=Yn,On=$n;else return}}function et(xt,Pt,Jt){for(var On=Jt,$n=xt.length;On<$n;){var Yn=(On+1)*2-1,hr=xt[Yn],Sr=Yn+1,jn=xt[Sr];if(hr!==void 0&&Pe(hr,Pt)<0)jn!==void 0&&Pe(jn,hr)<0?(xt[On]=jn,xt[Sr]=Pt,On=Sr):(xt[On]=hr,xt[Yn]=Pt,On=Yn);else if(jn!==void 0&&Pe(jn,Pt)<0)xt[On]=jn,xt[Sr]=Pt,On=Sr;else return}}function Pe(xt,Pt){var Jt=xt.sortIndex-Pt.sortIndex;return Jt!==0?Jt:xt.id-Pt.id}var ne=1,_e=2,Ue=3,He=4,Be=5;function Je(xt,Pt){}var Xe=1073741823,Et=-1,gt=250,Ot=5e3,Dt=1e4,bn=Xe,tn=[],Fn=[],wt=1,Tn=null,Mn=Ue,Pi=!1,Rr=!1,Ar=!1;function ii(xt){for(var Pt=Ve(Fn);Pt!==null;){if(Pt.callback===null)ze(Fn);else if(Pt.startTime<=xt)ze(Fn),Pt.sortIndex=Pt.expirationTime,Ce(tn,Pt);else return;Pt=Ve(Fn)}}function Xr(xt){if(Ar=!1,ii(xt),!Rr)if(Ve(tn)!==null)Rr=!0,s(xi);else{var Pt=Ve(Fn);Pt!==null&&o(Xr,Pt.startTime-xt)}}function xi(xt,Pt){Rr=!1,Ar&&(Ar=!1,u()),Pi=!0;var Jt=Mn;try{var On;if(!n)return As(xt,Pt)}finally{Tn=null,Mn=Jt,Pi=!1}}function As(xt,Pt){var Jt=Pt;for(ii(Jt),Tn=Ve(tn);Tn!==null&&!t&&!(Tn.expirationTime>Jt&&(!xt||r.unstable_shouldYield()));){var On=Tn.callback;if(typeof On=="function"){Tn.callback=null,Mn=Tn.priorityLevel;var $n=Tn.expirationTime<=Jt,Yn=On($n);Jt=r.unstable_now(),typeof Yn=="function"?Tn.callback=Yn:Tn===Ve(tn)&&ze(tn),ii(Jt)}else ze(tn);Tn=Ve(tn)}if(Tn!==null)return!0;var hr=Ve(Fn);return hr!==null&&o(Xr,hr.startTime-Jt),!1}function Pr(xt,Pt){switch(xt){case ne:case _e:case Ue:case He:case Be:break;default:xt=Ue}var Jt=Mn;Mn=xt;try{return Pt()}finally{Mn=Jt}}function si(xt){var Pt;switch(Mn){case ne:case _e:case Ue:Pt=Ue;break;default:Pt=Mn;break}var Jt=Mn;Mn=Pt;try{return xt()}finally{Mn=Jt}}function Ft(xt){var Pt=Mn;return function(){var Jt=Mn;Mn=Pt;try{return xt.apply(this,arguments)}finally{Mn=Jt}}}function nr(xt,Pt,Jt){var On=r.unstable_now(),$n;if(typeof Jt=="object"&&Jt!==null){var Yn=Jt.delay;typeof Yn=="number"&&Yn>0?$n=On+Yn:$n=On}else $n=On;var hr;switch(xt){case ne:hr=Et;break;case _e:hr=gt;break;case Be:hr=bn;break;case He:hr=Dt;break;case Ue:default:hr=Ot;break}var Sr=$n+hr,jn={id:wt++,callback:Pt,priorityLevel:xt,startTime:$n,expirationTime:Sr,sortIndex:-1};return $n>On?(jn.sortIndex=$n,Ce(Fn,jn),Ve(tn)===null&&jn===Ve(Fn)&&(Ar?u():Ar=!0,o(Xr,$n-On))):(jn.sortIndex=Sr,Ce(tn,jn),!Rr&&!Pi&&(Rr=!0,s(xi))),jn}function _r(){}function ai(){!Rr&&!Pi&&(Rr=!0,s(xi))}function or(){return Ve(tn)}function dr(xt){xt.callback=null}function fa(){return Mn}var da=c,Mr=null;r.unstable_IdlePriority=Be,r.unstable_ImmediatePriority=ne,r.unstable_LowPriority=He,r.unstable_NormalPriority=Ue,r.unstable_Profiling=Mr,r.unstable_UserBlockingPriority=_e,r.unstable_cancelCallback=dr,r.unstable_continueExecution=ai,r.unstable_getCurrentPriorityLevel=fa,r.unstable_getFirstCallbackNode=or,r.unstable_next=si,r.unstable_pauseExecution=_r,r.unstable_requestPaint=da,r.unstable_runWithPriority=Pr,r.unstable_scheduleCallback=nr,r.unstable_wrapCallback=Ft}()}(Dy)),Dy}var oT;function lT(){if(oT)return ng.exports;oT=1;var r={};return r.NODE_ENV==="production"?ng.exports=$I():ng.exports=VI(),ng.exports}/** @license React v17.0.2
|
|
54
|
+
* react-dom.production.min.js
|
|
55
|
+
*
|
|
56
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
57
|
+
*
|
|
58
|
+
* This source code is licensed under the MIT license found in the
|
|
59
|
+
* LICENSE file in the root directory of this source tree.
|
|
60
|
+
*/var uT;function zI(){if(uT)return Da;uT=1;var r=Tt,e=Ed(),t=lT();function n(l){for(var d="https://reactjs.org/docs/error-decoder.html?invariant="+l,g=1;g<arguments.length;g++)d+="&args[]="+encodeURIComponent(arguments[g]);return"Minified React error #"+l+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(n(227));var s=new Set,o={};function u(l,d){c(l,d),c(l+"Capture",d)}function c(l,d){for(o[l]=d,l=0;l<d.length;l++)s.add(d[l])}var h=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),m=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,y=Object.prototype.hasOwnProperty,E={},T={};function R(l){return y.call(T,l)?!0:y.call(E,l)?!1:m.test(l)?T[l]=!0:(E[l]=!0,!1)}function _(l,d,g,w){if(g!==null&&g.type===0)return!1;switch(typeof d){case"function":case"symbol":return!0;case"boolean":return w?!1:g!==null?!g.acceptsBooleans:(l=l.toLowerCase().slice(0,5),l!=="data-"&&l!=="aria-");default:return!1}}function L(l,d,g,w){if(d===null||typeof d>"u"||_(l,d,g,w))return!0;if(w)return!1;if(g!==null)switch(g.type){case 3:return!d;case 4:return d===!1;case 5:return isNaN(d);case 6:return isNaN(d)||1>d}return!1}function M(l,d,g,w,k,N,W){this.acceptsBooleans=d===2||d===3||d===4,this.attributeName=w,this.attributeNamespace=k,this.mustUseProperty=g,this.propertyName=l,this.type=d,this.sanitizeURL=N,this.removeEmptyString=W}var F={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(l){F[l]=new M(l,0,!1,l,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(l){var d=l[0];F[d]=new M(d,1,!1,l[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(l){F[l]=new M(l,2,!1,l.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(l){F[l]=new M(l,2,!1,l,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(l){F[l]=new M(l,3,!1,l.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(l){F[l]=new M(l,3,!0,l,null,!1,!1)}),["capture","download"].forEach(function(l){F[l]=new M(l,4,!1,l,null,!1,!1)}),["cols","rows","size","span"].forEach(function(l){F[l]=new M(l,6,!1,l,null,!1,!1)}),["rowSpan","start"].forEach(function(l){F[l]=new M(l,5,!1,l.toLowerCase(),null,!1,!1)});var Z=/[\-:]([a-z])/g;function K(l){return l[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(l){var d=l.replace(Z,K);F[d]=new M(d,1,!1,l,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(l){var d=l.replace(Z,K);F[d]=new M(d,1,!1,l,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(l){var d=l.replace(Z,K);F[d]=new M(d,1,!1,l,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(l){F[l]=new M(l,1,!1,l.toLowerCase(),null,!1,!1)}),F.xlinkHref=new M("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(l){F[l]=new M(l,1,!1,l.toLowerCase(),null,!0,!0)});function Y(l,d,g,w){var k=F.hasOwnProperty(d)?F[d]:null,N=k!==null?k.type===0:w?!1:!(!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N");N||(L(d,g,k,w)&&(g=null),w||k===null?R(d)&&(g===null?l.removeAttribute(d):l.setAttribute(d,""+g)):k.mustUseProperty?l[k.propertyName]=g===null?k.type===3?!1:"":g:(d=k.attributeName,w=k.attributeNamespace,g===null?l.removeAttribute(d):(k=k.type,g=k===3||k===4&&g===!0?"":""+g,w?l.setAttributeNS(w,d,g):l.setAttribute(d,g))))}var X=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ue=60103,ie=60106,ye=60107,de=60108,Re=60114,Ce=60109,Ve=60110,ze=60112,Qe=60113,et=60120,Pe=60115,ne=60116,_e=60121,Ue=60128,He=60129,Be=60130,Je=60131;if(typeof Symbol=="function"&&Symbol.for){var Xe=Symbol.for;ue=Xe("react.element"),ie=Xe("react.portal"),ye=Xe("react.fragment"),de=Xe("react.strict_mode"),Re=Xe("react.profiler"),Ce=Xe("react.provider"),Ve=Xe("react.context"),ze=Xe("react.forward_ref"),Qe=Xe("react.suspense"),et=Xe("react.suspense_list"),Pe=Xe("react.memo"),ne=Xe("react.lazy"),_e=Xe("react.block"),Xe("react.scope"),Ue=Xe("react.opaque.id"),He=Xe("react.debug_trace_mode"),Be=Xe("react.offscreen"),Je=Xe("react.legacy_hidden")}var Et=typeof Symbol=="function"&&Symbol.iterator;function gt(l){return l===null||typeof l!="object"?null:(l=Et&&l[Et]||l["@@iterator"],typeof l=="function"?l:null)}var Ot;function Dt(l){if(Ot===void 0)try{throw Error()}catch(g){var d=g.stack.trim().match(/\n( *(at )?)/);Ot=d&&d[1]||""}return`
|
|
61
|
+
`+Ot+l}var bn=!1;function tn(l,d){if(!l||bn)return"";bn=!0;var g=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(d)if(d=function(){throw Error()},Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(Se){var w=Se}Reflect.construct(l,[],d)}else{try{d.call()}catch(Se){w=Se}l.call(d.prototype)}else{try{throw Error()}catch(Se){w=Se}l()}}catch(Se){if(Se&&w&&typeof Se.stack=="string"){for(var k=Se.stack.split(`
|
|
62
|
+
`),N=w.stack.split(`
|
|
63
|
+
`),W=k.length-1,re=N.length-1;1<=W&&0<=re&&k[W]!==N[re];)re--;for(;1<=W&&0<=re;W--,re--)if(k[W]!==N[re]){if(W!==1||re!==1)do if(W--,re--,0>re||k[W]!==N[re])return`
|
|
64
|
+
`+k[W].replace(" at new "," at ");while(1<=W&&0<=re);break}}}finally{bn=!1,Error.prepareStackTrace=g}return(l=l?l.displayName||l.name:"")?Dt(l):""}function Fn(l){switch(l.tag){case 5:return Dt(l.type);case 16:return Dt("Lazy");case 13:return Dt("Suspense");case 19:return Dt("SuspenseList");case 0:case 2:case 15:return l=tn(l.type,!1),l;case 11:return l=tn(l.type.render,!1),l;case 22:return l=tn(l.type._render,!1),l;case 1:return l=tn(l.type,!0),l;default:return""}}function wt(l){if(l==null)return null;if(typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case ye:return"Fragment";case ie:return"Portal";case Re:return"Profiler";case de:return"StrictMode";case Qe:return"Suspense";case et:return"SuspenseList"}if(typeof l=="object")switch(l.$$typeof){case Ve:return(l.displayName||"Context")+".Consumer";case Ce:return(l._context.displayName||"Context")+".Provider";case ze:var d=l.render;return d=d.displayName||d.name||"",l.displayName||(d!==""?"ForwardRef("+d+")":"ForwardRef");case Pe:return wt(l.type);case _e:return wt(l._render);case ne:d=l._payload,l=l._init;try{return wt(l(d))}catch{}}return null}function Tn(l){switch(typeof l){case"boolean":case"number":case"object":case"string":case"undefined":return l;default:return""}}function Mn(l){var d=l.type;return(l=l.nodeName)&&l.toLowerCase()==="input"&&(d==="checkbox"||d==="radio")}function Pi(l){var d=Mn(l)?"checked":"value",g=Object.getOwnPropertyDescriptor(l.constructor.prototype,d),w=""+l[d];if(!l.hasOwnProperty(d)&&typeof g<"u"&&typeof g.get=="function"&&typeof g.set=="function"){var k=g.get,N=g.set;return Object.defineProperty(l,d,{configurable:!0,get:function(){return k.call(this)},set:function(W){w=""+W,N.call(this,W)}}),Object.defineProperty(l,d,{enumerable:g.enumerable}),{getValue:function(){return w},setValue:function(W){w=""+W},stopTracking:function(){l._valueTracker=null,delete l[d]}}}}function Rr(l){l._valueTracker||(l._valueTracker=Pi(l))}function Ar(l){if(!l)return!1;var d=l._valueTracker;if(!d)return!0;var g=d.getValue(),w="";return l&&(w=Mn(l)?l.checked?"true":"false":l.value),l=w,l!==g?(d.setValue(l),!0):!1}function ii(l){if(l=l||(typeof document<"u"?document:void 0),typeof l>"u")return null;try{return l.activeElement||l.body}catch{return l.body}}function Xr(l,d){var g=d.checked;return e({},d,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:g??l._wrapperState.initialChecked})}function xi(l,d){var g=d.defaultValue==null?"":d.defaultValue,w=d.checked!=null?d.checked:d.defaultChecked;g=Tn(d.value!=null?d.value:g),l._wrapperState={initialChecked:w,initialValue:g,controlled:d.type==="checkbox"||d.type==="radio"?d.checked!=null:d.value!=null}}function As(l,d){d=d.checked,d!=null&&Y(l,"checked",d,!1)}function Pr(l,d){As(l,d);var g=Tn(d.value),w=d.type;if(g!=null)w==="number"?(g===0&&l.value===""||l.value!=g)&&(l.value=""+g):l.value!==""+g&&(l.value=""+g);else if(w==="submit"||w==="reset"){l.removeAttribute("value");return}d.hasOwnProperty("value")?Ft(l,d.type,g):d.hasOwnProperty("defaultValue")&&Ft(l,d.type,Tn(d.defaultValue)),d.checked==null&&d.defaultChecked!=null&&(l.defaultChecked=!!d.defaultChecked)}function si(l,d,g){if(d.hasOwnProperty("value")||d.hasOwnProperty("defaultValue")){var w=d.type;if(!(w!=="submit"&&w!=="reset"||d.value!==void 0&&d.value!==null))return;d=""+l._wrapperState.initialValue,g||d===l.value||(l.value=d),l.defaultValue=d}g=l.name,g!==""&&(l.name=""),l.defaultChecked=!!l._wrapperState.initialChecked,g!==""&&(l.name=g)}function Ft(l,d,g){(d!=="number"||ii(l.ownerDocument)!==l)&&(g==null?l.defaultValue=""+l._wrapperState.initialValue:l.defaultValue!==""+g&&(l.defaultValue=""+g))}function nr(l){var d="";return r.Children.forEach(l,function(g){g!=null&&(d+=g)}),d}function _r(l,d){return l=e({children:void 0},d),(d=nr(d.children))&&(l.children=d),l}function ai(l,d,g,w){if(l=l.options,d){d={};for(var k=0;k<g.length;k++)d["$"+g[k]]=!0;for(g=0;g<l.length;g++)k=d.hasOwnProperty("$"+l[g].value),l[g].selected!==k&&(l[g].selected=k),k&&w&&(l[g].defaultSelected=!0)}else{for(g=""+Tn(g),d=null,k=0;k<l.length;k++){if(l[k].value===g){l[k].selected=!0,w&&(l[k].defaultSelected=!0);return}d!==null||l[k].disabled||(d=l[k])}d!==null&&(d.selected=!0)}}function or(l,d){if(d.dangerouslySetInnerHTML!=null)throw Error(n(91));return e({},d,{value:void 0,defaultValue:void 0,children:""+l._wrapperState.initialValue})}function dr(l,d){var g=d.value;if(g==null){if(g=d.children,d=d.defaultValue,g!=null){if(d!=null)throw Error(n(92));if(Array.isArray(g)){if(!(1>=g.length))throw Error(n(93));g=g[0]}d=g}d==null&&(d=""),g=d}l._wrapperState={initialValue:Tn(g)}}function fa(l,d){var g=Tn(d.value),w=Tn(d.defaultValue);g!=null&&(g=""+g,g!==l.value&&(l.value=g),d.defaultValue==null&&l.defaultValue!==g&&(l.defaultValue=g)),w!=null&&(l.defaultValue=""+w)}function da(l){var d=l.textContent;d===l._wrapperState.initialValue&&d!==""&&d!==null&&(l.value=d)}var Mr={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function xt(l){switch(l){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Pt(l,d){return l==null||l==="http://www.w3.org/1999/xhtml"?xt(d):l==="http://www.w3.org/2000/svg"&&d==="foreignObject"?"http://www.w3.org/1999/xhtml":l}var Jt,On=function(l){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(d,g,w,k){MSApp.execUnsafeLocalFunction(function(){return l(d,g,w,k)})}:l}(function(l,d){if(l.namespaceURI!==Mr.svg||"innerHTML"in l)l.innerHTML=d;else{for(Jt=Jt||document.createElement("div"),Jt.innerHTML="<svg>"+d.valueOf().toString()+"</svg>",d=Jt.firstChild;l.firstChild;)l.removeChild(l.firstChild);for(;d.firstChild;)l.appendChild(d.firstChild)}});function $n(l,d){if(d){var g=l.firstChild;if(g&&g===l.lastChild&&g.nodeType===3){g.nodeValue=d;return}}l.textContent=d}var Yn={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},hr=["Webkit","ms","Moz","O"];Object.keys(Yn).forEach(function(l){hr.forEach(function(d){d=d+l.charAt(0).toUpperCase()+l.substring(1),Yn[d]=Yn[l]})});function Sr(l,d,g){return d==null||typeof d=="boolean"||d===""?"":g||typeof d!="number"||d===0||Yn.hasOwnProperty(l)&&Yn[l]?(""+d).trim():d+"px"}function jn(l,d){l=l.style;for(var g in d)if(d.hasOwnProperty(g)){var w=g.indexOf("--")===0,k=Sr(g,d[g],w);g==="float"&&(g="cssFloat"),w?l.setProperty(g,k):l[g]=k}}var oi=e({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ha(l,d){if(d){if(oi[l]&&(d.children!=null||d.dangerouslySetInnerHTML!=null))throw Error(n(137,l));if(d.dangerouslySetInnerHTML!=null){if(d.children!=null)throw Error(n(60));if(!(typeof d.dangerouslySetInnerHTML=="object"&&"__html"in d.dangerouslySetInnerHTML))throw Error(n(61))}if(d.style!=null&&typeof d.style!="object")throw Error(n(62))}}function _s(l,d){if(l.indexOf("-")===-1)return typeof d.is=="string";switch(l){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function qs(l){return l=l.target||l.srcElement||window,l.correspondingUseElement&&(l=l.correspondingUseElement),l.nodeType===3?l.parentNode:l}var pa=null,vt=null,Nn=null;function li(l){if(l=Ef(l)){if(typeof pa!="function")throw Error(n(280));var d=l.stateNode;d&&(d=Zs(d),pa(l.stateNode,l.type,d))}}function Qr(l){vt?Nn?Nn.push(l):Nn=[l]:vt=l}function Rn(){if(vt){var l=vt,d=Nn;if(Nn=vt=null,li(l),d)for(l=0;l<d.length;l++)li(d[l])}}function Ls(l,d){return l(d)}function ge(l,d,g,w,k){return l(d,g,w,k)}function lt(){}var yt=Ls,$t=!1,Nt=!1;function Xt(){(vt!==null||Nn!==null)&&(lt(),Rn())}function wn(l,d,g){if(Nt)return l(d,g);Nt=!0;try{return yt(l,d,g)}finally{Nt=!1,Xt()}}function yn(l,d){var g=l.stateNode;if(g===null)return null;var w=Zs(g);if(w===null)return null;g=w[d];e:switch(d){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(w=!w.disabled)||(l=l.type,w=!(l==="button"||l==="input"||l==="select"||l==="textarea")),l=!w;break e;default:l=!1}if(l)return null;if(g&&typeof g!="function")throw Error(n(231,d,typeof g));return g}var rr=!1;if(h)try{var kn={};Object.defineProperty(kn,"passive",{get:function(){rr=!0}}),window.addEventListener("test",kn,kn),window.removeEventListener("test",kn,kn)}catch{rr=!1}function lr(l,d,g,w,k,N,W,re,Se){var Ye=Array.prototype.slice.call(arguments,3);try{d.apply(g,Ye)}catch(It){this.onError(It)}}var Jr=!1,Vi=null,Ys=!1,bi=null,xu={onError:function(l){Jr=!0,Vi=l}};function _l(l,d,g,w,k,N,W,re,Se){Jr=!1,Vi=null,lr.apply(xu,arguments)}function Ll(l,d,g,w,k,N,W,re,Se){if(_l.apply(this,arguments),Jr){if(Jr){var Ye=Vi;Jr=!1,Vi=null}else throw Error(n(198));Ys||(Ys=!0,bi=Ye)}}function ui(l){var d=l,g=l;if(l.alternate)for(;d.return;)d=d.return;else{l=d;do d=l,d.flags&1026&&(g=d.return),l=d.return;while(l)}return d.tag===3?g:null}function Qi(l){if(l.tag===13){var d=l.memoizedState;if(d===null&&(l=l.alternate,l!==null&&(d=l.memoizedState)),d!==null)return d.dehydrated}return null}function uo(l){if(ui(l)!==l)throw Error(n(188))}function Ji(l){var d=l.alternate;if(!d){if(d=ui(l),d===null)throw Error(n(188));return d!==l?null:l}for(var g=l,w=d;;){var k=g.return;if(k===null)break;var N=k.alternate;if(N===null){if(w=k.return,w!==null){g=w;continue}break}if(k.child===N.child){for(N=k.child;N;){if(N===g)return uo(k),l;if(N===w)return uo(k),d;N=N.sibling}throw Error(n(188))}if(g.return!==w.return)g=k,w=N;else{for(var W=!1,re=k.child;re;){if(re===g){W=!0,g=k,w=N;break}if(re===w){W=!0,w=k,g=N;break}re=re.sibling}if(!W){for(re=N.child;re;){if(re===g){W=!0,g=N,w=k;break}if(re===w){W=!0,w=N,g=k;break}re=re.sibling}if(!W)throw Error(n(189))}}if(g.alternate!==w)throw Error(n(190))}if(g.tag!==3)throw Error(n(188));return g.stateNode.current===g?l:d}function pr(l){if(l=Ji(l),!l)return null;for(var d=l;;){if(d.tag===5||d.tag===6)return d;if(d.child)d.child.return=d,d=d.child;else{if(d===l)break;for(;!d.sibling;){if(!d.return||d.return===l)return null;d=d.return}d.sibling.return=d.return,d=d.sibling}}return null}function ci(l,d){for(var g=l.alternate;d!==null;){if(d===l||d===g)return!0;d=d.return}return!1}var Zi,$o,Mi,Ua,ks=!1,Ti=[],es=null,fi=null,ts=null,co=new Map,ns=new Map,dt=[],Vo="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Or(l,d,g,w,k){return{blockedOn:l,domEventName:d,eventSystemFlags:g|16,nativeEvent:k,targetContainers:[w]}}function ma(l,d){switch(l){case"focusin":case"focusout":es=null;break;case"dragenter":case"dragleave":fi=null;break;case"mouseover":case"mouseout":ts=null;break;case"pointerover":case"pointerout":co.delete(d.pointerId);break;case"gotpointercapture":case"lostpointercapture":ns.delete(d.pointerId)}}function Ds(l,d,g,w,k,N){return l===null||l.nativeEvent!==N?(l=Or(d,g,w,k,N),d!==null&&(d=Ef(d),d!==null&&$o(d)),l):(l.eventSystemFlags|=w,d=l.targetContainers,k!==null&&d.indexOf(k)===-1&&d.push(k),l)}function zo(l,d,g,w,k){switch(d){case"focusin":return es=Ds(es,l,d,g,w,k),!0;case"dragenter":return fi=Ds(fi,l,d,g,w,k),!0;case"mouseover":return ts=Ds(ts,l,d,g,w,k),!0;case"pointerover":var N=k.pointerId;return co.set(N,Ds(co.get(N)||null,l,d,g,w,k)),!0;case"gotpointercapture":return N=k.pointerId,ns.set(N,Ds(ns.get(N)||null,l,d,g,w,k)),!0}return!1}function Zr(l){var d=ku(l.target);if(d!==null){var g=ui(d);if(g!==null){if(d=g.tag,d===13){if(d=Qi(g),d!==null){l.blockedOn=d,Ua(l.lanePriority,function(){t.unstable_runWithPriority(l.priority,function(){Mi(g)})});return}}else if(d===3&&g.stateNode.hydrate){l.blockedOn=g.tag===3?g.stateNode.containerInfo:null;return}}}l.blockedOn=null}function ir(l){if(l.blockedOn!==null)return!1;for(var d=l.targetContainers;0<d.length;){var g=wu(l.domEventName,l.eventSystemFlags,d[0],l.nativeEvent);if(g!==null)return d=Ef(g),d!==null&&$o(d),l.blockedOn=g,!1;d.shift()}return!0}function ei(l,d,g){ir(l)&&g.delete(d)}function bu(){for(ks=!1;0<Ti.length;){var l=Ti[0];if(l.blockedOn!==null){l=Ef(l.blockedOn),l!==null&&Zi(l);break}for(var d=l.targetContainers;0<d.length;){var g=wu(l.domEventName,l.eventSystemFlags,d[0],l.nativeEvent);if(g!==null){l.blockedOn=g;break}d.shift()}l.blockedOn===null&&Ti.shift()}es!==null&&ir(es)&&(es=null),fi!==null&&ir(fi)&&(fi=null),ts!==null&&ir(ts)&&(ts=null),co.forEach(ei),ns.forEach(ei)}function Er(l,d){l.blockedOn===d&&(l.blockedOn=null,ks||(ks=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,bu)))}function Oi(l){function d(k){return Er(k,l)}if(0<Ti.length){Er(Ti[0],l);for(var g=1;g<Ti.length;g++){var w=Ti[g];w.blockedOn===l&&(w.blockedOn=null)}}for(es!==null&&Er(es,l),fi!==null&&Er(fi,l),ts!==null&&Er(ts,l),co.forEach(d),ns.forEach(d),g=0;g<dt.length;g++)w=dt[g],w.blockedOn===l&&(w.blockedOn=null);for(;0<dt.length&&(g=dt[0],g.blockedOn===null);)Zr(g),g.blockedOn===null&&dt.shift()}function jo(l,d){var g={};return g[l.toLowerCase()]=d.toLowerCase(),g["Webkit"+l]="webkit"+d,g["Moz"+l]="moz"+d,g}var ga={animationend:jo("Animation","AnimationEnd"),animationiteration:jo("Animation","AnimationIteration"),animationstart:jo("Animation","AnimationStart"),transitionend:jo("Transition","TransitionEnd")},Ho={},kl={};h&&(kl=document.createElement("div").style,"AnimationEvent"in window||(delete ga.animationend.animation,delete ga.animationiteration.animation,delete ga.animationstart.animation),"TransitionEvent"in window||delete ga.transitionend.transition);function Dl(l){if(Ho[l])return Ho[l];if(!ga[l])return l;var d=ga[l],g;for(g in d)if(d.hasOwnProperty(g)&&g in kl)return Ho[l]=d[g];return l}var Il=Dl("animationend"),Ba=Dl("animationiteration"),j=Dl("animationstart"),be=Dl("transitionend"),We=new Map,tt=new Map,Rt=["abort","abort",Il,"animationEnd",Ba,"animationIteration",j,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",be,"transitionEnd","waiting","waiting"];function Kt(l,d){for(var g=0;g<l.length;g+=2){var w=l[g],k=l[g+1];k="on"+(k[0].toUpperCase()+k.slice(1)),tt.set(w,d),We.set(w,k),u(k,[w])}}var Qt=t.unstable_now;Qt();var bt=8;function Dn(l){if(1&l)return bt=15,1;if(2&l)return bt=14,2;if(4&l)return bt=13,4;var d=24&l;return d!==0?(bt=12,d):l&32?(bt=11,32):(d=192&l,d!==0?(bt=10,d):l&256?(bt=9,256):(d=3584&l,d!==0?(bt=8,d):l&4096?(bt=7,4096):(d=4186112&l,d!==0?(bt=6,d):(d=62914560&l,d!==0?(bt=5,d):l&67108864?(bt=4,67108864):l&134217728?(bt=3,134217728):(d=805306368&l,d!==0?(bt=2,d):1073741824&l?(bt=1,1073741824):(bt=8,l))))))}function sr(l){switch(l){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function Zn(l){switch(l){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(n(358,l))}}function Xn(l,d){var g=l.pendingLanes;if(g===0)return bt=0;var w=0,k=0,N=l.expiredLanes,W=l.suspendedLanes,re=l.pingedLanes;if(N!==0)w=N,k=bt=15;else if(N=g&134217727,N!==0){var Se=N&~W;Se!==0?(w=Dn(Se),k=bt):(re&=N,re!==0&&(w=Dn(re),k=bt))}else N=g&~W,N!==0?(w=Dn(N),k=bt):re!==0&&(w=Dn(re),k=bt);if(w===0)return 0;if(w=31-Is(w),w=g&((0>w?0:1<<w)<<1)-1,d!==0&&d!==w&&!(d&W)){if(Dn(d),k<=bt)return d;bt=k}if(d=l.entangledLanes,d!==0)for(l=l.entanglements,d&=w;0<d;)g=31-Is(d),k=1<<g,w|=l[g],d&=~k;return w}function wi(l){return l=l.pendingLanes&-1073741825,l!==0?l:l&1073741824?1073741824:0}function ti(l,d){switch(l){case 15:return 1;case 14:return 2;case 12:return l=ni(24&~d),l===0?ti(10,d):l;case 10:return l=ni(192&~d),l===0?ti(8,d):l;case 8:return l=ni(3584&~d),l===0&&(l=ni(4186112&~d),l===0&&(l=512)),l;case 2:return d=ni(805306368&~d),d===0&&(d=268435456),d}throw Error(n(358,l))}function ni(l){return l&-l}function va(l){for(var d=[],g=0;31>g;g++)d.push(l);return d}function $a(l,d,g){l.pendingLanes|=d;var w=d-1;l.suspendedLanes&=w,l.pingedLanes&=w,l=l.eventTimes,d=31-Is(d),l[d]=g}var Is=Math.clz32?Math.clz32:Ec,hf=Math.log,Tu=Math.LN2;function Ec(l){return l===0?32:31-(hf(l)/Tu|0)|0}var ya=t.unstable_UserBlockingPriority,Ps=t.unstable_runWithPriority,Ms=!0;function Va(l,d,g,w){$t||lt();var k=Lr,N=$t;$t=!0;try{ge(k,l,d,g,w)}finally{($t=N)||Xt()}}function rs(l,d,g,w){Ps(ya,Lr.bind(null,l,d,g,w))}function Lr(l,d,g,w){if(Ms){var k;if((k=(d&4)===0)&&0<Ti.length&&-1<Vo.indexOf(l))l=Or(null,l,d,g,w),Ti.push(l);else{var N=wu(l,d,g,w);if(N===null)k&&ma(l,w);else{if(k){if(-1<Vo.indexOf(l)){l=Or(N,l,d,g,w),Ti.push(l);return}if(zo(N,l,d,g,w))return;ma(l,w)}Bs(l,d,w,null,g)}}}}function wu(l,d,g,w){var k=qs(w);if(k=ku(k),k!==null){var N=ui(k);if(N===null)k=null;else{var W=N.tag;if(W===13){if(k=Qi(N),k!==null)return k;k=null}else if(W===3){if(N.stateNode.hydrate)return N.tag===3?N.stateNode.containerInfo:null;k=null}else N!==k&&(k=null)}}return Bs(l,d,w,k,g),null}var is=null,za=null,fo=null;function pf(){if(fo)return fo;var l,d=za,g=d.length,w,k="value"in is?is.value:is.textContent,N=k.length;for(l=0;l<g&&d[l]===k[l];l++);var W=g-l;for(w=1;w<=W&&d[g-w]===k[N-w];w++);return fo=k.slice(l,1<w?1-w:void 0)}function Go(l){var d=l.keyCode;return"charCode"in l?(l=l.charCode,l===0&&d===13&&(l=13)):l=d,l===10&&(l=13),32<=l||l===13?l:0}function Wo(){return!0}function Cu(){return!1}function di(l){function d(g,w,k,N,W){this._reactName=g,this._targetInst=k,this.type=w,this.nativeEvent=N,this.target=W,this.currentTarget=null;for(var re in l)l.hasOwnProperty(re)&&(g=l[re],this[re]=g?g(N):N[re]);return this.isDefaultPrevented=(N.defaultPrevented!=null?N.defaultPrevented:N.returnValue===!1)?Wo:Cu,this.isPropagationStopped=Cu,this}return e(d.prototype,{preventDefault:function(){this.defaultPrevented=!0;var g=this.nativeEvent;g&&(g.preventDefault?g.preventDefault():typeof g.returnValue!="unknown"&&(g.returnValue=!1),this.isDefaultPrevented=Wo)},stopPropagation:function(){var g=this.nativeEvent;g&&(g.stopPropagation?g.stopPropagation():typeof g.cancelBubble!="unknown"&&(g.cancelBubble=!0),this.isPropagationStopped=Wo)},persist:function(){},isPersistent:Wo}),d}var Os={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(l){return l.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ko=di(Os),Fs=e({},Os,{view:0,detail:0}),Hd=di(Fs),Pl,Ru,ho,qo=e({},Fs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:yf,button:0,buttons:0,relatedTarget:function(l){return l.relatedTarget===void 0?l.fromElement===l.srcElement?l.toElement:l.fromElement:l.relatedTarget},movementX:function(l){return"movementX"in l?l.movementX:(l!==ho&&(ho&&l.type==="mousemove"?(Pl=l.screenX-ho.screenX,Ru=l.screenY-ho.screenY):Ru=Pl=0,ho=l),Pl)},movementY:function(l){return"movementY"in l?l.movementY:Ru}}),mf=di(qo),Yo=e({},qo,{dataTransfer:0}),gf=di(Yo),gs=e({},Fs,{relatedTarget:0}),Ns=di(gs),Ci=e({},Os,{animationName:0,elapsedTime:0,pseudoElement:0}),vs=di(Ci),vf=e({},Os,{clipboardData:function(l){return"clipboardData"in l?l.clipboardData:window.clipboardData}}),xc=di(vf),yp=e({},Os,{data:0}),Xo=di(yp),Sp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},$r={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Au={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function zi(l){var d=this.nativeEvent;return d.getModifierState?d.getModifierState(l):(l=Au[l])?!!d[l]:!1}function yf(){return zi}var Ep=e({},Fs,{key:function(l){if(l.key){var d=Sp[l.key]||l.key;if(d!=="Unidentified")return d}return l.type==="keypress"?(l=Go(l),l===13?"Enter":String.fromCharCode(l)):l.type==="keydown"||l.type==="keyup"?$r[l.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:yf,charCode:function(l){return l.type==="keypress"?Go(l):0},keyCode:function(l){return l.type==="keydown"||l.type==="keyup"?l.keyCode:0},which:function(l){return l.type==="keypress"?Go(l):l.type==="keydown"||l.type==="keyup"?l.keyCode:0}}),po=di(Ep),Us=e({},qo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Gd=di(Us),ja=e({},Fs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:yf}),bc=di(ja),ys=e({},Os,{propertyName:0,elapsedTime:0,pseudoElement:0}),Vr=di(ys),Sa=e({},qo,{deltaX:function(l){return"deltaX"in l?l.deltaX:"wheelDeltaX"in l?-l.wheelDeltaX:0},deltaY:function(l){return"deltaY"in l?l.deltaY:"wheelDeltaY"in l?-l.wheelDeltaY:"wheelDelta"in l?-l.wheelDelta:0},deltaZ:0,deltaMode:0}),Ml=di(Sa),Sf=[9,13,27,32],p=h&&"CompositionEvent"in window,S=null;h&&"documentMode"in document&&(S=document.documentMode);var b=h&&"TextEvent"in window&&!S,A=h&&(!p||S&&8<S&&11>=S),I=" ",D=!1;function B(l,d){switch(l){case"keyup":return Sf.indexOf(d.keyCode)!==-1;case"keydown":return d.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function J(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var $=!1;function ae(l,d){switch(l){case"compositionend":return J(d);case"keypress":return d.which!==32?null:(D=!0,I);case"textInput":return l=d.data,l===I&&D?null:l;default:return null}}function fe(l,d){if($)return l==="compositionend"||!p&&B(l,d)?(l=pf(),fo=za=is=null,$=!1,l):null;switch(l){case"paste":return null;case"keypress":if(!(d.ctrlKey||d.altKey||d.metaKey)||d.ctrlKey&&d.altKey){if(d.char&&1<d.char.length)return d.char;if(d.which)return String.fromCharCode(d.which)}return null;case"compositionend":return A&&d.locale!=="ko"?null:d.data;default:return null}}var ke={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function q(l){var d=l&&l.nodeName&&l.nodeName.toLowerCase();return d==="input"?!!ke[l.type]:d==="textarea"}function he(l,d,g,w){Qr(w),d=Ri(d,"onChange"),0<d.length&&(g=new Ko("onChange","change",null,g,w),l.push({event:g,listeners:d}))}var ve=null,pe=null;function Ae(l){Hn(l,0)}function le(l){var d=$s(l);if(Ar(d))return l}function te(l,d){if(l==="change")return d}var G=!1;if(h){var Q;if(h){var oe="oninput"in document;if(!oe){var xe=document.createElement("div");xe.setAttribute("oninput","return;"),oe=typeof xe.oninput=="function"}Q=oe}else Q=!1;G=Q&&(!document.documentMode||9<document.documentMode)}function Le(){ve&&(ve.detachEvent("onpropertychange",Ne),pe=ve=null)}function Ne(l){if(l.propertyName==="value"&&le(pe)){var d=[];if(he(d,pe,l,qs(l)),l=Ae,$t)l(d);else{$t=!0;try{Ls(l,d)}finally{$t=!1,Xt()}}}}function ut(l,d,g){l==="focusin"?(Le(),ve=d,pe=g,ve.attachEvent("onpropertychange",Ne)):l==="focusout"&&Le()}function nn(l){if(l==="selectionchange"||l==="keyup"||l==="keydown")return le(pe)}function Ht(l,d){if(l==="click")return le(d)}function pt(l,d){if(l==="input"||l==="change")return le(d)}function sn(l,d){return l===d&&(l!==0||1/l===1/d)||l!==l&&d!==d}var At=typeof Object.is=="function"?Object.is:sn,ct=Object.prototype.hasOwnProperty;function ee(l,d){if(At(l,d))return!0;if(typeof l!="object"||l===null||typeof d!="object"||d===null)return!1;var g=Object.keys(l),w=Object.keys(d);if(g.length!==w.length)return!1;for(w=0;w<g.length;w++)if(!ct.call(d,g[w])||!At(l[g[w]],d[g[w]]))return!1;return!0}function me(l){for(;l&&l.firstChild;)l=l.firstChild;return l}function U(l,d){var g=me(l);l=0;for(var w;g;){if(g.nodeType===3){if(w=l+g.textContent.length,l<=d&&w>=d)return{node:g,offset:d-l};l=w}e:{for(;g;){if(g.nextSibling){g=g.nextSibling;break e}g=g.parentNode}g=void 0}g=me(g)}}function H(l,d){return l&&d?l===d?!0:l&&l.nodeType===3?!1:d&&d.nodeType===3?H(l,d.parentNode):"contains"in l?l.contains(d):l.compareDocumentPosition?!!(l.compareDocumentPosition(d)&16):!1:!1}function Me(){for(var l=window,d=ii();d instanceof l.HTMLIFrameElement;){try{var g=typeof d.contentWindow.location.href=="string"}catch{g=!1}if(g)l=d.contentWindow;else break;d=ii(l.document)}return d}function Te(l){var d=l&&l.nodeName&&l.nodeName.toLowerCase();return d&&(d==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||d==="textarea"||l.contentEditable==="true")}var _t=h&&"documentMode"in document&&11>=document.documentMode,Gt=null,Zt=null,An=null,In=!1;function mr(l,d,g){var w=g.window===g?g.document:g.nodeType===9?g:g.ownerDocument;In||Gt==null||Gt!==ii(w)||(w=Gt,"selectionStart"in w&&Te(w)?w={start:w.selectionStart,end:w.selectionEnd}:(w=(w.ownerDocument&&w.ownerDocument.defaultView||window).getSelection(),w={anchorNode:w.anchorNode,anchorOffset:w.anchorOffset,focusNode:w.focusNode,focusOffset:w.focusOffset}),An&&ee(An,w)||(An=w,w=Ri(Zt,"onSelect"),0<w.length&&(d=new Ko("onSelect","select",null,d,g),l.push({event:d,listeners:w}),d.target=Gt)))}Kt("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Kt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Kt(Rt,2);for(var zr="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Ss=0;Ss<zr.length;Ss++)tt.set(zr[Ss],0);c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),u("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),u("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),u("onBeforeInput",["compositionend","keypress","textInput","paste"]),u("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var hi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),pi=new Set("cancel close invalid load scroll toggle".split(" ").concat(hi));function ss(l,d,g){var w=l.type||"unknown-event";l.currentTarget=g,Ll(w,d,void 0,l),l.currentTarget=null}function Hn(l,d){d=(d&4)!==0;for(var g=0;g<l.length;g++){var w=l[g],k=w.event;w=w.listeners;e:{var N=void 0;if(d)for(var W=w.length-1;0<=W;W--){var re=w[W],Se=re.instance,Ye=re.currentTarget;if(re=re.listener,Se!==N&&k.isPropagationStopped())break e;ss(k,re,Ye),N=Se}else for(W=0;W<w.length;W++){if(re=w[W],Se=re.instance,Ye=re.currentTarget,re=re.listener,Se!==N&&k.isPropagationStopped())break e;ss(k,re,Ye),N=Se}}}if(Ys)throw l=bi,Ys=!1,bi=null,l}function St(l,d){var g=Du(d),w=l+"__bubble";g.has(w)||(mi(d,l,2,!1),g.add(w))}var Xs="_reactListening"+Math.random().toString(36).slice(2);function Qs(l){l[Xs]||(l[Xs]=!0,s.forEach(function(d){pi.has(d)||Js(d,!1,l,null),Js(d,!0,l,null)}))}function Js(l,d,g,w){var k=4<arguments.length&&arguments[4]!==void 0?arguments[4]:0,N=g;l==="selectionchange"&&g.nodeType!==9&&(N=g.ownerDocument);var W=Du(N),re=l+"__"+(d?"capture":"bubble");W.has(re)||(d&&(k|=4),mi(N,l,k,d),W.add(re))}function mi(l,d,g,w){var k=tt.get(d);switch(k===void 0?2:k){case 0:k=Va;break;case 1:k=rs;break;default:k=Lr}g=k.bind(null,d,g,l),k=void 0,!rr||d!=="touchstart"&&d!=="touchmove"&&d!=="wheel"||(k=!0),w?k!==void 0?l.addEventListener(d,g,{capture:!0,passive:k}):l.addEventListener(d,g,!0):k!==void 0?l.addEventListener(d,g,{passive:k}):l.addEventListener(d,g,!1)}function Bs(l,d,g,w,k){var N=w;if(!(d&1)&&!(d&2)&&w!==null)e:for(;;){if(w===null)return;var W=w.tag;if(W===3||W===4){var re=w.stateNode.containerInfo;if(re===k||re.nodeType===8&&re.parentNode===k)break;if(W===4)for(W=w.return;W!==null;){var Se=W.tag;if((Se===3||Se===4)&&(Se=W.stateNode.containerInfo,Se===k||Se.nodeType===8&&Se.parentNode===k))return;W=W.return}for(;re!==null;){if(W=ku(re),W===null)return;if(Se=W.tag,Se===5||Se===6){w=N=W;continue e}re=re.parentNode}}w=w.return}wn(function(){var Ye=N,It=qs(g),mn=[];e:{var ht=We.get(l);if(ht!==void 0){var Wt=Ko,gn=l;switch(l){case"keypress":if(Go(g)===0)break e;case"keydown":case"keyup":Wt=po;break;case"focusin":gn="focus",Wt=Ns;break;case"focusout":gn="blur",Wt=Ns;break;case"beforeblur":case"afterblur":Wt=Ns;break;case"click":if(g.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Wt=mf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Wt=gf;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Wt=bc;break;case Il:case Ba:case j:Wt=vs;break;case be:Wt=Vr;break;case"scroll":Wt=Hd;break;case"wheel":Wt=Ml;break;case"copy":case"cut":case"paste":Wt=xc;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Wt=Gd}var on=(d&4)!==0,Oe=!on&&l==="scroll",we=on?ht!==null?ht+"Capture":null:ht;on=[];for(var De=Ye,nt;De!==null;){nt=De;var it=nt.stateNode;if(nt.tag===5&&it!==null&&(nt=it,we!==null&&(it=yn(De,we),it!=null&&on.push(ji(De,it,nt)))),Oe)break;De=De.return}0<on.length&&(ht=new Wt(ht,gn,null,g,It),mn.push({event:ht,listeners:on}))}}if(!(d&7)){e:{if(ht=l==="mouseover"||l==="pointerover",Wt=l==="mouseout"||l==="pointerout",ht&&!(d&16)&&(gn=g.relatedTarget||g.fromElement)&&(ku(gn)||gn[Cc]))break e;if((Wt||ht)&&(ht=It.window===It?It:(ht=It.ownerDocument)?ht.defaultView||ht.parentWindow:window,Wt?(gn=g.relatedTarget||g.toElement,Wt=Ye,gn=gn?ku(gn):null,gn!==null&&(Oe=ui(gn),gn!==Oe||gn.tag!==5&&gn.tag!==6)&&(gn=null)):(Wt=null,gn=Ye),Wt!==gn)){if(on=mf,it="onMouseLeave",we="onMouseEnter",De="mouse",(l==="pointerout"||l==="pointerover")&&(on=Gd,it="onPointerLeave",we="onPointerEnter",De="pointer"),Oe=Wt==null?ht:$s(Wt),nt=gn==null?ht:$s(gn),ht=new on(it,De+"leave",Wt,g,It),ht.target=Oe,ht.relatedTarget=nt,it=null,ku(It)===Ye&&(on=new on(we,De+"enter",gn,g,It),on.target=nt,on.relatedTarget=Oe,it=on),Oe=it,Wt&&gn)t:{for(on=Wt,we=gn,De=0,nt=on;nt;nt=Es(nt))De++;for(nt=0,it=we;it;it=Es(it))nt++;for(;0<De-nt;)on=Es(on),De--;for(;0<nt-De;)we=Es(we),nt--;for(;De--;){if(on===we||we!==null&&on===we.alternate)break t;on=Es(on),we=Es(we)}on=null}else on=null;Wt!==null&&Ha(mn,ht,Wt,on,!1),gn!==null&&Oe!==null&&Ha(mn,Oe,gn,on,!0)}}e:{if(ht=Ye?$s(Ye):window,Wt=ht.nodeName&&ht.nodeName.toLowerCase(),Wt==="select"||Wt==="input"&&ht.type==="file")var Sn=te;else if(q(ht))if(G)Sn=pt;else{Sn=nn;var jt=ut}else(Wt=ht.nodeName)&&Wt.toLowerCase()==="input"&&(ht.type==="checkbox"||ht.type==="radio")&&(Sn=Ht);if(Sn&&(Sn=Sn(l,Ye))){he(mn,Sn,g,It);break e}jt&&jt(l,ht,Ye),l==="focusout"&&(jt=ht._wrapperState)&&jt.controlled&&ht.type==="number"&&Ft(ht,"number",ht.value)}switch(jt=Ye?$s(Ye):window,l){case"focusin":(q(jt)||jt.contentEditable==="true")&&(Gt=jt,Zt=Ye,An=null);break;case"focusout":An=Zt=Gt=null;break;case"mousedown":In=!0;break;case"contextmenu":case"mouseup":case"dragend":In=!1,mr(mn,g,It);break;case"selectionchange":if(_t)break;case"keydown":case"keyup":mr(mn,g,It)}var un;if(p)e:{switch(l){case"compositionstart":var _n="onCompositionStart";break e;case"compositionend":_n="onCompositionEnd";break e;case"compositionupdate":_n="onCompositionUpdate";break e}_n=void 0}else $?B(l,g)&&(_n="onCompositionEnd"):l==="keydown"&&g.keyCode===229&&(_n="onCompositionStart");_n&&(A&&g.locale!=="ko"&&($||_n!=="onCompositionStart"?_n==="onCompositionEnd"&&$&&(un=pf()):(is=It,za="value"in is?is.value:is.textContent,$=!0)),jt=Ri(Ye,_n),0<jt.length&&(_n=new Xo(_n,l,null,g,It),mn.push({event:_n,listeners:jt}),un?_n.data=un:(un=J(g),un!==null&&(_n.data=un)))),(un=b?ae(l,g):fe(l,g))&&(Ye=Ri(Ye,"onBeforeInput"),0<Ye.length&&(It=new Xo("onBeforeInput","beforeinput",null,g,It),mn.push({event:It,listeners:Ye}),It.data=un))}Hn(mn,d)})}function ji(l,d,g){return{instance:l,listener:d,currentTarget:g}}function Ri(l,d){for(var g=d+"Capture",w=[];l!==null;){var k=l,N=k.stateNode;k.tag===5&&N!==null&&(k=N,N=yn(l,g),N!=null&&w.unshift(ji(l,N,k)),N=yn(l,d),N!=null&&w.push(ji(l,N,k))),l=l.return}return w}function Es(l){if(l===null)return null;do l=l.return;while(l&&l.tag!==5);return l||null}function Ha(l,d,g,w,k){for(var N=d._reactName,W=[];g!==null&&g!==w;){var re=g,Se=re.alternate,Ye=re.stateNode;if(Se!==null&&Se===w)break;re.tag===5&&Ye!==null&&(re=Ye,k?(Se=yn(g,N),Se!=null&&W.unshift(ji(g,Se,re))):k||(Se=yn(g,N),Se!=null&&W.push(ji(g,Se,re)))),g=g.return}W.length!==0&&l.push({event:d,listeners:W})}function as(){}var Ea=null,xs=null;function mo(l,d){switch(l){case"button":case"input":case"select":case"textarea":return!!d.autoFocus}return!1}function xa(l,d){return l==="textarea"||l==="option"||l==="noscript"||typeof d.children=="string"||typeof d.children=="number"||typeof d.dangerouslySetInnerHTML=="object"&&d.dangerouslySetInnerHTML!==null&&d.dangerouslySetInnerHTML.__html!=null}var Qo=typeof setTimeout=="function"?setTimeout:void 0,go=typeof clearTimeout=="function"?clearTimeout:void 0;function Wd(l){l.nodeType===1?l.textContent="":l.nodeType===9&&(l=l.body,l!=null&&(l.textContent=""))}function _u(l){for(;l!=null;l=l.nextSibling){var d=l.nodeType;if(d===1||d===3)break}return l}function Kd(l){l=l.previousSibling;for(var d=0;l;){if(l.nodeType===8){var g=l.data;if(g==="$"||g==="$!"||g==="$?"){if(d===0)return l;d--}else g==="/$"&&d++}l=l.previousSibling}return null}var xp=0;function Tc(l){return{$$typeof:Ue,toString:l,valueOf:l}}var Lu=Math.random().toString(36).slice(2),Ga="__reactFiber$"+Lu,wc="__reactProps$"+Lu,Cc="__reactContainer$"+Lu,Wa="__reactEvents$"+Lu;function ku(l){var d=l[Ga];if(d)return d;for(var g=l.parentNode;g;){if(d=g[Cc]||g[Ga]){if(g=d.alternate,d.child!==null||g!==null&&g.child!==null)for(l=Kd(l);l!==null;){if(g=l[Ga])return g;l=Kd(l)}return d}l=g,g=l.parentNode}return null}function Ef(l){return l=l[Ga]||l[Cc],!l||l.tag!==5&&l.tag!==6&&l.tag!==13&&l.tag!==3?null:l}function $s(l){if(l.tag===5||l.tag===6)return l.stateNode;throw Error(n(33))}function Zs(l){return l[wc]||null}function Du(l){var d=l[Wa];return d===void 0&&(d=l[Wa]=new Set),d}var bp=[],Rc=-1;function er(l){return{current:l}}function Gn(l){0>Rc||(l.current=bp[Rc],bp[Rc]=null,Rc--)}function En(l,d){Rc++,bp[Rc]=l.current,l.current=d}var Un={},os=er(Un),jr=er(!1),vo=Un;function Iu(l,d){var g=l.type.contextTypes;if(!g)return Un;var w=l.stateNode;if(w&&w.__reactInternalMemoizedUnmaskedChildContext===d)return w.__reactInternalMemoizedMaskedChildContext;var k={},N;for(N in g)k[N]=d[N];return w&&(l=l.stateNode,l.__reactInternalMemoizedUnmaskedChildContext=d,l.__reactInternalMemoizedMaskedChildContext=k),k}function Pn(l){return l=l.childContextTypes,l!=null}function Pu(){Gn(jr),Gn(os)}function Ol(l,d,g){if(os.current!==Un)throw Error(n(168));En(os,d),En(jr,g)}function Ac(l,d,g){var w=l.stateNode;if(l=d.childContextTypes,typeof w.getChildContext!="function")return g;w=w.getChildContext();for(var k in w)if(!(k in l))throw Error(n(108,wt(d)||"Unknown",k));return e({},g,w)}function Fl(l){return l=(l=l.stateNode)&&l.__reactInternalMemoizedMergedChildContext||Un,vo=os.current,En(os,l),En(jr,jr.current),!0}function yo(l,d,g){var w=l.stateNode;if(!w)throw Error(n(169));g?(l=Ac(l,d,vo),w.__reactInternalMemoizedMergedChildContext=l,Gn(jr),Gn(os),En(os,l)):Gn(jr),En(jr,g)}var Tp=null,Mu=null,oE=t.unstable_runWithPriority,Ou=t.unstable_scheduleCallback,Ka=t.unstable_cancelCallback,wp=t.unstable_shouldYield,xv=t.unstable_requestPaint,Jo=t.unstable_now,bv=t.unstable_getCurrentPriorityLevel,xf=t.unstable_ImmediatePriority,Tv=t.unstable_UserBlockingPriority,wv=t.unstable_NormalPriority,Cp=t.unstable_LowPriority,Rp=t.unstable_IdlePriority,qd={},lE=xv!==void 0?xv:function(){},So=null,bf=null,Ap=!1,Yd=Jo(),ls=1e4>Yd?Jo:function(){return Jo()-Yd};function Fu(){switch(bv()){case xf:return 99;case Tv:return 98;case wv:return 97;case Cp:return 96;case Rp:return 95;default:throw Error(n(332))}}function Cv(l){switch(l){case 99:return xf;case 98:return Tv;case 97:return wv;case 96:return Cp;case 95:return Rp;default:throw Error(n(332))}}function Nl(l,d){return l=Cv(l),oE(l,d)}function Tf(l,d,g){return l=Cv(l),Ou(l,d,g)}function ba(){if(bf!==null){var l=bf;bf=null,Ka(l)}Eo()}function Eo(){if(!Ap&&So!==null){Ap=!0;var l=0;try{var d=So;Nl(99,function(){for(;l<d.length;l++){var g=d[l];do g=g(!0);while(g!==null)}}),So=null}catch(g){throw So!==null&&(So=So.slice(l+1)),Ou(xf,ba),g}finally{Ap=!1}}}var Ul=X.ReactCurrentBatchConfig;function Fi(l,d){if(l&&l.defaultProps){d=e({},d),l=l.defaultProps;for(var g in l)d[g]===void 0&&(d[g]=l[g]);return d}return d}var qa=er(null),Bl=null,xo=null,$l=null;function _p(){$l=xo=Bl=null}function Lp(l){var d=qa.current;Gn(qa),l.type._context._currentValue=d}function kp(l,d){for(;l!==null;){var g=l.alternate;if((l.childLanes&d)===d){if(g===null||(g.childLanes&d)===d)break;g.childLanes|=d}else l.childLanes|=d,g!==null&&(g.childLanes|=d);l=l.return}}function Nu(l,d){Bl=l,$l=xo=null,l=l.dependencies,l!==null&&l.firstContext!==null&&(l.lanes&d&&(Ja=!0),l.firstContext=null)}function ea(l,d){if($l!==l&&d!==!1&&d!==0)if((typeof d!="number"||d===1073741823)&&($l=l,d=1073741823),d={context:l,observedBits:d,next:null},xo===null){if(Bl===null)throw Error(n(308));xo=d,Bl.dependencies={lanes:0,firstContext:d,responders:null}}else xo=xo.next=d;return l._currentValue}var Zo=!1;function Uu(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function Rv(l,d){l=l.updateQueue,d.updateQueue===l&&(d.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,effects:l.effects})}function Vl(l,d){return{eventTime:l,lane:d,tag:0,payload:null,callback:null,next:null}}function Ya(l,d){if(l=l.updateQueue,l!==null){l=l.shared;var g=l.pending;g===null?d.next=d:(d.next=g.next,g.next=d),l.pending=d}}function Dp(l,d){var g=l.updateQueue,w=l.alternate;if(w!==null&&(w=w.updateQueue,g===w)){var k=null,N=null;if(g=g.firstBaseUpdate,g!==null){do{var W={eventTime:g.eventTime,lane:g.lane,tag:g.tag,payload:g.payload,callback:g.callback,next:null};N===null?k=N=W:N=N.next=W,g=g.next}while(g!==null);N===null?k=N=d:N=N.next=d}else k=N=d;g={baseState:w.baseState,firstBaseUpdate:k,lastBaseUpdate:N,shared:w.shared,effects:w.effects},l.updateQueue=g;return}l=g.lastBaseUpdate,l===null?g.firstBaseUpdate=d:l.next=d,g.lastBaseUpdate=d}function wf(l,d,g,w){var k=l.updateQueue;Zo=!1;var N=k.firstBaseUpdate,W=k.lastBaseUpdate,re=k.shared.pending;if(re!==null){k.shared.pending=null;var Se=re,Ye=Se.next;Se.next=null,W===null?N=Ye:W.next=Ye,W=Se;var It=l.alternate;if(It!==null){It=It.updateQueue;var mn=It.lastBaseUpdate;mn!==W&&(mn===null?It.firstBaseUpdate=Ye:mn.next=Ye,It.lastBaseUpdate=Se)}}if(N!==null){mn=k.baseState,W=0,It=Ye=Se=null;do{re=N.lane;var ht=N.eventTime;if((w&re)===re){It!==null&&(It=It.next={eventTime:ht,lane:0,tag:N.tag,payload:N.payload,callback:N.callback,next:null});e:{var Wt=l,gn=N;switch(re=d,ht=g,gn.tag){case 1:if(Wt=gn.payload,typeof Wt=="function"){mn=Wt.call(ht,mn,re);break e}mn=Wt;break e;case 3:Wt.flags=Wt.flags&-4097|64;case 0:if(Wt=gn.payload,re=typeof Wt=="function"?Wt.call(ht,mn,re):Wt,re==null)break e;mn=e({},mn,re);break e;case 2:Zo=!0}}N.callback!==null&&(l.flags|=32,re=k.effects,re===null?k.effects=[N]:re.push(N))}else ht={eventTime:ht,lane:re,tag:N.tag,payload:N.payload,callback:N.callback,next:null},It===null?(Ye=It=ht,Se=mn):It=It.next=ht,W|=re;if(N=N.next,N===null){if(re=k.shared.pending,re===null)break;N=re.next,re.next=null,k.lastBaseUpdate=re,k.shared.pending=null}}while(!0);It===null&&(Se=mn),k.baseState=Se,k.firstBaseUpdate=Ye,k.lastBaseUpdate=It,wo|=W,l.lanes=W,l.memoizedState=mn}}function _c(l,d,g){if(l=d.effects,d.effects=null,l!==null)for(d=0;d<l.length;d++){var w=l[d],k=w.callback;if(k!==null){if(w.callback=null,w=g,typeof k!="function")throw Error(n(191,k));k.call(w)}}}var Ip=new r.Component().refs;function Lc(l,d,g,w){d=l.memoizedState,g=g(w,d),g=g==null?d:e({},d,g),l.memoizedState=g,l.lanes===0&&(l.updateQueue.baseState=g)}var Cf={isMounted:function(l){return(l=l._reactInternals)?ui(l)===l:!1},enqueueSetState:function(l,d,g){l=l._reactInternals;var w=na(),k=Zl(l),N=Vl(w,k);N.payload=d,g!=null&&(N.callback=g),Ya(l,N),Ao(l,k,w)},enqueueReplaceState:function(l,d,g){l=l._reactInternals;var w=na(),k=Zl(l),N=Vl(w,k);N.tag=1,N.payload=d,g!=null&&(N.callback=g),Ya(l,N),Ao(l,k,w)},enqueueForceUpdate:function(l,d){l=l._reactInternals;var g=na(),w=Zl(l),k=Vl(g,w);k.tag=2,d!=null&&(k.callback=d),Ya(l,k),Ao(l,w,g)}};function Xd(l,d,g,w,k,N,W){return l=l.stateNode,typeof l.shouldComponentUpdate=="function"?l.shouldComponentUpdate(w,N,W):d.prototype&&d.prototype.isPureReactComponent?!ee(g,w)||!ee(k,N):!0}function Rf(l,d,g){var w=!1,k=Un,N=d.contextType;return typeof N=="object"&&N!==null?N=ea(N):(k=Pn(d)?vo:os.current,w=d.contextTypes,N=(w=w!=null)?Iu(l,k):Un),d=new d(g,N),l.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Cf,l.stateNode=d,d._reactInternals=l,w&&(l=l.stateNode,l.__reactInternalMemoizedUnmaskedChildContext=k,l.__reactInternalMemoizedMaskedChildContext=N),d}function Bu(l,d,g,w){l=d.state,typeof d.componentWillReceiveProps=="function"&&d.componentWillReceiveProps(g,w),typeof d.UNSAFE_componentWillReceiveProps=="function"&&d.UNSAFE_componentWillReceiveProps(g,w),d.state!==l&&Cf.enqueueReplaceState(d,d.state,null)}function Af(l,d,g,w){var k=l.stateNode;k.props=g,k.state=l.memoizedState,k.refs=Ip,Uu(l);var N=d.contextType;typeof N=="object"&&N!==null?k.context=ea(N):(N=Pn(d)?vo:os.current,k.context=Iu(l,N)),wf(l,g,k,w),k.state=l.memoizedState,N=d.getDerivedStateFromProps,typeof N=="function"&&(Lc(l,d,N,g),k.state=l.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof k.getSnapshotBeforeUpdate=="function"||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(d=k.state,typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount(),d!==k.state&&Cf.enqueueReplaceState(k,k.state,null),wf(l,g,k,w),k.state=l.memoizedState),typeof k.componentDidMount=="function"&&(l.flags|=4)}var _f=Array.isArray;function zl(l,d,g){if(l=g.ref,l!==null&&typeof l!="function"&&typeof l!="object"){if(g._owner){if(g=g._owner,g){if(g.tag!==1)throw Error(n(309));var w=g.stateNode}if(!w)throw Error(n(147,l));var k=""+l;return d!==null&&d.ref!==null&&typeof d.ref=="function"&&d.ref._stringRef===k?d.ref:(d=function(N){var W=w.refs;W===Ip&&(W=w.refs={}),N===null?delete W[k]:W[k]=N},d._stringRef=k,d)}if(typeof l!="string")throw Error(n(284));if(!g._owner)throw Error(n(290,l))}return l}function Lf(l,d){if(l.type!=="textarea")throw Error(n(31,Object.prototype.toString.call(d)==="[object Object]"?"object with keys {"+Object.keys(d).join(", ")+"}":d))}function Pp(l){function d(Oe,we){if(l){var De=Oe.lastEffect;De!==null?(De.nextEffect=we,Oe.lastEffect=we):Oe.firstEffect=Oe.lastEffect=we,we.nextEffect=null,we.flags=8}}function g(Oe,we){if(!l)return null;for(;we!==null;)d(Oe,we),we=we.sibling;return null}function w(Oe,we){for(Oe=new Map;we!==null;)we.key!==null?Oe.set(we.key,we):Oe.set(we.index,we),we=we.sibling;return Oe}function k(Oe,we){return Oe=tu(Oe,we),Oe.index=0,Oe.sibling=null,Oe}function N(Oe,we,De){return Oe.index=De,l?(De=Oe.alternate,De!==null?(De=De.index,De<we?(Oe.flags=2,we):De):(Oe.flags=2,we)):we}function W(Oe){return l&&Oe.alternate===null&&(Oe.flags=2),Oe}function re(Oe,we,De,nt){return we===null||we.tag!==6?(we=Ju(De,Oe.mode,nt),we.return=Oe,we):(we=k(we,De),we.return=Oe,we)}function Se(Oe,we,De,nt){return we!==null&&we.elementType===De.type?(nt=k(we,De.props),nt.ref=zl(Oe,we,De),nt.return=Oe,nt):(nt=mh(De.type,De.key,De.props,null,Oe.mode,nt),nt.ref=zl(Oe,we,De),nt.return=Oe,nt)}function Ye(Oe,we,De,nt){return we===null||we.tag!==4||we.stateNode.containerInfo!==De.containerInfo||we.stateNode.implementation!==De.implementation?(we=cm(De,Oe.mode,nt),we.return=Oe,we):(we=k(we,De.children||[]),we.return=Oe,we)}function It(Oe,we,De,nt,it){return we===null||we.tag!==7?(we=Xu(De,Oe.mode,nt,it),we.return=Oe,we):(we=k(we,De),we.return=Oe,we)}function mn(Oe,we,De){if(typeof we=="string"||typeof we=="number")return we=Ju(""+we,Oe.mode,De),we.return=Oe,we;if(typeof we=="object"&&we!==null){switch(we.$$typeof){case ue:return De=mh(we.type,we.key,we.props,null,Oe.mode,De),De.ref=zl(Oe,null,we),De.return=Oe,De;case ie:return we=cm(we,Oe.mode,De),we.return=Oe,we}if(_f(we)||gt(we))return we=Xu(we,Oe.mode,De,null),we.return=Oe,we;Lf(Oe,we)}return null}function ht(Oe,we,De,nt){var it=we!==null?we.key:null;if(typeof De=="string"||typeof De=="number")return it!==null?null:re(Oe,we,""+De,nt);if(typeof De=="object"&&De!==null){switch(De.$$typeof){case ue:return De.key===it?De.type===ye?It(Oe,we,De.props.children,nt,it):Se(Oe,we,De,nt):null;case ie:return De.key===it?Ye(Oe,we,De,nt):null}if(_f(De)||gt(De))return it!==null?null:It(Oe,we,De,nt,null);Lf(Oe,De)}return null}function Wt(Oe,we,De,nt,it){if(typeof nt=="string"||typeof nt=="number")return Oe=Oe.get(De)||null,re(we,Oe,""+nt,it);if(typeof nt=="object"&&nt!==null){switch(nt.$$typeof){case ue:return Oe=Oe.get(nt.key===null?De:nt.key)||null,nt.type===ye?It(we,Oe,nt.props.children,it,nt.key):Se(we,Oe,nt,it);case ie:return Oe=Oe.get(nt.key===null?De:nt.key)||null,Ye(we,Oe,nt,it)}if(_f(nt)||gt(nt))return Oe=Oe.get(De)||null,It(we,Oe,nt,it,null);Lf(we,nt)}return null}function gn(Oe,we,De,nt){for(var it=null,Sn=null,jt=we,un=we=0,_n=null;jt!==null&&un<De.length;un++){jt.index>un?(_n=jt,jt=null):_n=jt.sibling;var vn=ht(Oe,jt,De[un],nt);if(vn===null){jt===null&&(jt=_n);break}l&&jt&&vn.alternate===null&&d(Oe,jt),we=N(vn,we,un),Sn===null?it=vn:Sn.sibling=vn,Sn=vn,jt=_n}if(un===De.length)return g(Oe,jt),it;if(jt===null){for(;un<De.length;un++)jt=mn(Oe,De[un],nt),jt!==null&&(we=N(jt,we,un),Sn===null?it=jt:Sn.sibling=jt,Sn=jt);return it}for(jt=w(Oe,jt);un<De.length;un++)_n=Wt(jt,Oe,un,De[un],nt),_n!==null&&(l&&_n.alternate!==null&&jt.delete(_n.key===null?un:_n.key),we=N(_n,we,un),Sn===null?it=_n:Sn.sibling=_n,Sn=_n);return l&&jt.forEach(function(_o){return d(Oe,_o)}),it}function on(Oe,we,De,nt){var it=gt(De);if(typeof it!="function")throw Error(n(150));if(De=it.call(De),De==null)throw Error(n(151));for(var Sn=it=null,jt=we,un=we=0,_n=null,vn=De.next();jt!==null&&!vn.done;un++,vn=De.next()){jt.index>un?(_n=jt,jt=null):_n=jt.sibling;var _o=ht(Oe,jt,vn.value,nt);if(_o===null){jt===null&&(jt=_n);break}l&&jt&&_o.alternate===null&&d(Oe,jt),we=N(_o,we,un),Sn===null?it=_o:Sn.sibling=_o,Sn=_o,jt=_n}if(vn.done)return g(Oe,jt),it;if(jt===null){for(;!vn.done;un++,vn=De.next())vn=mn(Oe,vn.value,nt),vn!==null&&(we=N(vn,we,un),Sn===null?it=vn:Sn.sibling=vn,Sn=vn);return it}for(jt=w(Oe,jt);!vn.done;un++,vn=De.next())vn=Wt(jt,Oe,un,vn.value,nt),vn!==null&&(l&&vn.alternate!==null&&jt.delete(vn.key===null?un:vn.key),we=N(vn,we,un),Sn===null?it=vn:Sn.sibling=vn,Sn=vn);return l&&jt.forEach(function(PE){return d(Oe,PE)}),it}return function(Oe,we,De,nt){var it=typeof De=="object"&&De!==null&&De.type===ye&&De.key===null;it&&(De=De.props.children);var Sn=typeof De=="object"&&De!==null;if(Sn)switch(De.$$typeof){case ue:e:{for(Sn=De.key,it=we;it!==null;){if(it.key===Sn){switch(it.tag){case 7:if(De.type===ye){g(Oe,it.sibling),we=k(it,De.props.children),we.return=Oe,Oe=we;break e}break;default:if(it.elementType===De.type){g(Oe,it.sibling),we=k(it,De.props),we.ref=zl(Oe,it,De),we.return=Oe,Oe=we;break e}}g(Oe,it);break}else d(Oe,it);it=it.sibling}De.type===ye?(we=Xu(De.props.children,Oe.mode,nt,De.key),we.return=Oe,Oe=we):(nt=mh(De.type,De.key,De.props,null,Oe.mode,nt),nt.ref=zl(Oe,we,De),nt.return=Oe,Oe=nt)}return W(Oe);case ie:e:{for(it=De.key;we!==null;){if(we.key===it)if(we.tag===4&&we.stateNode.containerInfo===De.containerInfo&&we.stateNode.implementation===De.implementation){g(Oe,we.sibling),we=k(we,De.children||[]),we.return=Oe,Oe=we;break e}else{g(Oe,we);break}else d(Oe,we);we=we.sibling}we=cm(De,Oe.mode,nt),we.return=Oe,Oe=we}return W(Oe)}if(typeof De=="string"||typeof De=="number")return De=""+De,we!==null&&we.tag===6?(g(Oe,we.sibling),we=k(we,De),we.return=Oe,Oe=we):(g(Oe,we),we=Ju(De,Oe.mode,nt),we.return=Oe,Oe=we),W(Oe);if(_f(De))return gn(Oe,we,De,nt);if(gt(De))return on(Oe,we,De,nt);if(Sn&&Lf(Oe,De),typeof De>"u"&&!it)switch(Oe.tag){case 1:case 22:case 0:case 11:case 15:throw Error(n(152,wt(Oe.type)||"Component"))}return g(Oe,we)}}var kf=Pp(!0),Mp=Pp(!1),kc={},Ta=er(kc),Df=er(kc),If=er(kc);function $u(l){if(l===kc)throw Error(n(174));return l}function Op(l,d){switch(En(If,d),En(Df,l),En(Ta,kc),l=d.nodeType,l){case 9:case 11:d=(d=d.documentElement)?d.namespaceURI:Pt(null,"");break;default:l=l===8?d.parentNode:d,d=l.namespaceURI||null,l=l.tagName,d=Pt(d,l)}Gn(Ta),En(Ta,d)}function jl(){Gn(Ta),Gn(Df),Gn(If)}function Av(l){$u(If.current);var d=$u(Ta.current),g=Pt(d,l.type);d!==g&&(En(Df,l),En(Ta,g))}function Fp(l){Df.current===l&&(Gn(Ta),Gn(Df))}var Hr=er(0);function Qd(l){for(var d=l;d!==null;){if(d.tag===13){var g=d.memoizedState;if(g!==null&&(g=g.dehydrated,g===null||g.data==="$?"||g.data==="$!"))return d}else if(d.tag===19&&d.memoizedProps.revealOrder!==void 0){if(d.flags&64)return d}else if(d.child!==null){d.child.return=d,d=d.child;continue}if(d===l)break;for(;d.sibling===null;){if(d.return===null||d.return===l)return null;d=d.return}d.sibling.return=d.return,d=d.sibling}return null}var bo=null,el=null,Xa=!1;function _v(l,d){var g=Ra(5,null,null,0);g.elementType="DELETED",g.type="DELETED",g.stateNode=d,g.return=l,g.flags=8,l.lastEffect!==null?(l.lastEffect.nextEffect=g,l.lastEffect=g):l.firstEffect=l.lastEffect=g}function Np(l,d){switch(l.tag){case 5:var g=l.type;return d=d.nodeType!==1||g.toLowerCase()!==d.nodeName.toLowerCase()?null:d,d!==null?(l.stateNode=d,!0):!1;case 6:return d=l.pendingProps===""||d.nodeType!==3?null:d,d!==null?(l.stateNode=d,!0):!1;case 13:return!1;default:return!1}}function Up(l){if(Xa){var d=el;if(d){var g=d;if(!Np(l,d)){if(d=_u(g.nextSibling),!d||!Np(l,d)){l.flags=l.flags&-1025|2,Xa=!1,bo=l;return}_v(bo,g)}bo=l,el=_u(d.firstChild)}else l.flags=l.flags&-1025|2,Xa=!1,bo=l}}function Vu(l){for(l=l.return;l!==null&&l.tag!==5&&l.tag!==3&&l.tag!==13;)l=l.return;bo=l}function zu(l){if(l!==bo)return!1;if(!Xa)return Vu(l),Xa=!0,!1;var d=l.type;if(l.tag!==5||d!=="head"&&d!=="body"&&!xa(d,l.memoizedProps))for(d=el;d;)_v(l,d),d=_u(d.nextSibling);if(Vu(l),l.tag===13){if(l=l.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(n(317));e:{for(l=l.nextSibling,d=0;l;){if(l.nodeType===8){var g=l.data;if(g==="/$"){if(d===0){el=_u(l.nextSibling);break e}d--}else g!=="$"&&g!=="$!"&&g!=="$?"||d++}l=l.nextSibling}el=null}}else el=bo?_u(l.stateNode.nextSibling):null;return!0}function Jd(){el=bo=null,Xa=!1}var tl=[];function Zd(){for(var l=0;l<tl.length;l++)tl[l]._workInProgressVersionPrimary=null;tl.length=0}var To=X.ReactCurrentDispatcher,ta=X.ReactCurrentBatchConfig,Qa=0,Gr=null,Ai=null,_i=null,Pf=!1,Dc=!1;function Hi(){throw Error(n(321))}function eh(l,d){if(d===null)return!1;for(var g=0;g<d.length&&g<l.length;g++)if(!At(l[g],d[g]))return!1;return!0}function nl(l,d,g,w,k,N){if(Qa=N,Gr=d,d.memoizedState=null,d.updateQueue=null,d.lanes=0,To.current=l===null||l.memoizedState===null?cE:Nf,l=g(w,k),Dc){N=0;do{if(Dc=!1,!(25>N))throw Error(n(301));N+=1,_i=Ai=null,d.updateQueue=null,To.current=fE,l=g(w,k)}while(Dc)}if(To.current=ih,d=Ai!==null&&Ai.next!==null,Qa=0,_i=Ai=Gr=null,Pf=!1,d)throw Error(n(300));return l}function ju(){var l={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _i===null?Gr.memoizedState=_i=l:_i=_i.next=l,_i}function rt(){if(Ai===null){var l=Gr.alternate;l=l!==null?l.memoizedState:null}else l=Ai.next;var d=_i===null?Gr.memoizedState:_i.next;if(d!==null)_i=d,Ai=l;else{if(l===null)throw Error(n(310));Ai=l,l={memoizedState:Ai.memoizedState,baseState:Ai.baseState,baseQueue:Ai.baseQueue,queue:Ai.queue,next:null},_i===null?Gr.memoizedState=_i=l:_i=_i.next=l}return _i}function Fr(l,d){return typeof d=="function"?d(l):d}function Wn(l){var d=rt(),g=d.queue;if(g===null)throw Error(n(311));g.lastRenderedReducer=l;var w=Ai,k=w.baseQueue,N=g.pending;if(N!==null){if(k!==null){var W=k.next;k.next=N.next,N.next=W}w.baseQueue=k=N,g.pending=null}if(k!==null){k=k.next,w=w.baseState;var re=W=N=null,Se=k;do{var Ye=Se.lane;if((Qa&Ye)===Ye)re!==null&&(re=re.next={lane:0,action:Se.action,eagerReducer:Se.eagerReducer,eagerState:Se.eagerState,next:null}),w=Se.eagerReducer===l?Se.eagerState:l(w,Se.action);else{var It={lane:Ye,action:Se.action,eagerReducer:Se.eagerReducer,eagerState:Se.eagerState,next:null};re===null?(W=re=It,N=w):re=re.next=It,Gr.lanes|=Ye,wo|=Ye}Se=Se.next}while(Se!==null&&Se!==k);re===null?N=w:re.next=W,At(w,d.memoizedState)||(Ja=!0),d.memoizedState=w,d.baseState=N,d.baseQueue=re,g.lastRenderedState=w}return[d.memoizedState,g.dispatch]}function rl(l){var d=rt(),g=d.queue;if(g===null)throw Error(n(311));g.lastRenderedReducer=l;var w=g.dispatch,k=g.pending,N=d.memoizedState;if(k!==null){g.pending=null;var W=k=k.next;do N=l(N,W.action),W=W.next;while(W!==k);At(N,d.memoizedState)||(Ja=!0),d.memoizedState=N,d.baseQueue===null&&(d.baseState=N),g.lastRenderedState=N}return[N,w]}function th(l,d,g){var w=d._getVersion;w=w(d._source);var k=d._workInProgressVersionPrimary;if(k!==null?l=k===w:(l=l.mutableReadLanes,(l=(Qa&l)===l)&&(d._workInProgressVersionPrimary=w,tl.push(d))),l)return g(d._source);throw tl.push(d),Error(n(350))}function Mf(l,d,g,w){var k=Ts;if(k===null)throw Error(n(349));var N=d._getVersion,W=N(d._source),re=To.current,Se=re.useState(function(){return th(k,d,g)}),Ye=Se[1],It=Se[0];Se=_i;var mn=l.memoizedState,ht=mn.refs,Wt=ht.getSnapshot,gn=mn.source;mn=mn.subscribe;var on=Gr;return l.memoizedState={refs:ht,source:d,subscribe:w},re.useEffect(function(){ht.getSnapshot=g,ht.setSnapshot=Ye;var Oe=N(d._source);if(!At(W,Oe)){Oe=g(d._source),At(It,Oe)||(Ye(Oe),Oe=Zl(on),k.mutableReadLanes|=Oe&k.pendingLanes),Oe=k.mutableReadLanes,k.entangledLanes|=Oe;for(var we=k.entanglements,De=Oe;0<De;){var nt=31-Is(De),it=1<<nt;we[nt]|=Oe,De&=~it}}},[g,d,w]),re.useEffect(function(){return w(d._source,function(){var Oe=ht.getSnapshot,we=ht.setSnapshot;try{we(Oe(d._source));var De=Zl(on);k.mutableReadLanes|=De&k.pendingLanes}catch(nt){we(function(){throw nt})}})},[d,w]),At(Wt,g)&&At(gn,d)&&At(mn,w)||(l={pending:null,dispatch:null,lastRenderedReducer:Fr,lastRenderedState:It},l.dispatch=Ye=Gl.bind(null,Gr,l),Se.queue=l,Se.baseQueue=null,It=th(k,d,g),Se.memoizedState=Se.baseState=It),It}function Bp(l,d,g){var w=rt();return Mf(w,l,d,g)}function Ic(l){var d=ju();return typeof l=="function"&&(l=l()),d.memoizedState=d.baseState=l,l=d.queue={pending:null,dispatch:null,lastRenderedReducer:Fr,lastRenderedState:l},l=l.dispatch=Gl.bind(null,Gr,l),[d.memoizedState,l]}function Of(l,d,g,w){return l={tag:l,create:d,destroy:g,deps:w,next:null},d=Gr.updateQueue,d===null?(d={lastEffect:null},Gr.updateQueue=d,d.lastEffect=l.next=l):(g=d.lastEffect,g===null?d.lastEffect=l.next=l:(w=g.next,g.next=l,l.next=w,d.lastEffect=l)),l}function nh(l){var d=ju();return l={current:l},d.memoizedState=l}function Ff(){return rt().memoizedState}function Hl(l,d,g,w){var k=ju();Gr.flags|=l,k.memoizedState=Of(1|d,g,void 0,w===void 0?null:w)}function Pc(l,d,g,w){var k=rt();w=w===void 0?null:w;var N=void 0;if(Ai!==null){var W=Ai.memoizedState;if(N=W.destroy,w!==null&&eh(w,W.deps)){Of(d,g,N,w);return}}Gr.flags|=l,k.memoizedState=Of(1|d,g,N,w)}function Hu(l,d){return Hl(516,4,l,d)}function Mc(l,d){return Pc(516,4,l,d)}function $p(l,d){return Pc(4,2,l,d)}function Vp(l,d){if(typeof d=="function")return l=l(),d(l),function(){d(null)};if(d!=null)return l=l(),d.current=l,function(){d.current=null}}function rh(l,d,g){return g=g!=null?g.concat([l]):null,Pc(4,2,Vp.bind(null,d,l),g)}function wa(){}function Nr(l,d){var g=rt();d=d===void 0?null:d;var w=g.memoizedState;return w!==null&&d!==null&&eh(d,w[1])?w[0]:(g.memoizedState=[l,d],l)}function uE(l,d){var g=rt();d=d===void 0?null:d;var w=g.memoizedState;return w!==null&&d!==null&&eh(d,w[1])?w[0]:(l=l(),g.memoizedState=[l,d],l)}function xr(l,d){var g=Fu();Nl(98>g?98:g,function(){l(!0)}),Nl(97<g?97:g,function(){var w=ta.transition;ta.transition=1;try{l(!1),d()}finally{ta.transition=w}})}function Gl(l,d,g){var w=na(),k=Zl(l),N={lane:k,action:g,eagerReducer:null,eagerState:null,next:null},W=d.pending;if(W===null?N.next=N:(N.next=W.next,W.next=N),d.pending=N,W=l.alternate,l===Gr||W!==null&&W===Gr)Dc=Pf=!0;else{if(l.lanes===0&&(W===null||W.lanes===0)&&(W=d.lastRenderedReducer,W!==null))try{var re=d.lastRenderedState,Se=W(re,g);if(N.eagerReducer=W,N.eagerState=Se,At(Se,re))return}catch{}finally{}Ao(l,k,w)}}var ih={readContext:ea,useCallback:Hi,useContext:Hi,useEffect:Hi,useImperativeHandle:Hi,useLayoutEffect:Hi,useMemo:Hi,useReducer:Hi,useRef:Hi,useState:Hi,useDebugValue:Hi,useDeferredValue:Hi,useTransition:Hi,useMutableSource:Hi,useOpaqueIdentifier:Hi,unstable_isNewReconciler:!1},cE={readContext:ea,useCallback:function(l,d){return ju().memoizedState=[l,d===void 0?null:d],l},useContext:ea,useEffect:Hu,useImperativeHandle:function(l,d,g){return g=g!=null?g.concat([l]):null,Hl(4,2,Vp.bind(null,d,l),g)},useLayoutEffect:function(l,d){return Hl(4,2,l,d)},useMemo:function(l,d){var g=ju();return d=d===void 0?null:d,l=l(),g.memoizedState=[l,d],l},useReducer:function(l,d,g){var w=ju();return d=g!==void 0?g(d):d,w.memoizedState=w.baseState=d,l=w.queue={pending:null,dispatch:null,lastRenderedReducer:l,lastRenderedState:d},l=l.dispatch=Gl.bind(null,Gr,l),[w.memoizedState,l]},useRef:nh,useState:Ic,useDebugValue:wa,useDeferredValue:function(l){var d=Ic(l),g=d[0],w=d[1];return Hu(function(){var k=ta.transition;ta.transition=1;try{w(l)}finally{ta.transition=k}},[l]),g},useTransition:function(){var l=Ic(!1),d=l[0];return l=xr.bind(null,l[1]),nh(l),[l,d]},useMutableSource:function(l,d,g){var w=ju();return w.memoizedState={refs:{getSnapshot:d,setSnapshot:null},source:l,subscribe:g},Mf(w,l,d,g)},useOpaqueIdentifier:function(){if(Xa){var l=!1,d=Tc(function(){throw l||(l=!0,g("r:"+(xp++).toString(36))),Error(n(355))}),g=Ic(d)[1];return!(Gr.mode&2)&&(Gr.flags|=516,Of(5,function(){g("r:"+(xp++).toString(36))},void 0,null)),d}return d="r:"+(xp++).toString(36),Ic(d),d},unstable_isNewReconciler:!1},Nf={readContext:ea,useCallback:Nr,useContext:ea,useEffect:Mc,useImperativeHandle:rh,useLayoutEffect:$p,useMemo:uE,useReducer:Wn,useRef:Ff,useState:function(){return Wn(Fr)},useDebugValue:wa,useDeferredValue:function(l){var d=Wn(Fr),g=d[0],w=d[1];return Mc(function(){var k=ta.transition;ta.transition=1;try{w(l)}finally{ta.transition=k}},[l]),g},useTransition:function(){var l=Wn(Fr)[0];return[Ff().current,l]},useMutableSource:Bp,useOpaqueIdentifier:function(){return Wn(Fr)[0]},unstable_isNewReconciler:!1},fE={readContext:ea,useCallback:Nr,useContext:ea,useEffect:Mc,useImperativeHandle:rh,useLayoutEffect:$p,useMemo:uE,useReducer:rl,useRef:Ff,useState:function(){return rl(Fr)},useDebugValue:wa,useDeferredValue:function(l){var d=rl(Fr),g=d[0],w=d[1];return Mc(function(){var k=ta.transition;ta.transition=1;try{w(l)}finally{ta.transition=k}},[l]),g},useTransition:function(){var l=rl(Fr)[0];return[Ff().current,l]},useMutableSource:Bp,useOpaqueIdentifier:function(){return rl(Fr)[0]},unstable_isNewReconciler:!1},dE=X.ReactCurrentOwner,Ja=!1;function bs(l,d,g,w){d.child=l===null?Mp(d,null,g,w):kf(d,l.child,g,w)}function Lv(l,d,g,w,k){g=g.render;var N=d.ref;return Nu(d,k),w=nl(l,d,g,w,N,k),l!==null&&!Ja?(d.updateQueue=l.updateQueue,d.flags&=-517,l.lanes&=~k,ql(l,d,k)):(d.flags|=1,bs(l,d,w,k),d.child)}function zp(l,d,g,w,k,N){if(l===null){var W=g.type;return typeof W=="function"&&!um(W)&&W.defaultProps===void 0&&g.compare===null&&g.defaultProps===void 0?(d.tag=15,d.type=W,jp(l,d,W,w,k,N)):(l=mh(g.type,null,w,d,d.mode,N),l.ref=d.ref,l.return=d,d.child=l)}return W=l.child,!(k&N)&&(k=W.memoizedProps,g=g.compare,g=g!==null?g:ee,g(k,w)&&l.ref===d.ref)?ql(l,d,N):(d.flags|=1,l=tu(W,w),l.ref=d.ref,l.return=d,d.child=l)}function jp(l,d,g,w,k,N){if(l!==null&&ee(l.memoizedProps,w)&&l.ref===d.ref)if(Ja=!1,(N&k)!==0)l.flags&16384&&(Ja=!0);else return d.lanes=l.lanes,ql(l,d,N);return Gp(l,d,g,w,N)}function Hp(l,d,g){var w=d.pendingProps,k=w.children,N=l!==null?l.memoizedState:null;if(w.mode==="hidden"||w.mode==="unstable-defer-without-hiding")if(!(d.mode&4))d.memoizedState={baseLanes:0},hh(d,g);else if(g&1073741824)d.memoizedState={baseLanes:0},hh(d,N!==null?N.baseLanes:g);else return l=N!==null?N.baseLanes|g:g,d.lanes=d.childLanes=1073741824,d.memoizedState={baseLanes:l},hh(d,l),null;else N!==null?(w=N.baseLanes|g,d.memoizedState=null):w=g,hh(d,w);return bs(l,d,k,g),d.child}function Uf(l,d){var g=d.ref;(l===null&&g!==null||l!==null&&l.ref!==g)&&(d.flags|=128)}function Gp(l,d,g,w,k){var N=Pn(g)?vo:os.current;return N=Iu(d,N),Nu(d,k),g=nl(l,d,g,w,N,k),l!==null&&!Ja?(d.updateQueue=l.updateQueue,d.flags&=-517,l.lanes&=~k,ql(l,d,k)):(d.flags|=1,bs(l,d,g,k),d.child)}function kv(l,d,g,w,k){if(Pn(g)){var N=!0;Fl(d)}else N=!1;if(Nu(d,k),d.stateNode===null)l!==null&&(l.alternate=null,d.alternate=null,d.flags|=2),Rf(d,g,w),Af(d,g,w,k),w=!0;else if(l===null){var W=d.stateNode,re=d.memoizedProps;W.props=re;var Se=W.context,Ye=g.contextType;typeof Ye=="object"&&Ye!==null?Ye=ea(Ye):(Ye=Pn(g)?vo:os.current,Ye=Iu(d,Ye));var It=g.getDerivedStateFromProps,mn=typeof It=="function"||typeof W.getSnapshotBeforeUpdate=="function";mn||typeof W.UNSAFE_componentWillReceiveProps!="function"&&typeof W.componentWillReceiveProps!="function"||(re!==w||Se!==Ye)&&Bu(d,W,w,Ye),Zo=!1;var ht=d.memoizedState;W.state=ht,wf(d,w,W,k),Se=d.memoizedState,re!==w||ht!==Se||jr.current||Zo?(typeof It=="function"&&(Lc(d,g,It,w),Se=d.memoizedState),(re=Zo||Xd(d,g,re,w,ht,Se,Ye))?(mn||typeof W.UNSAFE_componentWillMount!="function"&&typeof W.componentWillMount!="function"||(typeof W.componentWillMount=="function"&&W.componentWillMount(),typeof W.UNSAFE_componentWillMount=="function"&&W.UNSAFE_componentWillMount()),typeof W.componentDidMount=="function"&&(d.flags|=4)):(typeof W.componentDidMount=="function"&&(d.flags|=4),d.memoizedProps=w,d.memoizedState=Se),W.props=w,W.state=Se,W.context=Ye,w=re):(typeof W.componentDidMount=="function"&&(d.flags|=4),w=!1)}else{W=d.stateNode,Rv(l,d),re=d.memoizedProps,Ye=d.type===d.elementType?re:Fi(d.type,re),W.props=Ye,mn=d.pendingProps,ht=W.context,Se=g.contextType,typeof Se=="object"&&Se!==null?Se=ea(Se):(Se=Pn(g)?vo:os.current,Se=Iu(d,Se));var Wt=g.getDerivedStateFromProps;(It=typeof Wt=="function"||typeof W.getSnapshotBeforeUpdate=="function")||typeof W.UNSAFE_componentWillReceiveProps!="function"&&typeof W.componentWillReceiveProps!="function"||(re!==mn||ht!==Se)&&Bu(d,W,w,Se),Zo=!1,ht=d.memoizedState,W.state=ht,wf(d,w,W,k);var gn=d.memoizedState;re!==mn||ht!==gn||jr.current||Zo?(typeof Wt=="function"&&(Lc(d,g,Wt,w),gn=d.memoizedState),(Ye=Zo||Xd(d,g,Ye,w,ht,gn,Se))?(It||typeof W.UNSAFE_componentWillUpdate!="function"&&typeof W.componentWillUpdate!="function"||(typeof W.componentWillUpdate=="function"&&W.componentWillUpdate(w,gn,Se),typeof W.UNSAFE_componentWillUpdate=="function"&&W.UNSAFE_componentWillUpdate(w,gn,Se)),typeof W.componentDidUpdate=="function"&&(d.flags|=4),typeof W.getSnapshotBeforeUpdate=="function"&&(d.flags|=256)):(typeof W.componentDidUpdate!="function"||re===l.memoizedProps&&ht===l.memoizedState||(d.flags|=4),typeof W.getSnapshotBeforeUpdate!="function"||re===l.memoizedProps&&ht===l.memoizedState||(d.flags|=256),d.memoizedProps=w,d.memoizedState=gn),W.props=w,W.state=gn,W.context=Se,w=Ye):(typeof W.componentDidUpdate!="function"||re===l.memoizedProps&&ht===l.memoizedState||(d.flags|=4),typeof W.getSnapshotBeforeUpdate!="function"||re===l.memoizedProps&&ht===l.memoizedState||(d.flags|=256),w=!1)}return Wp(l,d,g,w,N,k)}function Wp(l,d,g,w,k,N){Uf(l,d);var W=(d.flags&64)!==0;if(!w&&!W)return k&&yo(d,g,!1),ql(l,d,N);w=d.stateNode,dE.current=d;var re=W&&typeof g.getDerivedStateFromError!="function"?null:w.render();return d.flags|=1,l!==null&&W?(d.child=kf(d,l.child,null,N),d.child=kf(d,null,re,N)):bs(l,d,re,N),d.memoizedState=w.state,k&&yo(d,g,!0),d.child}function Dv(l){var d=l.stateNode;d.pendingContext?Ol(l,d.pendingContext,d.pendingContext!==d.context):d.context&&Ol(l,d.context,!1),Op(l,d.containerInfo)}var sh={dehydrated:null,retryLane:0};function us(l,d,g){var w=d.pendingProps,k=Hr.current,N=!1,W;return(W=(d.flags&64)!==0)||(W=l!==null&&l.memoizedState===null?!1:(k&2)!==0),W?(N=!0,d.flags&=-65):l!==null&&l.memoizedState===null||w.fallback===void 0||w.unstable_avoidThisFallback===!0||(k|=1),En(Hr,k&1),l===null?(w.fallback!==void 0&&Up(d),l=w.children,k=w.fallback,N?(l=Wl(d,l,k,g),d.child.memoizedState={baseLanes:g},d.memoizedState=sh,l):typeof w.unstable_expectedLoadTime=="number"?(l=Wl(d,l,k,g),d.child.memoizedState={baseLanes:g},d.memoizedState=sh,d.lanes=33554432,l):(g=Qu({mode:"visible",children:l},d.mode,g,null),g.return=d,d.child=g)):l.memoizedState!==null?N?(w=Gi(l,d,w.children,w.fallback,g),N=d.child,k=l.child.memoizedState,N.memoizedState=k===null?{baseLanes:g}:{baseLanes:k.baseLanes|g},N.childLanes=l.childLanes&~g,d.memoizedState=sh,w):(g=Iv(l,d,w.children,g),d.memoizedState=null,g):N?(w=Gi(l,d,w.children,w.fallback,g),N=d.child,k=l.child.memoizedState,N.memoizedState=k===null?{baseLanes:g}:{baseLanes:k.baseLanes|g},N.childLanes=l.childLanes&~g,d.memoizedState=sh,w):(g=Iv(l,d,w.children,g),d.memoizedState=null,g)}function Wl(l,d,g,w){var k=l.mode,N=l.child;return d={mode:"hidden",children:d},!(k&2)&&N!==null?(N.childLanes=0,N.pendingProps=d):N=Qu(d,k,0,null),g=Xu(g,k,w,null),N.return=l,g.return=l,N.sibling=g,l.child=N,g}function Iv(l,d,g,w){var k=l.child;return l=k.sibling,g=tu(k,{mode:"visible",children:g}),!(d.mode&2)&&(g.lanes=w),g.return=d,g.sibling=null,l!==null&&(l.nextEffect=null,l.flags=8,d.firstEffect=d.lastEffect=l),d.child=g}function Gi(l,d,g,w,k){var N=d.mode,W=l.child;l=W.sibling;var re={mode:"hidden",children:g};return!(N&2)&&d.child!==W?(g=d.child,g.childLanes=0,g.pendingProps=re,W=g.lastEffect,W!==null?(d.firstEffect=g.firstEffect,d.lastEffect=W,W.nextEffect=null):d.firstEffect=d.lastEffect=null):g=tu(W,re),l!==null?w=tu(l,w):(w=Xu(w,N,k,null),w.flags|=2),w.return=d,g.return=d,g.sibling=w,d.child=g,w}function Kl(l,d){l.lanes|=d;var g=l.alternate;g!==null&&(g.lanes|=d),kp(l.return,d)}function Kn(l,d,g,w,k,N){var W=l.memoizedState;W===null?l.memoizedState={isBackwards:d,rendering:null,renderingStartTime:0,last:w,tail:g,tailMode:k,lastEffect:N}:(W.isBackwards=d,W.rendering=null,W.renderingStartTime=0,W.last=w,W.tail=g,W.tailMode=k,W.lastEffect=N)}function Bf(l,d,g){var w=d.pendingProps,k=w.revealOrder,N=w.tail;if(bs(l,d,w.children,g),w=Hr.current,w&2)w=w&1|2,d.flags|=64;else{if(l!==null&&l.flags&64)e:for(l=d.child;l!==null;){if(l.tag===13)l.memoizedState!==null&&Kl(l,g);else if(l.tag===19)Kl(l,g);else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===d)break e;for(;l.sibling===null;){if(l.return===null||l.return===d)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}w&=1}if(En(Hr,w),!(d.mode&2))d.memoizedState=null;else switch(k){case"forwards":for(g=d.child,k=null;g!==null;)l=g.alternate,l!==null&&Qd(l)===null&&(k=g),g=g.sibling;g=k,g===null?(k=d.child,d.child=null):(k=g.sibling,g.sibling=null),Kn(d,!1,k,g,N,d.lastEffect);break;case"backwards":for(g=null,k=d.child,d.child=null;k!==null;){if(l=k.alternate,l!==null&&Qd(l)===null){d.child=k;break}l=k.sibling,k.sibling=g,g=k,k=l}Kn(d,!0,g,null,N,d.lastEffect);break;case"together":Kn(d,!1,null,null,void 0,d.lastEffect);break;default:d.memoizedState=null}return d.child}function ql(l,d,g){if(l!==null&&(d.dependencies=l.dependencies),wo|=d.lanes,g&d.childLanes){if(l!==null&&d.child!==l.child)throw Error(n(153));if(d.child!==null){for(l=d.child,g=tu(l,l.pendingProps),d.child=g,g.return=d;l.sibling!==null;)l=l.sibling,g=g.sibling=tu(l,l.pendingProps),g.return=d;g.sibling=null}return d.child}return null}var Pv,$f,Vf,Mv;Pv=function(l,d){for(var g=d.child;g!==null;){if(g.tag===5||g.tag===6)l.appendChild(g.stateNode);else if(g.tag!==4&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===d)break;for(;g.sibling===null;){if(g.return===null||g.return===d)return;g=g.return}g.sibling.return=g.return,g=g.sibling}},$f=function(){},Vf=function(l,d,g,w){var k=l.memoizedProps;if(k!==w){l=d.stateNode,$u(Ta.current);var N=null;switch(g){case"input":k=Xr(l,k),w=Xr(l,w),N=[];break;case"option":k=_r(l,k),w=_r(l,w),N=[];break;case"select":k=e({},k,{value:void 0}),w=e({},w,{value:void 0}),N=[];break;case"textarea":k=or(l,k),w=or(l,w),N=[];break;default:typeof k.onClick!="function"&&typeof w.onClick=="function"&&(l.onclick=as)}ha(g,w);var W;g=null;for(Ye in k)if(!w.hasOwnProperty(Ye)&&k.hasOwnProperty(Ye)&&k[Ye]!=null)if(Ye==="style"){var re=k[Ye];for(W in re)re.hasOwnProperty(W)&&(g||(g={}),g[W]="")}else Ye!=="dangerouslySetInnerHTML"&&Ye!=="children"&&Ye!=="suppressContentEditableWarning"&&Ye!=="suppressHydrationWarning"&&Ye!=="autoFocus"&&(o.hasOwnProperty(Ye)?N||(N=[]):(N=N||[]).push(Ye,null));for(Ye in w){var Se=w[Ye];if(re=k!=null?k[Ye]:void 0,w.hasOwnProperty(Ye)&&Se!==re&&(Se!=null||re!=null))if(Ye==="style")if(re){for(W in re)!re.hasOwnProperty(W)||Se&&Se.hasOwnProperty(W)||(g||(g={}),g[W]="");for(W in Se)Se.hasOwnProperty(W)&&re[W]!==Se[W]&&(g||(g={}),g[W]=Se[W])}else g||(N||(N=[]),N.push(Ye,g)),g=Se;else Ye==="dangerouslySetInnerHTML"?(Se=Se?Se.__html:void 0,re=re?re.__html:void 0,Se!=null&&re!==Se&&(N=N||[]).push(Ye,Se)):Ye==="children"?typeof Se!="string"&&typeof Se!="number"||(N=N||[]).push(Ye,""+Se):Ye!=="suppressContentEditableWarning"&&Ye!=="suppressHydrationWarning"&&(o.hasOwnProperty(Ye)?(Se!=null&&Ye==="onScroll"&&St("scroll",l),N||re===Se||(N=[])):typeof Se=="object"&&Se!==null&&Se.$$typeof===Ue?Se.toString():(N=N||[]).push(Ye,Se))}g&&(N=N||[]).push("style",g);var Ye=N;(d.updateQueue=Ye)&&(d.flags|=4)}},Mv=function(l,d,g,w){g!==w&&(d.flags|=4)};function Oc(l,d){if(!Xa)switch(l.tailMode){case"hidden":d=l.tail;for(var g=null;d!==null;)d.alternate!==null&&(g=d),d=d.sibling;g===null?l.tail=null:g.sibling=null;break;case"collapsed":g=l.tail;for(var w=null;g!==null;)g.alternate!==null&&(w=g),g=g.sibling;w===null?d||l.tail===null?l.tail=null:l.tail.sibling=null:w.sibling=null}}function hE(l,d,g){var w=d.pendingProps;switch(d.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return Pn(d.type)&&Pu(),null;case 3:return jl(),Gn(jr),Gn(os),Zd(),w=d.stateNode,w.pendingContext&&(w.context=w.pendingContext,w.pendingContext=null),(l===null||l.child===null)&&(zu(d)?d.flags|=4:w.hydrate||(d.flags|=256)),$f(d),null;case 5:Fp(d);var k=$u(If.current);if(g=d.type,l!==null&&d.stateNode!=null)Vf(l,d,g,w,k),l.ref!==d.ref&&(d.flags|=128);else{if(!w){if(d.stateNode===null)throw Error(n(166));return null}if(l=$u(Ta.current),zu(d)){w=d.stateNode,g=d.type;var N=d.memoizedProps;switch(w[Ga]=d,w[wc]=N,g){case"dialog":St("cancel",w),St("close",w);break;case"iframe":case"object":case"embed":St("load",w);break;case"video":case"audio":for(l=0;l<hi.length;l++)St(hi[l],w);break;case"source":St("error",w);break;case"img":case"image":case"link":St("error",w),St("load",w);break;case"details":St("toggle",w);break;case"input":xi(w,N),St("invalid",w);break;case"select":w._wrapperState={wasMultiple:!!N.multiple},St("invalid",w);break;case"textarea":dr(w,N),St("invalid",w)}ha(g,N),l=null;for(var W in N)N.hasOwnProperty(W)&&(k=N[W],W==="children"?typeof k=="string"?w.textContent!==k&&(l=["children",k]):typeof k=="number"&&w.textContent!==""+k&&(l=["children",""+k]):o.hasOwnProperty(W)&&k!=null&&W==="onScroll"&&St("scroll",w));switch(g){case"input":Rr(w),si(w,N,!0);break;case"textarea":Rr(w),da(w);break;case"select":case"option":break;default:typeof N.onClick=="function"&&(w.onclick=as)}w=l,d.updateQueue=w,w!==null&&(d.flags|=4)}else{switch(W=k.nodeType===9?k:k.ownerDocument,l===Mr.html&&(l=xt(g)),l===Mr.html?g==="script"?(l=W.createElement("div"),l.innerHTML="<script><\/script>",l=l.removeChild(l.firstChild)):typeof w.is=="string"?l=W.createElement(g,{is:w.is}):(l=W.createElement(g),g==="select"&&(W=l,w.multiple?W.multiple=!0:w.size&&(W.size=w.size))):l=W.createElementNS(l,g),l[Ga]=d,l[wc]=w,Pv(l,d,!1,!1),d.stateNode=l,W=_s(g,w),g){case"dialog":St("cancel",l),St("close",l),k=w;break;case"iframe":case"object":case"embed":St("load",l),k=w;break;case"video":case"audio":for(k=0;k<hi.length;k++)St(hi[k],l);k=w;break;case"source":St("error",l),k=w;break;case"img":case"image":case"link":St("error",l),St("load",l),k=w;break;case"details":St("toggle",l),k=w;break;case"input":xi(l,w),k=Xr(l,w),St("invalid",l);break;case"option":k=_r(l,w);break;case"select":l._wrapperState={wasMultiple:!!w.multiple},k=e({},w,{value:void 0}),St("invalid",l);break;case"textarea":dr(l,w),k=or(l,w),St("invalid",l);break;default:k=w}ha(g,k);var re=k;for(N in re)if(re.hasOwnProperty(N)){var Se=re[N];N==="style"?jn(l,Se):N==="dangerouslySetInnerHTML"?(Se=Se?Se.__html:void 0,Se!=null&&On(l,Se)):N==="children"?typeof Se=="string"?(g!=="textarea"||Se!=="")&&$n(l,Se):typeof Se=="number"&&$n(l,""+Se):N!=="suppressContentEditableWarning"&&N!=="suppressHydrationWarning"&&N!=="autoFocus"&&(o.hasOwnProperty(N)?Se!=null&&N==="onScroll"&&St("scroll",l):Se!=null&&Y(l,N,Se,W))}switch(g){case"input":Rr(l),si(l,w,!1);break;case"textarea":Rr(l),da(l);break;case"option":w.value!=null&&l.setAttribute("value",""+Tn(w.value));break;case"select":l.multiple=!!w.multiple,N=w.value,N!=null?ai(l,!!w.multiple,N,!1):w.defaultValue!=null&&ai(l,!!w.multiple,w.defaultValue,!0);break;default:typeof k.onClick=="function"&&(l.onclick=as)}mo(g,w)&&(d.flags|=4)}d.ref!==null&&(d.flags|=128)}return null;case 6:if(l&&d.stateNode!=null)Mv(l,d,l.memoizedProps,w);else{if(typeof w!="string"&&d.stateNode===null)throw Error(n(166));g=$u(If.current),$u(Ta.current),zu(d)?(w=d.stateNode,g=d.memoizedProps,w[Ga]=d,w.nodeValue!==g&&(d.flags|=4)):(w=(g.nodeType===9?g:g.ownerDocument).createTextNode(w),w[Ga]=d,d.stateNode=w)}return null;case 13:return Gn(Hr),w=d.memoizedState,d.flags&64?(d.lanes=g,d):(w=w!==null,g=!1,l===null?d.memoizedProps.fallback!==void 0&&zu(d):g=l.memoizedState!==null,w&&!g&&d.mode&2&&(l===null&&d.memoizedProps.unstable_avoidThisFallback!==!0||Hr.current&1?gi===0&&(gi=3):((gi===0||gi===3)&&(gi=4),Ts===null||!(wo&134217727)&&!(Ql&134217727)||qu(Ts,Wi))),(w||g)&&(d.flags|=4),null);case 4:return jl(),$f(d),l===null&&Qs(d.stateNode.containerInfo),null;case 10:return Lp(d),null;case 17:return Pn(d.type)&&Pu(),null;case 19:if(Gn(Hr),w=d.memoizedState,w===null)return null;if(N=(d.flags&64)!==0,W=w.rendering,W===null)if(N)Oc(w,!1);else{if(gi!==0||l!==null&&l.flags&64)for(l=d.child;l!==null;){if(W=Qd(l),W!==null){for(d.flags|=64,Oc(w,!1),N=W.updateQueue,N!==null&&(d.updateQueue=N,d.flags|=4),w.lastEffect===null&&(d.firstEffect=null),d.lastEffect=w.lastEffect,w=g,g=d.child;g!==null;)N=g,l=w,N.flags&=2,N.nextEffect=null,N.firstEffect=null,N.lastEffect=null,W=N.alternate,W===null?(N.childLanes=0,N.lanes=l,N.child=null,N.memoizedProps=null,N.memoizedState=null,N.updateQueue=null,N.dependencies=null,N.stateNode=null):(N.childLanes=W.childLanes,N.lanes=W.lanes,N.child=W.child,N.memoizedProps=W.memoizedProps,N.memoizedState=W.memoizedState,N.updateQueue=W.updateQueue,N.type=W.type,l=W.dependencies,N.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),g=g.sibling;return En(Hr,Hr.current&1|2),d.child}l=l.sibling}w.tail!==null&&ls()>Wf&&(d.flags|=64,N=!0,Oc(w,!1),d.lanes=33554432)}else{if(!N)if(l=Qd(W),l!==null){if(d.flags|=64,N=!0,g=l.updateQueue,g!==null&&(d.updateQueue=g,d.flags|=4),Oc(w,!0),w.tail===null&&w.tailMode==="hidden"&&!W.alternate&&!Xa)return d=d.lastEffect=w.lastEffect,d!==null&&(d.nextEffect=null),null}else 2*ls()-w.renderingStartTime>Wf&&g!==1073741824&&(d.flags|=64,N=!0,Oc(w,!1),d.lanes=33554432);w.isBackwards?(W.sibling=d.child,d.child=W):(g=w.last,g!==null?g.sibling=W:d.child=W,w.last=W)}return w.tail!==null?(g=w.tail,w.rendering=g,w.tail=g.sibling,w.lastEffect=d.lastEffect,w.renderingStartTime=ls(),g.sibling=null,d=Hr.current,En(Hr,N?d&1|2:d&1),g):null;case 23:case 24:return rm(),l!==null&&l.memoizedState!==null!=(d.memoizedState!==null)&&w.mode!=="unstable-defer-without-hiding"&&(d.flags|=4),null}throw Error(n(156,d.tag))}function pE(l){switch(l.tag){case 1:Pn(l.type)&&Pu();var d=l.flags;return d&4096?(l.flags=d&-4097|64,l):null;case 3:if(jl(),Gn(jr),Gn(os),Zd(),d=l.flags,d&64)throw Error(n(285));return l.flags=d&-4097|64,l;case 5:return Fp(l),null;case 13:return Gn(Hr),d=l.flags,d&4096?(l.flags=d&-4097|64,l):null;case 19:return Gn(Hr),null;case 4:return jl(),null;case 10:return Lp(l),null;case 23:case 24:return rm(),null;default:return null}}function ah(l,d){try{var g="",w=d;do g+=Fn(w),w=w.return;while(w);var k=g}catch(N){k=`
|
|
65
|
+
Error generating stack: `+N.message+`
|
|
66
|
+
`+N.stack}return{value:l,source:d,stack:k}}function Kp(l,d){try{console.error(d.value)}catch(g){setTimeout(function(){throw g})}}var mE=typeof WeakMap=="function"?WeakMap:Map;function qp(l,d,g){g=Vl(-1,g),g.tag=3,g.payload={element:null};var w=d.value;return g.callback=function(){Wu||(Wu=!0,uh=w),Kp(l,d)},g}function Ov(l,d,g){g=Vl(-1,g),g.tag=3;var w=l.type.getDerivedStateFromError;if(typeof w=="function"){var k=d.value;g.payload=function(){return Kp(l,d),w(k)}}var N=l.stateNode;return N!==null&&typeof N.componentDidCatch=="function"&&(g.callback=function(){typeof w!="function"&&(Ro===null?Ro=new Set([this]):Ro.add(this),Kp(l,d));var W=d.stack;this.componentDidCatch(d.value,{componentStack:W!==null?W:""})}),g}var gE=typeof WeakSet=="function"?WeakSet:Set;function Fv(l){var d=l.ref;if(d!==null)if(typeof d=="function")try{d(null)}catch(g){ra(l,g)}else d.current=null}function vE(l,d){switch(d.tag){case 0:case 11:case 15:case 22:return;case 1:if(d.flags&256&&l!==null){var g=l.memoizedProps,w=l.memoizedState;l=d.stateNode,d=l.getSnapshotBeforeUpdate(d.elementType===d.type?g:Fi(d.type,g),w),l.__reactInternalSnapshotBeforeUpdate=d}return;case 3:d.flags&256&&Wd(d.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(n(163))}function yE(l,d,g){switch(g.tag){case 0:case 11:case 15:case 22:if(d=g.updateQueue,d=d!==null?d.lastEffect:null,d!==null){l=d=d.next;do{if((l.tag&3)===3){var w=l.create;l.destroy=w()}l=l.next}while(l!==d)}if(d=g.updateQueue,d=d!==null?d.lastEffect:null,d!==null){l=d=d.next;do{var k=l;w=k.next,k=k.tag,k&4&&k&1&&(om(g,l),wE(g,l)),l=w}while(l!==d)}return;case 1:l=g.stateNode,g.flags&4&&(d===null?l.componentDidMount():(w=g.elementType===g.type?d.memoizedProps:Fi(g.type,d.memoizedProps),l.componentDidUpdate(w,d.memoizedState,l.__reactInternalSnapshotBeforeUpdate))),d=g.updateQueue,d!==null&&_c(g,d,l);return;case 3:if(d=g.updateQueue,d!==null){if(l=null,g.child!==null)switch(g.child.tag){case 5:l=g.child.stateNode;break;case 1:l=g.child.stateNode}_c(g,d,l)}return;case 5:l=g.stateNode,d===null&&g.flags&4&&mo(g.type,g.memoizedProps)&&l.focus();return;case 6:return;case 4:return;case 12:return;case 13:g.memoizedState===null&&(g=g.alternate,g!==null&&(g=g.memoizedState,g!==null&&(g=g.dehydrated,g!==null&&Oi(g))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(n(163))}function oh(l,d){for(var g=l;;){if(g.tag===5){var w=g.stateNode;if(d)w=w.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none";else{w=g.stateNode;var k=g.memoizedProps.style;k=k!=null&&k.hasOwnProperty("display")?k.display:null,w.style.display=Sr("display",k)}}else if(g.tag===6)g.stateNode.nodeValue=d?"":g.memoizedProps;else if((g.tag!==23&&g.tag!==24||g.memoizedState===null||g===l)&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===l)break;for(;g.sibling===null;){if(g.return===null||g.return===l)return;g=g.return}g.sibling.return=g.return,g=g.sibling}}function Yp(l,d){if(Mu&&typeof Mu.onCommitFiberUnmount=="function")try{Mu.onCommitFiberUnmount(Tp,d)}catch{}switch(d.tag){case 0:case 11:case 14:case 15:case 22:if(l=d.updateQueue,l!==null&&(l=l.lastEffect,l!==null)){var g=l=l.next;do{var w=g,k=w.destroy;if(w=w.tag,k!==void 0)if(w&4)om(d,g);else{w=d;try{k()}catch(N){ra(w,N)}}g=g.next}while(g!==l)}break;case 1:if(Fv(d),l=d.stateNode,typeof l.componentWillUnmount=="function")try{l.props=d.memoizedProps,l.state=d.memoizedState,l.componentWillUnmount()}catch(N){ra(d,N)}break;case 5:Fv(d);break;case 4:lh(l,d)}}function Nv(l){l.alternate=null,l.child=null,l.dependencies=null,l.firstEffect=null,l.lastEffect=null,l.memoizedProps=null,l.memoizedState=null,l.pendingProps=null,l.return=null,l.updateQueue=null}function Uv(l){return l.tag===5||l.tag===3||l.tag===4}function Bv(l){e:{for(var d=l.return;d!==null;){if(Uv(d))break e;d=d.return}throw Error(n(160))}var g=d;switch(d=g.stateNode,g.tag){case 5:var w=!1;break;case 3:d=d.containerInfo,w=!0;break;case 4:d=d.containerInfo,w=!0;break;default:throw Error(n(161))}g.flags&16&&($n(d,""),g.flags&=-17);e:t:for(g=l;;){for(;g.sibling===null;){if(g.return===null||Uv(g.return)){g=null;break e}g=g.return}for(g.sibling.return=g.return,g=g.sibling;g.tag!==5&&g.tag!==6&&g.tag!==18;){if(g.flags&2||g.child===null||g.tag===4)continue t;g.child.return=g,g=g.child}if(!(g.flags&2)){g=g.stateNode;break e}}w?Xp(l,g,d):zf(l,g,d)}function Xp(l,d,g){var w=l.tag,k=w===5||w===6;if(k)l=k?l.stateNode:l.stateNode.instance,d?g.nodeType===8?g.parentNode.insertBefore(l,d):g.insertBefore(l,d):(g.nodeType===8?(d=g.parentNode,d.insertBefore(l,g)):(d=g,d.appendChild(l)),g=g._reactRootContainer,g!=null||d.onclick!==null||(d.onclick=as));else if(w!==4&&(l=l.child,l!==null))for(Xp(l,d,g),l=l.sibling;l!==null;)Xp(l,d,g),l=l.sibling}function zf(l,d,g){var w=l.tag,k=w===5||w===6;if(k)l=k?l.stateNode:l.stateNode.instance,d?g.insertBefore(l,d):g.appendChild(l);else if(w!==4&&(l=l.child,l!==null))for(zf(l,d,g),l=l.sibling;l!==null;)zf(l,d,g),l=l.sibling}function lh(l,d){for(var g=d,w=!1,k,N;;){if(!w){w=g.return;e:for(;;){if(w===null)throw Error(n(160));switch(k=w.stateNode,w.tag){case 5:N=!1;break e;case 3:k=k.containerInfo,N=!0;break e;case 4:k=k.containerInfo,N=!0;break e}w=w.return}w=!0}if(g.tag===5||g.tag===6){e:for(var W=l,re=g,Se=re;;)if(Yp(W,Se),Se.child!==null&&Se.tag!==4)Se.child.return=Se,Se=Se.child;else{if(Se===re)break e;for(;Se.sibling===null;){if(Se.return===null||Se.return===re)break e;Se=Se.return}Se.sibling.return=Se.return,Se=Se.sibling}N?(W=k,re=g.stateNode,W.nodeType===8?W.parentNode.removeChild(re):W.removeChild(re)):k.removeChild(g.stateNode)}else if(g.tag===4){if(g.child!==null){k=g.stateNode.containerInfo,N=!0,g.child.return=g,g=g.child;continue}}else if(Yp(l,g),g.child!==null){g.child.return=g,g=g.child;continue}if(g===d)break;for(;g.sibling===null;){if(g.return===null||g.return===d)return;g=g.return,g.tag===4&&(w=!1)}g.sibling.return=g.return,g=g.sibling}}function Qp(l,d){switch(d.tag){case 0:case 11:case 14:case 15:case 22:var g=d.updateQueue;if(g=g!==null?g.lastEffect:null,g!==null){var w=g=g.next;do(w.tag&3)===3&&(l=w.destroy,w.destroy=void 0,l!==void 0&&l()),w=w.next;while(w!==g)}return;case 1:return;case 5:if(g=d.stateNode,g!=null){w=d.memoizedProps;var k=l!==null?l.memoizedProps:w;l=d.type;var N=d.updateQueue;if(d.updateQueue=null,N!==null){for(g[wc]=w,l==="input"&&w.type==="radio"&&w.name!=null&&As(g,w),_s(l,k),d=_s(l,w),k=0;k<N.length;k+=2){var W=N[k],re=N[k+1];W==="style"?jn(g,re):W==="dangerouslySetInnerHTML"?On(g,re):W==="children"?$n(g,re):Y(g,W,re,d)}switch(l){case"input":Pr(g,w);break;case"textarea":fa(g,w);break;case"select":l=g._wrapperState.wasMultiple,g._wrapperState.wasMultiple=!!w.multiple,N=w.value,N!=null?ai(g,!!w.multiple,N,!1):l!==!!w.multiple&&(w.defaultValue!=null?ai(g,!!w.multiple,w.defaultValue,!0):ai(g,!!w.multiple,w.multiple?[]:"",!1))}}}return;case 6:if(d.stateNode===null)throw Error(n(162));d.stateNode.nodeValue=d.memoizedProps;return;case 3:g=d.stateNode,g.hydrate&&(g.hydrate=!1,Oi(g.containerInfo));return;case 12:return;case 13:d.memoizedState!==null&&(Gf=ls(),oh(d.child,!0)),$v(d);return;case 19:$v(d);return;case 17:return;case 23:case 24:oh(d,d.memoizedState!==null);return}throw Error(n(163))}function $v(l){var d=l.updateQueue;if(d!==null){l.updateQueue=null;var g=l.stateNode;g===null&&(g=l.stateNode=new gE),d.forEach(function(w){var k=RE.bind(null,l,w);g.has(w)||(g.add(w),w.then(k,k))})}}function SE(l,d){return l!==null&&(l=l.memoizedState,l===null||l.dehydrated!==null)?(d=d.memoizedState,d!==null&&d.dehydrated===null):!1}var EE=Math.ceil,Yl=X.ReactCurrentDispatcher,jf=X.ReactCurrentOwner,an=0,Ts=null,Li=null,Wi=0,Xl=0,Fc=er(0),gi=0,Hf=null,Ni=0,wo=0,Ql=0,Gu=0,Jp=null,Gf=0,Wf=1/0;function Co(){Wf=ls()+500}var Ut=null,Wu=!1,uh=null,Ro=null,Jl=!1,Kf=null,Ku=90,Zp=[],em=[],il=null,qf=0,tm=null,Yf=-1,sl=0,ch=0,Xf=null,fh=!1;function na(){return an&48?ls():Yf!==-1?Yf:Yf=ls()}function Zl(l){if(l=l.mode,!(l&2))return 1;if(!(l&4))return Fu()===99?1:2;if(sl===0&&(sl=Ni),Ul.transition!==0){ch!==0&&(ch=Jp!==null?Jp.pendingLanes:0),l=sl;var d=4186112&~ch;return d&=-d,d===0&&(l=4186112&~l,d=l&-l,d===0&&(d=8192)),d}return l=Fu(),an&4&&l===98?l=ti(12,sl):(l=sr(l),l=ti(l,sl)),l}function Ao(l,d,g){if(50<qf)throw qf=0,tm=null,Error(n(185));if(l=dh(l,d),l===null)return null;$a(l,d,g),l===Ts&&(Ql|=d,gi===4&&qu(l,Wi));var w=Fu();d===1?an&8&&!(an&48)?nm(l):(Ca(l,g),an===0&&(Co(),ba())):(!(an&4)||w!==98&&w!==99||(il===null?il=new Set([l]):il.add(l)),Ca(l,g)),Jp=l}function dh(l,d){l.lanes|=d;var g=l.alternate;for(g!==null&&(g.lanes|=d),g=l,l=l.return;l!==null;)l.childLanes|=d,g=l.alternate,g!==null&&(g.childLanes|=d),g=l,l=l.return;return g.tag===3?g.stateNode:null}function Ca(l,d){for(var g=l.callbackNode,w=l.suspendedLanes,k=l.pingedLanes,N=l.expirationTimes,W=l.pendingLanes;0<W;){var re=31-Is(W),Se=1<<re,Ye=N[re];if(Ye===-1){if(!(Se&w)||Se&k){Ye=d,Dn(Se);var It=bt;N[re]=10<=It?Ye+250:6<=It?Ye+5e3:-1}}else Ye<=d&&(l.expiredLanes|=Se);W&=~Se}if(w=Xn(l,l===Ts?Wi:0),d=bt,w===0)g!==null&&(g!==qd&&Ka(g),l.callbackNode=null,l.callbackPriority=0);else{if(g!==null){if(l.callbackPriority===d)return;g!==qd&&Ka(g)}d===15?(g=nm.bind(null,l),So===null?(So=[g],bf=Ou(xf,Eo)):So.push(g),g=qd):d===14?g=Tf(99,nm.bind(null,l)):(g=Zn(d),g=Tf(g,Vv.bind(null,l))),l.callbackPriority=d,l.callbackNode=g}}function Vv(l){if(Yf=-1,ch=sl=0,an&48)throw Error(n(327));var d=l.callbackNode;if(eu()&&l.callbackNode!==d)return null;var g=Xn(l,l===Ts?Wi:0);if(g===0)return null;var w=g,k=an;an|=16;var N=ph();(Ts!==l||Wi!==w)&&(Co(),Nc(l,w));do try{Hv();break}catch(re){im(l,re)}while(!0);if(_p(),Yl.current=N,an=k,Li!==null?w=0:(Ts=null,Wi=0,w=gi),Ni&Ql)Nc(l,0);else if(w!==0){if(w===2&&(an|=64,l.hydrate&&(l.hydrate=!1,Wd(l.containerInfo)),g=wi(l),g!==0&&(w=al(l,g))),w===1)throw d=Hf,Nc(l,0),qu(l,g),Ca(l,ls()),d;switch(l.finishedWork=l.current.alternate,l.finishedLanes=g,w){case 0:case 1:throw Error(n(345));case 2:Yu(l);break;case 3:if(qu(l,g),(g&62914560)===g&&(w=Gf+500-ls(),10<w)){if(Xn(l,0)!==0)break;if(k=l.suspendedLanes,(k&g)!==g){na(),l.pingedLanes|=l.suspendedLanes&k;break}l.timeoutHandle=Qo(Yu.bind(null,l),w);break}Yu(l);break;case 4:if(qu(l,g),(g&4186112)===g)break;for(w=l.eventTimes,k=-1;0<g;){var W=31-Is(g);N=1<<W,W=w[W],W>k&&(k=W),g&=~N}if(g=k,g=ls()-g,g=(120>g?120:480>g?480:1080>g?1080:1920>g?1920:3e3>g?3e3:4320>g?4320:1960*EE(g/1960))-g,10<g){l.timeoutHandle=Qo(Yu.bind(null,l),g);break}Yu(l);break;case 5:Yu(l);break;default:throw Error(n(329))}}return Ca(l,ls()),l.callbackNode===d?Vv.bind(null,l):null}function qu(l,d){for(d&=~Gu,d&=~Ql,l.suspendedLanes|=d,l.pingedLanes&=~d,l=l.expirationTimes;0<d;){var g=31-Is(d),w=1<<g;l[g]=-1,d&=~w}}function nm(l){if(an&48)throw Error(n(327));if(eu(),l===Ts&&l.expiredLanes&Wi){var d=Wi,g=al(l,d);Ni&Ql&&(d=Xn(l,d),g=al(l,d))}else d=Xn(l,0),g=al(l,d);if(l.tag!==0&&g===2&&(an|=64,l.hydrate&&(l.hydrate=!1,Wd(l.containerInfo)),d=wi(l),d!==0&&(g=al(l,d))),g===1)throw g=Hf,Nc(l,0),qu(l,d),Ca(l,ls()),g;return l.finishedWork=l.current.alternate,l.finishedLanes=d,Yu(l),Ca(l,ls()),null}function xE(){if(il!==null){var l=il;il=null,l.forEach(function(d){d.expiredLanes|=24&d.pendingLanes,Ca(d,ls())})}ba()}function zv(l,d){var g=an;an|=1;try{return l(d)}finally{an=g,an===0&&(Co(),ba())}}function jv(l,d){var g=an;an&=-2,an|=8;try{return l(d)}finally{an=g,an===0&&(Co(),ba())}}function hh(l,d){En(Fc,Xl),Xl|=d,Ni|=d}function rm(){Xl=Fc.current,Gn(Fc)}function Nc(l,d){l.finishedWork=null,l.finishedLanes=0;var g=l.timeoutHandle;if(g!==-1&&(l.timeoutHandle=-1,go(g)),Li!==null)for(g=Li.return;g!==null;){var w=g;switch(w.tag){case 1:w=w.type.childContextTypes,w!=null&&Pu();break;case 3:jl(),Gn(jr),Gn(os),Zd();break;case 5:Fp(w);break;case 4:jl();break;case 13:Gn(Hr);break;case 19:Gn(Hr);break;case 10:Lp(w);break;case 23:case 24:rm()}g=g.return}Ts=l,Li=tu(l.current,null),Wi=Xl=Ni=d,gi=0,Hf=null,Gu=Ql=wo=0}function im(l,d){do{var g=Li;try{if(_p(),To.current=ih,Pf){for(var w=Gr.memoizedState;w!==null;){var k=w.queue;k!==null&&(k.pending=null),w=w.next}Pf=!1}if(Qa=0,_i=Ai=Gr=null,Dc=!1,jf.current=null,g===null||g.return===null){gi=1,Hf=d,Li=null;break}e:{var N=l,W=g.return,re=g,Se=d;if(d=Wi,re.flags|=2048,re.firstEffect=re.lastEffect=null,Se!==null&&typeof Se=="object"&&typeof Se.then=="function"){var Ye=Se;if(!(re.mode&2)){var It=re.alternate;It?(re.updateQueue=It.updateQueue,re.memoizedState=It.memoizedState,re.lanes=It.lanes):(re.updateQueue=null,re.memoizedState=null)}var mn=(Hr.current&1)!==0,ht=W;do{var Wt;if(Wt=ht.tag===13){var gn=ht.memoizedState;if(gn!==null)Wt=gn.dehydrated!==null;else{var on=ht.memoizedProps;Wt=on.fallback===void 0?!1:on.unstable_avoidThisFallback!==!0?!0:!mn}}if(Wt){var Oe=ht.updateQueue;if(Oe===null){var we=new Set;we.add(Ye),ht.updateQueue=we}else Oe.add(Ye);if(!(ht.mode&2)){if(ht.flags|=64,re.flags|=16384,re.flags&=-2981,re.tag===1)if(re.alternate===null)re.tag=17;else{var De=Vl(-1,1);De.tag=2,Ya(re,De)}re.lanes|=1;break e}Se=void 0,re=d;var nt=N.pingCache;if(nt===null?(nt=N.pingCache=new mE,Se=new Set,nt.set(Ye,Se)):(Se=nt.get(Ye),Se===void 0&&(Se=new Set,nt.set(Ye,Se))),!Se.has(re)){Se.add(re);var it=CE.bind(null,N,Ye,re);Ye.then(it,it)}ht.flags|=4096,ht.lanes=d;break e}ht=ht.return}while(ht!==null);Se=Error((wt(re.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.
|
|
67
|
+
|
|
68
|
+
Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}gi!==5&&(gi=2),Se=ah(Se,re),ht=W;do{switch(ht.tag){case 3:N=Se,ht.flags|=4096,d&=-d,ht.lanes|=d;var Sn=qp(ht,N,d);Dp(ht,Sn);break e;case 1:N=Se;var jt=ht.type,un=ht.stateNode;if(!(ht.flags&64)&&(typeof jt.getDerivedStateFromError=="function"||un!==null&&typeof un.componentDidCatch=="function"&&(Ro===null||!Ro.has(un)))){ht.flags|=4096,d&=-d,ht.lanes|=d;var _n=Ov(ht,N,d);Dp(ht,_n);break e}}ht=ht.return}while(ht!==null)}am(g)}catch(vn){d=vn,Li===g&&g!==null&&(Li=g=g.return);continue}break}while(!0)}function ph(){var l=Yl.current;return Yl.current=ih,l===null?ih:l}function al(l,d){var g=an;an|=16;var w=ph();Ts===l&&Wi===d||Nc(l,d);do try{bE();break}catch(k){im(l,k)}while(!0);if(_p(),an=g,Yl.current=w,Li!==null)throw Error(n(261));return Ts=null,Wi=0,gi}function bE(){for(;Li!==null;)sm(Li)}function Hv(){for(;Li!==null&&!wp();)sm(Li)}function sm(l){var d=Kv(l.alternate,l,Xl);l.memoizedProps=l.pendingProps,d===null?am(l):Li=d,jf.current=null}function am(l){var d=l;do{var g=d.alternate;if(l=d.return,d.flags&2048){if(g=pE(d),g!==null){g.flags&=2047,Li=g;return}l!==null&&(l.firstEffect=l.lastEffect=null,l.flags|=2048)}else{if(g=hE(g,d,Xl),g!==null){Li=g;return}if(g=d,g.tag!==24&&g.tag!==23||g.memoizedState===null||Xl&1073741824||!(g.mode&4)){for(var w=0,k=g.child;k!==null;)w|=k.lanes|k.childLanes,k=k.sibling;g.childLanes=w}l!==null&&!(l.flags&2048)&&(l.firstEffect===null&&(l.firstEffect=d.firstEffect),d.lastEffect!==null&&(l.lastEffect!==null&&(l.lastEffect.nextEffect=d.firstEffect),l.lastEffect=d.lastEffect),1<d.flags&&(l.lastEffect!==null?l.lastEffect.nextEffect=d:l.firstEffect=d,l.lastEffect=d))}if(d=d.sibling,d!==null){Li=d;return}Li=d=l}while(d!==null);gi===0&&(gi=5)}function Yu(l){var d=Fu();return Nl(99,Gv.bind(null,l,d)),null}function Gv(l,d){do eu();while(Kf!==null);if(an&48)throw Error(n(327));var g=l.finishedWork;if(g===null)return null;if(l.finishedWork=null,l.finishedLanes=0,g===l.current)throw Error(n(177));l.callbackNode=null;var w=g.lanes|g.childLanes,k=w,N=l.pendingLanes&~k;l.pendingLanes=k,l.suspendedLanes=0,l.pingedLanes=0,l.expiredLanes&=k,l.mutableReadLanes&=k,l.entangledLanes&=k,k=l.entanglements;for(var W=l.eventTimes,re=l.expirationTimes;0<N;){var Se=31-Is(N),Ye=1<<Se;k[Se]=0,W[Se]=-1,re[Se]=-1,N&=~Ye}if(il!==null&&!(w&24)&&il.has(l)&&il.delete(l),l===Ts&&(Li=Ts=null,Wi=0),1<g.flags?g.lastEffect!==null?(g.lastEffect.nextEffect=g,w=g.firstEffect):w=g:w=g.firstEffect,w!==null){if(k=an,an|=32,jf.current=null,Ea=Ms,W=Me(),Te(W)){if("selectionStart"in W)re={start:W.selectionStart,end:W.selectionEnd};else e:if(re=(re=W.ownerDocument)&&re.defaultView||window,(Ye=re.getSelection&&re.getSelection())&&Ye.rangeCount!==0){re=Ye.anchorNode,N=Ye.anchorOffset,Se=Ye.focusNode,Ye=Ye.focusOffset;try{re.nodeType,Se.nodeType}catch{re=null;break e}var It=0,mn=-1,ht=-1,Wt=0,gn=0,on=W,Oe=null;t:for(;;){for(var we;on!==re||N!==0&&on.nodeType!==3||(mn=It+N),on!==Se||Ye!==0&&on.nodeType!==3||(ht=It+Ye),on.nodeType===3&&(It+=on.nodeValue.length),(we=on.firstChild)!==null;)Oe=on,on=we;for(;;){if(on===W)break t;if(Oe===re&&++Wt===N&&(mn=It),Oe===Se&&++gn===Ye&&(ht=It),(we=on.nextSibling)!==null)break;on=Oe,Oe=on.parentNode}on=we}re=mn===-1||ht===-1?null:{start:mn,end:ht}}else re=null;re=re||{start:0,end:0}}else re=null;xs={focusedElem:W,selectionRange:re},Ms=!1,Xf=null,fh=!1,Ut=w;do try{TE()}catch(vn){if(Ut===null)throw Error(n(330));ra(Ut,vn),Ut=Ut.nextEffect}while(Ut!==null);Xf=null,Ut=w;do try{for(W=l;Ut!==null;){var De=Ut.flags;if(De&16&&$n(Ut.stateNode,""),De&128){var nt=Ut.alternate;if(nt!==null){var it=nt.ref;it!==null&&(typeof it=="function"?it(null):it.current=null)}}switch(De&1038){case 2:Bv(Ut),Ut.flags&=-3;break;case 6:Bv(Ut),Ut.flags&=-3,Qp(Ut.alternate,Ut);break;case 1024:Ut.flags&=-1025;break;case 1028:Ut.flags&=-1025,Qp(Ut.alternate,Ut);break;case 4:Qp(Ut.alternate,Ut);break;case 8:re=Ut,lh(W,re);var Sn=re.alternate;Nv(re),Sn!==null&&Nv(Sn)}Ut=Ut.nextEffect}}catch(vn){if(Ut===null)throw Error(n(330));ra(Ut,vn),Ut=Ut.nextEffect}while(Ut!==null);if(it=xs,nt=Me(),De=it.focusedElem,W=it.selectionRange,nt!==De&&De&&De.ownerDocument&&H(De.ownerDocument.documentElement,De)){for(W!==null&&Te(De)&&(nt=W.start,it=W.end,it===void 0&&(it=nt),"selectionStart"in De?(De.selectionStart=nt,De.selectionEnd=Math.min(it,De.value.length)):(it=(nt=De.ownerDocument||document)&&nt.defaultView||window,it.getSelection&&(it=it.getSelection(),re=De.textContent.length,Sn=Math.min(W.start,re),W=W.end===void 0?Sn:Math.min(W.end,re),!it.extend&&Sn>W&&(re=W,W=Sn,Sn=re),re=U(De,Sn),N=U(De,W),re&&N&&(it.rangeCount!==1||it.anchorNode!==re.node||it.anchorOffset!==re.offset||it.focusNode!==N.node||it.focusOffset!==N.offset)&&(nt=nt.createRange(),nt.setStart(re.node,re.offset),it.removeAllRanges(),Sn>W?(it.addRange(nt),it.extend(N.node,N.offset)):(nt.setEnd(N.node,N.offset),it.addRange(nt)))))),nt=[],it=De;it=it.parentNode;)it.nodeType===1&&nt.push({element:it,left:it.scrollLeft,top:it.scrollTop});for(typeof De.focus=="function"&&De.focus(),De=0;De<nt.length;De++)it=nt[De],it.element.scrollLeft=it.left,it.element.scrollTop=it.top}Ms=!!Ea,xs=Ea=null,l.current=g,Ut=w;do try{for(De=l;Ut!==null;){var jt=Ut.flags;if(jt&36&&yE(De,Ut.alternate,Ut),jt&128){nt=void 0;var un=Ut.ref;if(un!==null){var _n=Ut.stateNode;switch(Ut.tag){case 5:nt=_n;break;default:nt=_n}typeof un=="function"?un(nt):un.current=nt}}Ut=Ut.nextEffect}}catch(vn){if(Ut===null)throw Error(n(330));ra(Ut,vn),Ut=Ut.nextEffect}while(Ut!==null);Ut=null,lE(),an=k}else l.current=g;if(Jl)Jl=!1,Kf=l,Ku=d;else for(Ut=w;Ut!==null;)d=Ut.nextEffect,Ut.nextEffect=null,Ut.flags&8&&(jt=Ut,jt.sibling=null,jt.stateNode=null),Ut=d;if(w=l.pendingLanes,w===0&&(Ro=null),w===1?l===tm?qf++:(qf=0,tm=l):qf=0,g=g.stateNode,Mu&&typeof Mu.onCommitFiberRoot=="function")try{Mu.onCommitFiberRoot(Tp,g,void 0,(g.current.flags&64)===64)}catch{}if(Ca(l,ls()),Wu)throw Wu=!1,l=uh,uh=null,l;return an&8||ba(),null}function TE(){for(;Ut!==null;){var l=Ut.alternate;fh||Xf===null||(Ut.flags&8?ci(Ut,Xf)&&(fh=!0):Ut.tag===13&&SE(l,Ut)&&ci(Ut,Xf)&&(fh=!0));var d=Ut.flags;d&256&&vE(l,Ut),!(d&512)||Jl||(Jl=!0,Tf(97,function(){return eu(),null})),Ut=Ut.nextEffect}}function eu(){if(Ku!==90){var l=97<Ku?97:Ku;return Ku=90,Nl(l,Wv)}return!1}function wE(l,d){Zp.push(d,l),Jl||(Jl=!0,Tf(97,function(){return eu(),null}))}function om(l,d){em.push(d,l),Jl||(Jl=!0,Tf(97,function(){return eu(),null}))}function Wv(){if(Kf===null)return!1;var l=Kf;if(Kf=null,an&48)throw Error(n(331));var d=an;an|=32;var g=em;em=[];for(var w=0;w<g.length;w+=2){var k=g[w],N=g[w+1],W=k.destroy;if(k.destroy=void 0,typeof W=="function")try{W()}catch(Se){if(N===null)throw Error(n(330));ra(N,Se)}}for(g=Zp,Zp=[],w=0;w<g.length;w+=2){k=g[w],N=g[w+1];try{var re=k.create;k.destroy=re()}catch(Se){if(N===null)throw Error(n(330));ra(N,Se)}}for(re=l.current.firstEffect;re!==null;)l=re.nextEffect,re.nextEffect=null,re.flags&8&&(re.sibling=null,re.stateNode=null),re=l;return an=d,ba(),!0}function lm(l,d,g){d=ah(g,d),d=qp(l,d,1),Ya(l,d),d=na(),l=dh(l,1),l!==null&&($a(l,1,d),Ca(l,d))}function ra(l,d){if(l.tag===3)lm(l,l,d);else for(var g=l.return;g!==null;){if(g.tag===3){lm(g,l,d);break}else if(g.tag===1){var w=g.stateNode;if(typeof g.type.getDerivedStateFromError=="function"||typeof w.componentDidCatch=="function"&&(Ro===null||!Ro.has(w))){l=ah(d,l);var k=Ov(g,l,1);if(Ya(g,k),k=na(),g=dh(g,1),g!==null)$a(g,1,k),Ca(g,k);else if(typeof w.componentDidCatch=="function"&&(Ro===null||!Ro.has(w)))try{w.componentDidCatch(d,l)}catch{}break}}g=g.return}}function CE(l,d,g){var w=l.pingCache;w!==null&&w.delete(d),d=na(),l.pingedLanes|=l.suspendedLanes&g,Ts===l&&(Wi&g)===g&&(gi===4||gi===3&&(Wi&62914560)===Wi&&500>ls()-Gf?Nc(l,0):Gu|=g),Ca(l,d)}function RE(l,d){var g=l.stateNode;g!==null&&g.delete(d),d=0,d===0&&(d=l.mode,d&2?d&4?(sl===0&&(sl=Ni),d=ni(62914560&~sl),d===0&&(d=4194304)):d=Fu()===99?1:2:d=1),g=na(),l=dh(l,d),l!==null&&($a(l,d,g),Ca(l,g))}var Kv;Kv=function(l,d,g){var w=d.lanes;if(l!==null)if(l.memoizedProps!==d.pendingProps||jr.current)Ja=!0;else if(g&w)Ja=!!(l.flags&16384);else{switch(Ja=!1,d.tag){case 3:Dv(d),Jd();break;case 5:Av(d);break;case 1:Pn(d.type)&&Fl(d);break;case 4:Op(d,d.stateNode.containerInfo);break;case 10:w=d.memoizedProps.value;var k=d.type._context;En(qa,k._currentValue),k._currentValue=w;break;case 13:if(d.memoizedState!==null)return g&d.child.childLanes?us(l,d,g):(En(Hr,Hr.current&1),d=ql(l,d,g),d!==null?d.sibling:null);En(Hr,Hr.current&1);break;case 19:if(w=(g&d.childLanes)!==0,l.flags&64){if(w)return Bf(l,d,g);d.flags|=64}if(k=d.memoizedState,k!==null&&(k.rendering=null,k.tail=null,k.lastEffect=null),En(Hr,Hr.current),w)break;return null;case 23:case 24:return d.lanes=0,Hp(l,d,g)}return ql(l,d,g)}else Ja=!1;switch(d.lanes=0,d.tag){case 2:if(w=d.type,l!==null&&(l.alternate=null,d.alternate=null,d.flags|=2),l=d.pendingProps,k=Iu(d,os.current),Nu(d,g),k=nl(null,d,w,l,k,g),d.flags|=1,typeof k=="object"&&k!==null&&typeof k.render=="function"&&k.$$typeof===void 0){if(d.tag=1,d.memoizedState=null,d.updateQueue=null,Pn(w)){var N=!0;Fl(d)}else N=!1;d.memoizedState=k.state!==null&&k.state!==void 0?k.state:null,Uu(d);var W=w.getDerivedStateFromProps;typeof W=="function"&&Lc(d,w,W,l),k.updater=Cf,d.stateNode=k,k._reactInternals=d,Af(d,w,l,g),d=Wp(null,d,w,!0,N,g)}else d.tag=0,bs(null,d,k,g),d=d.child;return d;case 16:k=d.elementType;e:{switch(l!==null&&(l.alternate=null,d.alternate=null,d.flags|=2),l=d.pendingProps,N=k._init,k=N(k._payload),d.type=k,N=d.tag=qv(k),l=Fi(k,l),N){case 0:d=Gp(null,d,k,l,g);break e;case 1:d=kv(null,d,k,l,g);break e;case 11:d=Lv(null,d,k,l,g);break e;case 14:d=zp(null,d,k,Fi(k.type,l),w,g);break e}throw Error(n(306,k,""))}return d;case 0:return w=d.type,k=d.pendingProps,k=d.elementType===w?k:Fi(w,k),Gp(l,d,w,k,g);case 1:return w=d.type,k=d.pendingProps,k=d.elementType===w?k:Fi(w,k),kv(l,d,w,k,g);case 3:if(Dv(d),w=d.updateQueue,l===null||w===null)throw Error(n(282));if(w=d.pendingProps,k=d.memoizedState,k=k!==null?k.element:null,Rv(l,d),wf(d,w,null,g),w=d.memoizedState.element,w===k)Jd(),d=ql(l,d,g);else{if(k=d.stateNode,(N=k.hydrate)&&(el=_u(d.stateNode.containerInfo.firstChild),bo=d,N=Xa=!0),N){if(l=k.mutableSourceEagerHydrationData,l!=null)for(k=0;k<l.length;k+=2)N=l[k],N._workInProgressVersionPrimary=l[k+1],tl.push(N);for(g=Mp(d,null,w,g),d.child=g;g;)g.flags=g.flags&-3|1024,g=g.sibling}else bs(l,d,w,g),Jd();d=d.child}return d;case 5:return Av(d),l===null&&Up(d),w=d.type,k=d.pendingProps,N=l!==null?l.memoizedProps:null,W=k.children,xa(w,k)?W=null:N!==null&&xa(w,N)&&(d.flags|=16),Uf(l,d),bs(l,d,W,g),d.child;case 6:return l===null&&Up(d),null;case 13:return us(l,d,g);case 4:return Op(d,d.stateNode.containerInfo),w=d.pendingProps,l===null?d.child=kf(d,null,w,g):bs(l,d,w,g),d.child;case 11:return w=d.type,k=d.pendingProps,k=d.elementType===w?k:Fi(w,k),Lv(l,d,w,k,g);case 7:return bs(l,d,d.pendingProps,g),d.child;case 8:return bs(l,d,d.pendingProps.children,g),d.child;case 12:return bs(l,d,d.pendingProps.children,g),d.child;case 10:e:{w=d.type._context,k=d.pendingProps,W=d.memoizedProps,N=k.value;var re=d.type._context;if(En(qa,re._currentValue),re._currentValue=N,W!==null)if(re=W.value,N=At(re,N)?0:(typeof w._calculateChangedBits=="function"?w._calculateChangedBits(re,N):1073741823)|0,N===0){if(W.children===k.children&&!jr.current){d=ql(l,d,g);break e}}else for(re=d.child,re!==null&&(re.return=d);re!==null;){var Se=re.dependencies;if(Se!==null){W=re.child;for(var Ye=Se.firstContext;Ye!==null;){if(Ye.context===w&&Ye.observedBits&N){re.tag===1&&(Ye=Vl(-1,g&-g),Ye.tag=2,Ya(re,Ye)),re.lanes|=g,Ye=re.alternate,Ye!==null&&(Ye.lanes|=g),kp(re.return,g),Se.lanes|=g;break}Ye=Ye.next}}else W=re.tag===10&&re.type===d.type?null:re.child;if(W!==null)W.return=re;else for(W=re;W!==null;){if(W===d){W=null;break}if(re=W.sibling,re!==null){re.return=W.return,W=re;break}W=W.return}re=W}bs(l,d,k.children,g),d=d.child}return d;case 9:return k=d.type,N=d.pendingProps,w=N.children,Nu(d,g),k=ea(k,N.unstable_observedBits),w=w(k),d.flags|=1,bs(l,d,w,g),d.child;case 14:return k=d.type,N=Fi(k,d.pendingProps),N=Fi(k.type,N),zp(l,d,k,N,w,g);case 15:return jp(l,d,d.type,d.pendingProps,w,g);case 17:return w=d.type,k=d.pendingProps,k=d.elementType===w?k:Fi(w,k),l!==null&&(l.alternate=null,d.alternate=null,d.flags|=2),d.tag=1,Pn(w)?(l=!0,Fl(d)):l=!1,Nu(d,g),Rf(d,w,k),Af(d,w,k,g),Wp(null,d,w,!0,l,g);case 19:return Bf(l,d,g);case 23:return Hp(l,d,g);case 24:return Hp(l,d,g)}throw Error(n(156,d.tag))};function AE(l,d,g,w){this.tag=l,this.key=g,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=d,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=w,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Ra(l,d,g,w){return new AE(l,d,g,w)}function um(l){return l=l.prototype,!(!l||!l.isReactComponent)}function qv(l){if(typeof l=="function")return um(l)?1:0;if(l!=null){if(l=l.$$typeof,l===ze)return 11;if(l===Pe)return 14}return 2}function tu(l,d){var g=l.alternate;return g===null?(g=Ra(l.tag,d,l.key,l.mode),g.elementType=l.elementType,g.type=l.type,g.stateNode=l.stateNode,g.alternate=l,l.alternate=g):(g.pendingProps=d,g.type=l.type,g.flags=0,g.nextEffect=null,g.firstEffect=null,g.lastEffect=null),g.childLanes=l.childLanes,g.lanes=l.lanes,g.child=l.child,g.memoizedProps=l.memoizedProps,g.memoizedState=l.memoizedState,g.updateQueue=l.updateQueue,d=l.dependencies,g.dependencies=d===null?null:{lanes:d.lanes,firstContext:d.firstContext},g.sibling=l.sibling,g.index=l.index,g.ref=l.ref,g}function mh(l,d,g,w,k,N){var W=2;if(w=l,typeof l=="function")um(l)&&(W=1);else if(typeof l=="string")W=5;else e:switch(l){case ye:return Xu(g.children,k,N,d);case He:W=8,k|=16;break;case de:W=8,k|=1;break;case Re:return l=Ra(12,g,d,k|8),l.elementType=Re,l.type=Re,l.lanes=N,l;case Qe:return l=Ra(13,g,d,k),l.type=Qe,l.elementType=Qe,l.lanes=N,l;case et:return l=Ra(19,g,d,k),l.elementType=et,l.lanes=N,l;case Be:return Qu(g,k,N,d);case Je:return l=Ra(24,g,d,k),l.elementType=Je,l.lanes=N,l;default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case Ce:W=10;break e;case Ve:W=9;break e;case ze:W=11;break e;case Pe:W=14;break e;case ne:W=16,w=null;break e;case _e:W=22;break e}throw Error(n(130,l==null?l:typeof l,""))}return d=Ra(W,g,d,k),d.elementType=l,d.type=w,d.lanes=N,d}function Xu(l,d,g,w){return l=Ra(7,l,w,d),l.lanes=g,l}function Qu(l,d,g,w){return l=Ra(23,l,w,d),l.elementType=Be,l.lanes=g,l}function Ju(l,d,g){return l=Ra(6,l,null,d),l.lanes=g,l}function cm(l,d,g){return d=Ra(4,l.children!==null?l.children:[],l.key,d),d.lanes=g,d.stateNode={containerInfo:l.containerInfo,pendingChildren:null,implementation:l.implementation},d}function _E(l,d,g){this.tag=d,this.containerInfo=l,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=g,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=va(0),this.expirationTimes=va(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=va(0),this.mutableSourceEagerHydrationData=null}function LE(l,d,g){var w=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ie,key:w==null?null:""+w,children:l,containerInfo:d,implementation:g}}function Zu(l,d,g,w){var k=d.current,N=na(),W=Zl(k);e:if(g){g=g._reactInternals;t:{if(ui(g)!==g||g.tag!==1)throw Error(n(170));var re=g;do{switch(re.tag){case 3:re=re.stateNode.context;break t;case 1:if(Pn(re.type)){re=re.stateNode.__reactInternalMemoizedMergedChildContext;break t}}re=re.return}while(re!==null);throw Error(n(171))}if(g.tag===1){var Se=g.type;if(Pn(Se)){g=Ac(g,Se,re);break e}}g=re}else g=Un;return d.context===null?d.context=g:d.pendingContext=g,d=Vl(N,W),d.payload={element:l},w=w===void 0?null:w,w!==null&&(d.callback=w),Ya(k,d),Ao(k,W,N),W}function fm(l){if(l=l.current,!l.child)return null;switch(l.child.tag){case 5:return l.child.stateNode;default:return l.child.stateNode}}function dm(l,d){if(l=l.memoizedState,l!==null&&l.dehydrated!==null){var g=l.retryLane;l.retryLane=g!==0&&g<d?g:d}}function hm(l,d){dm(l,d),(l=l.alternate)&&dm(l,d)}function Yv(){return null}function gh(l,d,g){var w=g!=null&&g.hydrationOptions!=null&&g.hydrationOptions.mutableSources||null;if(g=new _E(l,d,g!=null&&g.hydrate===!0),d=Ra(3,null,null,d===2?7:d===1?3:0),g.current=d,d.stateNode=g,Uu(d),l[Cc]=g.current,Qs(l.nodeType===8?l.parentNode:l),w)for(l=0;l<w.length;l++){d=w[l];var k=d._getVersion;k=k(d._source),g.mutableSourceEagerHydrationData==null?g.mutableSourceEagerHydrationData=[d,k]:g.mutableSourceEagerHydrationData.push(d,k)}this._internalRoot=g}gh.prototype.render=function(l){Zu(l,this._internalRoot,null,null)},gh.prototype.unmount=function(){var l=this._internalRoot,d=l.containerInfo;Zu(null,l,null,function(){d[Cc]=null})};function Qf(l){return!(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11&&(l.nodeType!==8||l.nodeValue!==" react-mount-point-unstable "))}function kE(l,d){if(d||(d=l?l.nodeType===9?l.documentElement:l.firstChild:null,d=!(!d||d.nodeType!==1||!d.hasAttribute("data-reactroot"))),!d)for(var g;g=l.lastChild;)l.removeChild(g);return new gh(l,0,d?{hydrate:!0}:void 0)}function vh(l,d,g,w,k){var N=g._reactRootContainer;if(N){var W=N._internalRoot;if(typeof k=="function"){var re=k;k=function(){var Ye=fm(W);re.call(Ye)}}Zu(d,W,l,k)}else{if(N=g._reactRootContainer=kE(g,w),W=N._internalRoot,typeof k=="function"){var Se=k;k=function(){var Ye=fm(W);Se.call(Ye)}}jv(function(){Zu(d,W,l,k)})}return fm(W)}Zi=function(l){if(l.tag===13){var d=na();Ao(l,4,d),hm(l,4)}},$o=function(l){if(l.tag===13){var d=na();Ao(l,67108864,d),hm(l,67108864)}},Mi=function(l){if(l.tag===13){var d=na(),g=Zl(l);Ao(l,g,d),hm(l,g)}},Ua=function(l,d){return d()},pa=function(l,d,g){switch(d){case"input":if(Pr(l,g),d=g.name,g.type==="radio"&&d!=null){for(g=l;g.parentNode;)g=g.parentNode;for(g=g.querySelectorAll("input[name="+JSON.stringify(""+d)+'][type="radio"]'),d=0;d<g.length;d++){var w=g[d];if(w!==l&&w.form===l.form){var k=Zs(w);if(!k)throw Error(n(90));Ar(w),Pr(w,k)}}}break;case"textarea":fa(l,g);break;case"select":d=g.value,d!=null&&ai(l,!!g.multiple,d,!1)}},Ls=zv,ge=function(l,d,g,w,k){var N=an;an|=4;try{return Nl(98,l.bind(null,d,g,w,k))}finally{an=N,an===0&&(Co(),ba())}},lt=function(){!(an&49)&&(xE(),eu())},yt=function(l,d){var g=an;an|=2;try{return l(d)}finally{an=g,an===0&&(Co(),ba())}};function Xv(l,d){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Qf(d))throw Error(n(200));return LE(l,d,null,g)}var DE={Events:[Ef,$s,Zs,Qr,Rn,eu,{current:!1}]},Jf={findFiberByHostInstance:ku,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},IE={bundleType:Jf.bundleType,version:Jf.version,rendererPackageName:Jf.rendererPackageName,rendererConfig:Jf.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:X.ReactCurrentDispatcher,findHostInstanceByFiber:function(l){return l=pr(l),l===null?null:l.stateNode},findFiberByHostInstance:Jf.findFiberByHostInstance||Yv,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var yh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yh.isDisabled&&yh.supportsFiber)try{Tp=yh.inject(IE),Mu=yh}catch{}}return Da.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=DE,Da.createPortal=Xv,Da.findDOMNode=function(l){if(l==null)return null;if(l.nodeType===1)return l;var d=l._reactInternals;if(d===void 0)throw typeof l.render=="function"?Error(n(188)):Error(n(268,Object.keys(l)));return l=pr(d),l=l===null?null:l.stateNode,l},Da.flushSync=function(l,d){var g=an;if(g&48)return l(d);an|=1;try{if(l)return Nl(99,l.bind(null,d))}finally{an=g,ba()}},Da.hydrate=function(l,d,g){if(!Qf(d))throw Error(n(200));return vh(null,l,d,!0,g)},Da.render=function(l,d,g){if(!Qf(d))throw Error(n(200));return vh(null,l,d,!1,g)},Da.unmountComponentAtNode=function(l){if(!Qf(l))throw Error(n(40));return l._reactRootContainer?(jv(function(){vh(null,null,l,!1,function(){l._reactRootContainer=null,l[Cc]=null})}),!0):!1},Da.unstable_batchedUpdates=zv,Da.unstable_createPortal=function(l,d){return Xv(l,d,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)},Da.unstable_renderSubtreeIntoContainer=function(l,d,g,w){if(!Qf(g))throw Error(n(200));if(l==null||l._reactInternals===void 0)throw Error(n(38));return vh(l,d,g,!1,w)},Da.version="17.0.2",Da}var Ia={},rg={exports:{}},Oo={};/** @license React v0.20.2
|
|
69
|
+
* scheduler-tracing.production.min.js
|
|
70
|
+
*
|
|
71
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the MIT license found in the
|
|
74
|
+
* LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/var cT;function jI(){if(cT)return Oo;cT=1;var r=0;return Oo.__interactionsRef=null,Oo.__subscriberRef=null,Oo.unstable_clear=function(e){return e()},Oo.unstable_getCurrent=function(){return null},Oo.unstable_getThreadID=function(){return++r},Oo.unstable_subscribe=function(){},Oo.unstable_trace=function(e,t,n){return n()},Oo.unstable_unsubscribe=function(){},Oo.unstable_wrap=function(e){return e},Oo}var Iy={},fT;function HI(){return fT||(fT=1,function(r){var e={};/** @license React v0.20.2
|
|
76
|
+
* scheduler-tracing.development.js
|
|
77
|
+
*
|
|
78
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
79
|
+
*
|
|
80
|
+
* This source code is licensed under the MIT license found in the
|
|
81
|
+
* LICENSE file in the root directory of this source tree.
|
|
82
|
+
*/e.NODE_ENV!=="production"&&function(){var t=0,n=0,s=0;r.__interactionsRef=null,r.__subscriberRef=null,r.__interactionsRef={current:new Set},r.__subscriberRef={current:null};function o(K){var Y=r.__interactionsRef.current;r.__interactionsRef.current=new Set;try{return K()}finally{r.__interactionsRef.current=Y}}function u(){return r.__interactionsRef.current}function c(){return++s}function h(K,Y,X){var ue=arguments.length>3&&arguments[3]!==void 0?arguments[3]:t,ie={__count:1,id:n++,name:K,timestamp:Y},ye=r.__interactionsRef.current,de=new Set(ye);de.add(ie),r.__interactionsRef.current=de;var Re=r.__subscriberRef.current,Ce;try{Re!==null&&Re.onInteractionTraced(ie)}finally{try{Re!==null&&Re.onWorkStarted(de,ue)}finally{try{Ce=X()}finally{r.__interactionsRef.current=ye;try{Re!==null&&Re.onWorkStopped(de,ue)}finally{ie.__count--,Re!==null&&ie.__count===0&&Re.onInteractionScheduledWorkCompleted(ie)}}}}return Ce}function m(K){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,X=r.__interactionsRef.current,ue=r.__subscriberRef.current;ue!==null&&ue.onWorkScheduled(X,Y),X.forEach(function(de){de.__count++});var ie=!1;function ye(){var de=r.__interactionsRef.current;r.__interactionsRef.current=X,ue=r.__subscriberRef.current;try{var Re;try{ue!==null&&ue.onWorkStarted(X,Y)}finally{try{Re=K.apply(void 0,arguments)}finally{r.__interactionsRef.current=de,ue!==null&&ue.onWorkStopped(X,Y)}}return Re}finally{ie||(ie=!0,X.forEach(function(Ce){Ce.__count--,ue!==null&&Ce.__count===0&&ue.onInteractionScheduledWorkCompleted(Ce)}))}}return ye.cancel=function(){ue=r.__subscriberRef.current;try{ue!==null&&ue.onWorkCanceled(X,Y)}finally{X.forEach(function(Re){Re.__count--,ue&&Re.__count===0&&ue.onInteractionScheduledWorkCompleted(Re)})}},ye}var y=null;y=new Set;function E(K){y.add(K),y.size===1&&(r.__subscriberRef.current={onInteractionScheduledWorkCompleted:_,onInteractionTraced:R,onWorkCanceled:Z,onWorkScheduled:L,onWorkStarted:M,onWorkStopped:F})}function T(K){y.delete(K),y.size===0&&(r.__subscriberRef.current=null)}function R(K){var Y=!1,X=null;if(y.forEach(function(ue){try{ue.onInteractionTraced(K)}catch(ie){Y||(Y=!0,X=ie)}}),Y)throw X}function _(K){var Y=!1,X=null;if(y.forEach(function(ue){try{ue.onInteractionScheduledWorkCompleted(K)}catch(ie){Y||(Y=!0,X=ie)}}),Y)throw X}function L(K,Y){var X=!1,ue=null;if(y.forEach(function(ie){try{ie.onWorkScheduled(K,Y)}catch(ye){X||(X=!0,ue=ye)}}),X)throw ue}function M(K,Y){var X=!1,ue=null;if(y.forEach(function(ie){try{ie.onWorkStarted(K,Y)}catch(ye){X||(X=!0,ue=ye)}}),X)throw ue}function F(K,Y){var X=!1,ue=null;if(y.forEach(function(ie){try{ie.onWorkStopped(K,Y)}catch(ye){X||(X=!0,ue=ye)}}),X)throw ue}function Z(K,Y){var X=!1,ue=null;if(y.forEach(function(ie){try{ie.onWorkCanceled(K,Y)}catch(ye){X||(X=!0,ue=ye)}}),X)throw ue}r.unstable_clear=o,r.unstable_getCurrent=u,r.unstable_getThreadID=c,r.unstable_subscribe=E,r.unstable_trace=h,r.unstable_unsubscribe=T,r.unstable_wrap=m}()}(Iy)),Iy}var dT;function GI(){if(dT)return rg.exports;dT=1;var r={};return r.NODE_ENV==="production"?rg.exports=jI():rg.exports=HI(),rg.exports}var hT;function WI(){if(hT)return Ia;hT=1;var r={};/** @license React v17.0.2
|
|
83
|
+
* react-dom.development.js
|
|
84
|
+
*
|
|
85
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
86
|
+
*
|
|
87
|
+
* This source code is licensed under the MIT license found in the
|
|
88
|
+
* LICENSE file in the root directory of this source tree.
|
|
89
|
+
*/return r.NODE_ENV!=="production"&&function(){var e=Tt,t=Ed(),n=lT(),s=GI(),o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function u(i){{for(var a=arguments.length,f=new Array(a>1?a-1:0),v=1;v<a;v++)f[v-1]=arguments[v];h("warn",i,f)}}function c(i){{for(var a=arguments.length,f=new Array(a>1?a-1:0),v=1;v<a;v++)f[v-1]=arguments[v];h("error",i,f)}}function h(i,a,f){{var v=o.ReactDebugCurrentFrame,x=v.getStackAddendum();x!==""&&(a+="%s",f=f.concat([x]));var C=f.map(function(P){return""+P});C.unshift("Warning: "+a),Function.prototype.apply.call(console[i],console,C)}}if(!e)throw Error("ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM.");var m=0,y=1,E=2,T=3,R=4,_=5,L=6,M=7,F=8,Z=9,K=10,Y=11,X=12,ue=13,ie=14,ye=15,de=16,Re=17,Ce=18,Ve=19,ze=20,Qe=21,et=22,Pe=23,ne=24,_e=!0,Ue=!1,He=!1,Be=!1,Je=new Set,Xe={},Et={};function gt(i,a){Ot(i,a),Ot(i+"Capture",a)}function Ot(i,a){Xe[i]&&c("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",i),Xe[i]=a;{var f=i.toLowerCase();Et[f]=i,i==="onDoubleClick"&&(Et.ondblclick=i)}for(var v=0;v<a.length;v++)Je.add(a[v])}var Dt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",bn=0,tn=1,Fn=2,wt=3,Tn=4,Mn=5,Pi=6,Rr=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",Ar=Rr+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",ii="data-reactroot",Xr=new RegExp("^["+Rr+"]["+Ar+"]*$"),xi=Object.prototype.hasOwnProperty,As={},Pr={};function si(i){return xi.call(Pr,i)?!0:xi.call(As,i)?!1:Xr.test(i)?(Pr[i]=!0,!0):(As[i]=!0,c("Invalid attribute name: `%s`",i),!1)}function Ft(i,a,f){return a!==null?a.type===bn:f?!1:i.length>2&&(i[0]==="o"||i[0]==="O")&&(i[1]==="n"||i[1]==="N")}function nr(i,a,f,v){if(f!==null&&f.type===bn)return!1;switch(typeof a){case"function":case"symbol":return!0;case"boolean":{if(v)return!1;if(f!==null)return!f.acceptsBooleans;var x=i.toLowerCase().slice(0,5);return x!=="data-"&&x!=="aria-"}default:return!1}}function _r(i,a,f,v){if(a===null||typeof a>"u"||nr(i,a,f,v))return!0;if(v)return!1;if(f!==null)switch(f.type){case wt:return!a;case Tn:return a===!1;case Mn:return isNaN(a);case Pi:return isNaN(a)||a<1}return!1}function ai(i){return dr.hasOwnProperty(i)?dr[i]:null}function or(i,a,f,v,x,C,P){this.acceptsBooleans=a===Fn||a===wt||a===Tn,this.attributeName=v,this.attributeNamespace=x,this.mustUseProperty=f,this.propertyName=i,this.type=a,this.sanitizeURL=C,this.removeEmptyString=P}var dr={},fa=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];fa.forEach(function(i){dr[i]=new or(i,bn,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var a=i[0],f=i[1];dr[a]=new or(a,tn,!1,f,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){dr[i]=new or(i,Fn,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){dr[i]=new or(i,Fn,!1,i,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(function(i){dr[i]=new or(i,wt,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){dr[i]=new or(i,wt,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){dr[i]=new or(i,Tn,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){dr[i]=new or(i,Pi,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){dr[i]=new or(i,Mn,!1,i.toLowerCase(),null,!1,!1)});var da=/[\-\:]([a-z])/g,Mr=function(i){return i[1].toUpperCase()};["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(function(i){var a=i.replace(da,Mr);dr[a]=new or(a,tn,!1,i,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(i){var a=i.replace(da,Mr);dr[a]=new or(a,tn,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var a=i.replace(da,Mr);dr[a]=new or(a,tn,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){dr[i]=new or(i,tn,!1,i.toLowerCase(),null,!1,!1)});var xt="xlinkHref";dr[xt]=new or("xlinkHref",tn,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){dr[i]=new or(i,tn,!1,i.toLowerCase(),null,!0,!0)});var Pt=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i,Jt=!1;function On(i){!Jt&&Pt.test(i)&&(Jt=!0,c("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.",JSON.stringify(i)))}function $n(i,a,f,v){if(v.mustUseProperty){var x=v.propertyName;return i[x]}else{v.sanitizeURL&&On(""+f);var C=v.attributeName,P=null;if(v.type===Tn){if(i.hasAttribute(C)){var O=i.getAttribute(C);return O===""?!0:_r(a,f,v,!1)?O:O===""+f?f:O}}else if(i.hasAttribute(C)){if(_r(a,f,v,!1))return i.getAttribute(C);if(v.type===wt)return f;P=i.getAttribute(C)}return _r(a,f,v,!1)?P===null?f:P:P===""+f?f:P}}function Yn(i,a,f){{if(!si(a))return;if(cV(f))return f;if(!i.hasAttribute(a))return f===void 0?void 0:null;var v=i.getAttribute(a);return v===""+f?f:v}}function hr(i,a,f,v){var x=ai(a);if(!Ft(a,x,v)){if(_r(a,f,x,v)&&(f=null),v||x===null){if(si(a)){var C=a;f===null?i.removeAttribute(C):i.setAttribute(C,""+f)}return}var P=x.mustUseProperty;if(P){var O=x.propertyName;if(f===null){var z=x.type;i[O]=z===wt?!1:""}else i[O]=f;return}var se=x.attributeName,ce=x.attributeNamespace;if(f===null)i.removeAttribute(se);else{var $e=x.type,Ee;$e===wt||$e===Tn&&f===!0?Ee="":(Ee=""+f,x.sanitizeURL&&On(Ee.toString())),ce?i.setAttributeNS(ce,se,Ee):i.setAttribute(se,Ee)}}}var Sr=60103,jn=60106,oi=60107,ha=60108,_s=60114,qs=60109,pa=60110,vt=60112,Nn=60113,li=60120,Qr=60115,Rn=60116,Ls=60121,ge=60119,lt=60128,yt=60129,$t=60130,Nt=60131;if(typeof Symbol=="function"&&Symbol.for){var Xt=Symbol.for;Sr=Xt("react.element"),jn=Xt("react.portal"),oi=Xt("react.fragment"),ha=Xt("react.strict_mode"),_s=Xt("react.profiler"),qs=Xt("react.provider"),pa=Xt("react.context"),vt=Xt("react.forward_ref"),Nn=Xt("react.suspense"),li=Xt("react.suspense_list"),Qr=Xt("react.memo"),Rn=Xt("react.lazy"),Ls=Xt("react.block"),Xt("react.server.block"),Xt("react.fundamental"),ge=Xt("react.scope"),lt=Xt("react.opaque.id"),yt=Xt("react.debug_trace_mode"),$t=Xt("react.offscreen"),Nt=Xt("react.legacy_hidden")}var wn=typeof Symbol=="function"&&Symbol.iterator,yn="@@iterator";function rr(i){if(i===null||typeof i!="object")return null;var a=wn&&i[wn]||i[yn];return typeof a=="function"?a:null}var kn=0,lr,Jr,Vi,Ys,bi,xu,_l;function Ll(){}Ll.__reactDisabledLog=!0;function ui(){{if(kn===0){lr=console.log,Jr=console.info,Vi=console.warn,Ys=console.error,bi=console.group,xu=console.groupCollapsed,_l=console.groupEnd;var i={configurable:!0,enumerable:!0,value:Ll,writable:!0};Object.defineProperties(console,{info:i,log:i,warn:i,error:i,group:i,groupCollapsed:i,groupEnd:i})}kn++}}function Qi(){{if(kn--,kn===0){var i={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:t({},i,{value:lr}),info:t({},i,{value:Jr}),warn:t({},i,{value:Vi}),error:t({},i,{value:Ys}),group:t({},i,{value:bi}),groupCollapsed:t({},i,{value:xu}),groupEnd:t({},i,{value:_l})})}kn<0&&c("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var uo=o.ReactCurrentDispatcher,Ji;function pr(i,a,f){{if(Ji===void 0)try{throw Error()}catch(x){var v=x.stack.trim().match(/\n( *(at )?)/);Ji=v&&v[1]||""}return`
|
|
90
|
+
`+Ji+i}}var ci=!1,Zi;{var $o=typeof WeakMap=="function"?WeakMap:Map;Zi=new $o}function Mi(i,a){if(!i||ci)return"";{var f=Zi.get(i);if(f!==void 0)return f}var v;ci=!0;var x=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var C;C=uo.current,uo.current=null,ui();try{if(a){var P=function(){throw Error()};if(Object.defineProperty(P.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(P,[])}catch(st){v=st}Reflect.construct(i,[],P)}else{try{P.call()}catch(st){v=st}i.call(P.prototype)}}else{try{throw Error()}catch(st){v=st}i()}}catch(st){if(st&&v&&typeof st.stack=="string"){for(var O=st.stack.split(`
|
|
91
|
+
`),z=v.stack.split(`
|
|
92
|
+
`),se=O.length-1,ce=z.length-1;se>=1&&ce>=0&&O[se]!==z[ce];)ce--;for(;se>=1&&ce>=0;se--,ce--)if(O[se]!==z[ce]){if(se!==1||ce!==1)do if(se--,ce--,ce<0||O[se]!==z[ce]){var $e=`
|
|
93
|
+
`+O[se].replace(" at new "," at ");return typeof i=="function"&&Zi.set(i,$e),$e}while(se>=1&&ce>=0);break}}}finally{ci=!1,uo.current=C,Qi(),Error.prepareStackTrace=x}var Ee=i?i.displayName||i.name:"",Ke=Ee?pr(Ee):"";return typeof i=="function"&&Zi.set(i,Ke),Ke}function Ua(i,a,f){return Mi(i,!0)}function ks(i,a,f){return Mi(i,!1)}function Ti(i){var a=i.prototype;return!!(a&&a.isReactComponent)}function es(i,a,f){if(i==null)return"";if(typeof i=="function")return Mi(i,Ti(i));if(typeof i=="string")return pr(i);switch(i){case Nn:return pr("Suspense");case li:return pr("SuspenseList")}if(typeof i=="object")switch(i.$$typeof){case vt:return ks(i.render);case Qr:return es(i.type,a,f);case Ls:return ks(i._render);case Rn:{var v=i,x=v._payload,C=v._init;try{return es(C(x),a,f)}catch{}}}return""}function fi(i){switch(i._debugOwner&&i._debugOwner.type,i._debugSource,i.tag){case _:return pr(i.type);case de:return pr("Lazy");case ue:return pr("Suspense");case Ve:return pr("SuspenseList");case m:case E:case ye:return ks(i.type);case Y:return ks(i.type.render);case et:return ks(i.type._render);case y:return Ua(i.type);default:return""}}function ts(i){try{var a="",f=i;do a+=fi(f),f=f.return;while(f);return a}catch(v){return`
|
|
94
|
+
Error generating stack: `+v.message+`
|
|
95
|
+
`+v.stack}}function co(i,a,f){var v=a.displayName||a.name||"";return i.displayName||(v!==""?f+"("+v+")":f)}function ns(i){return i.displayName||"Context"}function dt(i){if(i==null)return null;if(typeof i.tag=="number"&&c("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case oi:return"Fragment";case jn:return"Portal";case _s:return"Profiler";case ha:return"StrictMode";case Nn:return"Suspense";case li:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case pa:var a=i;return ns(a)+".Consumer";case qs:var f=i;return ns(f._context)+".Provider";case vt:return co(i,i.render,"ForwardRef");case Qr:return dt(i.type);case Ls:return dt(i._render);case Rn:{var v=i,x=v._payload,C=v._init;try{return dt(C(x))}catch{return null}}}return null}var Vo=o.ReactDebugCurrentFrame,Or=null,ma=!1;function Ds(){{if(Or===null)return null;var i=Or._debugOwner;if(i!==null&&typeof i<"u")return dt(i.type)}return null}function zo(){return Or===null?"":ts(Or)}function Zr(){Vo.getCurrentStack=null,Or=null,ma=!1}function ir(i){Vo.getCurrentStack=zo,Or=i,ma=!1}function ei(i){ma=i}function bu(){return ma}function Er(i){return""+i}function Oi(i){switch(typeof i){case"boolean":case"number":case"object":case"string":case"undefined":return i;default:return""}}var jo={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0};function ga(i,a){jo[a.type]||a.onChange||a.onInput||a.readOnly||a.disabled||a.value==null||c("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."),a.onChange||a.readOnly||a.disabled||a.checked==null||c("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}function Ho(i){var a=i.type,f=i.nodeName;return f&&f.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function kl(i){return i._valueTracker}function Dl(i){i._valueTracker=null}function Il(i){var a="";return i&&(Ho(i)?a=i.checked?"true":"false":a=i.value),a}function Ba(i){var a=Ho(i)?"checked":"value",f=Object.getOwnPropertyDescriptor(i.constructor.prototype,a),v=""+i[a];if(!(i.hasOwnProperty(a)||typeof f>"u"||typeof f.get!="function"||typeof f.set!="function")){var x=f.get,C=f.set;Object.defineProperty(i,a,{configurable:!0,get:function(){return x.call(this)},set:function(O){v=""+O,C.call(this,O)}}),Object.defineProperty(i,a,{enumerable:f.enumerable});var P={getValue:function(){return v},setValue:function(O){v=""+O},stopTracking:function(){Dl(i),delete i[a]}};return P}}function j(i){kl(i)||(i._valueTracker=Ba(i))}function be(i){if(!i)return!1;var a=kl(i);if(!a)return!0;var f=a.getValue(),v=Il(i);return v!==f?(a.setValue(v),!0):!1}function We(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var tt=!1,Rt=!1,Kt=!1,Qt=!1;function bt(i){var a=i.type==="checkbox"||i.type==="radio";return a?i.checked!=null:i.value!=null}function Dn(i,a){var f=i,v=a.checked,x=t({},a,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:v??f._wrapperState.initialChecked});return x}function sr(i,a){ga("input",a),a.checked!==void 0&&a.defaultChecked!==void 0&&!Rt&&(c("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",Ds()||"A component",a.type),Rt=!0),a.value!==void 0&&a.defaultValue!==void 0&&!tt&&(c("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",Ds()||"A component",a.type),tt=!0);var f=i,v=a.defaultValue==null?"":a.defaultValue;f._wrapperState={initialChecked:a.checked!=null?a.checked:a.defaultChecked,initialValue:Oi(a.value!=null?a.value:v),controlled:bt(a)}}function Zn(i,a){var f=i,v=a.checked;v!=null&&hr(f,"checked",v,!1)}function Xn(i,a){var f=i;{var v=bt(a);!f._wrapperState.controlled&&v&&!Qt&&(c("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"),Qt=!0),f._wrapperState.controlled&&!v&&!Kt&&(c("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"),Kt=!0)}Zn(i,a);var x=Oi(a.value),C=a.type;if(x!=null)C==="number"?(x===0&&f.value===""||f.value!=x)&&(f.value=Er(x)):f.value!==Er(x)&&(f.value=Er(x));else if(C==="submit"||C==="reset"){f.removeAttribute("value");return}a.hasOwnProperty("value")?va(f,a.type,x):a.hasOwnProperty("defaultValue")&&va(f,a.type,Oi(a.defaultValue)),a.checked==null&&a.defaultChecked!=null&&(f.defaultChecked=!!a.defaultChecked)}function wi(i,a,f){var v=i;if(a.hasOwnProperty("value")||a.hasOwnProperty("defaultValue")){var x=a.type,C=x==="submit"||x==="reset";if(C&&(a.value===void 0||a.value===null))return;var P=Er(v._wrapperState.initialValue);f||P!==v.value&&(v.value=P),v.defaultValue=P}var O=v.name;O!==""&&(v.name=""),v.defaultChecked=!v.defaultChecked,v.defaultChecked=!!v._wrapperState.initialChecked,O!==""&&(v.name=O)}function ti(i,a){var f=i;Xn(f,a),ni(f,a)}function ni(i,a){var f=a.name;if(a.type==="radio"&&f!=null){for(var v=i;v.parentNode;)v=v.parentNode;for(var x=v.querySelectorAll("input[name="+JSON.stringify(""+f)+'][type="radio"]'),C=0;C<x.length;C++){var P=x[C];if(!(P===i||P.form!==i.form)){var O=l0(P);if(!O)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");be(P),Xn(P,O)}}}}function va(i,a,f){(a!=="number"||We(i.ownerDocument)!==i)&&(f==null?i.defaultValue=Er(i._wrapperState.initialValue):i.defaultValue!==Er(f)&&(i.defaultValue=Er(f)))}var $a=!1,Is=!1;function hf(i){var a="";return e.Children.forEach(i,function(f){f!=null&&(a+=f)}),a}function Tu(i,a){typeof a.children=="object"&&a.children!==null&&e.Children.forEach(a.children,function(f){f!=null&&(typeof f=="string"||typeof f=="number"||typeof f.type=="string"&&(Is||(Is=!0,c("Only strings and numbers are supported as <option> children."))))}),a.selected!=null&&!$a&&(c("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),$a=!0)}function Ec(i,a){a.value!=null&&i.setAttribute("value",Er(Oi(a.value)))}function ya(i,a){var f=t({children:void 0},a),v=hf(a.children);return v&&(f.children=v),f}var Ps;Ps=!1;function Ms(){var i=Ds();return i?`
|
|
96
|
+
|
|
97
|
+
Check the render method of \``+i+"`.":""}var Va=["value","defaultValue"];function rs(i){{ga("select",i);for(var a=0;a<Va.length;a++){var f=Va[a];if(i[f]!=null){var v=Array.isArray(i[f]);i.multiple&&!v?c("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",f,Ms()):!i.multiple&&v&&c("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",f,Ms())}}}}function Lr(i,a,f,v){var x=i.options;if(a){for(var C=f,P={},O=0;O<C.length;O++)P["$"+C[O]]=!0;for(var z=0;z<x.length;z++){var se=P.hasOwnProperty("$"+x[z].value);x[z].selected!==se&&(x[z].selected=se),se&&v&&(x[z].defaultSelected=!0)}}else{for(var ce=Er(Oi(f)),$e=null,Ee=0;Ee<x.length;Ee++){if(x[Ee].value===ce){x[Ee].selected=!0,v&&(x[Ee].defaultSelected=!0);return}$e===null&&!x[Ee].disabled&&($e=x[Ee])}$e!==null&&($e.selected=!0)}}function wu(i,a){return t({},a,{value:void 0})}function is(i,a){var f=i;rs(a),f._wrapperState={wasMultiple:!!a.multiple},a.value!==void 0&&a.defaultValue!==void 0&&!Ps&&(c("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://reactjs.org/link/controlled-components"),Ps=!0)}function za(i,a){var f=i;f.multiple=!!a.multiple;var v=a.value;v!=null?Lr(f,!!a.multiple,v,!1):a.defaultValue!=null&&Lr(f,!!a.multiple,a.defaultValue,!0)}function fo(i,a){var f=i,v=f._wrapperState.wasMultiple;f._wrapperState.wasMultiple=!!a.multiple;var x=a.value;x!=null?Lr(f,!!a.multiple,x,!1):v!==!!a.multiple&&(a.defaultValue!=null?Lr(f,!!a.multiple,a.defaultValue,!0):Lr(f,!!a.multiple,a.multiple?[]:"",!1))}function pf(i,a){var f=i,v=a.value;v!=null&&Lr(f,!!a.multiple,v,!1)}var Go=!1;function Wo(i,a){var f=i;if(a.dangerouslySetInnerHTML!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");var v=t({},a,{value:void 0,defaultValue:void 0,children:Er(f._wrapperState.initialValue)});return v}function Cu(i,a){var f=i;ga("textarea",a),a.value!==void 0&&a.defaultValue!==void 0&&!Go&&(c("%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://reactjs.org/link/controlled-components",Ds()||"A component"),Go=!0);var v=a.value;if(v==null){var x=a.children,C=a.defaultValue;if(x!=null){c("Use the `defaultValue` or `value` props instead of setting children on <textarea>.");{if(C!=null)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(Array.isArray(x)){if(!(x.length<=1))throw Error("<textarea> can only have at most one child.");x=x[0]}C=x}}C==null&&(C=""),v=C}f._wrapperState={initialValue:Oi(v)}}function di(i,a){var f=i,v=Oi(a.value),x=Oi(a.defaultValue);if(v!=null){var C=Er(v);C!==f.value&&(f.value=C),a.defaultValue==null&&f.defaultValue!==C&&(f.defaultValue=C)}x!=null&&(f.defaultValue=Er(x))}function Os(i,a){var f=i,v=f.textContent;v===f._wrapperState.initialValue&&v!==""&&v!==null&&(f.value=v)}function Ko(i,a){di(i,a)}var Fs="http://www.w3.org/1999/xhtml",Hd="http://www.w3.org/1998/Math/MathML",Pl="http://www.w3.org/2000/svg",Ru={html:Fs,mathml:Hd,svg:Pl};function ho(i){switch(i){case"svg":return Pl;case"math":return Hd;default:return Fs}}function qo(i,a){return i==null||i===Fs?ho(a):i===Pl&&a==="foreignObject"?Fs:i}var mf=function(i){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(a,f,v,x){MSApp.execUnsafeLocalFunction(function(){return i(a,f,v,x)})}:i},Yo,gf=mf(function(i,a){if(i.namespaceURI===Ru.svg&&!("innerHTML"in i)){Yo=Yo||document.createElement("div"),Yo.innerHTML="<svg>"+a.valueOf().toString()+"</svg>";for(var f=Yo.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;f.firstChild;)i.appendChild(f.firstChild);return}i.innerHTML=a}),gs=1,Ns=3,Ci=8,vs=9,vf=11,xc=function(i,a){if(a){var f=i.firstChild;if(f&&f===i.lastChild&&f.nodeType===Ns){f.nodeValue=a;return}}i.textContent=a},yp={animation:["animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationTimingFunction"],background:["backgroundAttachment","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundSize"],backgroundPosition:["backgroundPositionX","backgroundPositionY"],border:["borderBottomColor","borderBottomStyle","borderBottomWidth","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRightColor","borderRightStyle","borderRightWidth","borderTopColor","borderTopStyle","borderTopWidth"],borderBlockEnd:["borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth"],borderBlockStart:["borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth"],borderBottom:["borderBottomColor","borderBottomStyle","borderBottomWidth"],borderColor:["borderBottomColor","borderLeftColor","borderRightColor","borderTopColor"],borderImage:["borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth"],borderInlineEnd:["borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth"],borderInlineStart:["borderInlineStartColor","borderInlineStartStyle","borderInlineStartWidth"],borderLeft:["borderLeftColor","borderLeftStyle","borderLeftWidth"],borderRadius:["borderBottomLeftRadius","borderBottomRightRadius","borderTopLeftRadius","borderTopRightRadius"],borderRight:["borderRightColor","borderRightStyle","borderRightWidth"],borderStyle:["borderBottomStyle","borderLeftStyle","borderRightStyle","borderTopStyle"],borderTop:["borderTopColor","borderTopStyle","borderTopWidth"],borderWidth:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"],columnRule:["columnRuleColor","columnRuleStyle","columnRuleWidth"],columns:["columnCount","columnWidth"],flex:["flexBasis","flexGrow","flexShrink"],flexFlow:["flexDirection","flexWrap"],font:["fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantLigatures","fontVariantNumeric","fontVariantPosition","fontWeight","lineHeight"],fontVariant:["fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantLigatures","fontVariantNumeric","fontVariantPosition"],gap:["columnGap","rowGap"],grid:["gridAutoColumns","gridAutoFlow","gridAutoRows","gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],gridArea:["gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart"],gridColumn:["gridColumnEnd","gridColumnStart"],gridColumnGap:["columnGap"],gridGap:["columnGap","rowGap"],gridRow:["gridRowEnd","gridRowStart"],gridRowGap:["rowGap"],gridTemplate:["gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],listStyle:["listStyleImage","listStylePosition","listStyleType"],margin:["marginBottom","marginLeft","marginRight","marginTop"],marker:["markerEnd","markerMid","markerStart"],mask:["maskClip","maskComposite","maskImage","maskMode","maskOrigin","maskPositionX","maskPositionY","maskRepeat","maskSize"],maskPosition:["maskPositionX","maskPositionY"],outline:["outlineColor","outlineStyle","outlineWidth"],overflow:["overflowX","overflowY"],padding:["paddingBottom","paddingLeft","paddingRight","paddingTop"],placeContent:["alignContent","justifyContent"],placeItems:["alignItems","justifyItems"],placeSelf:["alignSelf","justifySelf"],textDecoration:["textDecorationColor","textDecorationLine","textDecorationStyle"],textEmphasis:["textEmphasisColor","textEmphasisStyle"],transition:["transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction"],wordWrap:["overflowWrap"]},Xo={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};function Sp(i,a){return i+a.charAt(0).toUpperCase()+a.substring(1)}var $r=["Webkit","ms","Moz","O"];Object.keys(Xo).forEach(function(i){$r.forEach(function(a){Xo[Sp(a,i)]=Xo[i]})});function Au(i,a,f){var v=a==null||typeof a=="boolean"||a==="";return v?"":!f&&typeof a=="number"&&a!==0&&!(Xo.hasOwnProperty(i)&&Xo[i])?a+"px":(""+a).trim()}var zi=/([A-Z])/g,yf=/^ms-/;function Ep(i){return i.replace(zi,"-$1").toLowerCase().replace(yf,"-ms-")}var po=function(){};{var Us=/^(?:webkit|moz|o)[A-Z]/,Gd=/^-ms-/,ja=/-(.)/g,bc=/;\s*$/,ys={},Vr={},Sa=!1,Ml=!1,Sf=function(i){return i.replace(ja,function(a,f){return f.toUpperCase()})},p=function(i){ys.hasOwnProperty(i)&&ys[i]||(ys[i]=!0,c("Unsupported style property %s. Did you mean %s?",i,Sf(i.replace(Gd,"ms-"))))},S=function(i){ys.hasOwnProperty(i)&&ys[i]||(ys[i]=!0,c("Unsupported vendor-prefixed style property %s. Did you mean %s?",i,i.charAt(0).toUpperCase()+i.slice(1)))},b=function(i,a){Vr.hasOwnProperty(a)&&Vr[a]||(Vr[a]=!0,c(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,i,a.replace(bc,"")))},A=function(i,a){Sa||(Sa=!0,c("`NaN` is an invalid value for the `%s` css style property.",i))},I=function(i,a){Ml||(Ml=!0,c("`Infinity` is an invalid value for the `%s` css style property.",i))};po=function(i,a){i.indexOf("-")>-1?p(i):Us.test(i)?S(i):bc.test(a)&&b(i,a),typeof a=="number"&&(isNaN(a)?A(i,a):isFinite(a)||I(i,a))}}var D=po;function B(i){{var a="",f="";for(var v in i)if(i.hasOwnProperty(v)){var x=i[v];if(x!=null){var C=v.indexOf("--")===0;a+=f+(C?v:Ep(v))+":",a+=Au(v,x,C),f=";"}}return a||null}}function J(i,a){var f=i.style;for(var v in a)if(a.hasOwnProperty(v)){var x=v.indexOf("--")===0;x||D(v,a[v]);var C=Au(v,a[v],x);v==="float"&&(v="cssFloat"),x?f.setProperty(v,C):f[v]=C}}function $(i){return i==null||typeof i=="boolean"||i===""}function ae(i){var a={};for(var f in i)for(var v=yp[f]||[f],x=0;x<v.length;x++)a[v[x]]=f;return a}function fe(i,a){{if(!a)return;var f=ae(i),v=ae(a),x={};for(var C in f){var P=f[C],O=v[C];if(O&&P!==O){var z=P+","+O;if(x[z])continue;x[z]=!0,c("%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.",$(i[P])?"Removing":"Updating",P,O)}}}}var ke={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},q=t({menuitem:!0},ke),he="__html";function ve(i,a){if(a){if(q[i]&&!(a.children==null&&a.dangerouslySetInnerHTML==null))throw Error(i+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");if(a.dangerouslySetInnerHTML!=null){if(a.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if(!(typeof a.dangerouslySetInnerHTML=="object"&&he in a.dangerouslySetInnerHTML))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.")}if(!a.suppressContentEditableWarning&&a.contentEditable&&a.children!=null&&c("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."),!(a.style==null||typeof a.style=="object"))throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.")}}function pe(i,a){if(i.indexOf("-")===-1)return typeof a.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ae={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},le={"aria-current":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},te={},G=new RegExp("^(aria)-["+Ar+"]*$"),Q=new RegExp("^(aria)[A-Z]["+Ar+"]*$"),oe=Object.prototype.hasOwnProperty;function xe(i,a){{if(oe.call(te,a)&&te[a])return!0;if(Q.test(a)){var f="aria-"+a.slice(4).toLowerCase(),v=le.hasOwnProperty(f)?f:null;if(v==null)return c("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",a),te[a]=!0,!0;if(a!==v)return c("Invalid ARIA attribute `%s`. Did you mean `%s`?",a,v),te[a]=!0,!0}if(G.test(a)){var x=a.toLowerCase(),C=le.hasOwnProperty(x)?x:null;if(C==null)return te[a]=!0,!1;if(a!==C)return c("Unknown ARIA attribute `%s`. Did you mean `%s`?",a,C),te[a]=!0,!0}}return!0}function Le(i,a){{var f=[];for(var v in a){var x=xe(i,v);x||f.push(v)}var C=f.map(function(P){return"`"+P+"`"}).join(", ");f.length===1?c("Invalid aria prop %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",C,i):f.length>1&&c("Invalid aria props %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",C,i)}}function Ne(i,a){pe(i,a)||Le(i,a)}var ut=!1;function nn(i,a){{if(i!=="input"&&i!=="textarea"&&i!=="select")return;a!=null&&a.value===null&&!ut&&(ut=!0,i==="select"&&a.multiple?c("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",i):c("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",i))}}var Ht=function(){};{var pt={},sn=Object.prototype.hasOwnProperty,At=/^on./,ct=/^on[^A-Z]/,ee=new RegExp("^(aria)-["+Ar+"]*$"),me=new RegExp("^(aria)[A-Z]["+Ar+"]*$");Ht=function(i,a,f,v){if(sn.call(pt,a)&&pt[a])return!0;var x=a.toLowerCase();if(x==="onfocusin"||x==="onfocusout")return c("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),pt[a]=!0,!0;if(v!=null){var C=v.registrationNameDependencies,P=v.possibleRegistrationNames;if(C.hasOwnProperty(a))return!0;var O=P.hasOwnProperty(x)?P[x]:null;if(O!=null)return c("Invalid event handler property `%s`. Did you mean `%s`?",a,O),pt[a]=!0,!0;if(At.test(a))return c("Unknown event handler property `%s`. It will be ignored.",a),pt[a]=!0,!0}else if(At.test(a))return ct.test(a)&&c("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",a),pt[a]=!0,!0;if(ee.test(a)||me.test(a))return!0;if(x==="innerhtml")return c("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),pt[a]=!0,!0;if(x==="aria")return c("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),pt[a]=!0,!0;if(x==="is"&&f!==null&&f!==void 0&&typeof f!="string")return c("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof f),pt[a]=!0,!0;if(typeof f=="number"&&isNaN(f))return c("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",a),pt[a]=!0,!0;var z=ai(a),se=z!==null&&z.type===bn;if(Ae.hasOwnProperty(x)){var ce=Ae[x];if(ce!==a)return c("Invalid DOM property `%s`. Did you mean `%s`?",a,ce),pt[a]=!0,!0}else if(!se&&a!==x)return c("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",a,x),pt[a]=!0,!0;return typeof f=="boolean"&&nr(a,f,z,!1)?(f?c('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',f,a,a,f,a):c('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',f,a,a,f,a,a,a),pt[a]=!0,!0):se?!0:nr(a,f,z,!1)?(pt[a]=!0,!1):((f==="false"||f==="true")&&z!==null&&z.type===wt&&(c("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",f,a,f==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',a,f),pt[a]=!0),!0)}}var U=function(i,a,f){{var v=[];for(var x in a){var C=Ht(i,x,a[x],f);C||v.push(x)}var P=v.map(function(O){return"`"+O+"`"}).join(", ");v.length===1?c("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",P,i):v.length>1&&c("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",P,i)}};function H(i,a,f){pe(i,a)||U(i,a,f)}var Me=1,Te=2,_t=4,Gt=16,Zt=Me|Te|_t;function An(i){var a=i.target||i.srcElement||window;return a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===Ns?a.parentNode:a}var In=null,mr=null,zr=null;function Ss(i){var a=Uc(i);if(a){if(typeof In!="function")throw Error("setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue.");var f=a.stateNode;if(f){var v=l0(f);In(a.stateNode,a.type,v)}}}function hi(i){In=i}function pi(i){mr?zr?zr.push(i):zr=[i]:mr=i}function ss(){return mr!==null||zr!==null}function Hn(){if(mr){var i=mr,a=zr;if(mr=null,zr=null,Ss(i),a)for(var f=0;f<a.length;f++)Ss(a[f])}}var St=function(i,a){return i(a)},Xs=function(i,a,f,v,x){return i(a,f,v,x)},Qs=function(){},Js=St,mi=!1,Bs=!1;function ji(){var i=ss();i&&(Qs(),Hn())}function Ri(i,a){if(mi)return i(a);mi=!0;try{return St(i,a)}finally{mi=!1,ji()}}function Es(i,a,f){if(Bs)return i(a,f);Bs=!0;try{return Js(i,a,f)}finally{Bs=!1,ji()}}function Ha(i,a,f,v,x){var C=mi;mi=!0;try{return Xs(i,a,f,v,x)}finally{mi=C,mi||ji()}}function as(i){mi||Qs()}function Ea(i,a,f,v){St=i,Xs=a,Qs=f,Js=v}function xs(i){return i==="button"||i==="input"||i==="select"||i==="textarea"}function mo(i,a,f){switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":return!!(f.disabled&&xs(a));default:return!1}}function xa(i,a){var f=i.stateNode;if(f===null)return null;var v=l0(f);if(v===null)return null;var x=v[a];if(mo(a,i.type,v))return null;if(!(!x||typeof x=="function"))throw Error("Expected `"+a+"` listener to be a function, instead got a value of `"+typeof x+"` type.");return x}var Qo=!1;if(Dt)try{var go={};Object.defineProperty(go,"passive",{get:function(){Qo=!0}}),window.addEventListener("test",go,go),window.removeEventListener("test",go,go)}catch{Qo=!1}function Wd(i,a,f,v,x,C,P,O,z){var se=Array.prototype.slice.call(arguments,3);try{a.apply(f,se)}catch(ce){this.onError(ce)}}var _u=Wd;if(typeof window<"u"&&typeof window.dispatchEvent=="function"&&typeof document<"u"&&typeof document.createEvent=="function"){var Kd=document.createElement("react");_u=function(a,f,v,x,C,P,O,z,se){if(!(typeof document<"u"))throw Error("The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.");var ce=document.createEvent("Event"),$e=!1,Ee=!0,Ke=window.event,st=Object.getOwnPropertyDescriptor(window,"event");function Ct(){Kd.removeEventListener(Ze,Cn,!1),typeof window.event<"u"&&window.hasOwnProperty("event")&&(window.event=Ke)}var en=Array.prototype.slice.call(arguments,3);function Cn(){$e=!0,Ct(),f.apply(v,en),Ee=!1}var dn,qn=!1,Tr=!1;function Ge(Ie){if(dn=Ie.error,qn=!0,dn===null&&Ie.colno===0&&Ie.lineno===0&&(Tr=!0),Ie.defaultPrevented&&dn!=null&&typeof dn=="object")try{dn._suppressLogging=!0}catch{}}var Ze="react-"+(a||"invokeguardedcallback");if(window.addEventListener("error",Ge),Kd.addEventListener(Ze,Cn,!1),ce.initEvent(Ze,!1,!1),Kd.dispatchEvent(ce),st&&Object.defineProperty(window,"event",st),$e&&Ee&&(qn?Tr&&(dn=new Error("A cross-origin error was thrown. React doesn't have access to the actual error object in development. See https://reactjs.org/link/crossorigin-error for more information.")):dn=new Error(`An error was thrown inside one of your components, but React doesn't know what it was. This is likely due to browser flakiness. React does its best to preserve the "Pause on exceptions" behavior of the DevTools, which requires some DEV-mode only tricks. It's possible that these don't work in your browser. Try triggering the error in production mode, or switching to a modern browser. If you suspect that this is actually an issue with React, please file an issue.`),this.onError(dn)),window.removeEventListener("error",Ge),!$e)return Ct(),Wd.apply(this,arguments)}}var xp=_u,Tc=!1,Lu=null,Ga=!1,wc=null,Cc={onError:function(i){Tc=!0,Lu=i}};function Wa(i,a,f,v,x,C,P,O,z){Tc=!1,Lu=null,xp.apply(Cc,arguments)}function ku(i,a,f,v,x,C,P,O,z){if(Wa.apply(this,arguments),Tc){var se=Zs();Ga||(Ga=!0,wc=se)}}function Ef(){if(Ga){var i=wc;throw Ga=!1,wc=null,i}}function $s(){return Tc}function Zs(){if(Tc){var i=Lu;return Tc=!1,Lu=null,i}else throw Error("clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.")}function Du(i){return i._reactInternals}function bp(i){return i._reactInternals!==void 0}function Rc(i,a){i._reactInternals=a}var er=0,Gn=1,En=2,Un=4,os=6,jr=8,vo=16,Iu=32,Pn=64,Pu=128,Ol=256,Ac=512,Fl=8192,yo=1024,Tp=1028,Mu=932,oE=2047,Ou=2048,Ka=4096,wp=16384,xv=o.ReactCurrentOwner;function Jo(i){var a=i,f=i;if(i.alternate)for(;a.return;)a=a.return;else{var v=a;do a=v,(a.flags&(En|yo))!==er&&(f=a.return),v=a.return;while(v)}return a.tag===T?f:null}function bv(i){if(i.tag===ue){var a=i.memoizedState;if(a===null){var f=i.alternate;f!==null&&(a=f.memoizedState)}if(a!==null)return a.dehydrated}return null}function xf(i){return i.tag===T?i.stateNode.containerInfo:null}function Tv(i){return Jo(i)===i}function wv(i){{var a=xv.current;if(a!==null&&a.tag===y){var f=a,v=f.stateNode;v._warnedAboutRefsInRender||c("%s is accessing isMounted inside its render() function. render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",dt(f.type)||"A component"),v._warnedAboutRefsInRender=!0}}var x=Du(i);return x?Jo(x)===x:!1}function Cp(i){if(Jo(i)!==i)throw Error("Unable to find node on an unmounted component.")}function Rp(i){var a=i.alternate;if(!a){var f=Jo(i);if(f===null)throw Error("Unable to find node on an unmounted component.");return f!==i?null:i}for(var v=i,x=a;;){var C=v.return;if(C===null)break;var P=C.alternate;if(P===null){var O=C.return;if(O!==null){v=x=O;continue}break}if(C.child===P.child){for(var z=C.child;z;){if(z===v)return Cp(C),i;if(z===x)return Cp(C),a;z=z.sibling}throw Error("Unable to find node on an unmounted component.")}if(v.return!==x.return)v=C,x=P;else{for(var se=!1,ce=C.child;ce;){if(ce===v){se=!0,v=C,x=P;break}if(ce===x){se=!0,x=C,v=P;break}ce=ce.sibling}if(!se){for(ce=P.child;ce;){if(ce===v){se=!0,v=P,x=C;break}if(ce===x){se=!0,x=P,v=C;break}ce=ce.sibling}if(!se)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(v.alternate!==x)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(v.tag!==T)throw Error("Unable to find node on an unmounted component.");return v.stateNode.current===v?i:a}function qd(i){var a=Rp(i);if(!a)return null;for(var f=a;;){if(f.tag===_||f.tag===L)return f;if(f.child){f.child.return=f,f=f.child;continue}if(f===a)return null;for(;!f.sibling;){if(!f.return||f.return===a)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}function lE(i){var a=Rp(i);if(!a)return null;for(var f=a;;){if(f.tag===_||f.tag===L||Ue)return f;if(f.child&&f.tag!==R){f.child.return=f,f=f.child;continue}if(f===a)return null;for(;!f.sibling;){if(!f.return||f.return===a)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}function So(i,a){for(var f=a,v=i.alternate;f!==null;){if(f===i||f===v)return!0;f=f.return}return!1}var bf;function Ap(i){bf=i}var Yd;function ls(i){Yd=i}var Fu;function Cv(i){Fu=i}var Nl;function Tf(i){Nl=i}var ba=!1,Eo=[],Ul=null,Fi=null,qa=null,Bl=new Map,xo=new Map,$l=[];function _p(){return Eo.length>0}var Lp=["mousedown","mouseup","touchcancel","touchend","touchstart","auxclick","dblclick","pointercancel","pointerdown","pointerup","dragend","dragstart","drop","compositionend","compositionstart","keydown","keypress","keyup","input","textInput","copy","cut","paste","click","change","contextmenu","reset","submit"];function kp(i){return Lp.indexOf(i)>-1}function Nu(i,a,f,v,x){return{blockedOn:i,domEventName:a,eventSystemFlags:f|Gt,nativeEvent:x,targetContainers:[v]}}function ea(i,a,f,v,x){var C=Nu(i,a,f,v,x);Eo.push(C)}function Zo(i,a){switch(i){case"focusin":case"focusout":Ul=null;break;case"dragenter":case"dragleave":Fi=null;break;case"mouseover":case"mouseout":qa=null;break;case"pointerover":case"pointerout":{var f=a.pointerId;Bl.delete(f);break}case"gotpointercapture":case"lostpointercapture":{var v=a.pointerId;xo.delete(v);break}}}function Uu(i,a,f,v,x,C){if(i===null||i.nativeEvent!==C){var P=Nu(a,f,v,x,C);if(a!==null){var O=Uc(a);O!==null&&Yd(O)}return P}i.eventSystemFlags|=v;var z=i.targetContainers;return x!==null&&z.indexOf(x)===-1&&z.push(x),i}function Rv(i,a,f,v,x){switch(a){case"focusin":{var C=x;return Ul=Uu(Ul,i,a,f,v,C),!0}case"dragenter":{var P=x;return Fi=Uu(Fi,i,a,f,v,P),!0}case"mouseover":{var O=x;return qa=Uu(qa,i,a,f,v,O),!0}case"pointerover":{var z=x,se=z.pointerId;return Bl.set(se,Uu(Bl.get(se)||null,i,a,f,v,z)),!0}case"gotpointercapture":{var ce=x,$e=ce.pointerId;return xo.set($e,Uu(xo.get($e)||null,i,a,f,v,ce)),!0}}return!1}function Vl(i){var a=td(i.target);if(a!==null){var f=Jo(a);if(f!==null){var v=f.tag;if(v===ue){var x=bv(f);if(x!==null){i.blockedOn=x,Nl(i.lanePriority,function(){n.unstable_runWithPriority(i.priority,function(){Fu(f)})});return}}else if(v===T){var C=f.stateNode;if(C.hydrate){i.blockedOn=xf(f);return}}}}i.blockedOn=null}function Ya(i){if(i.blockedOn!==null)return!1;for(var a=i.targetContainers;a.length>0;){var f=a[0],v=lh(i.domEventName,i.eventSystemFlags,f,i.nativeEvent);if(v!==null){var x=Uc(v);return x!==null&&Yd(x),i.blockedOn=v,!1}a.shift()}return!0}function Dp(i,a,f){Ya(i)&&f.delete(a)}function wf(){for(ba=!1;Eo.length>0;){var i=Eo[0];if(i.blockedOn!==null){var a=Uc(i.blockedOn);a!==null&&bf(a);break}for(var f=i.targetContainers;f.length>0;){var v=f[0],x=lh(i.domEventName,i.eventSystemFlags,v,i.nativeEvent);if(x!==null){i.blockedOn=x;break}f.shift()}i.blockedOn===null&&Eo.shift()}Ul!==null&&Ya(Ul)&&(Ul=null),Fi!==null&&Ya(Fi)&&(Fi=null),qa!==null&&Ya(qa)&&(qa=null),Bl.forEach(Dp),xo.forEach(Dp)}function _c(i,a){i.blockedOn===a&&(i.blockedOn=null,ba||(ba=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,wf)))}function Ip(i){if(Eo.length>0){_c(Eo[0],i);for(var a=1;a<Eo.length;a++){var f=Eo[a];f.blockedOn===i&&(f.blockedOn=null)}}Ul!==null&&_c(Ul,i),Fi!==null&&_c(Fi,i),qa!==null&&_c(qa,i);var v=function(O){return _c(O,i)};Bl.forEach(v),xo.forEach(v);for(var x=0;x<$l.length;x++){var C=$l[x];C.blockedOn===i&&(C.blockedOn=null)}for(;$l.length>0;){var P=$l[0];if(P.blockedOn!==null)break;Vl(P),P.blockedOn===null&&$l.shift()}}var Lc=0,Cf=1,Xd=2;function Rf(i,a){var f={};return f[i.toLowerCase()]=a.toLowerCase(),f["Webkit"+i]="webkit"+a,f["Moz"+i]="moz"+a,f}var Bu={animationend:Rf("Animation","AnimationEnd"),animationiteration:Rf("Animation","AnimationIteration"),animationstart:Rf("Animation","AnimationStart"),transitionend:Rf("Transition","TransitionEnd")},Af={},_f={};Dt&&(_f=document.createElement("div").style,"AnimationEvent"in window||(delete Bu.animationend.animation,delete Bu.animationiteration.animation,delete Bu.animationstart.animation),"TransitionEvent"in window||delete Bu.transitionend.transition);function zl(i){if(Af[i])return Af[i];if(!Bu[i])return i;var a=Bu[i];for(var f in a)if(a.hasOwnProperty(f)&&f in _f)return Af[i]=a[f];return i}var Lf=zl("animationend"),Pp=zl("animationiteration"),kf=zl("animationstart"),Mp=zl("transitionend"),kc=new Map,Ta=new Map,Df=["cancel","cancel","click","click","close","close","contextmenu","contextMenu","copy","copy","cut","cut","auxclick","auxClick","dblclick","doubleClick","dragend","dragEnd","dragstart","dragStart","drop","drop","focusin","focus","focusout","blur","input","input","invalid","invalid","keydown","keyDown","keypress","keyPress","keyup","keyUp","mousedown","mouseDown","mouseup","mouseUp","paste","paste","pause","pause","play","play","pointercancel","pointerCancel","pointerdown","pointerDown","pointerup","pointerUp","ratechange","rateChange","reset","reset","seeked","seeked","submit","submit","touchcancel","touchCancel","touchend","touchEnd","touchstart","touchStart","volumechange","volumeChange"],If=["change","selectionchange","textInput","compositionstart","compositionend","compositionupdate"],$u=["drag","drag","dragenter","dragEnter","dragexit","dragExit","dragleave","dragLeave","dragover","dragOver","mousemove","mouseMove","mouseout","mouseOut","mouseover","mouseOver","pointermove","pointerMove","pointerout","pointerOut","pointerover","pointerOver","scroll","scroll","toggle","toggle","touchmove","touchMove","wheel","wheel"],Op=["abort","abort",Lf,"animationEnd",Pp,"animationIteration",kf,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Mp,"transitionEnd","waiting","waiting"];function jl(i,a){for(var f=0;f<i.length;f+=2){var v=i[f],x=i[f+1],C=x[0].toUpperCase()+x.slice(1),P="on"+C;Ta.set(v,a),kc.set(v,P),gt(P,[v])}}function Av(i,a){for(var f=0;f<i.length;f++)Ta.set(i[f],a)}function Fp(i){var a=Ta.get(i);return a===void 0?Xd:a}function Hr(){jl(Df,Lc),jl($u,Cf),jl(Op,Xd),Av(If,Lc)}var Qd=n.unstable_now;if(!(s.__interactionsRef!=null&&s.__interactionsRef.current!=null))throw Error("It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://reactjs.org/link/profiling");var bo=99,el=98,Xa=97,_v=96,Np=95,Up=90;Qd();var Vu=15,zu=14,Jd=13,tl=12,Zd=11,To=10,ta=9,Qa=8,Gr=7,Ai=6,_i=5,Pf=4,Dc=3,Hi=2,eh=1,nl=0,ju=31,rt=0,Fr=0,Wn=1,rl=2,th=4,Mf=24,Bp=32,Ic=192,Of=256,nh=3584,Ff=4096,Hl=4186112,Pc=62914560,Hu=33554432,Mc=67108864,$p=134217727,Vp=134217728,rh=805306368,wa=1073741824,Nr=-1;function uE(i){}var xr=Qa;function Gl(i){if((Wn&i)!==rt)return xr=Vu,Wn;if((rl&i)!==rt)return xr=zu,rl;if((th&i)!==rt)return xr=Jd,th;var a=Mf&i;if(a!==rt)return xr=tl,a;if((i&Bp)!==rt)return xr=Zd,Bp;var f=Ic&i;if(f!==rt)return xr=To,f;if((i&Of)!==rt)return xr=ta,Of;var v=nh&i;if(v!==rt)return xr=Qa,v;if((i&Ff)!==rt)return xr=Gr,Ff;var x=Hl&i;if(x!==rt)return xr=Ai,x;var C=Pc&i;if(C!==rt)return xr=_i,C;if(i&Mc)return xr=Pf,Mc;if((i&Vp)!==rt)return xr=Dc,Vp;var P=rh&i;return P!==rt?(xr=Hi,P):(wa&i)!==rt?(xr=eh,wa):(c("Should have found matching lanes. This is a bug in React."),xr=Qa,i)}function ih(i){switch(i){case bo:return Vu;case el:return To;case Xa:case _v:return Qa;case Np:return Hi;default:return nl}}function cE(i){switch(i){case Vu:case zu:return bo;case Jd:case tl:case Zd:case To:return el;case ta:case Qa:case Gr:case Ai:case Pf:case _i:return Xa;case Dc:case Hi:case eh:return Np;case nl:return Up;default:throw Error("Invalid update priority: "+i+". This is a bug in React.")}}function Nf(i,a){var f=i.pendingLanes;if(f===rt)return xr=nl,rt;var v=rt,x=nl,C=i.expiredLanes,P=i.suspendedLanes,O=i.pingedLanes;if(C!==rt)v=C,x=xr=Vu;else{var z=f&$p;if(z!==rt){var se=z&~P;if(se!==rt)v=Gl(se),x=xr;else{var ce=z&O;ce!==rt&&(v=Gl(ce),x=xr)}}else{var $e=f&~P;$e!==rt?(v=Gl($e),x=xr):O!==rt&&(v=Gl(O),x=xr)}}if(v===rt)return rt;if(v=f&sh(v),a!==rt&&a!==v&&(a&P)===rt){Gl(a);var Ee=xr;if(x<=Ee)return a;xr=x}var Ke=i.entangledLanes;if(Ke!==rt)for(var st=i.entanglements,Ct=v&Ke;Ct>0;){var en=Wl(Ct),Cn=1<<en;v|=st[en],Ct&=~Cn}return v}function fE(i,a){for(var f=i.eventTimes,v=Nr;a>0;){var x=Wl(a),C=1<<x,P=f[x];P>v&&(v=P),a&=~C}return v}function dE(i,a){Gl(i);var f=xr;return f>=To?a+250:f>=Ai?a+5e3:Nr}function Ja(i,a){for(var f=i.pendingLanes,v=i.suspendedLanes,x=i.pingedLanes,C=i.expirationTimes,P=f;P>0;){var O=Wl(P),z=1<<O,se=C[O];se===Nr?((z&v)===rt||(z&x)!==rt)&&(C[O]=dE(z,a)):se<=a&&(i.expiredLanes|=z),P&=~z}}function bs(i){var a=i.pendingLanes&~wa;return a!==rt?a:a&wa?wa:rt}function Lv(){return xr}function zp(i){return(i&$p)!==rt}function jp(i){return(i&Pc)===i}function Hp(i){return(i&Hl)===i}function Uf(i,a){switch(i){case nl:break;case Vu:return Wn;case zu:return rl;case tl:{var f=us(Mf&~a);return f===Fr?Uf(To,a):f}case To:{var v=us(Ic&~a);return v===Fr?Uf(Qa,a):v}case Qa:{var x=us(nh&~a);return x===Fr&&(x=us(Hl&~a),x===Fr&&(x=us(nh))),x}case Ai:case _i:break;case Hi:var C=us(rh&~a);return C===Fr&&(C=us(rh)),C}throw Error("Invalid update priority: "+i+". This is a bug in React.")}function Gp(i,a){var f=us(Hl&~a);return f===Fr&&(f=us(Hl&~i),f===Fr&&(f=us(Hl))),f}function kv(i){var a=us(Pc&~i);return a===Fr&&(a=us(Pc)),a}function Wp(i){return i&-i}function Dv(i){var a=31-qp(i);return a<0?rt:1<<a}function sh(i){return(Dv(i)<<1)-1}function us(i){return Wp(i)}function Wl(i){return 31-qp(i)}function Iv(i){return Wl(i)}function Gi(i,a){return(i&a)!==rt}function Kl(i,a){return(i&a)===a}function Kn(i,a){return i|a}function Bf(i,a){return i&~a}function ql(i){return i}function Pv(i,a){return i!==Fr&&i<a?i:a}function $f(i){for(var a=[],f=0;f<ju;f++)a.push(i);return a}function Vf(i,a,f){i.pendingLanes|=a;var v=a-1;i.suspendedLanes&=v,i.pingedLanes&=v;var x=i.eventTimes,C=Iv(a);x[C]=f}function Mv(i,a){i.suspendedLanes|=a,i.pingedLanes&=~a;for(var f=i.expirationTimes,v=a;v>0;){var x=Wl(v),C=1<<x;f[x]=Nr,v&=~C}}function Oc(i,a,f){i.pingedLanes|=i.suspendedLanes&a}function hE(i){i.expiredLanes|=Mf&i.pendingLanes}function pE(i){return(i&Mf)!==rt}function ah(i,a){i.mutableReadLanes|=a&i.pendingLanes}function Kp(i,a){var f=i.pendingLanes&~a;i.pendingLanes=a,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=a,i.mutableReadLanes&=a,i.entangledLanes&=a;for(var v=i.entanglements,x=i.eventTimes,C=i.expirationTimes,P=f;P>0;){var O=Wl(P),z=1<<O;v[O]=rt,x[O]=Nr,C[O]=Nr,P&=~z}}function mE(i,a){i.entangledLanes|=a;for(var f=i.entanglements,v=a;v>0;){var x=Wl(v),C=1<<x;f[x]|=a,v&=~C}}var qp=Math.clz32?Math.clz32:Fv,Ov=Math.log,gE=Math.LN2;function Fv(i){return i===0?32:31-(Ov(i)/gE|0)|0}var vE=n.unstable_UserBlockingPriority,yE=n.unstable_runWithPriority,oh=!0;function Yp(i){oh=!!i}function Nv(){return oh}function Uv(i,a,f){var v=Fp(a),x;switch(v){case Lc:x=Bv;break;case Cf:x=Xp;break;case Xd:default:x=zf;break}return x.bind(null,a,f,i)}function Bv(i,a,f,v){as(v.timeStamp),Ha(zf,i,a,f,v)}function Xp(i,a,f,v){yE(vE,zf.bind(null,i,a,f,v))}function zf(i,a,f,v){if(oh){var x=!0;if(x=(a&_t)===0,x&&_p()&&kp(i)){ea(null,i,a,f,v);return}var C=lh(i,a,f,v);if(C===null){x&&Zo(i,v);return}if(x){if(kp(i)){ea(C,i,a,f,v);return}if(Rv(C,i,a,f,v))return;Zo(i,v)}hL(i,a,v,null,f)}}function lh(i,a,f,v){var x=An(v),C=td(x);if(C!==null){var P=Jo(C);if(P===null)C=null;else{var O=P.tag;if(O===ue){var z=bv(P);if(z!==null)return z;C=null}else if(O===T){var se=P.stateNode;if(se.hydrate)return xf(P);C=null}else P!==C&&(C=null)}}return hL(i,a,v,C,f),null}function Qp(i,a,f){return i.addEventListener(a,f,!1),f}function $v(i,a,f){return i.addEventListener(a,f,!0),f}function SE(i,a,f,v){return i.addEventListener(a,f,{capture:!0,passive:v}),f}function EE(i,a,f,v){return i.addEventListener(a,f,{passive:v}),f}var Yl=null,jf=null,an=null;function Ts(i){return Yl=i,jf=Xl(),!0}function Li(){Yl=null,jf=null,an=null}function Wi(){if(an)return an;var i,a=jf,f=a.length,v,x=Xl(),C=x.length;for(i=0;i<f&&a[i]===x[i];i++);var P=f-i;for(v=1;v<=P&&a[f-v]===x[C-v];v++);var O=v>1?1-v:void 0;return an=x.slice(i,O),an}function Xl(){return"value"in Yl?Yl.value:Yl.textContent}function Fc(i){var a,f=i.keyCode;return"charCode"in i?(a=i.charCode,a===0&&f===13&&(a=13)):a=f,a===10&&(a=13),a>=32||a===13?a:0}function gi(){return!0}function Hf(){return!1}function Ni(i){function a(f,v,x,C,P){this._reactName=f,this._targetInst=x,this.type=v,this.nativeEvent=C,this.target=P,this.currentTarget=null;for(var O in i)if(i.hasOwnProperty(O)){var z=i[O];z?this[O]=z(C):this[O]=C[O]}var se=C.defaultPrevented!=null?C.defaultPrevented:C.returnValue===!1;return se?this.isDefaultPrevented=gi:this.isDefaultPrevented=Hf,this.isPropagationStopped=Hf,this}return t(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var f=this.nativeEvent;f&&(f.preventDefault?f.preventDefault():typeof f.returnValue!="unknown"&&(f.returnValue=!1),this.isDefaultPrevented=gi)},stopPropagation:function(){var f=this.nativeEvent;f&&(f.stopPropagation?f.stopPropagation():typeof f.cancelBubble!="unknown"&&(f.cancelBubble=!0),this.isPropagationStopped=gi)},persist:function(){},isPersistent:gi}),a}var wo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ql=Ni(wo),Gu=t({},wo,{view:0,detail:0}),Jp=Ni(Gu),Gf,Wf,Co;function Ut(i){i!==Co&&(Co&&i.type==="mousemove"?(Gf=i.screenX-Co.screenX,Wf=i.screenY-Co.screenY):(Gf=0,Wf=0),Co=i)}var Wu=t({},Gu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ao,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(Ut(i),Gf)},movementY:function(i){return"movementY"in i?i.movementY:Wf}}),uh=Ni(Wu),Ro=t({},Wu,{dataTransfer:0}),Jl=Ni(Ro),Kf=t({},Gu,{relatedTarget:0}),Ku=Ni(Kf),Zp=t({},wo,{animationName:0,elapsedTime:0,pseudoElement:0}),em=Ni(Zp),il=t({},wo,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),qf=Ni(il),tm=t({},wo,{data:0}),Yf=Ni(tm),sl=Yf,ch={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Xf={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};function fh(i){if(i.key){var a=ch[i.key]||i.key;if(a!=="Unidentified")return a}if(i.type==="keypress"){var f=Fc(i);return f===13?"Enter":String.fromCharCode(f)}return i.type==="keydown"||i.type==="keyup"?Xf[i.keyCode]||"Unidentified":""}var na={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Zl(i){var a=this,f=a.nativeEvent;if(f.getModifierState)return f.getModifierState(i);var v=na[i];return v?!!f[v]:!1}function Ao(i){return Zl}var dh=t({},Gu,{key:fh,code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ao,charCode:function(i){return i.type==="keypress"?Fc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Fc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),Ca=Ni(dh),Vv=t({},Wu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),qu=Ni(Vv),nm=t({},Gu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ao}),xE=Ni(nm),zv=t({},wo,{propertyName:0,elapsedTime:0,pseudoElement:0}),jv=Ni(zv),hh=t({},Wu,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),rm=Ni(hh),Nc=[9,13,27,32],im=229,ph=Dt&&"CompositionEvent"in window,al=null;Dt&&"documentMode"in document&&(al=document.documentMode);var bE=Dt&&"TextEvent"in window&&!al,Hv=Dt&&(!ph||al&&al>8&&al<=11),sm=32,am=String.fromCharCode(sm);function Yu(){gt("onBeforeInput",["compositionend","keypress","textInput","paste"]),gt("onCompositionEnd",["compositionend","focusout","keydown","keypress","keyup","mousedown"]),gt("onCompositionStart",["compositionstart","focusout","keydown","keypress","keyup","mousedown"]),gt("onCompositionUpdate",["compositionupdate","focusout","keydown","keypress","keyup","mousedown"])}var Gv=!1;function TE(i){return(i.ctrlKey||i.altKey||i.metaKey)&&!(i.ctrlKey&&i.altKey)}function eu(i){switch(i){case"compositionstart":return"onCompositionStart";case"compositionend":return"onCompositionEnd";case"compositionupdate":return"onCompositionUpdate"}}function wE(i,a){return i==="keydown"&&a.keyCode===im}function om(i,a){switch(i){case"keyup":return Nc.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==im;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Wv(i){var a=i.detail;return typeof a=="object"&&"data"in a?a.data:null}function lm(i){return i.locale==="ko"}var ra=!1;function CE(i,a,f,v,x){var C,P;if(ph?C=eu(a):ra?om(a,v)&&(C="onCompositionEnd"):wE(a,v)&&(C="onCompositionStart"),!C)return null;Hv&&!lm(v)&&(!ra&&C==="onCompositionStart"?ra=Ts(x):C==="onCompositionEnd"&&ra&&(P=Wi()));var O=Qv(f,C);if(O.length>0){var z=new Yf(C,a,null,v,x);if(i.push({event:z,listeners:O}),P)z.data=P;else{var se=Wv(v);se!==null&&(z.data=se)}}}function RE(i,a){switch(i){case"compositionend":return Wv(a);case"keypress":var f=a.which;return f!==sm?null:(Gv=!0,am);case"textInput":var v=a.data;return v===am&&Gv?null:v;default:return null}}function Kv(i,a){if(ra){if(i==="compositionend"||!ph&&om(i,a)){var f=Wi();return Li(),ra=!1,f}return null}switch(i){case"paste":return null;case"keypress":if(!TE(a)){if(a.char&&a.char.length>1)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return Hv&&!lm(a)?null:a.data;default:return null}}function AE(i,a,f,v,x){var C;if(bE?C=RE(a,v):C=Kv(a,v),!C)return null;var P=Qv(f,"onBeforeInput");if(P.length>0){var O=new sl("onBeforeInput","beforeinput",null,v,x);i.push({event:O,listeners:P}),O.data=C}}function Ra(i,a,f,v,x,C,P){CE(i,a,f,v,x),AE(i,a,f,v,x)}var um={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function qv(i){var a=i&&i.nodeName&&i.nodeName.toLowerCase();return a==="input"?!!um[i.type]:a==="textarea"}/**
|
|
98
|
+
* Checks if an event is supported in the current execution environment.
|
|
99
|
+
*
|
|
100
|
+
* NOTE: This will not work correctly for non-generic events such as `change`,
|
|
101
|
+
* `reset`, `load`, `error`, and `select`.
|
|
102
|
+
*
|
|
103
|
+
* Borrows from Modernizr.
|
|
104
|
+
*
|
|
105
|
+
* @param {string} eventNameSuffix Event name, e.g. "click".
|
|
106
|
+
* @return {boolean} True if the event is supported.
|
|
107
|
+
* @internal
|
|
108
|
+
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
|
109
|
+
*/function tu(i){if(!Dt)return!1;var a="on"+i,f=a in document;if(!f){var v=document.createElement("div");v.setAttribute(a,"return;"),f=typeof v[a]=="function"}return f}function mh(){gt("onChange",["change","click","focusin","focusout","input","keydown","keyup","selectionchange"])}function Xu(i,a,f,v){pi(v);var x=Qv(a,"onChange");if(x.length>0){var C=new Ql("onChange","change",null,f,v);i.push({event:C,listeners:x})}}var Qu=null,Ju=null;function cm(i){var a=i.nodeName&&i.nodeName.toLowerCase();return a==="select"||a==="input"&&i.type==="file"}function _E(i){var a=[];Xu(a,Ju,i,An(i)),Ri(LE,a)}function LE(i){oL(i,0)}function Zu(i){var a=bh(i);if(be(a))return i}function fm(i,a){if(i==="change")return a}var dm=!1;Dt&&(dm=tu("input")&&(!document.documentMode||document.documentMode>9));function hm(i,a){Qu=i,Ju=a,Qu.attachEvent("onpropertychange",gh)}function Yv(){Qu&&(Qu.detachEvent("onpropertychange",gh),Qu=null,Ju=null)}function gh(i){i.propertyName==="value"&&Zu(Ju)&&_E(i)}function Qf(i,a,f){i==="focusin"?(Yv(),hm(a,f)):i==="focusout"&&Yv()}function kE(i,a){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Zu(Ju)}function vh(i){var a=i.nodeName;return a&&a.toLowerCase()==="input"&&(i.type==="checkbox"||i.type==="radio")}function Xv(i,a){if(i==="click")return Zu(a)}function DE(i,a){if(i==="input"||i==="change")return Zu(a)}function Jf(i){var a=i._wrapperState;!a||!a.controlled||i.type!=="number"||va(i,"number",i.value)}function IE(i,a,f,v,x,C,P){var O=f?bh(f):window,z,se;if(cm(O)?z=fm:qv(O)?dm?z=DE:(z=kE,se=Qf):vh(O)&&(z=Xv),z){var ce=z(a,f);if(ce){Xu(i,ce,v,x);return}}se&&se(a,O,f),a==="focusout"&&Jf(O)}function yh(){Ot("onMouseEnter",["mouseout","mouseover"]),Ot("onMouseLeave",["mouseout","mouseover"]),Ot("onPointerEnter",["pointerout","pointerover"]),Ot("onPointerLeave",["pointerout","pointerover"])}function l(i,a,f,v,x,C,P){var O=a==="mouseover"||a==="pointerover",z=a==="mouseout"||a==="pointerout";if(O&&!(C&Gt)){var se=v.relatedTarget||v.fromElement;if(se&&(td(se)||o0(se)))return}if(!(!z&&!O)){var ce;if(x.window===x)ce=x;else{var $e=x.ownerDocument;$e?ce=$e.defaultView||$e.parentWindow:ce=window}var Ee,Ke;if(z){var st=v.relatedTarget||v.toElement;if(Ee=f,Ke=st?td(st):null,Ke!==null){var Ct=Jo(Ke);(Ke!==Ct||Ke.tag!==_&&Ke.tag!==L)&&(Ke=null)}}else Ee=null,Ke=f;if(Ee!==Ke){var en=uh,Cn="onMouseLeave",dn="onMouseEnter",qn="mouse";(a==="pointerout"||a==="pointerover")&&(en=qu,Cn="onPointerLeave",dn="onPointerEnter",qn="pointer");var Tr=Ee==null?ce:bh(Ee),Ge=Ke==null?ce:bh(Ke),Ze=new en(Cn,qn+"leave",Ee,v,x);Ze.target=Tr,Ze.relatedTarget=Ge;var Ie=null,mt=td(x);if(mt===f){var Lt=new en(dn,qn+"enter",Ke,v,x);Lt.target=Ge,Lt.relatedTarget=Tr,Ie=Lt}e5(i,Ze,Ie,Ee,Ke)}}}function d(i,a){return i===a&&(i!==0||1/i===1/a)||i!==i&&a!==a}var g=typeof Object.is=="function"?Object.is:d,w=Object.prototype.hasOwnProperty;function k(i,a){if(g(i,a))return!0;if(typeof i!="object"||i===null||typeof a!="object"||a===null)return!1;var f=Object.keys(i),v=Object.keys(a);if(f.length!==v.length)return!1;for(var x=0;x<f.length;x++)if(!w.call(a,f[x])||!g(i[f[x]],a[f[x]]))return!1;return!0}function N(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function W(i){for(;i;){if(i.nextSibling)return i.nextSibling;i=i.parentNode}}function re(i,a){for(var f=N(i),v=0,x=0;f;){if(f.nodeType===Ns){if(x=v+f.textContent.length,v<=a&&x>=a)return{node:f,offset:a-v};v=x}f=N(W(f))}}function Se(i){var a=i.ownerDocument,f=a&&a.defaultView||window,v=f.getSelection&&f.getSelection();if(!v||v.rangeCount===0)return null;var x=v.anchorNode,C=v.anchorOffset,P=v.focusNode,O=v.focusOffset;try{x.nodeType,P.nodeType}catch{return null}return Ye(i,x,C,P,O)}function Ye(i,a,f,v,x){var C=0,P=-1,O=-1,z=0,se=0,ce=i,$e=null;e:for(;;){for(var Ee=null;ce===a&&(f===0||ce.nodeType===Ns)&&(P=C+f),ce===v&&(x===0||ce.nodeType===Ns)&&(O=C+x),ce.nodeType===Ns&&(C+=ce.nodeValue.length),(Ee=ce.firstChild)!==null;)$e=ce,ce=Ee;for(;;){if(ce===i)break e;if($e===a&&++z===f&&(P=C),$e===v&&++se===x&&(O=C),(Ee=ce.nextSibling)!==null)break;ce=$e,$e=ce.parentNode}ce=Ee}return P===-1||O===-1?null:{start:P,end:O}}function It(i,a){var f=i.ownerDocument||document,v=f&&f.defaultView||window;if(v.getSelection){var x=v.getSelection(),C=i.textContent.length,P=Math.min(a.start,C),O=a.end===void 0?P:Math.min(a.end,C);if(!x.extend&&P>O){var z=O;O=P,P=z}var se=re(i,P),ce=re(i,O);if(se&&ce){if(x.rangeCount===1&&x.anchorNode===se.node&&x.anchorOffset===se.offset&&x.focusNode===ce.node&&x.focusOffset===ce.offset)return;var $e=f.createRange();$e.setStart(se.node,se.offset),x.removeAllRanges(),P>O?(x.addRange($e),x.extend(ce.node,ce.offset)):($e.setEnd(ce.node,ce.offset),x.addRange($e))}}}function mn(i){return i&&i.nodeType===Ns}function ht(i,a){return!i||!a?!1:i===a?!0:mn(i)?!1:mn(a)?ht(i,a.parentNode):"contains"in i?i.contains(a):i.compareDocumentPosition?!!(i.compareDocumentPosition(a)&16):!1}function Wt(i){return i&&i.ownerDocument&&ht(i.ownerDocument.documentElement,i)}function gn(i){try{return typeof i.contentWindow.location.href=="string"}catch{return!1}}function on(){for(var i=window,a=We();a instanceof i.HTMLIFrameElement;){if(gn(a))i=a.contentWindow;else return a;a=We(i.document)}return a}function Oe(i){var a=i&&i.nodeName&&i.nodeName.toLowerCase();return a&&(a==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||a==="textarea"||i.contentEditable==="true")}function we(){var i=on();return{focusedElem:i,selectionRange:Oe(i)?nt(i):null}}function De(i){var a=on(),f=i.focusedElem,v=i.selectionRange;if(a!==f&&Wt(f)){v!==null&&Oe(f)&&it(f,v);for(var x=[],C=f;C=C.parentNode;)C.nodeType===gs&&x.push({element:C,left:C.scrollLeft,top:C.scrollTop});typeof f.focus=="function"&&f.focus();for(var P=0;P<x.length;P++){var O=x[P];O.element.scrollLeft=O.left,O.element.scrollTop=O.top}}}function nt(i){var a;return"selectionStart"in i?a={start:i.selectionStart,end:i.selectionEnd}:a=Se(i),a||{start:0,end:0}}function it(i,a){var f=a.start,v=a.end;v===void 0&&(v=f),"selectionStart"in i?(i.selectionStart=f,i.selectionEnd=Math.min(v,i.value.length)):It(i,a)}var Sn=Dt&&"documentMode"in document&&document.documentMode<=11;function jt(){gt("onSelect",["focusout","contextmenu","dragend","focusin","keydown","keyup","mousedown","mouseup","selectionchange"])}var un=null,_n=null,vn=null,_o=!1;function PE(i){if("selectionStart"in i&&Oe(i))return{start:i.selectionStart,end:i.selectionEnd};var a=i.ownerDocument&&i.ownerDocument.defaultView||window,f=a.getSelection();return{anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}}function G8(i){return i.window===i?i.document:i.nodeType===vs?i:i.ownerDocument}function sL(i,a,f){var v=G8(f);if(!(_o||un==null||un!==We(v))){var x=PE(un);if(!vn||!k(vn,x)){vn=x;var C=Qv(_n,"onSelect");if(C.length>0){var P=new Ql("onSelect","select",null,a,f);i.push({event:P,listeners:C}),P.target=un}}}}function W8(i,a,f,v,x,C,P){var O=f?bh(f):window;switch(a){case"focusin":(qv(O)||O.contentEditable==="true")&&(un=O,_n=f,vn=null);break;case"focusout":un=null,_n=null,vn=null;break;case"mousedown":_o=!0;break;case"contextmenu":case"mouseup":case"dragend":_o=!1,sL(i,v,x);break;case"selectionchange":if(Sn)break;case"keydown":case"keyup":sL(i,v,x)}}function K8(i,a,f,v,x,C,P){var O=kc.get(a);if(O!==void 0){var z=Ql,se=a;switch(a){case"keypress":if(Fc(v)===0)return;case"keydown":case"keyup":z=Ca;break;case"focusin":se="focus",z=Ku;break;case"focusout":se="blur",z=Ku;break;case"beforeblur":case"afterblur":z=Ku;break;case"click":if(v.button===2)return;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":z=uh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":z=Jl;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":z=xE;break;case Lf:case Pp:case kf:z=em;break;case Mp:z=jv;break;case"scroll":z=Jp;break;case"wheel":z=rm;break;case"copy":case"cut":case"paste":z=qf;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":z=qu;break}var ce=(C&_t)!==0;{var $e=!ce&&a==="scroll",Ee=J8(f,O,v.type,ce,$e);if(Ee.length>0){var Ke=new z(O,se,null,v,x);i.push({event:Ke,listeners:Ee})}}}}Hr(),yh(),mh(),jt(),Yu();function q8(i,a,f,v,x,C,P){K8(i,a,f,v,x,C);var O=(C&Zt)===0;O&&(l(i,a,f,v,x,C),IE(i,a,f,v,x),W8(i,a,f,v,x),Ra(i,a,f,v,x))}var pm=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],Y8=new Set(["cancel","close","invalid","load","scroll","toggle"].concat(pm));function aL(i,a,f){var v=i.type||"unknown-event";i.currentTarget=f,ku(v,a,void 0,i),i.currentTarget=null}function X8(i,a,f){var v;if(f)for(var x=a.length-1;x>=0;x--){var C=a[x],P=C.instance,O=C.currentTarget,z=C.listener;if(P!==v&&i.isPropagationStopped())return;aL(i,z,O),v=P}else for(var se=0;se<a.length;se++){var ce=a[se],$e=ce.instance,Ee=ce.currentTarget,Ke=ce.listener;if($e!==v&&i.isPropagationStopped())return;aL(i,Ke,Ee),v=$e}}function oL(i,a){for(var f=(a&_t)!==0,v=0;v<i.length;v++){var x=i[v],C=x.event,P=x.listeners;X8(C,P,f)}Ef()}function Q8(i,a,f,v,x){var C=An(f),P=[];q8(P,i,v,f,C,a),oL(P,a)}function Ur(i,a){var f=!1,v=$L(a),x=mL(i,f);v.has(x)||(fL(a,i,Te,f),v.add(x))}var lL="_reactListening"+Math.random().toString(36).slice(2);function uL(i){{if(i[lL])return;i[lL]=!0,Je.forEach(function(a){Y8.has(a)||cL(a,!1,i,null),cL(a,!0,i,null)})}}function cL(i,a,f,v){var x=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,C=f;i==="selectionchange"&&f.nodeType!==vs&&(C=f.ownerDocument);var P=$L(C),O=mL(i,a);P.has(O)||(a&&(x|=_t),fL(C,i,x,a),P.add(O))}function fL(i,a,f,v,x){var C=Uv(i,a,f),P=void 0;Qo&&(a==="touchstart"||a==="touchmove"||a==="wheel")&&(P=!0),i=i,v?P!==void 0?SE(i,a,C,P):$v(i,a,C):P!==void 0?EE(i,a,C,P):Qp(i,a,C)}function dL(i,a){return i===a||i.nodeType===Ci&&i.parentNode===a}function hL(i,a,f,v,x){var C=v;if(!(a&Me)&&!(a&Te)){var P=x;if(v!==null){var O=v;e:for(;;){if(O===null)return;var z=O.tag;if(z===T||z===R){var se=O.stateNode.containerInfo;if(dL(se,P))break;if(z===R)for(var ce=O.return;ce!==null;){var $e=ce.tag;if($e===T||$e===R){var Ee=ce.stateNode.containerInfo;if(dL(Ee,P))return}ce=ce.return}for(;se!==null;){var Ke=td(se);if(Ke===null)return;var st=Ke.tag;if(st===_||st===L){O=C=Ke;continue e}se=se.parentNode}}O=O.return}}}Es(function(){return Q8(i,a,f,C)})}function mm(i,a,f){return{instance:i,listener:a,currentTarget:f}}function J8(i,a,f,v,x){for(var C=a!==null?a+"Capture":null,P=v?C:a,O=[],z=i,se=null;z!==null;){var ce=z,$e=ce.stateNode,Ee=ce.tag;if(Ee===_&&$e!==null&&(se=$e,P!==null)){var Ke=xa(z,P);Ke!=null&&O.push(mm(z,Ke,se))}if(x)break;z=z.return}return O}function Qv(i,a){for(var f=a+"Capture",v=[],x=i;x!==null;){var C=x,P=C.stateNode,O=C.tag;if(O===_&&P!==null){var z=P,se=xa(x,f);se!=null&&v.unshift(mm(x,se,z));var ce=xa(x,a);ce!=null&&v.push(mm(x,ce,z))}x=x.return}return v}function Sh(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==_);return i||null}function Z8(i,a){for(var f=i,v=a,x=0,C=f;C;C=Sh(C))x++;for(var P=0,O=v;O;O=Sh(O))P++;for(;x-P>0;)f=Sh(f),x--;for(;P-x>0;)v=Sh(v),P--;for(var z=x;z--;){if(f===v||v!==null&&f===v.alternate)return f;f=Sh(f),v=Sh(v)}return null}function pL(i,a,f,v,x){for(var C=a._reactName,P=[],O=f;O!==null&&O!==v;){var z=O,se=z.alternate,ce=z.stateNode,$e=z.tag;if(se!==null&&se===v)break;if($e===_&&ce!==null){var Ee=ce;if(x){var Ke=xa(O,C);Ke!=null&&P.unshift(mm(O,Ke,Ee))}else if(!x){var st=xa(O,C);st!=null&&P.push(mm(O,st,Ee))}}O=O.return}P.length!==0&&i.push({event:a,listeners:P})}function e5(i,a,f,v,x){var C=v&&x?Z8(v,x):null;v!==null&&pL(i,a,v,C,!1),x!==null&&f!==null&&pL(i,f,x,C,!0)}function mL(i,a){return i+"__"+(a?"capture":"bubble")}var Aa=!1,gm="dangerouslySetInnerHTML",Jv="suppressContentEditableWarning",vm="suppressHydrationWarning",gL="autoFocus",Zf="children",ed="style",Zv="__html",Eh=Ru.html,ME,ym,e0,t0,Sm,vL,n0,yL,Em,SL;{ME={dialog:!0,webview:!0},e0=function(i,a){Ne(i,a),nn(i,a),H(i,a,{registrationNameDependencies:Xe,possibleRegistrationNames:Et})},yL=Dt&&!document.documentMode;var t5=/\r\n?/g,n5=/\u0000|\uFFFD/g;Em=function(i){var a=typeof i=="string"?i:""+i;return a.replace(t5,`
|
|
110
|
+
`).replace(n5,"")},t0=function(i,a){if(!Aa){var f=Em(a),v=Em(i);v!==f&&(Aa=!0,c('Text content did not match. Server: "%s" Client: "%s"',v,f))}},Sm=function(i,a,f){if(!Aa){var v=Em(f),x=Em(a);x!==v&&(Aa=!0,c("Prop `%s` did not match. Server: %s Client: %s",i,JSON.stringify(x),JSON.stringify(v)))}},vL=function(i){if(!Aa){Aa=!0;var a=[];i.forEach(function(f){a.push(f)}),c("Extra attributes from the server: %s",a)}},n0=function(i,a){a===!1?c("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",i,i,i):c("Expected `%s` listener to be a function, instead got a value of `%s` type.",i,typeof a)},SL=function(i,a){var f=i.namespaceURI===Eh?i.ownerDocument.createElement(i.tagName):i.ownerDocument.createElementNS(i.namespaceURI,i.tagName);return f.innerHTML=a,f.innerHTML}}function EL(i){return i.nodeType===vs?i:i.ownerDocument}function r5(){}function r0(i){i.onclick=r5}function i5(i,a,f,v,x){for(var C in v)if(v.hasOwnProperty(C)){var P=v[C];if(C===ed)P&&Object.freeze(P),J(a,P);else if(C===gm){var O=P?P[Zv]:void 0;O!=null&&gf(a,O)}else if(C===Zf)if(typeof P=="string"){var z=i!=="textarea"||P!=="";z&&xc(a,P)}else typeof P=="number"&&xc(a,""+P);else C===Jv||C===vm||C===gL||(Xe.hasOwnProperty(C)?P!=null&&(typeof P!="function"&&n0(C,P),C==="onScroll"&&Ur("scroll",a)):P!=null&&hr(a,C,P,x))}}function s5(i,a,f,v){for(var x=0;x<a.length;x+=2){var C=a[x],P=a[x+1];C===ed?J(i,P):C===gm?gf(i,P):C===Zf?xc(i,P):hr(i,C,P,v)}}function a5(i,a,f,v){var x,C=EL(f),P,O=v;if(O===Eh&&(O=ho(i)),O===Eh){if(x=pe(i,a),!x&&i!==i.toLowerCase()&&c("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",i),i==="script"){var z=C.createElement("div");z.innerHTML="<script><\/script>";var se=z.firstChild;P=z.removeChild(se)}else if(typeof a.is=="string")P=C.createElement(i,{is:a.is});else if(P=C.createElement(i),i==="select"){var ce=P;a.multiple?ce.multiple=!0:a.size&&(ce.size=a.size)}}else P=C.createElementNS(O,i);return O===Eh&&!x&&Object.prototype.toString.call(P)==="[object HTMLUnknownElement]"&&!Object.prototype.hasOwnProperty.call(ME,i)&&(ME[i]=!0,c("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",i)),P}function o5(i,a){return EL(a).createTextNode(i)}function l5(i,a,f,v){var x=pe(a,f);e0(a,f);var C;switch(a){case"dialog":Ur("cancel",i),Ur("close",i),C=f;break;case"iframe":case"object":case"embed":Ur("load",i),C=f;break;case"video":case"audio":for(var P=0;P<pm.length;P++)Ur(pm[P],i);C=f;break;case"source":Ur("error",i),C=f;break;case"img":case"image":case"link":Ur("error",i),Ur("load",i),C=f;break;case"details":Ur("toggle",i),C=f;break;case"input":sr(i,f),C=Dn(i,f),Ur("invalid",i);break;case"option":Tu(i,f),C=ya(i,f);break;case"select":is(i,f),C=wu(i,f),Ur("invalid",i);break;case"textarea":Cu(i,f),C=Wo(i,f),Ur("invalid",i);break;default:C=f}switch(ve(a,C),i5(a,i,v,C,x),a){case"input":j(i),wi(i,f,!1);break;case"textarea":j(i),Os(i);break;case"option":Ec(i,f);break;case"select":za(i,f);break;default:typeof C.onClick=="function"&&r0(i);break}}function u5(i,a,f,v,x){e0(a,v);var C=null,P,O;switch(a){case"input":P=Dn(i,f),O=Dn(i,v),C=[];break;case"option":P=ya(i,f),O=ya(i,v),C=[];break;case"select":P=wu(i,f),O=wu(i,v),C=[];break;case"textarea":P=Wo(i,f),O=Wo(i,v),C=[];break;default:P=f,O=v,typeof P.onClick!="function"&&typeof O.onClick=="function"&&r0(i);break}ve(a,O);var z,se,ce=null;for(z in P)if(!(O.hasOwnProperty(z)||!P.hasOwnProperty(z)||P[z]==null))if(z===ed){var $e=P[z];for(se in $e)$e.hasOwnProperty(se)&&(ce||(ce={}),ce[se]="")}else z===gm||z===Zf||z===Jv||z===vm||z===gL||(Xe.hasOwnProperty(z)?C||(C=[]):(C=C||[]).push(z,null));for(z in O){var Ee=O[z],Ke=P!=null?P[z]:void 0;if(!(!O.hasOwnProperty(z)||Ee===Ke||Ee==null&&Ke==null))if(z===ed)if(Ee&&Object.freeze(Ee),Ke){for(se in Ke)Ke.hasOwnProperty(se)&&(!Ee||!Ee.hasOwnProperty(se))&&(ce||(ce={}),ce[se]="");for(se in Ee)Ee.hasOwnProperty(se)&&Ke[se]!==Ee[se]&&(ce||(ce={}),ce[se]=Ee[se])}else ce||(C||(C=[]),C.push(z,ce)),ce=Ee;else if(z===gm){var st=Ee?Ee[Zv]:void 0,Ct=Ke?Ke[Zv]:void 0;st!=null&&Ct!==st&&(C=C||[]).push(z,st)}else z===Zf?(typeof Ee=="string"||typeof Ee=="number")&&(C=C||[]).push(z,""+Ee):z===Jv||z===vm||(Xe.hasOwnProperty(z)?(Ee!=null&&(typeof Ee!="function"&&n0(z,Ee),z==="onScroll"&&Ur("scroll",i)),!C&&Ke!==Ee&&(C=[])):typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===lt?Ee.toString():(C=C||[]).push(z,Ee))}return ce&&(fe(ce,O[ed]),(C=C||[]).push(ed,ce)),C}function c5(i,a,f,v,x){f==="input"&&x.type==="radio"&&x.name!=null&&Zn(i,x);var C=pe(f,v),P=pe(f,x);switch(s5(i,a,C,P),f){case"input":Xn(i,x);break;case"textarea":di(i,x);break;case"select":fo(i,x);break}}function f5(i){{var a=i.toLowerCase();return Ae.hasOwnProperty(a)&&Ae[a]||null}}function d5(i,a,f,v,x){var C,P;switch(ym=f[vm]===!0,C=pe(a,f),e0(a,f),a){case"dialog":Ur("cancel",i),Ur("close",i);break;case"iframe":case"object":case"embed":Ur("load",i);break;case"video":case"audio":for(var O=0;O<pm.length;O++)Ur(pm[O],i);break;case"source":Ur("error",i);break;case"img":case"image":case"link":Ur("error",i),Ur("load",i);break;case"details":Ur("toggle",i);break;case"input":sr(i,f),Ur("invalid",i);break;case"option":Tu(i,f);break;case"select":is(i,f),Ur("invalid",i);break;case"textarea":Cu(i,f),Ur("invalid",i);break}ve(a,f);{P=new Set;for(var z=i.attributes,se=0;se<z.length;se++){var ce=z[se].name.toLowerCase();switch(ce){case"data-reactroot":break;case"value":break;case"checked":break;case"selected":break;default:P.add(z[se].name)}}}var $e=null;for(var Ee in f)if(f.hasOwnProperty(Ee)){var Ke=f[Ee];if(Ee===Zf)typeof Ke=="string"?i.textContent!==Ke&&(ym||t0(i.textContent,Ke),$e=[Zf,Ke]):typeof Ke=="number"&&i.textContent!==""+Ke&&(ym||t0(i.textContent,Ke),$e=[Zf,""+Ke]);else if(Xe.hasOwnProperty(Ee))Ke!=null&&(typeof Ke!="function"&&n0(Ee,Ke),Ee==="onScroll"&&Ur("scroll",i));else if(typeof C=="boolean"){var st=void 0,Ct=ai(Ee);if(!ym){if(!(Ee===Jv||Ee===vm||Ee==="value"||Ee==="checked"||Ee==="selected")){if(Ee===gm){var en=i.innerHTML,Cn=Ke?Ke[Zv]:void 0;if(Cn!=null){var dn=SL(i,Cn);dn!==en&&Sm(Ee,en,dn)}}else if(Ee===ed){if(P.delete(Ee),yL){var qn=B(Ke);st=i.getAttribute("style"),qn!==st&&Sm(Ee,st,qn)}}else if(C)P.delete(Ee.toLowerCase()),st=Yn(i,Ee,Ke),Ke!==st&&Sm(Ee,st,Ke);else if(!Ft(Ee,Ct,C)&&!_r(Ee,Ke,Ct,C)){var Tr=!1;if(Ct!==null)P.delete(Ct.attributeName),st=$n(i,Ee,Ke,Ct);else{var Ge=v;if(Ge===Eh&&(Ge=ho(a)),Ge===Eh)P.delete(Ee.toLowerCase());else{var Ze=f5(Ee);Ze!==null&&Ze!==Ee&&(Tr=!0,P.delete(Ze)),P.delete(Ee)}st=Yn(i,Ee,Ke)}Ke!==st&&!Tr&&Sm(Ee,st,Ke)}}}}}switch(P.size>0&&!ym&&vL(P),a){case"input":j(i),wi(i,f,!0);break;case"textarea":j(i),Os(i);break;case"select":case"option":break;default:typeof f.onClick=="function"&&r0(i);break}return $e}function h5(i,a){var f=i.nodeValue!==a;return f}function xL(i,a){t0(i.nodeValue,a)}function bL(i,a){{if(Aa)return;Aa=!0,c("Did not expect server HTML to contain a <%s> in <%s>.",a.nodeName.toLowerCase(),i.nodeName.toLowerCase())}}function TL(i,a){{if(Aa)return;Aa=!0,c('Did not expect server HTML to contain the text node "%s" in <%s>.',a.nodeValue,i.nodeName.toLowerCase())}}function wL(i,a,f){{if(Aa)return;Aa=!0,c("Expected server HTML to contain a matching <%s> in <%s>.",a,i.nodeName.toLowerCase())}}function CL(i,a){{if(a===""||Aa)return;Aa=!0,c('Expected server HTML to contain a matching text node for "%s" in <%s>.',a,i.nodeName.toLowerCase())}}function p5(i,a,f){switch(a){case"input":ti(i,f);return;case"textarea":Ko(i,f);return;case"select":pf(i,f);return}}var xm=function(){},bm=function(){};{var m5=["address","applet","area","article","aside","base","basefont","bgsound","blockquote","body","br","button","caption","center","col","colgroup","dd","details","dir","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","isindex","li","link","listing","main","marquee","menu","menuitem","meta","nav","noembed","noframes","noscript","object","ol","p","param","plaintext","pre","script","section","select","source","style","summary","table","tbody","td","template","textarea","tfoot","th","thead","title","tr","track","ul","wbr","xmp"],RL=["applet","caption","html","table","td","th","marquee","object","template","foreignObject","desc","title"],g5=RL.concat(["button"]),v5=["dd","dt","li","option","optgroup","p","rp","rt"],AL={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null};bm=function(i,a){var f=t({},i||AL),v={tag:a};return RL.indexOf(a)!==-1&&(f.aTagInScope=null,f.buttonTagInScope=null,f.nobrTagInScope=null),g5.indexOf(a)!==-1&&(f.pTagInButtonScope=null),m5.indexOf(a)!==-1&&a!=="address"&&a!=="div"&&a!=="p"&&(f.listItemTagAutoclosing=null,f.dlItemTagAutoclosing=null),f.current=v,a==="form"&&(f.formTag=v),a==="a"&&(f.aTagInScope=v),a==="button"&&(f.buttonTagInScope=v),a==="nobr"&&(f.nobrTagInScope=v),a==="p"&&(f.pTagInButtonScope=v),a==="li"&&(f.listItemTagAutoclosing=v),(a==="dd"||a==="dt")&&(f.dlItemTagAutoclosing=v),f};var y5=function(i,a){switch(a){case"select":return i==="option"||i==="optgroup"||i==="#text";case"optgroup":return i==="option"||i==="#text";case"option":return i==="#text";case"tr":return i==="th"||i==="td"||i==="style"||i==="script"||i==="template";case"tbody":case"thead":case"tfoot":return i==="tr"||i==="style"||i==="script"||i==="template";case"colgroup":return i==="col"||i==="template";case"table":return i==="caption"||i==="colgroup"||i==="tbody"||i==="tfoot"||i==="thead"||i==="style"||i==="script"||i==="template";case"head":return i==="base"||i==="basefont"||i==="bgsound"||i==="link"||i==="meta"||i==="title"||i==="noscript"||i==="noframes"||i==="style"||i==="script"||i==="template";case"html":return i==="head"||i==="body"||i==="frameset";case"frameset":return i==="frame";case"#document":return i==="html"}switch(i){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return a!=="h1"&&a!=="h2"&&a!=="h3"&&a!=="h4"&&a!=="h5"&&a!=="h6";case"rp":case"rt":return v5.indexOf(a)===-1;case"body":case"caption":case"col":case"colgroup":case"frameset":case"frame":case"head":case"html":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return a==null}return!0},S5=function(i,a){switch(i){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return a.pTagInButtonScope;case"form":return a.formTag||a.pTagInButtonScope;case"li":return a.listItemTagAutoclosing;case"dd":case"dt":return a.dlItemTagAutoclosing;case"button":return a.buttonTagInScope;case"a":return a.aTagInScope;case"nobr":return a.nobrTagInScope}return null},_L={};xm=function(i,a,f){f=f||AL;var v=f.current,x=v&&v.tag;a!=null&&(i!=null&&c("validateDOMNesting: when childText is passed, childTag should be null"),i="#text");var C=y5(i,x)?null:v,P=C?null:S5(i,f),O=C||P;if(O){var z=O.tag,se=!!C+"|"+i+"|"+z;if(!_L[se]){_L[se]=!0;var ce=i,$e="";if(i==="#text"?/\S/.test(a)?ce="Text nodes":(ce="Whitespace text nodes",$e=" Make sure you don't have any extra whitespace between tags on each line of your source code."):ce="<"+i+">",C){var Ee="";z==="table"&&i==="tr"&&(Ee+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."),c("validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s",ce,z,$e,Ee)}else c("validateDOMNesting(...): %s cannot appear as a descendant of <%s>.",ce,z)}}}}var xh;xh="suppressHydrationWarning";var LL="$",kL="/$",OE="$?",FE="$!",E5="style",NE=null,UE=null;function DL(i,a){switch(i){case"button":case"input":case"select":case"textarea":return!!a.autoFocus}return!1}function x5(i){var a,f,v=i.nodeType;switch(v){case vs:case vf:{a=v===vs?"#document":"#fragment";var x=i.documentElement;f=x?x.namespaceURI:qo(null,"");break}default:{var C=v===Ci?i.parentNode:i,P=C.namespaceURI||null;a=C.tagName,f=qo(P,a);break}}{var O=a.toLowerCase(),z=bm(null,O);return{namespace:f,ancestorInfo:z}}}function b5(i,a,f){{var v=i,x=qo(v.namespace,a),C=bm(v.ancestorInfo,a);return{namespace:x,ancestorInfo:C}}}function R7(i){return i}function T5(i){NE=Nv(),UE=we();var a=null;return Yp(!1),a}function w5(i){De(UE),Yp(NE),NE=null,UE=null}function C5(i,a,f,v,x){var C;{var P=v;if(xm(i,null,P.ancestorInfo),typeof a.children=="string"||typeof a.children=="number"){var O=""+a.children,z=bm(P.ancestorInfo,i);xm(null,O,z)}C=P.namespace}var se=a5(i,a,f,C);return a0(x,se),zE(se,a),se}function R5(i,a){i.appendChild(a)}function A5(i,a,f,v,x){return l5(i,a,f,v),DL(a,f)}function _5(i,a,f,v,x,C){{var P=C;if(typeof v.children!=typeof f.children&&(typeof v.children=="string"||typeof v.children=="number")){var O=""+v.children,z=bm(P.ancestorInfo,a);xm(null,O,z)}}return u5(i,a,f,v)}function BE(i,a){return i==="textarea"||i==="option"||i==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}function L5(i,a,f,v){{var x=f;xm(null,i,x.ancestorInfo)}var C=o5(i,a);return a0(v,C),C}var IL=typeof setTimeout=="function"?setTimeout:void 0,k5=typeof clearTimeout=="function"?clearTimeout:void 0,$E=-1;function D5(i,a,f,v){DL(a,f)&&i.focus()}function I5(i,a,f,v,x,C){zE(i,x),c5(i,a,f,v,x)}function PL(i){xc(i,"")}function P5(i,a,f){i.nodeValue=f}function M5(i,a){i.appendChild(a)}function O5(i,a){var f;i.nodeType===Ci?(f=i.parentNode,f.insertBefore(a,i)):(f=i,f.appendChild(a));var v=i._reactRootContainer;v==null&&f.onclick===null&&r0(f)}function F5(i,a,f){i.insertBefore(a,f)}function N5(i,a,f){i.nodeType===Ci?i.parentNode.insertBefore(a,f):i.insertBefore(a,f)}function U5(i,a){i.removeChild(a)}function B5(i,a){i.nodeType===Ci?i.parentNode.removeChild(a):i.removeChild(a)}function $5(i){i=i;var a=i.style;typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"}function V5(i){i.nodeValue=""}function z5(i,a){i=i;var f=a[E5],v=f!=null&&f.hasOwnProperty("display")?f.display:null;i.style.display=Au("display",v)}function j5(i,a){i.nodeValue=a}function VE(i){if(i.nodeType===gs)i.textContent="";else if(i.nodeType===vs){var a=i.body;a!=null&&(a.textContent="")}}function H5(i,a,f){return i.nodeType!==gs||a.toLowerCase()!==i.nodeName.toLowerCase()?null:i}function G5(i,a){return a===""||i.nodeType!==Ns?null:i}function W5(i){return i.data===OE}function K5(i){return i.data===FE}function ML(i){for(;i!=null;i=i.nextSibling){var a=i.nodeType;if(a===gs||a===Ns)break}return i}function i0(i){return ML(i.nextSibling)}function OL(i){return ML(i.firstChild)}function q5(i,a,f,v,x,C){a0(C,i),zE(i,f);var P;{var O=x;P=O.namespace}return d5(i,a,f,P)}function Y5(i,a,f){return a0(f,i),h5(i,a)}function X5(i){for(var a=i.nextSibling,f=0;a;){if(a.nodeType===Ci){var v=a.data;if(v===kL){if(f===0)return i0(a);f--}else(v===LL||v===FE||v===OE)&&f++}a=a.nextSibling}return null}function FL(i){for(var a=i.previousSibling,f=0;a;){if(a.nodeType===Ci){var v=a.data;if(v===LL||v===FE||v===OE){if(f===0)return a;f--}else v===kL&&f++}a=a.previousSibling}return null}function Q5(i){Ip(i)}function J5(i){Ip(i)}function Z5(i,a,f){xL(a,f)}function eV(i,a,f,v,x){a[xh]!==!0&&xL(v,x)}function tV(i,a){a.nodeType===gs?bL(i,a):a.nodeType===Ci||TL(i,a)}function nV(i,a,f,v){a[xh]!==!0&&(v.nodeType===gs?bL(f,v):v.nodeType===Ci||TL(f,v))}function rV(i,a,f){wL(i,a)}function iV(i,a){CL(i,a)}function sV(i,a,f,v,x){a[xh]!==!0&&wL(f,v)}function aV(i,a,f,v){a[xh]!==!0&&CL(f,v)}function oV(i,a,f){a[xh]}var lV=0;function uV(i){var a="r:"+(lV++).toString(36);return{toString:function(){return i(),a},valueOf:function(){return i(),a}}}function cV(i){return i!==null&&typeof i=="object"&&i.$$typeof===lt}function fV(i){return{$$typeof:lt,toString:i,valueOf:i}}function dV(i){uL(i)}var s0=Math.random().toString(36).slice(2),Tm="__reactFiber$"+s0,NL="__reactProps$"+s0,wm="__reactContainer$"+s0,UL="__reactEvents$"+s0;function a0(i,a){a[Tm]=i}function hV(i,a){a[wm]=i}function BL(i){i[wm]=null}function o0(i){return!!i[wm]}function td(i){var a=i[Tm];if(a)return a;for(var f=i.parentNode;f;){if(a=f[wm]||f[Tm],a){var v=a.alternate;if(a.child!==null||v!==null&&v.child!==null)for(var x=FL(i);x!==null;){var C=x[Tm];if(C)return C;x=FL(x)}return a}i=f,f=i.parentNode}return null}function Uc(i){var a=i[Tm]||i[wm];return a&&(a.tag===_||a.tag===L||a.tag===ue||a.tag===T)?a:null}function bh(i){if(i.tag===_||i.tag===L)return i.stateNode;throw Error("getNodeFromInstance: Invalid argument.")}function l0(i){return i[NL]||null}function zE(i,a){i[NL]=a}function $L(i){var a=i[UL];return a===void 0&&(a=i[UL]=new Set),a}var VL={},zL=o.ReactDebugCurrentFrame;function u0(i){if(i){var a=i._owner,f=es(i.type,i._source,a?a.type:null);zL.setExtraStackFrame(f)}else zL.setExtraStackFrame(null)}function ol(i,a,f,v,x){{var C=Function.call.bind(Object.prototype.hasOwnProperty);for(var P in i)if(C(i,P)){var O=void 0;try{if(typeof i[P]!="function"){var z=Error((v||"React class")+": "+f+" type `"+P+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[P]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw z.name="Invariant Violation",z}O=i[P](a,P,v,f,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(se){O=se}O&&!(O instanceof Error)&&(u0(x),c("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",v||"React class",f,P,typeof O),u0(null)),O instanceof Error&&!(O.message in VL)&&(VL[O.message]=!0,u0(x),c("Failed %s type: %s",f,O.message),u0(null))}}}var jE=[],c0;c0=[];var ec=-1;function Bc(i){return{current:i}}function Vs(i,a){if(ec<0){c("Unexpected pop.");return}a!==c0[ec]&&c("Unexpected Fiber popped."),i.current=jE[ec],jE[ec]=null,c0[ec]=null,ec--}function zs(i,a,f){ec++,jE[ec]=i.current,c0[ec]=f,i.current=a}var HE;HE={};var Za={};Object.freeze(Za);var tc=Bc(Za),nu=Bc(!1),GE=Za;function Th(i,a,f){return f&&ru(a)?GE:tc.current}function jL(i,a,f){{var v=i.stateNode;v.__reactInternalMemoizedUnmaskedChildContext=a,v.__reactInternalMemoizedMaskedChildContext=f}}function wh(i,a){{var f=i.type,v=f.contextTypes;if(!v)return Za;var x=i.stateNode;if(x&&x.__reactInternalMemoizedUnmaskedChildContext===a)return x.__reactInternalMemoizedMaskedChildContext;var C={};for(var P in v)C[P]=a[P];{var O=dt(f)||"Unknown";ol(v,C,"context",O)}return x&&jL(i,a,C),C}}function f0(){return nu.current}function ru(i){{var a=i.childContextTypes;return a!=null}}function d0(i){Vs(nu,i),Vs(tc,i)}function WE(i){Vs(nu,i),Vs(tc,i)}function HL(i,a,f){{if(tc.current!==Za)throw Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");zs(tc,a,i),zs(nu,f,i)}}function GL(i,a,f){{var v=i.stateNode,x=a.childContextTypes;if(typeof v.getChildContext!="function"){{var C=dt(a)||"Unknown";HE[C]||(HE[C]=!0,c("%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.",C,C))}return f}var P=v.getChildContext();for(var O in P)if(!(O in x))throw Error((dt(a)||"Unknown")+'.getChildContext(): key "'+O+'" is not defined in childContextTypes.');{var z=dt(a)||"Unknown";ol(x,P,"child context",z)}return t({},f,P)}}function h0(i){{var a=i.stateNode,f=a&&a.__reactInternalMemoizedMergedChildContext||Za;return GE=tc.current,zs(tc,f,i),zs(nu,nu.current,i),!0}}function WL(i,a,f){{var v=i.stateNode;if(!v)throw Error("Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.");if(f){var x=GL(i,a,GE);v.__reactInternalMemoizedMergedChildContext=x,Vs(nu,i),Vs(tc,i),zs(tc,x,i),zs(nu,f,i)}else Vs(nu,i),zs(nu,f,i)}}function pV(i){{if(!(Tv(i)&&i.tag===y))throw Error("Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.");var a=i;do{switch(a.tag){case T:return a.stateNode.context;case y:{var f=a.type;if(ru(f))return a.stateNode.__reactInternalMemoizedMergedChildContext;break}}a=a.return}while(a!==null);throw Error("Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.")}}var KE=0,KL=1,qL=2,p0=null,iu=null,Ch=!1,mV=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u";function gV(i){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var a=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(a.isDisabled)return!0;if(!a.supportsFiber)return c("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://reactjs.org/link/react-devtools"),!0;try{p0=a.inject(i),iu=a}catch(f){c("React instrumentation encountered an error: %s.",f)}return!0}function vV(i,a){if(iu&&typeof iu.onScheduleFiberRoot=="function")try{iu.onScheduleFiberRoot(p0,i,a)}catch(f){Ch||(Ch=!0,c("React instrumentation encountered an error: %s",f))}}function yV(i,a){if(iu&&typeof iu.onCommitFiberRoot=="function")try{var f=(i.current.flags&Pn)===Pn;_e&&iu.onCommitFiberRoot(p0,i,a,f)}catch(v){Ch||(Ch=!0,c("React instrumentation encountered an error: %s",v))}}function SV(i){if(iu&&typeof iu.onCommitFiberUnmount=="function")try{iu.onCommitFiberUnmount(p0,i)}catch(a){Ch||(Ch=!0,c("React instrumentation encountered an error: %s",a))}}var EV=n.unstable_runWithPriority,qE=n.unstable_scheduleCallback,YL=n.unstable_cancelCallback,xV=n.unstable_shouldYield,XL=n.unstable_requestPaint,YE=n.unstable_now,bV=n.unstable_getCurrentPriorityLevel,m0=n.unstable_ImmediatePriority,QL=n.unstable_UserBlockingPriority,JL=n.unstable_NormalPriority,ZL=n.unstable_LowPriority,ek=n.unstable_IdlePriority;if(!(s.__interactionsRef!=null&&s.__interactionsRef.current!=null))throw Error("It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://reactjs.org/link/profiling");var tk={},Lo=99,nd=98,nc=97,nk=96,rk=95,XE=90,TV=xV,wV=XL!==void 0?XL:function(){},rc=null,g0=null,QE=!1,ik=YE(),js=ik<1e4?YE:function(){return YE()-ik};function Rh(){switch(bV()){case m0:return Lo;case QL:return nd;case JL:return nc;case ZL:return nk;case ek:return rk;default:throw Error("Unknown priority level.")}}function sk(i){switch(i){case Lo:return m0;case nd:return QL;case nc:return JL;case nk:return ZL;case rk:return ek;default:throw Error("Unknown priority level.")}}function rd(i,a){var f=sk(i);return EV(f,a)}function $c(i,a,f){var v=sk(i);return qE(v,a,f)}function CV(i){return rc===null?(rc=[i],g0=qE(m0,ok)):rc.push(i),tk}function ak(i){i!==tk&&YL(i)}function su(){if(g0!==null){var i=g0;g0=null,YL(i)}ok()}function ok(){if(!QE&&rc!==null){QE=!0;var i=0;try{var a=!0,f=rc;rd(Lo,function(){for(;i<f.length;i++){var v=f[i];do v=v(a);while(v!==null)}}),rc=null}catch(v){throw rc!==null&&(rc=rc.slice(i+1)),qE(m0,su),v}finally{QE=!1}}}var lk="17.0.2",Wr=0,vi=1,_a=2,id=4,eo=8,RV=16,AV=o.ReactCurrentBatchConfig,_V=0;function LV(){return AV.transition}var ll={recordUnsafeLifecycleWarnings:function(i,a){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(i,a){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}};{var kV=function(i){for(var a=null,f=i;f!==null;)f.mode&vi&&(a=f),f=f.return;return a},sd=function(i){var a=[];return i.forEach(function(f){a.push(f)}),a.sort().join(", ")},Cm=[],Rm=[],Am=[],_m=[],Lm=[],km=[],ad=new Set;ll.recordUnsafeLifecycleWarnings=function(i,a){ad.has(i.type)||(typeof a.componentWillMount=="function"&&a.componentWillMount.__suppressDeprecationWarning!==!0&&Cm.push(i),i.mode&vi&&typeof a.UNSAFE_componentWillMount=="function"&&Rm.push(i),typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&Am.push(i),i.mode&vi&&typeof a.UNSAFE_componentWillReceiveProps=="function"&&_m.push(i),typeof a.componentWillUpdate=="function"&&a.componentWillUpdate.__suppressDeprecationWarning!==!0&&Lm.push(i),i.mode&vi&&typeof a.UNSAFE_componentWillUpdate=="function"&&km.push(i))},ll.flushPendingUnsafeLifecycleWarnings=function(){var i=new Set;Cm.length>0&&(Cm.forEach(function(Ee){i.add(dt(Ee.type)||"Component"),ad.add(Ee.type)}),Cm=[]);var a=new Set;Rm.length>0&&(Rm.forEach(function(Ee){a.add(dt(Ee.type)||"Component"),ad.add(Ee.type)}),Rm=[]);var f=new Set;Am.length>0&&(Am.forEach(function(Ee){f.add(dt(Ee.type)||"Component"),ad.add(Ee.type)}),Am=[]);var v=new Set;_m.length>0&&(_m.forEach(function(Ee){v.add(dt(Ee.type)||"Component"),ad.add(Ee.type)}),_m=[]);var x=new Set;Lm.length>0&&(Lm.forEach(function(Ee){x.add(dt(Ee.type)||"Component"),ad.add(Ee.type)}),Lm=[]);var C=new Set;if(km.length>0&&(km.forEach(function(Ee){C.add(dt(Ee.type)||"Component"),ad.add(Ee.type)}),km=[]),a.size>0){var P=sd(a);c(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
|
|
111
|
+
|
|
112
|
+
* Move code with side effects to componentDidMount, and set initial state in the constructor.
|
|
113
|
+
|
|
114
|
+
Please update the following components: %s`,P)}if(v.size>0){var O=sd(v);c(`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
|
|
115
|
+
|
|
116
|
+
* Move data fetching code or side effects to componentDidUpdate.
|
|
117
|
+
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state
|
|
118
|
+
|
|
119
|
+
Please update the following components: %s`,O)}if(C.size>0){var z=sd(C);c(`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
|
|
120
|
+
|
|
121
|
+
* Move data fetching code or side effects to componentDidUpdate.
|
|
122
|
+
|
|
123
|
+
Please update the following components: %s`,z)}if(i.size>0){var se=sd(i);u(`componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
|
|
124
|
+
|
|
125
|
+
* Move code with side effects to componentDidMount, and set initial state in the constructor.
|
|
126
|
+
* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
|
127
|
+
|
|
128
|
+
Please update the following components: %s`,se)}if(f.size>0){var ce=sd(f);u(`componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
|
|
129
|
+
|
|
130
|
+
* Move data fetching code or side effects to componentDidUpdate.
|
|
131
|
+
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state
|
|
132
|
+
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
|
133
|
+
|
|
134
|
+
Please update the following components: %s`,ce)}if(x.size>0){var $e=sd(x);u(`componentWillUpdate has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
|
|
135
|
+
|
|
136
|
+
* Move data fetching code or side effects to componentDidUpdate.
|
|
137
|
+
* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
|
138
|
+
|
|
139
|
+
Please update the following components: %s`,$e)}};var v0=new Map,uk=new Set;ll.recordLegacyContextWarning=function(i,a){var f=kV(i);if(f===null){c("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.");return}if(!uk.has(i.type)){var v=v0.get(f);(i.type.contextTypes!=null||i.type.childContextTypes!=null||a!==null&&typeof a.getChildContext=="function")&&(v===void 0&&(v=[],v0.set(f,v)),v.push(i))}},ll.flushLegacyContextWarning=function(){v0.forEach(function(i,a){if(i.length!==0){var f=i[0],v=new Set;i.forEach(function(C){v.add(dt(C.type)||"Component"),uk.add(C.type)});var x=sd(v);try{ir(f),c(`Legacy context API has been detected within a strict-mode tree.
|
|
140
|
+
|
|
141
|
+
The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
|
|
142
|
+
|
|
143
|
+
Please update the following components: %s
|
|
144
|
+
|
|
145
|
+
Learn more about this warning here: https://reactjs.org/link/legacy-context`,x)}finally{Zr()}}})},ll.discardPendingWarnings=function(){Cm=[],Rm=[],Am=[],_m=[],Lm=[],km=[],v0=new Map}}function ul(i,a){if(i&&i.defaultProps){var f=t({},a),v=i.defaultProps;for(var x in v)f[x]===void 0&&(f[x]=v[x]);return f}return a}var y0=1073741823,JE=Bc(null),ZE;ZE={};var S0=null,Ah=null,E0=null,x0=!1;function b0(){S0=null,Ah=null,E0=null,x0=!1}function ck(){x0=!0}function fk(){x0=!1}function dk(i,a){var f=i.type._context;zs(JE,f._currentValue,i),f._currentValue=a,f._currentRenderer!==void 0&&f._currentRenderer!==null&&f._currentRenderer!==ZE&&c("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),f._currentRenderer=ZE}function ex(i){var a=JE.current;Vs(JE,i);var f=i.type._context;f._currentValue=a}function DV(i,a,f){if(g(f,a))return 0;var v=typeof i._calculateChangedBits=="function"?i._calculateChangedBits(f,a):y0;return(v&y0)!==v&&c("calculateChangedBits: Expected the return value to be a 31-bit integer. Instead received: %s",v),v|0}function hk(i,a){for(var f=i;f!==null;){var v=f.alternate;if(!Kl(f.childLanes,a))f.childLanes=Kn(f.childLanes,a),v!==null&&(v.childLanes=Kn(v.childLanes,a));else if(v!==null&&!Kl(v.childLanes,a))v.childLanes=Kn(v.childLanes,a);else break;f=f.return}}function IV(i,a,f,v){var x=i.child;for(x!==null&&(x.return=i);x!==null;){var C=void 0,P=x.dependencies;if(P!==null){C=x.child;for(var O=P.firstContext;O!==null;){if(O.context===a&&O.observedBits&f){if(x.tag===y){var z=Vc(Nr,us(v));z.tag=T0,zc(x,z)}x.lanes=Kn(x.lanes,v);var se=x.alternate;se!==null&&(se.lanes=Kn(se.lanes,v)),hk(x.return,v),P.lanes=Kn(P.lanes,v);break}O=O.next}}else x.tag===K?C=x.type===i.type?null:x.child:C=x.child;if(C!==null)C.return=x;else for(C=x;C!==null;){if(C===i){C=null;break}var ce=C.sibling;if(ce!==null){ce.return=C.return,C=ce;break}C=C.return}x=C}}function _h(i,a){S0=i,Ah=null,E0=null;var f=i.dependencies;if(f!==null){var v=f.firstContext;v!==null&&(Gi(f.lanes,a)&&lb(),f.firstContext=null)}}function Ui(i,a){if(x0&&c("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."),E0!==i){if(!(a===!1||a===0)){var f;typeof a!="number"||a===y0?(E0=i,f=y0):f=a;var v={context:i,observedBits:f,next:null};if(Ah===null){if(S0===null)throw Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");Ah=v,S0.dependencies={lanes:rt,firstContext:v,responders:null}}else Ah=Ah.next=v}}return i._currentValue}var pk=0,mk=1,T0=2,tx=3,w0=!1,nx,C0;nx=!1,C0=null;function rx(i){var a={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null};i.updateQueue=a}function gk(i,a){var f=a.updateQueue,v=i.updateQueue;if(f===v){var x={baseState:v.baseState,firstBaseUpdate:v.firstBaseUpdate,lastBaseUpdate:v.lastBaseUpdate,shared:v.shared,effects:v.effects};a.updateQueue=x}}function Vc(i,a){var f={eventTime:i,lane:a,tag:pk,payload:null,callback:null,next:null};return f}function zc(i,a){var f=i.updateQueue;if(f!==null){var v=f.shared,x=v.pending;x===null?a.next=a:(a.next=x.next,x.next=a),v.pending=a,C0===v&&!nx&&(c("An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback."),nx=!0)}}function vk(i,a){var f=i.updateQueue,v=i.alternate;if(v!==null){var x=v.updateQueue;if(f===x){var C=null,P=null,O=f.firstBaseUpdate;if(O!==null){var z=O;do{var se={eventTime:z.eventTime,lane:z.lane,tag:z.tag,payload:z.payload,callback:z.callback,next:null};P===null?C=P=se:(P.next=se,P=se),z=z.next}while(z!==null);P===null?C=P=a:(P.next=a,P=a)}else C=P=a;f={baseState:x.baseState,firstBaseUpdate:C,lastBaseUpdate:P,shared:x.shared,effects:x.effects},i.updateQueue=f;return}}var ce=f.lastBaseUpdate;ce===null?f.firstBaseUpdate=a:ce.next=a,f.lastBaseUpdate=a}function PV(i,a,f,v,x,C){switch(f.tag){case mk:{var P=f.payload;if(typeof P=="function"){ck();var O=P.call(C,v,x);{if(i.mode&vi){ui();try{P.call(C,v,x)}finally{Qi()}}fk()}return O}return P}case tx:i.flags=i.flags&~Ka|Pn;case pk:{var z=f.payload,se;if(typeof z=="function"){ck(),se=z.call(C,v,x);{if(i.mode&vi){ui();try{z.call(C,v,x)}finally{Qi()}}fk()}}else se=z;return se==null?v:t({},v,se)}case T0:return w0=!0,v}return v}function Dm(i,a,f,v){var x=i.updateQueue;w0=!1,C0=x.shared;var C=x.firstBaseUpdate,P=x.lastBaseUpdate,O=x.shared.pending;if(O!==null){x.shared.pending=null;var z=O,se=z.next;z.next=null,P===null?C=se:P.next=se,P=z;var ce=i.alternate;if(ce!==null){var $e=ce.updateQueue,Ee=$e.lastBaseUpdate;Ee!==P&&(Ee===null?$e.firstBaseUpdate=se:Ee.next=se,$e.lastBaseUpdate=z)}}if(C!==null){var Ke=x.baseState,st=rt,Ct=null,en=null,Cn=null,dn=C;do{var qn=dn.lane,Tr=dn.eventTime;if(Kl(v,qn)){if(Cn!==null){var Ze={eventTime:Tr,lane:Fr,tag:dn.tag,payload:dn.payload,callback:dn.callback,next:null};Cn=Cn.next=Ze}Ke=PV(i,x,dn,Ke,a,f);var Ie=dn.callback;if(Ie!==null){i.flags|=Iu;var mt=x.effects;mt===null?x.effects=[dn]:mt.push(dn)}}else{var Ge={eventTime:Tr,lane:qn,tag:dn.tag,payload:dn.payload,callback:dn.callback,next:null};Cn===null?(en=Cn=Ge,Ct=Ke):Cn=Cn.next=Ge,st=Kn(st,qn)}if(dn=dn.next,dn===null){if(O=x.shared.pending,O===null)break;var Lt=O,zt=Lt.next;Lt.next=null,dn=zt,x.lastBaseUpdate=Lt,x.shared.pending=null}}while(!0);Cn===null&&(Ct=Ke),x.baseState=Ct,x.firstBaseUpdate=en,x.lastBaseUpdate=Cn,Pb(st),i.lanes=st,i.memoizedState=Ke}C0=null}function MV(i,a){if(typeof i!="function")throw Error("Invalid argument passed as callback. Expected a function. Instead received: "+i);i.call(a)}function yk(){w0=!1}function R0(){return w0}function Sk(i,a,f){var v=a.effects;if(a.effects=null,v!==null)for(var x=0;x<v.length;x++){var C=v[x],P=C.callback;P!==null&&(C.callback=null,MV(P,f))}}var ix={},OV=Array.isArray,Ek=new e.Component().refs,sx,ax,ox,lx,ux,xk,A0,cx,fx,dx;{sx=new Set,ax=new Set,ox=new Set,lx=new Set,cx=new Set,ux=new Set,fx=new Set,dx=new Set;var bk=new Set;A0=function(i,a){if(!(i===null||typeof i=="function")){var f=a+"_"+i;bk.has(f)||(bk.add(f),c("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",a,i))}},xk=function(i,a){if(a===void 0){var f=dt(i)||"Component";ux.has(f)||(ux.add(f),c("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",f))}},Object.defineProperty(ix,"_processChildContext",{enumerable:!1,value:function(){throw Error("_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).")}}),Object.freeze(ix)}function _0(i,a,f,v){var x=i.memoizedState;if(i.mode&vi){ui();try{f(v,x)}finally{Qi()}}var C=f(v,x);xk(a,C);var P=C==null?x:t({},x,C);if(i.memoizedState=P,i.lanes===rt){var O=i.updateQueue;O.baseState=P}}var hx={isMounted:wv,enqueueSetState:function(i,a,f){var v=Du(i),x=no(),C=Wc(v),P=Vc(x,C);P.payload=a,f!=null&&(A0(f,"setState"),P.callback=f),zc(v,P),Gs(v,C,x)},enqueueReplaceState:function(i,a,f){var v=Du(i),x=no(),C=Wc(v),P=Vc(x,C);P.tag=mk,P.payload=a,f!=null&&(A0(f,"replaceState"),P.callback=f),zc(v,P),Gs(v,C,x)},enqueueForceUpdate:function(i,a){var f=Du(i),v=no(),x=Wc(f),C=Vc(v,x);C.tag=T0,a!=null&&(A0(a,"forceUpdate"),C.callback=a),zc(f,C),Gs(f,x,v)}};function Tk(i,a,f,v,x,C,P){var O=i.stateNode;if(typeof O.shouldComponentUpdate=="function"){if(i.mode&vi){ui();try{O.shouldComponentUpdate(v,C,P)}finally{Qi()}}var z=O.shouldComponentUpdate(v,C,P);return z===void 0&&c("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",dt(a)||"Component"),z}return a.prototype&&a.prototype.isPureReactComponent?!k(f,v)||!k(x,C):!0}function FV(i,a,f){var v=i.stateNode;{var x=dt(a)||"Component",C=v.render;C||(a.prototype&&typeof a.prototype.render=="function"?c("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",x):c("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",x)),v.getInitialState&&!v.getInitialState.isReactClassApproved&&!v.state&&c("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",x),v.getDefaultProps&&!v.getDefaultProps.isReactClassApproved&&c("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",x),v.propTypes&&c("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",x),v.contextType&&c("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",x),v.contextTypes&&c("contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",x),a.contextType&&a.contextTypes&&!fx.has(a)&&(fx.add(a),c("%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.",x)),typeof v.componentShouldUpdate=="function"&&c("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",x),a.prototype&&a.prototype.isPureReactComponent&&typeof v.shouldComponentUpdate<"u"&&c("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",dt(a)||"A pure component"),typeof v.componentDidUnmount=="function"&&c("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",x),typeof v.componentDidReceiveProps=="function"&&c("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",x),typeof v.componentWillRecieveProps=="function"&&c("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",x),typeof v.UNSAFE_componentWillRecieveProps=="function"&&c("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",x);var P=v.props!==f;v.props!==void 0&&P&&c("%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",x,x),v.defaultProps&&c("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",x,x),typeof v.getSnapshotBeforeUpdate=="function"&&typeof v.componentDidUpdate!="function"&&!ox.has(a)&&(ox.add(a),c("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",dt(a))),typeof v.getDerivedStateFromProps=="function"&&c("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",x),typeof v.getDerivedStateFromError=="function"&&c("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",x),typeof a.getSnapshotBeforeUpdate=="function"&&c("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",x);var O=v.state;O&&(typeof O!="object"||OV(O))&&c("%s.state: must be set to an object or null",x),typeof v.getChildContext=="function"&&typeof a.childContextTypes!="object"&&c("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",x)}}function wk(i,a){a.updater=hx,i.stateNode=a,Rc(a,i),a._reactInternalInstance=ix}function Ck(i,a,f){var v=!1,x=Za,C=Za,P=a.contextType;if("contextType"in a){var O=P===null||P!==void 0&&P.$$typeof===pa&&P._context===void 0;if(!O&&!dx.has(a)){dx.add(a);var z="";P===void 0?z=" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":typeof P!="object"?z=" However, it is set to a "+typeof P+".":P.$$typeof===qs?z=" Did you accidentally pass the Context.Provider instead?":P._context!==void 0?z=" Did you accidentally pass the Context.Consumer instead?":z=" However, it is set to an object with keys {"+Object.keys(P).join(", ")+"}.",c("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",dt(a)||"Component",z)}}if(typeof P=="object"&&P!==null)C=Ui(P);else{x=Th(i,a,!0);var se=a.contextTypes;v=se!=null,C=v?wh(i,x):Za}if(i.mode&vi){ui();try{new a(f,C)}finally{Qi()}}var ce=new a(f,C),$e=i.memoizedState=ce.state!==null&&ce.state!==void 0?ce.state:null;wk(i,ce);{if(typeof a.getDerivedStateFromProps=="function"&&$e===null){var Ee=dt(a)||"Component";ax.has(Ee)||(ax.add(Ee),c("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",Ee,ce.state===null?"null":"undefined",Ee))}if(typeof a.getDerivedStateFromProps=="function"||typeof ce.getSnapshotBeforeUpdate=="function"){var Ke=null,st=null,Ct=null;if(typeof ce.componentWillMount=="function"&&ce.componentWillMount.__suppressDeprecationWarning!==!0?Ke="componentWillMount":typeof ce.UNSAFE_componentWillMount=="function"&&(Ke="UNSAFE_componentWillMount"),typeof ce.componentWillReceiveProps=="function"&&ce.componentWillReceiveProps.__suppressDeprecationWarning!==!0?st="componentWillReceiveProps":typeof ce.UNSAFE_componentWillReceiveProps=="function"&&(st="UNSAFE_componentWillReceiveProps"),typeof ce.componentWillUpdate=="function"&&ce.componentWillUpdate.__suppressDeprecationWarning!==!0?Ct="componentWillUpdate":typeof ce.UNSAFE_componentWillUpdate=="function"&&(Ct="UNSAFE_componentWillUpdate"),Ke!==null||st!==null||Ct!==null){var en=dt(a)||"Component",Cn=typeof a.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";lx.has(en)||(lx.add(en),c(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
146
|
+
|
|
147
|
+
%s uses %s but also contains the following legacy lifecycles:%s%s%s
|
|
148
|
+
|
|
149
|
+
The above lifecycles should be removed. Learn more about this warning here:
|
|
150
|
+
https://reactjs.org/link/unsafe-component-lifecycles`,en,Cn,Ke!==null?`
|
|
151
|
+
`+Ke:"",st!==null?`
|
|
152
|
+
`+st:"",Ct!==null?`
|
|
153
|
+
`+Ct:""))}}}return v&&jL(i,x,C),ce}function NV(i,a){var f=a.state;typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),f!==a.state&&(c("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",dt(i.type)||"Component"),hx.enqueueReplaceState(a,a.state,null))}function Rk(i,a,f,v){var x=a.state;if(typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(f,v),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(f,v),a.state!==x){{var C=dt(i.type)||"Component";sx.has(C)||(sx.add(C),c("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",C))}hx.enqueueReplaceState(a,a.state,null)}}function px(i,a,f,v){FV(i,a,f);var x=i.stateNode;x.props=f,x.state=i.memoizedState,x.refs=Ek,rx(i);var C=a.contextType;if(typeof C=="object"&&C!==null)x.context=Ui(C);else{var P=Th(i,a,!0);x.context=wh(i,P)}{if(x.state===f){var O=dt(a)||"Component";cx.has(O)||(cx.add(O),c("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",O))}i.mode&vi&&ll.recordLegacyContextWarning(i,x),ll.recordUnsafeLifecycleWarnings(i,x)}Dm(i,f,x,v),x.state=i.memoizedState;var z=a.getDerivedStateFromProps;typeof z=="function"&&(_0(i,a,z,f),x.state=i.memoizedState),typeof a.getDerivedStateFromProps!="function"&&typeof x.getSnapshotBeforeUpdate!="function"&&(typeof x.UNSAFE_componentWillMount=="function"||typeof x.componentWillMount=="function")&&(NV(i,x),Dm(i,f,x,v),x.state=i.memoizedState),typeof x.componentDidMount=="function"&&(i.flags|=Un)}function UV(i,a,f,v){var x=i.stateNode,C=i.memoizedProps;x.props=C;var P=x.context,O=a.contextType,z=Za;if(typeof O=="object"&&O!==null)z=Ui(O);else{var se=Th(i,a,!0);z=wh(i,se)}var ce=a.getDerivedStateFromProps,$e=typeof ce=="function"||typeof x.getSnapshotBeforeUpdate=="function";!$e&&(typeof x.UNSAFE_componentWillReceiveProps=="function"||typeof x.componentWillReceiveProps=="function")&&(C!==f||P!==z)&&Rk(i,x,f,z),yk();var Ee=i.memoizedState,Ke=x.state=Ee;if(Dm(i,f,x,v),Ke=i.memoizedState,C===f&&Ee===Ke&&!f0()&&!R0())return typeof x.componentDidMount=="function"&&(i.flags|=Un),!1;typeof ce=="function"&&(_0(i,a,ce,f),Ke=i.memoizedState);var st=R0()||Tk(i,a,C,f,Ee,Ke,z);return st?(!$e&&(typeof x.UNSAFE_componentWillMount=="function"||typeof x.componentWillMount=="function")&&(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(i.flags|=Un)):(typeof x.componentDidMount=="function"&&(i.flags|=Un),i.memoizedProps=f,i.memoizedState=Ke),x.props=f,x.state=Ke,x.context=z,st}function BV(i,a,f,v,x){var C=a.stateNode;gk(i,a);var P=a.memoizedProps,O=a.type===a.elementType?P:ul(a.type,P);C.props=O;var z=a.pendingProps,se=C.context,ce=f.contextType,$e=Za;if(typeof ce=="object"&&ce!==null)$e=Ui(ce);else{var Ee=Th(a,f,!0);$e=wh(a,Ee)}var Ke=f.getDerivedStateFromProps,st=typeof Ke=="function"||typeof C.getSnapshotBeforeUpdate=="function";!st&&(typeof C.UNSAFE_componentWillReceiveProps=="function"||typeof C.componentWillReceiveProps=="function")&&(P!==z||se!==$e)&&Rk(a,C,v,$e),yk();var Ct=a.memoizedState,en=C.state=Ct;if(Dm(a,v,C,x),en=a.memoizedState,P===z&&Ct===en&&!f0()&&!R0())return typeof C.componentDidUpdate=="function"&&(P!==i.memoizedProps||Ct!==i.memoizedState)&&(a.flags|=Un),typeof C.getSnapshotBeforeUpdate=="function"&&(P!==i.memoizedProps||Ct!==i.memoizedState)&&(a.flags|=Ol),!1;typeof Ke=="function"&&(_0(a,f,Ke,v),en=a.memoizedState);var Cn=R0()||Tk(a,f,O,v,Ct,en,$e);return Cn?(!st&&(typeof C.UNSAFE_componentWillUpdate=="function"||typeof C.componentWillUpdate=="function")&&(typeof C.componentWillUpdate=="function"&&C.componentWillUpdate(v,en,$e),typeof C.UNSAFE_componentWillUpdate=="function"&&C.UNSAFE_componentWillUpdate(v,en,$e)),typeof C.componentDidUpdate=="function"&&(a.flags|=Un),typeof C.getSnapshotBeforeUpdate=="function"&&(a.flags|=Ol)):(typeof C.componentDidUpdate=="function"&&(P!==i.memoizedProps||Ct!==i.memoizedState)&&(a.flags|=Un),typeof C.getSnapshotBeforeUpdate=="function"&&(P!==i.memoizedProps||Ct!==i.memoizedState)&&(a.flags|=Ol),a.memoizedProps=v,a.memoizedState=en),C.props=v,C.state=en,C.context=$e,Cn}var mx,gx,vx,yx,Sx,Ak=function(i,a){};mx=!1,gx=!1,vx={},yx={},Sx={},Ak=function(i,a){if(!(i===null||typeof i!="object")&&!(!i._store||i._store.validated||i.key!=null)){if(typeof i._store!="object")throw Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");i._store.validated=!0;var f=dt(a.type)||"Component";yx[f]||(yx[f]=!0,c('Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.'))}};var L0=Array.isArray;function Im(i,a,f){var v=f.ref;if(v!==null&&typeof v!="function"&&typeof v!="object"){if((i.mode&vi||Be)&&!(f._owner&&f._self&&f._owner.stateNode!==f._self)){var x=dt(i.type)||"Component";vx[x]||(c('A string ref, "%s", has been found within a strict mode tree. String refs are a source of potential bugs and should be avoided. We recommend using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',v),vx[x]=!0)}if(f._owner){var C=f._owner,P;if(C){var O=C;if(O.tag!==y)throw Error("Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref");P=O.stateNode}if(!P)throw Error("Missing owner for string ref "+v+". This error is likely caused by a bug in React. Please file an issue.");var z=""+v;if(a!==null&&a.ref!==null&&typeof a.ref=="function"&&a.ref._stringRef===z)return a.ref;var se=function(ce){var $e=P.refs;$e===Ek&&($e=P.refs={}),ce===null?delete $e[z]:$e[z]=ce};return se._stringRef=z,se}else{if(typeof v!="string")throw Error("Expected ref to be a function, a string, an object returned by React.createRef(), or null.");if(!f._owner)throw Error("Element ref was specified as a string ("+v+`) but no owner was set. This could happen for one of the following reasons:
|
|
154
|
+
1. You may be adding a ref to a function component
|
|
155
|
+
2. You may be adding a ref to a component that was not created inside a component's render method
|
|
156
|
+
3. You have multiple copies of React loaded
|
|
157
|
+
See https://reactjs.org/link/refs-must-have-owner for more information.`)}}return v}function k0(i,a){if(i.type!=="textarea")throw Error("Objects are not valid as a React child (found: "+(Object.prototype.toString.call(a)==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":a)+"). If you meant to render a collection of children, use an array instead.")}function D0(i){{var a=dt(i.type)||"Component";if(Sx[a])return;Sx[a]=!0,c("Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.")}}function _k(i){function a(Ge,Ze){if(i){var Ie=Ge.lastEffect;Ie!==null?(Ie.nextEffect=Ze,Ge.lastEffect=Ze):Ge.firstEffect=Ge.lastEffect=Ze,Ze.nextEffect=null,Ze.flags=jr}}function f(Ge,Ze){if(!i)return null;for(var Ie=Ze;Ie!==null;)a(Ge,Ie),Ie=Ie.sibling;return null}function v(Ge,Ze){for(var Ie=new Map,mt=Ze;mt!==null;)mt.key!==null?Ie.set(mt.key,mt):Ie.set(mt.index,mt),mt=mt.sibling;return Ie}function x(Ge,Ze){var Ie=vd(Ge,Ze);return Ie.index=0,Ie.sibling=null,Ie}function C(Ge,Ze,Ie){if(Ge.index=Ie,!i)return Ze;var mt=Ge.alternate;if(mt!==null){var Lt=mt.index;return Lt<Ze?(Ge.flags=En,Ze):Lt}else return Ge.flags=En,Ze}function P(Ge){return i&&Ge.alternate===null&&(Ge.flags=En),Ge}function O(Ge,Ze,Ie,mt){if(Ze===null||Ze.tag!==L){var Lt=Kb(Ie,Ge.mode,mt);return Lt.return=Ge,Lt}else{var zt=x(Ze,Ie);return zt.return=Ge,zt}}function z(Ge,Ze,Ie,mt){if(Ze!==null&&(Ze.elementType===Ie.type||lI(Ze,Ie))){var Lt=x(Ze,Ie.props);return Lt.ref=Im(Ge,Ze,Ie),Lt.return=Ge,Lt._debugSource=Ie._source,Lt._debugOwner=Ie._owner,Lt}var zt=Gb(Ie,Ge.mode,mt);return zt.ref=Im(Ge,Ze,Ie),zt.return=Ge,zt}function se(Ge,Ze,Ie,mt){if(Ze===null||Ze.tag!==R||Ze.stateNode.containerInfo!==Ie.containerInfo||Ze.stateNode.implementation!==Ie.implementation){var Lt=qb(Ie,Ge.mode,mt);return Lt.return=Ge,Lt}else{var zt=x(Ze,Ie.children||[]);return zt.return=Ge,zt}}function ce(Ge,Ze,Ie,mt,Lt){if(Ze===null||Ze.tag!==M){var zt=yd(Ie,Ge.mode,mt,Lt);return zt.return=Ge,zt}else{var Bn=x(Ze,Ie);return Bn.return=Ge,Bn}}function $e(Ge,Ze,Ie){if(typeof Ze=="string"||typeof Ze=="number"){var mt=Kb(""+Ze,Ge.mode,Ie);return mt.return=Ge,mt}if(typeof Ze=="object"&&Ze!==null){switch(Ze.$$typeof){case Sr:{var Lt=Gb(Ze,Ge.mode,Ie);return Lt.ref=Im(Ge,null,Ze),Lt.return=Ge,Lt}case jn:{var zt=qb(Ze,Ge.mode,Ie);return zt.return=Ge,zt}}if(L0(Ze)||rr(Ze)){var Bn=yd(Ze,Ge.mode,Ie,null);return Bn.return=Ge,Bn}k0(Ge,Ze)}return typeof Ze=="function"&&D0(Ge),null}function Ee(Ge,Ze,Ie,mt){var Lt=Ze!==null?Ze.key:null;if(typeof Ie=="string"||typeof Ie=="number")return Lt!==null?null:O(Ge,Ze,""+Ie,mt);if(typeof Ie=="object"&&Ie!==null){switch(Ie.$$typeof){case Sr:return Ie.key===Lt?Ie.type===oi?ce(Ge,Ze,Ie.props.children,mt,Lt):z(Ge,Ze,Ie,mt):null;case jn:return Ie.key===Lt?se(Ge,Ze,Ie,mt):null}if(L0(Ie)||rr(Ie))return Lt!==null?null:ce(Ge,Ze,Ie,mt,null);k0(Ge,Ie)}return typeof Ie=="function"&&D0(Ge),null}function Ke(Ge,Ze,Ie,mt,Lt){if(typeof mt=="string"||typeof mt=="number"){var zt=Ge.get(Ie)||null;return O(Ze,zt,""+mt,Lt)}if(typeof mt=="object"&&mt!==null){switch(mt.$$typeof){case Sr:{var Bn=Ge.get(mt.key===null?Ie:mt.key)||null;return mt.type===oi?ce(Ze,Bn,mt.props.children,Lt,mt.key):z(Ze,Bn,mt,Lt)}case jn:{var Ir=Ge.get(mt.key===null?Ie:mt.key)||null;return se(Ze,Ir,mt,Lt)}}if(L0(mt)||rr(mt)){var Kr=Ge.get(Ie)||null;return ce(Ze,Kr,mt,Lt,null)}k0(Ze,mt)}return typeof mt=="function"&&D0(Ze),null}function st(Ge,Ze,Ie){{if(typeof Ge!="object"||Ge===null)return Ze;switch(Ge.$$typeof){case Sr:case jn:Ak(Ge,Ie);var mt=Ge.key;if(typeof mt!="string")break;if(Ze===null){Ze=new Set,Ze.add(mt);break}if(!Ze.has(mt)){Ze.add(mt);break}c("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",mt);break}}return Ze}function Ct(Ge,Ze,Ie,mt){for(var Lt=null,zt=0;zt<Ie.length;zt++){var Bn=Ie[zt];Lt=st(Bn,Lt,Ge)}for(var Ir=null,Kr=null,ur=Ze,Bi=0,tr=0,qr=null;ur!==null&&tr<Ie.length;tr++){ur.index>tr?(qr=ur,ur=null):qr=ur.sibling;var fs=Ee(Ge,ur,Ie[tr],mt);if(fs===null){ur===null&&(ur=qr);break}i&&ur&&fs.alternate===null&&a(Ge,ur),Bi=C(fs,Bi,tr),Kr===null?Ir=fs:Kr.sibling=fs,Kr=fs,ur=qr}if(tr===Ie.length)return f(Ge,ur),Ir;if(ur===null){for(;tr<Ie.length;tr++){var ki=$e(Ge,Ie[tr],mt);ki!==null&&(Bi=C(ki,Bi,tr),Kr===null?Ir=ki:Kr.sibling=ki,Kr=ki)}return Ir}for(var fu=v(Ge,ur);tr<Ie.length;tr++){var Di=Ke(fu,Ge,tr,Ie[tr],mt);Di!==null&&(i&&Di.alternate!==null&&fu.delete(Di.key===null?tr:Di.key),Bi=C(Di,Bi,tr),Kr===null?Ir=Di:Kr.sibling=Di,Kr=Di)}return i&&fu.forEach(function(du){return a(Ge,du)}),Ir}function en(Ge,Ze,Ie,mt){var Lt=rr(Ie);if(typeof Lt!="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");{typeof Symbol=="function"&&Ie[Symbol.toStringTag]==="Generator"&&(gx||c("Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers."),gx=!0),Ie.entries===Lt&&(mx||c("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),mx=!0);var zt=Lt.call(Ie);if(zt)for(var Bn=null,Ir=zt.next();!Ir.done;Ir=zt.next()){var Kr=Ir.value;Bn=st(Kr,Bn,Ge)}}var ur=Lt.call(Ie);if(ur==null)throw Error("An iterable object provided no iterator.");for(var Bi=null,tr=null,qr=Ze,fs=0,ki=0,fu=null,Di=ur.next();qr!==null&&!Di.done;ki++,Di=ur.next()){qr.index>ki?(fu=qr,qr=null):fu=qr.sibling;var du=Ee(Ge,qr,Di.value,mt);if(du===null){qr===null&&(qr=fu);break}i&&qr&&du.alternate===null&&a(Ge,qr),fs=C(du,fs,ki),tr===null?Bi=du:tr.sibling=du,tr=du,qr=fu}if(Di.done)return f(Ge,qr),Bi;if(qr===null){for(;!Di.done;ki++,Di=ur.next()){var Sd=$e(Ge,Di.value,mt);Sd!==null&&(fs=C(Sd,fs,ki),tr===null?Bi=Sd:tr.sibling=Sd,tr=Sd)}return Bi}for(var tT=v(Ge,qr);!Di.done;ki++,Di=ur.next()){var Yc=Ke(tT,Ge,ki,Di.value,mt);Yc!==null&&(i&&Yc.alternate!==null&&tT.delete(Yc.key===null?ki:Yc.key),fs=C(Yc,fs,ki),tr===null?Bi=Yc:tr.sibling=Yc,tr=Yc)}return i&&tT.forEach(function(UH){return a(Ge,UH)}),Bi}function Cn(Ge,Ze,Ie,mt){if(Ze!==null&&Ze.tag===L){f(Ge,Ze.sibling);var Lt=x(Ze,Ie);return Lt.return=Ge,Lt}f(Ge,Ze);var zt=Kb(Ie,Ge.mode,mt);return zt.return=Ge,zt}function dn(Ge,Ze,Ie,mt){for(var Lt=Ie.key,zt=Ze;zt!==null;){if(zt.key===Lt){switch(zt.tag){case M:{if(Ie.type===oi){f(Ge,zt.sibling);var Bn=x(zt,Ie.props.children);return Bn.return=Ge,Bn._debugSource=Ie._source,Bn._debugOwner=Ie._owner,Bn}break}case et:default:{if(zt.elementType===Ie.type||lI(zt,Ie)){f(Ge,zt.sibling);var Ir=x(zt,Ie.props);return Ir.ref=Im(Ge,zt,Ie),Ir.return=Ge,Ir._debugSource=Ie._source,Ir._debugOwner=Ie._owner,Ir}break}}f(Ge,zt);break}else a(Ge,zt);zt=zt.sibling}if(Ie.type===oi){var Kr=yd(Ie.props.children,Ge.mode,mt,Ie.key);return Kr.return=Ge,Kr}else{var ur=Gb(Ie,Ge.mode,mt);return ur.ref=Im(Ge,Ze,Ie),ur.return=Ge,ur}}function qn(Ge,Ze,Ie,mt){for(var Lt=Ie.key,zt=Ze;zt!==null;){if(zt.key===Lt)if(zt.tag===R&&zt.stateNode.containerInfo===Ie.containerInfo&&zt.stateNode.implementation===Ie.implementation){f(Ge,zt.sibling);var Bn=x(zt,Ie.children||[]);return Bn.return=Ge,Bn}else{f(Ge,zt);break}else a(Ge,zt);zt=zt.sibling}var Ir=qb(Ie,Ge.mode,mt);return Ir.return=Ge,Ir}function Tr(Ge,Ze,Ie,mt){var Lt=typeof Ie=="object"&&Ie!==null&&Ie.type===oi&&Ie.key===null;Lt&&(Ie=Ie.props.children);var zt=typeof Ie=="object"&&Ie!==null;if(zt)switch(Ie.$$typeof){case Sr:return P(dn(Ge,Ze,Ie,mt));case jn:return P(qn(Ge,Ze,Ie,mt))}if(typeof Ie=="string"||typeof Ie=="number")return P(Cn(Ge,Ze,""+Ie,mt));if(L0(Ie))return Ct(Ge,Ze,Ie,mt);if(rr(Ie))return en(Ge,Ze,Ie,mt);if(zt&&k0(Ge,Ie),typeof Ie=="function"&&D0(Ge),typeof Ie>"u"&&!Lt)switch(Ge.tag){case y:{var Bn=Ge.stateNode;if(Bn.render._isMockFunction)break}case et:case m:case Y:case ye:throw Error((dt(Ge.type)||"Component")+"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.")}return f(Ge,Ze)}return Tr}var I0=_k(!0),Lk=_k(!1);function $V(i,a){if(!(i===null||a.child===i.child))throw Error("Resuming work not yet implemented.");if(a.child!==null){var f=a.child,v=vd(f,f.pendingProps);for(a.child=v,v.return=a;f.sibling!==null;)f=f.sibling,v=v.sibling=vd(f,f.pendingProps),v.return=a;v.sibling=null}}function VV(i,a){for(var f=i.child;f!==null;)eH(f,a),f=f.sibling}var Pm={},jc=Bc(Pm),Mm=Bc(Pm),P0=Bc(Pm);function M0(i){if(i===Pm)throw Error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.");return i}function kk(){var i=M0(P0.current);return i}function Ex(i,a){zs(P0,a,i),zs(Mm,i,i),zs(jc,Pm,i);var f=x5(a);Vs(jc,i),zs(jc,f,i)}function Lh(i){Vs(jc,i),Vs(Mm,i),Vs(P0,i)}function xx(){var i=M0(jc.current);return i}function Dk(i){M0(P0.current);var a=M0(jc.current),f=b5(a,i.type);a!==f&&(zs(Mm,i,i),zs(jc,f,i))}function bx(i){Mm.current===i&&(Vs(jc,i),Vs(Mm,i))}var zV=0,Ik=1,Tx=1,Om=2,cl=Bc(zV);function O0(i,a){return(i&a)!==0}function Fm(i){return i&Ik}function wx(i,a){return i&Ik|a}function jV(i,a){return i|a}function od(i,a){zs(cl,a,i)}function kh(i){Vs(cl,i)}function HV(i,a){var f=i.memoizedState;if(f!==null)return f.dehydrated!==null;var v=i.memoizedProps;return v.fallback===void 0?!1:v.unstable_avoidThisFallback!==!0?!0:!a}function F0(i){for(var a=i;a!==null;){if(a.tag===ue){var f=a.memoizedState;if(f!==null){var v=f.dehydrated;if(v===null||W5(v)||K5(v))return a}}else if(a.tag===Ve&&a.memoizedProps.revealOrder!==void 0){var x=(a.flags&Pn)!==er;if(x)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===i)return null;for(;a.sibling===null;){if(a.return===null||a.return===i)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var Cx=0,Dh=1,Ih=2,Nm=4,ko=null,ld=null,Hc=!1;function GV(i){var a=i.stateNode.containerInfo;return ld=OL(a),ko=i,Hc=!0,!0}function Pk(i,a){switch(i.tag){case T:tV(i.stateNode.containerInfo,a);break;case _:nV(i.type,i.memoizedProps,i.stateNode,a);break}var f=aH();f.stateNode=a,f.return=i,f.flags=jr,i.lastEffect!==null?(i.lastEffect.nextEffect=f,i.lastEffect=f):i.firstEffect=i.lastEffect=f}function Mk(i,a){switch(a.flags=a.flags&~yo|En,i.tag){case T:{var f=i.stateNode.containerInfo;switch(a.tag){case _:var v=a.type;a.pendingProps,rV(f,v);break;case L:var x=a.pendingProps;iV(f,x);break}break}case _:{var C=i.type,P=i.memoizedProps,O=i.stateNode;switch(a.tag){case _:var z=a.type;a.pendingProps,sV(C,P,O,z);break;case L:var se=a.pendingProps;aV(C,P,O,se);break;case ue:oV(C,P);break}break}default:return}}function Ok(i,a){switch(i.tag){case _:{var f=i.type;i.pendingProps;var v=H5(a,f);return v!==null?(i.stateNode=v,!0):!1}case L:{var x=i.pendingProps,C=G5(a,x);return C!==null?(i.stateNode=C,!0):!1}case ue:return!1;default:return!1}}function Rx(i){if(Hc){var a=ld;if(!a){Mk(ko,i),Hc=!1,ko=i;return}var f=a;if(!Ok(i,a)){if(a=i0(f),!a||!Ok(i,a)){Mk(ko,i),Hc=!1,ko=i;return}Pk(ko,f)}ko=i,ld=OL(a)}}function WV(i,a,f){var v=i.stateNode,x=q5(v,i.type,i.memoizedProps,a,f,i);return i.updateQueue=x,x!==null}function KV(i){var a=i.stateNode,f=i.memoizedProps,v=Y5(a,f,i);if(v){var x=ko;if(x!==null)switch(x.tag){case T:{var C=x.stateNode.containerInfo;Z5(C,a,f);break}case _:{var P=x.type,O=x.memoizedProps,z=x.stateNode;eV(P,O,z,a,f);break}}}return v}function qV(i){var a=i.memoizedState,f=a!==null?a.dehydrated:null;if(!f)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");return X5(f)}function Fk(i){for(var a=i.return;a!==null&&a.tag!==_&&a.tag!==T&&a.tag!==ue;)a=a.return;ko=a}function N0(i){if(i!==ko)return!1;if(!Hc)return Fk(i),Hc=!0,!1;var a=i.type;if(i.tag!==_||a!=="head"&&a!=="body"&&!BE(a,i.memoizedProps))for(var f=ld;f;)Pk(i,f),f=i0(f);return Fk(i),i.tag===ue?ld=qV(i):ld=ko?i0(i.stateNode):null,!0}function Ax(){ko=null,ld=null,Hc=!1}function _x(){return Hc}var Um=[],Lx;Lx={};function YV(i){Um.push(i)}function kx(){for(var i=0;i<Um.length;i++){var a=Um[i];a._workInProgressVersionPrimary=null}Um.length=0}function XV(i){return i._workInProgressVersionPrimary}function Nk(i,a){i._workInProgressVersionPrimary=a,Um.push(i)}function QV(i){i._currentPrimaryRenderer==null?i._currentPrimaryRenderer=Lx:i._currentPrimaryRenderer!==Lx&&c("Detected multiple renderers concurrently rendering the same mutable source. This is currently unsupported.")}var kt=o.ReactCurrentDispatcher,Do=o.ReactCurrentBatchConfig,Dx,Ix;Ix={},Dx=new Set;var Bm=rt,kr=null,Hs=null,cs=null,U0=!1,$m=!1,JV=25,ft=null,Io=null,Gc=-1,Px=!1;function br(){{var i=ft;Io===null?Io=[i]:Io.push(i)}}function Mt(){{var i=ft;Io!==null&&(Gc++,Io[Gc]!==i&&ZV(i))}}function Vm(i){i!=null&&!Array.isArray(i)&&c("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",ft,typeof i)}function ZV(i){{var a=dt(kr.type);if(!Dx.has(a)&&(Dx.add(a),Io!==null)){for(var f="",v=30,x=0;x<=Gc;x++){for(var C=Io[x],P=x===Gc?i:C,O=x+1+". "+C;O.length<v;)O+=" ";O+=P+`
|
|
158
|
+
`,f+=O}c(`React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks
|
|
159
|
+
|
|
160
|
+
Previous render Next render
|
|
161
|
+
------------------------------------------------------
|
|
162
|
+
%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
163
|
+
`,a,f)}}}function La(){throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
164
|
+
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
165
|
+
2. You might be breaking the Rules of Hooks
|
|
166
|
+
3. You might have more than one copy of React in the same app
|
|
167
|
+
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function Mx(i,a){if(Px)return!1;if(a===null)return c("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",ft),!1;i.length!==a.length&&c(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
|
|
168
|
+
|
|
169
|
+
Previous: %s
|
|
170
|
+
Incoming: %s`,ft,"["+a.join(", ")+"]","["+i.join(", ")+"]");for(var f=0;f<a.length&&f<i.length;f++)if(!g(i[f],a[f]))return!1;return!0}function Ph(i,a,f,v,x,C){Bm=C,kr=a,Io=i!==null?i._debugHookTypes:null,Gc=-1,Px=i!==null&&i.type!==a.type,a.memoizedState=null,a.updateQueue=null,a.lanes=rt,i!==null&&i.memoizedState!==null?kt.current=Jk:Io!==null?kt.current=Qk:kt.current=Xk;var P=f(v,x);if($m){var O=0;do{if($m=!1,!(O<JV))throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");O+=1,Px=!1,Hs=null,cs=null,a.updateQueue=null,Gc=-1,kt.current=Zk,P=f(v,x)}while($m)}kt.current=X0,a._debugHookTypes=Io;var z=Hs!==null&&Hs.next!==null;if(Bm=rt,kr=null,Hs=null,cs=null,ft=null,Io=null,Gc=-1,U0=!1,z)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return P}function Uk(i,a,f){a.updateQueue=i.updateQueue,a.flags&=~(Ac|Un),i.lanes=Bf(i.lanes,f)}function Bk(){if(kt.current=X0,U0){for(var i=kr.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}U0=!1}Bm=rt,kr=null,Hs=null,cs=null,Io=null,Gc=-1,ft=null,Y0=!1,$m=!1}function ud(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return cs===null?kr.memoizedState=cs=i:cs=cs.next=i,cs}function cd(){var i;if(Hs===null){var a=kr.alternate;a!==null?i=a.memoizedState:i=null}else i=Hs.next;var f;if(cs===null?f=kr.memoizedState:f=cs.next,f!==null)cs=f,f=cs.next,Hs=i;else{if(i===null)throw Error("Rendered more hooks than during the previous render.");Hs=i;var v={memoizedState:Hs.memoizedState,baseState:Hs.baseState,baseQueue:Hs.baseQueue,queue:Hs.queue,next:null};cs===null?kr.memoizedState=cs=v:cs=cs.next=v}return cs}function ez(){return{lastEffect:null}}function B0(i,a){return typeof a=="function"?a(i):a}function Ox(i,a,f){var v=ud(),x;f!==void 0?x=f(a):x=a,v.memoizedState=v.baseState=x;var C=v.queue={pending:null,dispatch:null,lastRenderedReducer:i,lastRenderedState:x},P=C.dispatch=qx.bind(null,kr,C);return[v.memoizedState,P]}function Fx(i,a,f){var v=cd(),x=v.queue;if(x===null)throw Error("Should have a queue. This is likely a bug in React. Please file an issue.");x.lastRenderedReducer=i;var C=Hs,P=C.baseQueue,O=x.pending;if(O!==null){if(P!==null){var z=P.next,se=O.next;P.next=se,O.next=z}C.baseQueue!==P&&c("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),C.baseQueue=P=O,x.pending=null}if(P!==null){var ce=P.next,$e=C.baseState,Ee=null,Ke=null,st=null,Ct=ce;do{var en=Ct.lane;if(Kl(Bm,en)){if(st!==null){var dn={lane:Fr,action:Ct.action,eagerReducer:Ct.eagerReducer,eagerState:Ct.eagerState,next:null};st=st.next=dn}if(Ct.eagerReducer===i)$e=Ct.eagerState;else{var qn=Ct.action;$e=i($e,qn)}}else{var Cn={lane:en,action:Ct.action,eagerReducer:Ct.eagerReducer,eagerState:Ct.eagerState,next:null};st===null?(Ke=st=Cn,Ee=$e):st=st.next=Cn,kr.lanes=Kn(kr.lanes,en),Pb(en)}Ct=Ct.next}while(Ct!==null&&Ct!==ce);st===null?Ee=$e:st.next=Ke,g($e,v.memoizedState)||lb(),v.memoizedState=$e,v.baseState=Ee,v.baseQueue=st,x.lastRenderedState=$e}var Tr=x.dispatch;return[v.memoizedState,Tr]}function Nx(i,a,f){var v=cd(),x=v.queue;if(x===null)throw Error("Should have a queue. This is likely a bug in React. Please file an issue.");x.lastRenderedReducer=i;var C=x.dispatch,P=x.pending,O=v.memoizedState;if(P!==null){x.pending=null;var z=P.next,se=z;do{var ce=se.action;O=i(O,ce),se=se.next}while(se!==z);g(O,v.memoizedState)||lb(),v.memoizedState=O,v.baseQueue===null&&(v.baseState=O),x.lastRenderedState=O}return[O,C]}function $k(i,a,f){QV(a);var v=a._getVersion,x=v(a._source),C=!1,P=XV(a);if(P!==null?C=P===x:(C=Kl(Bm,i.mutableReadLanes),C&&Nk(a,x)),C){var O=f(a._source);return typeof O=="function"&&c("Mutable source should not return a function as the snapshot value. Functions may close over mutable values and cause tearing."),O}else throw YV(a),Error("Cannot read from mutable source during the current render without tearing. This is a bug in React. Please file an issue.")}function Vk(i,a,f,v){var x=ij();if(x===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");var C=a._getVersion,P=C(a._source),O=kt.current,z=O.useState(function(){return $k(x,a,f)}),se=z[0],ce=z[1],$e=se,Ee=cs,Ke=i.memoizedState,st=Ke.refs,Ct=st.getSnapshot,en=Ke.source,Cn=Ke.subscribe,dn=kr;if(i.memoizedState={refs:st,source:a,subscribe:v},O.useEffect(function(){st.getSnapshot=f,st.setSnapshot=ce;var Tr=C(a._source);if(!g(P,Tr)){var Ge=f(a._source);if(typeof Ge=="function"&&c("Mutable source should not return a function as the snapshot value. Functions may close over mutable values and cause tearing."),!g($e,Ge)){ce(Ge);var Ze=Wc(dn);ah(x,Ze)}mE(x,x.mutableReadLanes)}},[f,a,v]),O.useEffect(function(){var Tr=function(){var Ze=st.getSnapshot,Ie=st.setSnapshot;try{Ie(Ze(a._source));var mt=Wc(dn);ah(x,mt)}catch(Lt){Ie(function(){throw Lt})}},Ge=v(a._source,Tr);return typeof Ge!="function"&&c("Mutable source subscribe function must return an unsubscribe function."),Ge},[a,v]),!g(Ct,f)||!g(en,a)||!g(Cn,v)){var qn={pending:null,dispatch:null,lastRenderedReducer:B0,lastRenderedState:$e};qn.dispatch=ce=qx.bind(null,kr,qn),Ee.queue=qn,Ee.baseQueue=null,$e=$k(x,a,f),Ee.memoizedState=Ee.baseState=$e}return $e}function Ux(i,a,f){var v=ud();return v.memoizedState={refs:{getSnapshot:a,setSnapshot:null},source:i,subscribe:f},Vk(v,i,a,f)}function $0(i,a,f){var v=cd();return Vk(v,i,a,f)}function fd(i){var a=ud();typeof i=="function"&&(i=i()),a.memoizedState=a.baseState=i;var f=a.queue={pending:null,dispatch:null,lastRenderedReducer:B0,lastRenderedState:i},v=f.dispatch=qx.bind(null,kr,f);return[a.memoizedState,v]}function zm(i){return Fx(B0)}function jm(i){return Nx(B0)}function V0(i,a,f,v){var x={tag:i,create:a,destroy:f,deps:v,next:null},C=kr.updateQueue;if(C===null)C=ez(),kr.updateQueue=C,C.lastEffect=x.next=x;else{var P=C.lastEffect;if(P===null)C.lastEffect=x.next=x;else{var O=P.next;P.next=x,x.next=O,C.lastEffect=x}}return x}function z0(i){var a=ud(),f={current:i};return Object.seal(f),a.memoizedState=f,f}function Mh(i){var a=cd();return a.memoizedState}function Bx(i,a,f,v){var x=ud(),C=v===void 0?null:v;kr.flags|=i,x.memoizedState=V0(Dh|a,f,void 0,C)}function $x(i,a,f,v){var x=cd(),C=v===void 0?null:v,P=void 0;if(Hs!==null){var O=Hs.memoizedState;if(P=O.destroy,C!==null){var z=O.deps;if(Mx(C,z)){V0(a,f,P,C);return}}}kr.flags|=i,x.memoizedState=V0(Dh|a,f,P,C)}function j0(i,a){return typeof jest<"u"&&nI(kr),Bx(Un|Ac,Nm,i,a)}function Oh(i,a){return typeof jest<"u"&&nI(kr),$x(Un|Ac,Nm,i,a)}function Vx(i,a){return Bx(Un,Ih,i,a)}function H0(i,a){return $x(Un,Ih,i,a)}function zk(i,a){if(typeof a=="function"){var f=a,v=i();return f(v),function(){f(null)}}else if(a!=null){var x=a;x.hasOwnProperty("current")||c("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(x).join(", ")+"}");var C=i();return x.current=C,function(){x.current=null}}}function zx(i,a,f){typeof a!="function"&&c("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",a!==null?typeof a:"null");var v=f!=null?f.concat([i]):null;return Bx(Un,Ih,zk.bind(null,a,i),v)}function G0(i,a,f){typeof a!="function"&&c("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",a!==null?typeof a:"null");var v=f!=null?f.concat([i]):null;return $x(Un,Ih,zk.bind(null,a,i),v)}function tz(i,a){}var W0=tz;function jx(i,a){var f=ud(),v=a===void 0?null:a;return f.memoizedState=[i,v],i}function K0(i,a){var f=cd(),v=a===void 0?null:a,x=f.memoizedState;if(x!==null&&v!==null){var C=x[1];if(Mx(v,C))return x[0]}return f.memoizedState=[i,v],i}function Hx(i,a){var f=ud(),v=a===void 0?null:a,x=i();return f.memoizedState=[x,v],x}function q0(i,a){var f=cd(),v=a===void 0?null:a,x=f.memoizedState;if(x!==null&&v!==null){var C=x[1];if(Mx(v,C))return x[0]}var P=i();return f.memoizedState=[P,v],P}function Gx(i){var a=fd(i),f=a[0],v=a[1];return j0(function(){var x=Do.transition;Do.transition=1;try{v(i)}finally{Do.transition=x}},[i]),f}function jk(i){var a=zm(),f=a[0],v=a[1];return Oh(function(){var x=Do.transition;Do.transition=1;try{v(i)}finally{Do.transition=x}},[i]),f}function Hk(i){var a=jm(),f=a[0],v=a[1];return Oh(function(){var x=Do.transition;Do.transition=1;try{v(i)}finally{Do.transition=x}},[i]),f}function nz(i,a){var f=Rh();rd(f<nd?nd:f,function(){i(!0)}),rd(f>nc?nc:f,function(){var v=Do.transition;Do.transition=1;try{i(!1),a()}finally{Do.transition=v}})}function Wx(){var i=fd(!1),a=i[0],f=i[1],v=nz.bind(null,f);return z0(v),[v,a]}function Gk(){var i=zm(),a=i[0],f=Mh(),v=f.current;return[v,a]}function Wk(){var i=jm(),a=i[0],f=Mh(),v=f.current;return[v,a]}var Y0=!1;function rz(){return Y0}function Kk(i){{var a=dt(i.type)||"Unknown";bu()&&!Ix[a]&&(c("The object passed back from useOpaqueIdentifier is meant to be passed through to attributes only. Do not read the value directly."),Ix[a]=!0)}}function Kx(){var i=uV.bind(null,Kk.bind(null,kr));if(_x()){var a=!1,f=kr,v=function(){throw a||(a=!0,Y0=!0,C(i()),Y0=!1,Kk(f)),Error("The object passed back from useOpaqueIdentifier is meant to be passed through to attributes only. Do not read the value directly.")},x=fV(v),C=fd(x)[1];return(kr.mode&_a)===Wr&&(kr.flags|=Un|Ac,V0(Dh|Nm,function(){C(i())},void 0,null)),x}else{var P=i();return fd(P),P}}function qk(){var i=zm()[0];return i}function Yk(){var i=jm()[0];return i}function qx(i,a,f){typeof arguments[3]=="function"&&c("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var v=no(),x=Wc(i),C={lane:x,action:f,eagerReducer:null,eagerState:null,next:null},P=a.pending;P===null?C.next=C:(C.next=P.next,P.next=C),a.pending=C;var O=i.alternate;if(i===kr||O!==null&&O===kr)$m=U0=!0;else{if(i.lanes===rt&&(O===null||O.lanes===rt)){var z=a.lastRenderedReducer;if(z!==null){var se;se=kt.current,kt.current=fl;try{var ce=a.lastRenderedState,$e=z(ce,f);if(C.eagerReducer=z,C.eagerState=$e,g($e,ce))return}catch{}finally{kt.current=se}}}typeof jest<"u"&&(tI(i),$j(i)),Gs(i,x,v)}}var X0={readContext:Ui,useCallback:La,useContext:La,useEffect:La,useImperativeHandle:La,useLayoutEffect:La,useMemo:La,useReducer:La,useRef:La,useState:La,useDebugValue:La,useDeferredValue:La,useTransition:La,useMutableSource:La,useOpaqueIdentifier:La,unstable_isNewReconciler:He},Xk=null,Qk=null,Jk=null,Zk=null,au=null,fl=null,Q0=null;{var Yx=function(){c("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")},Ln=function(){c("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://reactjs.org/link/rules-of-hooks")};Xk={readContext:function(i,a){return Ui(i,a)},useCallback:function(i,a){return ft="useCallback",br(),Vm(a),jx(i,a)},useContext:function(i,a){return ft="useContext",br(),Ui(i,a)},useEffect:function(i,a){return ft="useEffect",br(),Vm(a),j0(i,a)},useImperativeHandle:function(i,a,f){return ft="useImperativeHandle",br(),Vm(f),zx(i,a,f)},useLayoutEffect:function(i,a){return ft="useLayoutEffect",br(),Vm(a),Vx(i,a)},useMemo:function(i,a){ft="useMemo",br(),Vm(a);var f=kt.current;kt.current=au;try{return Hx(i,a)}finally{kt.current=f}},useReducer:function(i,a,f){ft="useReducer",br();var v=kt.current;kt.current=au;try{return Ox(i,a,f)}finally{kt.current=v}},useRef:function(i){return ft="useRef",br(),z0(i)},useState:function(i){ft="useState",br();var a=kt.current;kt.current=au;try{return fd(i)}finally{kt.current=a}},useDebugValue:function(i,a){return ft="useDebugValue",br(),void 0},useDeferredValue:function(i){return ft="useDeferredValue",br(),Gx(i)},useTransition:function(){return ft="useTransition",br(),Wx()},useMutableSource:function(i,a,f){return ft="useMutableSource",br(),Ux(i,a,f)},useOpaqueIdentifier:function(){return ft="useOpaqueIdentifier",br(),Kx()},unstable_isNewReconciler:He},Qk={readContext:function(i,a){return Ui(i,a)},useCallback:function(i,a){return ft="useCallback",Mt(),jx(i,a)},useContext:function(i,a){return ft="useContext",Mt(),Ui(i,a)},useEffect:function(i,a){return ft="useEffect",Mt(),j0(i,a)},useImperativeHandle:function(i,a,f){return ft="useImperativeHandle",Mt(),zx(i,a,f)},useLayoutEffect:function(i,a){return ft="useLayoutEffect",Mt(),Vx(i,a)},useMemo:function(i,a){ft="useMemo",Mt();var f=kt.current;kt.current=au;try{return Hx(i,a)}finally{kt.current=f}},useReducer:function(i,a,f){ft="useReducer",Mt();var v=kt.current;kt.current=au;try{return Ox(i,a,f)}finally{kt.current=v}},useRef:function(i){return ft="useRef",Mt(),z0(i)},useState:function(i){ft="useState",Mt();var a=kt.current;kt.current=au;try{return fd(i)}finally{kt.current=a}},useDebugValue:function(i,a){return ft="useDebugValue",Mt(),void 0},useDeferredValue:function(i){return ft="useDeferredValue",Mt(),Gx(i)},useTransition:function(){return ft="useTransition",Mt(),Wx()},useMutableSource:function(i,a,f){return ft="useMutableSource",Mt(),Ux(i,a,f)},useOpaqueIdentifier:function(){return ft="useOpaqueIdentifier",Mt(),Kx()},unstable_isNewReconciler:He},Jk={readContext:function(i,a){return Ui(i,a)},useCallback:function(i,a){return ft="useCallback",Mt(),K0(i,a)},useContext:function(i,a){return ft="useContext",Mt(),Ui(i,a)},useEffect:function(i,a){return ft="useEffect",Mt(),Oh(i,a)},useImperativeHandle:function(i,a,f){return ft="useImperativeHandle",Mt(),G0(i,a,f)},useLayoutEffect:function(i,a){return ft="useLayoutEffect",Mt(),H0(i,a)},useMemo:function(i,a){ft="useMemo",Mt();var f=kt.current;kt.current=fl;try{return q0(i,a)}finally{kt.current=f}},useReducer:function(i,a,f){ft="useReducer",Mt();var v=kt.current;kt.current=fl;try{return Fx(i,a,f)}finally{kt.current=v}},useRef:function(i){return ft="useRef",Mt(),Mh()},useState:function(i){ft="useState",Mt();var a=kt.current;kt.current=fl;try{return zm(i)}finally{kt.current=a}},useDebugValue:function(i,a){return ft="useDebugValue",Mt(),W0()},useDeferredValue:function(i){return ft="useDeferredValue",Mt(),jk(i)},useTransition:function(){return ft="useTransition",Mt(),Gk()},useMutableSource:function(i,a,f){return ft="useMutableSource",Mt(),$0(i,a,f)},useOpaqueIdentifier:function(){return ft="useOpaqueIdentifier",Mt(),qk()},unstable_isNewReconciler:He},Zk={readContext:function(i,a){return Ui(i,a)},useCallback:function(i,a){return ft="useCallback",Mt(),K0(i,a)},useContext:function(i,a){return ft="useContext",Mt(),Ui(i,a)},useEffect:function(i,a){return ft="useEffect",Mt(),Oh(i,a)},useImperativeHandle:function(i,a,f){return ft="useImperativeHandle",Mt(),G0(i,a,f)},useLayoutEffect:function(i,a){return ft="useLayoutEffect",Mt(),H0(i,a)},useMemo:function(i,a){ft="useMemo",Mt();var f=kt.current;kt.current=Q0;try{return q0(i,a)}finally{kt.current=f}},useReducer:function(i,a,f){ft="useReducer",Mt();var v=kt.current;kt.current=Q0;try{return Nx(i,a,f)}finally{kt.current=v}},useRef:function(i){return ft="useRef",Mt(),Mh()},useState:function(i){ft="useState",Mt();var a=kt.current;kt.current=Q0;try{return jm(i)}finally{kt.current=a}},useDebugValue:function(i,a){return ft="useDebugValue",Mt(),W0()},useDeferredValue:function(i){return ft="useDeferredValue",Mt(),Hk(i)},useTransition:function(){return ft="useTransition",Mt(),Wk()},useMutableSource:function(i,a,f){return ft="useMutableSource",Mt(),$0(i,a,f)},useOpaqueIdentifier:function(){return ft="useOpaqueIdentifier",Mt(),Yk()},unstable_isNewReconciler:He},au={readContext:function(i,a){return Yx(),Ui(i,a)},useCallback:function(i,a){return ft="useCallback",Ln(),br(),jx(i,a)},useContext:function(i,a){return ft="useContext",Ln(),br(),Ui(i,a)},useEffect:function(i,a){return ft="useEffect",Ln(),br(),j0(i,a)},useImperativeHandle:function(i,a,f){return ft="useImperativeHandle",Ln(),br(),zx(i,a,f)},useLayoutEffect:function(i,a){return ft="useLayoutEffect",Ln(),br(),Vx(i,a)},useMemo:function(i,a){ft="useMemo",Ln(),br();var f=kt.current;kt.current=au;try{return Hx(i,a)}finally{kt.current=f}},useReducer:function(i,a,f){ft="useReducer",Ln(),br();var v=kt.current;kt.current=au;try{return Ox(i,a,f)}finally{kt.current=v}},useRef:function(i){return ft="useRef",Ln(),br(),z0(i)},useState:function(i){ft="useState",Ln(),br();var a=kt.current;kt.current=au;try{return fd(i)}finally{kt.current=a}},useDebugValue:function(i,a){return ft="useDebugValue",Ln(),br(),void 0},useDeferredValue:function(i){return ft="useDeferredValue",Ln(),br(),Gx(i)},useTransition:function(){return ft="useTransition",Ln(),br(),Wx()},useMutableSource:function(i,a,f){return ft="useMutableSource",Ln(),br(),Ux(i,a,f)},useOpaqueIdentifier:function(){return ft="useOpaqueIdentifier",Ln(),br(),Kx()},unstable_isNewReconciler:He},fl={readContext:function(i,a){return Yx(),Ui(i,a)},useCallback:function(i,a){return ft="useCallback",Ln(),Mt(),K0(i,a)},useContext:function(i,a){return ft="useContext",Ln(),Mt(),Ui(i,a)},useEffect:function(i,a){return ft="useEffect",Ln(),Mt(),Oh(i,a)},useImperativeHandle:function(i,a,f){return ft="useImperativeHandle",Ln(),Mt(),G0(i,a,f)},useLayoutEffect:function(i,a){return ft="useLayoutEffect",Ln(),Mt(),H0(i,a)},useMemo:function(i,a){ft="useMemo",Ln(),Mt();var f=kt.current;kt.current=fl;try{return q0(i,a)}finally{kt.current=f}},useReducer:function(i,a,f){ft="useReducer",Ln(),Mt();var v=kt.current;kt.current=fl;try{return Fx(i,a,f)}finally{kt.current=v}},useRef:function(i){return ft="useRef",Ln(),Mt(),Mh()},useState:function(i){ft="useState",Ln(),Mt();var a=kt.current;kt.current=fl;try{return zm(i)}finally{kt.current=a}},useDebugValue:function(i,a){return ft="useDebugValue",Ln(),Mt(),W0()},useDeferredValue:function(i){return ft="useDeferredValue",Ln(),Mt(),jk(i)},useTransition:function(){return ft="useTransition",Ln(),Mt(),Gk()},useMutableSource:function(i,a,f){return ft="useMutableSource",Ln(),Mt(),$0(i,a,f)},useOpaqueIdentifier:function(){return ft="useOpaqueIdentifier",Ln(),Mt(),qk()},unstable_isNewReconciler:He},Q0={readContext:function(i,a){return Yx(),Ui(i,a)},useCallback:function(i,a){return ft="useCallback",Ln(),Mt(),K0(i,a)},useContext:function(i,a){return ft="useContext",Ln(),Mt(),Ui(i,a)},useEffect:function(i,a){return ft="useEffect",Ln(),Mt(),Oh(i,a)},useImperativeHandle:function(i,a,f){return ft="useImperativeHandle",Ln(),Mt(),G0(i,a,f)},useLayoutEffect:function(i,a){return ft="useLayoutEffect",Ln(),Mt(),H0(i,a)},useMemo:function(i,a){ft="useMemo",Ln(),Mt();var f=kt.current;kt.current=fl;try{return q0(i,a)}finally{kt.current=f}},useReducer:function(i,a,f){ft="useReducer",Ln(),Mt();var v=kt.current;kt.current=fl;try{return Nx(i,a,f)}finally{kt.current=v}},useRef:function(i){return ft="useRef",Ln(),Mt(),Mh()},useState:function(i){ft="useState",Ln(),Mt();var a=kt.current;kt.current=fl;try{return jm(i)}finally{kt.current=a}},useDebugValue:function(i,a){return ft="useDebugValue",Ln(),Mt(),W0()},useDeferredValue:function(i){return ft="useDeferredValue",Ln(),Mt(),Hk(i)},useTransition:function(){return ft="useTransition",Ln(),Mt(),Wk()},useMutableSource:function(i,a,f){return ft="useMutableSource",Ln(),Mt(),$0(i,a,f)},useOpaqueIdentifier:function(){return ft="useOpaqueIdentifier",Ln(),Mt(),Yk()},unstable_isNewReconciler:He}}var J0=n.unstable_now,eD=0,Hm=-1;function iz(){return eD}function tD(){eD=J0()}function Xx(i){Hm=J0(),i.actualStartTime<0&&(i.actualStartTime=J0())}function nD(i){Hm=-1}function Z0(i,a){if(Hm>=0){var f=J0()-Hm;i.actualDuration+=f,a&&(i.selfBaseDuration=f),Hm=-1}}function Qx(i){for(var a=i.child;a;)i.actualDuration+=a.actualDuration,a=a.sibling}var Gm=o.ReactCurrentOwner,ou=!1,Jx,Wm,Zx,eb,tb,dd,nb,ey;Jx={},Wm={},Zx={},eb={},tb={},dd=!1,nb={},ey={};function ka(i,a,f,v){i===null?a.child=Lk(a,null,f,v):a.child=I0(a,i.child,f,v)}function sz(i,a,f,v){a.child=I0(a,i.child,null,v),a.child=I0(a,null,f,v)}function rD(i,a,f,v,x){if(a.type!==a.elementType){var C=f.propTypes;C&&ol(C,v,"prop",dt(f))}var P=f.render,O=a.ref,z;_h(a,x);{if(Gm.current=a,ei(!0),z=Ph(i,a,P,v,O,x),a.mode&vi){ui();try{z=Ph(i,a,P,v,O,x)}finally{Qi()}}ei(!1)}return i!==null&&!ou?(Uk(i,a,x),ic(i,a,x)):(a.flags|=Gn,ka(i,a,z,x),a.child)}function iD(i,a,f,v,x,C){if(i===null){var P=f.type;if(Jj(P)&&f.compare===null&&f.defaultProps===void 0){var O=P;return O=jh(P),a.tag=ye,a.type=O,ab(a,P),sD(i,a,O,v,x,C)}{var z=P.propTypes;z&&ol(z,v,"prop",dt(P))}var se=Hb(f.type,null,v,a,a.mode,C);return se.ref=a.ref,se.return=a,a.child=se,se}{var ce=f.type,$e=ce.propTypes;$e&&ol($e,v,"prop",dt(ce))}var Ee=i.child;if(!Gi(x,C)){var Ke=Ee.memoizedProps,st=f.compare;if(st=st!==null?st:k,st(Ke,v)&&i.ref===a.ref)return ic(i,a,C)}a.flags|=Gn;var Ct=vd(Ee,v);return Ct.ref=a.ref,Ct.return=a,a.child=Ct,Ct}function sD(i,a,f,v,x,C){if(a.type!==a.elementType){var P=a.elementType;if(P.$$typeof===Rn){var O=P,z=O._payload,se=O._init;try{P=se(z)}catch{P=null}var ce=P&&P.propTypes;ce&&ol(ce,v,"prop",dt(P))}}if(i!==null){var $e=i.memoizedProps;if(k($e,v)&&i.ref===a.ref&&a.type===i.type)if(ou=!1,Gi(C,x))(i.flags&wp)!==er&&(ou=!0);else return a.lanes=i.lanes,ic(i,a,C)}return ib(i,a,f,v,C)}function rb(i,a,f){var v=a.pendingProps,x=v.children,C=i!==null?i.memoizedState:null;if(v.mode==="hidden"||v.mode==="unstable-defer-without-hiding")if((a.mode&id)===Wr){var P={baseLanes:rt};a.memoizedState=P,gy(a,f)}else if(Gi(f,wa)){var ce={baseLanes:rt};a.memoizedState=ce;var $e=C!==null?C.baseLanes:f;gy(a,$e)}else{var O;if(C!==null){var z=C.baseLanes;O=Kn(z,f)}else O=f;by(wa),a.lanes=a.childLanes=wa;var se={baseLanes:O};return a.memoizedState=se,gy(a,O),null}else{var Ee;C!==null?(Ee=Kn(C.baseLanes,f),a.memoizedState=null):Ee=f,gy(a,Ee)}return ka(i,a,x,f),a.child}var az=rb;function oz(i,a,f){var v=a.pendingProps;return ka(i,a,v,f),a.child}function lz(i,a,f){var v=a.pendingProps.children;return ka(i,a,v,f),a.child}function uz(i,a,f){{a.flags|=Un;var v=a.stateNode;v.effectDuration=0,v.passiveEffectDuration=0}var x=a.pendingProps,C=x.children;return ka(i,a,C,f),a.child}function aD(i,a){var f=a.ref;(i===null&&f!==null||i!==null&&i.ref!==f)&&(a.flags|=Pu)}function ib(i,a,f,v,x){if(a.type!==a.elementType){var C=f.propTypes;C&&ol(C,v,"prop",dt(f))}var P;{var O=Th(a,f,!0);P=wh(a,O)}var z;_h(a,x);{if(Gm.current=a,ei(!0),z=Ph(i,a,f,v,P,x),a.mode&vi){ui();try{z=Ph(i,a,f,v,P,x)}finally{Qi()}}ei(!1)}return i!==null&&!ou?(Uk(i,a,x),ic(i,a,x)):(a.flags|=Gn,ka(i,a,z,x),a.child)}function oD(i,a,f,v,x){if(a.type!==a.elementType){var C=f.propTypes;C&&ol(C,v,"prop",dt(f))}var P;ru(f)?(P=!0,h0(a)):P=!1,_h(a,x);var O=a.stateNode,z;O===null?(i!==null&&(i.alternate=null,a.alternate=null,a.flags|=En),Ck(a,f,v),px(a,f,v,x),z=!0):i===null?z=UV(a,f,v,x):z=BV(i,a,f,v,x);var se=sb(i,a,f,z,P,x);{var ce=a.stateNode;z&&ce.props!==v&&(dd||c("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",dt(a.type)||"a component"),dd=!0)}return se}function sb(i,a,f,v,x,C){aD(i,a);var P=(a.flags&Pn)!==er;if(!v&&!P)return x&&WL(a,f,!1),ic(i,a,C);var O=a.stateNode;Gm.current=a;var z;if(P&&typeof f.getDerivedStateFromError!="function")z=null,nD();else{if(ei(!0),z=O.render(),a.mode&vi){ui();try{O.render()}finally{Qi()}}ei(!1)}return a.flags|=Gn,i!==null&&P?sz(i,a,z,C):ka(i,a,z,C),a.memoizedState=O.state,x&&WL(a,f,!0),a.child}function lD(i){var a=i.stateNode;a.pendingContext?HL(i,a.pendingContext,a.pendingContext!==a.context):a.context&&HL(i,a.context,!1),Ex(i,a.containerInfo)}function cz(i,a,f){lD(a);var v=a.updateQueue;if(!(i!==null&&v!==null))throw Error("If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue.");var x=a.pendingProps,C=a.memoizedState,P=C!==null?C.element:null;gk(i,a),Dm(a,x,null,f);var O=a.memoizedState,z=O.element;if(z===P)return Ax(),ic(i,a,f);var se=a.stateNode;if(se.hydrate&&GV(a)){{var ce=se.mutableSourceEagerHydrationData;if(ce!=null)for(var $e=0;$e<ce.length;$e+=2){var Ee=ce[$e],Ke=ce[$e+1];Nk(Ee,Ke)}}var st=Lk(a,null,z,f);a.child=st;for(var Ct=st;Ct;)Ct.flags=Ct.flags&~En|yo,Ct=Ct.sibling}else ka(i,a,z,f),Ax();return a.child}function fz(i,a,f){Dk(a),i===null&&Rx(a);var v=a.type,x=a.pendingProps,C=i!==null?i.memoizedProps:null,P=x.children,O=BE(v,x);return O?P=null:C!==null&&BE(v,C)&&(a.flags|=vo),aD(i,a),ka(i,a,P,f),a.child}function dz(i,a){return i===null&&Rx(a),null}function hz(i,a,f,v,x){i!==null&&(i.alternate=null,a.alternate=null,a.flags|=En);var C=a.pendingProps,P=f,O=P._payload,z=P._init,se=z(O);a.type=se;var ce=a.tag=Zj(se),$e=ul(se,C),Ee;switch(ce){case m:return ab(a,se),a.type=se=jh(se),Ee=ib(null,a,se,$e,x),Ee;case y:return a.type=se=Ub(se),Ee=oD(null,a,se,$e,x),Ee;case Y:return a.type=se=Bb(se),Ee=rD(null,a,se,$e,x),Ee;case ie:{if(a.type!==a.elementType){var Ke=se.propTypes;Ke&&ol(Ke,$e,"prop",dt(se))}return Ee=iD(null,a,se,ul(se.type,$e),v,x),Ee}}var st="";throw se!==null&&typeof se=="object"&&se.$$typeof===Rn&&(st=" Did you wrap a component in React.lazy() more than once?"),Error("Element type is invalid. Received a promise that resolves to: "+se+". Lazy element type must resolve to a class or function."+st)}function pz(i,a,f,v,x){i!==null&&(i.alternate=null,a.alternate=null,a.flags|=En),a.tag=y;var C;return ru(f)?(C=!0,h0(a)):C=!1,_h(a,x),Ck(a,f,v),px(a,f,v,x),sb(null,a,f,!0,C,x)}function mz(i,a,f,v){i!==null&&(i.alternate=null,a.alternate=null,a.flags|=En);var x=a.pendingProps,C;{var P=Th(a,f,!1);C=wh(a,P)}_h(a,v);var O;{if(f.prototype&&typeof f.prototype.render=="function"){var z=dt(f)||"Unknown";Jx[z]||(c("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",z,z),Jx[z]=!0)}a.mode&vi&&ll.recordLegacyContextWarning(a,null),ei(!0),Gm.current=a,O=Ph(null,a,f,x,C,v),ei(!1)}if(a.flags|=Gn,typeof O=="object"&&O!==null&&typeof O.render=="function"&&O.$$typeof===void 0){var se=dt(f)||"Unknown";Wm[se]||(c("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",se,se,se),Wm[se]=!0)}if(typeof O=="object"&&O!==null&&typeof O.render=="function"&&O.$$typeof===void 0){{var ce=dt(f)||"Unknown";Wm[ce]||(c("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",ce,ce,ce),Wm[ce]=!0)}a.tag=y,a.memoizedState=null,a.updateQueue=null;var $e=!1;ru(f)?($e=!0,h0(a)):$e=!1,a.memoizedState=O.state!==null&&O.state!==void 0?O.state:null,rx(a);var Ee=f.getDerivedStateFromProps;return typeof Ee=="function"&&_0(a,f,Ee,x),wk(a,O),px(a,f,x,v),sb(null,a,f,!0,$e,v)}else{if(a.tag=m,a.mode&vi){ui();try{O=Ph(null,a,f,x,C,v)}finally{Qi()}}return ka(null,a,O,v),ab(a,f),a.child}}function ab(i,a){{if(a&&a.childContextTypes&&c("%s(...): childContextTypes cannot be defined on a function component.",a.displayName||a.name||"Component"),i.ref!==null){var f="",v=Ds();v&&(f+=`
|
|
171
|
+
|
|
172
|
+
Check the render method of \``+v+"`.");var x=v||i._debugID||"",C=i._debugSource;C&&(x=C.fileName+":"+C.lineNumber),tb[x]||(tb[x]=!0,c("Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s",f))}if(typeof a.getDerivedStateFromProps=="function"){var P=dt(a)||"Unknown";eb[P]||(c("%s: Function components do not support getDerivedStateFromProps.",P),eb[P]=!0)}if(typeof a.contextType=="object"&&a.contextType!==null){var O=dt(a)||"Unknown";Zx[O]||(c("%s: Function components do not support contextType.",O),Zx[O]=!0)}}}var ty={dehydrated:null,retryLane:Fr};function ny(i){return{baseLanes:i}}function uD(i,a){return{baseLanes:Kn(i.baseLanes,a)}}function gz(i,a,f,v){if(a!==null){var x=a.memoizedState;if(x===null)return!1}return O0(i,Om)}function cD(i,a){return Bf(i.childLanes,a)}function fD(i,a,f){var v=a.pendingProps;yH(a)&&(a.flags|=Pn);var x=cl.current,C=!1,P=(a.flags&Pn)!==er;if(P||gz(x,i)?(C=!0,a.flags&=~Pn):(i===null||i.memoizedState!==null)&&v.fallback!==void 0&&v.unstable_avoidThisFallback!==!0&&(x=jV(x,Tx)),x=Fm(x),od(a,x),i===null){v.fallback!==void 0&&Rx(a);var O=v.children,z=v.fallback;if(C){var se=dD(a,O,z,f),ce=a.child;return ce.memoizedState=ny(f),a.memoizedState=ty,se}else if(typeof v.unstable_expectedLoadTime=="number"){var $e=dD(a,O,z,f),Ee=a.child;return Ee.memoizedState=ny(f),a.memoizedState=ty,a.lanes=Hu,by(Hu),$e}else return vz(a,O,f)}else{var Ke=i.memoizedState;if(Ke!==null)if(C){var st=v.fallback,Ct=v.children,en=mD(i,a,Ct,st,f),Cn=a.child,dn=i.child.memoizedState;return Cn.memoizedState=dn===null?ny(f):uD(dn,f),Cn.childLanes=cD(i,f),a.memoizedState=ty,en}else{var qn=v.children,Tr=pD(i,a,qn,f);return a.memoizedState=null,Tr}else if(C){var Ge=v.fallback,Ze=v.children,Ie=mD(i,a,Ze,Ge,f),mt=a.child,Lt=i.child.memoizedState;return mt.memoizedState=Lt===null?ny(f):uD(Lt,f),mt.childLanes=cD(i,f),a.memoizedState=ty,Ie}else{var zt=v.children,Bn=pD(i,a,zt,f);return a.memoizedState=null,Bn}}}function vz(i,a,f){var v=i.mode,x={mode:"visible",children:a},C=Wb(x,v,f,null);return C.return=i,i.child=C,C}function dD(i,a,f,v){var x=i.mode,C=i.child,P={mode:"hidden",children:a},O,z;return(x&_a)===Wr&&C!==null?(O=C,O.childLanes=rt,O.pendingProps=P,i.mode&eo&&(O.actualDuration=0,O.actualStartTime=-1,O.selfBaseDuration=0,O.treeBaseDuration=0),z=yd(f,x,v,null)):(O=Wb(P,x,rt,null),z=yd(f,x,v,null)),O.return=i,z.return=i,O.sibling=z,i.child=O,z}function hD(i,a){return vd(i,a)}function pD(i,a,f,v){var x=i.child,C=x.sibling,P=hD(x,{mode:"visible",children:f});return(a.mode&_a)===Wr&&(P.lanes=v),P.return=a,P.sibling=null,C!==null&&(C.nextEffect=null,C.flags=jr,a.firstEffect=a.lastEffect=C),a.child=P,P}function mD(i,a,f,v,x){var C=a.mode,P=i.child,O=P.sibling,z={mode:"hidden",children:f},se;if((C&_a)===Wr&&a.child!==P){var ce=a.child;se=ce,se.childLanes=rt,se.pendingProps=z,a.mode&eo&&(se.actualDuration=0,se.actualStartTime=-1,se.selfBaseDuration=P.selfBaseDuration,se.treeBaseDuration=P.treeBaseDuration);var $e=se.lastEffect;$e!==null?(a.firstEffect=se.firstEffect,a.lastEffect=$e,$e.nextEffect=null):a.firstEffect=a.lastEffect=null}else se=hD(P,z);var Ee;return O!==null?Ee=vd(O,v):(Ee=yd(v,C,x,null),Ee.flags|=En),Ee.return=a,se.return=a,se.sibling=Ee,a.child=se,Ee}function gD(i,a){i.lanes=Kn(i.lanes,a);var f=i.alternate;f!==null&&(f.lanes=Kn(f.lanes,a)),hk(i.return,a)}function yz(i,a,f){for(var v=a;v!==null;){if(v.tag===ue){var x=v.memoizedState;x!==null&&gD(v,f)}else if(v.tag===Ve)gD(v,f);else if(v.child!==null){v.child.return=v,v=v.child;continue}if(v===i)return;for(;v.sibling===null;){if(v.return===null||v.return===i)return;v=v.return}v.sibling.return=v.return,v=v.sibling}}function Sz(i){for(var a=i,f=null;a!==null;){var v=a.alternate;v!==null&&F0(v)===null&&(f=a),a=a.sibling}return f}function Ez(i){if(i!==void 0&&i!=="forwards"&&i!=="backwards"&&i!=="together"&&!nb[i])if(nb[i]=!0,typeof i=="string")switch(i.toLowerCase()){case"together":case"forwards":case"backwards":{c('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',i,i.toLowerCase());break}case"forward":case"backward":{c('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',i,i.toLowerCase());break}default:c('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',i);break}else c('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',i)}function xz(i,a){i!==void 0&&!ey[i]&&(i!=="collapsed"&&i!=="hidden"?(ey[i]=!0,c('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',i)):a!=="forwards"&&a!=="backwards"&&(ey[i]=!0,c('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',i)))}function vD(i,a){{var f=Array.isArray(i),v=!f&&typeof rr(i)=="function";if(f||v){var x=f?"array":"iterable";return c("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",x,a,x),!1}}return!0}function bz(i,a){if((a==="forwards"||a==="backwards")&&i!==void 0&&i!==null&&i!==!1)if(Array.isArray(i)){for(var f=0;f<i.length;f++)if(!vD(i[f],f))return}else{var v=rr(i);if(typeof v=="function"){var x=v.call(i);if(x)for(var C=x.next(),P=0;!C.done;C=x.next()){if(!vD(C.value,P))return;P++}}else c('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',a)}}function ob(i,a,f,v,x,C){var P=i.memoizedState;P===null?i.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:v,tail:f,tailMode:x,lastEffect:C}:(P.isBackwards=a,P.rendering=null,P.renderingStartTime=0,P.last=v,P.tail=f,P.tailMode=x,P.lastEffect=C)}function yD(i,a,f){var v=a.pendingProps,x=v.revealOrder,C=v.tail,P=v.children;Ez(x),xz(C,x),bz(P,x),ka(i,a,P,f);var O=cl.current,z=O0(O,Om);if(z)O=wx(O,Om),a.flags|=Pn;else{var se=i!==null&&(i.flags&Pn)!==er;se&&yz(a,a.child,f),O=Fm(O)}if(od(a,O),(a.mode&_a)===Wr)a.memoizedState=null;else switch(x){case"forwards":{var ce=Sz(a.child),$e;ce===null?($e=a.child,a.child=null):($e=ce.sibling,ce.sibling=null),ob(a,!1,$e,ce,C,a.lastEffect);break}case"backwards":{var Ee=null,Ke=a.child;for(a.child=null;Ke!==null;){var st=Ke.alternate;if(st!==null&&F0(st)===null){a.child=Ke;break}var Ct=Ke.sibling;Ke.sibling=Ee,Ee=Ke,Ke=Ct}ob(a,!0,Ee,null,C,a.lastEffect);break}case"together":{ob(a,!1,null,null,void 0,a.lastEffect);break}default:a.memoizedState=null}return a.child}function Tz(i,a,f){Ex(a,a.stateNode.containerInfo);var v=a.pendingProps;return i===null?a.child=I0(a,null,v,f):ka(i,a,v,f),a.child}var SD=!1;function wz(i,a,f){var v=a.type,x=v._context,C=a.pendingProps,P=a.memoizedProps,O=C.value;{"value"in C||SD||(SD=!0,c("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?"));var z=a.type.propTypes;z&&ol(z,C,"prop","Context.Provider")}if(dk(a,O),P!==null){var se=P.value,ce=DV(x,O,se);if(ce===0){if(P.children===C.children&&!f0())return ic(i,a,f)}else IV(a,x,ce,f)}var $e=C.children;return ka(i,a,$e,f),a.child}var ED=!1;function Cz(i,a,f){var v=a.type;v._context===void 0?v!==v.Consumer&&(ED||(ED=!0,c("Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?"))):v=v._context;var x=a.pendingProps,C=x.children;typeof C!="function"&&c("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),_h(a,f);var P=Ui(v,x.unstable_observedBits),O;return Gm.current=a,ei(!0),O=C(P),ei(!1),a.flags|=Gn,ka(i,a,O,f),a.child}function lb(){ou=!0}function ic(i,a,f){return i!==null&&(a.dependencies=i.dependencies),nD(),Pb(a.lanes),Gi(f,a.childLanes)?($V(i,a),a.child):null}function Rz(i,a,f){{var v=a.return;if(v===null)throw new Error("Cannot swap the root fiber.");if(i.alternate=null,a.alternate=null,f.index=a.index,f.sibling=a.sibling,f.return=a.return,f.ref=a.ref,a===v.child)v.child=f;else{var x=v.child;if(x===null)throw new Error("Expected parent to have a child.");for(;x.sibling!==a;)if(x=x.sibling,x===null)throw new Error("Expected to find the previous sibling.");x.sibling=f}var C=v.lastEffect;return C!==null?(C.nextEffect=i,v.lastEffect=i):v.firstEffect=v.lastEffect=i,i.nextEffect=null,i.flags=jr,f.flags|=En,f}}function xD(i,a,f){var v=a.lanes;if(a._debugNeedsRemount&&i!==null)return Rz(i,a,Hb(a.type,a.key,a.pendingProps,a._debugOwner||null,a.mode,a.lanes));if(i!==null){var x=i.memoizedProps,C=a.pendingProps;if(x!==C||f0()||a.type!==i.type)ou=!0;else if(Gi(f,v))(i.flags&wp)!==er?ou=!0:ou=!1;else{switch(ou=!1,a.tag){case T:lD(a),Ax();break;case _:Dk(a);break;case y:{var P=a.type;ru(P)&&h0(a);break}case R:Ex(a,a.stateNode.containerInfo);break;case K:{var O=a.memoizedProps.value;dk(a,O);break}case X:{var z=Gi(f,a.childLanes);z&&(a.flags|=Un);var se=a.stateNode;se.effectDuration=0,se.passiveEffectDuration=0}break;case ue:{var ce=a.memoizedState;if(ce!==null){var $e=a.child,Ee=$e.childLanes;if(Gi(f,Ee))return fD(i,a,f);od(a,Fm(cl.current));var Ke=ic(i,a,f);return Ke!==null?Ke.sibling:null}else od(a,Fm(cl.current));break}case Ve:{var st=(i.flags&Pn)!==er,Ct=Gi(f,a.childLanes);if(st){if(Ct)return yD(i,a,f);a.flags|=Pn}var en=a.memoizedState;if(en!==null&&(en.rendering=null,en.tail=null,en.lastEffect=null),od(a,cl.current),Ct)break;return null}case Pe:case ne:return a.lanes=rt,rb(i,a,f)}return ic(i,a,f)}}else ou=!1;switch(a.lanes=rt,a.tag){case E:return mz(i,a,a.type,f);case de:{var Cn=a.elementType;return hz(i,a,Cn,v,f)}case m:{var dn=a.type,qn=a.pendingProps,Tr=a.elementType===dn?qn:ul(dn,qn);return ib(i,a,dn,Tr,f)}case y:{var Ge=a.type,Ze=a.pendingProps,Ie=a.elementType===Ge?Ze:ul(Ge,Ze);return oD(i,a,Ge,Ie,f)}case T:return cz(i,a,f);case _:return fz(i,a,f);case L:return dz(i,a);case ue:return fD(i,a,f);case R:return Tz(i,a,f);case Y:{var mt=a.type,Lt=a.pendingProps,zt=a.elementType===mt?Lt:ul(mt,Lt);return rD(i,a,mt,zt,f)}case M:return oz(i,a,f);case F:return lz(i,a,f);case X:return uz(i,a,f);case K:return wz(i,a,f);case Z:return Cz(i,a,f);case ie:{var Bn=a.type,Ir=a.pendingProps,Kr=ul(Bn,Ir);if(a.type!==a.elementType){var ur=Bn.propTypes;ur&&ol(ur,Kr,"prop",dt(Bn))}return Kr=ul(Bn.type,Kr),iD(i,a,Bn,Kr,v,f)}case ye:return sD(i,a,a.type,a.pendingProps,v,f);case Re:{var Bi=a.type,tr=a.pendingProps,qr=a.elementType===Bi?tr:ul(Bi,tr);return pz(i,a,Bi,qr,f)}case Ve:return yD(i,a,f);case ze:break;case Qe:break;case et:break;case Pe:return rb(i,a,f);case ne:return az(i,a,f)}throw Error("Unknown unit of work tag ("+a.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function Fh(i){i.flags|=Un}function bD(i){i.flags|=Pu}var TD,ub,wD,CD;TD=function(i,a,f,v){for(var x=a.child;x!==null;){if(x.tag===_||x.tag===L)R5(i,x.stateNode);else if(x.tag!==R){if(x.child!==null){x.child.return=x,x=x.child;continue}}if(x===a)return;for(;x.sibling===null;){if(x.return===null||x.return===a)return;x=x.return}x.sibling.return=x.return,x=x.sibling}},ub=function(i){},wD=function(i,a,f,v,x){var C=i.memoizedProps;if(C!==v){var P=a.stateNode,O=xx(),z=_5(P,f,C,v,x,O);a.updateQueue=z,z&&Fh(a)}},CD=function(i,a,f,v){f!==v&&Fh(a)};function Km(i,a){if(!_x())switch(i.tailMode){case"hidden":{for(var f=i.tail,v=null;f!==null;)f.alternate!==null&&(v=f),f=f.sibling;v===null?i.tail=null:v.sibling=null;break}case"collapsed":{for(var x=i.tail,C=null;x!==null;)x.alternate!==null&&(C=x),x=x.sibling;C===null?!a&&i.tail!==null?i.tail.sibling=null:i.tail=null:C.sibling=null;break}}}function RD(i,a,f){var v=a.pendingProps;switch(a.tag){case E:case de:case ye:case m:case Y:case M:case F:case X:case Z:case ie:return null;case y:{var x=a.type;return ru(x)&&d0(a),null}case T:{Lh(a),WE(a),kx();var C=a.stateNode;if(C.pendingContext&&(C.context=C.pendingContext,C.pendingContext=null),i===null||i.child===null){var P=N0(a);P?Fh(a):C.hydrate||(a.flags|=Ol)}return ub(a),null}case _:{bx(a);var O=kk(),z=a.type;if(i!==null&&a.stateNode!=null)wD(i,a,z,v,O),i.ref!==a.ref&&bD(a);else{if(!v){if(a.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return null}var se=xx(),ce=N0(a);if(ce)WV(a,O,se)&&Fh(a);else{var $e=C5(z,v,O,se,a);TD($e,a,!1,!1),a.stateNode=$e,A5($e,z,v,O)&&Fh(a)}a.ref!==null&&bD(a)}return null}case L:{var Ee=v;if(i&&a.stateNode!=null){var Ke=i.memoizedProps;CD(i,a,Ke,Ee)}else{if(typeof Ee!="string"&&a.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");var st=kk(),Ct=xx(),en=N0(a);en?KV(a)&&Fh(a):a.stateNode=L5(Ee,st,Ct,a)}return null}case ue:{kh(a);var Cn=a.memoizedState;if((a.flags&Pn)!==er)return a.lanes=f,(a.mode&eo)!==Wr&&Qx(a),a;var dn=Cn!==null,qn=!1;if(i===null)a.memoizedProps.fallback!==void 0&&N0(a);else{var Tr=i.memoizedState;qn=Tr!==null}if(dn&&!qn&&(a.mode&_a)!==Wr){var Ge=i===null&&a.memoizedProps.unstable_avoidThisFallback!==!0;Ge||O0(cl.current,Tx)?dj():hj()}return(dn||qn)&&(a.flags|=Un),null}case R:return Lh(a),ub(a),i===null&&dV(a.stateNode.containerInfo),null;case K:return ex(a),null;case Re:{var Ze=a.type;return ru(Ze)&&d0(a),null}case Ve:{kh(a);var Ie=a.memoizedState;if(Ie===null)return null;var mt=(a.flags&Pn)!==er,Lt=Ie.rendering;if(Lt===null)if(mt)Km(Ie,!1);else{var zt=mj()&&(i===null||(i.flags&Pn)===er);if(!zt)for(var Bn=a.child;Bn!==null;){var Ir=F0(Bn);if(Ir!==null){mt=!0,a.flags|=Pn,Km(Ie,!1);var Kr=Ir.updateQueue;return Kr!==null&&(a.updateQueue=Kr,a.flags|=Un),Ie.lastEffect===null&&(a.firstEffect=null),a.lastEffect=Ie.lastEffect,VV(a,f),od(a,wx(cl.current,Om)),a.child}Bn=Bn.sibling}Ie.tail!==null&&js()>zD()&&(a.flags|=Pn,mt=!0,Km(Ie,!1),a.lanes=Hu,by(Hu))}else{if(!mt){var ur=F0(Lt);if(ur!==null){a.flags|=Pn,mt=!0;var Bi=ur.updateQueue;if(Bi!==null&&(a.updateQueue=Bi,a.flags|=Un),Km(Ie,!0),Ie.tail===null&&Ie.tailMode==="hidden"&&!Lt.alternate&&!_x()){var tr=a.lastEffect=Ie.lastEffect;return tr!==null&&(tr.nextEffect=null),null}}else js()*2-Ie.renderingStartTime>zD()&&f!==wa&&(a.flags|=Pn,mt=!0,Km(Ie,!1),a.lanes=Hu,by(Hu))}if(Ie.isBackwards)Lt.sibling=a.child,a.child=Lt;else{var qr=Ie.last;qr!==null?qr.sibling=Lt:a.child=Lt,Ie.last=Lt}}if(Ie.tail!==null){var fs=Ie.tail;Ie.rendering=fs,Ie.tail=fs.sibling,Ie.lastEffect=a.lastEffect,Ie.renderingStartTime=js(),fs.sibling=null;var ki=cl.current;return mt?ki=wx(ki,Om):ki=Fm(ki),od(a,ki),fs}return null}case ze:break;case Qe:break;case et:break;case Pe:case ne:{if(Ib(a),i!==null){var fu=a.memoizedState,Di=i.memoizedState,du=Di!==null,Sd=fu!==null;du!==Sd&&v.mode!=="unstable-defer-without-hiding"&&(a.flags|=Un)}return null}}throw Error("Unknown unit of work tag ("+a.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function Az(i,a){switch(i.tag){case y:{var f=i.type;ru(f)&&d0(i);var v=i.flags;return v&Ka?(i.flags=v&~Ka|Pn,(i.mode&eo)!==Wr&&Qx(i),i):null}case T:{Lh(i),WE(i),kx();var x=i.flags;if((x&Pn)!==er)throw Error("The root failed to unmount after an error. This is likely a bug in React. Please file an issue.");return i.flags=x&~Ka|Pn,i}case _:return bx(i),null;case ue:{kh(i);var C=i.flags;return C&Ka?(i.flags=C&~Ka|Pn,(i.mode&eo)!==Wr&&Qx(i),i):null}case Ve:return kh(i),null;case R:return Lh(i),null;case K:return ex(i),null;case Pe:case ne:return Ib(i),null;default:return null}}function AD(i){switch(i.tag){case y:{var a=i.type.childContextTypes;a!=null&&d0(i);break}case T:{Lh(i),WE(i),kx();break}case _:{bx(i);break}case R:Lh(i);break;case ue:kh(i);break;case Ve:kh(i);break;case K:ex(i);break;case Pe:case ne:Ib(i);break}}function cb(i,a){return{value:i,source:a,stack:ts(a)}}function _z(i,a){return!0}function fb(i,a){try{var f=_z(i,a);if(f===!1)return;var v=a.value,x=a.source,C=a.stack,P=C!==null?C:"";if(v!=null&&v._suppressLogging){if(i.tag===y)return;console.error(v)}var O=x?dt(x.type):null,z=O?"The above error occurred in the <"+O+"> component:":"The above error occurred in one of your React components:",se,ce=dt(i.type);ce?se="React will try to recreate this component tree from scratch "+("using the error boundary you provided, "+ce+"."):se=`Consider adding an error boundary to your tree to customize error handling behavior.
|
|
173
|
+
Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.`;var $e=z+`
|
|
174
|
+
`+P+`
|
|
175
|
+
|
|
176
|
+
`+(""+se);console.error($e)}catch(Ee){setTimeout(function(){throw Ee})}}var Lz=typeof WeakMap=="function"?WeakMap:Map;function _D(i,a,f){var v=Vc(Nr,f);v.tag=tx,v.payload={element:null};var x=a.value;return v.callback=function(){Lj(x),fb(i,a)},v}function LD(i,a,f){var v=Vc(Nr,f);v.tag=tx;var x=i.type.getDerivedStateFromError;if(typeof x=="function"){var C=a.value;v.payload=function(){return fb(i,a),x(C)}}var P=i.stateNode;return P!==null&&typeof P.componentDidCatch=="function"?v.callback=function(){uI(i),typeof x!="function"&&(Aj(this),fb(i,a));var z=a.value,se=a.stack;this.componentDidCatch(z,{componentStack:se!==null?se:""}),typeof x!="function"&&(Gi(i.lanes,Wn)||c("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",dt(i.type)||"Unknown"))}:v.callback=function(){uI(i)},v}function kz(i,a,f){var v=i.pingCache,x;if(v===null?(v=i.pingCache=new Lz,x=new Set,v.set(a,x)):(x=v.get(a),x===void 0&&(x=new Set,v.set(a,x))),!x.has(f)){x.add(f);var C=kj.bind(null,i,a,f);a.then(C,C)}}function Dz(i,a,f,v,x){if(f.flags|=Ou,f.firstEffect=f.lastEffect=null,v!==null&&typeof v=="object"&&typeof v.then=="function"){var C=v;if((f.mode&_a)===Wr){var P=f.alternate;P?(f.updateQueue=P.updateQueue,f.memoizedState=P.memoizedState,f.lanes=P.lanes):(f.updateQueue=null,f.memoizedState=null)}var O=O0(cl.current,Tx),z=a;do{if(z.tag===ue&&HV(z,O)){var se=z.updateQueue;if(se===null){var ce=new Set;ce.add(C),z.updateQueue=ce}else se.add(C);if((z.mode&_a)===Wr){if(z.flags|=Pn,f.flags|=wp,f.flags&=~(Mu|Ou),f.tag===y){var $e=f.alternate;if($e===null)f.tag=Re;else{var Ee=Vc(Nr,Wn);Ee.tag=T0,zc(f,Ee)}}f.lanes=Kn(f.lanes,Wn);return}kz(i,C,x),z.flags|=Ka,z.lanes=x;return}z=z.return}while(z!==null);v=new Error((dt(f.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.
|
|
177
|
+
|
|
178
|
+
Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}pj(),v=cb(v,f);var Ke=a;do{switch(Ke.tag){case T:{var st=v;Ke.flags|=Ka;var Ct=us(x);Ke.lanes=Kn(Ke.lanes,Ct);var en=_D(Ke,st,Ct);vk(Ke,en);return}case y:var Cn=v,dn=Ke.type,qn=Ke.stateNode;if((Ke.flags&Pn)===er&&(typeof dn.getDerivedStateFromError=="function"||qn!==null&&typeof qn.componentDidCatch=="function"&&!Mb(qn))){Ke.flags|=Ka;var Tr=us(x);Ke.lanes=Kn(Ke.lanes,Tr);var Ge=LD(Ke,Cn,Tr);vk(Ke,Ge);return}break}Ke=Ke.return}while(Ke!==null)}var kD=null;kD=new Set;var Iz=typeof WeakSet=="function"?WeakSet:Set,Pz=function(i,a){a.props=i.memoizedProps,a.state=i.memoizedState,a.componentWillUnmount()};function Mz(i,a){if(Wa(null,Pz,null,i,a),$s()){var f=Zs();Kc(i,f)}}function DD(i){var a=i.ref;if(a!==null)if(typeof a=="function"){if(Wa(null,a,null,null),$s()){var f=Zs();Kc(i,f)}}else a.current=null}function Oz(i,a){if(Wa(null,a,null),$s()){var f=Zs();Kc(i,f)}}function Fz(i,a){switch(a.tag){case m:case Y:case ye:case et:return;case y:{if(a.flags&Ol&&i!==null){var f=i.memoizedProps,v=i.memoizedState,x=a.stateNode;a.type===a.elementType&&!dd&&(x.props!==a.memoizedProps&&c("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",dt(a.type)||"instance"),x.state!==a.memoizedState&&c("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",dt(a.type)||"instance"));var C=x.getSnapshotBeforeUpdate(a.elementType===a.type?f:ul(a.type,f),v);{var P=kD;C===void 0&&!P.has(a.type)&&(P.add(a.type),c("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",dt(a.type)))}x.__reactInternalSnapshotBeforeUpdate=C}return}case T:{if(a.flags&Ol){var O=a.stateNode;VE(O.containerInfo)}return}case _:case L:case R:case Re:return}throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}function Nz(i,a){var f=a.updateQueue,v=f!==null?f.lastEffect:null;if(v!==null){var x=v.next,C=x;do{if((C.tag&i)===i){var P=C.destroy;C.destroy=void 0,P!==void 0&&P()}C=C.next}while(C!==x)}}function Uz(i,a){var f=a.updateQueue,v=f!==null?f.lastEffect:null;if(v!==null){var x=v.next,C=x;do{if((C.tag&i)===i){var P=C.create;C.destroy=P();{var O=C.destroy;if(O!==void 0&&typeof O!="function"){var z=void 0;O===null?z=" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof O.then=="function"?z=`
|
|
179
|
+
|
|
180
|
+
It looks like you wrote useEffect(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
|
|
181
|
+
|
|
182
|
+
useEffect(() => {
|
|
183
|
+
async function fetchData() {
|
|
184
|
+
// You can await here
|
|
185
|
+
const response = await MyAPI.getData(someId);
|
|
186
|
+
// ...
|
|
187
|
+
}
|
|
188
|
+
fetchData();
|
|
189
|
+
}, [someId]); // Or [] if effect doesn't need props or state
|
|
190
|
+
|
|
191
|
+
Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching`:z=" You returned: "+O,c("An effect function must not return anything besides a function, which is used for clean-up.%s",z)}}}C=C.next}while(C!==x)}}function Bz(i){var a=i.updateQueue,f=a!==null?a.lastEffect:null;if(f!==null){var v=f.next,x=v;do{var C=x,P=C.next,O=C.tag;(O&Nm)!==Cx&&(O&Dh)!==Cx&&(QD(i,x),wj(i,x)),x=P}while(x!==v)}}function $z(i,a,f,v){switch(f.tag){case m:case Y:case ye:case et:{Uz(Ih|Dh,f),Bz(f);return}case y:{var x=f.stateNode;if(f.flags&Un)if(a===null)f.type===f.elementType&&!dd&&(x.props!==f.memoizedProps&&c("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",dt(f.type)||"instance"),x.state!==f.memoizedState&&c("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",dt(f.type)||"instance")),x.componentDidMount();else{var C=f.elementType===f.type?a.memoizedProps:ul(f.type,a.memoizedProps),P=a.memoizedState;f.type===f.elementType&&!dd&&(x.props!==f.memoizedProps&&c("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",dt(f.type)||"instance"),x.state!==f.memoizedState&&c("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",dt(f.type)||"instance")),x.componentDidUpdate(C,P,x.__reactInternalSnapshotBeforeUpdate)}var O=f.updateQueue;O!==null&&(f.type===f.elementType&&!dd&&(x.props!==f.memoizedProps&&c("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",dt(f.type)||"instance"),x.state!==f.memoizedState&&c("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",dt(f.type)||"instance")),Sk(f,O,x));return}case T:{var z=f.updateQueue;if(z!==null){var se=null;if(f.child!==null)switch(f.child.tag){case _:se=f.child.stateNode;break;case y:se=f.child.stateNode;break}Sk(f,z,se)}return}case _:{var ce=f.stateNode;if(a===null&&f.flags&Un){var $e=f.type,Ee=f.memoizedProps;D5(ce,$e,Ee)}return}case L:return;case R:return;case X:{{var Ke=f.memoizedProps;Ke.onCommit;var st=Ke.onRender;f.stateNode.effectDuration;var Ct=iz();typeof st=="function"&&st(f.memoizedProps.id,a===null?"mount":"update",f.actualDuration,f.treeBaseDuration,f.actualStartTime,Ct,i.memoizedInteractions)}return}case ue:{qz(i,f);return}case Ve:case Re:case ze:case Qe:case Pe:case ne:return}throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}function ID(i,a){for(var f=i;;){if(f.tag===_){var v=f.stateNode;a?$5(v):z5(f.stateNode,f.memoizedProps)}else if(f.tag===L){var x=f.stateNode;a?V5(x):j5(x,f.memoizedProps)}else if(!((f.tag===Pe||f.tag===ne)&&f.memoizedState!==null&&f!==i)){if(f.child!==null){f.child.return=f,f=f.child;continue}}if(f===i)return;for(;f.sibling===null;){if(f.return===null||f.return===i)return;f=f.return}f.sibling.return=f.return,f=f.sibling}}function Vz(i){var a=i.ref;if(a!==null){var f=i.stateNode,v;switch(i.tag){case _:v=f;break;default:v=f}typeof a=="function"?a(v):(a.hasOwnProperty("current")||c("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",dt(i.type)),a.current=v)}}function zz(i){var a=i.ref;a!==null&&(typeof a=="function"?a(null):a.current=null)}function PD(i,a,f){switch(SV(a),a.tag){case m:case Y:case ie:case ye:case et:{var v=a.updateQueue;if(v!==null){var x=v.lastEffect;if(x!==null){var C=x.next,P=C;do{var O=P,z=O.destroy,se=O.tag;z!==void 0&&((se&Nm)!==Cx?QD(a,P):Oz(a,z)),P=P.next}while(P!==C)}}return}case y:{DD(a);var ce=a.stateNode;typeof ce.componentWillUnmount=="function"&&Mz(a,ce);return}case _:{DD(a);return}case R:{ND(i,a);return}case ze:return;case Ce:return;case Qe:return}}function jz(i,a,f){for(var v=a;;){if(PD(i,v),v.child!==null&&v.tag!==R){v.child.return=v,v=v.child;continue}if(v===a)return;for(;v.sibling===null;){if(v.return===null||v.return===a)return;v=v.return}v.sibling.return=v.return,v=v.sibling}}function MD(i){i.alternate=null,i.child=null,i.dependencies=null,i.firstEffect=null,i.lastEffect=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.return=null,i.updateQueue=null,i._debugOwner=null}function Hz(i){for(var a=i.return;a!==null;){if(OD(a))return a;a=a.return}throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.")}function OD(i){return i.tag===_||i.tag===T||i.tag===R}function Gz(i){var a=i;e:for(;;){for(;a.sibling===null;){if(a.return===null||OD(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==_&&a.tag!==L&&a.tag!==Ce;){if(a.flags&En||a.child===null||a.tag===R)continue e;a.child.return=a,a=a.child}if(!(a.flags&En))return a.stateNode}}function FD(i){var a=Hz(i),f,v,x=a.stateNode;switch(a.tag){case _:f=x,v=!1;break;case T:f=x.containerInfo,v=!0;break;case R:f=x.containerInfo,v=!0;break;case ze:default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}a.flags&vo&&(PL(f),a.flags&=~vo);var C=Gz(i);v?db(i,C,f):hb(i,C,f)}function db(i,a,f){var v=i.tag,x=v===_||v===L;if(x||Ue){var C=x?i.stateNode:i.stateNode.instance;a?N5(f,C,a):O5(f,C)}else if(v!==R){var P=i.child;if(P!==null){db(P,a,f);for(var O=P.sibling;O!==null;)db(O,a,f),O=O.sibling}}}function hb(i,a,f){var v=i.tag,x=v===_||v===L;if(x||Ue){var C=x?i.stateNode:i.stateNode.instance;a?F5(f,C,a):M5(f,C)}else if(v!==R){var P=i.child;if(P!==null){hb(P,a,f);for(var O=P.sibling;O!==null;)hb(O,a,f),O=O.sibling}}}function ND(i,a,f){for(var v=a,x=!1,C,P;;){if(!x){var O=v.return;e:for(;;){if(O===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");var z=O.stateNode;switch(O.tag){case _:C=z,P=!1;break e;case T:C=z.containerInfo,P=!0;break e;case R:C=z.containerInfo,P=!0;break e}O=O.return}x=!0}if(v.tag===_||v.tag===L)jz(i,v),P?B5(C,v.stateNode):U5(C,v.stateNode);else if(v.tag===R){if(v.child!==null){C=v.stateNode.containerInfo,P=!0,v.child.return=v,v=v.child;continue}}else if(PD(i,v),v.child!==null){v.child.return=v,v=v.child;continue}if(v===a)return;for(;v.sibling===null;){if(v.return===null||v.return===a)return;v=v.return,v.tag===R&&(x=!1)}v.sibling.return=v.return,v=v.sibling}}function Wz(i,a,f){ND(i,a);var v=a.alternate;MD(a),v!==null&&MD(v)}function pb(i,a){switch(a.tag){case m:case Y:case ie:case ye:case et:{Nz(Ih|Dh,a);return}case y:return;case _:{var f=a.stateNode;if(f!=null){var v=a.memoizedProps,x=i!==null?i.memoizedProps:v,C=a.type,P=a.updateQueue;a.updateQueue=null,P!==null&&I5(f,P,C,x,v)}return}case L:{if(a.stateNode===null)throw Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");var O=a.stateNode,z=a.memoizedProps,se=i!==null?i.memoizedProps:z;P5(O,se,z);return}case T:{{var ce=a.stateNode;ce.hydrate&&(ce.hydrate=!1,Q5(ce.containerInfo))}return}case X:return;case ue:{Kz(a),UD(a);return}case Ve:{UD(a);return}case Re:return;case ze:break;case Qe:break;case Pe:case ne:{var $e=a.memoizedState,Ee=$e!==null;ID(a,Ee);return}}throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}function Kz(i){var a=i.memoizedState;if(a!==null){fj();{var f=i.child;ID(f,!0)}}}function qz(i,a){var f=a.memoizedState;if(f===null){var v=a.alternate;if(v!==null){var x=v.memoizedState;if(x!==null){var C=x.dehydrated;C!==null&&J5(C)}}}}function UD(i){var a=i.updateQueue;if(a!==null){i.updateQueue=null;var f=i.stateNode;f===null&&(f=i.stateNode=new Iz),a.forEach(function(v){var x=Ij.bind(null,i,v);f.has(v)||(v.__reactDoNotTraceInteractions!==!0&&(x=s.unstable_wrap(x)),f.add(v),v.then(x,x))})}}function Yz(i,a){if(i!==null){var f=i.memoizedState;if(f===null||f.dehydrated!==null){var v=a.memoizedState;return v!==null&&v.dehydrated===null}}return!1}function Xz(i){PL(i.stateNode)}if(typeof Symbol=="function"&&Symbol.for){var qm=Symbol.for;qm("selector.component"),qm("selector.has_pseudo_class"),qm("selector.role"),qm("selector.test_id"),qm("selector.text")}var Qz=[];function Jz(){Qz.forEach(function(i){return i()})}var Zz=Math.ceil,mb=o.ReactCurrentDispatcher,gb=o.ReactCurrentOwner,vb=o.IsSomeRendererActing,yi=0,ry=1,ej=2,yb=4,Sb=8,to=16,lu=32,BD=64,sc=0,iy=1,sy=2,ay=3,oy=4,Eb=5,fn=yi,ia=null,Si=null,sa=rt,uu=rt,xb=Bc(rt),ws=sc,ly=null,hd=rt,uy=rt,pd=rt,cy=rt,bb=null,Tb=0,$D=500,VD=1/0,tj=500;function Nh(){VD=js()+tj}function zD(){return VD}var Vt=null,fy=!1,wb=null,Uh=null,ac=!1,Bh=null,Ym=XE,Cb=rt,Rb=[],Ab=[],oc=null,nj=50,Xm=0,_b=null,rj=50,dy=0,md=null,Qm=Nr,lc=rt,hy=rt,Lb=!1,Jm=null,py=!1;function ij(){return ia}function no(){return(fn&(to|lu))!==yi?js():(Qm!==Nr||(Qm=js()),Qm)}function Wc(i){var a=i.mode;if((a&_a)===Wr)return Wn;if((a&id)===Wr)return Rh()===Lo?Wn:rl;lc===rt&&(lc=hd);var f=LV()!==_V;if(f)return hy!==rt&&(hy=bb!==null?bb.pendingLanes:rt),Gp(lc,hy);var v=Rh(),x;if((fn&yb)!==yi&&v===nd)x=Uf(tl,lc);else{var C=ih(v);x=Uf(C,lc)}return x}function sj(i){var a=i.mode;return(a&_a)===Wr?Wn:(a&id)===Wr?Rh()===Lo?Wn:rl:(lc===rt&&(lc=hd),kv(lc))}function Gs(i,a,f){Mj(),Uj(i);var v=my(i,a);if(v===null)return Fj(i),null;Vf(v,a,f),v===ia&&(pd=Kn(pd,a),ws===oy&&$h(v,sa));var x=Rh();a===Wn?(fn&Sb)!==yi&&(fn&(to|lu))===yi?(qc(v,a),kb(v)):(Po(v,f),qc(v,a),fn===yi&&(Nh(),su())):((fn&yb)!==yi&&(x===nd||x===Lo)&&(oc===null?oc=new Set([v]):oc.add(v)),Po(v,f),qc(v,a)),bb=v}function my(i,a){i.lanes=Kn(i.lanes,a);var f=i.alternate;f!==null&&(f.lanes=Kn(f.lanes,a)),f===null&&(i.flags&(En|yo))!==er&&ZD(i);for(var v=i,x=i.return;x!==null;)x.childLanes=Kn(x.childLanes,a),f=x.alternate,f!==null?f.childLanes=Kn(f.childLanes,a):(x.flags&(En|yo))!==er&&ZD(i),v=x,x=x.return;if(v.tag===T){var C=v.stateNode;return C}else return null}function Po(i,a){var f=i.callbackNode;Ja(i,a);var v=Nf(i,i===ia?sa:rt),x=Lv();if(v===rt){f!==null&&(ak(f),i.callbackNode=null,i.callbackPriority=nl);return}if(f!==null){var C=i.callbackPriority;if(C===x)return;ak(f)}var P;if(x===Vu)P=CV(kb.bind(null,i));else if(x===zu)P=$c(Lo,kb.bind(null,i));else{var O=cE(x);P=$c(O,jD.bind(null,i))}i.callbackPriority=x,i.callbackNode=P}function jD(i){if(Qm=Nr,lc=rt,hy=rt,(fn&(to|lu))!==yi)throw Error("Should not already be working.");var a=i.callbackNode,f=cu();if(f&&i.callbackNode!==a)return null;var v=Nf(i,i===ia?sa:rt);if(v===rt)return null;var x=vj(i,v);if(Gi(hd,pd))Vh(i,rt);else if(x!==sc){if(x===sy&&(fn|=BD,i.hydrate&&(i.hydrate=!1,VE(i.containerInfo)),v=bs(i),v!==rt&&(x=Zm(i,v))),x===iy){var C=ly;throw Vh(i,rt),$h(i,v),Po(i,js()),C}var P=i.current.alternate;i.finishedWork=P,i.finishedLanes=v,aj(i,x,v)}return Po(i,js()),i.callbackNode===a?jD.bind(null,i):null}function aj(i,a,f){switch(a){case sc:case iy:throw Error("Root did not complete. This is a bug in React.");case sy:{gd(i);break}case ay:{if($h(i,f),jp(f)&&!zj()){var v=Tb+$D-js();if(v>10){var x=Nf(i,rt);if(x!==rt)break;var C=i.suspendedLanes;if(!Kl(C,f)){no(),Oc(i,C);break}i.timeoutHandle=IL(gd.bind(null,i),v);break}}gd(i);break}case oy:{if($h(i,f),Hp(f))break;{var P=fE(i,f),O=P,z=js()-O,se=Pj(z)-z;if(se>10){i.timeoutHandle=IL(gd.bind(null,i),se);break}}gd(i);break}case Eb:{gd(i);break}default:throw Error("Unknown root exit status.")}}function $h(i,a){a=Bf(a,cy),a=Bf(a,pd),Mv(i,a)}function kb(i){if((fn&(to|lu))!==yi)throw Error("Should not already be working.");cu();var a,f;if(i===ia&&Gi(i.expiredLanes,sa)?(a=sa,f=Zm(i,a),Gi(hd,pd)&&(a=Nf(i,a),f=Zm(i,a))):(a=Nf(i,rt),f=Zm(i,a)),i.tag!==KE&&f===sy&&(fn|=BD,i.hydrate&&(i.hydrate=!1,VE(i.containerInfo)),a=bs(i),a!==rt&&(f=Zm(i,a))),f===iy){var v=ly;throw Vh(i,rt),$h(i,a),Po(i,js()),v}var x=i.current.alternate;return i.finishedWork=x,i.finishedLanes=a,gd(i),Po(i,js()),null}function oj(){if((fn&(ry|to|lu))!==yi){(fn&to)!==yi&&c("unstable_flushDiscreteUpdates: Cannot flush updates when React is already rendering.");return}lj(),cu()}function lj(){if(oc!==null){var i=oc;oc=null,i.forEach(function(a){hE(a),Po(a,js())})}su()}function HD(i,a){var f=fn;fn|=ry;try{return i(a)}finally{fn=f,fn===yi&&(Nh(),su())}}function uj(i,a){var f=fn;fn|=ej;try{return i(a)}finally{fn=f,fn===yi&&(Nh(),su())}}function cj(i,a,f,v,x){var C=fn;fn|=yb;try{return rd(nd,i.bind(null,a,f,v,x))}finally{fn=C,fn===yi&&(Nh(),su())}}function GD(i,a){var f=fn;fn&=~ry,fn|=Sb;try{return i(a)}finally{fn=f,fn===yi&&(Nh(),su())}}function Db(i,a){var f=fn;if((f&(to|lu))!==yi)return c("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."),i(a);fn|=ry;try{return i?rd(Lo,i.bind(null,a)):void 0}finally{fn=f,su()}}function gy(i,a){zs(xb,uu,i),uu=Kn(uu,a),hd=Kn(hd,a)}function Ib(i){uu=xb.current,Vs(xb,i)}function Vh(i,a){i.finishedWork=null,i.finishedLanes=rt;var f=i.timeoutHandle;if(f!==$E&&(i.timeoutHandle=$E,k5(f)),Si!==null)for(var v=Si.return;v!==null;)AD(v),v=v.return;ia=i,Si=vd(i.current,null),sa=uu=hd=a,ws=sc,ly=null,uy=rt,pd=rt,cy=rt,md=null,ll.discardPendingWarnings()}function WD(i,a){do{var f=Si;try{if(b0(),Bk(),Zr(),gb.current=null,f===null||f.return===null){ws=iy,ly=a,Si=null;return}_e&&f.mode&eo&&Z0(f,!0),Dz(i,f.return,f,a,sa),XD(f)}catch(v){a=v,Si===f&&f!==null?(f=f.return,Si=f):f=Si;continue}return}while(!0)}function KD(){var i=mb.current;return mb.current=X0,i===null?X0:i}function qD(i){mb.current=i}function vy(i){{var a=s.__interactionsRef.current;return s.__interactionsRef.current=i.memoizedInteractions,a}}function yy(i){s.__interactionsRef.current=i}function fj(){Tb=js()}function Pb(i){uy=Kn(i,uy)}function dj(){ws===sc&&(ws=ay)}function hj(){(ws===sc||ws===ay)&&(ws=oy),ia!==null&&(zp(uy)||zp(pd))&&$h(ia,sa)}function pj(){ws!==Eb&&(ws=sy)}function mj(){return ws===sc}function Zm(i,a){var f=fn;fn|=to;var v=KD();(ia!==i||sa!==a)&&(Vh(i,a),sI(i,a));var x=vy(i);do try{gj();break}catch(C){WD(i,C)}while(!0);if(b0(),yy(x),fn=f,qD(v),Si!==null)throw Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");return ia=null,sa=rt,ws}function gj(){for(;Si!==null;)YD(Si)}function vj(i,a){var f=fn;fn|=to;var v=KD();(ia!==i||sa!==a)&&(Nh(),Vh(i,a),sI(i,a));var x=vy(i);do try{yj();break}catch(C){WD(i,C)}while(!0);return b0(),yy(x),qD(v),fn=f,Si!==null?sc:(ia=null,sa=rt,ws)}function yj(){for(;Si!==null&&!TV();)YD(Si)}function YD(i){var a=i.alternate;ir(i);var f;(i.mode&eo)!==Wr?(Xx(i),f=Ob(a,i,uu),Z0(i,!0)):f=Ob(a,i,uu),Zr(),i.memoizedProps=i.pendingProps,f===null?XD(i):Si=f,gb.current=null}function XD(i){var a=i;do{var f=a.alternate,v=a.return;if((a.flags&Ou)===er){ir(a);var x=void 0;if((a.mode&eo)===Wr?x=RD(f,a,uu):(Xx(a),x=RD(f,a,uu),Z0(a,!1)),Zr(),x!==null){Si=x;return}if(Sj(a),v!==null&&(v.flags&Ou)===er){v.firstEffect===null&&(v.firstEffect=a.firstEffect),a.lastEffect!==null&&(v.lastEffect!==null&&(v.lastEffect.nextEffect=a.firstEffect),v.lastEffect=a.lastEffect);var C=a.flags;C>Gn&&(v.lastEffect!==null?v.lastEffect.nextEffect=a:v.firstEffect=a,v.lastEffect=a)}}else{var P=Az(a);if(P!==null){P.flags&=oE,Si=P;return}if((a.mode&eo)!==Wr){Z0(a,!1);for(var O=a.actualDuration,z=a.child;z!==null;)O+=z.actualDuration,z=z.sibling;a.actualDuration=O}v!==null&&(v.firstEffect=v.lastEffect=null,v.flags|=Ou)}var se=a.sibling;if(se!==null){Si=se;return}a=v,Si=a}while(a!==null);ws===sc&&(ws=Eb)}function Sj(i){if(!((i.tag===ne||i.tag===Pe)&&i.memoizedState!==null&&!Gi(uu,wa)&&(i.mode&id)!==rt)){var a=rt;if((i.mode&eo)!==Wr){for(var f=i.actualDuration,v=i.selfBaseDuration,x=i.alternate===null||i.child!==i.alternate.child,C=i.child;C!==null;)a=Kn(a,Kn(C.lanes,C.childLanes)),x&&(f+=C.actualDuration),v+=C.treeBaseDuration,C=C.sibling;var P=i.tag===ue&&i.memoizedState!==null;if(P){var O=i.child;O!==null&&(v-=O.treeBaseDuration)}i.actualDuration=f,i.treeBaseDuration=v}else for(var z=i.child;z!==null;)a=Kn(a,Kn(z.lanes,z.childLanes)),z=z.sibling;i.childLanes=a}}function gd(i){var a=Rh();return rd(Lo,Ej.bind(null,i,a)),null}function Ej(i,a){do cu();while(Bh!==null);if(Oj(),(fn&(to|lu))!==yi)throw Error("Should not already be working.");var f=i.finishedWork,v=i.finishedLanes;if(f===null)return null;if(i.finishedWork=null,i.finishedLanes=rt,f===i.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");i.callbackNode=null;var x=Kn(f.lanes,f.childLanes);Kp(i,x),oc!==null&&!pE(x)&&oc.has(i)&&oc.delete(i),i===ia&&(ia=null,Si=null,sa=rt);var C;if(f.flags>Gn?f.lastEffect!==null?(f.lastEffect.nextEffect=f,C=f.firstEffect):C=f:C=f.firstEffect,C!==null){var P=fn;fn|=lu;var O=vy(i);gb.current=null,Jm=T5(i.containerInfo),py=!1,Vt=C;do if(Wa(null,xj,null),$s()){if(Vt===null)throw Error("Should be working on an effect.");var z=Zs();Kc(Vt,z),Vt=Vt.nextEffect}while(Vt!==null);Jm=null,tD(),Vt=C;do if(Wa(null,bj,null,i,a),$s()){if(Vt===null)throw Error("Should be working on an effect.");var se=Zs();Kc(Vt,se),Vt=Vt.nextEffect}while(Vt!==null);w5(i.containerInfo),i.current=f,Vt=C;do if(Wa(null,Tj,null,i,v),$s()){if(Vt===null)throw Error("Should be working on an effect.");var ce=Zs();Kc(Vt,ce),Vt=Vt.nextEffect}while(Vt!==null);Vt=null,wV(),yy(O),fn=P}else i.current=f,tD();var $e=ac;if(ac)ac=!1,Bh=i,Cb=v,Ym=a;else for(Vt=C;Vt!==null;){var Ee=Vt.nextEffect;Vt.nextEffect=null,Vt.flags&jr&&oI(Vt),Vt=Ee}if(x=i.pendingLanes,x!==rt){if(md!==null){var Ke=md;md=null;for(var st=0;st<Ke.length;st++)iI(i,Ke[st],i.memoizedInteractions)}qc(i,x)}else Uh=null;if($e||aI(i,v),x===Wn?i===_b?Xm++:(Xm=0,_b=i):Xm=0,yV(f.stateNode,a),Jz(),Po(i,js()),fy){fy=!1;var Ct=wb;throw wb=null,Ct}return(fn&Sb)!==yi||su(),null}function xj(){for(;Vt!==null;){var i=Vt.alternate;!py&&Jm!==null&&((Vt.flags&jr)!==er?So(Vt,Jm)&&(py=!0):Vt.tag===ue&&Yz(i,Vt)&&So(Vt,Jm)&&(py=!0));var a=Vt.flags;(a&Ol)!==er&&(ir(Vt),Fz(i,Vt),Zr()),(a&Ac)!==er&&(ac||(ac=!0,$c(nc,function(){return cu(),null}))),Vt=Vt.nextEffect}}function bj(i,a){for(;Vt!==null;){ir(Vt);var f=Vt.flags;if(f&vo&&Xz(Vt),f&Pu){var v=Vt.alternate;v!==null&&zz(v)}var x=f&(En|Un|jr|yo);switch(x){case En:{FD(Vt),Vt.flags&=~En;break}case os:{FD(Vt),Vt.flags&=~En;var C=Vt.alternate;pb(C,Vt);break}case yo:{Vt.flags&=~yo;break}case Tp:{Vt.flags&=~yo;var P=Vt.alternate;pb(P,Vt);break}case Un:{var O=Vt.alternate;pb(O,Vt);break}case jr:{Wz(i,Vt);break}}Zr(),Vt=Vt.nextEffect}}function Tj(i,a){for(;Vt!==null;){ir(Vt);var f=Vt.flags;if(f&(Un|Iu)){var v=Vt.alternate;$z(i,v,Vt)}f&Pu&&Vz(Vt),Zr(),Vt=Vt.nextEffect}}function cu(){if(Ym!==XE){var i=Ym>nc?nc:Ym;return Ym=XE,rd(i,Rj)}return!1}function wj(i,a){Rb.push(a,i),ac||(ac=!0,$c(nc,function(){return cu(),null}))}function QD(i,a){Ab.push(a,i);{i.flags|=Fl;var f=i.alternate;f!==null&&(f.flags|=Fl)}ac||(ac=!0,$c(nc,function(){return cu(),null}))}function Cj(i){var a=i.create;i.destroy=a()}function Rj(){if(Bh===null)return!1;var i=Bh,a=Cb;if(Bh=null,Cb=rt,(fn&(to|lu))!==yi)throw Error("Cannot flush passive effects while already rendering.");Lb=!0;var f=fn;fn|=lu;var v=vy(i),x=Ab;Ab=[];for(var C=0;C<x.length;C+=2){var P=x[C],O=x[C+1],z=P.destroy;P.destroy=void 0;{O.flags&=~Fl;var se=O.alternate;se!==null&&(se.flags&=~Fl)}if(typeof z=="function"){if(ir(O),Wa(null,z,null),$s()){if(O===null)throw Error("Should be working on an effect.");var ce=Zs();Kc(O,ce)}Zr()}}var $e=Rb;Rb=[];for(var Ee=0;Ee<$e.length;Ee+=2){var Ke=$e[Ee],st=$e[Ee+1];{if(ir(st),Wa(null,Cj,null,Ke),$s()){if(st===null)throw Error("Should be working on an effect.");var Ct=Zs();Kc(st,Ct)}Zr()}}for(var en=i.current.firstEffect;en!==null;){var Cn=en.nextEffect;en.nextEffect=null,en.flags&jr&&oI(en),en=Cn}return yy(v),aI(i,a),Lb=!1,fn=f,su(),dy=Bh===null?0:dy+1,!0}function Mb(i){return Uh!==null&&Uh.has(i)}function Aj(i){Uh===null?Uh=new Set([i]):Uh.add(i)}function _j(i){fy||(fy=!0,wb=i)}var Lj=_j;function JD(i,a,f){var v=cb(f,a),x=_D(i,v,Wn);zc(i,x);var C=no(),P=my(i,Wn);P!==null&&(Vf(P,Wn,C),Po(P,C),qc(P,Wn))}function Kc(i,a){if(i.tag===T){JD(i,i,a);return}for(var f=i.return;f!==null;){if(f.tag===T){JD(f,i,a);return}else if(f.tag===y){var v=f.type,x=f.stateNode;if(typeof v.getDerivedStateFromError=="function"||typeof x.componentDidCatch=="function"&&!Mb(x)){var C=cb(a,i),P=LD(f,C,Wn);zc(f,P);var O=no(),z=my(f,Wn);if(z!==null)Vf(z,Wn,O),Po(z,O),qc(z,Wn);else if(typeof x.componentDidCatch=="function"&&!Mb(x))try{x.componentDidCatch(a,C)}catch{}return}}f=f.return}}function kj(i,a,f){var v=i.pingCache;v!==null&&v.delete(a);var x=no();Oc(i,f),ia===i&&Kl(sa,f)&&(ws===oy||ws===ay&&jp(sa)&&js()-Tb<$D?Vh(i,rt):cy=Kn(cy,f)),Po(i,x),qc(i,f)}function Dj(i,a){a===Fr&&(a=sj(i));var f=no(),v=my(i,a);v!==null&&(Vf(v,a,f),Po(v,f),qc(v,a))}function Ij(i,a){var f=Fr,v;v=i.stateNode,v!==null&&v.delete(a),Dj(i,f)}function Pj(i){return i<120?120:i<480?480:i<1080?1080:i<1920?1920:i<3e3?3e3:i<4320?4320:Zz(i/1960)*1960}function Mj(){if(Xm>nj)throw Xm=0,_b=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");dy>rj&&(dy=0,c("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render."))}function Oj(){ll.flushLegacyContextWarning(),ll.flushPendingUnsafeLifecycleWarnings()}var Sy=null;function ZD(i){{if((fn&to)!==yi||!(i.mode&(_a|id)))return;var a=i.tag;if(a!==E&&a!==T&&a!==y&&a!==m&&a!==Y&&a!==ie&&a!==ye&&a!==et)return;var f=dt(i.type)||"ReactComponent";if(Sy!==null){if(Sy.has(f))return;Sy.add(f)}else Sy=new Set([f]);var v=Or;try{ir(i),c("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.")}finally{v?ir(i):Zr()}}}var Ey=null;function Fj(i){{var a=i.tag;if(a!==T&&a!==y&&a!==m&&a!==Y&&a!==ie&&a!==ye&&a!==et||(i.flags&Fl)!==er)return;var f=dt(i.type)||"ReactComponent";if(Ey!==null){if(Ey.has(f))return;Ey.add(f)}else Ey=new Set([f]);if(!Lb){var v=Or;try{ir(i),c("Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in %s.",a===y?"the componentWillUnmount method":"a useEffect cleanup function")}finally{v?ir(i):Zr()}}}}var Ob;{var Nj=null;Ob=function(i,a,f){var v=fI(Nj,a);try{return xD(i,a,f)}catch(C){if(C!==null&&typeof C=="object"&&typeof C.then=="function")throw C;if(b0(),Bk(),AD(a),fI(a,v),a.mode&eo&&Xx(a),Wa(null,xD,null,i,a,f),$s()){var x=Zs();throw x}else throw C}}}var eI=!1,Fb;Fb=new Set;function Uj(i){if(ma&&(fn&to)!==yi&&!rz())switch(i.tag){case m:case Y:case ye:{var a=Si&&dt(Si.type)||"Unknown",f=a;if(!Fb.has(f)){Fb.add(f);var v=dt(i.type)||"Unknown";c("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render",v,a,a)}break}case y:{eI||(c("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),eI=!0);break}}}var xy={current:!1};function tI(i){if(vb.current===!0&&xy.current!==!0){var a=Or;try{ir(i),c(`It looks like you're using the wrong act() around your test interactions.
|
|
192
|
+
Be sure to use the matching version of act() corresponding to your renderer:
|
|
193
|
+
|
|
194
|
+
// for react-dom:
|
|
195
|
+
import {act} from 'react-dom/test-utils';
|
|
196
|
+
// ...
|
|
197
|
+
act(() => ...);
|
|
198
|
+
|
|
199
|
+
// for react-test-renderer:
|
|
200
|
+
import TestRenderer from react-test-renderer';
|
|
201
|
+
const {act} = TestRenderer;
|
|
202
|
+
// ...
|
|
203
|
+
act(() => ...);`)}finally{a?ir(i):Zr()}}}function nI(i){(i.mode&vi)!==Wr&&vb.current===!1&&xy.current===!1&&c(`An update to %s ran an effect, but was not wrapped in act(...).
|
|
204
|
+
|
|
205
|
+
When testing, code that causes React state updates should be wrapped into act(...):
|
|
206
|
+
|
|
207
|
+
act(() => {
|
|
208
|
+
/* fire events that update state */
|
|
209
|
+
});
|
|
210
|
+
/* assert on the output */
|
|
211
|
+
|
|
212
|
+
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act`,dt(i.type))}function Bj(i){if(fn===yi&&vb.current===!1&&xy.current===!1){var a=Or;try{ir(i),c(`An update to %s inside a test was not wrapped in act(...).
|
|
213
|
+
|
|
214
|
+
When testing, code that causes React state updates should be wrapped into act(...):
|
|
215
|
+
|
|
216
|
+
act(() => {
|
|
217
|
+
/* fire events that update state */
|
|
218
|
+
});
|
|
219
|
+
/* assert on the output */
|
|
220
|
+
|
|
221
|
+
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act`,dt(i.type))}finally{a?ir(i):Zr()}}}var $j=Bj,rI=!1;function Vj(i){rI===!1&&n.unstable_flushAllWithoutAsserting===void 0&&(i.mode&_a||i.mode&id)&&(rI=!0,c(`In Concurrent or Sync modes, the "scheduler" module needs to be mocked to guarantee consistent behaviour across tests and browsers. For example, with jest:
|
|
222
|
+
jest.mock('scheduler', () => require('scheduler/unstable_mock'));
|
|
223
|
+
|
|
224
|
+
For more info, visit https://reactjs.org/link/mock-scheduler`))}function Nb(i,a){return a*1e3+i.interactionThreadID}function by(i){md===null?md=[i]:md.push(i)}function iI(i,a,f){if(f.size>0){var v=i.pendingInteractionMap,x=v.get(a);x!=null?f.forEach(function(O){x.has(O)||O.__count++,x.add(O)}):(v.set(a,new Set(f)),f.forEach(function(O){O.__count++}));var C=s.__subscriberRef.current;if(C!==null){var P=Nb(i,a);C.onWorkScheduled(f,P)}}}function qc(i,a){iI(i,a,s.__interactionsRef.current)}function sI(i,a){var f=new Set;if(i.pendingInteractionMap.forEach(function(C,P){Gi(a,P)&&C.forEach(function(O){return f.add(O)})}),i.memoizedInteractions=f,f.size>0){var v=s.__subscriberRef.current;if(v!==null){var x=Nb(i,a);try{v.onWorkStarted(f,x)}catch(C){$c(Lo,function(){throw C})}}}}function aI(i,a){var f=i.pendingLanes,v;try{if(v=s.__subscriberRef.current,v!==null&&i.memoizedInteractions.size>0){var x=Nb(i,a);v.onWorkStopped(i.memoizedInteractions,x)}}catch(P){$c(Lo,function(){throw P})}finally{var C=i.pendingInteractionMap;C.forEach(function(P,O){Gi(f,O)||(C.delete(O),P.forEach(function(z){if(z.__count--,v!==null&&z.__count===0)try{v.onInteractionScheduledWorkCompleted(z)}catch(se){$c(Lo,function(){throw se})}}))})}}function zj(){return jj>0}var jj=0;function oI(i){i.sibling=null,i.stateNode=null}var Mo=null,zh=null,Hj=function(i){Mo=i};function jh(i){{if(Mo===null)return i;var a=Mo(i);return a===void 0?i:a.current}}function Ub(i){return jh(i)}function Bb(i){{if(Mo===null)return i;var a=Mo(i);if(a===void 0){if(i!=null&&typeof i.render=="function"){var f=jh(i.render);if(i.render!==f){var v={$$typeof:vt,render:f};return i.displayName!==void 0&&(v.displayName=i.displayName),v}}return i}return a.current}}function lI(i,a){{if(Mo===null)return!1;var f=i.elementType,v=a.type,x=!1,C=typeof v=="object"&&v!==null?v.$$typeof:null;switch(i.tag){case y:{typeof v=="function"&&(x=!0);break}case m:{(typeof v=="function"||C===Rn)&&(x=!0);break}case Y:{(C===vt||C===Rn)&&(x=!0);break}case ie:case ye:{(C===Qr||C===Rn)&&(x=!0);break}default:return!1}if(x){var P=Mo(f);if(P!==void 0&&P===Mo(v))return!0}return!1}}function uI(i){{if(Mo===null||typeof WeakSet!="function")return;zh===null&&(zh=new WeakSet),zh.add(i)}}var Gj=function(i,a){{if(Mo===null)return;var f=a.staleFamilies,v=a.updatedFamilies;cu(),Db(function(){$b(i.current,v,f)})}},Wj=function(i,a){{if(i.context!==Za)return;cu(),Db(function(){eg(a,i,null,null)})}};function $b(i,a,f){{var v=i.alternate,x=i.child,C=i.sibling,P=i.tag,O=i.type,z=null;switch(P){case m:case ye:case y:z=O;break;case Y:z=O.render;break}if(Mo===null)throw new Error("Expected resolveFamily to be set during hot reload.");var se=!1,ce=!1;if(z!==null){var $e=Mo(z);$e!==void 0&&(f.has($e)?ce=!0:a.has($e)&&(P===y?ce=!0:se=!0))}zh!==null&&(zh.has(i)||v!==null&&zh.has(v))&&(ce=!0),ce&&(i._debugNeedsRemount=!0),(ce||se)&&Gs(i,Wn,Nr),x!==null&&!ce&&$b(x,a,f),C!==null&&$b(C,a,f)}}var Kj=function(i,a){{var f=new Set,v=new Set(a.map(function(x){return x.current}));return Vb(i.current,v,f),f}};function Vb(i,a,f){{var v=i.child,x=i.sibling,C=i.tag,P=i.type,O=null;switch(C){case m:case ye:case y:O=P;break;case Y:O=P.render;break}var z=!1;O!==null&&a.has(O)&&(z=!0),z?qj(i,f):v!==null&&Vb(v,a,f),x!==null&&Vb(x,a,f)}}function qj(i,a){{var f=Yj(i,a);if(f)return;for(var v=i;;){switch(v.tag){case _:a.add(v.stateNode);return;case R:a.add(v.stateNode.containerInfo);return;case T:a.add(v.stateNode.containerInfo);return}if(v.return===null)throw new Error("Expected to reach root first.");v=v.return}}}function Yj(i,a){for(var f=i,v=!1;;){if(f.tag===_)v=!0,a.add(f.stateNode);else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===i)return v;for(;f.sibling===null;){if(f.return===null||f.return===i)return v;f=f.return}f.sibling.return=f.return,f=f.sibling}return!1}var zb;{zb=!1;try{var cI=Object.preventExtensions({})}catch{zb=!0}}var Xj=1;function Qj(i,a,f,v){this.tag=i,this.key=f,this.elementType=null,this.type=null,this.stateNode=null,this.return=null,this.child=null,this.sibling=null,this.index=0,this.ref=null,this.pendingProps=a,this.memoizedProps=null,this.updateQueue=null,this.memoizedState=null,this.dependencies=null,this.mode=v,this.flags=er,this.nextEffect=null,this.firstEffect=null,this.lastEffect=null,this.lanes=rt,this.childLanes=rt,this.alternate=null,this.actualDuration=Number.NaN,this.actualStartTime=Number.NaN,this.selfBaseDuration=Number.NaN,this.treeBaseDuration=Number.NaN,this.actualDuration=0,this.actualStartTime=-1,this.selfBaseDuration=0,this.treeBaseDuration=0,this._debugID=Xj++,this._debugSource=null,this._debugOwner=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,!zb&&typeof Object.preventExtensions=="function"&&Object.preventExtensions(this)}var ro=function(i,a,f,v){return new Qj(i,a,f,v)};function jb(i){var a=i.prototype;return!!(a&&a.isReactComponent)}function Jj(i){return typeof i=="function"&&!jb(i)&&i.defaultProps===void 0}function Zj(i){if(typeof i=="function")return jb(i)?y:m;if(i!=null){var a=i.$$typeof;if(a===vt)return Y;if(a===Qr)return ie}return E}function vd(i,a){var f=i.alternate;f===null?(f=ro(i.tag,a,i.key,i.mode),f.elementType=i.elementType,f.type=i.type,f.stateNode=i.stateNode,f._debugID=i._debugID,f._debugSource=i._debugSource,f._debugOwner=i._debugOwner,f._debugHookTypes=i._debugHookTypes,f.alternate=i,i.alternate=f):(f.pendingProps=a,f.type=i.type,f.flags=er,f.nextEffect=null,f.firstEffect=null,f.lastEffect=null,f.actualDuration=0,f.actualStartTime=-1),f.childLanes=i.childLanes,f.lanes=i.lanes,f.child=i.child,f.memoizedProps=i.memoizedProps,f.memoizedState=i.memoizedState,f.updateQueue=i.updateQueue;var v=i.dependencies;switch(f.dependencies=v===null?null:{lanes:v.lanes,firstContext:v.firstContext},f.sibling=i.sibling,f.index=i.index,f.ref=i.ref,f.selfBaseDuration=i.selfBaseDuration,f.treeBaseDuration=i.treeBaseDuration,f._debugNeedsRemount=i._debugNeedsRemount,f.tag){case E:case m:case ye:f.type=jh(i.type);break;case y:f.type=Ub(i.type);break;case Y:f.type=Bb(i.type);break}return f}function eH(i,a){i.flags&=En,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null;var f=i.alternate;if(f===null)i.childLanes=rt,i.lanes=a,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null,i.selfBaseDuration=0,i.treeBaseDuration=0;else{i.childLanes=f.childLanes,i.lanes=f.lanes,i.child=f.child,i.memoizedProps=f.memoizedProps,i.memoizedState=f.memoizedState,i.updateQueue=f.updateQueue,i.type=f.type;var v=f.dependencies;i.dependencies=v===null?null:{lanes:v.lanes,firstContext:v.firstContext},i.selfBaseDuration=f.selfBaseDuration,i.treeBaseDuration=f.treeBaseDuration}return i}function tH(i){var a;return i===qL?a=id|_a|vi:i===KL?a=_a|vi:a=Wr,mV&&(a|=eo),ro(T,null,null,a)}function Hb(i,a,f,v,x,C){var P=E,O=i;if(typeof i=="function")jb(i)?(P=y,O=Ub(O)):O=jh(O);else if(typeof i=="string")P=_;else e:switch(i){case oi:return yd(f.children,x,C,a);case yt:P=F,x|=RV;break;case ha:P=F,x|=vi;break;case _s:return nH(f,x,C,a);case Nn:return rH(f,x,C,a);case li:return iH(f,x,C,a);case $t:return Wb(f,x,C,a);case Nt:return sH(f,x,C,a);case ge:default:{if(typeof i=="object"&&i!==null)switch(i.$$typeof){case qs:P=K;break e;case pa:P=Z;break e;case vt:P=Y,O=Bb(O);break e;case Qr:P=ie;break e;case Rn:P=de,O=null;break e;case Ls:P=et;break e}var z="";{(i===void 0||typeof i=="object"&&i!==null&&Object.keys(i).length===0)&&(z+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var se=v?dt(v.type):null;se&&(z+=`
|
|
225
|
+
|
|
226
|
+
Check the render method of \``+se+"`.")}throw Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(i==null?i:typeof i)+"."+z)}}var ce=ro(P,f,a,x);return ce.elementType=i,ce.type=O,ce.lanes=C,ce._debugOwner=v,ce}function Gb(i,a,f){var v=null;v=i._owner;var x=i.type,C=i.key,P=i.props,O=Hb(x,C,P,v,a,f);return O._debugSource=i._source,O._debugOwner=i._owner,O}function yd(i,a,f,v){var x=ro(M,i,v,a);return x.lanes=f,x}function nH(i,a,f,v){typeof i.id!="string"&&c('Profiler must specify an "id" as a prop');var x=ro(X,i,v,a|eo);return x.elementType=_s,x.type=_s,x.lanes=f,x.stateNode={effectDuration:0,passiveEffectDuration:0},x}function rH(i,a,f,v){var x=ro(ue,i,v,a);return x.type=Nn,x.elementType=Nn,x.lanes=f,x}function iH(i,a,f,v){var x=ro(Ve,i,v,a);return x.type=li,x.elementType=li,x.lanes=f,x}function Wb(i,a,f,v){var x=ro(Pe,i,v,a);return x.type=$t,x.elementType=$t,x.lanes=f,x}function sH(i,a,f,v){var x=ro(ne,i,v,a);return x.type=Nt,x.elementType=Nt,x.lanes=f,x}function Kb(i,a,f){var v=ro(L,i,null,a);return v.lanes=f,v}function aH(){var i=ro(_,null,null,Wr);return i.elementType="DELETED",i.type="DELETED",i}function qb(i,a,f){var v=i.children!==null?i.children:[],x=ro(R,v,i.key,a);return x.lanes=f,x.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},x}function fI(i,a){return i===null&&(i=ro(E,null,null,Wr)),i.tag=a.tag,i.key=a.key,i.elementType=a.elementType,i.type=a.type,i.stateNode=a.stateNode,i.return=a.return,i.child=a.child,i.sibling=a.sibling,i.index=a.index,i.ref=a.ref,i.pendingProps=a.pendingProps,i.memoizedProps=a.memoizedProps,i.updateQueue=a.updateQueue,i.memoizedState=a.memoizedState,i.dependencies=a.dependencies,i.mode=a.mode,i.flags=a.flags,i.nextEffect=a.nextEffect,i.firstEffect=a.firstEffect,i.lastEffect=a.lastEffect,i.lanes=a.lanes,i.childLanes=a.childLanes,i.alternate=a.alternate,i.actualDuration=a.actualDuration,i.actualStartTime=a.actualStartTime,i.selfBaseDuration=a.selfBaseDuration,i.treeBaseDuration=a.treeBaseDuration,i._debugID=a._debugID,i._debugSource=a._debugSource,i._debugOwner=a._debugOwner,i._debugNeedsRemount=a._debugNeedsRemount,i._debugHookTypes=a._debugHookTypes,i}function oH(i,a,f){switch(this.tag=a,this.containerInfo=i,this.pendingChildren=null,this.current=null,this.pingCache=null,this.finishedWork=null,this.timeoutHandle=$E,this.context=null,this.pendingContext=null,this.hydrate=f,this.callbackNode=null,this.callbackPriority=nl,this.eventTimes=$f(rt),this.expirationTimes=$f(Nr),this.pendingLanes=rt,this.suspendedLanes=rt,this.pingedLanes=rt,this.expiredLanes=rt,this.mutableReadLanes=rt,this.finishedLanes=rt,this.entangledLanes=rt,this.entanglements=$f(rt),this.mutableSourceEagerHydrationData=null,this.interactionThreadID=s.unstable_getThreadID(),this.memoizedInteractions=new Set,this.pendingInteractionMap=new Map,a){case KL:this._debugRootType="createBlockingRoot()";break;case qL:this._debugRootType="createRoot()";break;case KE:this._debugRootType="createLegacyRoot()";break}}function lH(i,a,f,v){var x=new oH(i,a,f),C=tH(a);return x.current=C,C.stateNode=x,rx(C),x}function uH(i,a){var f=a._getVersion,v=f(a._source);i.mutableSourceEagerHydrationData==null?i.mutableSourceEagerHydrationData=[a,v]:i.mutableSourceEagerHydrationData.push(a,v)}function cH(i,a,f){var v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:jn,key:v==null?null:""+v,children:i,containerInfo:a,implementation:f}}var Yb,Xb;Yb=!1,Xb={};function fH(i){if(!i)return Za;var a=Du(i),f=pV(a);if(a.tag===y){var v=a.type;if(ru(v))return GL(a,v,f)}return f}function dH(i,a){{var f=Du(i);if(f===void 0)throw typeof i.render=="function"?Error("Unable to find node on an unmounted component."):Error("Argument appears to not be a ReactComponent. Keys: "+Object.keys(i));var v=qd(f);if(v===null)return null;if(v.mode&vi){var x=dt(f.type)||"Component";if(!Xb[x]){Xb[x]=!0;var C=Or;try{ir(v),f.mode&vi?c("%s is deprecated in StrictMode. %s was passed an instance of %s which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",a,a,x):c("%s is deprecated in StrictMode. %s was passed an instance of %s which renders StrictMode children. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",a,a,x)}finally{C?ir(C):Zr()}}}return v.stateNode}}function hH(i,a,f,v){return lH(i,a,f)}function eg(i,a,f,v){vV(a,i);var x=a.current,C=no();typeof jest<"u"&&(Vj(x),tI(x));var P=Wc(x),O=fH(f);a.context===null?a.context=O:a.pendingContext=O,ma&&Or!==null&&!Yb&&(Yb=!0,c(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.
|
|
227
|
+
|
|
228
|
+
Check the render method of %s.`,dt(Or.type)||"Unknown"));var z=Vc(C,P);return z.payload={element:i},v=v===void 0?null:v,v!==null&&(typeof v!="function"&&c("render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",v),z.callback=v),zc(x,z),Gs(x,P,C),P}function Qb(i){var a=i.current;if(!a.child)return null;switch(a.child.tag){case _:return a.child.stateNode;default:return a.child.stateNode}}function dI(i,a){var f=i.memoizedState;f!==null&&f.dehydrated!==null&&(f.retryLane=Pv(f.retryLane,a))}function Jb(i,a){dI(i,a);var f=i.alternate;f&&dI(f,a)}function pH(i){if(i.tag===ue){var a=no(),f=th;Gs(i,f,a),Jb(i,f)}}function mH(i){if(i.tag===ue){var a=no(),f=Mc;Gs(i,f,a),Jb(i,f)}}function gH(i){if(i.tag===ue){var a=no(),f=Wc(i);Gs(i,f,a),Jb(i,f)}}function vH(i,a){try{return a()}finally{}}function hI(i){var a=lE(i);return a===null?null:a.tag===ze?a.stateNode.instance:a.stateNode}var pI=function(i){return!1};function yH(i){return pI(i)}var mI=null,gI=null,vI=null,yI=null,SI=null,EI=null,xI=null,bI=null;{var TI=function(i,a,f){var v=a[f],x=Array.isArray(i)?i.slice():t({},i);return f+1===a.length?(Array.isArray(x)?x.splice(v,1):delete x[v],x):(x[v]=TI(i[v],a,f+1),x)},wI=function(i,a){return TI(i,a,0)},CI=function(i,a,f,v){var x=a[v],C=Array.isArray(i)?i.slice():t({},i);if(v+1===a.length){var P=f[v];C[P]=C[x],Array.isArray(C)?C.splice(x,1):delete C[x]}else C[x]=CI(i[x],a,f,v+1);return C},RI=function(i,a,f){if(a.length!==f.length){u("copyWithRename() expects paths of the same length");return}else for(var v=0;v<f.length-1;v++)if(a[v]!==f[v]){u("copyWithRename() expects paths to be the same except for the deepest key");return}return CI(i,a,f,0)},AI=function(i,a,f,v){if(f>=a.length)return v;var x=a[f],C=Array.isArray(i)?i.slice():t({},i);return C[x]=AI(i[x],a,f+1,v),C},_I=function(i,a,f){return AI(i,a,0,f)},Zb=function(i,a){for(var f=i.memoizedState;f!==null&&a>0;)f=f.next,a--;return f};mI=function(i,a,f,v){var x=Zb(i,a);if(x!==null){var C=_I(x.memoizedState,f,v);x.memoizedState=C,x.baseState=C,i.memoizedProps=t({},i.memoizedProps),Gs(i,Wn,Nr)}},gI=function(i,a,f){var v=Zb(i,a);if(v!==null){var x=wI(v.memoizedState,f);v.memoizedState=x,v.baseState=x,i.memoizedProps=t({},i.memoizedProps),Gs(i,Wn,Nr)}},vI=function(i,a,f,v){var x=Zb(i,a);if(x!==null){var C=RI(x.memoizedState,f,v);x.memoizedState=C,x.baseState=C,i.memoizedProps=t({},i.memoizedProps),Gs(i,Wn,Nr)}},yI=function(i,a,f){i.pendingProps=_I(i.memoizedProps,a,f),i.alternate&&(i.alternate.pendingProps=i.pendingProps),Gs(i,Wn,Nr)},SI=function(i,a){i.pendingProps=wI(i.memoizedProps,a),i.alternate&&(i.alternate.pendingProps=i.pendingProps),Gs(i,Wn,Nr)},EI=function(i,a,f){i.pendingProps=RI(i.memoizedProps,a,f),i.alternate&&(i.alternate.pendingProps=i.pendingProps),Gs(i,Wn,Nr)},xI=function(i){Gs(i,Wn,Nr)},bI=function(i){pI=i}}function SH(i){var a=qd(i);return a===null?null:a.stateNode}function EH(i){return null}function xH(){return Or}function bH(i){var a=i.findFiberByHostInstance,f=o.ReactCurrentDispatcher;return gV({bundleType:i.bundleType,version:i.version,rendererPackageName:i.rendererPackageName,rendererConfig:i.rendererConfig,overrideHookState:mI,overrideHookStateDeletePath:gI,overrideHookStateRenamePath:vI,overrideProps:yI,overridePropsDeletePath:SI,overridePropsRenamePath:EI,setSuspenseHandler:bI,scheduleUpdate:xI,currentDispatcherRef:f,findHostInstanceByFiber:SH,findFiberByHostInstance:a||EH,findHostInstancesForRefresh:Kj,scheduleRefresh:Gj,scheduleRoot:Wj,setRefreshHandler:Hj,getCurrentFiber:xH})}function eT(i,a,f){this._internalRoot=TH(i,a,f)}eT.prototype.render=function(i){var a=this._internalRoot;{typeof arguments[1]=="function"&&c("render(...): does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect().");var f=a.containerInfo;if(f.nodeType!==Ci){var v=hI(a.current);v&&v.parentNode!==f&&c("render(...): It looks like the React-rendered content of the root container was removed without using React. This is not supported and will cause errors. Instead, call root.unmount() to empty a root's container.")}}eg(i,a,null,null)},eT.prototype.unmount=function(){typeof arguments[0]=="function"&&c("unmount(...): does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect().");var i=this._internalRoot,a=i.containerInfo;eg(null,i,null,function(){BL(a)})};function TH(i,a,f){var v=f!=null&&f.hydrate===!0;f!=null&&f.hydrationOptions;var x=f!=null&&f.hydrationOptions!=null&&f.hydrationOptions.mutableSources||null,C=hH(i,a,v);hV(C.current,i),i.nodeType;{var P=i.nodeType===Ci?i.parentNode:i;uL(P)}if(x)for(var O=0;O<x.length;O++){var z=x[O];uH(C,z)}return C}function wH(i,a){return new eT(i,KE,a)}function Hh(i){return!!(i&&(i.nodeType===gs||i.nodeType===vs||i.nodeType===vf||i.nodeType===Ci&&i.nodeValue===" react-mount-point-unstable "))}var CH=o.ReactCurrentOwner,LI,kI=!1;LI=function(i){if(i._reactRootContainer&&i.nodeType!==Ci){var a=hI(i._reactRootContainer._internalRoot.current);a&&a.parentNode!==i&&c("render(...): It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container.")}var f=!!i._reactRootContainer,v=Ty(i),x=!!(v&&Uc(v));x&&!f&&c("render(...): Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render."),i.nodeType===gs&&i.tagName&&i.tagName.toUpperCase()==="BODY"&&c("render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.")};function Ty(i){return i?i.nodeType===vs?i.documentElement:i.firstChild:null}function RH(i){var a=Ty(i);return!!(a&&a.nodeType===gs&&a.hasAttribute(ii))}function AH(i,a){var f=a||RH(i);if(!f)for(var v=!1,x;x=i.lastChild;)!v&&x.nodeType===gs&&x.hasAttribute(ii)&&(v=!0,c("render(): Target node has markup rendered by React, but there are unrelated nodes as well. This is most commonly caused by white-space inserted around server-rendered markup.")),i.removeChild(x);return f&&!a&&!kI&&(kI=!0,u("render(): Calling ReactDOM.render() to hydrate server-rendered markup will stop working in React v18. Replace the ReactDOM.render() call with ReactDOM.hydrate() if you want React to attach to the server HTML.")),wH(i,f?{hydrate:!0}:void 0)}function _H(i,a){i!==null&&typeof i!="function"&&c("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",a,i)}function wy(i,a,f,v,x){LI(f),_H(x===void 0?null:x,"render");var C=f._reactRootContainer,P;if(C){if(P=C._internalRoot,typeof x=="function"){var z=x;x=function(){var se=Qb(P);z.call(se)}}eg(a,P,i,x)}else{if(C=f._reactRootContainer=AH(f,v),P=C._internalRoot,typeof x=="function"){var O=x;x=function(){var se=Qb(P);O.call(se)}}GD(function(){eg(a,P,i,x)})}return Qb(P)}function LH(i){{var a=CH.current;if(a!==null&&a.stateNode!==null){var f=a.stateNode._warnedAboutRefsInRender;f||c("%s is accessing findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",dt(a.type)||"A component"),a.stateNode._warnedAboutRefsInRender=!0}}return i==null?null:i.nodeType===gs?i:dH(i,"findDOMNode")}function kH(i,a,f){if(!Hh(a))throw Error("Target container is not a DOM element.");{var v=o0(a)&&a._reactRootContainer===void 0;v&&c("You are calling ReactDOM.hydrate() on a container that was previously passed to ReactDOM.createRoot(). This is not supported. Did you mean to call createRoot(container, {hydrate: true}).render(element)?")}return wy(null,i,a,!0,f)}function DH(i,a,f){if(!Hh(a))throw Error("Target container is not a DOM element.");{var v=o0(a)&&a._reactRootContainer===void 0;v&&c("You are calling ReactDOM.render() on a container that was previously passed to ReactDOM.createRoot(). This is not supported. Did you mean to call root.render(element)?")}return wy(null,i,a,!1,f)}function IH(i,a,f,v){if(!Hh(f))throw Error("Target container is not a DOM element.");if(!(i!=null&&bp(i)))throw Error("parentComponent must be a valid React Component");return wy(i,a,f,!1,v)}function PH(i){if(!Hh(i))throw Error("unmountComponentAtNode(...): Target container is not a DOM element.");{var a=o0(i)&&i._reactRootContainer===void 0;a&&c("You are calling ReactDOM.unmountComponentAtNode() on a container that was previously passed to ReactDOM.createRoot(). This is not supported. Did you mean to call root.unmount()?")}if(i._reactRootContainer){{var f=Ty(i),v=f&&!Uc(f);v&&c("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.")}return GD(function(){wy(null,null,i,!1,function(){i._reactRootContainer=null,BL(i)})}),!0}else{{var x=Ty(i),C=!!(x&&Uc(x)),P=i.nodeType===gs&&Hh(i.parentNode)&&!!i.parentNode._reactRootContainer;C&&c("unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",P?"You may have accidentally passed in a React root node instead of its container.":"Instead, have the parent component update its state and rerender in order to remove this component.")}return!1}}Ap(pH),ls(mH),Cv(gH),Tf(vH);var DI=!1;(typeof Map!="function"||Map.prototype==null||typeof Map.prototype.forEach!="function"||typeof Set!="function"||Set.prototype==null||typeof Set.prototype.clear!="function"||typeof Set.prototype.forEach!="function")&&c("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),hi(p5),Ea(HD,cj,oj,uj);function II(i,a){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!Hh(a))throw Error("Target container is not a DOM element.");return cH(i,a,null,f)}function MH(i,a,f,v){return IH(i,a,f,v)}function OH(i,a){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;return DI||(DI=!0,u('The ReactDOM.unstable_createPortal() alias has been deprecated, and will be removed in React 18+. Update your code to use ReactDOM.createPortal() instead. It has the exact same API, but without the "unstable_" prefix.')),II(i,a,f)}var FH={Events:[Uc,bh,l0,pi,Hn,cu,xy]},NH=bH({findFiberByHostInstance:td,bundleType:1,version:lk,rendererPackageName:"react-dom"});if(!NH&&Dt&&window.top===window.self&&(navigator.userAgent.indexOf("Chrome")>-1&&navigator.userAgent.indexOf("Edge")===-1||navigator.userAgent.indexOf("Firefox")>-1)){var PI=window.location.protocol;/^(https?|file):$/.test(PI)&&console.info("%cDownload the React DevTools for a better development experience: https://reactjs.org/link/react-devtools"+(PI==="file:"?`
|
|
229
|
+
You might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq`:""),"font-weight:bold")}Ia.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=FH,Ia.createPortal=II,Ia.findDOMNode=LH,Ia.flushSync=Db,Ia.hydrate=kH,Ia.render=DH,Ia.unmountComponentAtNode=PH,Ia.unstable_batchedUpdates=HD,Ia.unstable_createPortal=OH,Ia.unstable_renderSubtreeIntoContainer=MH,Ia.version=lk}(),Ia}var pT={};function mT(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function")){if(pT.NODE_ENV!=="production")throw new Error("^_^");try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(mT)}catch(r){console.error(r)}}}pT.NODE_ENV==="production"?(mT(),Ly.exports=zI()):Ly.exports=WI();var KI=Ly.exports;const Py=Cy(KI);var qI=Object.defineProperty,YI=(r,e,t)=>e in r?qI(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,ig=(r,e,t)=>(YI(r,typeof e!="symbol"?e+"":e,t),t);const XI={stringify:r=>r,parse:r=>r},QI={stringify:r=>`${r}`,parse:r=>parseFloat(r)},JI={stringify:r=>r?"true":"false",parse:r=>/^[ty1-9]/i.test(r)},ZI={stringify:r=>r.name,parse:(r,e,t)=>{const n=(()=>{if(typeof window<"u"&&r in window)return window[r];if(typeof global<"u"&&r in global)return global[r]})();return typeof n=="function"?n.bind(t):void 0}},eP={stringify:r=>JSON.stringify(r),parse:r=>JSON.parse(r)},My={string:XI,number:QI,boolean:JI,function:ZI,json:eP};function tP(r){return r.replace(/([a-z0-9])([A-Z])/g,(e,t,n)=>`${t}-${n.toLowerCase()}`)}const sg=Symbol.for("r2wc.render"),ag=Symbol.for("r2wc.connected"),Xc=Symbol.for("r2wc.context"),cc=Symbol.for("r2wc.props");function nP(r,e,t){var n,s,o;e.props||(e.props=r.propTypes?Object.keys(r.propTypes):[]);const u=Array.isArray(e.props)?e.props.slice():Object.keys(e.props),c={},h={},m={};for(const E of u){c[E]=Array.isArray(e.props)?"string":e.props[E];const T=tP(E);h[E]=T,m[T]=E}class y extends HTMLElement{constructor(){super(),ig(this,n,!0),ig(this,s),ig(this,o,{}),ig(this,"container"),e.shadow?this.container=this.attachShadow({mode:e.shadow}):this.container=this,this[cc].container=this.container;for(const T of u){const R=h[T],_=this.getAttribute(R),L=c[T],M=L?My[L]:null;M!=null&&M.parse&&_&&(this[cc][T]=M.parse(_,R,this))}}static get observedAttributes(){return Object.keys(m)}connectedCallback(){this[ag]=!0,this[sg]()}disconnectedCallback(){this[ag]=!1,this[Xc]&&t.unmount(this[Xc]),delete this[Xc]}attributeChangedCallback(T,R,_){const L=m[T],M=c[L],F=M?My[M]:null;L in c&&F!=null&&F.parse&&_&&(this[cc][L]=F.parse(_,T,this),this[sg]())}[(n=ag,s=Xc,o=cc,sg)](){this[ag]&&(this[Xc]?t.update(this[Xc],this[cc]):this[Xc]=t.mount(this.container,r,this[cc]))}}for(const E of u){const T=h[E],R=c[E];Object.defineProperty(y.prototype,E,{enumerable:!0,configurable:!0,get(){return this[cc][E]},set(_){this[cc][E]=_;const L=R?My[R]:null;if(L!=null&&L.stringify){const M=L.stringify(_,T,this);this.getAttribute(T)!==M&&this.setAttribute(T,M)}else this[sg]()}})}return y}function rP(r,e,t){const n=gr.createElement(e,t);return Py.render(n,r),{container:r,ReactComponent:e}}function iP({container:r,ReactComponent:e},t){const n=gr.createElement(e,t);Py.render(n,r)}function sP({container:r}){Py.unmountComponentAtNode(r)}function aP(r,e={}){return nP(r,e,{mount:rP,update:iP,unmount:sP})}var Oy={exports:{}},xd={};/** @license React v17.0.2
|
|
230
|
+
* react-jsx-runtime.production.min.js
|
|
231
|
+
*
|
|
232
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
233
|
+
*
|
|
234
|
+
* This source code is licensed under the MIT license found in the
|
|
235
|
+
* LICENSE file in the root directory of this source tree.
|
|
236
|
+
*/var gT;function oP(){if(gT)return xd;gT=1,Ed();var r=Tt,e=60103;if(xd.Fragment=60107,typeof Symbol=="function"&&Symbol.for){var t=Symbol.for;e=t("react.element"),xd.Fragment=t("react.fragment")}var n=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,o={key:!0,ref:!0,__self:!0,__source:!0};function u(c,h,m){var y,E={},T=null,R=null;m!==void 0&&(T=""+m),h.key!==void 0&&(T=""+h.key),h.ref!==void 0&&(R=h.ref);for(y in h)s.call(h,y)&&!o.hasOwnProperty(y)&&(E[y]=h[y]);if(c&&c.defaultProps)for(y in h=c.defaultProps,h)E[y]===void 0&&(E[y]=h[y]);return{$$typeof:e,type:c,key:T,ref:R,props:E,_owner:n.current}}return xd.jsx=u,xd.jsxs=u,xd}var Fy={},vT;function lP(){return vT||(vT=1,function(r){var e={};/** @license React v17.0.2
|
|
237
|
+
* react-jsx-runtime.development.js
|
|
238
|
+
*
|
|
239
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
240
|
+
*
|
|
241
|
+
* This source code is licensed under the MIT license found in the
|
|
242
|
+
* LICENSE file in the root directory of this source tree.
|
|
243
|
+
*/e.NODE_ENV!=="production"&&function(){var t=Tt,n=Ed(),s=60103,o=60106;r.Fragment=60107;var u=60108,c=60114,h=60109,m=60110,y=60112,E=60113,T=60120,R=60115,_=60116,L=60121,M=60122,F=60117,Z=60129,K=60131;if(typeof Symbol=="function"&&Symbol.for){var Y=Symbol.for;s=Y("react.element"),o=Y("react.portal"),r.Fragment=Y("react.fragment"),u=Y("react.strict_mode"),c=Y("react.profiler"),h=Y("react.provider"),m=Y("react.context"),y=Y("react.forward_ref"),E=Y("react.suspense"),T=Y("react.suspense_list"),R=Y("react.memo"),_=Y("react.lazy"),L=Y("react.block"),M=Y("react.server.block"),F=Y("react.fundamental"),Y("react.scope"),Y("react.opaque.id"),Z=Y("react.debug_trace_mode"),Y("react.offscreen"),K=Y("react.legacy_hidden")}var X=typeof Symbol=="function"&&Symbol.iterator,ue="@@iterator";function ie(ge){if(ge===null||typeof ge!="object")return null;var lt=X&&ge[X]||ge[ue];return typeof lt=="function"?lt:null}var ye=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function de(ge){{for(var lt=arguments.length,yt=new Array(lt>1?lt-1:0),$t=1;$t<lt;$t++)yt[$t-1]=arguments[$t];Re("error",ge,yt)}}function Re(ge,lt,yt){{var $t=ye.ReactDebugCurrentFrame,Nt=$t.getStackAddendum();Nt!==""&&(lt+="%s",yt=yt.concat([Nt]));var Xt=yt.map(function(wn){return""+wn});Xt.unshift("Warning: "+lt),Function.prototype.apply.call(console[ge],console,Xt)}}var Ce=!1;function Ve(ge){return!!(typeof ge=="string"||typeof ge=="function"||ge===r.Fragment||ge===c||ge===Z||ge===u||ge===E||ge===T||ge===K||Ce||typeof ge=="object"&&ge!==null&&(ge.$$typeof===_||ge.$$typeof===R||ge.$$typeof===h||ge.$$typeof===m||ge.$$typeof===y||ge.$$typeof===F||ge.$$typeof===L||ge[0]===M))}function ze(ge,lt,yt){var $t=lt.displayName||lt.name||"";return ge.displayName||($t!==""?yt+"("+$t+")":yt)}function Qe(ge){return ge.displayName||"Context"}function et(ge){if(ge==null)return null;if(typeof ge.tag=="number"&&de("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),typeof ge=="function")return ge.displayName||ge.name||null;if(typeof ge=="string")return ge;switch(ge){case r.Fragment:return"Fragment";case o:return"Portal";case c:return"Profiler";case u:return"StrictMode";case E:return"Suspense";case T:return"SuspenseList"}if(typeof ge=="object")switch(ge.$$typeof){case m:var lt=ge;return Qe(lt)+".Consumer";case h:var yt=ge;return Qe(yt._context)+".Provider";case y:return ze(ge,ge.render,"ForwardRef");case R:return et(ge.type);case L:return et(ge._render);case _:{var $t=ge,Nt=$t._payload,Xt=$t._init;try{return et(Xt(Nt))}catch{return null}}}return null}var Pe=0,ne,_e,Ue,He,Be,Je,Xe;function Et(){}Et.__reactDisabledLog=!0;function gt(){{if(Pe===0){ne=console.log,_e=console.info,Ue=console.warn,He=console.error,Be=console.group,Je=console.groupCollapsed,Xe=console.groupEnd;var ge={configurable:!0,enumerable:!0,value:Et,writable:!0};Object.defineProperties(console,{info:ge,log:ge,warn:ge,error:ge,group:ge,groupCollapsed:ge,groupEnd:ge})}Pe++}}function Ot(){{if(Pe--,Pe===0){var ge={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:n({},ge,{value:ne}),info:n({},ge,{value:_e}),warn:n({},ge,{value:Ue}),error:n({},ge,{value:He}),group:n({},ge,{value:Be}),groupCollapsed:n({},ge,{value:Je}),groupEnd:n({},ge,{value:Xe})})}Pe<0&&de("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Dt=ye.ReactCurrentDispatcher,bn;function tn(ge,lt,yt){{if(bn===void 0)try{throw Error()}catch(Nt){var $t=Nt.stack.trim().match(/\n( *(at )?)/);bn=$t&&$t[1]||""}return`
|
|
244
|
+
`+bn+ge}}var Fn=!1,wt;{var Tn=typeof WeakMap=="function"?WeakMap:Map;wt=new Tn}function Mn(ge,lt){if(!ge||Fn)return"";{var yt=wt.get(ge);if(yt!==void 0)return yt}var $t;Fn=!0;var Nt=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Xt;Xt=Dt.current,Dt.current=null,gt();try{if(lt){var wn=function(){throw Error()};if(Object.defineProperty(wn.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(wn,[])}catch(bi){$t=bi}Reflect.construct(ge,[],wn)}else{try{wn.call()}catch(bi){$t=bi}ge.call(wn.prototype)}}else{try{throw Error()}catch(bi){$t=bi}ge()}}catch(bi){if(bi&&$t&&typeof bi.stack=="string"){for(var yn=bi.stack.split(`
|
|
245
|
+
`),rr=$t.stack.split(`
|
|
246
|
+
`),kn=yn.length-1,lr=rr.length-1;kn>=1&&lr>=0&&yn[kn]!==rr[lr];)lr--;for(;kn>=1&&lr>=0;kn--,lr--)if(yn[kn]!==rr[lr]){if(kn!==1||lr!==1)do if(kn--,lr--,lr<0||yn[kn]!==rr[lr]){var Jr=`
|
|
247
|
+
`+yn[kn].replace(" at new "," at ");return typeof ge=="function"&&wt.set(ge,Jr),Jr}while(kn>=1&&lr>=0);break}}}finally{Fn=!1,Dt.current=Xt,Ot(),Error.prepareStackTrace=Nt}var Vi=ge?ge.displayName||ge.name:"",Ys=Vi?tn(Vi):"";return typeof ge=="function"&&wt.set(ge,Ys),Ys}function Pi(ge,lt,yt){return Mn(ge,!1)}function Rr(ge){var lt=ge.prototype;return!!(lt&<.isReactComponent)}function Ar(ge,lt,yt){if(ge==null)return"";if(typeof ge=="function")return Mn(ge,Rr(ge));if(typeof ge=="string")return tn(ge);switch(ge){case E:return tn("Suspense");case T:return tn("SuspenseList")}if(typeof ge=="object")switch(ge.$$typeof){case y:return Pi(ge.render);case R:return Ar(ge.type,lt,yt);case L:return Pi(ge._render);case _:{var $t=ge,Nt=$t._payload,Xt=$t._init;try{return Ar(Xt(Nt),lt,yt)}catch{}}}return""}var ii={},Xr=ye.ReactDebugCurrentFrame;function xi(ge){if(ge){var lt=ge._owner,yt=Ar(ge.type,ge._source,lt?lt.type:null);Xr.setExtraStackFrame(yt)}else Xr.setExtraStackFrame(null)}function As(ge,lt,yt,$t,Nt){{var Xt=Function.call.bind(Object.prototype.hasOwnProperty);for(var wn in ge)if(Xt(ge,wn)){var yn=void 0;try{if(typeof ge[wn]!="function"){var rr=Error(($t||"React class")+": "+yt+" type `"+wn+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof ge[wn]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw rr.name="Invariant Violation",rr}yn=ge[wn](lt,wn,$t,yt,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(kn){yn=kn}yn&&!(yn instanceof Error)&&(xi(Nt),de("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",$t||"React class",yt,wn,typeof yn),xi(null)),yn instanceof Error&&!(yn.message in ii)&&(ii[yn.message]=!0,xi(Nt),de("Failed %s type: %s",yt,yn.message),xi(null))}}}var Pr=ye.ReactCurrentOwner,si=Object.prototype.hasOwnProperty,Ft={key:!0,ref:!0,__self:!0,__source:!0},nr,_r,ai;ai={};function or(ge){if(si.call(ge,"ref")){var lt=Object.getOwnPropertyDescriptor(ge,"ref").get;if(lt&<.isReactWarning)return!1}return ge.ref!==void 0}function dr(ge){if(si.call(ge,"key")){var lt=Object.getOwnPropertyDescriptor(ge,"key").get;if(lt&<.isReactWarning)return!1}return ge.key!==void 0}function fa(ge,lt){if(typeof ge.ref=="string"&&Pr.current&<&&Pr.current.stateNode!==lt){var yt=et(Pr.current.type);ai[yt]||(de('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',et(Pr.current.type),ge.ref),ai[yt]=!0)}}function da(ge,lt){{var yt=function(){nr||(nr=!0,de("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",lt))};yt.isReactWarning=!0,Object.defineProperty(ge,"key",{get:yt,configurable:!0})}}function Mr(ge,lt){{var yt=function(){_r||(_r=!0,de("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",lt))};yt.isReactWarning=!0,Object.defineProperty(ge,"ref",{get:yt,configurable:!0})}}var xt=function(ge,lt,yt,$t,Nt,Xt,wn){var yn={$$typeof:s,type:ge,key:lt,ref:yt,props:wn,_owner:Xt};return yn._store={},Object.defineProperty(yn._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(yn,"_self",{configurable:!1,enumerable:!1,writable:!1,value:$t}),Object.defineProperty(yn,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Nt}),Object.freeze&&(Object.freeze(yn.props),Object.freeze(yn)),yn};function Pt(ge,lt,yt,$t,Nt){{var Xt,wn={},yn=null,rr=null;yt!==void 0&&(yn=""+yt),dr(lt)&&(yn=""+lt.key),or(lt)&&(rr=lt.ref,fa(lt,Nt));for(Xt in lt)si.call(lt,Xt)&&!Ft.hasOwnProperty(Xt)&&(wn[Xt]=lt[Xt]);if(ge&&ge.defaultProps){var kn=ge.defaultProps;for(Xt in kn)wn[Xt]===void 0&&(wn[Xt]=kn[Xt])}if(yn||rr){var lr=typeof ge=="function"?ge.displayName||ge.name||"Unknown":ge;yn&&da(wn,lr),rr&&Mr(wn,lr)}return xt(ge,yn,rr,Nt,$t,Pr.current,wn)}}var Jt=ye.ReactCurrentOwner,On=ye.ReactDebugCurrentFrame;function $n(ge){if(ge){var lt=ge._owner,yt=Ar(ge.type,ge._source,lt?lt.type:null);On.setExtraStackFrame(yt)}else On.setExtraStackFrame(null)}var Yn;Yn=!1;function hr(ge){return typeof ge=="object"&&ge!==null&&ge.$$typeof===s}function Sr(){{if(Jt.current){var ge=et(Jt.current.type);if(ge)return`
|
|
248
|
+
|
|
249
|
+
Check the render method of \``+ge+"`."}return""}}function jn(ge){return""}var oi={};function ha(ge){{var lt=Sr();if(!lt){var yt=typeof ge=="string"?ge:ge.displayName||ge.name;yt&&(lt=`
|
|
250
|
+
|
|
251
|
+
Check the top-level render call using <`+yt+">.")}return lt}}function _s(ge,lt){{if(!ge._store||ge._store.validated||ge.key!=null)return;ge._store.validated=!0;var yt=ha(lt);if(oi[yt])return;oi[yt]=!0;var $t="";ge&&ge._owner&&ge._owner!==Jt.current&&($t=" It was passed a child from "+et(ge._owner.type)+"."),$n(ge),de('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',yt,$t),$n(null)}}function qs(ge,lt){{if(typeof ge!="object")return;if(Array.isArray(ge))for(var yt=0;yt<ge.length;yt++){var $t=ge[yt];hr($t)&&_s($t,lt)}else if(hr(ge))ge._store&&(ge._store.validated=!0);else if(ge){var Nt=ie(ge);if(typeof Nt=="function"&&Nt!==ge.entries)for(var Xt=Nt.call(ge),wn;!(wn=Xt.next()).done;)hr(wn.value)&&_s(wn.value,lt)}}}function pa(ge){{var lt=ge.type;if(lt==null||typeof lt=="string")return;var yt;if(typeof lt=="function")yt=lt.propTypes;else if(typeof lt=="object"&&(lt.$$typeof===y||lt.$$typeof===R))yt=lt.propTypes;else return;if(yt){var $t=et(lt);As(yt,ge.props,"prop",$t,ge)}else if(lt.PropTypes!==void 0&&!Yn){Yn=!0;var Nt=et(lt);de("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Nt||"Unknown")}typeof lt.getDefaultProps=="function"&&!lt.getDefaultProps.isReactClassApproved&&de("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function vt(ge){{for(var lt=Object.keys(ge.props),yt=0;yt<lt.length;yt++){var $t=lt[yt];if($t!=="children"&&$t!=="key"){$n(ge),de("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",$t),$n(null);break}}ge.ref!==null&&($n(ge),de("Invalid attribute `ref` supplied to `React.Fragment`."),$n(null))}}function Nn(ge,lt,yt,$t,Nt,Xt){{var wn=Ve(ge);if(!wn){var yn="";(ge===void 0||typeof ge=="object"&&ge!==null&&Object.keys(ge).length===0)&&(yn+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var rr=jn();rr?yn+=rr:yn+=Sr();var kn;ge===null?kn="null":Array.isArray(ge)?kn="array":ge!==void 0&&ge.$$typeof===s?(kn="<"+(et(ge.type)||"Unknown")+" />",yn=" Did you accidentally export a JSX literal instead of a component?"):kn=typeof ge,de("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",kn,yn)}var lr=Pt(ge,lt,yt,Nt,Xt);if(lr==null)return lr;if(wn){var Jr=lt.children;if(Jr!==void 0)if($t)if(Array.isArray(Jr)){for(var Vi=0;Vi<Jr.length;Vi++)qs(Jr[Vi],ge);Object.freeze&&Object.freeze(Jr)}else de("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else qs(Jr,ge)}return ge===r.Fragment?vt(lr):pa(lr),lr}}function li(ge,lt,yt){return Nn(ge,lt,yt,!0)}function Qr(ge,lt,yt){return Nn(ge,lt,yt,!1)}var Rn=Qr,Ls=li;r.jsx=Rn,r.jsxs=Ls}()}(Fy)),Fy}var uP={};uP.NODE_ENV==="production"?Oy.exports=oP():Oy.exports=lP();var Yt=Oy.exports;const dl={root:"_root_1qxmy_1",progress:"_progress_1qxmy_8",pop:"_pop_1qxmy_1",play_button:"_play_button_1qxmy_25",pause_button:"_pause_button_1qxmy_26",play_icon:"_play_icon_1qxmy_47",mute_button:"_mute_button_1qxmy_58",sound_off_icon:"_sound_off_icon_1qxmy_78",sound_on_icon:"_sound_on_icon_1qxmy_82",error:"_error_1qxmy_86"},yT=r=>{let e=r.httpHandler;return{setHttpHandler(t){e=t},httpHandler(){return e},updateHttpClientConfig(t,n){e.updateHttpClientConfig(t,n)},httpHandlerConfigs(){return e.httpHandlerConfigs()}}},ST=r=>({httpHandler:r.httpHandler()});var ET;(function(r){r.HEADER="header",r.QUERY="query"})(ET||(ET={}));var xT;(function(r){r.HEADER="header",r.QUERY="query"})(xT||(xT={}));var Gh;(function(r){r.HTTP="http",r.HTTPS="https"})(Gh||(Gh={}));var og;(function(r){r.MD5="md5",r.CRC32="crc32",r.CRC32C="crc32c",r.SHA1="sha1",r.SHA256="sha256"})(og||(og={}));var bT;(function(r){r[r.HEADER=0]="HEADER",r[r.TRAILER=1]="TRAILER"})(bT||(bT={}));const Ny="__smithy_context";var TT;(function(r){r.PROFILE="profile",r.SSO_SESSION="sso-session",r.SERVICES="services"})(TT||(TT={}));var wT;(function(r){r.HTTP_0_9="http/0.9",r.HTTP_1_0="http/1.0",r.TDS_8_0="tds/8.0"})(wT||(wT={}));class aa{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?e.protocol.slice(-1)!==":"?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?e.path.charAt(0)!=="/"?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const t=new aa({...e,headers:{...e.headers}});return t.query&&(t.query=cP(t.query)),t}static isInstance(e){if(!e)return!1;const t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&typeof t.query=="object"&&typeof t.headers=="object"}clone(){return aa.clone(this)}}function cP(r){return Object.keys(r).reduce((e,t)=>{const n=r[t];return{...e,[t]:Array.isArray(n)?[...n]:n}},{})}class lg{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const t=e;return typeof t.statusCode=="number"&&typeof t.headers=="object"}}function YH(r){return r}const fP=r=>e=>async t=>{if(!aa.isInstance(t.request))return e(t);const{request:n}=t,{handlerProtocol:s=""}=r.requestHandler.metadata||{};if(s.indexOf("h2")>=0&&!n.headers[":authority"])delete n.headers.host,n.headers[":authority"]=n.hostname+(n.port?":"+n.port:"");else if(!n.headers.host){let o=n.hostname;n.port!=null&&(o+=`:${n.port}`),n.headers.host=o}return e(t)},dP={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},CT=r=>({applyToStack:e=>{e.add(fP(r),dP)}}),hP=()=>(r,e)=>async t=>{var n,s;try{const o=await r(t),{clientName:u,commandName:c,logger:h,dynamoDbDocumentClientOptions:m={}}=e,{overrideInputFilterSensitiveLog:y,overrideOutputFilterSensitiveLog:E}=m,T=y??e.inputFilterSensitiveLog,R=E??e.outputFilterSensitiveLog,{$metadata:_,...L}=o.output;return(n=h==null?void 0:h.info)==null||n.call(h,{clientName:u,commandName:c,input:T(t.input),output:R(L),metadata:_}),o}catch(o){const{clientName:u,commandName:c,logger:h,dynamoDbDocumentClientOptions:m={}}=e,{overrideInputFilterSensitiveLog:y}=m,E=y??e.inputFilterSensitiveLog;throw(s=h==null?void 0:h.error)==null||s.call(h,{clientName:u,commandName:c,input:E(t.input),error:o,metadata:o.$metadata}),o}},pP={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},RT=r=>({applyToStack:e=>{e.add(hP(),pP)}});var AT={};const _T="X-Amzn-Trace-Id",mP="AWS_LAMBDA_FUNCTION_NAME",gP="_X_AMZN_TRACE_ID",vP=r=>e=>async t=>{const{request:n}=t;if(!aa.isInstance(n)||r.runtime!=="node"||n.headers.hasOwnProperty(_T))return e(t);const s=AT[mP],o=AT[gP],u=c=>typeof c=="string"&&c.length>0;return u(s)&&u(o)&&(n.headers[_T]=o),e({...t,request:n})},yP={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},LT=r=>({applyToStack:e=>{e.add(vP(r),yP)}});function kT(r){return{...r,customUserAgent:typeof r.customUserAgent=="string"?[[r.customUserAgent]]:r.customUserAgent}}const SP=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),DT=r=>SP.test(r)||r.startsWith("[")&&r.endsWith("]"),EP=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),Uy=(r,e=!1)=>{if(!e)return EP.test(r);const t=r.split(".");for(const n of t)if(!Uy(n))return!1;return!0},Wh={},Kh="endpoints";function fc(r){return typeof r!="object"||r==null?r:"ref"in r?`$${fc(r.ref)}`:"fn"in r?`${r.fn}(${(r.argv||[]).map(fc).join(", ")})`:JSON.stringify(r,null,2)}class Pa extends Error{constructor(e){super(e),this.name="EndpointError"}}const xP=(r,e)=>r===e,bP=r=>{const e=r.split("."),t=[];for(const n of e){const s=n.indexOf("[");if(s!==-1){if(n.indexOf("]")!==n.length-1)throw new Pa(`Path: '${r}' does not end with ']'`);const o=n.slice(s+1,-1);if(Number.isNaN(parseInt(o)))throw new Pa(`Invalid array index: '${o}' in path: '${r}'`);s!==0&&t.push(n.slice(0,s)),t.push(o)}else t.push(n)}return t},IT=(r,e)=>bP(e).reduce((t,n)=>{if(typeof t!="object")throw new Pa(`Index '${n}' in '${e}' not found in '${JSON.stringify(r)}'`);return Array.isArray(t)?t[parseInt(n)]:t[n]},r),TP=r=>r!=null,wP=r=>!r,By={[Gh.HTTP]:80,[Gh.HTTPS]:443},CP={booleanEquals:xP,getAttr:IT,isSet:TP,isValidHostLabel:Uy,not:wP,parseURL:r=>{const e=(()=>{try{if(r instanceof URL)return r;if(typeof r=="object"&&"hostname"in r){const{hostname:T,port:R,protocol:_="",path:L="",query:M={}}=r,F=new URL(`${_}//${T}${R?`:${R}`:""}${L}`);return F.search=Object.entries(M).map(([Z,K])=>`${Z}=${K}`).join("&"),F}return new URL(r)}catch{return null}})();if(!e)return console.error(`Unable to parse ${JSON.stringify(r)} as a whatwg URL.`),null;const t=e.href,{host:n,hostname:s,pathname:o,protocol:u,search:c}=e;if(c)return null;const h=u.slice(0,-1);if(!Object.values(Gh).includes(h))return null;const m=DT(s),y=t.includes(`${n}:${By[h]}`)||typeof r=="string"&&r.includes(`${n}:${By[h]}`),E=`${n}${y?`:${By[h]}`:""}`;return{scheme:h,authority:E,path:o,normalizedPath:o.endsWith("/")?o:`${o}/`,isIp:m}},stringEquals:(r,e)=>r===e,substring:(r,e,t,n)=>e>=t||r.length<t?null:n?r.substring(r.length-t,r.length-e):r.substring(e,t),uriEncode:r=>encodeURIComponent(r).replace(/[!*'()]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)},PT=(r,e)=>{const t=[],n={...e.endpointParams,...e.referenceRecord};let s=0;for(;s<r.length;){const o=r.indexOf("{",s);if(o===-1){t.push(r.slice(s));break}t.push(r.slice(s,o));const u=r.indexOf("}",o);if(u===-1){t.push(r.slice(o));break}r[o+1]==="{"&&r[u+1]==="}"&&(t.push(r.slice(o+1,u)),s=u+2);const c=r.substring(o+1,u);if(c.includes("#")){const[h,m]=c.split("#");t.push(IT(n[h],m))}else t.push(n[c]);s=u+1}return t.join("")},RP=({ref:r},e)=>({...e.endpointParams,...e.referenceRecord})[r],ug=(r,e,t)=>{if(typeof r=="string")return PT(r,t);if(r.fn)return MT(r,t);if(r.ref)return RP(r,t);throw new Pa(`'${e}': ${String(r)} is not a string, function or reference.`)},MT=({fn:r,argv:e},t)=>{const n=e.map(o=>["boolean","number"].includes(typeof o)?o:ug(o,"arg",t)),s=r.split(".");return s[0]in Wh&&s[1]!=null?Wh[s[0]][s[1]](...n):CP[r](...n)},AP=({assign:r,...e},t)=>{var s,o;if(r&&r in t.referenceRecord)throw new Pa(`'${r}' is already defined in Reference Record.`);const n=MT(e,t);return(o=(s=t.logger)==null?void 0:s.debug)==null||o.call(s,`${Kh} evaluateCondition: ${fc(e)} = ${fc(n)}`),{result:n===""?!0:!!n,...r!=null&&{toAssign:{name:r,value:n}}}},$y=(r=[],e)=>{var n,s;const t={};for(const o of r){const{result:u,toAssign:c}=AP(o,{...e,referenceRecord:{...e.referenceRecord,...t}});if(!u)return{result:u};c&&(t[c.name]=c.value,(s=(n=e.logger)==null?void 0:n.debug)==null||s.call(n,`${Kh} assign: ${c.name} := ${fc(c.value)}`))}return{result:!0,referenceRecord:t}},_P=(r,e)=>Object.entries(r).reduce((t,[n,s])=>({...t,[n]:s.map(o=>{const u=ug(o,"Header value entry",e);if(typeof u!="string")throw new Pa(`Header '${n}' value '${u}' is not a string`);return u})}),{}),OT=(r,e)=>{if(Array.isArray(r))return r.map(t=>OT(t,e));switch(typeof r){case"string":return PT(r,e);case"object":if(r===null)throw new Pa(`Unexpected endpoint property: ${r}`);return FT(r,e);case"boolean":return r;default:throw new Pa(`Unexpected endpoint property type: ${typeof r}`)}},FT=(r,e)=>Object.entries(r).reduce((t,[n,s])=>({...t,[n]:OT(s,e)}),{}),LP=(r,e)=>{const t=ug(r,"Endpoint URL",e);if(typeof t=="string")try{return new URL(t)}catch(n){throw console.error(`Failed to construct URL with ${t}`,n),n}throw new Pa(`Endpoint URL must be a string, got ${typeof t}`)},kP=(r,e)=>{var y,E;const{conditions:t,endpoint:n}=r,{result:s,referenceRecord:o}=$y(t,e);if(!s)return;const u={...e,referenceRecord:{...e.referenceRecord,...o}},{url:c,properties:h,headers:m}=n;return(E=(y=e.logger)==null?void 0:y.debug)==null||E.call(y,`${Kh} Resolving endpoint from template: ${fc(n)}`),{...m!=null&&{headers:_P(m,u)},...h!=null&&{properties:FT(h,u)},url:LP(c,u)}},DP=(r,e)=>{const{conditions:t,error:n}=r,{result:s,referenceRecord:o}=$y(t,e);if(s)throw new Pa(ug(n,"Error",{...e,referenceRecord:{...e.referenceRecord,...o}}))},IP=(r,e)=>{const{conditions:t,rules:n}=r,{result:s,referenceRecord:o}=$y(t,e);if(s)return NT(n,{...e,referenceRecord:{...e.referenceRecord,...o}})},NT=(r,e)=>{for(const t of r)if(t.type==="endpoint"){const n=kP(t,e);if(n)return n}else if(t.type==="error")DP(t,e);else if(t.type==="tree"){const n=IP(t,e);if(n)return n}else throw new Pa(`Unknown endpoint rule: ${t}`);throw new Pa("Rules evaluation failed")},UT=(r,e)=>{var m,y,E,T,R;const{endpointParams:t,logger:n}=e,{parameters:s,rules:o}=r;(y=(m=e.logger)==null?void 0:m.debug)==null||y.call(m,`${Kh} Initial EndpointParams: ${fc(t)}`);const u=Object.entries(s).filter(([,_])=>_.default!=null).map(([_,L])=>[_,L.default]);if(u.length>0)for(const[_,L]of u)t[_]=t[_]??L;const c=Object.entries(s).filter(([,_])=>_.required).map(([_])=>_);for(const _ of c)if(t[_]==null)throw new Pa(`Missing required parameter: '${_}'`);const h=NT(o,{endpointParams:t,logger:n,referenceRecord:{}});if((E=e.endpointParams)!=null&&E.Endpoint)try{const _=new URL(e.endpointParams.Endpoint),{protocol:L,port:M}=_;h.url.protocol=L,h.url.port=M}catch{}return(R=(T=e.logger)==null?void 0:T.debug)==null||R.call(T,`${Kh} Resolved endpoint: ${fc(h)}`),h},BT=(r,e=!1)=>{if(e){for(const t of r.split("."))if(!BT(t))return!1;return!0}return!(!Uy(r)||r.length<3||r.length>63||r!==r.toLowerCase()||DT(r))},$T=":",PP="/",MP=r=>{const e=r.split($T);if(e.length<6)return null;const[t,n,s,o,u,...c]=e;if(t!=="arn"||n===""||s===""||c.join($T)==="")return null;const h=c.map(m=>m.split(PP)).flat();return{partition:n,service:s,region:o,accountId:u,resourceId:h}};let OP={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{}}],version:"1.1"};const Vy={isVirtualHostableS3Bucket:BT,parseArn:MP,partition:r=>{const{partitions:e}=OP;for(const n of e){const{regions:s,outputs:o}=n;for(const[u,c]of Object.entries(s))if(u===r)return{...o,...c}}for(const n of e){const{regionRegex:s,outputs:o}=n;if(new RegExp(s).test(r))return{...o}}const t=e.find(n=>n.id==="aws");if(!t)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...t.outputs}}};Wh.aws=Vy;const VT="user-agent",zy="x-amz-user-agent",zT=" ",jy="/",FP=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,NP=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,jT="-",UP=r=>(e,t)=>async n=>{var E,T;const{request:s}=n;if(!aa.isInstance(s))return e(n);const{headers:o}=s,u=((E=t==null?void 0:t.userAgent)==null?void 0:E.map(Hy))||[],c=(await r.defaultUserAgentProvider()).map(Hy),h=((T=r==null?void 0:r.customUserAgent)==null?void 0:T.map(Hy))||[],m=[].concat([...c,...u,...h]).join(zT),y=[...c.filter(R=>R.startsWith("aws-sdk-")),...h].join(zT);return r.runtime!=="browser"?(y&&(o[zy]=o[zy]?`${o[VT]} ${y}`:y),o[VT]=m):o[zy]=m,e({...n,request:s})},Hy=r=>{var u;const e=r[0].split(jy).map(c=>c.replace(FP,jT)).join(jy),t=(u=r[1])==null?void 0:u.replace(NP,jT),n=e.indexOf(jy),s=e.substring(0,n);let o=e.substring(n+1);return s==="api"&&(o=o.toLowerCase()),[s,o,t].filter(c=>c&&c.length>0).reduce((c,h,m)=>{switch(m){case 0:return h;case 1:return`${c}/${h}`;default:return`${c}#${h}`}},"")},BP={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},HT=r=>({applyToStack:e=>{e.add(UP(r),BP)}});var GT;(function(r){r.ENV="env",r.CONFIG="shared config entry"})(GT||(GT={}));const WT=!1,KT=!1,qh=r=>r[Ny]||(r[Ny]={}),hu=r=>{if(typeof r=="function")return r;const e=Promise.resolve(r);return()=>e},qT=r=>typeof r=="string"&&(r.startsWith("fips-")||r.endsWith("-fips")),YT=r=>qT(r)?["fips-aws-global","aws-fips"].includes(r)?"us-east-1":r.replace(/fips-(dkr-|prod-)?|-fips/,""):r,XT=r=>{const{region:e,useFipsEndpoint:t}=r;if(!e)throw new Error("Region is missing");return{...r,region:async()=>{if(typeof e=="string")return YT(e);const n=await e();return YT(n)},useFipsEndpoint:async()=>{const n=typeof e=="string"?e:await e();return qT(n)?!0:typeof t!="function"?Promise.resolve(!!t):t()}}};function $P(r){const e=new Map;for(const t of r)e.set(t.schemeId,t);return e}const VP=(r,e)=>(t,n)=>async s=>{var m;const o=r.httpAuthSchemeProvider(await e.httpAuthSchemeParametersProvider(r,n,s.input)),u=$P(r.httpAuthSchemes),c=qh(n),h=[];for(const y of o){const E=u.get(y.schemeId);if(!E){h.push(`HttpAuthScheme \`${y.schemeId}\` was not enabled for this service.`);continue}const T=E.identityProvider(await e.identityProviderConfigProvider(r));if(!T){h.push(`HttpAuthScheme \`${y.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:R={},signingProperties:_={}}=((m=y.propertiesExtractor)==null?void 0:m.call(y,r,n))||{};y.identityProperties=Object.assign(y.identityProperties||{},R),y.signingProperties=Object.assign(y.signingProperties||{},_),c.selectedHttpAuthScheme={httpAuthOption:y,identity:await T(y.identityProperties),signer:E.signer};break}if(!c.selectedHttpAuthScheme)throw new Error(h.join(`
|
|
252
|
+
`));return t(s)},zP=async r=>{const e=(r==null?void 0:r.Bucket)||"";if(typeof r.Bucket=="string"&&(r.Bucket=e.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),KP(e)){if(r.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!WP(e)||e.indexOf(".")!==-1&&!String(r.Endpoint).startsWith("http:")||e.toLowerCase()!==e||e.length<3)&&(r.ForcePathStyle=!0);return r.DisableMultiRegionAccessPoints&&(r.disableMultiRegionAccessPoints=!0,r.DisableMRAP=!0),r},jP=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,HP=/(\d+\.){3}\d+/,GP=/\.\./,WP=r=>jP.test(r)&&!HP.test(r)&&!GP.test(r),KP=r=>{const[e,t,n,,,s]=r.split(":"),o=e==="arn"&&r.split(":").length>=6,u=!!(o&&t&&n&&s);if(o&&!u)throw new Error(`Invalid ARN: ${r} was an invalid ARN.`);return u},qP=(r,e,t)=>{const n=async()=>{const s=t[r]??t[e];return typeof s=="function"?s():s};return r==="credentialScope"||e==="CredentialScope"?async()=>{const s=typeof t.credentials=="function"?await t.credentials():t.credentials;return(s==null?void 0:s.credentialScope)??(s==null?void 0:s.CredentialScope)}:r==="accountId"||e==="AccountId"?async()=>{const s=typeof t.credentials=="function"?await t.credentials():t.credentials;return(s==null?void 0:s.accountId)??(s==null?void 0:s.AccountId)}:r==="endpoint"||e==="endpoint"?async()=>{const s=await n();if(s&&typeof s=="object"){if("url"in s)return s.url.href;if("hostname"in s){const{protocol:o,hostname:u,port:c,path:h}=s;return`${o}//${u}${c?":"+c:""}${h}`}}return s}:n},YP=async r=>{};function XP(r){const e={};if(r=r.replace(/^\?/,""),r)for(const t of r.split("&")){let[n,s=null]=t.split("=");n=decodeURIComponent(n),s&&(s=decodeURIComponent(s)),n in e?Array.isArray(e[n])?e[n].push(s):e[n]=[e[n],s]:e[n]=s}return e}const Yh=r=>{if(typeof r=="string")return Yh(new URL(r));const{hostname:e,pathname:t,port:n,protocol:s,search:o}=r;let u;return o&&(u=XP(o)),{hostname:e,port:n?parseInt(n):void 0,protocol:s,path:t,query:u}},QT=r=>typeof r=="object"?"url"in r?Yh(r.url):r:Yh(r),QP=async(r,e,t,n)=>{if(!t.endpoint){const u=await YP(t.serviceId||"");u&&(t.endpoint=()=>Promise.resolve(QT(u)))}const s=await JP(r,e,t);if(typeof t.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");return t.endpointProvider(s,n)},JP=async(r,e,t)=>{var o;const n={},s=((o=e==null?void 0:e.getEndpointParameterInstructions)==null?void 0:o.call(e))||{};for(const[u,c]of Object.entries(s))switch(c.type){case"staticContextParams":n[u]=c.value;break;case"contextParams":n[u]=r[c.name];break;case"clientContextParams":case"builtInParams":n[u]=await qP(c.name,u,t)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(c))}return Object.keys(s).length===0&&Object.assign(n,t),String(t.serviceId).toLowerCase()==="s3"&&await zP(n),n},ZP=({config:r,instructions:e})=>(t,n)=>async s=>{var c,h,m;const o=await QP(s.input,{getEndpointParameterInstructions(){return e}},{...r},n);n.endpointV2=o,n.authSchemes=(c=o.properties)==null?void 0:c.authSchemes;const u=(h=n.authSchemes)==null?void 0:h[0];if(u){n.signing_region=u.signingRegion,n.signing_service=u.signingName;const y=qh(n),E=(m=y==null?void 0:y.selectedHttpAuthScheme)==null?void 0:m.httpAuthOption;E&&(E.signingProperties=Object.assign(E.signingProperties||{},{signing_region:u.signingRegion,signingRegion:u.signingRegion,signing_service:u.signingName,signingName:u.signingName,signingRegionSet:u.signingRegionSet},u.properties))}return t({...s})},eM=(r,e)=>t=>async n=>{const{response:s}=await t(n);try{const o=await e(s,r);return{response:s,output:o}}catch(o){if(Object.defineProperty(o,"$response",{value:s}),!("$metadata"in o)){const u="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";o.message+=`
|
|
253
|
+
`+u,typeof o.$responseBodyText<"u"&&o.$response&&(o.$response.body=o.$responseBodyText)}throw o}},tM=(r,e)=>(t,n)=>async s=>{var c;const o=(c=n.endpointV2)!=null&&c.url&&r.urlParser?async()=>r.urlParser(n.endpointV2.url):r.endpoint;if(!o)throw new Error("No valid endpoint provider available.");const u=await e(s.input,{...r,endpoint:o});return t({...s,request:u})},nM={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},Gy={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Wy(r,e,t){return{applyToStack:n=>{n.add(eM(r,t),nM),n.add(tM(r,e),Gy)}}}const JT={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:Gy.name},Ky=(r,e)=>({applyToStack:t=>{t.addRelativeTo(ZP({config:r,instructions:e}),JT)}}),ZT=r=>{const e=r.tls??!0,{endpoint:t}=r,n=t!=null?async()=>QT(await hu(t)()):void 0;return{...r,endpoint:n,tls:e,isCustomEndpoint:!!t,useDualstackEndpoint:hu(r.useDualstackEndpoint??!1),useFipsEndpoint:hu(r.useFipsEndpoint??!1)}},rM={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:JT.name},ew=(r,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:t})=>({applyToStack:n=>{n.addRelativeTo(VP(r,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:t}),rM)}});Gy.name;const iM=r=>e=>{throw e},sM=(r,e)=>{},aM=r=>(e,t)=>async n=>{if(!aa.isInstance(n.request))return e(n);const o=qh(t).selectedHttpAuthScheme;if(!o)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:u={}},identity:c,signer:h}=o,m=await e({...n,request:await h.sign(n.request,c,u)}).catch((h.errorHandler||iM)(u));return(h.successHandler||sM)(m.response,u),m};var bd;(function(r){r.STANDARD="standard",r.ADAPTIVE="adaptive"})(bd||(bd={}));const Xh=3,tw=bd.STANDARD,oM=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],lM=["TimeoutError","RequestTimeout","RequestTimeoutException"],uM=[500,502,503,504],cM=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],fM=r=>{var e;return(e=r.$metadata)==null?void 0:e.clockSkewCorrected},nw=r=>{var e,t;return((e=r.$metadata)==null?void 0:e.httpStatusCode)===429||oM.includes(r.name)||((t=r.$retryable)==null?void 0:t.throttling)==!0},rw=r=>{var e;return fM(r)||lM.includes(r.name)||cM.includes((r==null?void 0:r.code)||"")||uM.includes(((e=r.$metadata)==null?void 0:e.httpStatusCode)||0)},dM=r=>{var e;if(((e=r.$metadata)==null?void 0:e.httpStatusCode)!==void 0){const t=r.$metadata.httpStatusCode;return 500<=t&&t<=599&&!rw(r)}return!1};class hM{constructor(e){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=(e==null?void 0:e.beta)??.7,this.minCapacity=(e==null?void 0:e.minCapacity)??1,this.minFillRate=(e==null?void 0:e.minFillRate)??.5,this.scaleConstant=(e==null?void 0:e.scaleConstant)??.4,this.smooth=(e==null?void 0:e.smooth)??.8;const t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(this.enabled){if(this.refillTokenBucket(),e>this.currentCapacity){const t=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise(n=>setTimeout(n,t))}this.currentCapacity=this.currentCapacity-e}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=e;return}const t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}updateClientSendingRate(e){let t;if(this.updateMeasuredRate(),nw(e)){const s=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=s,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(s),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());const n=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(n)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const e=this.getCurrentTimeInSeconds(),t=Math.floor(e*2)/2;if(this.requestCount++,t>this.lastTxRateBucket){const n=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(n*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}const qy=100,iw=20*1e3,pM=500,sw=500,mM=5,gM=10,vM=1,yM="amz-sdk-invocation-id",SM="amz-sdk-request",EM=()=>{let r=qy;return{computeNextBackoffDelay:n=>Math.floor(Math.min(iw,Math.random()*2**n*r)),setDelayBase:n=>{r=n}}},aw=({retryDelay:r,retryCount:e,retryCost:t})=>({getRetryCount:()=>e,getRetryDelay:()=>Math.min(iw,r),getRetryCost:()=>t});class ow{constructor(e){this.maxAttempts=e,this.mode=bd.STANDARD,this.capacity=sw,this.retryBackoffStrategy=EM(),this.maxAttemptsProvider=typeof e=="function"?e:async()=>e}async acquireInitialRetryToken(e){return aw({retryDelay:qy,retryCount:0})}async refreshRetryTokenForRetry(e,t){const n=await this.getMaxAttempts();if(this.shouldRetry(e,t,n)){const s=t.errorType;this.retryBackoffStrategy.setDelayBase(s==="THROTTLING"?pM:qy);const o=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),u=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,o):o,c=this.getCapacityCost(s);return this.capacity-=c,aw({retryDelay:u,retryCount:e.getRetryCount()+1,retryCost:c})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(sw,this.capacity+(e.getRetryCost()??vM))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${Xh}`),Xh}}shouldRetry(e,t,n){return e.getRetryCount()+1<n&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return e==="TRANSIENT"?gM:mM}isRetryableError(e){return e==="THROTTLING"||e==="TRANSIENT"}}class xM{constructor(e,t){this.maxAttemptsProvider=e,this.mode=bd.ADAPTIVE;const{rateLimiter:n}=t??{};this.rateLimiter=n??new hM,this.standardRetryStrategy=new ow(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}let cg;const bM=new Uint8Array(16);function TM(){if(!cg&&(cg=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!cg))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return cg(bM)}const ds=[];for(let r=0;r<256;++r)ds.push((r+256).toString(16).slice(1));function wM(r,e=0){return ds[r[e+0]]+ds[r[e+1]]+ds[r[e+2]]+ds[r[e+3]]+"-"+ds[r[e+4]]+ds[r[e+5]]+"-"+ds[r[e+6]]+ds[r[e+7]]+"-"+ds[r[e+8]]+ds[r[e+9]]+"-"+ds[r[e+10]]+ds[r[e+11]]+ds[r[e+12]]+ds[r[e+13]]+ds[r[e+14]]+ds[r[e+15]]}const lw={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function CM(r,e,t){if(lw.randomUUID&&!e&&!r)return lw.randomUUID();r=r||{};const n=r.random||(r.rng||TM)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,wM(n)}const RM=r=>r instanceof Error?r:r instanceof Object?Object.assign(new Error,r):typeof r=="string"?new Error(r):new Error(`AWS SDK error wrapper for ${r}`),uw=r=>{const{retryStrategy:e}=r,t=hu(r.maxAttempts??Xh);return{...r,maxAttempts:t,retryStrategy:async()=>e||(await hu(r.retryMode)()===bd.ADAPTIVE?new xM(t):new ow(t))}};class Yy{trace(){}debug(){}info(){}warn(){}error(){}}const Qc=(r,e)=>{const t=[];if(r&&t.push(r),e)for(const n of e)t.push(n);return t},dc=(r,e)=>`${r||"anonymous"}${e&&e.length>0?` (a.k.a. ${e.join(",")})`:""}`,fg=()=>{let r=[],e=[],t=!1;const n=new Set,s=E=>E.sort((T,R)=>cw[R.step]-cw[T.step]||fw[R.priority||"normal"]-fw[T.priority||"normal"]),o=E=>{let T=!1;const R=_=>{const L=Qc(_.name,_.aliases);if(L.includes(E)){T=!0;for(const M of L)n.delete(M);return!1}return!0};return r=r.filter(R),e=e.filter(R),T},u=E=>{let T=!1;const R=_=>{if(_.middleware===E){T=!0;for(const L of Qc(_.name,_.aliases))n.delete(L);return!1}return!0};return r=r.filter(R),e=e.filter(R),T},c=E=>{var T;return r.forEach(R=>{E.add(R.middleware,{...R})}),e.forEach(R=>{E.addRelativeTo(R.middleware,{...R})}),(T=E.identifyOnResolve)==null||T.call(E,y.identifyOnResolve()),E},h=E=>{const T=[];return E.before.forEach(R=>{R.before.length===0&&R.after.length===0?T.push(R):T.push(...h(R))}),T.push(E),E.after.reverse().forEach(R=>{R.before.length===0&&R.after.length===0?T.push(R):T.push(...h(R))}),T},m=(E=!1)=>{const T=[],R=[],_={};return r.forEach(M=>{const F={...M,before:[],after:[]};for(const Z of Qc(F.name,F.aliases))_[Z]=F;T.push(F)}),e.forEach(M=>{const F={...M,before:[],after:[]};for(const Z of Qc(F.name,F.aliases))_[Z]=F;R.push(F)}),R.forEach(M=>{if(M.toMiddleware){const F=_[M.toMiddleware];if(F===void 0){if(E)return;throw new Error(`${M.toMiddleware} is not found when adding ${dc(M.name,M.aliases)} middleware ${M.relation} ${M.toMiddleware}`)}M.relation==="after"&&F.after.push(M),M.relation==="before"&&F.before.push(M)}}),s(T).map(h).reduce((M,F)=>(M.push(...F),M),[])},y={add:(E,T={})=>{const{name:R,override:_,aliases:L}=T,M={step:"initialize",priority:"normal",middleware:E,...T},F=Qc(R,L);if(F.length>0){if(F.some(Z=>n.has(Z))){if(!_)throw new Error(`Duplicate middleware name '${dc(R,L)}'`);for(const Z of F){const K=r.findIndex(X=>{var ue;return X.name===Z||((ue=X.aliases)==null?void 0:ue.some(ie=>ie===Z))});if(K===-1)continue;const Y=r[K];if(Y.step!==M.step||M.priority!==Y.priority)throw new Error(`"${dc(Y.name,Y.aliases)}" middleware with ${Y.priority} priority in ${Y.step} step cannot be overridden by "${dc(R,L)}" middleware with ${M.priority} priority in ${M.step} step.`);r.splice(K,1)}}for(const Z of F)n.add(Z)}r.push(M)},addRelativeTo:(E,T)=>{const{name:R,override:_,aliases:L}=T,M={middleware:E,...T},F=Qc(R,L);if(F.length>0){if(F.some(Z=>n.has(Z))){if(!_)throw new Error(`Duplicate middleware name '${dc(R,L)}'`);for(const Z of F){const K=e.findIndex(X=>{var ue;return X.name===Z||((ue=X.aliases)==null?void 0:ue.some(ie=>ie===Z))});if(K===-1)continue;const Y=e[K];if(Y.toMiddleware!==M.toMiddleware||Y.relation!==M.relation)throw new Error(`"${dc(Y.name,Y.aliases)}" middleware ${Y.relation} "${Y.toMiddleware}" middleware cannot be overridden by "${dc(R,L)}" middleware ${M.relation} "${M.toMiddleware}" middleware.`);e.splice(K,1)}}for(const Z of F)n.add(Z)}e.push(M)},clone:()=>c(fg()),use:E=>{E.applyToStack(y)},remove:E=>typeof E=="string"?o(E):u(E),removeByTag:E=>{let T=!1;const R=_=>{const{tags:L,name:M,aliases:F}=_;if(L&&L.includes(E)){const Z=Qc(M,F);for(const K of Z)n.delete(K);return T=!0,!1}return!0};return r=r.filter(R),e=e.filter(R),T},concat:E=>{var R;const T=c(fg());return T.use(E),T.identifyOnResolve(t||T.identifyOnResolve()||(((R=E.identifyOnResolve)==null?void 0:R.call(E))??!1)),T},applyToStack:c,identify:()=>m(!0).map(E=>{const T=E.step??E.relation+" "+E.toMiddleware;return dc(E.name,E.aliases)+" - "+T}),identifyOnResolve(E){return typeof E=="boolean"&&(t=E),t},resolve:(E,T)=>{for(const R of m().map(_=>_.middleware).reverse())E=R(E,T);return t&&console.log(y.identify()),E}};return y},cw={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},fw={high:3,normal:2,low:1};class dw{constructor(e){this.middlewareStack=fg(),this.config=e}send(e,t,n){const s=typeof t!="function"?t:void 0,o=typeof t=="function"?t:n,u=e.resolveMiddleware(this.middlewareStack,this.config,s);if(o)u(e).then(c=>o(null,c.output),c=>o(c)).catch(()=>{});else return u(e).then(c=>c.output)}destroy(){this.config.requestHandler.destroy&&this.config.requestHandler.destroy()}}const hc={},Td=new Array(64);for(let r=0,e=65,t=90;r+e<=t;r++){const n=String.fromCharCode(r+e);hc[n]=r,Td[r]=n}for(let r=0,e=97,t=122;r+e<=t;r++){const n=String.fromCharCode(r+e),s=r+26;hc[n]=s,Td[s]=n}for(let r=0;r<10;r++){hc[r.toString(10)]=r+52;const e=r.toString(10),t=r+52;hc[e]=t,Td[t]=e}hc["+"]=62,Td[62]="+",hc["/"]=63,Td[63]="/";const wd=6,Qh=8,AM=63,dg=r=>{let e=r.length/4*3;r.slice(-2)==="=="?e-=2:r.slice(-1)==="="&&e--;const t=new ArrayBuffer(e),n=new DataView(t);for(let s=0;s<r.length;s+=4){let o=0,u=0;for(let m=s,y=s+3;m<=y;m++)if(r[m]!=="="){if(!(r[m]in hc))throw new TypeError(`Invalid character ${r[m]} in base64 string.`);o|=hc[r[m]]<<(y-m)*wd,u+=wd}else o>>=wd;const c=s/4*3;o>>=u%Qh;const h=Math.floor(u/Qh);for(let m=0;m<h;m++){const y=(h-m-1)*Qh;n.setUint8(c+m,(o&255<<y)>>y)}}return new Uint8Array(t)},Jc=r=>new TextEncoder().encode(r),Jh=r=>typeof r=="string"?Jc(r):ArrayBuffer.isView(r)?new Uint8Array(r.buffer,r.byteOffset,r.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(r),Xy=r=>{if(typeof r=="string")return r;if(typeof r!="object"||typeof r.byteOffset!="number"||typeof r.byteLength!="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(r)};function Qy(r){let e;typeof r=="string"?e=Jc(r):e=r;const t=typeof e=="object"&&typeof e.length=="number",n=typeof e=="object"&&typeof e.byteOffset=="number"&&typeof e.byteLength=="number";if(!t&&!n)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let s="";for(let o=0;o<e.length;o+=3){let u=0,c=0;for(let m=o,y=Math.min(o+3,e.length);m<y;m++)u|=e[m]<<(y-m-1)*Qh,c+=Qh;const h=Math.ceil(c/wd);u<<=h*wd-c;for(let m=1;m<=h;m++){const y=(h-m)*wd;s+=Td[(u&AM<<y)>>y]}s+="==".slice(0,4-h)}return s}function _M(r,e="utf-8"){return e==="base64"?Qy(r):Xy(r)}function LM(r,e){return e==="base64"?Zc.mutate(dg(r)):Zc.mutate(Jc(r))}class Zc extends Uint8Array{static fromString(e,t="utf-8"){switch(typeof e){case"string":return LM(e,t);default:throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}}static mutate(e){return Object.setPrototypeOf(e,Zc.prototype),e}transformToString(e="utf-8"){return _M(this,e)}}const pc=r=>encodeURIComponent(r).replace(/[!'()*]/g,kM),kM=r=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`;function DM(r){const e=[];for(let t of Object.keys(r).sort()){const n=r[t];if(t=pc(t),Array.isArray(n))for(let s=0,o=n.length;s<o;s++)e.push(`${t}=${pc(n[s])}`);else{let s=t;(n||typeof n=="string")&&(s+=`=${pc(n)}`),e.push(s)}}return e.join("&")}function IM(r=0){return new Promise((e,t)=>{r&&setTimeout(()=>{const n=new Error(`Request did not complete within ${r} ms`);n.name="TimeoutError",t(n)},r)})}const Jy={supported:void 0};class hg{static create(e){return typeof(e==null?void 0:e.handle)=="function"?e:new hg(e)}constructor(e){typeof e=="function"?this.configProvider=e().then(t=>t||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),Jy.supported===void 0&&(Jy.supported=typeof Request<"u"&&"keepalive"in new Request("https://[::1]"))}destroy(){}async handle(e,{abortSignal:t}={}){this.config||(this.config=await this.configProvider);const n=this.config.requestTimeout,s=this.config.keepAlive===!0,o=this.config.credentials;if(t!=null&&t.aborted){const F=new Error("Request aborted");return F.name="AbortError",Promise.reject(F)}let u=e.path;const c=DM(e.query||{});c&&(u+=`?${c}`),e.fragment&&(u+=`#${e.fragment}`);let h="";if(e.username!=null||e.password!=null){const F=e.username??"",Z=e.password??"";h=`${F}:${Z}@`}const{port:m,method:y}=e,E=`${e.protocol}//${h}${e.hostname}${m?`:${m}`:""}${u}`,T=y==="GET"||y==="HEAD"?void 0:e.body,R={body:T,headers:new Headers(e.headers),method:y,credentials:o};T&&(R.duplex="half"),typeof AbortController<"u"&&(R.signal=t),Jy.supported&&(R.keepalive=s);let _=()=>{};const L=new Request(E,R),M=[fetch(L).then(F=>{const Z=F.headers,K={};for(const X of Z.entries())K[X[0]]=X[1];return F.body!=null?{response:new lg({headers:K,reason:F.statusText,statusCode:F.status,body:F.body})}:F.blob().then(X=>({response:new lg({headers:K,reason:F.statusText,statusCode:F.status,body:X})}))}),IM(n)];return t&&M.push(new Promise((F,Z)=>{const K=()=>{const Y=new Error("Request aborted");Y.name="AbortError",Z(Y)};if(typeof t.addEventListener=="function"){const Y=t;Y.addEventListener("abort",K,{once:!0}),_=()=>Y.removeEventListener("abort",K)}else t.onabort=K})),Promise.race(M).finally(_)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[e]=t,n))}httpHandlerConfigs(){return this.config??{}}}const hw=r=>typeof Blob=="function"&&r instanceof Blob?PM(r):MM(r);async function PM(r){const e=await OM(r),t=dg(e);return new Uint8Array(t)}async function MM(r){const e=[],t=r.getReader();let n=!1,s=0;for(;!n;){const{done:c,value:h}=await t.read();h&&(e.push(h),s+=h.length),n=c}const o=new Uint8Array(s);let u=0;for(const c of e)o.set(c,u),u+=c.length;return o}function OM(r){return new Promise((e,t)=>{const n=new FileReader;n.onloadend=()=>{if(n.readyState!==2)return t(new Error("Reader aborted too early"));const s=n.result??"",o=s.indexOf(","),u=o>-1?o+1:s.length;e(s.substring(u))},n.onabort=()=>t(new Error("Read aborted")),n.onerror=()=>t(n.error),n.readAsDataURL(r)})}const pw={},Zy={};for(let r=0;r<256;r++){let e=r.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),pw[r]=e,Zy[e]=r}function mw(r){if(r.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const e=new Uint8Array(r.length/2);for(let t=0;t<r.length;t+=2){const n=r.slice(t,t+2).toLowerCase();if(n in Zy)e[t/2]=Zy[n];else throw new Error(`Cannot decode unrecognized sequence ${n} as hexadecimal`)}return e}function Ma(r){let e="";for(let t=0;t<r.byteLength;t++)e+=pw[r[t]];return e}const FM=async(r=new Uint8Array,e)=>{if(r instanceof Uint8Array)return Zc.mutate(r);if(!r)return Zc.mutate(new Uint8Array);const t=e.streamCollector(r);return Zc.mutate(await t)};class pg{constructor(){this.middlewareStack=fg()}static classBuilder(){return new NM}resolveMiddlewareWithContext(e,t,n,{middlewareFn:s,clientName:o,commandName:u,inputFilterSensitiveLog:c,outputFilterSensitiveLog:h,smithyContext:m,additionalContext:y,CommandCtor:E}){for(const M of s.bind(this)(E,e,t,n))this.middlewareStack.use(M);const T=e.concat(this.middlewareStack),{logger:R}=t,_={logger:R,clientName:o,commandName:u,inputFilterSensitiveLog:c,outputFilterSensitiveLog:h,[Ny]:{commandInstance:this,...m},...y},{requestHandler:L}=t;return T.resolve(M=>L.handle(M.request,n||{}),_)}}class NM{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=e=>e,this._outputFilterSensitiveLog=e=>e,this._serializer=null,this._deserializer=null}init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,n={}){return this._smithyContext={service:e,operation:t,...n},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=n=>n,t=n=>n){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}build(){const e=this;let t;return t=class extends pg{static getEndpointParameterInstructions(){return e._ep}constructor(...[n]){super(),this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=n??{},e._init(this)}resolveMiddleware(n,s,o){return this.resolveMiddlewareWithContext(n,s,o,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog,outputFilterSensitiveLog:e._outputFilterSensitiveLog,smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}const eS=r=>{if(r!=null){if(typeof r=="string"){const e=parseFloat(r);if(!Number.isNaN(e))return String(e)!==String(r)&&vw.warn(gw(`Expected number but observed string: ${r}`)),e}if(typeof r=="number")return r;throw new TypeError(`Expected number, got ${typeof r}: ${r}`)}},UM=(r,e)=>{if(r==null)throw new TypeError("Expected a non-null value");return r},mg=r=>{if(r!=null){if(typeof r=="string")return r;if(["boolean","number","bigint"].includes(typeof r))return vw.warn(gw(`Expected string, got ${typeof r}: ${r}`)),String(r);throw new TypeError(`Expected string, got ${typeof r}: ${r}`)}},BM=r=>eS(typeof r=="string"?VM(r):r),$M=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,VM=r=>{const e=r.match($M);if(e===null||e[0].length!==r.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(r)},gw=r=>String(new TypeError(r).stack||r).split(`
|
|
254
|
+
`).slice(0,5).filter(e=>!e.includes("stackTraceWarning")).join(`
|
|
255
|
+
`),vw={warn:console.warn},zM=r=>{if(r==null)return;let e;if(typeof r=="number")e=r;else if(typeof r=="string")e=BM(r);else if(typeof r=="object"&&r.tag===1)e=r.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(e)||e===1/0||e===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(e*1e3))};class gg extends Error{constructor(e){super(e.message),Object.setPrototypeOf(this,gg.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}}const wr=(r,e={})=>{Object.entries(e).filter(([,n])=>n!==void 0).forEach(([n,s])=>{(r[n]==null||r[n]==="")&&(r[n]=s)});const t=r.message||r.Message||"UnknownError";return r.message=t,delete r.Message,r},jM=({output:r,parsedBody:e,exceptionCtor:t,errorCode:n})=>{const s=HM(r),o=s.httpStatusCode?s.httpStatusCode+"":void 0,u=new t({name:(e==null?void 0:e.code)||(e==null?void 0:e.Code)||n||o||"UnknownError",$fault:"client",$metadata:s});throw wr(u,e)},yw=r=>({output:e,parsedBody:t,errorCode:n})=>{jM({output:e,parsedBody:t,exceptionCtor:r,errorCode:n})},HM=r=>({httpStatusCode:r.statusCode,requestId:r.headers["x-amzn-requestid"]??r.headers["x-amzn-request-id"]??r.headers["x-amz-request-id"],extendedRequestId:r.headers["x-amz-id-2"],cfId:r.headers["x-amz-cf-id"]}),Sw=r=>{switch(r){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},GM=r=>{const e=[];for(const t in og){const n=og[t];r[n]!==void 0&&e.push({algorithmId:()=>n,checksumConstructor:()=>r[n]})}return{_checksumAlgorithms:e,addChecksumAlgorithm(t){this._checksumAlgorithms.push(t)},checksumAlgorithms(){return this._checksumAlgorithms}}},WM=r=>{const e={};return r.checksumAlgorithms().forEach(t=>{e[t.algorithmId()]=t.checksumConstructor()}),e},KM=r=>{let e=r.retryStrategy;return{setRetryStrategy(t){e=t},retryStrategy(){return e}}},qM=r=>{const e={};return e.retryStrategy=r.retryStrategy(),e},Ew=r=>({...GM(r),...KM(r)}),xw=r=>({...WM(r),...qM(r)}),tS=function(){const r=Object.getPrototypeOf(this).constructor,e=Function.bind.apply(String,[null,...arguments]),t=new e;return Object.setPrototypeOf(t,r.prototype),t};tS.prototype=Object.create(String.prototype,{constructor:{value:tS,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(tS,String);const nS=(r,e)=>{const t={};for(const n in e)YM(t,r,e,n);return t},YM=(r,e,t,n)=>{if(e!==null){let u=t[n];typeof u=="function"&&(u=[,u]);const[c=XM,h=QM,m=n]=u;(typeof c=="function"&&c(e[m])||typeof c!="function"&&c)&&(r[n]=h(e[m]));return}let[s,o]=t[n];if(typeof o=="function"){let u;const c=s===void 0&&(u=o())!=null,h=typeof s=="function"&&!!s(void 0)||typeof s!="function"&&!!s;c?r[n]=u:h&&(r[n]=o())}else{const u=s===void 0&&o!=null,c=typeof s=="function"&&!!s(o)||typeof s!="function"&&!!s;(u||c)&&(r[n]=o)}},XM=r=>r!=null,QM=r=>r,Qn=r=>{if(r==null)return{};if(Array.isArray(r))return r.filter(e=>e!=null).map(Qn);if(typeof r=="object"){const e={};for(const t of Object.keys(r))r[t]!=null&&(e[t]=Qn(r[t]));return e}return r},JM=r=>(r==null?void 0:r.body)instanceof ReadableStream,ZM=r=>(e,t)=>async n=>{var u;let s=await r.retryStrategy();const o=await r.maxAttempts();if(eO(s)){s=s;let c=await s.acquireInitialRetryToken(t.partition_id),h=new Error,m=0,y=0;const{request:E}=n,T=aa.isInstance(E);for(T&&(E.headers[yM]=CM());;)try{T&&(E.headers[SM]=`attempt=${m+1}; max=${o}`);const{response:R,output:_}=await e(n);return s.recordSuccess(c),_.$metadata.attempts=m+1,_.$metadata.totalRetryDelay=y,{response:R,output:_}}catch(R){const _=tO(R);if(h=RM(R),T&&JM(E))throw(u=t.logger instanceof Yy?console:t.logger)==null||u.warn("An error was encountered in a non-retryable streaming request."),h;try{c=await s.refreshRetryTokenForRetry(c,_)}catch{throw h.$metadata||(h.$metadata={}),h.$metadata.attempts=m+1,h.$metadata.totalRetryDelay=y,h}m=c.getRetryCount();const L=c.getRetryDelay();y+=L,await new Promise(M=>setTimeout(M,L))}}else return s=s,s!=null&&s.mode&&(t.userAgent=[...t.userAgent||[],["cfg/retry-mode",s.mode]]),s.retry(e,n)},eO=r=>typeof r.acquireInitialRetryToken<"u"&&typeof r.refreshRetryTokenForRetry<"u"&&typeof r.recordSuccess<"u",tO=r=>{const e={error:r,errorType:nO(r)},t=rO(r.$response);return t&&(e.retryAfterHint=t),e},nO=r=>nw(r)?"THROTTLING":rw(r)?"TRANSIENT":dM(r)?"SERVER_ERROR":"CLIENT_ERROR",bw={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Tw=r=>({applyToStack:e=>{e.add(ZM(r),bw)}}),rO=r=>{if(!lg.isInstance(r))return;const e=Object.keys(r.headers).find(o=>o.toLowerCase()==="retry-after");if(!e)return;const t=r.headers[e],n=Number(t);return Number.isNaN(n)?new Date(t):new Date(n*1e3)},iO={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:bw.name},ww=r=>({applyToStack:e=>{e.addRelativeTo(aM(),iO)}});class Cw{constructor(e){this.authSchemes=new Map;for(const[t,n]of Object.entries(e))n!==void 0&&this.authSchemes.set(t,n)}getIdentityProvider(e){return this.authSchemes.get(e)}}class sO{async sign(e,t,n){return e}}const aO=(r=>e=>Rw(e)&&e.expiration.getTime()-Date.now()<r)(3e5),Rw=r=>r.expiration!==void 0,oO=(r,e,t)=>{if(r===void 0)return;const n=typeof r!="function"?async()=>Promise.resolve(r):r;let s,o,u,c=!1;const h=async m=>{o||(o=n(m));try{s=await o,u=!0,c=!1}finally{o=void 0}return s};return e===void 0?async m=>((!u||m!=null&&m.forceRefresh)&&(s=await h(m)),s):async m=>((!u||m!=null&&m.forceRefresh)&&(s=await h(m)),c?s:t(s)?(e(s)&&await h(m),s):(c=!0,s))},vg=r=>{if(typeof r=="function")return r;const e=Promise.resolve(r);return()=>e},lO=r=>({...r,eventStreamMarshaller:r.eventStreamSerdeProvider(r)}),Aw="content-length";function uO(r){return e=>async t=>{const n=t.request;if(aa.isInstance(n)){const{body:s,headers:o}=n;if(s&&Object.keys(o).map(u=>u.toLowerCase()).indexOf(Aw)===-1)try{const u=r(s);n.headers={...n.headers,[Aw]:String(u)}}catch{}}return e({...t,request:n})}}const cO={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},_w=r=>({applyToStack:e=>{e.add(uO(r.bodyLengthChecker),cO)}}),Lw=r=>{var e,t;return lg.isInstance(r)?((e=r.headers)==null?void 0:e.date)??((t=r.headers)==null?void 0:t.Date):void 0},kw=r=>new Date(Date.now()+r),fO=(r,e)=>Math.abs(kw(e).getTime()-r)>=3e5,Dw=(r,e)=>{const t=Date.parse(r);return fO(t,e)?t-Date.now():e},Zh=(r,e)=>{if(!e)throw new Error(`Property \`${r}\` is not resolved for AWS SDK SigV4Auth`);return e},dO=async r=>{var m,y,E;const e=Zh("context",r.context),t=Zh("config",r.config),n=(E=(y=(m=e.endpointV2)==null?void 0:m.properties)==null?void 0:y.authSchemes)==null?void 0:E[0],o=await Zh("signer",t.signer)(n),u=r==null?void 0:r.signingRegion,c=r==null?void 0:r.signingRegionSet,h=r==null?void 0:r.signingName;return{config:t,signer:o,signingRegion:u,signingRegionSet:c,signingName:h}};class Iw{async sign(e,t,n){var E;if(!aa.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const s=await dO(n),{config:o,signer:u}=s;let{signingRegion:c,signingName:h}=s;const m=n.context;if(((E=m==null?void 0:m.authSchemes)==null?void 0:E.length)??!1){const[T,R]=m.authSchemes;(T==null?void 0:T.name)==="sigv4a"&&(R==null?void 0:R.name)==="sigv4"&&(c=(R==null?void 0:R.signingRegion)??c,h=(R==null?void 0:R.signingName)??h)}return await u.sign(e,{signingDate:kw(o.systemClockOffset),signingRegion:c,signingService:h})}errorHandler(e){return t=>{const n=t.ServerTime??Lw(t.$response);if(n){const s=Zh("config",e.config),o=s.systemClockOffset;s.systemClockOffset=Dw(n,s.systemClockOffset),s.systemClockOffset!==o&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const n=Lw(e);if(n){const s=Zh("config",t.config);s.systemClockOffset=Dw(n,s.systemClockOffset)}}}class rS extends Error{constructor(e,t=!0){var o;let n,s=!0;typeof t=="boolean"?(n=void 0,s=t):t!=null&&typeof t=="object"&&(n=t.logger,s=t.tryNextLink??!0),super(e),this.name="ProviderError",this.tryNextLink=s,Object.setPrototypeOf(this,rS.prototype),(o=n==null?void 0:n.debug)==null||o.call(n,`@smithy/property-provider ${s?"->":"(!)"} ${e}`)}static from(e,t=!0){return Object.assign(new this(e.message,t),e)}}class Cd extends rS{constructor(e,t=!0){super(e,t),this.name="CredentialsProviderError",Object.setPrototypeOf(this,Cd.prototype)}}const hO=(r,e,t)=>{let n,s,o,u=!1;const c=async()=>{s||(s=r());try{n=await s,o=!0,u=!1}finally{s=void 0}return n};return async h=>((!o||h!=null&&h.forceRefresh)&&(n=await c()),n)},pO="X-Amz-Algorithm",mO="X-Amz-Credential",Pw="X-Amz-Date",gO="X-Amz-SignedHeaders",vO="X-Amz-Expires",Mw="X-Amz-Signature",Ow="X-Amz-Security-Token",Fw="authorization",Nw=Pw.toLowerCase(),yO=[Fw,Nw,"date"],SO=Mw.toLowerCase(),iS="x-amz-content-sha256",EO=Ow.toLowerCase(),xO={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},bO=/^proxy-/,TO=/^sec-/,sS="AWS4-HMAC-SHA256",wO="AWS4-HMAC-SHA256-PAYLOAD",CO="UNSIGNED-PAYLOAD",RO=50,Uw="aws4_request",AO=60*60*24*7,yg={},aS=[],oS=(r,e,t)=>`${r}/${e}/${t}/${Uw}`,_O=async(r,e,t,n,s)=>{const o=await Bw(r,e.secretAccessKey,e.accessKeyId),u=`${t}:${n}:${s}:${Ma(o)}:${e.sessionToken}`;if(u in yg)return yg[u];for(aS.push(u);aS.length>RO;)delete yg[aS.shift()];let c=`AWS4${e.secretAccessKey}`;for(const h of[t,n,s,Uw])c=await Bw(r,c,h);return yg[u]=c},Bw=(r,e,t)=>{const n=new r(e);return n.update(Jh(t)),n.digest()},$w=({headers:r},e,t)=>{const n={};for(const s of Object.keys(r).sort()){if(r[s]==null)continue;const o=s.toLowerCase();(o in xO||e!=null&&e.has(o)||bO.test(o)||TO.test(o))&&(!t||t&&!t.has(o))||(n[o]=r[s].trim().replace(/\s+/g," "))}return n},LO=({query:r={}})=>{const e=[],t={};for(const n of Object.keys(r).sort()){if(n.toLowerCase()===SO)continue;e.push(n);const s=r[n];typeof s=="string"?t[n]=`${pc(n)}=${pc(s)}`:Array.isArray(s)&&(t[n]=s.slice(0).reduce((o,u)=>o.concat([`${pc(n)}=${pc(u)}`]),[]).sort().join("&"))}return e.map(n=>t[n]).filter(n=>n).join("&")},kO=r=>typeof ArrayBuffer=="function"&&r instanceof ArrayBuffer||Object.prototype.toString.call(r)==="[object ArrayBuffer]",lS=async({headers:r,body:e},t)=>{for(const n of Object.keys(r))if(n.toLowerCase()===iS)return r[n];if(e==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof e=="string"||ArrayBuffer.isView(e)||kO(e)){const n=new t;return n.update(Jh(e)),Ma(await n.digest())}return CO};class DO{format(e){const t=[];for(const o of Object.keys(e)){const u=Jc(o);t.push(Uint8Array.from([u.byteLength]),u,this.formatHeaderValue(e[o]))}const n=new Uint8Array(t.reduce((o,u)=>o+u.byteLength,0));let s=0;for(const o of t)n.set(o,s),s+=o.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const s=new Uint8Array(9);return s[0]=5,s.set(e.value.bytes,1),s;case"binary":const o=new DataView(new ArrayBuffer(3+e.value.byteLength));o.setUint8(0,6),o.setUint16(1,e.value.byteLength,!1);const u=new Uint8Array(o.buffer);return u.set(e.value,3),u;case"string":const c=Jc(e.value),h=new DataView(new ArrayBuffer(3+c.byteLength));h.setUint8(0,7),h.setUint16(1,c.byteLength,!1);const m=new Uint8Array(h.buffer);return m.set(c,3),m;case"timestamp":const y=new Uint8Array(9);return y[0]=8,y.set(PO.fromNumber(e.value.valueOf()).bytes,1),y;case"uuid":if(!IO.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const E=new Uint8Array(17);return E[0]=9,E.set(mw(e.value.replace(/\-/g,"")),1),E}}}var Vw;(function(r){r[r.boolTrue=0]="boolTrue",r[r.boolFalse=1]="boolFalse",r[r.byte=2]="byte",r[r.short=3]="short",r[r.integer=4]="integer",r[r.long=5]="long",r[r.byteArray=6]="byteArray",r[r.string=7]="string",r[r.timestamp=8]="timestamp",r[r.uuid=9]="uuid"})(Vw||(Vw={}));const IO=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;let PO=class MI{constructor(e){if(this.bytes=e,e.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>9223372036854776e3||e<-9223372036854776e3)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let n=7,s=Math.abs(Math.round(e));n>-1&&s>0;n--,s/=256)t[n]=s;return e<0&&zw(t),new MI(t)}valueOf(){const e=this.bytes.slice(0),t=e[0]&128;return t&&zw(e),parseInt(Ma(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}};function zw(r){for(let e=0;e<8;e++)r[e]^=255;for(let e=7;e>-1&&(r[e]++,r[e]===0);e--);}const MO=(r,e)=>{r=r.toLowerCase();for(const t of Object.keys(e))if(r===t.toLowerCase())return!0;return!1},OO=(r,e={})=>{var s;const{headers:t,query:n={}}=aa.clone(r);for(const o of Object.keys(t)){const u=o.toLowerCase();u.slice(0,6)==="x-amz-"&&!((s=e.unhoistableHeaders)!=null&&s.has(u))&&(n[o]=t[o],delete t[o])}return{...r,headers:t,query:n}},jw=r=>{r=aa.clone(r);for(const e of Object.keys(r.headers))yO.indexOf(e.toLowerCase())>-1&&delete r.headers[e];return r},FO=r=>NO(r).toISOString().replace(/\.\d{3}Z$/,"Z"),NO=r=>typeof r=="number"?new Date(r*1e3):typeof r=="string"?Number(r)?new Date(Number(r)*1e3):new Date(r):r;class Hw{constructor({applyChecksum:e,credentials:t,region:n,service:s,sha256:o,uriEscapePath:u=!0}){this.headerFormatter=new DO,this.service=s,this.sha256=o,this.uriEscapePath=u,this.applyChecksum=typeof e=="boolean"?e:!0,this.regionProvider=hu(n),this.credentialProvider=hu(t)}async presign(e,t={}){const{signingDate:n=new Date,expiresIn:s=3600,unsignableHeaders:o,unhoistableHeaders:u,signableHeaders:c,signingRegion:h,signingService:m}=t,y=await this.credentialProvider();this.validateResolvedCredentials(y);const E=h??await this.regionProvider(),{longDate:T,shortDate:R}=Sg(n);if(s>AO)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const _=oS(R,E,m??this.service),L=OO(jw(e),{unhoistableHeaders:u});y.sessionToken&&(L.query[Ow]=y.sessionToken),L.query[pO]=sS,L.query[mO]=`${y.accessKeyId}/${_}`,L.query[Pw]=T,L.query[vO]=s.toString(10);const M=$w(L,o,c);return L.query[gO]=Gw(M),L.query[Mw]=await this.getSignature(T,_,this.getSigningKey(y,E,R,m),this.createCanonicalRequest(L,M,await lS(e,this.sha256))),L}async sign(e,t){return typeof e=="string"?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:t},{signingDate:n=new Date,priorSignature:s,signingRegion:o,signingService:u}){const c=o??await this.regionProvider(),{shortDate:h,longDate:m}=Sg(n),y=oS(h,c,u??this.service),E=await lS({headers:{},body:t},this.sha256),T=new this.sha256;T.update(e);const R=Ma(await T.digest()),_=[wO,m,y,s,R,E].join(`
|
|
256
|
+
`);return this.signString(_,{signingDate:n,signingRegion:c,signingService:u})}async signMessage(e,{signingDate:t=new Date,signingRegion:n,signingService:s}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:n,signingService:s,priorSignature:e.priorSignature}).then(u=>({message:e.message,signature:u}))}async signString(e,{signingDate:t=new Date,signingRegion:n,signingService:s}={}){const o=await this.credentialProvider();this.validateResolvedCredentials(o);const u=n??await this.regionProvider(),{shortDate:c}=Sg(t),h=new this.sha256(await this.getSigningKey(o,u,c,s));return h.update(Jh(e)),Ma(await h.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:s,signingRegion:o,signingService:u}={}){const c=await this.credentialProvider();this.validateResolvedCredentials(c);const h=o??await this.regionProvider(),m=jw(e),{longDate:y,shortDate:E}=Sg(t),T=oS(E,h,u??this.service);m.headers[Nw]=y,c.sessionToken&&(m.headers[EO]=c.sessionToken);const R=await lS(m,this.sha256);!MO(iS,m.headers)&&this.applyChecksum&&(m.headers[iS]=R);const _=$w(m,s,n),L=await this.getSignature(y,T,this.getSigningKey(c,h,E,u),this.createCanonicalRequest(m,_,R));return m.headers[Fw]=`${sS} Credential=${c.accessKeyId}/${T}, SignedHeaders=${Gw(_)}, Signature=${L}`,m}createCanonicalRequest(e,t,n){const s=Object.keys(t).sort();return`${e.method}
|
|
257
|
+
${this.getCanonicalPath(e)}
|
|
258
|
+
${LO(e)}
|
|
259
|
+
${s.map(o=>`${o}:${t[o]}`).join(`
|
|
260
|
+
`)}
|
|
261
|
+
|
|
262
|
+
${s.join(";")}
|
|
263
|
+
${n}`}async createStringToSign(e,t,n){const s=new this.sha256;s.update(Jh(n));const o=await s.digest();return`${sS}
|
|
264
|
+
${e}
|
|
265
|
+
${t}
|
|
266
|
+
${Ma(o)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const t=[];for(const o of e.split("/"))(o==null?void 0:o.length)!==0&&o!=="."&&(o===".."?t.pop():t.push(o));const n=`${e!=null&&e.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&(e!=null&&e.endsWith("/"))?"/":""}`;return pc(n).replace(/%2F/g,"/")}return e}async getSignature(e,t,n,s){const o=await this.createStringToSign(e,t,s),u=new this.sha256(await n);return u.update(Jh(o)),Ma(await u.digest())}getSigningKey(e,t,n,s){return _O(this.sha256,e,n,t,s||this.service)}validateResolvedCredentials(e){if(typeof e!="object"||typeof e.accessKeyId!="string"||typeof e.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}}const Sg=r=>{const e=FO(r).replace(/[\-:]/g,"");return{longDate:e,shortDate:e.slice(0,8)}},Gw=r=>Object.keys(r).sort().join(";"),Ww=r=>{let e;r.credentials&&(e=oO(r.credentials,aO,Rw)),e||(r.credentialDefaultProvider?e=vg(r.credentialDefaultProvider(Object.assign({},r,{parentClientConfig:r}))):e=async()=>{throw new Error("`credentials` is missing")});const{signingEscapePath:t=!0,systemClockOffset:n=r.systemClockOffset||0,sha256:s}=r;let o;return r.signer?o=vg(r.signer):r.regionInfoProvider?o=()=>vg(r.region)().then(async u=>[await r.regionInfoProvider(u,{useFipsEndpoint:await r.useFipsEndpoint(),useDualstackEndpoint:await r.useDualstackEndpoint()})||{},u]).then(([u,c])=>{const{signingRegion:h,signingService:m}=u;r.signingRegion=r.signingRegion||h||c,r.signingName=r.signingName||m||r.serviceId;const y={...r,credentials:e,region:r.signingRegion,service:r.signingName,sha256:s,uriEscapePath:t},E=r.signerConstructor||Hw;return new E(y)}):o=async u=>{u=Object.assign({},{name:"sigv4",signingName:r.signingName||r.defaultSigningName,signingRegion:await vg(r.region)(),properties:{}},u);const c=u.signingRegion,h=u.signingName;r.signingRegion=r.signingRegion||c,r.signingName=r.signingName||h||r.serviceId;const m={...r,credentials:e,region:r.signingRegion,service:r.signingName,sha256:s,uriEscapePath:t},y=r.signerConstructor||Hw;return new y(m)},{...r,systemClockOffset:n,signingEscapePath:t,credentials:e,signer:o}},UO=(r,e)=>FM(r,e).then(t=>e.utf8Encoder(t)),Eg=(r,e)=>UO(r,e).then(t=>{if(t.length)try{return JSON.parse(t)}catch(n){throw(n==null?void 0:n.name)==="SyntaxError"&&Object.defineProperty(n,"$responseBodyText",{value:t}),n}return{}}),Kw=async(r,e)=>{const t=await Eg(r,e);return t.message=t.message??t.Message,t},qw=(r,e)=>{const t=(o,u)=>Object.keys(o).find(c=>c.toLowerCase()===u.toLowerCase()),n=o=>{let u=o;return typeof u=="number"&&(u=u.toString()),u.indexOf(",")>=0&&(u=u.split(",")[0]),u.indexOf(":")>=0&&(u=u.split(":")[0]),u.indexOf("#")>=0&&(u=u.split("#")[1]),u},s=t(r.headers,"x-amzn-errortype");if(s!==void 0)return n(r.headers[s]);if(e.code!==void 0)return n(e.code);if(e.__type!==void 0)return n(e.__type)},BO=async(r,e,t)=>({operation:qh(e).operation,region:await hu(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function $O(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"kinesis",region:r.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}const VO=r=>{const e=[];switch(r.operation){default:e.push($O(r))}return e},zO=r=>({...Ww(r)}),jO=r=>({...r,useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,defaultSigningName:"kinesis"}),HO={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},GO={name:"@aws-sdk/client-kinesis",description:"AWS SDK for JavaScript Kinesis Client for Node.js, Browser and React Native",version:"3.637.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-kinesis","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo kinesis","test:e2e":"jest --config jest.config.e2e.js"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.637.0","@aws-sdk/client-sts":"3.637.0","@aws-sdk/core":"3.635.0","@aws-sdk/credential-provider-node":"3.637.0","@aws-sdk/middleware-host-header":"3.620.0","@aws-sdk/middleware-logger":"3.609.0","@aws-sdk/middleware-recursion-detection":"3.620.0","@aws-sdk/middleware-user-agent":"3.637.0","@aws-sdk/region-config-resolver":"3.614.0","@aws-sdk/types":"3.609.0","@aws-sdk/util-endpoints":"3.637.0","@aws-sdk/util-user-agent-browser":"3.609.0","@aws-sdk/util-user-agent-node":"3.614.0","@smithy/config-resolver":"^3.0.5","@smithy/core":"^2.4.0","@smithy/eventstream-serde-browser":"^3.0.6","@smithy/eventstream-serde-config-resolver":"^3.0.3","@smithy/eventstream-serde-node":"^3.0.5","@smithy/fetch-http-handler":"^3.2.4","@smithy/hash-node":"^3.0.3","@smithy/invalid-dependency":"^3.0.3","@smithy/middleware-content-length":"^3.0.5","@smithy/middleware-endpoint":"^3.1.0","@smithy/middleware-retry":"^3.0.15","@smithy/middleware-serde":"^3.0.3","@smithy/middleware-stack":"^3.0.3","@smithy/node-config-provider":"^3.1.4","@smithy/node-http-handler":"^3.1.4","@smithy/protocol-http":"^4.1.0","@smithy/smithy-client":"^3.2.0","@smithy/types":"^3.3.0","@smithy/url-parser":"^3.0.3","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.15","@smithy/util-defaults-mode-node":"^3.0.15","@smithy/util-endpoints":"^2.0.5","@smithy/util-middleware":"^3.0.3","@smithy/util-retry":"^3.0.3","@smithy/util-utf8":"^3.0.0","@smithy/util-waiter":"^3.1.2",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-kinesis",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-kinesis"}},WO=r=>new TextEncoder().encode(r);var KO=typeof Buffer<"u"&&Buffer.from?function(r){return Buffer.from(r,"utf8")}:WO;function ep(r){return r instanceof Uint8Array?r:typeof r=="string"?KO(r):ArrayBuffer.isView(r)?new Uint8Array(r.buffer,r.byteOffset,r.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(r)}function uS(r){return typeof r=="string"?r.length===0:r.byteLength===0}function qO(r){if(!Uint32Array.from){for(var e=new Uint32Array(r.length),t=0;t<r.length;)e[t]=r[t],t+=1;return e}return Uint32Array.from(r)}var Yw={name:"SHA-256"},Xw={name:"HMAC",hash:Yw},YO=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85]);const XO={};function xg(){return typeof window<"u"?window:typeof self<"u"?self:XO}var QO=function(){function r(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return r.prototype.update=function(e){if(!uS(e)){var t=ep(e),n=new Uint8Array(this.toHash.byteLength+t.byteLength);n.set(this.toHash,0),n.set(t,this.toHash.byteLength),this.toHash=n}},r.prototype.digest=function(){var e=this;return this.key?this.key.then(function(t){return xg().crypto.subtle.sign(Xw,t,e.toHash).then(function(n){return new Uint8Array(n)})}):uS(this.toHash)?Promise.resolve(YO):Promise.resolve().then(function(){return xg().crypto.subtle.digest(Yw,e.toHash)}).then(function(t){return Promise.resolve(new Uint8Array(t))})},r.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&this.secret!==void 0&&(this.key=new Promise(function(t,n){xg().crypto.subtle.importKey("raw",ep(e.secret),Xw,!1,["sign"]).then(t,n)}),this.key.catch(function(){}))},r}();function JO(r,e,t,n){function s(o){return o instanceof t?o:new t(function(u){u(o)})}return new(t||(t=Promise))(function(o,u){function c(y){try{m(n.next(y))}catch(E){u(E)}}function h(y){try{m(n.throw(y))}catch(E){u(E)}}function m(y){y.done?o(y.value):s(y.value).then(c,h)}m((n=n.apply(r,e||[])).next())})}function ZO(r,e){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,s,o,u=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return u.next=c(0),u.throw=c(1),u.return=c(2),typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function c(m){return function(y){return h([m,y])}}function h(m){if(n)throw new TypeError("Generator is already executing.");for(;u&&(u=0,m[0]&&(t=0)),t;)try{if(n=1,s&&(o=m[0]&2?s.return:m[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,m[1])).done)return o;switch(s=0,o&&(m=[m[0]&2,o.value]),m[0]){case 0:case 1:o=m;break;case 4:return t.label++,{value:m[1],done:!1};case 5:t.label++,s=m[1],m=[0];continue;case 7:m=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(m[0]===6||m[0]===2)){t=0;continue}if(m[0]===3&&(!o||m[1]>o[0]&&m[1]<o[3])){t.label=m[1];break}if(m[0]===6&&t.label<o[1]){t.label=o[1],o=m;break}if(o&&t.label<o[2]){t.label=o[2],t.ops.push(m);break}o[2]&&t.ops.pop(),t.trys.pop();continue}m=e.call(r,t)}catch(y){m=[6,y],s=0}finally{n=o=0}if(m[0]&5)throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}}function eF(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}typeof SuppressedError=="function"&&SuppressedError;var io=64,tF=32,nF=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),rF=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],iF=Math.pow(2,53)-1,bg=function(){function r(){this.state=Int32Array.from(rF),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return r.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,this.bytesHashed*8>iF)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===io&&(this.hashBuffer(),this.bufferLength=0)},r.prototype.digest=function(){if(!this.finished){var e=this.bytesHashed*8,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%io>=io-8){for(var s=this.bufferLength;s<io;s++)t.setUint8(s,0);this.hashBuffer(),this.bufferLength=0}for(var s=this.bufferLength;s<io-8;s++)t.setUint8(s,0);t.setUint32(io-8,Math.floor(e/4294967296),!0),t.setUint32(io-4,e),this.hashBuffer(),this.finished=!0}for(var o=new Uint8Array(tF),s=0;s<8;s++)o[s*4]=this.state[s]>>>24&255,o[s*4+1]=this.state[s]>>>16&255,o[s*4+2]=this.state[s]>>>8&255,o[s*4+3]=this.state[s]>>>0&255;return o},r.prototype.hashBuffer=function(){for(var e=this,t=e.buffer,n=e.state,s=n[0],o=n[1],u=n[2],c=n[3],h=n[4],m=n[5],y=n[6],E=n[7],T=0;T<io;T++){if(T<16)this.temp[T]=(t[T*4]&255)<<24|(t[T*4+1]&255)<<16|(t[T*4+2]&255)<<8|t[T*4+3]&255;else{var R=this.temp[T-2],_=(R>>>17|R<<15)^(R>>>19|R<<13)^R>>>10;R=this.temp[T-15];var L=(R>>>7|R<<25)^(R>>>18|R<<14)^R>>>3;this.temp[T]=(_+this.temp[T-7]|0)+(L+this.temp[T-16]|0)}var M=(((h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7))+(h&m^~h&y)|0)+(E+(nF[T]+this.temp[T]|0)|0)|0,F=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+(s&o^s&u^o&u)|0;E=y,y=m,m=h,h=c+M|0,c=u,u=o,o=s,s=M+F|0}n[0]+=s,n[1]+=o,n[2]+=u,n[3]+=c,n[4]+=h,n[5]+=m,n[6]+=y,n[7]+=E},r}(),sF=function(){function r(e){this.secret=e,this.hash=new bg,this.reset()}return r.prototype.update=function(e){if(!(uS(e)||this.error))try{this.hash.update(ep(e))}catch(t){this.error=t}},r.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},r.prototype.digest=function(){return JO(this,void 0,void 0,function(){return ZO(this,function(e){return[2,this.digestSync()]})})},r.prototype.reset=function(){if(this.hash=new bg,this.secret){this.outer=new bg;var e=aF(this.secret),t=new Uint8Array(io);t.set(e);for(var n=0;n<io;n++)e[n]^=54,t[n]^=92;this.hash.update(e),this.outer.update(t);for(var n=0;n<e.byteLength;n++)e[n]=0}},r}();function aF(r){var e=ep(r);if(e.byteLength>io){var t=new bg;t.update(e),e=t.digest()}var n=new Uint8Array(io);return n.set(e),n}var oF=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function lF(r){if(uF(r)&&typeof r.crypto.subtle=="object"){var e=r.crypto.subtle;return cF(e)}return!1}function uF(r){if(typeof r=="object"&&typeof r.crypto=="object"){var e=r.crypto.getRandomValues;return typeof e=="function"}return!1}function cF(r){return r&&oF.every(function(e){return typeof r[e]=="function"})}var Qw=function(){function r(e){lF(xg())?this.hash=new QO(e):this.hash=new sF(e)}return r.prototype.update=function(e,t){this.hash.update(ep(e))},r.prototype.digest=function(){return this.hash.digest()},r.prototype.reset=function(){this.hash.reset()},r}();const fF={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},Jw={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},Ei={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},Ws={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},mc={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class at{static getFirstMatch(e,t){const n=t.match(e);return n&&n.length>0&&n[1]||""}static getSecondMatch(e,t){const n=t.match(e);return n&&n.length>1&&n[2]||""}static matchAndReturnConst(e,t,n){if(e.test(t))return n}static getWindowsVersionName(e){switch(e){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(e){const t=e.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(t.push(0),t[0]===10)switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(e){const t=e.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(t.push(0),!(t[0]===1&&t[1]<5)){if(t[0]===1&&t[1]<6)return"Cupcake";if(t[0]===1&&t[1]>=6)return"Donut";if(t[0]===2&&t[1]<2)return"Eclair";if(t[0]===2&&t[1]===2)return"Froyo";if(t[0]===2&&t[1]>2)return"Gingerbread";if(t[0]===3)return"Honeycomb";if(t[0]===4&&t[1]<1)return"Ice Cream Sandwich";if(t[0]===4&&t[1]<4)return"Jelly Bean";if(t[0]===4&&t[1]>=4)return"KitKat";if(t[0]===5)return"Lollipop";if(t[0]===6)return"Marshmallow";if(t[0]===7)return"Nougat";if(t[0]===8)return"Oreo";if(t[0]===9)return"Pie"}}static getVersionPrecision(e){return e.split(".").length}static compareVersions(e,t,n=!1){const s=at.getVersionPrecision(e),o=at.getVersionPrecision(t);let u=Math.max(s,o),c=0;const h=at.map([e,t],m=>{const y=u-at.getVersionPrecision(m),E=m+new Array(y+1).join(".0");return at.map(E.split("."),T=>new Array(20-T.length).join("0")+T).reverse()});for(n&&(c=u-Math.min(s,o)),u-=1;u>=c;){if(h[0][u]>h[1][u])return 1;if(h[0][u]===h[1][u]){if(u===c)return 0;u-=1}else if(h[0][u]<h[1][u])return-1}}static map(e,t){const n=[];let s;if(Array.prototype.map)return Array.prototype.map.call(e,t);for(s=0;s<e.length;s+=1)n.push(t(e[s]));return n}static find(e,t){let n,s;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,s=e.length;n<s;n+=1){const o=e[n];if(t(o,n))return o}}static assign(e,...t){const n=e;let s,o;if(Object.assign)return Object.assign(e,...t);for(s=0,o=t.length;s<o;s+=1){const u=t[s];typeof u=="object"&&u!==null&&Object.keys(u).forEach(h=>{n[h]=u[h]})}return e}static getBrowserAlias(e){return fF[e]}static getBrowserTypeByAlias(e){return Jw[e]||""}}const Cr=/version\/(\d+(\.?_?\d+)+)/i,dF=[{test:[/googlebot/i],describe(r){const e={name:"Googlebot"},t=at.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,r)||at.getFirstMatch(Cr,r);return t&&(e.version=t),e}},{test:[/opera/i],describe(r){const e={name:"Opera"},t=at.getFirstMatch(Cr,r)||at.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/opr\/|opios/i],describe(r){const e={name:"Opera"},t=at.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,r)||at.getFirstMatch(Cr,r);return t&&(e.version=t),e}},{test:[/SamsungBrowser/i],describe(r){const e={name:"Samsung Internet for Android"},t=at.getFirstMatch(Cr,r)||at.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/Whale/i],describe(r){const e={name:"NAVER Whale Browser"},t=at.getFirstMatch(Cr,r)||at.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/MZBrowser/i],describe(r){const e={name:"MZ Browser"},t=at.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,r)||at.getFirstMatch(Cr,r);return t&&(e.version=t),e}},{test:[/focus/i],describe(r){const e={name:"Focus"},t=at.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,r)||at.getFirstMatch(Cr,r);return t&&(e.version=t),e}},{test:[/swing/i],describe(r){const e={name:"Swing"},t=at.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,r)||at.getFirstMatch(Cr,r);return t&&(e.version=t),e}},{test:[/coast/i],describe(r){const e={name:"Opera Coast"},t=at.getFirstMatch(Cr,r)||at.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(r){const e={name:"Opera Touch"},t=at.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,r)||at.getFirstMatch(Cr,r);return t&&(e.version=t),e}},{test:[/yabrowser/i],describe(r){const e={name:"Yandex Browser"},t=at.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,r)||at.getFirstMatch(Cr,r);return t&&(e.version=t),e}},{test:[/ucbrowser/i],describe(r){const e={name:"UC Browser"},t=at.getFirstMatch(Cr,r)||at.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/Maxthon|mxios/i],describe(r){const e={name:"Maxthon"},t=at.getFirstMatch(Cr,r)||at.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/epiphany/i],describe(r){const e={name:"Epiphany"},t=at.getFirstMatch(Cr,r)||at.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/puffin/i],describe(r){const e={name:"Puffin"},t=at.getFirstMatch(Cr,r)||at.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/sleipnir/i],describe(r){const e={name:"Sleipnir"},t=at.getFirstMatch(Cr,r)||at.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/k-meleon/i],describe(r){const e={name:"K-Meleon"},t=at.getFirstMatch(Cr,r)||at.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/micromessenger/i],describe(r){const e={name:"WeChat"},t=at.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,r)||at.getFirstMatch(Cr,r);return t&&(e.version=t),e}},{test:[/qqbrowser/i],describe(r){const e={name:/qqbrowserlite/i.test(r)?"QQ Browser Lite":"QQ Browser"},t=at.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,r)||at.getFirstMatch(Cr,r);return t&&(e.version=t),e}},{test:[/msie|trident/i],describe(r){const e={name:"Internet Explorer"},t=at.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/\sedg\//i],describe(r){const e={name:"Microsoft Edge"},t=at.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/edg([ea]|ios)/i],describe(r){const e={name:"Microsoft Edge"},t=at.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/vivaldi/i],describe(r){const e={name:"Vivaldi"},t=at.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/seamonkey/i],describe(r){const e={name:"SeaMonkey"},t=at.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/sailfish/i],describe(r){const e={name:"Sailfish"},t=at.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,r);return t&&(e.version=t),e}},{test:[/silk/i],describe(r){const e={name:"Amazon Silk"},t=at.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/phantom/i],describe(r){const e={name:"PhantomJS"},t=at.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/slimerjs/i],describe(r){const e={name:"SlimerJS"},t=at.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(r){const e={name:"BlackBerry"},t=at.getFirstMatch(Cr,r)||at.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/(web|hpw)[o0]s/i],describe(r){const e={name:"WebOS Browser"},t=at.getFirstMatch(Cr,r)||at.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/bada/i],describe(r){const e={name:"Bada"},t=at.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/tizen/i],describe(r){const e={name:"Tizen"},t=at.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,r)||at.getFirstMatch(Cr,r);return t&&(e.version=t),e}},{test:[/qupzilla/i],describe(r){const e={name:"QupZilla"},t=at.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,r)||at.getFirstMatch(Cr,r);return t&&(e.version=t),e}},{test:[/firefox|iceweasel|fxios/i],describe(r){const e={name:"Firefox"},t=at.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/electron/i],describe(r){const e={name:"Electron"},t=at.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/MiuiBrowser/i],describe(r){const e={name:"Miui"},t=at.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/chromium/i],describe(r){const e={name:"Chromium"},t=at.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,r)||at.getFirstMatch(Cr,r);return t&&(e.version=t),e}},{test:[/chrome|crios|crmo/i],describe(r){const e={name:"Chrome"},t=at.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/GSA/i],describe(r){const e={name:"Google Search"},t=at.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test(r){const e=!r.test(/like android/i),t=r.test(/android/i);return e&&t},describe(r){const e={name:"Android Browser"},t=at.getFirstMatch(Cr,r);return t&&(e.version=t),e}},{test:[/playstation 4/i],describe(r){const e={name:"PlayStation 4"},t=at.getFirstMatch(Cr,r);return t&&(e.version=t),e}},{test:[/safari|applewebkit/i],describe(r){const e={name:"Safari"},t=at.getFirstMatch(Cr,r);return t&&(e.version=t),e}},{test:[/.*/i],describe(r){const e=/^(.*)\/(.*) /,t=/^(.*)\/(.*)[ \t]\((.*)/,s=r.search("\\(")!==-1?t:e;return{name:at.getFirstMatch(s,r),version:at.getSecondMatch(s,r)}}}],hF=[{test:[/Roku\/DVP/],describe(r){const e=at.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,r);return{name:Ws.Roku,version:e}}},{test:[/windows phone/i],describe(r){const e=at.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,r);return{name:Ws.WindowsPhone,version:e}}},{test:[/windows /i],describe(r){const e=at.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,r),t=at.getWindowsVersionName(e);return{name:Ws.Windows,version:e,versionName:t}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(r){const e={name:Ws.iOS},t=at.getSecondMatch(/(Version\/)(\d[\d.]+)/,r);return t&&(e.version=t),e}},{test:[/macintosh/i],describe(r){const e=at.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,r).replace(/[_\s]/g,"."),t=at.getMacOSVersionName(e),n={name:Ws.MacOS,version:e};return t&&(n.versionName=t),n}},{test:[/(ipod|iphone|ipad)/i],describe(r){const e=at.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,r).replace(/[_\s]/g,".");return{name:Ws.iOS,version:e}}},{test(r){const e=!r.test(/like android/i),t=r.test(/android/i);return e&&t},describe(r){const e=at.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,r),t=at.getAndroidVersionName(e),n={name:Ws.Android,version:e};return t&&(n.versionName=t),n}},{test:[/(web|hpw)[o0]s/i],describe(r){const e=at.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,r),t={name:Ws.WebOS};return e&&e.length&&(t.version=e),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(r){const e=at.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,r)||at.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,r)||at.getFirstMatch(/\bbb(\d+)/i,r);return{name:Ws.BlackBerry,version:e}}},{test:[/bada/i],describe(r){const e=at.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,r);return{name:Ws.Bada,version:e}}},{test:[/tizen/i],describe(r){const e=at.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,r);return{name:Ws.Tizen,version:e}}},{test:[/linux/i],describe(){return{name:Ws.Linux}}},{test:[/CrOS/],describe(){return{name:Ws.ChromeOS}}},{test:[/PlayStation 4/],describe(r){const e=at.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,r);return{name:Ws.PlayStation4,version:e}}}],pF=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(r){const e=at.getFirstMatch(/(can-l01)/i,r)&&"Nova",t={type:Ei.mobile,vendor:"Huawei"};return e&&(t.model=e),t}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:Ei.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:Ei.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:Ei.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:Ei.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:Ei.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:Ei.tablet}}},{test(r){const e=r.test(/ipod|iphone/i),t=r.test(/like (ipod|iphone)/i);return e&&!t},describe(r){const e=at.getFirstMatch(/(ipod|iphone)/i,r);return{type:Ei.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:Ei.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:Ei.mobile}}},{test(r){return r.getBrowserName(!0)==="blackberry"},describe(){return{type:Ei.mobile,vendor:"BlackBerry"}}},{test(r){return r.getBrowserName(!0)==="bada"},describe(){return{type:Ei.mobile}}},{test(r){return r.getBrowserName()==="windows phone"},describe(){return{type:Ei.mobile,vendor:"Microsoft"}}},{test(r){const e=Number(String(r.getOSVersion()).split(".")[0]);return r.getOSName(!0)==="android"&&e>=3},describe(){return{type:Ei.tablet}}},{test(r){return r.getOSName(!0)==="android"},describe(){return{type:Ei.mobile}}},{test(r){return r.getOSName(!0)==="macos"},describe(){return{type:Ei.desktop,vendor:"Apple"}}},{test(r){return r.getOSName(!0)==="windows"},describe(){return{type:Ei.desktop}}},{test(r){return r.getOSName(!0)==="linux"},describe(){return{type:Ei.desktop}}},{test(r){return r.getOSName(!0)==="playstation 4"},describe(){return{type:Ei.tv}}},{test(r){return r.getOSName(!0)==="roku"},describe(){return{type:Ei.tv}}}],mF=[{test(r){return r.getBrowserName(!0)==="microsoft edge"},describe(r){if(/\sedg\//i.test(r))return{name:mc.Blink};const t=at.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,r);return{name:mc.EdgeHTML,version:t}}},{test:[/trident/i],describe(r){const e={name:mc.Trident},t=at.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test(r){return r.test(/presto/i)},describe(r){const e={name:mc.Presto},t=at.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test(r){const e=r.test(/gecko/i),t=r.test(/like gecko/i);return e&&!t},describe(r){const e={name:mc.Gecko},t=at.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:mc.Blink}}},{test:[/(apple)?webkit/i],describe(r){const e={name:mc.WebKit},t=at.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}}];class Zw{constructor(e,t=!1){if(e==null||e==="")throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},t!==!0&&this.parse()}getUA(){return this._ua}test(e){return e.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const e=at.find(dF,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.browser=e.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const e=at.find(hF,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os}getOSName(e){const{name:t}=this.getOS();return e?String(t).toLowerCase()||"":t||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(e=!1){const{type:t}=this.getPlatform();return e?String(t).toLowerCase()||"":t||""}parsePlatform(){this.parsedResult.platform={};const e=at.find(pF,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const e=at.find(mF,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return at.assign({},this.parsedResult)}satisfies(e){const t={};let n=0;const s={};let o=0;if(Object.keys(e).forEach(c=>{const h=e[c];typeof h=="string"?(s[c]=h,o+=1):typeof h=="object"&&(t[c]=h,n+=1)}),n>0){const c=Object.keys(t),h=at.find(c,y=>this.isOS(y));if(h){const y=this.satisfies(t[h]);if(y!==void 0)return y}const m=at.find(c,y=>this.isPlatform(y));if(m){const y=this.satisfies(t[m]);if(y!==void 0)return y}}if(o>0){const c=Object.keys(s),h=at.find(c,m=>this.isBrowser(m,!0));if(h!==void 0)return this.compareVersion(s[h])}}isBrowser(e,t=!1){const n=this.getBrowserName().toLowerCase();let s=e.toLowerCase();const o=at.getBrowserTypeByAlias(s);return t&&o&&(s=o.toLowerCase()),s===n}compareVersion(e){let t=[0],n=e,s=!1;const o=this.getBrowserVersion();if(typeof o=="string")return e[0]===">"||e[0]==="<"?(n=e.substr(1),e[1]==="="?(s=!0,n=e.substr(2)):t=[],e[0]===">"?t.push(1):t.push(-1)):e[0]==="="?n=e.substr(1):e[0]==="~"&&(s=!0,n=e.substr(1)),t.indexOf(at.compareVersions(o,n,s))>-1}isOS(e){return this.getOSName(!0)===String(e).toLowerCase()}isPlatform(e){return this.getPlatformType(!0)===String(e).toLowerCase()}isEngine(e){return this.getEngineName(!0)===String(e).toLowerCase()}is(e,t=!1){return this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)}some(e=[]){return e.some(t=>this.is(t))}}/*!
|
|
267
|
+
* Bowser - a browser detector
|
|
268
|
+
* https://github.com/lancedikson/bowser
|
|
269
|
+
* MIT License | (c) Dustin Diaz 2012-2015
|
|
270
|
+
* MIT License | (c) Denis Demchenko 2015-2019
|
|
271
|
+
*/class eC{static getParser(e,t=!1){if(typeof e!="string")throw new Error("UserAgent should be a string");return new Zw(e,t)}static parse(e){return new Zw(e).getResult()}static get BROWSER_MAP(){return Jw}static get ENGINE_MAP(){return mc}static get OS_MAP(){return Ws}static get PLATFORMS_MAP(){return Ei}}const tC=({serviceId:r,clientVersion:e})=>async()=>{var s,o,u,c,h;const t=typeof window<"u"&&((s=window==null?void 0:window.navigator)!=null&&s.userAgent)?eC.parse(window.navigator.userAgent):void 0,n=[["aws-sdk-js",e],["ua","2.0"],[`os/${((o=t==null?void 0:t.os)==null?void 0:o.name)||"other"}`,(u=t==null?void 0:t.os)==null?void 0:u.version],["lang/js"],["md/browser",`${((c=t==null?void 0:t.browser)==null?void 0:c.name)??"unknown"}_${((h=t==null?void 0:t.browser)==null?void 0:h.version)??"unknown"}`]];return r&&n.push([`api/${r}`,e]),n};var nC=function(){function r(){this.checksum=4294967295}return r.prototype.update=function(e){var t,n;try{for(var s=eF(e),o=s.next();!o.done;o=s.next()){var u=o.value;this.checksum=this.checksum>>>8^vF[(this.checksum^u)&255]}}catch(c){t={error:c}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return this},r.prototype.digest=function(){return(this.checksum^4294967295)>>>0},r}(),gF=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],vF=qO(gF);class tp{constructor(e){if(this.bytes=e,e.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>9223372036854776e3||e<-9223372036854776e3)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let n=7,s=Math.abs(Math.round(e));n>-1&&s>0;n--,s/=256)t[n]=s;return e<0&&rC(t),new tp(t)}valueOf(){const e=this.bytes.slice(0),t=e[0]&128;return t&&rC(e),parseInt(Ma(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function rC(r){for(let e=0;e<8;e++)r[e]^=255;for(let e=7;e>-1&&(r[e]++,r[e]===0);e--);}class yF{constructor(e,t){this.toUtf8=e,this.fromUtf8=t}format(e){const t=[];for(const o of Object.keys(e)){const u=this.fromUtf8(o);t.push(Uint8Array.from([u.byteLength]),u,this.formatHeaderValue(e[o]))}const n=new Uint8Array(t.reduce((o,u)=>o+u.byteLength,0));let s=0;for(const o of t)n.set(o,s),s+=o.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const s=new Uint8Array(9);return s[0]=5,s.set(e.value.bytes,1),s;case"binary":const o=new DataView(new ArrayBuffer(3+e.value.byteLength));o.setUint8(0,6),o.setUint16(1,e.value.byteLength,!1);const u=new Uint8Array(o.buffer);return u.set(e.value,3),u;case"string":const c=this.fromUtf8(e.value),h=new DataView(new ArrayBuffer(3+c.byteLength));h.setUint8(0,7),h.setUint16(1,c.byteLength,!1);const m=new Uint8Array(h.buffer);return m.set(c,3),m;case"timestamp":const y=new Uint8Array(9);return y[0]=8,y.set(tp.fromNumber(e.value.valueOf()).bytes,1),y;case"uuid":if(!AF.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const E=new Uint8Array(17);return E[0]=9,E.set(mw(e.value.replace(/\-/g,"")),1),E}}parse(e){const t={};let n=0;for(;n<e.byteLength;){const s=e.getUint8(n++),o=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,s));switch(n+=s,e.getUint8(n++)){case 0:t[o]={type:sC,value:!0};break;case 1:t[o]={type:sC,value:!1};break;case 2:t[o]={type:SF,value:e.getInt8(n++)};break;case 3:t[o]={type:EF,value:e.getInt16(n,!1)},n+=2;break;case 4:t[o]={type:xF,value:e.getInt32(n,!1)},n+=4;break;case 5:t[o]={type:bF,value:new tp(new Uint8Array(e.buffer,e.byteOffset+n,8))},n+=8;break;case 6:const u=e.getUint16(n,!1);n+=2,t[o]={type:TF,value:new Uint8Array(e.buffer,e.byteOffset+n,u)},n+=u;break;case 7:const c=e.getUint16(n,!1);n+=2,t[o]={type:wF,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,c))},n+=c;break;case 8:t[o]={type:CF,value:new Date(new tp(new Uint8Array(e.buffer,e.byteOffset+n,8)).valueOf())},n+=8;break;case 9:const h=new Uint8Array(e.buffer,e.byteOffset+n,16);n+=16,t[o]={type:RF,value:`${Ma(h.subarray(0,4))}-${Ma(h.subarray(4,6))}-${Ma(h.subarray(6,8))}-${Ma(h.subarray(8,10))}-${Ma(h.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return t}}var iC;(function(r){r[r.boolTrue=0]="boolTrue",r[r.boolFalse=1]="boolFalse",r[r.byte=2]="byte",r[r.short=3]="short",r[r.integer=4]="integer",r[r.long=5]="long",r[r.byteArray=6]="byteArray",r[r.string=7]="string",r[r.timestamp=8]="timestamp",r[r.uuid=9]="uuid"})(iC||(iC={}));const sC="boolean",SF="byte",EF="short",xF="integer",bF="long",TF="binary",wF="string",CF="timestamp",RF="uuid",AF=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,aC=4,gc=aC*2,ef=4,_F=gc+ef*2;function LF({byteLength:r,byteOffset:e,buffer:t}){if(r<_F)throw new Error("Provided message too short to accommodate event stream message overhead");const n=new DataView(t,e,r),s=n.getUint32(0,!1);if(r!==s)throw new Error("Reported message length does not match received message length");const o=n.getUint32(aC,!1),u=n.getUint32(gc,!1),c=n.getUint32(r-ef,!1),h=new nC().update(new Uint8Array(t,e,gc));if(u!==h.digest())throw new Error(`The prelude checksum specified in the message (${u}) does not match the calculated CRC32 checksum (${h.digest()})`);if(h.update(new Uint8Array(t,e+gc,r-(gc+ef))),c!==h.digest())throw new Error(`The message checksum (${h.digest()}) did not match the expected value of ${c}`);return{headers:new DataView(t,e+gc+ef,o),body:new Uint8Array(t,e+gc+ef+o,s-o-(gc+ef+ef))}}class kF{constructor(e,t){this.headerMarshaller=new yF(e,t),this.messageBuffer=[],this.isEndOfStream=!1}feed(e){this.messageBuffer.push(this.decode(e))}endOfStream(){this.isEndOfStream=!0}getMessage(){const e=this.messageBuffer.pop(),t=this.isEndOfStream;return{getMessage(){return e},isEndOfStream(){return t}}}getAvailableMessages(){const e=this.messageBuffer;this.messageBuffer=[];const t=this.isEndOfStream;return{getMessages(){return e},isEndOfStream(){return t}}}encode({headers:e,body:t}){const n=this.headerMarshaller.format(e),s=n.byteLength+t.byteLength+16,o=new Uint8Array(s),u=new DataView(o.buffer,o.byteOffset,o.byteLength),c=new nC;return u.setUint32(0,s,!1),u.setUint32(4,n.byteLength,!1),u.setUint32(8,c.update(o.subarray(0,8)).digest(),!1),o.set(n,12),o.set(t,n.byteLength+12),u.setUint32(s-4,c.update(o.subarray(8,s-4)).digest(),!1),o}decode(e){const{headers:t,body:n}=LF(e);return{headers:this.headerMarshaller.parse(t),body:n}}formatHeaders(e){return this.headerMarshaller.format(e)}}class DF{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream)yield this.options.decoder.decode(e)}}class IF{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream)yield this.options.encoder.encode(e);this.options.includeEndFrame&&(yield new Uint8Array(0))}}class PF{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=await this.options.deserializer(e);t!==void 0&&(yield t)}}}class MF{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream)yield this.options.serializer(e)}}function OF(r){let e=0,t=0,n=null,s=null;const o=c=>{if(typeof c!="number")throw new Error("Attempted to allocate an event message where size was not a number: "+c);e=c,t=4,n=new Uint8Array(c),new DataView(n.buffer).setUint32(0,c,!1)},u=async function*(){const c=r[Symbol.asyncIterator]();for(;;){const{value:h,done:m}=await c.next();if(m){if(e)if(e===t)yield n;else throw new Error("Truncated event message received.");else return;return}const y=h.length;let E=0;for(;E<y;){if(!n){const R=y-E;s||(s=new Uint8Array(4));const _=Math.min(4-t,R);if(s.set(h.slice(E,E+_),t),t+=_,E+=_,t<4)break;o(new DataView(s.buffer).getUint32(0,!1)),s=null}const T=Math.min(e-t,y-E);n.set(h.slice(E,E+T),t),t+=T,E+=T,e&&e===t&&(yield n,n=null,e=0,t=0)}}};return{[Symbol.asyncIterator]:u}}function FF(r,e){return async function(t){const{value:n}=t.headers[":message-type"];if(n==="error"){const s=new Error(t.headers[":error-message"].value||"UnknownError");throw s.name=t.headers[":error-code"].value,s}else if(n==="exception"){const s=t.headers[":exception-type"].value,o={[s]:t},u=await r(o);if(u.$unknown){const c=new Error(e(t.body));throw c.name=s,c}throw u[s]}else if(n==="event"){const s={[t.headers[":event-type"].value]:t},o=await r(s);return o.$unknown?void 0:o}else throw Error(`Unrecognizable event type: ${t.headers[":event-type"].value}`)}}let NF=class{constructor({utf8Encoder:e,utf8Decoder:t}){this.eventStreamCodec=new kF(e,t),this.utfEncoder=e}deserialize(e,t){const n=OF(e);return new PF({messageStream:new DF({inputStream:n,decoder:this.eventStreamCodec}),deserializer:FF(t,this.utfEncoder)})}serialize(e,t){return new IF({messageStream:new MF({inputStream:e,serializer:t}),encoder:this.eventStreamCodec,includeEndFrame:!0})}};const UF=r=>({[Symbol.asyncIterator]:async function*(){const e=r.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)return;yield n}}finally{e.releaseLock()}}}),BF=r=>{const e=r[Symbol.asyncIterator]();return new ReadableStream({async pull(t){const{done:n,value:s}=await e.next();if(n)return t.close();t.enqueue(s)}})};class $F{constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new NF({utf8Decoder:t,utf8Encoder:e})}deserialize(e,t){const n=VF(e)?UF(e):e;return this.universalMarshaller.deserialize(n,t)}serialize(e,t){const n=this.universalMarshaller.serialize(e,t);return typeof ReadableStream=="function"?BF(n):n}}const VF=r=>typeof ReadableStream=="function"&&r instanceof ReadableStream,zF=r=>new $F(r),oC=r=>()=>Promise.reject(r),lC=typeof TextEncoder=="function"?new TextEncoder:null,uC=r=>{if(typeof r=="string"){if(lC)return lC.encode(r).byteLength;let e=r.length;for(let t=e-1;t>=0;t--){const n=r.charCodeAt(t);n>127&&n<=2047?e++:n>2047&&n<=65535&&(e+=2),n>=56320&&n<=57343&&t--}return e}else{if(typeof r.byteLength=="number")return r.byteLength;if(typeof r.size=="number")return r.size}throw new Error(`Body Length computation failed for ${r}`)},cC="required",qt="type",ar="rules",Jn="conditions",hn="fn",pn="argv",vr="ref",np="assign",hl="url",pl="properties",ml="headers",jF=!0,tf="isSet",nf="stringEquals",cS="aws.parseArn",rf="arn",Ks="booleanEquals",oa="endpoint",cr="tree",yr="error",Rd={[cC]:!1,[qt]:"String"},fC={[cC]:!0,default:!1,[qt]:"Boolean"},fS={[hn]:"not",[pn]:[{[hn]:tf,[pn]:[{[vr]:"Endpoint"}]}]},dC={[vr]:"Endpoint"},Tg={[hn]:tf,[pn]:[{[vr]:"Region"}]},wg={[hn]:"aws.partition",[pn]:[{[vr]:"Region"}],[np]:"PartitionResult"},dS={[hn]:"not",[pn]:[{[hn]:nf,[pn]:[{[hn]:"getAttr",[pn]:[{[vr]:"PartitionResult"},"name"]},"aws-iso"]}]},hS={[hn]:"getAttr",[pn]:[{[vr]:"PartitionResult"},"name"]},pS={[hn]:"not",[pn]:[{[hn]:nf,[pn]:[hS,"aws-iso-b"]}]},Cg={[hn]:"getAttr",[pn]:[{[vr]:"PartitionResult"},"supportsFIPS"]},so={},hC={[yr]:"FIPS is enabled but this partition does not support FIPS",[qt]:yr},pC={[yr]:"DualStack is enabled but this partition does not support DualStack",[qt]:yr},mS={[yr]:"Invalid ARN: Failed to parse ARN.",[qt]:yr},mC={[hn]:Ks,[pn]:[!0,{[hn]:"getAttr",[pn]:[{[vr]:"PartitionResult"},"supportsDualStack"]}]},gC=[{[vr]:"StreamARN"}],HF=[{[hn]:tf,[pn]:[dC]}],gS=[{[Jn]:[{[hn]:"isValidHostLabel",[pn]:[{[hn]:"getAttr",[pn]:[{[vr]:rf},"accountId"]},!1]}],[ar]:[{[Jn]:[{[hn]:"isValidHostLabel",[pn]:[{[hn]:"getAttr",[pn]:[{[vr]:rf},"region"]},!1]}],[ar]:[{[Jn]:[{[hn]:nf,[pn]:[{[hn]:"getAttr",[pn]:[{[vr]:rf},"service"]},"kinesis"]}],[ar]:[{[Jn]:[{[hn]:"getAttr",[pn]:[{[vr]:rf},"resourceId[0]"],[np]:"arnType"},{[hn]:"not",[pn]:[{[hn]:nf,[pn]:[{[vr]:"arnType"},""]}]}],[ar]:[{[Jn]:[{[hn]:nf,[pn]:[{[vr]:"arnType"},"stream"]}],[ar]:[{[Jn]:[{[hn]:nf,[pn]:[hS,"{arn#partition}"]}],[ar]:[{[Jn]:[{[hn]:tf,[pn]:[{[vr]:"OperationType"}]}],[ar]:[{[Jn]:[{[hn]:Ks,[pn]:[{[vr]:"UseFIPS"},!0]},{[hn]:Ks,[pn]:[{[vr]:"UseDualStack"},!0]}],[ar]:[{[Jn]:[{[hn]:Ks,[pn]:[Cg,!0]}],[ar]:[{[Jn]:[{[hn]:Ks,[pn]:[{[hn]:"getAttr",[pn]:[{[vr]:"PartitionResult"},"supportsDualStack"]},!0]}],[ar]:[{[oa]:{[hl]:"https://{arn#accountId}.{OperationType}-kinesis-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",[pl]:{},[ml]:{}},[qt]:oa}],[qt]:cr},{[yr]:"DualStack is enabled, but this partition does not support DualStack.",[qt]:yr}],[qt]:cr},{[yr]:"FIPS is enabled, but this partition does not support FIPS.",[qt]:yr}],[qt]:cr},{[Jn]:[{[hn]:Ks,[pn]:[{[vr]:"UseFIPS"},!0]}],[ar]:[{[Jn]:[{[hn]:Ks,[pn]:[Cg,!0]}],[ar]:[{[oa]:{[hl]:"https://{arn#accountId}.{OperationType}-kinesis-fips.{Region}.{PartitionResult#dnsSuffix}",[pl]:{},[ml]:{}},[qt]:oa}],[qt]:cr},hC],[qt]:cr},{[Jn]:[{[hn]:Ks,[pn]:[{[vr]:"UseDualStack"},!0]}],[ar]:[{[Jn]:[{[hn]:Ks,[pn]:[{[hn]:"getAttr",[pn]:[{[vr]:"PartitionResult"},"supportsDualStack"]},!0]}],[ar]:[{[oa]:{[hl]:"https://{arn#accountId}.{OperationType}-kinesis.{Region}.{PartitionResult#dualStackDnsSuffix}",[pl]:{},[ml]:{}},[qt]:oa}],[qt]:cr},pC],[qt]:cr},{[oa]:{[hl]:"https://{arn#accountId}.{OperationType}-kinesis.{Region}.{PartitionResult#dnsSuffix}",[pl]:{},[ml]:{}},[qt]:oa}],[qt]:cr},{[yr]:"Operation Type is not set. Please contact service team for resolution.",[qt]:yr}],[qt]:cr},{[yr]:"Partition: {arn#partition} from ARN doesn't match with partition name: {PartitionResult#name}.",[qt]:yr}],[qt]:cr},{[yr]:"Invalid ARN: Kinesis ARNs don't support `{arnType}` arn types.",[qt]:yr}],[qt]:cr},{[yr]:"Invalid ARN: No ARN type specified",[qt]:yr}],[qt]:cr},{[yr]:"Invalid ARN: The ARN was not for the Kinesis service, found: {arn#service}.",[qt]:yr}],[qt]:cr},{[yr]:"Invalid ARN: Invalid region.",[qt]:yr}],[qt]:cr},{[yr]:"Invalid ARN: Invalid account id.",[qt]:yr}],GF=[{[hn]:Ks,[pn]:[{[vr]:"UseFIPS"},!0]},{[hn]:Ks,[pn]:[{[vr]:"UseDualStack"},!0]}],WF=[{[hn]:Ks,[pn]:[Cg,!0]}],vC=[{[hn]:Ks,[pn]:[{[vr]:"UseFIPS"},!0]}],yC=[{[hn]:Ks,[pn]:[{[vr]:"UseDualStack"},!0]}],SC=[{[vr]:"ConsumerARN"}],EC=[{[vr]:"ResourceARN"}],KF={version:"1.0",parameters:{Region:Rd,UseDualStack:fC,UseFIPS:fC,Endpoint:Rd,StreamARN:Rd,OperationType:Rd,ConsumerARN:Rd,ResourceARN:Rd},[ar]:[{[Jn]:[{[hn]:tf,[pn]:gC},fS,Tg,wg,dS,pS],[ar]:[{[Jn]:[{[hn]:cS,[pn]:gC,[np]:rf}],[ar]:gS,[qt]:cr},mS],[qt]:cr},{[Jn]:[{[hn]:tf,[pn]:SC},fS,Tg,wg,dS,pS],[ar]:[{[Jn]:[{[hn]:cS,[pn]:SC,[np]:rf}],[ar]:gS,[qt]:cr},mS],[qt]:cr},{[Jn]:[{[hn]:tf,[pn]:EC},fS,Tg,wg,dS,pS],[ar]:[{[Jn]:[{[hn]:cS,[pn]:EC,[np]:rf}],[ar]:gS,[qt]:cr},mS],[qt]:cr},{[Jn]:HF,[ar]:[{[Jn]:vC,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[qt]:yr},{[Jn]:yC,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[qt]:yr},{endpoint:{[hl]:dC,[pl]:so,[ml]:so},[qt]:oa}],[qt]:cr},{[Jn]:[Tg],[ar]:[{[Jn]:[wg],[ar]:[{[Jn]:GF,[ar]:[{[Jn]:[{[hn]:Ks,[pn]:[jF,Cg]},mC],[ar]:[{endpoint:{[hl]:"https://kinesis-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",[pl]:so,[ml]:so},[qt]:oa}],[qt]:cr},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[qt]:yr}],[qt]:cr},{[Jn]:vC,[ar]:[{[Jn]:WF,[ar]:[{[Jn]:[{[hn]:nf,[pn]:[hS,"aws-us-gov"]}],endpoint:{[hl]:"https://kinesis.{Region}.amazonaws.com",[pl]:so,[ml]:so},[qt]:oa},{endpoint:{[hl]:"https://kinesis-fips.{Region}.{PartitionResult#dnsSuffix}",[pl]:so,[ml]:so},[qt]:oa}],[qt]:cr},hC],[qt]:cr},{[Jn]:yC,[ar]:[{[Jn]:[mC],[ar]:[{endpoint:{[hl]:"https://kinesis.{Region}.{PartitionResult#dualStackDnsSuffix}",[pl]:so,[ml]:so},[qt]:oa}],[qt]:cr},pC],[qt]:cr},{endpoint:{[hl]:"https://kinesis.{Region}.{PartitionResult#dnsSuffix}",[pl]:so,[ml]:so},[qt]:oa}],[qt]:cr}],[qt]:cr},{error:"Invalid Configuration: Missing Region",[qt]:yr}]},qF=(r,e={})=>UT(KF,{endpointParams:r,logger:e.logger});Wh.aws=Vy;const YF=r=>({apiVersion:"2013-12-02",base64Decoder:(r==null?void 0:r.base64Decoder)??dg,base64Encoder:(r==null?void 0:r.base64Encoder)??Qy,disableHostPrefix:(r==null?void 0:r.disableHostPrefix)??!1,endpointProvider:(r==null?void 0:r.endpointProvider)??qF,extensions:(r==null?void 0:r.extensions)??[],httpAuthSchemeProvider:(r==null?void 0:r.httpAuthSchemeProvider)??VO,httpAuthSchemes:(r==null?void 0:r.httpAuthSchemes)??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Iw}],logger:(r==null?void 0:r.logger)??new Yy,serviceId:(r==null?void 0:r.serviceId)??"Kinesis",urlParser:(r==null?void 0:r.urlParser)??Yh,utf8Decoder:(r==null?void 0:r.utf8Decoder)??Jc,utf8Encoder:(r==null?void 0:r.utf8Encoder)??Xy}),XF=["in-region","cross-region","mobile","standard","legacy"],xC=({defaultsMode:r}={})=>hO(async()=>{const e=typeof r=="function"?await r():r;switch(e==null?void 0:e.toLowerCase()){case"auto":return Promise.resolve(QF()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(e==null?void 0:e.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${XF.join(", ")}, got ${e}`)}}),QF=()=>{var t,n;const r=typeof window<"u"&&((t=window==null?void 0:window.navigator)!=null&&t.userAgent)?eC.parse(window.navigator.userAgent):void 0,e=(n=r==null?void 0:r.platform)==null?void 0:n.type;return e==="tablet"||e==="mobile"},JF=r=>{const e=xC(r),t=()=>e().then(Sw),n=YF(r);return{...n,...r,runtime:"browser",defaultsMode:e,bodyLengthChecker:(r==null?void 0:r.bodyLengthChecker)??uC,credentialDefaultProvider:(r==null?void 0:r.credentialDefaultProvider)??(s=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:(r==null?void 0:r.defaultUserAgentProvider)??tC({serviceId:n.serviceId,clientVersion:GO.version}),eventStreamSerdeProvider:(r==null?void 0:r.eventStreamSerdeProvider)??zF,maxAttempts:(r==null?void 0:r.maxAttempts)??Xh,region:(r==null?void 0:r.region)??oC("Region is missing"),requestHandler:hg.create((r==null?void 0:r.requestHandler)??t),retryMode:(r==null?void 0:r.retryMode)??(async()=>(await t()).retryMode||tw),sha256:(r==null?void 0:r.sha256)??Qw,streamCollector:(r==null?void 0:r.streamCollector)??hw,useDualstackEndpoint:(r==null?void 0:r.useDualstackEndpoint)??(()=>Promise.resolve(WT)),useFipsEndpoint:(r==null?void 0:r.useFipsEndpoint)??(()=>Promise.resolve(KT))}},bC=r=>{let e=async()=>{if(r.region===void 0)throw new Error("Region is missing from runtimeConfig");const t=r.region;return typeof t=="string"?t:t()};return{setRegion(t){e=t},region(){return e}}},TC=r=>({region:r.region()}),ZF=r=>{const e=r.httpAuthSchemes;let t=r.httpAuthSchemeProvider,n=r.credentials;return{setHttpAuthScheme(s){const o=e.findIndex(u=>u.schemeId===s.schemeId);o===-1?e.push(s):e.splice(o,1,s)},httpAuthSchemes(){return e},setHttpAuthSchemeProvider(s){t=s},httpAuthSchemeProvider(){return t},setCredentials(s){n=s},credentials(){return n}}},eN=r=>({httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}),Rg=r=>r,tN=(r,e)=>{const t={...Rg(bC(r)),...Rg(Ew(r)),...Rg(yT(r)),...Rg(ZF(r))};return e.forEach(n=>n.configure(t)),{...r,...TC(t),...xw(t),...ST(t),...eN(t)}};class nN extends dw{constructor(...[e]){const t=JF(e||{}),n=jO(t),s=kT(n),o=uw(s),u=XT(o),c=u,h=ZT(c),m=lO(h),y=zO(m),E=tN(y,(e==null?void 0:e.extensions)||[]);super(E),this.config=E,this.middlewareStack.use(HT(this.config)),this.middlewareStack.use(Tw(this.config)),this.middlewareStack.use(_w(this.config)),this.middlewareStack.use(CT(this.config)),this.middlewareStack.use(RT(this.config)),this.middlewareStack.use(LT(this.config)),this.middlewareStack.use(ew(this.config,{httpAuthSchemeParametersProvider:BO,identityProviderConfigProvider:async T=>new Cw({"aws.auth#sigv4":T.credentials})})),this.middlewareStack.use(ww(this.config))}destroy(){super.destroy()}}class Ki extends gg{constructor(e){super(e),Object.setPrototypeOf(this,Ki.prototype)}}class vS extends Ki{constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,vS.prototype)}}class yS extends Ki{constructor(e){super({name:"InvalidArgumentException",$fault:"client",...e}),this.name="InvalidArgumentException",this.$fault="client",Object.setPrototypeOf(this,yS.prototype)}}let rN=class OI extends Ki{constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),this.name="LimitExceededException",this.$fault="client",Object.setPrototypeOf(this,OI.prototype)}};class SS extends Ki{constructor(e){super({name:"ResourceInUseException",$fault:"client",...e}),this.name="ResourceInUseException",this.$fault="client",Object.setPrototypeOf(this,SS.prototype)}}let iN=class FI extends Ki{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,FI.prototype)}};class ES extends Ki{constructor(e){super({name:"ExpiredIteratorException",$fault:"client",...e}),this.name="ExpiredIteratorException",this.$fault="client",Object.setPrototypeOf(this,ES.prototype)}}class xS extends Ki{constructor(e){super({name:"ExpiredNextTokenException",$fault:"client",...e}),this.name="ExpiredNextTokenException",this.$fault="client",Object.setPrototypeOf(this,xS.prototype)}}class bS extends Ki{constructor(e){super({name:"KMSAccessDeniedException",$fault:"client",...e}),this.name="KMSAccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,bS.prototype)}}class TS extends Ki{constructor(e){super({name:"KMSDisabledException",$fault:"client",...e}),this.name="KMSDisabledException",this.$fault="client",Object.setPrototypeOf(this,TS.prototype)}}class wS extends Ki{constructor(e){super({name:"KMSInvalidStateException",$fault:"client",...e}),this.name="KMSInvalidStateException",this.$fault="client",Object.setPrototypeOf(this,wS.prototype)}}class CS extends Ki{constructor(e){super({name:"KMSNotFoundException",$fault:"client",...e}),this.name="KMSNotFoundException",this.$fault="client",Object.setPrototypeOf(this,CS.prototype)}}class RS extends Ki{constructor(e){super({name:"KMSOptInRequired",$fault:"client",...e}),this.name="KMSOptInRequired",this.$fault="client",Object.setPrototypeOf(this,RS.prototype)}}class AS extends Ki{constructor(e){super({name:"KMSThrottlingException",$fault:"client",...e}),this.name="KMSThrottlingException",this.$fault="client",Object.setPrototypeOf(this,AS.prototype)}}class _S extends Ki{constructor(e){super({name:"ProvisionedThroughputExceededException",$fault:"client",...e}),this.name="ProvisionedThroughputExceededException",this.$fault="client",Object.setPrototypeOf(this,_S.prototype)}}class LS extends Ki{constructor(e){super({name:"ValidationException",$fault:"client",...e}),this.name="ValidationException",this.$fault="client",Object.setPrototypeOf(this,LS.prototype)}}var wC;(function(r){r.visit=(e,t)=>e.SubscribeToShardEvent!==void 0?t.SubscribeToShardEvent(e.SubscribeToShardEvent):e.ResourceNotFoundException!==void 0?t.ResourceNotFoundException(e.ResourceNotFoundException):e.ResourceInUseException!==void 0?t.ResourceInUseException(e.ResourceInUseException):e.KMSDisabledException!==void 0?t.KMSDisabledException(e.KMSDisabledException):e.KMSInvalidStateException!==void 0?t.KMSInvalidStateException(e.KMSInvalidStateException):e.KMSAccessDeniedException!==void 0?t.KMSAccessDeniedException(e.KMSAccessDeniedException):e.KMSNotFoundException!==void 0?t.KMSNotFoundException(e.KMSNotFoundException):e.KMSOptInRequired!==void 0?t.KMSOptInRequired(e.KMSOptInRequired):e.KMSThrottlingException!==void 0?t.KMSThrottlingException(e.KMSThrottlingException):e.InternalFailureException!==void 0?t.InternalFailureException(e.InternalFailureException):t._(e.$unknown[0],e.$unknown[1])})(wC||(wC={}));const sN=async(r,e)=>{const t=RN("PutRecord");let n;return n=JSON.stringify(TN(r,e)),CN(e,t,"/",void 0,n)},aN=async(r,e)=>{if(r.statusCode>=300)return oN(r,e);const t=await Eg(r.body,e);let n={};return n=Qn(t),{$metadata:Cs(r),...n}},oN=async(r,e)=>{const t={...r,body:await Kw(r.body,e)},n=qw(r,t.body);switch(n){case"AccessDeniedException":case"com.amazonaws.kinesis#AccessDeniedException":throw await lN(t);case"InvalidArgumentException":case"com.amazonaws.kinesis#InvalidArgumentException":throw await fN(t);case"LimitExceededException":case"com.amazonaws.kinesis#LimitExceededException":throw await yN(t);case"ResourceInUseException":case"com.amazonaws.kinesis#ResourceInUseException":throw await EN(t);case"ResourceNotFoundException":case"com.amazonaws.kinesis#ResourceNotFoundException":throw await xN(t);case"ExpiredIteratorException":case"com.amazonaws.kinesis#ExpiredIteratorException":throw await uN(t);case"KMSAccessDeniedException":case"com.amazonaws.kinesis#KMSAccessDeniedException":throw await dN(t);case"KMSDisabledException":case"com.amazonaws.kinesis#KMSDisabledException":throw await hN(t);case"KMSInvalidStateException":case"com.amazonaws.kinesis#KMSInvalidStateException":throw await pN(t);case"KMSNotFoundException":case"com.amazonaws.kinesis#KMSNotFoundException":throw await mN(t);case"KMSOptInRequired":case"com.amazonaws.kinesis#KMSOptInRequired":throw await gN(t);case"KMSThrottlingException":case"com.amazonaws.kinesis#KMSThrottlingException":throw await vN(t);case"ProvisionedThroughputExceededException":case"com.amazonaws.kinesis#ProvisionedThroughputExceededException":throw await SN(t);case"ExpiredNextTokenException":case"com.amazonaws.kinesis#ExpiredNextTokenException":throw await cN(t);case"ValidationException":case"com.amazonaws.kinesis#ValidationException":throw await bN(t);default:const s=t.body;return wN({output:r,parsedBody:s,errorCode:n})}},lN=async(r,e)=>{const t=r.body,n=Qn(t),s=new vS({$metadata:Cs(r),...n});return wr(s,t)},uN=async(r,e)=>{const t=r.body,n=Qn(t),s=new ES({$metadata:Cs(r),...n});return wr(s,t)},cN=async(r,e)=>{const t=r.body,n=Qn(t),s=new xS({$metadata:Cs(r),...n});return wr(s,t)},fN=async(r,e)=>{const t=r.body,n=Qn(t),s=new yS({$metadata:Cs(r),...n});return wr(s,t)},dN=async(r,e)=>{const t=r.body,n=Qn(t),s=new bS({$metadata:Cs(r),...n});return wr(s,t)},hN=async(r,e)=>{const t=r.body,n=Qn(t),s=new TS({$metadata:Cs(r),...n});return wr(s,t)},pN=async(r,e)=>{const t=r.body,n=Qn(t),s=new wS({$metadata:Cs(r),...n});return wr(s,t)},mN=async(r,e)=>{const t=r.body,n=Qn(t),s=new CS({$metadata:Cs(r),...n});return wr(s,t)},gN=async(r,e)=>{const t=r.body,n=Qn(t),s=new RS({$metadata:Cs(r),...n});return wr(s,t)},vN=async(r,e)=>{const t=r.body,n=Qn(t),s=new AS({$metadata:Cs(r),...n});return wr(s,t)},yN=async(r,e)=>{const t=r.body,n=Qn(t),s=new rN({$metadata:Cs(r),...n});return wr(s,t)},SN=async(r,e)=>{const t=r.body,n=Qn(t),s=new _S({$metadata:Cs(r),...n});return wr(s,t)},EN=async(r,e)=>{const t=r.body,n=Qn(t),s=new SS({$metadata:Cs(r),...n});return wr(s,t)},xN=async(r,e)=>{const t=r.body,n=Qn(t),s=new iN({$metadata:Cs(r),...n});return wr(s,t)},bN=async(r,e)=>{const t=r.body,n=Qn(t),s=new LS({$metadata:Cs(r),...n});return wr(s,t)},TN=(r,e)=>nS(r,{Data:e.base64Encoder,ExplicitHashKey:[],PartitionKey:[],SequenceNumberForOrdering:[],StreamARN:[],StreamName:[]}),Cs=r=>({httpStatusCode:r.statusCode,requestId:r.headers["x-amzn-requestid"]??r.headers["x-amzn-request-id"]??r.headers["x-amz-request-id"],extendedRequestId:r.headers["x-amz-id-2"],cfId:r.headers["x-amz-cf-id"]}),wN=yw(Ki),CN=async(r,e,t,n,s)=>{const{hostname:o,protocol:u="https",port:c,path:h}=await r.endpoint(),m={protocol:u,hostname:o,port:c,method:"POST",path:h.endsWith("/")?h.slice(0,-1)+t:h+t,headers:e};return s!==void 0&&(m.body=s),new aa(m)};function RN(r){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`Kinesis_20131202.${r}`}}class AN extends pg.classBuilder().ep({...HO,OperationType:{type:"staticContextParams",value:"data"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,t,n,s){return[Wy(n,this.serialize,this.deserialize),Ky(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","PutRecord",{}).n("KinesisClient","PutRecordCommand").f(void 0,void 0).ser(sN).de(aN).build(){}function CC(r){return Promise.all(Object.keys(r).reduce((e,t)=>{const n=r[t];return typeof n=="string"?e.push([t,n]):e.push(n().then(s=>[t,s])),e},[])).then(e=>e.reduce((t,[n,s])=>(t[n]=s,t),{}))}function _N(r){return async()=>{var c,h,m;(c=r.logger)==null||c.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const{GetCredentialsForIdentityCommand:e,CognitoIdentityClient:t}=await Promise.resolve().then(()=>iL),{Credentials:{AccessKeyId:n=LN(r.logger),Expiration:s,SecretKey:o=DN(r.logger),SessionToken:u}=kN(r.logger)}=await(r.client??new t(Object.assign({},r.clientConfig??{},{region:((h=r.clientConfig)==null?void 0:h.region)??((m=r.parentClientConfig)==null?void 0:m.region)}))).send(new e({CustomRoleArn:r.customRoleArn,IdentityId:r.identityId,Logins:r.logins?await CC(r.logins):void 0}));return{identityId:r.identityId,accessKeyId:n,secretAccessKey:o,sessionToken:u,expiration:s}}}function LN(r){throw new Cd("Response from Amazon Cognito contained no access key ID",{logger:r})}function kN(r){throw new Cd("Response from Amazon Cognito contained no credentials",{logger:r})}function DN(r){throw new Cd("Response from Amazon Cognito contained no secret key",{logger:r})}const kS="IdentityIds";class IN{constructor(e="aws:cognito-identity-ids"){this.dbName=e}getItem(e){return this.withObjectStore("readonly",t=>{const n=t.get(e);return new Promise(s=>{n.onerror=()=>s(null),n.onsuccess=()=>s(n.result?n.result.value:null)})}).catch(()=>null)}removeItem(e){return this.withObjectStore("readwrite",t=>{const n=t.delete(e);return new Promise((s,o)=>{n.onerror=()=>o(n.error),n.onsuccess=()=>s()})})}setItem(e,t){return this.withObjectStore("readwrite",n=>{const s=n.put({id:e,value:t});return new Promise((o,u)=>{s.onerror=()=>u(s.error),s.onsuccess=()=>o()})})}getDb(){const e=self.indexedDB.open(this.dbName,1);return new Promise((t,n)=>{e.onsuccess=()=>{t(e.result)},e.onerror=()=>{n(e.error)},e.onblocked=()=>{n(new Error("Unable to access DB"))},e.onupgradeneeded=()=>{const s=e.result;s.onerror=()=>{n(new Error("Failed to create object store"))},s.createObjectStore(kS,{keyPath:"id"})}})}withObjectStore(e,t){return this.getDb().then(n=>{const s=n.transaction(kS,e);return s.oncomplete=()=>n.close(),new Promise((o,u)=>{s.onerror=()=>u(s.error),o(t(s.objectStore(kS)))}).catch(o=>{throw n.close(),o})})}}class PN{constructor(e={}){this.store=e}getItem(e){return e in this.store?this.store[e]:null}removeItem(e){delete this.store[e]}setItem(e,t){this.store[e]=t}}const MN=new PN;function ON(){return typeof self=="object"&&self.indexedDB?new IN:typeof window=="object"&&window.localStorage?window.localStorage:MN}function FN({accountId:r,cache:e=ON(),client:t,clientConfig:n,customRoleArn:s,identityPoolId:o,logins:u,userIdentifier:c=!u||Object.keys(u).length===0?"ANONYMOUS":void 0,logger:h,parentClientConfig:m}){h==null||h.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const y=c?`aws:cognito-identity-credentials:${o}:${c}`:void 0;let E=async()=>{const{GetIdCommand:T,CognitoIdentityClient:R}=await Promise.resolve().then(()=>iL),_=t??new R(Object.assign({},n??{},{region:(n==null?void 0:n.region)??(m==null?void 0:m.region)}));let L=y&&await e.getItem(y);if(!L){const{IdentityId:M=NN(h)}=await _.send(new T({AccountId:r,IdentityPoolId:o,Logins:u?await CC(u):void 0}));L=M,y&&Promise.resolve(e.setItem(y,L)).catch(()=>{})}return E=_N({client:_,customRoleArn:s,logins:u,identityId:L}),E()};return()=>E().catch(async T=>{throw y&&Promise.resolve(e.removeItem(y)).catch(()=>{}),T})}function NN(r){throw new Cd("Response from Amazon Cognito contained no identity ID",{logger:r})}const UN=async(r,e,t)=>({operation:qh(e).operation,region:await hu(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function BN(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-identity",region:r.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}function Ag(r){return{schemeId:"smithy.api#noAuth"}}const $N=r=>{const e=[];switch(r.operation){case"GetCredentialsForIdentity":{e.push(Ag());break}case"GetId":{e.push(Ag());break}case"GetOpenIdToken":{e.push(Ag());break}case"UnlinkIdentity":{e.push(Ag());break}default:e.push(BN(r))}return e},VN=r=>({...Ww(r)}),zN=r=>({...r,useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,defaultSigningName:"cognito-identity"}),RC={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},jN={name:"@aws-sdk/client-cognito-identity",description:"AWS SDK for JavaScript Cognito Identity Client for Node.js, Browser and React Native",version:"3.637.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-cognito-identity","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo cognito-identity","test:e2e":"ts-mocha test/**/*.ispec.ts && karma start karma.conf.js"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.637.0","@aws-sdk/client-sts":"3.637.0","@aws-sdk/core":"3.635.0","@aws-sdk/credential-provider-node":"3.637.0","@aws-sdk/middleware-host-header":"3.620.0","@aws-sdk/middleware-logger":"3.609.0","@aws-sdk/middleware-recursion-detection":"3.620.0","@aws-sdk/middleware-user-agent":"3.637.0","@aws-sdk/region-config-resolver":"3.614.0","@aws-sdk/types":"3.609.0","@aws-sdk/util-endpoints":"3.637.0","@aws-sdk/util-user-agent-browser":"3.609.0","@aws-sdk/util-user-agent-node":"3.614.0","@smithy/config-resolver":"^3.0.5","@smithy/core":"^2.4.0","@smithy/fetch-http-handler":"^3.2.4","@smithy/hash-node":"^3.0.3","@smithy/invalid-dependency":"^3.0.3","@smithy/middleware-content-length":"^3.0.5","@smithy/middleware-endpoint":"^3.1.0","@smithy/middleware-retry":"^3.0.15","@smithy/middleware-serde":"^3.0.3","@smithy/middleware-stack":"^3.0.3","@smithy/node-config-provider":"^3.1.4","@smithy/node-http-handler":"^3.1.4","@smithy/protocol-http":"^4.1.0","@smithy/smithy-client":"^3.2.0","@smithy/types":"^3.3.0","@smithy/url-parser":"^3.0.3","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.15","@smithy/util-defaults-mode-node":"^3.0.15","@smithy/util-endpoints":"^2.0.5","@smithy/util-middleware":"^3.0.3","@smithy/util-retry":"^3.0.3","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@aws-sdk/client-iam":"3.637.0","@tsconfig/node16":"16.1.3","@types/chai":"^4.2.11","@types/mocha":"^8.0.4","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-cognito-identity",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-cognito-identity"}},AC="required",gl="fn",vl="argv",Ad="ref",_C=!0,LC="isSet",rp="booleanEquals",_d="error",ip="endpoint",pu="tree",DS="PartitionResult",kC={[AC]:!1,type:"String"},DC={[AC]:!0,default:!1,type:"Boolean"},IC={[Ad]:"Endpoint"},PC={[gl]:rp,[vl]:[{[Ad]:"UseFIPS"},!0]},MC={[gl]:rp,[vl]:[{[Ad]:"UseDualStack"},!0]},yl={},OC={[gl]:"getAttr",[vl]:[{[Ad]:DS},"supportsFIPS"]},FC={[gl]:rp,[vl]:[!0,{[gl]:"getAttr",[vl]:[{[Ad]:DS},"supportsDualStack"]}]},NC=[PC],UC=[MC],BC=[{[Ad]:"Region"}],HN={version:"1.0",parameters:{Region:kC,UseDualStack:DC,UseFIPS:DC,Endpoint:kC},rules:[{conditions:[{[gl]:LC,[vl]:[IC]}],rules:[{conditions:NC,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:_d},{conditions:UC,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:_d},{endpoint:{url:IC,properties:yl,headers:yl},type:ip}],type:pu},{conditions:[{[gl]:LC,[vl]:BC}],rules:[{conditions:[{[gl]:"aws.partition",[vl]:BC,assign:DS}],rules:[{conditions:[PC,MC],rules:[{conditions:[{[gl]:rp,[vl]:[_C,OC]},FC],rules:[{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:yl,headers:yl},type:ip}],type:pu},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:_d}],type:pu},{conditions:NC,rules:[{conditions:[{[gl]:rp,[vl]:[OC,_C]}],rules:[{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}",properties:yl,headers:yl},type:ip}],type:pu},{error:"FIPS is enabled but this partition does not support FIPS",type:_d}],type:pu},{conditions:UC,rules:[{conditions:[FC],rules:[{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:yl,headers:yl},type:ip}],type:pu},{error:"DualStack is enabled but this partition does not support DualStack",type:_d}],type:pu},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}",properties:yl,headers:yl},type:ip}],type:pu}],type:pu},{error:"Invalid Configuration: Missing Region",type:_d}]},GN=(r,e={})=>UT(HN,{endpointParams:r,logger:e.logger});Wh.aws=Vy;const WN=r=>({apiVersion:"2014-06-30",base64Decoder:(r==null?void 0:r.base64Decoder)??dg,base64Encoder:(r==null?void 0:r.base64Encoder)??Qy,disableHostPrefix:(r==null?void 0:r.disableHostPrefix)??!1,endpointProvider:(r==null?void 0:r.endpointProvider)??GN,extensions:(r==null?void 0:r.extensions)??[],httpAuthSchemeProvider:(r==null?void 0:r.httpAuthSchemeProvider)??$N,httpAuthSchemes:(r==null?void 0:r.httpAuthSchemes)??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Iw},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new sO}],logger:(r==null?void 0:r.logger)??new Yy,serviceId:(r==null?void 0:r.serviceId)??"Cognito Identity",urlParser:(r==null?void 0:r.urlParser)??Yh,utf8Decoder:(r==null?void 0:r.utf8Decoder)??Jc,utf8Encoder:(r==null?void 0:r.utf8Encoder)??Xy}),KN=r=>{const e=xC(r),t=()=>e().then(Sw),n=WN(r);return{...n,...r,runtime:"browser",defaultsMode:e,bodyLengthChecker:(r==null?void 0:r.bodyLengthChecker)??uC,credentialDefaultProvider:(r==null?void 0:r.credentialDefaultProvider)??(s=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:(r==null?void 0:r.defaultUserAgentProvider)??tC({serviceId:n.serviceId,clientVersion:jN.version}),maxAttempts:(r==null?void 0:r.maxAttempts)??Xh,region:(r==null?void 0:r.region)??oC("Region is missing"),requestHandler:hg.create((r==null?void 0:r.requestHandler)??t),retryMode:(r==null?void 0:r.retryMode)??(async()=>(await t()).retryMode||tw),sha256:(r==null?void 0:r.sha256)??Qw,streamCollector:(r==null?void 0:r.streamCollector)??hw,useDualstackEndpoint:(r==null?void 0:r.useDualstackEndpoint)??(()=>Promise.resolve(WT)),useFipsEndpoint:(r==null?void 0:r.useFipsEndpoint)??(()=>Promise.resolve(KT))}},qN=r=>{const e=r.httpAuthSchemes;let t=r.httpAuthSchemeProvider,n=r.credentials;return{setHttpAuthScheme(s){const o=e.findIndex(u=>u.schemeId===s.schemeId);o===-1?e.push(s):e.splice(o,1,s)},httpAuthSchemes(){return e},setHttpAuthSchemeProvider(s){t=s},httpAuthSchemeProvider(){return t},setCredentials(s){n=s},credentials(){return n}}},YN=r=>({httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}),_g=r=>r,XN=(r,e)=>{const t={..._g(bC(r)),..._g(Ew(r)),..._g(yT(r)),..._g(qN(r))};return e.forEach(n=>n.configure(t)),{...r,...TC(t),...xw(t),...ST(t),...YN(t)}};class $C extends dw{constructor(...[e]){const t=KN(e||{}),n=zN(t),s=kT(n),o=uw(s),u=XT(o),c=u,h=ZT(c),m=VN(h),y=XN(m,(e==null?void 0:e.extensions)||[]);super(y),this.config=y,this.middlewareStack.use(HT(this.config)),this.middlewareStack.use(Tw(this.config)),this.middlewareStack.use(_w(this.config)),this.middlewareStack.use(CT(this.config)),this.middlewareStack.use(RT(this.config)),this.middlewareStack.use(LT(this.config)),this.middlewareStack.use(ew(this.config,{httpAuthSchemeParametersProvider:UN,identityProviderConfigProvider:async E=>new Cw({"aws.auth#sigv4":E.credentials})})),this.middlewareStack.use(ww(this.config))}destroy(){super.destroy()}}class la extends gg{constructor(e){super(e),Object.setPrototypeOf(this,la.prototype)}}class IS extends la{constructor(e){super({name:"InternalErrorException",$fault:"server",...e}),this.name="InternalErrorException",this.$fault="server",Object.setPrototypeOf(this,IS.prototype)}}class PS extends la{constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),this.name="InvalidParameterException",this.$fault="client",Object.setPrototypeOf(this,PS.prototype)}}class MS extends la{constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),this.name="LimitExceededException",this.$fault="client",Object.setPrototypeOf(this,MS.prototype)}}class OS extends la{constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),this.name="NotAuthorizedException",this.$fault="client",Object.setPrototypeOf(this,OS.prototype)}}class FS extends la{constructor(e){super({name:"ResourceConflictException",$fault:"client",...e}),this.name="ResourceConflictException",this.$fault="client",Object.setPrototypeOf(this,FS.prototype)}}class NS extends la{constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,NS.prototype)}}class US extends la{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,US.prototype)}}class BS extends la{constructor(e){super({name:"ExternalServiceException",$fault:"client",...e}),this.name="ExternalServiceException",this.$fault="client",Object.setPrototypeOf(this,BS.prototype)}}class $S extends la{constructor(e){super({name:"InvalidIdentityPoolConfigurationException",$fault:"client",...e}),this.name="InvalidIdentityPoolConfigurationException",this.$fault="client",Object.setPrototypeOf(this,$S.prototype)}}class VS extends la{constructor(e){super({name:"DeveloperUserAlreadyRegisteredException",$fault:"client",...e}),this.name="DeveloperUserAlreadyRegisteredException",this.$fault="client",Object.setPrototypeOf(this,VS.prototype)}}class zS extends la{constructor(e){super({name:"ConcurrentModificationException",$fault:"client",...e}),this.name="ConcurrentModificationException",this.$fault="client",Object.setPrototypeOf(this,zS.prototype)}}const QN=async(r,e)=>{const t=jC("GetCredentialsForIdentity");let n;return n=JSON.stringify(Qn(r)),zC(e,t,"/",void 0,n)},JN=async(r,e)=>{const t=jC("GetId");let n;return n=JSON.stringify(Qn(r)),zC(e,t,"/",void 0,n)},ZN=async(r,e)=>{if(r.statusCode>=300)return VC(r,e);const t=await Eg(r.body,e);let n={};return n=hU(t),{$metadata:Oa(r),...n}},eU=async(r,e)=>{if(r.statusCode>=300)return VC(r,e);const t=await Eg(r.body,e);let n={};return n=Qn(t),{$metadata:Oa(r),...n}},VC=async(r,e)=>{const t={...r,body:await Kw(r.body,e)},n=qw(r,t.body);switch(n){case"InternalErrorException":case"com.amazonaws.cognitoidentity#InternalErrorException":throw await iU(t);case"InvalidParameterException":case"com.amazonaws.cognitoidentity#InvalidParameterException":throw await aU(t);case"LimitExceededException":case"com.amazonaws.cognitoidentity#LimitExceededException":throw await oU(t);case"NotAuthorizedException":case"com.amazonaws.cognitoidentity#NotAuthorizedException":throw await lU(t);case"ResourceConflictException":case"com.amazonaws.cognitoidentity#ResourceConflictException":throw await uU(t);case"TooManyRequestsException":case"com.amazonaws.cognitoidentity#TooManyRequestsException":throw await fU(t);case"ResourceNotFoundException":case"com.amazonaws.cognitoidentity#ResourceNotFoundException":throw await cU(t);case"ExternalServiceException":case"com.amazonaws.cognitoidentity#ExternalServiceException":throw await rU(t);case"InvalidIdentityPoolConfigurationException":case"com.amazonaws.cognitoidentity#InvalidIdentityPoolConfigurationException":throw await sU(t);case"DeveloperUserAlreadyRegisteredException":case"com.amazonaws.cognitoidentity#DeveloperUserAlreadyRegisteredException":throw await nU(t);case"ConcurrentModificationException":case"com.amazonaws.cognitoidentity#ConcurrentModificationException":throw await tU(t);default:const s=t.body;return pU({output:r,parsedBody:s,errorCode:n})}},tU=async(r,e)=>{const t=r.body,n=Qn(t),s=new zS({$metadata:Oa(r),...n});return wr(s,t)},nU=async(r,e)=>{const t=r.body,n=Qn(t),s=new VS({$metadata:Oa(r),...n});return wr(s,t)},rU=async(r,e)=>{const t=r.body,n=Qn(t),s=new BS({$metadata:Oa(r),...n});return wr(s,t)},iU=async(r,e)=>{const t=r.body,n=Qn(t),s=new IS({$metadata:Oa(r),...n});return wr(s,t)},sU=async(r,e)=>{const t=r.body,n=Qn(t),s=new $S({$metadata:Oa(r),...n});return wr(s,t)},aU=async(r,e)=>{const t=r.body,n=Qn(t),s=new PS({$metadata:Oa(r),...n});return wr(s,t)},oU=async(r,e)=>{const t=r.body,n=Qn(t),s=new MS({$metadata:Oa(r),...n});return wr(s,t)},lU=async(r,e)=>{const t=r.body,n=Qn(t),s=new OS({$metadata:Oa(r),...n});return wr(s,t)},uU=async(r,e)=>{const t=r.body,n=Qn(t),s=new FS({$metadata:Oa(r),...n});return wr(s,t)},cU=async(r,e)=>{const t=r.body,n=Qn(t),s=new US({$metadata:Oa(r),...n});return wr(s,t)},fU=async(r,e)=>{const t=r.body,n=Qn(t),s=new NS({$metadata:Oa(r),...n});return wr(s,t)},dU=(r,e)=>nS(r,{AccessKeyId:mg,Expiration:t=>UM(zM(eS(t))),SecretKey:mg,SessionToken:mg}),hU=(r,e)=>nS(r,{Credentials:t=>dU(t),IdentityId:mg}),Oa=r=>({httpStatusCode:r.statusCode,requestId:r.headers["x-amzn-requestid"]??r.headers["x-amzn-request-id"]??r.headers["x-amz-request-id"],extendedRequestId:r.headers["x-amz-id-2"],cfId:r.headers["x-amz-cf-id"]}),pU=yw(la),zC=async(r,e,t,n,s)=>{const{hostname:o,protocol:u="https",port:c,path:h}=await r.endpoint(),m={protocol:u,hostname:o,port:c,method:"POST",path:h.endsWith("/")?h.slice(0,-1)+t:h+t,headers:e};return s!==void 0&&(m.body=s),new aa(m)};function jC(r){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityService.${r}`}}class mU extends pg.classBuilder().ep({...RC}).m(function(e,t,n,s){return[Wy(n,this.serialize,this.deserialize),Ky(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetCredentialsForIdentity",{}).n("CognitoIdentityClient","GetCredentialsForIdentityCommand").f(void 0,void 0).ser(QN).de(ZN).build(){}class gU extends pg.classBuilder().ep({...RC}).m(function(e,t,n,s){return[Wy(n,this.serialize,this.deserialize),Ky(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetId",{}).n("CognitoIdentityClient","GetIdCommand").f(void 0,void 0).ser(JN).de(eU).build(){}const HC={prod:{identityPoolId:"ap-northeast-2:719e14e9-badd-4b73-9496-39303c66cd62",streamName:"brixCloud_analysis_prod"},stage:{identityPoolId:"ap-northeast-2:1df47bbd-2ed8-4edd-9e1d-0474bc52f0af",streamName:"brixCloud_analysis_stage"},dev:{identityPoolId:"ap-northeast-2:1df47bbd-2ed8-4edd-9e1d-0474bc52f0af",streamName:"brixCloud_analysis_dev"}};class vU{constructor({identityPoolId:e,streamName:t}){this.data={ua:{s:17,a:6,g:2,o:this.getOS(),b:this.getBrowser()},ts:{tt:0,wt:0,ws:0},di:{},ii:{p:1}},this.loopId=null;const n=new URLSearchParams(window.location.search);this.client=new nN({region:"ap-northeast-2",credentials:FN({client:new $C({region:"ap-northeast-2"}),identityPoolId:e})}),this.streamName=t,this.data.um={s:n.get("utm_source")??void 0}}send(e){const t=JSON.stringify(e??this.data),n=new AN({Data:new TextEncoder().encode(t),PartitionKey:"partitionKey-"+Math.random(),StreamName:this.streamName});this.client.send(n)}sleep(e){return new Promise(t=>setTimeout(t,e))}interval(e,t){return new Promise(n=>{this.loopId=setInterval(()=>{t(e),n()},e)})}timeout(e,t){return new Promise(n=>{this.loopId=setTimeout(()=>{t(e),n()},e)})}getOS(){const e=window.navigator.userAgent.toLowerCase();let t="기타";return e.indexOf("windows")>=0?t="Windows":e.indexOf("iphone")>=0||e.indexOf("ipad")>=0||e.indexOf("ipod")>=0?t="iOS":e.indexOf("mac")>=0?t="macOS":e.indexOf("android")>=0?t="Android":e.indexOf("linux")>=0&&(t="Linux"),["Windows","macOS","iOS","Android","Linux","기타"].indexOf(t)}getBrowser(){const e=window.navigator.userAgent.toLowerCase();let t="기타";return e.indexOf("edg")>=0?t="Edge":e.indexOf("chrome")>=0?t="Chrome":e.indexOf("safari")>=0?t="Safari":e.indexOf("firefox")>=0?t="Firefox":e.indexOf("trident")>=0&&(t="Internet Explorer"),["Chrome","Safari","Firefox","Internet Explorer","Edge","기타"].indexOf(t)}init(){this.data.ii.p=1}async start(){var t;if(!this.data.ty)return;if(this.loopId&&(clearTimeout(this.loopId),clearInterval(this.loopId)),this.data.ts.wt=new Date().getTime(),this.data.ty==="c"&&!this.data.di.iv){await this.sleep(500),this.stop(),this.init(),this.start();return}(t=window==null?void 0:window.__brix_console)==null||t.call(window,"entryTime",new Date(this.data.ts.wt).toLocaleString());const e=n=>{var o,u;n>1e3&&(this.data.ii.p=0),this.data.ii.i=n;const s=new Date().getTime();this.data.ts.tt=s,this.data.ts.ws=+((s-this.data.ts.wt)/1e3).toFixed(0),(o=window==null?void 0:window.__brix_console)==null||o.call(window,"watchingTime",this.data.ts.ws),(u=window==null?void 0:window.__brix_console)==null||u.call(window,"viewCount",{current:this.data.ii.p}),this.send()};await this.timeout(1e3,e),await this.timeout(3e3,e),await this.timeout(6e3,e),await this.interval(1e4,e)}stop(){this.loopId&&(clearTimeout(this.loopId),clearInterval(this.loopId))}sendAnalyze({like:e,comment:t,product:n,share:s,banner:o}){var c,h,m,y,E;const u={...this.data};e&&(u.cc={lk:e},(c=window==null?void 0:window.__brix_console)==null||c.call(window,"likeCount",{current:e})),t&&(u.cc={c:1},(h=window==null?void 0:window.__brix_console)==null||h.call(window,"commentCount",1)),s&&(u.cc={s:1},(m=window==null?void 0:window.__brix_console)==null||m.call(window,"shareCount",1)),n&&(u.pc={ip:n,tp:this.data.ts.wt},(y=window==null?void 0:window.__brix_console)==null||y.call(window,"productCount",1)),o&&(u.bc={ib:o,tb:this.data.ts.wt},(E=window==null?void 0:window.__brix_console)==null||E.call(window,"bannerCount",1)),this.send(u)}setUser(e,t){var n,s;this.data.di.iu=e,this.data.di.tu=t===0?"g":"m",(n=window==null?void 0:window.__brix_console)==null||n.call(window,"userId",e),(s=window==null?void 0:window.__brix_console)==null||s.call(window,"authType",t===0?"비회원":"회원"),this.stop(),this.init(),this.start()}setId(e){var t;this.data.ty&&(this.data.ty==="b"?(this.data.di.ib=e,delete this.data.di.is,delete this.data.di.icc,delete this.data.di.iugc):this.data.ty==="s"?(this.data.di.is=e,this.data.ii.s="vod",delete this.data.di.ib,delete this.data.di.icc,delete this.data.di.iugc):this.data.ty==="c"?(this.data.di.icc=e,this.data.ii.s="vod",delete this.data.di.ib,delete this.data.di.is,delete this.data.di.iugc):this.data.ty==="u"?(this.data.di.iugc=e,this.data.ii.s="vod",delete this.data.di.ib,delete this.data.di.is,delete this.data.di.icc):this.data.ty==="l"&&(this.data.di.il=e,this.data.ii.s="vod"),(t=window==null?void 0:window.__brix_console)==null||t.call(window,"id",e),this.stop(),this.init(),this.start())}setClientId(e){var t;this.data.di.ic=e,(t=window==null?void 0:window.__brix_console)==null||t.call(window,"clientId",e)}setStatus(e){this.data.ii.s=e,e==="cancel"&&this.stop()}setType(e){e==="broadcast"?this.data.ty="b":e==="shorts"?this.data.ty="s":e==="channel"?this.data.ty="c":e==="library"?this.data.ty="l":e==="ugc"&&(this.data.ty="u")}setChannelVodId(e){this.data.di.iv=e,this.init()}setChannelScheduleId(e){this.data.di.ics=e}getAPIQuery(){const e=new Date().getTime(),t=+((e-this.data.ts.wt)/1e3).toFixed(0),n={tt:e,ws:t,wt:this.data.ts.wt,p:this.data.ii.p,s:this.data.ii.s};return this.data.ty==="c"?{...n,vodId:this.data.di.iv,ics:this.data.di.ics}:n}}const yU=Tt.createContext(null);function SU({kinesis:r,children:e}){return Yt.jsx(yU.Provider,{value:r??null,children:e})}function EU({element:r,eventName:e,handler:t}){const n=Tt.useRef();Tt.useEffect(()=>{n.current=t},[t]),Tt.useEffect(()=>{if(!(r&&r.addEventListener))return;const s=o=>{n.current&&n.current(o)};return r.addEventListener(e,s),()=>{r.removeEventListener(e,s)}},[e,r])}function GC(r=!1){const[e,t]=Tt.useState(r);return[e,()=>t(s=>!s)]}function xU({onClick:r,onDoubleClick:e,time:t=250}){const n=Tt.useRef(),s=Tt.useRef(0),o=()=>{n.current&&(clearTimeout(n.current),n.current=void 0)};return Tt.useCallback(c=>{s.current+=1,o(),n.current=setTimeout(()=>{s.current===1?r==null||r(c):s.current===2&&(e==null||e(c)),s.current=0},t)},[r,e,t])}function bU(r,e=500){const[t,n]=Tt.useState(r);return Tt.useEffect(()=>{let s;const o=()=>{n(r)};return(()=>{clearTimeout(s),s=setTimeout(o,e)})(),()=>clearTimeout(s)},[t,r,e]),[t,n]}function TU({ref:r,...e}){const[t,n]=Tt.useState(!1);return Tt.useEffect(()=>{const s=r==null?void 0:r.current;if(!s||!window.IntersectionObserver)return;const o=new IntersectionObserver(u=>{if(u.length>0){const c=u[0];n(c.isIntersecting)}},e);return o.observe(s),()=>{o.unobserve(s),o.disconnect()}},[]),t}Tt.createContext(null),Tt.forwardRef(function({overlayElement:e,onExit:t},n){const[s,o]=Tt.useState(!1),u=Tt.useCallback(()=>o(!1),[]);return Tt.useImperativeHandle(n,()=>({close:u}),[u]),Tt.useEffect(()=>{requestAnimationFrame(()=>{o(!0)})},[]),Yt.jsx(e,{isOpen:s,close:u,exit:t})});const wU={type:"logger",log(r){this.output("log",r)},warn(r){this.output("warn",r)},error(r){this.output("error",r)},output(r,e){console&&console[r]&&console[r].apply(console,e)}};class Lg{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||wU,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,s){return s&&!this.debug?null:(typeof e[0]=="string"&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new Lg(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new Lg(this.logger,e)}}var Sl=new Lg;let kg=class{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const s=this.observers[n].get(t)||0;this.observers[n].set(t,s+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s<t;s++)n[s-1]=arguments[s];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(u=>{let[c,h]=u;for(let m=0;m<h;m++)c(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(u=>{let[c,h]=u;for(let m=0;m<h;m++)c.apply(c,[e,...n])})}};const sp=()=>{let r,e;const t=new Promise((n,s)=>{r=n,e=s});return t.resolve=r,t.reject=e,t},WC=r=>r==null?"":""+r,CU=(r,e,t)=>{r.forEach(n=>{e[n]&&(t[n]=e[n])})},RU=/###/g,KC=r=>r&&r.indexOf("###")>-1?r.replace(RU,"."):r,qC=r=>!r||typeof r=="string",ap=(r,e,t)=>{const n=typeof e!="string"?e:e.split(".");let s=0;for(;s<n.length-1;){if(qC(r))return{};const o=KC(n[s]);!r[o]&&t&&(r[o]=new t),Object.prototype.hasOwnProperty.call(r,o)?r=r[o]:r={},++s}return qC(r)?{}:{obj:r,k:KC(n[s])}},YC=(r,e,t)=>{const{obj:n,k:s}=ap(r,e,Object);if(n!==void 0||e.length===1){n[s]=t;return}let o=e[e.length-1],u=e.slice(0,e.length-1),c=ap(r,u,Object);for(;c.obj===void 0&&u.length;)o=`${u[u.length-1]}.${o}`,u=u.slice(0,u.length-1),c=ap(r,u,Object),c&&c.obj&&typeof c.obj[`${c.k}.${o}`]<"u"&&(c.obj=void 0);c.obj[`${c.k}.${o}`]=t},AU=(r,e,t,n)=>{const{obj:s,k:o}=ap(r,e,Object);s[o]=s[o]||[],s[o].push(t)},Dg=(r,e)=>{const{obj:t,k:n}=ap(r,e);if(t)return t[n]},_U=(r,e,t)=>{const n=Dg(r,t);return n!==void 0?n:Dg(e,t)},XC=(r,e,t)=>{for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in r?typeof r[n]=="string"||r[n]instanceof String||typeof e[n]=="string"||e[n]instanceof String?t&&(r[n]=e[n]):XC(r[n],e[n],t):r[n]=e[n]);return r},Ld=r=>r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var LU={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const kU=r=>typeof r=="string"?r.replace(/[&<>"'\/]/g,e=>LU[e]):r;class DU{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}const IU=[" ",",","?","!",";"],PU=new DU(20),MU=(r,e,t)=>{e=e||"",t=t||"";const n=IU.filter(u=>e.indexOf(u)<0&&t.indexOf(u)<0);if(n.length===0)return!0;const s=PU.getRegExp(`(${n.map(u=>u==="?"?"\\?":u).join("|")})`);let o=!s.test(r);if(!o){const u=r.indexOf(t);u>0&&!s.test(r.substring(0,u))&&(o=!0)}return o},jS=function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!r)return;if(r[e])return r[e];const n=e.split(t);let s=r;for(let o=0;o<n.length;){if(!s||typeof s!="object")return;let u,c="";for(let h=o;h<n.length;++h)if(h!==o&&(c+=t),c+=n[h],u=s[c],u!==void 0){if(["string","number","boolean"].indexOf(typeof u)>-1&&h<n.length-1)continue;o+=h-o+1;break}s=u}return s},Ig=r=>r&&r.indexOf("_")>0?r.replace("_","-"):r;class QC extends kg{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,u=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let c;e.indexOf(".")>-1?c=e.split("."):(c=[e,t],n&&(Array.isArray(n)?c.push(...n):typeof n=="string"&&o?c.push(...n.split(o)):c.push(n)));const h=Dg(this.data,c);return!h&&!t&&!n&&e.indexOf(".")>-1&&(e=c[0],t=c[1],n=c.slice(2).join(".")),h||!u||typeof n!="string"?h:jS(this.data&&this.data[e]&&this.data[e][t],n,o)}addResource(e,t,n,s){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const u=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let c=[e,t];n&&(c=c.concat(u?n.split(u):n)),e.indexOf(".")>-1&&(c=e.split("."),s=t,t=c[1]),this.addNamespaces(t),YC(this.data,c,s),o.silent||this.emit("added",e,t,n,s)}addResources(e,t,n){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in n)(typeof n[o]=="string"||Array.isArray(n[o]))&&this.addResource(e,t,o,n[o],{silent:!0});s.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,s,o){let u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},c=[e,t];e.indexOf(".")>-1&&(c=e.split("."),s=n,n=t,t=c[1]),this.addNamespaces(t);let h=Dg(this.data,c)||{};u.skipCopy||(n=JSON.parse(JSON.stringify(n))),s?XC(h,n,o):h={...h,...n},YC(this.data,c,h),u.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(s=>t[s]&&Object.keys(t[s]).length>0)}toJSON(){return this.data}}var JC={processors:{},addPostProcessor(r){this.processors[r.name]=r},handle(r,e,t,n,s){return r.forEach(o=>{this.processors[o]&&(e=this.processors[o].process(e,t,n,s))}),e}};const ZC={};class Pg extends kg{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),CU(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Sl.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const n=this.resolve(e,t);return n&&n.res!==void 0}extractFromKey(e,t){let n=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const s=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const u=n&&e.indexOf(n)>-1,c=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!MU(e,n,s);if(u&&!c){const h=e.match(this.interpolator.nestingRegexp);if(h&&h.length>0)return{key:e,namespaces:o};const m=e.split(n);(n!==s||n===s&&this.options.ns.indexOf(m[0])>-1)&&(o=m.shift()),e=m.join(s)}return typeof o=="string"&&(o=[o]),{key:e,namespaces:o}}translate(e,t,n){if(typeof t!="object"&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),typeof t=="object"&&(t={...t}),t||(t={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const s=t.returnDetails!==void 0?t.returnDetails:this.options.returnDetails,o=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,{key:u,namespaces:c}=this.extractFromKey(e[e.length-1],t),h=c[c.length-1],m=t.lng||this.language,y=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(m&&m.toLowerCase()==="cimode"){if(y){const Y=t.nsSeparator||this.options.nsSeparator;return s?{res:`${h}${Y}${u}`,usedKey:u,exactUsedKey:u,usedLng:m,usedNS:h,usedParams:this.getUsedParamsDetails(t)}:`${h}${Y}${u}`}return s?{res:u,usedKey:u,exactUsedKey:u,usedLng:m,usedNS:h,usedParams:this.getUsedParamsDetails(t)}:u}const E=this.resolve(e,t);let T=E&&E.res;const R=E&&E.usedKey||u,_=E&&E.exactUsedKey||u,L=Object.prototype.toString.apply(T),M=["[object Number]","[object Function]","[object RegExp]"],F=t.joinArrays!==void 0?t.joinArrays:this.options.joinArrays,Z=!this.i18nFormat||this.i18nFormat.handleAsObject;if(Z&&T&&(typeof T!="string"&&typeof T!="boolean"&&typeof T!="number")&&M.indexOf(L)<0&&!(typeof F=="string"&&Array.isArray(T))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const Y=this.options.returnedObjectHandler?this.options.returnedObjectHandler(R,T,{...t,ns:c}):`key '${u} (${this.language})' returned an object instead of string.`;return s?(E.res=Y,E.usedParams=this.getUsedParamsDetails(t),E):Y}if(o){const Y=Array.isArray(T),X=Y?[]:{},ue=Y?_:R;for(const ie in T)if(Object.prototype.hasOwnProperty.call(T,ie)){const ye=`${ue}${o}${ie}`;X[ie]=this.translate(ye,{...t,joinArrays:!1,ns:c}),X[ie]===ye&&(X[ie]=T[ie])}T=X}}else if(Z&&typeof F=="string"&&Array.isArray(T))T=T.join(F),T&&(T=this.extendTranslation(T,e,t,n));else{let Y=!1,X=!1;const ue=t.count!==void 0&&typeof t.count!="string",ie=Pg.hasDefaultValue(t),ye=ue?this.pluralResolver.getSuffix(m,t.count,t):"",de=t.ordinal&&ue?this.pluralResolver.getSuffix(m,t.count,{ordinal:!1}):"",Re=ue&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),Ce=Re&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${ye}`]||t[`defaultValue${de}`]||t.defaultValue;!this.isValidLookup(T)&&ie&&(Y=!0,T=Ce),this.isValidLookup(T)||(X=!0,T=u);const ze=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&X?void 0:T,Qe=ie&&Ce!==T&&this.options.updateMissing;if(X||Y||Qe){if(this.logger.log(Qe?"updateKey":"missingKey",m,h,u,Qe?Ce:T),o){const _e=this.resolve(u,{...t,keySeparator:!1});_e&&_e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let et=[];const Pe=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Pe&&Pe[0])for(let _e=0;_e<Pe.length;_e++)et.push(Pe[_e]);else this.options.saveMissingTo==="all"?et=this.languageUtils.toResolveHierarchy(t.lng||this.language):et.push(t.lng||this.language);const ne=(_e,Ue,He)=>{const Be=ie&&He!==T?He:ze;this.options.missingKeyHandler?this.options.missingKeyHandler(_e,h,Ue,Be,Qe,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(_e,h,Ue,Be,Qe,t),this.emit("missingKey",_e,h,Ue,T)};this.options.saveMissing&&(this.options.saveMissingPlurals&&ue?et.forEach(_e=>{const Ue=this.pluralResolver.getSuffixes(_e,t);Re&&t[`defaultValue${this.options.pluralSeparator}zero`]&&Ue.indexOf(`${this.options.pluralSeparator}zero`)<0&&Ue.push(`${this.options.pluralSeparator}zero`),Ue.forEach(He=>{ne([_e],u+He,t[`defaultValue${He}`]||Ce)})}):ne(et,u,Ce))}T=this.extendTranslation(T,e,t,E,n),X&&T===u&&this.options.appendNamespaceToMissingKey&&(T=`${h}:${u}`),(X||Y)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?T=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${h}:${u}`:u,Y?T:void 0):T=this.options.parseMissingKeyHandler(T))}return s?(E.res=T,E.usedParams=this.getUsedParamsDetails(t),E):T}extendTranslation(e,t,n,s,o){var u=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const m=typeof e=="string"&&(n&&n.interpolation&&n.interpolation.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let y;if(m){const T=e.match(this.interpolator.nestingRegexp);y=T&&T.length}let E=n.replace&&typeof n.replace!="string"?n.replace:n;if(this.options.interpolation.defaultVariables&&(E={...this.options.interpolation.defaultVariables,...E}),e=this.interpolator.interpolate(e,E,n.lng||this.language||s.usedLng,n),m){const T=e.match(this.interpolator.nestingRegexp),R=T&&T.length;y<R&&(n.nest=!1)}!n.lng&&this.options.compatibilityAPI!=="v1"&&s&&s.res&&(n.lng=this.language||s.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var T=arguments.length,R=new Array(T),_=0;_<T;_++)R[_]=arguments[_];return o&&o[0]===R[0]&&!n.context?(u.logger.warn(`It seems you are nesting recursively key: ${R[0]} in key: ${t[0]}`),null):u.translate(...R,t)},n)),n.interpolation&&this.interpolator.reset()}const c=n.postProcess||this.options.postProcess,h=typeof c=="string"?[c]:c;return e!=null&&h&&h.length&&n.applyPostProcessor!==!1&&(e=JC.handle(h,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,s,o,u,c;return typeof e=="string"&&(e=[e]),e.forEach(h=>{if(this.isValidLookup(n))return;const m=this.extractFromKey(h,t),y=m.key;s=y;let E=m.namespaces;this.options.fallbackNS&&(E=E.concat(this.options.fallbackNS));const T=t.count!==void 0&&typeof t.count!="string",R=T&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),_=t.context!==void 0&&(typeof t.context=="string"||typeof t.context=="number")&&t.context!=="",L=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);E.forEach(M=>{this.isValidLookup(n)||(c=M,!ZC[`${L[0]}-${M}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(c)&&(ZC[`${L[0]}-${M}`]=!0,this.logger.warn(`key "${s}" for languages "${L.join(", ")}" won't get resolved as namespace "${c}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),L.forEach(F=>{if(this.isValidLookup(n))return;u=F;const Z=[y];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(Z,y,F,M,t);else{let Y;T&&(Y=this.pluralResolver.getSuffix(F,t.count,t));const X=`${this.options.pluralSeparator}zero`,ue=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(T&&(Z.push(y+Y),t.ordinal&&Y.indexOf(ue)===0&&Z.push(y+Y.replace(ue,this.options.pluralSeparator)),R&&Z.push(y+X)),_){const ie=`${y}${this.options.contextSeparator}${t.context}`;Z.push(ie),T&&(Z.push(ie+Y),t.ordinal&&Y.indexOf(ue)===0&&Z.push(ie+Y.replace(ue,this.options.pluralSeparator)),R&&Z.push(ie+X))}}let K;for(;K=Z.pop();)this.isValidLookup(n)||(o=K,n=this.getResource(F,M,K,t))}))})}),{res:n,usedKey:s,exactUsedKey:o,usedLng:u,usedNS:c}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,n){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,s):this.resourceStore.getResource(e,t,n,s)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&typeof e.replace!="string";let s=n?e.replace:e;if(n&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!n){s={...s};for(const o of t)delete s[o]}return s}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&e[n]!==void 0)return!0;return!1}}const HS=r=>r.charAt(0).toUpperCase()+r.slice(1);class eR{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Sl.create("languageUtils")}getScriptPartFromCode(e){if(e=Ig(e),!e||e.indexOf("-")<0)return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=Ig(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(typeof e=="string"&&e.indexOf("-")>-1){const t=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map(s=>s.toLowerCase()):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=HS(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!=="sgn"&&n[2].length===2&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=HS(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=HS(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(n=>{if(t)return;const s=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(s))&&(t=s)}),!t&&this.options.supportedLngs&&e.forEach(n=>{if(t)return;const s=this.getLanguagePartFromCode(n);if(this.isSupportedCode(s))return t=s;t=this.options.supportedLngs.find(o=>{if(o===s)return o;if(!(o.indexOf("-")<0&&s.indexOf("-")<0)&&(o.indexOf("-")>0&&s.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===s||o.indexOf(s)===0&&s.length>1))return o})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),typeof e=="string"&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),s=[],o=u=>{u&&(this.isSupportedCode(u)?s.push(u):this.logger.warn(`rejecting language code not found in supportedLngs: ${u}`))};return typeof e=="string"&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(e))):typeof e=="string"&&o(this.formatLanguageCode(e)),n.forEach(u=>{s.indexOf(u)<0&&o(this.formatLanguageCode(u))}),s}}let OU=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],FU={1:r=>+(r>1),2:r=>+(r!=1),3:r=>0,4:r=>r%10==1&&r%100!=11?0:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?1:2,5:r=>r==0?0:r==1?1:r==2?2:r%100>=3&&r%100<=10?3:r%100>=11?4:5,6:r=>r==1?0:r>=2&&r<=4?1:2,7:r=>r==1?0:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?1:2,8:r=>r==1?0:r==2?1:r!=8&&r!=11?2:3,9:r=>+(r>=2),10:r=>r==1?0:r==2?1:r<7?2:r<11?3:4,11:r=>r==1||r==11?0:r==2||r==12?1:r>2&&r<20?2:3,12:r=>+(r%10!=1||r%100==11),13:r=>+(r!==0),14:r=>r==1?0:r==2?1:r==3?2:3,15:r=>r%10==1&&r%100!=11?0:r%10>=2&&(r%100<10||r%100>=20)?1:2,16:r=>r%10==1&&r%100!=11?0:r!==0?1:2,17:r=>r==1||r%10==1&&r%100!=11?0:1,18:r=>r==0?0:r==1?1:2,19:r=>r==1?0:r==0||r%100>1&&r%100<11?1:r%100>10&&r%100<20?2:3,20:r=>r==1?0:r==0||r%100>0&&r%100<20?1:2,21:r=>r%100==1?1:r%100==2?2:r%100==3||r%100==4?3:0,22:r=>r==1?0:r==2?1:(r<0||r>10)&&r%10==0?2:3};const NU=["v1","v2","v3"],UU=["v4"],tR={zero:0,one:1,two:2,few:3,many:4,other:5},BU=()=>{const r={};return OU.forEach(e=>{e.lngs.forEach(t=>{r[t]={numbers:e.nr,plurals:FU[e.fc]}})}),r};class $U{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=Sl.create("pluralResolver"),(!this.options.compatibilityJSON||UU.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=BU(),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{const n=Ig(e==="dev"?"en":e),s=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:n,type:s});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];const u=new Intl.PluralRules(n,{type:s});return this.pluralRulesCache[o]=u,u}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,n).map(s=>`${t}${s}`)}getSuffixes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((s,o)=>tR[s]-tR[o]).map(s=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${s}`):n.numbers.map(s=>this.getSuffix(e,s,t)):[]}getSuffix(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=this.getRule(e,n);return s?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s.select(t)}`:this.getSuffixRetroCompatible(s,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let s=e.numbers[n];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(s===2?s="plural":s===1&&(s=""));const o=()=>this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString();return this.options.compatibilityJSON==="v1"?s===1?"":typeof s=="number"?`_plural_${s.toString()}`:o():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?o():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!NU.includes(this.options.compatibilityJSON)}}const nR=function(r,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=_U(r,e,t);return!o&&s&&typeof t=="string"&&(o=jS(r,t,n),o===void 0&&(o=jS(e,t,n))),o},GS=r=>r.replace(/\$/g,"$$$$");class VU{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Sl.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(t=>t),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:s,prefix:o,prefixEscaped:u,suffix:c,suffixEscaped:h,formatSeparator:m,unescapeSuffix:y,unescapePrefix:E,nestingPrefix:T,nestingPrefixEscaped:R,nestingSuffix:_,nestingSuffixEscaped:L,nestingOptionsSeparator:M,maxReplaces:F,alwaysFormat:Z}=e.interpolation;this.escape=t!==void 0?t:kU,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=o?Ld(o):u||"{{",this.suffix=c?Ld(c):h||"}}",this.formatSeparator=m||",",this.unescapePrefix=y?"":E||"-",this.unescapeSuffix=this.unescapePrefix?"":y||"",this.nestingPrefix=T?Ld(T):R||Ld("$t("),this.nestingSuffix=_?Ld(_):L||Ld(")"),this.nestingOptionsSeparator=M||",",this.maxReplaces=F||1e3,this.alwaysFormat=Z!==void 0?Z:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,n)=>t&&t.source===n?(t.lastIndex=0,t):new RegExp(n,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,n,s){let o,u,c;const h=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},m=R=>{if(R.indexOf(this.formatSeparator)<0){const F=nR(t,h,R,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(F,void 0,n,{...s,...t,interpolationkey:R}):F}const _=R.split(this.formatSeparator),L=_.shift().trim(),M=_.join(this.formatSeparator).trim();return this.format(nR(t,h,L,this.options.keySeparator,this.options.ignoreJSONStructure),M,n,{...s,...t,interpolationkey:L})};this.resetRegExp();const y=s&&s.missingInterpolationHandler||this.options.missingInterpolationHandler,E=s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:R=>GS(R)},{regex:this.regexp,safeValue:R=>this.escapeValue?GS(this.escape(R)):GS(R)}].forEach(R=>{for(c=0;o=R.regex.exec(e);){const _=o[1].trim();if(u=m(_),u===void 0)if(typeof y=="function"){const M=y(e,o,s);u=typeof M=="string"?M:""}else if(s&&Object.prototype.hasOwnProperty.call(s,_))u="";else if(E){u=o[0];continue}else this.logger.warn(`missed to pass in variable ${_} for interpolating ${e}`),u="";else typeof u!="string"&&!this.useRawValueToEscape&&(u=WC(u));const L=R.safeValue(u);if(e=e.replace(o[0],L),E?(R.regex.lastIndex+=u.length,R.regex.lastIndex-=o[0].length):R.regex.lastIndex=0,c++,c>=this.maxReplaces)break}}),e}nest(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,o,u;const c=(h,m)=>{const y=this.nestingOptionsSeparator;if(h.indexOf(y)<0)return h;const E=h.split(new RegExp(`${y}[ ]*{`));let T=`{${E[1]}`;h=E[0],T=this.interpolate(T,u);const R=T.match(/'/g),_=T.match(/"/g);(R&&R.length%2===0&&!_||_.length%2!==0)&&(T=T.replace(/'/g,'"'));try{u=JSON.parse(T),m&&(u={...m,...u})}catch(L){return this.logger.warn(`failed parsing options string in nesting for key ${h}`,L),`${h}${y}${T}`}return u.defaultValue&&u.defaultValue.indexOf(this.prefix)>-1&&delete u.defaultValue,h};for(;s=this.nestingRegexp.exec(e);){let h=[];u={...n},u=u.replace&&typeof u.replace!="string"?u.replace:u,u.applyPostProcessor=!1,delete u.defaultValue;let m=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const y=s[1].split(this.formatSeparator).map(E=>E.trim());s[1]=y.shift(),h=y,m=!0}if(o=t(c.call(this,s[1].trim(),u),u),o&&s[0]===e&&typeof o!="string")return o;typeof o!="string"&&(o=WC(o)),o||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),o=""),m&&(o=h.reduce((y,E)=>this.format(y,E,n.lng,{...n,interpolationkey:s[1].trim()}),o.trim())),e=e.replace(s[0],o),this.regexp.lastIndex=0}return e}}const zU=r=>{let e=r.toLowerCase().trim();const t={};if(r.indexOf("(")>-1){const n=r.split("(");e=n[0].toLowerCase().trim();const s=n[1].substring(0,n[1].length-1);e==="currency"&&s.indexOf(":")<0?t.currency||(t.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?t.range||(t.range=s.trim()):s.split(";").forEach(u=>{if(u){const[c,...h]=u.split(":"),m=h.join(":").trim().replace(/^'+|'+$/g,""),y=c.trim();t[y]||(t[y]=m),m==="false"&&(t[y]=!1),m==="true"&&(t[y]=!0),isNaN(m)||(t[y]=parseInt(m,10))}})}return{formatName:e,formatOptions:t}},kd=r=>{const e={};return(t,n,s)=>{let o=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(o={...o,[s.interpolationkey]:void 0});const u=n+JSON.stringify(o);let c=e[u];return c||(c=r(Ig(n),s),e[u]=c),c(t)}};class jU{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Sl.create("formatter"),this.options=e,this.formats={number:kd((t,n)=>{const s=new Intl.NumberFormat(t,{...n});return o=>s.format(o)}),currency:kd((t,n)=>{const s=new Intl.NumberFormat(t,{...n,style:"currency"});return o=>s.format(o)}),datetime:kd((t,n)=>{const s=new Intl.DateTimeFormat(t,{...n});return o=>s.format(o)}),relativetime:kd((t,n)=>{const s=new Intl.RelativeTimeFormat(t,{...n});return o=>s.format(o,n.range||"day")}),list:kd((t,n)=>{const s=new Intl.ListFormat(t,{...n});return o=>s.format(o)})},this.init(e)}init(e){const n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=kd(t)}format(e,t,n){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(c=>c.indexOf(")")>-1)){const c=o.findIndex(h=>h.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,c)].join(this.formatSeparator)}return o.reduce((c,h)=>{const{formatName:m,formatOptions:y}=zU(h);if(this.formats[m]){let E=c;try{const T=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},R=T.locale||T.lng||s.locale||s.lng||n;E=this.formats[m](c,R,{...y,...s,...T})}catch(T){this.logger.warn(T)}return E}else this.logger.warn(`there was no format function for ${m}`);return c},e)}}const HU=(r,e)=>{r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--)};class GU extends kg{constructor(e,t,n){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=s,this.logger=Sl.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,s.backend,s)}queueLoad(e,t,n,s){const o={},u={},c={},h={};return e.forEach(m=>{let y=!0;t.forEach(E=>{const T=`${m}|${E}`;!n.reload&&this.store.hasResourceBundle(m,E)?this.state[T]=2:this.state[T]<0||(this.state[T]===1?u[T]===void 0&&(u[T]=!0):(this.state[T]=1,y=!1,u[T]===void 0&&(u[T]=!0),o[T]===void 0&&(o[T]=!0),h[E]===void 0&&(h[E]=!0)))}),y||(c[m]=!0)}),(Object.keys(o).length||Object.keys(u).length)&&this.queue.push({pending:u,pendingCount:Object.keys(u).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(o),pending:Object.keys(u),toLoadLanguages:Object.keys(c),toLoadNamespaces:Object.keys(h)}}loaded(e,t,n){const s=e.split("|"),o=s[0],u=s[1];t&&this.emit("failedLoading",o,u,t),!t&&n&&this.store.addResourceBundle(o,u,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const c={};this.queue.forEach(h=>{AU(h.loaded,[o],u),HU(h,e),t&&h.errors.push(t),h.pendingCount===0&&!h.done&&(Object.keys(h.loaded).forEach(m=>{c[m]||(c[m]={});const y=h.loaded[m];y.length&&y.forEach(E=>{c[m][E]===void 0&&(c[m][E]=!0)})}),h.done=!0,h.errors.length?h.callback(h.errors):h.callback())}),this.emit("loaded",c),this.queue=this.queue.filter(h=>!h.done)}read(e,t,n){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,u=arguments.length>5?arguments[5]:void 0;if(!e.length)return u(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:s,wait:o,callback:u});return}this.readingCalls++;const c=(m,y)=>{if(this.readingCalls--,this.waitingReads.length>0){const E=this.waitingReads.shift();this.read(E.lng,E.ns,E.fcName,E.tried,E.wait,E.callback)}if(m&&y&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,s+1,o*2,u)},o);return}u(m,y)},h=this.backend[n].bind(this.backend);if(h.length===2){try{const m=h(e,t);m&&typeof m.then=="function"?m.then(y=>c(null,y)).catch(c):c(null,m)}catch(m){c(m)}return}return h(e,t,c)}prepareLoading(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof t=="string"&&(t=[t]);const o=this.queueLoad(e,t,n,s);if(!o.toLoad.length)return o.pending.length||s(),null;o.toLoad.forEach(u=>{this.loadOne(u)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=e.split("|"),s=n[0],o=n[1];this.read(s,o,"read",void 0,void 0,(u,c)=>{u&&this.logger.warn(`${t}loading namespace ${o} for language ${s} failed`,u),!u&&c&&this.logger.log(`${t}loaded namespace ${o} for language ${s}`,c),this.loaded(e,u,c)})}saveMissing(e,t,n,s,o){let u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if(this.backend&&this.backend.create){const h={...u,isUpdate:o},m=this.backend.create.bind(this.backend);if(m.length<6)try{let y;m.length===5?y=m(e,t,n,s,h):y=m(e,t,n,s),y&&typeof y.then=="function"?y.then(E=>c(null,E)).catch(c):c(null,y)}catch(y){c(y)}else m(e,t,n,s,c,h)}!e||!e[0]||this.store.addResource(e[0],t,n,s)}}}const rR=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:r=>{let e={};if(typeof r[1]=="object"&&(e=r[1]),typeof r[1]=="string"&&(e.defaultValue=r[1]),typeof r[2]=="string"&&(e.tDescription=r[2]),typeof r[2]=="object"||typeof r[3]=="object"){const t=r[3]||r[2];Object.keys(t).forEach(n=>{e[n]=t[n]})}return e},interpolation:{escapeValue:!0,format:r=>r,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),iR=r=>(typeof r.ns=="string"&&(r.ns=[r.ns]),typeof r.fallbackLng=="string"&&(r.fallbackLng=[r.fallbackLng]),typeof r.fallbackNS=="string"&&(r.fallbackNS=[r.fallbackNS]),r.supportedLngs&&r.supportedLngs.indexOf("cimode")<0&&(r.supportedLngs=r.supportedLngs.concat(["cimode"])),r),Mg=()=>{},WU=r=>{Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(t=>{typeof r[t]=="function"&&(r[t]=r[t].bind(r))})};class op extends kg{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=iR(e),this.services={},this.logger=Sl,this.modules={external:[]},WU(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),!t.defaultNS&&t.defaultNS!==!1&&t.ns&&(typeof t.ns=="string"?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const s=rR();this.options={...s,...this.options,...iR(t)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...s.interpolation,...this.options.interpolation}),t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const o=y=>y?typeof y=="function"?new y:y:null;if(!this.options.isClone){this.modules.logger?Sl.init(o(this.modules.logger),this.options):Sl.init(null,this.options);let y;this.modules.formatter?y=this.modules.formatter:typeof Intl<"u"&&(y=jU);const E=new eR(this.options);this.store=new QC(this.options.resources,this.options);const T=this.services;T.logger=Sl,T.resourceStore=this.store,T.languageUtils=E,T.pluralResolver=new $U(E,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),y&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(T.formatter=o(y),T.formatter.init(T,this.options),this.options.interpolation.format=T.formatter.format.bind(T.formatter)),T.interpolator=new VU(this.options),T.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},T.backendConnector=new GU(o(this.modules.backend),T.resourceStore,T,this.options),T.backendConnector.on("*",function(R){for(var _=arguments.length,L=new Array(_>1?_-1:0),M=1;M<_;M++)L[M-1]=arguments[M];e.emit(R,...L)}),this.modules.languageDetector&&(T.languageDetector=o(this.modules.languageDetector),T.languageDetector.init&&T.languageDetector.init(T,this.options.detection,this.options)),this.modules.i18nFormat&&(T.i18nFormat=o(this.modules.i18nFormat),T.i18nFormat.init&&T.i18nFormat.init(this)),this.translator=new Pg(this.services,this.options),this.translator.on("*",function(R){for(var _=arguments.length,L=new Array(_>1?_-1:0),M=1;M<_;M++)L[M-1]=arguments[M];e.emit(R,...L)}),this.modules.external.forEach(R=>{R.init&&R.init(this)})}if(this.format=this.options.interpolation.format,n||(n=Mg),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const y=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);y.length>0&&y[0]!=="dev"&&(this.options.lng=y[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(y=>{this[y]=function(){return e.store[y](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(y=>{this[y]=function(){return e.store[y](...arguments),e}});const h=sp(),m=()=>{const y=(E,T)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),h.resolve(T),n(E,T)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return y(null,this.t.bind(this));this.changeLanguage(this.options.lng,y)};return this.options.resources||!this.options.initImmediate?m():setTimeout(m,0),h}loadResources(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Mg;const s=typeof e=="string"?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(s&&s.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const o=[],u=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(m=>{m!=="cimode"&&o.indexOf(m)<0&&o.push(m)})};s?u(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(h=>u(h)),this.options.preload&&this.options.preload.forEach(c=>u(c)),this.services.backendConnector.load(o,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(c)})}else n(null)}reloadResources(e,t,n){const s=sp();return typeof e=="function"&&(n=e,e=void 0),typeof t=="function"&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=Mg),this.services.backendConnector.reload(e,t,o=>{s.resolve(),n(o)}),s}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&JC.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let t=0;t<this.languages.length;t++){const n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const s=sp();this.emit("languageChanging",e);const o=h=>{this.language=h,this.languages=this.services.languageUtils.toResolveHierarchy(h),this.resolvedLanguage=void 0,this.setResolvedLanguage(h)},u=(h,m)=>{m?(o(m),this.translator.changeLanguage(m),this.isLanguageChangingTo=void 0,this.emit("languageChanged",m),this.logger.log("languageChanged",m)):this.isLanguageChangingTo=void 0,s.resolve(function(){return n.t(...arguments)}),t&&t(h,function(){return n.t(...arguments)})},c=h=>{!e&&!h&&this.services.languageDetector&&(h=[]);const m=typeof h=="string"?h:this.services.languageUtils.getBestMatchFromCodes(h);m&&(this.language||o(m),this.translator.language||this.translator.changeLanguage(m),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(m)),this.loadResources(m,y=>{u(y,m)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(e),s}getFixedT(e,t,n){var s=this;const o=function(u,c){let h;if(typeof c!="object"){for(var m=arguments.length,y=new Array(m>2?m-2:0),E=2;E<m;E++)y[E-2]=arguments[E];h=s.options.overloadTranslationOptionHandler([u,c].concat(y))}else h={...c};h.lng=h.lng||o.lng,h.lngs=h.lngs||o.lngs,h.ns=h.ns||o.ns,h.keyPrefix!==""&&(h.keyPrefix=h.keyPrefix||n||o.keyPrefix);const T=s.options.keySeparator||".";let R;return h.keyPrefix&&Array.isArray(u)?R=u.map(_=>`${h.keyPrefix}${T}${_}`):R=h.keyPrefix?`${h.keyPrefix}${T}${u}`:u,s.t(R,h)};return typeof e=="string"?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const u=(c,h)=>{const m=this.services.backendConnector.state[`${c}|${h}`];return m===-1||m===0||m===2};if(t.precheck){const c=t.precheck(this,u);if(c!==void 0)return c}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||u(n,e)&&(!s||u(o,e)))}loadNamespaces(e,t){const n=sp();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{n.resolve(),t&&t(s)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=sp();typeof e=="string"&&(e=[e]);const s=this.options.preload||[],o=e.filter(u=>s.indexOf(u)<0&&this.services.languageUtils.isSupportedCode(u));return o.length?(this.options.preload=s.concat(o),this.loadResources(u=>{n.resolve(),t&&t(u)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=this.services&&this.services.languageUtils||new eR(rR());return t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new op(e,t)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Mg;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},o=new op(s);return(e.debug!==void 0||e.prefix!==void 0)&&(o.logger=o.logger.clone(e)),["store","services","language"].forEach(c=>{o[c]=this[c]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n&&(o.store=new QC(this.store.data,s),o.services.resourceStore=o.store),o.translator=new Pg(o.services,s),o.translator.on("*",function(c){for(var h=arguments.length,m=new Array(h>1?h-1:0),y=1;y<h;y++)m[y-1]=arguments[y];o.emit(c,...m)}),o.init(s,t),o.translator.options=s,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const hs=op.createInstance();hs.createInstance=op.createInstance,hs.createInstance,hs.dir,hs.init,hs.loadResources,hs.reloadResources,hs.use,hs.changeLanguage,hs.getFixedT,hs.t,hs.exists,hs.setDefaultNamespace,hs.hasLoadedNamespace,hs.loadNamespaces,hs.loadLanguages;function KU(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function lp(r){"@babel/helpers - typeof";return lp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lp(r)}function qU(r,e){if(lp(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e);if(lp(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}function YU(r){var e=qU(r,"string");return lp(e)=="symbol"?e:e+""}function XU(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,YU(n.key),n)}}function QU(r,e,t){return e&&XU(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r}var sR=[],JU=sR.forEach,ZU=sR.slice;function eB(r){return JU.call(ZU.call(arguments,1),function(e){if(e)for(var t in e)r[t]===void 0&&(r[t]=e[t])}),r}var aR=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,tB=function(e,t,n){var s=n||{};s.path=s.path||"/";var o=encodeURIComponent(t),u="".concat(e,"=").concat(o);if(s.maxAge>0){var c=s.maxAge-0;if(Number.isNaN(c))throw new Error("maxAge should be a Number");u+="; Max-Age=".concat(Math.floor(c))}if(s.domain){if(!aR.test(s.domain))throw new TypeError("option domain is invalid");u+="; Domain=".concat(s.domain)}if(s.path){if(!aR.test(s.path))throw new TypeError("option path is invalid");u+="; Path=".concat(s.path)}if(s.expires){if(typeof s.expires.toUTCString!="function")throw new TypeError("option expires is invalid");u+="; Expires=".concat(s.expires.toUTCString())}if(s.httpOnly&&(u+="; HttpOnly"),s.secure&&(u+="; Secure"),s.sameSite){var h=typeof s.sameSite=="string"?s.sameSite.toLowerCase():s.sameSite;switch(h){case!0:u+="; SameSite=Strict";break;case"lax":u+="; SameSite=Lax";break;case"strict":u+="; SameSite=Strict";break;case"none":u+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return u},oR={create:function(e,t,n,s){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+n*60*1e3)),s&&(o.domain=s),document.cookie=tB(e,encodeURIComponent(t),o)},read:function(e){for(var t="".concat(e,"="),n=document.cookie.split(";"),s=0;s<n.length;s++){for(var o=n[s];o.charAt(0)===" ";)o=o.substring(1,o.length);if(o.indexOf(t)===0)return o.substring(t.length,o.length)}return null},remove:function(e){this.create(e,"",-1)}},nB={name:"cookie",lookup:function(e){var t;if(e.lookupCookie&&typeof document<"u"){var n=oR.read(e.lookupCookie);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupCookie&&typeof document<"u"&&oR.create(t.lookupCookie,e,t.cookieMinutes,t.cookieDomain,t.cookieOptions)}},rB={name:"querystring",lookup:function(e){var t;if(typeof window<"u"){var n=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(n=window.location.hash.substring(window.location.hash.indexOf("?")));for(var s=n.substring(1),o=s.split("&"),u=0;u<o.length;u++){var c=o[u].indexOf("=");if(c>0){var h=o[u].substring(0,c);h===e.lookupQuerystring&&(t=o[u].substring(c+1))}}}return t}},up=null,lR=function(){if(up!==null)return up;try{up=window!=="undefined"&&window.localStorage!==null;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{up=!1}return up},iB={name:"localStorage",lookup:function(e){var t;if(e.lookupLocalStorage&&lR()){var n=window.localStorage.getItem(e.lookupLocalStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupLocalStorage&&lR()&&window.localStorage.setItem(t.lookupLocalStorage,e)}},cp=null,uR=function(){if(cp!==null)return cp;try{cp=window!=="undefined"&&window.sessionStorage!==null;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{cp=!1}return cp},sB={name:"sessionStorage",lookup:function(e){var t;if(e.lookupSessionStorage&&uR()){var n=window.sessionStorage.getItem(e.lookupSessionStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupSessionStorage&&uR()&&window.sessionStorage.setItem(t.lookupSessionStorage,e)}},aB={name:"navigator",lookup:function(e){var t=[];if(typeof navigator<"u"){if(navigator.languages)for(var n=0;n<navigator.languages.length;n++)t.push(navigator.languages[n]);navigator.userLanguage&&t.push(navigator.userLanguage),navigator.language&&t.push(navigator.language)}return t.length>0?t:void 0}},oB={name:"htmlTag",lookup:function(e){var t,n=e.htmlTag||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(t=n.getAttribute("lang")),t}},lB={name:"path",lookup:function(e){var t;if(typeof window<"u"){var n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(n instanceof Array)if(typeof e.lookupFromPathIndex=="number"){if(typeof n[e.lookupFromPathIndex]!="string")return;t=n[e.lookupFromPathIndex].replace("/","")}else t=n[0].replace("/","")}return t}},uB={name:"subdomain",lookup:function(e){var t=typeof e.lookupFromSubdomainIndex=="number"?e.lookupFromSubdomainIndex+1:1,n=typeof window<"u"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(n)return n[t]}};function cB(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:function(e){return e}}}var cR=function(){function r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};KU(this,r),this.type="languageDetector",this.detectors={},this.init(e,t)}return QU(r,[{key:"init",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=eB(n,this.options||{},cB()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=function(o){return o.replace("-","_")}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=s,this.addDetector(nB),this.addDetector(rB),this.addDetector(iB),this.addDetector(sB),this.addDetector(aB),this.addDetector(oB),this.addDetector(lB),this.addDetector(uB)}},{key:"addDetector",value:function(t){return this.detectors[t.name]=t,this}},{key:"detect",value:function(t){var n=this;t||(t=this.options.order);var s=[];return t.forEach(function(o){if(n.detectors[o]){var u=n.detectors[o].lookup(n.options);u&&typeof u=="string"&&(u=[u]),u&&(s=s.concat(u))}}),s=s.map(function(o){return n.options.convertDetectedLanguage(o)}),this.services.languageUtils.getBestMatchFromCodes?s:s.length>0?s[0]:null}},{key:"cacheUserLanguage",value:function(t,n){var s=this;n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(function(o){s.detectors[o]&&s.detectors[o].cacheUserLanguage(t,s.options)}))}}]),r}();cR.type="languageDetector";const fB={en:{translation:{chapter:"chapter",close:"close",soldout:"soldeout",currency:"USD",more:"more",entrace:"entrance",comments:"comments",reply:"reply",send:"send",cancel1:"cancel",participate:"participate",participated:"participated",announcement:"announcement",login:"login",notice:"notice",report:"report",edit:"edit",benefit:"benefit",notification:"notification",setting:"setting",event:"event",term:"term",back:"back",quiz:"quiz",answer:"answer",confirm:"confirm",recent:"recent",small:"small",medium:"medium",large:"large",chat:"chat",background:"background",bold:"bold",share:"share",video:"video",fullscreen:"full screen",quality:"quality",auto:"auto",size:"size",delete:"delete",rehearsal:"rehearsal",live:"live",relive:"relive",converting:"converting",cancel:"cancel",ready:"ready",purchase_verification:"Purchase verification",live_comments:"Live comments",adult_verification:"Adult verification",change_view_mode:"Change view mode",enter_broadcast:"Enter broadcast",featured_products:"Featured products",view_reply:"View {{count}} replies",sentence:{"No Results Found":"No Results Found","people has joined":" and {{count}} people has joined","has joined":"has joined","Chat is paused":"Chat is paused","Chat is available":"Chat is available","Chat is unavailable":"Chat is unavailable","Chat messages cannot be sent":"Chat messages cannot be sent","Please enter number":"Please enter number","Please enter answer":"Please enter answer","Participation completed":"Participation completed","Stream Starting Soon":"Stream Starting Soon","Please enter your name":"Please enter your name","Please enter your nickname":"Please enter your nickname","Please enter your phonenumber":"Please enter your phonenumber","Consent for Personal Information":"Consent for Personal Information (Required)","Please enter the information":"To participate, please enter the information below","Reply has been raised":`Reply has been raised.
|
|
272
|
+
You can check again through the menu at the bottom right`,"Please press unmute button":"Please press unmute button","The broadcast cannot be found":"The broadcast cannot be found","Enter your four-digit entry code":"Enter your four-digit entry code","The entry code does not match":"The entry code does not match","adult verification are required":"This broadcast is not available for viewers under the age of 19. Login and adult verification are required","Data charges may apply":"Data charges may apply in 3G/5G/LTE environments","Link has been copied":"Link has been copied","The report has been completed":"The report has been completed","No permission to report":"No permission to report. please sign up","Are you sure you want to submit":"Are you sure you want to submit?","We announce the results":"We announce the results of {{event}}","Enter your purchase number or order number":`Enter your purchase number or order number
|
|
273
|
+
Please look forward to the announcement of the winners!`}}},ko:{translation:{chapter:"챕터",close:"닫기",soldout:"품절",currency:"원",more:"더보기",entrace:"입장",comments:"댓글",reply:"답글",send:"전송",cancel1:"취소",participate:"참여하기",participated:"참여완료",announcement:"결과발표",login:"로그인",notice:"안내",report:"신고",edit:"수정",benefit:"방송 혜택",notification:"알림",setting:"설정",event:"이벤트",term:"약관",back:"뒤로가기",quiz:"퀴즈",answer:"정답",confirm:"확인",recent:"최신",small:"작게",medium:"보통",large:"크게",chat:"채팅",background:"배경",bold:"볼드",share:"공유",video:"영상",fullscreen:"전체화면",quality:"화질",auto:"자동",size:"크기",delete:"삭제",rehearsal:"리허설",live:"live",relive:"relive",converting:"변환중",cancel:"방송취소",ready:"방송예정",purchase_verification:"구매인증",live_comments:"라이브 답글",adult_verification:"성인인증",change_view_mode:"시청모드 변경",enter_broadcast:"방송 입장",featured_products:"개의 상품",view_reply:"답글보기 {{count}}개",sentence:{"No Results Found":"내용이 없습니다.","people has joined":"님외 {{count}}명이 입장하였습니다.","has joined":"님이 입장하였습니다.","Chat is pause":"채팅이 일시 정지되었습니다.","Chat is available":"채팅 이용이 가능합니다.","Chat is unavailable":"채팅 이용이 어렵습니다.","Chat messages cannot be sent":"채팅을 전송할 수 없습니다.","Please enter number":"번호를 입력하세요.","Please enter answer":"답안을 입력하세요.","Participation completed":"참여완료 되었습니다.","Stream Starting Soon":"곧 라이브가 시작됩니다.","Please enter your name":"이름을 입력해주세요.","Please enter your nickname":"닉네임을 입력해주세요.","Please enter your phonenumber":"전화번호를 입력해주세요.","Consent for Personal Information":"개인정보 수집및 이용동의(필수)","Please enter the information":"참여를 위해서는 아래 항목을 입력해주세요.","Reply has been raised":`라이브 답글이 달렸어요.
|
|
274
|
+
우측 하단 메뉴를 통해 다시 확인할 수 있습니다.`,"Please press unmute button":"소리를 켜려면 누르세요.","The broadcast cannot be found":"방송을 찾을수 없습니다.","Enter your four-digit entry code":"입장코드 네 자리를 입력하세요.","The entry code does not match":"입장코드가 일치하지 않습니다.","adult verification are required":`만 19세 미만 시청불가 방송입니다.
|
|
275
|
+
로그인 및 성인인증이 필요합니다.`,"Data charges may apply":"3G/5G/LTE 환경에서는 데이터 요금이 발생할 수 있습니다.","Link has been copied":"링크가 복사 되었습니다.","The report has been completed":"신고가 완료되었습니다.","No permission to report":"신고 권한이 없습니다. 로그인 하세요.","Are you sure you want to submit":"위의 내용을 신고하시겠습니까?","We announce the results":`"{{event}}"의
|
|
276
|
+
결과를 발표합니다.`,"Enter your purchase number or order number":`구매번호 혹은 주문번호를 입력하세요.
|
|
277
|
+
당첨자 발표를 기대해주세요!`}}}};hs.use(cR).init({resources:fB,detection:{order:["navigator","localStorage"]},fallbackLng:"ko",debug:!1,interpolation:{escapeValue:!1}});const fR={root:"_root_1iegb_2",pip:"_pip_1iegb_10",mute:"_mute_1iegb_16",unmute:"_unmute_1iegb_22",share:"_share_1iegb_28",setting:"_setting_1iegb_34",close:"_close_1iegb_40",coupon:"_coupon_1iegb_47",like:"_like_1iegb_53",notice:"_notice_1iegb_59",chat:"_chat_1iegb_65",comment:"_comment_1iegb_71",product:"_product_1iegb_77",event:"_event_1iegb_83",purchase:"_purchase_1iegb_90",close_pane:"_close_pane_1iegb_96",close_pane_B:"_close_pane_B_1iegb_102",back:"_back_1iegb_108",backward:"_backward_1iegb_115",pause:"_pause_1iegb_121",play:"_play_1iegb_127",forward:"_forward_1iegb_133",left:"_left_1iegb_140",right:"_right_1iegb_146",converting:"_converting_1iegb_153",cancel:"_cancel_1iegb_159",sm_view:"_sm_view_1iegb_166",sm_like:"_sm_like_1iegb_172",sm_countdown:"_sm_countdown_1iegb_178",sm_question:"_sm_question_1iegb_184",sm_comment:"_sm_comment_1iegb_190",sm_more:"_sm_more_1iegb_196",sm_fix:"_sm_fix_1iegb_202",chapter_shorts:"_chapter_shorts_1iegb_208",like_shorts:"_like_shorts_1iegb_214",comment_shorts:"_comment_shorts_1iegb_220",share_shorts:"_share_shorts_1iegb_226",more_product_shorts:"_more_product_shorts_1iegb_232",close_drawer_shorts:"_close_drawer_shorts_1iegb_238"};var dR={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},hR=gr.createContext&&gr.createContext(dR),dB=["attr","size","title"];function hB(r,e){if(r==null)return{};var t=pB(r,e),n,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);for(s=0;s<o.length;s++)n=o[s],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}function pB(r,e){if(r==null)return{};var t={};for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n)){if(e.indexOf(n)>=0)continue;t[n]=r[n]}return t}function Og(){return Og=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},Og.apply(this,arguments)}function pR(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable})),t.push.apply(t,n)}return t}function Fg(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?pR(Object(t),!0).forEach(function(n){mB(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):pR(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function mB(r,e,t){return e=gB(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function gB(r){var e=vB(r,"string");return typeof e=="symbol"?e:e+""}function vB(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function mR(r){return r&&r.map((e,t)=>gr.createElement(e.tag,Fg({key:t},e.attr),mR(e.child)))}function mu(r){return e=>gr.createElement(yB,Og({attr:Fg({},r.attr)},e),mR(r.child))}function yB(r){var e=t=>{var{attr:n,size:s,title:o}=r,u=hB(r,dB),c=s||t.size||"1em",h;return t.className&&(h=t.className),r.className&&(h=(h?h+" ":"")+r.className),gr.createElement("svg",Og({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,n,u,{className:h,style:Fg(Fg({color:r.color||t.color},t.style),r.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),o&&gr.createElement("title",null,o),r.children)};return hR!==void 0?gr.createElement(hR.Consumer,null,t=>e(t)):e(dR)}function SB(r){return mu({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"circle",attr:{cx:"256",cy:"256",r:"208",fill:"none",strokeMiterlimit:"10",strokeWidth:"32"},child:[]},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"m108.92 108.92 294.16 294.16"},child:[]}]})(r)}function EB(r){return mu({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"m184 112 144 144-144 144"},child:[]}]})(r)}function xB(r){return mu({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M368 368 144 144m224 0L144 368"},child:[]}]})(r)}function bB(r){return mu({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"circle",attr:{cx:"256",cy:"256",r:"48"},child:[]},{tag:"circle",attr:{cx:"416",cy:"256",r:"48"},child:[]},{tag:"circle",attr:{cx:"96",cy:"256",r:"48"},child:[]}]})(r)}function TB(r){return mu({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M133 440a35.37 35.37 0 0 1-17.5-4.67c-12-6.8-19.46-20-19.46-34.33V111c0-14.37 7.46-27.53 19.46-34.33a35.13 35.13 0 0 1 35.77.45l247.85 148.36a36 36 0 0 1 0 61l-247.89 148.4A35.5 35.5 0 0 1 133 440z"},child:[]}]})(r)}function wB(r){return mu({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M232 416a23.88 23.88 0 0 1-14.2-4.68 8.27 8.27 0 0 1-.66-.51L125.76 336H56a24 24 0 0 1-24-24V200a24 24 0 0 1 24-24h69.75l91.37-74.81a8.27 8.27 0 0 1 .66-.51A24 24 0 0 1 256 120v272a24 24 0 0 1-24 24zm-106.18-80zm-.27-159.86zM320 336a16 16 0 0 1-14.29-23.19c9.49-18.87 14.3-38 14.3-56.81 0-19.38-4.66-37.94-14.25-56.73a16 16 0 0 1 28.5-14.54C346.19 208.12 352 231.44 352 256c0 23.86-6 47.81-17.7 71.19A16 16 0 0 1 320 336z"},child:[]},{tag:"path",attr:{d:"M368 384a16 16 0 0 1-13.86-24C373.05 327.09 384 299.51 384 256c0-44.17-10.93-71.56-29.82-103.94a16 16 0 0 1 27.64-16.12C402.92 172.11 416 204.81 416 256c0 50.43-13.06 83.29-34.13 120a16 16 0 0 1-13.87 8z"},child:[]},{tag:"path",attr:{d:"M416 432a16 16 0 0 1-13.39-24.74C429.85 365.47 448 323.76 448 256c0-66.5-18.18-108.62-45.49-151.39a16 16 0 1 1 27-17.22C459.81 134.89 480 181.74 480 256c0 64.75-14.66 113.63-50.6 168.74A16 16 0 0 1 416 432z"},child:[]}]})(r)}function CB(r){return mu({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"32",d:"M416 432 64 80"},child:[]},{tag:"path",attr:{d:"M243.33 98.86a23.89 23.89 0 0 0-25.55 1.82l-.66.51-28.52 23.35a8 8 0 0 0-.59 11.85l54.33 54.33a8 8 0 0 0 13.66-5.66v-64.49a24.51 24.51 0 0 0-12.67-21.71zm8 236.43L96.69 180.69A16 16 0 0 0 85.38 176H56a24 24 0 0 0-24 24v112a24 24 0 0 0 24 24h69.76l92 75.31a23.9 23.9 0 0 0 25.87 1.69A24.51 24.51 0 0 0 256 391.45v-44.86a16 16 0 0 0-4.67-11.3zM352 256c0-24.56-5.81-47.87-17.75-71.27a16 16 0 1 0-28.5 14.55C315.34 218.06 320 236.62 320 256q0 4-.31 8.13a8 8 0 0 0 2.32 6.25l14.36 14.36a8 8 0 0 0 13.55-4.31A146 146 0 0 0 352 256zm64 0c0-51.18-13.08-83.89-34.18-120.06a16 16 0 0 0-27.64 16.12C373.07 184.44 384 211.83 384 256c0 23.83-3.29 42.88-9.37 60.65a8 8 0 0 0 1.9 8.26L389 337.4a8 8 0 0 0 13.13-2.79C411 311.76 416 287.26 416 256z"},child:[]},{tag:"path",attr:{d:"M480 256c0-74.25-20.19-121.11-50.51-168.61a16 16 0 1 0-27 17.22C429.82 147.38 448 189.5 448 256c0 46.19-8.43 80.27-22.43 110.53a8 8 0 0 0 1.59 9l11.92 11.92a8 8 0 0 0 12.92-2.16C471.6 344.9 480 305 480 256z"},child:[]}]})(r)}function RB(r){return mu({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"m13.498.795.149-.149a1.207 1.207 0 1 1 1.707 1.708l-.149.148a1.5 1.5 0 0 1-.059 2.059L4.854 14.854a.5.5 0 0 1-.233.131l-4 1a.5.5 0 0 1-.606-.606l1-4a.5.5 0 0 1 .131-.232l9.642-9.642a.5.5 0 0 0-.642.056L6.854 4.854a.5.5 0 1 1-.708-.708L9.44.854A1.5 1.5 0 0 1 11.5.796a1.5 1.5 0 0 1 1.998-.001m-.644.766a.5.5 0 0 0-.707 0L1.95 11.756l-.764 3.057 3.057-.764L14.44 3.854a.5.5 0 0 0 0-.708z"},child:[]}]})(r)}function AB(r){return mu({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576zm6.787-8.201L1.591 6.602l4.339 2.76z"},child:[]}]})(r)}const gR={IoVolumeHigh:wB,IoVolumeMute:CB,IoPlay:TB,IoCloseOutline:xB,IoChevronForward:EB,IoEllipsisHorizontal:bB,IoBanOutline:SB,BsSend:AB,BsPen:RB};function WS({className:r,name:e,...t}){if(e in gR){const n=gR[e];return Yt.jsx(n,{className:r})}else return Yt.jsx("i",{className:[fR.root,fR[e],r].join(" "),...t})}const ri={root:"_root_1twf4_1",video:"_video_1twf4_9",poster:"_poster_1twf4_17",origin_ratio:"_origin_ratio_1twf4_26",layer:"_layer_1twf4_33",shadow:"_shadow_1twf4_39",forward_animation:"_forward_animation_1twf4_61",forward:"_forward_1twf4_61",backward_animation:"_backward_animation_1twf4_65",backward:"_backward_1twf4_65",indicator:"_indicator_1twf4_69",indicator_right:"_indicator_right_1twf4_76",indicator_left:"_indicator_left_1twf4_81",progress:"_progress_1twf4_87",time:"_time_1twf4_95",button:"_button_1twf4_108",playbackrate:"_playbackrate_1twf4_130",play_toggle:"_play_toggle_1twf4_141",chapter_toggle:"_chapter_toggle_1twf4_148",chapter_wrap:"_chapter_wrap_1twf4_157"};function _B(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var vR={exports:{}};(function(r,e){(function(t){var n=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,s=/^(?=([^\/?#]*))\1([^]*)$/,o=/(?:\/|^)\.(?=\/)/g,u=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,c={buildAbsoluteURL:function(h,m,y){if(y=y||{},h=h.trim(),m=m.trim(),!m){if(!y.alwaysNormalize)return h;var E=c.parseURL(h);if(!E)throw new Error("Error trying to parse base URL.");return E.path=c.normalizePath(E.path),c.buildURLFromParts(E)}var T=c.parseURL(m);if(!T)throw new Error("Error trying to parse relative URL.");if(T.scheme)return y.alwaysNormalize?(T.path=c.normalizePath(T.path),c.buildURLFromParts(T)):m;var R=c.parseURL(h);if(!R)throw new Error("Error trying to parse base URL.");if(!R.netLoc&&R.path&&R.path[0]!=="/"){var _=s.exec(R.path);R.netLoc=_[1],R.path=_[2]}R.netLoc&&!R.path&&(R.path="/");var L={scheme:R.scheme,netLoc:T.netLoc,path:null,params:T.params,query:T.query,fragment:T.fragment};if(!T.netLoc&&(L.netLoc=R.netLoc,T.path[0]!=="/"))if(!T.path)L.path=R.path,T.params||(L.params=R.params,T.query||(L.query=R.query));else{var M=R.path,F=M.substring(0,M.lastIndexOf("/")+1)+T.path;L.path=c.normalizePath(F)}return L.path===null&&(L.path=y.alwaysNormalize?c.normalizePath(T.path):T.path),c.buildURLFromParts(L)},parseURL:function(h){var m=n.exec(h);return m?{scheme:m[1]||"",netLoc:m[2]||"",path:m[3]||"",params:m[4]||"",query:m[5]||"",fragment:m[6]||""}:null},normalizePath:function(h){for(h=h.split("").reverse().join("").replace(o,"");h.length!==(h=h.replace(u,"")).length;);return h.split("").reverse().join("")},buildURLFromParts:function(h){return h.scheme+h.netLoc+h.path+h.params+h.query+h.fragment}};r.exports=c})()})(vR);var KS=vR.exports;function yR(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable})),t.push.apply(t,n)}return t}function qi(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?yR(Object(t),!0).forEach(function(n){DB(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):yR(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function LB(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function kB(r){var e=LB(r,"string");return typeof e=="symbol"?e:String(e)}function DB(r,e,t){return e=kB(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Ii(){return Ii=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},Ii.apply(this,arguments)}const Bt=Number.isFinite||function(r){return typeof r=="number"&&isFinite(r)},IB=Number.isSafeInteger||function(r){return typeof r=="number"&&Math.abs(r)<=PB},PB=Number.MAX_SAFE_INTEGER||9007199254740991;let V=function(r){return r.MEDIA_ATTACHING="hlsMediaAttaching",r.MEDIA_ATTACHED="hlsMediaAttached",r.MEDIA_DETACHING="hlsMediaDetaching",r.MEDIA_DETACHED="hlsMediaDetached",r.BUFFER_RESET="hlsBufferReset",r.BUFFER_CODECS="hlsBufferCodecs",r.BUFFER_CREATED="hlsBufferCreated",r.BUFFER_APPENDING="hlsBufferAppending",r.BUFFER_APPENDED="hlsBufferAppended",r.BUFFER_EOS="hlsBufferEos",r.BUFFER_FLUSHING="hlsBufferFlushing",r.BUFFER_FLUSHED="hlsBufferFlushed",r.MANIFEST_LOADING="hlsManifestLoading",r.MANIFEST_LOADED="hlsManifestLoaded",r.MANIFEST_PARSED="hlsManifestParsed",r.LEVEL_SWITCHING="hlsLevelSwitching",r.LEVEL_SWITCHED="hlsLevelSwitched",r.LEVEL_LOADING="hlsLevelLoading",r.LEVEL_LOADED="hlsLevelLoaded",r.LEVEL_UPDATED="hlsLevelUpdated",r.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",r.LEVELS_UPDATED="hlsLevelsUpdated",r.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",r.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",r.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",r.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",r.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",r.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",r.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",r.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",r.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",r.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",r.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",r.CUES_PARSED="hlsCuesParsed",r.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",r.INIT_PTS_FOUND="hlsInitPtsFound",r.FRAG_LOADING="hlsFragLoading",r.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",r.FRAG_LOADED="hlsFragLoaded",r.FRAG_DECRYPTED="hlsFragDecrypted",r.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",r.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",r.FRAG_PARSING_METADATA="hlsFragParsingMetadata",r.FRAG_PARSED="hlsFragParsed",r.FRAG_BUFFERED="hlsFragBuffered",r.FRAG_CHANGED="hlsFragChanged",r.FPS_DROP="hlsFpsDrop",r.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",r.MAX_AUTO_LEVEL_UPDATED="hlsMaxAutoLevelUpdated",r.ERROR="hlsError",r.DESTROYING="hlsDestroying",r.KEY_LOADING="hlsKeyLoading",r.KEY_LOADED="hlsKeyLoaded",r.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",r.BACK_BUFFER_REACHED="hlsBackBufferReached",r.STEERING_MANIFEST_LOADED="hlsSteeringManifestLoaded",r}({}),cn=function(r){return r.NETWORK_ERROR="networkError",r.MEDIA_ERROR="mediaError",r.KEY_SYSTEM_ERROR="keySystemError",r.MUX_ERROR="muxError",r.OTHER_ERROR="otherError",r}({}),qe=function(r){return r.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",r.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",r.KEY_SYSTEM_NO_SESSION="keySystemNoSession",r.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",r.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",r.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",r.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",r.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",r.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",r.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",r.MANIFEST_LOAD_ERROR="manifestLoadError",r.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",r.MANIFEST_PARSING_ERROR="manifestParsingError",r.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",r.LEVEL_EMPTY_ERROR="levelEmptyError",r.LEVEL_LOAD_ERROR="levelLoadError",r.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",r.LEVEL_PARSING_ERROR="levelParsingError",r.LEVEL_SWITCH_ERROR="levelSwitchError",r.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",r.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",r.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",r.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",r.FRAG_LOAD_ERROR="fragLoadError",r.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",r.FRAG_DECRYPT_ERROR="fragDecryptError",r.FRAG_PARSING_ERROR="fragParsingError",r.FRAG_GAP="fragGap",r.REMUX_ALLOC_ERROR="remuxAllocError",r.KEY_LOAD_ERROR="keyLoadError",r.KEY_LOAD_TIMEOUT="keyLoadTimeOut",r.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",r.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",r.BUFFER_APPEND_ERROR="bufferAppendError",r.BUFFER_APPENDING_ERROR="bufferAppendingError",r.BUFFER_STALLED_ERROR="bufferStalledError",r.BUFFER_FULL_ERROR="bufferFullError",r.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",r.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",r.INTERNAL_EXCEPTION="internalException",r.INTERNAL_ABORTED="aborted",r.UNKNOWN="unknown",r}({});const sf=function(){},qS={trace:sf,debug:sf,log:sf,warn:sf,info:sf,error:sf};let fp=qS;function MB(r){const e=self.console[r];return e?e.bind(self.console,`[${r}] >`):sf}function OB(r,...e){e.forEach(function(t){fp[t]=r[t]?r[t].bind(r):MB(t)})}function FB(r,e){if(typeof console=="object"&&r===!0||typeof r=="object"){OB(r,"debug","log","info","warn","error");try{fp.log(`Debug logs enabled for "${e}" in hls.js version 1.5.8`)}catch{fp=qS}}else fp=qS}const Fe=fp,NB=/^(\d+)x(\d+)$/,SR=/(.+?)=(".*?"|.*?)(?:,|$)/g;class Yr{constructor(e){typeof e=="string"&&(e=Yr.parseAttrList(e)),Ii(this,e)}get clientAttrs(){return Object.keys(this).filter(e=>e.substring(0,2)==="X-")}decimalInteger(e){const t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t}hexadecimalInteger(e){if(this[e]){let t=(this[e]||"0x").slice(2);t=(t.length&1?"0":"")+t;const n=new Uint8Array(t.length/2);for(let s=0;s<t.length/2;s++)n[s]=parseInt(t.slice(s*2,s*2+2),16);return n}else return null}hexadecimalIntegerAsNumber(e){const t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t}decimalFloatingPoint(e){return parseFloat(this[e])}optionalFloat(e,t){const n=this[e];return n?parseFloat(n):t}enumeratedString(e){return this[e]}bool(e){return this[e]==="YES"}decimalResolution(e){const t=NB.exec(this[e]);if(t!==null)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}static parseAttrList(e){let t;const n={},s='"';for(SR.lastIndex=0;(t=SR.exec(e))!==null;){let o=t[2];o.indexOf(s)===0&&o.lastIndexOf(s)===o.length-1&&(o=o.slice(1,-1));const u=t[1].trim();n[u]=o}return n}}function UB(r){return r!=="ID"&&r!=="CLASS"&&r!=="START-DATE"&&r!=="DURATION"&&r!=="END-DATE"&&r!=="END-ON-NEXT"}function BB(r){return r==="SCTE35-OUT"||r==="SCTE35-IN"}class ER{constructor(e,t){if(this.attr=void 0,this._startDate=void 0,this._endDate=void 0,this._badValueForSameId=void 0,t){const n=t.attr;for(const s in n)if(Object.prototype.hasOwnProperty.call(e,s)&&e[s]!==n[s]){Fe.warn(`DATERANGE tag attribute: "${s}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=s;break}e=Ii(new Yr({}),n,e)}if(this.attr=e,this._startDate=new Date(e["START-DATE"]),"END-DATE"in this.attr){const n=new Date(this.attr["END-DATE"]);Bt(n.getTime())&&(this._endDate=n)}}get id(){return this.attr.ID}get class(){return this.attr.CLASS}get startDate(){return this._startDate}get endDate(){if(this._endDate)return this._endDate;const e=this.duration;return e!==null?new Date(this._startDate.getTime()+e*1e3):null}get duration(){if("DURATION"in this.attr){const e=this.attr.decimalFloatingPoint("DURATION");if(Bt(e))return e}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}get plannedDuration(){return"PLANNED-DURATION"in this.attr?this.attr.decimalFloatingPoint("PLANNED-DURATION"):null}get endOnNext(){return this.attr.bool("END-ON-NEXT")}get isValid(){return!!this.id&&!this._badValueForSameId&&Bt(this.startDate.getTime())&&(this.duration===null||this.duration>=0)&&(!this.endOnNext||!!this.class)}}class Ng{constructor(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}}var fr={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class xR{constructor(e){this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams={[fr.AUDIO]:null,[fr.VIDEO]:null,[fr.AUDIOVIDEO]:null},this.baseurl=e}setByteRange(e,t){const n=e.split("@",2);let s;n.length===1?s=(t==null?void 0:t.byteRangeEndOffset)||0:s=parseInt(n[1]),this._byteRange=[s,parseInt(n[0])+s]}get byteRange(){return this._byteRange?this._byteRange:[]}get byteRangeStartOffset(){return this.byteRange[0]}get byteRangeEndOffset(){return this.byteRange[1]}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=KS.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}}class YS extends xR{constructor(e,t){super(t),this._decryptdata=null,this.rawProgramDateTime=null,this.programDateTime=null,this.tagList=[],this.duration=0,this.sn=0,this.levelkeys=void 0,this.type=void 0,this.loader=null,this.keyLoader=null,this.level=-1,this.cc=0,this.startPTS=void 0,this.endPTS=void 0,this.startDTS=void 0,this.endDTS=void 0,this.start=0,this.deltaPTS=void 0,this.maxStartPTS=void 0,this.minEndPTS=void 0,this.stats=new Ng,this.data=void 0,this.bitrateTest=!1,this.title=null,this.initSegment=null,this.endList=void 0,this.gap=void 0,this.urlId=0,this.type=e}get decryptdata(){const{levelkeys:e}=this;if(!e&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){const t=this.levelkeys.identity;if(t)this._decryptdata=t.getDecryptData(this.sn);else{const n=Object.keys(this.levelkeys);if(n.length===1)return this._decryptdata=this.levelkeys[n[0]].getDecryptData(this.sn)}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(this.programDateTime===null||!Bt(this.programDateTime))return null;const e=Bt(this.duration)?this.duration:0;return this.programDateTime+e*1e3}get encrypted(){var e;if((e=this._decryptdata)!=null&&e.encrypted)return!0;if(this.levelkeys){const t=Object.keys(this.levelkeys),n=t.length;if(n>1||n===1&&this.levelkeys[t[0]].encrypted)return!0}return!1}setKeyFormat(e){if(this.levelkeys){const t=this.levelkeys[e];t&&!this._decryptdata&&(this._decryptdata=t.getDecryptData(this.sn))}}abortRequests(){var e,t;(e=this.loader)==null||e.abort(),(t=this.keyLoader)==null||t.abort()}setElementaryStreamInfo(e,t,n,s,o,u=!1){const{elementaryStreams:c}=this,h=c[e];if(!h){c[e]={startPTS:t,endPTS:n,startDTS:s,endDTS:o,partial:u};return}h.startPTS=Math.min(h.startPTS,t),h.endPTS=Math.max(h.endPTS,n),h.startDTS=Math.min(h.startDTS,s),h.endDTS=Math.max(h.endDTS,o)}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[fr.AUDIO]=null,e[fr.VIDEO]=null,e[fr.AUDIOVIDEO]=null}}class $B extends xR{constructor(e,t,n,s,o){super(n),this.fragOffset=0,this.duration=0,this.gap=!1,this.independent=!1,this.relurl=void 0,this.fragment=void 0,this.index=void 0,this.stats=new Ng,this.duration=e.decimalFloatingPoint("DURATION"),this.gap=e.bool("GAP"),this.independent=e.bool("INDEPENDENT"),this.relurl=e.enumeratedString("URI"),this.fragment=t,this.index=s;const u=e.enumeratedString("BYTERANGE");u&&this.setByteRange(u,o),o&&(this.fragOffset=o.fragOffset+o.duration)}get start(){return this.fragment.start+this.fragOffset}get end(){return this.start+this.duration}get loaded(){const{elementaryStreams:e}=this;return!!(e.audio||e.video||e.audiovideo)}}const VB=10;class zB{constructor(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.playlistParsingError=null,this.variableList=null,this.hasVariableRefs=!1,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}reloaded(e){if(!e){this.advanced=!0,this.updated=!0;return}const t=this.lastPartSn-e.lastPartSn,n=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!n||!!t||!this.live,this.advanced=this.endSN>e.endSN||t>0||t===0&&n>0,this.updated||this.advanced?this.misses=Math.floor(e.misses*.6):this.misses=e.misses+1,this.availabilityDelay=e.availabilityDelay}get hasProgramDateTime(){return this.fragments.length?Bt(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||VB}get drift(){const e=this.driftEndTime-this.driftStartTime;return e>0?(this.driftEnd-this.driftStart)*1e3/e:1}get edge(){return this.partEnd||this.fragmentEnd}get partEnd(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}get fragmentEnd(){var e;return(e=this.fragments)!=null&&e.length?this.fragments[this.fragments.length-1].end:0}get age(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}get lastPartIndex(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].index:-1}get lastPartSn(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}function XS(r){return Uint8Array.from(atob(r),e=>e.charCodeAt(0))}function jB(r){const e=QS(r).subarray(0,16),t=new Uint8Array(16);return t.set(e,16-e.length),t}function HB(r){const e=function(n,s,o){const u=n[s];n[s]=n[o],n[o]=u};e(r,0,3),e(r,1,2),e(r,4,5),e(r,6,7)}function GB(r){const e=r.split(":");let t=null;if(e[0]==="data"&&e.length===2){const n=e[1].split(";"),s=n[n.length-1].split(",");if(s.length===2){const o=s[0]==="base64",u=s[1];o?(n.splice(-1,1),t=XS(u)):t=jB(u)}}return t}function QS(r){return Uint8Array.from(unescape(encodeURIComponent(r)),e=>e.charCodeAt(0))}const Dd=typeof self<"u"?self:void 0;var Br={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},ua={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function bR(r){switch(r){case ua.FAIRPLAY:return Br.FAIRPLAY;case ua.PLAYREADY:return Br.PLAYREADY;case ua.WIDEVINE:return Br.WIDEVINE;case ua.CLEARKEY:return Br.CLEARKEY}}var TR={WIDEVINE:"edef8ba979d64acea3c827dcd51d21ed"};function WB(r){if(r===TR.WIDEVINE)return Br.WIDEVINE}function wR(r){switch(r){case Br.FAIRPLAY:return ua.FAIRPLAY;case Br.PLAYREADY:return ua.PLAYREADY;case Br.WIDEVINE:return ua.WIDEVINE;case Br.CLEARKEY:return ua.CLEARKEY}}function JS(r){const{drmSystems:e,widevineLicenseUrl:t}=r,n=e?[Br.FAIRPLAY,Br.WIDEVINE,Br.PLAYREADY,Br.CLEARKEY].filter(s=>!!e[s]):[];return!n[Br.WIDEVINE]&&t&&n.push(Br.WIDEVINE),n}const CR=function(r){return Dd!=null&&(r=Dd.navigator)!=null&&r.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function KB(r,e,t,n){let s;switch(r){case Br.FAIRPLAY:s=["cenc","sinf"];break;case Br.WIDEVINE:case Br.PLAYREADY:s=["cenc"];break;case Br.CLEARKEY:s=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${r}`)}return qB(s,e,t,n)}function qB(r,e,t,n){return[{initDataTypes:r,persistentState:n.persistentState||"optional",distinctiveIdentifier:n.distinctiveIdentifier||"optional",sessionTypes:n.sessionTypes||[n.sessionType||"temporary"],audioCapabilities:e.map(o=>({contentType:`audio/mp4; codecs="${o}"`,robustness:n.audioRobustness||"",encryptionScheme:n.audioEncryptionScheme||null})),videoCapabilities:t.map(o=>({contentType:`video/mp4; codecs="${o}"`,robustness:n.videoRobustness||"",encryptionScheme:n.videoEncryptionScheme||null}))}]}function af(r,e,t){return Uint8Array.prototype.slice?r.slice(e,t):new Uint8Array(Array.prototype.slice.call(r,e,t))}const ZS=(r,e)=>e+10<=r.length&&r[e]===73&&r[e+1]===68&&r[e+2]===51&&r[e+3]<255&&r[e+4]<255&&r[e+6]<128&&r[e+7]<128&&r[e+8]<128&&r[e+9]<128,RR=(r,e)=>e+10<=r.length&&r[e]===51&&r[e+1]===68&&r[e+2]===73&&r[e+3]<255&&r[e+4]<255&&r[e+6]<128&&r[e+7]<128&&r[e+8]<128&&r[e+9]<128,dp=(r,e)=>{const t=e;let n=0;for(;ZS(r,e);){n+=10;const s=Ug(r,e+6);n+=s,RR(r,e+10)&&(n+=10),e+=n}if(n>0)return r.subarray(t,t+n)},Ug=(r,e)=>{let t=0;return t=(r[e]&127)<<21,t|=(r[e+1]&127)<<14,t|=(r[e+2]&127)<<7,t|=r[e+3]&127,t},YB=(r,e)=>ZS(r,e)&&Ug(r,e+6)+10<=r.length-e,e1=r=>{const e=_R(r);for(let t=0;t<e.length;t++){const n=e[t];if(AR(n))return t3(n)}},AR=r=>r&&r.key==="PRIV"&&r.info==="com.apple.streaming.transportStreamTimestamp",XB=r=>{const e=String.fromCharCode(r[0],r[1],r[2],r[3]),t=Ug(r,4),n=10;return{type:e,size:t,data:r.subarray(n,n+t)}},_R=r=>{let e=0;const t=[];for(;ZS(r,e);){const n=Ug(r,e+6);e+=10;const s=e+n;for(;e+8<s;){const o=XB(r.subarray(e)),u=QB(o);u&&t.push(u),e+=o.size+10}RR(r,e)&&(e+=10)}return t},QB=r=>r.type==="PRIV"?JB(r):r.type[0]==="W"?e3(r):ZB(r),JB=r=>{if(r.size<2)return;const e=El(r.data,!0),t=new Uint8Array(r.data.subarray(e.length+1));return{key:r.type,info:e,data:t.buffer}},ZB=r=>{if(r.size<2)return;if(r.type==="TXXX"){let t=1;const n=El(r.data.subarray(t),!0);t+=n.length+1;const s=El(r.data.subarray(t));return{key:r.type,info:n,data:s}}const e=El(r.data.subarray(1));return{key:r.type,data:e}},e3=r=>{if(r.type==="WXXX"){if(r.size<2)return;let t=1;const n=El(r.data.subarray(t),!0);t+=n.length+1;const s=El(r.data.subarray(t));return{key:r.type,info:n,data:s}}const e=El(r.data);return{key:r.type,data:e}},t3=r=>{if(r.data.byteLength===8){const e=new Uint8Array(r.data),t=e[3]&1;let n=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7];return n/=45,t&&(n+=4772185884e-2),Math.round(n)}},El=(r,e=!1)=>{const t=n3();if(t){const m=t.decode(r);if(e){const y=m.indexOf("\0");return y!==-1?m.substring(0,y):m}return m.replace(/\0/g,"")}const n=r.length;let s,o,u,c="",h=0;for(;h<n;){if(s=r[h++],s===0&&e)return c;if(s===0||s===3)continue;switch(s>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:c+=String.fromCharCode(s);break;case 12:case 13:o=r[h++],c+=String.fromCharCode((s&31)<<6|o&63);break;case 14:o=r[h++],u=r[h++],c+=String.fromCharCode((s&15)<<12|(o&63)<<6|(u&63)<<0);break}}return c};let t1;function n3(){if(!navigator.userAgent.includes("PlayStation 4"))return!t1&&typeof self.TextDecoder<"u"&&(t1=new self.TextDecoder("utf-8")),t1}const xl={hexDump:function(r){let e="";for(let t=0;t<r.length;t++){let n=r[t].toString(16);n.length<2&&(n="0"+n),e+=n}return e}},Bg=Math.pow(2,32)-1,r3=[].push,LR={video:1,audio:2,id3:3,text:4};function $i(r){return String.fromCharCode.apply(null,r)}function kR(r,e){const t=r[e]<<8|r[e+1];return t<0?65536+t:t}function rn(r,e){const t=IR(r,e);return t<0?4294967296+t:t}function DR(r,e){let t=rn(r,e);return t*=Math.pow(2,32),t+=rn(r,e+4),t}function IR(r,e){return r[e]<<24|r[e+1]<<16|r[e+2]<<8|r[e+3]}function n1(r,e,t){r[e]=t>>24,r[e+1]=t>>16&255,r[e+2]=t>>8&255,r[e+3]=t&255}function i3(r){const e=r.byteLength;for(let t=0;t<e;){const n=rn(r,t);if(n>8&&r[t+4]===109&&r[t+5]===111&&r[t+6]===111&&r[t+7]===102)return!0;t=n>1?t+n:e}return!1}function xn(r,e){const t=[];if(!e.length)return t;const n=r.byteLength;for(let s=0;s<n;){const o=rn(r,s),u=$i(r.subarray(s+4,s+8)),c=o>1?s+o:n;if(u===e[0])if(e.length===1)t.push(r.subarray(s+8,c));else{const h=xn(r.subarray(s+8,c),e.slice(1));h.length&&r3.apply(t,h)}s=c}return t}function s3(r){const e=[],t=r[0];let n=8;const s=rn(r,n);n+=4;let o=0,u=0;t===0?(o=rn(r,n),u=rn(r,n+4),n+=8):(o=DR(r,n),u=DR(r,n+8),n+=16),n+=2;let c=r.length+u;const h=kR(r,n);n+=2;for(let m=0;m<h;m++){let y=n;const E=rn(r,y);y+=4;const T=E&2147483647;if((E&2147483648)>>>31===1)return Fe.warn("SIDX has hierarchical references (not supported)"),null;const _=rn(r,y);y+=4,e.push({referenceSize:T,subsegmentDuration:_,info:{duration:_/s,start:c,end:c+T-1}}),c+=T,y+=4,n=y}return{earliestPresentationTime:o,timescale:s,version:t,referencesCount:h,references:e}}function PR(r){const e=[],t=xn(r,["moov","trak"]);for(let s=0;s<t.length;s++){const o=t[s],u=xn(o,["tkhd"])[0];if(u){let c=u[0];const h=rn(u,c===0?12:20),m=xn(o,["mdia","mdhd"])[0];if(m){c=m[0];const y=rn(m,c===0?12:20),E=xn(o,["mdia","hdlr"])[0];if(E){const T=$i(E.subarray(8,12)),R={soun:fr.AUDIO,vide:fr.VIDEO}[T];if(R){const _=xn(o,["mdia","minf","stbl","stsd"])[0],L=a3(_);e[h]={timescale:y,type:R},e[R]=qi({timescale:y,id:h},L)}}}}}return xn(r,["moov","mvex","trex"]).forEach(s=>{const o=rn(s,4),u=e[o];u&&(u.default={duration:rn(s,12),flags:rn(s,20)})}),e}function a3(r){const e=r.subarray(8),t=e.subarray(86),n=$i(e.subarray(4,8));let s=n;const o=n==="enca"||n==="encv";if(o){const c=xn(e,[n])[0].subarray(n==="enca"?28:78);xn(c,["sinf"]).forEach(m=>{const y=xn(m,["schm"])[0];if(y){const E=$i(y.subarray(4,8));if(E==="cbcs"||E==="cenc"){const T=xn(m,["frma"])[0];T&&(s=$i(T))}}})}switch(s){case"avc1":case"avc2":case"avc3":case"avc4":{const u=xn(t,["avcC"])[0];s+="."+$g(u[1])+$g(u[2])+$g(u[3]);break}case"mp4a":{const u=xn(e,[n])[0],c=xn(u.subarray(28),["esds"])[0];if(c&&c.length>12){let h=4;if(c[h++]!==3)break;h=r1(c,h),h+=2;const m=c[h++];if(m&128&&(h+=2),m&64&&(h+=c[h++]),c[h++]!==4)break;h=r1(c,h);const y=c[h++];if(y===64)s+="."+$g(y);else break;if(h+=12,c[h++]!==5)break;h=r1(c,h);const E=c[h++];let T=(E&248)>>3;T===31&&(T+=1+((E&7)<<3)+((c[h]&224)>>5)),s+="."+T}break}case"hvc1":case"hev1":{const u=xn(t,["hvcC"])[0],c=u[1],h=["","A","B","C"][c>>6],m=c&31,y=rn(u,2),E=(c&32)>>5?"H":"L",T=u[12],R=u.subarray(6,12);s+="."+h+m,s+="."+y.toString(16).toUpperCase(),s+="."+E+T;let _="";for(let L=R.length;L--;){const M=R[L];(M||_)&&(_="."+M.toString(16).toUpperCase()+_)}s+=_;break}case"dvh1":case"dvhe":{const u=xn(t,["dvcC"])[0],c=u[2]>>1&127,h=u[2]<<5&32|u[3]>>3&31;s+="."+bl(c)+"."+bl(h);break}case"vp09":{const u=xn(t,["vpcC"])[0],c=u[4],h=u[5],m=u[6]>>4&15;s+="."+bl(c)+"."+bl(h)+"."+bl(m);break}case"av01":{const u=xn(t,["av1C"])[0],c=u[1]>>>5,h=u[1]&31,m=u[2]>>>7?"H":"M",y=(u[2]&64)>>6,E=(u[2]&32)>>5,T=c===2&&y?E?12:10:y?10:8,R=(u[2]&16)>>4,_=(u[2]&8)>>3,L=(u[2]&4)>>2,M=u[2]&3;s+="."+c+"."+bl(h)+m+"."+bl(T)+"."+R+"."+_+L+M+"."+bl(1)+"."+bl(1)+"."+bl(1)+"."+0;break}}return{codec:s,encrypted:o}}function r1(r,e){const t=e+5;for(;r[e++]&128&&e<t;);return e}function $g(r){return("0"+r.toString(16).toUpperCase()).slice(-2)}function bl(r){return(r<10?"0":"")+r}function o3(r,e){if(!r||!e)return r;const t=e.keyId;return t&&e.isCommonEncryption&&xn(r,["moov","trak"]).forEach(s=>{const u=xn(s,["mdia","minf","stbl","stsd"])[0].subarray(8);let c=xn(u,["enca"]);const h=c.length>0;h||(c=xn(u,["encv"])),c.forEach(m=>{const y=h?m.subarray(28):m.subarray(78);xn(y,["sinf"]).forEach(T=>{const R=MR(T);if(R){const _=R.subarray(8,24);_.some(L=>L!==0)||(Fe.log(`[eme] Patching keyId in 'enc${h?"a":"v"}>sinf>>tenc' box: ${xl.hexDump(_)} -> ${xl.hexDump(t)}`),R.set(t,8))}})})}),r}function MR(r){const e=xn(r,["schm"])[0];if(e){const t=$i(e.subarray(4,8));if(t==="cbcs"||t==="cenc")return xn(r,["schi","tenc"])[0]}return Fe.error("[eme] missing 'schm' box"),null}function l3(r,e){return xn(e,["moof","traf"]).reduce((t,n)=>{const s=xn(n,["tfdt"])[0],o=s[0],u=xn(n,["tfhd"]).reduce((c,h)=>{const m=rn(h,4),y=r[m];if(y){let E=rn(s,4);if(o===1){if(E===Bg)return Fe.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"),c;E*=Bg+1,E+=rn(s,8)}const T=y.timescale||9e4,R=E/T;if(Bt(R)&&(c===null||R<c))return R}return c},null);return u!==null&&Bt(u)&&(t===null||u<t)?u:t},null)}function u3(r,e){let t=0,n=0,s=0;const o=xn(r,["moof","traf"]);for(let u=0;u<o.length;u++){const c=o[u],h=xn(c,["tfhd"])[0],m=rn(h,4),y=e[m];if(!y)continue;const E=y.default,T=rn(h,0)|(E==null?void 0:E.flags);let R=E==null?void 0:E.duration;T&8&&(T&2?R=rn(h,12):R=rn(h,8));const _=y.timescale||9e4,L=xn(c,["trun"]);for(let M=0;M<L.length;M++){if(t=c3(L[M]),!t&&R){const F=rn(L[M],4);t=R*F}y.type===fr.VIDEO?n+=t/_:y.type===fr.AUDIO&&(s+=t/_)}}if(n===0&&s===0){let u=1/0,c=0,h=0;const m=xn(r,["sidx"]);for(let y=0;y<m.length;y++){const E=s3(m[y]);if(E!=null&&E.references){u=Math.min(u,E.earliestPresentationTime/E.timescale);const T=E.references.reduce((R,_)=>R+_.info.duration||0,0);c=Math.max(c,T+E.earliestPresentationTime/E.timescale),h=c-u}}if(h&&Bt(h))return h}return n||s}function c3(r){const e=rn(r,0);let t=8;e&1&&(t+=4),e&4&&(t+=4);let n=0;const s=rn(r,4);for(let o=0;o<s;o++){if(e&256){const u=rn(r,t);n+=u,t+=4}e&512&&(t+=4),e&1024&&(t+=4),e&2048&&(t+=4)}return n}function f3(r,e,t){xn(e,["moof","traf"]).forEach(n=>{xn(n,["tfhd"]).forEach(s=>{const o=rn(s,4),u=r[o];if(!u)return;const c=u.timescale||9e4;xn(n,["tfdt"]).forEach(h=>{const m=h[0],y=t*c;if(y){let E=rn(h,4);if(m===0)E-=y,E=Math.max(E,0),n1(h,4,E);else{E*=Math.pow(2,32),E+=rn(h,8),E-=y,E=Math.max(E,0);const T=Math.floor(E/(Bg+1)),R=Math.floor(E%(Bg+1));n1(h,4,T),n1(h,8,R)}}})})})}function d3(r){const e={valid:null,remainder:null},t=xn(r,["moof"]);if(t.length<2)return e.remainder=r,e;const n=t[t.length-1];return e.valid=af(r,0,n.byteOffset-8),e.remainder=af(r,n.byteOffset-8),e}function ao(r,e){const t=new Uint8Array(r.length+e.length);return t.set(r),t.set(e,r.length),t}function OR(r,e){const t=[],n=e.samples,s=e.timescale,o=e.id;let u=!1;return xn(n,["moof"]).map(h=>{const m=h.byteOffset-8;xn(h,["traf"]).map(E=>{const T=xn(E,["tfdt"]).map(R=>{const _=R[0];let L=rn(R,4);return _===1&&(L*=Math.pow(2,32),L+=rn(R,8)),L/s})[0];return T!==void 0&&(r=T),xn(E,["tfhd"]).map(R=>{const _=rn(R,4),L=rn(R,0)&16777215,M=(L&1)!==0,F=(L&2)!==0,Z=(L&8)!==0;let K=0;const Y=(L&16)!==0;let X=0;const ue=(L&32)!==0;let ie=8;_===o&&(M&&(ie+=8),F&&(ie+=4),Z&&(K=rn(R,ie),ie+=4),Y&&(X=rn(R,ie),ie+=4),ue&&(ie+=4),e.type==="video"&&(u=h3(e.codec)),xn(E,["trun"]).map(ye=>{const de=ye[0],Re=rn(ye,0)&16777215,Ce=(Re&1)!==0;let Ve=0;const ze=(Re&4)!==0,Qe=(Re&256)!==0;let et=0;const Pe=(Re&512)!==0;let ne=0;const _e=(Re&1024)!==0,Ue=(Re&2048)!==0;let He=0;const Be=rn(ye,4);let Je=8;Ce&&(Ve=rn(ye,Je),Je+=4),ze&&(Je+=4);let Xe=Ve+m;for(let Et=0;Et<Be;Et++){if(Qe?(et=rn(ye,Je),Je+=4):et=K,Pe?(ne=rn(ye,Je),Je+=4):ne=X,_e&&(Je+=4),Ue&&(de===0?He=rn(ye,Je):He=IR(ye,Je),Je+=4),e.type===fr.VIDEO){let gt=0;for(;gt<ne;){const Ot=rn(n,Xe);if(Xe+=4,p3(u,n[Xe])){const Dt=n.subarray(Xe,Xe+Ot);FR(Dt,u?2:1,r+He/s,t)}Xe+=Ot,gt+=Ot+4}}r+=et/s}}))})})}),t}function h3(r){if(!r)return!1;const e=r.indexOf("."),t=e<0?r:r.substring(0,e);return t==="hvc1"||t==="hev1"||t==="dvh1"||t==="dvhe"}function p3(r,e){if(r){const t=e>>1&63;return t===39||t===40}else return(e&31)===6}function FR(r,e,t,n){const s=NR(r);let o=0;o+=e;let u=0,c=0,h=0;for(;o<s.length;){u=0;do{if(o>=s.length)break;h=s[o++],u+=h}while(h===255);c=0;do{if(o>=s.length)break;h=s[o++],c+=h}while(h===255);const m=s.length-o;let y=o;if(c<m)o+=c;else if(c>m){Fe.error(`Malformed SEI payload. ${c} is too small, only ${m} bytes left to parse.`);break}if(u===4){if(s[y++]===181){const T=kR(s,y);if(y+=2,T===49){const R=rn(s,y);if(y+=4,R===1195456820){const _=s[y++];if(_===3){const L=s[y++],M=31&L,F=64&L,Z=F?2+M*3:0,K=new Uint8Array(Z);if(F){K[0]=L;for(let Y=1;Y<Z;Y++)K[Y]=s[y++]}n.push({type:_,payloadType:u,pts:t,bytes:K})}}}}}else if(u===5&&c>16){const E=[];for(let _=0;_<16;_++){const L=s[y++].toString(16);E.push(L.length==1?"0"+L:L),(_===3||_===5||_===7||_===9)&&E.push("-")}const T=c-16,R=new Uint8Array(T);for(let _=0;_<T;_++)R[_]=s[y++];n.push({payloadType:u,pts:t,uuid:E.join(""),userData:El(R),userDataBytes:R})}}}function NR(r){const e=r.byteLength,t=[];let n=1;for(;n<e-2;)r[n]===0&&r[n+1]===0&&r[n+2]===3?(t.push(n+2),n+=2):n++;if(t.length===0)return r;const s=e-t.length,o=new Uint8Array(s);let u=0;for(n=0;n<s;u++,n++)u===t[0]&&(u++,t.shift()),o[n]=r[u];return o}function m3(r){const e=r[0];let t="",n="",s=0,o=0,u=0,c=0,h=0,m=0;if(e===0){for(;$i(r.subarray(m,m+1))!=="\0";)t+=$i(r.subarray(m,m+1)),m+=1;for(t+=$i(r.subarray(m,m+1)),m+=1;$i(r.subarray(m,m+1))!=="\0";)n+=$i(r.subarray(m,m+1)),m+=1;n+=$i(r.subarray(m,m+1)),m+=1,s=rn(r,12),o=rn(r,16),c=rn(r,20),h=rn(r,24),m=28}else if(e===1){m+=4,s=rn(r,m),m+=4;const E=rn(r,m);m+=4;const T=rn(r,m);for(m+=4,u=2**32*E+T,IB(u)||(u=Number.MAX_SAFE_INTEGER,Fe.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),c=rn(r,m),m+=4,h=rn(r,m),m+=4;$i(r.subarray(m,m+1))!=="\0";)t+=$i(r.subarray(m,m+1)),m+=1;for(t+=$i(r.subarray(m,m+1)),m+=1;$i(r.subarray(m,m+1))!=="\0";)n+=$i(r.subarray(m,m+1)),m+=1;n+=$i(r.subarray(m,m+1)),m+=1}const y=r.subarray(m,r.byteLength);return{schemeIdUri:t,value:n,timeScale:s,presentationTime:u,presentationTimeDelta:o,eventDuration:c,id:h,payload:y}}function g3(r,...e){const t=e.length;let n=8,s=t;for(;s--;)n+=e[s].byteLength;const o=new Uint8Array(n);for(o[0]=n>>24&255,o[1]=n>>16&255,o[2]=n>>8&255,o[3]=n&255,o.set(r,4),s=0,n=8;s<t;s++)o.set(e[s],n),n+=e[s].byteLength;return o}function v3(r,e,t){if(r.byteLength!==16)throw new RangeError("Invalid system id");let n,s;n=0,s=new Uint8Array;let o;n>0?(o=new Uint8Array(4),e.length>0&&new DataView(o.buffer).setUint32(0,e.length,!1)):o=new Uint8Array;const u=new Uint8Array(4);return t&&t.byteLength>0&&new DataView(u.buffer).setUint32(0,t.byteLength,!1),g3([112,115,115,104],new Uint8Array([n,0,0,0]),r,o,s,u,t||new Uint8Array)}function y3(r){if(!(r instanceof ArrayBuffer)||r.byteLength<32)return null;const e={version:0,systemId:"",kids:null,data:null},t=new DataView(r),n=t.getUint32(0);if(r.byteLength!==n&&n>44||t.getUint32(4)!==1886614376||(e.version=t.getUint32(8)>>>24,e.version>1))return null;e.systemId=xl.hexDump(new Uint8Array(r,12,16));const o=t.getUint32(28);if(e.version===0){if(n-32<o)return null;e.data=new Uint8Array(r,32,o)}else if(e.version===1){e.kids=[];for(let u=0;u<o;u++)e.kids.push(new Uint8Array(r,32+u*16,16))}return e}let Vg={};class hp{static clearKeyUriToKeyIdMap(){Vg={}}constructor(e,t,n,s=[1],o=null){this.uri=void 0,this.method=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.encrypted=void 0,this.isCommonEncryption=void 0,this.iv=null,this.key=null,this.keyId=null,this.pssh=null,this.method=e,this.uri=t,this.keyFormat=n,this.keyFormatVersions=s,this.iv=o,this.encrypted=e?e!=="NONE":!1,this.isCommonEncryption=this.encrypted&&e!=="AES-128"}isSupported(){if(this.method){if(this.method==="AES-128"||this.method==="NONE")return!0;if(this.keyFormat==="identity")return this.method==="SAMPLE-AES";switch(this.keyFormat){case ua.FAIRPLAY:case ua.WIDEVINE:case ua.PLAYREADY:case ua.CLEARKEY:return["ISO-23001-7","SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)!==-1}}return!1}getDecryptData(e){if(!this.encrypted||!this.uri)return null;if(this.method==="AES-128"&&this.uri&&!this.iv){typeof e!="number"&&(this.method==="AES-128"&&!this.iv&&Fe.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0);const n=S3(e);return new hp(this.method,this.uri,"identity",this.keyFormatVersions,n)}const t=GB(this.uri);if(t)switch(this.keyFormat){case ua.WIDEVINE:this.pssh=t,t.length>=22&&(this.keyId=t.subarray(t.length-22,t.length-6));break;case ua.PLAYREADY:{const n=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=v3(n,null,t);const s=new Uint16Array(t.buffer,t.byteOffset,t.byteLength/2),o=String.fromCharCode.apply(null,Array.from(s)),u=o.substring(o.indexOf("<"),o.length),m=new DOMParser().parseFromString(u,"text/xml").getElementsByTagName("KID")[0];if(m){const y=m.childNodes[0]?m.childNodes[0].nodeValue:m.getAttribute("VALUE");if(y){const E=XS(y).subarray(0,16);HB(E),this.keyId=E}}break}default:{let n=t.subarray(0,16);if(n.length!==16){const s=new Uint8Array(16);s.set(n,16-n.length),n=s}this.keyId=n;break}}if(!this.keyId||this.keyId.byteLength!==16){let n=Vg[this.uri];if(!n){const s=Object.keys(Vg).length%Number.MAX_SAFE_INTEGER;n=new Uint8Array(16),new DataView(n.buffer,12,4).setUint32(0,s),Vg[this.uri]=n}this.keyId=n}return this}}function S3(r){const e=new Uint8Array(16);for(let t=12;t<16;t++)e[t]=r>>8*(15-t)&255;return e}const UR=/\{\$([a-zA-Z0-9-_]+)\}/g;function BR(r){return UR.test(r)}function ca(r,e,t){if(r.variableList!==null||r.hasVariableRefs)for(let n=t.length;n--;){const s=t[n],o=e[s];o&&(e[s]=i1(r,o))}}function i1(r,e){if(r.variableList!==null||r.hasVariableRefs){const t=r.variableList;return e.replace(UR,n=>{const s=n.substring(2,n.length-1),o=t==null?void 0:t[s];return o===void 0?(r.playlistParsingError||(r.playlistParsingError=new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${s}"`)),n):o})}return e}function $R(r,e,t){let n=r.variableList;n||(r.variableList=n={});let s,o;if("QUERYPARAM"in e){s=e.QUERYPARAM;try{const u=new self.URL(t).searchParams;if(u.has(s))o=u.get(s);else throw new Error(`"${s}" does not match any query parameter in URI: "${t}"`)}catch(u){r.playlistParsingError||(r.playlistParsingError=new Error(`EXT-X-DEFINE QUERYPARAM: ${u.message}`))}}else s=e.NAME,o=e.VALUE;s in n?r.playlistParsingError||(r.playlistParsingError=new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${s}"`)):n[s]=o||""}function E3(r,e,t){const n=e.IMPORT;if(t&&n in t){let s=r.variableList;s||(r.variableList=s={}),s[n]=t[n]}else r.playlistParsingError||(r.playlistParsingError=new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${n}"`))}function of(r=!0){return typeof self>"u"?void 0:(r||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function x3(r){return typeof self<"u"&&r===self.ManagedMediaSource}const zg={audio:{a3ds:1,"ac-3":.95,"ac-4":1,alac:.9,alaw:1,dra1:1,"dts+":1,"dts-":1,dtsc:1,dtse:1,dtsh:1,"ec-3":.9,enca:1,fLaC:.9,flac:.9,FLAC:.9,g719:1,g726:1,m4ae:1,mha1:1,mha2:1,mhm1:1,mhm2:1,mlpa:1,mp4a:1,"raw ":1,Opus:1,opus:1,samr:1,sawb:1,sawp:1,sevc:1,sqcp:1,ssmv:1,twos:1,ulaw:1},video:{avc1:1,avc2:1,avc3:1,avc4:1,avcp:1,av01:.8,drac:1,dva1:1,dvav:1,dvh1:.7,dvhe:.7,encv:1,hev1:.75,hvc1:.75,mjp2:1,mp4v:1,mvc1:1,mvc2:1,mvc3:1,mvc4:1,resv:1,rv60:1,s263:1,svc1:1,svc2:1,"vc-1":1,vp08:1,vp09:.9},text:{stpp:1,wvtt:1}};function b3(r,e){const t=zg[e];return!!t&&!!t[r.slice(0,4)]}function s1(r,e,t=!0){return!r.split(",").some(n=>!VR(n,e,t))}function VR(r,e,t=!0){var n;const s=of(t);return(n=s==null?void 0:s.isTypeSupported(pp(r,e)))!=null?n:!1}function pp(r,e){return`${e}/mp4;codecs="${r}"`}function zR(r){if(r){const e=r.substring(0,4);return zg.video[e]}return 2}function jg(r){return r.split(",").reduce((e,t)=>{const n=zg.video[t];return n?(n*2+e)/(e?3:2):(zg.audio[t]+e)/(e?2:1)},0)}const a1={};function T3(r,e=!0){if(a1[r])return a1[r];const t={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"]}[r];for(let n=0;n<t.length;n++)if(VR(t[n],"audio",e))return a1[r]=t[n],t[n];return r}const w3=/flac|opus/i;function Hg(r,e=!0){return r.replace(w3,t=>T3(t.toLowerCase(),e))}function jR(r,e){return r&&r!=="mp4a"?r:e&&e.split(",")[0]}function C3(r){const e=r.split(".");if(e.length>2){let t=e.shift()+".";return t+=parseInt(e.shift()).toString(16),t+=("000"+parseInt(e.shift()).toString(16)).slice(-4),t}return r}const HR=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-(SESSION-DATA|SESSION-KEY|DEFINE|CONTENT-STEERING|START):([^\r\n]*)[\r\n]+/g,GR=/#EXT-X-MEDIA:(.*)/g,R3=/^#EXT(?:INF|-X-TARGETDURATION):/m,WR=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),A3=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(DATERANGE|DEFINE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source,/#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source,/#EXT-X-(DISCONTINUITY|ENDLIST|GAP|INDEPENDENT-SEGMENTS)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|"));class Tl{static findGroup(e,t){for(let n=0;n<e.length;n++){const s=e[n];if(s.id===t)return s}}static resolve(e,t){return KS.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return R3.test(e)}static parseMasterPlaylist(e,t){const n=BR(e),s={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:n},o=[];HR.lastIndex=0;let u;for(;(u=HR.exec(e))!=null;)if(u[1]){var c;const m=new Yr(u[1]);ca(s,m,["CODECS","SUPPLEMENTAL-CODECS","ALLOWED-CPC","PATHWAY-ID","STABLE-VARIANT-ID","AUDIO","VIDEO","SUBTITLES","CLOSED-CAPTIONS","NAME"]);const y=i1(s,u[2]),E={attrs:m,bitrate:m.decimalInteger("BANDWIDTH")||m.decimalInteger("AVERAGE-BANDWIDTH"),name:m.NAME,url:Tl.resolve(y,t)},T=m.decimalResolution("RESOLUTION");T&&(E.width=T.width,E.height=T.height),_3(m.CODECS,E),(c=E.unknownCodecs)!=null&&c.length||o.push(E),s.levels.push(E)}else if(u[3]){const m=u[3],y=u[4];switch(m){case"SESSION-DATA":{const E=new Yr(y);ca(s,E,["DATA-ID","LANGUAGE","VALUE","URI"]);const T=E["DATA-ID"];T&&(s.sessionData===null&&(s.sessionData={}),s.sessionData[T]=E);break}case"SESSION-KEY":{const E=KR(y,t,s);E.encrypted&&E.isSupported()?(s.sessionKeys===null&&(s.sessionKeys=[]),s.sessionKeys.push(E)):Fe.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${y}"`);break}case"DEFINE":{{const E=new Yr(y);ca(s,E,["NAME","VALUE","QUERYPARAM"]),$R(s,E,t)}break}case"CONTENT-STEERING":{const E=new Yr(y);ca(s,E,["SERVER-URI","PATHWAY-ID"]),s.contentSteering={uri:Tl.resolve(E["SERVER-URI"],t),pathwayId:E["PATHWAY-ID"]||"."};break}case"START":{s.startTimeOffset=qR(y);break}}}const h=o.length>0&&o.length<s.levels.length;return s.levels=h?o:s.levels,s.levels.length===0&&(s.playlistParsingError=new Error("no levels found in manifest")),s}static parseMasterPlaylistMedia(e,t,n){let s;const o={},u=n.levels,c={AUDIO:u.map(m=>({id:m.attrs.AUDIO,audioCodec:m.audioCodec})),SUBTITLES:u.map(m=>({id:m.attrs.SUBTITLES,textCodec:m.textCodec})),"CLOSED-CAPTIONS":[]};let h=0;for(GR.lastIndex=0;(s=GR.exec(e))!==null;){const m=new Yr(s[1]),y=m.TYPE;if(y){const E=c[y],T=o[y]||[];o[y]=T,ca(n,m,["URI","GROUP-ID","LANGUAGE","ASSOC-LANGUAGE","STABLE-RENDITION-ID","NAME","INSTREAM-ID","CHARACTERISTICS","CHANNELS"]);const R=m.LANGUAGE,_=m["ASSOC-LANGUAGE"],L=m.CHANNELS,M=m.CHARACTERISTICS,F=m["INSTREAM-ID"],Z={attrs:m,bitrate:0,id:h++,groupId:m["GROUP-ID"]||"",name:m.NAME||R||"",type:y,default:m.bool("DEFAULT"),autoselect:m.bool("AUTOSELECT"),forced:m.bool("FORCED"),lang:R,url:m.URI?Tl.resolve(m.URI,t):""};if(_&&(Z.assocLang=_),L&&(Z.channels=L),M&&(Z.characteristics=M),F&&(Z.instreamId=F),E!=null&&E.length){const K=Tl.findGroup(E,Z.groupId)||E[0];YR(Z,K,"audioCodec"),YR(Z,K,"textCodec")}T.push(Z)}}return o}static parseLevelPlaylist(e,t,n,s,o,u){const c=new zB(t),h=c.fragments;let m=null,y=0,E=0,T=0,R=0,_=null,L=new YS(s,t),M,F,Z,K=-1,Y=!1,X=null;for(WR.lastIndex=0,c.m3u8=e,c.hasVariableRefs=BR(e);(M=WR.exec(e))!==null;){Y&&(Y=!1,L=new YS(s,t),L.start=T,L.sn=y,L.cc=R,L.level=n,m&&(L.initSegment=m,L.rawProgramDateTime=m.rawProgramDateTime,m.rawProgramDateTime=null,X&&(L.setByteRange(X),X=null)));const de=M[1];if(de){L.duration=parseFloat(de);const Re=(" "+M[2]).slice(1);L.title=Re||null,L.tagList.push(Re?["INF",de,Re]:["INF",de])}else if(M[3]){if(Bt(L.duration)){L.start=T,Z&&JR(L,Z,c),L.sn=y,L.level=n,L.cc=R,h.push(L);const Re=(" "+M[3]).slice(1);L.relurl=i1(c,Re),XR(L,_),_=L,T+=L.duration,y++,E=0,Y=!0}}else if(M[4]){const Re=(" "+M[4]).slice(1);_?L.setByteRange(Re,_):L.setByteRange(Re)}else if(M[5])L.rawProgramDateTime=(" "+M[5]).slice(1),L.tagList.push(["PROGRAM-DATE-TIME",L.rawProgramDateTime]),K===-1&&(K=h.length);else{if(M=M[0].match(A3),!M){Fe.warn("No matches on slow regex match for level playlist!");continue}for(F=1;F<M.length&&!(typeof M[F]<"u");F++);const Re=(" "+M[F]).slice(1),Ce=(" "+M[F+1]).slice(1),Ve=M[F+2]?(" "+M[F+2]).slice(1):"";switch(Re){case"PLAYLIST-TYPE":c.type=Ce.toUpperCase();break;case"MEDIA-SEQUENCE":y=c.startSN=parseInt(Ce);break;case"SKIP":{const ze=new Yr(Ce);ca(c,ze,["RECENTLY-REMOVED-DATERANGES"]);const Qe=ze.decimalInteger("SKIPPED-SEGMENTS");if(Bt(Qe)){c.skippedSegments=Qe;for(let Pe=Qe;Pe--;)h.unshift(null);y+=Qe}const et=ze.enumeratedString("RECENTLY-REMOVED-DATERANGES");et&&(c.recentlyRemovedDateranges=et.split(" "));break}case"TARGETDURATION":c.targetduration=Math.max(parseInt(Ce),1);break;case"VERSION":c.version=parseInt(Ce);break;case"INDEPENDENT-SEGMENTS":case"EXTM3U":break;case"ENDLIST":c.live=!1;break;case"#":(Ce||Ve)&&L.tagList.push(Ve?[Ce,Ve]:[Ce]);break;case"DISCONTINUITY":R++,L.tagList.push(["DIS"]);break;case"GAP":L.gap=!0,L.tagList.push([Re]);break;case"BITRATE":L.tagList.push([Re,Ce]);break;case"DATERANGE":{const ze=new Yr(Ce);ca(c,ze,["ID","CLASS","START-DATE","END-DATE","SCTE35-CMD","SCTE35-OUT","SCTE35-IN"]),ca(c,ze,ze.clientAttrs);const Qe=new ER(ze,c.dateRanges[ze.ID]);Qe.isValid||c.skippedSegments?c.dateRanges[Qe.id]=Qe:Fe.warn(`Ignoring invalid DATERANGE tag: "${Ce}"`),L.tagList.push(["EXT-X-DATERANGE",Ce]);break}case"DEFINE":{{const ze=new Yr(Ce);ca(c,ze,["NAME","VALUE","IMPORT","QUERYPARAM"]),"IMPORT"in ze?E3(c,ze,u):$R(c,ze,t)}break}case"DISCONTINUITY-SEQUENCE":R=parseInt(Ce);break;case"KEY":{const ze=KR(Ce,t,c);if(ze.isSupported()){if(ze.method==="NONE"){Z=void 0;break}Z||(Z={}),Z[ze.keyFormat]&&(Z=Ii({},Z)),Z[ze.keyFormat]=ze}else Fe.warn(`[Keys] Ignoring invalid EXT-X-KEY tag: "${Ce}"`);break}case"START":c.startTimeOffset=qR(Ce);break;case"MAP":{const ze=new Yr(Ce);if(ca(c,ze,["BYTERANGE","URI"]),L.duration){const Qe=new YS(s,t);QR(Qe,ze,n,Z),m=Qe,L.initSegment=m,m.rawProgramDateTime&&!L.rawProgramDateTime&&(L.rawProgramDateTime=m.rawProgramDateTime)}else{const Qe=L.byteRangeEndOffset;if(Qe){const et=L.byteRangeStartOffset;X=`${Qe-et}@${et}`}else X=null;QR(L,ze,n,Z),m=L,Y=!0}break}case"SERVER-CONTROL":{const ze=new Yr(Ce);c.canBlockReload=ze.bool("CAN-BLOCK-RELOAD"),c.canSkipUntil=ze.optionalFloat("CAN-SKIP-UNTIL",0),c.canSkipDateRanges=c.canSkipUntil>0&&ze.bool("CAN-SKIP-DATERANGES"),c.partHoldBack=ze.optionalFloat("PART-HOLD-BACK",0),c.holdBack=ze.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{const ze=new Yr(Ce);c.partTarget=ze.decimalFloatingPoint("PART-TARGET");break}case"PART":{let ze=c.partList;ze||(ze=c.partList=[]);const Qe=E>0?ze[ze.length-1]:void 0,et=E++,Pe=new Yr(Ce);ca(c,Pe,["BYTERANGE","URI"]);const ne=new $B(Pe,L,t,et,Qe);ze.push(ne),L.duration+=ne.duration;break}case"PRELOAD-HINT":{const ze=new Yr(Ce);ca(c,ze,["URI"]),c.preloadHint=ze;break}case"RENDITION-REPORT":{const ze=new Yr(Ce);ca(c,ze,["URI"]),c.renditionReports=c.renditionReports||[],c.renditionReports.push(ze);break}default:Fe.warn(`line parsed but not handled: ${M}`);break}}}_&&!_.relurl?(h.pop(),T-=_.duration,c.partList&&(c.fragmentHint=_)):c.partList&&(XR(L,_),L.cc=R,c.fragmentHint=L,Z&&JR(L,Z,c));const ue=h.length,ie=h[0],ye=h[ue-1];if(T+=c.skippedSegments*c.targetduration,T>0&&ue&&ye){c.averagetargetduration=T/ue;const de=ye.sn;c.endSN=de!=="initSegment"?de:0,c.live||(ye.endList=!0),ie&&(c.startCC=ie.cc)}else c.endSN=0,c.startCC=0;return c.fragmentHint&&(T+=c.fragmentHint.duration),c.totalduration=T,c.endCC=R,K>0&&L3(h,K),c}}function KR(r,e,t){var n,s;const o=new Yr(r);ca(t,o,["KEYFORMAT","KEYFORMATVERSIONS","URI","IV","URI"]);const u=(n=o.METHOD)!=null?n:"",c=o.URI,h=o.hexadecimalInteger("IV"),m=o.KEYFORMATVERSIONS,y=(s=o.KEYFORMAT)!=null?s:"identity";c&&o.IV&&!h&&Fe.error(`Invalid IV: ${o.IV}`);const E=c?Tl.resolve(c,e):"",T=(m||"1").split("/").map(Number).filter(Number.isFinite);return new hp(u,E,y,T,h)}function qR(r){const t=new Yr(r).decimalFloatingPoint("TIME-OFFSET");return Bt(t)?t:null}function _3(r,e){let t=(r||"").split(/[ ,]+/).filter(n=>n);["video","audio","text"].forEach(n=>{const s=t.filter(o=>b3(o,n));s.length&&(e[`${n}Codec`]=s.join(","),t=t.filter(o=>s.indexOf(o)===-1))}),e.unknownCodecs=t}function YR(r,e,t){const n=e[t];n&&(r[t]=n)}function L3(r,e){let t=r[e];for(let n=e;n--;){const s=r[n];if(!s)return;s.programDateTime=t.programDateTime-s.duration*1e3,t=s}}function XR(r,e){r.rawProgramDateTime?r.programDateTime=Date.parse(r.rawProgramDateTime):e!=null&&e.programDateTime&&(r.programDateTime=e.endProgramDateTime),Bt(r.programDateTime)||(r.programDateTime=null,r.rawProgramDateTime=null)}function QR(r,e,t,n){r.relurl=e.URI,e.BYTERANGE&&r.setByteRange(e.BYTERANGE),r.level=t,r.sn="initSegment",n&&(r.levelkeys=n),r.initSegment=null}function JR(r,e,t){r.levelkeys=e;const{encryptedFragments:n}=t;(!n.length||n[n.length-1].levelkeys!==e)&&Object.keys(e).some(s=>e[s].isCommonEncryption)&&n.push(r)}var zn={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},ln={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};function ZR(r){const{type:e}=r;switch(e){case zn.AUDIO_TRACK:return ln.AUDIO;case zn.SUBTITLE_TRACK:return ln.SUBTITLE;default:return ln.MAIN}}function o1(r,e){let t=r.url;return(t===void 0||t.indexOf("data:")===0)&&(t=e.url),t}class k3{constructor(e){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.hls=e,this.registerListeners()}startLoad(e){}stopLoad(){this.destroyInternalLoaders()}registerListeners(){const{hls:e}=this;e.on(V.MANIFEST_LOADING,this.onManifestLoading,this),e.on(V.LEVEL_LOADING,this.onLevelLoading,this),e.on(V.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(V.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}unregisterListeners(){const{hls:e}=this;e.off(V.MANIFEST_LOADING,this.onManifestLoading,this),e.off(V.LEVEL_LOADING,this.onLevelLoading,this),e.off(V.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(V.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}createInternalLoader(e){const t=this.hls.config,n=t.pLoader,s=t.loader,o=n||s,u=new o(t);return this.loaders[e.type]=u,u}getInternalLoader(e){return this.loaders[e.type]}resetInternalLoader(e){this.loaders[e]&&delete this.loaders[e]}destroyInternalLoaders(){for(const e in this.loaders){const t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}}destroy(){this.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()}onManifestLoading(e,t){const{url:n}=t;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:zn.MANIFEST,url:n,deliveryDirectives:null})}onLevelLoading(e,t){const{id:n,level:s,pathwayId:o,url:u,deliveryDirectives:c}=t;this.load({id:n,level:s,pathwayId:o,responseType:"text",type:zn.LEVEL,url:u,deliveryDirectives:c})}onAudioTrackLoading(e,t){const{id:n,groupId:s,url:o,deliveryDirectives:u}=t;this.load({id:n,groupId:s,level:null,responseType:"text",type:zn.AUDIO_TRACK,url:o,deliveryDirectives:u})}onSubtitleTrackLoading(e,t){const{id:n,groupId:s,url:o,deliveryDirectives:u}=t;this.load({id:n,groupId:s,level:null,responseType:"text",type:zn.SUBTITLE_TRACK,url:o,deliveryDirectives:u})}load(e){var t;const n=this.hls.config;let s=this.getInternalLoader(e);if(s){const m=s.context;if(m&&m.url===e.url&&m.level===e.level){Fe.trace("[playlist-loader]: playlist request ongoing");return}Fe.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),s.abort()}let o;if(e.type===zn.MANIFEST?o=n.manifestLoadPolicy.default:o=Ii({},n.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),s=this.createInternalLoader(e),Bt((t=e.deliveryDirectives)==null?void 0:t.part)){let m;if(e.type===zn.LEVEL&&e.level!==null?m=this.hls.levels[e.level].details:e.type===zn.AUDIO_TRACK&&e.id!==null?m=this.hls.audioTracks[e.id].details:e.type===zn.SUBTITLE_TRACK&&e.id!==null&&(m=this.hls.subtitleTracks[e.id].details),m){const y=m.partTarget,E=m.targetduration;if(y&&E){const T=Math.max(y*3,E*.8)*1e3;o=Ii({},o,{maxTimeToFirstByteMs:Math.min(T,o.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(T,o.maxTimeToFirstByteMs)})}}}const u=o.errorRetry||o.timeoutRetry||{},c={loadPolicy:o,timeout:o.maxLoadTimeMs,maxRetry:u.maxNumRetry||0,retryDelay:u.retryDelayMs||0,maxRetryDelay:u.maxRetryDelayMs||0},h={onSuccess:(m,y,E,T)=>{const R=this.getInternalLoader(E);this.resetInternalLoader(E.type);const _=m.data;if(_.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(m,E,new Error("no EXTM3U delimiter"),T||null,y);return}y.parsing.start=performance.now(),Tl.isMediaPlaylist(_)?this.handleTrackOrLevelPlaylist(m,y,E,T||null,R):this.handleMasterPlaylist(m,y,E,T)},onError:(m,y,E,T)=>{this.handleNetworkError(y,E,!1,m,T)},onTimeout:(m,y,E)=>{this.handleNetworkError(y,E,!0,void 0,m)}};s.load(e,c,h)}handleMasterPlaylist(e,t,n,s){const o=this.hls,u=e.data,c=o1(e,n),h=Tl.parseMasterPlaylist(u,c);if(h.playlistParsingError){this.handleManifestParsingError(e,n,h.playlistParsingError,s,t);return}const{contentSteering:m,levels:y,sessionData:E,sessionKeys:T,startTimeOffset:R,variableList:_}=h;this.variableList=_;const{AUDIO:L=[],SUBTITLES:M,"CLOSED-CAPTIONS":F}=Tl.parseMasterPlaylistMedia(u,c,h);L.length&&!L.some(K=>!K.url)&&y[0].audioCodec&&!y[0].attrs.AUDIO&&(Fe.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),L.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new Yr({}),bitrate:0,url:""})),o.trigger(V.MANIFEST_LOADED,{levels:y,audioTracks:L,subtitles:M,captions:F,contentSteering:m,url:c,stats:t,networkDetails:s,sessionData:E,sessionKeys:T,startTimeOffset:R,variableList:_})}handleTrackOrLevelPlaylist(e,t,n,s,o){const u=this.hls,{id:c,level:h,type:m}=n,y=o1(e,n),E=0,T=Bt(h)?h:Bt(c)?c:0,R=ZR(n),_=Tl.parseLevelPlaylist(e.data,y,T,R,E,this.variableList);if(m===zn.MANIFEST){const L={attrs:new Yr({}),bitrate:0,details:_,name:"",url:y};u.trigger(V.MANIFEST_LOADED,{levels:[L],audioTracks:[],url:y,stats:t,networkDetails:s,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),n.levelDetails=_,this.handlePlaylistLoaded(_,e,t,n,s,o)}handleManifestParsingError(e,t,n,s,o){this.hls.trigger(V.ERROR,{type:cn.NETWORK_ERROR,details:qe.MANIFEST_PARSING_ERROR,fatal:t.type===zn.MANIFEST,url:e.url,err:n,error:n,reason:n.message,response:e,context:t,networkDetails:s,stats:o})}handleNetworkError(e,t,n=!1,s,o){let u=`A network ${n?"timeout":"error"+(s?" (status "+s.code+")":"")} occurred while loading ${e.type}`;e.type===zn.LEVEL?u+=`: ${e.level} id: ${e.id}`:(e.type===zn.AUDIO_TRACK||e.type===zn.SUBTITLE_TRACK)&&(u+=` id: ${e.id} group-id: "${e.groupId}"`);const c=new Error(u);Fe.warn(`[playlist-loader]: ${u}`);let h=qe.UNKNOWN,m=!1;const y=this.getInternalLoader(e);switch(e.type){case zn.MANIFEST:h=n?qe.MANIFEST_LOAD_TIMEOUT:qe.MANIFEST_LOAD_ERROR,m=!0;break;case zn.LEVEL:h=n?qe.LEVEL_LOAD_TIMEOUT:qe.LEVEL_LOAD_ERROR,m=!1;break;case zn.AUDIO_TRACK:h=n?qe.AUDIO_TRACK_LOAD_TIMEOUT:qe.AUDIO_TRACK_LOAD_ERROR,m=!1;break;case zn.SUBTITLE_TRACK:h=n?qe.SUBTITLE_TRACK_LOAD_TIMEOUT:qe.SUBTITLE_LOAD_ERROR,m=!1;break}y&&this.resetInternalLoader(e.type);const E={type:cn.NETWORK_ERROR,details:h,fatal:m,url:e.url,loader:y,context:e,error:c,networkDetails:t,stats:o};if(s){const T=(t==null?void 0:t.url)||e.url;E.response=qi({url:T,data:void 0},s)}this.hls.trigger(V.ERROR,E)}handlePlaylistLoaded(e,t,n,s,o,u){const c=this.hls,{type:h,level:m,id:y,groupId:E,deliveryDirectives:T}=s,R=o1(t,s),_=ZR(s),L=typeof s.level=="number"&&_===ln.MAIN?m:void 0;if(!e.fragments.length){const F=new Error("No Segments found in Playlist");c.trigger(V.ERROR,{type:cn.NETWORK_ERROR,details:qe.LEVEL_EMPTY_ERROR,fatal:!1,url:R,error:F,reason:F.message,response:t,context:s,level:L,parent:_,networkDetails:o,stats:n});return}e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));const M=e.playlistParsingError;if(M){c.trigger(V.ERROR,{type:cn.NETWORK_ERROR,details:qe.LEVEL_PARSING_ERROR,fatal:!1,url:R,error:M,reason:M.message,response:t,context:s,level:L,parent:_,networkDetails:o,stats:n});return}switch(e.live&&u&&(u.getCacheAge&&(e.ageHeader=u.getCacheAge()||0),(!u.getCacheAge||isNaN(e.ageHeader))&&(e.ageHeader=0)),h){case zn.MANIFEST:case zn.LEVEL:c.trigger(V.LEVEL_LOADED,{details:e,level:L||0,id:y||0,stats:n,networkDetails:o,deliveryDirectives:T});break;case zn.AUDIO_TRACK:c.trigger(V.AUDIO_TRACK_LOADED,{details:e,id:y||0,groupId:E||"",stats:n,networkDetails:o,deliveryDirectives:T});break;case zn.SUBTITLE_TRACK:c.trigger(V.SUBTITLE_TRACK_LOADED,{details:e,id:y||0,groupId:E||"",stats:n,networkDetails:o,deliveryDirectives:T});break}}}function eA(r,e){let t;try{t=new Event("addtrack")}catch{t=document.createEvent("Event"),t.initEvent("addtrack",!1,!1)}t.track=r,e.dispatchEvent(t)}function tA(r,e){const t=r.mode;if(t==="disabled"&&(r.mode="hidden"),r.cues&&!r.cues.getCueById(e.id))try{if(r.addCue(e),!r.cues.getCueById(e.id))throw new Error(`addCue is failed for: ${e}`)}catch(n){Fe.debug(`[texttrack-utils]: ${n}`);try{const s=new self.TextTrackCue(e.startTime,e.endTime,e.text);s.id=e.id,r.addCue(s)}catch(s){Fe.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${s}`)}}t==="disabled"&&(r.mode=t)}function Id(r){const e=r.mode;if(e==="disabled"&&(r.mode="hidden"),r.cues)for(let t=r.cues.length;t--;)r.removeCue(r.cues[t]);e==="disabled"&&(r.mode=e)}function l1(r,e,t,n){const s=r.mode;if(s==="disabled"&&(r.mode="hidden"),r.cues&&r.cues.length>0){const o=I3(r.cues,e,t);for(let u=0;u<o.length;u++)(!n||n(o[u]))&&r.removeCue(o[u])}s==="disabled"&&(r.mode=s)}function D3(r,e){if(e<r[0].startTime)return 0;const t=r.length-1;if(e>r[t].endTime)return-1;let n=0,s=t;for(;n<=s;){const o=Math.floor((s+n)/2);if(e<r[o].startTime)s=o-1;else if(e>r[o].startTime&&n<t)n=o+1;else return o}return r[n].startTime-e<e-r[s].startTime?n:s}function I3(r,e,t){const n=[],s=D3(r,e);if(s>-1)for(let o=s,u=r.length;o<u;o++){const c=r[o];if(c.startTime>=e&&c.endTime<=t)n.push(c);else if(c.startTime>t)return n}return n}function Gg(r){const e=[];for(let t=0;t<r.length;t++){const n=r[t];(n.kind==="subtitles"||n.kind==="captions")&&n.label&&e.push(r[t])}return e}var Fo={audioId3:"org.id3",dateRange:"com.apple.quicktime.HLS",emsg:"https://aomedia.org/emsg/ID3"};const P3=.25;function u1(){if(!(typeof self>"u"))return self.VTTCue||self.TextTrackCue}function nA(r,e,t,n,s){let o=new r(e,t,"");try{o.value=n,s&&(o.type=s)}catch{o=new r(e,t,JSON.stringify(s?qi({type:s},n):n))}return o}const Wg=(()=>{const r=u1();try{r&&new r(0,Number.POSITIVE_INFINITY,"")}catch{return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();function c1(r,e){return r.getTime()/1e3-e}function M3(r){return Uint8Array.from(r.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}class O3{constructor(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=e,this._registerListeners()}destroy(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=null}_registerListeners(){const{hls:e}=this;e.on(V.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(V.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(V.MANIFEST_LOADING,this.onManifestLoading,this),e.on(V.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(V.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(V.LEVEL_UPDATED,this.onLevelUpdated,this)}_unregisterListeners(){const{hls:e}=this;e.off(V.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(V.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(V.MANIFEST_LOADING,this.onManifestLoading,this),e.off(V.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(V.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(V.LEVEL_UPDATED,this.onLevelUpdated,this)}onMediaAttached(e,t){this.media=t.media}onMediaDetaching(){this.id3Track&&(Id(this.id3Track),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={})}onManifestLoading(){this.dateRangeCuesAppended={}}createTrack(e){const t=this.getID3Track(e.textTracks);return t.mode="hidden",t}getID3Track(e){if(this.media){for(let t=0;t<e.length;t++){const n=e[t];if(n.kind==="metadata"&&n.label==="id3")return eA(n,this.media),n}return this.media.addTextTrack("metadata","id3")}}onFragParsingMetadata(e,t){if(!this.media)return;const{hls:{config:{enableEmsgMetadataCues:n,enableID3MetadataCues:s}}}=this;if(!n&&!s)return;const{samples:o}=t;this.id3Track||(this.id3Track=this.createTrack(this.media));const u=u1();if(u)for(let c=0;c<o.length;c++){const h=o[c].type;if(h===Fo.emsg&&!n||!s)continue;const m=_R(o[c].data);if(m){const y=o[c].pts;let E=y+o[c].duration;E>Wg&&(E=Wg),E-y<=0&&(E=y+P3);for(let R=0;R<m.length;R++){const _=m[R];if(!AR(_)){this.updateId3CueEnds(y,h);const L=nA(u,y,E,_,h);L&&this.id3Track.addCue(L)}}}}}updateId3CueEnds(e,t){var n;const s=(n=this.id3Track)==null?void 0:n.cues;if(s)for(let o=s.length;o--;){const u=s[o];u.type===t&&u.startTime<e&&u.endTime===Wg&&(u.endTime=e)}}onBufferFlushing(e,{startOffset:t,endOffset:n,type:s}){const{id3Track:o,hls:u}=this;if(!u)return;const{config:{enableEmsgMetadataCues:c,enableID3MetadataCues:h}}=u;if(o&&(c||h)){let m;s==="audio"?m=y=>y.type===Fo.audioId3&&h:s==="video"?m=y=>y.type===Fo.emsg&&c:m=y=>y.type===Fo.audioId3&&h||y.type===Fo.emsg&&c,l1(o,t,n,m)}}onLevelUpdated(e,{details:t}){if(!this.media||!t.hasProgramDateTime||!this.hls.config.enableDateRangeMetadataCues)return;const{dateRangeCuesAppended:n,id3Track:s}=this,{dateRanges:o}=t,u=Object.keys(o);if(s){const y=Object.keys(n).filter(E=>!u.includes(E));for(let E=y.length;E--;){const T=y[E];Object.keys(n[T].cues).forEach(R=>{s.removeCue(n[T].cues[R])}),delete n[T]}}const c=t.fragments[t.fragments.length-1];if(u.length===0||!Bt(c==null?void 0:c.programDateTime))return;this.id3Track||(this.id3Track=this.createTrack(this.media));const h=c.programDateTime/1e3-c.start,m=u1();for(let y=0;y<u.length;y++){const E=u[y],T=o[E],R=c1(T.startDate,h),_=n[E],L=(_==null?void 0:_.cues)||{};let M=(_==null?void 0:_.durationKnown)||!1,F=Wg;const Z=T.endDate;if(Z)F=c1(Z,h),M=!0;else if(T.endOnNext&&!M){const Y=u.reduce((X,ue)=>{if(ue!==T.id){const ie=o[ue];if(ie.class===T.class&&ie.startDate>T.startDate&&(!X||T.startDate<X.startDate))return ie}return X},null);Y&&(F=c1(Y.startDate,h),M=!0)}const K=Object.keys(T.attr);for(let Y=0;Y<K.length;Y++){const X=K[Y];if(!UB(X))continue;const ue=L[X];if(ue)M&&!_.durationKnown&&(ue.endTime=F);else if(m){let ie=T.attr[X];BB(X)&&(ie=M3(ie));const ye=nA(m,R,F,{key:X,data:ie},Fo.dateRange);ye&&(ye.id=E,this.id3Track.addCue(ye),L[X]=ye)}}n[E]={cues:L,dateRange:T,durationKnown:M}}}}class F3{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=()=>this.timeupdate(),this.hls=e,this.config=e.config,this.registerListeners()}get latency(){return this._latency||0}get maxLatency(){const{config:e,levelDetails:t}=this;return e.liveMaxLatencyDuration!==void 0?e.liveMaxLatencyDuration:t?e.liveMaxLatencyDurationCount*t.targetduration:0}get targetLatency(){const{levelDetails:e}=this;if(e===null)return null;const{holdBack:t,partHoldBack:n,targetduration:s}=e,{liveSyncDuration:o,liveSyncDurationCount:u,lowLatencyMode:c}=this.config,h=this.hls.userConfig;let m=c&&n||t;(h.liveSyncDuration||h.liveSyncDurationCount||m===0)&&(m=o!==void 0?o:u*s);const y=s;return m+Math.min(this.stallCount*1,y)}get liveSyncPosition(){const e=this.estimateLiveEdge(),t=this.targetLatency,n=this.levelDetails;if(e===null||t===null||n===null)return null;const s=n.edge,o=e-t-this.edgeStalled,u=s-n.totalduration,c=s-(this.config.lowLatencyMode&&n.partTarget||n.targetduration);return Math.min(Math.max(u,o),c)}get drift(){const{levelDetails:e}=this;return e===null?1:e.drift}get edgeStalled(){const{levelDetails:e}=this;if(e===null)return 0;const t=(this.config.lowLatencyMode&&e.partTarget||e.targetduration)*3;return Math.max(e.age-t,0)}get forwardBufferLength(){const{media:e,levelDetails:t}=this;if(!e||!t)return 0;const n=e.buffered.length;return(n?e.buffered.end(n-1):t.edge)-this.currentTime}destroy(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null}registerListeners(){this.hls.on(V.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(V.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(V.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(V.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(V.ERROR,this.onError,this)}unregisterListeners(){this.hls.off(V.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(V.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.off(V.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(V.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.off(V.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)}onMediaDetaching(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)}onManifestLoading(){this.levelDetails=null,this._latency=null,this.stallCount=0}onLevelUpdated(e,{details:t}){this.levelDetails=t,t.advanced&&this.timeupdate(),!t.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)}onError(e,t){var n;t.details===qe.BUFFER_STALLED_ERROR&&(this.stallCount++,(n=this.levelDetails)!=null&&n.live&&Fe.warn("[playback-rate-controller]: Stall detected, adjusting target latency"))}timeupdate(){const{media:e,levelDetails:t}=this;if(!e||!t)return;this.currentTime=e.currentTime;const n=this.computeLatency();if(n===null)return;this._latency=n;const{lowLatencyMode:s,maxLiveSyncPlaybackRate:o}=this.config;if(!s||o===1||!t.live)return;const u=this.targetLatency;if(u===null)return;const c=n-u,h=Math.min(this.maxLatency,u+t.targetduration);if(c<h&&c>.05&&this.forwardBufferLength>1){const y=Math.min(2,Math.max(1,o)),E=Math.round(2/(1+Math.exp(-.75*c-this.edgeStalled))*20)/20;e.playbackRate=Math.min(y,Math.max(1,E))}else e.playbackRate!==1&&e.playbackRate!==0&&(e.playbackRate=1)}estimateLiveEdge(){const{levelDetails:e}=this;return e===null?null:e.edge+e.age}computeLatency(){const e=this.estimateLiveEdge();return e===null?null:e-this.currentTime}}const f1=["NONE","TYPE-0","TYPE-1",null];function N3(r){return f1.indexOf(r)>-1}const Kg=["SDR","PQ","HLG"];function U3(r){return!!r&&Kg.indexOf(r)>-1}var qg={No:"",Yes:"YES",v2:"v2"};function rA(r){const{canSkipUntil:e,canSkipDateRanges:t,age:n}=r,s=n<e/2;return e&&s?t?qg.v2:qg.Yes:qg.No}class iA{constructor(e,t,n){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=n}addDirectives(e){const t=new self.URL(e);return this.msn!==void 0&&t.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&t.searchParams.set("_HLS_part",this.part.toString()),this.skip&&t.searchParams.set("_HLS_skip",this.skip),t.href}}class Pd{constructor(e){this._attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.url=void 0,this.frameRate=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.supportedPromise=void 0,this.supportedResult=void 0,this._avgBitrate=0,this._audioGroups=void 0,this._subtitleGroups=void 0,this._urlId=0,this.url=[e.url],this._attrs=[e.attrs],this.bitrate=e.bitrate,e.details&&(this.details=e.details),this.id=e.id||0,this.name=e.name,this.width=e.width||0,this.height=e.height||0,this.frameRate=e.attrs.optionalFloat("FRAME-RATE",0),this._avgBitrate=e.attrs.decimalInteger("AVERAGE-BANDWIDTH"),this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.codecSet=[e.videoCodec,e.audioCodec].filter(t=>!!t).map(t=>t.substring(0,4)).join(","),this.addGroupId("audio",e.attrs.AUDIO),this.addGroupId("text",e.attrs.SUBTITLES)}get maxBitrate(){return Math.max(this.realBitrate,this.bitrate)}get averageBitrate(){return this._avgBitrate||this.realBitrate||this.bitrate}get attrs(){return this._attrs[0]}get codecs(){return this.attrs.CODECS||""}get pathwayId(){return this.attrs["PATHWAY-ID"]||"."}get videoRange(){return this.attrs["VIDEO-RANGE"]||"SDR"}get score(){return this.attrs.optionalFloat("SCORE",0)}get uri(){return this.url[0]||""}hasAudioGroup(e){return sA(this._audioGroups,e)}hasSubtitleGroup(e){return sA(this._subtitleGroups,e)}get audioGroups(){return this._audioGroups}get subtitleGroups(){return this._subtitleGroups}addGroupId(e,t){if(t){if(e==="audio"){let n=this._audioGroups;n||(n=this._audioGroups=[]),n.indexOf(t)===-1&&n.push(t)}else if(e==="text"){let n=this._subtitleGroups;n||(n=this._subtitleGroups=[]),n.indexOf(t)===-1&&n.push(t)}}}get urlId(){return 0}set urlId(e){}get audioGroupIds(){return this.audioGroups?[this.audioGroupId]:void 0}get textGroupIds(){return this.subtitleGroups?[this.textGroupId]:void 0}get audioGroupId(){var e;return(e=this.audioGroups)==null?void 0:e[0]}get textGroupId(){var e;return(e=this.subtitleGroups)==null?void 0:e[0]}addFallback(){}}function sA(r,e){return!e||!r?!1:r.indexOf(e)!==-1}function d1(r,e){const t=e.startPTS;if(Bt(t)){let n=0,s;e.sn>r.sn?(n=t-r.start,s=r):(n=r.start-t,s=e),s.duration!==n&&(s.duration=n)}else e.sn>r.sn?r.cc===e.cc&&r.minEndPTS?e.start=r.start+(r.minEndPTS-r.start):e.start=r.start+r.duration:e.start=Math.max(r.start-e.duration,0)}function aA(r,e,t,n,s,o){n-t<=0&&(Fe.warn("Fragment should have a positive duration",e),n=t+e.duration,o=s+e.duration);let c=t,h=n;const m=e.startPTS,y=e.endPTS;if(Bt(m)){const M=Math.abs(m-t);Bt(e.deltaPTS)?e.deltaPTS=Math.max(M,e.deltaPTS):e.deltaPTS=M,c=Math.max(t,m),t=Math.min(t,m),s=Math.min(s,e.startDTS),h=Math.min(n,y),n=Math.max(n,y),o=Math.max(o,e.endDTS)}const E=t-e.start;e.start!==0&&(e.start=t),e.duration=n-e.start,e.startPTS=t,e.maxStartPTS=c,e.startDTS=s,e.endPTS=n,e.minEndPTS=h,e.endDTS=o;const T=e.sn;if(!r||T<r.startSN||T>r.endSN)return 0;let R;const _=T-r.startSN,L=r.fragments;for(L[_]=e,R=_;R>0;R--)d1(L[R],L[R-1]);for(R=_;R<L.length-1;R++)d1(L[R],L[R+1]);return r.fragmentHint&&d1(L[L.length-1],r.fragmentHint),r.PTSKnown=r.alignedSliding=!0,E}function B3(r,e){let t=null;const n=r.fragments;for(let h=n.length-1;h>=0;h--){const m=n[h].initSegment;if(m){t=m;break}}r.fragmentHint&&delete r.fragmentHint.endPTS;let s=0,o;if(z3(r,e,(h,m)=>{h.relurl&&(s=h.cc-m.cc),Bt(h.startPTS)&&Bt(h.endPTS)&&(m.start=m.startPTS=h.startPTS,m.startDTS=h.startDTS,m.maxStartPTS=h.maxStartPTS,m.endPTS=h.endPTS,m.endDTS=h.endDTS,m.minEndPTS=h.minEndPTS,m.duration=h.endPTS-h.startPTS,m.duration&&(o=m),e.PTSKnown=e.alignedSliding=!0),m.elementaryStreams=h.elementaryStreams,m.loader=h.loader,m.stats=h.stats,h.initSegment&&(m.initSegment=h.initSegment,t=h.initSegment)}),t&&(e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments).forEach(m=>{var y;m&&(!m.initSegment||m.initSegment.relurl===((y=t)==null?void 0:y.relurl))&&(m.initSegment=t)}),e.skippedSegments)if(e.deltaUpdateFailed=e.fragments.some(h=>!h),e.deltaUpdateFailed){Fe.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let h=e.skippedSegments;h--;)e.fragments.shift();e.startSN=e.fragments[0].sn,e.startCC=e.fragments[0].cc}else e.canSkipDateRanges&&(e.dateRanges=$3(r.dateRanges,e.dateRanges,e.recentlyRemovedDateranges));const u=e.fragments;if(s){Fe.warn("discontinuity sliding from playlist, take drift into account");for(let h=0;h<u.length;h++)u[h].cc+=s}e.skippedSegments&&(e.startCC=e.fragments[0].cc),V3(r.partList,e.partList,(h,m)=>{m.elementaryStreams=h.elementaryStreams,m.stats=h.stats}),o?aA(e,o,o.startPTS,o.endPTS,o.startDTS,o.endDTS):oA(r,e),u.length&&(e.totalduration=e.edge-u[0].start),e.driftStartTime=r.driftStartTime,e.driftStart=r.driftStart;const c=e.advancedDateTime;if(e.advanced&&c){const h=e.edge;e.driftStart||(e.driftStartTime=c,e.driftStart=h),e.driftEndTime=c,e.driftEnd=h}else e.driftEndTime=r.driftEndTime,e.driftEnd=r.driftEnd,e.advancedDateTime=r.advancedDateTime}function $3(r,e,t){const n=Ii({},r);return t&&t.forEach(s=>{delete n[s]}),Object.keys(e).forEach(s=>{const o=new ER(e[s].attr,n[s]);o.isValid?n[s]=o:Fe.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${JSON.stringify(e[s].attr)}"`)}),n}function V3(r,e,t){if(r&&e){let n=0;for(let s=0,o=r.length;s<=o;s++){const u=r[s],c=e[s+n];u&&c&&u.index===c.index&&u.fragment.sn===c.fragment.sn?t(u,c):n--}}}function z3(r,e,t){const n=e.skippedSegments,s=Math.max(r.startSN,e.startSN)-e.startSN,o=(r.fragmentHint?1:0)+(n?e.endSN:Math.min(r.endSN,e.endSN))-e.startSN,u=e.startSN-r.startSN,c=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,h=r.fragmentHint?r.fragments.concat(r.fragmentHint):r.fragments;for(let m=s;m<=o;m++){const y=h[u+m];let E=c[m];n&&!E&&m<n&&(E=e.fragments[m]=y),y&&E&&t(y,E)}}function oA(r,e){const t=e.startSN+e.skippedSegments-r.startSN,n=r.fragments;t<0||t>=n.length||h1(e,n[t].start)}function h1(r,e){if(e){const t=r.fragments;for(let n=r.skippedSegments;n<t.length;n++)t[n].start+=e;r.fragmentHint&&(r.fragmentHint.start+=e)}}function j3(r,e=1/0){let t=1e3*r.targetduration;if(r.updated){const n=r.fragments;if(n.length&&t*4>e){const o=n[n.length-1].duration*1e3;o<t&&(t=o)}}else t/=2;return Math.round(t)}function H3(r,e,t){if(!(r!=null&&r.details))return null;const n=r.details;let s=n.fragments[e-n.startSN];return s||(s=n.fragmentHint,s&&s.sn===e)?s:e<n.startSN&&t&&t.sn===e?t:null}function lA(r,e,t){var n;return r!=null&&r.details?uA((n=r.details)==null?void 0:n.partList,e,t):null}function uA(r,e,t){if(r)for(let n=r.length;n--;){const s=r[n];if(s.index===t&&s.fragment.sn===e)return s}return null}function cA(r){r.forEach((e,t)=>{const{details:n}=e;n!=null&&n.fragments&&n.fragments.forEach(s=>{s.level=t})})}function Yg(r){switch(r.details){case qe.FRAG_LOAD_TIMEOUT:case qe.KEY_LOAD_TIMEOUT:case qe.LEVEL_LOAD_TIMEOUT:case qe.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function fA(r,e){const t=Yg(e);return r.default[`${t?"timeout":"error"}Retry`]}function p1(r,e){const t=r.backoff==="linear"?1:Math.pow(2,e);return Math.min(t*r.retryDelayMs,r.maxRetryDelayMs)}function dA(r){return qi(qi({},r),{errorRetry:null,timeoutRetry:null})}function Xg(r,e,t,n){if(!r)return!1;const s=n==null?void 0:n.code,o=e<r.maxNumRetry&&(G3(s)||!!t);return r.shouldRetry?r.shouldRetry(r,e,t,n,o):o}function G3(r){return r===0&&navigator.onLine===!1||!!r&&(r<400||r>499)}const hA={search:function(r,e){let t=0,n=r.length-1,s=null,o=null;for(;t<=n;){s=(t+n)/2|0,o=r[s];const u=e(o);if(u>0)t=s+1;else if(u<0)n=s-1;else return o}return null}};function W3(r,e,t){if(e===null||!Array.isArray(r)||!r.length||!Bt(e))return null;const n=r[0].programDateTime;if(e<(n||0))return null;const s=r[r.length-1].endProgramDateTime;if(e>=(s||0))return null;t=t||0;for(let o=0;o<r.length;++o){const u=r[o];if(K3(e,t,u))return u}return null}function Qg(r,e,t=0,n=0){let s=null;if(r){s=e[r.sn-e[0].sn+1]||null;const u=r.endDTS-t;u>0&&u<15e-7&&(t+=15e-7)}else t===0&&e[0].start===0&&(s=e[0]);if(s&&(!r||r.level===s.level)&&m1(t,n,s)===0)return s;const o=hA.search(e,m1.bind(null,t,n));return o&&(o!==r||!s)?o:s}function m1(r=0,e=0,t){if(t.start<=r&&t.start+t.duration>r)return 0;const n=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0));return t.start+t.duration-n<=r?1:t.start-n>r&&t.start?-1:0}function K3(r,e,t){const n=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0))*1e3;return(t.endProgramDateTime||0)-n>r}function q3(r,e){return hA.search(r,t=>t.cc<e?1:t.cc>e?-1:0)}var ps={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},No={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,SwitchToSDR:4};class Y3{constructor(e){this.hls=void 0,this.playlistError=0,this.penalizedRenditions={},this.log=void 0,this.warn=void 0,this.error=void 0,this.hls=e,this.log=Fe.log.bind(Fe,"[info]:"),this.warn=Fe.warn.bind(Fe,"[warning]:"),this.error=Fe.error.bind(Fe,"[error]:"),this.registerListeners()}registerListeners(){const e=this.hls;e.on(V.ERROR,this.onError,this),e.on(V.MANIFEST_LOADING,this.onManifestLoading,this),e.on(V.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(V.ERROR,this.onError,this),e.off(V.ERROR,this.onErrorOut,this),e.off(V.MANIFEST_LOADING,this.onManifestLoading,this),e.off(V.LEVEL_UPDATED,this.onLevelUpdated,this))}destroy(){this.unregisterListeners(),this.hls=null,this.penalizedRenditions={}}startLoad(e){}stopLoad(){this.playlistError=0}getVariantLevelIndex(e){return(e==null?void 0:e.type)===ln.MAIN?e.level:this.hls.loadLevel}onManifestLoading(){this.playlistError=0,this.penalizedRenditions={}}onLevelUpdated(){this.playlistError=0}onError(e,t){var n,s;if(t.fatal)return;const o=this.hls,u=t.context;switch(t.details){case qe.FRAG_LOAD_ERROR:case qe.FRAG_LOAD_TIMEOUT:case qe.KEY_LOAD_ERROR:case qe.KEY_LOAD_TIMEOUT:t.errorAction=this.getFragRetryOrSwitchAction(t);return;case qe.FRAG_PARSING_ERROR:if((n=t.frag)!=null&&n.gap){t.errorAction={action:ps.DoNothing,flags:No.None};return}case qe.FRAG_GAP:case qe.FRAG_DECRYPT_ERROR:{t.errorAction=this.getFragRetryOrSwitchAction(t),t.errorAction.action=ps.SendAlternateToPenaltyBox;return}case qe.LEVEL_EMPTY_ERROR:case qe.LEVEL_PARSING_ERROR:{var c,h;const m=t.parent===ln.MAIN?t.level:o.loadLevel;t.details===qe.LEVEL_EMPTY_ERROR&&((c=t.context)!=null&&(h=c.levelDetails)!=null&&h.live)?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,m):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,m))}return;case qe.LEVEL_LOAD_ERROR:case qe.LEVEL_LOAD_TIMEOUT:typeof(u==null?void 0:u.level)=="number"&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,u.level));return;case qe.AUDIO_TRACK_LOAD_ERROR:case qe.AUDIO_TRACK_LOAD_TIMEOUT:case qe.SUBTITLE_LOAD_ERROR:case qe.SUBTITLE_TRACK_LOAD_TIMEOUT:if(u){const m=o.levels[o.loadLevel];if(m&&(u.type===zn.AUDIO_TRACK&&m.hasAudioGroup(u.groupId)||u.type===zn.SUBTITLE_TRACK&&m.hasSubtitleGroup(u.groupId))){t.errorAction=this.getPlaylistRetryOrSwitchAction(t,o.loadLevel),t.errorAction.action=ps.SendAlternateToPenaltyBox,t.errorAction.flags=No.MoveAllAlternatesMatchingHost;return}}return;case qe.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{const m=o.levels[o.loadLevel],y=m==null?void 0:m.attrs["HDCP-LEVEL"];y?t.errorAction={action:ps.SendAlternateToPenaltyBox,flags:No.MoveAllAlternatesMatchingHDCP,hdcpLevel:y}:this.keySystemError(t)}return;case qe.BUFFER_ADD_CODEC_ERROR:case qe.REMUX_ALLOC_ERROR:case qe.BUFFER_APPEND_ERROR:t.errorAction=this.getLevelSwitchAction(t,(s=t.level)!=null?s:o.loadLevel);return;case qe.INTERNAL_EXCEPTION:case qe.BUFFER_APPENDING_ERROR:case qe.BUFFER_FULL_ERROR:case qe.LEVEL_SWITCH_ERROR:case qe.BUFFER_STALLED_ERROR:case qe.BUFFER_SEEK_OVER_HOLE:case qe.BUFFER_NUDGE_ON_STALL:t.errorAction={action:ps.DoNothing,flags:No.None};return}t.type===cn.KEY_SYSTEM_ERROR&&this.keySystemError(t)}keySystemError(e){const t=this.getVariantLevelIndex(e.frag);e.levelRetry=!1,e.errorAction=this.getLevelSwitchAction(e,t)}getPlaylistRetryOrSwitchAction(e,t){const n=this.hls,s=fA(n.config.playlistLoadPolicy,e),o=this.playlistError++;if(Xg(s,o,Yg(e),e.response))return{action:ps.RetryRequest,flags:No.None,retryConfig:s,retryCount:o};const c=this.getLevelSwitchAction(e,t);return s&&(c.retryConfig=s,c.retryCount=o),c}getFragRetryOrSwitchAction(e){const t=this.hls,n=this.getVariantLevelIndex(e.frag),s=t.levels[n],{fragLoadPolicy:o,keyLoadPolicy:u}=t.config,c=fA(e.details.startsWith("key")?u:o,e),h=t.levels.reduce((y,E)=>y+E.fragmentError,0);if(s&&(e.details!==qe.FRAG_GAP&&s.fragmentError++,Xg(c,h,Yg(e),e.response)))return{action:ps.RetryRequest,flags:No.None,retryConfig:c,retryCount:h};const m=this.getLevelSwitchAction(e,n);return c&&(m.retryConfig=c,m.retryCount=h),m}getLevelSwitchAction(e,t){const n=this.hls;t==null&&(t=n.loadLevel);const s=this.hls.levels[t];if(s){var o,u;const m=e.details;s.loadError++,m===qe.BUFFER_APPEND_ERROR&&s.fragmentError++;let y=-1;const{levels:E,loadLevel:T,minAutoLevel:R,maxAutoLevel:_}=n;n.autoLevelEnabled||(n.loadLevel=-1);const L=(o=e.frag)==null?void 0:o.type,F=(L===ln.AUDIO&&m===qe.FRAG_PARSING_ERROR||e.sourceBufferName==="audio"&&(m===qe.BUFFER_ADD_CODEC_ERROR||m===qe.BUFFER_APPEND_ERROR))&&E.some(({audioCodec:ue})=>s.audioCodec!==ue),K=e.sourceBufferName==="video"&&(m===qe.BUFFER_ADD_CODEC_ERROR||m===qe.BUFFER_APPEND_ERROR)&&E.some(({codecSet:ue,audioCodec:ie})=>s.codecSet!==ue&&s.audioCodec===ie),{type:Y,groupId:X}=(u=e.context)!=null?u:{};for(let ue=E.length;ue--;){const ie=(ue+T)%E.length;if(ie!==T&&ie>=R&&ie<=_&&E[ie].loadError===0){var c,h;const ye=E[ie];if(m===qe.FRAG_GAP&&e.frag){const de=E[ie].details;if(de){const Re=Qg(e.frag,de.fragments,e.frag.start);if(Re!=null&&Re.gap)continue}}else{if(Y===zn.AUDIO_TRACK&&ye.hasAudioGroup(X)||Y===zn.SUBTITLE_TRACK&&ye.hasSubtitleGroup(X))continue;if(L===ln.AUDIO&&(c=s.audioGroups)!=null&&c.some(de=>ye.hasAudioGroup(de))||L===ln.SUBTITLE&&(h=s.subtitleGroups)!=null&&h.some(de=>ye.hasSubtitleGroup(de))||F&&s.audioCodec===ye.audioCodec||!F&&s.audioCodec!==ye.audioCodec||K&&s.codecSet===ye.codecSet)continue}y=ie;break}}if(y>-1&&n.loadLevel!==y)return e.levelRetry=!0,this.playlistError=0,{action:ps.SendAlternateToPenaltyBox,flags:No.None,nextAutoLevel:y}}return{action:ps.SendAlternateToPenaltyBox,flags:No.MoveAllAlternatesMatchingHost}}onErrorOut(e,t){var n;switch((n=t.errorAction)==null?void 0:n.action){case ps.DoNothing:break;case ps.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(t),!t.errorAction.resolved&&t.details!==qe.FRAG_GAP?t.fatal=!0:/MediaSource readyState: ended/.test(t.error.message)&&(this.warn(`MediaSource ended after "${t.sourceBufferName}" sourceBuffer append error. Attempting to recover from media error.`),this.hls.recoverMediaError());break}if(t.fatal){this.hls.stopLoad();return}}sendAlternateToPenaltyBox(e){const t=this.hls,n=e.errorAction;if(!n)return;const{flags:s,hdcpLevel:o,nextAutoLevel:u}=n;switch(s){case No.None:this.switchLevel(e,u);break;case No.MoveAllAlternatesMatchingHDCP:o&&(t.maxHdcpLevel=f1[f1.indexOf(o)-1],n.resolved=!0),this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`);break}n.resolved||this.switchLevel(e,u)}switchLevel(e,t){t!==void 0&&e.errorAction&&(this.warn(`switching to level ${t} after ${e.details}`),this.hls.nextAutoLevel=t,e.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel)}}class g1{constructor(e,t){this.hls=void 0,this.timer=-1,this.requestScheduled=-1,this.canLoad=!1,this.log=void 0,this.warn=void 0,this.log=Fe.log.bind(Fe,`${t}:`),this.warn=Fe.warn.bind(Fe,`${t}:`),this.hls=e}destroy(){this.clearTimer(),this.hls=this.log=this.warn=null}clearTimer(){this.timer!==-1&&(self.clearTimeout(this.timer),this.timer=-1)}startLoad(){this.canLoad=!0,this.requestScheduled=-1,this.loadPlaylist()}stopLoad(){this.canLoad=!1,this.clearTimer()}switchParams(e,t,n){const s=t==null?void 0:t.renditionReports;if(s){let o=-1;for(let u=0;u<s.length;u++){const c=s[u];let h;try{h=new self.URL(c.URI,t.url).href}catch(m){Fe.warn(`Could not construct new URL for Rendition Report: ${m}`),h=c.URI||""}if(h===e){o=u;break}else h===e.substring(0,h.length)&&(o=u)}if(o!==-1){const u=s[o],c=parseInt(u["LAST-MSN"])||(t==null?void 0:t.lastPartSn);let h=parseInt(u["LAST-PART"])||(t==null?void 0:t.lastPartIndex);if(this.hls.config.lowLatencyMode){const y=Math.min(t.age-t.partTarget,t.targetduration);h>=0&&y>t.partTarget&&(h+=1)}const m=n&&rA(n);return new iA(c,h>=0?h:void 0,m)}}}loadPlaylist(e){this.requestScheduled===-1&&(this.requestScheduled=self.performance.now())}shouldLoadPlaylist(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)}shouldReloadPlaylist(e){return this.timer===-1&&this.requestScheduled===-1&&this.shouldLoadPlaylist(e)}playlistLoaded(e,t,n){const{details:s,stats:o}=t,u=self.performance.now(),c=o.loading.first?Math.max(0,u-o.loading.first):0;if(s.advancedDateTime=Date.now()-c,s.live||n!=null&&n.live){if(s.reloaded(n),n&&this.log(`live playlist ${e} ${s.advanced?"REFRESHED "+s.lastPartSn+"-"+s.lastPartIndex:s.updated?"UPDATED":"MISSED"}`),n&&s.fragments.length>0&&B3(n,s),!this.canLoad||!s.live)return;let h,m,y;if(s.canBlockReload&&s.endSN&&s.advanced){const M=this.hls.config.lowLatencyMode,F=s.lastPartSn,Z=s.endSN,K=s.lastPartIndex,Y=K!==-1,X=F===Z,ue=M?0:K;Y?(m=X?Z+1:F,y=X?ue:K+1):m=Z+1;const ie=s.age,ye=ie+s.ageHeader;let de=Math.min(ye-s.partTarget,s.targetduration*1.5);if(de>0){if(n&&de>n.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${n.tuneInGoal} to: ${de} with playlist age: ${s.age}`),de=0;else{const Re=Math.floor(de/s.targetduration);if(m+=Re,y!==void 0){const Ce=Math.round(de%s.targetduration/s.partTarget);y+=Ce}this.log(`CDN Tune-in age: ${s.ageHeader}s last advanced ${ie.toFixed(2)}s goal: ${de} skip sn ${Re} to part ${y}`)}s.tuneInGoal=de}if(h=this.getDeliveryDirectives(s,t.deliveryDirectives,m,y),M||!X){this.loadPlaylist(h);return}}else(s.canBlockReload||s.canSkipUntil)&&(h=this.getDeliveryDirectives(s,t.deliveryDirectives,m,y));const E=this.hls.mainForwardBufferInfo,T=E?E.end-E.len:0,R=(s.edge-T)*1e3,_=j3(s,R);s.updated&&u>this.requestScheduled+_&&(this.requestScheduled=o.loading.start),m!==void 0&&s.canBlockReload?this.requestScheduled=o.loading.first+_-(s.partTarget*1e3||1e3):this.requestScheduled===-1||this.requestScheduled+_<u?this.requestScheduled=u:this.requestScheduled-u<=0&&(this.requestScheduled+=_);let L=this.requestScheduled-u;L=Math.max(0,L),this.log(`reload live playlist ${e} in ${Math.round(L)} ms`),this.timer=self.setTimeout(()=>this.loadPlaylist(h),L)}else this.clearTimer()}getDeliveryDirectives(e,t,n,s){let o=rA(e);return t!=null&&t.skip&&e.deltaUpdateFailed&&(n=t.msn,s=t.part,o=qg.No),new iA(n,s,o)}checkRetry(e){const t=e.details,n=Yg(e),s=e.errorAction,{action:o,retryCount:u=0,retryConfig:c}=s||{},h=!!s&&!!c&&(o===ps.RetryRequest||!s.resolved&&o===ps.SendAlternateToPenaltyBox);if(h){var m;if(this.requestScheduled=-1,u>=c.maxNumRetry)return!1;if(n&&(m=e.context)!=null&&m.deliveryDirectives)this.warn(`Retrying playlist loading ${u+1}/${c.maxNumRetry} after "${t}" without delivery-directives`),this.loadPlaylist();else{const y=p1(c,u);this.timer=self.setTimeout(()=>this.loadPlaylist(),y),this.warn(`Retrying playlist loading ${u+1}/${c.maxNumRetry} after "${t}" in ${y}ms`)}e.levelRetry=!0,s.resolved=!0}return h}}class Md{constructor(e,t=0,n=0){this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=n}sample(e,t){const n=Math.pow(this.alpha_,e);this.estimate_=t*(1-n)+n*this.estimate_,this.totalWeight_+=e}getTotalWeight(){return this.totalWeight_}getEstimate(){if(this.alpha_){const e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_}}class X3{constructor(e,t,n,s=100){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=n,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new Md(e),this.fast_=new Md(t),this.defaultTTFB_=s,this.ttfb_=new Md(e)}update(e,t){const{slow_:n,fast_:s,ttfb_:o}=this;n.halfLife!==e&&(this.slow_=new Md(e,n.getEstimate(),n.getTotalWeight())),s.halfLife!==t&&(this.fast_=new Md(t,s.getEstimate(),s.getTotalWeight())),o.halfLife!==e&&(this.ttfb_=new Md(e,o.getEstimate(),o.getTotalWeight()))}sample(e,t){e=Math.max(e,this.minDelayMs_);const n=8*t,s=e/1e3,o=n/s;this.fast_.sample(s,o),this.slow_.sample(s,o)}sampleTTFB(e){const t=e/1e3,n=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(n,Math.max(e,5))}canEstimate(){return this.fast_.getTotalWeight()>=this.minWeight_}getEstimate(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}getEstimateTTFB(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_}destroy(){}}const pA={supported:!0,configurations:[],decodingInfoResults:[{supported:!0,powerEfficient:!0,smooth:!0}]},mA={};function Q3(r,e,t,n,s,o){const u=r.audioCodec?r.audioGroups:null,c=o==null?void 0:o.audioCodec,h=o==null?void 0:o.channels,m=h?parseInt(h):c?1/0:2;let y=null;if(u!=null&&u.length)try{u.length===1&&u[0]?y=e.groups[u[0]].channels:y=u.reduce((E,T)=>{if(T){const R=e.groups[T];if(!R)throw new Error(`Audio track group ${T} not found`);Object.keys(R.channels).forEach(_=>{E[_]=(E[_]||0)+R.channels[_]})}return E},{2:0})}catch{return!0}return r.videoCodec!==void 0&&(r.width>1920&&r.height>1088||r.height>1920&&r.width>1088||r.frameRate>Math.max(n,30)||r.videoRange!=="SDR"&&r.videoRange!==t||r.bitrate>Math.max(s,8e6))||!!y&&Bt(m)&&Object.keys(y).some(E=>parseInt(E)>m)}function J3(r,e,t){const n=r.videoCodec,s=r.audioCodec;if(!n||!s||!t)return Promise.resolve(pA);const o={width:r.width,height:r.height,bitrate:Math.ceil(Math.max(r.bitrate*.9,r.averageBitrate)),framerate:r.frameRate||30},u=r.videoRange;u!=="SDR"&&(o.transferFunction=u.toLowerCase());const c=n.split(",").map(h=>({type:"media-source",video:qi(qi({},o),{},{contentType:pp(h,"video")})}));return s&&r.audioGroups&&r.audioGroups.forEach(h=>{var m;h&&((m=e.groups[h])==null||m.tracks.forEach(y=>{if(y.groupId===h){const E=y.channels||"",T=parseFloat(E);Bt(T)&&T>2&&c.push.apply(c,s.split(",").map(R=>({type:"media-source",audio:{contentType:pp(R,"audio"),channels:""+T}})))}}))}),Promise.all(c.map(h=>{const m=Z3(h);return mA[m]||(mA[m]=t.decodingInfo(h))})).then(h=>({supported:!h.some(m=>!m.supported),configurations:c,decodingInfoResults:h})).catch(h=>({supported:!1,configurations:c,decodingInfoResults:[],error:h}))}function Z3(r){const{audio:e,video:t}=r,n=t||e;if(n){const s=n.contentType.split('"')[1];if(t)return`r${t.height}x${t.width}f${Math.ceil(t.framerate)}${t.transferFunction||"sd"}_${s}_${Math.ceil(t.bitrate/1e5)}`;if(e)return`c${e.channels}${e.spatialRendering?"s":"n"}_${s}`}return""}function e$(){if(typeof matchMedia=="function"){const r=matchMedia("(dynamic-range: high)"),e=matchMedia("bad query");if(r.media!==e.media)return r.matches===!0}return!1}function t$(r,e){let t=!1,n=[];return r&&(t=r!=="SDR",n=[r]),e&&(n=e.allowedVideoRanges||Kg.slice(0),t=e.preferHDR!==void 0?e.preferHDR:e$(),t?n=n.filter(s=>s!=="SDR"):n=["SDR"]),{preferHDR:t,allowedVideoRanges:n}}function n$(r,e,t,n,s){const o=Object.keys(r),u=n==null?void 0:n.channels,c=n==null?void 0:n.audioCodec,h=u&&parseInt(u)===2;let m=!0,y=!1,E=1/0,T=1/0,R=1/0,_=0,L=[];const{preferHDR:M,allowedVideoRanges:F}=t$(e,s);for(let X=o.length;X--;){const ue=r[o[X]];m=ue.channels[2]>0,E=Math.min(E,ue.minHeight),T=Math.min(T,ue.minFramerate),R=Math.min(R,ue.minBitrate);const ie=F.filter(ye=>ue.videoRanges[ye]>0);ie.length>0&&(y=!0,L=ie)}E=Bt(E)?E:0,T=Bt(T)?T:0;const Z=Math.max(1080,E),K=Math.max(30,T);return R=Bt(R)?R:t,t=Math.max(R,t),y||(e=void 0,L=[]),{codecSet:o.reduce((X,ue)=>{const ie=r[ue];if(ue===X)return X;if(ie.minBitrate>t)return gu(ue,`min bitrate of ${ie.minBitrate} > current estimate of ${t}`),X;if(!ie.hasDefaultAudio)return gu(ue,"no renditions with default or auto-select sound found"),X;if(c&&ue.indexOf(c.substring(0,4))%5!==0)return gu(ue,`audio codec preference "${c}" not found`),X;if(u&&!h){if(!ie.channels[u])return gu(ue,`no renditions with ${u} channel sound found (channels options: ${Object.keys(ie.channels)})`),X}else if((!c||h)&&m&&ie.channels[2]===0)return gu(ue,"no renditions with stereo sound found"),X;return ie.minHeight>Z?(gu(ue,`min resolution of ${ie.minHeight} > maximum of ${Z}`),X):ie.minFramerate>K?(gu(ue,`min framerate of ${ie.minFramerate} > maximum of ${K}`),X):L.some(ye=>ie.videoRanges[ye]>0)?ie.maxScore<_?(gu(ue,`max score of ${ie.maxScore} < selected max of ${_}`),X):X&&(jg(ue)>=jg(X)||ie.fragmentError>r[X].fragmentError)?X:(_=ie.maxScore,ue):(gu(ue,`no variants with VIDEO-RANGE of ${JSON.stringify(L)} found`),X)},void 0),videoRanges:L,preferHDR:M,minFramerate:T,minBitrate:R}}function gu(r,e){Fe.log(`[abr] start candidates with "${r}" ignored because ${e}`)}function r$(r){return r.reduce((e,t)=>{let n=e.groups[t.groupId];n||(n=e.groups[t.groupId]={tracks:[],channels:{2:0},hasDefault:!1,hasAutoSelect:!1}),n.tracks.push(t);const s=t.channels||"2";return n.channels[s]=(n.channels[s]||0)+1,n.hasDefault=n.hasDefault||t.default,n.hasAutoSelect=n.hasAutoSelect||t.autoselect,n.hasDefault&&(e.hasDefaultAudio=!0),n.hasAutoSelect&&(e.hasAutoSelectAudio=!0),e},{hasDefaultAudio:!1,hasAutoSelectAudio:!1,groups:{}})}function i$(r,e,t,n){return r.slice(t,n+1).reduce((s,o)=>{if(!o.codecSet)return s;const u=o.audioGroups;let c=s[o.codecSet];c||(s[o.codecSet]=c={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!u,fragmentError:0}),c.minBitrate=Math.min(c.minBitrate,o.bitrate);const h=Math.min(o.height,o.width);return c.minHeight=Math.min(c.minHeight,h),c.minFramerate=Math.min(c.minFramerate,o.frameRate),c.maxScore=Math.max(c.maxScore,o.score),c.fragmentError+=o.fragmentError,c.videoRanges[o.videoRange]=(c.videoRanges[o.videoRange]||0)+1,u&&u.forEach(m=>{if(!m)return;const y=e.groups[m];y&&(c.hasDefaultAudio=c.hasDefaultAudio||e.hasDefaultAudio?y.hasDefault:y.hasAutoSelect||!e.hasDefaultAudio&&!e.hasAutoSelectAudio,Object.keys(y.channels).forEach(E=>{c.channels[E]=(c.channels[E]||0)+y.channels[E]}))}),s},{})}function wl(r,e,t){if("attrs"in r){const n=e.indexOf(r);if(n!==-1)return n}for(let n=0;n<e.length;n++){const s=e[n];if(Od(r,s,t))return n}return-1}function Od(r,e,t){const{groupId:n,name:s,lang:o,assocLang:u,characteristics:c,default:h}=r,m=r.forced;return(n===void 0||e.groupId===n)&&(s===void 0||e.name===s)&&(o===void 0||e.lang===o)&&(o===void 0||e.assocLang===u)&&(h===void 0||e.default===h)&&(m===void 0||e.forced===m)&&(c===void 0||s$(c,e.characteristics))&&(t===void 0||t(r,e))}function s$(r,e=""){const t=r.split(","),n=e.split(",");return t.length===n.length&&!t.some(s=>n.indexOf(s)===-1)}function Fd(r,e){const{audioCodec:t,channels:n}=r;return(t===void 0||(e.audioCodec||"").substring(0,4)===t.substring(0,4))&&(n===void 0||n===(e.channels||"2"))}function a$(r,e,t,n,s){const o=e[n],c=e.reduce((T,R,_)=>{const L=R.uri;return(T[L]||(T[L]=[])).push(_),T},{})[o.uri];c.length>1&&(n=Math.max.apply(Math,c));const h=o.videoRange,m=o.frameRate,y=o.codecSet.substring(0,4),E=gA(e,n,T=>{if(T.videoRange!==h||T.frameRate!==m||T.codecSet.substring(0,4)!==y)return!1;const R=T.audioGroups,_=t.filter(L=>!R||R.indexOf(L.groupId)!==-1);return wl(r,_,s)>-1});return E>-1?E:gA(e,n,T=>{const R=T.audioGroups,_=t.filter(L=>!R||R.indexOf(L.groupId)!==-1);return wl(r,_,s)>-1})}function gA(r,e,t){for(let n=e;n;n--)if(t(r[n]))return n;for(let n=e+1;n<r.length;n++)if(t(r[n]))return n;return-1}class o${constructor(e){this.hls=void 0,this.lastLevelLoadSec=0,this.lastLoadedFragLevel=-1,this.firstSelection=-1,this._nextAutoLevel=-1,this.nextAutoLevelKey="",this.audioTracksByGroup=null,this.codecTiers=null,this.timer=-1,this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this._abandonRulesCheck=()=>{const{fragCurrent:t,partCurrent:n,hls:s}=this,{autoLevelEnabled:o,media:u}=s;if(!t||!u)return;const c=performance.now(),h=n?n.stats:t.stats,m=n?n.duration:t.duration,y=c-h.loading.start,E=s.minAutoLevel;if(h.aborted||h.loaded&&h.loaded===h.total||t.level<=E){this.clearTimer(),this._nextAutoLevel=-1;return}if(!o||u.paused||!u.playbackRate||!u.readyState)return;const T=s.mainForwardBufferInfo;if(T===null)return;const R=this.bwEstimator.getEstimateTTFB(),_=Math.abs(u.playbackRate);if(y<=Math.max(R,1e3*(m/(_*2))))return;const L=T.len/_,M=h.loading.first?h.loading.first-h.loading.start:-1,F=h.loaded&&M>-1,Z=this.getBwEstimate(),K=s.levels,Y=K[t.level],X=h.total||Math.max(h.loaded,Math.round(m*Y.averageBitrate/8));let ue=F?y-M:y;ue<1&&F&&(ue=Math.min(y,h.loaded*8/Z));const ie=F?h.loaded*1e3/ue:0,ye=ie?(X-h.loaded)/ie:X*8/Z+R/1e3;if(ye<=L)return;const de=ie?ie*8:Z;let Re=Number.POSITIVE_INFINITY,Ce;for(Ce=t.level-1;Ce>E;Ce--){const ze=K[Ce].maxBitrate;if(Re=this.getTimeToLoadFrag(R/1e3,de,m*ze,!K[Ce].details),Re<L)break}if(Re>=ye||Re>m*10)return;s.nextLoadLevel=s.nextAutoLevel=Ce,F?this.bwEstimator.sample(y-Math.min(R,M),h.loaded):this.bwEstimator.sampleTTFB(y);const Ve=K[Ce].maxBitrate;this.getBwEstimate()*this.hls.config.abrBandWidthUpFactor>Ve&&this.resetEstimator(Ve),this.clearTimer(),Fe.warn(`[abr] Fragment ${t.sn}${n?" part "+n.index:""} of level ${t.level} is loading too slowly;
|
|
278
|
+
Time to underbuffer: ${L.toFixed(3)} s
|
|
279
|
+
Estimated load time for current fragment: ${ye.toFixed(3)} s
|
|
280
|
+
Estimated load time for down switch fragment: ${Re.toFixed(3)} s
|
|
281
|
+
TTFB estimate: ${M|0} ms
|
|
282
|
+
Current BW estimate: ${Bt(Z)?Z|0:"Unknown"} bps
|
|
283
|
+
New BW estimate: ${this.getBwEstimate()|0} bps
|
|
284
|
+
Switching to level ${Ce} @ ${Ve|0} bps`),s.trigger(V.FRAG_LOAD_EMERGENCY_ABORTED,{frag:t,part:n,stats:h})},this.hls=e,this.bwEstimator=this.initEstimator(),this.registerListeners()}resetEstimator(e){e&&(Fe.log(`setting initial bwe to ${e}`),this.hls.config.abrEwmaDefaultEstimate=e),this.firstSelection=-1,this.bwEstimator=this.initEstimator()}initEstimator(){const e=this.hls.config;return new X3(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}registerListeners(){const{hls:e}=this;e.on(V.MANIFEST_LOADING,this.onManifestLoading,this),e.on(V.FRAG_LOADING,this.onFragLoading,this),e.on(V.FRAG_LOADED,this.onFragLoaded,this),e.on(V.FRAG_BUFFERED,this.onFragBuffered,this),e.on(V.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(V.LEVEL_LOADED,this.onLevelLoaded,this),e.on(V.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(V.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(V.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e&&(e.off(V.MANIFEST_LOADING,this.onManifestLoading,this),e.off(V.FRAG_LOADING,this.onFragLoading,this),e.off(V.FRAG_LOADED,this.onFragLoaded,this),e.off(V.FRAG_BUFFERED,this.onFragBuffered,this),e.off(V.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(V.LEVEL_LOADED,this.onLevelLoaded,this),e.off(V.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(V.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(V.ERROR,this.onError,this))}destroy(){this.unregisterListeners(),this.clearTimer(),this.hls=this._abandonRulesCheck=null,this.fragCurrent=this.partCurrent=null}onManifestLoading(e,t){this.lastLoadedFragLevel=-1,this.firstSelection=-1,this.lastLevelLoadSec=0,this.fragCurrent=this.partCurrent=null,this.onLevelsUpdated(),this.clearTimer()}onLevelsUpdated(){this.lastLoadedFragLevel>-1&&this.fragCurrent&&(this.lastLoadedFragLevel=this.fragCurrent.level),this._nextAutoLevel=-1,this.onMaxAutoLevelUpdated(),this.codecTiers=null,this.audioTracksByGroup=null}onMaxAutoLevelUpdated(){this.firstSelection=-1,this.nextAutoLevelKey=""}onFragLoading(e,t){const n=t.frag;if(!this.ignoreFragment(n)){if(!n.bitrateTest){var s;this.fragCurrent=n,this.partCurrent=(s=t.part)!=null?s:null}this.clearTimer(),this.timer=self.setInterval(this._abandonRulesCheck,100)}}onLevelSwitching(e,t){this.clearTimer()}onError(e,t){if(!t.fatal)switch(t.details){case qe.BUFFER_ADD_CODEC_ERROR:case qe.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case qe.FRAG_LOAD_TIMEOUT:{const n=t.frag,{fragCurrent:s,partCurrent:o}=this;if(n&&s&&n.sn===s.sn&&n.level===s.level){const u=performance.now(),c=o?o.stats:n.stats,h=u-c.loading.start,m=c.loading.first?c.loading.first-c.loading.start:-1;if(c.loaded&&m>-1){const E=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(h-Math.min(E,m),c.loaded)}else this.bwEstimator.sampleTTFB(h)}break}}}getTimeToLoadFrag(e,t,n,s){const o=e+n/t,u=s?this.lastLevelLoadSec:0;return o+u}onLevelLoaded(e,t){const n=this.hls.config,{loading:s}=t.stats,o=s.end-s.start;Bt(o)&&(this.lastLevelLoadSec=o/1e3),t.details.live?this.bwEstimator.update(n.abrEwmaSlowLive,n.abrEwmaFastLive):this.bwEstimator.update(n.abrEwmaSlowVoD,n.abrEwmaFastVoD)}onFragLoaded(e,{frag:t,part:n}){const s=n?n.stats:t.stats;if(t.type===ln.MAIN&&this.bwEstimator.sampleTTFB(s.loading.first-s.loading.start),!this.ignoreFragment(t)){if(this.clearTimer(),t.level===this._nextAutoLevel&&(this._nextAutoLevel=-1),this.firstSelection=-1,this.hls.config.abrMaxWithRealBitrate){const o=n?n.duration:t.duration,u=this.hls.levels[t.level],c=(u.loaded?u.loaded.bytes:0)+s.loaded,h=(u.loaded?u.loaded.duration:0)+o;u.loaded={bytes:c,duration:h},u.realBitrate=Math.round(8*c/h)}if(t.bitrateTest){const o={stats:s,frag:t,part:n,id:t.type};this.onFragBuffered(V.FRAG_BUFFERED,o),t.bitrateTest=!1}else this.lastLoadedFragLevel=t.level}}onFragBuffered(e,t){const{frag:n,part:s}=t,o=s!=null&&s.stats.loaded?s.stats:n.stats;if(o.aborted||this.ignoreFragment(n))return;const u=o.parsing.end-o.loading.start-Math.min(o.loading.first-o.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(u,o.loaded),o.bwEstimate=this.getBwEstimate(),n.bitrateTest?this.bitrateTestDelay=u/1e3:this.bitrateTestDelay=0}ignoreFragment(e){return e.type!==ln.MAIN||e.sn==="initSegment"}clearTimer(){this.timer>-1&&(self.clearInterval(this.timer),this.timer=-1)}get firstAutoLevel(){const{maxAutoLevel:e,minAutoLevel:t}=this.hls,n=this.getBwEstimate(),s=this.hls.config.maxStarvationDelay,o=this.findBestLevel(n,t,e,0,s,1,1);if(o>-1)return o;const u=this.hls.firstLevel,c=Math.min(Math.max(u,t),e);return Fe.warn(`[abr] Could not find best starting auto level. Defaulting to first in playlist ${u} clamped to ${c}`),c}get forcedAutoLevel(){return this.nextAutoLevelKey?-1:this._nextAutoLevel}get nextAutoLevel(){const e=this.forcedAutoLevel,n=this.bwEstimator.canEstimate(),s=this.lastLoadedFragLevel>-1;if(e!==-1&&(!n||!s||this.nextAutoLevelKey===this.getAutoLevelKey()))return e;const o=n&&s?this.getNextABRAutoLevel():this.firstAutoLevel;if(e!==-1){const u=this.hls.levels;if(u.length>Math.max(e,o)&&u[e].loadError<=u[o].loadError)return e}return this._nextAutoLevel=o,this.nextAutoLevelKey=this.getAutoLevelKey(),o}getAutoLevelKey(){return`${this.getBwEstimate()}_${this.getStarvationDelay().toFixed(2)}`}getNextABRAutoLevel(){const{fragCurrent:e,partCurrent:t,hls:n}=this,{maxAutoLevel:s,config:o,minAutoLevel:u}=n,c=t?t.duration:e?e.duration:0,h=this.getBwEstimate(),m=this.getStarvationDelay();let y=o.abrBandWidthFactor,E=o.abrBandWidthUpFactor;if(m){const M=this.findBestLevel(h,u,s,m,0,y,E);if(M>=0)return M}let T=c?Math.min(c,o.maxStarvationDelay):o.maxStarvationDelay;if(!m){const M=this.bitrateTestDelay;M&&(T=(c?Math.min(c,o.maxLoadingDelay):o.maxLoadingDelay)-M,Fe.info(`[abr] bitrate test took ${Math.round(1e3*M)}ms, set first fragment max fetchDuration to ${Math.round(1e3*T)} ms`),y=E=1)}const R=this.findBestLevel(h,u,s,m,T,y,E);if(Fe.info(`[abr] ${m?"rebuffering expected":"buffer is empty"}, optimal quality level ${R}`),R>-1)return R;const _=n.levels[u],L=n.levels[n.loadLevel];return(_==null?void 0:_.bitrate)<(L==null?void 0:L.bitrate)?u:n.loadLevel}getStarvationDelay(){const e=this.hls,t=e.media;if(!t)return 1/0;const n=t&&t.playbackRate!==0?Math.abs(t.playbackRate):1,s=e.mainForwardBufferInfo;return(s?s.len:0)/n}getBwEstimate(){return this.bwEstimator.canEstimate()?this.bwEstimator.getEstimate():this.hls.config.abrEwmaDefaultEstimate}findBestLevel(e,t,n,s,o,u,c){var h;const m=s+o,y=this.lastLoadedFragLevel,E=y===-1?this.hls.firstLevel:y,{fragCurrent:T,partCurrent:R}=this,{levels:_,allAudioTracks:L,loadLevel:M,config:F}=this.hls;if(_.length===1)return 0;const Z=_[E],K=!!(Z!=null&&(h=Z.details)!=null&&h.live),Y=M===-1||y===-1;let X,ue="SDR",ie=(Z==null?void 0:Z.frameRate)||0;const{audioPreference:ye,videoPreference:de}=F,Re=this.audioTracksByGroup||(this.audioTracksByGroup=r$(L));if(Y){if(this.firstSelection!==-1)return this.firstSelection;const et=this.codecTiers||(this.codecTiers=i$(_,Re,t,n)),Pe=n$(et,ue,e,ye,de),{codecSet:ne,videoRanges:_e,minFramerate:Ue,minBitrate:He,preferHDR:Be}=Pe;X=ne,ue=Be?_e[_e.length-1]:_e[0],ie=Ue,e=Math.max(e,He),Fe.log(`[abr] picked start tier ${JSON.stringify(Pe)}`)}else X=Z==null?void 0:Z.codecSet,ue=Z==null?void 0:Z.videoRange;const Ce=R?R.duration:T?T.duration:0,Ve=this.bwEstimator.getEstimateTTFB()/1e3,ze=[];for(let et=n;et>=t;et--){var Qe;const Pe=_[et],ne=et>E;if(!Pe)continue;if(F.useMediaCapabilities&&!Pe.supportedResult&&!Pe.supportedPromise){const Et=navigator.mediaCapabilities;typeof(Et==null?void 0:Et.decodingInfo)=="function"&&Q3(Pe,Re,ue,ie,e,ye)?(Pe.supportedPromise=J3(Pe,Re,Et),Pe.supportedPromise.then(gt=>{if(!this.hls)return;Pe.supportedResult=gt;const Ot=this.hls.levels,Dt=Ot.indexOf(Pe);gt.error?Fe.warn(`[abr] MediaCapabilities decodingInfo error: "${gt.error}" for level ${Dt} ${JSON.stringify(gt)}`):gt.supported||(Fe.warn(`[abr] Unsupported MediaCapabilities decodingInfo result for level ${Dt} ${JSON.stringify(gt)}`),Dt>-1&&Ot.length>1&&(Fe.log(`[abr] Removing unsupported level ${Dt}`),this.hls.removeLevel(Dt)))})):Pe.supportedResult=pA}if(X&&Pe.codecSet!==X||ue&&Pe.videoRange!==ue||ne&&ie>Pe.frameRate||!ne&&ie>0&&ie<Pe.frameRate||Pe.supportedResult&&!((Qe=Pe.supportedResult.decodingInfoResults)!=null&&Qe[0].smooth)){ze.push(et);continue}const _e=Pe.details,Ue=(R?_e==null?void 0:_e.partTarget:_e==null?void 0:_e.averagetargetduration)||Ce;let He;ne?He=c*e:He=u*e;const Be=Ce&&s>=Ce*2&&o===0?_[et].averageBitrate:_[et].maxBitrate,Je=this.getTimeToLoadFrag(Ve,He,Be*Ue,_e===void 0);if(He>=Be&&(et===y||Pe.loadError===0&&Pe.fragmentError===0)&&(Je<=Ve||!Bt(Je)||K&&!this.bitrateTestDelay||Je<m)){const Et=this.forcedAutoLevel;return et!==M&&(Et===-1||Et!==M)&&(ze.length&&Fe.trace(`[abr] Skipped level(s) ${ze.join(",")} of ${n} max with CODECS and VIDEO-RANGE:"${_[ze[0]].codecs}" ${_[ze[0]].videoRange}; not compatible with "${Z.codecs}" ${ue}`),Fe.info(`[abr] switch candidate:${E}->${et} adjustedbw(${Math.round(He)})-bitrate=${Math.round(He-Be)} ttfb:${Ve.toFixed(1)} avgDuration:${Ue.toFixed(1)} maxFetchDuration:${m.toFixed(1)} fetchDuration:${Je.toFixed(1)} firstSelection:${Y} codecSet:${X} videoRange:${ue} hls.loadLevel:${M}`)),Y&&(this.firstSelection=et),et}}return-1}set nextAutoLevel(e){const{maxAutoLevel:t,minAutoLevel:n}=this.hls,s=Math.min(Math.max(e,n),t);this._nextAutoLevel!==s&&(this.nextAutoLevelKey="",this._nextAutoLevel=s)}}class l${constructor(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}destroy(){this.onHandlerDestroying(),this.onHandlerDestroyed()}onHandlerDestroying(){this.clearNextTick(),this.clearInterval()}onHandlerDestroyed(){}hasInterval(){return!!this._tickInterval}hasNextTick(){return!!this._tickTimer}setInterval(e){return this._tickInterval?!1:(this._tickCallCount=0,this._tickInterval=self.setInterval(this._boundTick,e),!0)}clearInterval(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1}clearNextTick(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1}tick(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)}tickImmediate(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)}doTick(){}}var Yi={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"};class u${constructor(e){this.activePartLists=Object.create(null),this.endListFragments=Object.create(null),this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hasGaps=!1,this.hls=e,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(V.BUFFER_APPENDED,this.onBufferAppended,this),e.on(V.FRAG_BUFFERED,this.onFragBuffered,this),e.on(V.FRAG_LOADED,this.onFragLoaded,this)}_unregisterListeners(){const{hls:e}=this;e.off(V.BUFFER_APPENDED,this.onBufferAppended,this),e.off(V.FRAG_BUFFERED,this.onFragBuffered,this),e.off(V.FRAG_LOADED,this.onFragLoaded,this)}destroy(){this._unregisterListeners(),this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null}getAppendedFrag(e,t){const n=this.activePartLists[t];if(n)for(let s=n.length;s--;){const o=n[s];if(!o)break;const u=o.end;if(o.start<=e&&u!==null&&e<=u)return o}return this.getBufferedFrag(e,t)}getBufferedFrag(e,t){const{fragments:n}=this,s=Object.keys(n);for(let o=s.length;o--;){const u=n[s[o]];if((u==null?void 0:u.body.type)===t&&u.buffered){const c=u.body;if(c.start<=e&&e<=c.end)return c}}return null}detectEvictedFragments(e,t,n,s){this.timeRanges&&(this.timeRanges[e]=t);const o=(s==null?void 0:s.fragment.sn)||-1;Object.keys(this.fragments).forEach(u=>{const c=this.fragments[u];if(!c||o>=c.body.sn)return;if(!c.buffered&&!c.loaded){c.body.type===n&&this.removeFragment(c.body);return}const h=c.range[e];h&&h.time.some(m=>{const y=!this.isTimeBuffered(m.startPTS,m.endPTS,t);return y&&this.removeFragment(c.body),y})})}detectPartialFragments(e){const t=this.timeRanges,{frag:n,part:s}=e;if(!t||n.sn==="initSegment")return;const o=Nd(n),u=this.fragments[o];if(!u||u.buffered&&n.gap)return;const c=!n.relurl;Object.keys(t).forEach(h=>{const m=n.elementaryStreams[h];if(!m)return;const y=t[h],E=c||m.partial===!0;u.range[h]=this.getBufferedTimes(n,s,E,y)}),u.loaded=null,Object.keys(u.range).length?(u.buffered=!0,(u.body.endList=n.endList||u.body.endList)&&(this.endListFragments[u.body.type]=u),Jg(u)||this.removeParts(n.sn-1,n.type)):this.removeFragment(u.body)}removeParts(e,t){const n=this.activePartLists[t];n&&(this.activePartLists[t]=n.filter(s=>s.fragment.sn>=e))}fragBuffered(e,t){const n=Nd(e);let s=this.fragments[n];!s&&t&&(s=this.fragments[n]={body:e,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},e.gap&&(this.hasGaps=!0)),s&&(s.loaded=null,s.buffered=!0)}getBufferedTimes(e,t,n,s){const o={time:[],partial:n},u=e.start,c=e.end,h=e.minEndPTS||c,m=e.maxStartPTS||u;for(let y=0;y<s.length;y++){const E=s.start(y)-this.bufferPadding,T=s.end(y)+this.bufferPadding;if(m>=E&&h<=T){o.time.push({startPTS:Math.max(u,s.start(y)),endPTS:Math.min(c,s.end(y))});break}else if(u<T&&c>E){const R=Math.max(u,s.start(y)),_=Math.min(c,s.end(y));_>R&&(o.partial=!0,o.time.push({startPTS:R,endPTS:_}))}else if(c<=E)break}return o}getPartialFragment(e){let t=null,n,s,o,u=0;const{bufferPadding:c,fragments:h}=this;return Object.keys(h).forEach(m=>{const y=h[m];y&&Jg(y)&&(s=y.body.start-c,o=y.body.end+c,e>=s&&e<=o&&(n=Math.min(e-s,o-e),u<=n&&(t=y.body,u=n)))}),t}isEndListAppended(e){const t=this.endListFragments[e];return t!==void 0&&(t.buffered||Jg(t))}getState(e){const t=Nd(e),n=this.fragments[t];return n?n.buffered?Jg(n)?Yi.PARTIAL:Yi.OK:Yi.APPENDING:Yi.NOT_LOADED}isTimeBuffered(e,t,n){let s,o;for(let u=0;u<n.length;u++){if(s=n.start(u)-this.bufferPadding,o=n.end(u)+this.bufferPadding,e>=s&&t<=o)return!0;if(t<=s)return!1}return!1}onFragLoaded(e,t){const{frag:n,part:s}=t;if(n.sn==="initSegment"||n.bitrateTest)return;const o=s?null:t,u=Nd(n);this.fragments[u]={body:n,appendedPTS:null,loaded:o,buffered:!1,range:Object.create(null)}}onBufferAppended(e,t){const{frag:n,part:s,timeRanges:o}=t;if(n.sn==="initSegment")return;const u=n.type;if(s){let c=this.activePartLists[u];c||(this.activePartLists[u]=c=[]),c.push(s)}this.timeRanges=o,Object.keys(o).forEach(c=>{const h=o[c];this.detectEvictedFragments(c,h,u,s)})}onFragBuffered(e,t){this.detectPartialFragments(t)}hasFragment(e){const t=Nd(e);return!!this.fragments[t]}hasParts(e){var t;return!!((t=this.activePartLists[e])!=null&&t.length)}removeFragmentsInRange(e,t,n,s,o){s&&!this.hasGaps||Object.keys(this.fragments).forEach(u=>{const c=this.fragments[u];if(!c)return;const h=c.body;h.type!==n||s&&!h.gap||h.start<t&&h.end>e&&(c.buffered||o)&&this.removeFragment(h)})}removeFragment(e){const t=Nd(e);e.stats.loaded=0,e.clearElementaryStreamInfo();const n=this.activePartLists[e.type];if(n){const s=e.sn;this.activePartLists[e.type]=n.filter(o=>o.fragment.sn!==s)}delete this.fragments[t],e.endList&&delete this.endListFragments[e.type]}removeAllFragments(){this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1}}function Jg(r){var e,t,n;return r.buffered&&(r.body.gap||((e=r.range.video)==null?void 0:e.partial)||((t=r.range.audio)==null?void 0:t.partial)||((n=r.range.audiovideo)==null?void 0:n.partial))}function Nd(r){return`${r.type}_${r.level}_${r.sn}`}const c$={length:0,start:()=>0,end:()=>0};class Dr{static isBuffered(e,t){try{if(e){const n=Dr.getBuffered(e);for(let s=0;s<n.length;s++)if(t>=n.start(s)&&t<=n.end(s))return!0}}catch{}return!1}static bufferInfo(e,t,n){try{if(e){const s=Dr.getBuffered(e),o=[];let u;for(u=0;u<s.length;u++)o.push({start:s.start(u),end:s.end(u)});return this.bufferedInfo(o,t,n)}}catch{}return{len:0,start:t,end:t,nextStart:void 0}}static bufferedInfo(e,t,n){t=Math.max(0,t),e.sort(function(m,y){const E=m.start-y.start;return E||y.end-m.end});let s=[];if(n)for(let m=0;m<e.length;m++){const y=s.length;if(y){const E=s[y-1].end;e[m].start-E<n?e[m].end>E&&(s[y-1].end=e[m].end):s.push(e[m])}else s.push(e[m])}else s=e;let o=0,u,c=t,h=t;for(let m=0;m<s.length;m++){const y=s[m].start,E=s[m].end;if(t+n>=y&&t<E)c=y,h=E,o=h-t;else if(t+n<y){u=y;break}}return{len:o,start:c||0,end:h||0,nextStart:u}}static getBuffered(e){try{return e.buffered}catch(t){return Fe.log("failed to get media.buffered",t),c$}}}class v1{constructor(e,t,n,s=0,o=-1,u=!1){this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=Zg(),this.buffering={audio:Zg(),video:Zg(),audiovideo:Zg()},this.level=e,this.sn=t,this.id=n,this.size=s,this.part=o,this.partial=u}}function Zg(){return{start:0,executeStart:0,executeEnd:0,end:0}}function ev(r,e){for(let n=0,s=r.length;n<s;n++){var t;if(((t=r[n])==null?void 0:t.cc)===e)return r[n]}return null}function f$(r,e,t){return!!(e&&(t.endCC>t.startCC||r&&r.cc<t.startCC))}function d$(r,e){const t=r.fragments,n=e.fragments;if(!n.length||!t.length){Fe.log("No fragments to align");return}const s=ev(t,n[0].cc);if(!s||s&&!s.startPTS){Fe.log("No frag in previous level to align on");return}return s}function vA(r,e){if(r){const t=r.start+e;r.start=r.startPTS=t,r.endPTS=t+r.duration}}function yA(r,e){const t=e.fragments;for(let n=0,s=t.length;n<s;n++)vA(t[n],r);e.fragmentHint&&vA(e.fragmentHint,r),e.alignedSliding=!0}function h$(r,e,t){e&&(p$(r,t,e),!t.alignedSliding&&e&&tv(t,e),!t.alignedSliding&&e&&!t.skippedSegments&&oA(e,t))}function p$(r,e,t){if(f$(r,t,e)){const n=d$(t,e);n&&Bt(n.start)&&(Fe.log(`Adjusting PTS using last level due to CC increase within current level ${e.url}`),yA(n.start,e))}}function tv(r,e){if(!r.hasProgramDateTime||!e.hasProgramDateTime)return;const t=r.fragments,n=e.fragments;if(!t.length||!n.length)return;let s,o;const u=Math.min(e.endCC,r.endCC);e.startCC<u&&r.startCC<u&&(s=ev(n,u),o=ev(t,u)),(!s||!o)&&(s=n[Math.floor(n.length/2)],o=ev(t,s.cc)||t[Math.floor(t.length/2)]);const c=s.programDateTime,h=o.programDateTime;if(!c||!h)return;const m=(h-c)/1e3-(o.start-s.start);yA(m,r)}const SA=Math.pow(2,17);class m${constructor(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}destroy(){this.loader&&(this.loader.destroy(),this.loader=null)}abort(){this.loader&&this.loader.abort()}load(e,t){const n=e.url;if(!n)return Promise.reject(new vu({type:cn.NETWORK_ERROR,details:qe.FRAG_LOAD_ERROR,fatal:!1,frag:e,error:new Error(`Fragment does not have a ${n?"part list":"url"}`),networkDetails:null}));this.abort();const s=this.config,o=s.fLoader,u=s.loader;return new Promise((c,h)=>{if(this.loader&&this.loader.destroy(),e.gap)if(e.tagList.some(R=>R[0]==="GAP")){h(xA(e));return}else e.gap=!1;const m=this.loader=e.loader=o?new o(s):new u(s),y=EA(e),E=dA(s.fragLoadPolicy.default),T={loadPolicy:E,timeout:E.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:e.sn==="initSegment"?1/0:SA};e.stats=m.stats,m.load(y,T,{onSuccess:(R,_,L,M)=>{this.resetLoader(e,m);let F=R.data;L.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(F.slice(0,16)),F=F.slice(16)),c({frag:e,part:null,payload:F,networkDetails:M})},onError:(R,_,L,M)=>{this.resetLoader(e,m),h(new vu({type:cn.NETWORK_ERROR,details:qe.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:qi({url:n,data:void 0},R),error:new Error(`HTTP Error ${R.code} ${R.text}`),networkDetails:L,stats:M}))},onAbort:(R,_,L)=>{this.resetLoader(e,m),h(new vu({type:cn.NETWORK_ERROR,details:qe.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:L,stats:R}))},onTimeout:(R,_,L)=>{this.resetLoader(e,m),h(new vu({type:cn.NETWORK_ERROR,details:qe.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${T.timeout}ms`),networkDetails:L,stats:R}))},onProgress:(R,_,L,M)=>{t&&t({frag:e,part:null,payload:L,networkDetails:M})}})})}loadPart(e,t,n){this.abort();const s=this.config,o=s.fLoader,u=s.loader;return new Promise((c,h)=>{if(this.loader&&this.loader.destroy(),e.gap||t.gap){h(xA(e,t));return}const m=this.loader=e.loader=o?new o(s):new u(s),y=EA(e,t),E=dA(s.fragLoadPolicy.default),T={loadPolicy:E,timeout:E.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:SA};t.stats=m.stats,m.load(y,T,{onSuccess:(R,_,L,M)=>{this.resetLoader(e,m),this.updateStatsFromPart(e,t);const F={frag:e,part:t,payload:R.data,networkDetails:M};n(F),c(F)},onError:(R,_,L,M)=>{this.resetLoader(e,m),h(new vu({type:cn.NETWORK_ERROR,details:qe.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:qi({url:y.url,data:void 0},R),error:new Error(`HTTP Error ${R.code} ${R.text}`),networkDetails:L,stats:M}))},onAbort:(R,_,L)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,m),h(new vu({type:cn.NETWORK_ERROR,details:qe.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:L,stats:R}))},onTimeout:(R,_,L)=>{this.resetLoader(e,m),h(new vu({type:cn.NETWORK_ERROR,details:qe.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${T.timeout}ms`),networkDetails:L,stats:R}))}})})}updateStatsFromPart(e,t){const n=e.stats,s=t.stats,o=s.total;if(n.loaded+=s.loaded,o){const h=Math.round(e.duration/t.duration),m=Math.min(Math.round(n.loaded/o),h),E=(h-m)*Math.round(n.loaded/m);n.total=n.loaded+E}else n.total=Math.max(n.loaded,n.total);const u=n.loading,c=s.loading;u.start?u.first+=c.first-c.start:(u.start=c.start,u.first=c.first),u.end=c.end}resetLoader(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()}}function EA(r,e=null){const t=e||r,n={frag:r,part:e,responseType:"arraybuffer",url:t.url,headers:{},rangeStart:0,rangeEnd:0},s=t.byteRangeStartOffset,o=t.byteRangeEndOffset;if(Bt(s)&&Bt(o)){var u;let c=s,h=o;if(r.sn==="initSegment"&&((u=r.decryptdata)==null?void 0:u.method)==="AES-128"){const m=o-s;m%16&&(h=o+(16-m%16)),s!==0&&(n.resetIV=!0,c=s-16)}n.rangeStart=c,n.rangeEnd=h}return n}function xA(r,e){const t=new Error(`GAP ${r.gap?"tag":"attribute"} found`),n={type:cn.MEDIA_ERROR,details:qe.FRAG_GAP,fatal:!1,frag:r,error:t,networkDetails:null};return e&&(n.part=e),(e||r).stats.aborted=!0,new vu(n)}class vu extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class g${constructor(e,t){this.subtle=void 0,this.aesIV=void 0,this.subtle=e,this.aesIV=t}decrypt(e,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e)}}class v${constructor(e,t){this.subtle=void 0,this.key=void 0,this.subtle=e,this.key=t}expandKey(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])}}function y$(r){const e=r.byteLength,t=e&&new DataView(r.buffer).getUint8(e-1);return t?af(r,0,e-t):r}class S${constructor(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}uint8ArrayToUint32Array_(e){const t=new DataView(e),n=new Uint32Array(4);for(let s=0;s<4;s++)n[s]=t.getUint32(s*4);return n}initTable(){const e=this.sBox,t=this.invSBox,n=this.subMix,s=n[0],o=n[1],u=n[2],c=n[3],h=this.invSubMix,m=h[0],y=h[1],E=h[2],T=h[3],R=new Uint32Array(256);let _=0,L=0,M=0;for(M=0;M<256;M++)M<128?R[M]=M<<1:R[M]=M<<1^283;for(M=0;M<256;M++){let F=L^L<<1^L<<2^L<<3^L<<4;F=F>>>8^F&255^99,e[_]=F,t[F]=_;const Z=R[_],K=R[Z],Y=R[K];let X=R[F]*257^F*16843008;s[_]=X<<24|X>>>8,o[_]=X<<16|X>>>16,u[_]=X<<8|X>>>24,c[_]=X,X=Y*16843009^K*65537^Z*257^_*16843008,m[F]=X<<24|X>>>8,y[F]=X<<16|X>>>16,E[F]=X<<8|X>>>24,T[F]=X,_?(_=Z^R[R[R[Y^Z]]],L^=R[R[L]]):_=L=1}}expandKey(e){const t=this.uint8ArrayToUint32Array_(e);let n=!0,s=0;for(;s<t.length&&n;)n=t[s]===this.key[s],s++;if(n)return;this.key=t;const o=this.keySize=t.length;if(o!==4&&o!==6&&o!==8)throw new Error("Invalid aes key size="+o);const u=this.ksRows=(o+6+1)*4;let c,h;const m=this.keySchedule=new Uint32Array(u),y=this.invKeySchedule=new Uint32Array(u),E=this.sBox,T=this.rcon,R=this.invSubMix,_=R[0],L=R[1],M=R[2],F=R[3];let Z,K;for(c=0;c<u;c++){if(c<o){Z=m[c]=t[c];continue}K=Z,c%o===0?(K=K<<8|K>>>24,K=E[K>>>24]<<24|E[K>>>16&255]<<16|E[K>>>8&255]<<8|E[K&255],K^=T[c/o|0]<<24):o>6&&c%o===4&&(K=E[K>>>24]<<24|E[K>>>16&255]<<16|E[K>>>8&255]<<8|E[K&255]),m[c]=Z=(m[c-o]^K)>>>0}for(h=0;h<u;h++)c=u-h,h&3?K=m[c]:K=m[c-4],h<4||c<=4?y[h]=K:y[h]=_[E[K>>>24]]^L[E[K>>>16&255]]^M[E[K>>>8&255]]^F[E[K&255]],y[h]=y[h]>>>0}networkToHostOrderSwap(e){return e<<24|(e&65280)<<8|(e&16711680)>>8|e>>>24}decrypt(e,t,n){const s=this.keySize+6,o=this.invKeySchedule,u=this.invSBox,c=this.invSubMix,h=c[0],m=c[1],y=c[2],E=c[3],T=this.uint8ArrayToUint32Array_(n);let R=T[0],_=T[1],L=T[2],M=T[3];const F=new Int32Array(e),Z=new Int32Array(F.length);let K,Y,X,ue,ie,ye,de,Re,Ce,Ve,ze,Qe,et,Pe;const ne=this.networkToHostOrderSwap;for(;t<F.length;){for(Ce=ne(F[t]),Ve=ne(F[t+1]),ze=ne(F[t+2]),Qe=ne(F[t+3]),ie=Ce^o[0],ye=Qe^o[1],de=ze^o[2],Re=Ve^o[3],et=4,Pe=1;Pe<s;Pe++)K=h[ie>>>24]^m[ye>>16&255]^y[de>>8&255]^E[Re&255]^o[et],Y=h[ye>>>24]^m[de>>16&255]^y[Re>>8&255]^E[ie&255]^o[et+1],X=h[de>>>24]^m[Re>>16&255]^y[ie>>8&255]^E[ye&255]^o[et+2],ue=h[Re>>>24]^m[ie>>16&255]^y[ye>>8&255]^E[de&255]^o[et+3],ie=K,ye=Y,de=X,Re=ue,et=et+4;K=u[ie>>>24]<<24^u[ye>>16&255]<<16^u[de>>8&255]<<8^u[Re&255]^o[et],Y=u[ye>>>24]<<24^u[de>>16&255]<<16^u[Re>>8&255]<<8^u[ie&255]^o[et+1],X=u[de>>>24]<<24^u[Re>>16&255]<<16^u[ie>>8&255]<<8^u[ye&255]^o[et+2],ue=u[Re>>>24]<<24^u[ie>>16&255]<<16^u[ye>>8&255]<<8^u[de&255]^o[et+3],Z[t]=ne(K^R),Z[t+1]=ne(ue^_),Z[t+2]=ne(X^L),Z[t+3]=ne(Y^M),R=Ce,_=Ve,L=ze,M=Qe,t=t+4}return Z.buffer}}const E$=16;class y1{constructor(e,{removePKCS7Padding:t=!0}={}){if(this.logEnabled=!0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.useSoftware=void 0,this.useSoftware=e.enableSoftwareAES,this.removePKCS7Padding=t,t)try{const n=self.crypto;n&&(this.subtle=n.subtle||n.webkitSubtle)}catch{}this.subtle===null&&(this.useSoftware=!0)}destroy(){this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null}isSync(){return this.useSoftware}flush(){const{currentResult:e,remainderData:t}=this;if(!e||t)return this.reset(),null;const n=new Uint8Array(e);return this.reset(),this.removePKCS7Padding?y$(n):n}reset(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)}decrypt(e,t,n){return this.useSoftware?new Promise((s,o)=>{this.softwareDecrypt(new Uint8Array(e),t,n);const u=this.flush();u?s(u.buffer):o(new Error("[softwareDecrypt] Failed to decrypt data"))}):this.webCryptoDecrypt(new Uint8Array(e),t,n)}softwareDecrypt(e,t,n){const{currentIV:s,currentResult:o,remainderData:u}=this;this.logOnce("JS AES decrypt"),u&&(e=ao(u,e),this.remainderData=null);const c=this.getValidChunk(e);if(!c.length)return null;s&&(n=s);let h=this.softwareDecrypter;h||(h=this.softwareDecrypter=new S$),h.expandKey(t);const m=o;return this.currentResult=h.decrypt(c.buffer,0,n),this.currentIV=af(c,-16).buffer,m||null}webCryptoDecrypt(e,t,n){const s=this.subtle;return(this.key!==t||!this.fastAesKey)&&(this.key=t,this.fastAesKey=new v$(s,t)),this.fastAesKey.expandKey().then(o=>s?(this.logOnce("WebCrypto AES decrypt"),new g$(s,new Uint8Array(n)).decrypt(e.buffer,o)):Promise.reject(new Error("web crypto not initialized"))).catch(o=>(Fe.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${o.name}: ${o.message}`),this.onWebCryptoError(e,t,n)))}onWebCryptoError(e,t,n){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,t,n);const s=this.flush();if(s)return s.buffer;throw new Error("WebCrypto and softwareDecrypt: failed to decrypt data")}getValidChunk(e){let t=e;const n=e.length-e.length%E$;return n!==e.length&&(t=af(e,0,n),this.remainderData=af(e,n)),t}logOnce(e){this.logEnabled&&(Fe.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const x$={toString:function(r){let e="";const t=r.length;for(let n=0;n<t;n++)e+=`[${r.start(n).toFixed(3)}-${r.end(n).toFixed(3)}]`;return e}},ot={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"};class S1 extends l${constructor(e,t,n,s,o){super(),this.hls=void 0,this.fragPrevious=null,this.fragCurrent=null,this.fragmentTracker=void 0,this.transmuxer=null,this._state=ot.STOPPED,this.playlistType=void 0,this.media=null,this.mediaBuffer=null,this.config=void 0,this.bitrateTest=!1,this.lastCurrentTime=0,this.nextLoadPosition=0,this.startPosition=0,this.startTimeOffset=null,this.loadedmetadata=!1,this.retryDate=0,this.levels=null,this.fragmentLoader=void 0,this.keyLoader=void 0,this.levelLastLoaded=null,this.startFragRequested=!1,this.decrypter=void 0,this.initPTS=[],this.onvseeking=null,this.onvended=null,this.logPrefix="",this.log=void 0,this.warn=void 0,this.playlistType=o,this.logPrefix=s,this.log=Fe.log.bind(Fe,`${s}:`),this.warn=Fe.warn.bind(Fe,`${s}:`),this.hls=e,this.fragmentLoader=new m$(e.config),this.keyLoader=n,this.fragmentTracker=t,this.config=e.config,this.decrypter=new y1(e.config),e.on(V.MANIFEST_LOADED,this.onManifestLoaded,this)}doTick(){this.onTickEnd()}onTickEnd(){}startLoad(e){}stopLoad(){this.fragmentLoader.abort(),this.keyLoader.abort(this.playlistType);const e=this.fragCurrent;e!=null&&e.loader&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=ot.STOPPED}_streamEnded(e,t){if(t.live||e.nextStart||!e.end||!this.media)return!1;const n=t.partList;if(n!=null&&n.length){const o=n[n.length-1];return Dr.isBuffered(this.media,o.start+o.duration/2)}const s=t.fragments[t.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(s)}getLevelDetails(){if(this.levels&&this.levelLastLoaded!==null){var e;return(e=this.levelLastLoaded)==null?void 0:e.details}}onMediaAttached(e,t){const n=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),n.addEventListener("seeking",this.onvseeking),n.addEventListener("ended",this.onvended);const s=this.config;this.levels&&s.autoStartLoad&&this.state===ot.STOPPED&&this.startLoad(s.startPosition)}onMediaDetaching(){const e=this.media;e!=null&&e.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),e&&this.onvseeking&&this.onvended&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.keyLoader&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()}onMediaSeeking(){const{config:e,fragCurrent:t,media:n,mediaBuffer:s,state:o}=this,u=n?n.currentTime:0,c=Dr.bufferInfo(s||n,u,e.maxBufferHole);if(this.log(`media seeking to ${Bt(u)?u.toFixed(3):u}, state: ${o}`),this.state===ot.ENDED)this.resetLoadingState();else if(t){const h=e.maxFragLookUpTolerance,m=t.start-h,y=t.start+t.duration+h;if(!c.len||y<c.start||m>c.end){const E=u>y;(u<m||E)&&(E&&t.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),t.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}n&&(this.fragmentTracker.removeFragmentsInRange(u,1/0,this.playlistType,!0),this.lastCurrentTime=u),!this.loadedmetadata&&!c.len&&(this.nextLoadPosition=this.startPosition=u),this.tickImmediate()}onMediaEnded(){this.startPosition=this.lastCurrentTime=0}onManifestLoaded(e,t){this.startTimeOffset=t.startTimeOffset,this.initPTS=[]}onHandlerDestroying(){this.hls.off(V.MANIFEST_LOADED,this.onManifestLoaded,this),this.stopLoad(),super.onHandlerDestroying(),this.hls=null}onHandlerDestroyed(){this.state=ot.STOPPED,this.fragmentLoader&&this.fragmentLoader.destroy(),this.keyLoader&&this.keyLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.keyLoader=this.fragmentLoader=this.fragmentTracker=null,super.onHandlerDestroyed()}loadFragment(e,t,n){this._loadFragForPlayback(e,t,n)}_loadFragForPlayback(e,t,n){const s=o=>{if(this.fragContextChanged(e)){this.warn(`Fragment ${e.sn}${o.part?" p: "+o.part.index:""} of level ${e.level} was dropped during download.`),this.fragmentTracker.removeFragment(e);return}e.stats.chunkCount++,this._handleFragmentLoadProgress(o)};this._doFragLoad(e,t,n,s).then(o=>{if(!o)return;const u=this.state;if(this.fragContextChanged(e)){(u===ot.FRAG_LOADING||!this.fragCurrent&&u===ot.PARSING)&&(this.fragmentTracker.removeFragment(e),this.state=ot.IDLE);return}"payload"in o&&(this.log(`Loaded fragment ${e.sn} of level ${e.level}`),this.hls.trigger(V.FRAG_LOADED,o)),this._handleFragmentLoadComplete(o)}).catch(o=>{this.state===ot.STOPPED||this.state===ot.ERROR||(this.warn(o),this.resetFragmentLoading(e))})}clearTrackerIfNeeded(e){var t;const{fragmentTracker:n}=this;if(n.getState(e)===Yi.APPENDING){const o=e.type,u=this.getFwdBufferInfo(this.mediaBuffer,o),c=Math.max(e.duration,u?u.len:this.config.maxBufferLength);this.reduceMaxBufferLength(c)&&n.removeFragment(e)}else((t=this.mediaBuffer)==null?void 0:t.buffered.length)===0?n.removeAllFragments():n.hasParts(e.type)&&(n.detectPartialFragments({frag:e,part:null,stats:e.stats,id:e.type}),n.getState(e)===Yi.PARTIAL&&n.removeFragment(e))}checkLiveUpdate(e){if(e.updated&&!e.live){const t=e.fragments[e.fragments.length-1];this.fragmentTracker.detectPartialFragments({frag:t,part:null,stats:t.stats,id:t.type})}e.fragments[0]||(e.deltaUpdateFailed=!0)}flushMainBuffer(e,t,n=null){if(!(e-t))return;const s={startOffset:e,endOffset:t,type:n};this.hls.trigger(V.BUFFER_FLUSHING,s)}_loadInitSegment(e,t){this._doFragLoad(e,t).then(n=>{if(!n||this.fragContextChanged(e)||!this.levels)throw new Error("init load aborted");return n}).then(n=>{const{hls:s}=this,{payload:o}=n,u=e.decryptdata;if(o&&o.byteLength>0&&u!=null&&u.key&&u.iv&&u.method==="AES-128"){const c=self.performance.now();return this.decrypter.decrypt(new Uint8Array(o),u.key.buffer,u.iv.buffer).catch(h=>{throw s.trigger(V.ERROR,{type:cn.MEDIA_ERROR,details:qe.FRAG_DECRYPT_ERROR,fatal:!1,error:h,reason:h.message,frag:e}),h}).then(h=>{const m=self.performance.now();return s.trigger(V.FRAG_DECRYPTED,{frag:e,payload:h,stats:{tstart:c,tdecrypt:m}}),n.payload=h,this.completeInitSegmentLoad(n)})}return this.completeInitSegmentLoad(n)}).catch(n=>{this.state===ot.STOPPED||this.state===ot.ERROR||(this.warn(n),this.resetFragmentLoading(e))})}completeInitSegmentLoad(e){const{levels:t}=this;if(!t)throw new Error("init load aborted, missing levels");const n=e.frag.stats;this.state=ot.IDLE,e.frag.data=new Uint8Array(e.payload),n.parsing.start=n.buffering.start=self.performance.now(),n.parsing.end=n.buffering.end=self.performance.now(),this.tick()}fragContextChanged(e){const{fragCurrent:t}=this;return!e||!t||e.sn!==t.sn||e.level!==t.level}fragBufferedComplete(e,t){var n,s,o,u;const c=this.mediaBuffer?this.mediaBuffer:this.media;if(this.log(`Buffered ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.playlistType===ln.MAIN?"level":"track"} ${e.level} (frag:[${((n=e.startPTS)!=null?n:NaN).toFixed(3)}-${((s=e.endPTS)!=null?s:NaN).toFixed(3)}] > buffer:${c?x$.toString(Dr.getBuffered(c)):"(detached)"})`),e.sn!=="initSegment"){var h;if(e.type!==ln.SUBTITLE){const y=e.elementaryStreams;if(!Object.keys(y).some(E=>!!y[E])){this.state=ot.IDLE;return}}const m=(h=this.levels)==null?void 0:h[e.level];m!=null&&m.fragmentError&&(this.log(`Resetting level fragment error count of ${m.fragmentError} on frag buffered`),m.fragmentError=0)}this.state=ot.IDLE,c&&(!this.loadedmetadata&&e.type==ln.MAIN&&c.buffered.length&&((o=this.fragCurrent)==null?void 0:o.sn)===((u=this.fragPrevious)==null?void 0:u.sn)&&(this.loadedmetadata=!0,this.seekToStartPos()),this.tick())}seekToStartPos(){}_handleFragmentLoadComplete(e){const{transmuxer:t}=this;if(!t)return;const{frag:n,part:s,partsLoaded:o}=e,u=!o||o.length===0||o.some(h=>!h),c=new v1(n.level,n.sn,n.stats.chunkCount+1,0,s?s.index:-1,!u);t.flush(c)}_handleFragmentLoadProgress(e){}_doFragLoad(e,t,n=null,s){var o;const u=t==null?void 0:t.details;if(!this.levels||!u)throw new Error(`frag load aborted, missing level${u?"":" detail"}s`);let c=null;if(e.encrypted&&!((o=e.decryptdata)!=null&&o.key)?(this.log(`Loading key for ${e.sn} of [${u.startSN}-${u.endSN}], ${this.logPrefix==="[stream-controller]"?"level":"track"} ${e.level}`),this.state=ot.KEY_LOADING,this.fragCurrent=e,c=this.keyLoader.load(e).then(y=>{if(!this.fragContextChanged(y.frag))return this.hls.trigger(V.KEY_LOADED,y),this.state===ot.KEY_LOADING&&(this.state=ot.IDLE),y}),this.hls.trigger(V.KEY_LOADING,{frag:e}),this.fragCurrent===null&&(c=Promise.reject(new Error("frag load aborted, context changed in KEY_LOADING")))):!e.encrypted&&u.encryptedFragments.length&&this.keyLoader.loadClear(e,u.encryptedFragments),n=Math.max(e.start,n||0),this.config.lowLatencyMode&&e.sn!=="initSegment"){const y=u.partList;if(y&&s){n>e.end&&u.fragmentHint&&(e=u.fragmentHint);const E=this.getNextPart(y,e,n);if(E>-1){const T=y[E];this.log(`Loading part sn: ${e.sn} p: ${T.index} cc: ${e.cc} of playlist [${u.startSN}-${u.endSN}] parts [0-${E}-${y.length-1}] ${this.logPrefix==="[stream-controller]"?"level":"track"}: ${e.level}, target: ${parseFloat(n.toFixed(3))}`),this.nextLoadPosition=T.start+T.duration,this.state=ot.FRAG_LOADING;let R;return c?R=c.then(_=>!_||this.fragContextChanged(_.frag)?null:this.doFragPartsLoad(e,T,t,s)).catch(_=>this.handleFragLoadError(_)):R=this.doFragPartsLoad(e,T,t,s).catch(_=>this.handleFragLoadError(_)),this.hls.trigger(V.FRAG_LOADING,{frag:e,part:T,targetBufferTime:n}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):R}else if(!e.url||this.loadedEndOfParts(y,n))return Promise.resolve(null)}}this.log(`Loading fragment ${e.sn} cc: ${e.cc} ${u?"of ["+u.startSN+"-"+u.endSN+"] ":""}${this.logPrefix==="[stream-controller]"?"level":"track"}: ${e.level}, target: ${parseFloat(n.toFixed(3))}`),Bt(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=ot.FRAG_LOADING;const h=this.config.progressive;let m;return h&&c?m=c.then(y=>!y||this.fragContextChanged(y==null?void 0:y.frag)?null:this.fragmentLoader.load(e,s)).catch(y=>this.handleFragLoadError(y)):m=Promise.all([this.fragmentLoader.load(e,h?s:void 0),c]).then(([y])=>(!h&&y&&s&&s(y),y)).catch(y=>this.handleFragLoadError(y)),this.hls.trigger(V.FRAG_LOADING,{frag:e,targetBufferTime:n}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):m}doFragPartsLoad(e,t,n,s){return new Promise((o,u)=>{var c;const h=[],m=(c=n.details)==null?void 0:c.partList,y=E=>{this.fragmentLoader.loadPart(e,E,s).then(T=>{h[E.index]=T;const R=T.part;this.hls.trigger(V.FRAG_LOADED,T);const _=lA(n,e.sn,E.index+1)||uA(m,e.sn,E.index+1);if(_)y(_);else return o({frag:e,part:R,partsLoaded:h})}).catch(u)};y(t)})}handleFragLoadError(e){if("data"in e){const t=e.data;e.data&&t.details===qe.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(V.ERROR,t)}else this.hls.trigger(V.ERROR,{type:cn.OTHER_ERROR,details:qe.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==ot.PARSING){!this.fragCurrent&&this.state!==ot.STOPPED&&this.state!==ot.ERROR&&(this.state=ot.IDLE);return}const{frag:n,part:s,level:o}=t,u=self.performance.now();n.stats.parsing.end=u,s&&(s.stats.parsing.end=u),this.updateLevelTiming(n,s,o,e.partial)}getCurrentContext(e){const{levels:t,fragCurrent:n}=this,{level:s,sn:o,part:u}=e;if(!(t!=null&&t[s]))return this.warn(`Levels object was unset while buffering fragment ${o} of level ${s}. The current chunk will not be buffered.`),null;const c=t[s],h=u>-1?lA(c,o,u):null,m=h?h.fragment:H3(c,o,n);return m?(n&&n!==m&&(m.stats=n.stats),{frag:m,part:h,level:c}):null}bufferFragmentData(e,t,n,s,o){var u;if(!e||this.state!==ot.PARSING)return;const{data1:c,data2:h}=e;let m=c;if(c&&h&&(m=ao(c,h)),!((u=m)!=null&&u.length))return;const y={type:e.type,frag:t,part:n,chunkMeta:s,parent:t.type,data:m};if(this.hls.trigger(V.BUFFER_APPENDING,y),e.dropped&&e.independent&&!n){if(o)return;this.flushBufferGap(t)}}flushBufferGap(e){const t=this.media;if(!t)return;if(!Dr.isBuffered(t,t.currentTime)){this.flushMainBuffer(0,e.start);return}const n=t.currentTime,s=Dr.bufferInfo(t,n,0),o=e.duration,u=Math.min(this.config.maxFragLookUpTolerance*2,o*.25),c=Math.max(Math.min(e.start-u,s.end-u),n+u);e.start-c>u&&this.flushMainBuffer(c,e.start)}getFwdBufferInfo(e,t){const n=this.getLoadPosition();return Bt(n)?this.getFwdBufferInfoAtPos(e,n,t):null}getFwdBufferInfoAtPos(e,t,n){const{config:{maxBufferHole:s}}=this,o=Dr.bufferInfo(e,t,s);if(o.len===0&&o.nextStart!==void 0){const u=this.fragmentTracker.getBufferedFrag(t,n);if(u&&o.nextStart<u.end)return Dr.bufferInfo(e,t,Math.max(o.nextStart,s))}return o}getMaxBufferLength(e){const{config:t}=this;let n;return e?n=Math.max(8*t.maxBufferSize/e,t.maxBufferLength):n=t.maxBufferLength,Math.min(n,t.maxMaxBufferLength)}reduceMaxBufferLength(e){const t=this.config,n=e||t.maxBufferLength;return t.maxMaxBufferLength>=n?(t.maxMaxBufferLength/=2,this.warn(`Reduce max buffer length to ${t.maxMaxBufferLength}s`),!0):!1}getAppendedFrag(e,t=ln.MAIN){const n=this.fragmentTracker.getAppendedFrag(e,ln.MAIN);return n&&"fragment"in n?n.fragment:n}getNextFragment(e,t){const n=t.fragments,s=n.length;if(!s)return null;const{config:o}=this,u=n[0].start;let c;if(t.live){const h=o.initialLiveManifestSize;if(s<h)return this.warn(`Not enough fragments to start playback (have: ${s}, need: ${h})`),null;(!t.PTSKnown&&!this.startFragRequested&&this.startPosition===-1||e<u)&&(c=this.getInitialLiveFragment(t,n),this.startPosition=this.nextLoadPosition=c?this.hls.liveSyncPosition||c.start:e)}else e<=u&&(c=n[0]);if(!c){const h=o.lowLatencyMode?t.partEnd:t.fragmentEnd;c=this.getFragmentAtPosition(e,h,t)}return this.mapToInitFragWhenRequired(c)}isLoopLoading(e,t){const n=this.fragmentTracker.getState(e);return(n===Yi.OK||n===Yi.PARTIAL&&!!e.gap)&&this.nextLoadPosition>t}getNextFragmentLoopLoading(e,t,n,s,o){const u=e.gap,c=this.getNextFragment(this.nextLoadPosition,t);if(c===null)return c;if(e=c,u&&e&&!e.gap&&n.nextStart){const h=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,n.nextStart,s);if(h!==null&&n.len+h.len>=o)return this.log(`buffer full after gaps in "${s}" playlist starting at sn: ${e.sn}`),null}return e}mapToInitFragWhenRequired(e){return e!=null&&e.initSegment&&!(e!=null&&e.initSegment.data)&&!this.bitrateTest?e.initSegment:e}getNextPart(e,t,n){let s=-1,o=!1,u=!0;for(let c=0,h=e.length;c<h;c++){const m=e[c];if(u=u&&!m.independent,s>-1&&n<m.start)break;const y=m.loaded;y?s=-1:(o||m.independent||u)&&m.fragment===t&&(s=c),o=y}return s}loadedEndOfParts(e,t){const n=e[e.length-1];return n&&t>n.start&&n.loaded}getInitialLiveFragment(e,t){const n=this.fragPrevious;let s=null;if(n){if(e.hasProgramDateTime&&(this.log(`Live playlist, switching playlist, load frag with same PDT: ${n.programDateTime}`),s=W3(t,n.endProgramDateTime,this.config.maxFragLookUpTolerance)),!s){const o=n.sn+1;if(o>=e.startSN&&o<=e.endSN){const u=t[o-e.startSN];n.cc===u.cc&&(s=u,this.log(`Live playlist, switching playlist, load frag with next SN: ${s.sn}`))}s||(s=q3(t,n.cc),s&&this.log(`Live playlist, switching playlist, load frag with same CC: ${s.sn}`))}}else{const o=this.hls.liveSyncPosition;o!==null&&(s=this.getFragmentAtPosition(o,this.bitrateTest?e.fragmentEnd:e.edge,e))}return s}getFragmentAtPosition(e,t,n){const{config:s}=this;let{fragPrevious:o}=this,{fragments:u,endSN:c}=n;const{fragmentHint:h}=n,m=s.maxFragLookUpTolerance,y=n.partList,E=!!(s.lowLatencyMode&&y!=null&&y.length&&h);E&&h&&!this.bitrateTest&&(u=u.concat(h),c=h.sn);let T;if(e<t){const R=e>t-m?0:m;T=Qg(o,u,e,R)}else T=u[u.length-1];if(T){const R=T.sn-n.startSN,_=this.fragmentTracker.getState(T);if((_===Yi.OK||_===Yi.PARTIAL&&T.gap)&&(o=T),o&&T.sn===o.sn&&(!E||y[0].fragment.sn>T.sn)&&o&&T.level===o.level){const M=u[R+1];T.sn<c&&this.fragmentTracker.getState(M)!==Yi.OK?T=M:T=null}}return T}synchronizeToLiveEdge(e){const{config:t,media:n}=this;if(!n)return;const s=this.hls.liveSyncPosition,o=n.currentTime,u=e.fragments[0].start,c=e.edge,h=o>=u-t.maxFragLookUpTolerance&&o<=c;if(s!==null&&n.duration>s&&(o<s||!h)){const m=t.liveMaxLatencyDuration!==void 0?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;(!h&&n.readyState<4||o<c-m)&&(this.loadedmetadata||(this.nextLoadPosition=s),n.readyState&&(this.warn(`Playback: ${o.toFixed(3)} is located too far from the end of live sliding playlist: ${c}, reset currentTime to : ${s.toFixed(3)}`),n.currentTime=s))}}alignPlaylists(e,t,n){const s=e.fragments.length;if(!s)return this.warn("No fragments in live playlist"),0;const o=e.fragments[0].start,u=!t,c=e.alignedSliding&&Bt(o);if(u||!c&&!o){const{fragPrevious:h}=this;h$(h,n,e);const m=e.fragments[0].start;return this.log(`Live playlist sliding: ${m.toFixed(2)} start-sn: ${t?t.startSN:"na"}->${e.startSN} prev-sn: ${h?h.sn:"na"} fragments: ${s}`),m}return o}waitForCdnTuneIn(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,e.partTarget*3)}setStartPosition(e,t){let n=this.startPosition;if(n<t&&(n=-1),n===-1||this.lastCurrentTime===-1){const s=this.startTimeOffset!==null,o=s?this.startTimeOffset:e.startTimeOffset;o!==null&&Bt(o)?(n=t+o,o<0&&(n+=e.totalduration),n=Math.min(Math.max(t,n),t+e.totalduration),this.log(`Start time offset ${o} found in ${s?"multivariant":"media"} playlist, adjust startPosition to ${n}`),this.startPosition=n):e.live?n=this.hls.liveSyncPosition||t:this.startPosition=n=0,this.lastCurrentTime=n}this.nextLoadPosition=n}getLoadPosition(){const{media:e}=this;let t=0;return this.loadedmetadata&&e?t=e.currentTime:this.nextLoadPosition&&(t=this.nextLoadPosition),t}handleFragLoadAborted(e,t){this.transmuxer&&e.sn!=="initSegment"&&e.stats.aborted&&(this.warn(`Fragment ${e.sn}${t?" part "+t.index:""} of level ${e.level} was aborted`),this.resetFragmentLoading(e))}resetFragmentLoading(e){(!this.fragCurrent||!this.fragContextChanged(e)&&this.state!==ot.FRAG_LOADING_WAITING_RETRY)&&(this.state=ot.IDLE)}onFragmentOrKeyLoadError(e,t){if(t.chunkMeta&&!t.frag){const y=this.getCurrentContext(t.chunkMeta);y&&(t.frag=y.frag)}const n=t.frag;if(!n||n.type!==e||!this.levels)return;if(this.fragContextChanged(n)){var s;this.warn(`Frag load error must match current frag to retry ${n.url} > ${(s=this.fragCurrent)==null?void 0:s.url}`);return}const o=t.details===qe.FRAG_GAP;o&&this.fragmentTracker.fragBuffered(n,!0);const u=t.errorAction,{action:c,retryCount:h=0,retryConfig:m}=u||{};if(u&&c===ps.RetryRequest&&m){this.resetStartWhenNotLoaded(this.levelLastLoaded);const y=p1(m,h);this.warn(`Fragment ${n.sn} of ${e} ${n.level} errored with ${t.details}, retrying loading ${h+1}/${m.maxNumRetry} in ${y}ms`),u.resolved=!0,this.retryDate=self.performance.now()+y,this.state=ot.FRAG_LOADING_WAITING_RETRY}else if(m&&u)if(this.resetFragmentErrors(e),h<m.maxNumRetry)!o&&c!==ps.RemoveAlternatePermanently&&(u.resolved=!0);else{Fe.warn(`${t.details} reached or exceeded max retry (${h})`);return}else(u==null?void 0:u.action)===ps.SendAlternateToPenaltyBox?this.state=ot.WAITING_LEVEL:this.state=ot.ERROR;this.tickImmediate()}reduceLengthAndFlushBuffer(e){if(this.state===ot.PARSING||this.state===ot.PARSED){const t=e.parent,n=this.getFwdBufferInfo(this.mediaBuffer,t),s=n&&n.len>.5;s&&this.reduceMaxBufferLength(n.len);const o=!s;return o&&this.warn(`Buffer full error while media.currentTime is not buffered, flush ${t} buffer`),e.frag&&(this.fragmentTracker.removeFragment(e.frag),this.nextLoadPosition=e.frag.start),this.resetLoadingState(),o}return!1}resetFragmentErrors(e){e===ln.AUDIO&&(this.fragCurrent=null),this.loadedmetadata||(this.startFragRequested=!1),this.state!==ot.STOPPED&&(this.state=ot.IDLE)}afterBufferFlushed(e,t,n){if(!e)return;const s=Dr.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,s,n),this.state===ot.ENDED&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state=ot.IDLE}resetStartWhenNotLoaded(e){if(!this.loadedmetadata){this.startFragRequested=!1;const t=e?e.details:null;t!=null&&t.live?(this.startPosition=-1,this.setStartPosition(t,0),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}}resetWhenMissingContext(e){this.warn(`The loading context changed while buffering fragment ${e.sn} of level ${e.level}. This chunk will not be buffered.`),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded(this.levelLastLoaded),this.resetLoadingState()}removeUnbufferedFrags(e=0){this.fragmentTracker.removeFragmentsInRange(e,1/0,this.playlistType,!1,!0)}updateLevelTiming(e,t,n,s){var o;const u=n.details;if(!u){this.warn("level.details undefined");return}if(!Object.keys(e.elementaryStreams).reduce((h,m)=>{const y=e.elementaryStreams[m];if(y){const E=y.endPTS-y.startPTS;if(E<=0)return this.warn(`Could not parse fragment ${e.sn} ${m} duration reliably (${E})`),h||!1;const T=s?0:aA(u,e,y.startPTS,y.endPTS,y.startDTS,y.endDTS);return this.hls.trigger(V.LEVEL_PTS_UPDATED,{details:u,level:n,drift:T,type:m,frag:e,start:y.startPTS,end:y.endPTS}),!0}return h},!1)&&((o=this.transmuxer)==null?void 0:o.error)===null){const h=new Error(`Found no media in fragment ${e.sn} of level ${e.level} resetting transmuxer to fallback to playlist timing`);if(n.fragmentError===0&&(n.fragmentError++,e.gap=!0,this.fragmentTracker.removeFragment(e),this.fragmentTracker.fragBuffered(e,!0)),this.warn(h.message),this.hls.trigger(V.ERROR,{type:cn.MEDIA_ERROR,details:qe.FRAG_PARSING_ERROR,fatal:!1,error:h,frag:e,reason:`Found no media in msn ${e.sn} of level "${n.url}"`}),!this.hls)return;this.resetTransmuxer()}this.state=ot.PARSED,this.hls.trigger(V.FRAG_PARSED,{frag:e,part:t})}resetTransmuxer(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)}recoverWorkerError(e){e.event==="demuxerWorker"&&(this.fragmentTracker.removeAllFragments(),this.resetTransmuxer(),this.resetStartWhenNotLoaded(this.levelLastLoaded),this.resetLoadingState())}set state(e){const t=this._state;t!==e&&(this._state=e,this.log(`${t}->${e}`))}get state(){return this._state}}class bA{constructor(){this.chunks=[],this.dataLength=0}push(e){this.chunks.push(e),this.dataLength+=e.length}flush(){const{chunks:e,dataLength:t}=this;let n;if(e.length)e.length===1?n=e[0]:n=b$(e,t);else return new Uint8Array(0);return this.reset(),n}reset(){this.chunks.length=0,this.dataLength=0}}function b$(r,e){const t=new Uint8Array(e);let n=0;for(let s=0;s<r.length;s++){const o=r[s];t.set(o,n),n+=o.length}return t}function T$(){return typeof __HLS_WORKER_BUNDLE__=="function"}function w$(){const r=new self.Blob([`var exports={};var module={exports:exports};function define(f){f()};define.amd=true;(${__HLS_WORKER_BUNDLE__.toString()})(true);`],{type:"text/javascript"}),e=self.URL.createObjectURL(r);return{worker:new self.Worker(e),objectURL:e}}function C$(r){const e=new self.URL(r,self.location.href).href;return{worker:new self.Worker(e),scriptURL:e}}function Cl(r="",e=9e4){return{type:r,id:-1,pid:-1,inputTimeScale:e,sequenceNumber:-1,samples:[],dropped:0}}class E1{constructor(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}resetInitSegment(e,t,n,s){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}}resetTimeStamp(e){this.initPTS=e,this.resetContiguity()}resetContiguity(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0}canParse(e,t){return!1}appendFrame(e,t,n){}demux(e,t){this.cachedData&&(e=ao(this.cachedData,e),this.cachedData=null);let n=dp(e,0),s=n?n.length:0,o;const u=this._audioTrack,c=this._id3Track,h=n?e1(n):void 0,m=e.length;for((this.basePTS===null||this.frameIndex===0&&Bt(h))&&(this.basePTS=R$(h,t,this.initPTS),this.lastPTS=this.basePTS),this.lastPTS===null&&(this.lastPTS=this.basePTS),n&&n.length>0&&c.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:n,type:Fo.audioId3,duration:Number.POSITIVE_INFINITY});s<m;){if(this.canParse(e,s)){const y=this.appendFrame(u,e,s);y?(this.frameIndex++,this.lastPTS=y.sample.pts,s+=y.length,o=s):s=m}else YB(e,s)?(n=dp(e,s),c.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:n,type:Fo.audioId3,duration:Number.POSITIVE_INFINITY}),s+=n.length,o=s):s++;if(s===m&&o!==m){const y=af(e,o);this.cachedData?this.cachedData=ao(this.cachedData,y):this.cachedData=y}}return{audioTrack:u,videoTrack:Cl(),id3Track:c,textTrack:Cl()}}demuxSampleAes(e,t,n){return Promise.reject(new Error(`[${this}] This demuxer does not support Sample-AES decryption`))}flush(e){const t=this.cachedData;return t&&(this.cachedData=null,this.demux(t,0)),{audioTrack:this._audioTrack,videoTrack:Cl(),id3Track:this._id3Track,textTrack:Cl()}}destroy(){}}const R$=(r,e,t)=>{if(Bt(r))return r*90;const n=t?t.baseTime*9e4/t.timescale:0;return e*9e4+n};function A$(r,e,t,n){let s,o,u,c;const h=navigator.userAgent.toLowerCase(),m=n,y=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];s=((e[t+2]&192)>>>6)+1;const E=(e[t+2]&60)>>>2;if(E>y.length-1){const T=new Error(`invalid ADTS sampling index:${E}`);r.emit(V.ERROR,V.ERROR,{type:cn.MEDIA_ERROR,details:qe.FRAG_PARSING_ERROR,fatal:!0,error:T,reason:T.message});return}return u=(e[t+2]&1)<<2,u|=(e[t+3]&192)>>>6,Fe.log(`manifest codec:${n}, ADTS type:${s}, samplingIndex:${E}`),/firefox/i.test(h)?E>=6?(s=5,c=new Array(4),o=E-3):(s=2,c=new Array(2),o=E):h.indexOf("android")!==-1?(s=2,c=new Array(2),o=E):(s=5,c=new Array(4),n&&(n.indexOf("mp4a.40.29")!==-1||n.indexOf("mp4a.40.5")!==-1)||!n&&E>=6?o=E-3:((n&&n.indexOf("mp4a.40.2")!==-1&&(E>=6&&u===1||/vivaldi/i.test(h))||!n&&u===1)&&(s=2,c=new Array(2)),o=E)),c[0]=s<<3,c[0]|=(E&14)>>1,c[1]|=(E&1)<<7,c[1]|=u<<3,s===5&&(c[1]|=(o&14)>>1,c[2]=(o&1)<<7,c[2]|=8,c[3]=0),{config:c,samplerate:y[E],channelCount:u,codec:"mp4a.40."+s,manifestCodec:m}}function TA(r,e){return r[e]===255&&(r[e+1]&246)===240}function wA(r,e){return r[e+1]&1?7:9}function x1(r,e){return(r[e+3]&3)<<11|r[e+4]<<3|(r[e+5]&224)>>>5}function _$(r,e){return e+5<r.length}function nv(r,e){return e+1<r.length&&TA(r,e)}function L$(r,e){return _$(r,e)&&TA(r,e)&&x1(r,e)<=r.length-e}function k$(r,e){if(nv(r,e)){const t=wA(r,e);if(e+t>=r.length)return!1;const n=x1(r,e);if(n<=t)return!1;const s=e+n;return s===r.length||nv(r,s)}return!1}function CA(r,e,t,n,s){if(!r.samplerate){const o=A$(e,t,n,s);if(!o)return;r.config=o.config,r.samplerate=o.samplerate,r.channelCount=o.channelCount,r.codec=o.codec,r.manifestCodec=o.manifestCodec,Fe.log(`parsed codec:${r.codec}, rate:${o.samplerate}, channels:${o.channelCount}`)}}function RA(r){return 1024*9e4/r}function D$(r,e){const t=wA(r,e);if(e+t<=r.length){const n=x1(r,e)-t;if(n>0)return{headerLength:t,frameLength:n}}}function AA(r,e,t,n,s){const o=RA(r.samplerate),u=n+s*o,c=D$(e,t);let h;if(c){const{frameLength:E,headerLength:T}=c,R=T+E,_=Math.max(0,t+R-e.length);_?(h=new Uint8Array(R-T),h.set(e.subarray(t+T,e.length),0)):h=e.subarray(t+T,t+R);const L={unit:h,pts:u};return _||r.samples.push(L),{sample:L,length:R,missing:_}}const m=e.length-t;return h=new Uint8Array(m),h.set(e.subarray(t,e.length),0),{sample:{unit:h,pts:u},length:m,missing:-1}}let rv=null;const I$=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],P$=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],M$=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],O$=[0,1,1,4];function _A(r,e,t,n,s){if(t+24>e.length)return;const o=LA(e,t);if(o&&t+o.frameLength<=e.length){const u=o.samplesPerFrame*9e4/o.sampleRate,c=n+s*u,h={unit:e.subarray(t,t+o.frameLength),pts:c,dts:c};return r.config=[],r.channelCount=o.channelCount,r.samplerate=o.sampleRate,r.samples.push(h),{sample:h,length:o.frameLength,missing:0}}}function LA(r,e){const t=r[e+1]>>3&3,n=r[e+1]>>1&3,s=r[e+2]>>4&15,o=r[e+2]>>2&3;if(t!==1&&s!==0&&s!==15&&o!==3){const u=r[e+2]>>1&1,c=r[e+3]>>6,h=t===3?3-n:n===3?3:4,m=I$[h*14+s-1]*1e3,E=P$[(t===3?0:t===2?1:2)*3+o],T=c===3?1:2,R=M$[t][n],_=O$[n],L=R*8*_,M=Math.floor(R*m/E+u)*_;if(rv===null){const K=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);rv=K?parseInt(K[1]):0}return!!rv&&rv<=87&&n===2&&m>=224e3&&c===0&&(r[e+3]=r[e+3]|128),{sampleRate:E,channelCount:T,frameLength:M,samplesPerFrame:L}}}function b1(r,e){return r[e]===255&&(r[e+1]&224)===224&&(r[e+1]&6)!==0}function kA(r,e){return e+1<r.length&&b1(r,e)}function F$(r,e){return b1(r,e)&&4<=r.length-e}function DA(r,e){if(e+1<r.length&&b1(r,e)){const n=LA(r,e);let s=4;n!=null&&n.frameLength&&(s=n.frameLength);const o=e+s;return o===r.length||kA(r,o)}return!1}class N$ extends E1{constructor(e,t){super(),this.observer=void 0,this.config=void 0,this.observer=e,this.config=t}resetInitSegment(e,t,n,s){super.resetInitSegment(e,t,n,s),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:t,duration:s,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;const t=dp(e,0);let n=(t==null?void 0:t.length)||0;if(DA(e,n))return!1;for(let s=e.length;n<s;n++)if(k$(e,n))return Fe.log("ADTS sync word found !"),!0;return!1}canParse(e,t){return L$(e,t)}appendFrame(e,t,n){CA(e,this.observer,t,n,e.manifestCodec);const s=AA(e,t,n,this.basePTS,this.frameIndex);if(s&&s.missing===0)return s}}const U$=/\/emsg[-/]ID3/i;class B${constructor(e,t){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=t}resetTimeStamp(){}resetInitSegment(e,t,n,s){const o=this.videoTrack=Cl("video",1),u=this.audioTrack=Cl("audio",1),c=this.txtTrack=Cl("text",1);if(this.id3Track=Cl("id3",1),this.timeOffset=0,!(e!=null&&e.byteLength))return;const h=PR(e);if(h.video){const{id:m,timescale:y,codec:E}=h.video;o.id=m,o.timescale=c.timescale=y,o.codec=E}if(h.audio){const{id:m,timescale:y,codec:E}=h.audio;u.id=m,u.timescale=y,u.codec=E}c.id=LR.text,o.sampleDuration=0,o.duration=u.duration=s}resetContiguity(){this.remainderData=null}static probe(e){return i3(e)}demux(e,t){this.timeOffset=t;let n=e;const s=this.videoTrack,o=this.txtTrack;if(this.config.progressive){this.remainderData&&(n=ao(this.remainderData,e));const c=d3(n);this.remainderData=c.remainder,s.samples=c.valid||new Uint8Array}else s.samples=n;const u=this.extractID3Track(s,t);return o.samples=OR(t,s),{videoTrack:s,audioTrack:this.audioTrack,id3Track:u,textTrack:this.txtTrack}}flush(){const e=this.timeOffset,t=this.videoTrack,n=this.txtTrack;t.samples=this.remainderData||new Uint8Array,this.remainderData=null;const s=this.extractID3Track(t,this.timeOffset);return n.samples=OR(e,t),{videoTrack:t,audioTrack:Cl(),id3Track:s,textTrack:Cl()}}extractID3Track(e,t){const n=this.id3Track;if(e.samples.length){const s=xn(e.samples,["emsg"]);s&&s.forEach(o=>{const u=m3(o);if(U$.test(u.schemeIdUri)){const c=Bt(u.presentationTime)?u.presentationTime/u.timeScale:t+u.presentationTimeDelta/u.timeScale;let h=u.eventDuration===4294967295?Number.POSITIVE_INFINITY:u.eventDuration/u.timeScale;h<=.001&&(h=Number.POSITIVE_INFINITY);const m=u.payload;n.samples.push({data:m,len:m.byteLength,dts:c,pts:c,type:Fo.emsg,duration:h})}})}return n}demuxSampleAes(e,t,n){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))}destroy(){}}const IA=(r,e)=>{let t=0,n=5;e+=n;const s=new Uint32Array(1),o=new Uint32Array(1),u=new Uint8Array(1);for(;n>0;){u[0]=r[e];const c=Math.min(n,8),h=8-c;o[0]=4278190080>>>24+h<<h,s[0]=(u[0]&o[0])>>h,t=t?t<<c|s[0]:s[0],e+=1,n-=c}return t};class $$ extends E1{constructor(e){super(),this.observer=void 0,this.observer=e}resetInitSegment(e,t,n,s){super.resetInitSegment(e,t,n,s),this._audioTrack={container:"audio/ac-3",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"ac3",samples:[],manifestCodec:t,duration:s,inputTimeScale:9e4,dropped:0}}canParse(e,t){return t+64<e.length}appendFrame(e,t,n){const s=PA(e,t,n,this.basePTS,this.frameIndex);if(s!==-1)return{sample:e.samples[e.samples.length-1],length:s,missing:0}}static probe(e){if(!e)return!1;const t=dp(e,0);if(!t)return!1;const n=t.length;return e[n]===11&&e[n+1]===119&&e1(t)!==void 0&&IA(e,n)<16}}function PA(r,e,t,n,s){if(t+8>e.length||e[t]!==11||e[t+1]!==119)return-1;const o=e[t+4]>>6;if(o>=3)return-1;const c=[48e3,44100,32e3][o],h=e[t+4]&63,y=[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][h*3+o]*2;if(t+y>e.length)return-1;const E=e[t+6]>>5;let T=0;E===2?T+=2:(E&1&&E!==1&&(T+=2),E&4&&(T+=2));const R=(e[t+6]<<8|e[t+7])>>12-T&1,L=[2,1,2,3,3,4,4,5][E]+R,M=e[t+5]>>3,F=e[t+5]&7,Z=new Uint8Array([o<<6|M<<1|F>>2,(F&3)<<6|E<<3|R<<2|h>>4,h<<4&224]),K=1536/c*9e4,Y=n+s*K,X=e.subarray(t,t+y);return r.config=Z,r.channelCount=L,r.samplerate=c,r.samples.push({unit:X,pts:Y}),y}class V${constructor(){this.VideoSample=null}createVideoSample(e,t,n,s){return{key:e,frame:!1,pts:t,dts:n,units:[],debug:s,length:0}}getLastNalUnit(e){var t;let n=this.VideoSample,s;if((!n||n.units.length===0)&&(n=e[e.length-1]),(t=n)!=null&&t.units){const o=n.units;s=o[o.length-1]}return s}pushAccessUnit(e,t){if(e.units.length&&e.frame){if(e.pts===void 0){const n=t.samples,s=n.length;if(s){const o=n[s-1];e.pts=o.pts,e.dts=o.dts}else{t.dropped++;return}}t.samples.push(e)}e.debug.length&&Fe.log(e.pts+"/"+e.dts+":"+e.debug)}}class MA{constructor(e){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}loadWord(){const e=this.data,t=this.bytesAvailable,n=e.byteLength-t,s=new Uint8Array(4),o=Math.min(4,t);if(o===0)throw new Error("no bytes available");s.set(e.subarray(n,n+o)),this.word=new DataView(s.buffer).getUint32(0),this.bitsAvailable=o*8,this.bytesAvailable-=o}skipBits(e){let t;e=Math.min(e,this.bytesAvailable*8+this.bitsAvailable),this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,t=e>>3,e-=t<<3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)}readBits(e){let t=Math.min(this.bitsAvailable,e);const n=this.word>>>32-t;if(e>32&&Fe.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0)this.word<<=t;else if(this.bytesAvailable>0)this.loadWord();else throw new Error("no bits available");return t=e-t,t>0&&this.bitsAvailable?n<<t|this.readBits(t):n}skipLZ(){let e;for(e=0;e<this.bitsAvailable;++e)if(this.word&2147483648>>>e)return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}skipUEG(){this.skipBits(1+this.skipLZ())}skipEG(){this.skipBits(1+this.skipLZ())}readUEG(){const e=this.skipLZ();return this.readBits(e+1)-1}readEG(){const e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}readBoolean(){return this.readBits(1)===1}readUByte(){return this.readBits(8)}readUShort(){return this.readBits(16)}readUInt(){return this.readBits(32)}skipScalingList(e){let t=8,n=8,s;for(let o=0;o<e;o++)n!==0&&(s=this.readEG(),n=(t+s+256)%256),t=n===0?t:n}readSPS(){let e=0,t=0,n=0,s=0,o,u,c;const h=this.readUByte.bind(this),m=this.readBits.bind(this),y=this.readUEG.bind(this),E=this.readBoolean.bind(this),T=this.skipBits.bind(this),R=this.skipEG.bind(this),_=this.skipUEG.bind(this),L=this.skipScalingList.bind(this);h();const M=h();if(m(5),T(3),h(),_(),M===100||M===110||M===122||M===244||M===44||M===83||M===86||M===118||M===128){const ue=y();if(ue===3&&T(1),_(),_(),T(1),E())for(u=ue!==3?8:12,c=0;c<u;c++)E()&&(c<6?L(16):L(64))}_();const F=y();if(F===0)y();else if(F===1)for(T(1),R(),R(),o=y(),c=0;c<o;c++)R();_(),T(1);const Z=y(),K=y(),Y=m(1);Y===0&&T(1),T(1),E()&&(e=y(),t=y(),n=y(),s=y());let X=[1,1];if(E()&&E())switch(h()){case 1:X=[1,1];break;case 2:X=[12,11];break;case 3:X=[10,11];break;case 4:X=[16,11];break;case 5:X=[40,33];break;case 6:X=[24,11];break;case 7:X=[20,11];break;case 8:X=[32,11];break;case 9:X=[80,33];break;case 10:X=[18,11];break;case 11:X=[15,11];break;case 12:X=[64,33];break;case 13:X=[160,99];break;case 14:X=[4,3];break;case 15:X=[3,2];break;case 16:X=[2,1];break;case 255:{X=[h()<<8|h(),h()<<8|h()];break}}return{width:Math.ceil((Z+1)*16-e*2-t*2),height:(2-Y)*(K+1)*16-(Y?2:4)*(n+s),pixelRatio:X}}readSliceType(){return this.readUByte(),this.readUEG(),this.readUEG()}}class z$ extends V${parseAVCPES(e,t,n,s,o){const u=this.parseAVCNALu(e,n.data);let c=this.VideoSample,h,m=!1;n.data=null,c&&u.length&&!e.audFound&&(this.pushAccessUnit(c,e),c=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts,"")),u.forEach(y=>{var E;switch(y.type){case 1:{let L=!1;h=!0;const M=y.data;if(m&&M.length>4){const F=new MA(M).readSliceType();(F===2||F===4||F===7||F===9)&&(L=!0)}if(L){var T;(T=c)!=null&&T.frame&&!c.key&&(this.pushAccessUnit(c,e),c=this.VideoSample=null)}c||(c=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts,"")),c.frame=!0,c.key=L;break}case 5:h=!0,(E=c)!=null&&E.frame&&!c.key&&(this.pushAccessUnit(c,e),c=this.VideoSample=null),c||(c=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts,"")),c.key=!0,c.frame=!0;break;case 6:{h=!0,FR(y.data,1,n.pts,t.samples);break}case 7:{var R,_;h=!0,m=!0;const L=y.data,F=new MA(L).readSPS();if(!e.sps||e.width!==F.width||e.height!==F.height||((R=e.pixelRatio)==null?void 0:R[0])!==F.pixelRatio[0]||((_=e.pixelRatio)==null?void 0:_[1])!==F.pixelRatio[1]){e.width=F.width,e.height=F.height,e.pixelRatio=F.pixelRatio,e.sps=[L],e.duration=o;const Z=L.subarray(1,4);let K="avc1.";for(let Y=0;Y<3;Y++){let X=Z[Y].toString(16);X.length<2&&(X="0"+X),K+=X}e.codec=K}break}case 8:h=!0,e.pps=[y.data];break;case 9:h=!0,e.audFound=!0,c&&this.pushAccessUnit(c,e),c=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts,"");break;case 12:h=!0;break;default:h=!1,c&&(c.debug+="unknown NAL "+y.type+" ");break}c&&h&&c.units.push(y)}),s&&c&&(this.pushAccessUnit(c,e),this.VideoSample=null)}parseAVCNALu(e,t){const n=t.byteLength;let s=e.naluState||0;const o=s,u=[];let c=0,h,m,y,E=-1,T=0;for(s===-1&&(E=0,T=t[0]&31,s=0,c=1);c<n;){if(h=t[c++],!s){s=h?0:1;continue}if(s===1){s=h?0:2;continue}if(!h)s=3;else if(h===1){if(m=c-s-1,E>=0){const R={data:t.subarray(E,m),type:T};u.push(R)}else{const R=this.getLastNalUnit(e.samples);R&&(o&&c<=4-o&&R.state&&(R.data=R.data.subarray(0,R.data.byteLength-o)),m>0&&(R.data=ao(R.data,t.subarray(0,m)),R.state=0))}c<n?(y=t[c]&31,E=c,T=y,s=0):s=-1}else s=0}if(E>=0&&s>=0){const R={data:t.subarray(E,n),type:T,state:s};u.push(R)}if(u.length===0){const R=this.getLastNalUnit(e.samples);R&&(R.data=ao(R.data,t))}return e.naluState=s,u}}class j${constructor(e,t,n){this.keyData=void 0,this.decrypter=void 0,this.keyData=n,this.decrypter=new y1(t,{removePKCS7Padding:!1})}decryptBuffer(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer)}decryptAacSample(e,t,n){const s=e[t].unit;if(s.length<=16)return;const o=s.subarray(16,s.length-s.length%16),u=o.buffer.slice(o.byteOffset,o.byteOffset+o.length);this.decryptBuffer(u).then(c=>{const h=new Uint8Array(c);s.set(h,16),this.decrypter.isSync()||this.decryptAacSamples(e,t+1,n)})}decryptAacSamples(e,t,n){for(;;t++){if(t>=e.length){n();return}if(!(e[t].unit.length<32)&&(this.decryptAacSample(e,t,n),!this.decrypter.isSync()))return}}getAvcEncryptedData(e){const t=Math.floor((e.length-48)/160)*16+16,n=new Int8Array(t);let s=0;for(let o=32;o<e.length-16;o+=160,s+=16)n.set(e.subarray(o,o+16),s);return n}getAvcDecryptedUnit(e,t){const n=new Uint8Array(t);let s=0;for(let o=32;o<e.length-16;o+=160,s+=16)e.set(n.subarray(s,s+16),o);return e}decryptAvcSample(e,t,n,s,o){const u=NR(o.data),c=this.getAvcEncryptedData(u);this.decryptBuffer(c.buffer).then(h=>{o.data=this.getAvcDecryptedUnit(u,h),this.decrypter.isSync()||this.decryptAvcSamples(e,t,n+1,s)})}decryptAvcSamples(e,t,n,s){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,n=0){if(t>=e.length){s();return}const o=e[t].units;for(;!(n>=o.length);n++){const u=o[n];if(!(u.data.length<=48||u.type!==1&&u.type!==5)&&(this.decryptAvcSample(e,t,n,s,u),!this.decrypter.isSync()))return}}}}const Xi=188;class vc{constructor(e,t,n){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this._pmtId=-1,this._videoTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.remainderData=null,this.videoParser=void 0,this.observer=e,this.config=t,this.typeSupported=n,this.videoParser=new z$}static probe(e){const t=vc.syncOffset(e);return t>0&&Fe.warn(`MPEG2-TS detected but first sync word found @ offset ${t}`),t!==-1}static syncOffset(e){const t=e.length;let n=Math.min(Xi*5,t-Xi)+1,s=0;for(;s<n;){let o=!1,u=-1,c=0;for(let h=s;h<t;h+=Xi)if(e[h]===71&&(t-h===Xi||e[h+Xi]===71)){if(c++,u===-1&&(u=h,u!==0&&(n=Math.min(u+Xi*99,e.length-Xi)+1)),o||(o=T1(e,h)===0),o&&c>1&&(u===0&&c>2||h+Xi>n))return u}else{if(c)return-1;break}s++}return-1}static createTrack(e,t){return{container:e==="video"||e==="audio"?"video/mp2t":void 0,type:e,id:LR[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:e==="audio"?t:void 0}}resetInitSegment(e,t,n,s){this.pmtParsed=!1,this._pmtId=-1,this._videoTrack=vc.createTrack("video"),this._audioTrack=vc.createTrack("audio",s),this._id3Track=vc.createTrack("id3"),this._txtTrack=vc.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.remainderData=null,this.audioCodec=t,this.videoCodec=n,this._duration=s}resetTimeStamp(){}resetContiguity(){const{_audioTrack:e,_videoTrack:t,_id3Track:n}=this;e&&(e.pesData=null),t&&(t.pesData=null),n&&(n.pesData=null),this.aacOverFlow=null,this.remainderData=null}demux(e,t,n=!1,s=!1){n||(this.sampleAes=null);let o;const u=this._videoTrack,c=this._audioTrack,h=this._id3Track,m=this._txtTrack;let y=u.pid,E=u.pesData,T=c.pid,R=h.pid,_=c.pesData,L=h.pesData,M=null,F=this.pmtParsed,Z=this._pmtId,K=e.length;if(this.remainderData&&(e=ao(this.remainderData,e),K=e.length,this.remainderData=null),K<Xi&&!s)return this.remainderData=e,{audioTrack:c,videoTrack:u,id3Track:h,textTrack:m};const Y=Math.max(0,vc.syncOffset(e));K-=(K-Y)%Xi,K<e.byteLength&&!s&&(this.remainderData=new Uint8Array(e.buffer,K,e.buffer.byteLength-K));let X=0;for(let ie=Y;ie<K;ie+=Xi)if(e[ie]===71){const ye=!!(e[ie+1]&64),de=T1(e,ie),Re=(e[ie+3]&48)>>4;let Ce;if(Re>1){if(Ce=ie+5+e[ie+4],Ce===ie+Xi)continue}else Ce=ie+4;switch(de){case y:ye&&(E&&(o=Ud(E))&&this.videoParser.parseAVCPES(u,m,o,!1,this._duration),E={data:[],size:0}),E&&(E.data.push(e.subarray(Ce,ie+Xi)),E.size+=ie+Xi-Ce);break;case T:if(ye){if(_&&(o=Ud(_)))switch(c.segmentCodec){case"aac":this.parseAACPES(c,o);break;case"mp3":this.parseMPEGPES(c,o);break;case"ac3":this.parseAC3PES(c,o);break}_={data:[],size:0}}_&&(_.data.push(e.subarray(Ce,ie+Xi)),_.size+=ie+Xi-Ce);break;case R:ye&&(L&&(o=Ud(L))&&this.parseID3PES(h,o),L={data:[],size:0}),L&&(L.data.push(e.subarray(Ce,ie+Xi)),L.size+=ie+Xi-Ce);break;case 0:ye&&(Ce+=e[Ce]+1),Z=this._pmtId=H$(e,Ce);break;case Z:{ye&&(Ce+=e[Ce]+1);const Ve=G$(e,Ce,this.typeSupported,n);y=Ve.videoPid,y>0&&(u.pid=y,u.segmentCodec=Ve.segmentVideoCodec),T=Ve.audioPid,T>0&&(c.pid=T,c.segmentCodec=Ve.segmentAudioCodec),R=Ve.id3Pid,R>0&&(h.pid=R),M!==null&&!F&&(Fe.warn(`MPEG-TS PMT found at ${ie} after unknown PID '${M}'. Backtracking to sync byte @${Y} to parse all TS packets.`),M=null,ie=Y-188),F=this.pmtParsed=!0;break}case 17:case 8191:break;default:M=de;break}}else X++;if(X>0){const ie=new Error(`Found ${X} TS packet/s that do not start with 0x47`);this.observer.emit(V.ERROR,V.ERROR,{type:cn.MEDIA_ERROR,details:qe.FRAG_PARSING_ERROR,fatal:!1,error:ie,reason:ie.message})}u.pesData=E,c.pesData=_,h.pesData=L;const ue={audioTrack:c,videoTrack:u,id3Track:h,textTrack:m};return s&&this.extractRemainingSamples(ue),ue}flush(){const{remainderData:e}=this;this.remainderData=null;let t;return e?t=this.demux(e,-1,!1,!0):t={videoTrack:this._videoTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(t),this.sampleAes?this.decrypt(t,this.sampleAes):t}extractRemainingSamples(e){const{audioTrack:t,videoTrack:n,id3Track:s,textTrack:o}=e,u=n.pesData,c=t.pesData,h=s.pesData;let m;if(u&&(m=Ud(u))?(this.videoParser.parseAVCPES(n,o,m,!0,this._duration),n.pesData=null):n.pesData=u,c&&(m=Ud(c))){switch(t.segmentCodec){case"aac":this.parseAACPES(t,m);break;case"mp3":this.parseMPEGPES(t,m);break;case"ac3":this.parseAC3PES(t,m);break}t.pesData=null}else c!=null&&c.size&&Fe.log("last AAC PES packet truncated,might overlap between fragments"),t.pesData=c;h&&(m=Ud(h))?(this.parseID3PES(s,m),s.pesData=null):s.pesData=h}demuxSampleAes(e,t,n){const s=this.demux(e,n,!0,!this.config.progressive),o=this.sampleAes=new j$(this.observer,this.config,t);return this.decrypt(s,o)}decrypt(e,t){return new Promise(n=>{const{audioTrack:s,videoTrack:o}=e;s.samples&&s.segmentCodec==="aac"?t.decryptAacSamples(s.samples,0,()=>{o.samples?t.decryptAvcSamples(o.samples,0,0,()=>{n(e)}):n(e)}):o.samples&&t.decryptAvcSamples(o.samples,0,0,()=>{n(e)})})}destroy(){this._duration=0}parseAACPES(e,t){let n=0;const s=this.aacOverFlow;let o=t.data;if(s){this.aacOverFlow=null;const E=s.missing,T=s.sample.unit.byteLength;if(E===-1)o=ao(s.sample.unit,o);else{const R=T-E;s.sample.unit.set(o.subarray(0,E),R),e.samples.push(s.sample),n=s.missing}}let u,c;for(u=n,c=o.length;u<c-1&&!nv(o,u);u++);if(u!==n){let E;const T=u<c-1;T?E=`AAC PES did not start with ADTS header,offset:${u}`:E="No ADTS header found in AAC PES";const R=new Error(E);if(Fe.warn(`parsing error: ${E}`),this.observer.emit(V.ERROR,V.ERROR,{type:cn.MEDIA_ERROR,details:qe.FRAG_PARSING_ERROR,fatal:!1,levelRetry:T,error:R,reason:E}),!T)return}CA(e,this.observer,o,u,this.audioCodec);let h;if(t.pts!==void 0)h=t.pts;else if(s){const E=RA(e.samplerate);h=s.sample.pts+E}else{Fe.warn("[tsdemuxer]: AAC PES unknown PTS");return}let m=0,y;for(;u<c;)if(y=AA(e,o,u,h,m),u+=y.length,y.missing){this.aacOverFlow=y;break}else for(m++;u<c-1&&!nv(o,u);u++);}parseMPEGPES(e,t){const n=t.data,s=n.length;let o=0,u=0;const c=t.pts;if(c===void 0){Fe.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;u<s;)if(kA(n,u)){const h=_A(e,n,u,c,o);if(h)u+=h.length,o++;else break}else u++}parseAC3PES(e,t){{const n=t.data,s=t.pts;if(s===void 0){Fe.warn("[tsdemuxer]: AC3 PES unknown PTS");return}const o=n.length;let u=0,c=0,h;for(;c<o&&(h=PA(e,n,c,s,u++))>0;)c+=h}}parseID3PES(e,t){if(t.pts===void 0){Fe.warn("[tsdemuxer]: ID3 PES unknown PTS");return}const n=Ii({},t,{type:this._videoTrack?Fo.emsg:Fo.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(n)}}function T1(r,e){return((r[e+1]&31)<<8)+r[e+2]}function H$(r,e){return(r[e+10]&31)<<8|r[e+11]}function G$(r,e,t,n){const s={audioPid:-1,videoPid:-1,id3Pid:-1,segmentVideoCodec:"avc",segmentAudioCodec:"aac"},o=(r[e+1]&15)<<8|r[e+2],u=e+3+o-4,c=(r[e+10]&15)<<8|r[e+11];for(e+=12+c;e<u;){const h=T1(r,e),m=(r[e+3]&15)<<8|r[e+4];switch(r[e]){case 207:if(!n){w1("ADTS AAC");break}case 15:s.audioPid===-1&&(s.audioPid=h);break;case 21:s.id3Pid===-1&&(s.id3Pid=h);break;case 219:if(!n){w1("H.264");break}case 27:s.videoPid===-1&&(s.videoPid=h,s.segmentVideoCodec="avc");break;case 3:case 4:!t.mpeg&&!t.mp3?Fe.log("MPEG audio found, not supported in this browser"):s.audioPid===-1&&(s.audioPid=h,s.segmentAudioCodec="mp3");break;case 193:if(!n){w1("AC-3");break}case 129:t.ac3?s.audioPid===-1&&(s.audioPid=h,s.segmentAudioCodec="ac3"):Fe.log("AC-3 audio found, not supported in this browser");break;case 6:if(s.audioPid===-1&&m>0){let y=e+5,E=m;for(;E>2;){switch(r[y]){case 106:t.ac3!==!0?Fe.log("AC-3 audio found, not supported in this browser for now"):(s.audioPid=h,s.segmentAudioCodec="ac3");break}const R=r[y+1]+2;y+=R,E-=R}}break;case 194:case 135:Fe.warn("Unsupported EC-3 in M2TS found");break;case 36:Fe.warn("Unsupported HEVC in M2TS found");break}e+=m+5}return s}function w1(r){Fe.log(`${r} with AES-128-CBC encryption found in unencrypted stream`)}function Ud(r){let e=0,t,n,s,o,u;const c=r.data;if(!r||r.size===0)return null;for(;c[0].length<19&&c.length>1;)c[0]=ao(c[0],c[1]),c.splice(1,1);if(t=c[0],(t[0]<<16)+(t[1]<<8)+t[2]===1){if(n=(t[4]<<8)+t[5],n&&n>r.size-6)return null;const m=t[7];m&192&&(o=(t[9]&14)*536870912+(t[10]&255)*4194304+(t[11]&254)*16384+(t[12]&255)*128+(t[13]&254)/2,m&64?(u=(t[14]&14)*536870912+(t[15]&255)*4194304+(t[16]&254)*16384+(t[17]&255)*128+(t[18]&254)/2,o-u>60*9e4&&(Fe.warn(`${Math.round((o-u)/9e4)}s delta between PTS and DTS, align them`),o=u)):u=o),s=t[8];let y=s+9;if(r.size<=y)return null;r.size-=y;const E=new Uint8Array(r.size);for(let T=0,R=c.length;T<R;T++){t=c[T];let _=t.byteLength;if(y)if(y>_){y-=_;continue}else t=t.subarray(y),_-=y,y=0;E.set(t,e),e+=_}return n&&(n-=s+3),{data:E,pts:o,dts:u,len:n}}return null}class W$ extends E1{resetInitSegment(e,t,n,s){super.resetInitSegment(e,t,n,s),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:t,duration:s,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;const t=dp(e,0);let n=(t==null?void 0:t.length)||0;if(t&&e[n]===11&&e[n+1]===119&&e1(t)!==void 0&&IA(e,n)<=16)return!1;for(let s=e.length;n<s;n++)if(DA(e,n))return Fe.log("MPEG Audio sync word found !"),!0;return!1}canParse(e,t){return F$(e,t)}appendFrame(e,t,n){if(this.basePTS!==null)return _A(e,t,n,this.basePTS,this.frameIndex)}}class OA{static getSilentFrame(e,t){switch(e){case"mp4a.40.2":if(t===1)return new Uint8Array([0,200,0,128,35,128]);if(t===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(t===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(t===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(t===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(t===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(t===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(t===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(t===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}}}const yc=Math.pow(2,32)-1;class je{static init(){je.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],dac3:[],"ac-3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};let e;for(e in je.types)je.types.hasOwnProperty(e)&&(je.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);const t=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),n=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);je.HDLR_TYPES={video:t,audio:n};const s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),o=new Uint8Array([0,0,0,0,0,0,0,0]);je.STTS=je.STSC=je.STCO=o,je.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),je.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),je.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),je.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);const u=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),h=new Uint8Array([0,0,0,1]);je.FTYP=je.box(je.types.ftyp,u,h,u,c),je.DINF=je.box(je.types.dinf,je.box(je.types.dref,s))}static box(e,...t){let n=8,s=t.length;const o=s;for(;s--;)n+=t[s].byteLength;const u=new Uint8Array(n);for(u[0]=n>>24&255,u[1]=n>>16&255,u[2]=n>>8&255,u[3]=n&255,u.set(e,4),s=0,n=8;s<o;s++)u.set(t[s],n),n+=t[s].byteLength;return u}static hdlr(e){return je.box(je.types.hdlr,je.HDLR_TYPES[e])}static mdat(e){return je.box(je.types.mdat,e)}static mdhd(e,t){t*=e;const n=Math.floor(t/(yc+1)),s=Math.floor(t%(yc+1));return je.box(je.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,n>>24,n>>16&255,n>>8&255,n&255,s>>24,s>>16&255,s>>8&255,s&255,85,196,0,0]))}static mdia(e){return je.box(je.types.mdia,je.mdhd(e.timescale,e.duration),je.hdlr(e.type),je.minf(e))}static mfhd(e){return je.box(je.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,e&255]))}static minf(e){return e.type==="audio"?je.box(je.types.minf,je.box(je.types.smhd,je.SMHD),je.DINF,je.stbl(e)):je.box(je.types.minf,je.box(je.types.vmhd,je.VMHD),je.DINF,je.stbl(e))}static moof(e,t,n){return je.box(je.types.moof,je.mfhd(e),je.traf(n,t))}static moov(e){let t=e.length;const n=[];for(;t--;)n[t]=je.trak(e[t]);return je.box.apply(null,[je.types.moov,je.mvhd(e[0].timescale,e[0].duration)].concat(n).concat(je.mvex(e)))}static mvex(e){let t=e.length;const n=[];for(;t--;)n[t]=je.trex(e[t]);return je.box.apply(null,[je.types.mvex,...n])}static mvhd(e,t){t*=e;const n=Math.floor(t/(yc+1)),s=Math.floor(t%(yc+1)),o=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,n>>24,n>>16&255,n>>8&255,n&255,s>>24,s>>16&255,s>>8&255,s&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return je.box(je.types.mvhd,o)}static sdtp(e){const t=e.samples||[],n=new Uint8Array(4+t.length);let s,o;for(s=0;s<t.length;s++)o=t[s].flags,n[s+4]=o.dependsOn<<4|o.isDependedOn<<2|o.hasRedundancy;return je.box(je.types.sdtp,n)}static stbl(e){return je.box(je.types.stbl,je.stsd(e),je.box(je.types.stts,je.STTS),je.box(je.types.stsc,je.STSC),je.box(je.types.stsz,je.STSZ),je.box(je.types.stco,je.STCO))}static avc1(e){let t=[],n=[],s,o,u;for(s=0;s<e.sps.length;s++)o=e.sps[s],u=o.byteLength,t.push(u>>>8&255),t.push(u&255),t=t.concat(Array.prototype.slice.call(o));for(s=0;s<e.pps.length;s++)o=e.pps[s],u=o.byteLength,n.push(u>>>8&255),n.push(u&255),n=n.concat(Array.prototype.slice.call(o));const c=je.box(je.types.avcC,new Uint8Array([1,t[3],t[4],t[5],255,224|e.sps.length].concat(t).concat([e.pps.length]).concat(n))),h=e.width,m=e.height,y=e.pixelRatio[0],E=e.pixelRatio[1];return je.box(je.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,h>>8&255,h&255,m>>8&255,m&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),c,je.box(je.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),je.box(je.types.pasp,new Uint8Array([y>>24,y>>16&255,y>>8&255,y&255,E>>24,E>>16&255,E>>8&255,E&255])))}static esds(e){const t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))}static audioStsd(e){const t=e.samplerate;return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,t>>8&255,t&255,0,0])}static mp4a(e){return je.box(je.types.mp4a,je.audioStsd(e),je.box(je.types.esds,je.esds(e)))}static mp3(e){return je.box(je.types[".mp3"],je.audioStsd(e))}static ac3(e){return je.box(je.types["ac-3"],je.audioStsd(e),je.box(je.types.dac3,e.config))}static stsd(e){return e.type==="audio"?e.segmentCodec==="mp3"&&e.codec==="mp3"?je.box(je.types.stsd,je.STSD,je.mp3(e)):e.segmentCodec==="ac3"?je.box(je.types.stsd,je.STSD,je.ac3(e)):je.box(je.types.stsd,je.STSD,je.mp4a(e)):je.box(je.types.stsd,je.STSD,je.avc1(e))}static tkhd(e){const t=e.id,n=e.duration*e.timescale,s=e.width,o=e.height,u=Math.floor(n/(yc+1)),c=Math.floor(n%(yc+1));return je.box(je.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,t&255,0,0,0,0,u>>24,u>>16&255,u>>8&255,u&255,c>>24,c>>16&255,c>>8&255,c&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,s>>8&255,s&255,0,0,o>>8&255,o&255,0,0]))}static traf(e,t){const n=je.sdtp(e),s=e.id,o=Math.floor(t/(yc+1)),u=Math.floor(t%(yc+1));return je.box(je.types.traf,je.box(je.types.tfhd,new Uint8Array([0,0,0,0,s>>24,s>>16&255,s>>8&255,s&255])),je.box(je.types.tfdt,new Uint8Array([1,0,0,0,o>>24,o>>16&255,o>>8&255,o&255,u>>24,u>>16&255,u>>8&255,u&255])),je.trun(e,n.length+16+20+8+16+8+8),n)}static trak(e){return e.duration=e.duration||4294967295,je.box(je.types.trak,je.tkhd(e),je.mdia(e))}static trex(e){const t=e.id;return je.box(je.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,t&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}static trun(e,t){const n=e.samples||[],s=n.length,o=12+16*s,u=new Uint8Array(o);let c,h,m,y,E,T;for(t+=8+o,u.set([e.type==="video"?1:0,0,15,1,s>>>24&255,s>>>16&255,s>>>8&255,s&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255],0),c=0;c<s;c++)h=n[c],m=h.duration,y=h.size,E=h.flags,T=h.cts,u.set([m>>>24&255,m>>>16&255,m>>>8&255,m&255,y>>>24&255,y>>>16&255,y>>>8&255,y&255,E.isLeading<<2|E.dependsOn,E.isDependedOn<<6|E.hasRedundancy<<4|E.paddingValue<<1|E.isNonSync,E.degradPrio&61440,E.degradPrio&15,T>>>24&255,T>>>16&255,T>>>8&255,T&255],12+16*c);return je.box(je.types.trun,u)}static initSegment(e){je.types||je.init();const t=je.moov(e);return ao(je.FTYP,t)}}je.types=void 0,je.HDLR_TYPES=void 0,je.STTS=void 0,je.STSC=void 0,je.STCO=void 0,je.STSZ=void 0,je.VMHD=void 0,je.SMHD=void 0,je.STSD=void 0,je.FTYP=void 0,je.DINF=void 0;const FA=9e4;function C1(r,e,t=1,n=!1){const s=r*e*t;return n?Math.round(s):s}function K$(r,e,t=1,n=!1){return C1(r,e,1/t,n)}function mp(r,e=!1){return C1(r,1e3,1/FA,e)}function q$(r,e=1){return C1(r,FA,1/e)}const Y$=10*1e3,NA=1024,X$=1152,Q$=1536;let Bd=null,R1=null;class iv{constructor(e,t,n,s=""){if(this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=null,this._initDTS=null,this.nextAvcDts=null,this.nextAudioPts=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.videoTrackConfig=void 0,this.observer=e,this.config=t,this.typeSupported=n,this.ISGenerated=!1,Bd===null){const u=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);Bd=u?parseInt(u[1]):0}if(R1===null){const o=navigator.userAgent.match(/Safari\/(\d+)/i);R1=o?parseInt(o[1]):0}}destroy(){this.config=this.videoTrackConfig=this._initPTS=this._initDTS=null}resetTimeStamp(e){Fe.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=e}resetNextTimestamp(){Fe.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1}resetInitSegment(){Fe.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1,this.videoTrackConfig=void 0}getVideoStartPts(e){let t=!1;const n=e.reduce((s,o)=>{const u=o.pts-s;return u<-4294967296?(t=!0,oo(s,o.pts)):u>0?s:o.pts},e[0].pts);return t&&Fe.debug("PTS rollover detected"),n}remux(e,t,n,s,o,u,c,h){let m,y,E,T,R,_,L=o,M=o;const F=e.pid>-1,Z=t.pid>-1,K=t.samples.length,Y=e.samples.length>0,X=c&&K>0||K>1;if((!F||Y)&&(!Z||X)||this.ISGenerated||c){if(this.ISGenerated){var ie,ye,de,Re;const Qe=this.videoTrackConfig;Qe&&(t.width!==Qe.width||t.height!==Qe.height||((ie=t.pixelRatio)==null?void 0:ie[0])!==((ye=Qe.pixelRatio)==null?void 0:ye[0])||((de=t.pixelRatio)==null?void 0:de[1])!==((Re=Qe.pixelRatio)==null?void 0:Re[1]))&&this.resetInitSegment()}else E=this.generateIS(e,t,o,u);const Ce=this.isVideoContiguous;let Ve=-1,ze;if(X&&(Ve=J$(t.samples),!Ce&&this.config.forceKeyFrameOnDiscontinuity))if(_=!0,Ve>0){Fe.warn(`[mp4-remuxer]: Dropped ${Ve} out of ${K} video samples due to a missing keyframe`);const Qe=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(Ve),t.dropped+=Ve,M+=(t.samples[0].pts-Qe)/t.inputTimeScale,ze=M}else Ve===-1&&(Fe.warn(`[mp4-remuxer]: No keyframe found out of ${K} video samples`),_=!1);if(this.ISGenerated){if(Y&&X){const Qe=this.getVideoStartPts(t.samples),Pe=(oo(e.samples[0].pts,Qe)-Qe)/t.inputTimeScale;L+=Math.max(0,Pe),M+=Math.max(0,-Pe)}if(Y){if(e.samplerate||(Fe.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),E=this.generateIS(e,t,o,u)),y=this.remuxAudio(e,L,this.isAudioContiguous,u,Z||X||h===ln.AUDIO?M:void 0),X){const Qe=y?y.endPTS-y.startPTS:0;t.inputTimeScale||(Fe.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),E=this.generateIS(e,t,o,u)),m=this.remuxVideo(t,M,Ce,Qe)}}else X&&(m=this.remuxVideo(t,M,Ce,0));m&&(m.firstKeyFrame=Ve,m.independent=Ve!==-1,m.firstKeyFramePTS=ze)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(n.samples.length&&(R=UA(n,o,this._initPTS,this._initDTS)),s.samples.length&&(T=BA(s,o,this._initPTS))),{audio:y,video:m,initSegment:E,independent:_,text:T,id3:R}}generateIS(e,t,n,s){const o=e.samples,u=t.samples,c=this.typeSupported,h={},m=this._initPTS;let y=!m||s,E="audio/mp4",T,R,_;if(y&&(T=R=1/0),e.config&&o.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":c.mpeg?(E="audio/mpeg",e.codec=""):c.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3";break}h.audio={id:"audio",container:E,codec:e.codec,initSegment:e.segmentCodec==="mp3"&&c.mpeg?new Uint8Array(0):je.initSegment([e]),metadata:{channelCount:e.channelCount}},y&&(_=e.inputTimeScale,!m||_!==m.timescale?T=R=o[0].pts-Math.round(_*n):y=!1)}if(t.sps&&t.pps&&u.length){if(t.timescale=t.inputTimeScale,h.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:je.initSegment([t]),metadata:{width:t.width,height:t.height}},y)if(_=t.inputTimeScale,!m||_!==m.timescale){const L=this.getVideoStartPts(u),M=Math.round(_*n);R=Math.min(R,oo(u[0].dts,L)-M),T=Math.min(T,L-M)}else y=!1;this.videoTrackConfig={width:t.width,height:t.height,pixelRatio:t.pixelRatio}}if(Object.keys(h).length)return this.ISGenerated=!0,y?(this._initPTS={baseTime:T,timescale:_},this._initDTS={baseTime:R,timescale:_}):T=_=void 0,{tracks:h,initPTS:T,timescale:_}}remuxVideo(e,t,n,s){const o=e.inputTimeScale,u=e.samples,c=[],h=u.length,m=this._initPTS;let y=this.nextAvcDts,E=8,T=this.videoSampleDuration,R,_,L=Number.POSITIVE_INFINITY,M=Number.NEGATIVE_INFINITY,F=!1;if(!n||y===null){const Ue=t*o,He=u[0].pts-oo(u[0].dts,u[0].pts);Bd&&y!==null&&Math.abs(Ue-He-y)<15e3?n=!0:y=Ue-He}const Z=m.baseTime*o/m.timescale;for(let Ue=0;Ue<h;Ue++){const He=u[Ue];He.pts=oo(He.pts-Z,y),He.dts=oo(He.dts-Z,y),He.dts<u[Ue>0?Ue-1:Ue].dts&&(F=!0)}F&&u.sort(function(Ue,He){const Be=Ue.dts-He.dts,Je=Ue.pts-He.pts;return Be||Je}),R=u[0].dts,_=u[u.length-1].dts;const K=_-R,Y=K?Math.round(K/(h-1)):T||e.inputTimeScale/30;if(n){const Ue=R-y,He=Ue>Y,Be=Ue<-1;if((He||Be)&&(He?Fe.warn(`AVC: ${mp(Ue,!0)} ms (${Ue}dts) hole between fragments detected at ${t.toFixed(3)}`):Fe.warn(`AVC: ${mp(-Ue,!0)} ms (${Ue}dts) overlapping between fragments detected at ${t.toFixed(3)}`),!Be||y>=u[0].pts||Bd)){R=y;const Je=u[0].pts-Ue;if(He)u[0].dts=R,u[0].pts=Je;else for(let Xe=0;Xe<u.length&&!(u[Xe].dts>Je);Xe++)u[Xe].dts-=Ue,u[Xe].pts-=Ue;Fe.log(`Video: Initial PTS/DTS adjusted: ${mp(Je,!0)}/${mp(R,!0)}, delta: ${mp(Ue,!0)} ms`)}}R=Math.max(0,R);let X=0,ue=0,ie=R;for(let Ue=0;Ue<h;Ue++){const He=u[Ue],Be=He.units,Je=Be.length;let Xe=0;for(let Et=0;Et<Je;Et++)Xe+=Be[Et].data.length;ue+=Xe,X+=Je,He.length=Xe,He.dts<ie?(He.dts=ie,ie+=Y/4|0||1):ie=He.dts,L=Math.min(He.pts,L),M=Math.max(He.pts,M)}_=u[h-1].dts;const ye=ue+4*X+8;let de;try{de=new Uint8Array(ye)}catch(Ue){this.observer.emit(V.ERROR,V.ERROR,{type:cn.MUX_ERROR,details:qe.REMUX_ALLOC_ERROR,fatal:!1,error:Ue,bytes:ye,reason:`fail allocating video mdat ${ye}`});return}const Re=new DataView(de.buffer);Re.setUint32(0,ye),de.set(je.types.mdat,4);let Ce=!1,Ve=Number.POSITIVE_INFINITY,ze=Number.POSITIVE_INFINITY,Qe=Number.NEGATIVE_INFINITY,et=Number.NEGATIVE_INFINITY;for(let Ue=0;Ue<h;Ue++){const He=u[Ue],Be=He.units;let Je=0;for(let gt=0,Ot=Be.length;gt<Ot;gt++){const Dt=Be[gt],bn=Dt.data,tn=Dt.data.byteLength;Re.setUint32(E,tn),E+=4,de.set(bn,E),E+=tn,Je+=4+tn}let Xe;if(Ue<h-1)T=u[Ue+1].dts-He.dts,Xe=u[Ue+1].pts-He.pts;else{const gt=this.config,Ot=Ue>0?He.dts-u[Ue-1].dts:Y;if(Xe=Ue>0?He.pts-u[Ue-1].pts:Y,gt.stretchShortVideoTrack&&this.nextAudioPts!==null){const Dt=Math.floor(gt.maxBufferHole*o),bn=(s?L+s*o:this.nextAudioPts)-He.pts;bn>Dt?(T=bn-Ot,T<0?T=Ot:Ce=!0,Fe.log(`[mp4-remuxer]: It is approximately ${bn/90} ms to the next segment; using duration ${T/90} ms for the last video frame.`)):T=Ot}else T=Ot}const Et=Math.round(He.pts-He.dts);Ve=Math.min(Ve,T),Qe=Math.max(Qe,T),ze=Math.min(ze,Xe),et=Math.max(et,Xe),c.push(new $A(He.key,T,Je,Et))}if(c.length){if(Bd){if(Bd<70){const Ue=c[0].flags;Ue.dependsOn=2,Ue.isNonSync=0}}else if(R1&&et-ze<Qe-Ve&&Y/Qe<.025&&c[0].cts===0){Fe.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let Ue=R;for(let He=0,Be=c.length;He<Be;He++){const Je=Ue+c[He].duration,Xe=Ue+c[He].cts;if(He<Be-1){const Et=Je+c[He+1].cts;c[He].duration=Et-Xe}else c[He].duration=He?c[He-1].duration:Y;c[He].cts=0,Ue=Je}}}T=Ce||!T?Y:T,this.nextAvcDts=y=_+T,this.videoSampleDuration=T,this.isVideoContiguous=!0;const _e={data1:je.moof(e.sequenceNumber++,R,Ii({},e,{samples:c})),data2:de,startPTS:L/o,endPTS:(M+T)/o,startDTS:R/o,endDTS:y/o,type:"video",hasAudio:!1,hasVideo:!0,nb:c.length,dropped:e.dropped};return e.samples=[],e.dropped=0,_e}getSamplesPerFrame(e){switch(e.segmentCodec){case"mp3":return X$;case"ac3":return Q$;default:return NA}}remuxAudio(e,t,n,s,o){const u=e.inputTimeScale,c=e.samplerate?e.samplerate:u,h=u/c,m=this.getSamplesPerFrame(e),y=m*h,E=this._initPTS,T=e.segmentCodec==="mp3"&&this.typeSupported.mpeg,R=[],_=o!==void 0;let L=e.samples,M=T?0:8,F=this.nextAudioPts||-1;const Z=t*u,K=E.baseTime*u/E.timescale;if(this.isAudioContiguous=n=n||L.length&&F>0&&(s&&Math.abs(Z-F)<9e3||Math.abs(oo(L[0].pts-K,Z)-F)<20*y),L.forEach(function(Pe){Pe.pts=oo(Pe.pts-K,Z)}),!n||F<0){if(L=L.filter(Pe=>Pe.pts>=0),!L.length)return;o===0?F=0:s&&!_?F=Math.max(0,Z):F=L[0].pts}if(e.segmentCodec==="aac"){const Pe=this.config.maxAudioFramesDrift;for(let ne=0,_e=F;ne<L.length;ne++){const Ue=L[ne],He=Ue.pts,Be=He-_e,Je=Math.abs(1e3*Be/u);if(Be<=-Pe*y&&_)ne===0&&(Fe.warn(`Audio frame @ ${(He/u).toFixed(3)}s overlaps nextAudioPts by ${Math.round(1e3*Be/u)} ms.`),this.nextAudioPts=F=_e=He);else if(Be>=Pe*y&&Je<Y$&&_){let Xe=Math.round(Be/y);_e=He-Xe*y,_e<0&&(Xe--,_e+=y),ne===0&&(this.nextAudioPts=F=_e),Fe.warn(`[mp4-remuxer]: Injecting ${Xe} audio frame @ ${(_e/u).toFixed(3)}s due to ${Math.round(1e3*Be/u)} ms gap.`);for(let Et=0;Et<Xe;Et++){const gt=Math.max(_e,0);let Ot=OA.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);Ot||(Fe.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),Ot=Ue.unit.subarray()),L.splice(ne,0,{unit:Ot,pts:gt}),_e+=y,ne++}}Ue.pts=_e,_e+=y}}let Y=null,X=null,ue,ie=0,ye=L.length;for(;ye--;)ie+=L[ye].unit.byteLength;for(let Pe=0,ne=L.length;Pe<ne;Pe++){const _e=L[Pe],Ue=_e.unit;let He=_e.pts;if(X!==null){const Je=R[Pe-1];Je.duration=Math.round((He-X)/h)}else if(n&&e.segmentCodec==="aac"&&(He=F),Y=He,ie>0){ie+=M;try{ue=new Uint8Array(ie)}catch(Je){this.observer.emit(V.ERROR,V.ERROR,{type:cn.MUX_ERROR,details:qe.REMUX_ALLOC_ERROR,fatal:!1,error:Je,bytes:ie,reason:`fail allocating audio mdat ${ie}`});return}T||(new DataView(ue.buffer).setUint32(0,ie),ue.set(je.types.mdat,4))}else return;ue.set(Ue,M);const Be=Ue.byteLength;M+=Be,R.push(new $A(!0,m,Be,0)),X=He}const de=R.length;if(!de)return;const Re=R[R.length-1];this.nextAudioPts=F=X+h*Re.duration;const Ce=T?new Uint8Array(0):je.moof(e.sequenceNumber++,Y/h,Ii({},e,{samples:R}));e.samples=[];const Ve=Y/u,ze=F/u,et={data1:Ce,data2:ue,startPTS:Ve,endPTS:ze,startDTS:Ve,endDTS:ze,type:"audio",hasAudio:!0,hasVideo:!1,nb:de};return this.isAudioContiguous=!0,et}remuxEmptyAudio(e,t,n,s){const o=e.inputTimeScale,u=e.samplerate?e.samplerate:o,c=o/u,h=this.nextAudioPts,m=this._initDTS,y=m.baseTime*9e4/m.timescale,E=(h!==null?h:s.startDTS*o)+y,T=s.endDTS*o+y,R=c*NA,_=Math.ceil((T-E)/R),L=OA.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(Fe.warn("[mp4-remuxer]: remux empty Audio"),!L){Fe.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}const M=[];for(let F=0;F<_;F++){const Z=E+F*R;M.push({unit:L,pts:Z,dts:Z})}return e.samples=M,this.remuxAudio(e,t,n,!1)}}function oo(r,e){let t;if(e===null)return r;for(e<r?t=-8589934592:t=8589934592;Math.abs(r-e)>4294967296;)r+=t;return r}function J$(r){for(let e=0;e<r.length;e++)if(r[e].key)return e;return-1}function UA(r,e,t,n){const s=r.samples.length;if(!s)return;const o=r.inputTimeScale;for(let c=0;c<s;c++){const h=r.samples[c];h.pts=oo(h.pts-t.baseTime*o/t.timescale,e*o)/o,h.dts=oo(h.dts-n.baseTime*o/n.timescale,e*o)/o}const u=r.samples;return r.samples=[],{samples:u}}function BA(r,e,t){const n=r.samples.length;if(!n)return;const s=r.inputTimeScale;for(let u=0;u<n;u++){const c=r.samples[u];c.pts=oo(c.pts-t.baseTime*s/t.timescale,e*s)/s}r.samples.sort((u,c)=>u.pts-c.pts);const o=r.samples;return r.samples=[],{samples:o}}class $A{constructor(e,t,n,s){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=t,this.size=n,this.cts=s,this.flags={isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:e?2:1,isNonSync:e?0:1}}}class Z${constructor(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=null,this.initTracks=void 0,this.lastEndTime=null}destroy(){}resetTimeStamp(e){this.initPTS=e,this.lastEndTime=null}resetNextTimestamp(){this.lastEndTime=null}resetInitSegment(e,t,n,s){this.audioCodec=t,this.videoCodec=n,this.generateInitSegment(o3(e,s)),this.emitInitSegment=!0}generateInitSegment(e){let{audioCodec:t,videoCodec:n}=this;if(!(e!=null&&e.byteLength)){this.initTracks=void 0,this.initData=void 0;return}const s=this.initData=PR(e);s.audio&&(t=VA(s.audio,fr.AUDIO)),s.video&&(n=VA(s.video,fr.VIDEO));const o={};s.audio&&s.video?o.audiovideo={container:"video/mp4",codec:t+","+n,initSegment:e,id:"main"}:s.audio?o.audio={container:"audio/mp4",codec:t,initSegment:e,id:"audio"}:s.video?o.video={container:"video/mp4",codec:n,initSegment:e,id:"main"}:Fe.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=o}remux(e,t,n,s,o,u){var c,h;let{initPTS:m,lastEndTime:y}=this;const E={audio:void 0,video:void 0,text:s,id3:n,initSegment:void 0};Bt(y)||(y=this.lastEndTime=o||0);const T=t.samples;if(!(T!=null&&T.length))return E;const R={initPTS:void 0,timescale:1};let _=this.initData;if((c=_)!=null&&c.length||(this.generateInitSegment(T),_=this.initData),!((h=_)!=null&&h.length))return Fe.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),E;this.emitInitSegment&&(R.tracks=this.initTracks,this.emitInitSegment=!1);const L=u3(T,_),M=l3(_,T),F=M===null?o:M;(e4(m,F,o,L)||R.timescale!==m.timescale&&u)&&(R.initPTS=F-o,m&&m.timescale===1&&Fe.warn(`Adjusting initPTS by ${R.initPTS-m.baseTime}`),this.initPTS=m={baseTime:R.initPTS,timescale:1});const Z=e?F-m.baseTime/m.timescale:y,K=Z+L;f3(_,T,m.baseTime/m.timescale),L>0?this.lastEndTime=K:(Fe.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const Y=!!_.audio,X=!!_.video;let ue="";Y&&(ue+="audio"),X&&(ue+="video");const ie={data1:T,startPTS:Z,startDTS:Z,endPTS:K,endDTS:K,type:ue,hasAudio:Y,hasVideo:X,nb:1,dropped:0};return E.audio=ie.type==="audio"?ie:void 0,E.video=ie.type!=="audio"?ie:void 0,E.initSegment=R,E.id3=UA(n,o,m,m),s.samples.length&&(E.text=BA(s,o,m)),E}}function e4(r,e,t,n){if(r===null)return!0;const s=Math.max(n,1),o=e-r.baseTime/r.timescale;return Math.abs(o-t)>s}function VA(r,e){const t=r==null?void 0:r.codec;if(t&&t.length>4)return t;if(e===fr.AUDIO){if(t==="ec-3"||t==="ac-3"||t==="alac")return t;if(t==="fLaC"||t==="Opus")return Hg(t,!1);const n="mp4a.40.5";return Fe.info(`Parsed audio codec "${t}" or audio object type not handled. Using "${n}"`),n}return Fe.warn(`Unhandled video codec "${t}"`),t==="hvc1"||t==="hev1"?"hvc1.1.6.L120.90":t==="av01"?"av01.0.04M.08":"avc1.42e01e"}let yu;try{yu=self.performance.now.bind(self.performance)}catch{Fe.debug("Unable to use Performance API on this environment"),yu=Dd==null?void 0:Dd.Date.now}const sv=[{demux:B$,remux:Z$},{demux:vc,remux:iv},{demux:N$,remux:iv},{demux:W$,remux:iv}];sv.splice(2,0,{demux:$$,remux:iv});class zA{constructor(e,t,n,s,o){this.async=!1,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.observer=e,this.typeSupported=t,this.config=n,this.vendor=s,this.id=o}configure(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()}push(e,t,n,s){const o=n.transmuxing;o.executeStart=yu();let u=new Uint8Array(e);const{currentTransmuxState:c,transmuxConfig:h}=this;s&&(this.currentTransmuxState=s);const{contiguous:m,discontinuity:y,trackSwitch:E,accurateTimeOffset:T,timeOffset:R,initSegmentChange:_}=s||c,{audioCodec:L,videoCodec:M,defaultInitPts:F,duration:Z,initSegmentData:K}=h,Y=t4(u,t);if(Y&&Y.method==="AES-128"){const ye=this.getDecrypter();if(ye.isSync()){let de=ye.softwareDecrypt(u,Y.key.buffer,Y.iv.buffer);if(n.part>-1&&(de=ye.flush()),!de)return o.executeEnd=yu(),A1(n);u=new Uint8Array(de)}else return this.decryptionPromise=ye.webCryptoDecrypt(u,Y.key.buffer,Y.iv.buffer).then(de=>{const Re=this.push(de,null,n);return this.decryptionPromise=null,Re}),this.decryptionPromise}const X=this.needsProbing(y,E);if(X){const ye=this.configureTransmuxer(u);if(ye)return Fe.warn(`[transmuxer] ${ye.message}`),this.observer.emit(V.ERROR,V.ERROR,{type:cn.MEDIA_ERROR,details:qe.FRAG_PARSING_ERROR,fatal:!1,error:ye,reason:ye.message}),o.executeEnd=yu(),A1(n)}(y||E||_||X)&&this.resetInitSegment(K,L,M,Z,t),(y||_||X)&&this.resetInitialTimestamp(F),m||this.resetContiguity();const ue=this.transmux(u,Y,R,T,n),ie=this.currentTransmuxState;return ie.contiguous=!0,ie.discontinuity=!1,ie.trackSwitch=!1,o.executeEnd=yu(),ue}flush(e){const t=e.transmuxing;t.executeStart=yu();const{decrypter:n,currentTransmuxState:s,decryptionPromise:o}=this;if(o)return o.then(()=>this.flush(e));const u=[],{timeOffset:c}=s;if(n){const E=n.flush();E&&u.push(this.push(E,null,e))}const{demuxer:h,remuxer:m}=this;if(!h||!m)return t.executeEnd=yu(),[A1(e)];const y=h.flush(c);return av(y)?y.then(E=>(this.flushRemux(u,E,e),u)):(this.flushRemux(u,y,e),u)}flushRemux(e,t,n){const{audioTrack:s,videoTrack:o,id3Track:u,textTrack:c}=t,{accurateTimeOffset:h,timeOffset:m}=this.currentTransmuxState;Fe.log(`[transmuxer.ts]: Flushed fragment ${n.sn}${n.part>-1?" p: "+n.part:""} of level ${n.level}`);const y=this.remuxer.remux(s,o,u,c,m,h,!0,this.id);e.push({remuxResult:y,chunkMeta:n}),n.transmuxing.executeEnd=yu()}resetInitialTimestamp(e){const{demuxer:t,remuxer:n}=this;!t||!n||(t.resetTimeStamp(e),n.resetTimeStamp(e))}resetContiguity(){const{demuxer:e,remuxer:t}=this;!e||!t||(e.resetContiguity(),t.resetNextTimestamp())}resetInitSegment(e,t,n,s,o){const{demuxer:u,remuxer:c}=this;!u||!c||(u.resetInitSegment(e,t,n,s),c.resetInitSegment(e,t,n,o))}destroy(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)}transmux(e,t,n,s,o){let u;return t&&t.method==="SAMPLE-AES"?u=this.transmuxSampleAes(e,t,n,s,o):u=this.transmuxUnencrypted(e,n,s,o),u}transmuxUnencrypted(e,t,n,s){const{audioTrack:o,videoTrack:u,id3Track:c,textTrack:h}=this.demuxer.demux(e,t,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(o,u,c,h,t,n,!1,this.id),chunkMeta:s}}transmuxSampleAes(e,t,n,s,o){return this.demuxer.demuxSampleAes(e,t,n).then(u=>({remuxResult:this.remuxer.remux(u.audioTrack,u.videoTrack,u.id3Track,u.textTrack,n,s,!1,this.id),chunkMeta:o}))}configureTransmuxer(e){const{config:t,observer:n,typeSupported:s,vendor:o}=this;let u;for(let T=0,R=sv.length;T<R;T++){var c;if((c=sv[T].demux)!=null&&c.probe(e)){u=sv[T];break}}if(!u)return new Error("Failed to find demuxer by probing fragment data");const h=this.demuxer,m=this.remuxer,y=u.remux,E=u.demux;(!m||!(m instanceof y))&&(this.remuxer=new y(n,t,s,o)),(!h||!(h instanceof E))&&(this.demuxer=new E(n,t,s),this.probe=E.probe)}needsProbing(e,t){return!this.demuxer||!this.remuxer||e||t}getDecrypter(){let e=this.decrypter;return e||(e=this.decrypter=new y1(this.config)),e}}function t4(r,e){let t=null;return r.byteLength>0&&(e==null?void 0:e.key)!=null&&e.iv!==null&&e.method!=null&&(t=e),t}const A1=r=>({remuxResult:{},chunkMeta:r});function av(r){return"then"in r&&r.then instanceof Function}class n4{constructor(e,t,n,s,o){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=e,this.videoCodec=t,this.initSegmentData=n,this.duration=s,this.defaultInitPts=o||null}}class r4{constructor(e,t,n,s,o,u){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=e,this.contiguous=t,this.accurateTimeOffset=n,this.trackSwitch=s,this.timeOffset=o,this.initSegmentChange=u}}var jA={exports:{}};(function(r){var e=Object.prototype.hasOwnProperty,t="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(t=!1));function s(h,m,y){this.fn=h,this.context=m,this.once=y||!1}function o(h,m,y,E,T){if(typeof y!="function")throw new TypeError("The listener must be a function");var R=new s(y,E||h,T),_=t?t+m:m;return h._events[_]?h._events[_].fn?h._events[_]=[h._events[_],R]:h._events[_].push(R):(h._events[_]=R,h._eventsCount++),h}function u(h,m){--h._eventsCount===0?h._events=new n:delete h._events[m]}function c(){this._events=new n,this._eventsCount=0}c.prototype.eventNames=function(){var m=[],y,E;if(this._eventsCount===0)return m;for(E in y=this._events)e.call(y,E)&&m.push(t?E.slice(1):E);return Object.getOwnPropertySymbols?m.concat(Object.getOwnPropertySymbols(y)):m},c.prototype.listeners=function(m){var y=t?t+m:m,E=this._events[y];if(!E)return[];if(E.fn)return[E.fn];for(var T=0,R=E.length,_=new Array(R);T<R;T++)_[T]=E[T].fn;return _},c.prototype.listenerCount=function(m){var y=t?t+m:m,E=this._events[y];return E?E.fn?1:E.length:0},c.prototype.emit=function(m,y,E,T,R,_){var L=t?t+m:m;if(!this._events[L])return!1;var M=this._events[L],F=arguments.length,Z,K;if(M.fn){switch(M.once&&this.removeListener(m,M.fn,void 0,!0),F){case 1:return M.fn.call(M.context),!0;case 2:return M.fn.call(M.context,y),!0;case 3:return M.fn.call(M.context,y,E),!0;case 4:return M.fn.call(M.context,y,E,T),!0;case 5:return M.fn.call(M.context,y,E,T,R),!0;case 6:return M.fn.call(M.context,y,E,T,R,_),!0}for(K=1,Z=new Array(F-1);K<F;K++)Z[K-1]=arguments[K];M.fn.apply(M.context,Z)}else{var Y=M.length,X;for(K=0;K<Y;K++)switch(M[K].once&&this.removeListener(m,M[K].fn,void 0,!0),F){case 1:M[K].fn.call(M[K].context);break;case 2:M[K].fn.call(M[K].context,y);break;case 3:M[K].fn.call(M[K].context,y,E);break;case 4:M[K].fn.call(M[K].context,y,E,T);break;default:if(!Z)for(X=1,Z=new Array(F-1);X<F;X++)Z[X-1]=arguments[X];M[K].fn.apply(M[K].context,Z)}}return!0},c.prototype.on=function(m,y,E){return o(this,m,y,E,!1)},c.prototype.once=function(m,y,E){return o(this,m,y,E,!0)},c.prototype.removeListener=function(m,y,E,T){var R=t?t+m:m;if(!this._events[R])return this;if(!y)return u(this,R),this;var _=this._events[R];if(_.fn)_.fn===y&&(!T||_.once)&&(!E||_.context===E)&&u(this,R);else{for(var L=0,M=[],F=_.length;L<F;L++)(_[L].fn!==y||T&&!_[L].once||E&&_[L].context!==E)&&M.push(_[L]);M.length?this._events[R]=M.length===1?M[0]:M:u(this,R)}return this},c.prototype.removeAllListeners=function(m){var y;return m?(y=t?t+m:m,this._events[y]&&u(this,y)):(this._events=new n,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=t,c.EventEmitter=c,r.exports=c})(jA);var i4=jA.exports,_1=_B(i4);class HA{constructor(e,t,n,s){this.error=null,this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.useWorker=void 0,this.workerContext=null,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0;const o=e.config;this.hls=e,this.id=t,this.useWorker=!!o.enableWorker,this.onTransmuxComplete=n,this.onFlush=s;const u=(y,E)=>{E=E||{},E.frag=this.frag,E.id=this.id,y===V.ERROR&&(this.error=E.error),this.hls.trigger(y,E)};this.observer=new _1,this.observer.on(V.FRAG_DECRYPTED,u),this.observer.on(V.ERROR,u);const c=of(o.preferManagedMediaSource)||{isTypeSupported:()=>!1},h={mpeg:c.isTypeSupported("audio/mpeg"),mp3:c.isTypeSupported('audio/mp4; codecs="mp3"'),ac3:c.isTypeSupported('audio/mp4; codecs="ac-3"')},m=navigator.vendor;if(this.useWorker&&typeof Worker<"u"&&(o.workerPath||T$())){try{o.workerPath?(Fe.log(`loading Web Worker ${o.workerPath} for "${t}"`),this.workerContext=C$(o.workerPath)):(Fe.log(`injecting Web Worker for "${t}"`),this.workerContext=w$()),this.onwmsg=T=>this.onWorkerMessage(T);const{worker:E}=this.workerContext;E.addEventListener("message",this.onwmsg),E.onerror=T=>{const R=new Error(`${T.message} (${T.filename}:${T.lineno})`);o.enableWorker=!1,Fe.warn(`Error in "${t}" Web Worker, fallback to inline`),this.hls.trigger(V.ERROR,{type:cn.OTHER_ERROR,details:qe.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:R})},E.postMessage({cmd:"init",typeSupported:h,vendor:m,id:t,config:JSON.stringify(o)})}catch(E){Fe.warn(`Error setting up "${t}" Web Worker, fallback to inline`,E),this.resetWorker(),this.error=null,this.transmuxer=new zA(this.observer,h,o,m,t)}return}this.transmuxer=new zA(this.observer,h,o,m,t)}resetWorker(){if(this.workerContext){const{worker:e,objectURL:t}=this.workerContext;t&&self.URL.revokeObjectURL(t),e.removeEventListener("message",this.onwmsg),e.onerror=null,e.terminate(),this.workerContext=null}}destroy(){if(this.workerContext)this.resetWorker(),this.onwmsg=void 0;else{const t=this.transmuxer;t&&(t.destroy(),this.transmuxer=null)}const e=this.observer;e&&e.removeAllListeners(),this.frag=null,this.observer=null,this.hls=null}push(e,t,n,s,o,u,c,h,m,y){var E,T;m.transmuxing.start=self.performance.now();const{transmuxer:R}=this,_=u?u.start:o.start,L=o.decryptdata,M=this.frag,F=!(M&&o.cc===M.cc),Z=!(M&&m.level===M.level),K=M?m.sn-M.sn:-1,Y=this.part?m.part-this.part.index:-1,X=K===0&&m.id>1&&m.id===(M==null?void 0:M.stats.chunkCount),ue=!Z&&(K===1||K===0&&(Y===1||X&&Y<=0)),ie=self.performance.now();(Z||K||o.stats.parsing.start===0)&&(o.stats.parsing.start=ie),u&&(Y||!ue)&&(u.stats.parsing.start=ie);const ye=!(M&&((E=o.initSegment)==null?void 0:E.url)===((T=M.initSegment)==null?void 0:T.url)),de=new r4(F,ue,h,Z,_,ye);if(!ue||F||ye){Fe.log(`[transmuxer-interface, ${o.type}]: Starting new transmux session for sn: ${m.sn} p: ${m.part} level: ${m.level} id: ${m.id}
|
|
285
|
+
discontinuity: ${F}
|
|
286
|
+
trackSwitch: ${Z}
|
|
287
|
+
contiguous: ${ue}
|
|
288
|
+
accurateTimeOffset: ${h}
|
|
289
|
+
timeOffset: ${_}
|
|
290
|
+
initSegmentChange: ${ye}`);const Re=new n4(n,s,t,c,y);this.configureTransmuxer(Re)}if(this.frag=o,this.part=u,this.workerContext)this.workerContext.worker.postMessage({cmd:"demux",data:e,decryptdata:L,chunkMeta:m,state:de},e instanceof ArrayBuffer?[e]:[]);else if(R){const Re=R.push(e,L,m,de);av(Re)?(R.async=!0,Re.then(Ce=>{this.handleTransmuxComplete(Ce)}).catch(Ce=>{this.transmuxerError(Ce,m,"transmuxer-interface push error")})):(R.async=!1,this.handleTransmuxComplete(Re))}}flush(e){e.transmuxing.start=self.performance.now();const{transmuxer:t}=this;if(this.workerContext)this.workerContext.worker.postMessage({cmd:"flush",chunkMeta:e});else if(t){let n=t.flush(e);av(n)||t.async?(av(n)||(n=Promise.resolve(n)),n.then(o=>{this.handleFlushResult(o,e)}).catch(o=>{this.transmuxerError(o,e,"transmuxer-interface flush error")})):this.handleFlushResult(n,e)}}transmuxerError(e,t,n){this.hls&&(this.error=e,this.hls.trigger(V.ERROR,{type:cn.MEDIA_ERROR,details:qe.FRAG_PARSING_ERROR,chunkMeta:t,fatal:!1,error:e,err:e,reason:n}))}handleFlushResult(e,t){e.forEach(n=>{this.handleTransmuxComplete(n)}),this.onFlush(t)}onWorkerMessage(e){const t=e.data,n=this.hls;switch(t.event){case"init":{var s;const o=(s=this.workerContext)==null?void 0:s.objectURL;o&&self.URL.revokeObjectURL(o);break}case"transmuxComplete":{this.handleTransmuxComplete(t.data);break}case"flush":{this.onFlush(t.data);break}case"workerLog":Fe[t.data.logType]&&Fe[t.data.logType](t.data.message);break;default:{t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,n.trigger(t.event,t.data);break}}}configureTransmuxer(e){const{transmuxer:t}=this;this.workerContext?this.workerContext.worker.postMessage({cmd:"configure",config:e}):t&&t.configure(e)}handleTransmuxComplete(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)}}function GA(r,e){if(r.length!==e.length)return!1;for(let t=0;t<r.length;t++)if(!$d(r[t].attrs,e[t].attrs))return!1;return!0}function $d(r,e,t){const n=r["STABLE-RENDITION-ID"];return n&&!t?n===e["STABLE-RENDITION-ID"]:!(t||["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED","ASSOC-LANGUAGE"]).some(s=>r[s]!==e[s])}function L1(r,e){return e.label.toLowerCase()===r.name.toLowerCase()&&(!e.language||e.language.toLowerCase()===(r.lang||"").toLowerCase())}const WA=100;class s4 extends S1{constructor(e,t,n){super(e,t,n,"[audio-stream-controller]",ln.AUDIO),this.videoBuffer=null,this.videoTrackCC=-1,this.waitingVideoCC=-1,this.bufferedTrack=null,this.switchingTrack=null,this.trackId=-1,this.waitingData=null,this.mainDetails=null,this.flushing=!1,this.bufferFlushed=!1,this.cachedTrackLoadedData=null,this._registerListeners()}onHandlerDestroying(){this._unregisterListeners(),super.onHandlerDestroying(),this.mainDetails=null,this.bufferedTrack=null,this.switchingTrack=null}_registerListeners(){const{hls:e}=this;e.on(V.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(V.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(V.MANIFEST_LOADING,this.onManifestLoading,this),e.on(V.LEVEL_LOADED,this.onLevelLoaded,this),e.on(V.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(V.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(V.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(V.ERROR,this.onError,this),e.on(V.BUFFER_RESET,this.onBufferReset,this),e.on(V.BUFFER_CREATED,this.onBufferCreated,this),e.on(V.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(V.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(V.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(V.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(V.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(V.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(V.MANIFEST_LOADING,this.onManifestLoading,this),e.off(V.LEVEL_LOADED,this.onLevelLoaded,this),e.off(V.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(V.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(V.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(V.ERROR,this.onError,this),e.off(V.BUFFER_RESET,this.onBufferReset,this),e.off(V.BUFFER_CREATED,this.onBufferCreated,this),e.off(V.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(V.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(V.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(V.FRAG_BUFFERED,this.onFragBuffered,this)}onInitPtsFound(e,{frag:t,id:n,initPTS:s,timescale:o}){if(n==="main"){const u=t.cc;this.initPTS[t.cc]={baseTime:s,timescale:o},this.log(`InitPTS for cc: ${u} found from main: ${s}`),this.videoTrackCC=u,this.state===ot.WAITING_INIT_PTS&&this.tick()}}startLoad(e){if(!this.levels){this.startPosition=e,this.state=ot.STOPPED;return}const t=this.lastCurrentTime;this.stopLoad(),this.setInterval(WA),t>0&&e===-1?(this.log(`Override startPosition with lastCurrentTime @${t.toFixed(3)}`),e=t,this.state=ot.IDLE):(this.loadedmetadata=!1,this.state=ot.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}doTick(){switch(this.state){case ot.IDLE:this.doTickIdle();break;case ot.WAITING_TRACK:{var e;const{levels:n,trackId:s}=this,o=n==null||(e=n[s])==null?void 0:e.details;if(o){if(this.waitForCdnTuneIn(o))break;this.state=ot.WAITING_INIT_PTS}break}case ot.FRAG_LOADING_WAITING_RETRY:{var t;const n=performance.now(),s=this.retryDate;if(!s||n>=s||(t=this.media)!=null&&t.seeking){const{levels:o,trackId:u}=this;this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded((o==null?void 0:o[u])||null),this.state=ot.IDLE}break}case ot.WAITING_INIT_PTS:{const n=this.waitingData;if(n){const{frag:s,part:o,cache:u,complete:c}=n;if(this.initPTS[s.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=ot.FRAG_LOADING;const h=u.flush(),m={frag:s,part:o,payload:h,networkDetails:null};this._handleFragmentLoadProgress(m),c&&super._handleFragmentLoadComplete(m)}else if(this.videoTrackCC!==this.waitingVideoCC)this.log(`Waiting fragment cc (${s.cc}) cancelled because video is at cc ${this.videoTrackCC}`),this.clearWaitingFragment();else{const h=this.getLoadPosition(),m=Dr.bufferInfo(this.mediaBuffer,h,this.config.maxBufferHole);m1(m.end,this.config.maxFragLookUpTolerance,s)<0&&(this.log(`Waiting fragment cc (${s.cc}) @ ${s.start} cancelled because another fragment at ${m.end} is needed`),this.clearWaitingFragment())}}else this.state=ot.IDLE}}this.onTickEnd()}clearWaitingFragment(){const e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=ot.IDLE)}resetLoadingState(){this.clearWaitingFragment(),super.resetLoadingState()}onTickEnd(){const{media:e}=this;e!=null&&e.readyState&&(this.lastCurrentTime=e.currentTime)}doTickIdle(){const{hls:e,levels:t,media:n,trackId:s}=this,o=e.config;if(!n&&(this.startFragRequested||!o.startFragPrefetch)||!(t!=null&&t[s]))return;const u=t[s],c=u.details;if(!c||c.live&&this.levelLastLoaded!==u||this.waitForCdnTuneIn(c)){this.state=ot.WAITING_TRACK;return}const h=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&h&&(this.bufferFlushed=!1,this.afterBufferFlushed(h,fr.AUDIO,ln.AUDIO));const m=this.getFwdBufferInfo(h,ln.AUDIO);if(m===null)return;const{bufferedTrack:y,switchingTrack:E}=this;if(!E&&this._streamEnded(m,c)){e.trigger(V.BUFFER_EOS,{type:"audio"}),this.state=ot.ENDED;return}const T=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,ln.MAIN),R=m.len,_=this.getMaxBufferLength(T==null?void 0:T.len),L=c.fragments,M=L[0].start;let F=this.flushing?this.getLoadPosition():m.end;if(E&&n){const X=this.getLoadPosition();y&&!$d(E.attrs,y.attrs)&&(F=X),c.PTSKnown&&X<M&&(m.end>M||m.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),n.currentTime=M+.05)}if(R>=_&&!E&&F<L[L.length-1].start)return;let Z=this.getNextFragment(F,c),K=!1;if(Z&&this.isLoopLoading(Z,F)&&(K=!!Z.gap,Z=this.getNextFragmentLoopLoading(Z,c,m,ln.MAIN,_)),!Z){this.bufferFlushed=!0;return}const Y=T&&Z.start>T.end+c.targetduration;if(Y||!(T!=null&&T.len)&&m.len){const X=this.getAppendedFrag(Z.start,ln.MAIN);if(X===null||(K||(K=!!X.gap||!!Y&&T.len===0),Y&&!K||K&&m.nextStart&&m.nextStart<X.end))return}this.loadFragment(Z,u,F)}getMaxBufferLength(e){const t=super.getMaxBufferLength();return e?Math.min(Math.max(t,e),this.config.maxMaxBufferLength):t}onMediaDetaching(){this.videoBuffer=null,this.bufferFlushed=this.flushing=!1,super.onMediaDetaching()}onAudioTracksUpdated(e,{audioTracks:t}){this.resetTransmuxer(),this.levels=t.map(n=>new Pd(n))}onAudioTrackSwitching(e,t){const n=!!t.url;this.trackId=t.id;const{fragCurrent:s}=this;s&&(s.abortRequests(),this.removeUnbufferedFrags(s.start)),this.resetLoadingState(),n?this.setInterval(WA):this.resetTransmuxer(),n?(this.switchingTrack=t,this.state=ot.IDLE,this.flushAudioIfNeeded(t)):(this.switchingTrack=null,this.bufferedTrack=t,this.state=ot.STOPPED),this.tick()}onManifestLoading(){this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=this.flushing=!1,this.levels=this.mainDetails=this.waitingData=this.bufferedTrack=this.cachedTrackLoadedData=this.switchingTrack=null,this.startFragRequested=!1,this.trackId=this.videoTrackCC=this.waitingVideoCC=-1}onLevelLoaded(e,t){this.mainDetails=t.details,this.cachedTrackLoadedData!==null&&(this.hls.trigger(V.AUDIO_TRACK_LOADED,this.cachedTrackLoadedData),this.cachedTrackLoadedData=null)}onAudioTrackLoaded(e,t){var n;if(this.mainDetails==null){this.cachedTrackLoadedData=t;return}const{levels:s}=this,{details:o,id:u}=t;if(!s){this.warn(`Audio tracks were reset while loading level ${u}`);return}this.log(`Audio track ${u} loaded [${o.startSN},${o.endSN}]${o.lastPartSn?`[part-${o.lastPartSn}-${o.lastPartIndex}]`:""},duration:${o.totalduration}`);const c=s[u];let h=0;if(o.live||(n=c.details)!=null&&n.live){this.checkLiveUpdate(o);const y=this.mainDetails;if(o.deltaUpdateFailed||!y)return;if(!c.details&&o.hasProgramDateTime&&y.hasProgramDateTime)tv(o,y),h=o.fragments[0].start;else{var m;h=this.alignPlaylists(o,c.details,(m=this.levelLastLoaded)==null?void 0:m.details)}}c.details=o,this.levelLastLoaded=c,!this.startFragRequested&&(this.mainDetails||!o.live)&&this.setStartPosition(this.mainDetails||o,h),this.state===ot.WAITING_TRACK&&!this.waitForCdnTuneIn(o)&&(this.state=ot.IDLE),this.tick()}_handleFragmentLoadProgress(e){var t;const{frag:n,part:s,payload:o}=e,{config:u,trackId:c,levels:h}=this;if(!h){this.warn(`Audio tracks were reset while fragment load was in progress. Fragment ${n.sn} of level ${n.level} will not be buffered`);return}const m=h[c];if(!m){this.warn("Audio track is undefined on fragment load progress");return}const y=m.details;if(!y){this.warn("Audio track details undefined on fragment load progress"),this.removeUnbufferedFrags(n.start);return}const E=u.defaultAudioCodec||m.audioCodec||"mp4a.40.2";let T=this.transmuxer;T||(T=this.transmuxer=new HA(this.hls,ln.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const R=this.initPTS[n.cc],_=(t=n.initSegment)==null?void 0:t.data;if(R!==void 0){const M=s?s.index:-1,F=M!==-1,Z=new v1(n.level,n.sn,n.stats.chunkCount,o.byteLength,M,F);T.push(o,_,E,"",n,s,y.totalduration,!1,Z,R)}else{this.log(`Unknown video PTS for cc ${n.cc}, waiting for video PTS before demuxing audio frag ${n.sn} of [${y.startSN} ,${y.endSN}],track ${c}`);const{cache:L}=this.waitingData=this.waitingData||{frag:n,part:s,cache:new bA,complete:!1};L.push(new Uint8Array(o)),this.waitingVideoCC=this.videoTrackCC,this.state=ot.WAITING_INIT_PTS}}_handleFragmentLoadComplete(e){if(this.waitingData){this.waitingData.complete=!0;return}super._handleFragmentLoadComplete(e)}onBufferReset(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1}onBufferCreated(e,t){const n=t.tracks.audio;n&&(this.mediaBuffer=n.buffer||null),t.tracks.video&&(this.videoBuffer=t.tracks.video.buffer||null)}onFragBuffered(e,t){const{frag:n,part:s}=t;if(n.type!==ln.AUDIO){if(!this.loadedmetadata&&n.type===ln.MAIN){const o=this.videoBuffer||this.media;o&&Dr.getBuffered(o).length&&(this.loadedmetadata=!0)}return}if(this.fragContextChanged(n)){this.warn(`Fragment ${n.sn}${s?" p: "+s.index:""} of level ${n.level} finished buffering, but was aborted. state: ${this.state}, audioSwitch: ${this.switchingTrack?this.switchingTrack.name:"false"}`);return}if(n.sn!=="initSegment"){this.fragPrevious=n;const o=this.switchingTrack;o&&(this.bufferedTrack=o,this.switchingTrack=null,this.hls.trigger(V.AUDIO_TRACK_SWITCHED,qi({},o)))}this.fragBufferedComplete(n,s)}onError(e,t){var n;if(t.fatal){this.state=ot.ERROR;return}switch(t.details){case qe.FRAG_GAP:case qe.FRAG_PARSING_ERROR:case qe.FRAG_DECRYPT_ERROR:case qe.FRAG_LOAD_ERROR:case qe.FRAG_LOAD_TIMEOUT:case qe.KEY_LOAD_ERROR:case qe.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(ln.AUDIO,t);break;case qe.AUDIO_TRACK_LOAD_ERROR:case qe.AUDIO_TRACK_LOAD_TIMEOUT:case qe.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===ot.WAITING_TRACK&&((n=t.context)==null?void 0:n.type)===zn.AUDIO_TRACK&&(this.state=ot.IDLE);break;case qe.BUFFER_APPEND_ERROR:case qe.BUFFER_FULL_ERROR:if(!t.parent||t.parent!=="audio")return;if(t.details===qe.BUFFER_APPEND_ERROR){this.resetLoadingState();return}this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case qe.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onBufferFlushing(e,{type:t}){t!==fr.VIDEO&&(this.flushing=!0)}onBufferFlushed(e,{type:t}){if(t!==fr.VIDEO){this.flushing=!1,this.bufferFlushed=!0,this.state===ot.ENDED&&(this.state=ot.IDLE);const n=this.mediaBuffer||this.media;n&&(this.afterBufferFlushed(n,t,ln.AUDIO),this.tick())}}_handleTransmuxComplete(e){var t;const n="audio",{hls:s}=this,{remuxResult:o,chunkMeta:u}=e,c=this.getCurrentContext(u);if(!c){this.resetWhenMissingContext(u);return}const{frag:h,part:m,level:y}=c,{details:E}=y,{audio:T,text:R,id3:_,initSegment:L}=o;if(this.fragContextChanged(h)||!E){this.fragmentTracker.removeFragment(h);return}if(this.state=ot.PARSING,this.switchingTrack&&T&&this.completeAudioSwitch(this.switchingTrack),L!=null&&L.tracks){const M=h.initSegment||h;this._bufferInitSegment(y,L.tracks,M,u),s.trigger(V.FRAG_PARSING_INIT_SEGMENT,{frag:M,id:n,tracks:L.tracks})}if(T){const{startPTS:M,endPTS:F,startDTS:Z,endDTS:K}=T;m&&(m.elementaryStreams[fr.AUDIO]={startPTS:M,endPTS:F,startDTS:Z,endDTS:K}),h.setElementaryStreamInfo(fr.AUDIO,M,F,Z,K),this.bufferFragmentData(T,h,m,u)}if(_!=null&&(t=_.samples)!=null&&t.length){const M=Ii({id:n,frag:h,details:E},_);s.trigger(V.FRAG_PARSING_METADATA,M)}if(R){const M=Ii({id:n,frag:h,details:E},R);s.trigger(V.FRAG_PARSING_USERDATA,M)}}_bufferInitSegment(e,t,n,s){if(this.state!==ot.PARSING)return;t.video&&delete t.video;const o=t.audio;if(!o)return;o.id="audio";const u=e.audioCodec;this.log(`Init audio buffer, container:${o.container}, codecs[level/parsed]=[${u}/${o.codec}]`),u&&u.split(",").length===1&&(o.levelCodec=u),this.hls.trigger(V.BUFFER_CODECS,t);const c=o.initSegment;if(c!=null&&c.byteLength){const h={type:"audio",frag:n,part:null,chunkMeta:s,parent:n.type,data:c};this.hls.trigger(V.BUFFER_APPENDING,h)}this.tickImmediate()}loadFragment(e,t,n){const s=this.fragmentTracker.getState(e);if(this.fragCurrent=e,this.switchingTrack||s===Yi.NOT_LOADED||s===Yi.PARTIAL){var o;if(e.sn==="initSegment")this._loadInitSegment(e,t);else if((o=t.details)!=null&&o.live&&!this.initPTS[e.cc]){this.log(`Waiting for video PTS in continuity counter ${e.cc} of live stream before loading audio fragment ${e.sn} of level ${this.trackId}`),this.state=ot.WAITING_INIT_PTS;const u=this.mainDetails;u&&u.fragments[0].start!==t.details.fragments[0].start&&tv(t.details,u)}else this.startFragRequested=!0,super.loadFragment(e,t,n)}else this.clearTrackerIfNeeded(e)}flushAudioIfNeeded(e){const{media:t,bufferedTrack:n}=this,s=n==null?void 0:n.attrs,o=e.attrs;t&&s&&(s.CHANNELS!==o.CHANNELS||n.name!==e.name||n.lang!==e.lang)&&(this.log("Switching audio track : flushing all audio"),super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"),this.bufferedTrack=null)}completeAudioSwitch(e){const{hls:t}=this;this.flushAudioIfNeeded(e),this.bufferedTrack=e,this.switchingTrack=null,t.trigger(V.AUDIO_TRACK_SWITCHED,qi({},e))}}class a4 extends g1{constructor(e){super(e,"[audio-track-controller]"),this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.registerListeners()}registerListeners(){const{hls:e}=this;e.on(V.MANIFEST_LOADING,this.onManifestLoading,this),e.on(V.MANIFEST_PARSED,this.onManifestParsed,this),e.on(V.LEVEL_LOADING,this.onLevelLoading,this),e.on(V.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(V.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(V.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(V.MANIFEST_LOADING,this.onManifestLoading,this),e.off(V.MANIFEST_PARSED,this.onManifestParsed,this),e.off(V.LEVEL_LOADING,this.onLevelLoading,this),e.off(V.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(V.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(V.ERROR,this.onError,this)}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,super.destroy()}onManifestLoading(){this.tracks=[],this.tracksInGroup=[],this.groupIds=null,this.currentTrack=null,this.trackId=-1,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.audioTracks||[]}onAudioTrackLoaded(e,t){const{id:n,groupId:s,details:o}=t,u=this.tracksInGroup[n];if(!u||u.groupId!==s){this.warn(`Audio track with id:${n} and group:${s} not found in active group ${u==null?void 0:u.groupId}`);return}const c=u.details;u.details=t.details,this.log(`Audio track ${n} "${u.name}" lang:${u.lang} group:${s} loaded [${o.startSN}-${o.endSN}]`),n===this.trackId&&this.playlistLoaded(n,t,c)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const n=t.audioGroups||null,s=this.groupIds;let o=this.currentTrack;if(!n||(s==null?void 0:s.length)!==(n==null?void 0:n.length)||n!=null&&n.some(c=>(s==null?void 0:s.indexOf(c))===-1)){this.groupIds=n,this.trackId=-1,this.currentTrack=null;const c=this.tracks.filter(T=>!n||n.indexOf(T.groupId)!==-1);if(c.length)this.selectDefaultTrack&&!c.some(T=>T.default)&&(this.selectDefaultTrack=!1),c.forEach((T,R)=>{T.id=R});else if(!o&&!this.tracksInGroup.length)return;this.tracksInGroup=c;const h=this.hls.config.audioPreference;if(!o&&h){const T=wl(h,c,Fd);if(T>-1)o=c[T];else{const R=wl(h,this.tracks);o=this.tracks[R]}}let m=this.findTrackId(o);m===-1&&o&&(m=this.findTrackId(null));const y={audioTracks:c};this.log(`Updating audio tracks, ${c.length} track(s) found in group(s): ${n==null?void 0:n.join(",")}`),this.hls.trigger(V.AUDIO_TRACKS_UPDATED,y);const E=this.trackId;if(m!==-1&&E===-1)this.setAudioTrack(m);else if(c.length&&E===-1){var u;const T=new Error(`No audio track selected for current audio group-ID(s): ${(u=this.groupIds)==null?void 0:u.join(",")} track count: ${c.length}`);this.warn(T.message),this.hls.trigger(V.ERROR,{type:cn.MEDIA_ERROR,details:qe.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:T})}}else this.shouldReloadPlaylist(o)&&this.setAudioTrack(this.trackId)}onError(e,t){t.fatal||!t.context||t.context.type===zn.AUDIO_TRACK&&t.context.id===this.trackId&&(!this.groupIds||this.groupIds.indexOf(t.context.groupId)!==-1)&&(this.requestScheduled=-1,this.checkRetry(t))}get allAudioTracks(){return this.tracks}get audioTracks(){return this.tracksInGroup}get audioTrack(){return this.trackId}set audioTrack(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}setAudioOption(e){const t=this.hls;if(t.config.audioPreference=e,e){const n=this.allAudioTracks;if(this.selectDefaultTrack=!1,n.length){const s=this.currentTrack;if(s&&Od(e,s,Fd))return s;const o=wl(e,this.tracksInGroup,Fd);if(o>-1){const u=this.tracksInGroup[o];return this.setAudioTrack(o),u}else if(s){let u=t.loadLevel;u===-1&&(u=t.firstAutoLevel);const c=a$(e,t.levels,n,u,Fd);if(c===-1)return null;t.nextLoadLevel=c}if(e.channels||e.audioCodec){const u=wl(e,n);if(u>-1)return n[u]}}}return null}setAudioTrack(e){const t=this.tracksInGroup;if(e<0||e>=t.length){this.warn(`Invalid audio track id: ${e}`);return}this.clearTimer(),this.selectDefaultTrack=!1;const n=this.currentTrack,s=t[e],o=s.details&&!s.details.live;if(e===this.trackId&&s===n&&o||(this.log(`Switching to audio-track ${e} "${s.name}" lang:${s.lang} group:${s.groupId} channels:${s.channels}`),this.trackId=e,this.currentTrack=s,this.hls.trigger(V.AUDIO_TRACK_SWITCHING,qi({},s)),o))return;const u=this.switchParams(s.url,n==null?void 0:n.details,s.details);this.loadPlaylist(u)}findTrackId(e){const t=this.tracksInGroup;for(let n=0;n<t.length;n++){const s=t[n];if(!(this.selectDefaultTrack&&!s.default)&&(!e||Od(e,s,Fd)))return n}if(e){const{name:n,lang:s,assocLang:o,characteristics:u,audioCodec:c,channels:h}=e;for(let m=0;m<t.length;m++){const y=t[m];if(Od({name:n,lang:s,assocLang:o,characteristics:u,audioCodec:c,channels:h},y,Fd))return m}for(let m=0;m<t.length;m++){const y=t[m];if($d(e.attrs,y.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return m}for(let m=0;m<t.length;m++){const y=t[m];if($d(e.attrs,y.attrs,["LANGUAGE"]))return m}}return-1}loadPlaylist(e){const t=this.currentTrack;if(this.shouldLoadPlaylist(t)&&t){super.loadPlaylist();const n=t.id,s=t.groupId;let o=t.url;if(e)try{o=e.addDirectives(o)}catch(u){this.warn(`Could not construct new URL with HLS Delivery Directives: ${u}`)}this.log(`loading audio-track playlist ${n} "${t.name}" lang:${t.lang} group:${s}`),this.clearTimer(),this.hls.trigger(V.AUDIO_TRACK_LOADING,{url:o,id:n,groupId:s,deliveryDirectives:e||null})}}}const KA=500;class o4 extends S1{constructor(e,t,n){super(e,t,n,"[subtitle-stream-controller]",ln.SUBTITLE),this.currentTrackId=-1,this.tracksBuffered=[],this.mainDetails=null,this._registerListeners()}onHandlerDestroying(){this._unregisterListeners(),super.onHandlerDestroying(),this.mainDetails=null}_registerListeners(){const{hls:e}=this;e.on(V.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(V.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(V.MANIFEST_LOADING,this.onManifestLoading,this),e.on(V.LEVEL_LOADED,this.onLevelLoaded,this),e.on(V.ERROR,this.onError,this),e.on(V.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(V.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(V.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(V.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(V.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(V.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(V.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(V.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(V.MANIFEST_LOADING,this.onManifestLoading,this),e.off(V.LEVEL_LOADED,this.onLevelLoaded,this),e.off(V.ERROR,this.onError,this),e.off(V.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(V.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(V.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(V.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(V.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(V.FRAG_BUFFERED,this.onFragBuffered,this)}startLoad(e){this.stopLoad(),this.state=ot.IDLE,this.setInterval(KA),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}onManifestLoading(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()}onMediaDetaching(){this.tracksBuffered=[],super.onMediaDetaching()}onLevelLoaded(e,t){this.mainDetails=t.details}onSubtitleFragProcessed(e,t){const{frag:n,success:s}=t;if(this.fragPrevious=n,this.state=ot.IDLE,!s)return;const o=this.tracksBuffered[this.currentTrackId];if(!o)return;let u;const c=n.start;for(let m=0;m<o.length;m++)if(c>=o[m].start&&c<=o[m].end){u=o[m];break}const h=n.start+n.duration;u?u.end=h:(u={start:c,end:h},o.push(u)),this.fragmentTracker.fragBuffered(n),this.fragBufferedComplete(n,null)}onBufferFlushing(e,t){const{startOffset:n,endOffset:s}=t;if(n===0&&s!==Number.POSITIVE_INFINITY){const o=s-1;if(o<=0)return;t.endOffsetSubtitles=Math.max(0,o),this.tracksBuffered.forEach(u=>{for(let c=0;c<u.length;){if(u[c].end<=o){u.shift();continue}else if(u[c].start<o)u[c].start=o;else break;c++}}),this.fragmentTracker.removeFragmentsInRange(n,o,ln.SUBTITLE)}}onFragBuffered(e,t){if(!this.loadedmetadata&&t.frag.type===ln.MAIN){var n;(n=this.media)!=null&&n.buffered.length&&(this.loadedmetadata=!0)}}onError(e,t){const n=t.frag;(n==null?void 0:n.type)===ln.SUBTITLE&&(this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==ot.STOPPED&&(this.state=ot.IDLE))}onSubtitleTracksUpdated(e,{subtitleTracks:t}){if(this.levels&&GA(this.levels,t)){this.levels=t.map(n=>new Pd(n));return}this.tracksBuffered=[],this.levels=t.map(n=>{const s=new Pd(n);return this.tracksBuffered[s.id]=[],s}),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,ln.SUBTITLE),this.fragPrevious=null,this.mediaBuffer=null}onSubtitleTrackSwitch(e,t){var n;if(this.currentTrackId=t.id,!((n=this.levels)!=null&&n.length)||this.currentTrackId===-1){this.clearInterval();return}const s=this.levels[this.currentTrackId];s!=null&&s.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,s&&this.setInterval(KA)}onSubtitleTrackLoaded(e,t){var n;const{currentTrackId:s,levels:o}=this,{details:u,id:c}=t;if(!o){this.warn(`Subtitle tracks were reset while loading level ${c}`);return}const h=o[s];if(c>=o.length||c!==s||!h)return;this.log(`Subtitle track ${c} loaded [${u.startSN},${u.endSN}]${u.lastPartSn?`[part-${u.lastPartSn}-${u.lastPartIndex}]`:""},duration:${u.totalduration}`),this.mediaBuffer=this.mediaBufferTimeRanges;let m=0;if(u.live||(n=h.details)!=null&&n.live){const E=this.mainDetails;if(u.deltaUpdateFailed||!E)return;const T=E.fragments[0];if(!h.details)u.hasProgramDateTime&&E.hasProgramDateTime?(tv(u,E),m=u.fragments[0].start):T&&(m=T.start,h1(u,m));else{var y;m=this.alignPlaylists(u,h.details,(y=this.levelLastLoaded)==null?void 0:y.details),m===0&&T&&(m=T.start,h1(u,m))}}h.details=u,this.levelLastLoaded=h,!this.startFragRequested&&(this.mainDetails||!u.live)&&this.setStartPosition(this.mainDetails||u,m),this.tick(),u.live&&!this.fragCurrent&&this.media&&this.state===ot.IDLE&&(Qg(null,u.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),h.details=void 0))}_handleFragmentLoadComplete(e){const{frag:t,payload:n}=e,s=t.decryptdata,o=this.hls;if(!this.fragContextChanged(t)&&n&&n.byteLength>0&&s!=null&&s.key&&s.iv&&s.method==="AES-128"){const u=performance.now();this.decrypter.decrypt(new Uint8Array(n),s.key.buffer,s.iv.buffer).catch(c=>{throw o.trigger(V.ERROR,{type:cn.MEDIA_ERROR,details:qe.FRAG_DECRYPT_ERROR,fatal:!1,error:c,reason:c.message,frag:t}),c}).then(c=>{const h=performance.now();o.trigger(V.FRAG_DECRYPTED,{frag:t,payload:c,stats:{tstart:u,tdecrypt:h}})}).catch(c=>{this.warn(`${c.name}: ${c.message}`),this.state=ot.IDLE})}}doTick(){if(!this.media){this.state=ot.IDLE;return}if(this.state===ot.IDLE){const{currentTrackId:e,levels:t}=this,n=t==null?void 0:t[e];if(!n||!t.length||!n.details)return;const{config:s}=this,o=this.getLoadPosition(),u=Dr.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],o,s.maxBufferHole),{end:c,len:h}=u,m=this.getFwdBufferInfo(this.media,ln.MAIN),y=n.details,E=this.getMaxBufferLength(m==null?void 0:m.len)+y.levelTargetDuration;if(h>E)return;const T=y.fragments,R=T.length,_=y.edge;let L=null;const M=this.fragPrevious;if(c<_){const F=s.maxFragLookUpTolerance,Z=c>_-F?0:F;L=Qg(M,T,Math.max(T[0].start,c),Z),!L&&M&&M.start<T[0].start&&(L=T[0])}else L=T[R-1];if(!L)return;if(L=this.mapToInitFragWhenRequired(L),L.sn!=="initSegment"){const F=L.sn-y.startSN,Z=T[F-1];Z&&Z.cc===L.cc&&this.fragmentTracker.getState(Z)===Yi.NOT_LOADED&&(L=Z)}this.fragmentTracker.getState(L)===Yi.NOT_LOADED&&this.loadFragment(L,n,c)}}getMaxBufferLength(e){const t=super.getMaxBufferLength();return e?Math.max(t,e):t}loadFragment(e,t,n){this.fragCurrent=e,e.sn==="initSegment"?this._loadInitSegment(e,t):(this.startFragRequested=!0,super.loadFragment(e,t,n))}get mediaBufferTimeRanges(){return new l4(this.tracksBuffered[this.currentTrackId]||[])}}class l4{constructor(e){this.buffered=void 0;const t=(n,s,o)=>{if(s=s>>>0,s>o-1)throw new DOMException(`Failed to execute '${n}' on 'TimeRanges': The index provided (${s}) is greater than the maximum bound (${o})`);return e[s][n]};this.buffered={get length(){return e.length},end(n){return t("end",n,e.length)},start(n){return t("start",n,e.length)}}}}class u4 extends g1{constructor(e){super(e,"[subtitle-track-controller]"),this.media=null,this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.queuedDefaultTrack=-1,this.asyncPollTrackChange=()=>this.pollTrackChange(0),this.useTextTrackPolling=!1,this.subtitlePollingInterval=-1,this._subtitleDisplay=!0,this.onTextTracksChanged=()=>{if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;let t=null;const n=Gg(this.media.textTracks);for(let o=0;o<n.length;o++)if(n[o].mode==="hidden")t=n[o];else if(n[o].mode==="showing"){t=n[o];break}const s=this.findTrackForTextTrack(t);this.subtitleTrack!==s&&this.setSubtitleTrack(s)},this.registerListeners()}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,this.onTextTracksChanged=this.asyncPollTrackChange=null,super.destroy()}get subtitleDisplay(){return this._subtitleDisplay}set subtitleDisplay(e){this._subtitleDisplay=e,this.trackId>-1&&this.toggleTrackModes()}registerListeners(){const{hls:e}=this;e.on(V.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(V.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(V.MANIFEST_LOADING,this.onManifestLoading,this),e.on(V.MANIFEST_PARSED,this.onManifestParsed,this),e.on(V.LEVEL_LOADING,this.onLevelLoading,this),e.on(V.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(V.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(V.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(V.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(V.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(V.MANIFEST_LOADING,this.onManifestLoading,this),e.off(V.MANIFEST_PARSED,this.onManifestParsed,this),e.off(V.LEVEL_LOADING,this.onLevelLoading,this),e.off(V.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(V.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(V.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))}pollTrackChange(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.onTextTracksChanged,e)}onMediaDetaching(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),Gg(this.media.textTracks).forEach(t=>{Id(t)}),this.subtitleTrack=-1,this.media=null}onManifestLoading(){this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.subtitleTracks}onSubtitleTrackLoaded(e,t){const{id:n,groupId:s,details:o}=t,u=this.tracksInGroup[n];if(!u||u.groupId!==s){this.warn(`Subtitle track with id:${n} and group:${s} not found in active group ${u==null?void 0:u.groupId}`);return}const c=u.details;u.details=t.details,this.log(`Subtitle track ${n} "${u.name}" lang:${u.lang} group:${s} loaded [${o.startSN}-${o.endSN}]`),n===this.trackId&&this.playlistLoaded(n,t,c)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const n=t.subtitleGroups||null,s=this.groupIds;let o=this.currentTrack;if(!n||(s==null?void 0:s.length)!==(n==null?void 0:n.length)||n!=null&&n.some(u=>(s==null?void 0:s.indexOf(u))===-1)){this.groupIds=n,this.trackId=-1,this.currentTrack=null;const u=this.tracks.filter(y=>!n||n.indexOf(y.groupId)!==-1);if(u.length)this.selectDefaultTrack&&!u.some(y=>y.default)&&(this.selectDefaultTrack=!1),u.forEach((y,E)=>{y.id=E});else if(!o&&!this.tracksInGroup.length)return;this.tracksInGroup=u;const c=this.hls.config.subtitlePreference;if(!o&&c){this.selectDefaultTrack=!1;const y=wl(c,u);if(y>-1)o=u[y];else{const E=wl(c,this.tracks);o=this.tracks[E]}}let h=this.findTrackId(o);h===-1&&o&&(h=this.findTrackId(null));const m={subtitleTracks:u};this.log(`Updating subtitle tracks, ${u.length} track(s) found in "${n==null?void 0:n.join(",")}" group-id`),this.hls.trigger(V.SUBTITLE_TRACKS_UPDATED,m),h!==-1&&this.trackId===-1&&this.setSubtitleTrack(h)}else this.shouldReloadPlaylist(o)&&this.setSubtitleTrack(this.trackId)}findTrackId(e){const t=this.tracksInGroup,n=this.selectDefaultTrack;for(let s=0;s<t.length;s++){const o=t[s];if(!(n&&!o.default||!n&&!e)&&(!e||Od(o,e)))return s}if(e){for(let s=0;s<t.length;s++){const o=t[s];if($d(e.attrs,o.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return s}for(let s=0;s<t.length;s++){const o=t[s];if($d(e.attrs,o.attrs,["LANGUAGE"]))return s}}return-1}findTrackForTextTrack(e){if(e){const t=this.tracksInGroup;for(let n=0;n<t.length;n++){const s=t[n];if(L1(s,e))return n}}return-1}onError(e,t){t.fatal||!t.context||t.context.type===zn.SUBTITLE_TRACK&&t.context.id===this.trackId&&(!this.groupIds||this.groupIds.indexOf(t.context.groupId)!==-1)&&this.checkRetry(t)}get allSubtitleTracks(){return this.tracks}get subtitleTracks(){return this.tracksInGroup}get subtitleTrack(){return this.trackId}set subtitleTrack(e){this.selectDefaultTrack=!1,this.setSubtitleTrack(e)}setSubtitleOption(e){if(this.hls.config.subtitlePreference=e,e){const t=this.allSubtitleTracks;if(this.selectDefaultTrack=!1,t.length){const n=this.currentTrack;if(n&&Od(e,n))return n;const s=wl(e,this.tracksInGroup);if(s>-1){const o=this.tracksInGroup[s];return this.setSubtitleTrack(s),o}else{if(n)return null;{const o=wl(e,t);if(o>-1)return t[o]}}}}return null}loadPlaylist(e){super.loadPlaylist();const t=this.currentTrack;if(this.shouldLoadPlaylist(t)&&t){const n=t.id,s=t.groupId;let o=t.url;if(e)try{o=e.addDirectives(o)}catch(u){this.warn(`Could not construct new URL with HLS Delivery Directives: ${u}`)}this.log(`Loading subtitle playlist for id ${n}`),this.hls.trigger(V.SUBTITLE_TRACK_LOADING,{url:o,id:n,groupId:s,deliveryDirectives:e||null})}}toggleTrackModes(){const{media:e}=this;if(!e)return;const t=Gg(e.textTracks),n=this.currentTrack;let s;if(n&&(s=t.filter(o=>L1(n,o))[0],s||this.warn(`Unable to find subtitle TextTrack with name "${n.name}" and language "${n.lang}"`)),[].slice.call(t).forEach(o=>{o.mode!=="disabled"&&o!==s&&(o.mode="disabled")}),s){const o=this.subtitleDisplay?"showing":"hidden";s.mode!==o&&(s.mode=o)}}setSubtitleTrack(e){const t=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=e;return}if(e<-1||e>=t.length||!Bt(e)){this.warn(`Invalid subtitle track id: ${e}`);return}this.clearTimer(),this.selectDefaultTrack=!1;const n=this.currentTrack,s=t[e]||null;if(this.trackId=e,this.currentTrack=s,this.toggleTrackModes(),!s){this.hls.trigger(V.SUBTITLE_TRACK_SWITCH,{id:e});return}const o=!!s.details&&!s.details.live;if(e===this.trackId&&s===n&&o)return;this.log(`Switching to subtitle-track ${e}`+(s?` "${s.name}" lang:${s.lang} group:${s.groupId}`:""));const{id:u,groupId:c="",name:h,type:m,url:y}=s;this.hls.trigger(V.SUBTITLE_TRACK_SWITCH,{id:u,groupId:c,name:h,type:m,url:y});const E=this.switchParams(s.url,n==null?void 0:n.details,s.details);this.loadPlaylist(E)}}class c4{constructor(e){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=e}append(e,t,n){const s=this.queues[t];s.push(e),s.length===1&&!n&&this.executeNext(t)}insertAbort(e,t){this.queues[t].unshift(e),this.executeNext(t)}appendBlocker(e){let t;const n=new Promise(o=>{t=o}),s={execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};return this.append(s,e),n}executeNext(e){const t=this.queues[e];if(t.length){const n=t[0];try{n.execute()}catch(s){Fe.warn(`[buffer-operation-queue]: Exception executing "${e}" SourceBuffer operation: ${s}`),n.onError(s);const o=this.buffers[e];o!=null&&o.updating||this.shiftAndExecuteNext(e)}}}shiftAndExecuteNext(e){this.queues[e].shift(),this.executeNext(e)}current(e){return this.queues[e][0]}}const qA=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/;class f4{constructor(e){this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.appendSource=void 0,this.appendErrors={audio:0,video:0,audiovideo:0},this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this.log=void 0,this.warn=void 0,this.error=void 0,this._onEndStreaming=n=>{this.hls&&this.hls.pauseBuffering()},this._onStartStreaming=n=>{this.hls&&this.hls.resumeBuffering()},this._onMediaSourceOpen=()=>{const{media:n,mediaSource:s}=this;this.log("Media source opened"),n&&(n.removeEventListener("emptied",this._onMediaEmptied),this.updateMediaElementDuration(),this.hls.trigger(V.MEDIA_ATTACHED,{media:n,mediaSource:s})),s&&s.removeEventListener("sourceopen",this._onMediaSourceOpen),this.checkPendingTracks()},this._onMediaSourceClose=()=>{this.log("Media source closed")},this._onMediaSourceEnded=()=>{this.log("Media source ended")},this._onMediaEmptied=()=>{const{mediaSrc:n,_objectUrl:s}=this;n!==s&&Fe.error(`Media element src was set while attaching MediaSource (${s} > ${n})`)},this.hls=e;const t="[buffer-controller]";this.appendSource=x3(of(e.config.preferManagedMediaSource)),this.log=Fe.log.bind(Fe,t),this.warn=Fe.warn.bind(Fe,t),this.error=Fe.error.bind(Fe,t),this._initSourceBuffer(),this.registerListeners()}hasSourceTypes(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0}destroy(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=null,this.hls=null}registerListeners(){const{hls:e}=this;e.on(V.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(V.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(V.MANIFEST_LOADING,this.onManifestLoading,this),e.on(V.MANIFEST_PARSED,this.onManifestParsed,this),e.on(V.BUFFER_RESET,this.onBufferReset,this),e.on(V.BUFFER_APPENDING,this.onBufferAppending,this),e.on(V.BUFFER_CODECS,this.onBufferCodecs,this),e.on(V.BUFFER_EOS,this.onBufferEos,this),e.on(V.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(V.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(V.FRAG_PARSED,this.onFragParsed,this),e.on(V.FRAG_CHANGED,this.onFragChanged,this)}unregisterListeners(){const{hls:e}=this;e.off(V.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(V.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(V.MANIFEST_LOADING,this.onManifestLoading,this),e.off(V.MANIFEST_PARSED,this.onManifestParsed,this),e.off(V.BUFFER_RESET,this.onBufferReset,this),e.off(V.BUFFER_APPENDING,this.onBufferAppending,this),e.off(V.BUFFER_CODECS,this.onBufferCodecs,this),e.off(V.BUFFER_EOS,this.onBufferEos,this),e.off(V.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(V.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(V.FRAG_PARSED,this.onFragParsed,this),e.off(V.FRAG_CHANGED,this.onFragChanged,this)}_initSourceBuffer(){this.sourceBuffer={},this.operationQueue=new c4(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]},this.appendErrors={audio:0,video:0,audiovideo:0},this.lastMpegAudioChunk=null}onManifestLoading(){this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=0,this.details=null}onManifestParsed(e,t){let n=2;(t.audio&&!t.video||!t.altAudio)&&(n=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=n,this.log(`${this.bufferCodecEventsExpected} bufferCodec event(s) expected`)}onMediaAttaching(e,t){const n=this.media=t.media,s=of(this.appendSource);if(n&&s){var o;const u=this.mediaSource=new s;this.log(`created media source: ${(o=u.constructor)==null?void 0:o.name}`),u.addEventListener("sourceopen",this._onMediaSourceOpen),u.addEventListener("sourceended",this._onMediaSourceEnded),u.addEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(u.addEventListener("startstreaming",this._onStartStreaming),u.addEventListener("endstreaming",this._onEndStreaming));const c=this._objectUrl=self.URL.createObjectURL(u);if(this.appendSource)try{n.removeAttribute("src");const h=self.ManagedMediaSource;n.disableRemotePlayback=n.disableRemotePlayback||h&&u instanceof h,YA(n),d4(n,c),n.load()}catch{n.src=c}else n.src=c;n.addEventListener("emptied",this._onMediaEmptied)}}onMediaDetaching(){const{media:e,mediaSource:t,_objectUrl:n}=this;if(t){if(this.log("media source detaching"),t.readyState==="open")try{t.endOfStream()}catch(s){this.warn(`onMediaDetaching: ${s.message} while calling endOfStream`)}this.onBufferReset(),t.removeEventListener("sourceopen",this._onMediaSourceOpen),t.removeEventListener("sourceended",this._onMediaSourceEnded),t.removeEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(t.removeEventListener("startstreaming",this._onStartStreaming),t.removeEventListener("endstreaming",this._onEndStreaming)),e&&(e.removeEventListener("emptied",this._onMediaEmptied),n&&self.URL.revokeObjectURL(n),this.mediaSrc===n?(e.removeAttribute("src"),this.appendSource&&YA(e),e.load()):this.warn("media|source.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(V.MEDIA_DETACHED,void 0)}onBufferReset(){this.getSourceBufferTypes().forEach(e=>{this.resetBuffer(e)}),this._initSourceBuffer()}resetBuffer(e){const t=this.sourceBuffer[e];try{if(t){var n;this.removeBufferListeners(e),this.sourceBuffer[e]=void 0,(n=this.mediaSource)!=null&&n.sourceBuffers.length&&this.mediaSource.removeSourceBuffer(t)}}catch(s){this.warn(`onBufferReset ${e}`,s)}}onBufferCodecs(e,t){const n=this.getSourceBufferTypes().length,s=Object.keys(t);if(s.forEach(u=>{if(n){const h=this.tracks[u];if(h&&typeof h.buffer.changeType=="function"){var c;const{id:m,codec:y,levelCodec:E,container:T,metadata:R}=t[u],_=jR(h.codec,h.levelCodec),L=_==null?void 0:_.replace(qA,"$1");let M=jR(y,E);const F=(c=M)==null?void 0:c.replace(qA,"$1");if(M&&L!==F){u.slice(0,5)==="audio"&&(M=Hg(M,this.appendSource));const Z=`${T};codecs=${M}`;this.appendChangeType(u,Z),this.log(`switching codec ${_} to ${M}`),this.tracks[u]={buffer:h.buffer,codec:y,container:T,levelCodec:E,metadata:R,id:m}}}}else this.pendingTracks[u]=t[u]}),n)return;const o=Math.max(this.bufferCodecEventsExpected-1,0);this.bufferCodecEventsExpected!==o&&(this.log(`${o} bufferCodec event(s) expected ${s.join(",")}`),this.bufferCodecEventsExpected=o),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()}appendChangeType(e,t){const{operationQueue:n}=this,s={execute:()=>{const o=this.sourceBuffer[e];o&&(this.log(`changing ${e} sourceBuffer type to ${t}`),o.changeType(t)),n.shiftAndExecuteNext(e)},onStart:()=>{},onComplete:()=>{},onError:o=>{this.warn(`Failed to change ${e} SourceBuffer type`,o)}};n.append(s,e,!!this.pendingTracks[e])}onBufferAppending(e,t){const{hls:n,operationQueue:s,tracks:o}=this,{data:u,type:c,frag:h,part:m,chunkMeta:y}=t,E=y.buffering[c],T=self.performance.now();E.start=T;const R=h.stats.buffering,_=m?m.stats.buffering:null;R.start===0&&(R.start=T),_&&_.start===0&&(_.start=T);const L=o.audio;let M=!1;c==="audio"&&(L==null?void 0:L.container)==="audio/mpeg"&&(M=!this.lastMpegAudioChunk||y.id===1||this.lastMpegAudioChunk.sn!==y.sn,this.lastMpegAudioChunk=y);const F=h.start,Z={execute:()=>{if(E.executeStart=self.performance.now(),M){const K=this.sourceBuffer[c];if(K){const Y=F-K.timestampOffset;Math.abs(Y)>=.1&&(this.log(`Updating audio SourceBuffer timestampOffset to ${F} (delta: ${Y}) sn: ${h.sn})`),K.timestampOffset=F)}}this.appendExecutor(u,c)},onStart:()=>{},onComplete:()=>{const K=self.performance.now();E.executeEnd=E.end=K,R.first===0&&(R.first=K),_&&_.first===0&&(_.first=K);const{sourceBuffer:Y}=this,X={};for(const ue in Y)X[ue]=Dr.getBuffered(Y[ue]);this.appendErrors[c]=0,c==="audio"||c==="video"?this.appendErrors.audiovideo=0:(this.appendErrors.audio=0,this.appendErrors.video=0),this.hls.trigger(V.BUFFER_APPENDED,{type:c,frag:h,part:m,chunkMeta:y,parent:h.type,timeRanges:X})},onError:K=>{const Y={type:cn.MEDIA_ERROR,parent:h.type,details:qe.BUFFER_APPEND_ERROR,sourceBufferName:c,frag:h,part:m,chunkMeta:y,error:K,err:K,fatal:!1};if(K.code===DOMException.QUOTA_EXCEEDED_ERR)Y.details=qe.BUFFER_FULL_ERROR;else{const X=++this.appendErrors[c];Y.details=qe.BUFFER_APPEND_ERROR,this.warn(`Failed ${X}/${n.config.appendErrorMaxRetry} times to append segment in "${c}" sourceBuffer`),X>=n.config.appendErrorMaxRetry&&(Y.fatal=!0)}n.trigger(V.ERROR,Y)}};s.append(Z,c,!!this.pendingTracks[c])}onBufferFlushing(e,t){const{operationQueue:n}=this,s=o=>({execute:this.removeExecutor.bind(this,o,t.startOffset,t.endOffset),onStart:()=>{},onComplete:()=>{this.hls.trigger(V.BUFFER_FLUSHED,{type:o})},onError:u=>{this.warn(`Failed to remove from ${o} SourceBuffer`,u)}});t.type?n.append(s(t.type),t.type):this.getSourceBufferTypes().forEach(o=>{n.append(s(o),o)})}onFragParsed(e,t){const{frag:n,part:s}=t,o=[],u=s?s.elementaryStreams:n.elementaryStreams;u[fr.AUDIOVIDEO]?o.push("audiovideo"):(u[fr.AUDIO]&&o.push("audio"),u[fr.VIDEO]&&o.push("video"));const c=()=>{const h=self.performance.now();n.stats.buffering.end=h,s&&(s.stats.buffering.end=h);const m=s?s.stats:n.stats;this.hls.trigger(V.FRAG_BUFFERED,{frag:n,part:s,stats:m,id:n.type})};o.length===0&&this.warn(`Fragments must have at least one ElementaryStreamType set. type: ${n.type} level: ${n.level} sn: ${n.sn}`),this.blockBuffers(c,o)}onFragChanged(e,t){this.trimBuffers()}onBufferEos(e,t){this.getSourceBufferTypes().reduce((s,o)=>{const u=this.sourceBuffer[o];return u&&(!t.type||t.type===o)&&(u.ending=!0,u.ended||(u.ended=!0,this.log(`${o} sourceBuffer now EOS`))),s&&!!(!u||u.ended)},!0)&&(this.log("Queueing mediaSource.endOfStream()"),this.blockBuffers(()=>{this.getSourceBufferTypes().forEach(o=>{const u=this.sourceBuffer[o];u&&(u.ending=!1)});const{mediaSource:s}=this;if(!s||s.readyState!=="open"){s&&this.log(`Could not call mediaSource.endOfStream(). mediaSource.readyState: ${s.readyState}`);return}this.log("Calling mediaSource.endOfStream()"),s.endOfStream()}))}onLevelUpdated(e,{details:t}){t.fragments.length&&(this.details=t,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())}trimBuffers(){const{hls:e,details:t,media:n}=this;if(!n||t===null||!this.getSourceBufferTypes().length)return;const o=e.config,u=n.currentTime,c=t.levelTargetDuration,h=t.live&&o.liveBackBufferLength!==null?o.liveBackBufferLength:o.backBufferLength;if(Bt(h)&&h>0){const m=Math.max(h,c),y=Math.floor(u/c)*c-m;this.flushBackBuffer(u,c,y)}if(Bt(o.frontBufferFlushThreshold)&&o.frontBufferFlushThreshold>0){const m=Math.max(o.maxBufferLength,o.frontBufferFlushThreshold),y=Math.max(m,c),E=Math.floor(u/c)*c+y;this.flushFrontBuffer(u,c,E)}}flushBackBuffer(e,t,n){const{details:s,sourceBuffer:o}=this;this.getSourceBufferTypes().forEach(c=>{const h=o[c];if(h){const m=Dr.getBuffered(h);if(m.length>0&&n>m.start(0)){if(this.hls.trigger(V.BACK_BUFFER_REACHED,{bufferEnd:n}),s!=null&&s.live)this.hls.trigger(V.LIVE_BACK_BUFFER_REACHED,{bufferEnd:n});else if(h.ended&&m.end(m.length-1)-e<t*2){this.log(`Cannot flush ${c} back buffer while SourceBuffer is in ended state`);return}this.hls.trigger(V.BUFFER_FLUSHING,{startOffset:0,endOffset:n,type:c})}}})}flushFrontBuffer(e,t,n){const{sourceBuffer:s}=this;this.getSourceBufferTypes().forEach(u=>{const c=s[u];if(c){const h=Dr.getBuffered(c),m=h.length;if(m<2)return;const y=h.start(m-1),E=h.end(m-1);if(n>y||e>=y&&e<=E)return;if(c.ended&&e-E<2*t){this.log(`Cannot flush ${u} front buffer while SourceBuffer is in ended state`);return}this.hls.trigger(V.BUFFER_FLUSHING,{startOffset:y,endOffset:1/0,type:u})}})}updateMediaElementDuration(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;const{details:e,hls:t,media:n,mediaSource:s}=this,o=e.fragments[0].start+e.totalduration,u=n.duration,c=Bt(s.duration)?s.duration:0;e.live&&t.config.liveDurationInfinity?(s.duration=1/0,this.updateSeekableRange(e)):(o>c&&o>u||!Bt(u))&&(this.log(`Updating Media Source duration to ${o.toFixed(3)}`),s.duration=o)}updateSeekableRange(e){const t=this.mediaSource,n=e.fragments;if(n.length&&e.live&&t!=null&&t.setLiveSeekableRange){const o=Math.max(0,n[0].start),u=Math.max(o,o+e.totalduration);this.log(`Media Source duration is set to ${t.duration}. Setting seekable range to ${o}-${u}.`),t.setLiveSeekableRange(o,u)}}checkPendingTracks(){const{bufferCodecEventsExpected:e,operationQueue:t,pendingTracks:n}=this,s=Object.keys(n).length;if(s&&(!e||s===2||"audiovideo"in n)){this.createSourceBuffers(n),this.pendingTracks={};const o=this.getSourceBufferTypes();if(o.length)this.hls.trigger(V.BUFFER_CREATED,{tracks:this.tracks}),o.forEach(u=>{t.executeNext(u)});else{const u=new Error("could not create source buffer for media codec(s)");this.hls.trigger(V.ERROR,{type:cn.MEDIA_ERROR,details:qe.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:u,reason:u.message})}}}createSourceBuffers(e){const{sourceBuffer:t,mediaSource:n}=this;if(!n)throw Error("createSourceBuffers called when mediaSource was null");for(const o in e)if(!t[o]){var s;const u=e[o];if(!u)throw Error(`source buffer exists for track ${o}, however track does not`);let c=((s=u.levelCodec)==null?void 0:s.indexOf(","))===-1?u.levelCodec:u.codec;c&&o.slice(0,5)==="audio"&&(c=Hg(c,this.appendSource));const h=`${u.container};codecs=${c}`;this.log(`creating sourceBuffer(${h})`);try{const m=t[o]=n.addSourceBuffer(h),y=o;this.addBufferListener(y,"updatestart",this._onSBUpdateStart),this.addBufferListener(y,"updateend",this._onSBUpdateEnd),this.addBufferListener(y,"error",this._onSBUpdateError),this.appendSource&&this.addBufferListener(y,"bufferedchange",(E,T)=>{const R=T.removedRanges;R!=null&&R.length&&this.hls.trigger(V.BUFFER_FLUSHED,{type:o})}),this.tracks[o]={buffer:m,codec:c,container:u.container,levelCodec:u.levelCodec,metadata:u.metadata,id:u.id}}catch(m){this.error(`error while trying to add sourceBuffer: ${m.message}`),this.hls.trigger(V.ERROR,{type:cn.MEDIA_ERROR,details:qe.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:m,sourceBufferName:o,mimeType:h})}}}get mediaSrc(){var e;const t=((e=this.media)==null?void 0:e.firstChild)||this.media;return t==null?void 0:t.src}_onSBUpdateStart(e){const{operationQueue:t}=this;t.current(e).onStart()}_onSBUpdateEnd(e){var t;if(((t=this.mediaSource)==null?void 0:t.readyState)==="closed"){this.resetBuffer(e);return}const{operationQueue:n}=this;n.current(e).onComplete(),n.shiftAndExecuteNext(e)}_onSBUpdateError(e,t){var n;const s=new Error(`${e} SourceBuffer error. MediaSource readyState: ${(n=this.mediaSource)==null?void 0:n.readyState}`);this.error(`${s}`,t),this.hls.trigger(V.ERROR,{type:cn.MEDIA_ERROR,details:qe.BUFFER_APPENDING_ERROR,sourceBufferName:e,error:s,fatal:!1});const o=this.operationQueue.current(e);o&&o.onError(s)}removeExecutor(e,t,n){const{media:s,mediaSource:o,operationQueue:u,sourceBuffer:c}=this,h=c[e];if(!s||!o||!h){this.warn(`Attempting to remove from the ${e} SourceBuffer, but it does not exist`),u.shiftAndExecuteNext(e);return}const m=Bt(s.duration)?s.duration:1/0,y=Bt(o.duration)?o.duration:1/0,E=Math.max(0,t),T=Math.min(n,m,y);T>E&&(!h.ending||h.ended)?(h.ended=!1,this.log(`Removing [${E},${T}] from the ${e} SourceBuffer`),h.remove(E,T)):u.shiftAndExecuteNext(e)}appendExecutor(e,t){const n=this.sourceBuffer[t];if(!n){if(!this.pendingTracks[t])throw new Error(`Attempting to append to the ${t} SourceBuffer, but it does not exist`);return}n.ended=!1,n.appendBuffer(e)}blockBuffers(e,t=this.getSourceBufferTypes()){if(!t.length){this.log("Blocking operation requested, but no SourceBuffers exist"),Promise.resolve().then(e);return}const{operationQueue:n}=this,s=t.map(o=>n.appendBlocker(o));Promise.all(s).then(()=>{e(),t.forEach(o=>{const u=this.sourceBuffer[o];u!=null&&u.updating||n.shiftAndExecuteNext(o)})})}getSourceBufferTypes(){return Object.keys(this.sourceBuffer)}addBufferListener(e,t,n){const s=this.sourceBuffer[e];if(!s)return;const o=n.bind(this,e);this.listeners[e].push({event:t,listener:o}),s.addEventListener(t,o)}removeBufferListeners(e){const t=this.sourceBuffer[e];t&&this.listeners[e].forEach(n=>{t.removeEventListener(n.event,n.listener)})}}function YA(r){const e=r.querySelectorAll("source");[].slice.call(e).forEach(t=>{r.removeChild(t)})}function d4(r,e){const t=self.document.createElement("source");t.type="video/mp4",t.src=e,r.appendChild(t)}const XA={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},QA=function(e){let t=e;return XA.hasOwnProperty(e)&&(t=XA[e]),String.fromCharCode(t)},Uo=15,Su=100,h4={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},p4={17:2,18:4,21:6,22:8,23:10,19:13,20:15},m4={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},g4={25:2,26:4,29:6,30:8,31:10,27:13,28:15},v4=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class y4{constructor(){this.time=null,this.verboseLevel=0}log(e,t){if(this.verboseLevel>=e){const n=typeof t=="function"?t():t;Fe.log(`${this.time} [${e}] ${n}`)}}}const lf=function(e){const t=[];for(let n=0;n<e.length;n++)t.push(e[n].toString(16));return t};class JA{constructor(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}reset(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}setStyles(e){const t=["foreground","underline","italics","background","flash"];for(let n=0;n<t.length;n++){const s=t[n];e.hasOwnProperty(s)&&(this[s]=e[s])}}isDefault(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash}equals(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash}copy(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash}toString(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}}class S4{constructor(){this.uchar=" ",this.penState=new JA}reset(){this.uchar=" ",this.penState.reset()}setChar(e,t){this.uchar=e,this.penState.copy(t)}setPenState(e){this.penState.copy(e)}equals(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)}copy(e){this.uchar=e.uchar,this.penState.copy(e.penState)}isEmpty(){return this.uchar===" "&&this.penState.isDefault()}}class E4{constructor(e){this.chars=[],this.pos=0,this.currPenState=new JA,this.cueStartTime=null,this.logger=void 0;for(let t=0;t<Su;t++)this.chars.push(new S4);this.logger=e}equals(e){for(let t=0;t<Su;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0}copy(e){for(let t=0;t<Su;t++)this.chars[t].copy(e.chars[t])}isEmpty(){let e=!0;for(let t=0;t<Su;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e}setCursor(e){this.pos!==e&&(this.pos=e),this.pos<0?(this.logger.log(3,"Negative cursor position "+this.pos),this.pos=0):this.pos>Su&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=Su)}moveCursor(e){const t=this.pos+e;if(e>1)for(let n=this.pos+1;n<t+1;n++)this.chars[n].setPenState(this.currPenState);this.setCursor(t)}backSpace(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)}insertChar(e){e>=144&&this.backSpace();const t=QA(e);if(this.pos>=Su){this.logger.log(0,()=>"Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1)}clearFromPos(e){let t;for(t=e;t<Su;t++)this.chars[t].reset()}clear(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()}clearToEndOfRow(){this.clearFromPos(this.pos)}getTextString(){const e=[];let t=!0;for(let n=0;n<Su;n++){const s=this.chars[n].uchar;s!==" "&&(t=!1),e.push(s)}return t?"":e.join("")}setPenStyles(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)}}class k1{constructor(e){this.rows=[],this.currRow=Uo-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(let t=0;t<Uo;t++)this.rows.push(new E4(e));this.logger=e}reset(){for(let e=0;e<Uo;e++)this.rows[e].clear();this.currRow=Uo-1}equals(e){let t=!0;for(let n=0;n<Uo;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t}copy(e){for(let t=0;t<Uo;t++)this.rows[t].copy(e.rows[t])}isEmpty(){let e=!0;for(let t=0;t<Uo;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e}backSpace(){this.rows[this.currRow].backSpace()}clearToEndOfRow(){this.rows[this.currRow].clearToEndOfRow()}insertChar(e){this.rows[this.currRow].insertChar(e)}setPen(e){this.rows[this.currRow].setPenStyles(e)}moveCursor(e){this.rows[this.currRow].moveCursor(e)}setCursor(e){this.logger.log(2,"setCursor: "+e),this.rows[this.currRow].setCursor(e)}setPAC(e){this.logger.log(2,()=>"pacData = "+JSON.stringify(e));let t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(let c=0;c<Uo;c++)this.rows[c].clear();const o=this.currRow+1-this.nrRollUpRows,u=this.lastOutputScreen;if(u){const c=u.rows[o].cueStartTime,h=this.logger.time;if(c!==null&&h!==null&&c<h)for(let m=0;m<this.nrRollUpRows;m++)this.rows[t-this.nrRollUpRows+m+1].copy(u.rows[o+m])}}this.currRow=t;const n=this.rows[this.currRow];if(e.indent!==null){const o=e.indent,u=Math.max(o-1,0);n.setCursor(e.indent),e.color=n.chars[u].penState.foreground}const s={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(s)}setBkgData(e){this.logger.log(2,()=>"bkgData = "+JSON.stringify(e)),this.backSpace(),this.setPen(e),this.insertChar(32)}setRollUpRows(e){this.nrRollUpRows=e}rollUp(){if(this.nrRollUpRows===null){this.logger.log(3,"roll_up but nrRollUpRows not set yet");return}this.logger.log(1,()=>this.getDisplayText());const e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),this.logger.log(2,"Rolling up")}getDisplayText(e){e=e||!1;const t=[];let n="",s=-1;for(let o=0;o<Uo;o++){const u=this.rows[o].getTextString();u&&(s=o+1,e?t.push("Row "+s+": '"+u+"'"):t.push(u.trim()))}return t.length>0&&(e?n="["+t.join(" | ")+"]":n=t.join(`
|
|
291
|
+
`)),n}getTextAndFormat(){return this.rows}}class ZA{constructor(e,t,n){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new k1(n),this.nonDisplayedMemory=new k1(n),this.lastOutputScreen=new k1(n),this.currRollUpRow=this.displayedMemory.rows[Uo-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=n}reset(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[Uo-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}getHandler(){return this.outputFilter}setHandler(e){this.outputFilter=e}setPAC(e){this.writeScreen.setPAC(e)}setBkgData(e){this.writeScreen.setBkgData(e)}setMode(e){e!==this.mode&&(this.mode=e,this.logger.log(2,()=>"MODE="+e),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)}insertChars(e){for(let n=0;n<e.length;n++)this.writeScreen.insertChar(e[n]);const t=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(2,()=>t+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(1,()=>"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())}ccRCL(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}ccBS(){this.logger.log(2,"BS - BackSpace"),this.mode!=="MODE_TEXT"&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}ccAOF(){}ccAON(){}ccDER(){this.logger.log(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}ccRU(e){this.logger.log(2,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)}ccFON(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})}ccRDC(){this.logger.log(2,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}ccTR(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")}ccRTD(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")}ccEDM(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)}ccCR(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)}ccENM(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}ccEOC(){if(this.logger.log(2,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){const e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,this.logger.log(1,()=>"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)}ccTO(e){this.logger.log(2,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)}ccMIDROW(e){const t={flash:!1};if(t.underline=e%2===1,t.italics=e>=46,t.italics)t.foreground="white";else{const n=Math.floor(e/2)-16,s=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=s[n]}this.logger.log(2,"MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)}outputDataUpdate(e=!1){const t=this.logger.time;t!==null&&this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=t:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t),this.lastOutputScreen.copy(this.displayedMemory))}cueSplitAtTime(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))}}class e_{constructor(e,t,n){this.channels=void 0,this.currentChannel=0,this.cmdHistory=n_(),this.logger=void 0;const s=this.logger=new y4;this.channels=[null,new ZA(e,t,s),new ZA(e+1,n,s)]}getHandler(e){return this.channels[e].getHandler()}setHandler(e,t){this.channels[e].setHandler(t)}addData(e,t){let n,s,o,u=!1;this.logger.time=e;for(let c=0;c<t.length;c+=2)if(s=t[c]&127,o=t[c+1]&127,!(s===0&&o===0)){if(this.logger.log(3,"["+lf([t[c],t[c+1]])+"] -> ("+lf([s,o])+")"),n=this.parseCmd(s,o),n||(n=this.parseMidrow(s,o)),n||(n=this.parsePAC(s,o)),n||(n=this.parseBackgroundAttributes(s,o)),!n&&(u=this.parseChars(s,o),u)){const h=this.currentChannel;h&&h>0?this.channels[h].insertChars(u):this.logger.log(2,"No channel found yet. TEXT-MODE?")}!n&&!u&&this.logger.log(2,"Couldn't parse cleaned data "+lf([s,o])+" orig: "+lf([t[c],t[c+1]]))}}parseCmd(e,t){const{cmdHistory:n}=this,s=(e===20||e===28||e===21||e===29)&&t>=32&&t<=47,o=(e===23||e===31)&&t>=33&&t<=35;if(!(s||o))return!1;if(t_(e,t,n))return Vd(null,null,n),this.logger.log(3,"Repeated command ("+lf([e,t])+") is dropped"),!0;const u=e===20||e===21||e===23?1:2,c=this.channels[u];return e===20||e===21||e===28||e===29?t===32?c.ccRCL():t===33?c.ccBS():t===34?c.ccAOF():t===35?c.ccAON():t===36?c.ccDER():t===37?c.ccRU(2):t===38?c.ccRU(3):t===39?c.ccRU(4):t===40?c.ccFON():t===41?c.ccRDC():t===42?c.ccTR():t===43?c.ccRTD():t===44?c.ccEDM():t===45?c.ccCR():t===46?c.ccENM():t===47&&c.ccEOC():c.ccTO(t-32),Vd(e,t,n),this.currentChannel=u,!0}parseMidrow(e,t){let n=0;if((e===17||e===25)&&t>=32&&t<=47){if(e===17?n=1:n=2,n!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;const s=this.channels[n];return s?(s.ccMIDROW(t),this.logger.log(3,"MIDROW ("+lf([e,t])+")"),!0):!1}return!1}parsePAC(e,t){let n;const s=this.cmdHistory,o=(e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127,u=(e===16||e===24)&&t>=64&&t<=95;if(!(o||u))return!1;if(t_(e,t,s))return Vd(null,null,s),!0;const c=e<=23?1:2;t>=64&&t<=95?n=c===1?h4[e]:m4[e]:n=c===1?p4[e]:g4[e];const h=this.channels[c];return h?(h.setPAC(this.interpretPAC(n,t)),Vd(e,t,s),this.currentChannel=c,!0):!1}interpretPAC(e,t){let n;const s={color:null,italics:!1,indent:null,underline:!1,row:e};return t>95?n=t-96:n=t-64,s.underline=(n&1)===1,n<=13?s.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(s.italics=!0,s.color="white"):s.indent=Math.floor((n-16)/2)*4,s}parseChars(e,t){let n,s=null,o=null;if(e>=25?(n=2,o=e-8):(n=1,o=e),o>=17&&o<=19){let u;o===17?u=t+80:o===18?u=t+112:u=t+144,this.logger.log(2,"Special char '"+QA(u)+"' in channel "+n),s=[u]}else e>=32&&e<=127&&(s=t===0?[e]:[e,t]);if(s){const u=lf(s);this.logger.log(3,"Char codes = "+u.join(",")),Vd(e,t,this.cmdHistory)}return s}parseBackgroundAttributes(e,t){const n=(e===16||e===24)&&t>=32&&t<=47,s=(e===23||e===31)&&t>=45&&t<=47;if(!(n||s))return!1;let o;const u={};e===16||e===24?(o=Math.floor((t-32)/2),u.background=v4[o],t%2===1&&(u.background=u.background+"_semi")):t===45?u.background="transparent":(u.foreground="black",t===47&&(u.underline=!0));const c=e<=23?1:2;return this.channels[c].setBkgData(u),Vd(e,t,this.cmdHistory),!0}reset(){for(let e=0;e<Object.keys(this.channels).length;e++){const t=this.channels[e];t&&t.reset()}this.cmdHistory=n_()}cueSplitAtTime(e){for(let t=0;t<this.channels.length;t++){const n=this.channels[t];n&&n.cueSplitAtTime(e)}}}function Vd(r,e,t){t.a=r,t.b=e}function t_(r,e,t){return t.a===r&&t.b===e}function n_(){return{a:null,b:null}}class ov{constructor(e,t){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=e,this.trackName=t}dispatchCue(){this.startTime!==null&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)}newCue(e,t,n){(this.startTime===null||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=n,this.timelineController.createCaptionsTrack(this.trackName)}reset(){this.cueRanges=[],this.startTime=null}}var D1=function(){if(Dd!=null&&Dd.VTTCue)return self.VTTCue;const r=["","lr","rl"],e=["start","middle","end","left","right"];function t(c,h){if(typeof h!="string"||!Array.isArray(c))return!1;const m=h.toLowerCase();return~c.indexOf(m)?m:!1}function n(c){return t(r,c)}function s(c){return t(e,c)}function o(c,...h){let m=1;for(;m<arguments.length;m++){const y=arguments[m];for(const E in y)c[E]=y[E]}return c}function u(c,h,m){const y=this,E={enumerable:!0};y.hasBeenReset=!1;let T="",R=!1,_=c,L=h,M=m,F=null,Z="",K=!0,Y="auto",X="start",ue=50,ie="middle",ye=50,de="middle";Object.defineProperty(y,"id",o({},E,{get:function(){return T},set:function(Re){T=""+Re}})),Object.defineProperty(y,"pauseOnExit",o({},E,{get:function(){return R},set:function(Re){R=!!Re}})),Object.defineProperty(y,"startTime",o({},E,{get:function(){return _},set:function(Re){if(typeof Re!="number")throw new TypeError("Start time must be set to a number.");_=Re,this.hasBeenReset=!0}})),Object.defineProperty(y,"endTime",o({},E,{get:function(){return L},set:function(Re){if(typeof Re!="number")throw new TypeError("End time must be set to a number.");L=Re,this.hasBeenReset=!0}})),Object.defineProperty(y,"text",o({},E,{get:function(){return M},set:function(Re){M=""+Re,this.hasBeenReset=!0}})),Object.defineProperty(y,"region",o({},E,{get:function(){return F},set:function(Re){F=Re,this.hasBeenReset=!0}})),Object.defineProperty(y,"vertical",o({},E,{get:function(){return Z},set:function(Re){const Ce=n(Re);if(Ce===!1)throw new SyntaxError("An invalid or illegal string was specified.");Z=Ce,this.hasBeenReset=!0}})),Object.defineProperty(y,"snapToLines",o({},E,{get:function(){return K},set:function(Re){K=!!Re,this.hasBeenReset=!0}})),Object.defineProperty(y,"line",o({},E,{get:function(){return Y},set:function(Re){if(typeof Re!="number"&&Re!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");Y=Re,this.hasBeenReset=!0}})),Object.defineProperty(y,"lineAlign",o({},E,{get:function(){return X},set:function(Re){const Ce=s(Re);if(!Ce)throw new SyntaxError("An invalid or illegal string was specified.");X=Ce,this.hasBeenReset=!0}})),Object.defineProperty(y,"position",o({},E,{get:function(){return ue},set:function(Re){if(Re<0||Re>100)throw new Error("Position must be between 0 and 100.");ue=Re,this.hasBeenReset=!0}})),Object.defineProperty(y,"positionAlign",o({},E,{get:function(){return ie},set:function(Re){const Ce=s(Re);if(!Ce)throw new SyntaxError("An invalid or illegal string was specified.");ie=Ce,this.hasBeenReset=!0}})),Object.defineProperty(y,"size",o({},E,{get:function(){return ye},set:function(Re){if(Re<0||Re>100)throw new Error("Size must be between 0 and 100.");ye=Re,this.hasBeenReset=!0}})),Object.defineProperty(y,"align",o({},E,{get:function(){return de},set:function(Re){const Ce=s(Re);if(!Ce)throw new SyntaxError("An invalid or illegal string was specified.");de=Ce,this.hasBeenReset=!0}})),y.displayState=void 0}return u.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},u}();class x4{decode(e,t){if(!e)return"";if(typeof e!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}function r_(r){function e(n,s,o,u){return(n|0)*3600+(s|0)*60+(o|0)+parseFloat(u||0)}const t=r.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return t?parseFloat(t[2])>59?e(t[2],t[3],0,t[4]):e(t[1],t[2],t[3],t[4]):null}class b4{constructor(){this.values=Object.create(null)}set(e,t){!this.get(e)&&t!==""&&(this.values[e]=t)}get(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t}has(e){return e in this.values}alt(e,t,n){for(let s=0;s<n.length;++s)if(t===n[s]){this.set(e,t);break}}integer(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))}percent(e,t){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(t)){const n=parseFloat(t);if(n>=0&&n<=100)return this.set(e,n),!0}return!1}}function i_(r,e,t,n){const s=n?r.split(n):[r];for(const o in s){if(typeof s[o]!="string")continue;const u=s[o].split(t);if(u.length!==2)continue;const c=u[0],h=u[1];e(c,h)}}const I1=new D1(0,0,""),lv=I1.align==="middle"?"middle":"center";function T4(r,e,t){const n=r;function s(){const c=r_(r);if(c===null)throw new Error("Malformed timestamp: "+n);return r=r.replace(/^[^\sa-zA-Z-]+/,""),c}function o(c,h){const m=new b4;i_(c,function(T,R){let _;switch(T){case"region":for(let L=t.length-1;L>=0;L--)if(t[L].id===R){m.set(T,t[L].region);break}break;case"vertical":m.alt(T,R,["rl","lr"]);break;case"line":_=R.split(","),m.integer(T,_[0]),m.percent(T,_[0])&&m.set("snapToLines",!1),m.alt(T,_[0],["auto"]),_.length===2&&m.alt("lineAlign",_[1],["start",lv,"end"]);break;case"position":_=R.split(","),m.percent(T,_[0]),_.length===2&&m.alt("positionAlign",_[1],["start",lv,"end","line-left","line-right","auto"]);break;case"size":m.percent(T,R);break;case"align":m.alt(T,R,["start",lv,"end","left","right"]);break}},/:/,/\s/),h.region=m.get("region",null),h.vertical=m.get("vertical","");let y=m.get("line","auto");y==="auto"&&I1.line===-1&&(y=-1),h.line=y,h.lineAlign=m.get("lineAlign","start"),h.snapToLines=m.get("snapToLines",!0),h.size=m.get("size",100),h.align=m.get("align",lv);let E=m.get("position","auto");E==="auto"&&I1.position===50&&(E=h.align==="start"||h.align==="left"?0:h.align==="end"||h.align==="right"?100:50),h.position=E}function u(){r=r.replace(/^\s+/,"")}if(u(),e.startTime=s(),u(),r.slice(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+n);r=r.slice(3),u(),e.endTime=s(),u(),o(r,e)}function s_(r){return r.replace(/<br(?: \/)?>/gi,`
|
|
292
|
+
`)}class w4{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new x4,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}parse(e){const t=this;e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));function n(){let o=t.buffer,u=0;for(o=s_(o);u<o.length&&o[u]!=="\r"&&o[u]!==`
|
|
293
|
+
`;)++u;const c=o.slice(0,u);return o[u]==="\r"&&++u,o[u]===`
|
|
294
|
+
`&&++u,t.buffer=o.slice(u),c}function s(o){i_(o,function(u,c){},/:/)}try{let o="";if(t.state==="INITIAL"){if(!/\r\n|\n/.test(t.buffer))return this;o=n();const c=o.match(/^()?WEBVTT([ \t].*)?$/);if(!(c!=null&&c[0]))throw new Error("Malformed WebVTT signature.");t.state="HEADER"}let u=!1;for(;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(u?u=!1:o=n(),t.state){case"HEADER":/:/.test(o)?s(o):o||(t.state="ID");continue;case"NOTE":o||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(o)){t.state="NOTE";break}if(!o)continue;if(t.cue=new D1(0,0,""),t.state="CUE",o.indexOf("-->")===-1){t.cue.id=o;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{T4(o,t.cue,t.regionList)}catch{t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":{const c=o.indexOf("-->")!==-1;if(!o||c&&(u=!0)){t.oncue&&t.cue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}if(t.cue===null)continue;t.cue.text&&(t.cue.text+=`
|
|
295
|
+
`),t.cue.text+=o}continue;case"BADCUE":o||(t.state="ID")}}}catch{t.state==="CUETEXT"&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=t.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this}flush(){const e=this;try{if((e.cue||e.state==="HEADER")&&(e.buffer+=`
|
|
296
|
+
|
|
297
|
+
`,e.parse()),e.state==="INITIAL"||e.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(t){e.onparsingerror&&e.onparsingerror(t)}return e.onflush&&e.onflush(),this}}const C4=/\r\n|\n\r|\n|\r/g,P1=function(e,t,n=0){return e.slice(n,n+t.length)===t},R4=function(e){let t=parseInt(e.slice(-3));const n=parseInt(e.slice(-6,-4)),s=parseInt(e.slice(-9,-7)),o=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!Bt(t)||!Bt(n)||!Bt(s)||!Bt(o))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return t+=1e3*n,t+=60*1e3*s,t+=60*60*1e3*o,t},M1=function(e){let t=5381,n=e.length;for(;n;)t=t*33^e.charCodeAt(--n);return(t>>>0).toString()};function O1(r,e,t){return M1(r.toString())+M1(e.toString())+M1(t)}const A4=function(e,t,n){let s=e[t],o=e[s.prevCC];if(!o||!o.new&&s.new){e.ccOffset=e.presentationOffset=s.start,s.new=!1;return}for(;(u=o)!=null&&u.new;){var u;e.ccOffset+=s.start-o.start,s.new=!1,s=o,o=e[s.prevCC]}e.presentationOffset=n};function _4(r,e,t,n,s,o,u){const c=new w4,h=El(new Uint8Array(r)).trim().replace(C4,`
|
|
298
|
+
`).split(`
|
|
299
|
+
`),m=[],y=e?q$(e.baseTime,e.timescale):0;let E="00:00.000",T=0,R=0,_,L=!0;c.oncue=function(M){const F=t[n];let Z=t.ccOffset;const K=(T-y)/9e4;if(F!=null&&F.new&&(R!==void 0?Z=t.ccOffset=F.start:A4(t,n,K)),K){if(!e){_=new Error("Missing initPTS for VTT MPEGTS");return}Z=K-t.presentationOffset}const Y=M.endTime-M.startTime,X=oo((M.startTime+Z-R)*9e4,s*9e4)/9e4;M.startTime=Math.max(X,0),M.endTime=Math.max(X+Y,0);const ue=M.text.trim();M.text=decodeURIComponent(encodeURIComponent(ue)),M.id||(M.id=O1(M.startTime,M.endTime,ue)),M.endTime>0&&m.push(M)},c.onparsingerror=function(M){_=M},c.onflush=function(){if(_){u(_);return}o(m)},h.forEach(M=>{if(L)if(P1(M,"X-TIMESTAMP-MAP=")){L=!1,M.slice(16).split(",").forEach(F=>{P1(F,"LOCAL:")?E=F.slice(6):P1(F,"MPEGTS:")&&(T=parseInt(F.slice(7)))});try{R=R4(E)/1e3}catch(F){_=F}return}else M===""&&(L=!1);c.parse(M+`
|
|
300
|
+
`)}),c.flush()}const F1="stpp.ttml.im1t",a_=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,o_=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,L4={left:"start",center:"center",right:"end",start:"start",end:"end"};function l_(r,e,t,n){const s=xn(new Uint8Array(r),["mdat"]);if(s.length===0){n(new Error("Could not parse IMSC1 mdat"));return}const o=s.map(c=>El(c)),u=K$(e.baseTime,1,e.timescale);try{o.forEach(c=>t(k4(c,u)))}catch(c){n(c)}}function k4(r,e){const s=new DOMParser().parseFromString(r,"text/xml").getElementsByTagName("tt")[0];if(!s)throw new Error("Invalid ttml");const o={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},u=Object.keys(o).reduce((E,T)=>(E[T]=s.getAttribute(`ttp:${T}`)||o[T],E),{}),c=s.getAttribute("xml:space")!=="preserve",h=u_(N1(s,"styling","style")),m=u_(N1(s,"layout","region")),y=N1(s,"body","[begin]");return[].map.call(y,E=>{const T=c_(E,c);if(!T||!E.hasAttribute("begin"))return null;const R=B1(E.getAttribute("begin"),u),_=B1(E.getAttribute("dur"),u);let L=B1(E.getAttribute("end"),u);if(R===null)throw f_(E);if(L===null){if(_===null)throw f_(E);L=R+_}const M=new D1(R-e,L-e,T);M.id=O1(M.startTime,M.endTime,M.text);const F=m[E.getAttribute("region")],Z=h[E.getAttribute("style")],K=D4(F,Z,h),{textAlign:Y}=K;if(Y){const X=L4[Y];X&&(M.lineAlign=X),M.align=Y}return Ii(M,K),M}).filter(E=>E!==null)}function N1(r,e,t){const n=r.getElementsByTagName(e)[0];return n?[].slice.call(n.querySelectorAll(t)):[]}function u_(r){return r.reduce((e,t)=>{const n=t.getAttribute("xml:id");return n&&(e[n]=t),e},{})}function c_(r,e){return[].slice.call(r.childNodes).reduce((t,n,s)=>{var o;return n.nodeName==="br"&&s?t+`
|
|
301
|
+
`:(o=n.childNodes)!=null&&o.length?c_(n,e):e?t+n.textContent.trim().replace(/\s+/g," "):t+n.textContent},"")}function D4(r,e,t){const n="http://www.w3.org/ns/ttml#styling";let s=null;const o=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],u=r!=null&&r.hasAttribute("style")?r.getAttribute("style"):null;return u&&t.hasOwnProperty(u)&&(s=t[u]),o.reduce((c,h)=>{const m=U1(e,n,h)||U1(r,n,h)||U1(s,n,h);return m&&(c[h]=m),c},{})}function U1(r,e,t){return r&&r.hasAttributeNS(e,t)?r.getAttributeNS(e,t):null}function f_(r){return new Error(`Could not parse ttml timestamp ${r}`)}function B1(r,e){if(!r)return null;let t=r_(r);return t===null&&(a_.test(r)?t=I4(r,e):o_.test(r)&&(t=P4(r,e))),t}function I4(r,e){const t=a_.exec(r),n=(t[4]|0)+(t[5]|0)/e.subFrameRate;return(t[1]|0)*3600+(t[2]|0)*60+(t[3]|0)+n/e.frameRate}function P4(r,e){const t=o_.exec(r),n=Number(t[1]);switch(t[2]){case"h":return n*3600;case"m":return n*60;case"ms":return n*1e3;case"f":return n/e.frameRate;case"t":return n/e.tickRate}return n}class M4{constructor(e){this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=p_(),this.captionsProperties=void 0,this.hls=e,this.config=e.config,this.Cues=e.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},e.on(V.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(V.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(V.MANIFEST_LOADING,this.onManifestLoading,this),e.on(V.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(V.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(V.FRAG_LOADING,this.onFragLoading,this),e.on(V.FRAG_LOADED,this.onFragLoaded,this),e.on(V.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(V.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(V.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(V.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(V.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(V.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(V.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(V.MANIFEST_LOADING,this.onManifestLoading,this),e.off(V.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(V.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(V.FRAG_LOADING,this.onFragLoading,this),e.off(V.FRAG_LOADED,this.onFragLoaded,this),e.off(V.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(V.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(V.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(V.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(V.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=null,this.cea608Parser1=this.cea608Parser2=void 0}initCea608Parsers(){if(this.config.enableCEA708Captions&&(!this.cea608Parser1||!this.cea608Parser2)){const e=new ov(this,"textTrack1"),t=new ov(this,"textTrack2"),n=new ov(this,"textTrack3"),s=new ov(this,"textTrack4");this.cea608Parser1=new e_(1,e,t),this.cea608Parser2=new e_(3,n,s)}}addCues(e,t,n,s,o){let u=!1;for(let c=o.length;c--;){const h=o[c],m=O4(h[0],h[1],t,n);if(m>=0&&(h[0]=Math.min(h[0],t),h[1]=Math.max(h[1],n),u=!0,m/(n-t)>.5))return}if(u||o.push([t,n]),this.config.renderTextTracksNatively){const c=this.captionsTracks[e];this.Cues.newCue(c,t,n,s)}else{const c=this.Cues.newCue(null,t,n,s);this.hls.trigger(V.CUES_PARSED,{type:"captions",cues:c,track:e})}}onInitPtsFound(e,{frag:t,id:n,initPTS:s,timescale:o}){const{unparsedVttFrags:u}=this;n==="main"&&(this.initPTS[t.cc]={baseTime:s,timescale:o}),u.length&&(this.unparsedVttFrags=[],u.forEach(c=>{this.onFragLoaded(V.FRAG_LOADED,c)}))}getExistingTrack(e,t){const{media:n}=this;if(n)for(let s=0;s<n.textTracks.length;s++){const o=n.textTracks[s];if(h_(o,{name:e,lang:t,attrs:{}}))return o}return null}createCaptionsTrack(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)}createNativeTrack(e){if(this.captionsTracks[e])return;const{captionsProperties:t,captionsTracks:n,media:s}=this,{label:o,languageCode:u}=t[e],c=this.getExistingTrack(o,u);if(c)n[e]=c,Id(n[e]),eA(n[e],s);else{const h=this.createTextTrack("captions",o,u);h&&(h[e]=!0,n[e]=h)}}createNonNativeTrack(e){if(this.nonNativeCaptionsTracks[e])return;const t=this.captionsProperties[e];if(!t)return;const n=t.label,s={_id:e,label:n,kind:"captions",default:t.media?!!t.media.default:!1,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=s,this.hls.trigger(V.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[s]})}createTextTrack(e,t,n){const s=this.media;if(s)return s.addTextTrack(e,t,n)}onMediaAttaching(e,t){this.media=t.media,this._cleanTracks()}onMediaDetaching(){const{captionsTracks:e}=this;Object.keys(e).forEach(t=>{Id(e[t]),delete e[t]}),this.nonNativeCaptionsTracks={}}onManifestLoading(){this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=p_(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=[],this.initPTS=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())}_cleanTracks(){const{media:e}=this;if(!e)return;const t=e.textTracks;if(t)for(let n=0;n<t.length;n++)Id(t[n])}onSubtitleTracksUpdated(e,t){const n=t.subtitleTracks||[],s=n.some(o=>o.textCodec===F1);if(this.config.enableWebVTT||s&&this.config.enableIMSC1){if(GA(this.tracks,n)){this.tracks=n;return}if(this.textTracks=[],this.tracks=n,this.config.renderTextTracksNatively){const u=this.media,c=u?Gg(u.textTracks):null;if(this.tracks.forEach((h,m)=>{let y;if(c){let E=null;for(let T=0;T<c.length;T++)if(c[T]&&h_(c[T],h)){E=c[T],c[T]=null;break}E&&(y=E)}if(y)Id(y);else{const E=d_(h);y=this.createTextTrack(E,h.name,h.lang),y&&(y.mode="disabled")}y&&this.textTracks.push(y)}),c!=null&&c.length){const h=c.filter(m=>m!==null).map(m=>m.label);h.length&&Fe.warn(`Media element contains unused subtitle tracks: ${h.join(", ")}. Replace media element for each source to clear TextTracks and captions menu.`)}}else if(this.tracks.length){const u=this.tracks.map(c=>({label:c.name,kind:c.type.toLowerCase(),default:c.default,subtitleTrack:c}));this.hls.trigger(V.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:u})}}}onManifestLoaded(e,t){this.config.enableCEA708Captions&&t.captions&&t.captions.forEach(n=>{const s=/(?:CC|SERVICE)([1-4])/.exec(n.instreamId);if(!s)return;const o=`textTrack${s[1]}`,u=this.captionsProperties[o];u&&(u.label=n.name,n.lang&&(u.languageCode=n.lang),u.media=n)})}closedCaptionsForLevel(e){const t=this.hls.levels[e.level];return t==null?void 0:t.attrs["CLOSED-CAPTIONS"]}onFragLoading(e,t){this.initCea608Parsers();const{cea608Parser1:n,cea608Parser2:s,lastCc:o,lastSn:u,lastPartIndex:c}=this;if(!(!this.enabled||!n||!s)&&t.frag.type===ln.MAIN){var h,m;const{cc:y,sn:E}=t.frag,T=(h=t==null||(m=t.part)==null?void 0:m.index)!=null?h:-1;E===u+1||E===u&&T===c+1||y===o||(n.reset(),s.reset()),this.lastCc=y,this.lastSn=E,this.lastPartIndex=T}}onFragLoaded(e,t){const{frag:n,payload:s}=t;if(n.type===ln.SUBTITLE)if(s.byteLength){const o=n.decryptdata,u="stats"in t;if(o==null||!o.encrypted||u){const c=this.tracks[n.level],h=this.vttCCs;h[n.cc]||(h[n.cc]={start:n.start,prevCC:this.prevCC,new:!0},this.prevCC=n.cc),c&&c.textCodec===F1?this._parseIMSC1(n,s):this._parseVTTs(t)}}else this.hls.trigger(V.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,t){const n=this.hls;l_(t,this.initPTS[e.cc],s=>{this._appendCues(s,e.level),n.trigger(V.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})},s=>{Fe.log(`Failed to parse IMSC1: ${s}`),n.trigger(V.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:s})})}_parseVTTs(e){var t;const{frag:n,payload:s}=e,{initPTS:o,unparsedVttFrags:u}=this,c=o.length-1;if(!o[n.cc]&&c===-1){u.push(e);return}const h=this.hls,m=(t=n.initSegment)!=null&&t.data?ao(n.initSegment.data,new Uint8Array(s)):s;_4(m,this.initPTS[n.cc],this.vttCCs,n.cc,n.start,y=>{this._appendCues(y,n.level),h.trigger(V.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:n})},y=>{const E=y.message==="Missing initPTS for VTT MPEGTS";E?u.push(e):this._fallbackToIMSC1(n,s),Fe.log(`Failed to parse VTT cue: ${y}`),!(E&&c>n.cc)&&h.trigger(V.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:y})})}_fallbackToIMSC1(e,t){const n=this.tracks[e.level];n.textCodec||l_(t,this.initPTS[e.cc],()=>{n.textCodec=F1,this._parseIMSC1(e,t)},()=>{n.textCodec="wvtt"})}_appendCues(e,t){const n=this.hls;if(this.config.renderTextTracksNatively){const s=this.textTracks[t];if(!s||s.mode==="disabled")return;e.forEach(o=>tA(s,o))}else{const s=this.tracks[t];if(!s)return;const o=s.default?"default":"subtitles"+t;n.trigger(V.CUES_PARSED,{type:"subtitles",cues:e,track:o})}}onFragDecrypted(e,t){const{frag:n}=t;n.type===ln.SUBTITLE&&this.onFragLoaded(V.FRAG_LOADED,t)}onSubtitleTracksCleared(){this.tracks=[],this.captionsTracks={}}onFragParsingUserdata(e,t){this.initCea608Parsers();const{cea608Parser1:n,cea608Parser2:s}=this;if(!this.enabled||!n||!s)return;const{frag:o,samples:u}=t;if(!(o.type===ln.MAIN&&this.closedCaptionsForLevel(o)==="NONE"))for(let c=0;c<u.length;c++){const h=u[c].bytes;if(h){const m=this.extractCea608Data(h);n.addData(u[c].pts,m[0]),s.addData(u[c].pts,m[1])}}}onBufferFlushing(e,{startOffset:t,endOffset:n,endOffsetSubtitles:s,type:o}){const{media:u}=this;if(!(!u||u.currentTime<n)){if(!o||o==="video"){const{captionsTracks:c}=this;Object.keys(c).forEach(h=>l1(c[h],t,n))}if(this.config.renderTextTracksNatively&&t===0&&s!==void 0){const{textTracks:c}=this;Object.keys(c).forEach(h=>l1(c[h],t,s))}}}extractCea608Data(e){const t=[[],[]],n=e[0]&31;let s=2;for(let o=0;o<n;o++){const u=e[s++],c=127&e[s++],h=127&e[s++];if(c===0&&h===0)continue;if((4&u)!==0){const y=3&u;(y===0||y===1)&&(t[y].push(c),t[y].push(h))}}return t}}function d_(r){return r.characteristics&&/transcribes-spoken-dialog/gi.test(r.characteristics)&&/describes-music-and-sound/gi.test(r.characteristics)?"captions":"subtitles"}function h_(r,e){return!!r&&r.kind===d_(e)&&L1(e,r)}function O4(r,e,t,n){return Math.min(e,n)-Math.max(r,t)}function p_(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}}}class $1{constructor(e){this.hls=void 0,this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.clientRect=void 0,this.streamController=void 0,this.hls=e,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}setStreamController(e){this.streamController=e}destroy(){this.hls&&this.unregisterListener(),this.timer&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null}registerListeners(){const{hls:e}=this;e.on(V.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(V.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(V.MANIFEST_PARSED,this.onManifestParsed,this),e.on(V.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(V.BUFFER_CODECS,this.onBufferCodecs,this),e.on(V.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(V.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(V.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(V.MANIFEST_PARSED,this.onManifestParsed,this),e.off(V.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(V.BUFFER_CODECS,this.onBufferCodecs,this),e.off(V.MEDIA_DETACHING,this.onMediaDetaching,this)}onFpsDropLevelCapping(e,t){const n=this.hls.levels[t.droppedLevel];this.isLevelAllowed(n)&&this.restrictedLevels.push({bitrate:n.bitrate,height:n.height,width:n.width})}onMediaAttaching(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null,this.clientRect=null,this.timer&&this.hls.levels.length&&this.detectPlayerSize()}onManifestParsed(e,t){const n=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,n.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onLevelsUpdated(e,t){this.timer&&Bt(this.autoLevelCapping)&&this.detectPlayerSize()}onBufferCodecs(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onMediaDetaching(){this.stopCapping()}detectPlayerSize(){if(this.media){if(this.mediaHeight<=0||this.mediaWidth<=0){this.clientRect=null;return}const e=this.hls.levels;if(e.length){const t=this.hls,n=this.getMaxLevel(e.length-1);n!==this.autoLevelCapping&&Fe.log(`Setting autoLevelCapping to ${n}: ${e[n].height}p@${e[n].bitrate} for media ${this.mediaWidth}x${this.mediaHeight}`),t.autoLevelCapping=n,t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}}getMaxLevel(e){const t=this.hls.levels;if(!t.length)return-1;const n=t.filter((s,o)=>this.isLevelAllowed(s)&&o<=e);return this.clientRect=null,$1.getMaxLevelByMediaSize(n,this.mediaWidth,this.mediaHeight)}startCapping(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())}stopCapping(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)}getDimensions(){if(this.clientRect)return this.clientRect;const e=this.media,t={width:0,height:0};if(e){const n=e.getBoundingClientRect();t.width=n.width,t.height=n.height,!t.width&&!t.height&&(t.width=n.right-n.left||e.width||0,t.height=n.bottom-n.top||e.height||0)}return this.clientRect=t,t}get mediaWidth(){return this.getDimensions().width*this.contentScaleFactor}get mediaHeight(){return this.getDimensions().height*this.contentScaleFactor}get contentScaleFactor(){let e=1;if(!this.hls.config.ignoreDevicePixelRatio)try{e=self.devicePixelRatio}catch{}return e}isLevelAllowed(e){return!this.restrictedLevels.some(n=>e.bitrate===n.bitrate&&e.width===n.width&&e.height===n.height)}static getMaxLevelByMediaSize(e,t,n){if(!(e!=null&&e.length))return-1;const s=(c,h)=>h?c.width!==h.width||c.height!==h.height:!0;let o=e.length-1;const u=Math.max(t,n);for(let c=0;c<e.length;c+=1){const h=e[c];if((h.width>=u||h.height>=u)&&s(h,e[c+1])){o=c;break}}return o}}class F4{constructor(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}setStreamController(e){this.streamController=e}registerListeners(){this.hls.on(V.MEDIA_ATTACHING,this.onMediaAttaching,this)}unregisterListeners(){this.hls.off(V.MEDIA_ATTACHING,this.onMediaAttaching,this)}destroy(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null}onMediaAttaching(e,t){const n=this.hls.config;if(n.capLevelOnFPSDrop){const s=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=s,s&&typeof s.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),n.fpsDroppedMonitoringPeriod)}}checkFPS(e,t,n){const s=performance.now();if(t){if(this.lastTime){const o=s-this.lastTime,u=n-this.lastDroppedFrames,c=t-this.lastDecodedFrames,h=1e3*u/o,m=this.hls;if(m.trigger(V.FPS_DROP,{currentDropped:u,currentDecoded:c,totalDroppedFrames:n}),h>0&&u>m.config.fpsDroppedMonitoringThreshold*c){let y=m.currentLevel;Fe.warn("drop FPS ratio greater than max allowed value for currentLevel: "+y),y>0&&(m.autoLevelCapping===-1||m.autoLevelCapping>=y)&&(y=y-1,m.trigger(V.FPS_DROP_LEVEL_CAPPING,{level:y,droppedLevel:m.currentLevel}),m.autoLevelCapping=y,this.streamController.nextLevelSwitch())}}this.lastTime=s,this.lastDroppedFrames=n,this.lastDecodedFrames=t}}checkFPSInterval(){const e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){const t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)}}const uv="[eme]";class zd{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.setMediaKeysQueue=zd.CDMCleanupPromise?[zd.CDMCleanupPromise]:[],this.onMediaEncrypted=this._onMediaEncrypted.bind(this),this.onWaitingForKey=this._onWaitingForKey.bind(this),this.debug=Fe.debug.bind(Fe,uv),this.log=Fe.log.bind(Fe,uv),this.warn=Fe.warn.bind(Fe,uv),this.error=Fe.error.bind(Fe,uv),this.hls=e,this.config=e.config,this.registerListeners()}destroy(){this.unregisterListeners(),this.onMediaDetached();const e=this.config;e.requestMediaKeySystemAccessFunc=null,e.licenseXhrSetup=e.licenseResponseCallback=void 0,e.drmSystems=e.drmSystemOptions={},this.hls=this.onMediaEncrypted=this.onWaitingForKey=this.keyIdToKeySessionPromise=null,this.config=null}registerListeners(){this.hls.on(V.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(V.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(V.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(V.MANIFEST_LOADED,this.onManifestLoaded,this)}unregisterListeners(){this.hls.off(V.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(V.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(V.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(V.MANIFEST_LOADED,this.onManifestLoaded,this)}getLicenseServerUrl(e){const{drmSystems:t,widevineLicenseUrl:n}=this.config,s=t[e];if(s)return s.licenseUrl;if(e===Br.WIDEVINE&&n)return n;throw new Error(`no license server URL configured for key-system "${e}"`)}getServerCertificateUrl(e){const{drmSystems:t}=this.config,n=t[e];if(n)return n.serverCertificateUrl;this.log(`No Server Certificate in config.drmSystems["${e}"]`)}attemptKeySystemAccess(e){const t=this.hls.levels,n=(u,c,h)=>!!u&&h.indexOf(u)===c,s=t.map(u=>u.audioCodec).filter(n),o=t.map(u=>u.videoCodec).filter(n);return s.length+o.length===0&&o.push("avc1.42e01e"),new Promise((u,c)=>{const h=m=>{const y=m.shift();this.getMediaKeysPromise(y,s,o).then(E=>u({keySystem:y,mediaKeys:E})).catch(E=>{m.length?h(m):E instanceof lo?c(E):c(new lo({type:cn.KEY_SYSTEM_ERROR,details:qe.KEY_SYSTEM_NO_ACCESS,error:E,fatal:!0},E.message))})};h(e)})}requestMediaKeySystemAccess(e,t){const{requestMediaKeySystemAccessFunc:n}=this.config;if(typeof n!="function"){let s=`Configured requestMediaKeySystemAccess is not a function ${n}`;return CR===null&&self.location.protocol==="http:"&&(s=`navigator.requestMediaKeySystemAccess is not available over insecure protocol ${location.protocol}`),Promise.reject(new Error(s))}return n(e,t)}getMediaKeysPromise(e,t,n){const s=KB(e,t,n,this.config.drmSystemOptions),o=this.keySystemAccessPromises[e];let u=o==null?void 0:o.keySystemAccess;if(!u){this.log(`Requesting encrypted media "${e}" key-system access with config: ${JSON.stringify(s)}`),u=this.requestMediaKeySystemAccess(e,s);const c=this.keySystemAccessPromises[e]={keySystemAccess:u};return u.catch(h=>{this.log(`Failed to obtain access to key-system "${e}": ${h}`)}),u.then(h=>{this.log(`Access for key-system "${h.keySystem}" obtained`);const m=this.fetchServerCertificate(e);return this.log(`Create media-keys for "${e}"`),c.mediaKeys=h.createMediaKeys().then(y=>(this.log(`Media-keys created for "${e}"`),m.then(E=>E?this.setMediaKeysServerCertificate(y,e,E):y))),c.mediaKeys.catch(y=>{this.error(`Failed to create media-keys for "${e}"}: ${y}`)}),c.mediaKeys})}return u.then(()=>o.mediaKeys)}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:n}){this.log(`Creating key-system session "${t}" keyId: ${xl.hexDump(e.keyId||[])}`);const s=n.createSession(),o={decryptdata:e,keySystem:t,mediaKeys:n,mediaKeysSession:s,keyStatus:"status-pending"};return this.mediaKeySessions.push(o),o}renewKeySession(e){const t=e.decryptdata;if(t.pssh){const n=this.createMediaKeySessionContext(e),s=this.getKeyIdString(t),o="cenc";this.keyIdToKeySessionPromise[s]=this.generateRequestWithPreferredKeySession(n,o,t.pssh,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(e)}getKeyIdString(e){if(!e)throw new Error("Could not read keyId of undefined decryptdata");if(e.keyId===null)throw new Error("keyId is null");return xl.hexDump(e.keyId)}updateKeySession(e,t){var n;const s=e.mediaKeysSession;return this.log(`Updating key-session "${s.sessionId}" for keyID ${xl.hexDump(((n=e.decryptdata)==null?void 0:n.keyId)||[])}
|
|
302
|
+
} (data length: ${t&&t.byteLength})`),s.update(t)}selectKeySystemFormat(e){const t=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log(`Selecting key-system from fragment (sn: ${e.sn} ${e.type}: ${e.level}) key formats ${t.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(t)),this.keyFormatPromise}getKeyFormatPromise(e){return new Promise((t,n)=>{const s=JS(this.config),o=e.map(bR).filter(u=>!!u&&s.indexOf(u)!==-1);return this.getKeySystemSelectionPromise(o).then(({keySystem:u})=>{const c=wR(u);c?t(c):n(new Error(`Unable to find format for key-system "${u}"`))}).catch(n)})}loadKey(e){const t=e.keyInfo.decryptdata,n=this.getKeyIdString(t),s=`(keyId: ${n} format: "${t.keyFormat}" method: ${t.method} uri: ${t.uri})`;this.log(`Starting session for key ${s}`);let o=this.keyIdToKeySessionPromise[n];return o||(o=this.keyIdToKeySessionPromise[n]=this.getKeySystemForKeyPromise(t).then(({keySystem:u,mediaKeys:c})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${s}`),this.attemptSetMediaKeys(u,c).then(()=>{this.throwIfDestroyed();const h=this.createMediaKeySessionContext({keySystem:u,mediaKeys:c,decryptdata:t});return this.generateRequestWithPreferredKeySession(h,"cenc",t.pssh,"playlist-key")}))),o.catch(u=>this.handleError(u))),o}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e){this.hls&&(this.error(e.message),e instanceof lo?this.hls.trigger(V.ERROR,e.data):this.hls.trigger(V.ERROR,{type:cn.KEY_SYSTEM_ERROR,details:qe.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))}getKeySystemForKeyPromise(e){const t=this.getKeyIdString(e),n=this.keyIdToKeySessionPromise[t];if(!n){const s=bR(e.keyFormat),o=s?[s]:JS(this.config);return this.attemptKeySystemAccess(o)}return n}getKeySystemSelectionPromise(e){if(e.length||(e=JS(this.config)),e.length===0)throw new lo({type:cn.KEY_SYSTEM_ERROR,details:qe.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${JSON.stringify({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(e)}_onMediaEncrypted(e){const{initDataType:t,initData:n}=e;if(this.debug(`"${e.type}" event: init data type: "${t}"`),n===null)return;let s,o;if(t==="sinf"&&this.config.drmSystems[Br.FAIRPLAY]){const y=$i(new Uint8Array(n));try{const E=XS(JSON.parse(y).sinf),T=MR(new Uint8Array(E));if(!T)return;s=T.subarray(8,24),o=Br.FAIRPLAY}catch{this.warn('Failed to parse sinf "encrypted" event message initData');return}}else{const y=y3(n);if(y===null)return;y.version===0&&y.systemId===TR.WIDEVINE&&y.data&&(s=y.data.subarray(8,24)),o=WB(y.systemId)}if(!o||!s)return;const u=xl.hexDump(s),{keyIdToKeySessionPromise:c,mediaKeySessions:h}=this;let m=c[u];for(let y=0;y<h.length;y++){const E=h[y],T=E.decryptdata;if(T.pssh||!T.keyId)continue;const R=xl.hexDump(T.keyId);if(u===R||T.uri.replace(/-/g,"").indexOf(u)!==-1){m=c[R],delete c[R],T.pssh=new Uint8Array(n),T.keyId=s,m=c[u]=m.then(()=>this.generateRequestWithPreferredKeySession(E,t,n,"encrypted-event-key-match"));break}}m||(m=c[u]=this.getKeySystemSelectionPromise([o]).then(({keySystem:y,mediaKeys:E})=>{var T;this.throwIfDestroyed();const R=new hp("ISO-23001-7",u,(T=wR(y))!=null?T:"");return R.pssh=new Uint8Array(n),R.keyId=s,this.attemptSetMediaKeys(y,E).then(()=>{this.throwIfDestroyed();const _=this.createMediaKeySessionContext({decryptdata:R,keySystem:y,mediaKeys:E});return this.generateRequestWithPreferredKeySession(_,t,n,"encrypted-event-no-match")})})),m.catch(y=>this.handleError(y))}_onWaitingForKey(e){this.log(`"${e.type}" event`)}attemptSetMediaKeys(e,t){const n=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);const s=Promise.all(n).then(()=>{if(!this.media)throw new Error("Attempted to set mediaKeys without media element attached");return this.media.setMediaKeys(t)});return this.setMediaKeysQueue.push(s),s.then(()=>{this.log(`Media-keys set for "${e}"`),n.push(s),this.setMediaKeysQueue=this.setMediaKeysQueue.filter(o=>n.indexOf(o)===-1)})}generateRequestWithPreferredKeySession(e,t,n,s){var o,u;const c=(o=this.config.drmSystems)==null||(u=o[e.keySystem])==null?void 0:u.generateRequest;if(c)try{const _=c.call(this.hls,t,n,e);if(!_)throw new Error("Invalid response from configured generateRequest filter");t=_.initDataType,n=e.decryptdata.pssh=_.initData?new Uint8Array(_.initData):null}catch(_){var h;if(this.warn(_.message),(h=this.hls)!=null&&h.config.debug)throw _}if(n===null)return this.log(`Skipping key-session request for "${s}" (no initData)`),Promise.resolve(e);const m=this.getKeyIdString(e.decryptdata);this.log(`Generating key-session request for "${s}": ${m} (init data type: ${t} length: ${n?n.byteLength:null})`);const y=new _1,E=e._onmessage=_=>{const L=e.mediaKeysSession;if(!L){y.emit("error",new Error("invalid state"));return}const{messageType:M,message:F}=_;this.log(`"${M}" message event for session "${L.sessionId}" message size: ${F.byteLength}`),M==="license-request"||M==="license-renewal"?this.renewLicense(e,F).catch(Z=>{this.handleError(Z),y.emit("error",Z)}):M==="license-release"?e.keySystem===Br.FAIRPLAY&&(this.updateKeySession(e,QS("acknowledged")),this.removeSession(e)):this.warn(`unhandled media key message type "${M}"`)},T=e._onkeystatuseschange=_=>{if(!e.mediaKeysSession){y.emit("error",new Error("invalid state"));return}this.onKeyStatusChange(e);const M=e.keyStatus;y.emit("keyStatus",M),M==="expired"&&(this.warn(`${e.keySystem} expired for key ${m}`),this.renewKeySession(e))};e.mediaKeysSession.addEventListener("message",E),e.mediaKeysSession.addEventListener("keystatuseschange",T);const R=new Promise((_,L)=>{y.on("error",L),y.on("keyStatus",M=>{M.startsWith("usable")?_():M==="output-restricted"?L(new lo({type:cn.KEY_SYSTEM_ERROR,details:qe.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):M==="internal-error"?L(new lo({type:cn.KEY_SYSTEM_ERROR,details:qe.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},`key status changed to "${M}"`)):M==="expired"?L(new Error("key expired while generating request")):this.warn(`unhandled key status change "${M}"`)})});return e.mediaKeysSession.generateRequest(t,n).then(()=>{var _;this.log(`Request generated for key-session "${(_=e.mediaKeysSession)==null?void 0:_.sessionId}" keyId: ${m}`)}).catch(_=>{throw new lo({type:cn.KEY_SYSTEM_ERROR,details:qe.KEY_SYSTEM_NO_SESSION,error:_,fatal:!1},`Error generating key-session request: ${_}`)}).then(()=>R).catch(_=>{throw y.removeAllListeners(),this.removeSession(e),_}).then(()=>(y.removeAllListeners(),e))}onKeyStatusChange(e){e.mediaKeysSession.keyStatuses.forEach((t,n)=>{this.log(`key status change "${t}" for keyStatuses keyId: ${xl.hexDump("buffer"in n?new Uint8Array(n.buffer,n.byteOffset,n.byteLength):new Uint8Array(n))} session keyId: ${xl.hexDump(new Uint8Array(e.decryptdata.keyId||[]))} uri: ${e.decryptdata.uri}`),e.keyStatus=t})}fetchServerCertificate(e){const t=this.config,n=t.loader,s=new n(t),o=this.getServerCertificateUrl(e);return o?(this.log(`Fetching server certificate for "${e}"`),new Promise((u,c)=>{const h={responseType:"arraybuffer",url:o},m=t.certLoadPolicy.default,y={loadPolicy:m,timeout:m.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},E={onSuccess:(T,R,_,L)=>{u(T.data)},onError:(T,R,_,L)=>{c(new lo({type:cn.KEY_SYSTEM_ERROR,details:qe.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:_,response:qi({url:h.url,data:void 0},T)},`"${e}" certificate request failed (${o}). Status: ${T.code} (${T.text})`))},onTimeout:(T,R,_)=>{c(new lo({type:cn.KEY_SYSTEM_ERROR,details:qe.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:_,response:{url:h.url,data:void 0}},`"${e}" certificate request timed out (${o})`))},onAbort:(T,R,_)=>{c(new Error("aborted"))}};s.load(h,y,E)})):Promise.resolve()}setMediaKeysServerCertificate(e,t,n){return new Promise((s,o)=>{e.setServerCertificate(n).then(u=>{this.log(`setServerCertificate ${u?"success":"not supported by CDM"} (${n==null?void 0:n.byteLength}) on "${t}"`),s(e)}).catch(u=>{o(new lo({type:cn.KEY_SYSTEM_ERROR,details:qe.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:u,fatal:!0},u.message))})})}renewLicense(e,t){return this.requestLicense(e,new Uint8Array(t)).then(n=>this.updateKeySession(e,new Uint8Array(n)).catch(s=>{throw new lo({type:cn.KEY_SYSTEM_ERROR,details:qe.KEY_SYSTEM_SESSION_UPDATE_FAILED,error:s,fatal:!0},s.message)}))}unpackPlayReadyKeyMessage(e,t){const n=String.fromCharCode.apply(null,new Uint16Array(t.buffer));if(!n.includes("PlayReadyKeyMessage"))return e.setRequestHeader("Content-Type","text/xml; charset=utf-8"),t;const s=new DOMParser().parseFromString(n,"application/xml"),o=s.querySelectorAll("HttpHeader");if(o.length>0){let y;for(let E=0,T=o.length;E<T;E++){var u,c;y=o[E];const R=(u=y.querySelector("name"))==null?void 0:u.textContent,_=(c=y.querySelector("value"))==null?void 0:c.textContent;R&&_&&e.setRequestHeader(R,_)}}const h=s.querySelector("Challenge"),m=h==null?void 0:h.textContent;if(!m)throw new Error("Cannot find <Challenge> in key message");return QS(atob(m))}setupLicenseXHR(e,t,n,s){const o=this.config.licenseXhrSetup;return o?Promise.resolve().then(()=>{if(!n.decryptdata)throw new Error("Key removed");return o.call(this.hls,e,t,n,s)}).catch(u=>{if(!n.decryptdata)throw u;return e.open("POST",t,!0),o.call(this.hls,e,t,n,s)}).then(u=>(e.readyState||e.open("POST",t,!0),{xhr:e,licenseChallenge:u||s})):(e.open("POST",t,!0),Promise.resolve({xhr:e,licenseChallenge:s}))}requestLicense(e,t){const n=this.config.keyLoadPolicy.default;return new Promise((s,o)=>{const u=this.getLicenseServerUrl(e.keySystem);this.log(`Sending license request to URL: ${u}`);const c=new XMLHttpRequest;c.responseType="arraybuffer",c.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return o(new Error("invalid state"));if(c.readyState===4)if(c.status===200){this._requestLicenseFailureCount=0;let h=c.response;this.log(`License received ${h instanceof ArrayBuffer?h.byteLength:h}`);const m=this.config.licenseResponseCallback;if(m)try{h=m.call(this.hls,c,u,e)}catch(y){this.error(y)}s(h)}else{const h=n.errorRetry,m=h?h.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>m||c.status>=400&&c.status<500)o(new lo({type:cn.KEY_SYSTEM_ERROR,details:qe.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:c,response:{url:u,data:void 0,code:c.status,text:c.statusText}},`License Request XHR failed (${u}). Status: ${c.status} (${c.statusText})`));else{const y=m-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${y} attempts left`),this.requestLicense(e,t).then(s,o)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=c,this.setupLicenseXHR(c,u,e,t).then(({xhr:h,licenseChallenge:m})=>{e.keySystem==Br.PLAYREADY&&(m=this.unpackPlayReadyKeyMessage(h,m)),h.send(m)})})}onMediaAttached(e,t){if(!this.config.emeEnabled)return;const n=t.media;this.media=n,n.addEventListener("encrypted",this.onMediaEncrypted),n.addEventListener("waitingforkey",this.onWaitingForKey)}onMediaDetached(){const e=this.media,t=this.mediaKeySessions;e&&(e.removeEventListener("encrypted",this.onMediaEncrypted),e.removeEventListener("waitingforkey",this.onWaitingForKey),this.media=null),this._requestLicenseFailureCount=0,this.setMediaKeysQueue=[],this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},hp.clearKeyUriToKeyIdMap();const n=t.length;zd.CDMCleanupPromise=Promise.all(t.map(s=>this.removeSession(s)).concat(e==null?void 0:e.setMediaKeys(null).catch(s=>{this.log(`Could not clear media keys: ${s}`)}))).then(()=>{n&&(this.log("finished closing key sessions and clearing media keys"),t.length=0)}).catch(s=>{this.log(`Could not close sessions and clear media keys: ${s}`)})}onManifestLoading(){this.keyFormatPromise=null}onManifestLoaded(e,{sessionKeys:t}){if(!(!t||!this.config.emeEnabled)&&!this.keyFormatPromise){const n=t.reduce((s,o)=>(s.indexOf(o.keyFormat)===-1&&s.push(o.keyFormat),s),[]);this.log(`Selecting key-system from session-keys ${n.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(n)}}removeSession(e){const{mediaKeysSession:t,licenseXhr:n}=e;if(t){this.log(`Remove licenses and keys and close session ${t.sessionId}`),e._onmessage&&(t.removeEventListener("message",e._onmessage),e._onmessage=void 0),e._onkeystatuseschange&&(t.removeEventListener("keystatuseschange",e._onkeystatuseschange),e._onkeystatuseschange=void 0),n&&n.readyState!==XMLHttpRequest.DONE&&n.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;const s=this.mediaKeySessions.indexOf(e);return s>-1&&this.mediaKeySessions.splice(s,1),t.remove().catch(o=>{this.log(`Could not remove session: ${o}`)}).then(()=>t.close()).catch(o=>{this.log(`Could not close session: ${o}`)})}}}zd.CDMCleanupPromise=void 0;class lo extends Error{constructor(e,t){super(t),this.data=void 0,e.error||(e.error=new Error(t)),this.data=e,e.err=e.error}}var Rs;(function(r){r.MANIFEST="m",r.AUDIO="a",r.VIDEO="v",r.MUXED="av",r.INIT="i",r.CAPTION="c",r.TIMED_TEXT="tt",r.KEY="k",r.OTHER="o"})(Rs||(Rs={}));var V1;(function(r){r.DASH="d",r.HLS="h",r.SMOOTH="s",r.OTHER="o"})(V1||(V1={}));var uf;(function(r){r.OBJECT="CMCD-Object",r.REQUEST="CMCD-Request",r.SESSION="CMCD-Session",r.STATUS="CMCD-Status"})(uf||(uf={}));const N4={[uf.OBJECT]:["br","d","ot","tb"],[uf.REQUEST]:["bl","dl","mtp","nor","nrr","su"],[uf.SESSION]:["cid","pr","sf","sid","st","v"],[uf.STATUS]:["bs","rtp"]};class jd{constructor(e,t){this.value=void 0,this.params=void 0,Array.isArray(e)&&(e=e.map(n=>n instanceof jd?n:new jd(n))),this.value=e,this.params=t}}class m_{constructor(e){this.description=void 0,this.description=e}}const U4="Dict";function B4(r){return Array.isArray(r)?JSON.stringify(r):r instanceof Map?"Map{}":r instanceof Set?"Set{}":typeof r=="object"?JSON.stringify(r):String(r)}function $4(r,e,t,n){return new Error(`failed to ${r} "${B4(e)}" as ${t}`,{cause:n})}const g_="Bare Item",V4="Boolean",z4="Byte Sequence",j4="Decimal",H4="Integer";function G4(r){return r<-999999999999999||999999999999999<r}const W4=/[\x00-\x1f\x7f]+/,K4="Token",q4="Key";function Rl(r,e,t){return $4("serialize",r,e,t)}function Y4(r){if(typeof r!="boolean")throw Rl(r,V4);return r?"?1":"?0"}function X4(r){return btoa(String.fromCharCode(...r))}function Q4(r){if(ArrayBuffer.isView(r)===!1)throw Rl(r,z4);return`:${X4(r)}:`}function v_(r){if(G4(r))throw Rl(r,H4);return r.toString()}function J4(r){return`@${v_(r.getTime()/1e3)}`}function y_(r,e){if(r<0)return-y_(-r,e);const t=Math.pow(10,e);if(Math.abs(r*t%1-.5)<Number.EPSILON){const s=Math.floor(r*t);return(s%2===0?s:s+1)/t}else return Math.round(r*t)/t}function Z4(r){const e=y_(r,3);if(Math.floor(Math.abs(e)).toString().length>12)throw Rl(r,j4);const t=e.toString();return t.includes(".")?t:`${t}.0`}const e6="String";function t6(r){if(W4.test(r))throw Rl(r,e6);return`"${r.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function n6(r){return r.description||r.toString().slice(7,-1)}function S_(r){const e=n6(r);if(/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e)===!1)throw Rl(e,K4);return e}function z1(r){switch(typeof r){case"number":if(!Bt(r))throw Rl(r,g_);return Number.isInteger(r)?v_(r):Z4(r);case"string":return t6(r);case"symbol":return S_(r);case"boolean":return Y4(r);case"object":if(r instanceof Date)return J4(r);if(r instanceof Uint8Array)return Q4(r);if(r instanceof m_)return S_(r);default:throw Rl(r,g_)}}function j1(r){if(/^[a-z*][a-z0-9\-_.*]*$/.test(r)===!1)throw Rl(r,q4);return r}function H1(r){return r==null?"":Object.entries(r).map(([e,t])=>t===!0?`;${j1(e)}`:`;${j1(e)}=${z1(t)}`).join("")}function E_(r){return r instanceof jd?`${z1(r.value)}${H1(r.params)}`:z1(r)}function r6(r){return`(${r.value.map(E_).join(" ")})${H1(r.params)}`}function i6(r,e={whitespace:!0}){if(typeof r!="object")throw Rl(r,U4);const t=r instanceof Map?r.entries():Object.entries(r),n=e!=null&&e.whitespace?" ":"";return Array.from(t).map(([s,o])=>{o instanceof jd||(o=new jd(o));let u=j1(s);return o.value===!0?u+=H1(o.params):(u+="=",Array.isArray(o.value)?u+=r6(o):u+=E_(o)),u}).join(`,${n}`)}function s6(r,e){return i6(r,e)}const a6=r=>r==="ot"||r==="sf"||r==="st",o6=r=>typeof r=="number"?Bt(r):r!=null&&r!==""&&r!==!1;function l6(r,e){const t=new URL(r),n=new URL(e);if(t.origin!==n.origin)return r;const s=t.pathname.split("/").slice(1),o=n.pathname.split("/").slice(1,-1);for(;s[0]===o[0];)s.shift(),o.shift();for(;o.length;)o.shift(),s.unshift("..");return s.join("/")}function u6(){try{return crypto.randomUUID()}catch{try{const e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.slice(t.lastIndexOf("/")+1)}catch{let t=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,s=>{const o=(t+Math.random()*16)%16|0;return t=Math.floor(t/16),(s=="x"?o:o&3|8).toString(16)})}}}const cv=r=>Math.round(r),c6=(r,e)=>(e!=null&&e.baseUrl&&(r=l6(r,e.baseUrl)),encodeURIComponent(r)),fv=r=>cv(r/100)*100,f6={br:cv,d:cv,bl:fv,dl:fv,mtp:fv,nor:c6,rtp:fv,tb:cv};function d6(r,e){const t={};if(r==null||typeof r!="object")return t;const n=Object.keys(r).sort(),s=Ii({},f6,e==null?void 0:e.formatters),o=e==null?void 0:e.filter;return n.forEach(u=>{if(o!=null&&o(u))return;let c=r[u];const h=s[u];h&&(c=h(c,e)),!(u==="v"&&c===1)&&(u=="pr"&&c===1||o6(c)&&(a6(u)&&typeof c=="string"&&(c=new m_(c)),t[u]=c))}),t}function x_(r,e={}){return r?s6(d6(r,e),Ii({whitespace:!1},e)):""}function h6(r,e={}){if(!r)return{};const t=Object.entries(r),n=Object.entries(N4).concat(Object.entries((e==null?void 0:e.customHeaderMap)||{})),s=t.reduce((o,u)=>{var c,h;const[m,y]=u,E=((c=n.find(T=>T[1].includes(m)))==null?void 0:c[0])||uf.REQUEST;return(h=o[E])!=null||(o[E]={}),o[E][m]=y,o},{});return Object.entries(s).reduce((o,[u,c])=>(o[u]=x_(c,e),o),{})}function p6(r,e,t){return Ii(r,h6(e,t))}const m6="CMCD";function g6(r,e={}){if(!r)return"";const t=x_(r,e);return`${m6}=${encodeURIComponent(t)}`}const b_=/CMCD=[^&#]+/;function v6(r,e,t){const n=g6(e,t);if(!n)return r;if(b_.test(r))return r.replace(b_,n);const s=r.includes("?")?"&":"?";return`${r}${s}${n}`}class y6{constructor(e){this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.includeKeys=void 0,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=()=>{this.initialized&&(this.starved=!0),this.buffering=!0},this.onPlaying=()=>{this.initialized||(this.initialized=!0),this.buffering=!1},this.applyPlaylistData=s=>{try{this.apply(s,{ot:Rs.MANIFEST,su:!this.initialized})}catch(o){Fe.warn("Could not generate manifest CMCD data.",o)}},this.applyFragmentData=s=>{try{const o=s.frag,u=this.hls.levels[o.level],c=this.getObjectType(o),h={d:o.duration*1e3,ot:c};(c===Rs.VIDEO||c===Rs.AUDIO||c==Rs.MUXED)&&(h.br=u.bitrate/1e3,h.tb=this.getTopBandwidth(c)/1e3,h.bl=this.getBufferLength(c)),this.apply(s,h)}catch(o){Fe.warn("Could not generate segment CMCD data.",o)}},this.hls=e;const t=this.config=e.config,{cmcd:n}=t;n!=null&&(t.pLoader=this.createPlaylistLoader(),t.fLoader=this.createFragmentLoader(),this.sid=n.sessionId||u6(),this.cid=n.contentId,this.useHeaders=n.useHeaders===!0,this.includeKeys=n.includeKeys,this.registerListeners())}registerListeners(){const e=this.hls;e.on(V.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(V.MEDIA_DETACHED,this.onMediaDetached,this),e.on(V.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(V.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(V.MEDIA_DETACHED,this.onMediaDetached,this),e.off(V.BUFFER_CREATED,this.onBufferCreated,this)}destroy(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null,this.onWaiting=this.onPlaying=null}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)}onMediaDetached(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)}onBufferCreated(e,t){var n,s;this.audioBuffer=(n=t.tracks.audio)==null?void 0:n.buffer,this.videoBuffer=(s=t.tracks.video)==null?void 0:s.buffer}createData(){var e;return{v:1,sf:V1.HLS,sid:this.sid,cid:this.cid,pr:(e=this.media)==null?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){Ii(t,this.createData());const n=t.ot===Rs.INIT||t.ot===Rs.VIDEO||t.ot===Rs.MUXED;this.starved&&n&&(t.bs=!0,t.su=!0,this.starved=!1),t.su==null&&(t.su=this.buffering);const{includeKeys:s}=this;s&&(t=Object.keys(t).reduce((o,u)=>(s.includes(u)&&(o[u]=t[u]),o),{})),this.useHeaders?(e.headers||(e.headers={}),p6(e.headers,t)):e.url=v6(e.url,t)}getObjectType(e){const{type:t}=e;if(t==="subtitle")return Rs.TIMED_TEXT;if(e.sn==="initSegment")return Rs.INIT;if(t==="audio")return Rs.AUDIO;if(t==="main")return this.hls.audioTracks.length?Rs.VIDEO:Rs.MUXED}getTopBandwidth(e){let t=0,n;const s=this.hls;if(e===Rs.AUDIO)n=s.audioTracks;else{const o=s.maxAutoLevel,u=o>-1?o+1:s.levels.length;n=s.levels.slice(0,u)}for(const o of n)o.bitrate>t&&(t=o.bitrate);return t>0?t:NaN}getBufferLength(e){const t=this.hls.media,n=e===Rs.AUDIO?this.audioBuffer:this.videoBuffer;return!n||!t?NaN:Dr.bufferInfo(n,t.currentTime,this.config.maxBufferHole).len*1e3}createPlaylistLoader(){const{pLoader:e}=this.config,t=this.applyPlaylistData,n=e||this.config.loader;return class{constructor(o){this.loader=void 0,this.loader=new n(o)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(o,u,c){t(o),this.loader.load(o,u,c)}}}createFragmentLoader(){const{fLoader:e}=this.config,t=this.applyFragmentData,n=e||this.config.loader;return class{constructor(o){this.loader=void 0,this.loader=new n(o)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(o,u,c){t(o),this.loader.load(o,u,c)}}}}const S6=3e5;class E6{constructor(e){this.hls=void 0,this.log=void 0,this.loader=null,this.uri=null,this.pathwayId=".",this.pathwayPriority=null,this.timeToLoad=300,this.reloadTimer=-1,this.updated=0,this.started=!1,this.enabled=!0,this.levels=null,this.audioTracks=null,this.subtitleTracks=null,this.penalizedPathways={},this.hls=e,this.log=Fe.log.bind(Fe,"[content-steering]:"),this.registerListeners()}registerListeners(){const e=this.hls;e.on(V.MANIFEST_LOADING,this.onManifestLoading,this),e.on(V.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(V.MANIFEST_PARSED,this.onManifestParsed,this),e.on(V.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(V.MANIFEST_LOADING,this.onManifestLoading,this),e.off(V.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(V.MANIFEST_PARSED,this.onManifestParsed,this),e.off(V.ERROR,this.onError,this))}startLoad(){if(this.started=!0,this.clearTimeout(),this.enabled&&this.uri){if(this.updated){const e=this.timeToLoad*1e3-(performance.now()-this.updated);if(e>0){this.scheduleRefresh(this.uri,e);return}}this.loadSteeringManifest(this.uri)}}stopLoad(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),this.clearTimeout()}clearTimeout(){this.reloadTimer!==-1&&(self.clearTimeout(this.reloadTimer),this.reloadTimer=-1)}destroy(){this.unregisterListeners(),this.stopLoad(),this.hls=null,this.levels=this.audioTracks=this.subtitleTracks=null}removeLevel(e){const t=this.levels;t&&(this.levels=t.filter(n=>n!==e))}onManifestLoading(){this.stopLoad(),this.enabled=!0,this.timeToLoad=300,this.updated=0,this.uri=null,this.pathwayId=".",this.levels=this.audioTracks=this.subtitleTracks=null}onManifestLoaded(e,t){const{contentSteering:n}=t;n!==null&&(this.pathwayId=n.pathwayId,this.uri=n.uri,this.started&&this.startLoad())}onManifestParsed(e,t){this.audioTracks=t.audioTracks,this.subtitleTracks=t.subtitleTracks}onError(e,t){const{errorAction:n}=t;if((n==null?void 0:n.action)===ps.SendAlternateToPenaltyBox&&n.flags===No.MoveAllAlternatesMatchingHost){const s=this.levels;let o=this.pathwayPriority,u=this.pathwayId;if(t.context){const{groupId:c,pathwayId:h,type:m}=t.context;c&&s?u=this.getPathwayForGroupId(c,m,u):h&&(u=h)}u in this.penalizedPathways||(this.penalizedPathways[u]=performance.now()),!o&&s&&(o=s.reduce((c,h)=>(c.indexOf(h.pathwayId)===-1&&c.push(h.pathwayId),c),[])),o&&o.length>1&&(this.updatePathwayPriority(o),n.resolved=this.pathwayId!==u),n.resolved||Fe.warn(`Could not resolve ${t.details} ("${t.error.message}") with content-steering for Pathway: ${u} levels: ${s&&s.length} priorities: ${JSON.stringify(o)} penalized: ${JSON.stringify(this.penalizedPathways)}`)}}filterParsedLevels(e){this.levels=e;let t=this.getLevelsForPathway(this.pathwayId);if(t.length===0){const n=e[0].pathwayId;this.log(`No levels found in Pathway ${this.pathwayId}. Setting initial Pathway to "${n}"`),t=this.getLevelsForPathway(n),this.pathwayId=n}return t.length!==e.length?(this.log(`Found ${t.length}/${e.length} levels in Pathway "${this.pathwayId}"`),t):e}getLevelsForPathway(e){return this.levels===null?[]:this.levels.filter(t=>e===t.pathwayId)}updatePathwayPriority(e){this.pathwayPriority=e;let t;const n=this.penalizedPathways,s=performance.now();Object.keys(n).forEach(o=>{s-n[o]>S6&&delete n[o]});for(let o=0;o<e.length;o++){const u=e[o];if(u in n)continue;if(u===this.pathwayId)return;const c=this.hls.nextLoadLevel,h=this.hls.levels[c];if(t=this.getLevelsForPathway(u),t.length>0){this.log(`Setting Pathway to "${u}"`),this.pathwayId=u,cA(t),this.hls.trigger(V.LEVELS_UPDATED,{levels:t});const m=this.hls.levels[c];h&&m&&this.levels&&(m.attrs["STABLE-VARIANT-ID"]!==h.attrs["STABLE-VARIANT-ID"]&&m.bitrate!==h.bitrate&&this.log(`Unstable Pathways change from bitrate ${h.bitrate} to ${m.bitrate}`),this.hls.nextLoadLevel=c);break}}}getPathwayForGroupId(e,t,n){const s=this.getLevelsForPathway(n).concat(this.levels||[]);for(let o=0;o<s.length;o++)if(t===zn.AUDIO_TRACK&&s[o].hasAudioGroup(e)||t===zn.SUBTITLE_TRACK&&s[o].hasSubtitleGroup(e))return s[o].pathwayId;return n}clonePathways(e){const t=this.levels;if(!t)return;const n={},s={};e.forEach(o=>{const{ID:u,"BASE-ID":c,"URI-REPLACEMENT":h}=o;if(t.some(y=>y.pathwayId===u))return;const m=this.getLevelsForPathway(c).map(y=>{const E=new Yr(y.attrs);E["PATHWAY-ID"]=u;const T=E.AUDIO&&`${E.AUDIO}_clone_${u}`,R=E.SUBTITLES&&`${E.SUBTITLES}_clone_${u}`;T&&(n[E.AUDIO]=T,E.AUDIO=T),R&&(s[E.SUBTITLES]=R,E.SUBTITLES=R);const _=w_(y.uri,E["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",h),L=new Pd({attrs:E,audioCodec:y.audioCodec,bitrate:y.bitrate,height:y.height,name:y.name,url:_,videoCodec:y.videoCodec,width:y.width});if(y.audioGroups)for(let M=1;M<y.audioGroups.length;M++)L.addGroupId("audio",`${y.audioGroups[M]}_clone_${u}`);if(y.subtitleGroups)for(let M=1;M<y.subtitleGroups.length;M++)L.addGroupId("text",`${y.subtitleGroups[M]}_clone_${u}`);return L});t.push(...m),T_(this.audioTracks,n,h,u),T_(this.subtitleTracks,s,h,u)})}loadSteeringManifest(e){const t=this.hls.config,n=t.loader;this.loader&&this.loader.destroy(),this.loader=new n(t);let s;try{s=new self.URL(e)}catch{this.enabled=!1,this.log(`Failed to parse Steering Manifest URI: ${e}`);return}if(s.protocol!=="data:"){const y=(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate)|0;s.searchParams.set("_HLS_pathway",this.pathwayId),s.searchParams.set("_HLS_throughput",""+y)}const o={responseType:"json",url:s.href},u=t.steeringManifestLoadPolicy.default,c=u.errorRetry||u.timeoutRetry||{},h={loadPolicy:u,timeout:u.maxLoadTimeMs,maxRetry:c.maxNumRetry||0,retryDelay:c.retryDelayMs||0,maxRetryDelay:c.maxRetryDelayMs||0},m={onSuccess:(y,E,T,R)=>{this.log(`Loaded steering manifest: "${s}"`);const _=y.data;if(_.VERSION!==1){this.log(`Steering VERSION ${_.VERSION} not supported!`);return}this.updated=performance.now(),this.timeToLoad=_.TTL;const{"RELOAD-URI":L,"PATHWAY-CLONES":M,"PATHWAY-PRIORITY":F}=_;if(L)try{this.uri=new self.URL(L,s).href}catch{this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${L}`);return}this.scheduleRefresh(this.uri||T.url),M&&this.clonePathways(M);const Z={steeringManifest:_,url:s.toString()};this.hls.trigger(V.STEERING_MANIFEST_LOADED,Z),F&&this.updatePathwayPriority(F)},onError:(y,E,T,R)=>{if(this.log(`Error loading steering manifest: ${y.code} ${y.text} (${E.url})`),this.stopLoad(),y.code===410){this.enabled=!1,this.log(`Steering manifest ${E.url} no longer available`);return}let _=this.timeToLoad*1e3;if(y.code===429){const L=this.loader;if(typeof(L==null?void 0:L.getResponseHeader)=="function"){const M=L.getResponseHeader("Retry-After");M&&(_=parseFloat(M)*1e3)}this.log(`Steering manifest ${E.url} rate limited`);return}this.scheduleRefresh(this.uri||E.url,_)},onTimeout:(y,E,T)=>{this.log(`Timeout loading steering manifest (${E.url})`),this.scheduleRefresh(this.uri||E.url)}};this.log(`Requesting steering manifest: ${s}`),this.loader.load(o,h,m)}scheduleRefresh(e,t=this.timeToLoad*1e3){this.clearTimeout(),this.reloadTimer=self.setTimeout(()=>{var n;const s=(n=this.hls)==null?void 0:n.media;if(s&&!s.ended){this.loadSteeringManifest(e);return}this.scheduleRefresh(e,this.timeToLoad*1e3)},t)}}function T_(r,e,t,n){r&&Object.keys(e).forEach(s=>{const o=r.filter(u=>u.groupId===s).map(u=>{const c=Ii({},u);return c.details=void 0,c.attrs=new Yr(c.attrs),c.url=c.attrs.URI=w_(u.url,u.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",t),c.groupId=c.attrs["GROUP-ID"]=e[s],c.attrs["PATHWAY-ID"]=n,c});r.push(...o)})}function w_(r,e,t,n){const{HOST:s,PARAMS:o,[t]:u}=n;let c;e&&(c=u==null?void 0:u[e],c&&(r=c));const h=new self.URL(r);return s&&!c&&(h.host=s),o&&Object.keys(o).sort().forEach(m=>{m&&h.searchParams.set(m,o[m])}),h.href}const x6=/^age:\s*[\d.]+\s*$/im;class C_{constructor(e){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=null,this.loader=null,this.stats=void 0,this.xhrSetup=e&&e.xhrSetup||null,this.stats=new Ng,this.retryDelay=0}destroy(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null,this.context=null,this.xhrSetup=null,this.stats=null}abortInternal(){const e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,e.readyState!==4&&(this.stats.aborted=!0,e.abort()))}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)}load(e,t,n){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=n,this.loadInternal()}loadInternal(){const{config:e,context:t}=this;if(!e||!t)return;const n=this.loader=new self.XMLHttpRequest,s=this.stats;s.loading.first=0,s.loaded=0,s.aborted=!1;const o=this.xhrSetup;o?Promise.resolve().then(()=>{if(!this.stats.aborted)return o(n,t.url)}).catch(u=>(n.open("GET",t.url,!0),o(n,t.url))).then(()=>{this.stats.aborted||this.openAndSendXhr(n,t,e)}).catch(u=>{this.callbacks.onError({code:n.status,text:u.message},t,n,s)}):this.openAndSendXhr(n,t,e)}openAndSendXhr(e,t,n){e.readyState||e.open("GET",t.url,!0);const s=t.headers,{maxTimeToFirstByteMs:o,maxLoadTimeMs:u}=n.loadPolicy;if(s)for(const c in s)e.setRequestHeader(c,s[c]);t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,self.clearTimeout(this.requestTimeout),n.timeout=o&&Bt(o)?o:u,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.timeout),e.send()}readystatechange(){const{context:e,loader:t,stats:n}=this;if(!e||!t)return;const s=t.readyState,o=this.config;if(!n.aborted&&s>=2&&(n.loading.first===0&&(n.loading.first=Math.max(self.performance.now(),n.loading.start),o.timeout!==o.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),o.timeout=o.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),o.loadPolicy.maxLoadTimeMs-(n.loading.first-n.loading.start)))),s===4)){self.clearTimeout(this.requestTimeout),t.onreadystatechange=null,t.onprogress=null;const u=t.status,c=t.responseType!=="text";if(u>=200&&u<300&&(c&&t.response||t.responseText!==null)){n.loading.end=Math.max(self.performance.now(),n.loading.first);const h=c?t.response:t.responseText,m=t.responseType==="arraybuffer"?h.byteLength:h.length;if(n.loaded=n.total=m,n.bwEstimate=n.total*8e3/(n.loading.end-n.loading.first),!this.callbacks)return;const y=this.callbacks.onProgress;if(y&&y(n,e,h,t),!this.callbacks)return;const E={url:t.responseURL,data:h,code:u};this.callbacks.onSuccess(E,n,e,t)}else{const h=o.loadPolicy.errorRetry,m=n.retry,y={url:e.url,data:void 0,code:u};Xg(h,m,!1,y)?this.retry(h):(Fe.error(`${u} while loading ${e.url}`),this.callbacks.onError({code:u,text:t.statusText},e,t,n))}}}loadtimeout(){var e;const t=(e=this.config)==null?void 0:e.loadPolicy.timeoutRetry,n=this.stats.retry;if(Xg(t,n,!0))this.retry(t);else{var s;Fe.warn(`timeout while loading ${(s=this.context)==null?void 0:s.url}`);const o=this.callbacks;o&&(this.abortInternal(),o.onTimeout(this.stats,this.context,this.loader))}}retry(e){const{context:t,stats:n}=this;this.retryDelay=p1(e,n.retry),n.retry++,Fe.warn(`${status?"HTTP Status "+status:"Timeout"} while loading ${t==null?void 0:t.url}, retrying ${n.retry}/${e.maxNumRetry} in ${this.retryDelay}ms`),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay)}loadprogress(e){const t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)}getCacheAge(){let e=null;if(this.loader&&x6.test(this.loader.getAllResponseHeaders())){const t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.loader&&new RegExp(`^${e}:\\s*[\\d.]+\\s*$`,"im").test(this.loader.getAllResponseHeaders())?this.loader.getResponseHeader(e):null}}function b6(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch{}return!1}const T6=/(\d+)-(\d+)\/(\d+)/;class R_{constructor(e){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=null,this.response=null,this.controller=void 0,this.context=null,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=e.fetchSetup||A6,this.controller=new self.AbortController,this.stats=new Ng}destroy(){this.loader=this.callbacks=this.context=this.config=this.request=null,this.abortInternal(),this.response=null,this.fetchSetup=this.controller=this.stats=null}abortInternal(){this.controller&&!this.stats.loading.end&&(this.stats.aborted=!0,this.controller.abort())}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)}load(e,t,n){const s=this.stats;if(s.loading.start)throw new Error("Loader can only be used once.");s.loading.start=self.performance.now();const o=w6(e,this.controller.signal),u=n.onProgress,c=e.responseType==="arraybuffer",h=c?"byteLength":"length",{maxTimeToFirstByteMs:m,maxLoadTimeMs:y}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=n,this.request=this.fetchSetup(e,o),self.clearTimeout(this.requestTimeout),t.timeout=m&&Bt(m)?m:y,this.requestTimeout=self.setTimeout(()=>{this.abortInternal(),n.onTimeout(s,e,this.response)},t.timeout),self.fetch(this.request).then(E=>{this.response=this.loader=E;const T=Math.max(self.performance.now(),s.loading.start);if(self.clearTimeout(this.requestTimeout),t.timeout=y,this.requestTimeout=self.setTimeout(()=>{this.abortInternal(),n.onTimeout(s,e,this.response)},y-(T-s.loading.start)),!E.ok){const{status:R,statusText:_}=E;throw new _6(_||"fetch, bad network response",R,E)}return s.loading.first=T,s.total=R6(E.headers)||s.total,u&&Bt(t.highWaterMark)?this.loadProgressively(E,s,e,t.highWaterMark,u):c?E.arrayBuffer():e.responseType==="json"?E.json():E.text()}).then(E=>{const T=this.response;if(!T)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),s.loading.end=Math.max(self.performance.now(),s.loading.first);const R=E[h];R&&(s.loaded=s.total=R);const _={url:T.url,data:E,code:T.status};u&&!Bt(t.highWaterMark)&&u(s,e,E,T),n.onSuccess(_,s,e,T)}).catch(E=>{if(self.clearTimeout(this.requestTimeout),s.aborted)return;const T=E&&E.code||0,R=E?E.message:null;n.onError({code:T,text:R},e,E?E.details:null,s)})}getCacheAge(){let e=null;if(this.response){const t=this.response.headers.get("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.response?this.response.headers.get(e):null}loadProgressively(e,t,n,s=0,o){const u=new bA,c=e.body.getReader(),h=()=>c.read().then(m=>{if(m.done)return u.dataLength&&o(t,n,u.flush(),e),Promise.resolve(new ArrayBuffer(0));const y=m.value,E=y.length;return t.loaded+=E,E<s||u.dataLength?(u.push(y),u.dataLength>=s&&o(t,n,u.flush(),e)):o(t,n,y,e),h()}).catch(()=>Promise.reject());return h()}}function w6(r,e){const t={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(Ii({},r.headers))};return r.rangeEnd&&t.headers.set("Range","bytes="+r.rangeStart+"-"+String(r.rangeEnd-1)),t}function C6(r){const e=T6.exec(r);if(e)return parseInt(e[2])-parseInt(e[1])+1}function R6(r){const e=r.get("Content-Range");if(e){const n=C6(e);if(Bt(n))return n}const t=r.get("Content-Length");if(t)return parseInt(t)}function A6(r,e){return new self.Request(r.url,e)}class _6 extends Error{constructor(e,t,n){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=n}}const L6=/\s/,k6={newCue(r,e,t,n){const s=[];let o,u,c,h,m;const y=self.VTTCue||self.TextTrackCue;for(let T=0;T<n.rows.length;T++)if(o=n.rows[T],c=!0,h=0,m="",!o.isEmpty()){var E;for(let L=0;L<o.chars.length;L++)L6.test(o.chars[L].uchar)&&c?h++:(m+=o.chars[L].uchar,c=!1);o.cueStartTime=e,e===t&&(t+=1e-4),h>=16?h--:h++;const R=s_(m.trim()),_=O1(e,t,R);r!=null&&(E=r.cues)!=null&&E.getCueById(_)||(u=new y(e,t,R),u.id=_,u.line=T+1,u.align="left",u.position=10+Math.min(80,Math.floor(h*8/32)*10),s.push(u))}return r&&s.length&&(s.sort((T,R)=>T.line==="auto"||R.line==="auto"?0:T.line>8&&R.line>8?R.line-T.line:T.line-R.line),s.forEach(T=>tA(r,T))),s}},D6={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},A_=qi(qi({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,preferManagedMediaSource:!0,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,frontBufferFlushThreshold:1/0,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,workerPath:null,enableSoftwareAES:!0,startLevel:void 0,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:C_,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:o$,bufferController:f4,capLevelController:$1,errorController:Y3,fpsController:F4,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrEwmaDefaultEstimateMax:5e6,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystems:{},drmSystemOptions:{},requestMediaKeySystemAccessFunc:CR,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableID3MetadataCues:!0,useMediaCapabilities:!0,certLoadPolicy:{default:D6},keyLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"},errorRetry:{maxNumRetry:8,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"}}},manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:2,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:4,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:6,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},steeringManifestLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3},I6()),{},{subtitleStreamController:o4,subtitleTrackController:u4,timelineController:M4,audioStreamController:s4,audioTrackController:a4,emeController:zd,cmcdController:y6,contentSteeringController:E6});function I6(){return{cueHandler:k6,enableWebVTT:!0,enableIMSC1:!0,enableCEA708Captions:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function P6(r,e){if((e.liveSyncDurationCount||e.liveMaxLatencyDurationCount)&&(e.liveSyncDuration||e.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(e.liveMaxLatencyDurationCount!==void 0&&(e.liveSyncDurationCount===void 0||e.liveMaxLatencyDurationCount<=e.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(e.liveMaxLatencyDuration!==void 0&&(e.liveSyncDuration===void 0||e.liveMaxLatencyDuration<=e.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');const t=G1(r),n=["manifest","level","frag"],s=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return n.forEach(o=>{const u=`${o==="level"?"playlist":o}LoadPolicy`,c=e[u]===void 0,h=[];s.forEach(m=>{const y=`${o}Loading${m}`,E=e[y];if(E!==void 0&&c){h.push(y);const T=t[u].default;switch(e[u]={default:T},m){case"TimeOut":T.maxLoadTimeMs=E,T.maxTimeToFirstByteMs=E;break;case"MaxRetry":T.errorRetry.maxNumRetry=E,T.timeoutRetry.maxNumRetry=E;break;case"RetryDelay":T.errorRetry.retryDelayMs=E,T.timeoutRetry.retryDelayMs=E;break;case"MaxRetryTimeout":T.errorRetry.maxRetryDelayMs=E,T.timeoutRetry.maxRetryDelayMs=E;break}}}),h.length&&Fe.warn(`hls.js config: "${h.join('", "')}" setting(s) are deprecated, use "${u}": ${JSON.stringify(e[u])}`)}),qi(qi({},t),e)}function G1(r){return r&&typeof r=="object"?Array.isArray(r)?r.map(G1):Object.keys(r).reduce((e,t)=>(e[t]=G1(r[t]),e),{}):r}function M6(r){const e=r.loader;e!==R_&&e!==C_?(Fe.log("[config]: Custom loader detected, cannot enable progressive streaming"),r.progressive=!1):b6()&&(r.loader=R_,r.progressive=!0,r.enableSoftwareAES=!0,Fe.log("[config]: Progressive streaming enabled, using FetchLoader"))}let W1;class O6 extends g1{constructor(e,t){super(e,"[level-controller]"),this._levels=[],this._firstLevel=-1,this._maxAutoLevel=-1,this._startLevel=void 0,this.currentLevel=null,this.currentLevelIndex=-1,this.manualLevelIndex=-1,this.steering=void 0,this.onParsedComplete=void 0,this.steering=t,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(V.MANIFEST_LOADING,this.onManifestLoading,this),e.on(V.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(V.LEVEL_LOADED,this.onLevelLoaded,this),e.on(V.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(V.FRAG_BUFFERED,this.onFragBuffered,this),e.on(V.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(V.MANIFEST_LOADING,this.onManifestLoading,this),e.off(V.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(V.LEVEL_LOADED,this.onLevelLoaded,this),e.off(V.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(V.FRAG_BUFFERED,this.onFragBuffered,this),e.off(V.ERROR,this.onError,this)}destroy(){this._unregisterListeners(),this.steering=null,this.resetLevels(),super.destroy()}stopLoad(){this._levels.forEach(t=>{t.loadError=0,t.fragmentError=0}),super.stopLoad()}resetLevels(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[],this._maxAutoLevel=-1}onManifestLoading(e,t){this.resetLevels()}onManifestLoaded(e,t){const n=this.hls.config.preferManagedMediaSource,s=[],o={},u={};let c=!1,h=!1,m=!1;t.levels.forEach(y=>{var E,T;const R=y.attrs;let{audioCodec:_,videoCodec:L}=y;((E=_)==null?void 0:E.indexOf("mp4a.40.34"))!==-1&&(W1||(W1=/chrome|firefox/i.test(navigator.userAgent)),W1&&(y.audioCodec=_=void 0)),_&&(y.audioCodec=_=Hg(_,n)),((T=L)==null?void 0:T.indexOf("avc1"))===0&&(L=y.videoCodec=C3(L));const{width:M,height:F,unknownCodecs:Z}=y;if(c||(c=!!(M&&F)),h||(h=!!L),m||(m=!!_),Z!=null&&Z.length||_&&!s1(_,"audio",n)||L&&!s1(L,"video",n))return;const{CODECS:K,"FRAME-RATE":Y,"HDCP-LEVEL":X,"PATHWAY-ID":ue,RESOLUTION:ie,"VIDEO-RANGE":ye}=R,Re=`${`${ue||"."}-`}${y.bitrate}-${ie}-${Y}-${K}-${ye}-${X}`;if(o[Re])if(o[Re].uri!==y.url&&!y.attrs["PATHWAY-ID"]){const Ce=u[Re]+=1;y.attrs["PATHWAY-ID"]=new Array(Ce+1).join(".");const Ve=new Pd(y);o[Re]=Ve,s.push(Ve)}else o[Re].addGroupId("audio",R.AUDIO),o[Re].addGroupId("text",R.SUBTITLES);else{const Ce=new Pd(y);o[Re]=Ce,u[Re]=1,s.push(Ce)}}),this.filterAndSortMediaOptions(s,t,c,h,m)}filterAndSortMediaOptions(e,t,n,s,o){let u=[],c=[],h=e;if((n||s)&&o&&(h=h.filter(({videoCodec:_,videoRange:L,width:M,height:F})=>(!!_||!!(M&&F))&&U3(L))),h.length===0){Promise.resolve().then(()=>{if(this.hls){t.levels.length&&this.warn(`One or more CODECS in variant not supported: ${JSON.stringify(t.levels[0].attrs)}`);const _=new Error("no level with compatible codecs found in manifest");this.hls.trigger(V.ERROR,{type:cn.MEDIA_ERROR,details:qe.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:_,reason:_.message})}});return}if(t.audioTracks){const{preferManagedMediaSource:_}=this.hls.config;u=t.audioTracks.filter(L=>!L.audioCodec||s1(L.audioCodec,"audio",_)),__(u)}t.subtitles&&(c=t.subtitles,__(c));const m=h.slice(0);h.sort((_,L)=>{if(_.attrs["HDCP-LEVEL"]!==L.attrs["HDCP-LEVEL"])return(_.attrs["HDCP-LEVEL"]||"")>(L.attrs["HDCP-LEVEL"]||"")?1:-1;if(n&&_.height!==L.height)return _.height-L.height;if(_.frameRate!==L.frameRate)return _.frameRate-L.frameRate;if(_.videoRange!==L.videoRange)return Kg.indexOf(_.videoRange)-Kg.indexOf(L.videoRange);if(_.videoCodec!==L.videoCodec){const M=zR(_.videoCodec),F=zR(L.videoCodec);if(M!==F)return F-M}if(_.uri===L.uri&&_.codecSet!==L.codecSet){const M=jg(_.codecSet),F=jg(L.codecSet);if(M!==F)return F-M}return _.averageBitrate!==L.averageBitrate?_.averageBitrate-L.averageBitrate:0});let y=m[0];if(this.steering&&(h=this.steering.filterParsedLevels(h),h.length!==m.length)){for(let _=0;_<m.length;_++)if(m[_].pathwayId===h[0].pathwayId){y=m[_];break}}this._levels=h;for(let _=0;_<h.length;_++)if(h[_]===y){var E;this._firstLevel=_;const L=y.bitrate,M=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${h.length} level(s) found, first bitrate: ${L}`),((E=this.hls.userConfig)==null?void 0:E.abrEwmaDefaultEstimate)===void 0){const F=Math.min(L,this.hls.config.abrEwmaDefaultEstimateMax);F>M&&M===A_.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=F)}break}const T=o&&!s,R={levels:h,audioTracks:u,subtitleTracks:c,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:o,video:s,altAudio:!T&&u.some(_=>!!_.url)};this.hls.trigger(V.MANIFEST_PARSED,R),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}get levels(){return this._levels.length===0?null:this._levels}get level(){return this.currentLevelIndex}set level(e){const t=this._levels;if(t.length===0)return;if(e<0||e>=t.length){const y=new Error("invalid level idx"),E=e<0;if(this.hls.trigger(V.ERROR,{type:cn.OTHER_ERROR,details:qe.LEVEL_SWITCH_ERROR,level:e,fatal:E,error:y,reason:y.message}),E)return;e=Math.min(e,t.length-1)}const n=this.currentLevelIndex,s=this.currentLevel,o=s?s.attrs["PATHWAY-ID"]:void 0,u=t[e],c=u.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=u,n===e&&u.details&&s&&o===c)return;this.log(`Switching to level ${e} (${u.height?u.height+"p ":""}${u.videoRange?u.videoRange+" ":""}${u.codecSet?u.codecSet+" ":""}@${u.bitrate})${c?" with Pathway "+c:""} from level ${n}${o?" with Pathway "+o:""}`);const h={level:e,attrs:u.attrs,details:u.details,bitrate:u.bitrate,averageBitrate:u.averageBitrate,maxBitrate:u.maxBitrate,realBitrate:u.realBitrate,width:u.width,height:u.height,codecSet:u.codecSet,audioCodec:u.audioCodec,videoCodec:u.videoCodec,audioGroups:u.audioGroups,subtitleGroups:u.subtitleGroups,loaded:u.loaded,loadError:u.loadError,fragmentError:u.fragmentError,name:u.name,id:u.id,uri:u.uri,url:u.url,urlId:0,audioGroupIds:u.audioGroupIds,textGroupIds:u.textGroupIds};this.hls.trigger(V.LEVEL_SWITCHING,h);const m=u.details;if(!m||m.live){const y=this.switchParams(u.uri,s==null?void 0:s.details,m);this.loadPlaylist(y)}}get manualLevel(){return this.manualLevelIndex}set manualLevel(e){this.manualLevelIndex=e,this._startLevel===void 0&&(this._startLevel=e),e!==-1&&(this.level=e)}get firstLevel(){return this._firstLevel}set firstLevel(e){this._firstLevel=e}get startLevel(){if(this._startLevel===void 0){const e=this.hls.config.startLevel;return e!==void 0?e:this.hls.firstAutoLevel}return this._startLevel}set startLevel(e){this._startLevel=e}onError(e,t){t.fatal||!t.context||t.context.type===zn.LEVEL&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(t!==void 0&&t.type===ln.MAIN){const n=t.elementaryStreams;if(!Object.keys(n).some(o=>!!n[o]))return;const s=this._levels[t.level];s!=null&&s.loadError&&(this.log(`Resetting level error count of ${s.loadError} on frag buffered`),s.loadError=0)}}onLevelLoaded(e,t){var n;const{level:s,details:o}=t,u=this._levels[s];if(!u){var c;this.warn(`Invalid level index ${s}`),(c=t.deliveryDirectives)!=null&&c.skip&&(o.deltaUpdateFailed=!0);return}s===this.currentLevelIndex?(u.fragmentError===0&&(u.loadError=0),this.playlistLoaded(s,t,u.details)):(n=t.deliveryDirectives)!=null&&n.skip&&(o.deltaUpdateFailed=!0)}loadPlaylist(e){super.loadPlaylist();const t=this.currentLevelIndex,n=this.currentLevel;if(n&&this.shouldLoadPlaylist(n)){let s=n.uri;if(e)try{s=e.addDirectives(s)}catch(u){this.warn(`Could not construct new URL with HLS Delivery Directives: ${u}`)}const o=n.attrs["PATHWAY-ID"];this.log(`Loading level index ${t}${(e==null?void 0:e.msn)!==void 0?" at sn "+e.msn+" part "+e.part:""} with${o?" Pathway "+o:""} ${s}`),this.clearTimer(),this.hls.trigger(V.LEVEL_LOADING,{url:s,level:t,pathwayId:n.attrs["PATHWAY-ID"],id:0,deliveryDirectives:e||null})}}get nextLoadLevel(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel}set nextLoadLevel(e){this.level=e,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=e)}removeLevel(e){var t;const n=this._levels.filter((s,o)=>o!==e?!0:(this.steering&&this.steering.removeLevel(s),s===this.currentLevel&&(this.currentLevel=null,this.currentLevelIndex=-1,s.details&&s.details.fragments.forEach(u=>u.level=-1)),!1));cA(n),this._levels=n,this.currentLevelIndex>-1&&(t=this.currentLevel)!=null&&t.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.hls.trigger(V.LEVELS_UPDATED,{levels:n})}onLevelsUpdated(e,{levels:t}){this._levels=t}checkMaxAutoUpdated(){const{autoLevelCapping:e,maxAutoLevel:t,maxHdcpLevel:n}=this.hls;this._maxAutoLevel!==t&&(this._maxAutoLevel=t,this.hls.trigger(V.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:n}))}}function __(r){const e={};r.forEach(t=>{const n=t.groupId||"";t.id=e[n]=e[n]||0,e[n]++})}class F6{constructor(e){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=e}abort(e){for(const n in this.keyUriToKeyInfo){const s=this.keyUriToKeyInfo[n].loader;if(s){var t;if(e&&e!==((t=s.context)==null?void 0:t.frag.type))return;s.abort()}}}detach(){for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e];(t.mediaKeySessionContext||t.decryptdata.isCommonEncryption)&&delete this.keyUriToKeyInfo[e]}}destroy(){this.detach();for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e].loader;t&&t.destroy()}this.keyUriToKeyInfo={}}createKeyLoadError(e,t=qe.KEY_LOAD_ERROR,n,s,o){return new vu({type:cn.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:o,error:n,networkDetails:s})}loadClear(e,t){if(this.emeController&&this.config.emeEnabled){const{sn:n,cc:s}=e;for(let o=0;o<t.length;o++){const u=t[o];if(s<=u.cc&&(n==="initSegment"||u.sn==="initSegment"||n<u.sn)){this.emeController.selectKeySystemFormat(u).then(c=>{u.setKeyFormat(c)});break}}}}load(e){return!e.decryptdata&&e.encrypted&&this.emeController?this.emeController.selectKeySystemFormat(e).then(t=>this.loadInternal(e,t)):this.loadInternal(e)}loadInternal(e,t){var n,s;t&&e.setKeyFormat(t);const o=e.decryptdata;if(!o){const m=new Error(t?`Expected frag.decryptdata to be defined after setting format ${t}`:"Missing decryption data on fragment in onKeyLoading");return Promise.reject(this.createKeyLoadError(e,qe.KEY_LOAD_ERROR,m))}const u=o.uri;if(!u)return Promise.reject(this.createKeyLoadError(e,qe.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${u}"`)));let c=this.keyUriToKeyInfo[u];if((n=c)!=null&&n.decryptdata.key)return o.key=c.decryptdata.key,Promise.resolve({frag:e,keyInfo:c});if((s=c)!=null&&s.keyLoadPromise){var h;switch((h=c.mediaKeySessionContext)==null?void 0:h.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return c.keyLoadPromise.then(m=>(o.key=m.keyInfo.decryptdata.key,{frag:e,keyInfo:c}))}}switch(c=this.keyUriToKeyInfo[u]={decryptdata:o,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},o.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return o.keyFormat==="identity"?this.loadKeyHTTP(c,e):this.loadKeyEME(c,e);case"AES-128":return this.loadKeyHTTP(c,e);default:return Promise.reject(this.createKeyLoadError(e,qe.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${o.method}"`)))}}loadKeyEME(e,t){const n={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){const s=this.emeController.loadKey(n);if(s)return(e.keyLoadPromise=s.then(o=>(e.mediaKeySessionContext=o,n))).catch(o=>{throw e.keyLoadPromise=null,o})}return Promise.resolve(n)}loadKeyHTTP(e,t){const n=this.config,s=n.loader,o=new s(n);return t.keyLoader=e.loader=o,e.keyLoadPromise=new Promise((u,c)=>{const h={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},m=n.keyLoadPolicy.default,y={loadPolicy:m,timeout:m.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},E={onSuccess:(T,R,_,L)=>{const{frag:M,keyInfo:F,url:Z}=_;if(!M.decryptdata||F!==this.keyUriToKeyInfo[Z])return c(this.createKeyLoadError(M,qe.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),L));F.decryptdata.key=M.decryptdata.key=new Uint8Array(T.data),M.keyLoader=null,F.loader=null,u({frag:M,keyInfo:F})},onError:(T,R,_,L)=>{this.resetLoader(R),c(this.createKeyLoadError(t,qe.KEY_LOAD_ERROR,new Error(`HTTP Error ${T.code} loading key ${T.text}`),_,qi({url:h.url,data:void 0},T)))},onTimeout:(T,R,_)=>{this.resetLoader(R),c(this.createKeyLoadError(t,qe.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),_))},onAbort:(T,R,_)=>{this.resetLoader(R),c(this.createKeyLoadError(t,qe.INTERNAL_ABORTED,new Error("key loading aborted"),_))}};o.load(h,y,E)})}resetLoader(e){const{frag:t,keyInfo:n,url:s}=e,o=n.loader;t.keyLoader===o&&(t.keyLoader=null,n.loader=null),delete this.keyUriToKeyInfo[s],o&&o.destroy()}}function L_(){return self.SourceBuffer||self.WebKitSourceBuffer}function k_(){if(!of())return!1;const e=L_();return!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function"}function N6(){if(!k_())return!1;const r=of();return typeof(r==null?void 0:r.isTypeSupported)=="function"&&(["avc1.42E01E,mp4a.40.2","av01.0.01M.08","vp09.00.50.08"].some(e=>r.isTypeSupported(pp(e,"video")))||["mp4a.40.2","fLaC"].some(e=>r.isTypeSupported(pp(e,"audio"))))}function U6(){var r;const e=L_();return typeof(e==null||(r=e.prototype)==null?void 0:r.changeType)=="function"}const B6=250,dv=2,$6=.1,V6=.05;class z6{constructor(e,t,n,s){this.config=void 0,this.media=null,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=e,this.media=t,this.fragmentTracker=n,this.hls=s}destroy(){this.media=null,this.hls=this.fragmentTracker=null}poll(e,t){const{config:n,media:s,stalled:o}=this;if(s===null)return;const{currentTime:u,seeking:c}=s,h=this.seeking&&!c,m=!this.seeking&&c;if(this.seeking=c,u!==e){if(this.moved=!0,c||(this.nudgeRetry=0),o!==null){if(this.stallReported){const M=self.performance.now()-o;Fe.warn(`playback not stuck anymore @${u}, after ${Math.round(M)}ms`),this.stallReported=!1}this.stalled=null}return}if(m||h){this.stalled=null;return}if(s.paused&&!c||s.ended||s.playbackRate===0||!Dr.getBuffered(s).length){this.nudgeRetry=0;return}const y=Dr.bufferInfo(s,u,0),E=y.nextStart||0;if(c){const M=y.len>dv,F=!E||t&&t.start<=u||E-u>dv&&!this.fragmentTracker.getPartialFragment(u);if(M||F)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var T;if(!(y.len>0)&&!E)return;const F=Math.max(E,y.start||0)-u,Z=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,Y=(Z==null||(T=Z.details)==null?void 0:T.live)?Z.details.targetduration*2:dv,X=this.fragmentTracker.getPartialFragment(u);if(F>0&&(F<=Y||X)){s.paused||this._trySkipBufferHole(X);return}}const R=self.performance.now();if(o===null){this.stalled=R;return}const _=R-o;if(!c&&_>=B6&&(this._reportStall(y),!this.media))return;const L=Dr.bufferInfo(s,u,n.maxBufferHole);this._tryFixBufferStall(L,_)}_tryFixBufferStall(e,t){const{config:n,fragmentTracker:s,media:o}=this;if(o===null)return;const u=o.currentTime,c=s.getPartialFragment(u);c&&(this._trySkipBufferHole(c)||!this.media)||(e.len>n.maxBufferHole||e.nextStart&&e.nextStart-u<n.maxBufferHole)&&t>n.highBufferWatchdogPeriod*1e3&&(Fe.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())}_reportStall(e){const{hls:t,media:n,stallReported:s}=this;if(!s&&n){this.stallReported=!0;const o=new Error(`Playback stalling at @${n.currentTime} due to low buffer (${JSON.stringify(e)})`);Fe.warn(o.message),t.trigger(V.ERROR,{type:cn.MEDIA_ERROR,details:qe.BUFFER_STALLED_ERROR,fatal:!1,error:o,buffer:e.len})}}_trySkipBufferHole(e){const{config:t,hls:n,media:s}=this;if(s===null)return 0;const o=s.currentTime,u=Dr.bufferInfo(s,o,0),c=o<u.start?u.start:u.nextStart;if(c){const h=u.len<=t.maxBufferHole,m=u.len>0&&u.len<1&&s.readyState<3,y=c-o;if(y>0&&(h||m)){if(y>t.maxBufferHole){const{fragmentTracker:T}=this;let R=!1;if(o===0){const _=T.getAppendedFrag(0,ln.MAIN);_&&c<_.end&&(R=!0)}if(!R){const _=e||T.getAppendedFrag(o,ln.MAIN);if(_){let L=!1,M=_.end;for(;M<c;){const F=T.getPartialFragment(M);if(F)M+=F.duration;else{L=!0;break}}if(L)return 0}}}const E=Math.max(c+V6,o+$6);if(Fe.warn(`skipping hole, adjusting currentTime from ${o} to ${E}`),this.moved=!0,this.stalled=null,s.currentTime=E,e&&!e.gap){const T=new Error(`fragment loaded with buffer holes, seeking from ${o} to ${E}`);n.trigger(V.ERROR,{type:cn.MEDIA_ERROR,details:qe.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:T,reason:T.message,frag:e})}return E}}return 0}_tryNudgeBuffer(){const{config:e,hls:t,media:n,nudgeRetry:s}=this;if(n===null)return;const o=n.currentTime;if(this.nudgeRetry++,s<e.nudgeMaxRetry){const u=o+(s+1)*e.nudgeOffset,c=new Error(`Nudging 'currentTime' from ${o} to ${u}`);Fe.warn(c.message),n.currentTime=u,t.trigger(V.ERROR,{type:cn.MEDIA_ERROR,details:qe.BUFFER_NUDGE_ON_STALL,error:c,fatal:!1})}else{const u=new Error(`Playhead still not moving while enough data buffered @${o} after ${e.nudgeMaxRetry} nudges`);Fe.error(u.message),t.trigger(V.ERROR,{type:cn.MEDIA_ERROR,details:qe.BUFFER_STALLED_ERROR,error:u,fatal:!0})}}}const j6=100;class H6 extends S1{constructor(e,t,n){super(e,t,n,"[stream-controller]",ln.MAIN),this.audioCodecSwap=!1,this.gapController=null,this.level=-1,this._forceStartLoad=!1,this.altAudio=!1,this.audioOnly=!1,this.fragPlaying=null,this.onvplaying=null,this.onvseeked=null,this.fragLastKbps=0,this.couldBacktrack=!1,this.backtrackFragment=null,this.audioCodecSwitch=!1,this.videoBuffer=null,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(V.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(V.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(V.MANIFEST_LOADING,this.onManifestLoading,this),e.on(V.MANIFEST_PARSED,this.onManifestParsed,this),e.on(V.LEVEL_LOADING,this.onLevelLoading,this),e.on(V.LEVEL_LOADED,this.onLevelLoaded,this),e.on(V.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(V.ERROR,this.onError,this),e.on(V.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(V.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(V.BUFFER_CREATED,this.onBufferCreated,this),e.on(V.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(V.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(V.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(V.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(V.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(V.MANIFEST_LOADING,this.onManifestLoading,this),e.off(V.MANIFEST_PARSED,this.onManifestParsed,this),e.off(V.LEVEL_LOADED,this.onLevelLoaded,this),e.off(V.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(V.ERROR,this.onError,this),e.off(V.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(V.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(V.BUFFER_CREATED,this.onBufferCreated,this),e.off(V.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(V.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(V.FRAG_BUFFERED,this.onFragBuffered,this)}onHandlerDestroying(){this._unregisterListeners(),super.onHandlerDestroying()}startLoad(e){if(this.levels){const{lastCurrentTime:t,hls:n}=this;if(this.stopLoad(),this.setInterval(j6),this.level=-1,!this.startFragRequested){let s=n.startLevel;s===-1&&(n.config.testBandwidth&&this.levels.length>1?(s=0,this.bitrateTest=!0):s=n.firstAutoLevel),n.nextLoadLevel=s,this.level=n.loadLevel,this.loadedmetadata=!1}t>0&&e===-1&&(this.log(`Override startPosition with lastCurrentTime @${t.toFixed(3)}`),e=t),this.state=ot.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=ot.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case ot.WAITING_LEVEL:{const{levels:t,level:n}=this,s=t==null?void 0:t[n],o=s==null?void 0:s.details;if(o&&(!o.live||this.levelLastLoaded===s)){if(this.waitForCdnTuneIn(o))break;this.state=ot.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=ot.IDLE;break}break}case ot.FRAG_LOADING_WAITING_RETRY:{var e;const t=self.performance.now(),n=this.retryDate;if(!n||t>=n||(e=this.media)!=null&&e.seeking){const{levels:s,level:o}=this,u=s==null?void 0:s[o];this.resetStartWhenNotLoaded(u||null),this.state=ot.IDLE}}break}this.state===ot.IDLE&&this.doTickIdle(),this.onTickEnd()}onTickEnd(){super.onTickEnd(),this.checkBuffer(),this.checkFragmentChanged()}doTickIdle(){const{hls:e,levelLastLoaded:t,levels:n,media:s}=this;if(t===null||!s&&(this.startFragRequested||!e.config.startFragPrefetch)||this.altAudio&&this.audioOnly)return;const o=e.nextLoadLevel;if(!(n!=null&&n[o]))return;const u=n[o],c=this.getMainFwdBufferInfo();if(c===null)return;const h=this.getLevelDetails();if(h&&this._streamEnded(c,h)){const L={};this.altAudio&&(L.type="video"),this.hls.trigger(V.BUFFER_EOS,L),this.state=ot.ENDED;return}e.loadLevel!==o&&e.manualLevel===-1&&this.log(`Adapting to level ${o} from level ${this.level}`),this.level=e.nextLoadLevel=o;const m=u.details;if(!m||this.state===ot.WAITING_LEVEL||m.live&&this.levelLastLoaded!==u){this.level=o,this.state=ot.WAITING_LEVEL;return}const y=c.len,E=this.getMaxBufferLength(u.maxBitrate);if(y>=E)return;this.backtrackFragment&&this.backtrackFragment.start>c.end&&(this.backtrackFragment=null);const T=this.backtrackFragment?this.backtrackFragment.start:c.end;let R=this.getNextFragment(T,m);if(this.couldBacktrack&&!this.fragPrevious&&R&&R.sn!=="initSegment"&&this.fragmentTracker.getState(R)!==Yi.OK){var _;const M=((_=this.backtrackFragment)!=null?_:R).sn-m.startSN,F=m.fragments[M-1];F&&R.cc===F.cc&&(R=F,this.fragmentTracker.removeFragment(F))}else this.backtrackFragment&&c.len&&(this.backtrackFragment=null);if(R&&this.isLoopLoading(R,T)){if(!R.gap){const M=this.audioOnly&&!this.altAudio?fr.AUDIO:fr.VIDEO,F=(M===fr.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;F&&this.afterBufferFlushed(F,M,ln.MAIN)}R=this.getNextFragmentLoopLoading(R,m,c,ln.MAIN,E)}R&&(R.initSegment&&!R.initSegment.data&&!this.bitrateTest&&(R=R.initSegment),this.loadFragment(R,u,T))}loadFragment(e,t,n){const s=this.fragmentTracker.getState(e);this.fragCurrent=e,s===Yi.NOT_LOADED||s===Yi.PARTIAL?e.sn==="initSegment"?this._loadInitSegment(e,t):this.bitrateTest?(this.log(`Fragment ${e.sn} of level ${e.level} is being downloaded to test bitrate and will not be buffered`),this._loadBitrateTestFrag(e,t)):(this.startFragRequested=!0,super.loadFragment(e,t,n)):this.clearTrackerIfNeeded(e)}getBufferedFrag(e){return this.fragmentTracker.getBufferedFrag(e,ln.MAIN)}followingBufferedFrag(e){return e?this.getBufferedFrag(e.end+.5):null}immediateLevelSwitch(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)}nextLevelSwitch(){const{levels:e,media:t}=this;if(t!=null&&t.readyState){let n;const s=this.getAppendedFrag(t.currentTime);s&&s.start>1&&this.flushMainBuffer(0,s.start-1);const o=this.getLevelDetails();if(o!=null&&o.live){const c=this.getMainFwdBufferInfo();if(!c||c.len<o.targetduration*2)return}if(!t.paused&&e){const c=this.hls.nextLoadLevel,h=e[c],m=this.fragLastKbps;m&&this.fragCurrent?n=this.fragCurrent.duration*h.maxBitrate/(1e3*m)+1:n=0}else n=0;const u=this.getBufferedFrag(t.currentTime+n);if(u){const c=this.followingBufferedFrag(u);if(c){this.abortCurrentFrag();const h=c.maxStartPTS?c.maxStartPTS:c.start,m=c.duration,y=Math.max(u.end,h+Math.min(Math.max(m-this.config.maxFragLookUpTolerance,m*(this.couldBacktrack?.5:.125)),m*(this.couldBacktrack?.75:.25)));this.flushMainBuffer(y,Number.POSITIVE_INFINITY)}}}}abortCurrentFrag(){const e=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,e&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.state){case ot.KEY_LOADING:case ot.FRAG_LOADING:case ot.FRAG_LOADING_WAITING_RETRY:case ot.PARSING:case ot.PARSED:this.state=ot.IDLE;break}this.nextLoadPosition=this.getLoadPosition()}flushMainBuffer(e,t){super.flushMainBuffer(e,t,this.altAudio?"video":null)}onMediaAttached(e,t){super.onMediaAttached(e,t);const n=t.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),n.addEventListener("playing",this.onvplaying),n.addEventListener("seeked",this.onvseeked),this.gapController=new z6(this.config,n,this.fragmentTracker,this.hls)}onMediaDetaching(){const{media:e}=this;e&&this.onvplaying&&this.onvseeked&&(e.removeEventListener("playing",this.onvplaying),e.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),super.onMediaDetaching()}onMediaPlaying(){this.tick()}onMediaSeeked(){const e=this.media,t=e?e.currentTime:null;Bt(t)&&this.log(`Media seeked to ${t.toFixed(3)}`);const n=this.getMainFwdBufferInfo();if(n===null||n.len===0){this.warn(`Main forward buffer length on "seeked" event ${n?n.len:"empty"})`);return}this.tick()}onManifestLoading(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(V.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=!1,this.startPosition=this.lastCurrentTime=this.fragLastKbps=0,this.levels=this.fragPlaying=this.backtrackFragment=this.levelLastLoaded=null,this.altAudio=this.audioOnly=this.startFragRequested=!1}onManifestParsed(e,t){let n=!1,s=!1;t.levels.forEach(o=>{const u=o.audioCodec;u&&(n=n||u.indexOf("mp4a.40.2")!==-1,s=s||u.indexOf("mp4a.40.5")!==-1)}),this.audioCodecSwitch=n&&s&&!U6(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1}onLevelLoading(e,t){const{levels:n}=this;if(!n||this.state!==ot.IDLE)return;const s=n[t.level];(!s.details||s.details.live&&this.levelLastLoaded!==s||this.waitForCdnTuneIn(s.details))&&(this.state=ot.WAITING_LEVEL)}onLevelLoaded(e,t){var n;const{levels:s}=this,o=t.level,u=t.details,c=u.totalduration;if(!s){this.warn(`Levels were reset while loading level ${o}`);return}this.log(`Level ${o} loaded [${u.startSN},${u.endSN}]${u.lastPartSn?`[part-${u.lastPartSn}-${u.lastPartIndex}]`:""}, cc [${u.startCC}, ${u.endCC}] duration:${c}`);const h=s[o],m=this.fragCurrent;m&&(this.state===ot.FRAG_LOADING||this.state===ot.FRAG_LOADING_WAITING_RETRY)&&m.level!==t.level&&m.loader&&this.abortCurrentFrag();let y=0;if(u.live||(n=h.details)!=null&&n.live){var E;if(this.checkLiveUpdate(u),u.deltaUpdateFailed)return;y=this.alignPlaylists(u,h.details,(E=this.levelLastLoaded)==null?void 0:E.details)}if(h.details=u,this.levelLastLoaded=h,this.hls.trigger(V.LEVEL_UPDATED,{details:u,level:o}),this.state===ot.WAITING_LEVEL){if(this.waitForCdnTuneIn(u))return;this.state=ot.IDLE}this.startFragRequested?u.live&&this.synchronizeToLiveEdge(u):this.setStartPosition(u,y),this.tick()}_handleFragmentLoadProgress(e){var t;const{frag:n,part:s,payload:o}=e,{levels:u}=this;if(!u){this.warn(`Levels were reset while fragment load was in progress. Fragment ${n.sn} of level ${n.level} will not be buffered`);return}const c=u[n.level],h=c.details;if(!h){this.warn(`Dropping fragment ${n.sn} of level ${n.level} after level details were reset`),this.fragmentTracker.removeFragment(n);return}const m=c.videoCodec,y=h.PTSKnown||!h.live,E=(t=n.initSegment)==null?void 0:t.data,T=this._getAudioCodec(c),R=this.transmuxer=this.transmuxer||new HA(this.hls,ln.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),_=s?s.index:-1,L=_!==-1,M=new v1(n.level,n.sn,n.stats.chunkCount,o.byteLength,_,L),F=this.initPTS[n.cc];R.push(o,E,T,m,n,s,h.totalduration,y,M,F)}onAudioTrackSwitching(e,t){const n=this.altAudio;if(!!!t.url){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;const u=this.fragCurrent;u&&(this.log("Switching to main audio track, cancel main fragment load"),u.abortRequests(),this.fragmentTracker.removeFragment(u)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();const o=this.hls;n&&(o.trigger(V.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null}),this.fragmentTracker.removeAllFragments()),o.trigger(V.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const n=t.id,s=!!this.hls.audioTracks[n].url;if(s){const o=this.videoBuffer;o&&this.mediaBuffer!==o&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=o)}this.altAudio=s,this.tick()}onBufferCreated(e,t){const n=t.tracks;let s,o,u=!1;for(const c in n){const h=n[c];if(h.id==="main"){if(o=c,s=h,c==="video"){const m=n[c];m&&(this.videoBuffer=m.buffer)}}else u=!0}u&&s?(this.log(`Alternate track found, use ${o}.buffered to schedule main fragment loading`),this.mediaBuffer=s.buffer):this.mediaBuffer=this.media}onFragBuffered(e,t){const{frag:n,part:s}=t;if(n&&n.type!==ln.MAIN)return;if(this.fragContextChanged(n)){this.warn(`Fragment ${n.sn}${s?" p: "+s.index:""} of level ${n.level} finished buffering, but was aborted. state: ${this.state}`),this.state===ot.PARSED&&(this.state=ot.IDLE);return}const o=s?s.stats:n.stats;this.fragLastKbps=Math.round(8*o.total/(o.buffering.end-o.loading.first)),n.sn!=="initSegment"&&(this.fragPrevious=n),this.fragBufferedComplete(n,s)}onError(e,t){var n;if(t.fatal){this.state=ot.ERROR;return}switch(t.details){case qe.FRAG_GAP:case qe.FRAG_PARSING_ERROR:case qe.FRAG_DECRYPT_ERROR:case qe.FRAG_LOAD_ERROR:case qe.FRAG_LOAD_TIMEOUT:case qe.KEY_LOAD_ERROR:case qe.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(ln.MAIN,t);break;case qe.LEVEL_LOAD_ERROR:case qe.LEVEL_LOAD_TIMEOUT:case qe.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===ot.WAITING_LEVEL&&((n=t.context)==null?void 0:n.type)===zn.LEVEL&&(this.state=ot.IDLE);break;case qe.BUFFER_APPEND_ERROR:case qe.BUFFER_FULL_ERROR:if(!t.parent||t.parent!=="main")return;if(t.details===qe.BUFFER_APPEND_ERROR){this.resetLoadingState();return}this.reduceLengthAndFlushBuffer(t)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case qe.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}checkBuffer(){const{media:e,gapController:t}=this;if(!(!e||!t||!e.readyState)){if(this.loadedmetadata||!Dr.getBuffered(e).length){const n=this.state!==ot.IDLE?this.fragCurrent:null;t.poll(this.lastCurrentTime,n)}this.lastCurrentTime=e.currentTime}}onFragLoadEmergencyAborted(){this.state=ot.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==fr.AUDIO||this.audioOnly&&!this.altAudio){const n=(t===fr.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(n,t,ln.MAIN),this.tick()}}onLevelsUpdated(e,t){this.level>-1&&this.fragCurrent&&(this.level=this.fragCurrent.level),this.levels=t.levels}swapAudioCodec(){this.audioCodecSwap=!this.audioCodecSwap}seekToStartPos(){const{media:e}=this;if(!e)return;const t=e.currentTime;let n=this.startPosition;if(n>=0&&t<n){if(e.seeking){this.log(`could not seek to ${n}, already seeking at ${t}`);return}const s=Dr.getBuffered(e),u=(s.length?s.start(0):0)-n;u>0&&(u<this.config.maxBufferHole||u<this.config.maxFragLookUpTolerance)&&(this.log(`adjusting start position by ${u} to match buffer start`),n+=u,this.startPosition=n),this.log(`seek to target start position ${n} from current time ${t}`),e.currentTime=n}}_getAudioCodec(e){let t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&t&&(this.log("Swapping audio codec"),t.indexOf("mp4a.40.5")!==-1?t="mp4a.40.2":t="mp4a.40.5"),t}_loadBitrateTestFrag(e,t){e.bitrateTest=!0,this._doFragLoad(e,t).then(n=>{const{hls:s}=this;if(!n||this.fragContextChanged(e))return;t.fragmentError=0,this.state=ot.IDLE,this.startFragRequested=!1,this.bitrateTest=!1;const o=e.stats;o.parsing.start=o.parsing.end=o.buffering.start=o.buffering.end=self.performance.now(),s.trigger(V.FRAG_LOADED,n),e.bitrateTest=!1})}_handleTransmuxComplete(e){var t;const n="main",{hls:s}=this,{remuxResult:o,chunkMeta:u}=e,c=this.getCurrentContext(u);if(!c){this.resetWhenMissingContext(u);return}const{frag:h,part:m,level:y}=c,{video:E,text:T,id3:R,initSegment:_}=o,{details:L}=y,M=this.altAudio?void 0:o.audio;if(this.fragContextChanged(h)){this.fragmentTracker.removeFragment(h);return}if(this.state=ot.PARSING,_){if(_!=null&&_.tracks){const K=h.initSegment||h;this._bufferInitSegment(y,_.tracks,K,u),s.trigger(V.FRAG_PARSING_INIT_SEGMENT,{frag:K,id:n,tracks:_.tracks})}const F=_.initPTS,Z=_.timescale;Bt(F)&&(this.initPTS[h.cc]={baseTime:F,timescale:Z},s.trigger(V.INIT_PTS_FOUND,{frag:h,id:n,initPTS:F,timescale:Z}))}if(E&&L&&h.sn!=="initSegment"){const F=L.fragments[h.sn-1-L.startSN],Z=h.sn===L.startSN,K=!F||h.cc>F.cc;if(o.independent!==!1){const{startPTS:Y,endPTS:X,startDTS:ue,endDTS:ie}=E;if(m)m.elementaryStreams[E.type]={startPTS:Y,endPTS:X,startDTS:ue,endDTS:ie};else if(E.firstKeyFrame&&E.independent&&u.id===1&&!K&&(this.couldBacktrack=!0),E.dropped&&E.independent){const ye=this.getMainFwdBufferInfo(),de=(ye?ye.end:this.getLoadPosition())+this.config.maxBufferHole,Re=E.firstKeyFramePTS?E.firstKeyFramePTS:Y;if(!Z&&de<Re-this.config.maxBufferHole&&!K){this.backtrack(h);return}else K&&(h.gap=!0);h.setElementaryStreamInfo(E.type,h.start,X,h.start,ie,!0)}else Z&&Y>dv&&(h.gap=!0);h.setElementaryStreamInfo(E.type,Y,X,ue,ie),this.backtrackFragment&&(this.backtrackFragment=h),this.bufferFragmentData(E,h,m,u,Z||K)}else if(Z||K)h.gap=!0;else{this.backtrack(h);return}}if(M){const{startPTS:F,endPTS:Z,startDTS:K,endDTS:Y}=M;m&&(m.elementaryStreams[fr.AUDIO]={startPTS:F,endPTS:Z,startDTS:K,endDTS:Y}),h.setElementaryStreamInfo(fr.AUDIO,F,Z,K,Y),this.bufferFragmentData(M,h,m,u)}if(L&&R!=null&&(t=R.samples)!=null&&t.length){const F={id:n,frag:h,details:L,samples:R.samples};s.trigger(V.FRAG_PARSING_METADATA,F)}if(L&&T){const F={id:n,frag:h,details:L,samples:T.samples};s.trigger(V.FRAG_PARSING_USERDATA,F)}}_bufferInitSegment(e,t,n,s){if(this.state!==ot.PARSING)return;this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&delete t.audio;const{audio:o,video:u,audiovideo:c}=t;if(o){let h=e.audioCodec;const m=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(h&&(h.indexOf("mp4a.40.5")!==-1?h="mp4a.40.2":h="mp4a.40.5"),o.metadata.channelCount!==1&&m.indexOf("firefox")===-1&&(h="mp4a.40.5")),h&&h.indexOf("mp4a.40.5")!==-1&&m.indexOf("android")!==-1&&o.container!=="audio/mpeg"&&(h="mp4a.40.2",this.log(`Android: force audio codec to ${h}`)),e.audioCodec&&e.audioCodec!==h&&this.log(`Swapping manifest audio codec "${e.audioCodec}" for "${h}"`),o.levelCodec=h,o.id="main",this.log(`Init audio buffer, container:${o.container}, codecs[selected/level/parsed]=[${h||""}/${e.audioCodec||""}/${o.codec}]`)}u&&(u.levelCodec=e.videoCodec,u.id="main",this.log(`Init video buffer, container:${u.container}, codecs[level/parsed]=[${e.videoCodec||""}/${u.codec}]`)),c&&this.log(`Init audiovideo buffer, container:${c.container}, codecs[level/parsed]=[${e.codecs}/${c.codec}]`),this.hls.trigger(V.BUFFER_CODECS,t),Object.keys(t).forEach(h=>{const y=t[h].initSegment;y!=null&&y.byteLength&&this.hls.trigger(V.BUFFER_APPENDING,{type:h,data:y,frag:n,part:null,chunkMeta:s,parent:n.type})}),this.tickImmediate()}getMainFwdBufferInfo(){return this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,ln.MAIN)}backtrack(e){this.couldBacktrack=!0,this.backtrackFragment=e,this.resetTransmuxer(),this.flushBufferGap(e),this.fragmentTracker.removeFragment(e),this.fragPrevious=null,this.nextLoadPosition=e.start,this.state=ot.IDLE}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&e.seeking===!1){const n=e.currentTime;if(Dr.isBuffered(e,n)?t=this.getAppendedFrag(n):Dr.isBuffered(e,n+.1)&&(t=this.getAppendedFrag(n+.1)),t){this.backtrackFragment=null;const s=this.fragPlaying,o=t.level;(!s||t.sn!==s.sn||s.level!==o)&&(this.fragPlaying=t,this.hls.trigger(V.FRAG_CHANGED,{frag:t}),(!s||s.level!==o)&&this.hls.trigger(V.LEVEL_SWITCHED,{level:o}))}}}get nextLevel(){const e=this.nextBufferedFrag;return e?e.level:-1}get currentFrag(){const e=this.media;return e?this.fragPlaying||this.getAppendedFrag(e.currentTime):null}get currentProgramDateTime(){const e=this.media;if(e){const t=e.currentTime,n=this.currentFrag;if(n&&Bt(t)&&Bt(n.programDateTime)){const s=n.programDateTime+(t-n.start)*1e3;return new Date(s)}}return null}get currentLevel(){const e=this.currentFrag;return e?e.level:-1}get nextBufferedFrag(){const e=this.currentFrag;return e?this.followingBufferedFrag(e):null}get forceStartLoad(){return this._forceStartLoad}}class Bo{static get version(){return"1.5.8"}static isMSESupported(){return k_()}static isSupported(){return N6()}static getMediaSource(){return of()}static get Events(){return V}static get ErrorTypes(){return cn}static get ErrorDetails(){return qe}static get DefaultConfig(){return Bo.defaultConfig?Bo.defaultConfig:A_}static set DefaultConfig(e){Bo.defaultConfig=e}constructor(e={}){this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this.started=!1,this._emitter=new _1,this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null,this.triggeringException=void 0,FB(e.debug||!1,"Hls instance");const t=this.config=P6(Bo.DefaultConfig,e);this.userConfig=e,t.progressive&&M6(t);const{abrController:n,bufferController:s,capLevelController:o,errorController:u,fpsController:c}=t,h=new u(this),m=this.abrController=new n(this),y=this.bufferController=new s(this),E=this.capLevelController=new o(this),T=new c(this),R=new k3(this),_=new O3(this),L=t.contentSteeringController,M=L?new L(this):null,F=this.levelController=new O6(this,M),Z=new u$(this),K=new F6(this.config),Y=this.streamController=new H6(this,Z,K);E.setStreamController(Y),T.setStreamController(Y);const X=[R,F,Y];M&&X.splice(1,0,M),this.networkControllers=X;const ue=[m,y,E,T,_,Z];this.audioTrackController=this.createController(t.audioTrackController,X);const ie=t.audioStreamController;ie&&X.push(new ie(this,Z,K)),this.subtitleTrackController=this.createController(t.subtitleTrackController,X);const ye=t.subtitleStreamController;ye&&X.push(new ye(this,Z,K)),this.createController(t.timelineController,ue),K.emeController=this.emeController=this.createController(t.emeController,ue),this.cmcdController=this.createController(t.cmcdController,ue),this.latencyController=this.createController(F3,ue),this.coreComponents=ue,X.push(h);const de=h.onErrorOut;typeof de=="function"&&this.on(V.ERROR,de,h)}createController(e,t){if(e){const n=new e(this);return t&&t.push(n),n}return null}on(e,t,n=this){this._emitter.on(e,t,n)}once(e,t,n=this){this._emitter.once(e,t,n)}removeAllListeners(e){this._emitter.removeAllListeners(e)}off(e,t,n=this,s){this._emitter.off(e,t,n,s)}listeners(e){return this._emitter.listeners(e)}emit(e,t,n){return this._emitter.emit(e,t,n)}trigger(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(n){if(Fe.error("An internal error happened while handling event "+e+'. Error message: "'+n.message+'". Here is a stacktrace:',n),!this.triggeringException){this.triggeringException=!0;const s=e===V.ERROR;this.trigger(V.ERROR,{type:cn.OTHER_ERROR,details:qe.INTERNAL_EXCEPTION,fatal:s,event:e,error:n}),this.triggeringException=!1}}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){Fe.log("destroy"),this.trigger(V.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(t=>t.destroy()),this.networkControllers.length=0,this.coreComponents.forEach(t=>t.destroy()),this.coreComponents.length=0;const e=this.config;e.xhrSetup=e.fetchSetup=void 0,this.userConfig=null}attachMedia(e){Fe.log("attachMedia"),this._media=e,this.trigger(V.MEDIA_ATTACHING,{media:e})}detachMedia(){Fe.log("detachMedia"),this.trigger(V.MEDIA_DETACHING,void 0),this._media=null}loadSource(e){this.stopLoad();const t=this.media,n=this.url,s=this.url=KS.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,Fe.log(`loadSource:${s}`),t&&n&&(n!==s||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(V.MANIFEST_LOADING,{url:e})}startLoad(e=-1){Fe.log(`startLoad(${e})`),this.started=!0,this.networkControllers.forEach(t=>{t.startLoad(e)})}stopLoad(){Fe.log("stopLoad"),this.started=!1,this.networkControllers.forEach(e=>{e.stopLoad()})}resumeBuffering(){this.started&&this.networkControllers.forEach(e=>{"fragmentLoader"in e&&e.startLoad(-1)})}pauseBuffering(){this.networkControllers.forEach(e=>{"fragmentLoader"in e&&e.stopLoad()})}swapAudioCodec(){Fe.log("swapAudioCodec"),this.streamController.swapAudioCodec()}recoverMediaError(){Fe.log("recoverMediaError");const e=this._media;this.detachMedia(),e&&this.attachMedia(e)}removeLevel(e){this.levelController.removeLevel(e)}get levels(){const e=this.levelController.levels;return e||[]}get currentLevel(){return this.streamController.currentLevel}set currentLevel(e){Fe.log(`set currentLevel:${e}`),this.levelController.manualLevel=e,this.streamController.immediateLevelSwitch()}get nextLevel(){return this.streamController.nextLevel}set nextLevel(e){Fe.log(`set nextLevel:${e}`),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}get loadLevel(){return this.levelController.level}set loadLevel(e){Fe.log(`set loadLevel:${e}`),this.levelController.manualLevel=e}get nextLoadLevel(){return this.levelController.nextLoadLevel}set nextLoadLevel(e){this.levelController.nextLoadLevel=e}get firstLevel(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)}set firstLevel(e){Fe.log(`set firstLevel:${e}`),this.levelController.firstLevel=e}get startLevel(){const e=this.levelController.startLevel;return e===-1&&this.abrController.forcedAutoLevel>-1?this.abrController.forcedAutoLevel:e}set startLevel(e){Fe.log(`set startLevel:${e}`),e!==-1&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}get capLevelToPlayerSize(){return this.config.capLevelToPlayerSize}set capLevelToPlayerSize(e){const t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}get autoLevelCapping(){return this._autoLevelCapping}get bandwidthEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimate():NaN}set bandwidthEstimate(e){this.abrController.resetEstimator(e)}get ttfbEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimateTTFB():NaN}set autoLevelCapping(e){this._autoLevelCapping!==e&&(Fe.log(`set autoLevelCapping:${e}`),this._autoLevelCapping=e,this.levelController.checkMaxAutoUpdated())}get maxHdcpLevel(){return this._maxHdcpLevel}set maxHdcpLevel(e){N3(e)&&this._maxHdcpLevel!==e&&(this._maxHdcpLevel=e,this.levelController.checkMaxAutoUpdated())}get autoLevelEnabled(){return this.levelController.manualLevel===-1}get manualLevel(){return this.levelController.manualLevel}get minAutoLevel(){const{levels:e,config:{minAutoBitrate:t}}=this;if(!e)return 0;const n=e.length;for(let s=0;s<n;s++)if(e[s].maxBitrate>=t)return s;return 0}get maxAutoLevel(){const{levels:e,autoLevelCapping:t,maxHdcpLevel:n}=this;let s;if(t===-1&&e!=null&&e.length?s=e.length-1:s=t,n)for(let o=s;o--;){const u=e[o].attrs["HDCP-LEVEL"];if(u&&u<=n)return o}return s}get firstAutoLevel(){return this.abrController.firstAutoLevel}get nextAutoLevel(){return this.abrController.nextAutoLevel}set nextAutoLevel(e){this.abrController.nextAutoLevel=e}get playingDate(){return this.streamController.currentProgramDateTime}get mainForwardBufferInfo(){return this.streamController.getMainFwdBufferInfo()}setAudioOption(e){var t;return(t=this.audioTrackController)==null?void 0:t.setAudioOption(e)}setSubtitleOption(e){var t;return(t=this.subtitleTrackController)==null||t.setSubtitleOption(e),null}get allAudioTracks(){const e=this.audioTrackController;return e?e.allAudioTracks:[]}get audioTracks(){const e=this.audioTrackController;return e?e.audioTracks:[]}get audioTrack(){const e=this.audioTrackController;return e?e.audioTrack:-1}set audioTrack(e){const t=this.audioTrackController;t&&(t.audioTrack=e)}get allSubtitleTracks(){const e=this.subtitleTrackController;return e?e.allSubtitleTracks:[]}get subtitleTracks(){const e=this.subtitleTrackController;return e?e.subtitleTracks:[]}get subtitleTrack(){const e=this.subtitleTrackController;return e?e.subtitleTrack:-1}get media(){return this._media}set subtitleTrack(e){const t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}get subtitleDisplay(){const e=this.subtitleTrackController;return e?e.subtitleDisplay:!1}set subtitleDisplay(e){const t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}get lowLatencyMode(){return this.config.lowLatencyMode}set lowLatencyMode(e){this.config.lowLatencyMode=e}get liveSyncPosition(){return this.latencyController.liveSyncPosition}get latency(){return this.latencyController.latency}get maxLatency(){return this.latencyController.maxLatency}get targetLatency(){return this.latencyController.targetLatency}get drift(){return this.latencyController.drift}get forceStartLoad(){return this.streamController.forceStartLoad}}Bo.defaultConfig=void 0;function G6({src:r,quality:e,initialTime:t,timeOffsetStart:n,timeOffsetEnd:s,timeUpdateEvent:o=!1,debug:u,onSync:c,onInit:h,onDestroy:m}){const[y,E]=Tt.useState(),[T,R]=Tt.useState(!1),[_,L]=Tt.useState(1),[M,F]=Tt.useState(!1),[Z,K]=Tt.useState(!1),[Y,X]=Tt.useState(),[ue,ie]=Tt.useState({originDurationTime:0,originCurrentTime:0,progress:0,currentTime:0,durationTime:0}),ye=Tt.useRef(null),de=Tt.useRef();EU({element:ye.current,eventName:"timeupdate",handler:o&&M?()=>{if(!ye.current)return;const Pe=ye.current,ne=Math.floor(Pe.currentTime),_e=Math.floor(Pe.duration===1/0&&Pe.buffered.length>0?Pe.buffered.end(0):Pe.duration),Ue=ne-(n??0),He=(s??_e)-(n??0);ie({originCurrentTime:ne,originDurationTime:_e,currentTime:Ue,durationTime:He,progress:Ue/He*100})}:void 0});const Re=()=>{if(!ye.current)return;const Pe=ye.current;Pe.paused?Pe.play().catch(()=>{X(!0)}):Pe.pause()},Ce=()=>{if(!ye.current)return;const Pe=ye.current,ne=Pe.currentTime+10;typeof s=="number"&&s<ne?Pe.currentTime=s:Pe.currentTime=ne},Ve=()=>{if(!ye.current)return;const Pe=ye.current,ne=Pe.currentTime-10;typeof n=="number"&&n>ne?Pe.currentTime=n:Pe.currentTime=ne},ze=()=>{if(!ye.current)return;const Pe=ye.current;Pe.playbackRate===2?Pe.playbackRate=1:Pe.playbackRate+=.5},Qe=Pe=>{if(!ye.current)return;const ne=ye.current;ne.currentTime=(n??0)+Pe},et=Tt.useCallback(Pe=>{const ne=ye.current;ne&&(F(!1),Bo.isSupported()?(y==null||y.stopLoad(),y==null||y.loadSource(Pe)):ne.canPlayType("application/vnd.apple.mpegurl")&&(ne.src=Pe))},[y]);return Tt.useEffect(()=>{de.current=c},[c]),Tt.useEffect(()=>{if(!ye.current||!r)return;const Pe=ye.current;let ne;if(Bo.isSupported()){const Dt={debug:!1,enableWorker:!0,lowLatencyMode:!0,backBufferLength:90,highBufferWatchdogPeriod:1,maxMaxBufferLength:8};ne=new Bo(Dt),ne.attachMedia(Pe),ne.loadSource(r),E(ne)}else Pe.canPlayType("application/vnd.apple.mpegurl")&&(Pe.src=r);const _e=()=>{var tn,Fn,wt,Tn;const Dt=Pe.duration,bn=((wt=(Fn=(tn=ne==null?void 0:ne.levels)==null?void 0:tn[0])==null?void 0:Fn.details)==null?void 0:wt.live)||Dt===1/0;R(bn),(Tn=de.current)==null||Tn.call(de,!0),Dt!==1/0&&ie(Mn=>({...Mn,durationTime:Math.floor(Dt)})),t&&(Pe.currentTime=t),n&&!bn&&(Pe.currentTime=n),Pe.play().catch(()=>{X(!0)})},Ue=()=>{K(!1)},He=()=>{typeof s=="number"&&Pe.currentTime>=s&&typeof n=="number"&&(Pe.currentTime=n),K(!0),X(!1)},Be=()=>{Pe.pause()},Je=()=>{F(!0)},Xe=()=>{L(Pe.playbackRate)},Et=({detail:Dt})=>{ne&&(ne.currentLevel=Dt.quality)},gt=()=>{var tn,Fn,wt,Tn,Mn,Pi,Rr,Ar,ii,Xr,xi,As;const Dt=Pe.currentTime,bn=Pe.duration;if((Fn=(tn=ne==null?void 0:ne.levels[ne.currentLevel])==null?void 0:tn.details)!=null&&Fn.live)(wt=de==null?void 0:de.current)==null||wt.call(de,bn-Dt<10);else if(bn===1/0&&Pe.buffered.length>0){const Pr=Pe.buffered.end(0);(Tn=de==null?void 0:de.current)==null||Tn.call(de,Pr-Dt<10)}if(typeof s=="number"&&Dt>=s&&(Pe.currentTime=s,Pe.pause()),u){const Pr=Pe.buffered.length>0?Pe.buffered.end(0):0,si=((Pi=(Mn=ne==null?void 0:ne.levels[ne.currentLevel])==null?void 0:Mn.details)==null?void 0:Pi.live)||bn===1/0,Ft={isSupported:Bo.isSupported(),version:Bo.version,live:si,currentLevel:((Rr=ne==null?void 0:ne.levels[ne.currentLevel])==null?void 0:Rr.width)||"auto",firstLevel:((Ar=ne==null?void 0:ne.levels[ne.firstLevel])==null?void 0:Ar.width)||"auto",latency:(ii=ne==null?void 0:ne.latency)==null?void 0:ii.toFixed(2),targetLatency:ne==null?void 0:ne.targetLatency,currentTime:Dt,durationTime:bn,bufferedEnd:Pr,sync:si?(xi=(Xr=ne==null?void 0:ne.levels[ne.currentLevel])==null?void 0:Xr.details)!=null&&xi.live?Pr-Dt<5:bn-Dt<5:"not live"};(As=window==null?void 0:window.__brix_console)==null||As.call(window,"hls",Ft)}},Ot=Dt=>{console.log(Dt)};return document.addEventListener("__BP_VIDEO_QUALITY",Et),Pe.addEventListener("progress",gt),Pe.addEventListener("loadedmetadata",_e),Pe.addEventListener("pause",Ue),Pe.addEventListener("play",He),Pe.addEventListener("ratechange",Xe),Pe.addEventListener("canplay",Je),Pe.addEventListener("ended",Be),Pe.addEventListener("error",Ot),h==null||h(Pe,ne),()=>{document.removeEventListener("__BP_VIDEO_QUALITY",Et),Pe.removeEventListener("progress",gt),Pe.removeEventListener("loadedmetadata",_e),Pe.removeEventListener("pause",Ue),Pe.removeEventListener("play",He),Pe.removeEventListener("ratechange",Xe),Pe.removeEventListener("canplay",Je),Pe.removeEventListener("ended",Be),Pe.removeEventListener("error",Ot),ne==null||ne.stopLoad(),ne==null||ne.destroy(),m==null||m()}},[r,u,n,t,s,h,m]),Tt.useEffect(()=>{!M||typeof e>"u"||document.dispatchEvent(new CustomEvent("__BP_VIDEO_QUALITY",{detail:{quality:e}}))},[M,e]),{ref:ye,play:Z,live:T,error:Y,time:ue,hls:y,playbackRate:_,canPlay:M,handlePlayToggle:Re,handleBackward:Ve,handleForward:Ce,handlePlaybackRate:ze,handleSeektime:Qe,handleChangeSource:et}}const gp={root:"_root_yg3vm_2",progress_wrap:"_progress_wrap_yg3vm_14",rail:"_rail_yg3vm_22",progress:"_progress_yg3vm_14",handle:"_handle_yg3vm_38"};function D_({handle:r,progress:e,className:t,onChangeProgress:n}){const s=Tt.useRef(null),o=h=>{const m=h.target,y=h.nativeEvent.offsetX/m.offsetWidth;n==null||n(h,y*100)},u=h=>{if(h.buttons!==1||!s.current)return;const m=h.target,y=h.nativeEvent.offsetX/m.offsetWidth;s.current.style.width=y*100+"%",n==null||n(h,y*100)},c=h=>{if(!s.current)return;const m=h.target,y=(h.targetTouches[0].clientX-m.getBoundingClientRect().x)/m.offsetWidth;s.current.style.width=y*100+"%",n==null||n(h,y*100)};return Yt.jsx("div",{className:`${gp.root} ${t||""}`,children:Yt.jsxs("div",{className:gp.progress_wrap,onClick:o,onMouseMove:u,onTouchMove:c,children:[Yt.jsx("div",{className:gp.rail}),Yt.jsx("div",{className:`${gp.progress} ${r?gp.handle:""}`,ref:s,style:{width:`${e}%`}})]})})}const W6={root:"_root_pwcz5_1"};function I_(r,e=!1){const t=Math.floor(+r/3600),n=Math.floor((+r-t*3600)/60),s=(+r-t*3600-n*60).toFixed(0),o=t.toString().padStart(2,"0"),u=n.toString().padStart(2,"0"),c=s.padStart(2,"0");return e||t>0?`${o}:${u}:${c}`:`${u}:${c}`}function K6(r){const e=r.split(":").map(Number);let t=0;if(e.length===3){const[n,s,o]=e;t=n*3600+s*60+o}else if(e.length===2){const[n,s]=e;t=n*60+s}else t=+r;return t}function P_(r,e){let t="",n="",s="";if(e){const[o,...u]=e.split("?");n=u.join("&"),s=o}for(const o in r)Object.prototype.hasOwnProperty.call(r,o)&&r[o]!==void 0&&(t+=`${o}=${encodeURIComponent(r[o])}&`);return t+=n?`&${n}`:"",t.length>0&&t.endsWith("&")&&(t=t.slice(0,-1)),s?`${s}?${t}`:t}function q6({currentTime:r=0,durationTime:e=0,className:t}){return Yt.jsxs("div",{className:`${W6.root} ${t||""}`,children:[Yt.jsx("div",{children:I_(r)}),Yt.jsx("div",{children:I_(e)})]})}var K1={exports:{}};(function(r,e){typeof navigator<"u"&&function(t,n){r.exports=n()}(tg,function(){var t="http://www.w3.org/2000/svg",n="",s=!1,o=-999999,u=function(S){s=!!S},c=function(){return s},h=function(S){n=S},m=function(){return n};function y(p){return document.createElement(p)}function E(p,S){var b,A=p.length,I;for(b=0;b<A;b+=1){I=p[b].prototype;for(var D in I)Object.prototype.hasOwnProperty.call(I,D)&&(S.prototype[D]=I[D])}}function T(p){function S(){}return S.prototype=p,S}var R=function(){function p(S){this.audios=[],this.audioFactory=S,this._volume=1,this._isMuted=!1}return p.prototype={addAudio:function(b){this.audios.push(b)},pause:function(){var b,A=this.audios.length;for(b=0;b<A;b+=1)this.audios[b].pause()},resume:function(){var b,A=this.audios.length;for(b=0;b<A;b+=1)this.audios[b].resume()},setRate:function(b){var A,I=this.audios.length;for(A=0;A<I;A+=1)this.audios[A].setRate(b)},createAudio:function(b){return this.audioFactory?this.audioFactory(b):window.Howl?new window.Howl({src:[b]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(b){this.audioFactory=b},setVolume:function(b){this._volume=b,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var b,A=this.audios.length;for(b=0;b<A;b+=1)this.audios[b].volume(this._volume*(this._isMuted?0:1))}},function(){return new p}}(),_=function(){function p(b,A){var I=0,D=[],B;switch(b){case"int16":case"uint8c":B=1;break;default:B=1.1;break}for(I=0;I<A;I+=1)D.push(B);return D}function S(b,A){return b==="float32"?new Float32Array(A):b==="int16"?new Int16Array(A):b==="uint8c"?new Uint8ClampedArray(A):p(b,A)}return typeof Uint8ClampedArray=="function"&&typeof Float32Array=="function"?S:p}();function L(p){return Array.apply(null,{length:p})}var M=!0,F=null,Z="",K=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Y=Math.pow,X=Math.sqrt,ue=Math.floor,ie=Math.min,ye=150,de=Math.PI/180,Re=.5519;function Ce(p,S,b,A){this.type=p,this.currentTime=S,this.totalTime=b,this.direction=A<0?-1:1}function Ve(p,S){this.type=p,this.direction=S<0?-1:1}function ze(p,S,b,A){this.type=p,this.currentLoop=b,this.totalLoops=S,this.direction=A<0?-1:1}function Qe(p,S,b){this.type=p,this.firstFrame=S,this.totalFrames=b}function et(p,S){this.type=p,this.target=S}function Pe(p,S){this.type="renderFrameError",this.nativeError=p,this.currentTime=S}function ne(p){this.type="configError",this.nativeError=p}var _e=function(){var p=0;return function(){return p+=1,Z+"__lottie_element_"+p}}();function Ue(p,S,b){var A,I,D,B,J,$,ae,fe;switch(B=Math.floor(p*6),J=p*6-B,$=b*(1-S),ae=b*(1-J*S),fe=b*(1-(1-J)*S),B%6){case 0:A=b,I=fe,D=$;break;case 1:A=ae,I=b,D=$;break;case 2:A=$,I=b,D=fe;break;case 3:A=$,I=ae,D=b;break;case 4:A=fe,I=$,D=b;break;case 5:A=b,I=$,D=ae;break}return[A,I,D]}function He(p,S,b){var A=Math.max(p,S,b),I=Math.min(p,S,b),D=A-I,B,J=A===0?0:D/A,$=A/255;switch(A){case I:B=0;break;case p:B=S-b+D*(S<b?6:0),B/=6*D;break;case S:B=b-p+D*2,B/=6*D;break;case b:B=p-S+D*4,B/=6*D;break}return[B,J,$]}function Be(p,S){var b=He(p[0]*255,p[1]*255,p[2]*255);return b[1]+=S,b[1]>1?b[1]=1:b[1]<=0&&(b[1]=0),Ue(b[0],b[1],b[2])}function Je(p,S){var b=He(p[0]*255,p[1]*255,p[2]*255);return b[2]+=S,b[2]>1?b[2]=1:b[2]<0&&(b[2]=0),Ue(b[0],b[1],b[2])}function Xe(p,S){var b=He(p[0]*255,p[1]*255,p[2]*255);return b[0]+=S/360,b[0]>1?b[0]-=1:b[0]<0&&(b[0]+=1),Ue(b[0],b[1],b[2])}(function(){var p=[],S,b;for(S=0;S<256;S+=1)b=S.toString(16),p[S]=b.length===1?"0"+b:b;return function(A,I,D){return A<0&&(A=0),I<0&&(I=0),D<0&&(D=0),"#"+p[A]+p[I]+p[D]}})();var Et=function(S){M=!!S},gt=function(){return M},Ot=function(S){F=S},Dt=function(){return F},bn=function(S){ye=S},tn=function(){return ye},Fn=function(S){Z=S};function wt(p){return document.createElementNS(t,p)}function Tn(p){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Tn=function(b){return typeof b}:Tn=function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},Tn(p)}var Mn=function(){var p=1,S=[],b,A,I={onmessage:function(){},postMessage:function(he){b({data:he})}},D={postMessage:function(he){I.onmessage({data:he})}};function B(q){if(window.Worker&&window.Blob&&c()){var he=new Blob(["var _workerSelf = self; self.onmessage = ",q.toString()],{type:"text/javascript"}),ve=URL.createObjectURL(he);return new Worker(ve)}return b=q,I}function J(){A||(A=B(function(he){function ve(){function Ae(ct,ee){var me,U,H=ct.length,Me,Te,_t,Gt;for(U=0;U<H;U+=1)if(me=ct[U],"ks"in me&&!me.completed){if(me.completed=!0,me.hasMask){var Zt=me.masksProperties;for(Te=Zt.length,Me=0;Me<Te;Me+=1)if(Zt[Me].pt.k.i)oe(Zt[Me].pt.k);else for(Gt=Zt[Me].pt.k.length,_t=0;_t<Gt;_t+=1)Zt[Me].pt.k[_t].s&&oe(Zt[Me].pt.k[_t].s[0]),Zt[Me].pt.k[_t].e&&oe(Zt[Me].pt.k[_t].e[0])}me.ty===0?(me.layers=G(me.refId,ee),Ae(me.layers,ee)):me.ty===4?Q(me.shapes):me.ty===5&&sn(me)}}function le(ct,ee){if(ct){var me=0,U=ct.length;for(me=0;me<U;me+=1)ct[me].t===1&&(ct[me].data.layers=G(ct[me].data.refId,ee),Ae(ct[me].data.layers,ee))}}function te(ct,ee){for(var me=0,U=ee.length;me<U;){if(ee[me].id===ct)return ee[me];me+=1}return null}function G(ct,ee){var me=te(ct,ee);return me?me.layers.__used?JSON.parse(JSON.stringify(me.layers)):(me.layers.__used=!0,me.layers):null}function Q(ct){var ee,me=ct.length,U,H;for(ee=me-1;ee>=0;ee-=1)if(ct[ee].ty==="sh")if(ct[ee].ks.k.i)oe(ct[ee].ks.k);else for(H=ct[ee].ks.k.length,U=0;U<H;U+=1)ct[ee].ks.k[U].s&&oe(ct[ee].ks.k[U].s[0]),ct[ee].ks.k[U].e&&oe(ct[ee].ks.k[U].e[0]);else ct[ee].ty==="gr"&&Q(ct[ee].it)}function oe(ct){var ee,me=ct.i.length;for(ee=0;ee<me;ee+=1)ct.i[ee][0]+=ct.v[ee][0],ct.i[ee][1]+=ct.v[ee][1],ct.o[ee][0]+=ct.v[ee][0],ct.o[ee][1]+=ct.v[ee][1]}function xe(ct,ee){var me=ee?ee.split("."):[100,100,100];return ct[0]>me[0]?!0:me[0]>ct[0]?!1:ct[1]>me[1]?!0:me[1]>ct[1]?!1:ct[2]>me[2]?!0:me[2]>ct[2]?!1:null}var Le=function(){var ct=[4,4,14];function ee(U){var H=U.t.d;U.t.d={k:[{s:H,t:0}]}}function me(U){var H,Me=U.length;for(H=0;H<Me;H+=1)U[H].ty===5&&ee(U[H])}return function(U){if(xe(ct,U.v)&&(me(U.layers),U.assets)){var H,Me=U.assets.length;for(H=0;H<Me;H+=1)U.assets[H].layers&&me(U.assets[H].layers)}}}(),Ne=function(){var ct=[4,7,99];return function(ee){if(ee.chars&&!xe(ct,ee.v)){var me,U=ee.chars.length;for(me=0;me<U;me+=1){var H=ee.chars[me];H.data&&H.data.shapes&&(Q(H.data.shapes),H.data.ip=0,H.data.op=99999,H.data.st=0,H.data.sr=1,H.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},ee.chars[me].t||(H.data.shapes.push({ty:"no"}),H.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}}(),ut=function(){var ct=[5,7,15];function ee(U){var H=U.t.p;typeof H.a=="number"&&(H.a={a:0,k:H.a}),typeof H.p=="number"&&(H.p={a:0,k:H.p}),typeof H.r=="number"&&(H.r={a:0,k:H.r})}function me(U){var H,Me=U.length;for(H=0;H<Me;H+=1)U[H].ty===5&&ee(U[H])}return function(U){if(xe(ct,U.v)&&(me(U.layers),U.assets)){var H,Me=U.assets.length;for(H=0;H<Me;H+=1)U.assets[H].layers&&me(U.assets[H].layers)}}}(),nn=function(){var ct=[4,1,9];function ee(U){var H,Me=U.length,Te,_t;for(H=0;H<Me;H+=1)if(U[H].ty==="gr")ee(U[H].it);else if(U[H].ty==="fl"||U[H].ty==="st")if(U[H].c.k&&U[H].c.k[0].i)for(_t=U[H].c.k.length,Te=0;Te<_t;Te+=1)U[H].c.k[Te].s&&(U[H].c.k[Te].s[0]/=255,U[H].c.k[Te].s[1]/=255,U[H].c.k[Te].s[2]/=255,U[H].c.k[Te].s[3]/=255),U[H].c.k[Te].e&&(U[H].c.k[Te].e[0]/=255,U[H].c.k[Te].e[1]/=255,U[H].c.k[Te].e[2]/=255,U[H].c.k[Te].e[3]/=255);else U[H].c.k[0]/=255,U[H].c.k[1]/=255,U[H].c.k[2]/=255,U[H].c.k[3]/=255}function me(U){var H,Me=U.length;for(H=0;H<Me;H+=1)U[H].ty===4&&ee(U[H].shapes)}return function(U){if(xe(ct,U.v)&&(me(U.layers),U.assets)){var H,Me=U.assets.length;for(H=0;H<Me;H+=1)U.assets[H].layers&&me(U.assets[H].layers)}}}(),Ht=function(){var ct=[4,4,18];function ee(U){var H,Me=U.length,Te,_t;for(H=Me-1;H>=0;H-=1)if(U[H].ty==="sh")if(U[H].ks.k.i)U[H].ks.k.c=U[H].closed;else for(_t=U[H].ks.k.length,Te=0;Te<_t;Te+=1)U[H].ks.k[Te].s&&(U[H].ks.k[Te].s[0].c=U[H].closed),U[H].ks.k[Te].e&&(U[H].ks.k[Te].e[0].c=U[H].closed);else U[H].ty==="gr"&&ee(U[H].it)}function me(U){var H,Me,Te=U.length,_t,Gt,Zt,An;for(Me=0;Me<Te;Me+=1){if(H=U[Me],H.hasMask){var In=H.masksProperties;for(Gt=In.length,_t=0;_t<Gt;_t+=1)if(In[_t].pt.k.i)In[_t].pt.k.c=In[_t].cl;else for(An=In[_t].pt.k.length,Zt=0;Zt<An;Zt+=1)In[_t].pt.k[Zt].s&&(In[_t].pt.k[Zt].s[0].c=In[_t].cl),In[_t].pt.k[Zt].e&&(In[_t].pt.k[Zt].e[0].c=In[_t].cl)}H.ty===4&&ee(H.shapes)}}return function(U){if(xe(ct,U.v)&&(me(U.layers),U.assets)){var H,Me=U.assets.length;for(H=0;H<Me;H+=1)U.assets[H].layers&&me(U.assets[H].layers)}}}();function pt(ct){ct.__complete||(nn(ct),Le(ct),Ne(ct),ut(ct),Ht(ct),Ae(ct.layers,ct.assets),le(ct.chars,ct.assets),ct.__complete=!0)}function sn(ct){ct.t.a.length===0&&"m"in ct.t.p}var At={};return At.completeData=pt,At.checkColors=nn,At.checkChars=Ne,At.checkPathProperties=ut,At.checkShapes=Ht,At.completeLayers=Ae,At}if(D.dataManager||(D.dataManager=ve()),D.assetLoader||(D.assetLoader=function(){function Ae(te){var G=te.getResponseHeader("content-type");return G&&te.responseType==="json"&&G.indexOf("json")!==-1||te.response&&Tn(te.response)==="object"?te.response:te.response&&typeof te.response=="string"?JSON.parse(te.response):te.responseText?JSON.parse(te.responseText):null}function le(te,G,Q,oe){var xe,Le=new XMLHttpRequest;try{Le.responseType="json"}catch{}Le.onreadystatechange=function(){if(Le.readyState===4)if(Le.status===200)xe=Ae(Le),Q(xe);else try{xe=Ae(Le),Q(xe)}catch(Ne){oe&&oe(Ne)}};try{Le.open(["G","E","T"].join(""),te,!0)}catch{Le.open(["G","E","T"].join(""),G+"/"+te,!0)}Le.send()}return{load:le}}()),he.data.type==="loadAnimation")D.assetLoader.load(he.data.path,he.data.fullPath,function(Ae){D.dataManager.completeData(Ae),D.postMessage({id:he.data.id,payload:Ae,status:"success"})},function(){D.postMessage({id:he.data.id,status:"error"})});else if(he.data.type==="complete"){var pe=he.data.animation;D.dataManager.completeData(pe),D.postMessage({id:he.data.id,payload:pe,status:"success"})}else he.data.type==="loadData"&&D.assetLoader.load(he.data.path,he.data.fullPath,function(Ae){D.postMessage({id:he.data.id,payload:Ae,status:"success"})},function(){D.postMessage({id:he.data.id,status:"error"})})}),A.onmessage=function(q){var he=q.data,ve=he.id,pe=S[ve];S[ve]=null,he.status==="success"?pe.onComplete(he.payload):pe.onError&&pe.onError()})}function $(q,he){p+=1;var ve="processId_"+p;return S[ve]={onComplete:q,onError:he},ve}function ae(q,he,ve){J();var pe=$(he,ve);A.postMessage({type:"loadAnimation",path:q,fullPath:window.location.origin+window.location.pathname,id:pe})}function fe(q,he,ve){J();var pe=$(he,ve);A.postMessage({type:"loadData",path:q,fullPath:window.location.origin+window.location.pathname,id:pe})}function ke(q,he,ve){J();var pe=$(he,ve);A.postMessage({type:"complete",animation:q,id:pe})}return{loadAnimation:ae,loadData:fe,completeAnimation:ke}}(),Pi=function(){var p=function(){var le=y("canvas");le.width=1,le.height=1;var te=le.getContext("2d");return te.fillStyle="rgba(0,0,0,0)",te.fillRect(0,0,1,1),le}();function S(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function b(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function A(le,te,G){var Q="";if(le.e)Q=le.p;else if(te){var oe=le.p;oe.indexOf("images/")!==-1&&(oe=oe.split("/")[1]),Q=te+oe}else Q=G,Q+=le.u?le.u:"",Q+=le.p;return Q}function I(le){var te=0,G=setInterval((function(){var Q=le.getBBox();(Q.width||te>500)&&(this._imageLoaded(),clearInterval(G)),te+=1}).bind(this),50)}function D(le){var te=A(le,this.assetsPath,this.path),G=wt("image");K?this.testImageLoaded(G):G.addEventListener("load",this._imageLoaded,!1),G.addEventListener("error",(function(){Q.img=p,this._imageLoaded()}).bind(this),!1),G.setAttributeNS("http://www.w3.org/1999/xlink","href",te),this._elementHelper.append?this._elementHelper.append(G):this._elementHelper.appendChild(G);var Q={img:G,assetData:le};return Q}function B(le){var te=A(le,this.assetsPath,this.path),G=y("img");G.crossOrigin="anonymous",G.addEventListener("load",this._imageLoaded,!1),G.addEventListener("error",(function(){Q.img=p,this._imageLoaded()}).bind(this),!1),G.src=te;var Q={img:G,assetData:le};return Q}function J(le){var te={assetData:le},G=A(le,this.assetsPath,this.path);return Mn.loadData(G,(function(Q){te.img=Q,this._footageLoaded()}).bind(this),(function(){te.img={},this._footageLoaded()}).bind(this)),te}function $(le,te){this.imagesLoadedCb=te;var G,Q=le.length;for(G=0;G<Q;G+=1)le[G].layers||(!le[G].t||le[G].t==="seq"?(this.totalImages+=1,this.images.push(this._createImageData(le[G]))):le[G].t===3&&(this.totalFootages+=1,this.images.push(this.createFootageData(le[G]))))}function ae(le){this.path=le||""}function fe(le){this.assetsPath=le||""}function ke(le){for(var te=0,G=this.images.length;te<G;){if(this.images[te].assetData===le)return this.images[te].img;te+=1}return null}function q(){this.imagesLoadedCb=null,this.images.length=0}function he(){return this.totalImages===this.loadedAssets}function ve(){return this.totalFootages===this.loadedFootagesCount}function pe(le,te){le==="svg"?(this._elementHelper=te,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}function Ae(){this._imageLoaded=S.bind(this),this._footageLoaded=b.bind(this),this.testImageLoaded=I.bind(this),this.createFootageData=J.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return Ae.prototype={loadAssets:$,setAssetsPath:fe,setPath:ae,loadedImages:he,loadedFootages:ve,destroy:q,getAsset:ke,createImgData:B,createImageData:D,imageLoaded:S,footageLoaded:b,setCacheType:pe},Ae}();function Rr(){}Rr.prototype={triggerEvent:function(S,b){if(this._cbs[S])for(var A=this._cbs[S],I=0;I<A.length;I+=1)A[I](b)},addEventListener:function(S,b){return this._cbs[S]||(this._cbs[S]=[]),this._cbs[S].push(b),(function(){this.removeEventListener(S,b)}).bind(this)},removeEventListener:function(S,b){if(!b)this._cbs[S]=null;else if(this._cbs[S]){for(var A=0,I=this._cbs[S].length;A<I;)this._cbs[S][A]===b&&(this._cbs[S].splice(A,1),A-=1,I-=1),A+=1;this._cbs[S].length||(this._cbs[S]=null)}}};var Ar=function(){function p(S){for(var b=S.split(`\r
|
|
303
|
+
`),A={},I,D=0,B=0;B<b.length;B+=1)I=b[B].split(":"),I.length===2&&(A[I[0]]=I[1].trim(),D+=1);if(D===0)throw new Error;return A}return function(S){for(var b=[],A=0;A<S.length;A+=1){var I=S[A],D={time:I.tm,duration:I.dr};try{D.payload=JSON.parse(S[A].cm)}catch{try{D.payload=p(S[A].cm)}catch{D.payload={name:S[A].cm}}}b.push(D)}return b}}(),ii=function(){function p(S){this.compositions.push(S)}return function(){function S(b){for(var A=0,I=this.compositions.length;A<I;){if(this.compositions[A].data&&this.compositions[A].data.nm===b)return this.compositions[A].prepareFrame&&this.compositions[A].data.xt&&this.compositions[A].prepareFrame(this.currentFrame),this.compositions[A].compInterface;A+=1}return null}return S.compositions=[],S.currentFrame=0,S.registerComposition=p,S}}(),Xr={},xi=function(S,b){Xr[S]=b};function As(p){return Xr[p]}function Pr(){if(Xr.canvas)return"canvas";for(var p in Xr)if(Xr[p])return p;return""}function si(p){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?si=function(b){return typeof b}:si=function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},si(p)}var Ft=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=_e(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=gt(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ii(),this.imagePreloader=new Pi,this.audioController=R(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this),this.drawnFrameEvent=new Ce("drawnFrame",0,0,0),this.expressionsPlugin=Dt()};E([Rr],Ft),Ft.prototype.setParams=function(p){(p.wrapper||p.container)&&(this.wrapper=p.wrapper||p.container);var S="svg";p.animType?S=p.animType:p.renderer&&(S=p.renderer);var b=As(S);this.renderer=new b(this,p.rendererSettings),this.imagePreloader.setCacheType(S,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=S,p.loop===""||p.loop===null||p.loop===void 0||p.loop===!0?this.loop=!0:p.loop===!1?this.loop=!1:this.loop=parseInt(p.loop,10),this.autoplay="autoplay"in p?p.autoplay:!0,this.name=p.name?p.name:"",this.autoloadSegments=Object.prototype.hasOwnProperty.call(p,"autoloadSegments")?p.autoloadSegments:!0,this.assetsPath=p.assetsPath,this.initialSegment=p.initialSegment,p.audioFactory&&this.audioController.setAudioFactory(p.audioFactory),p.animationData?this.setupAnimation(p.animationData):p.path&&(p.path.lastIndexOf("\\")!==-1?this.path=p.path.substr(0,p.path.lastIndexOf("\\")+1):this.path=p.path.substr(0,p.path.lastIndexOf("/")+1),this.fileName=p.path.substr(p.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),Mn.loadAnimation(p.path,this.configAnimation,this.onSetupError))},Ft.prototype.onSetupError=function(){this.trigger("data_failed")},Ft.prototype.setupAnimation=function(p){Mn.completeAnimation(p,this.configAnimation)},Ft.prototype.setData=function(p,S){S&&si(S)!=="object"&&(S=JSON.parse(S));var b={wrapper:p,animationData:S},A=p.attributes;b.path=A.getNamedItem("data-animation-path")?A.getNamedItem("data-animation-path").value:A.getNamedItem("data-bm-path")?A.getNamedItem("data-bm-path").value:A.getNamedItem("bm-path")?A.getNamedItem("bm-path").value:"",b.animType=A.getNamedItem("data-anim-type")?A.getNamedItem("data-anim-type").value:A.getNamedItem("data-bm-type")?A.getNamedItem("data-bm-type").value:A.getNamedItem("bm-type")?A.getNamedItem("bm-type").value:A.getNamedItem("data-bm-renderer")?A.getNamedItem("data-bm-renderer").value:A.getNamedItem("bm-renderer")?A.getNamedItem("bm-renderer").value:Pr()||"canvas";var I=A.getNamedItem("data-anim-loop")?A.getNamedItem("data-anim-loop").value:A.getNamedItem("data-bm-loop")?A.getNamedItem("data-bm-loop").value:A.getNamedItem("bm-loop")?A.getNamedItem("bm-loop").value:"";I==="false"?b.loop=!1:I==="true"?b.loop=!0:I!==""&&(b.loop=parseInt(I,10));var D=A.getNamedItem("data-anim-autoplay")?A.getNamedItem("data-anim-autoplay").value:A.getNamedItem("data-bm-autoplay")?A.getNamedItem("data-bm-autoplay").value:A.getNamedItem("bm-autoplay")?A.getNamedItem("bm-autoplay").value:!0;b.autoplay=D!=="false",b.name=A.getNamedItem("data-name")?A.getNamedItem("data-name").value:A.getNamedItem("data-bm-name")?A.getNamedItem("data-bm-name").value:A.getNamedItem("bm-name")?A.getNamedItem("bm-name").value:"";var B=A.getNamedItem("data-anim-prerender")?A.getNamedItem("data-anim-prerender").value:A.getNamedItem("data-bm-prerender")?A.getNamedItem("data-bm-prerender").value:A.getNamedItem("bm-prerender")?A.getNamedItem("bm-prerender").value:"";B==="false"&&(b.prerender=!1),b.path?this.setParams(b):this.trigger("destroy")},Ft.prototype.includeLayers=function(p){p.op>this.animationData.op&&(this.animationData.op=p.op,this.totalFrames=Math.floor(p.op-this.animationData.ip));var S=this.animationData.layers,b,A=S.length,I=p.layers,D,B=I.length;for(D=0;D<B;D+=1)for(b=0;b<A;){if(S[b].id===I[D].id){S[b]=I[D];break}b+=1}if((p.chars||p.fonts)&&(this.renderer.globalData.fontManager.addChars(p.chars),this.renderer.globalData.fontManager.addFonts(p.fonts,this.renderer.globalData.defs)),p.assets)for(A=p.assets.length,b=0;b<A;b+=1)this.animationData.assets.push(p.assets[b]);this.animationData.__complete=!1,Mn.completeAnimation(this.animationData,this.onSegmentComplete)},Ft.prototype.onSegmentComplete=function(p){this.animationData=p;var S=Dt();S&&S.initExpressions(this),this.loadNextSegment()},Ft.prototype.loadNextSegment=function(){var p=this.animationData.segments;if(!p||p.length===0||!this.autoloadSegments){this.trigger("data_ready"),this.timeCompleted=this.totalFrames;return}var S=p.shift();this.timeCompleted=S.time*this.frameRate;var b=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,Mn.loadData(b,this.includeLayers.bind(this),(function(){this.trigger("data_failed")}).bind(this))},Ft.prototype.loadSegments=function(){var p=this.animationData.segments;p||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},Ft.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},Ft.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},Ft.prototype.configAnimation=function(p){if(this.renderer)try{this.animationData=p,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(p),p.assets||(p.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(p.assets),this.markers=Ar(p.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(S){this.triggerConfigError(S)}},Ft.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},Ft.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||this.renderer.rendererType!=="canvas")&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var p=Dt();p&&p.initExpressions(this),this.renderer.initItems(),setTimeout((function(){this.trigger("DOMLoaded")}).bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},Ft.prototype.resize=function(p,S){var b=typeof p=="number"?p:void 0,A=typeof S=="number"?S:void 0;this.renderer.updateContainerSize(b,A)},Ft.prototype.setSubframe=function(p){this.isSubframeEnabled=!!p},Ft.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},Ft.prototype.renderFrame=function(){if(!(this.isLoaded===!1||!this.renderer))try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame(),this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(p){this.triggerRenderFrameError(p)}},Ft.prototype.play=function(p){p&&this.name!==p||this.isPaused===!0&&(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},Ft.prototype.pause=function(p){p&&this.name!==p||this.isPaused===!1&&(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},Ft.prototype.togglePause=function(p){p&&this.name!==p||(this.isPaused===!0?this.play():this.pause())},Ft.prototype.stop=function(p){p&&this.name!==p||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},Ft.prototype.getMarkerData=function(p){for(var S,b=0;b<this.markers.length;b+=1)if(S=this.markers[b],S.payload&&S.payload.name===p)return S;return null},Ft.prototype.goToAndStop=function(p,S,b){if(!(b&&this.name!==b)){var A=Number(p);if(isNaN(A)){var I=this.getMarkerData(p);I&&this.goToAndStop(I.time,!0)}else S?this.setCurrentRawFrameValue(p):this.setCurrentRawFrameValue(p*this.frameModifier);this.pause()}},Ft.prototype.goToAndPlay=function(p,S,b){if(!(b&&this.name!==b)){var A=Number(p);if(isNaN(A)){var I=this.getMarkerData(p);I&&(I.duration?this.playSegments([I.time,I.time+I.duration],!0):this.goToAndStop(I.time,!0))}else this.goToAndStop(A,S,b);this.play()}},Ft.prototype.advanceTime=function(p){if(!(this.isPaused===!0||this.isLoaded===!1)){var S=this.currentRawFrame+p*this.frameModifier,b=!1;S>=this.totalFrames-1&&this.frameModifier>0?!this.loop||this.playCount===this.loop?this.checkSegments(S>this.totalFrames?S%this.totalFrames:0)||(b=!0,S=this.totalFrames-1):S>=this.totalFrames?(this.playCount+=1,this.checkSegments(S%this.totalFrames)||(this.setCurrentRawFrameValue(S%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(S):S<0?this.checkSegments(S%this.totalFrames)||(this.loop&&!(this.playCount--<=0&&this.loop!==!0)?(this.setCurrentRawFrameValue(this.totalFrames+S%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0):(b=!0,S=0)):this.setCurrentRawFrameValue(S),b&&(this.setCurrentRawFrameValue(S),this.pause(),this.trigger("complete"))}},Ft.prototype.adjustSegment=function(p,S){this.playCount=0,p[1]<p[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=p[0]-p[1],this.timeCompleted=this.totalFrames,this.firstFrame=p[1],this.setCurrentRawFrameValue(this.totalFrames-.001-S)):p[1]>p[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=p[1]-p[0],this.timeCompleted=this.totalFrames,this.firstFrame=p[0],this.setCurrentRawFrameValue(.001+S)),this.trigger("segmentStart")},Ft.prototype.setSegment=function(p,S){var b=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<p?b=p:this.currentRawFrame+this.firstFrame>S&&(b=S-p)),this.firstFrame=p,this.totalFrames=S-p,this.timeCompleted=this.totalFrames,b!==-1&&this.goToAndStop(b,!0)},Ft.prototype.playSegments=function(p,S){if(S&&(this.segments.length=0),si(p[0])==="object"){var b,A=p.length;for(b=0;b<A;b+=1)this.segments.push(p[b])}else this.segments.push(p);this.segments.length&&S&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},Ft.prototype.resetSegments=function(p){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),p&&this.checkSegments(0)},Ft.prototype.checkSegments=function(p){return this.segments.length?(this.adjustSegment(this.segments.shift(),p),!0):!1},Ft.prototype.destroy=function(p){p&&this.name!==p||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.expressionsPlugin=null,this.imagePreloader=null,this.projectInterface=null)},Ft.prototype.setCurrentRawFrameValue=function(p){this.currentRawFrame=p,this.gotoFrame()},Ft.prototype.setSpeed=function(p){this.playSpeed=p,this.updaFrameModifier()},Ft.prototype.setDirection=function(p){this.playDirection=p<0?-1:1,this.updaFrameModifier()},Ft.prototype.setLoop=function(p){this.loop=p},Ft.prototype.setVolume=function(p,S){S&&this.name!==S||this.audioController.setVolume(p)},Ft.prototype.getVolume=function(){return this.audioController.getVolume()},Ft.prototype.mute=function(p){p&&this.name!==p||this.audioController.mute()},Ft.prototype.unmute=function(p){p&&this.name!==p||this.audioController.unmute()},Ft.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},Ft.prototype.getPath=function(){return this.path},Ft.prototype.getAssetsPath=function(p){var S="";if(p.e)S=p.p;else if(this.assetsPath){var b=p.p;b.indexOf("images/")!==-1&&(b=b.split("/")[1]),S=this.assetsPath+b}else S=this.path,S+=p.u?p.u:"",S+=p.p;return S},Ft.prototype.getAssetData=function(p){for(var S=0,b=this.assets.length;S<b;){if(p===this.assets[S].id)return this.assets[S];S+=1}return null},Ft.prototype.hide=function(){this.renderer.hide()},Ft.prototype.show=function(){this.renderer.show()},Ft.prototype.getDuration=function(p){return p?this.totalFrames:this.totalFrames/this.frameRate},Ft.prototype.updateDocumentData=function(p,S,b){try{var A=this.renderer.getElementByPath(p);A.updateDocumentData(S,b)}catch{}},Ft.prototype.trigger=function(p){if(this._cbs&&this._cbs[p])switch(p){case"enterFrame":this.triggerEvent(p,new Ce(p,this.currentFrame,this.totalFrames,this.frameModifier));break;case"drawnFrame":this.drawnFrameEvent.currentTime=this.currentFrame,this.drawnFrameEvent.totalTime=this.totalFrames,this.drawnFrameEvent.direction=this.frameModifier,this.triggerEvent(p,this.drawnFrameEvent);break;case"loopComplete":this.triggerEvent(p,new ze(p,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(p,new Ve(p,this.frameMult));break;case"segmentStart":this.triggerEvent(p,new Qe(p,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(p,new et(p,this));break;default:this.triggerEvent(p)}p==="enterFrame"&&this.onEnterFrame&&this.onEnterFrame.call(this,new Ce(p,this.currentFrame,this.totalFrames,this.frameMult)),p==="loopComplete"&&this.onLoopComplete&&this.onLoopComplete.call(this,new ze(p,this.loop,this.playCount,this.frameMult)),p==="complete"&&this.onComplete&&this.onComplete.call(this,new Ve(p,this.frameMult)),p==="segmentStart"&&this.onSegmentStart&&this.onSegmentStart.call(this,new Qe(p,this.firstFrame,this.totalFrames)),p==="destroy"&&this.onDestroy&&this.onDestroy.call(this,new et(p,this))},Ft.prototype.triggerRenderFrameError=function(p){var S=new Pe(p,this.currentFrame);this.triggerEvent("error",S),this.onError&&this.onError.call(this,S)},Ft.prototype.triggerConfigError=function(p){var S=new ne(p,this.currentFrame);this.triggerEvent("error",S),this.onError&&this.onError.call(this,S)};var nr=function(){var p={},S=[],b=0,A=0,I=0,D=!0,B=!1;function J(ee){for(var me=0,U=ee.target;me<A;)S[me].animation===U&&(S.splice(me,1),me-=1,A-=1,U.isPaused||ke()),me+=1}function $(ee,me){if(!ee)return null;for(var U=0;U<A;){if(S[U].elem===ee&&S[U].elem!==null)return S[U].animation;U+=1}var H=new Ft;return q(H,ee),H.setData(ee,me),H}function ae(){var ee,me=S.length,U=[];for(ee=0;ee<me;ee+=1)U.push(S[ee].animation);return U}function fe(){I+=1,nn()}function ke(){I-=1}function q(ee,me){ee.addEventListener("destroy",J),ee.addEventListener("_active",fe),ee.addEventListener("_idle",ke),S.push({elem:me,animation:ee}),A+=1}function he(ee){var me=new Ft;return q(me,null),me.setParams(ee),me}function ve(ee,me){var U;for(U=0;U<A;U+=1)S[U].animation.setSpeed(ee,me)}function pe(ee,me){var U;for(U=0;U<A;U+=1)S[U].animation.setDirection(ee,me)}function Ae(ee){var me;for(me=0;me<A;me+=1)S[me].animation.play(ee)}function le(ee){var me=ee-b,U;for(U=0;U<A;U+=1)S[U].animation.advanceTime(me);b=ee,I&&!B?window.requestAnimationFrame(le):D=!0}function te(ee){b=ee,window.requestAnimationFrame(le)}function G(ee){var me;for(me=0;me<A;me+=1)S[me].animation.pause(ee)}function Q(ee,me,U){var H;for(H=0;H<A;H+=1)S[H].animation.goToAndStop(ee,me,U)}function oe(ee){var me;for(me=0;me<A;me+=1)S[me].animation.stop(ee)}function xe(ee){var me;for(me=0;me<A;me+=1)S[me].animation.togglePause(ee)}function Le(ee){var me;for(me=A-1;me>=0;me-=1)S[me].animation.destroy(ee)}function Ne(ee,me,U){var H=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),Me,Te=H.length;for(Me=0;Me<Te;Me+=1)U&&H[Me].setAttribute("data-bm-type",U),$(H[Me],ee);if(me&&Te===0){U||(U="svg");var _t=document.getElementsByTagName("body")[0];_t.innerText="";var Gt=y("div");Gt.style.width="100%",Gt.style.height="100%",Gt.setAttribute("data-bm-type",U),_t.appendChild(Gt),$(Gt,ee)}}function ut(){var ee;for(ee=0;ee<A;ee+=1)S[ee].animation.resize()}function nn(){!B&&I&&D&&(window.requestAnimationFrame(te),D=!1)}function Ht(){B=!0}function pt(){B=!1,nn()}function sn(ee,me){var U;for(U=0;U<A;U+=1)S[U].animation.setVolume(ee,me)}function At(ee){var me;for(me=0;me<A;me+=1)S[me].animation.mute(ee)}function ct(ee){var me;for(me=0;me<A;me+=1)S[me].animation.unmute(ee)}return p.registerAnimation=$,p.loadAnimation=he,p.setSpeed=ve,p.setDirection=pe,p.play=Ae,p.pause=G,p.stop=oe,p.togglePause=xe,p.searchAnimations=Ne,p.resize=ut,p.goToAndStop=Q,p.destroy=Le,p.freeze=Ht,p.unfreeze=pt,p.setVolume=sn,p.mute=At,p.unmute=ct,p.getRegisteredAnimations=ae,p}(),_r=function(){var p={};p.getBezierEasing=b;var S={};function b(te,G,Q,oe,xe){var Le=xe||("bez_"+te+"_"+G+"_"+Q+"_"+oe).replace(/\./g,"p");if(S[Le])return S[Le];var Ne=new le([te,G,Q,oe]);return S[Le]=Ne,Ne}var A=4,I=.001,D=1e-7,B=10,J=11,$=1/(J-1),ae=typeof Float32Array=="function";function fe(te,G){return 1-3*G+3*te}function ke(te,G){return 3*G-6*te}function q(te){return 3*te}function he(te,G,Q){return((fe(G,Q)*te+ke(G,Q))*te+q(G))*te}function ve(te,G,Q){return 3*fe(G,Q)*te*te+2*ke(G,Q)*te+q(G)}function pe(te,G,Q,oe,xe){var Le,Ne,ut=0;do Ne=G+(Q-G)/2,Le=he(Ne,oe,xe)-te,Le>0?Q=Ne:G=Ne;while(Math.abs(Le)>D&&++ut<B);return Ne}function Ae(te,G,Q,oe){for(var xe=0;xe<A;++xe){var Le=ve(G,Q,oe);if(Le===0)return G;var Ne=he(G,Q,oe)-te;G-=Ne/Le}return G}function le(te){this._p=te,this._mSampleValues=ae?new Float32Array(J):new Array(J),this._precomputed=!1,this.get=this.get.bind(this)}return le.prototype={get:function(G){var Q=this._p[0],oe=this._p[1],xe=this._p[2],Le=this._p[3];return this._precomputed||this._precompute(),Q===oe&&xe===Le?G:G===0?0:G===1?1:he(this._getTForX(G),oe,Le)},_precompute:function(){var G=this._p[0],Q=this._p[1],oe=this._p[2],xe=this._p[3];this._precomputed=!0,(G!==Q||oe!==xe)&&this._calcSampleValues()},_calcSampleValues:function(){for(var G=this._p[0],Q=this._p[2],oe=0;oe<J;++oe)this._mSampleValues[oe]=he(oe*$,G,Q)},_getTForX:function(G){for(var Q=this._p[0],oe=this._p[2],xe=this._mSampleValues,Le=0,Ne=1,ut=J-1;Ne!==ut&&xe[Ne]<=G;++Ne)Le+=$;--Ne;var nn=(G-xe[Ne])/(xe[Ne+1]-xe[Ne]),Ht=Le+nn*$,pt=ve(Ht,Q,oe);return pt>=I?Ae(G,Ht,Q,oe):pt===0?Ht:pe(G,Le,Le+$,Q,oe)}},p}(),ai=function(){function p(S){return S.concat(L(S.length))}return{double:p}}(),or=function(){return function(p,S,b){var A=0,I=p,D=L(I),B={newElement:J,release:$};function J(){var ae;return A?(A-=1,ae=D[A]):ae=S(),ae}function $(ae){A===I&&(D=ai.double(D),I*=2),b&&b(ae),D[A]=ae,A+=1}return B}}(),dr=function(){function p(){return{addedLength:0,percents:_("float32",tn()),lengths:_("float32",tn())}}return or(8,p)}(),fa=function(){function p(){return{lengths:[],totalLength:0}}function S(b){var A,I=b.lengths.length;for(A=0;A<I;A+=1)dr.release(b.lengths[A]);b.lengths.length=0}return or(8,p,S)}();function da(){var p=Math;function S(q,he,ve,pe,Ae,le){var te=q*pe+he*Ae+ve*le-Ae*pe-le*q-ve*he;return te>-.001&&te<.001}function b(q,he,ve,pe,Ae,le,te,G,Q){if(ve===0&&le===0&&Q===0)return S(q,he,pe,Ae,te,G);var oe=p.sqrt(p.pow(pe-q,2)+p.pow(Ae-he,2)+p.pow(le-ve,2)),xe=p.sqrt(p.pow(te-q,2)+p.pow(G-he,2)+p.pow(Q-ve,2)),Le=p.sqrt(p.pow(te-pe,2)+p.pow(G-Ae,2)+p.pow(Q-le,2)),Ne;return oe>xe?oe>Le?Ne=oe-xe-Le:Ne=Le-xe-oe:Le>xe?Ne=Le-xe-oe:Ne=xe-oe-Le,Ne>-1e-4&&Ne<1e-4}var A=function(){return function(q,he,ve,pe){var Ae=tn(),le,te,G,Q,oe,xe=0,Le,Ne=[],ut=[],nn=dr.newElement();for(G=ve.length,le=0;le<Ae;le+=1){for(oe=le/(Ae-1),Le=0,te=0;te<G;te+=1)Q=Y(1-oe,3)*q[te]+3*Y(1-oe,2)*oe*ve[te]+3*(1-oe)*Y(oe,2)*pe[te]+Y(oe,3)*he[te],Ne[te]=Q,ut[te]!==null&&(Le+=Y(Ne[te]-ut[te],2)),ut[te]=Ne[te];Le&&(Le=X(Le),xe+=Le),nn.percents[le]=oe,nn.lengths[le]=xe}return nn.addedLength=xe,nn}}();function I(q){var he=fa.newElement(),ve=q.c,pe=q.v,Ae=q.o,le=q.i,te,G=q._length,Q=he.lengths,oe=0;for(te=0;te<G-1;te+=1)Q[te]=A(pe[te],pe[te+1],Ae[te],le[te+1]),oe+=Q[te].addedLength;return ve&&G&&(Q[te]=A(pe[te],pe[0],Ae[te],le[0]),oe+=Q[te].addedLength),he.totalLength=oe,he}function D(q){this.segmentLength=0,this.points=new Array(q)}function B(q,he){this.partialLength=q,this.point=he}var J=function(){var q={};return function(he,ve,pe,Ae){var le=(he[0]+"_"+he[1]+"_"+ve[0]+"_"+ve[1]+"_"+pe[0]+"_"+pe[1]+"_"+Ae[0]+"_"+Ae[1]).replace(/\./g,"p");if(!q[le]){var te=tn(),G,Q,oe,xe,Le,Ne=0,ut,nn,Ht=null;he.length===2&&(he[0]!==ve[0]||he[1]!==ve[1])&&S(he[0],he[1],ve[0],ve[1],he[0]+pe[0],he[1]+pe[1])&&S(he[0],he[1],ve[0],ve[1],ve[0]+Ae[0],ve[1]+Ae[1])&&(te=2);var pt=new D(te);for(oe=pe.length,G=0;G<te;G+=1){for(nn=L(oe),Le=G/(te-1),ut=0,Q=0;Q<oe;Q+=1)xe=Y(1-Le,3)*he[Q]+3*Y(1-Le,2)*Le*(he[Q]+pe[Q])+3*(1-Le)*Y(Le,2)*(ve[Q]+Ae[Q])+Y(Le,3)*ve[Q],nn[Q]=xe,Ht!==null&&(ut+=Y(nn[Q]-Ht[Q],2));ut=X(ut),Ne+=ut,pt.points[G]=new B(ut,nn),Ht=nn}pt.segmentLength=Ne,q[le]=pt}return q[le]}}();function $(q,he){var ve=he.percents,pe=he.lengths,Ae=ve.length,le=ue((Ae-1)*q),te=q*he.addedLength,G=0;if(le===Ae-1||le===0||te===pe[le])return ve[le];for(var Q=pe[le]>te?-1:1,oe=!0;oe;)if(pe[le]<=te&&pe[le+1]>te?(G=(te-pe[le])/(pe[le+1]-pe[le]),oe=!1):le+=Q,le<0||le>=Ae-1){if(le===Ae-1)return ve[le];oe=!1}return ve[le]+(ve[le+1]-ve[le])*G}function ae(q,he,ve,pe,Ae,le){var te=$(Ae,le),G=1-te,Q=p.round((G*G*G*q[0]+(te*G*G+G*te*G+G*G*te)*ve[0]+(te*te*G+G*te*te+te*G*te)*pe[0]+te*te*te*he[0])*1e3)/1e3,oe=p.round((G*G*G*q[1]+(te*G*G+G*te*G+G*G*te)*ve[1]+(te*te*G+G*te*te+te*G*te)*pe[1]+te*te*te*he[1])*1e3)/1e3;return[Q,oe]}var fe=_("float32",8);function ke(q,he,ve,pe,Ae,le,te){Ae<0?Ae=0:Ae>1&&(Ae=1);var G=$(Ae,te);le=le>1?1:le;var Q=$(le,te),oe,xe=q.length,Le=1-G,Ne=1-Q,ut=Le*Le*Le,nn=G*Le*Le*3,Ht=G*G*Le*3,pt=G*G*G,sn=Le*Le*Ne,At=G*Le*Ne+Le*G*Ne+Le*Le*Q,ct=G*G*Ne+Le*G*Q+G*Le*Q,ee=G*G*Q,me=Le*Ne*Ne,U=G*Ne*Ne+Le*Q*Ne+Le*Ne*Q,H=G*Q*Ne+Le*Q*Q+G*Ne*Q,Me=G*Q*Q,Te=Ne*Ne*Ne,_t=Q*Ne*Ne+Ne*Q*Ne+Ne*Ne*Q,Gt=Q*Q*Ne+Ne*Q*Q+Q*Ne*Q,Zt=Q*Q*Q;for(oe=0;oe<xe;oe+=1)fe[oe*4]=p.round((ut*q[oe]+nn*ve[oe]+Ht*pe[oe]+pt*he[oe])*1e3)/1e3,fe[oe*4+1]=p.round((sn*q[oe]+At*ve[oe]+ct*pe[oe]+ee*he[oe])*1e3)/1e3,fe[oe*4+2]=p.round((me*q[oe]+U*ve[oe]+H*pe[oe]+Me*he[oe])*1e3)/1e3,fe[oe*4+3]=p.round((Te*q[oe]+_t*ve[oe]+Gt*pe[oe]+Zt*he[oe])*1e3)/1e3;return fe}return{getSegmentsLength:I,getNewSegment:ke,getPointInSegment:ae,buildBezierData:J,pointOnLine2D:S,pointOnLine3D:b}}var Mr=da(),xt=o,Pt=Math.abs;function Jt(p,S){var b=this.offsetTime,A;this.propType==="multidimensional"&&(A=_("float32",this.pv.length));for(var I=S.lastIndex,D=I,B=this.keyframes.length-1,J=!0,$,ae,fe;J;){if($=this.keyframes[D],ae=this.keyframes[D+1],D===B-1&&p>=ae.t-b){$.h&&($=ae),I=0;break}if(ae.t-b>p){I=D;break}D<B-1?D+=1:(I=0,J=!1)}fe=this.keyframesMetadata[D]||{};var ke,q,he,ve,pe,Ae,le=ae.t-b,te=$.t-b,G;if($.to){fe.bezierData||(fe.bezierData=Mr.buildBezierData($.s,ae.s||$.e,$.to,$.ti));var Q=fe.bezierData;if(p>=le||p<te){var oe=p>=le?Q.points.length-1:0;for(q=Q.points[oe].point.length,ke=0;ke<q;ke+=1)A[ke]=Q.points[oe].point[ke]}else{fe.__fnct?Ae=fe.__fnct:(Ae=_r.getBezierEasing($.o.x,$.o.y,$.i.x,$.i.y,$.n).get,fe.__fnct=Ae),he=Ae((p-te)/(le-te));var xe=Q.segmentLength*he,Le,Ne=S.lastFrame<p&&S._lastKeyframeIndex===D?S._lastAddedLength:0;for(pe=S.lastFrame<p&&S._lastKeyframeIndex===D?S._lastPoint:0,J=!0,ve=Q.points.length;J;){if(Ne+=Q.points[pe].partialLength,xe===0||he===0||pe===Q.points.length-1){for(q=Q.points[pe].point.length,ke=0;ke<q;ke+=1)A[ke]=Q.points[pe].point[ke];break}else if(xe>=Ne&&xe<Ne+Q.points[pe+1].partialLength){for(Le=(xe-Ne)/Q.points[pe+1].partialLength,q=Q.points[pe].point.length,ke=0;ke<q;ke+=1)A[ke]=Q.points[pe].point[ke]+(Q.points[pe+1].point[ke]-Q.points[pe].point[ke])*Le;break}pe<ve-1?pe+=1:J=!1}S._lastPoint=pe,S._lastAddedLength=Ne-Q.points[pe].partialLength,S._lastKeyframeIndex=D}}else{var ut,nn,Ht,pt,sn;if(B=$.s.length,G=ae.s||$.e,this.sh&&$.h!==1)if(p>=le)A[0]=G[0],A[1]=G[1],A[2]=G[2];else if(p<=te)A[0]=$.s[0],A[1]=$.s[1],A[2]=$.s[2];else{var At=Yn($.s),ct=Yn(G),ee=(p-te)/(le-te);$n(A,On(At,ct,ee))}else for(D=0;D<B;D+=1)$.h!==1&&(p>=le?he=1:p<te?he=0:($.o.x.constructor===Array?(fe.__fnct||(fe.__fnct=[]),fe.__fnct[D]?Ae=fe.__fnct[D]:(ut=$.o.x[D]===void 0?$.o.x[0]:$.o.x[D],nn=$.o.y[D]===void 0?$.o.y[0]:$.o.y[D],Ht=$.i.x[D]===void 0?$.i.x[0]:$.i.x[D],pt=$.i.y[D]===void 0?$.i.y[0]:$.i.y[D],Ae=_r.getBezierEasing(ut,nn,Ht,pt).get,fe.__fnct[D]=Ae)):fe.__fnct?Ae=fe.__fnct:(ut=$.o.x,nn=$.o.y,Ht=$.i.x,pt=$.i.y,Ae=_r.getBezierEasing(ut,nn,Ht,pt).get,$.keyframeMetadata=Ae),he=Ae((p-te)/(le-te)))),G=ae.s||$.e,sn=$.h===1?$.s[D]:$.s[D]+(G[D]-$.s[D])*he,this.propType==="multidimensional"?A[D]=sn:A=sn}return S.lastIndex=I,A}function On(p,S,b){var A=[],I=p[0],D=p[1],B=p[2],J=p[3],$=S[0],ae=S[1],fe=S[2],ke=S[3],q,he,ve,pe,Ae;return he=I*$+D*ae+B*fe+J*ke,he<0&&(he=-he,$=-$,ae=-ae,fe=-fe,ke=-ke),1-he>1e-6?(q=Math.acos(he),ve=Math.sin(q),pe=Math.sin((1-b)*q)/ve,Ae=Math.sin(b*q)/ve):(pe=1-b,Ae=b),A[0]=pe*I+Ae*$,A[1]=pe*D+Ae*ae,A[2]=pe*B+Ae*fe,A[3]=pe*J+Ae*ke,A}function $n(p,S){var b=S[0],A=S[1],I=S[2],D=S[3],B=Math.atan2(2*A*D-2*b*I,1-2*A*A-2*I*I),J=Math.asin(2*b*A+2*I*D),$=Math.atan2(2*b*D-2*A*I,1-2*b*b-2*I*I);p[0]=B/de,p[1]=J/de,p[2]=$/de}function Yn(p){var S=p[0]*de,b=p[1]*de,A=p[2]*de,I=Math.cos(S/2),D=Math.cos(b/2),B=Math.cos(A/2),J=Math.sin(S/2),$=Math.sin(b/2),ae=Math.sin(A/2),fe=I*D*B-J*$*ae,ke=J*$*B+I*D*ae,q=J*D*B+I*$*ae,he=I*$*B-J*D*ae;return[ke,q,he,fe]}function hr(){var p=this.comp.renderedFrame-this.offsetTime,S=this.keyframes[0].t-this.offsetTime,b=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(p===this._caching.lastFrame||this._caching.lastFrame!==xt&&(this._caching.lastFrame>=b&&p>=b||this._caching.lastFrame<S&&p<S))){this._caching.lastFrame>=p&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var A=this.interpolateValue(p,this._caching);this.pv=A}return this._caching.lastFrame=p,this.pv}function Sr(p){var S;if(this.propType==="unidimensional")S=p*this.mult,Pt(this.v-S)>1e-5&&(this.v=S,this._mdf=!0);else for(var b=0,A=this.v.length;b<A;)S=p[b]*this.mult,Pt(this.v[b]-S)>1e-5&&(this.v[b]=S,this._mdf=!0),b+=1}function jn(){if(!(this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)){if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=this._isFirstFrame;var p,S=this.effectsSequence.length,b=this.kf?this.pv:this.data.k;for(p=0;p<S;p+=1)b=this.effectsSequence[p](b);this.setVValue(b),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function oi(p){this.effectsSequence.push(p),this.container.addDynamicProperty(this)}function ha(p,S,b,A){this.propType="unidimensional",this.mult=b||1,this.data=S,this.v=b?S.k*b:S.k,this.pv=S.k,this._mdf=!1,this.elem=p,this.container=A,this.comp=p.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=jn,this.setVValue=Sr,this.addEffect=oi}function _s(p,S,b,A){this.propType="multidimensional",this.mult=b||1,this.data=S,this._mdf=!1,this.elem=p,this.container=A,this.comp=p.comp,this.k=!1,this.kf=!1,this.frameId=-1;var I,D=S.k.length;for(this.v=_("float32",D),this.pv=_("float32",D),this.vel=_("float32",D),I=0;I<D;I+=1)this.v[I]=S.k[I]*this.mult,this.pv[I]=S.k[I];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=jn,this.setVValue=Sr,this.addEffect=oi}function qs(p,S,b,A){this.propType="unidimensional",this.keyframes=S.k,this.keyframesMetadata=[],this.offsetTime=p.data.st,this.frameId=-1,this._caching={lastFrame:xt,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=S,this.mult=b||1,this.elem=p,this.container=A,this.comp=p.comp,this.v=xt,this.pv=xt,this._isFirstFrame=!0,this.getValue=jn,this.setVValue=Sr,this.interpolateValue=Jt,this.effectsSequence=[hr.bind(this)],this.addEffect=oi}function pa(p,S,b,A){this.propType="multidimensional";var I,D=S.k.length,B,J,$,ae;for(I=0;I<D-1;I+=1)S.k[I].to&&S.k[I].s&&S.k[I+1]&&S.k[I+1].s&&(B=S.k[I].s,J=S.k[I+1].s,$=S.k[I].to,ae=S.k[I].ti,(B.length===2&&!(B[0]===J[0]&&B[1]===J[1])&&Mr.pointOnLine2D(B[0],B[1],J[0],J[1],B[0]+$[0],B[1]+$[1])&&Mr.pointOnLine2D(B[0],B[1],J[0],J[1],J[0]+ae[0],J[1]+ae[1])||B.length===3&&!(B[0]===J[0]&&B[1]===J[1]&&B[2]===J[2])&&Mr.pointOnLine3D(B[0],B[1],B[2],J[0],J[1],J[2],B[0]+$[0],B[1]+$[1],B[2]+$[2])&&Mr.pointOnLine3D(B[0],B[1],B[2],J[0],J[1],J[2],J[0]+ae[0],J[1]+ae[1],J[2]+ae[2]))&&(S.k[I].to=null,S.k[I].ti=null),B[0]===J[0]&&B[1]===J[1]&&$[0]===0&&$[1]===0&&ae[0]===0&&ae[1]===0&&(B.length===2||B[2]===J[2]&&$[2]===0&&ae[2]===0)&&(S.k[I].to=null,S.k[I].ti=null));this.effectsSequence=[hr.bind(this)],this.data=S,this.keyframes=S.k,this.keyframesMetadata=[],this.offsetTime=p.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=b||1,this.elem=p,this.container=A,this.comp=p.comp,this.getValue=jn,this.setVValue=Sr,this.interpolateValue=Jt,this.frameId=-1;var fe=S.k[0].s.length;for(this.v=_("float32",fe),this.pv=_("float32",fe),I=0;I<fe;I+=1)this.v[I]=xt,this.pv[I]=xt;this._caching={lastFrame:xt,lastIndex:0,value:_("float32",fe)},this.addEffect=oi}var vt=function(){function p(b,A,I,D,B){A.sid&&(A=b.globalData.slotManager.getProp(A));var J;if(!A.k.length)J=new ha(b,A,D,B);else if(typeof A.k[0]=="number")J=new _s(b,A,D,B);else switch(I){case 0:J=new qs(b,A,D,B);break;case 1:J=new pa(b,A,D,B);break}return J.effectsSequence.length&&B.addDynamicProperty(J),J}var S={getProp:p};return S}();function Nn(){}Nn.prototype={addDynamicProperty:function(S){this.dynamicProperties.indexOf(S)===-1&&(this.dynamicProperties.push(S),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){this._mdf=!1;var S,b=this.dynamicProperties.length;for(S=0;S<b;S+=1)this.dynamicProperties[S].getValue(),this.dynamicProperties[S]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(S){this.container=S,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var li=function(){function p(){return _("float32",2)}return or(8,p)}();function Qr(){this.c=!1,this._length=0,this._maxLength=8,this.v=L(this._maxLength),this.o=L(this._maxLength),this.i=L(this._maxLength)}Qr.prototype.setPathData=function(p,S){this.c=p,this.setLength(S);for(var b=0;b<S;)this.v[b]=li.newElement(),this.o[b]=li.newElement(),this.i[b]=li.newElement(),b+=1},Qr.prototype.setLength=function(p){for(;this._maxLength<p;)this.doubleArrayLength();this._length=p},Qr.prototype.doubleArrayLength=function(){this.v=this.v.concat(L(this._maxLength)),this.i=this.i.concat(L(this._maxLength)),this.o=this.o.concat(L(this._maxLength)),this._maxLength*=2},Qr.prototype.setXYAt=function(p,S,b,A,I){var D;switch(this._length=Math.max(this._length,A+1),this._length>=this._maxLength&&this.doubleArrayLength(),b){case"v":D=this.v;break;case"i":D=this.i;break;case"o":D=this.o;break;default:D=[];break}(!D[A]||D[A]&&!I)&&(D[A]=li.newElement()),D[A][0]=p,D[A][1]=S},Qr.prototype.setTripleAt=function(p,S,b,A,I,D,B,J){this.setXYAt(p,S,"v",B,J),this.setXYAt(b,A,"o",B,J),this.setXYAt(I,D,"i",B,J)},Qr.prototype.reverse=function(){var p=new Qr;p.setPathData(this.c,this._length);var S=this.v,b=this.o,A=this.i,I=0;this.c&&(p.setTripleAt(S[0][0],S[0][1],A[0][0],A[0][1],b[0][0],b[0][1],0,!1),I=1);var D=this._length-1,B=this._length,J;for(J=I;J<B;J+=1)p.setTripleAt(S[D][0],S[D][1],A[D][0],A[D][1],b[D][0],b[D][1],J,!1),D-=1;return p},Qr.prototype.length=function(){return this._length};var Rn=function(){function p(){return new Qr}function S(I){var D=I._length,B;for(B=0;B<D;B+=1)li.release(I.v[B]),li.release(I.i[B]),li.release(I.o[B]),I.v[B]=null,I.i[B]=null,I.o[B]=null;I._length=0,I.c=!1}function b(I){var D=A.newElement(),B,J=I._length===void 0?I.v.length:I._length;for(D.setLength(J),D.c=I.c,B=0;B<J;B+=1)D.setTripleAt(I.v[B][0],I.v[B][1],I.o[B][0],I.o[B][1],I.i[B][0],I.i[B][1],B);return D}var A=or(4,p,S);return A.clone=b,A}();function Ls(){this._length=0,this._maxLength=4,this.shapes=L(this._maxLength)}Ls.prototype.addShape=function(p){this._length===this._maxLength&&(this.shapes=this.shapes.concat(L(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=p,this._length+=1},Ls.prototype.releaseShapes=function(){var p;for(p=0;p<this._length;p+=1)Rn.release(this.shapes[p]);this._length=0};var ge=function(){var p={newShapeCollection:I,release:D},S=0,b=4,A=L(b);function I(){var B;return S?(S-=1,B=A[S]):B=new Ls,B}function D(B){var J,$=B._length;for(J=0;J<$;J+=1)Rn.release(B.shapes[J]);B._length=0,S===b&&(A=ai.double(A),b*=2),A[S]=B,S+=1}return p}(),lt=function(){var p=-999999;function S(le,te,G){var Q=G.lastIndex,oe,xe,Le,Ne,ut,nn,Ht,pt,sn,At=this.keyframes;if(le<At[0].t-this.offsetTime)oe=At[0].s[0],Le=!0,Q=0;else if(le>=At[At.length-1].t-this.offsetTime)oe=At[At.length-1].s?At[At.length-1].s[0]:At[At.length-2].e[0],Le=!0;else{for(var ct=Q,ee=At.length-1,me=!0,U,H,Me;me&&(U=At[ct],H=At[ct+1],!(H.t-this.offsetTime>le));)ct<ee-1?ct+=1:me=!1;if(Me=this.keyframesMetadata[ct]||{},Le=U.h===1,Q=ct,!Le){if(le>=H.t-this.offsetTime)pt=1;else if(le<U.t-this.offsetTime)pt=0;else{var Te;Me.__fnct?Te=Me.__fnct:(Te=_r.getBezierEasing(U.o.x,U.o.y,U.i.x,U.i.y).get,Me.__fnct=Te),pt=Te((le-(U.t-this.offsetTime))/(H.t-this.offsetTime-(U.t-this.offsetTime)))}xe=H.s?H.s[0]:U.e[0]}oe=U.s[0]}for(nn=te._length,Ht=oe.i[0].length,G.lastIndex=Q,Ne=0;Ne<nn;Ne+=1)for(ut=0;ut<Ht;ut+=1)sn=Le?oe.i[Ne][ut]:oe.i[Ne][ut]+(xe.i[Ne][ut]-oe.i[Ne][ut])*pt,te.i[Ne][ut]=sn,sn=Le?oe.o[Ne][ut]:oe.o[Ne][ut]+(xe.o[Ne][ut]-oe.o[Ne][ut])*pt,te.o[Ne][ut]=sn,sn=Le?oe.v[Ne][ut]:oe.v[Ne][ut]+(xe.v[Ne][ut]-oe.v[Ne][ut])*pt,te.v[Ne][ut]=sn}function b(){var le=this.comp.renderedFrame-this.offsetTime,te=this.keyframes[0].t-this.offsetTime,G=this.keyframes[this.keyframes.length-1].t-this.offsetTime,Q=this._caching.lastFrame;return Q!==p&&(Q<te&&le<te||Q>G&&le>G)||(this._caching.lastIndex=Q<le?this._caching.lastIndex:0,this.interpolateShape(le,this.pv,this._caching)),this._caching.lastFrame=le,this.pv}function A(){this.paths=this.localShapeCollection}function I(le,te){if(le._length!==te._length||le.c!==te.c)return!1;var G,Q=le._length;for(G=0;G<Q;G+=1)if(le.v[G][0]!==te.v[G][0]||le.v[G][1]!==te.v[G][1]||le.o[G][0]!==te.o[G][0]||le.o[G][1]!==te.o[G][1]||le.i[G][0]!==te.i[G][0]||le.i[G][1]!==te.i[G][1])return!1;return!0}function D(le){I(this.v,le)||(this.v=Rn.clone(le),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function B(){if(this.elem.globalData.frameId!==this.frameId){if(!this.effectsSequence.length){this._mdf=!1;return}if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=!1;var le;this.kf?le=this.pv:this.data.ks?le=this.data.ks.k:le=this.data.pt.k;var te,G=this.effectsSequence.length;for(te=0;te<G;te+=1)le=this.effectsSequence[te](le);this.setVValue(le),this.lock=!1,this.frameId=this.elem.globalData.frameId}}function J(le,te,G){this.propType="shape",this.comp=le.comp,this.container=le,this.elem=le,this.data=te,this.k=!1,this.kf=!1,this._mdf=!1;var Q=G===3?te.pt.k:te.ks.k;this.v=Rn.clone(Q),this.pv=Rn.clone(this.v),this.localShapeCollection=ge.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=A,this.effectsSequence=[]}function $(le){this.effectsSequence.push(le),this.container.addDynamicProperty(this)}J.prototype.interpolateShape=S,J.prototype.getValue=B,J.prototype.setVValue=D,J.prototype.addEffect=$;function ae(le,te,G){this.propType="shape",this.comp=le.comp,this.elem=le,this.container=le,this.offsetTime=le.data.st,this.keyframes=G===3?te.pt.k:te.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var Q=this.keyframes[0].s[0].i.length;this.v=Rn.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,Q),this.pv=Rn.clone(this.v),this.localShapeCollection=ge.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=p,this.reset=A,this._caching={lastFrame:p,lastIndex:0},this.effectsSequence=[b.bind(this)]}ae.prototype.getValue=B,ae.prototype.interpolateShape=S,ae.prototype.setVValue=D,ae.prototype.addEffect=$;var fe=function(){var le=Re;function te(G,Q){this.v=Rn.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=ge.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=Q.d,this.elem=G,this.comp=G.comp,this.frameId=-1,this.initDynamicPropertyContainer(G),this.p=vt.getProp(G,Q.p,1,0,this),this.s=vt.getProp(G,Q.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return te.prototype={reset:A,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var Q=this.p.v[0],oe=this.p.v[1],xe=this.s.v[0]/2,Le=this.s.v[1]/2,Ne=this.d!==3,ut=this.v;ut.v[0][0]=Q,ut.v[0][1]=oe-Le,ut.v[1][0]=Ne?Q+xe:Q-xe,ut.v[1][1]=oe,ut.v[2][0]=Q,ut.v[2][1]=oe+Le,ut.v[3][0]=Ne?Q-xe:Q+xe,ut.v[3][1]=oe,ut.i[0][0]=Ne?Q-xe*le:Q+xe*le,ut.i[0][1]=oe-Le,ut.i[1][0]=Ne?Q+xe:Q-xe,ut.i[1][1]=oe-Le*le,ut.i[2][0]=Ne?Q+xe*le:Q-xe*le,ut.i[2][1]=oe+Le,ut.i[3][0]=Ne?Q-xe:Q+xe,ut.i[3][1]=oe+Le*le,ut.o[0][0]=Ne?Q+xe*le:Q-xe*le,ut.o[0][1]=oe-Le,ut.o[1][0]=Ne?Q+xe:Q-xe,ut.o[1][1]=oe+Le*le,ut.o[2][0]=Ne?Q-xe*le:Q+xe*le,ut.o[2][1]=oe+Le,ut.o[3][0]=Ne?Q-xe:Q+xe,ut.o[3][1]=oe-Le*le}},E([Nn],te),te}(),ke=function(){function le(te,G){this.v=Rn.newElement(),this.v.setPathData(!0,0),this.elem=te,this.comp=te.comp,this.data=G,this.frameId=-1,this.d=G.d,this.initDynamicPropertyContainer(te),G.sy===1?(this.ir=vt.getProp(te,G.ir,0,0,this),this.is=vt.getProp(te,G.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=vt.getProp(te,G.pt,0,0,this),this.p=vt.getProp(te,G.p,1,0,this),this.r=vt.getProp(te,G.r,0,de,this),this.or=vt.getProp(te,G.or,0,0,this),this.os=vt.getProp(te,G.os,0,.01,this),this.localShapeCollection=ge.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return le.prototype={reset:A,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var G=Math.floor(this.pt.v)*2,Q=Math.PI*2/G,oe=!0,xe=this.or.v,Le=this.ir.v,Ne=this.os.v,ut=this.is.v,nn=2*Math.PI*xe/(G*2),Ht=2*Math.PI*Le/(G*2),pt,sn,At,ct,ee=-Math.PI/2;ee+=this.r.v;var me=this.data.d===3?-1:1;for(this.v._length=0,pt=0;pt<G;pt+=1){sn=oe?xe:Le,At=oe?Ne:ut,ct=oe?nn:Ht;var U=sn*Math.cos(ee),H=sn*Math.sin(ee),Me=U===0&&H===0?0:H/Math.sqrt(U*U+H*H),Te=U===0&&H===0?0:-U/Math.sqrt(U*U+H*H);U+=+this.p.v[0],H+=+this.p.v[1],this.v.setTripleAt(U,H,U-Me*ct*At*me,H-Te*ct*At*me,U+Me*ct*At*me,H+Te*ct*At*me,pt,!0),oe=!oe,ee+=Q*me}},convertPolygonToPath:function(){var G=Math.floor(this.pt.v),Q=Math.PI*2/G,oe=this.or.v,xe=this.os.v,Le=2*Math.PI*oe/(G*4),Ne,ut=-Math.PI*.5,nn=this.data.d===3?-1:1;for(ut+=this.r.v,this.v._length=0,Ne=0;Ne<G;Ne+=1){var Ht=oe*Math.cos(ut),pt=oe*Math.sin(ut),sn=Ht===0&&pt===0?0:pt/Math.sqrt(Ht*Ht+pt*pt),At=Ht===0&&pt===0?0:-Ht/Math.sqrt(Ht*Ht+pt*pt);Ht+=+this.p.v[0],pt+=+this.p.v[1],this.v.setTripleAt(Ht,pt,Ht-sn*Le*xe*nn,pt-At*Le*xe*nn,Ht+sn*Le*xe*nn,pt+At*Le*xe*nn,Ne,!0),ut+=Q*nn}this.paths.length=0,this.paths[0]=this.v}},E([Nn],le),le}(),q=function(){function le(te,G){this.v=Rn.newElement(),this.v.c=!0,this.localShapeCollection=ge.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=te,this.comp=te.comp,this.frameId=-1,this.d=G.d,this.initDynamicPropertyContainer(te),this.p=vt.getProp(te,G.p,1,0,this),this.s=vt.getProp(te,G.s,1,0,this),this.r=vt.getProp(te,G.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return le.prototype={convertRectToPath:function(){var G=this.p.v[0],Q=this.p.v[1],oe=this.s.v[0]/2,xe=this.s.v[1]/2,Le=ie(oe,xe,this.r.v),Ne=Le*(1-Re);this.v._length=0,this.d===2||this.d===1?(this.v.setTripleAt(G+oe,Q-xe+Le,G+oe,Q-xe+Le,G+oe,Q-xe+Ne,0,!0),this.v.setTripleAt(G+oe,Q+xe-Le,G+oe,Q+xe-Ne,G+oe,Q+xe-Le,1,!0),Le!==0?(this.v.setTripleAt(G+oe-Le,Q+xe,G+oe-Le,Q+xe,G+oe-Ne,Q+xe,2,!0),this.v.setTripleAt(G-oe+Le,Q+xe,G-oe+Ne,Q+xe,G-oe+Le,Q+xe,3,!0),this.v.setTripleAt(G-oe,Q+xe-Le,G-oe,Q+xe-Le,G-oe,Q+xe-Ne,4,!0),this.v.setTripleAt(G-oe,Q-xe+Le,G-oe,Q-xe+Ne,G-oe,Q-xe+Le,5,!0),this.v.setTripleAt(G-oe+Le,Q-xe,G-oe+Le,Q-xe,G-oe+Ne,Q-xe,6,!0),this.v.setTripleAt(G+oe-Le,Q-xe,G+oe-Ne,Q-xe,G+oe-Le,Q-xe,7,!0)):(this.v.setTripleAt(G-oe,Q+xe,G-oe+Ne,Q+xe,G-oe,Q+xe,2),this.v.setTripleAt(G-oe,Q-xe,G-oe,Q-xe+Ne,G-oe,Q-xe,3))):(this.v.setTripleAt(G+oe,Q-xe+Le,G+oe,Q-xe+Ne,G+oe,Q-xe+Le,0,!0),Le!==0?(this.v.setTripleAt(G+oe-Le,Q-xe,G+oe-Le,Q-xe,G+oe-Ne,Q-xe,1,!0),this.v.setTripleAt(G-oe+Le,Q-xe,G-oe+Ne,Q-xe,G-oe+Le,Q-xe,2,!0),this.v.setTripleAt(G-oe,Q-xe+Le,G-oe,Q-xe+Le,G-oe,Q-xe+Ne,3,!0),this.v.setTripleAt(G-oe,Q+xe-Le,G-oe,Q+xe-Ne,G-oe,Q+xe-Le,4,!0),this.v.setTripleAt(G-oe+Le,Q+xe,G-oe+Le,Q+xe,G-oe+Ne,Q+xe,5,!0),this.v.setTripleAt(G+oe-Le,Q+xe,G+oe-Ne,Q+xe,G+oe-Le,Q+xe,6,!0),this.v.setTripleAt(G+oe,Q+xe-Le,G+oe,Q+xe-Le,G+oe,Q+xe-Ne,7,!0)):(this.v.setTripleAt(G-oe,Q-xe,G-oe+Ne,Q-xe,G-oe,Q-xe,1,!0),this.v.setTripleAt(G-oe,Q+xe,G-oe,Q+xe-Ne,G-oe,Q+xe,2,!0),this.v.setTripleAt(G+oe,Q+xe,G+oe-Ne,Q+xe,G+oe,Q+xe,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:A},E([Nn],le),le}();function he(le,te,G){var Q;if(G===3||G===4){var oe=G===3?te.pt:te.ks,xe=oe.k;xe.length?Q=new ae(le,te,G):Q=new J(le,te,G)}else G===5?Q=new q(le,te):G===6?Q=new fe(le,te):G===7&&(Q=new ke(le,te));return Q.k&&le.addDynamicProperty(Q),Q}function ve(){return J}function pe(){return ae}var Ae={};return Ae.getShapeProp=he,Ae.getConstructorFunction=ve,Ae.getKeyframedConstructorFunction=pe,Ae}();/*!
|
|
304
|
+
Transformation Matrix v2.0
|
|
305
|
+
(c) Epistemex 2014-2015
|
|
306
|
+
www.epistemex.com
|
|
307
|
+
By Ken Fyrstenberg
|
|
308
|
+
Contributions by leeoniya.
|
|
309
|
+
License: MIT, header required.
|
|
310
|
+
*/var yt=function(){var p=Math.cos,S=Math.sin,b=Math.tan,A=Math.round;function I(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=0,this.props[4]=0,this.props[5]=1,this.props[6]=0,this.props[7]=0,this.props[8]=0,this.props[9]=0,this.props[10]=1,this.props[11]=0,this.props[12]=0,this.props[13]=0,this.props[14]=0,this.props[15]=1,this}function D(U){if(U===0)return this;var H=p(U),Me=S(U);return this._t(H,-Me,0,0,Me,H,0,0,0,0,1,0,0,0,0,1)}function B(U){if(U===0)return this;var H=p(U),Me=S(U);return this._t(1,0,0,0,0,H,-Me,0,0,Me,H,0,0,0,0,1)}function J(U){if(U===0)return this;var H=p(U),Me=S(U);return this._t(H,0,Me,0,0,1,0,0,-Me,0,H,0,0,0,0,1)}function $(U){if(U===0)return this;var H=p(U),Me=S(U);return this._t(H,-Me,0,0,Me,H,0,0,0,0,1,0,0,0,0,1)}function ae(U,H){return this._t(1,H,U,1,0,0)}function fe(U,H){return this.shear(b(U),b(H))}function ke(U,H){var Me=p(H),Te=S(H);return this._t(Me,Te,0,0,-Te,Me,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,b(U),1,0,0,0,0,1,0,0,0,0,1)._t(Me,-Te,0,0,Te,Me,0,0,0,0,1,0,0,0,0,1)}function q(U,H,Me){return!Me&&Me!==0&&(Me=1),U===1&&H===1&&Me===1?this:this._t(U,0,0,0,0,H,0,0,0,0,Me,0,0,0,0,1)}function he(U,H,Me,Te,_t,Gt,Zt,An,In,mr,zr,Ss,hi,pi,ss,Hn){return this.props[0]=U,this.props[1]=H,this.props[2]=Me,this.props[3]=Te,this.props[4]=_t,this.props[5]=Gt,this.props[6]=Zt,this.props[7]=An,this.props[8]=In,this.props[9]=mr,this.props[10]=zr,this.props[11]=Ss,this.props[12]=hi,this.props[13]=pi,this.props[14]=ss,this.props[15]=Hn,this}function ve(U,H,Me){return Me=Me||0,U!==0||H!==0||Me!==0?this._t(1,0,0,0,0,1,0,0,0,0,1,0,U,H,Me,1):this}function pe(U,H,Me,Te,_t,Gt,Zt,An,In,mr,zr,Ss,hi,pi,ss,Hn){var St=this.props;if(U===1&&H===0&&Me===0&&Te===0&&_t===0&&Gt===1&&Zt===0&&An===0&&In===0&&mr===0&&zr===1&&Ss===0)return St[12]=St[12]*U+St[15]*hi,St[13]=St[13]*Gt+St[15]*pi,St[14]=St[14]*zr+St[15]*ss,St[15]*=Hn,this._identityCalculated=!1,this;var Xs=St[0],Qs=St[1],Js=St[2],mi=St[3],Bs=St[4],ji=St[5],Ri=St[6],Es=St[7],Ha=St[8],as=St[9],Ea=St[10],xs=St[11],mo=St[12],xa=St[13],Qo=St[14],go=St[15];return St[0]=Xs*U+Qs*_t+Js*In+mi*hi,St[1]=Xs*H+Qs*Gt+Js*mr+mi*pi,St[2]=Xs*Me+Qs*Zt+Js*zr+mi*ss,St[3]=Xs*Te+Qs*An+Js*Ss+mi*Hn,St[4]=Bs*U+ji*_t+Ri*In+Es*hi,St[5]=Bs*H+ji*Gt+Ri*mr+Es*pi,St[6]=Bs*Me+ji*Zt+Ri*zr+Es*ss,St[7]=Bs*Te+ji*An+Ri*Ss+Es*Hn,St[8]=Ha*U+as*_t+Ea*In+xs*hi,St[9]=Ha*H+as*Gt+Ea*mr+xs*pi,St[10]=Ha*Me+as*Zt+Ea*zr+xs*ss,St[11]=Ha*Te+as*An+Ea*Ss+xs*Hn,St[12]=mo*U+xa*_t+Qo*In+go*hi,St[13]=mo*H+xa*Gt+Qo*mr+go*pi,St[14]=mo*Me+xa*Zt+Qo*zr+go*ss,St[15]=mo*Te+xa*An+Qo*Ss+go*Hn,this._identityCalculated=!1,this}function Ae(U){var H=U.props;return this.transform(H[0],H[1],H[2],H[3],H[4],H[5],H[6],H[7],H[8],H[9],H[10],H[11],H[12],H[13],H[14],H[15])}function le(){return this._identityCalculated||(this._identity=!(this.props[0]!==1||this.props[1]!==0||this.props[2]!==0||this.props[3]!==0||this.props[4]!==0||this.props[5]!==1||this.props[6]!==0||this.props[7]!==0||this.props[8]!==0||this.props[9]!==0||this.props[10]!==1||this.props[11]!==0||this.props[12]!==0||this.props[13]!==0||this.props[14]!==0||this.props[15]!==1),this._identityCalculated=!0),this._identity}function te(U){for(var H=0;H<16;){if(U.props[H]!==this.props[H])return!1;H+=1}return!0}function G(U){var H;for(H=0;H<16;H+=1)U.props[H]=this.props[H];return U}function Q(U){var H;for(H=0;H<16;H+=1)this.props[H]=U[H]}function oe(U,H,Me){return{x:U*this.props[0]+H*this.props[4]+Me*this.props[8]+this.props[12],y:U*this.props[1]+H*this.props[5]+Me*this.props[9]+this.props[13],z:U*this.props[2]+H*this.props[6]+Me*this.props[10]+this.props[14]}}function xe(U,H,Me){return U*this.props[0]+H*this.props[4]+Me*this.props[8]+this.props[12]}function Le(U,H,Me){return U*this.props[1]+H*this.props[5]+Me*this.props[9]+this.props[13]}function Ne(U,H,Me){return U*this.props[2]+H*this.props[6]+Me*this.props[10]+this.props[14]}function ut(){var U=this.props[0]*this.props[5]-this.props[1]*this.props[4],H=this.props[5]/U,Me=-this.props[1]/U,Te=-this.props[4]/U,_t=this.props[0]/U,Gt=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/U,Zt=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/U,An=new yt;return An.props[0]=H,An.props[1]=Me,An.props[4]=Te,An.props[5]=_t,An.props[12]=Gt,An.props[13]=Zt,An}function nn(U){var H=this.getInverseMatrix();return H.applyToPointArray(U[0],U[1],U[2]||0)}function Ht(U){var H,Me=U.length,Te=[];for(H=0;H<Me;H+=1)Te[H]=nn(U[H]);return Te}function pt(U,H,Me){var Te=_("float32",6);if(this.isIdentity())Te[0]=U[0],Te[1]=U[1],Te[2]=H[0],Te[3]=H[1],Te[4]=Me[0],Te[5]=Me[1];else{var _t=this.props[0],Gt=this.props[1],Zt=this.props[4],An=this.props[5],In=this.props[12],mr=this.props[13];Te[0]=U[0]*_t+U[1]*Zt+In,Te[1]=U[0]*Gt+U[1]*An+mr,Te[2]=H[0]*_t+H[1]*Zt+In,Te[3]=H[0]*Gt+H[1]*An+mr,Te[4]=Me[0]*_t+Me[1]*Zt+In,Te[5]=Me[0]*Gt+Me[1]*An+mr}return Te}function sn(U,H,Me){var Te;return this.isIdentity()?Te=[U,H,Me]:Te=[U*this.props[0]+H*this.props[4]+Me*this.props[8]+this.props[12],U*this.props[1]+H*this.props[5]+Me*this.props[9]+this.props[13],U*this.props[2]+H*this.props[6]+Me*this.props[10]+this.props[14]],Te}function At(U,H){if(this.isIdentity())return U+","+H;var Me=this.props;return Math.round((U*Me[0]+H*Me[4]+Me[12])*100)/100+","+Math.round((U*Me[1]+H*Me[5]+Me[13])*100)/100}function ct(){for(var U=0,H=this.props,Me="matrix3d(",Te=1e4;U<16;)Me+=A(H[U]*Te)/Te,Me+=U===15?")":",",U+=1;return Me}function ee(U){var H=1e4;return U<1e-6&&U>0||U>-1e-6&&U<0?A(U*H)/H:U}function me(){var U=this.props,H=ee(U[0]),Me=ee(U[1]),Te=ee(U[4]),_t=ee(U[5]),Gt=ee(U[12]),Zt=ee(U[13]);return"matrix("+H+","+Me+","+Te+","+_t+","+Gt+","+Zt+")"}return function(){this.reset=I,this.rotate=D,this.rotateX=B,this.rotateY=J,this.rotateZ=$,this.skew=fe,this.skewFromAxis=ke,this.shear=ae,this.scale=q,this.setTransform=he,this.translate=ve,this.transform=pe,this.multiply=Ae,this.applyToPoint=oe,this.applyToX=xe,this.applyToY=Le,this.applyToZ=Ne,this.applyToPointArray=sn,this.applyToTriplePoints=pt,this.applyToPointStringified=At,this.toCSS=ct,this.to2dCSS=me,this.clone=G,this.cloneFromProps=Q,this.equals=te,this.inversePoints=Ht,this.inversePoint=nn,this.getInverseMatrix=ut,this._t=this.transform,this.isIdentity=le,this._identity=!0,this._identityCalculated=!1,this.props=_("float32",16),this.reset()}}();function $t(p){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?$t=function(b){return typeof b}:$t=function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},$t(p)}var Nt={};function Xt(p){h(p)}function wn(){nr.searchAnimations()}function yn(p){Et(p)}function rr(p){Fn(p)}function kn(p){return nr.loadAnimation(p)}function lr(p){if(typeof p=="string")switch(p){case"high":bn(200);break;default:case"medium":bn(50);break;case"low":bn(10);break}else!isNaN(p)&&p>1&&bn(p)}function Jr(){return typeof navigator<"u"}function Vi(p,S){p==="expressions"&&Ot(S)}function Ys(p){switch(p){case"propertyFactory":return vt;case"shapePropertyFactory":return lt;case"matrix":return yt;default:return null}}Nt.play=nr.play,Nt.pause=nr.pause,Nt.setLocationHref=Xt,Nt.togglePause=nr.togglePause,Nt.setSpeed=nr.setSpeed,Nt.setDirection=nr.setDirection,Nt.stop=nr.stop,Nt.searchAnimations=wn,Nt.registerAnimation=nr.registerAnimation,Nt.loadAnimation=kn,Nt.setSubframeRendering=yn,Nt.resize=nr.resize,Nt.goToAndStop=nr.goToAndStop,Nt.destroy=nr.destroy,Nt.setQuality=lr,Nt.inBrowser=Jr,Nt.installPlugin=Vi,Nt.freeze=nr.freeze,Nt.unfreeze=nr.unfreeze,Nt.setVolume=nr.setVolume,Nt.mute=nr.mute,Nt.unmute=nr.unmute,Nt.getRegisteredAnimations=nr.getRegisteredAnimations,Nt.useWebWorker=u,Nt.setIDPrefix=rr,Nt.__getFactory=Ys,Nt.version="5.12.2";function bi(){document.readyState==="complete"&&(clearInterval(uo),wn())}function xu(p){for(var S=_l.split("&"),b=0;b<S.length;b+=1){var A=S[b].split("=");if(decodeURIComponent(A[0])==p)return decodeURIComponent(A[1])}return null}var _l="";{var Ll=document.getElementsByTagName("script"),ui=Ll.length-1,Qi=Ll[ui]||{src:""};_l=Qi.src?Qi.src.replace(/^[^\?]+\??/,""):"",xu("renderer")}var uo=setInterval(bi,100);try{$t(e)!=="object"&&(window.bodymovin=Nt)}catch{}var Ji=function(){var p={},S={};p.registerModifier=b,p.getModifier=A;function b(I,D){S[I]||(S[I]=D)}function A(I,D,B){return new S[I](D,B)}return p}();function pr(){}pr.prototype.initModifierProperties=function(){},pr.prototype.addShapeToModifier=function(){},pr.prototype.addShape=function(p){if(!this.closed){p.sh.container.addDynamicProperty(p.sh);var S={shape:p.sh,data:p,localShapeCollection:ge.newShapeCollection()};this.shapes.push(S),this.addShapeToModifier(S),this._isAnimated&&p.setAsAnimated()}},pr.prototype.init=function(p,S){this.shapes=[],this.elem=p,this.initDynamicPropertyContainer(p),this.initModifierProperties(p,S),this.frameId=o,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},pr.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},E([Nn],pr);function ci(){}E([pr],ci),ci.prototype.initModifierProperties=function(p,S){this.s=vt.getProp(p,S.s,0,.01,this),this.e=vt.getProp(p,S.e,0,.01,this),this.o=vt.getProp(p,S.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=S.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},ci.prototype.addShapeToModifier=function(p){p.pathsData=[]},ci.prototype.calculateShapeEdges=function(p,S,b,A,I){var D=[];S<=1?D.push({s:p,e:S}):p>=1?D.push({s:p-1,e:S-1}):(D.push({s:p,e:1}),D.push({s:0,e:S-1}));var B=[],J,$=D.length,ae;for(J=0;J<$;J+=1)if(ae=D[J],!(ae.e*I<A||ae.s*I>A+b)){var fe,ke;ae.s*I<=A?fe=0:fe=(ae.s*I-A)/b,ae.e*I>=A+b?ke=1:ke=(ae.e*I-A)/b,B.push([fe,ke])}return B.length||B.push([0,0]),B},ci.prototype.releasePathsData=function(p){var S,b=p.length;for(S=0;S<b;S+=1)fa.release(p[S]);return p.length=0,p},ci.prototype.processShapes=function(p){var S,b;if(this._mdf||p){var A=this.o.v%360/360;if(A<0&&(A+=1),this.s.v>1?S=1+A:this.s.v<0?S=0+A:S=this.s.v+A,this.e.v>1?b=1+A:this.e.v<0?b=0+A:b=this.e.v+A,S>b){var I=S;S=b,b=I}S=Math.round(S*1e4)*1e-4,b=Math.round(b*1e4)*1e-4,this.sValue=S,this.eValue=b}else S=this.sValue,b=this.eValue;var D,B,J=this.shapes.length,$,ae,fe,ke,q,he=0;if(b===S)for(B=0;B<J;B+=1)this.shapes[B].localShapeCollection.releaseShapes(),this.shapes[B].shape._mdf=!0,this.shapes[B].shape.paths=this.shapes[B].localShapeCollection,this._mdf&&(this.shapes[B].pathsData.length=0);else if(b===1&&S===0||b===0&&S===1){if(this._mdf)for(B=0;B<J;B+=1)this.shapes[B].pathsData.length=0,this.shapes[B].shape._mdf=!0}else{var ve=[],pe,Ae;for(B=0;B<J;B+=1)if(pe=this.shapes[B],!pe.shape._mdf&&!this._mdf&&!p&&this.m!==2)pe.shape.paths=pe.localShapeCollection;else{if(D=pe.shape.paths,ae=D._length,q=0,!pe.shape._mdf&&pe.pathsData.length)q=pe.totalShapeLength;else{for(fe=this.releasePathsData(pe.pathsData),$=0;$<ae;$+=1)ke=Mr.getSegmentsLength(D.shapes[$]),fe.push(ke),q+=ke.totalLength;pe.totalShapeLength=q,pe.pathsData=fe}he+=q,pe.shape._mdf=!0}var le=S,te=b,G=0,Q;for(B=J-1;B>=0;B-=1)if(pe=this.shapes[B],pe.shape._mdf){for(Ae=pe.localShapeCollection,Ae.releaseShapes(),this.m===2&&J>1?(Q=this.calculateShapeEdges(S,b,pe.totalShapeLength,G,he),G+=pe.totalShapeLength):Q=[[le,te]],ae=Q.length,$=0;$<ae;$+=1){le=Q[$][0],te=Q[$][1],ve.length=0,te<=1?ve.push({s:pe.totalShapeLength*le,e:pe.totalShapeLength*te}):le>=1?ve.push({s:pe.totalShapeLength*(le-1),e:pe.totalShapeLength*(te-1)}):(ve.push({s:pe.totalShapeLength*le,e:pe.totalShapeLength}),ve.push({s:0,e:pe.totalShapeLength*(te-1)}));var oe=this.addShapes(pe,ve[0]);if(ve[0].s!==ve[0].e){if(ve.length>1){var xe=pe.shape.paths.shapes[pe.shape.paths._length-1];if(xe.c){var Le=oe.pop();this.addPaths(oe,Ae),oe=this.addShapes(pe,ve[1],Le)}else this.addPaths(oe,Ae),oe=this.addShapes(pe,ve[1])}this.addPaths(oe,Ae)}}pe.shape.paths=Ae}}},ci.prototype.addPaths=function(p,S){var b,A=p.length;for(b=0;b<A;b+=1)S.addShape(p[b])},ci.prototype.addSegment=function(p,S,b,A,I,D,B){I.setXYAt(S[0],S[1],"o",D),I.setXYAt(b[0],b[1],"i",D+1),B&&I.setXYAt(p[0],p[1],"v",D),I.setXYAt(A[0],A[1],"v",D+1)},ci.prototype.addSegmentFromArray=function(p,S,b,A){S.setXYAt(p[1],p[5],"o",b),S.setXYAt(p[2],p[6],"i",b+1),A&&S.setXYAt(p[0],p[4],"v",b),S.setXYAt(p[3],p[7],"v",b+1)},ci.prototype.addShapes=function(p,S,b){var A=p.pathsData,I=p.shape.paths.shapes,D,B=p.shape.paths._length,J,$,ae=0,fe,ke,q,he,ve=[],pe,Ae=!0;for(b?(ke=b._length,pe=b._length):(b=Rn.newElement(),ke=0,pe=0),ve.push(b),D=0;D<B;D+=1){for(q=A[D].lengths,b.c=I[D].c,$=I[D].c?q.length:q.length+1,J=1;J<$;J+=1)if(fe=q[J-1],ae+fe.addedLength<S.s)ae+=fe.addedLength,b.c=!1;else if(ae>S.e){b.c=!1;break}else S.s<=ae&&S.e>=ae+fe.addedLength?(this.addSegment(I[D].v[J-1],I[D].o[J-1],I[D].i[J],I[D].v[J],b,ke,Ae),Ae=!1):(he=Mr.getNewSegment(I[D].v[J-1],I[D].v[J],I[D].o[J-1],I[D].i[J],(S.s-ae)/fe.addedLength,(S.e-ae)/fe.addedLength,q[J-1]),this.addSegmentFromArray(he,b,ke,Ae),Ae=!1,b.c=!1),ae+=fe.addedLength,ke+=1;if(I[D].c&&q.length){if(fe=q[J-1],ae<=S.e){var le=q[J-1].addedLength;S.s<=ae&&S.e>=ae+le?(this.addSegment(I[D].v[J-1],I[D].o[J-1],I[D].i[0],I[D].v[0],b,ke,Ae),Ae=!1):(he=Mr.getNewSegment(I[D].v[J-1],I[D].v[0],I[D].o[J-1],I[D].i[0],(S.s-ae)/le,(S.e-ae)/le,q[J-1]),this.addSegmentFromArray(he,b,ke,Ae),Ae=!1,b.c=!1)}else b.c=!1;ae+=fe.addedLength,ke+=1}if(b._length&&(b.setXYAt(b.v[pe][0],b.v[pe][1],"i",pe),b.setXYAt(b.v[b._length-1][0],b.v[b._length-1][1],"o",b._length-1)),ae>S.e)break;D<B-1&&(b=Rn.newElement(),Ae=!0,ve.push(b),ke=0)}return ve};function Zi(){}E([pr],Zi),Zi.prototype.initModifierProperties=function(p,S){this.getValue=this.processKeys,this.amount=vt.getProp(p,S.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},Zi.prototype.processPath=function(p,S){var b=S/100,A=[0,0],I=p._length,D=0;for(D=0;D<I;D+=1)A[0]+=p.v[D][0],A[1]+=p.v[D][1];A[0]/=I,A[1]/=I;var B=Rn.newElement();B.c=p.c;var J,$,ae,fe,ke,q;for(D=0;D<I;D+=1)J=p.v[D][0]+(A[0]-p.v[D][0])*b,$=p.v[D][1]+(A[1]-p.v[D][1])*b,ae=p.o[D][0]+(A[0]-p.o[D][0])*-b,fe=p.o[D][1]+(A[1]-p.o[D][1])*-b,ke=p.i[D][0]+(A[0]-p.i[D][0])*-b,q=p.i[D][1]+(A[1]-p.i[D][1])*-b,B.setTripleAt(J,$,ae,fe,ke,q,D);return B},Zi.prototype.processShapes=function(p){var S,b,A=this.shapes.length,I,D,B=this.amount.v;if(B!==0){var J,$;for(b=0;b<A;b+=1){if(J=this.shapes[b],$=J.localShapeCollection,!(!J.shape._mdf&&!this._mdf&&!p))for($.releaseShapes(),J.shape._mdf=!0,S=J.shape.paths.shapes,D=J.shape.paths._length,I=0;I<D;I+=1)$.addShape(this.processPath(S[I],B));J.shape.paths=J.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};var $o=function(){var p=[0,0];function S($){var ae=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||ae,this.a&&$.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&$.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&$.skewFromAxis(-this.sk.v,this.sa.v),this.r?$.rotate(-this.r.v):$.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?this.data.p.z?$.translate(this.px.v,this.py.v,-this.pz.v):$.translate(this.px.v,this.py.v,0):$.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}function b($){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||$){var ae;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.autoOriented){var fe,ke;if(ae=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(fe=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/ae,0),ke=this.p.getValueAtTime(this.p.keyframes[0].t/ae,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(fe=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/ae,0),ke=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/ae,0)):(fe=this.p.pv,ke=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/ae,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){fe=[],ke=[];var q=this.px,he=this.py;q._caching.lastFrame+q.offsetTime<=q.keyframes[0].t?(fe[0]=q.getValueAtTime((q.keyframes[0].t+.01)/ae,0),fe[1]=he.getValueAtTime((he.keyframes[0].t+.01)/ae,0),ke[0]=q.getValueAtTime(q.keyframes[0].t/ae,0),ke[1]=he.getValueAtTime(he.keyframes[0].t/ae,0)):q._caching.lastFrame+q.offsetTime>=q.keyframes[q.keyframes.length-1].t?(fe[0]=q.getValueAtTime(q.keyframes[q.keyframes.length-1].t/ae,0),fe[1]=he.getValueAtTime(he.keyframes[he.keyframes.length-1].t/ae,0),ke[0]=q.getValueAtTime((q.keyframes[q.keyframes.length-1].t-.01)/ae,0),ke[1]=he.getValueAtTime((he.keyframes[he.keyframes.length-1].t-.01)/ae,0)):(fe=[q.pv,he.pv],ke[0]=q.getValueAtTime((q._caching.lastFrame+q.offsetTime-.01)/ae,q.offsetTime),ke[1]=he.getValueAtTime((he._caching.lastFrame+he.offsetTime-.01)/ae,he.offsetTime))}else ke=p,fe=ke;this.v.rotate(-Math.atan2(fe[1]-ke[1],fe[0]-ke[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}}function A(){if(this.appliedTransformations=0,this.pre.reset(),!this.a.effectsSequence.length)this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1;else return;if(!this.s.effectsSequence.length)this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2;else return;if(this.sk)if(!this.sk.effectsSequence.length&&!this.sa.effectsSequence.length)this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3;else return;this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):!this.rz.effectsSequence.length&&!this.ry.effectsSequence.length&&!this.rx.effectsSequence.length&&!this.or.effectsSequence.length&&(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}function I(){}function D($){this._addDynamicProperty($),this.elem.addDynamicProperty($),this._isDirty=!0}function B($,ae,fe){if(this.elem=$,this.frameId=-1,this.propType="transform",this.data=ae,this.v=new yt,this.pre=new yt,this.appliedTransformations=0,this.initDynamicPropertyContainer(fe||$),ae.p&&ae.p.s?(this.px=vt.getProp($,ae.p.x,0,0,this),this.py=vt.getProp($,ae.p.y,0,0,this),ae.p.z&&(this.pz=vt.getProp($,ae.p.z,0,0,this))):this.p=vt.getProp($,ae.p||{k:[0,0,0]},1,0,this),ae.rx){if(this.rx=vt.getProp($,ae.rx,0,de,this),this.ry=vt.getProp($,ae.ry,0,de,this),this.rz=vt.getProp($,ae.rz,0,de,this),ae.or.k[0].ti){var ke,q=ae.or.k.length;for(ke=0;ke<q;ke+=1)ae.or.k[ke].to=null,ae.or.k[ke].ti=null}this.or=vt.getProp($,ae.or,1,de,this),this.or.sh=!0}else this.r=vt.getProp($,ae.r||{k:0},0,de,this);ae.sk&&(this.sk=vt.getProp($,ae.sk,0,de,this),this.sa=vt.getProp($,ae.sa,0,de,this)),this.a=vt.getProp($,ae.a||{k:[0,0,0]},1,0,this),this.s=vt.getProp($,ae.s||{k:[100,100,100]},1,.01,this),ae.o?this.o=vt.getProp($,ae.o,0,.01,$):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}B.prototype={applyToMatrix:S,getValue:b,precalculateMatrix:A,autoOrient:I},E([Nn],B),B.prototype.addDynamicProperty=D,B.prototype._addDynamicProperty=Nn.prototype.addDynamicProperty;function J($,ae,fe){return new B($,ae,fe)}return{getTransformProperty:J}}();function Mi(){}E([pr],Mi),Mi.prototype.initModifierProperties=function(p,S){this.getValue=this.processKeys,this.c=vt.getProp(p,S.c,0,null,this),this.o=vt.getProp(p,S.o,0,null,this),this.tr=$o.getTransformProperty(p,S.tr,this),this.so=vt.getProp(p,S.tr.so,0,.01,this),this.eo=vt.getProp(p,S.tr.eo,0,.01,this),this.data=S,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new yt,this.rMatrix=new yt,this.sMatrix=new yt,this.tMatrix=new yt,this.matrix=new yt},Mi.prototype.applyTransforms=function(p,S,b,A,I,D){var B=D?-1:1,J=A.s.v[0]+(1-A.s.v[0])*(1-I),$=A.s.v[1]+(1-A.s.v[1])*(1-I);p.translate(A.p.v[0]*B*I,A.p.v[1]*B*I,A.p.v[2]),S.translate(-A.a.v[0],-A.a.v[1],A.a.v[2]),S.rotate(-A.r.v*B*I),S.translate(A.a.v[0],A.a.v[1],A.a.v[2]),b.translate(-A.a.v[0],-A.a.v[1],A.a.v[2]),b.scale(D?1/J:J,D?1/$:$),b.translate(A.a.v[0],A.a.v[1],A.a.v[2])},Mi.prototype.init=function(p,S,b,A){for(this.elem=p,this.arr=S,this.pos=b,this.elemsData=A,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(p),this.initModifierProperties(p,S[b]);b>0;)b-=1,this._elements.unshift(S[b]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},Mi.prototype.resetElements=function(p){var S,b=p.length;for(S=0;S<b;S+=1)p[S]._processed=!1,p[S].ty==="gr"&&this.resetElements(p[S].it)},Mi.prototype.cloneElements=function(p){var S=JSON.parse(JSON.stringify(p));return this.resetElements(S),S},Mi.prototype.changeGroupRender=function(p,S){var b,A=p.length;for(b=0;b<A;b+=1)p[b]._render=S,p[b].ty==="gr"&&this.changeGroupRender(p[b].it,S)},Mi.prototype.processShapes=function(p){var S,b,A,I,D,B=!1;if(this._mdf||p){var J=Math.ceil(this.c.v);if(this._groups.length<J){for(;this._groups.length<J;){var $={it:this.cloneElements(this._elements),ty:"gr"};$.it.push({a:{a:0,ix:1,k:[0,0]},nm:"Transform",o:{a:0,ix:7,k:100},p:{a:0,ix:2,k:[0,0]},r:{a:1,ix:6,k:[{s:0,e:0,t:0},{s:0,e:0,t:1}]},s:{a:0,ix:3,k:[100,100]},sa:{a:0,ix:5,k:0},sk:{a:0,ix:4,k:0},ty:"tr"}),this.arr.splice(0,0,$),this._groups.splice(0,0,$),this._currentCopies+=1}this.elem.reloadShapes(),B=!0}D=0;var ae;for(A=0;A<=this._groups.length-1;A+=1){if(ae=D<J,this._groups[A]._render=ae,this.changeGroupRender(this._groups[A].it,ae),!ae){var fe=this.elemsData[A].it,ke=fe[fe.length-1];ke.transform.op.v!==0?(ke.transform.op._mdf=!0,ke.transform.op.v=0):ke.transform.op._mdf=!1}D+=1}this._currentCopies=J;var q=this.o.v,he=q%1,ve=q>0?Math.floor(q):Math.ceil(q),pe=this.pMatrix.props,Ae=this.rMatrix.props,le=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var te=0;if(q>0){for(;te<ve;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),te+=1;he&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,he,!1),te+=he)}else if(q<0){for(;te>ve;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),te-=1;he&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-he,!0),te-=he)}A=this.data.m===1?0:this._currentCopies-1,I=this.data.m===1?1:-1,D=this._currentCopies;for(var G,Q;D;){if(S=this.elemsData[A].it,b=S[S.length-1].transform.mProps.v.props,Q=b.length,S[S.length-1].transform.mProps._mdf=!0,S[S.length-1].transform.op._mdf=!0,S[S.length-1].transform.op.v=this._currentCopies===1?this.so.v:this.so.v+(this.eo.v-this.so.v)*(A/(this._currentCopies-1)),te!==0){for((A!==0&&I===1||A!==this._currentCopies-1&&I===-1)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(Ae[0],Ae[1],Ae[2],Ae[3],Ae[4],Ae[5],Ae[6],Ae[7],Ae[8],Ae[9],Ae[10],Ae[11],Ae[12],Ae[13],Ae[14],Ae[15]),this.matrix.transform(le[0],le[1],le[2],le[3],le[4],le[5],le[6],le[7],le[8],le[9],le[10],le[11],le[12],le[13],le[14],le[15]),this.matrix.transform(pe[0],pe[1],pe[2],pe[3],pe[4],pe[5],pe[6],pe[7],pe[8],pe[9],pe[10],pe[11],pe[12],pe[13],pe[14],pe[15]),G=0;G<Q;G+=1)b[G]=this.matrix.props[G];this.matrix.reset()}else for(this.matrix.reset(),G=0;G<Q;G+=1)b[G]=this.matrix.props[G];te+=1,D-=1,A+=I}}else for(D=this._currentCopies,A=0,I=1;D;)S=this.elemsData[A].it,b=S[S.length-1].transform.mProps.v.props,S[S.length-1].transform.mProps._mdf=!1,S[S.length-1].transform.op._mdf=!1,D-=1,A+=I;return B},Mi.prototype.addShape=function(){};function Ua(){}E([pr],Ua),Ua.prototype.initModifierProperties=function(p,S){this.getValue=this.processKeys,this.rd=vt.getProp(p,S.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},Ua.prototype.processPath=function(p,S){var b=Rn.newElement();b.c=p.c;var A,I=p._length,D,B,J,$,ae,fe,ke=0,q,he,ve,pe,Ae,le;for(A=0;A<I;A+=1)D=p.v[A],J=p.o[A],B=p.i[A],D[0]===J[0]&&D[1]===J[1]&&D[0]===B[0]&&D[1]===B[1]?(A===0||A===I-1)&&!p.c?(b.setTripleAt(D[0],D[1],J[0],J[1],B[0],B[1],ke),ke+=1):(A===0?$=p.v[I-1]:$=p.v[A-1],ae=Math.sqrt(Math.pow(D[0]-$[0],2)+Math.pow(D[1]-$[1],2)),fe=ae?Math.min(ae/2,S)/ae:0,Ae=D[0]+($[0]-D[0])*fe,q=Ae,le=D[1]-(D[1]-$[1])*fe,he=le,ve=q-(q-D[0])*Re,pe=he-(he-D[1])*Re,b.setTripleAt(q,he,ve,pe,Ae,le,ke),ke+=1,A===I-1?$=p.v[0]:$=p.v[A+1],ae=Math.sqrt(Math.pow(D[0]-$[0],2)+Math.pow(D[1]-$[1],2)),fe=ae?Math.min(ae/2,S)/ae:0,ve=D[0]+($[0]-D[0])*fe,q=ve,pe=D[1]+($[1]-D[1])*fe,he=pe,Ae=q-(q-D[0])*Re,le=he-(he-D[1])*Re,b.setTripleAt(q,he,ve,pe,Ae,le,ke),ke+=1):(b.setTripleAt(p.v[A][0],p.v[A][1],p.o[A][0],p.o[A][1],p.i[A][0],p.i[A][1],ke),ke+=1);return b},Ua.prototype.processShapes=function(p){var S,b,A=this.shapes.length,I,D,B=this.rd.v;if(B!==0){var J,$;for(b=0;b<A;b+=1){if(J=this.shapes[b],$=J.localShapeCollection,!(!J.shape._mdf&&!this._mdf&&!p))for($.releaseShapes(),J.shape._mdf=!0,S=J.shape.paths.shapes,D=J.shape.paths._length,I=0;I<D;I+=1)$.addShape(this.processPath(S[I],B));J.shape.paths=J.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function ks(p,S){return Math.abs(p-S)*1e5<=Math.min(Math.abs(p),Math.abs(S))}function Ti(p){return Math.abs(p)<=1e-5}function es(p,S,b){return p*(1-b)+S*b}function fi(p,S,b){return[es(p[0],S[0],b),es(p[1],S[1],b)]}function ts(p,S,b){if(p===0)return[];var A=S*S-4*p*b;if(A<0)return[];var I=-S/(2*p);if(A===0)return[I];var D=Math.sqrt(A)/(2*p);return[I-D,I+D]}function co(p,S,b,A){return[-p+3*S-3*b+A,3*p-6*S+3*b,-3*p+3*S,p]}function ns(p){return new dt(p,p,p,p,!1)}function dt(p,S,b,A,I){I&&Er(p,S)&&(S=fi(p,A,1/3)),I&&Er(b,A)&&(b=fi(p,A,2/3));var D=co(p[0],S[0],b[0],A[0]),B=co(p[1],S[1],b[1],A[1]);this.a=[D[0],B[0]],this.b=[D[1],B[1]],this.c=[D[2],B[2]],this.d=[D[3],B[3]],this.points=[p,S,b,A]}dt.prototype.point=function(p){return[((this.a[0]*p+this.b[0])*p+this.c[0])*p+this.d[0],((this.a[1]*p+this.b[1])*p+this.c[1])*p+this.d[1]]},dt.prototype.derivative=function(p){return[(3*p*this.a[0]+2*this.b[0])*p+this.c[0],(3*p*this.a[1]+2*this.b[1])*p+this.c[1]]},dt.prototype.tangentAngle=function(p){var S=this.derivative(p);return Math.atan2(S[1],S[0])},dt.prototype.normalAngle=function(p){var S=this.derivative(p);return Math.atan2(S[0],S[1])},dt.prototype.inflectionPoints=function(){var p=this.a[1]*this.b[0]-this.a[0]*this.b[1];if(Ti(p))return[];var S=-.5*(this.a[1]*this.c[0]-this.a[0]*this.c[1])/p,b=S*S-1/3*(this.b[1]*this.c[0]-this.b[0]*this.c[1])/p;if(b<0)return[];var A=Math.sqrt(b);return Ti(A)?A>0&&A<1?[S]:[]:[S-A,S+A].filter(function(I){return I>0&&I<1})},dt.prototype.split=function(p){if(p<=0)return[ns(this.points[0]),this];if(p>=1)return[this,ns(this.points[this.points.length-1])];var S=fi(this.points[0],this.points[1],p),b=fi(this.points[1],this.points[2],p),A=fi(this.points[2],this.points[3],p),I=fi(S,b,p),D=fi(b,A,p),B=fi(I,D,p);return[new dt(this.points[0],S,I,B,!0),new dt(B,D,A,this.points[3],!0)]};function Vo(p,S){var b=p.points[0][S],A=p.points[p.points.length-1][S];if(b>A){var I=A;A=b,b=I}for(var D=ts(3*p.a[S],2*p.b[S],p.c[S]),B=0;B<D.length;B+=1)if(D[B]>0&&D[B]<1){var J=p.point(D[B])[S];J<b?b=J:J>A&&(A=J)}return{min:b,max:A}}dt.prototype.bounds=function(){return{x:Vo(this,0),y:Vo(this,1)}},dt.prototype.boundingBox=function(){var p=this.bounds();return{left:p.x.min,right:p.x.max,top:p.y.min,bottom:p.y.max,width:p.x.max-p.x.min,height:p.y.max-p.y.min,cx:(p.x.max+p.x.min)/2,cy:(p.y.max+p.y.min)/2}};function Or(p,S,b){var A=p.boundingBox();return{cx:A.cx,cy:A.cy,width:A.width,height:A.height,bez:p,t:(S+b)/2,t1:S,t2:b}}function ma(p){var S=p.bez.split(.5);return[Or(S[0],p.t1,p.t),Or(S[1],p.t,p.t2)]}function Ds(p,S){return Math.abs(p.cx-S.cx)*2<p.width+S.width&&Math.abs(p.cy-S.cy)*2<p.height+S.height}function zo(p,S,b,A,I,D){if(Ds(p,S)){if(b>=D||p.width<=A&&p.height<=A&&S.width<=A&&S.height<=A){I.push([p.t,S.t]);return}var B=ma(p),J=ma(S);zo(B[0],J[0],b+1,A,I,D),zo(B[0],J[1],b+1,A,I,D),zo(B[1],J[0],b+1,A,I,D),zo(B[1],J[1],b+1,A,I,D)}}dt.prototype.intersections=function(p,S,b){S===void 0&&(S=2),b===void 0&&(b=7);var A=[];return zo(Or(this,0,1),Or(p,0,1),0,S,A,b),A},dt.shapeSegment=function(p,S){var b=(S+1)%p.length();return new dt(p.v[S],p.o[S],p.i[b],p.v[b],!0)},dt.shapeSegmentInverted=function(p,S){var b=(S+1)%p.length();return new dt(p.v[b],p.i[b],p.o[S],p.v[S],!0)};function Zr(p,S){return[p[1]*S[2]-p[2]*S[1],p[2]*S[0]-p[0]*S[2],p[0]*S[1]-p[1]*S[0]]}function ir(p,S,b,A){var I=[p[0],p[1],1],D=[S[0],S[1],1],B=[b[0],b[1],1],J=[A[0],A[1],1],$=Zr(Zr(I,D),Zr(B,J));return Ti($[2])?null:[$[0]/$[2],$[1]/$[2]]}function ei(p,S,b){return[p[0]+Math.cos(S)*b,p[1]-Math.sin(S)*b]}function bu(p,S){return Math.hypot(p[0]-S[0],p[1]-S[1])}function Er(p,S){return ks(p[0],S[0])&&ks(p[1],S[1])}function Oi(){}E([pr],Oi),Oi.prototype.initModifierProperties=function(p,S){this.getValue=this.processKeys,this.amplitude=vt.getProp(p,S.s,0,null,this),this.frequency=vt.getProp(p,S.r,0,null,this),this.pointsType=vt.getProp(p,S.pt,0,null,this),this._isAnimated=this.amplitude.effectsSequence.length!==0||this.frequency.effectsSequence.length!==0||this.pointsType.effectsSequence.length!==0};function jo(p,S,b,A,I,D,B){var J=b-Math.PI/2,$=b+Math.PI/2,ae=S[0]+Math.cos(b)*A*I,fe=S[1]-Math.sin(b)*A*I;p.setTripleAt(ae,fe,ae+Math.cos(J)*D,fe-Math.sin(J)*D,ae+Math.cos($)*B,fe-Math.sin($)*B,p.length())}function ga(p,S){var b=[S[0]-p[0],S[1]-p[1]],A=-Math.PI*.5,I=[Math.cos(A)*b[0]-Math.sin(A)*b[1],Math.sin(A)*b[0]+Math.cos(A)*b[1]];return I}function Ho(p,S){var b=S===0?p.length()-1:S-1,A=(S+1)%p.length(),I=p.v[b],D=p.v[A],B=ga(I,D);return Math.atan2(0,1)-Math.atan2(B[1],B[0])}function kl(p,S,b,A,I,D,B){var J=Ho(S,b),$=S.v[b%S._length],ae=S.v[b===0?S._length-1:b-1],fe=S.v[(b+1)%S._length],ke=D===2?Math.sqrt(Math.pow($[0]-ae[0],2)+Math.pow($[1]-ae[1],2)):0,q=D===2?Math.sqrt(Math.pow($[0]-fe[0],2)+Math.pow($[1]-fe[1],2)):0;jo(p,S.v[b%S._length],J,B,A,q/((I+1)*2),ke/((I+1)*2))}function Dl(p,S,b,A,I,D){for(var B=0;B<A;B+=1){var J=(B+1)/(A+1),$=I===2?Math.sqrt(Math.pow(S.points[3][0]-S.points[0][0],2)+Math.pow(S.points[3][1]-S.points[0][1],2)):0,ae=S.normalAngle(J),fe=S.point(J);jo(p,fe,ae,D,b,$/((A+1)*2),$/((A+1)*2)),D=-D}return D}Oi.prototype.processPath=function(p,S,b,A){var I=p._length,D=Rn.newElement();if(D.c=p.c,p.c||(I-=1),I===0)return D;var B=-1,J=dt.shapeSegment(p,0);kl(D,p,0,S,b,A,B);for(var $=0;$<I;$+=1)B=Dl(D,J,S,b,A,-B),$===I-1&&!p.c?J=null:J=dt.shapeSegment(p,($+1)%I),kl(D,p,$+1,S,b,A,B);return D},Oi.prototype.processShapes=function(p){var S,b,A=this.shapes.length,I,D,B=this.amplitude.v,J=Math.max(0,Math.round(this.frequency.v)),$=this.pointsType.v;if(B!==0){var ae,fe;for(b=0;b<A;b+=1){if(ae=this.shapes[b],fe=ae.localShapeCollection,!(!ae.shape._mdf&&!this._mdf&&!p))for(fe.releaseShapes(),ae.shape._mdf=!0,S=ae.shape.paths.shapes,D=ae.shape.paths._length,I=0;I<D;I+=1)fe.addShape(this.processPath(S[I],B,J,$));ae.shape.paths=ae.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function Il(p,S,b){var A=Math.atan2(S[0]-p[0],S[1]-p[1]);return[ei(p,A,b),ei(S,A,b)]}function Ba(p,S){var b,A,I,D,B,J,$;$=Il(p.points[0],p.points[1],S),b=$[0],A=$[1],$=Il(p.points[1],p.points[2],S),I=$[0],D=$[1],$=Il(p.points[2],p.points[3],S),B=$[0],J=$[1];var ae=ir(b,A,I,D);ae===null&&(ae=A);var fe=ir(B,J,I,D);return fe===null&&(fe=B),new dt(b,ae,fe,J)}function j(p,S,b,A,I){var D=S.points[3],B=b.points[0];if(A===3||Er(D,B))return D;if(A===2){var J=-S.tangentAngle(1),$=-b.tangentAngle(0)+Math.PI,ae=ir(D,ei(D,J+Math.PI/2,100),B,ei(B,J+Math.PI/2,100)),fe=ae?bu(ae,D):bu(D,B)/2,ke=ei(D,J,2*fe*Re);return p.setXYAt(ke[0],ke[1],"o",p.length()-1),ke=ei(B,$,2*fe*Re),p.setTripleAt(B[0],B[1],B[0],B[1],ke[0],ke[1],p.length()),B}var q=Er(D,S.points[2])?S.points[0]:S.points[2],he=Er(B,b.points[1])?b.points[3]:b.points[1],ve=ir(q,D,B,he);return ve&&bu(ve,D)<I?(p.setTripleAt(ve[0],ve[1],ve[0],ve[1],ve[0],ve[1],p.length()),ve):D}function be(p,S){var b=p.intersections(S);return b.length&&ks(b[0][0],1)&&b.shift(),b.length?b[0]:null}function We(p,S){var b=p.slice(),A=S.slice(),I=be(p[p.length-1],S[0]);return I&&(b[p.length-1]=p[p.length-1].split(I[0])[0],A[0]=S[0].split(I[1])[1]),p.length>1&&S.length>1&&(I=be(p[0],S[S.length-1]),I)?[[p[0].split(I[0])[0]],[S[S.length-1].split(I[1])[1]]]:[b,A]}function tt(p){for(var S,b=1;b<p.length;b+=1)S=We(p[b-1],p[b]),p[b-1]=S[0],p[b]=S[1];return p.length>1&&(S=We(p[p.length-1],p[0]),p[p.length-1]=S[0],p[0]=S[1]),p}function Rt(p,S){var b=p.inflectionPoints(),A,I,D,B;if(b.length===0)return[Ba(p,S)];if(b.length===1||ks(b[1],1))return D=p.split(b[0]),A=D[0],I=D[1],[Ba(A,S),Ba(I,S)];D=p.split(b[0]),A=D[0];var J=(b[1]-b[0])/(1-b[0]);return D=D[1].split(J),B=D[0],I=D[1],[Ba(A,S),Ba(B,S),Ba(I,S)]}function Kt(){}E([pr],Kt),Kt.prototype.initModifierProperties=function(p,S){this.getValue=this.processKeys,this.amount=vt.getProp(p,S.a,0,null,this),this.miterLimit=vt.getProp(p,S.ml,0,null,this),this.lineJoin=S.lj,this._isAnimated=this.amount.effectsSequence.length!==0},Kt.prototype.processPath=function(p,S,b,A){var I=Rn.newElement();I.c=p.c;var D=p.length();p.c||(D-=1);var B,J,$,ae=[];for(B=0;B<D;B+=1)$=dt.shapeSegment(p,B),ae.push(Rt($,S));if(!p.c)for(B=D-1;B>=0;B-=1)$=dt.shapeSegmentInverted(p,B),ae.push(Rt($,S));ae=tt(ae);var fe=null,ke=null;for(B=0;B<ae.length;B+=1){var q=ae[B];for(ke&&(fe=j(I,ke,q[0],b,A)),ke=q[q.length-1],J=0;J<q.length;J+=1)$=q[J],fe&&Er($.points[0],fe)?I.setXYAt($.points[1][0],$.points[1][1],"o",I.length()-1):I.setTripleAt($.points[0][0],$.points[0][1],$.points[1][0],$.points[1][1],$.points[0][0],$.points[0][1],I.length()),I.setTripleAt($.points[3][0],$.points[3][1],$.points[3][0],$.points[3][1],$.points[2][0],$.points[2][1],I.length()),fe=$.points[3]}return ae.length&&j(I,ke,ae[0][0],b,A),I},Kt.prototype.processShapes=function(p){var S,b,A=this.shapes.length,I,D,B=this.amount.v,J=this.miterLimit.v,$=this.lineJoin;if(B!==0){var ae,fe;for(b=0;b<A;b+=1){if(ae=this.shapes[b],fe=ae.localShapeCollection,!(!ae.shape._mdf&&!this._mdf&&!p))for(fe.releaseShapes(),ae.shape._mdf=!0,S=ae.shape.paths.shapes,D=ae.shape.paths._length,I=0;I<D;I+=1)fe.addShape(this.processPath(S[I],B,$,J));ae.shape.paths=ae.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function Qt(p){for(var S=p.fStyle?p.fStyle.split(" "):[],b="normal",A="normal",I=S.length,D,B=0;B<I;B+=1)switch(D=S[B].toLowerCase(),D){case"italic":A="italic";break;case"bold":b="700";break;case"black":b="900";break;case"medium":b="500";break;case"regular":case"normal":b="400";break;case"light":case"thin":b="200";break}return{style:A,weight:p.fWeight||b}}var bt=function(){var p=5e3,S={w:0,size:0,shapes:[],data:{shapes:[]}},b=[];b=b.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var A=127988,I=917631,D=917601,B=917626,J=65039,$=8205,ae=127462,fe=127487,ke=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"];function q(ee){var me=ee.split(","),U,H=me.length,Me=[];for(U=0;U<H;U+=1)me[U]!=="sans-serif"&&me[U]!=="monospace"&&Me.push(me[U]);return Me.join(",")}function he(ee,me){var U=y("span");U.setAttribute("aria-hidden",!0),U.style.fontFamily=me;var H=y("span");H.innerText="giItT1WQy@!-/#",U.style.position="absolute",U.style.left="-10000px",U.style.top="-10000px",U.style.fontSize="300px",U.style.fontVariant="normal",U.style.fontStyle="normal",U.style.fontWeight="normal",U.style.letterSpacing="0",U.appendChild(H),document.body.appendChild(U);var Me=H.offsetWidth;return H.style.fontFamily=q(ee)+", "+me,{node:H,w:Me,parent:U}}function ve(){var ee,me=this.fonts.length,U,H,Me=me;for(ee=0;ee<me;ee+=1)this.fonts[ee].loaded?Me-=1:this.fonts[ee].fOrigin==="n"||this.fonts[ee].origin===0?this.fonts[ee].loaded=!0:(U=this.fonts[ee].monoCase.node,H=this.fonts[ee].monoCase.w,U.offsetWidth!==H?(Me-=1,this.fonts[ee].loaded=!0):(U=this.fonts[ee].sansCase.node,H=this.fonts[ee].sansCase.w,U.offsetWidth!==H&&(Me-=1,this.fonts[ee].loaded=!0)),this.fonts[ee].loaded&&(this.fonts[ee].sansCase.parent.parentNode.removeChild(this.fonts[ee].sansCase.parent),this.fonts[ee].monoCase.parent.parentNode.removeChild(this.fonts[ee].monoCase.parent)));Me!==0&&Date.now()-this.initTime<p?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)}function pe(ee,me){var U=document.body&&me?"svg":"canvas",H,Me=Qt(ee);if(U==="svg"){var Te=wt("text");Te.style.fontSize="100px",Te.setAttribute("font-family",ee.fFamily),Te.setAttribute("font-style",Me.style),Te.setAttribute("font-weight",Me.weight),Te.textContent="1",ee.fClass?(Te.style.fontFamily="inherit",Te.setAttribute("class",ee.fClass)):Te.style.fontFamily=ee.fFamily,me.appendChild(Te),H=Te}else{var _t=new OffscreenCanvas(500,500).getContext("2d");_t.font=Me.style+" "+Me.weight+" 100px "+ee.fFamily,H=_t}function Gt(Zt){return U==="svg"?(H.textContent=Zt,H.getComputedTextLength()):H.measureText(Zt).width}return{measureText:Gt}}function Ae(ee,me){if(!ee){this.isLoaded=!0;return}if(this.chars){this.isLoaded=!0,this.fonts=ee.list;return}if(!document.body){this.isLoaded=!0,ee.list.forEach(function(zr){zr.helper=pe(zr),zr.cache={}}),this.fonts=ee.list;return}var U=ee.list,H,Me=U.length,Te=Me;for(H=0;H<Me;H+=1){var _t=!0,Gt,Zt;if(U[H].loaded=!1,U[H].monoCase=he(U[H].fFamily,"monospace"),U[H].sansCase=he(U[H].fFamily,"sans-serif"),!U[H].fPath)U[H].loaded=!0,Te-=1;else if(U[H].fOrigin==="p"||U[H].origin===3){if(Gt=document.querySelectorAll('style[f-forigin="p"][f-family="'+U[H].fFamily+'"], style[f-origin="3"][f-family="'+U[H].fFamily+'"]'),Gt.length>0&&(_t=!1),_t){var An=y("style");An.setAttribute("f-forigin",U[H].fOrigin),An.setAttribute("f-origin",U[H].origin),An.setAttribute("f-family",U[H].fFamily),An.type="text/css",An.innerText="@font-face {font-family: "+U[H].fFamily+"; font-style: normal; src: url('"+U[H].fPath+"');}",me.appendChild(An)}}else if(U[H].fOrigin==="g"||U[H].origin===1){for(Gt=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),Zt=0;Zt<Gt.length;Zt+=1)Gt[Zt].href.indexOf(U[H].fPath)!==-1&&(_t=!1);if(_t){var In=y("link");In.setAttribute("f-forigin",U[H].fOrigin),In.setAttribute("f-origin",U[H].origin),In.type="text/css",In.rel="stylesheet",In.href=U[H].fPath,document.body.appendChild(In)}}else if(U[H].fOrigin==="t"||U[H].origin===2){for(Gt=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),Zt=0;Zt<Gt.length;Zt+=1)U[H].fPath===Gt[Zt].src&&(_t=!1);if(_t){var mr=y("link");mr.setAttribute("f-forigin",U[H].fOrigin),mr.setAttribute("f-origin",U[H].origin),mr.setAttribute("rel","stylesheet"),mr.setAttribute("href",U[H].fPath),me.appendChild(mr)}}U[H].helper=pe(U[H],me),U[H].cache={},this.fonts.push(U[H])}Te===0?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}function le(ee){if(ee){this.chars||(this.chars=[]);var me,U=ee.length,H,Me=this.chars.length,Te;for(me=0;me<U;me+=1){for(H=0,Te=!1;H<Me;)this.chars[H].style===ee[me].style&&this.chars[H].fFamily===ee[me].fFamily&&this.chars[H].ch===ee[me].ch&&(Te=!0),H+=1;Te||(this.chars.push(ee[me]),Me+=1)}}}function te(ee,me,U){for(var H=0,Me=this.chars.length;H<Me;){if(this.chars[H].ch===ee&&this.chars[H].style===me&&this.chars[H].fFamily===U)return this.chars[H];H+=1}return(typeof ee=="string"&&ee.charCodeAt(0)!==13||!ee)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",ee,me,U)),S}function G(ee,me,U){var H=this.getFontByName(me),Me=ee;if(!H.cache[Me]){var Te=H.helper;if(ee===" "){var _t=Te.measureText("|"+ee+"|"),Gt=Te.measureText("||");H.cache[Me]=(_t-Gt)/100}else H.cache[Me]=Te.measureText(ee)/100}return H.cache[Me]*U}function Q(ee){for(var me=0,U=this.fonts.length;me<U;){if(this.fonts[me].fName===ee)return this.fonts[me];me+=1}return this.fonts[0]}function oe(ee){var me=0,U=ee.charCodeAt(0);if(U>=55296&&U<=56319){var H=ee.charCodeAt(1);H>=56320&&H<=57343&&(me=(U-55296)*1024+H-56320+65536)}return me}function xe(ee,me){var U=ee.toString(16)+me.toString(16);return ke.indexOf(U)!==-1}function Le(ee){return ee===$}function Ne(ee){return ee===J}function ut(ee){var me=oe(ee);return me>=ae&&me<=fe}function nn(ee){return ut(ee.substr(0,2))&&ut(ee.substr(2,2))}function Ht(ee){return b.indexOf(ee)!==-1}function pt(ee,me){var U=oe(ee.substr(me,2));if(U!==A)return!1;var H=0;for(me+=2;H<5;){if(U=oe(ee.substr(me,2)),U<D||U>B)return!1;H+=1,me+=2}return oe(ee.substr(me,2))===I}function sn(){this.isLoaded=!0}var At=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};At.isModifier=xe,At.isZeroWidthJoiner=Le,At.isFlagEmoji=nn,At.isRegionalCode=ut,At.isCombinedCharacter=Ht,At.isRegionalFlag=pt,At.isVariationSelector=Ne,At.BLACK_FLAG_CODE_POINT=A;var ct={addChars:le,addFonts:Ae,getCharData:te,getFontByName:Q,measureText:G,checkLoadedFonts:ve,setIsLoaded:sn};return At.prototype=ct,At}();function Dn(p){this.animationData=p}Dn.prototype.getProp=function(p){return this.animationData.slots&&this.animationData.slots[p.sid]?Object.assign(p,this.animationData.slots[p.sid].p):p};function sr(p){return new Dn(p)}function Zn(){}Zn.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(S){this.renderableComponents.indexOf(S)===-1&&this.renderableComponents.push(S)},removeRenderableComponent:function(S){this.renderableComponents.indexOf(S)!==-1&&this.renderableComponents.splice(this.renderableComponents.indexOf(S),1)},prepareRenderableFrame:function(S){this.checkLayerLimits(S)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(S){this.data.ip-this.data.st<=S&&this.data.op-this.data.st>S?this.isInRange!==!0&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):this.isInRange!==!1&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var S,b=this.renderableComponents.length;for(S=0;S<b;S+=1)this.renderableComponents[S].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return this.data.ty===5?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}};var Xn=function(){var p={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"};return function(S){return p[S]||""}}();function wi(p,S,b){this.p=vt.getProp(S,p.v,0,0,b)}function ti(p,S,b){this.p=vt.getProp(S,p.v,0,0,b)}function ni(p,S,b){this.p=vt.getProp(S,p.v,1,0,b)}function va(p,S,b){this.p=vt.getProp(S,p.v,1,0,b)}function $a(p,S,b){this.p=vt.getProp(S,p.v,0,0,b)}function Is(p,S,b){this.p=vt.getProp(S,p.v,0,0,b)}function hf(p,S,b){this.p=vt.getProp(S,p.v,0,0,b)}function Tu(){this.p={}}function Ec(p,S){var b=p.ef||[];this.effectElements=[];var A,I=b.length,D;for(A=0;A<I;A+=1)D=new ya(b[A],S),this.effectElements.push(D)}function ya(p,S){this.init(p,S)}E([Nn],ya),ya.prototype.getValue=ya.prototype.iterateDynamicProperties,ya.prototype.init=function(p,S){this.data=p,this.effectElements=[],this.initDynamicPropertyContainer(S);var b,A=this.data.ef.length,I,D=this.data.ef;for(b=0;b<A;b+=1){switch(I=null,D[b].ty){case 0:I=new wi(D[b],S,this);break;case 1:I=new ti(D[b],S,this);break;case 2:I=new ni(D[b],S,this);break;case 3:I=new va(D[b],S,this);break;case 4:case 7:I=new hf(D[b],S,this);break;case 10:I=new $a(D[b],S,this);break;case 11:I=new Is(D[b],S,this);break;case 5:I=new Ec(D[b],S);break;default:I=new Tu(D[b]);break}I&&this.effectElements.push(I)}};function Ps(){}Ps.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var S=0,b=this.data.masksProperties.length;S<b;){if(this.data.masksProperties[S].mode!=="n"&&this.data.masksProperties[S].cl!==!1)return!0;S+=1}return!1},initExpressions:function(){},setBlendMode:function(){var S=Xn(this.data.bm),b=this.baseElement||this.layerElement;b.style["mix-blend-mode"]=S},initBaseData:function(S,b,A){this.globalData=b,this.comp=A,this.data=S,this.layerId=_e(),this.data.sr||(this.data.sr=1),this.effectsManager=new Ec(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}};function Ms(){}Ms.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(S,b){var A,I=this.dynamicProperties.length;for(A=0;A<I;A+=1)(b||this._isParent&&this.dynamicProperties[A].propType==="transform")&&(this.dynamicProperties[A].getValue(),this.dynamicProperties[A]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(S){this.dynamicProperties.indexOf(S)===-1&&this.dynamicProperties.push(S)}};function Va(p,S,b){this.initFrame(),this.initRenderable(),this.assetData=S.getAssetData(p.refId),this.footageData=S.imageLoader.getAsset(this.assetData),this.initBaseData(p,S,b)}Va.prototype.prepareFrame=function(){},E([Zn,Ps,Ms],Va),Va.prototype.getBaseElement=function(){return null},Va.prototype.renderFrame=function(){},Va.prototype.destroy=function(){},Va.prototype.initExpressions=function(){},Va.prototype.getFootageData=function(){return this.footageData};function rs(p,S,b){this.initFrame(),this.initRenderable(),this.assetData=S.getAssetData(p.refId),this.initBaseData(p,S,b),this._isPlaying=!1,this._canPlay=!1;var A=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(A),this._currentTime=0,this.globalData.audioController.addAudio(this),this._volumeMultiplier=1,this._volume=1,this._previousVolume=null,this.tm=p.tm?vt.getProp(this,p.tm,0,S.frameRate,this):{_placeholder:!0},this.lv=vt.getProp(this,p.au&&p.au.lv?p.au.lv:{k:[100]},1,.01,this)}rs.prototype.prepareFrame=function(p){if(this.prepareRenderableFrame(p,!0),this.prepareProperties(p,!0),this.tm._placeholder)this._currentTime=p/this.data.sr;else{var S=this.tm.v;this._currentTime=S}this._volume=this.lv.v[0];var b=this._volume*this._volumeMultiplier;this._previousVolume!==b&&(this._previousVolume=b,this.audio.volume(b))},E([Zn,Ps,Ms],rs),rs.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},rs.prototype.show=function(){},rs.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},rs.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},rs.prototype.resume=function(){this._canPlay=!0},rs.prototype.setRate=function(p){this.audio.rate(p)},rs.prototype.volume=function(p){this._volumeMultiplier=p,this._previousVolume=p*this._volume,this.audio.volume(this._previousVolume)},rs.prototype.getBaseElement=function(){return null},rs.prototype.destroy=function(){},rs.prototype.sourceRectAtTime=function(){},rs.prototype.initExpressions=function(){};function Lr(){}Lr.prototype.checkLayers=function(p){var S,b=this.layers.length,A;for(this.completeLayers=!0,S=b-1;S>=0;S-=1)this.elements[S]||(A=this.layers[S],A.ip-A.st<=p-this.layers[S].st&&A.op-A.st>p-this.layers[S].st&&this.buildItem(S)),this.completeLayers=this.elements[S]?this.completeLayers:!1;this.checkPendingElements()},Lr.prototype.createItem=function(p){switch(p.ty){case 2:return this.createImage(p);case 0:return this.createComp(p);case 1:return this.createSolid(p);case 3:return this.createNull(p);case 4:return this.createShape(p);case 5:return this.createText(p);case 6:return this.createAudio(p);case 13:return this.createCamera(p);case 15:return this.createFootage(p);default:return this.createNull(p)}},Lr.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},Lr.prototype.createAudio=function(p){return new rs(p,this.globalData,this)},Lr.prototype.createFootage=function(p){return new Va(p,this.globalData,this)},Lr.prototype.buildAllItems=function(){var p,S=this.layers.length;for(p=0;p<S;p+=1)this.buildItem(p);this.checkPendingElements()},Lr.prototype.includeLayers=function(p){this.completeLayers=!1;var S,b=p.length,A,I=this.layers.length;for(S=0;S<b;S+=1)for(A=0;A<I;){if(this.layers[A].id===p[S].id){this.layers[A]=p[S];break}A+=1}},Lr.prototype.setProjectInterface=function(p){this.globalData.projectInterface=p},Lr.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},Lr.prototype.buildElementParenting=function(p,S,b){for(var A=this.elements,I=this.layers,D=0,B=I.length;D<B;)I[D].ind==S&&(!A[D]||A[D]===!0?(this.buildItem(D),this.addPendingElement(p)):(b.push(A[D]),A[D].setAsParent(),I[D].parent!==void 0?this.buildElementParenting(p,I[D].parent,b):p.setHierarchy(b))),D+=1},Lr.prototype.addPendingElement=function(p){this.pendingElements.push(p)},Lr.prototype.searchExtraCompositions=function(p){var S,b=p.length;for(S=0;S<b;S+=1)if(p[S].xt){var A=this.createComp(p[S]);A.initExpressions(),this.globalData.projectInterface.registerComposition(A)}},Lr.prototype.getElementById=function(p){var S,b=this.elements.length;for(S=0;S<b;S+=1)if(this.elements[S].data.ind===p)return this.elements[S];return null},Lr.prototype.getElementByPath=function(p){var S=p.shift(),b;if(typeof S=="number")b=this.elements[S];else{var A,I=this.elements.length;for(A=0;A<I;A+=1)if(this.elements[A].data.nm===S){b=this.elements[A];break}}return p.length===0?b:b.getElementByPath(p)},Lr.prototype.setupGlobalData=function(p,S){this.globalData.fontManager=new bt,this.globalData.slotManager=sr(p),this.globalData.fontManager.addChars(p.chars),this.globalData.fontManager.addFonts(p.fonts,S),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=p.fr,this.globalData.nm=p.nm,this.globalData.compSize={w:p.w,h:p.h}};var wu={TRANSFORM_EFFECT:"transformEFfect"};function is(){}is.prototype={initTransform:function(){var S=new yt;this.finalTransform={mProp:this.data.ks?$o.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_localMatMdf:!1,_opMdf:!1,mat:S,localMat:S,localOpacity:1},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var S,b=this.finalTransform.mat,A=0,I=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;A<I;){if(this.hierarchy[A].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}A+=1}if(this.finalTransform._matMdf)for(S=this.finalTransform.mProp.v.props,b.cloneFromProps(S),A=0;A<I;A+=1)b.multiply(this.hierarchy[A].finalTransform.mProp.v)}this.finalTransform._matMdf&&(this.finalTransform._localMatMdf=this.finalTransform._matMdf),this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v)},renderLocalTransform:function(){if(this.localTransforms){var S=0,b=this.localTransforms.length;if(this.finalTransform._localMatMdf=this.finalTransform._matMdf,!this.finalTransform._localMatMdf||!this.finalTransform._opMdf)for(;S<b;)this.localTransforms[S]._mdf&&(this.finalTransform._localMatMdf=!0),this.localTransforms[S]._opMdf&&!this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v,this.finalTransform._opMdf=!0),S+=1;if(this.finalTransform._localMatMdf){var A=this.finalTransform.localMat;for(this.localTransforms[0].matrix.clone(A),S=1;S<b;S+=1){var I=this.localTransforms[S].matrix;A.multiply(I)}A.multiply(this.finalTransform.mat)}if(this.finalTransform._opMdf){var D=this.finalTransform.localOpacity;for(S=0;S<b;S+=1)D*=this.localTransforms[S].opacity*.01;this.finalTransform.localOpacity=D}}},searchEffectTransforms:function(){if(this.renderableEffectsManager){var S=this.renderableEffectsManager.getEffects(wu.TRANSFORM_EFFECT);if(S.length){this.localTransforms=[],this.finalTransform.localMat=new yt;var b=0,A=S.length;for(b=0;b<A;b+=1)this.localTransforms.push(S[b])}}},globalToLocal:function(S){var b=[];b.push(this.finalTransform);for(var A=!0,I=this.comp;A;)I.finalTransform?(I.data.hasMask&&b.splice(0,0,I.finalTransform),I=I.comp):A=!1;var D,B=b.length,J;for(D=0;D<B;D+=1)J=b[D].mat.applyToPointArray(0,0,0),S=[S[0]-J[0],S[1]-J[1],0];return S},mHelper:new yt};function za(p,S,b){this.data=p,this.element=S,this.globalData=b,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var A=this.globalData.defs,I,D=this.masksProperties?this.masksProperties.length:0;this.viewData=L(D),this.solidPath="";var B,J=this.masksProperties,$=0,ae=[],fe,ke,q=_e(),he,ve,pe,Ae,le="clipPath",te="clip-path";for(I=0;I<D;I+=1)if((J[I].mode!=="a"&&J[I].mode!=="n"||J[I].inv||J[I].o.k!==100||J[I].o.x)&&(le="mask",te="mask"),(J[I].mode==="s"||J[I].mode==="i")&&$===0?(he=wt("rect"),he.setAttribute("fill","#ffffff"),he.setAttribute("width",this.element.comp.data.w||0),he.setAttribute("height",this.element.comp.data.h||0),ae.push(he)):he=null,B=wt("path"),J[I].mode==="n")this.viewData[I]={op:vt.getProp(this.element,J[I].o,0,.01,this.element),prop:lt.getShapeProp(this.element,J[I],3),elem:B,lastPath:""},A.appendChild(B);else{$+=1,B.setAttribute("fill",J[I].mode==="s"?"#000000":"#ffffff"),B.setAttribute("clip-rule","nonzero");var G;if(J[I].x.k!==0?(le="mask",te="mask",Ae=vt.getProp(this.element,J[I].x,0,null,this.element),G=_e(),ve=wt("filter"),ve.setAttribute("id",G),pe=wt("feMorphology"),pe.setAttribute("operator","erode"),pe.setAttribute("in","SourceGraphic"),pe.setAttribute("radius","0"),ve.appendChild(pe),A.appendChild(ve),B.setAttribute("stroke",J[I].mode==="s"?"#000000":"#ffffff")):(pe=null,Ae=null),this.storedData[I]={elem:B,x:Ae,expan:pe,lastPath:"",lastOperator:"",filterId:G,lastRadius:0},J[I].mode==="i"){ke=ae.length;var Q=wt("g");for(fe=0;fe<ke;fe+=1)Q.appendChild(ae[fe]);var oe=wt("mask");oe.setAttribute("mask-type","alpha"),oe.setAttribute("id",q+"_"+$),oe.appendChild(B),A.appendChild(oe),Q.setAttribute("mask","url("+m()+"#"+q+"_"+$+")"),ae.length=0,ae.push(Q)}else ae.push(B);J[I].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[I]={elem:B,lastPath:"",op:vt.getProp(this.element,J[I].o,0,.01,this.element),prop:lt.getShapeProp(this.element,J[I],3),invRect:he},this.viewData[I].prop.k||this.drawPath(J[I],this.viewData[I].prop.v,this.viewData[I])}for(this.maskElement=wt(le),D=ae.length,I=0;I<D;I+=1)this.maskElement.appendChild(ae[I]);$>0&&(this.maskElement.setAttribute("id",q),this.element.maskedElement.setAttribute(te,"url("+m()+"#"+q+")"),A.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}za.prototype.getMaskProperty=function(p){return this.viewData[p].prop},za.prototype.renderFrame=function(p){var S=this.element.finalTransform.mat,b,A=this.masksProperties.length;for(b=0;b<A;b+=1)if((this.viewData[b].prop._mdf||p)&&this.drawPath(this.masksProperties[b],this.viewData[b].prop.v,this.viewData[b]),(this.viewData[b].op._mdf||p)&&this.viewData[b].elem.setAttribute("fill-opacity",this.viewData[b].op.v),this.masksProperties[b].mode!=="n"&&(this.viewData[b].invRect&&(this.element.finalTransform.mProp._mdf||p)&&this.viewData[b].invRect.setAttribute("transform",S.getInverseMatrix().to2dCSS()),this.storedData[b].x&&(this.storedData[b].x._mdf||p))){var I=this.storedData[b].expan;this.storedData[b].x.v<0?(this.storedData[b].lastOperator!=="erode"&&(this.storedData[b].lastOperator="erode",this.storedData[b].elem.setAttribute("filter","url("+m()+"#"+this.storedData[b].filterId+")")),I.setAttribute("radius",-this.storedData[b].x.v)):(this.storedData[b].lastOperator!=="dilate"&&(this.storedData[b].lastOperator="dilate",this.storedData[b].elem.setAttribute("filter",null)),this.storedData[b].elem.setAttribute("stroke-width",this.storedData[b].x.v*2))}},za.prototype.getMaskelement=function(){return this.maskElement},za.prototype.createLayerSolidPath=function(){var p="M0,0 ";return p+=" h"+this.globalData.compSize.w,p+=" v"+this.globalData.compSize.h,p+=" h-"+this.globalData.compSize.w,p+=" v-"+this.globalData.compSize.h+" ",p},za.prototype.drawPath=function(p,S,b){var A=" M"+S.v[0][0]+","+S.v[0][1],I,D;for(D=S._length,I=1;I<D;I+=1)A+=" C"+S.o[I-1][0]+","+S.o[I-1][1]+" "+S.i[I][0]+","+S.i[I][1]+" "+S.v[I][0]+","+S.v[I][1];if(S.c&&D>1&&(A+=" C"+S.o[I-1][0]+","+S.o[I-1][1]+" "+S.i[0][0]+","+S.i[0][1]+" "+S.v[0][0]+","+S.v[0][1]),b.lastPath!==A){var B="";b.elem&&(S.c&&(B=p.inv?this.solidPath+A:A),b.elem.setAttribute("d",B)),b.lastPath=A}},za.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var fo=function(){var p={};p.createFilter=S,p.createAlphaToLuminanceFilter=b;function S(A,I){var D=wt("filter");return D.setAttribute("id",A),I!==!0&&(D.setAttribute("filterUnits","objectBoundingBox"),D.setAttribute("x","0%"),D.setAttribute("y","0%"),D.setAttribute("width","100%"),D.setAttribute("height","100%")),D}function b(){var A=wt("feColorMatrix");return A.setAttribute("type","matrix"),A.setAttribute("color-interpolation-filters","sRGB"),A.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),A}return p}(),pf=function(){var p={maskType:!0,svgLumaHidden:!0,offscreenCanvas:typeof OffscreenCanvas<"u"};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(p.maskType=!1),/firefox/i.test(navigator.userAgent)&&(p.svgLumaHidden=!1),p}(),Go={},Wo="filter_result_";function Cu(p){var S,b="SourceGraphic",A=p.data.ef?p.data.ef.length:0,I=_e(),D=fo.createFilter(I,!0),B=0;this.filters=[];var J;for(S=0;S<A;S+=1){J=null;var $=p.data.ef[S].ty;if(Go[$]){var ae=Go[$].effect;J=new ae(D,p.effectsManager.effectElements[S],p,Wo+B,b),b=Wo+B,Go[$].countsAsEffect&&(B+=1)}J&&this.filters.push(J)}B&&(p.globalData.defs.appendChild(D),p.layerElement.setAttribute("filter","url("+m()+"#"+I+")")),this.filters.length&&p.addRenderableComponent(this)}Cu.prototype.renderFrame=function(p){var S,b=this.filters.length;for(S=0;S<b;S+=1)this.filters[S].renderFrame(p)},Cu.prototype.getEffects=function(p){var S,b=this.filters.length,A=[];for(S=0;S<b;S+=1)this.filters[S].type===p&&A.push(this.filters[S]);return A};function di(){}di.prototype={initRendererElement:function(){this.layerElement=wt("g")},createContainerElements:function(){this.matteElement=wt("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var S=null;if(this.data.td){this.matteMasks={};var b=wt("g");b.setAttribute("id",this.layerId),b.appendChild(this.layerElement),S=b,this.globalData.defs.appendChild(b)}else this.data.tt?(this.matteElement.appendChild(this.layerElement),S=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),this.data.ty===0&&!this.data.hd){var A=wt("clipPath"),I=wt("path");I.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var D=_e();if(A.setAttribute("id",D),A.appendChild(I),this.globalData.defs.appendChild(A),this.checkMasks()){var B=wt("g");B.setAttribute("clip-path","url("+m()+"#"+D+")"),B.appendChild(this.layerElement),this.transformedElement=B,S?S.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+m()+"#"+D+")")}this.data.bm!==0&&this.setBlendMode()},renderElement:function(){this.finalTransform._localMatMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.localMat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.localOpacity)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new za(this.data,this,this.globalData),this.renderableEffectsManager=new Cu(this),this.searchEffectTransforms()},getMatte:function(S){if(this.matteMasks||(this.matteMasks={}),!this.matteMasks[S]){var b=this.layerId+"_"+S,A,I,D,B;if(S===1||S===3){var J=wt("mask");J.setAttribute("id",b),J.setAttribute("mask-type",S===3?"luminance":"alpha"),D=wt("use"),D.setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),J.appendChild(D),this.globalData.defs.appendChild(J),!pf.maskType&&S===1&&(J.setAttribute("mask-type","luminance"),A=_e(),I=fo.createFilter(A),this.globalData.defs.appendChild(I),I.appendChild(fo.createAlphaToLuminanceFilter()),B=wt("g"),B.appendChild(D),J.appendChild(B),B.setAttribute("filter","url("+m()+"#"+A+")"))}else if(S===2){var $=wt("mask");$.setAttribute("id",b),$.setAttribute("mask-type","alpha");var ae=wt("g");$.appendChild(ae),A=_e(),I=fo.createFilter(A);var fe=wt("feComponentTransfer");fe.setAttribute("in","SourceGraphic"),I.appendChild(fe);var ke=wt("feFuncA");ke.setAttribute("type","table"),ke.setAttribute("tableValues","1.0 0.0"),fe.appendChild(ke),this.globalData.defs.appendChild(I);var q=wt("rect");q.setAttribute("width",this.comp.data.w),q.setAttribute("height",this.comp.data.h),q.setAttribute("x","0"),q.setAttribute("y","0"),q.setAttribute("fill","#ffffff"),q.setAttribute("opacity","0"),ae.setAttribute("filter","url("+m()+"#"+A+")"),ae.appendChild(q),D=wt("use"),D.setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),ae.appendChild(D),pf.maskType||($.setAttribute("mask-type","luminance"),I.appendChild(fo.createAlphaToLuminanceFilter()),B=wt("g"),ae.appendChild(q),B.appendChild(this.layerElement),ae.appendChild(B)),this.globalData.defs.appendChild($)}this.matteMasks[S]=b}return this.matteMasks[S]},setMatte:function(S){this.matteElement&&this.matteElement.setAttribute("mask","url("+m()+"#"+S+")")}};function Os(){}Os.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(S){this.hierarchy=S},setAsParent:function(){this._isParent=!0},checkParenting:function(){this.data.parent!==void 0&&this.comp.buildElementParenting(this,this.data.parent,[])}};function Ko(){}(function(){var p={initElement:function(b,A,I){this.initFrame(),this.initBaseData(b,A,I),this.initTransform(b,A,I),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){if(!this.hidden&&(!this.isInRange||this.isTransparent)){var b=this.baseElement||this.layerElement;b.style.display="none",this.hidden=!0}},show:function(){if(this.isInRange&&!this.isTransparent){if(!this.data.hd){var b=this.baseElement||this.layerElement;b.style.display="block"}this.hidden=!1,this._isFirstFrame=!0}},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(b){this._mdf=!1,this.prepareRenderableFrame(b),this.prepareProperties(b,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}};E([Zn,T(p)],Ko)})();function Fs(p,S,b){this.assetData=S.getAssetData(p.refId),this.assetData&&this.assetData.sid&&(this.assetData=S.slotManager.getProp(this.assetData)),this.initElement(p,S,b),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}E([Ps,is,di,Os,Ms,Ko],Fs),Fs.prototype.createContent=function(){var p=this.globalData.getAssetsPath(this.assetData);this.innerElem=wt("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",p),this.layerElement.appendChild(this.innerElem)},Fs.prototype.sourceRectAtTime=function(){return this.sourceRect};function Hd(p,S){this.elem=p,this.pos=S}function Pl(){}Pl.prototype={addShapeToModifiers:function(S){var b,A=this.shapeModifiers.length;for(b=0;b<A;b+=1)this.shapeModifiers[b].addShape(S)},isShapeInAnimatedModifiers:function(S){for(var b=0,A=this.shapeModifiers.length;b<A;)if(this.shapeModifiers[b].isAnimatedWithShape(S))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var S,b=this.shapes.length;for(S=0;S<b;S+=1)this.shapes[S].sh.reset();b=this.shapeModifiers.length;var A;for(S=b-1;S>=0&&(A=this.shapeModifiers[S].processShapes(this._isFirstFrame),!A);S-=1);}},searchProcessedElement:function(S){for(var b=this.processedElements,A=0,I=b.length;A<I;){if(b[A].elem===S)return b[A].pos;A+=1}return 0},addProcessedElement:function(S,b){for(var A=this.processedElements,I=A.length;I;)if(I-=1,A[I].elem===S){A[I].pos=b;return}A.push(new Hd(S,b))},prepareFrame:function(S){this.prepareRenderableFrame(S),this.prepareProperties(S,this.isInRange)}};var Ru={1:"butt",2:"round",3:"square"},ho={1:"miter",2:"round",3:"bevel"};function qo(p,S,b){this.caches=[],this.styles=[],this.transformers=p,this.lStr="",this.sh=b,this.lvl=S,this._isAnimated=!!b.k;for(var A=0,I=p.length;A<I;){if(p[A].mProps.dynamicProperties.length){this._isAnimated=!0;break}A+=1}}qo.prototype.setAsAnimated=function(){this._isAnimated=!0};function mf(p,S){this.data=p,this.type=p.ty,this.d="",this.lvl=S,this._mdf=!1,this.closed=p.hd===!0,this.pElem=wt("path"),this.msElem=null}mf.prototype.reset=function(){this.d="",this._mdf=!1};function Yo(p,S,b,A){this.elem=p,this.frameId=-1,this.dataProps=L(S.length),this.renderer=b,this.k=!1,this.dashStr="",this.dashArray=_("float32",S.length?S.length-1:0),this.dashoffset=_("float32",1),this.initDynamicPropertyContainer(A);var I,D=S.length||0,B;for(I=0;I<D;I+=1)B=vt.getProp(p,S[I].v,0,0,this),this.k=B.k||this.k,this.dataProps[I]={n:S[I].n,p:B};this.k||this.getValue(!0),this._isAnimated=this.k}Yo.prototype.getValue=function(p){if(!(this.elem.globalData.frameId===this.frameId&&!p)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||p,this._mdf)){var S=0,b=this.dataProps.length;for(this.renderer==="svg"&&(this.dashStr=""),S=0;S<b;S+=1)this.dataProps[S].n!=="o"?this.renderer==="svg"?this.dashStr+=" "+this.dataProps[S].p.v:this.dashArray[S]=this.dataProps[S].p.v:this.dashoffset[0]=this.dataProps[S].p.v}},E([Nn],Yo);function gf(p,S,b){this.initDynamicPropertyContainer(p),this.getValue=this.iterateDynamicProperties,this.o=vt.getProp(p,S.o,0,.01,this),this.w=vt.getProp(p,S.w,0,null,this),this.d=new Yo(p,S.d||{},"svg",this),this.c=vt.getProp(p,S.c,1,255,this),this.style=b,this._isAnimated=!!this._isAnimated}E([Nn],gf);function gs(p,S,b){this.initDynamicPropertyContainer(p),this.getValue=this.iterateDynamicProperties,this.o=vt.getProp(p,S.o,0,.01,this),this.c=vt.getProp(p,S.c,1,255,this),this.style=b}E([Nn],gs);function Ns(p,S,b){this.initDynamicPropertyContainer(p),this.getValue=this.iterateDynamicProperties,this.style=b}E([Nn],Ns);function Ci(p,S,b){this.data=S,this.c=_("uint8c",S.p*4);var A=S.k.k[0].s?S.k.k[0].s.length-S.p*4:S.k.k.length-S.p*4;this.o=_("float32",A),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=A,this.initDynamicPropertyContainer(b),this.prop=vt.getProp(p,S.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}Ci.prototype.comparePoints=function(p,S){for(var b=0,A=this.o.length/2,I;b<A;){if(I=Math.abs(p[b*4]-p[S*4+b*2]),I>.01)return!1;b+=1}return!0},Ci.prototype.checkCollapsable=function(){if(this.o.length/2!==this.c.length/4)return!1;if(this.data.k.k[0].s)for(var p=0,S=this.data.k.k.length;p<S;){if(!this.comparePoints(this.data.k.k[p].s,this.data.p))return!1;p+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},Ci.prototype.getValue=function(p){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||p){var S,b=this.data.p*4,A,I;for(S=0;S<b;S+=1)A=S%4===0?100:255,I=Math.round(this.prop.v[S]*A),this.c[S]!==I&&(this.c[S]=I,this._cmdf=!p);if(this.o.length)for(b=this.prop.v.length,S=this.data.p*4;S<b;S+=1)A=S%2===0?100:1,I=S%2===0?Math.round(this.prop.v[S]*100):this.prop.v[S],this.o[S-this.data.p*4]!==I&&(this.o[S-this.data.p*4]=I,this._omdf=!p);this._mdf=!p}},E([Nn],Ci);function vs(p,S,b){this.initDynamicPropertyContainer(p),this.getValue=this.iterateDynamicProperties,this.initGradientData(p,S,b)}vs.prototype.initGradientData=function(p,S,b){this.o=vt.getProp(p,S.o,0,.01,this),this.s=vt.getProp(p,S.s,1,null,this),this.e=vt.getProp(p,S.e,1,null,this),this.h=vt.getProp(p,S.h||{k:0},0,.01,this),this.a=vt.getProp(p,S.a||{k:0},0,de,this),this.g=new Ci(p,S.g,this),this.style=b,this.stops=[],this.setGradientData(b.pElem,S),this.setGradientOpacity(S,b),this._isAnimated=!!this._isAnimated},vs.prototype.setGradientData=function(p,S){var b=_e(),A=wt(S.t===1?"linearGradient":"radialGradient");A.setAttribute("id",b),A.setAttribute("spreadMethod","pad"),A.setAttribute("gradientUnits","userSpaceOnUse");var I=[],D,B,J;for(J=S.g.p*4,B=0;B<J;B+=4)D=wt("stop"),A.appendChild(D),I.push(D);p.setAttribute(S.ty==="gf"?"fill":"stroke","url("+m()+"#"+b+")"),this.gf=A,this.cst=I},vs.prototype.setGradientOpacity=function(p,S){if(this.g._hasOpacity&&!this.g._collapsable){var b,A,I,D=wt("mask"),B=wt("path");D.appendChild(B);var J=_e(),$=_e();D.setAttribute("id",$);var ae=wt(p.t===1?"linearGradient":"radialGradient");ae.setAttribute("id",J),ae.setAttribute("spreadMethod","pad"),ae.setAttribute("gradientUnits","userSpaceOnUse"),I=p.g.k.k[0].s?p.g.k.k[0].s.length:p.g.k.k.length;var fe=this.stops;for(A=p.g.p*4;A<I;A+=2)b=wt("stop"),b.setAttribute("stop-color","rgb(255,255,255)"),ae.appendChild(b),fe.push(b);B.setAttribute(p.ty==="gf"?"fill":"stroke","url("+m()+"#"+J+")"),p.ty==="gs"&&(B.setAttribute("stroke-linecap",Ru[p.lc||2]),B.setAttribute("stroke-linejoin",ho[p.lj||2]),p.lj===1&&B.setAttribute("stroke-miterlimit",p.ml)),this.of=ae,this.ms=D,this.ost=fe,this.maskId=$,S.msElem=B}},E([Nn],vs);function vf(p,S,b){this.initDynamicPropertyContainer(p),this.getValue=this.iterateDynamicProperties,this.w=vt.getProp(p,S.w,0,null,this),this.d=new Yo(p,S.d||{},"svg",this),this.initGradientData(p,S,b),this._isAnimated=!!this._isAnimated}E([vs,Nn],vf);function xc(){this.it=[],this.prevViewData=[],this.gr=wt("g")}function yp(p,S,b){this.transform={mProps:p,op:S,container:b},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}var Xo=function(S,b,A,I){if(b===0)return"";var D=S.o,B=S.i,J=S.v,$,ae=" M"+I.applyToPointStringified(J[0][0],J[0][1]);for($=1;$<b;$+=1)ae+=" C"+I.applyToPointStringified(D[$-1][0],D[$-1][1])+" "+I.applyToPointStringified(B[$][0],B[$][1])+" "+I.applyToPointStringified(J[$][0],J[$][1]);return A&&b&&(ae+=" C"+I.applyToPointStringified(D[$-1][0],D[$-1][1])+" "+I.applyToPointStringified(B[0][0],B[0][1])+" "+I.applyToPointStringified(J[0][0],J[0][1]),ae+="z"),ae},Sp=function(){var p=new yt,S=new yt,b={createRenderFunction:A};function A(ke){switch(ke.ty){case"fl":return J;case"gf":return ae;case"gs":return $;case"st":return fe;case"sh":case"el":case"rc":case"sr":return B;case"tr":return I;case"no":return D;default:return null}}function I(ke,q,he){(he||q.transform.op._mdf)&&q.transform.container.setAttribute("opacity",q.transform.op.v),(he||q.transform.mProps._mdf)&&q.transform.container.setAttribute("transform",q.transform.mProps.v.to2dCSS())}function D(){}function B(ke,q,he){var ve,pe,Ae,le,te,G,Q=q.styles.length,oe=q.lvl,xe,Le,Ne,ut;for(G=0;G<Q;G+=1){if(le=q.sh._mdf||he,q.styles[G].lvl<oe){for(Le=S.reset(),Ne=oe-q.styles[G].lvl,ut=q.transformers.length-1;!le&&Ne>0;)le=q.transformers[ut].mProps._mdf||le,Ne-=1,ut-=1;if(le)for(Ne=oe-q.styles[G].lvl,ut=q.transformers.length-1;Ne>0;)Le.multiply(q.transformers[ut].mProps.v),Ne-=1,ut-=1}else Le=p;if(xe=q.sh.paths,pe=xe._length,le){for(Ae="",ve=0;ve<pe;ve+=1)te=xe.shapes[ve],te&&te._length&&(Ae+=Xo(te,te._length,te.c,Le));q.caches[G]=Ae}else Ae=q.caches[G];q.styles[G].d+=ke.hd===!0?"":Ae,q.styles[G]._mdf=le||q.styles[G]._mdf}}function J(ke,q,he){var ve=q.style;(q.c._mdf||he)&&ve.pElem.setAttribute("fill","rgb("+ue(q.c.v[0])+","+ue(q.c.v[1])+","+ue(q.c.v[2])+")"),(q.o._mdf||he)&&ve.pElem.setAttribute("fill-opacity",q.o.v)}function $(ke,q,he){ae(ke,q,he),fe(ke,q,he)}function ae(ke,q,he){var ve=q.gf,pe=q.g._hasOpacity,Ae=q.s.v,le=q.e.v;if(q.o._mdf||he){var te=ke.ty==="gf"?"fill-opacity":"stroke-opacity";q.style.pElem.setAttribute(te,q.o.v)}if(q.s._mdf||he){var G=ke.t===1?"x1":"cx",Q=G==="x1"?"y1":"cy";ve.setAttribute(G,Ae[0]),ve.setAttribute(Q,Ae[1]),pe&&!q.g._collapsable&&(q.of.setAttribute(G,Ae[0]),q.of.setAttribute(Q,Ae[1]))}var oe,xe,Le,Ne;if(q.g._cmdf||he){oe=q.cst;var ut=q.g.c;for(Le=oe.length,xe=0;xe<Le;xe+=1)Ne=oe[xe],Ne.setAttribute("offset",ut[xe*4]+"%"),Ne.setAttribute("stop-color","rgb("+ut[xe*4+1]+","+ut[xe*4+2]+","+ut[xe*4+3]+")")}if(pe&&(q.g._omdf||he)){var nn=q.g.o;for(q.g._collapsable?oe=q.cst:oe=q.ost,Le=oe.length,xe=0;xe<Le;xe+=1)Ne=oe[xe],q.g._collapsable||Ne.setAttribute("offset",nn[xe*2]+"%"),Ne.setAttribute("stop-opacity",nn[xe*2+1])}if(ke.t===1)(q.e._mdf||he)&&(ve.setAttribute("x2",le[0]),ve.setAttribute("y2",le[1]),pe&&!q.g._collapsable&&(q.of.setAttribute("x2",le[0]),q.of.setAttribute("y2",le[1])));else{var Ht;if((q.s._mdf||q.e._mdf||he)&&(Ht=Math.sqrt(Math.pow(Ae[0]-le[0],2)+Math.pow(Ae[1]-le[1],2)),ve.setAttribute("r",Ht),pe&&!q.g._collapsable&&q.of.setAttribute("r",Ht)),q.e._mdf||q.h._mdf||q.a._mdf||he){Ht||(Ht=Math.sqrt(Math.pow(Ae[0]-le[0],2)+Math.pow(Ae[1]-le[1],2)));var pt=Math.atan2(le[1]-Ae[1],le[0]-Ae[0]),sn=q.h.v;sn>=1?sn=.99:sn<=-1&&(sn=-.99);var At=Ht*sn,ct=Math.cos(pt+q.a.v)*At+Ae[0],ee=Math.sin(pt+q.a.v)*At+Ae[1];ve.setAttribute("fx",ct),ve.setAttribute("fy",ee),pe&&!q.g._collapsable&&(q.of.setAttribute("fx",ct),q.of.setAttribute("fy",ee))}}}function fe(ke,q,he){var ve=q.style,pe=q.d;pe&&(pe._mdf||he)&&pe.dashStr&&(ve.pElem.setAttribute("stroke-dasharray",pe.dashStr),ve.pElem.setAttribute("stroke-dashoffset",pe.dashoffset[0])),q.c&&(q.c._mdf||he)&&ve.pElem.setAttribute("stroke","rgb("+ue(q.c.v[0])+","+ue(q.c.v[1])+","+ue(q.c.v[2])+")"),(q.o._mdf||he)&&ve.pElem.setAttribute("stroke-opacity",q.o.v),(q.w._mdf||he)&&(ve.pElem.setAttribute("stroke-width",q.w.v),ve.msElem&&ve.msElem.setAttribute("stroke-width",q.w.v))}return b}();function $r(p,S,b){this.shapes=[],this.shapesData=p.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(p,S,b),this.prevViewData=[]}E([Ps,is,di,Pl,Os,Ms,Ko],$r),$r.prototype.initSecondaryElement=function(){},$r.prototype.identityMatrix=new yt,$r.prototype.buildExpressionInterface=function(){},$r.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},$r.prototype.filterUniqueShapes=function(){var p,S=this.shapes.length,b,A,I=this.stylesList.length,D,B=[],J=!1;for(A=0;A<I;A+=1){for(D=this.stylesList[A],J=!1,B.length=0,p=0;p<S;p+=1)b=this.shapes[p],b.styles.indexOf(D)!==-1&&(B.push(b),J=b._isAnimated||J);B.length>1&&J&&this.setShapesAsAnimated(B)}},$r.prototype.setShapesAsAnimated=function(p){var S,b=p.length;for(S=0;S<b;S+=1)p[S].setAsAnimated()},$r.prototype.createStyleElement=function(p,S){var b,A=new mf(p,S),I=A.pElem;if(p.ty==="st")b=new gf(this,p,A);else if(p.ty==="fl")b=new gs(this,p,A);else if(p.ty==="gf"||p.ty==="gs"){var D=p.ty==="gf"?vs:vf;b=new D(this,p,A),this.globalData.defs.appendChild(b.gf),b.maskId&&(this.globalData.defs.appendChild(b.ms),this.globalData.defs.appendChild(b.of),I.setAttribute("mask","url("+m()+"#"+b.maskId+")"))}else p.ty==="no"&&(b=new Ns(this,p,A));return(p.ty==="st"||p.ty==="gs")&&(I.setAttribute("stroke-linecap",Ru[p.lc||2]),I.setAttribute("stroke-linejoin",ho[p.lj||2]),I.setAttribute("fill-opacity","0"),p.lj===1&&I.setAttribute("stroke-miterlimit",p.ml)),p.r===2&&I.setAttribute("fill-rule","evenodd"),p.ln&&I.setAttribute("id",p.ln),p.cl&&I.setAttribute("class",p.cl),p.bm&&(I.style["mix-blend-mode"]=Xn(p.bm)),this.stylesList.push(A),this.addToAnimatedContents(p,b),b},$r.prototype.createGroupElement=function(p){var S=new xc;return p.ln&&S.gr.setAttribute("id",p.ln),p.cl&&S.gr.setAttribute("class",p.cl),p.bm&&(S.gr.style["mix-blend-mode"]=Xn(p.bm)),S},$r.prototype.createTransformElement=function(p,S){var b=$o.getTransformProperty(this,p,this),A=new yp(b,b.o,S);return this.addToAnimatedContents(p,A),A},$r.prototype.createShapeElement=function(p,S,b){var A=4;p.ty==="rc"?A=5:p.ty==="el"?A=6:p.ty==="sr"&&(A=7);var I=lt.getShapeProp(this,p,A,this),D=new qo(S,b,I);return this.shapes.push(D),this.addShapeToModifiers(D),this.addToAnimatedContents(p,D),D},$r.prototype.addToAnimatedContents=function(p,S){for(var b=0,A=this.animatedContents.length;b<A;){if(this.animatedContents[b].element===S)return;b+=1}this.animatedContents.push({fn:Sp.createRenderFunction(p),element:S,data:p})},$r.prototype.setElementStyles=function(p){var S=p.styles,b,A=this.stylesList.length;for(b=0;b<A;b+=1)this.stylesList[b].closed||S.push(this.stylesList[b])},$r.prototype.reloadShapes=function(){this._isFirstFrame=!0;var p,S=this.itemsData.length;for(p=0;p<S;p+=1)this.prevViewData[p]=this.itemsData[p];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),S=this.dynamicProperties.length,p=0;p<S;p+=1)this.dynamicProperties[p].getValue();this.renderModifiers()},$r.prototype.searchShapes=function(p,S,b,A,I,D,B){var J=[].concat(D),$,ae=p.length-1,fe,ke,q=[],he=[],ve,pe,Ae;for($=ae;$>=0;$-=1){if(Ae=this.searchProcessedElement(p[$]),Ae?S[$]=b[Ae-1]:p[$]._render=B,p[$].ty==="fl"||p[$].ty==="st"||p[$].ty==="gf"||p[$].ty==="gs"||p[$].ty==="no")Ae?S[$].style.closed=!1:S[$]=this.createStyleElement(p[$],I),p[$]._render&&S[$].style.pElem.parentNode!==A&&A.appendChild(S[$].style.pElem),q.push(S[$].style);else if(p[$].ty==="gr"){if(!Ae)S[$]=this.createGroupElement(p[$]);else for(ke=S[$].it.length,fe=0;fe<ke;fe+=1)S[$].prevViewData[fe]=S[$].it[fe];this.searchShapes(p[$].it,S[$].it,S[$].prevViewData,S[$].gr,I+1,J,B),p[$]._render&&S[$].gr.parentNode!==A&&A.appendChild(S[$].gr)}else p[$].ty==="tr"?(Ae||(S[$]=this.createTransformElement(p[$],A)),ve=S[$].transform,J.push(ve)):p[$].ty==="sh"||p[$].ty==="rc"||p[$].ty==="el"||p[$].ty==="sr"?(Ae||(S[$]=this.createShapeElement(p[$],J,I)),this.setElementStyles(S[$])):p[$].ty==="tm"||p[$].ty==="rd"||p[$].ty==="ms"||p[$].ty==="pb"||p[$].ty==="zz"||p[$].ty==="op"?(Ae?(pe=S[$],pe.closed=!1):(pe=Ji.getModifier(p[$].ty),pe.init(this,p[$]),S[$]=pe,this.shapeModifiers.push(pe)),he.push(pe)):p[$].ty==="rp"&&(Ae?(pe=S[$],pe.closed=!0):(pe=Ji.getModifier(p[$].ty),S[$]=pe,pe.init(this,p,$,S),this.shapeModifiers.push(pe),B=!1),he.push(pe));this.addProcessedElement(p[$],$+1)}for(ae=q.length,$=0;$<ae;$+=1)q[$].closed=!0;for(ae=he.length,$=0;$<ae;$+=1)he[$].closed=!0},$r.prototype.renderInnerContent=function(){this.renderModifiers();var p,S=this.stylesList.length;for(p=0;p<S;p+=1)this.stylesList[p].reset();for(this.renderShape(),p=0;p<S;p+=1)(this.stylesList[p]._mdf||this._isFirstFrame)&&(this.stylesList[p].msElem&&(this.stylesList[p].msElem.setAttribute("d",this.stylesList[p].d),this.stylesList[p].d="M0 0"+this.stylesList[p].d),this.stylesList[p].pElem.setAttribute("d",this.stylesList[p].d||"M0 0"))},$r.prototype.renderShape=function(){var p,S=this.animatedContents.length,b;for(p=0;p<S;p+=1)b=this.animatedContents[p],(this._isFirstFrame||b.element._isAnimated)&&b.data!==!0&&b.fn(b.data,b.element,this._isFirstFrame)},$r.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null};function Au(p,S,b,A,I,D){this.o=p,this.sw=S,this.sc=b,this.fc=A,this.m=I,this.p=D,this._mdf={o:!0,sw:!!S,sc:!!b,fc:!!A,m:!0,p:!0}}Au.prototype.update=function(p,S,b,A,I,D){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1,this._mdf.p=!1;var B=!1;return this.o!==p&&(this.o=p,this._mdf.o=!0,B=!0),this.sw!==S&&(this.sw=S,this._mdf.sw=!0,B=!0),this.sc!==b&&(this.sc=b,this._mdf.sc=!0,B=!0),this.fc!==A&&(this.fc=A,this._mdf.fc=!0,B=!0),this.m!==I&&(this.m=I,this._mdf.m=!0,B=!0),D.length&&(this.p[0]!==D[0]||this.p[1]!==D[1]||this.p[4]!==D[4]||this.p[5]!==D[5]||this.p[12]!==D[12]||this.p[13]!==D[13])&&(this.p=D,this._mdf.p=!0,B=!0),B};function zi(p,S){this._frameId=o,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,S.d&&S.d.sid&&(S.d=p.globalData.slotManager.getProp(S.d)),this.data=S,this.elem=p,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}zi.prototype.defaultBoxWidth=[0,0],zi.prototype.copyData=function(p,S){for(var b in S)Object.prototype.hasOwnProperty.call(S,b)&&(p[b]=S[b]);return p},zi.prototype.setCurrentData=function(p){p.__complete||this.completeTextData(p),this.currentData=p,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},zi.prototype.searchProperty=function(){return this.searchKeyframes()},zi.prototype.searchKeyframes=function(){return this.kf=this.data.d.k.length>1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},zi.prototype.addEffect=function(p){this.effectsSequence.push(p),this.elem.addDynamicProperty(this)},zi.prototype.getValue=function(p){if(!((this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)&&!p)){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var S=this.currentData,b=this.keysIndex;if(this.lock){this.setCurrentData(this.currentData);return}this.lock=!0,this._mdf=!1;var A,I=this.effectsSequence.length,D=p||this.data.d.k[this.keysIndex].s;for(A=0;A<I;A+=1)b!==this.keysIndex?D=this.effectsSequence[A](D,D.t):D=this.effectsSequence[A](this.currentData,D.t);S!==D&&this.setCurrentData(D),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}},zi.prototype.getKeyframeValue=function(){for(var p=this.data.d.k,S=this.elem.comp.renderedFrame,b=0,A=p.length;b<=A-1&&!(b===A-1||p[b+1].t>S);)b+=1;return this.keysIndex!==b&&(this.keysIndex=b),this.data.d.k[this.keysIndex].s},zi.prototype.buildFinalText=function(p){for(var S=[],b=0,A=p.length,I,D,B=!1,J=!1,$="";b<A;)B=J,J=!1,I=p.charCodeAt(b),$=p.charAt(b),bt.isCombinedCharacter(I)?B=!0:I>=55296&&I<=56319?bt.isRegionalFlag(p,b)?$=p.substr(b,14):(D=p.charCodeAt(b+1),D>=56320&&D<=57343&&(bt.isModifier(I,D)?($=p.substr(b,2),B=!0):bt.isFlagEmoji(p.substr(b,4))?$=p.substr(b,4):$=p.substr(b,2))):I>56319?(D=p.charCodeAt(b+1),bt.isVariationSelector(I)&&(B=!0)):bt.isZeroWidthJoiner(I)&&(B=!0,J=!0),B?(S[S.length-1]+=$,B=!1):S.push($),b+=$.length;return S},zi.prototype.completeTextData=function(p){p.__complete=!0;var S=this.elem.globalData.fontManager,b=this.data,A=[],I,D,B,J=0,$,ae=b.m.g,fe=0,ke=0,q=0,he=[],ve=0,pe=0,Ae,le,te=S.getFontByName(p.f),G,Q=0,oe=Qt(te);p.fWeight=oe.weight,p.fStyle=oe.style,p.finalSize=p.s,p.finalText=this.buildFinalText(p.t),D=p.finalText.length,p.finalLineHeight=p.lh;var xe=p.tr/1e3*p.finalSize,Le;if(p.sz)for(var Ne=!0,ut=p.sz[0],nn=p.sz[1],Ht,pt;Ne;){pt=this.buildFinalText(p.t),Ht=0,ve=0,D=pt.length,xe=p.tr/1e3*p.finalSize;var sn=-1;for(I=0;I<D;I+=1)Le=pt[I].charCodeAt(0),B=!1,pt[I]===" "?sn=I:(Le===13||Le===3)&&(ve=0,B=!0,Ht+=p.finalLineHeight||p.finalSize*1.2),S.chars?(G=S.getCharData(pt[I],te.fStyle,te.fFamily),Q=B?0:G.w*p.finalSize/100):Q=S.measureText(pt[I],p.f,p.finalSize),ve+Q>ut&&pt[I]!==" "?(sn===-1?D+=1:I=sn,Ht+=p.finalLineHeight||p.finalSize*1.2,pt.splice(I,sn===I?1:0,"\r"),sn=-1,ve=0):(ve+=Q,ve+=xe);Ht+=te.ascent*p.finalSize/100,this.canResize&&p.finalSize>this.minimumFontSize&&nn<Ht?(p.finalSize-=1,p.finalLineHeight=p.finalSize*p.lh/p.s):(p.finalText=pt,D=p.finalText.length,Ne=!1)}ve=-xe,Q=0;var At=0,ct;for(I=0;I<D;I+=1)if(B=!1,ct=p.finalText[I],Le=ct.charCodeAt(0),Le===13||Le===3?(At=0,he.push(ve),pe=ve>pe?ve:pe,ve=-2*xe,$="",B=!0,q+=1):$=ct,S.chars?(G=S.getCharData(ct,te.fStyle,S.getFontByName(p.f).fFamily),Q=B?0:G.w*p.finalSize/100):Q=S.measureText($,p.f,p.finalSize),ct===" "?At+=Q+xe:(ve+=Q+xe+At,At=0),A.push({l:Q,an:Q,add:fe,n:B,anIndexes:[],val:$,line:q,animatorJustifyOffset:0}),ae==2){if(fe+=Q,$===""||$===" "||I===D-1){for(($===""||$===" ")&&(fe-=Q);ke<=I;)A[ke].an=fe,A[ke].ind=J,A[ke].extra=Q,ke+=1;J+=1,fe=0}}else if(ae==3){if(fe+=Q,$===""||I===D-1){for($===""&&(fe-=Q);ke<=I;)A[ke].an=fe,A[ke].ind=J,A[ke].extra=Q,ke+=1;fe=0,J+=1}}else A[J].ind=J,A[J].extra=0,J+=1;if(p.l=A,pe=ve>pe?ve:pe,he.push(ve),p.sz)p.boxWidth=p.sz[0],p.justifyOffset=0;else switch(p.boxWidth=pe,p.j){case 1:p.justifyOffset=-p.boxWidth;break;case 2:p.justifyOffset=-p.boxWidth/2;break;default:p.justifyOffset=0}p.lineWidths=he;var ee=b.a,me,U;le=ee.length;var H,Me,Te=[];for(Ae=0;Ae<le;Ae+=1){for(me=ee[Ae],me.a.sc&&(p.strokeColorAnim=!0),me.a.sw&&(p.strokeWidthAnim=!0),(me.a.fc||me.a.fh||me.a.fs||me.a.fb)&&(p.fillColorAnim=!0),Me=0,H=me.s.b,I=0;I<D;I+=1)U=A[I],U.anIndexes[Ae]=Me,(H==1&&U.val!==""||H==2&&U.val!==""&&U.val!==" "||H==3&&(U.n||U.val==" "||I==D-1)||H==4&&(U.n||I==D-1))&&(me.s.rn===1&&Te.push(Me),Me+=1);b.a[Ae].s.totalChars=Me;var _t=-1,Gt;if(me.s.rn===1)for(I=0;I<D;I+=1)U=A[I],_t!=U.anIndexes[Ae]&&(_t=U.anIndexes[Ae],Gt=Te.splice(Math.floor(Math.random()*Te.length),1)[0]),U.anIndexes[Ae]=Gt}p.yOffset=p.finalLineHeight||p.finalSize*1.2,p.ls=p.ls||0,p.ascent=te.ascent*p.finalSize/100},zi.prototype.updateDocumentData=function(p,S){S=S===void 0?this.keysIndex:S;var b=this.copyData({},this.data.d.k[S].s);b=this.copyData(b,p),this.data.d.k[S].s=b,this.recalculate(S),this.setCurrentData(b),this.elem.addDynamicProperty(this)},zi.prototype.recalculate=function(p){var S=this.data.d.k[p].s;S.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(S)},zi.prototype.canResizeFont=function(p){this.canResize=p,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},zi.prototype.setMinimumFontSize=function(p){this.minimumFontSize=Math.floor(p)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var yf=function(){var p=Math.max,S=Math.min,b=Math.floor;function A(D,B){this._currentTextLength=-1,this.k=!1,this.data=B,this.elem=D,this.comp=D.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(D),this.s=vt.getProp(D,B.s||{k:0},0,0,this),"e"in B?this.e=vt.getProp(D,B.e,0,0,this):this.e={v:100},this.o=vt.getProp(D,B.o||{k:0},0,0,this),this.xe=vt.getProp(D,B.xe||{k:0},0,0,this),this.ne=vt.getProp(D,B.ne||{k:0},0,0,this),this.sm=vt.getProp(D,B.sm||{k:100},0,0,this),this.a=vt.getProp(D,B.a,0,.01,this),this.dynamicProperties.length||this.getValue()}A.prototype={getMult:function(B){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var J=0,$=0,ae=1,fe=1;this.ne.v>0?J=this.ne.v/100:$=-this.ne.v/100,this.xe.v>0?ae=1-this.xe.v/100:fe=1+this.xe.v/100;var ke=_r.getBezierEasing(J,$,ae,fe).get,q=0,he=this.finalS,ve=this.finalE,pe=this.data.sh;if(pe===2)ve===he?q=B>=ve?1:0:q=p(0,S(.5/(ve-he)+(B-he)/(ve-he),1)),q=ke(q);else if(pe===3)ve===he?q=B>=ve?0:1:q=1-p(0,S(.5/(ve-he)+(B-he)/(ve-he),1)),q=ke(q);else if(pe===4)ve===he?q=0:(q=p(0,S(.5/(ve-he)+(B-he)/(ve-he),1)),q<.5?q*=2:q=1-2*(q-.5)),q=ke(q);else if(pe===5){if(ve===he)q=0;else{var Ae=ve-he;B=S(p(0,B+.5-he),ve-he);var le=-Ae/2+B,te=Ae/2;q=Math.sqrt(1-le*le/(te*te))}q=ke(q)}else pe===6?(ve===he?q=0:(B=S(p(0,B+.5-he),ve-he),q=(1+Math.cos(Math.PI+Math.PI*2*B/(ve-he)))/2),q=ke(q)):(B>=b(he)&&(B-he<0?q=p(0,S(S(ve,1)-(he-B),1)):q=p(0,S(ve-B,1))),q=ke(q));if(this.sm.v!==100){var G=this.sm.v*.01;G===0&&(G=1e-8);var Q=.5-G*.5;q<Q?q=0:(q=(q-Q)/G,q>1&&(q=1))}return q*this.a.v},getValue:function(B){this.iterateDynamicProperties(),this._mdf=B||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,B&&this.data.r===2&&(this.e.v=this._currentTextLength);var J=this.data.r===2?1:100/this.data.totalChars,$=this.o.v/J,ae=this.s.v/J+$,fe=this.e.v/J+$;if(ae>fe){var ke=ae;ae=fe,fe=ke}this.finalS=ae,this.finalE=fe}},E([Nn],A);function I(D,B,J){return new A(D,B)}return{getTextSelectorProp:I}}();function Ep(p,S,b){var A={propType:!1},I=vt.getProp,D=S.a;this.a={r:D.r?I(p,D.r,0,de,b):A,rx:D.rx?I(p,D.rx,0,de,b):A,ry:D.ry?I(p,D.ry,0,de,b):A,sk:D.sk?I(p,D.sk,0,de,b):A,sa:D.sa?I(p,D.sa,0,de,b):A,s:D.s?I(p,D.s,1,.01,b):A,a:D.a?I(p,D.a,1,0,b):A,o:D.o?I(p,D.o,0,.01,b):A,p:D.p?I(p,D.p,1,0,b):A,sw:D.sw?I(p,D.sw,0,0,b):A,sc:D.sc?I(p,D.sc,1,0,b):A,fc:D.fc?I(p,D.fc,1,0,b):A,fh:D.fh?I(p,D.fh,0,0,b):A,fs:D.fs?I(p,D.fs,0,.01,b):A,fb:D.fb?I(p,D.fb,0,.01,b):A,t:D.t?I(p,D.t,0,0,b):A},this.s=yf.getTextSelectorProp(p,S.s,b),this.s.t=S.s.t}function po(p,S,b){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=p,this._renderType=S,this._elem=b,this._animatorsData=L(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(b)}po.prototype.searchProperties=function(){var p,S=this._textData.a.length,b,A=vt.getProp;for(p=0;p<S;p+=1)b=this._textData.a[p],this._animatorsData[p]=new Ep(this._elem,b,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:A(this._elem,this._textData.p.a,0,0,this),f:A(this._elem,this._textData.p.f,0,0,this),l:A(this._elem,this._textData.p.l,0,0,this),r:A(this._elem,this._textData.p.r,0,0,this),p:A(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=A(this._elem,this._textData.m.a,1,0,this)},po.prototype.getMeasures=function(p,S){if(this.lettersChangedFlag=S,!(!this._mdf&&!this._isFirstFrame&&!S&&(!this._hasMaskedPath||!this._pathData.m._mdf))){this._isFirstFrame=!1;var b=this._moreOptions.alignment.v,A=this._animatorsData,I=this._textData,D=this.mHelper,B=this._renderType,J=this.renderedLetters.length,$,ae,fe,ke,q=p.l,he,ve,pe,Ae,le,te,G,Q,oe,xe,Le,Ne,ut,nn,Ht;if(this._hasMaskedPath){if(Ht=this._pathData.m,!this._pathData.n||this._pathData._mdf){var pt=Ht.v;this._pathData.r.v&&(pt=pt.reverse()),he={tLength:0,segments:[]},ke=pt._length-1;var sn;for(Ne=0,fe=0;fe<ke;fe+=1)sn=Mr.buildBezierData(pt.v[fe],pt.v[fe+1],[pt.o[fe][0]-pt.v[fe][0],pt.o[fe][1]-pt.v[fe][1]],[pt.i[fe+1][0]-pt.v[fe+1][0],pt.i[fe+1][1]-pt.v[fe+1][1]]),he.tLength+=sn.segmentLength,he.segments.push(sn),Ne+=sn.segmentLength;fe=ke,Ht.v.c&&(sn=Mr.buildBezierData(pt.v[fe],pt.v[0],[pt.o[fe][0]-pt.v[fe][0],pt.o[fe][1]-pt.v[fe][1]],[pt.i[0][0]-pt.v[0][0],pt.i[0][1]-pt.v[0][1]]),he.tLength+=sn.segmentLength,he.segments.push(sn),Ne+=sn.segmentLength),this._pathData.pi=he}if(he=this._pathData.pi,ve=this._pathData.f.v,G=0,te=1,Ae=0,le=!0,xe=he.segments,ve<0&&Ht.v.c)for(he.tLength<Math.abs(ve)&&(ve=-Math.abs(ve)%he.tLength),G=xe.length-1,oe=xe[G].points,te=oe.length-1;ve<0;)ve+=oe[te].partialLength,te-=1,te<0&&(G-=1,oe=xe[G].points,te=oe.length-1);oe=xe[G].points,Q=oe[te-1],pe=oe[te],Le=pe.partialLength}ke=q.length,$=0,ae=0;var At=p.finalSize*1.2*.714,ct=!0,ee,me,U,H,Me;H=A.length;var Te,_t=-1,Gt,Zt,An,In=ve,mr=G,zr=te,Ss=-1,hi,pi,ss,Hn,St,Xs,Qs,Js,mi="",Bs=this.defaultPropsArray,ji;if(p.j===2||p.j===1){var Ri=0,Es=0,Ha=p.j===2?-.5:-1,as=0,Ea=!0;for(fe=0;fe<ke;fe+=1)if(q[fe].n){for(Ri&&(Ri+=Es);as<fe;)q[as].animatorJustifyOffset=Ri,as+=1;Ri=0,Ea=!0}else{for(U=0;U<H;U+=1)ee=A[U].a,ee.t.propType&&(Ea&&p.j===2&&(Es+=ee.t.v*Ha),me=A[U].s,Te=me.getMult(q[fe].anIndexes[U],I.a[U].s.totalChars),Te.length?Ri+=ee.t.v*Te[0]*Ha:Ri+=ee.t.v*Te*Ha);Ea=!1}for(Ri&&(Ri+=Es);as<fe;)q[as].animatorJustifyOffset=Ri,as+=1}for(fe=0;fe<ke;fe+=1){if(D.reset(),hi=1,q[fe].n)$=0,ae+=p.yOffset,ae+=ct?1:0,ve=In,ct=!1,this._hasMaskedPath&&(G=mr,te=zr,oe=xe[G].points,Q=oe[te-1],pe=oe[te],Le=pe.partialLength,Ae=0),mi="",Js="",Xs="",ji="",Bs=this.defaultPropsArray;else{if(this._hasMaskedPath){if(Ss!==q[fe].line){switch(p.j){case 1:ve+=Ne-p.lineWidths[q[fe].line];break;case 2:ve+=(Ne-p.lineWidths[q[fe].line])/2;break}Ss=q[fe].line}_t!==q[fe].ind&&(q[_t]&&(ve+=q[_t].extra),ve+=q[fe].an/2,_t=q[fe].ind),ve+=b[0]*q[fe].an*.005;var xs=0;for(U=0;U<H;U+=1)ee=A[U].a,ee.p.propType&&(me=A[U].s,Te=me.getMult(q[fe].anIndexes[U],I.a[U].s.totalChars),Te.length?xs+=ee.p.v[0]*Te[0]:xs+=ee.p.v[0]*Te),ee.a.propType&&(me=A[U].s,Te=me.getMult(q[fe].anIndexes[U],I.a[U].s.totalChars),Te.length?xs+=ee.a.v[0]*Te[0]:xs+=ee.a.v[0]*Te);for(le=!0,this._pathData.a.v&&(ve=q[0].an*.5+(Ne-this._pathData.f.v-q[0].an*.5-q[q.length-1].an*.5)*_t/(ke-1),ve+=this._pathData.f.v);le;)Ae+Le>=ve+xs||!oe?(ut=(ve+xs-Ae)/pe.partialLength,Zt=Q.point[0]+(pe.point[0]-Q.point[0])*ut,An=Q.point[1]+(pe.point[1]-Q.point[1])*ut,D.translate(-b[0]*q[fe].an*.005,-(b[1]*At)*.01),le=!1):oe&&(Ae+=pe.partialLength,te+=1,te>=oe.length&&(te=0,G+=1,xe[G]?oe=xe[G].points:Ht.v.c?(te=0,G=0,oe=xe[G].points):(Ae-=pe.partialLength,oe=null)),oe&&(Q=pe,pe=oe[te],Le=pe.partialLength));Gt=q[fe].an/2-q[fe].add,D.translate(-Gt,0,0)}else Gt=q[fe].an/2-q[fe].add,D.translate(-Gt,0,0),D.translate(-b[0]*q[fe].an*.005,-b[1]*At*.01,0);for(U=0;U<H;U+=1)ee=A[U].a,ee.t.propType&&(me=A[U].s,Te=me.getMult(q[fe].anIndexes[U],I.a[U].s.totalChars),($!==0||p.j!==0)&&(this._hasMaskedPath?Te.length?ve+=ee.t.v*Te[0]:ve+=ee.t.v*Te:Te.length?$+=ee.t.v*Te[0]:$+=ee.t.v*Te));for(p.strokeWidthAnim&&(ss=p.sw||0),p.strokeColorAnim&&(p.sc?pi=[p.sc[0],p.sc[1],p.sc[2]]:pi=[0,0,0]),p.fillColorAnim&&p.fc&&(Hn=[p.fc[0],p.fc[1],p.fc[2]]),U=0;U<H;U+=1)ee=A[U].a,ee.a.propType&&(me=A[U].s,Te=me.getMult(q[fe].anIndexes[U],I.a[U].s.totalChars),Te.length?D.translate(-ee.a.v[0]*Te[0],-ee.a.v[1]*Te[1],ee.a.v[2]*Te[2]):D.translate(-ee.a.v[0]*Te,-ee.a.v[1]*Te,ee.a.v[2]*Te));for(U=0;U<H;U+=1)ee=A[U].a,ee.s.propType&&(me=A[U].s,Te=me.getMult(q[fe].anIndexes[U],I.a[U].s.totalChars),Te.length?D.scale(1+(ee.s.v[0]-1)*Te[0],1+(ee.s.v[1]-1)*Te[1],1):D.scale(1+(ee.s.v[0]-1)*Te,1+(ee.s.v[1]-1)*Te,1));for(U=0;U<H;U+=1){if(ee=A[U].a,me=A[U].s,Te=me.getMult(q[fe].anIndexes[U],I.a[U].s.totalChars),ee.sk.propType&&(Te.length?D.skewFromAxis(-ee.sk.v*Te[0],ee.sa.v*Te[1]):D.skewFromAxis(-ee.sk.v*Te,ee.sa.v*Te)),ee.r.propType&&(Te.length?D.rotateZ(-ee.r.v*Te[2]):D.rotateZ(-ee.r.v*Te)),ee.ry.propType&&(Te.length?D.rotateY(ee.ry.v*Te[1]):D.rotateY(ee.ry.v*Te)),ee.rx.propType&&(Te.length?D.rotateX(ee.rx.v*Te[0]):D.rotateX(ee.rx.v*Te)),ee.o.propType&&(Te.length?hi+=(ee.o.v*Te[0]-hi)*Te[0]:hi+=(ee.o.v*Te-hi)*Te),p.strokeWidthAnim&&ee.sw.propType&&(Te.length?ss+=ee.sw.v*Te[0]:ss+=ee.sw.v*Te),p.strokeColorAnim&&ee.sc.propType)for(St=0;St<3;St+=1)Te.length?pi[St]+=(ee.sc.v[St]-pi[St])*Te[0]:pi[St]+=(ee.sc.v[St]-pi[St])*Te;if(p.fillColorAnim&&p.fc){if(ee.fc.propType)for(St=0;St<3;St+=1)Te.length?Hn[St]+=(ee.fc.v[St]-Hn[St])*Te[0]:Hn[St]+=(ee.fc.v[St]-Hn[St])*Te;ee.fh.propType&&(Te.length?Hn=Xe(Hn,ee.fh.v*Te[0]):Hn=Xe(Hn,ee.fh.v*Te)),ee.fs.propType&&(Te.length?Hn=Be(Hn,ee.fs.v*Te[0]):Hn=Be(Hn,ee.fs.v*Te)),ee.fb.propType&&(Te.length?Hn=Je(Hn,ee.fb.v*Te[0]):Hn=Je(Hn,ee.fb.v*Te))}}for(U=0;U<H;U+=1)ee=A[U].a,ee.p.propType&&(me=A[U].s,Te=me.getMult(q[fe].anIndexes[U],I.a[U].s.totalChars),this._hasMaskedPath?Te.length?D.translate(0,ee.p.v[1]*Te[0],-ee.p.v[2]*Te[1]):D.translate(0,ee.p.v[1]*Te,-ee.p.v[2]*Te):Te.length?D.translate(ee.p.v[0]*Te[0],ee.p.v[1]*Te[1],-ee.p.v[2]*Te[2]):D.translate(ee.p.v[0]*Te,ee.p.v[1]*Te,-ee.p.v[2]*Te));if(p.strokeWidthAnim&&(Xs=ss<0?0:ss),p.strokeColorAnim&&(Qs="rgb("+Math.round(pi[0]*255)+","+Math.round(pi[1]*255)+","+Math.round(pi[2]*255)+")"),p.fillColorAnim&&p.fc&&(Js="rgb("+Math.round(Hn[0]*255)+","+Math.round(Hn[1]*255)+","+Math.round(Hn[2]*255)+")"),this._hasMaskedPath){if(D.translate(0,-p.ls),D.translate(0,b[1]*At*.01+ae,0),this._pathData.p.v){nn=(pe.point[1]-Q.point[1])/(pe.point[0]-Q.point[0]);var mo=Math.atan(nn)*180/Math.PI;pe.point[0]<Q.point[0]&&(mo+=180),D.rotate(-mo*Math.PI/180)}D.translate(Zt,An,0),ve-=b[0]*q[fe].an*.005,q[fe+1]&&_t!==q[fe+1].ind&&(ve+=q[fe].an/2,ve+=p.tr*.001*p.finalSize)}else{switch(D.translate($,ae,0),p.ps&&D.translate(p.ps[0],p.ps[1]+p.ascent,0),p.j){case 1:D.translate(q[fe].animatorJustifyOffset+p.justifyOffset+(p.boxWidth-p.lineWidths[q[fe].line]),0,0);break;case 2:D.translate(q[fe].animatorJustifyOffset+p.justifyOffset+(p.boxWidth-p.lineWidths[q[fe].line])/2,0,0);break}D.translate(0,-p.ls),D.translate(Gt,0,0),D.translate(b[0]*q[fe].an*.005,b[1]*At*.01,0),$+=q[fe].l+p.tr*.001*p.finalSize}B==="html"?mi=D.toCSS():B==="svg"?mi=D.to2dCSS():Bs=[D.props[0],D.props[1],D.props[2],D.props[3],D.props[4],D.props[5],D.props[6],D.props[7],D.props[8],D.props[9],D.props[10],D.props[11],D.props[12],D.props[13],D.props[14],D.props[15]],ji=hi}J<=fe?(Me=new Au(ji,Xs,Qs,Js,mi,Bs),this.renderedLetters.push(Me),J+=1,this.lettersChangedFlag=!0):(Me=this.renderedLetters[fe],this.lettersChangedFlag=Me.update(ji,Xs,Qs,Js,mi,Bs)||this.lettersChangedFlag)}}},po.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},po.prototype.mHelper=new yt,po.prototype.defaultPropsArray=[],E([Nn],po);function Us(){}Us.prototype.initElement=function(p,S,b){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(p,S,b),this.textProperty=new zi(this,p.t,this.dynamicProperties),this.textAnimator=new po(p.t,this.renderType,this),this.initTransform(p,S,b),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},Us.prototype.prepareFrame=function(p){this._mdf=!1,this.prepareRenderableFrame(p),this.prepareProperties(p,this.isInRange)},Us.prototype.createPathShape=function(p,S){var b,A=S.length,I,D="";for(b=0;b<A;b+=1)S[b].ty==="sh"&&(I=S[b].ks.k,D+=Xo(I,I.i.length,!0,p));return D},Us.prototype.updateDocumentData=function(p,S){this.textProperty.updateDocumentData(p,S)},Us.prototype.canResizeFont=function(p){this.textProperty.canResizeFont(p)},Us.prototype.setMinimumFontSize=function(p){this.textProperty.setMinimumFontSize(p)},Us.prototype.applyTextPropertiesToMatrix=function(p,S,b,A,I){switch(p.ps&&S.translate(p.ps[0],p.ps[1]+p.ascent,0),S.translate(0,-p.ls,0),p.j){case 1:S.translate(p.justifyOffset+(p.boxWidth-p.lineWidths[b]),0,0);break;case 2:S.translate(p.justifyOffset+(p.boxWidth-p.lineWidths[b])/2,0,0);break}S.translate(A,I,0)},Us.prototype.buildColor=function(p){return"rgb("+Math.round(p[0]*255)+","+Math.round(p[1]*255)+","+Math.round(p[2]*255)+")"},Us.prototype.emptyProp=new Au,Us.prototype.destroy=function(){},Us.prototype.validateText=function(){(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)};var Gd={shapes:[]};function ja(p,S,b){this.textSpans=[],this.renderType="svg",this.initElement(p,S,b)}E([Ps,is,di,Os,Ms,Ko,Us],ja),ja.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=wt("text"))},ja.prototype.buildTextContents=function(p){for(var S=0,b=p.length,A=[],I="";S<b;)p[S]==="\r"||p[S]===""?(A.push(I),I=""):I+=p[S],S+=1;return A.push(I),A},ja.prototype.buildShapeData=function(p,S){if(p.shapes&&p.shapes.length){var b=p.shapes[0];if(b.it){var A=b.it[b.it.length-1];A.s&&(A.s.k[0]=S,A.s.k[1]=S)}}return p},ja.prototype.buildNewText=function(){this.addDynamicProperty(this);var p,S,b=this.textProperty.currentData;this.renderedLetters=L(b?b.l.length:0),b.fc?this.layerElement.setAttribute("fill",this.buildColor(b.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),b.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(b.sc)),this.layerElement.setAttribute("stroke-width",b.sw)),this.layerElement.setAttribute("font-size",b.finalSize);var A=this.globalData.fontManager.getFontByName(b.f);if(A.fClass)this.layerElement.setAttribute("class",A.fClass);else{this.layerElement.setAttribute("font-family",A.fFamily);var I=b.fWeight,D=b.fStyle;this.layerElement.setAttribute("font-style",D),this.layerElement.setAttribute("font-weight",I)}this.layerElement.setAttribute("aria-label",b.t);var B=b.l||[],J=!!this.globalData.fontManager.chars;S=B.length;var $,ae=this.mHelper,fe="",ke=this.data.singleShape,q=0,he=0,ve=!0,pe=b.tr*.001*b.finalSize;if(ke&&!J&&!b.sz){var Ae=this.textContainer,le="start";switch(b.j){case 1:le="end";break;case 2:le="middle";break;default:le="start";break}Ae.setAttribute("text-anchor",le),Ae.setAttribute("letter-spacing",pe);var te=this.buildTextContents(b.finalText);for(S=te.length,he=b.ps?b.ps[1]+b.ascent:0,p=0;p<S;p+=1)$=this.textSpans[p].span||wt("tspan"),$.textContent=te[p],$.setAttribute("x",0),$.setAttribute("y",he),$.style.display="inherit",Ae.appendChild($),this.textSpans[p]||(this.textSpans[p]={span:null,glyph:null}),this.textSpans[p].span=$,he+=b.finalLineHeight;this.layerElement.appendChild(Ae)}else{var G=this.textSpans.length,Q;for(p=0;p<S;p+=1){if(this.textSpans[p]||(this.textSpans[p]={span:null,childSpan:null,glyph:null}),!J||!ke||p===0){if($=G>p?this.textSpans[p].span:wt(J?"g":"text"),G<=p){if($.setAttribute("stroke-linecap","butt"),$.setAttribute("stroke-linejoin","round"),$.setAttribute("stroke-miterlimit","4"),this.textSpans[p].span=$,J){var oe=wt("g");$.appendChild(oe),this.textSpans[p].childSpan=oe}this.textSpans[p].span=$,this.layerElement.appendChild($)}$.style.display="inherit"}if(ae.reset(),ke&&(B[p].n&&(q=-pe,he+=b.yOffset,he+=ve?1:0,ve=!1),this.applyTextPropertiesToMatrix(b,ae,B[p].line,q,he),q+=B[p].l||0,q+=pe),J){Q=this.globalData.fontManager.getCharData(b.finalText[p],A.fStyle,this.globalData.fontManager.getFontByName(b.f).fFamily);var xe;if(Q.t===1)xe=new Ml(Q.data,this.globalData,this);else{var Le=Gd;Q.data&&Q.data.shapes&&(Le=this.buildShapeData(Q.data,b.finalSize)),xe=new $r(Le,this.globalData,this)}if(this.textSpans[p].glyph){var Ne=this.textSpans[p].glyph;this.textSpans[p].childSpan.removeChild(Ne.layerElement),Ne.destroy()}this.textSpans[p].glyph=xe,xe._debug=!0,xe.prepareFrame(0),xe.renderFrame(),this.textSpans[p].childSpan.appendChild(xe.layerElement),Q.t===1&&this.textSpans[p].childSpan.setAttribute("transform","scale("+b.finalSize/100+","+b.finalSize/100+")")}else ke&&$.setAttribute("transform","translate("+ae.props[12]+","+ae.props[13]+")"),$.textContent=B[p].val,$.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}ke&&$&&$.setAttribute("d",fe)}for(;p<this.textSpans.length;)this.textSpans[p].span.style.display="none",p+=1;this._sizeChanged=!0},ja.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var p=this.layerElement.getBBox();this.bbox={top:p.y,left:p.x,width:p.width,height:p.height}}return this.bbox},ja.prototype.getValue=function(){var p,S=this.textSpans.length,b;for(this.renderedFrame=this.comp.renderedFrame,p=0;p<S;p+=1)b=this.textSpans[p].glyph,b&&(b.prepareFrame(this.comp.renderedFrame-this.data.st),b._mdf&&(this._mdf=!0))},ja.prototype.renderInnerContent=function(){if(this.validateText(),(!this.data.singleShape||this._mdf)&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){this._sizeChanged=!0;var p,S,b=this.textAnimator.renderedLetters,A=this.textProperty.currentData.l;S=A.length;var I,D,B;for(p=0;p<S;p+=1)A[p].n||(I=b[p],D=this.textSpans[p].span,B=this.textSpans[p].glyph,B&&B.renderFrame(),I._mdf.m&&D.setAttribute("transform",I.m),I._mdf.o&&D.setAttribute("opacity",I.o),I._mdf.sw&&D.setAttribute("stroke-width",I.sw),I._mdf.sc&&D.setAttribute("stroke",I.sc),I._mdf.fc&&D.setAttribute("fill",I.fc))}};function bc(p,S,b){this.initElement(p,S,b)}E([Fs],bc),bc.prototype.createContent=function(){var p=wt("rect");p.setAttribute("width",this.data.sw),p.setAttribute("height",this.data.sh),p.setAttribute("fill",this.data.sc),this.layerElement.appendChild(p)};function ys(p,S,b){this.initFrame(),this.initBaseData(p,S,b),this.initFrame(),this.initTransform(p,S,b),this.initHierarchy()}ys.prototype.prepareFrame=function(p){this.prepareProperties(p,!0)},ys.prototype.renderFrame=function(){},ys.prototype.getBaseElement=function(){return null},ys.prototype.destroy=function(){},ys.prototype.sourceRectAtTime=function(){},ys.prototype.hide=function(){},E([Ps,is,Os,Ms],ys);function Vr(){}E([Lr],Vr),Vr.prototype.createNull=function(p){return new ys(p,this.globalData,this)},Vr.prototype.createShape=function(p){return new $r(p,this.globalData,this)},Vr.prototype.createText=function(p){return new ja(p,this.globalData,this)},Vr.prototype.createImage=function(p){return new Fs(p,this.globalData,this)},Vr.prototype.createSolid=function(p){return new bc(p,this.globalData,this)},Vr.prototype.configAnimation=function(p){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.svgElement.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+p.w+" "+p.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",p.w),this.svgElement.setAttribute("height",p.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.width&&this.svgElement.setAttribute("width",this.renderConfig.width),this.renderConfig.height&&this.svgElement.setAttribute("height",this.renderConfig.height),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),this.renderConfig.focusable!==void 0&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var S=this.globalData.defs;this.setupGlobalData(p,S),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=p;var b=wt("clipPath"),A=wt("rect");A.setAttribute("width",p.w),A.setAttribute("height",p.h),A.setAttribute("x",0),A.setAttribute("y",0);var I=_e();b.setAttribute("id",I),b.appendChild(A),this.layerElement.setAttribute("clip-path","url("+m()+"#"+I+")"),S.appendChild(b),this.layers=p.layers,this.elements=L(p.layers.length)},Vr.prototype.destroy=function(){this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var p,S=this.layers?this.layers.length:0;for(p=0;p<S;p+=1)this.elements[p]&&this.elements[p].destroy&&this.elements[p].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},Vr.prototype.updateContainerSize=function(){},Vr.prototype.findIndexByInd=function(p){var S=0,b=this.layers.length;for(S=0;S<b;S+=1)if(this.layers[S].ind===p)return S;return-1},Vr.prototype.buildItem=function(p){var S=this.elements;if(!(S[p]||this.layers[p].ty===99)){S[p]=!0;var b=this.createItem(this.layers[p]);if(S[p]=b,Dt()&&(this.layers[p].ty===0&&this.globalData.projectInterface.registerComposition(b),b.initExpressions()),this.appendElementInPos(b,p),this.layers[p].tt){var A="tp"in this.layers[p]?this.findIndexByInd(this.layers[p].tp):p-1;if(A===-1)return;if(!this.elements[A]||this.elements[A]===!0)this.buildItem(A),this.addPendingElement(b);else{var I=S[A],D=I.getMatte(this.layers[p].tt);b.setMatte(D)}}}},Vr.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var p=this.pendingElements.pop();if(p.checkParenting(),p.data.tt)for(var S=0,b=this.elements.length;S<b;){if(this.elements[S]===p){var A="tp"in p.data?this.findIndexByInd(p.data.tp):S-1,I=this.elements[A],D=I.getMatte(this.layers[S].tt);p.setMatte(D);break}S+=1}}},Vr.prototype.renderFrame=function(p){if(!(this.renderedFrame===p||this.destroyed)){p===null?p=this.renderedFrame:this.renderedFrame=p,this.globalData.frameNum=p,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=p,this.globalData._mdf=!1;var S,b=this.layers.length;for(this.completeLayers||this.checkLayers(p),S=b-1;S>=0;S-=1)(this.completeLayers||this.elements[S])&&this.elements[S].prepareFrame(p-this.layers[S].st);if(this.globalData._mdf)for(S=0;S<b;S+=1)(this.completeLayers||this.elements[S])&&this.elements[S].renderFrame()}},Vr.prototype.appendElementInPos=function(p,S){var b=p.getBaseElement();if(b){for(var A=0,I;A<S;)this.elements[A]&&this.elements[A]!==!0&&this.elements[A].getBaseElement()&&(I=this.elements[A].getBaseElement()),A+=1;I?this.layerElement.insertBefore(b,I):this.layerElement.appendChild(b)}},Vr.prototype.hide=function(){this.layerElement.style.display="none"},Vr.prototype.show=function(){this.layerElement.style.display="block"};function Sa(){}E([Ps,is,Os,Ms,Ko],Sa),Sa.prototype.initElement=function(p,S,b){this.initFrame(),this.initBaseData(p,S,b),this.initTransform(p,S,b),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),(this.data.xt||!S.progressiveLoad)&&this.buildAllItems(),this.hide()},Sa.prototype.prepareFrame=function(p){if(this._mdf=!1,this.prepareRenderableFrame(p),this.prepareProperties(p,this.isInRange),!(!this.isInRange&&!this.data.xt)){if(this.tm._placeholder)this.renderedFrame=p/this.data.sr;else{var S=this.tm.v;S===this.data.op&&(S=this.data.op-1),this.renderedFrame=S}var b,A=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),b=A-1;b>=0;b-=1)(this.completeLayers||this.elements[b])&&(this.elements[b].prepareFrame(this.renderedFrame-this.layers[b].st),this.elements[b]._mdf&&(this._mdf=!0))}},Sa.prototype.renderInnerContent=function(){var p,S=this.layers.length;for(p=0;p<S;p+=1)(this.completeLayers||this.elements[p])&&this.elements[p].renderFrame()},Sa.prototype.setElements=function(p){this.elements=p},Sa.prototype.getElements=function(){return this.elements},Sa.prototype.destroyElements=function(){var p,S=this.layers.length;for(p=0;p<S;p+=1)this.elements[p]&&this.elements[p].destroy()},Sa.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()};function Ml(p,S,b){this.layers=p.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?L(this.layers.length):[],this.initElement(p,S,b),this.tm=p.tm?vt.getProp(this,p.tm,0,S.frameRate,this):{_placeholder:!0}}E([Vr,Sa,di],Ml),Ml.prototype.createComp=function(p){return new Ml(p,this.globalData,this)};function Sf(p,S){this.animationItem=p,this.layers=null,this.renderedFrame=-1,this.svgElement=wt("svg");var b="";if(S&&S.title){var A=wt("title"),I=_e();A.setAttribute("id",I),A.textContent=S.title,this.svgElement.appendChild(A),b+=I}if(S&&S.description){var D=wt("desc"),B=_e();D.setAttribute("id",B),D.textContent=S.description,this.svgElement.appendChild(D),b+=" "+B}b&&this.svgElement.setAttribute("aria-labelledby",b);var J=wt("defs");this.svgElement.appendChild(J);var $=wt("g");this.svgElement.appendChild($),this.layerElement=$,this.renderConfig={preserveAspectRatio:S&&S.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:S&&S.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:S&&S.contentVisibility||"visible",progressiveLoad:S&&S.progressiveLoad||!1,hideOnTransparent:!(S&&S.hideOnTransparent===!1),viewBoxOnly:S&&S.viewBoxOnly||!1,viewBoxSize:S&&S.viewBoxSize||!1,className:S&&S.className||"",id:S&&S.id||"",focusable:S&&S.focusable,filterSize:{width:S&&S.filterSize&&S.filterSize.width||"100%",height:S&&S.filterSize&&S.filterSize.height||"100%",x:S&&S.filterSize&&S.filterSize.x||"0%",y:S&&S.filterSize&&S.filterSize.y||"0%"},width:S&&S.width,height:S&&S.height,runExpressions:!S||S.runExpressions===void 0||S.runExpressions},this.globalData={_mdf:!1,frameNum:-1,defs:J,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}return E([Vr],Sf),Sf.prototype.createComp=function(p){return new Ml(p,this.globalData,this)},xi("svg",Sf),Ji.registerModifier("tm",ci),Ji.registerModifier("pb",Zi),Ji.registerModifier("rp",Mi),Ji.registerModifier("rd",Ua),Ji.registerModifier("zz",Oi),Ji.registerModifier("op",Kt),Nt})})(K1,K1.exports);var Y6=K1.exports;const X6=Cy(Y6);function Q6({loop:r=!1,path:e,animationData:t,className:n,onComplete:s}){const o=Tt.useRef(null);return Tt.useEffect(()=>{if(!o.current)return;const u=X6.loadAnimation({container:o.current,renderer:"svg",autoplay:!0,loop:r,path:e,animationData:t});return s&&u.addEventListener("complete",s),()=>{s&&u.removeEventListener("complete",s),u.destroy()}},[r,e,t]),Yt.jsx("div",{ref:o,className:n})}const J6={v:"5.5.7",fr:30,ip:0,op:31,w:360,h:360,nm:"forward right",ddd:0,assets:[],layers:[{ddd:0,ind:1,ty:4,nm:"Layer 2",sr:1,ks:{o:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:0,s:[0]},{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:10,s:[100]},{t:20,s:[0]}],ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[161.086,180,0],ix:2},a:{a:0,k:[-18.914,0,0],ix:1},s:{a:0,k:[100,100,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,.923],[0,0],[-.777,-.499],[0,0],[.714,-.459],[0,0]],o:[[0,0],[0,-.923],[0,0],[.714,.459],[0,0],[-.777,.499]],v:[[-26.586,8.363],[-26.586,-8.363],[-24.788,-9.344],[-11.779,-.981],[-11.779,.981],[-24.788,9.344]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[1,1,1,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 1",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1}],ip:0,op:300,st:0,bm:0},{ddd:0,ind:2,ty:4,nm:"Layer 1",sr:1,ks:{o:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:5,s:[0]},{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:15,s:[100]},{t:25,s:[0]}],ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[179.914,180,0],ix:2},a:{a:0,k:[-.086,0,0],ix:1},s:{a:0,k:[100,100,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,.923],[0,0],[-.777,-.499],[0,0],[.714,-.459],[0,0]],o:[[0,0],[0,-.923],[0,0],[.714,.459],[0,0],[-.777,.499]],v:[[-7.757,8.363],[-7.757,-8.363],[-5.959,-9.344],[7.05,-.981],[7.05,.981],[-5.959,9.344]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[1,1,1,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 1",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1}],ip:0,op:300,st:0,bm:0},{ddd:0,ind:3,ty:4,nm:"Layer 3",sr:1,ks:{o:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:10,s:[0]},{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:20,s:[100]},{t:30,s:[0]}],ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[198.914,180,0],ix:2},a:{a:0,k:[18.914,0,0],ix:1},s:{a:0,k:[100,100,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,.923],[0,0],[-.777,-.499],[0,0],[.714,-.459],[0,0]],o:[[0,0],[0,-.923],[0,0],[.714,.459],[0,0],[-.777,.499]],v:[[11.243,8.363],[11.243,-8.363],[13.041,-9.344],[26.05,-.981],[26.05,.981],[13.041,9.344]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[1,1,1,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 1",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1}],ip:0,op:300,st:0,bm:0}],markers:[]},hv={root:"_root_1v1it_1",chapter_img:"_chapter_img_1v1it_20",name:"_name_1v1it_26",time:"_time_1v1it_37"};function Z6({width:r,height:e,src:t,alt:n,draggable:s=!1,className:o}){return Yt.jsxs("picture",{children:[Yt.jsx("source",{type:"image/webp",srcSet:`${P_({f:"webp",h:e?e*2:void 0,w:r?r*2:void 0},t)}`,height:e}),Yt.jsx("img",{src:`${P_({h:e?e*2:void 0,w:r?r*2:void 0},t)}`,alt:n,draggable:s,width:r,height:e,className:o})]})}function e2({name:r,time:e,imageUrl:t,className:n,onClick:s}){return Yt.jsxs("div",{className:`${hv.root} ${n||""}`,onClick:s,children:[Yt.jsx(Z6,{className:hv.chapter_img,src:t,width:90,height:130,alt:"챕터 이미지"}),Yt.jsx("div",{className:hv.name,children:r}),Yt.jsx("div",{className:hv.time,children:e})]})}const t2=Tt.forwardRef(({src:r,ratio:e=!1,shadow:t=!0,controls:n=!0,posterSrc:s,initialTime:o,timeOffsetStart:u,timeOffsetEnd:c,quality:h,chapter:m,debug:y,loop:E,live:T,renderControls:R,onClick:_,onInit:L,onDestroy:M,onSync:F,className:Z},K)=>{const[Y,X]=GC(!1),[ue,ie]=GC(!1),[ye,de]=bU("",650),{ref:Re,live:Ce,time:Ve,play:ze,playbackRate:Qe,handleSeektime:et,handleBackward:Pe,handleForward:ne,handlePlayToggle:_e,handlePlaybackRate:Ue}=G6({src:r,timeUpdateEvent:Y,initialTime:o,timeOffsetStart:u,timeOffsetEnd:c,quality:h,debug:y,onSync:F,onInit:L,onDestroy:M}),He=xU({onClick:X,onDoubleClick:gt=>{if(T||Ce)return;const Ot=gt.target.getBoundingClientRect(),Dt=Ot.left+Ot.width/2;gt.clientX<Dt?(Pe(),de("left")):(ne(),de("right"))}}),Be=(gt,Ot)=>{if(gt.stopPropagation(),!Re.current)return;const Dt=Ot*((c??Re.current.duration)-(u??0))/100;et(Dt)},Je=()=>{ie()},Xe=gt=>Ot=>{Ot.stopPropagation(),gt()};Tt.useEffect(()=>{_==null||_(Y)},[Y,_]);const Et=!(T||Ce);return Yt.jsxs("div",{ref:K,className:`${ri.root} ${Z||""}`,children:[Yt.jsx("video",{className:`${ri.video} ${e?ri.origin_ratio:""}`,ref:Re,muted:!0,playsInline:!0,loop:E}),s&&Yt.jsx("div",{className:`${ri.poster} ${e?ri.origin_ratio:""}`,style:{backgroundImage:`url("${s}?h=1600&f=webp")`}}),Yt.jsxs("div",{className:`${ri.layer} ${t?ri.shadow:""}`,onClick:He,children:[ye&&Yt.jsx("div",{className:`${ri.indicator} ${ri[`indicator_${ye}`]}`,children:Yt.jsx(Q6,{animationData:J6,loop:!0})}),n&&Y&&Yt.jsxs(Yt.Fragment,{children:[Et&&Yt.jsx(D_,{handle:!0,className:ri.progress,progress:Ve.progress,onChangeProgress:Be}),Et&&Yt.jsx(q6,{className:ri.time,currentTime:Ve.currentTime,durationTime:Ve.durationTime}),Et&&Yt.jsxs("button",{className:`${ri.button} ${ri.playbackrate}`,onClick:Xe(Ue),"aria-label":"비디오 배속",children:[Qe,"x"]}),Yt.jsx("button",{className:`${ri.button} ${ri.play_toggle}`,onClick:Xe(_e),"aria-label":"비디오 재생",children:Yt.jsx(WS,{name:ze?"pause":"play"})}),Et&&Yt.jsx("button",{className:`${ri.button} ${ri.backward}`,onClick:Xe(Pe),"aria-label":"비디오 10초 뒤로",children:Yt.jsx(WS,{name:"backward"})}),Et&&Yt.jsx("button",{className:`${ri.button} ${ri.forward}`,onClick:Xe(ne),"aria-label":"비디오 10초 앞으로",children:Yt.jsx(WS,{name:"forward"})}),!!m&&Et&&Yt.jsx("button",{className:`${ri.button} ${ri.chapter_toggle}`,"aria-label":"비디오 챕터",onClick:Xe(Je),children:hs.t("chapter")}),!!m&&ue&&Yt.jsx("div",{className:ri.chapter_wrap,children:m==null?void 0:m.map(gt=>Yt.jsx(e2,{...gt,onClick:Xe(()=>et(K6(gt.time)))},gt.id))})]}),Y&&(R==null?void 0:R({time:Ve,play:ze,handlePlayToggle:_e,handleChangeProgress:Be}))]})]})});function M_(r){return r!==null&&typeof r=="object"&&"constructor"in r&&r.constructor===Object}function q1(r,e){r===void 0&&(r={}),e===void 0&&(e={}),Object.keys(e).forEach(t=>{typeof r[t]>"u"?r[t]=e[t]:M_(e[t])&&M_(r[t])&&Object.keys(e[t]).length>0&&q1(r[t],e[t])})}const O_={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function cf(){const r=typeof document<"u"?document:{};return q1(r,O_),r}const n2={document:O_,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(r){return typeof setTimeout>"u"?(r(),null):setTimeout(r,0)},cancelAnimationFrame(r){typeof setTimeout>"u"||clearTimeout(r)}};function Fa(){const r=typeof window<"u"?window:{};return q1(r,n2),r}function r2(r){const e=r;Object.keys(e).forEach(t=>{try{e[t]=null}catch{}try{delete e[t]}catch{}})}function Y1(r,e){return e===void 0&&(e=0),setTimeout(r,e)}function pv(){return Date.now()}function i2(r){const e=Fa();let t;return e.getComputedStyle&&(t=e.getComputedStyle(r,null)),!t&&r.currentStyle&&(t=r.currentStyle),t||(t=r.style),t}function s2(r,e){e===void 0&&(e="x");const t=Fa();let n,s,o;const u=i2(r);return t.WebKitCSSMatrix?(s=u.transform||u.webkitTransform,s.split(",").length>6&&(s=s.split(", ").map(c=>c.replace(",",".")).join(", ")),o=new t.WebKitCSSMatrix(s==="none"?"":s)):(o=u.MozTransform||u.OTransform||u.MsTransform||u.msTransform||u.transform||u.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),n=o.toString().split(",")),e==="x"&&(t.WebKitCSSMatrix?s=o.m41:n.length===16?s=parseFloat(n[12]):s=parseFloat(n[4])),e==="y"&&(t.WebKitCSSMatrix?s=o.m42:n.length===16?s=parseFloat(n[13]):s=parseFloat(n[5])),s||0}function mv(r){return typeof r=="object"&&r!==null&&r.constructor&&Object.prototype.toString.call(r).slice(8,-1)==="Object"}function a2(r){return typeof window<"u"&&typeof window.HTMLElement<"u"?r instanceof HTMLElement:r&&(r.nodeType===1||r.nodeType===11)}function Na(){const r=Object(arguments.length<=0?void 0:arguments[0]),e=["__proto__","constructor","prototype"];for(let t=1;t<arguments.length;t+=1){const n=t<0||arguments.length<=t?void 0:arguments[t];if(n!=null&&!a2(n)){const s=Object.keys(Object(n)).filter(o=>e.indexOf(o)<0);for(let o=0,u=s.length;o<u;o+=1){const c=s[o],h=Object.getOwnPropertyDescriptor(n,c);h!==void 0&&h.enumerable&&(mv(r[c])&&mv(n[c])?n[c].__swiper__?r[c]=n[c]:Na(r[c],n[c]):!mv(r[c])&&mv(n[c])?(r[c]={},n[c].__swiper__?r[c]=n[c]:Na(r[c],n[c])):r[c]=n[c])}}}return r}function gv(r,e,t){r.style.setProperty(e,t)}function F_(r){let{swiper:e,targetPosition:t,side:n}=r;const s=Fa(),o=-e.translate;let u=null,c;const h=e.params.speed;e.wrapperEl.style.scrollSnapType="none",s.cancelAnimationFrame(e.cssModeFrameID);const m=t>o?"next":"prev",y=(T,R)=>m==="next"&&T>=R||m==="prev"&&T<=R,E=()=>{c=new Date().getTime(),u===null&&(u=c);const T=Math.max(Math.min((c-u)/h,1),0),R=.5-Math.cos(T*Math.PI)/2;let _=o+R*(t-o);if(y(_,t)&&(_=t),e.wrapperEl.scrollTo({[n]:_}),y(_,t)){e.wrapperEl.style.overflow="hidden",e.wrapperEl.style.scrollSnapType="",setTimeout(()=>{e.wrapperEl.style.overflow="",e.wrapperEl.scrollTo({[n]:_})}),s.cancelAnimationFrame(e.cssModeFrameID);return}e.cssModeFrameID=s.requestAnimationFrame(E)};E()}function Eu(r,e){return e===void 0&&(e=""),[...r.children].filter(t=>t.matches(e))}function o2(r,e){e===void 0&&(e=[]);const t=document.createElement(r);return t.classList.add(...Array.isArray(e)?e:[e]),t}function l2(r,e){const t=[];for(;r.previousElementSibling;){const n=r.previousElementSibling;e?n.matches(e)&&t.push(n):t.push(n),r=n}return t}function u2(r,e){const t=[];for(;r.nextElementSibling;){const n=r.nextElementSibling;e?n.matches(e)&&t.push(n):t.push(n),r=n}return t}function Sc(r,e){return Fa().getComputedStyle(r,null).getPropertyValue(e)}function N_(r){let e=r,t;if(e){for(t=0;(e=e.previousSibling)!==null;)e.nodeType===1&&(t+=1);return t}}function c2(r,e){const t=[];let n=r.parentElement;for(;n;)t.push(n),n=n.parentElement;return t}function U_(r,e,t){const n=Fa();return r[e==="width"?"offsetWidth":"offsetHeight"]+parseFloat(n.getComputedStyle(r,null).getPropertyValue(e==="width"?"margin-right":"margin-top"))+parseFloat(n.getComputedStyle(r,null).getPropertyValue(e==="width"?"margin-left":"margin-bottom"))}let X1;function f2(){const r=Fa(),e=cf();return{smoothScroll:e.documentElement&&e.documentElement.style&&"scrollBehavior"in e.documentElement.style,touch:!!("ontouchstart"in r||r.DocumentTouch&&e instanceof r.DocumentTouch)}}function B_(){return X1||(X1=f2()),X1}let Q1;function d2(r){let{userAgent:e}=r===void 0?{}:r;const t=B_(),n=Fa(),s=n.navigator.platform,o=e||n.navigator.userAgent,u={ios:!1,android:!1},c=n.screen.width,h=n.screen.height,m=o.match(/(Android);?[\s\/]+([\d.]+)?/);let y=o.match(/(iPad).*OS\s([\d_]+)/);const E=o.match(/(iPod)(.*OS\s([\d_]+))?/),T=!y&&o.match(/(iPhone\sOS|iOS)\s([\d_]+)/),R=s==="Win32";let _=s==="MacIntel";const L=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!y&&_&&t.touch&&L.indexOf(`${c}x${h}`)>=0&&(y=o.match(/(Version)\/([\d.]+)/),y||(y=[0,1,"13_0_0"]),_=!1),m&&!R&&(u.os="android",u.android=!0),(y||T||E)&&(u.os="ios",u.ios=!0),u}function h2(r){return r===void 0&&(r={}),Q1||(Q1=d2(r)),Q1}let J1;function p2(){const r=Fa();let e=!1;function t(){const n=r.navigator.userAgent.toLowerCase();return n.indexOf("safari")>=0&&n.indexOf("chrome")<0&&n.indexOf("android")<0}if(t()){const n=String(r.navigator.userAgent);if(n.includes("Version/")){const[s,o]=n.split("Version/")[1].split(" ")[0].split(".").map(u=>Number(u));e=s<16||s===16&&o<2}}return{isSafari:e||t(),needPerspectiveFix:e,isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(r.navigator.userAgent)}}function m2(){return J1||(J1=p2()),J1}function g2(r){let{swiper:e,on:t,emit:n}=r;const s=Fa();let o=null,u=null;const c=()=>{!e||e.destroyed||!e.initialized||(n("beforeResize"),n("resize"))},h=()=>{!e||e.destroyed||!e.initialized||(o=new ResizeObserver(E=>{u=s.requestAnimationFrame(()=>{const{width:T,height:R}=e;let _=T,L=R;E.forEach(M=>{let{contentBoxSize:F,contentRect:Z,target:K}=M;K&&K!==e.el||(_=Z?Z.width:(F[0]||F).inlineSize,L=Z?Z.height:(F[0]||F).blockSize)}),(_!==T||L!==R)&&c()})}),o.observe(e.el))},m=()=>{u&&s.cancelAnimationFrame(u),o&&o.unobserve&&e.el&&(o.unobserve(e.el),o=null)},y=()=>{!e||e.destroyed||!e.initialized||n("orientationchange")};t("init",()=>{if(e.params.resizeObserver&&typeof s.ResizeObserver<"u"){h();return}s.addEventListener("resize",c),s.addEventListener("orientationchange",y)}),t("destroy",()=>{m(),s.removeEventListener("resize",c),s.removeEventListener("orientationchange",y)})}function v2(r){let{swiper:e,extendParams:t,on:n,emit:s}=r;const o=[],u=Fa(),c=function(y,E){E===void 0&&(E={});const T=u.MutationObserver||u.WebkitMutationObserver,R=new T(_=>{if(e.__preventObserver__)return;if(_.length===1){s("observerUpdate",_[0]);return}const L=function(){s("observerUpdate",_[0])};u.requestAnimationFrame?u.requestAnimationFrame(L):u.setTimeout(L,0)});R.observe(y,{attributes:typeof E.attributes>"u"?!0:E.attributes,childList:typeof E.childList>"u"?!0:E.childList,characterData:typeof E.characterData>"u"?!0:E.characterData}),o.push(R)},h=()=>{if(e.params.observer){if(e.params.observeParents){const y=c2(e.hostEl);for(let E=0;E<y.length;E+=1)c(y[E])}c(e.hostEl,{childList:e.params.observeSlideChildren}),c(e.wrapperEl,{attributes:!1})}},m=()=>{o.forEach(y=>{y.disconnect()}),o.splice(0,o.length)};t({observer:!1,observeParents:!1,observeSlideChildren:!1}),n("init",h),n("destroy",m)}var y2={on(r,e,t){const n=this;if(!n.eventsListeners||n.destroyed||typeof e!="function")return n;const s=t?"unshift":"push";return r.split(" ").forEach(o=>{n.eventsListeners[o]||(n.eventsListeners[o]=[]),n.eventsListeners[o][s](e)}),n},once(r,e,t){const n=this;if(!n.eventsListeners||n.destroyed||typeof e!="function")return n;function s(){n.off(r,s),s.__emitterProxy&&delete s.__emitterProxy;for(var o=arguments.length,u=new Array(o),c=0;c<o;c++)u[c]=arguments[c];e.apply(n,u)}return s.__emitterProxy=e,n.on(r,s,t)},onAny(r,e){const t=this;if(!t.eventsListeners||t.destroyed||typeof r!="function")return t;const n=e?"unshift":"push";return t.eventsAnyListeners.indexOf(r)<0&&t.eventsAnyListeners[n](r),t},offAny(r){const e=this;if(!e.eventsListeners||e.destroyed||!e.eventsAnyListeners)return e;const t=e.eventsAnyListeners.indexOf(r);return t>=0&&e.eventsAnyListeners.splice(t,1),e},off(r,e){const t=this;return!t.eventsListeners||t.destroyed||!t.eventsListeners||r.split(" ").forEach(n=>{typeof e>"u"?t.eventsListeners[n]=[]:t.eventsListeners[n]&&t.eventsListeners[n].forEach((s,o)=>{(s===e||s.__emitterProxy&&s.__emitterProxy===e)&&t.eventsListeners[n].splice(o,1)})}),t},emit(){const r=this;if(!r.eventsListeners||r.destroyed||!r.eventsListeners)return r;let e,t,n;for(var s=arguments.length,o=new Array(s),u=0;u<s;u++)o[u]=arguments[u];return typeof o[0]=="string"||Array.isArray(o[0])?(e=o[0],t=o.slice(1,o.length),n=r):(e=o[0].events,t=o[0].data,n=o[0].context||r),t.unshift(n),(Array.isArray(e)?e:e.split(" ")).forEach(h=>{r.eventsAnyListeners&&r.eventsAnyListeners.length&&r.eventsAnyListeners.forEach(m=>{m.apply(n,[h,...t])}),r.eventsListeners&&r.eventsListeners[h]&&r.eventsListeners[h].forEach(m=>{m.apply(n,t)})}),r}};function S2(){const r=this;let e,t;const n=r.el;typeof r.params.width<"u"&&r.params.width!==null?e=r.params.width:e=n.clientWidth,typeof r.params.height<"u"&&r.params.height!==null?t=r.params.height:t=n.clientHeight,!(e===0&&r.isHorizontal()||t===0&&r.isVertical())&&(e=e-parseInt(Sc(n,"padding-left")||0,10)-parseInt(Sc(n,"padding-right")||0,10),t=t-parseInt(Sc(n,"padding-top")||0,10)-parseInt(Sc(n,"padding-bottom")||0,10),Number.isNaN(e)&&(e=0),Number.isNaN(t)&&(t=0),Object.assign(r,{width:e,height:t,size:r.isHorizontal()?e:t}))}function E2(){const r=this;function e(Ce){return r.isHorizontal()?Ce:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[Ce]}function t(Ce,Ve){return parseFloat(Ce.getPropertyValue(e(Ve))||0)}const n=r.params,{wrapperEl:s,slidesEl:o,size:u,rtlTranslate:c,wrongRTL:h}=r,m=r.virtual&&n.virtual.enabled,y=m?r.virtual.slides.length:r.slides.length,E=Eu(o,`.${r.params.slideClass}, swiper-slide`),T=m?r.virtual.slides.length:E.length;let R=[];const _=[],L=[];let M=n.slidesOffsetBefore;typeof M=="function"&&(M=n.slidesOffsetBefore.call(r));let F=n.slidesOffsetAfter;typeof F=="function"&&(F=n.slidesOffsetAfter.call(r));const Z=r.snapGrid.length,K=r.slidesGrid.length;let Y=n.spaceBetween,X=-M,ue=0,ie=0;if(typeof u>"u")return;typeof Y=="string"&&Y.indexOf("%")>=0?Y=parseFloat(Y.replace("%",""))/100*u:typeof Y=="string"&&(Y=parseFloat(Y)),r.virtualSize=-Y,E.forEach(Ce=>{c?Ce.style.marginLeft="":Ce.style.marginRight="",Ce.style.marginBottom="",Ce.style.marginTop=""}),n.centeredSlides&&n.cssMode&&(gv(s,"--swiper-centered-offset-before",""),gv(s,"--swiper-centered-offset-after",""));const ye=n.grid&&n.grid.rows>1&&r.grid;ye&&r.grid.initSlides(T);let de;const Re=n.slidesPerView==="auto"&&n.breakpoints&&Object.keys(n.breakpoints).filter(Ce=>typeof n.breakpoints[Ce].slidesPerView<"u").length>0;for(let Ce=0;Ce<T;Ce+=1){de=0;let Ve;if(E[Ce]&&(Ve=E[Ce]),ye&&r.grid.updateSlide(Ce,Ve,T,e),!(E[Ce]&&Sc(Ve,"display")==="none")){if(n.slidesPerView==="auto"){Re&&(E[Ce].style[e("width")]="");const ze=getComputedStyle(Ve),Qe=Ve.style.transform,et=Ve.style.webkitTransform;if(Qe&&(Ve.style.transform="none"),et&&(Ve.style.webkitTransform="none"),n.roundLengths)de=r.isHorizontal()?U_(Ve,"width"):U_(Ve,"height");else{const Pe=t(ze,"width"),ne=t(ze,"padding-left"),_e=t(ze,"padding-right"),Ue=t(ze,"margin-left"),He=t(ze,"margin-right"),Be=ze.getPropertyValue("box-sizing");if(Be&&Be==="border-box")de=Pe+Ue+He;else{const{clientWidth:Je,offsetWidth:Xe}=Ve;de=Pe+ne+_e+Ue+He+(Xe-Je)}}Qe&&(Ve.style.transform=Qe),et&&(Ve.style.webkitTransform=et),n.roundLengths&&(de=Math.floor(de))}else de=(u-(n.slidesPerView-1)*Y)/n.slidesPerView,n.roundLengths&&(de=Math.floor(de)),E[Ce]&&(E[Ce].style[e("width")]=`${de}px`);E[Ce]&&(E[Ce].swiperSlideSize=de),L.push(de),n.centeredSlides?(X=X+de/2+ue/2+Y,ue===0&&Ce!==0&&(X=X-u/2-Y),Ce===0&&(X=X-u/2-Y),Math.abs(X)<1/1e3&&(X=0),n.roundLengths&&(X=Math.floor(X)),ie%n.slidesPerGroup===0&&R.push(X),_.push(X)):(n.roundLengths&&(X=Math.floor(X)),(ie-Math.min(r.params.slidesPerGroupSkip,ie))%r.params.slidesPerGroup===0&&R.push(X),_.push(X),X=X+de+Y),r.virtualSize+=de+Y,ue=de,ie+=1}}if(r.virtualSize=Math.max(r.virtualSize,u)+F,c&&h&&(n.effect==="slide"||n.effect==="coverflow")&&(s.style.width=`${r.virtualSize+Y}px`),n.setWrapperSize&&(s.style[e("width")]=`${r.virtualSize+Y}px`),ye&&r.grid.updateWrapperSize(de,R,e),!n.centeredSlides){const Ce=[];for(let Ve=0;Ve<R.length;Ve+=1){let ze=R[Ve];n.roundLengths&&(ze=Math.floor(ze)),R[Ve]<=r.virtualSize-u&&Ce.push(ze)}R=Ce,Math.floor(r.virtualSize-u)-Math.floor(R[R.length-1])>1&&R.push(r.virtualSize-u)}if(m&&n.loop){const Ce=L[0]+Y;if(n.slidesPerGroup>1){const Ve=Math.ceil((r.virtual.slidesBefore+r.virtual.slidesAfter)/n.slidesPerGroup),ze=Ce*n.slidesPerGroup;for(let Qe=0;Qe<Ve;Qe+=1)R.push(R[R.length-1]+ze)}for(let Ve=0;Ve<r.virtual.slidesBefore+r.virtual.slidesAfter;Ve+=1)n.slidesPerGroup===1&&R.push(R[R.length-1]+Ce),_.push(_[_.length-1]+Ce),r.virtualSize+=Ce}if(R.length===0&&(R=[0]),Y!==0){const Ce=r.isHorizontal()&&c?"marginLeft":e("marginRight");E.filter((Ve,ze)=>!n.cssMode||n.loop?!0:ze!==E.length-1).forEach(Ve=>{Ve.style[Ce]=`${Y}px`})}if(n.centeredSlides&&n.centeredSlidesBounds){let Ce=0;L.forEach(ze=>{Ce+=ze+(Y||0)}),Ce-=Y;const Ve=Ce-u;R=R.map(ze=>ze<=0?-M:ze>Ve?Ve+F:ze)}if(n.centerInsufficientSlides){let Ce=0;if(L.forEach(Ve=>{Ce+=Ve+(Y||0)}),Ce-=Y,Ce<u){const Ve=(u-Ce)/2;R.forEach((ze,Qe)=>{R[Qe]=ze-Ve}),_.forEach((ze,Qe)=>{_[Qe]=ze+Ve})}}if(Object.assign(r,{slides:E,snapGrid:R,slidesGrid:_,slidesSizesGrid:L}),n.centeredSlides&&n.cssMode&&!n.centeredSlidesBounds){gv(s,"--swiper-centered-offset-before",`${-R[0]}px`),gv(s,"--swiper-centered-offset-after",`${r.size/2-L[L.length-1]/2}px`);const Ce=-r.snapGrid[0],Ve=-r.slidesGrid[0];r.snapGrid=r.snapGrid.map(ze=>ze+Ce),r.slidesGrid=r.slidesGrid.map(ze=>ze+Ve)}if(T!==y&&r.emit("slidesLengthChange"),R.length!==Z&&(r.params.watchOverflow&&r.checkOverflow(),r.emit("snapGridLengthChange")),_.length!==K&&r.emit("slidesGridLengthChange"),n.watchSlidesProgress&&r.updateSlidesOffset(),!m&&!n.cssMode&&(n.effect==="slide"||n.effect==="fade")){const Ce=`${n.containerModifierClass}backface-hidden`,Ve=r.el.classList.contains(Ce);T<=n.maxBackfaceHiddenSlides?Ve||r.el.classList.add(Ce):Ve&&r.el.classList.remove(Ce)}}function x2(r){const e=this,t=[],n=e.virtual&&e.params.virtual.enabled;let s=0,o;typeof r=="number"?e.setTransition(r):r===!0&&e.setTransition(e.params.speed);const u=c=>n?e.slides[e.getSlideIndexByData(c)]:e.slides[c];if(e.params.slidesPerView!=="auto"&&e.params.slidesPerView>1)if(e.params.centeredSlides)(e.visibleSlides||[]).forEach(c=>{t.push(c)});else for(o=0;o<Math.ceil(e.params.slidesPerView);o+=1){const c=e.activeIndex+o;if(c>e.slides.length&&!n)break;t.push(u(c))}else t.push(u(e.activeIndex));for(o=0;o<t.length;o+=1)if(typeof t[o]<"u"){const c=t[o].offsetHeight;s=c>s?c:s}(s||s===0)&&(e.wrapperEl.style.height=`${s}px`)}function b2(){const r=this,e=r.slides,t=r.isElement?r.isHorizontal()?r.wrapperEl.offsetLeft:r.wrapperEl.offsetTop:0;for(let n=0;n<e.length;n+=1)e[n].swiperSlideOffset=(r.isHorizontal()?e[n].offsetLeft:e[n].offsetTop)-t-r.cssOverflowAdjustment()}function T2(r){r===void 0&&(r=this&&this.translate||0);const e=this,t=e.params,{slides:n,rtlTranslate:s,snapGrid:o}=e;if(n.length===0)return;typeof n[0].swiperSlideOffset>"u"&&e.updateSlidesOffset();let u=-r;s&&(u=r),n.forEach(h=>{h.classList.remove(t.slideVisibleClass)}),e.visibleSlidesIndexes=[],e.visibleSlides=[];let c=t.spaceBetween;typeof c=="string"&&c.indexOf("%")>=0?c=parseFloat(c.replace("%",""))/100*e.size:typeof c=="string"&&(c=parseFloat(c));for(let h=0;h<n.length;h+=1){const m=n[h];let y=m.swiperSlideOffset;t.cssMode&&t.centeredSlides&&(y-=n[0].swiperSlideOffset);const E=(u+(t.centeredSlides?e.minTranslate():0)-y)/(m.swiperSlideSize+c),T=(u-o[0]+(t.centeredSlides?e.minTranslate():0)-y)/(m.swiperSlideSize+c),R=-(u-y),_=R+e.slidesSizesGrid[h];(R>=0&&R<e.size-1||_>1&&_<=e.size||R<=0&&_>=e.size)&&(e.visibleSlides.push(m),e.visibleSlidesIndexes.push(h),n[h].classList.add(t.slideVisibleClass)),m.progress=s?-E:E,m.originalProgress=s?-T:T}}function w2(r){const e=this;if(typeof r>"u"){const y=e.rtlTranslate?-1:1;r=e&&e.translate&&e.translate*y||0}const t=e.params,n=e.maxTranslate()-e.minTranslate();let{progress:s,isBeginning:o,isEnd:u,progressLoop:c}=e;const h=o,m=u;if(n===0)s=0,o=!0,u=!0;else{s=(r-e.minTranslate())/n;const y=Math.abs(r-e.minTranslate())<1,E=Math.abs(r-e.maxTranslate())<1;o=y||s<=0,u=E||s>=1,y&&(s=0),E&&(s=1)}if(t.loop){const y=e.getSlideIndexByData(0),E=e.getSlideIndexByData(e.slides.length-1),T=e.slidesGrid[y],R=e.slidesGrid[E],_=e.slidesGrid[e.slidesGrid.length-1],L=Math.abs(r);L>=T?c=(L-T)/_:c=(L+_-R)/_,c>1&&(c-=1)}Object.assign(e,{progress:s,progressLoop:c,isBeginning:o,isEnd:u}),(t.watchSlidesProgress||t.centeredSlides&&t.autoHeight)&&e.updateSlidesProgress(r),o&&!h&&e.emit("reachBeginning toEdge"),u&&!m&&e.emit("reachEnd toEdge"),(h&&!o||m&&!u)&&e.emit("fromEdge"),e.emit("progress",s)}function C2(){const r=this,{slides:e,params:t,slidesEl:n,activeIndex:s}=r,o=r.virtual&&t.virtual.enabled,u=h=>Eu(n,`.${t.slideClass}${h}, swiper-slide${h}`)[0];e.forEach(h=>{h.classList.remove(t.slideActiveClass,t.slideNextClass,t.slidePrevClass)});let c;if(o)if(t.loop){let h=s-r.virtual.slidesBefore;h<0&&(h=r.virtual.slides.length+h),h>=r.virtual.slides.length&&(h-=r.virtual.slides.length),c=u(`[data-swiper-slide-index="${h}"]`)}else c=u(`[data-swiper-slide-index="${s}"]`);else c=e[s];if(c){c.classList.add(t.slideActiveClass);let h=u2(c,`.${t.slideClass}, swiper-slide`)[0];t.loop&&!h&&(h=e[0]),h&&h.classList.add(t.slideNextClass);let m=l2(c,`.${t.slideClass}, swiper-slide`)[0];t.loop&&!m===0&&(m=e[e.length-1]),m&&m.classList.add(t.slidePrevClass)}r.emitSlidesClasses()}const vv=(r,e)=>{if(!r||r.destroyed||!r.params)return;const t=()=>r.isElement?"swiper-slide":`.${r.params.slideClass}`,n=e.closest(t());if(n){let s=n.querySelector(`.${r.params.lazyPreloaderClass}`);!s&&r.isElement&&(n.shadowRoot?s=n.shadowRoot.querySelector(`.${r.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{n.shadowRoot&&(s=n.shadowRoot.querySelector(`.${r.params.lazyPreloaderClass}`),s&&s.remove())})),s&&s.remove()}},Z1=(r,e)=>{if(!r.slides[e])return;const t=r.slides[e].querySelector('[loading="lazy"]');t&&t.removeAttribute("loading")},eE=r=>{if(!r||r.destroyed||!r.params)return;let e=r.params.lazyPreloadPrevNext;const t=r.slides.length;if(!t||!e||e<0)return;e=Math.min(e,t);const n=r.params.slidesPerView==="auto"?r.slidesPerViewDynamic():Math.ceil(r.params.slidesPerView),s=r.activeIndex;if(r.params.grid&&r.params.grid.rows>1){const u=s,c=[u-e];c.push(...Array.from({length:e}).map((h,m)=>u+n+m)),r.slides.forEach((h,m)=>{c.includes(h.column)&&Z1(r,m)});return}const o=s+n-1;if(r.params.rewind||r.params.loop)for(let u=s-e;u<=o+e;u+=1){const c=(u%t+t)%t;(c<s||c>o)&&Z1(r,c)}else for(let u=Math.max(s-e,0);u<=Math.min(o+e,t-1);u+=1)u!==s&&(u>o||u<s)&&Z1(r,u)};function R2(r){const{slidesGrid:e,params:t}=r,n=r.rtlTranslate?r.translate:-r.translate;let s;for(let o=0;o<e.length;o+=1)typeof e[o+1]<"u"?n>=e[o]&&n<e[o+1]-(e[o+1]-e[o])/2?s=o:n>=e[o]&&n<e[o+1]&&(s=o+1):n>=e[o]&&(s=o);return t.normalizeSlideIndex&&(s<0||typeof s>"u")&&(s=0),s}function A2(r){const e=this,t=e.rtlTranslate?e.translate:-e.translate,{snapGrid:n,params:s,activeIndex:o,realIndex:u,snapIndex:c}=e;let h=r,m;const y=T=>{let R=T-e.virtual.slidesBefore;return R<0&&(R=e.virtual.slides.length+R),R>=e.virtual.slides.length&&(R-=e.virtual.slides.length),R};if(typeof h>"u"&&(h=R2(e)),n.indexOf(t)>=0)m=n.indexOf(t);else{const T=Math.min(s.slidesPerGroupSkip,h);m=T+Math.floor((h-T)/s.slidesPerGroup)}if(m>=n.length&&(m=n.length-1),h===o){m!==c&&(e.snapIndex=m,e.emit("snapIndexChange")),e.params.loop&&e.virtual&&e.params.virtual.enabled&&(e.realIndex=y(h));return}let E;e.virtual&&s.virtual.enabled&&s.loop?E=y(h):e.slides[h]?E=parseInt(e.slides[h].getAttribute("data-swiper-slide-index")||h,10):E=h,Object.assign(e,{previousSnapIndex:c,snapIndex:m,previousRealIndex:u,realIndex:E,previousIndex:o,activeIndex:h}),e.initialized&&eE(e),e.emit("activeIndexChange"),e.emit("snapIndexChange"),(e.initialized||e.params.runCallbacksOnInit)&&(u!==E&&e.emit("realIndexChange"),e.emit("slideChange"))}function _2(r,e){const t=this,n=t.params;let s=r.closest(`.${n.slideClass}, swiper-slide`);!s&&t.isElement&&e&&e.length>1&&e.includes(r)&&[...e.slice(e.indexOf(r)+1,e.length)].forEach(c=>{!s&&c.matches&&c.matches(`.${n.slideClass}, swiper-slide`)&&(s=c)});let o=!1,u;if(s){for(let c=0;c<t.slides.length;c+=1)if(t.slides[c]===s){o=!0,u=c;break}}if(s&&o)t.clickedSlide=s,t.virtual&&t.params.virtual.enabled?t.clickedIndex=parseInt(s.getAttribute("data-swiper-slide-index"),10):t.clickedIndex=u;else{t.clickedSlide=void 0,t.clickedIndex=void 0;return}n.slideToClickedSlide&&t.clickedIndex!==void 0&&t.clickedIndex!==t.activeIndex&&t.slideToClickedSlide()}var L2={updateSize:S2,updateSlides:E2,updateAutoHeight:x2,updateSlidesOffset:b2,updateSlidesProgress:T2,updateProgress:w2,updateSlidesClasses:C2,updateActiveIndex:A2,updateClickedSlide:_2};function k2(r){r===void 0&&(r=this.isHorizontal()?"x":"y");const e=this,{params:t,rtlTranslate:n,translate:s,wrapperEl:o}=e;if(t.virtualTranslate)return n?-s:s;if(t.cssMode)return s;let u=s2(o,r);return u+=e.cssOverflowAdjustment(),n&&(u=-u),u||0}function D2(r,e){const t=this,{rtlTranslate:n,params:s,wrapperEl:o,progress:u}=t;let c=0,h=0;const m=0;t.isHorizontal()?c=n?-r:r:h=r,s.roundLengths&&(c=Math.floor(c),h=Math.floor(h)),t.previousTranslate=t.translate,t.translate=t.isHorizontal()?c:h,s.cssMode?o[t.isHorizontal()?"scrollLeft":"scrollTop"]=t.isHorizontal()?-c:-h:s.virtualTranslate||(t.isHorizontal()?c-=t.cssOverflowAdjustment():h-=t.cssOverflowAdjustment(),o.style.transform=`translate3d(${c}px, ${h}px, ${m}px)`);let y;const E=t.maxTranslate()-t.minTranslate();E===0?y=0:y=(r-t.minTranslate())/E,y!==u&&t.updateProgress(r),t.emit("setTranslate",t.translate,e)}function I2(){return-this.snapGrid[0]}function P2(){return-this.snapGrid[this.snapGrid.length-1]}function M2(r,e,t,n,s){r===void 0&&(r=0),e===void 0&&(e=this.params.speed),t===void 0&&(t=!0),n===void 0&&(n=!0);const o=this,{params:u,wrapperEl:c}=o;if(o.animating&&u.preventInteractionOnTransition)return!1;const h=o.minTranslate(),m=o.maxTranslate();let y;if(n&&r>h?y=h:n&&r<m?y=m:y=r,o.updateProgress(y),u.cssMode){const E=o.isHorizontal();if(e===0)c[E?"scrollLeft":"scrollTop"]=-y;else{if(!o.support.smoothScroll)return F_({swiper:o,targetPosition:-y,side:E?"left":"top"}),!0;c.scrollTo({[E?"left":"top"]:-y,behavior:"smooth"})}return!0}return e===0?(o.setTransition(0),o.setTranslate(y),t&&(o.emit("beforeTransitionStart",e,s),o.emit("transitionEnd"))):(o.setTransition(e),o.setTranslate(y),t&&(o.emit("beforeTransitionStart",e,s),o.emit("transitionStart")),o.animating||(o.animating=!0,o.onTranslateToWrapperTransitionEnd||(o.onTranslateToWrapperTransitionEnd=function(T){!o||o.destroyed||T.target===this&&(o.wrapperEl.removeEventListener("transitionend",o.onTranslateToWrapperTransitionEnd),o.onTranslateToWrapperTransitionEnd=null,delete o.onTranslateToWrapperTransitionEnd,t&&o.emit("transitionEnd"))}),o.wrapperEl.addEventListener("transitionend",o.onTranslateToWrapperTransitionEnd))),!0}var O2={getTranslate:k2,setTranslate:D2,minTranslate:I2,maxTranslate:P2,translateTo:M2};function F2(r,e){const t=this;t.params.cssMode||(t.wrapperEl.style.transitionDuration=`${r}ms`,t.wrapperEl.style.transitionDelay=r===0?"0ms":""),t.emit("setTransition",r,e)}function $_(r){let{swiper:e,runCallbacks:t,direction:n,step:s}=r;const{activeIndex:o,previousIndex:u}=e;let c=n;if(c||(o>u?c="next":o<u?c="prev":c="reset"),e.emit(`transition${s}`),t&&o!==u){if(c==="reset"){e.emit(`slideResetTransition${s}`);return}e.emit(`slideChangeTransition${s}`),c==="next"?e.emit(`slideNextTransition${s}`):e.emit(`slidePrevTransition${s}`)}}function N2(r,e){r===void 0&&(r=!0);const t=this,{params:n}=t;n.cssMode||(n.autoHeight&&t.updateAutoHeight(),$_({swiper:t,runCallbacks:r,direction:e,step:"Start"}))}function U2(r,e){r===void 0&&(r=!0);const t=this,{params:n}=t;t.animating=!1,!n.cssMode&&(t.setTransition(0),$_({swiper:t,runCallbacks:r,direction:e,step:"End"}))}var B2={setTransition:F2,transitionStart:N2,transitionEnd:U2};function $2(r,e,t,n,s){r===void 0&&(r=0),e===void 0&&(e=this.params.speed),t===void 0&&(t=!0),typeof r=="string"&&(r=parseInt(r,10));const o=this;let u=r;u<0&&(u=0);const{params:c,snapGrid:h,slidesGrid:m,previousIndex:y,activeIndex:E,rtlTranslate:T,wrapperEl:R,enabled:_}=o;if(o.animating&&c.preventInteractionOnTransition||!_&&!n&&!s)return!1;const L=Math.min(o.params.slidesPerGroupSkip,u);let M=L+Math.floor((u-L)/o.params.slidesPerGroup);M>=h.length&&(M=h.length-1);const F=-h[M];if(c.normalizeSlideIndex)for(let K=0;K<m.length;K+=1){const Y=-Math.floor(F*100),X=Math.floor(m[K]*100),ue=Math.floor(m[K+1]*100);typeof m[K+1]<"u"?Y>=X&&Y<ue-(ue-X)/2?u=K:Y>=X&&Y<ue&&(u=K+1):Y>=X&&(u=K)}if(o.initialized&&u!==E&&(!o.allowSlideNext&&(T?F>o.translate&&F>o.minTranslate():F<o.translate&&F<o.minTranslate())||!o.allowSlidePrev&&F>o.translate&&F>o.maxTranslate()&&(E||0)!==u))return!1;u!==(y||0)&&t&&o.emit("beforeSlideChangeStart"),o.updateProgress(F);let Z;if(u>E?Z="next":u<E?Z="prev":Z="reset",T&&-F===o.translate||!T&&F===o.translate)return o.updateActiveIndex(u),c.autoHeight&&o.updateAutoHeight(),o.updateSlidesClasses(),c.effect!=="slide"&&o.setTranslate(F),Z!=="reset"&&(o.transitionStart(t,Z),o.transitionEnd(t,Z)),!1;if(c.cssMode){const K=o.isHorizontal(),Y=T?F:-F;if(e===0){const X=o.virtual&&o.params.virtual.enabled;X&&(o.wrapperEl.style.scrollSnapType="none",o._immediateVirtual=!0),X&&!o._cssModeVirtualInitialSet&&o.params.initialSlide>0?(o._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{R[K?"scrollLeft":"scrollTop"]=Y})):R[K?"scrollLeft":"scrollTop"]=Y,X&&requestAnimationFrame(()=>{o.wrapperEl.style.scrollSnapType="",o._immediateVirtual=!1})}else{if(!o.support.smoothScroll)return F_({swiper:o,targetPosition:Y,side:K?"left":"top"}),!0;R.scrollTo({[K?"left":"top"]:Y,behavior:"smooth"})}return!0}return o.setTransition(e),o.setTranslate(F),o.updateActiveIndex(u),o.updateSlidesClasses(),o.emit("beforeTransitionStart",e,n),o.transitionStart(t,Z),e===0?o.transitionEnd(t,Z):o.animating||(o.animating=!0,o.onSlideToWrapperTransitionEnd||(o.onSlideToWrapperTransitionEnd=function(Y){!o||o.destroyed||Y.target===this&&(o.wrapperEl.removeEventListener("transitionend",o.onSlideToWrapperTransitionEnd),o.onSlideToWrapperTransitionEnd=null,delete o.onSlideToWrapperTransitionEnd,o.transitionEnd(t,Z))}),o.wrapperEl.addEventListener("transitionend",o.onSlideToWrapperTransitionEnd)),!0}function V2(r,e,t,n){r===void 0&&(r=0),e===void 0&&(e=this.params.speed),t===void 0&&(t=!0),typeof r=="string"&&(r=parseInt(r,10));const s=this;let o=r;return s.params.loop&&(s.virtual&&s.params.virtual.enabled?o=o+s.virtual.slidesBefore:o=s.getSlideIndexByData(o)),s.slideTo(o,e,t,n)}function z2(r,e,t){r===void 0&&(r=this.params.speed),e===void 0&&(e=!0);const n=this,{enabled:s,params:o,animating:u}=n;if(!s)return n;let c=o.slidesPerGroup;o.slidesPerView==="auto"&&o.slidesPerGroup===1&&o.slidesPerGroupAuto&&(c=Math.max(n.slidesPerViewDynamic("current",!0),1));const h=n.activeIndex<o.slidesPerGroupSkip?1:c,m=n.virtual&&o.virtual.enabled;if(o.loop){if(u&&!m&&o.loopPreventsSliding)return!1;if(n.loopFix({direction:"next"}),n._clientLeft=n.wrapperEl.clientLeft,n.activeIndex===n.slides.length-1&&o.cssMode)return requestAnimationFrame(()=>{n.slideTo(n.activeIndex+h,r,e,t)}),!0}return o.rewind&&n.isEnd?n.slideTo(0,r,e,t):n.slideTo(n.activeIndex+h,r,e,t)}function j2(r,e,t){r===void 0&&(r=this.params.speed),e===void 0&&(e=!0);const n=this,{params:s,snapGrid:o,slidesGrid:u,rtlTranslate:c,enabled:h,animating:m}=n;if(!h)return n;const y=n.virtual&&s.virtual.enabled;if(s.loop){if(m&&!y&&s.loopPreventsSliding)return!1;n.loopFix({direction:"prev"}),n._clientLeft=n.wrapperEl.clientLeft}const E=c?n.translate:-n.translate;function T(F){return F<0?-Math.floor(Math.abs(F)):Math.floor(F)}const R=T(E),_=o.map(F=>T(F));let L=o[_.indexOf(R)-1];if(typeof L>"u"&&s.cssMode){let F;o.forEach((Z,K)=>{R>=Z&&(F=K)}),typeof F<"u"&&(L=o[F>0?F-1:F])}let M=0;if(typeof L<"u"&&(M=u.indexOf(L),M<0&&(M=n.activeIndex-1),s.slidesPerView==="auto"&&s.slidesPerGroup===1&&s.slidesPerGroupAuto&&(M=M-n.slidesPerViewDynamic("previous",!0)+1,M=Math.max(M,0))),s.rewind&&n.isBeginning){const F=n.params.virtual&&n.params.virtual.enabled&&n.virtual?n.virtual.slides.length-1:n.slides.length-1;return n.slideTo(F,r,e,t)}else if(s.loop&&n.activeIndex===0&&s.cssMode)return requestAnimationFrame(()=>{n.slideTo(M,r,e,t)}),!0;return n.slideTo(M,r,e,t)}function H2(r,e,t){r===void 0&&(r=this.params.speed),e===void 0&&(e=!0);const n=this;return n.slideTo(n.activeIndex,r,e,t)}function G2(r,e,t,n){r===void 0&&(r=this.params.speed),e===void 0&&(e=!0),n===void 0&&(n=.5);const s=this;let o=s.activeIndex;const u=Math.min(s.params.slidesPerGroupSkip,o),c=u+Math.floor((o-u)/s.params.slidesPerGroup),h=s.rtlTranslate?s.translate:-s.translate;if(h>=s.snapGrid[c]){const m=s.snapGrid[c],y=s.snapGrid[c+1];h-m>(y-m)*n&&(o+=s.params.slidesPerGroup)}else{const m=s.snapGrid[c-1],y=s.snapGrid[c];h-m<=(y-m)*n&&(o-=s.params.slidesPerGroup)}return o=Math.max(o,0),o=Math.min(o,s.slidesGrid.length-1),s.slideTo(o,r,e,t)}function W2(){const r=this,{params:e,slidesEl:t}=r,n=e.slidesPerView==="auto"?r.slidesPerViewDynamic():e.slidesPerView;let s=r.clickedIndex,o;const u=r.isElement?"swiper-slide":`.${e.slideClass}`;if(e.loop){if(r.animating)return;o=parseInt(r.clickedSlide.getAttribute("data-swiper-slide-index"),10),e.centeredSlides?s<r.loopedSlides-n/2||s>r.slides.length-r.loopedSlides+n/2?(r.loopFix(),s=r.getSlideIndex(Eu(t,`${u}[data-swiper-slide-index="${o}"]`)[0]),Y1(()=>{r.slideTo(s)})):r.slideTo(s):s>r.slides.length-n?(r.loopFix(),s=r.getSlideIndex(Eu(t,`${u}[data-swiper-slide-index="${o}"]`)[0]),Y1(()=>{r.slideTo(s)})):r.slideTo(s)}else r.slideTo(s)}var K2={slideTo:$2,slideToLoop:V2,slideNext:z2,slidePrev:j2,slideReset:H2,slideToClosest:G2,slideToClickedSlide:W2};function q2(r){const e=this,{params:t,slidesEl:n}=e;if(!t.loop||e.virtual&&e.params.virtual.enabled)return;Eu(n,`.${t.slideClass}, swiper-slide`).forEach((o,u)=>{o.setAttribute("data-swiper-slide-index",u)}),e.loopFix({slideRealIndex:r,direction:t.centeredSlides?void 0:"next"})}function Y2(r){let{slideRealIndex:e,slideTo:t=!0,direction:n,setTranslate:s,activeSlideIndex:o,byController:u,byMousewheel:c}=r===void 0?{}:r;const h=this;if(!h.params.loop)return;h.emit("beforeLoopFix");const{slides:m,allowSlidePrev:y,allowSlideNext:E,slidesEl:T,params:R}=h;if(h.allowSlidePrev=!0,h.allowSlideNext=!0,h.virtual&&R.virtual.enabled){t&&(!R.centeredSlides&&h.snapIndex===0?h.slideTo(h.virtual.slides.length,0,!1,!0):R.centeredSlides&&h.snapIndex<R.slidesPerView?h.slideTo(h.virtual.slides.length+h.snapIndex,0,!1,!0):h.snapIndex===h.snapGrid.length-1&&h.slideTo(h.virtual.slidesBefore,0,!1,!0)),h.allowSlidePrev=y,h.allowSlideNext=E,h.emit("loopFix");return}const _=R.slidesPerView==="auto"?h.slidesPerViewDynamic():Math.ceil(parseFloat(R.slidesPerView,10));let L=R.loopedSlides||_;L%R.slidesPerGroup!==0&&(L+=R.slidesPerGroup-L%R.slidesPerGroup),h.loopedSlides=L;const M=[],F=[];let Z=h.activeIndex;typeof o>"u"?o=h.getSlideIndex(h.slides.filter(ie=>ie.classList.contains(R.slideActiveClass))[0]):Z=o;const K=n==="next"||!n,Y=n==="prev"||!n;let X=0,ue=0;if(o<L){X=Math.max(L-o,R.slidesPerGroup);for(let ie=0;ie<L-o;ie+=1){const ye=ie-Math.floor(ie/m.length)*m.length;M.push(m.length-ye-1)}}else if(o>h.slides.length-L*2){ue=Math.max(o-(h.slides.length-L*2),R.slidesPerGroup);for(let ie=0;ie<ue;ie+=1){const ye=ie-Math.floor(ie/m.length)*m.length;F.push(ye)}}if(Y&&M.forEach(ie=>{h.slides[ie].swiperLoopMoveDOM=!0,T.prepend(h.slides[ie]),h.slides[ie].swiperLoopMoveDOM=!1}),K&&F.forEach(ie=>{h.slides[ie].swiperLoopMoveDOM=!0,T.append(h.slides[ie]),h.slides[ie].swiperLoopMoveDOM=!1}),h.recalcSlides(),R.slidesPerView==="auto"&&h.updateSlides(),R.watchSlidesProgress&&h.updateSlidesOffset(),t){if(M.length>0&&Y)if(typeof e>"u"){const ie=h.slidesGrid[Z],de=h.slidesGrid[Z+X]-ie;c?h.setTranslate(h.translate-de):(h.slideTo(Z+X,0,!1,!0),s&&(h.touches[h.isHorizontal()?"startX":"startY"]+=de,h.touchEventsData.currentTranslate=h.translate))}else s&&(h.slideToLoop(e,0,!1,!0),h.touchEventsData.currentTranslate=h.translate);else if(F.length>0&&K)if(typeof e>"u"){const ie=h.slidesGrid[Z],de=h.slidesGrid[Z-ue]-ie;c?h.setTranslate(h.translate-de):(h.slideTo(Z-ue,0,!1,!0),s&&(h.touches[h.isHorizontal()?"startX":"startY"]+=de,h.touchEventsData.currentTranslate=h.translate))}else h.slideToLoop(e,0,!1,!0)}if(h.allowSlidePrev=y,h.allowSlideNext=E,h.controller&&h.controller.control&&!u){const ie={slideRealIndex:e,direction:n,setTranslate:s,activeSlideIndex:o,byController:!0};Array.isArray(h.controller.control)?h.controller.control.forEach(ye=>{!ye.destroyed&&ye.params.loop&&ye.loopFix({...ie,slideTo:ye.params.slidesPerView===R.slidesPerView?t:!1})}):h.controller.control instanceof h.constructor&&h.controller.control.params.loop&&h.controller.control.loopFix({...ie,slideTo:h.controller.control.params.slidesPerView===R.slidesPerView?t:!1})}h.emit("loopFix")}function X2(){const r=this,{params:e,slidesEl:t}=r;if(!e.loop||r.virtual&&r.params.virtual.enabled)return;r.recalcSlides();const n=[];r.slides.forEach(s=>{const o=typeof s.swiperSlideIndex>"u"?s.getAttribute("data-swiper-slide-index")*1:s.swiperSlideIndex;n[o]=s}),r.slides.forEach(s=>{s.removeAttribute("data-swiper-slide-index")}),n.forEach(s=>{t.append(s)}),r.recalcSlides(),r.slideTo(r.realIndex,0)}var Q2={loopCreate:q2,loopFix:Y2,loopDestroy:X2};function J2(r){const e=this;if(!e.params.simulateTouch||e.params.watchOverflow&&e.isLocked||e.params.cssMode)return;const t=e.params.touchEventsTarget==="container"?e.el:e.wrapperEl;e.isElement&&(e.__preventObserver__=!0),t.style.cursor="move",t.style.cursor=r?"grabbing":"grab",e.isElement&&requestAnimationFrame(()=>{e.__preventObserver__=!1})}function Z2(){const r=this;r.params.watchOverflow&&r.isLocked||r.params.cssMode||(r.isElement&&(r.__preventObserver__=!0),r[r.params.touchEventsTarget==="container"?"el":"wrapperEl"].style.cursor="",r.isElement&&requestAnimationFrame(()=>{r.__preventObserver__=!1}))}var e8={setGrabCursor:J2,unsetGrabCursor:Z2};function t8(r,e){e===void 0&&(e=this);function t(n){if(!n||n===cf()||n===Fa())return null;n.assignedSlot&&(n=n.assignedSlot);const s=n.closest(r);return!s&&!n.getRootNode?null:s||t(n.getRootNode().host)}return t(e)}function n8(r){const e=this,t=cf(),n=Fa(),s=e.touchEventsData;s.evCache.push(r);const{params:o,touches:u,enabled:c}=e;if(!c||!o.simulateTouch&&r.pointerType==="mouse"||e.animating&&o.preventInteractionOnTransition)return;!e.animating&&o.cssMode&&o.loop&&e.loopFix();let h=r;h.originalEvent&&(h=h.originalEvent);let m=h.target;if(o.touchEventsTarget==="wrapper"&&!e.wrapperEl.contains(m)||"which"in h&&h.which===3||"button"in h&&h.button>0||s.isTouched&&s.isMoved)return;const y=!!o.noSwipingClass&&o.noSwipingClass!=="",E=r.composedPath?r.composedPath():r.path;y&&h.target&&h.target.shadowRoot&&E&&(m=E[0]);const T=o.noSwipingSelector?o.noSwipingSelector:`.${o.noSwipingClass}`,R=!!(h.target&&h.target.shadowRoot);if(o.noSwiping&&(R?t8(T,m):m.closest(T))){e.allowClick=!0;return}if(o.swipeHandler&&!m.closest(o.swipeHandler))return;u.currentX=h.pageX,u.currentY=h.pageY;const _=u.currentX,L=u.currentY,M=o.edgeSwipeDetection||o.iOSEdgeSwipeDetection,F=o.edgeSwipeThreshold||o.iOSEdgeSwipeThreshold;if(M&&(_<=F||_>=n.innerWidth-F))if(M==="prevent")r.preventDefault();else return;Object.assign(s,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),u.startX=_,u.startY=L,s.touchStartTime=pv(),e.allowClick=!0,e.updateSize(),e.swipeDirection=void 0,o.threshold>0&&(s.allowThresholdMove=!1);let Z=!0;m.matches(s.focusableElements)&&(Z=!1,m.nodeName==="SELECT"&&(s.isTouched=!1)),t.activeElement&&t.activeElement.matches(s.focusableElements)&&t.activeElement!==m&&t.activeElement.blur();const K=Z&&e.allowTouchMove&&o.touchStartPreventDefault;(o.touchStartForcePreventDefault||K)&&!m.isContentEditable&&h.preventDefault(),o.freeMode&&o.freeMode.enabled&&e.freeMode&&e.animating&&!o.cssMode&&e.freeMode.onTouchStart(),e.emit("touchStart",h)}function r8(r){const e=cf(),t=this,n=t.touchEventsData,{params:s,touches:o,rtlTranslate:u,enabled:c}=t;if(!c||!s.simulateTouch&&r.pointerType==="mouse")return;let h=r;if(h.originalEvent&&(h=h.originalEvent),!n.isTouched){n.startMoving&&n.isScrolling&&t.emit("touchMoveOpposite",h);return}const m=n.evCache.findIndex(ie=>ie.pointerId===h.pointerId);m>=0&&(n.evCache[m]=h);const y=n.evCache.length>1?n.evCache[0]:h,E=y.pageX,T=y.pageY;if(h.preventedByNestedSwiper){o.startX=E,o.startY=T;return}if(!t.allowTouchMove){h.target.matches(n.focusableElements)||(t.allowClick=!1),n.isTouched&&(Object.assign(o,{startX:E,startY:T,prevX:t.touches.currentX,prevY:t.touches.currentY,currentX:E,currentY:T}),n.touchStartTime=pv());return}if(s.touchReleaseOnEdges&&!s.loop){if(t.isVertical()){if(T<o.startY&&t.translate<=t.maxTranslate()||T>o.startY&&t.translate>=t.minTranslate()){n.isTouched=!1,n.isMoved=!1;return}}else if(E<o.startX&&t.translate<=t.maxTranslate()||E>o.startX&&t.translate>=t.minTranslate())return}if(e.activeElement&&h.target===e.activeElement&&h.target.matches(n.focusableElements)){n.isMoved=!0,t.allowClick=!1;return}if(n.allowTouchCallbacks&&t.emit("touchMove",h),h.targetTouches&&h.targetTouches.length>1)return;o.currentX=E,o.currentY=T;const R=o.currentX-o.startX,_=o.currentY-o.startY;if(t.params.threshold&&Math.sqrt(R**2+_**2)<t.params.threshold)return;if(typeof n.isScrolling>"u"){let ie;t.isHorizontal()&&o.currentY===o.startY||t.isVertical()&&o.currentX===o.startX?n.isScrolling=!1:R*R+_*_>=25&&(ie=Math.atan2(Math.abs(_),Math.abs(R))*180/Math.PI,n.isScrolling=t.isHorizontal()?ie>s.touchAngle:90-ie>s.touchAngle)}if(n.isScrolling&&t.emit("touchMoveOpposite",h),typeof n.startMoving>"u"&&(o.currentX!==o.startX||o.currentY!==o.startY)&&(n.startMoving=!0),n.isScrolling||t.zoom&&t.params.zoom&&t.params.zoom.enabled&&n.evCache.length>1){n.isTouched=!1;return}if(!n.startMoving)return;t.allowClick=!1,!s.cssMode&&h.cancelable&&h.preventDefault(),s.touchMoveStopPropagation&&!s.nested&&h.stopPropagation();let L=t.isHorizontal()?R:_,M=t.isHorizontal()?o.currentX-o.previousX:o.currentY-o.previousY;s.oneWayMovement&&(L=Math.abs(L)*(u?1:-1),M=Math.abs(M)*(u?1:-1)),o.diff=L,L*=s.touchRatio,u&&(L=-L,M=-M);const F=t.touchesDirection;t.swipeDirection=L>0?"prev":"next",t.touchesDirection=M>0?"prev":"next";const Z=t.params.loop&&!s.cssMode,K=t.swipeDirection==="next"&&t.allowSlideNext||t.swipeDirection==="prev"&&t.allowSlidePrev;if(!n.isMoved){if(Z&&K&&t.loopFix({direction:t.swipeDirection}),n.startTranslate=t.getTranslate(),t.setTransition(0),t.animating){const ie=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});t.wrapperEl.dispatchEvent(ie)}n.allowMomentumBounce=!1,s.grabCursor&&(t.allowSlideNext===!0||t.allowSlidePrev===!0)&&t.setGrabCursor(!0),t.emit("sliderFirstMove",h)}let Y;n.isMoved&&F!==t.touchesDirection&&Z&&K&&Math.abs(L)>=1&&(t.loopFix({direction:t.swipeDirection,setTranslate:!0}),Y=!0),t.emit("sliderMove",h),n.isMoved=!0,n.currentTranslate=L+n.startTranslate;let X=!0,ue=s.resistanceRatio;if(s.touchReleaseOnEdges&&(ue=0),L>0?(Z&&K&&!Y&&n.currentTranslate>(s.centeredSlides?t.minTranslate()-t.size/2:t.minTranslate())&&t.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),n.currentTranslate>t.minTranslate()&&(X=!1,s.resistance&&(n.currentTranslate=t.minTranslate()-1+(-t.minTranslate()+n.startTranslate+L)**ue))):L<0&&(Z&&K&&!Y&&n.currentTranslate<(s.centeredSlides?t.maxTranslate()+t.size/2:t.maxTranslate())&&t.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:t.slides.length-(s.slidesPerView==="auto"?t.slidesPerViewDynamic():Math.ceil(parseFloat(s.slidesPerView,10)))}),n.currentTranslate<t.maxTranslate()&&(X=!1,s.resistance&&(n.currentTranslate=t.maxTranslate()+1-(t.maxTranslate()-n.startTranslate-L)**ue))),X&&(h.preventedByNestedSwiper=!0),!t.allowSlideNext&&t.swipeDirection==="next"&&n.currentTranslate<n.startTranslate&&(n.currentTranslate=n.startTranslate),!t.allowSlidePrev&&t.swipeDirection==="prev"&&n.currentTranslate>n.startTranslate&&(n.currentTranslate=n.startTranslate),!t.allowSlidePrev&&!t.allowSlideNext&&(n.currentTranslate=n.startTranslate),s.threshold>0)if(Math.abs(L)>s.threshold||n.allowThresholdMove){if(!n.allowThresholdMove){n.allowThresholdMove=!0,o.startX=o.currentX,o.startY=o.currentY,n.currentTranslate=n.startTranslate,o.diff=t.isHorizontal()?o.currentX-o.startX:o.currentY-o.startY;return}}else{n.currentTranslate=n.startTranslate;return}!s.followFinger||s.cssMode||((s.freeMode&&s.freeMode.enabled&&t.freeMode||s.watchSlidesProgress)&&(t.updateActiveIndex(),t.updateSlidesClasses()),s.freeMode&&s.freeMode.enabled&&t.freeMode&&t.freeMode.onTouchMove(),t.updateProgress(n.currentTranslate),t.setTranslate(n.currentTranslate))}function i8(r){const e=this,t=e.touchEventsData,n=t.evCache.findIndex(K=>K.pointerId===r.pointerId);if(n>=0&&t.evCache.splice(n,1),["pointercancel","pointerout","pointerleave","contextmenu"].includes(r.type)&&!(["pointercancel","contextmenu"].includes(r.type)&&(e.browser.isSafari||e.browser.isWebView)))return;const{params:s,touches:o,rtlTranslate:u,slidesGrid:c,enabled:h}=e;if(!h||!s.simulateTouch&&r.pointerType==="mouse")return;let m=r;if(m.originalEvent&&(m=m.originalEvent),t.allowTouchCallbacks&&e.emit("touchEnd",m),t.allowTouchCallbacks=!1,!t.isTouched){t.isMoved&&s.grabCursor&&e.setGrabCursor(!1),t.isMoved=!1,t.startMoving=!1;return}s.grabCursor&&t.isMoved&&t.isTouched&&(e.allowSlideNext===!0||e.allowSlidePrev===!0)&&e.setGrabCursor(!1);const y=pv(),E=y-t.touchStartTime;if(e.allowClick){const K=m.path||m.composedPath&&m.composedPath();e.updateClickedSlide(K&&K[0]||m.target,K),e.emit("tap click",m),E<300&&y-t.lastClickTime<300&&e.emit("doubleTap doubleClick",m)}if(t.lastClickTime=pv(),Y1(()=>{e.destroyed||(e.allowClick=!0)}),!t.isTouched||!t.isMoved||!e.swipeDirection||o.diff===0||t.currentTranslate===t.startTranslate){t.isTouched=!1,t.isMoved=!1,t.startMoving=!1;return}t.isTouched=!1,t.isMoved=!1,t.startMoving=!1;let T;if(s.followFinger?T=u?e.translate:-e.translate:T=-t.currentTranslate,s.cssMode)return;if(s.freeMode&&s.freeMode.enabled){e.freeMode.onTouchEnd({currentPos:T});return}let R=0,_=e.slidesSizesGrid[0];for(let K=0;K<c.length;K+=K<s.slidesPerGroupSkip?1:s.slidesPerGroup){const Y=K<s.slidesPerGroupSkip-1?1:s.slidesPerGroup;typeof c[K+Y]<"u"?T>=c[K]&&T<c[K+Y]&&(R=K,_=c[K+Y]-c[K]):T>=c[K]&&(R=K,_=c[c.length-1]-c[c.length-2])}let L=null,M=null;s.rewind&&(e.isBeginning?M=s.virtual&&s.virtual.enabled&&e.virtual?e.virtual.slides.length-1:e.slides.length-1:e.isEnd&&(L=0));const F=(T-c[R])/_,Z=R<s.slidesPerGroupSkip-1?1:s.slidesPerGroup;if(E>s.longSwipesMs){if(!s.longSwipes){e.slideTo(e.activeIndex);return}e.swipeDirection==="next"&&(F>=s.longSwipesRatio?e.slideTo(s.rewind&&e.isEnd?L:R+Z):e.slideTo(R)),e.swipeDirection==="prev"&&(F>1-s.longSwipesRatio?e.slideTo(R+Z):M!==null&&F<0&&Math.abs(F)>s.longSwipesRatio?e.slideTo(M):e.slideTo(R))}else{if(!s.shortSwipes){e.slideTo(e.activeIndex);return}e.navigation&&(m.target===e.navigation.nextEl||m.target===e.navigation.prevEl)?m.target===e.navigation.nextEl?e.slideTo(R+Z):e.slideTo(R):(e.swipeDirection==="next"&&e.slideTo(L!==null?L:R+Z),e.swipeDirection==="prev"&&e.slideTo(M!==null?M:R))}}function V_(){const r=this,{params:e,el:t}=r;if(t&&t.offsetWidth===0)return;e.breakpoints&&r.setBreakpoint();const{allowSlideNext:n,allowSlidePrev:s,snapGrid:o}=r,u=r.virtual&&r.params.virtual.enabled;r.allowSlideNext=!0,r.allowSlidePrev=!0,r.updateSize(),r.updateSlides(),r.updateSlidesClasses();const c=u&&e.loop;(e.slidesPerView==="auto"||e.slidesPerView>1)&&r.isEnd&&!r.isBeginning&&!r.params.centeredSlides&&!c?r.slideTo(r.slides.length-1,0,!1,!0):r.params.loop&&!u?r.slideToLoop(r.realIndex,0,!1,!0):r.slideTo(r.activeIndex,0,!1,!0),r.autoplay&&r.autoplay.running&&r.autoplay.paused&&(clearTimeout(r.autoplay.resizeTimeout),r.autoplay.resizeTimeout=setTimeout(()=>{r.autoplay&&r.autoplay.running&&r.autoplay.paused&&r.autoplay.resume()},500)),r.allowSlidePrev=s,r.allowSlideNext=n,r.params.watchOverflow&&o!==r.snapGrid&&r.checkOverflow()}function s8(r){const e=this;e.enabled&&(e.allowClick||(e.params.preventClicks&&r.preventDefault(),e.params.preventClicksPropagation&&e.animating&&(r.stopPropagation(),r.stopImmediatePropagation())))}function a8(){const r=this,{wrapperEl:e,rtlTranslate:t,enabled:n}=r;if(!n)return;r.previousTranslate=r.translate,r.isHorizontal()?r.translate=-e.scrollLeft:r.translate=-e.scrollTop,r.translate===0&&(r.translate=0),r.updateActiveIndex(),r.updateSlidesClasses();let s;const o=r.maxTranslate()-r.minTranslate();o===0?s=0:s=(r.translate-r.minTranslate())/o,s!==r.progress&&r.updateProgress(t?-r.translate:r.translate),r.emit("setTranslate",r.translate,!1)}function o8(r){const e=this;vv(e,r.target),!(e.params.cssMode||e.params.slidesPerView!=="auto"&&!e.params.autoHeight)&&e.update()}let z_=!1;function l8(){}const j_=(r,e)=>{const t=cf(),{params:n,el:s,wrapperEl:o,device:u}=r,c=!!n.nested,h=e==="on"?"addEventListener":"removeEventListener",m=e;s[h]("pointerdown",r.onTouchStart,{passive:!1}),t[h]("pointermove",r.onTouchMove,{passive:!1,capture:c}),t[h]("pointerup",r.onTouchEnd,{passive:!0}),t[h]("pointercancel",r.onTouchEnd,{passive:!0}),t[h]("pointerout",r.onTouchEnd,{passive:!0}),t[h]("pointerleave",r.onTouchEnd,{passive:!0}),t[h]("contextmenu",r.onTouchEnd,{passive:!0}),(n.preventClicks||n.preventClicksPropagation)&&s[h]("click",r.onClick,!0),n.cssMode&&o[h]("scroll",r.onScroll),n.updateOnWindowResize?r[m](u.ios||u.android?"resize orientationchange observerUpdate":"resize observerUpdate",V_,!0):r[m]("observerUpdate",V_,!0),s[h]("load",r.onLoad,{capture:!0})};function u8(){const r=this,e=cf(),{params:t}=r;r.onTouchStart=n8.bind(r),r.onTouchMove=r8.bind(r),r.onTouchEnd=i8.bind(r),t.cssMode&&(r.onScroll=a8.bind(r)),r.onClick=s8.bind(r),r.onLoad=o8.bind(r),z_||(e.addEventListener("touchstart",l8),z_=!0),j_(r,"on")}function c8(){j_(this,"off")}var f8={attachEvents:u8,detachEvents:c8};const H_=(r,e)=>r.grid&&e.grid&&e.grid.rows>1;function d8(){const r=this,{realIndex:e,initialized:t,params:n,el:s}=r,o=n.breakpoints;if(!o||o&&Object.keys(o).length===0)return;const u=r.getBreakpoint(o,r.params.breakpointsBase,r.el);if(!u||r.currentBreakpoint===u)return;const h=(u in o?o[u]:void 0)||r.originalParams,m=H_(r,n),y=H_(r,h),E=n.enabled;m&&!y?(s.classList.remove(`${n.containerModifierClass}grid`,`${n.containerModifierClass}grid-column`),r.emitContainerClasses()):!m&&y&&(s.classList.add(`${n.containerModifierClass}grid`),(h.grid.fill&&h.grid.fill==="column"||!h.grid.fill&&n.grid.fill==="column")&&s.classList.add(`${n.containerModifierClass}grid-column`),r.emitContainerClasses()),["navigation","pagination","scrollbar"].forEach(F=>{if(typeof h[F]>"u")return;const Z=n[F]&&n[F].enabled,K=h[F]&&h[F].enabled;Z&&!K&&r[F].disable(),!Z&&K&&r[F].enable()});const T=h.direction&&h.direction!==n.direction,R=n.loop&&(h.slidesPerView!==n.slidesPerView||T),_=n.loop;T&&t&&r.changeDirection(),Na(r.params,h);const L=r.params.enabled,M=r.params.loop;Object.assign(r,{allowTouchMove:r.params.allowTouchMove,allowSlideNext:r.params.allowSlideNext,allowSlidePrev:r.params.allowSlidePrev}),E&&!L?r.disable():!E&&L&&r.enable(),r.currentBreakpoint=u,r.emit("_beforeBreakpoint",h),t&&(R?(r.loopDestroy(),r.loopCreate(e),r.updateSlides()):!_&&M?(r.loopCreate(e),r.updateSlides()):_&&!M&&r.loopDestroy()),r.emit("breakpoint",h)}function h8(r,e,t){if(e===void 0&&(e="window"),!r||e==="container"&&!t)return;let n=!1;const s=Fa(),o=e==="window"?s.innerHeight:t.clientHeight,u=Object.keys(r).map(c=>{if(typeof c=="string"&&c.indexOf("@")===0){const h=parseFloat(c.substr(1));return{value:o*h,point:c}}return{value:c,point:c}});u.sort((c,h)=>parseInt(c.value,10)-parseInt(h.value,10));for(let c=0;c<u.length;c+=1){const{point:h,value:m}=u[c];e==="window"?s.matchMedia(`(min-width: ${m}px)`).matches&&(n=h):m<=t.clientWidth&&(n=h)}return n||"max"}var p8={setBreakpoint:d8,getBreakpoint:h8};function m8(r,e){const t=[];return r.forEach(n=>{typeof n=="object"?Object.keys(n).forEach(s=>{n[s]&&t.push(e+s)}):typeof n=="string"&&t.push(e+n)}),t}function g8(){const r=this,{classNames:e,params:t,rtl:n,el:s,device:o}=r,u=m8(["initialized",t.direction,{"free-mode":r.params.freeMode&&t.freeMode.enabled},{autoheight:t.autoHeight},{rtl:n},{grid:t.grid&&t.grid.rows>1},{"grid-column":t.grid&&t.grid.rows>1&&t.grid.fill==="column"},{android:o.android},{ios:o.ios},{"css-mode":t.cssMode},{centered:t.cssMode&&t.centeredSlides},{"watch-progress":t.watchSlidesProgress}],t.containerModifierClass);e.push(...u),s.classList.add(...e),r.emitContainerClasses()}function v8(){const r=this,{el:e,classNames:t}=r;e.classList.remove(...t),r.emitContainerClasses()}var y8={addClasses:g8,removeClasses:v8};function S8(){const r=this,{isLocked:e,params:t}=r,{slidesOffsetBefore:n}=t;if(n){const s=r.slides.length-1,o=r.slidesGrid[s]+r.slidesSizesGrid[s]+n*2;r.isLocked=r.size>o}else r.isLocked=r.snapGrid.length===1;t.allowSlideNext===!0&&(r.allowSlideNext=!r.isLocked),t.allowSlidePrev===!0&&(r.allowSlidePrev=!r.isLocked),e&&e!==r.isLocked&&(r.isEnd=!1),e!==r.isLocked&&r.emit(r.isLocked?"lock":"unlock")}var E8={checkOverflow:S8},tE={init:!0,direction:"horizontal",oneWayMovement:!1,touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopedSlides:null,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function x8(r,e){return function(n){n===void 0&&(n={});const s=Object.keys(n)[0],o=n[s];if(typeof o!="object"||o===null){Na(e,n);return}if(r[s]===!0&&(r[s]={enabled:!0}),s==="navigation"&&r[s]&&r[s].enabled&&!r[s].prevEl&&!r[s].nextEl&&(r[s].auto=!0),["pagination","scrollbar"].indexOf(s)>=0&&r[s]&&r[s].enabled&&!r[s].el&&(r[s].auto=!0),!(s in r&&"enabled"in o)){Na(e,n);return}typeof r[s]=="object"&&!("enabled"in r[s])&&(r[s].enabled=!0),r[s]||(r[s]={enabled:!1}),Na(e,n)}}const nE={eventsEmitter:y2,update:L2,translate:O2,transition:B2,slide:K2,loop:Q2,grabCursor:e8,events:f8,breakpoints:p8,checkOverflow:E8,classes:y8},rE={};let iE=class uc{constructor(){let e,t;for(var n=arguments.length,s=new Array(n),o=0;o<n;o++)s[o]=arguments[o];s.length===1&&s[0].constructor&&Object.prototype.toString.call(s[0]).slice(8,-1)==="Object"?t=s[0]:[e,t]=s,t||(t={}),t=Na({},t),e&&!t.el&&(t.el=e);const u=cf();if(t.el&&typeof t.el=="string"&&u.querySelectorAll(t.el).length>1){const y=[];return u.querySelectorAll(t.el).forEach(E=>{const T=Na({},t,{el:E});y.push(new uc(T))}),y}const c=this;c.__swiper__=!0,c.support=B_(),c.device=h2({userAgent:t.userAgent}),c.browser=m2(),c.eventsListeners={},c.eventsAnyListeners=[],c.modules=[...c.__modules__],t.modules&&Array.isArray(t.modules)&&c.modules.push(...t.modules);const h={};c.modules.forEach(y=>{y({params:t,swiper:c,extendParams:x8(t,h),on:c.on.bind(c),once:c.once.bind(c),off:c.off.bind(c),emit:c.emit.bind(c)})});const m=Na({},tE,h);return c.params=Na({},m,rE,t),c.originalParams=Na({},c.params),c.passedParams=Na({},t),c.params&&c.params.on&&Object.keys(c.params.on).forEach(y=>{c.on(y,c.params.on[y])}),c.params&&c.params.onAny&&c.onAny(c.params.onAny),Object.assign(c,{enabled:c.params.enabled,el:e,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return c.params.direction==="horizontal"},isVertical(){return c.params.direction==="vertical"},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:c.params.allowSlideNext,allowSlidePrev:c.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:c.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,evCache:[]},allowClick:!0,allowTouchMove:c.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),c.emit("_swiper"),c.params.init&&c.init(),c}getSlideIndex(e){const{slidesEl:t,params:n}=this,s=Eu(t,`.${n.slideClass}, swiper-slide`),o=N_(s[0]);return N_(e)-o}getSlideIndexByData(e){return this.getSlideIndex(this.slides.filter(t=>t.getAttribute("data-swiper-slide-index")*1===e)[0])}recalcSlides(){const e=this,{slidesEl:t,params:n}=e;e.slides=Eu(t,`.${n.slideClass}, swiper-slide`)}enable(){const e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))}disable(){const e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))}setProgress(e,t){const n=this;e=Math.min(Math.max(e,0),1);const s=n.minTranslate(),u=(n.maxTranslate()-s)*e+s;n.translateTo(u,typeof t>"u"?0:t),n.updateActiveIndex(),n.updateSlidesClasses()}emitContainerClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=e.el.className.split(" ").filter(n=>n.indexOf("swiper")===0||n.indexOf(e.params.containerModifierClass)===0);e.emit("_containerClasses",t.join(" "))}getSlideClasses(e){const t=this;return t.destroyed?"":e.className.split(" ").filter(n=>n.indexOf("swiper-slide")===0||n.indexOf(t.params.slideClass)===0).join(" ")}emitSlidesClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=[];e.slides.forEach(n=>{const s=e.getSlideClasses(n);t.push({slideEl:n,classNames:s}),e.emit("_slideClass",n,s)}),e.emit("_slideClasses",t)}slidesPerViewDynamic(e,t){e===void 0&&(e="current"),t===void 0&&(t=!1);const n=this,{params:s,slides:o,slidesGrid:u,slidesSizesGrid:c,size:h,activeIndex:m}=n;let y=1;if(typeof s.slidesPerView=="number")return s.slidesPerView;if(s.centeredSlides){let E=o[m]?o[m].swiperSlideSize:0,T;for(let R=m+1;R<o.length;R+=1)o[R]&&!T&&(E+=o[R].swiperSlideSize,y+=1,E>h&&(T=!0));for(let R=m-1;R>=0;R-=1)o[R]&&!T&&(E+=o[R].swiperSlideSize,y+=1,E>h&&(T=!0))}else if(e==="current")for(let E=m+1;E<o.length;E+=1)(t?u[E]+c[E]-u[m]<h:u[E]-u[m]<h)&&(y+=1);else for(let E=m-1;E>=0;E-=1)u[m]-u[E]<h&&(y+=1);return y}update(){const e=this;if(!e||e.destroyed)return;const{snapGrid:t,params:n}=e;n.breakpoints&&e.setBreakpoint(),[...e.el.querySelectorAll('[loading="lazy"]')].forEach(u=>{u.complete&&vv(e,u)}),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses();function s(){const u=e.rtlTranslate?e.translate*-1:e.translate,c=Math.min(Math.max(u,e.maxTranslate()),e.minTranslate());e.setTranslate(c),e.updateActiveIndex(),e.updateSlidesClasses()}let o;if(n.freeMode&&n.freeMode.enabled&&!n.cssMode)s(),n.autoHeight&&e.updateAutoHeight();else{if((n.slidesPerView==="auto"||n.slidesPerView>1)&&e.isEnd&&!n.centeredSlides){const u=e.virtual&&n.virtual.enabled?e.virtual.slides:e.slides;o=e.slideTo(u.length-1,0,!1,!0)}else o=e.slideTo(e.activeIndex,0,!1,!0);o||s()}n.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}changeDirection(e,t){t===void 0&&(t=!0);const n=this,s=n.params.direction;return e||(e=s==="horizontal"?"vertical":"horizontal"),e===s||e!=="horizontal"&&e!=="vertical"||(n.el.classList.remove(`${n.params.containerModifierClass}${s}`),n.el.classList.add(`${n.params.containerModifierClass}${e}`),n.emitContainerClasses(),n.params.direction=e,n.slides.forEach(o=>{e==="vertical"?o.style.width="":o.style.height=""}),n.emit("changeDirection"),t&&n.update()),n}changeLanguageDirection(e){const t=this;t.rtl&&e==="rtl"||!t.rtl&&e==="ltr"||(t.rtl=e==="rtl",t.rtlTranslate=t.params.direction==="horizontal"&&t.rtl,t.rtl?(t.el.classList.add(`${t.params.containerModifierClass}rtl`),t.el.dir="rtl"):(t.el.classList.remove(`${t.params.containerModifierClass}rtl`),t.el.dir="ltr"),t.update())}mount(e){const t=this;if(t.mounted)return!0;let n=e||t.params.el;if(typeof n=="string"&&(n=document.querySelector(n)),!n)return!1;n.swiper=t,n.parentNode&&n.parentNode.host&&n.parentNode.host.nodeName==="SWIPER-CONTAINER"&&(t.isElement=!0);const s=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`;let u=n&&n.shadowRoot&&n.shadowRoot.querySelector?n.shadowRoot.querySelector(s()):Eu(n,s())[0];return!u&&t.params.createElements&&(u=o2("div",t.params.wrapperClass),n.append(u),Eu(n,`.${t.params.slideClass}`).forEach(c=>{u.append(c)})),Object.assign(t,{el:n,wrapperEl:u,slidesEl:t.isElement&&!n.parentNode.host.slideSlots?n.parentNode.host:u,hostEl:t.isElement?n.parentNode.host:n,mounted:!0,rtl:n.dir.toLowerCase()==="rtl"||Sc(n,"direction")==="rtl",rtlTranslate:t.params.direction==="horizontal"&&(n.dir.toLowerCase()==="rtl"||Sc(n,"direction")==="rtl"),wrongRTL:Sc(u,"display")==="-webkit-box"}),!0}init(e){const t=this;if(t.initialized||t.mount(e)===!1)return t;t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.loop&&t.virtual&&t.params.virtual.enabled?t.slideTo(t.params.initialSlide+t.virtual.slidesBefore,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.params.loop&&t.loopCreate(),t.attachEvents();const s=[...t.el.querySelectorAll('[loading="lazy"]')];return t.isElement&&s.push(...t.hostEl.querySelectorAll('[loading="lazy"]')),s.forEach(o=>{o.complete?vv(t,o):o.addEventListener("load",u=>{vv(t,u.target)})}),eE(t),t.initialized=!0,eE(t),t.emit("init"),t.emit("afterInit"),t}destroy(e,t){e===void 0&&(e=!0),t===void 0&&(t=!0);const n=this,{params:s,el:o,wrapperEl:u,slides:c}=n;return typeof n.params>"u"||n.destroyed||(n.emit("beforeDestroy"),n.initialized=!1,n.detachEvents(),s.loop&&n.loopDestroy(),t&&(n.removeClasses(),o.removeAttribute("style"),u.removeAttribute("style"),c&&c.length&&c.forEach(h=>{h.classList.remove(s.slideVisibleClass,s.slideActiveClass,s.slideNextClass,s.slidePrevClass),h.removeAttribute("style"),h.removeAttribute("data-swiper-slide-index")})),n.emit("destroy"),Object.keys(n.eventsListeners).forEach(h=>{n.off(h)}),e!==!1&&(n.el.swiper=null,r2(n)),n.destroyed=!0),null}static extendDefaults(e){Na(rE,e)}static get extendedDefaults(){return rE}static get defaults(){return tE}static installModule(e){uc.prototype.__modules__||(uc.prototype.__modules__=[]);const t=uc.prototype.__modules__;typeof e=="function"&&t.indexOf(e)<0&&t.push(e)}static use(e){return Array.isArray(e)?(e.forEach(t=>uc.installModule(t)),uc):(uc.installModule(e),uc)}};Object.keys(nE).forEach(r=>{Object.keys(nE[r]).forEach(e=>{iE.prototype[e]=nE[r][e]})}),iE.use([g2,v2]);const G_=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","breakpointsBase","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopedSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideNextClass","slidePrevClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function ff(r){return typeof r=="object"&&r!==null&&r.constructor&&Object.prototype.toString.call(r).slice(8,-1)==="Object"&&!r.__swiper__}function df(r,e){const t=["__proto__","constructor","prototype"];Object.keys(e).filter(n=>t.indexOf(n)<0).forEach(n=>{typeof r[n]>"u"?r[n]=e[n]:ff(e[n])&&ff(r[n])&&Object.keys(e[n]).length>0?e[n].__swiper__?r[n]=e[n]:df(r[n],e[n]):r[n]=e[n]})}function W_(r){return r===void 0&&(r={}),r.navigation&&typeof r.navigation.nextEl>"u"&&typeof r.navigation.prevEl>"u"}function K_(r){return r===void 0&&(r={}),r.pagination&&typeof r.pagination.el>"u"}function q_(r){return r===void 0&&(r={}),r.scrollbar&&typeof r.scrollbar.el>"u"}function Y_(r){r===void 0&&(r="");const e=r.split(" ").map(n=>n.trim()).filter(n=>!!n),t=[];return e.forEach(n=>{t.indexOf(n)<0&&t.push(n)}),t.join(" ")}function b8(r){return r===void 0&&(r=""),r?r.includes("swiper-wrapper")?r:`swiper-wrapper ${r}`:"swiper-wrapper"}function T8(r){let{swiper:e,slides:t,passedParams:n,changedParams:s,nextEl:o,prevEl:u,scrollbarEl:c,paginationEl:h}=r;const m=s.filter(de=>de!=="children"&&de!=="direction"&&de!=="wrapperClass"),{params:y,pagination:E,navigation:T,scrollbar:R,virtual:_,thumbs:L}=e;let M,F,Z,K,Y,X,ue,ie;s.includes("thumbs")&&n.thumbs&&n.thumbs.swiper&&y.thumbs&&!y.thumbs.swiper&&(M=!0),s.includes("controller")&&n.controller&&n.controller.control&&y.controller&&!y.controller.control&&(F=!0),s.includes("pagination")&&n.pagination&&(n.pagination.el||h)&&(y.pagination||y.pagination===!1)&&E&&!E.el&&(Z=!0),s.includes("scrollbar")&&n.scrollbar&&(n.scrollbar.el||c)&&(y.scrollbar||y.scrollbar===!1)&&R&&!R.el&&(K=!0),s.includes("navigation")&&n.navigation&&(n.navigation.prevEl||u)&&(n.navigation.nextEl||o)&&(y.navigation||y.navigation===!1)&&T&&!T.prevEl&&!T.nextEl&&(Y=!0);const ye=de=>{e[de]&&(e[de].destroy(),de==="navigation"?(e.isElement&&(e[de].prevEl.remove(),e[de].nextEl.remove()),y[de].prevEl=void 0,y[de].nextEl=void 0,e[de].prevEl=void 0,e[de].nextEl=void 0):(e.isElement&&e[de].el.remove(),y[de].el=void 0,e[de].el=void 0))};s.includes("loop")&&e.isElement&&(y.loop&&!n.loop?X=!0:!y.loop&&n.loop?ue=!0:ie=!0),m.forEach(de=>{if(ff(y[de])&&ff(n[de]))df(y[de],n[de]),(de==="navigation"||de==="pagination"||de==="scrollbar")&&"enabled"in n[de]&&!n[de].enabled&&ye(de);else{const Re=n[de];(Re===!0||Re===!1)&&(de==="navigation"||de==="pagination"||de==="scrollbar")?Re===!1&&ye(de):y[de]=n[de]}}),m.includes("controller")&&!F&&e.controller&&e.controller.control&&y.controller&&y.controller.control&&(e.controller.control=y.controller.control),s.includes("children")&&t&&_&&y.virtual.enabled&&(_.slides=t,_.update(!0)),s.includes("children")&&t&&y.loop&&(ie=!0),M&&L.init()&&L.update(!0),F&&(e.controller.control=y.controller.control),Z&&(e.isElement&&(!h||typeof h=="string")&&(h=document.createElement("div"),h.classList.add("swiper-pagination"),h.part.add("pagination"),e.el.appendChild(h)),h&&(y.pagination.el=h),E.init(),E.render(),E.update()),K&&(e.isElement&&(!c||typeof c=="string")&&(c=document.createElement("div"),c.classList.add("swiper-scrollbar"),c.part.add("scrollbar"),e.el.appendChild(c)),c&&(y.scrollbar.el=c),R.init(),R.updateSize(),R.setTranslate()),Y&&(e.isElement&&((!o||typeof o=="string")&&(o=document.createElement("div"),o.classList.add("swiper-button-next"),o.innerHTML=e.hostEl.constructor.nextButtonSvg,o.part.add("button-next"),e.el.appendChild(o)),(!u||typeof u=="string")&&(u=document.createElement("div"),u.classList.add("swiper-button-prev"),u.innerHTML=e.hostEl.constructor.prevButtonSvg,u.part.add("button-prev"),e.el.appendChild(u))),o&&(y.navigation.nextEl=o),u&&(y.navigation.prevEl=u),T.init(),T.update()),s.includes("allowSlideNext")&&(e.allowSlideNext=n.allowSlideNext),s.includes("allowSlidePrev")&&(e.allowSlidePrev=n.allowSlidePrev),s.includes("direction")&&e.changeDirection(n.direction,!1),(X||ie)&&e.loopDestroy(),(ue||ie)&&e.loopCreate(),e.update()}function w8(r,e){r===void 0&&(r={}),e===void 0&&(e=!0);const t={on:{}},n={},s={};df(t,tE),t._emitClasses=!0,t.init=!1;const o={},u=G_.map(h=>h.replace(/_/,"")),c=Object.assign({},r);return Object.keys(c).forEach(h=>{typeof r[h]>"u"||(u.indexOf(h)>=0?ff(r[h])?(t[h]={},s[h]={},df(t[h],r[h]),df(s[h],r[h])):(t[h]=r[h],s[h]=r[h]):h.search(/on[A-Z]/)===0&&typeof r[h]=="function"?e?n[`${h[2].toLowerCase()}${h.substr(3)}`]=r[h]:t.on[`${h[2].toLowerCase()}${h.substr(3)}`]=r[h]:o[h]=r[h])}),["navigation","pagination","scrollbar"].forEach(h=>{t[h]===!0&&(t[h]={}),t[h]===!1&&delete t[h]}),{params:t,passedParams:s,rest:o,events:n}}function C8(r,e){let{el:t,nextEl:n,prevEl:s,paginationEl:o,scrollbarEl:u,swiper:c}=r;W_(e)&&n&&s&&(c.params.navigation.nextEl=n,c.originalParams.navigation.nextEl=n,c.params.navigation.prevEl=s,c.originalParams.navigation.prevEl=s),K_(e)&&o&&(c.params.pagination.el=o,c.originalParams.pagination.el=o),q_(e)&&u&&(c.params.scrollbar.el=u,c.originalParams.scrollbar.el=u),c.init(t)}function R8(r,e,t,n,s){const o=[];if(!e)return o;const u=h=>{o.indexOf(h)<0&&o.push(h)};if(t&&n){const h=n.map(s),m=t.map(s);h.join("")!==m.join("")&&u("children"),n.length!==t.length&&u("children")}return G_.filter(h=>h[0]==="_").map(h=>h.replace(/_/,"")).forEach(h=>{if(h in r&&h in e)if(ff(r[h])&&ff(e[h])){const m=Object.keys(r[h]),y=Object.keys(e[h]);m.length!==y.length?u(h):(m.forEach(E=>{r[h][E]!==e[h][E]&&u(h)}),y.forEach(E=>{r[h][E]!==e[h][E]&&u(h)}))}else r[h]!==e[h]&&u(h)}),o}const A8=r=>{!r||r.destroyed||!r.params.virtual||r.params.virtual&&!r.params.virtual.enabled||(r.updateSlides(),r.updateProgress(),r.updateSlidesClasses(),r.parallax&&r.params.parallax&&r.params.parallax.enabled&&r.parallax.setTranslate())};function yv(){return yv=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},yv.apply(this,arguments)}function X_(r){return r.type&&r.type.displayName&&r.type.displayName.includes("SwiperSlide")}function Q_(r){const e=[];return gr.Children.toArray(r).forEach(t=>{X_(t)?e.push(t):t.props&&t.props.children&&Q_(t.props.children).forEach(n=>e.push(n))}),e}function _8(r){const e=[],t={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return gr.Children.toArray(r).forEach(n=>{if(X_(n))e.push(n);else if(n.props&&n.props.slot&&t[n.props.slot])t[n.props.slot].push(n);else if(n.props&&n.props.children){const s=Q_(n.props.children);s.length>0?s.forEach(o=>e.push(o)):t["container-end"].push(n)}else t["container-end"].push(n)}),{slides:e,slots:t}}function L8(r,e,t){if(!t)return null;const n=y=>{let E=y;return y<0?E=e.length+y:E>=e.length&&(E=E-e.length),E},s=r.isHorizontal()?{[r.rtlTranslate?"right":"left"]:`${t.offset}px`}:{top:`${t.offset}px`},{from:o,to:u}=t,c=r.params.loop?-e.length:0,h=r.params.loop?e.length*2:e.length,m=[];for(let y=c;y<h;y+=1)y>=o&&y<=u&&m.push(e[n(y)]);return m.map((y,E)=>gr.cloneElement(y,{swiper:r,style:s,key:`slide-${E}`}))}function vp(r,e){return typeof window>"u"?Tt.useEffect(r,e):Tt.useLayoutEffect(r,e)}const J_=Tt.createContext(null),k8=Tt.createContext(null),D8=Tt.forwardRef(function(r,e){let{className:t,tag:n="div",wrapperTag:s="div",children:o,onSwiper:u,...c}=r===void 0?{}:r,h=!1;const[m,y]=Tt.useState("swiper"),[E,T]=Tt.useState(null),[R,_]=Tt.useState(!1),L=Tt.useRef(!1),M=Tt.useRef(null),F=Tt.useRef(null),Z=Tt.useRef(null),K=Tt.useRef(null),Y=Tt.useRef(null),X=Tt.useRef(null),ue=Tt.useRef(null),ie=Tt.useRef(null),{params:ye,passedParams:de,rest:Re,events:Ce}=w8(c),{slides:Ve,slots:ze}=_8(o),Qe=()=>{_(!R)};Object.assign(ye.on,{_containerClasses(Ue,He){y(He)}});const et=()=>{Object.assign(ye.on,Ce),h=!0;const Ue={...ye};if(delete Ue.wrapperClass,F.current=new iE(Ue),F.current.virtual&&F.current.params.virtual.enabled){F.current.virtual.slides=Ve;const He={cache:!1,slides:Ve,renderExternal:T,renderExternalUpdate:!1};df(F.current.params.virtual,He),df(F.current.originalParams.virtual,He)}};M.current||et(),F.current&&F.current.on("_beforeBreakpoint",Qe);const Pe=()=>{h||!Ce||!F.current||Object.keys(Ce).forEach(Ue=>{F.current.on(Ue,Ce[Ue])})},ne=()=>{!Ce||!F.current||Object.keys(Ce).forEach(Ue=>{F.current.off(Ue,Ce[Ue])})};Tt.useEffect(()=>()=>{F.current&&F.current.off("_beforeBreakpoint",Qe)}),Tt.useEffect(()=>{!L.current&&F.current&&(F.current.emitSlidesClasses(),L.current=!0)}),vp(()=>{if(e&&(e.current=M.current),!!M.current)return F.current.destroyed&&et(),C8({el:M.current,nextEl:Y.current,prevEl:X.current,paginationEl:ue.current,scrollbarEl:ie.current,swiper:F.current},ye),u&&u(F.current),()=>{F.current&&!F.current.destroyed&&F.current.destroy(!0,!1)}},[]),vp(()=>{Pe();const Ue=R8(de,Z.current,Ve,K.current,He=>He.key);return Z.current=de,K.current=Ve,Ue.length&&F.current&&!F.current.destroyed&&T8({swiper:F.current,slides:Ve,passedParams:de,changedParams:Ue,nextEl:Y.current,prevEl:X.current,scrollbarEl:ie.current,paginationEl:ue.current}),()=>{ne()}}),vp(()=>{A8(F.current)},[E]);function _e(){return ye.virtual?L8(F.current,Ve,E):Ve.map((Ue,He)=>gr.cloneElement(Ue,{swiper:F.current,swiperSlideIndex:He}))}return gr.createElement(n,yv({ref:M,className:Y_(`${m}${t?` ${t}`:""}`)},Re),gr.createElement(k8.Provider,{value:F.current},ze["container-start"],gr.createElement(s,{className:b8(ye.wrapperClass)},ze["wrapper-start"],_e(),ze["wrapper-end"]),W_(ye)&&gr.createElement(gr.Fragment,null,gr.createElement("div",{ref:X,className:"swiper-button-prev"}),gr.createElement("div",{ref:Y,className:"swiper-button-next"})),q_(ye)&&gr.createElement("div",{ref:ie,className:"swiper-scrollbar"}),K_(ye)&&gr.createElement("div",{ref:ue,className:"swiper-pagination"}),ze["container-end"]))});D8.displayName="Swiper";const I8=Tt.forwardRef(function(r,e){let{tag:t="div",children:n,className:s="",swiper:o,zoom:u,lazy:c,virtualIndex:h,swiperSlideIndex:m,...y}=r===void 0?{}:r;const E=Tt.useRef(null),[T,R]=Tt.useState("swiper-slide"),[_,L]=Tt.useState(!1);function M(Y,X,ue){X===E.current&&R(ue)}vp(()=>{if(typeof m<"u"&&(E.current.swiperSlideIndex=m),e&&(e.current=E.current),!(!E.current||!o)){if(o.destroyed){T!=="swiper-slide"&&R("swiper-slide");return}return o.on("_slideClass",M),()=>{o&&o.off("_slideClass",M)}}}),vp(()=>{o&&E.current&&!o.destroyed&&R(o.getSlideClasses(E.current))},[o]);const F={isActive:T.indexOf("swiper-slide-active")>=0,isVisible:T.indexOf("swiper-slide-visible")>=0,isPrev:T.indexOf("swiper-slide-prev")>=0,isNext:T.indexOf("swiper-slide-next")>=0},Z=()=>typeof n=="function"?n(F):n,K=()=>{L(!0)};return gr.createElement(t,yv({ref:E,className:Y_(`${T}${s?` ${s}`:""}`),"data-swiper-slide-index":h,onLoad:K},y),u&&gr.createElement(J_.Provider,{value:F},gr.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":typeof u=="number"?u:void 0},Z(),c&&!_&&gr.createElement("div",{className:"swiper-lazy-preloader"}))),!u&&gr.createElement(J_.Provider,{value:F},Z(),c&&!_&&gr.createElement("div",{className:"swiper-lazy-preloader"})))});I8.displayName="SwiperSlide",[{key:"entryTime",title:"진입 시간",value:"",accumulate:!1},{key:"lastUpdated",title:"데이터 업데이트 시간",value:"",accumulate:!1},{key:"clientId",title:"클라이언트 ID",value:"",accumulate:!1},{key:"id",title:"ID",value:"",accumulate:!1},{key:"likeCount",title:"좋아요수",value:[0,0],accumulate:!0},{key:"commentCount",title:"댓글수",value:0,accumulate:!0},{key:"viewCount",title:"조회수",value:[0,0],accumulate:!0},{key:"watchingTime",title:"누적 WT(초)",value:0,accumulate:!1},{key:"shareCount",title:"공유수",value:0,accumulate:!0},{key:"chattingCount",title:"채팅수",value:0,accumulate:!0},{key:"productCount",title:"상품 클릭수",value:0,accumulate:!0},{key:"bannerCount",title:"배너 클릭수",value:0,type:!0},{key:"userId",title:"유저 ID",value:"",accumulate:!1},{key:"authType",title:"회원 타입",value:"",accumulate:!1},{key:"expireTime",title:"회원 만료 시간",value:"",accumulate:!1},{key:"info",title:"OS / 브라우저 정보",value:"",accumulate:!1},{key:"version",title:"플레이어 버전",value:"",accumulate:!1}].findIndex(r=>r.key==="lastUpdated");for(var ms=[],sE=0;sE<256;++sE)ms.push((sE+256).toString(16).slice(1));function P8(r,e=0){return(ms[r[e+0]]+ms[r[e+1]]+ms[r[e+2]]+ms[r[e+3]]+"-"+ms[r[e+4]]+ms[r[e+5]]+"-"+ms[r[e+6]]+ms[r[e+7]]+"-"+ms[r[e+8]]+ms[r[e+9]]+"-"+ms[r[e+10]]+ms[r[e+11]]+ms[r[e+12]]+ms[r[e+13]]+ms[r[e+14]]+ms[r[e+15]]).toLowerCase()}var Sv,M8=new Uint8Array(16);function O8(){if(!Sv&&(Sv=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Sv))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Sv(M8)}var F8=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const Z_={randomUUID:F8};function N8(r,e,t){if(Z_.randomUUID&&!e&&!r)return Z_.randomUUID();r=r||{};var n=r.random||(r.rng||O8)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,P8(n)}const Al={root:"_root_1a1im_2",checkbox:"_checkbox_1a1im_23",checkbox_input:"_checkbox_input_1a1im_32",checkbox_label:"_checkbox_label_1a1im_36",toggle:"_toggle_1a1im_58",toggle_input:"_toggle_input_1a1im_67",toggle_label:"_toggle_label_1a1im_72"};Tt.forwardRef(({id:r,type:e="text",autoComplete:t="off",className:n,...s},o)=>{const c=Tt.useRef(r||N8()).current;return e==="toggle"?Yt.jsxs("div",{className:`${Al.root} ${Al.toggle} ${n||""}`,children:[Yt.jsx("input",{ref:o,className:Al.toggle_input,type:"checkbox",id:c,...s}),Yt.jsx("label",{className:Al.toggle_label,htmlFor:c,children:Yt.jsx("span",{className:Al.cursor})})]}):e==="checkbox"?Yt.jsxs("div",{className:`${Al.root} ${Al.checkbox} ${n||""}`,children:[Yt.jsx("input",{ref:o,className:Al.checkbox_input,type:"checkbox",id:c,...s}),Yt.jsx("label",{className:Al.checkbox_label,htmlFor:c})]}):Yt.jsx("input",{ref:o,id:c,type:e,autoComplete:t,className:`${Al.root} ${n||""}`,...s})});function aE(r){this.message=r}aE.prototype=new Error,aE.prototype.name="InvalidCharacterError";var eL=typeof window<"u"&&window.atob&&window.atob.bind(window)||function(r){var e=String(r).replace(/=+$/,"");if(e.length%4==1)throw new aE("'atob' failed: The string to be decoded is not correctly encoded.");for(var t,n,s=0,o=0,u="";n=e.charAt(o++);~n&&(t=s%4?64*t+n:n,s++%4)?u+=String.fromCharCode(255&t>>(-2*s&6)):0)n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(n);return u};function U8(r){var e=r.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw"Illegal base64url string!"}try{return function(t){return decodeURIComponent(eL(t).replace(/(.)/g,function(n,s){var o=s.charCodeAt(0).toString(16).toUpperCase();return o.length<2&&(o="0"+o),"%"+o}))}(e)}catch{return eL(e)}}function Ev(r){this.message=r}function tL(r,e){if(typeof r!="string")throw new Ev("Invalid token specified");var t=(e=e||{}).header===!0?0:1;try{return JSON.parse(U8(r.split(".")[t]))}catch(n){throw new Ev("Invalid token specified: "+n.message)}}Ev.prototype=new Error,Ev.prototype.name="InvalidTokenError";const nL={dev:"https://dev.api.brixcloud.io/v1",stage:"https://stage.api.brixcloud.io/v1",prod:"https://api.brixcloud.io/v1"},B8={dev:"https://dev.auth.brixcloud.io/v1",stage:"https://stage.auth.brixcloud.io/v1",prod:"https://auth.brixcloud.io/v1"},$8=async({id:r,env:e})=>{const t=await fetch(nL[e]+`/public/ugc/${r}`),n=await t.json();if(!t.ok)throw n;return n},V8=async({id:r,env:e})=>{function t(o){return{statusCode:o.statusCode,success:o.success,timestamp:o.timestamp,userId:o.shortform.clientId,nickName:void 0,title:o.shortform.title,content:void 0,images:o.shortform.images,tags:o.shortform.tags,enableComment:o.shortform.enableComment,metaData:void 0,id:o.shortform.id,client:{id:o.shortform.clientId,name:void 0},products:void 0,counter:o.shortform.counter,playUrl:o.shortform.playUrl}}const n=await fetch(nL[e]+`/public/shortform/${r}?onlyOne=true`),s=await n.json();if(!n.ok)throw s;return t(s)},z8=async({clientId:r,token:e,env:t})=>{const n=`__brix_session_token_${r}`,s="__brix_session_api_status";let o=e??localStorage.getItem(n);if(o)try{tL(o).exp*1e3-Date.now()<0&&(o=null)}catch{o=null}if(!o)if(sessionStorage.getItem(s)==="pending")for(;sessionStorage.getItem(s)==="pending";)await new Promise(c=>setTimeout(c,100)),o=localStorage.getItem(n);else try{sessionStorage.setItem(n,"pending"),o=(await(await fetch(B8[t]+"/auth/token/guest",{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({partner:r})})).json()).accessToken}finally{sessionStorage.setItem(n,"success")}return localStorage.setItem(n,o),tL(o)},rL=(r,e=!1)=>{const[t,n]=Tt.useState(null),[s,o]=Tt.useState(null);return Tt.useEffect(()=>{if(e)return;(async()=>{try{const c=await r();n(c),o(null)}catch(c){n(null),o(c.message)}})()},[r,e]),{data:t,error:s}};function j8({id:r,type:e="ugc",env:t,shadow:n,token:s,style:o,ratio:u,loop:c,autoplay:h,restartFromBeginning:m,className:y}){var et,Pe;const[E,T]=Tt.useState(),[R,_]=Tt.useState(0),[L,M]=Tt.useState(!0),[F,Z]=Tt.useState(!1),{data:K}=rL(Tt.useCallback(()=>e==="ugc"?$8({id:r,env:t}):V8({id:r,env:t}),[r,t]),!r),Y=Tt.useRef(),{data:X}=rL(Tt.useCallback(()=>{var ne;return z8({clientId:(ne=K==null?void 0:K.client)==null?void 0:ne.id,env:t,token:s})},[(et=K==null?void 0:K.client)==null?void 0:et.id,t,s]),!((Pe=K==null?void 0:K.client)!=null&&Pe.id)),ue=Tt.useRef(null),ie=TU({ref:ue,threshold:.1}),ye=Tt.useCallback(ne=>{T(ne),ne.loop=!!c},[]),de=Tt.useCallback(()=>{T(void 0)},[]),Re=()=>{E&&E.play()},Ce=()=>{E&&E.pause()},Ve=(ne,_e)=>{if(ne.stopPropagation(),!E)return;const Ue=_e*E.duration/100;E.currentTime=Ue},ze=ne=>{ne.stopPropagation(),E&&(E.muted=!E.muted,M(E.muted))},Qe=Tt.useMemo(()=>{var ne,_e;return t?new vU({identityPoolId:(ne=HC[t])==null?void 0:ne.identityPoolId,streamName:(_e=HC[t])==null?void 0:_e.streamName}):void 0},[t]);return Tt.useEffect(()=>{if(!E||!Qe)return;const ne=Be=>{const Je=Be.target;_(Je.currentTime/Je.duration*100)},_e=()=>{Z(!0),m&&(E.currentTime=0),Qe.start()},Ue=()=>{Z(!1),Qe.stop()},He=()=>{h?E.play():E.pause()};return E.addEventListener("loadedmetadata",He),E.addEventListener("timeupdate",ne),E.addEventListener("play",_e),E.addEventListener("pause",Ue),()=>{E.removeEventListener("loadedmetadata",He),E.removeEventListener("timeupdate",ne),E.removeEventListener("play",_e),E.removeEventListener("pause",Ue)}},[E,Qe]),Tt.useEffect(()=>{E&&(Y.current&&clearTimeout(Y.current),ie&&h&&(Y.current=setTimeout(()=>{E.play()},300)),ie||(Y.current=setTimeout(()=>{E.pause()},700)))},[ie,E]),Tt.useEffect(()=>{!t||!X||!r||!Qe||(Qe.setType(e),Qe.setId(r),Qe.setUser(X.userId,X.role),Qe.stop())},[Qe]),(K==null?void 0:K.status)==="standby"||(K==null?void 0:K.status)==="converting"?Yt.jsx("div",{className:dl.root,children:Yt.jsx("div",{className:dl.error,children:`업로드된 영상이 처리중 입니다.
|
|
311
|
+
잠시 후 확인해 주세요.`})}):Yt.jsx(SU,{kinesis:Qe,children:Yt.jsxs("div",{ref:ue,className:[dl.root,y??""].join(" "),style:o,children:[Yt.jsx(t2,{ratio:u,className:dl.player,controls:!1,shadow:n,src:K==null?void 0:K.playUrl,onInit:ye,onDestroy:de}),!F&&Yt.jsx("div",{className:dl.play_button,onClick:Re}),F&&Yt.jsx("div",{className:dl.pause_button,onClick:Ce}),Yt.jsx("div",{className:[dl.mute_button,L?dl.sound_off_icon:dl.sound_on_icon].join(" "),onClick:ze}),Yt.jsx(D_,{className:dl.progress,progress:R,onChangeProgress:Ve})]})})}const H8=aP(j8,{props:{id:"string",token:"string",env:"string",shadow:"boolean",ratio:"boolean",autoplay:"boolean",loop:"boolean",restartFromBeginning:"boolean",className:"string"}});customElements.define("brix-player-user",H8);const iL=Object.freeze(Object.defineProperty({__proto__:null,CognitoIdentityClient:$C,GetCredentialsForIdentityCommand:mU,GetIdCommand:gU},Symbol.toStringTag,{value:"Module"}))});
|